From nobody Mon May 25 01:33:08 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gNz0h6Vpjz6fdjW for ; Mon, 25 May 2026 01:33: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gNz0h5MhHz3SG7 for ; Mon, 25 May 2026 01:33:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779672788; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TWky71U18rnuDeGfAQ8dvqNHgn0DaL2i1CBFNweFimg=; b=QM1gOauo112O/WOOq+7+kc+5IzVkruDuF+3F7WjMKntfR7F8xGE/wJl1eFgKGPmDg3osVU ttZ3TnaZu6P1DpEGXsDXh/Um8JoTfU4e0tBAAPR1U3WeEvI9/Ud24u62Xf7Bmy2Xq6NHt6 31XQ2u1YYJnoaZmwPYYLMuy4GaD7mcSyUv4hj4nsas0itksuDrICfDgbUkP/b0uBLT9pIA TGBuWsw9vuDe8t4vA1W3yhJAI2Yu+FxxR1OndKkj2Gk5e1Kp4f7bC3CFtQJO+PXuyd1udG ixoWq6Rj6SEDHwmdkXxX4Zphw5aWgb5vHsubCUYXKKukBXIiKphMWIZ5HXRMVg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779672788; a=rsa-sha256; cv=none; b=NS0hVzTpvqZrfTmk7Li9qz46uazCAyNFlLWnO6NlM5gb5z/dASIJS0WLzmcUCKXJP2bFoe MWo+18Jmqr9AVIanN0hhpgr6S4yu0xY56+XIYZ7cmzyO7zAwMcbbusmFzgt6NVQbJD1qEh 1TKLm8H9JKRVmlmBuBKGeK1gVN5YClOzX2Ti+rIf/TScWN5GJ4rqUiZBJHDfqshEbJv+Zg uGbFiXR11fNF2//4vxQ09SVq6xUn7B/keosK1Y8E8s9walfe9KNXmoUMQ3ehyGas/g/rjC Crwu2Yq9GnQd29seaYwDpW+y3IQgtxvNrLkQ9TZQtmv1kIJnoU3BtqopzF5jpQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779672788; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TWky71U18rnuDeGfAQ8dvqNHgn0DaL2i1CBFNweFimg=; b=tl9a4FsBf2AtCM41GTGnZB/FDTx4OZw26p1xfzT2G1tYnUrfmr4GRYqF/fnab+05dMSiB/ vrsVxKo8gfVjE2xiE3ghaokbfnZJDIfRXAUNOKgMe12DorQTJk/FWLE/KuzRhSHitb0ZFN WfdecmZQZK2iAvDMpDcoR1MTco6+XIukFmmuOUlMvTug5KKHnZDI1ZRyu5YbjWr7t+9pxI YbWAUz5qywqOFOUw+vAxpkMzzUt4WZGe5Fnfq2M9+ejmPwsip3jbsczoBO5oLtlbuyuivV ziEAXP76Cp1wxA3N/hFK/trpywiJ13YqUSRXYNy2H+Sb0duw3dX/wlhHUmTimg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gNz0h4fmJz4Wg for ; Mon, 25 May 2026 01:33:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 43f82 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 25 May 2026 01:33:08 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: e3b4dbb80577 - main - net80211: create ieee80211_ht_check_bar_exceed_retry_count() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e3b4dbb80577fcecb74566d2c1a219dac146f541 Auto-Submitted: auto-generated Date: Mon, 25 May 2026 01:33:08 +0000 Message-Id: <6a13a6d4.43f82.20743414@gitrepo.freebsd.org> The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=e3b4dbb80577fcecb74566d2c1a219dac146f541 commit e3b4dbb80577fcecb74566d2c1a219dac146f541 Author: Adrian Chadd AuthorDate: 2026-05-17 18:40:03 +0000 Commit: Adrian Chadd CommitDate: 2026-05-25 01:32:04 +0000 net80211: create ieee80211_ht_check_bar_exceed_retry_count() Create a function to check if the BAR retry limit has been reached. Use this in if_ath_tx instead of a hard-coded value. I've been meaning to do this for a long time. Differential Revision: https://reviews.freebsd.org/D57055 --- sys/dev/ath/if_ath_tx.c | 3 ++- sys/net80211/ieee80211_ht.c | 20 +++++++++++++++++++- sys/net80211/ieee80211_ht.h | 2 ++ 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/sys/dev/ath/if_ath_tx.c b/sys/dev/ath/if_ath_tx.c index 9ac591c14943..d37210723680 100644 --- a/sys/dev/ath/if_ath_tx.c +++ b/sys/dev/ath/if_ath_tx.c @@ -6225,7 +6225,8 @@ ath_bar_response(struct ieee80211_node *ni, struct ieee80211_tx_ampdu *tap, * Also, don't call it if bar_tx/bar_wait are 0; something * has beaten us to the punch? (XXX figure out what?) */ - if (status == 0 || attempts == 50) { + if (status == 0 || + ieee80211_ht_check_bar_exceed_retry_count(ni, attempts)) { ATH_TX_LOCK(sc); if (atid->bar_tx == 0 || atid->bar_wait == 0) DPRINTF(sc, ATH_DEBUG_SW_TX_BAR, diff --git a/sys/net80211/ieee80211_ht.c b/sys/net80211/ieee80211_ht.c index 9b2b0df33785..8ebfbbae6377 100644 --- a/sys/net80211/ieee80211_ht.c +++ b/sys/net80211/ieee80211_ht.c @@ -2899,7 +2899,7 @@ bar_timeout(void *arg) if ((tap->txa_flags & IEEE80211_AGGR_BARPEND) == 0) return; /* XXX ? */ - if (tap->txa_attempts >= ieee80211_bar_maxtries) { + if (ieee80211_ht_check_bar_exceed_retry_count(ni, tap->txa_attempts)) { struct ieee80211com *ic = ni->ni_ic; ni->ni_vap->iv_stats.is_ampdu_bar_tx_fail++; @@ -3845,3 +3845,21 @@ ieee80211_ht_check_tx_ht40(const struct ieee80211_node *ni) IEEE80211_IS_CHAN_HT40(ni->ni_chan) && (ni->ni_chw == NET80211_STA_RX_BW_40)); } + +/** + * @brief Return whether the given BAR retry count exceeds the configured count + * + * @param ni ieee80211_node to check against + * @param count BAR retry count + * @returns true if the count has exceeded the configured count, false if not + */ +bool +ieee80211_ht_check_bar_exceed_retry_count(const struct ieee80211_node *ni __unused, + int count) +{ + /* + * Note: ni isn't used here because the BAR limit is currently + * global. It's here for future work. + */ + return (count >= ieee80211_bar_maxtries); +} diff --git a/sys/net80211/ieee80211_ht.h b/sys/net80211/ieee80211_ht.h index c31bb8700289..505b39628dcf 100644 --- a/sys/net80211/ieee80211_ht.h +++ b/sys/net80211/ieee80211_ht.h @@ -247,5 +247,7 @@ bool ieee80211_ht_check_tx_shortgi_20(const struct ieee80211_node *ni); bool ieee80211_ht_check_tx_shortgi_40(const struct ieee80211_node *ni); bool ieee80211_ht_check_tx_ht40(const struct ieee80211_node *ni); bool ieee80211_ht_check_tx_ht(const struct ieee80211_node *ht); +bool ieee80211_ht_check_bar_exceed_retry_count(const struct ieee80211_node *, + int); #endif /* _NET80211_IEEE80211_HT_H_ */ From nobody Mon May 25 01:33:09 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gNz0k0ClWz6ffB1 for ; Mon, 25 May 2026 01:33: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gNz0j5cd0z3RwG for ; Mon, 25 May 2026 01:33:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779672789; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+Oa0J8gLfAcTvK0i0Mo4WJJSQjAxBjls6qp95GodFY0=; b=L5KhP/fv/R/EFYnlU35UqAkj31e+wgE3dzQWL1A7jxg7VJM/HoJihAHTnXYysfFwPdCHqZ AEVkhNTektgkD2xGRub72qjP3pGhu0xkFFRihXO1mhBvM6nQJ+n87gVybe1XACNYZgK5wW pdxkzNwHSESr1suUZfBGNbz9sIJ305QkZN/oBCU+R5xgO3Pt8oDDs3bWTgHk2cqxWlpQWd 0SqzGZKND3MdQfkrUS1WT8MQbiLXFCLZqZWAwe1GoSfKM1yEhm4P9QC0C5cO37LN8PfHe9 0AUyyxjQmW3EYjVtUrBOUX5VZv/7x0WIW+UjC7Pxg3Vfn9WBkFUwKO45sr084w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779672789; a=rsa-sha256; cv=none; b=iCIL8+Rps8PiVe0/IHZeRfOPKpMwvW2NdB36Wlub5gL/HpvtzZ1KwlqHWr3PIaWKMbmhtX gzg0l66XReUUvT/eVPvSlA2XQFgjcRrL3Gbd8lI+QUl+m8+vX1RA2saSdpKwMNql0g6xDd YVAN3ORmXStss+WyRiKmIYsZ4W67dJ1UGlsraeG6GVwOkVkGgxnN+diLZ0idin9SL9JphP +6SnIS0xwk8rR9OV3mnn97BFlkTn75Bo+/PR+hWAmAoN5g4XffRkmYfcwHQWZzecKGMrUP R3q3DRqnWXYp/P97Lmft2wcfdQ7lZs7CiSnxaiDg6m2bV8Iun77t4vL6XKzB9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779672789; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+Oa0J8gLfAcTvK0i0Mo4WJJSQjAxBjls6qp95GodFY0=; b=MuGYe8YYusQ4NgOYawwkFlPexvJsEoYUucPG847DNW6t05YyXywA5eK9V4itiYNJn/MVoz xW0f3DO6xcH2TYAMThtLzlfFgWu4/Fax5cAs0ecto3E2ZooF4imc0wE01NxPoH38p/D3ic 2DnOfgt7VtbstyF96PXZvxJcbyzafGnfiq1kMsQcn3xln7C+bnsO3ry0xCX7zr7QuWm2ig s54VK0AlundQetHZXKGi5sPUMTrsJLdRccmIuAvaZvOopPL62ygEr+pdV/neexhBRdEDea J+VOtiZr34AvcgBDEid2nVYgm3QgqtWzHLD9TDLYXi0gwwjSMoRktTpx9zHiJA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gNz0j57tjz3rv for ; Mon, 25 May 2026 01:33:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 429bd by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 25 May 2026 01:33:09 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: 0c37c9928c68 - main - net80211: add some example doxygen inline documents List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0c37c9928c68ca50b3d5a1282d0c756e71c2ef35 Auto-Submitted: auto-generated Date: Mon, 25 May 2026 01:33:09 +0000 Message-Id: <6a13a6d5.429bd.4e7acf3f@gitrepo.freebsd.org> The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=0c37c9928c68ca50b3d5a1282d0c756e71c2ef35 commit 0c37c9928c68ca50b3d5a1282d0c756e71c2ef35 Author: Adrian Chadd AuthorDate: 2026-05-17 18:41:11 +0000 Commit: Adrian Chadd CommitDate: 2026-05-25 01:32:10 +0000 net80211: add some example doxygen inline documents This isn't supposed to be comprehensive, I want to have examples for the common doxygen comments: * describing a struct * inside a struct - single line before the item * inside a struct - same line after an item * inside a struct - multi-line before an item These build fine with the doxygen build in tools/kerneldoc/subsys/ . Differential Revision: https://reviews.freebsd.org/D57056 --- sys/net80211/ieee80211_var.h | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/sys/net80211/ieee80211_var.h b/sys/net80211/ieee80211_var.h index 2f11fa7c887f..f38489174986 100644 --- a/sys/net80211/ieee80211_var.h +++ b/sys/net80211/ieee80211_var.h @@ -134,8 +134,11 @@ struct ieee80211_frame; struct net80211dump_methods; +/** + * @brief ieee80211com - the top level driver / hardware instance. + */ struct ieee80211com { - void *ic_softc; /* driver softc */ + void *ic_softc; /**< pointer to driver softc */ const char *ic_name; /* usually device name */ ieee80211_com_lock_t ic_comlock; /* state update lock */ ieee80211_tx_lock_t ic_txlock; /* ic/vap TX lock */ @@ -176,7 +179,15 @@ struct ieee80211com { uint8_t ic_allmulti; /* vap's needing all multicast*/ uint8_t ic_nrunning; /* vap's marked running */ uint8_t ic_curmode; /* current mode */ + /** + * @brief Driver assigned MAC address. + * + * Drivers are required to populate ic_macaddr at attach time with + * the MAC address of the device. It is then used as the base for + * MAC addresses created for VAP interfaces. + */ uint8_t ic_macaddr[IEEE80211_ADDR_LEN]; + uint16_t ic_bintval; /* beacon interval */ uint16_t ic_lintval; /* listen interval */ uint16_t ic_holdover; /* PM hold over duration */ @@ -283,7 +294,19 @@ struct ieee80211com { struct ieee80211_regdomain *, int, struct ieee80211_channel []); - int (*ic_set_quiet)(struct ieee80211_node *, + /** + * @brief Handle the quiet time information element configuration. + * + * This allows drivers/modules to tie into the quiet time IE + * for controlling the transmit duty cycle. This may be required + * for more accurate radar detection. + * + * @param ni The ieee80211_node which transmitted the IE (eg in a scan) + * or if unknown, the BSSID node + * @param quiet_elm the quiet time element contents to parse/handle + * @returns 0 for OK, non-zero with errno (eg ENOSYS) + */ + int (*ic_set_quiet)(struct ieee80211_node *ni, u_int8_t *quiet_elm); /* regular transmit */ @@ -296,7 +319,7 @@ struct ieee80211com { int (*ic_raw_xmit)(struct ieee80211_node *, struct mbuf *, const struct ieee80211_bpf_params *); - /* update device state for 802.11 slot time change */ + /** update device state for 802.11 slot time change */ void (*ic_updateslot)(struct ieee80211com *); /* handle multicast state changes */ void (*ic_update_mcast)(struct ieee80211com *); From nobody Mon May 25 01:33:10 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gNz0l1y0sz6ffB2 for ; Mon, 25 May 2026 01:33: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gNz0k6QSLz3SCl for ; Mon, 25 May 2026 01:33:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779672790; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=heidOZs4wZcnU4pB7CNYQpb7w3keHzNVfThQv/vPkbw=; b=oHCTZeKRKmJ1eLwXrgTw17OJ58af73nHiErtrpajcMSFWSwOtFfAoFURs3tIcEpZdd9SMi cjY8LO0L6thuKrM0Q1yw0dud6Z4zWEPvn7y6X7vFmQBLCaJfzHmMrrR6GZciqd5TmZEXnA vT+Fu/Ac1xWYoAOVD0A4S/15tuMjmhqmOgOsT3KifSTRtTNKJ8WoJDB+CAb3dwdkg42eez TjWexoJFaHoxU/k1Hi+WjENBJnM6oChO3VNkWKgfo+Kc24invNgMy5Sa9UcP4YBkLv4hFO uSY2XQ219l5URybVMFIrREirWs4IWmVabJyxNtXeq2QjWumNqmh7yb8akXqJfw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779672790; a=rsa-sha256; cv=none; b=bfNgIx+gnwf7RWzC5xad5S2sv7TMMbXJu9EVAWkbppyn/812ubN3vhD2iaNnLipRINtX1K fz7gh6UUNkvdQUgSl4xBrpb5x3DA+cd27DFrHYKfGRIkvHjVrg6fKUQc0J2CT+q8T7EHl+ jTGPRp00MZmWnn9BXzA73DvxuXANmLd7goHps3b/oz52DiF8/oyyHj1e1Pf5lnH/ZF6BS5 BxHml9elhHE196ZeGN3LlvqJOUVu16MJSPuHaPJNdb+uphzl5m/hSD2TA9JIVSqDhZPKbg A9VoBiTEFwP5fSHpG2Fl9aW1UIuH75GM5R4CdivP286AZYSMFp0PXHW19B96kQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779672790; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=heidOZs4wZcnU4pB7CNYQpb7w3keHzNVfThQv/vPkbw=; b=Itq9/+NeTve9oX5FJ/lSnbODGe9jrt3hRHEQjS49VVhvOglXYgq04msWWEw3OYJes77B0u qRSe+yTv87gZt8o12/vokSWxJJtGHdALx648sgD5A4moqyokb+IcN8ovctf0l3PsjDdRCP VphQWijxXQMiGLfguFqPbAbUZwiYRP2xuRB/ZtxGV6Ec0XaSo4PbHeeOzETHtE8M+GsDg+ tkTmjnwc9+K8D7BNob17hkv9WqMybqhz1Xm3C8v3rMlVkQCWfxkvX/uqIQvFLdNBX4TtEE qEKBTnYUf70ZLUIAZG0zzU4BjcdUheijbrem31Rghs2fYAaf4qktnygKDRkNFg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gNz0k5wsWz4Fw for ; Mon, 25 May 2026 01:33:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 444e3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 25 May 2026 01:33:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: 1ccaef986746 - main - net80211: update/add some VHT doxygen documentation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1ccaef9867461c42251922e3fc4d4f85cec682b5 Auto-Submitted: auto-generated Date: Mon, 25 May 2026 01:33:10 +0000 Message-Id: <6a13a6d6.444e3.772fec3e@gitrepo.freebsd.org> The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=1ccaef9867461c42251922e3fc4d4f85cec682b5 commit 1ccaef9867461c42251922e3fc4d4f85cec682b5 Author: Adrian Chadd AuthorDate: 2026-05-19 05:08:50 +0000 Commit: Adrian Chadd CommitDate: 2026-05-25 01:32:16 +0000 net80211: update/add some VHT doxygen documentation Add and update some documentation to be picked up by doxygen. Differential Revision: https://reviews.freebsd.org/D57079 --- sys/net80211/ieee80211_vht.c | 71 +++++++++++++++++++++++++++++++++----------- 1 file changed, 54 insertions(+), 17 deletions(-) diff --git a/sys/net80211/ieee80211_vht.c b/sys/net80211/ieee80211_vht.c index 095c4108c768..696e2e54f563 100644 --- a/sys/net80211/ieee80211_vht.c +++ b/sys/net80211/ieee80211_vht.c @@ -235,10 +235,16 @@ ieee80211_vht_node_cleanup(struct ieee80211_node *ni) bzero(&ni->ni_vht_mcsinfo, sizeof(struct ieee80211_vht_mcs_info)); } -/* - * Parse an 802.11ac VHT operation IE. +/** + * @brief Parse an 802.11ac VHT operation IE. + * + * This parses the VHT operation IE (channel width, basic MCS set) + * into the given ieee80211_node . * * 802.11-2020 9.4.2.158 (VHT Operation element) + * + * @param ni ieee80211_node to parse VHT operation IE into + * @param ie The VHT operation IE to parse, 802.11 endian */ void ieee80211_parse_vhtopmode(struct ieee80211_node *ni, const uint8_t *ie) @@ -257,10 +263,16 @@ ieee80211_parse_vhtopmode(struct ieee80211_node *ni, const uint8_t *ie) #endif } -/* - * Parse an 802.11ac VHT capability IE. +/** + * @brief Parse an 802.11ac VHT capability IE. + * + * Parse the VHT capability IE into the node vht fields + * (ni->ni_vht_mcsinfo, ni->ni_vhtcap). * * 802.11-2020 9.4.2.157 (VHT Capabilities element) + * + * @param ni ieee80211_node to parse VHT info into + * @param ie VHT capability IE to parse, 802.11 endian */ void ieee80211_parse_vhtcap(struct ieee80211_node *ni, const uint8_t *ie) @@ -371,8 +383,8 @@ ieee80211_vht_node_leave(struct ieee80211_node *ni) "%s: called", __func__); } -/* - * Calculate the VHTCAP IE for a given node. +/** + * @brief Calculate the VHTCAP IE for a given node. * * This includes calculating the capability intersection based on the * current operating mode and intersection of the TX/RX MCS maps. @@ -390,7 +402,9 @@ ieee80211_vht_node_leave(struct ieee80211_node *ni) * TODO: investigate what we should negotiate for MU-MIMO beamforming * options. * - * opmode is '1' for "vhtcap as if I'm a STA", 0 otherwise. + * @param ni ieee80211_node to check + * @param vhtcap ieee80211_vht_cap to populate (in host order). + * @param opmode is '1' for "vhtcap as if I'm a STA", 0 otherwise. */ void ieee80211_vht_get_vhtcap_ie(struct ieee80211_node *ni, @@ -715,14 +729,22 @@ ieee80211_vht_get_vhtcap_ie(struct ieee80211_node *ni, } } -/* - * Add a VHTCAP field. +/** + * @brief Add a VHTCAP field. * * If in station mode, we announce what we would like our * desired configuration to be. * * Else, we announce our capabilities based on our current * configuration. + * + * TODO: This assumes that the passed in buffer has enough space for + * the VHT capabilitity IE and that seems error prone. + * + * @param frm buffer to start populating the IE into + * @param ni ieee80211_node to fetch the VHT capability from + * @returns a pointer to the first byte in the buffer after the newly + * populated IE */ uint8_t * ieee80211_add_vhtcap(uint8_t *frm, struct ieee80211_node *ni) @@ -932,8 +954,14 @@ ieee80211_vht_get_vhtinfo_ie(struct ieee80211_node *ni, net80211_vap_printf(ni->ni_vap, "%s: called; TODO!\n", __func__); } -/* - * Return true if VHT rates can be used for the given node. +/** + * @brief Check if VHT rates can be used for the given node. + * + * This returns true if any VHT rates can be used to transmit + * to the given node. + * + * @param ni ieee80211_node to check + * @returns True if any VHT rates can be transmitted to the given node */ bool ieee80211_vht_check_tx_vht(const struct ieee80211_node *ni) @@ -954,11 +982,14 @@ ieee80211_vht_check_tx_vht(const struct ieee80211_node *ni) return (IEEE80211_IS_CHAN_VHT(ni->ni_chan)); } -/* - * Return true if VHT40 rates can be transmitted to the given node. +/** + * @brief Check if VHT40 rates can be transmitted to the given node. * * This verifies that the BSS is VHT40 capable and the current * node channel width is 40MHz. + * + * @param ni ieee80211_node to check + * @returns True if 40MHz VHT rates can be transmitted to the given node */ static bool ieee80211_vht_check_tx_vht40(const struct ieee80211_node *ni) @@ -977,11 +1008,14 @@ ieee80211_vht_check_tx_vht40(const struct ieee80211_node *ni) (ni->ni_chw == NET80211_STA_RX_BW_40)); } -/* - * Return true if VHT80 rates can be transmitted to the given node. +/** + * @brief Check if VHT80 rates can be transmitted to the given node. * * This verifies that the BSS is VHT80 capable and the current * node channel width is 80MHz. + * + * @param ni ieee80211_node to check + * @returns True if 80MHz VHT rates can be transmitted to the given node */ static bool ieee80211_vht_check_tx_vht80(const struct ieee80211_node *ni) @@ -1006,11 +1040,14 @@ ieee80211_vht_check_tx_vht80(const struct ieee80211_node *ni) (ni->ni_chw != NET80211_STA_RX_BW_20)); } -/* - * Return true if VHT 160 rates can be transmitted to the given node. +/** + * @brief Check if VHT 160 rates can be transmitted to the given node. * * This verifies that the BSS is VHT80+80 or VHT160 capable and the current * node channel width is 80+80MHz or 160MHz. + * + * @param ni ieee80211_node to check + * @returns True if 160MHz VHT rates can be transmitted to the given node */ static bool ieee80211_vht_check_tx_vht160(const struct ieee80211_node *ni) From nobody Mon May 25 01:33:11 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gNz0m4sjGz6ffB3 for ; Mon, 25 May 2026 01:33: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gNz0m0YQKz3RwT for ; Mon, 25 May 2026 01:33:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779672792; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O3Kcq5qlQEs24nyfumt+uAxGmC48/5wPOZcKgFUwFVU=; b=V2nd7A82a4QYhP0YRAGfhJZCaSCIsa7gpPtuOVhFwWFI105KsWsHVyxVHud6kIvSr9hZEx F5Uk1mVVZMYFamr/e/uneAzW6giEKYundaX+WxbWeitQnOQgsS1KwMhq586Hb8z5AExoO/ wWHQMZ5wO76UPAwTEIyQWOeM9MdY+qsf3EDHkUUahOFwkDHsB4ezkLBqn89KQroOYEGsqM pws8wNpQ8Q+3QpVl3+WkTKRJAoppsCyuWUNKoHtLdCjuSPdbRe6tlYCTwTj33d6q13dPuU xWEh3JMYhm5/MWiOhyCp8UGW+G+fIsnUgeXEC+uG8/XAO1ltqZOMhaOL6jI28A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779672792; a=rsa-sha256; cv=none; b=J3ytwQf15EKYX3o2u63I+kOa+WK/RS5Ijp06wyoRru6cuLg9PekZox6B4w59wN3g3ssGjH QatlzE2nRRYBvkzAjruLVVKvCE6Wk6+ZTk/wngNFlZmq2cCizVVscA7jtw0To1hKe+Ibu/ wr7Ow5EYRZaO5JHHRZOdWqlpQcefbkTqZ99QygmRtR7aDiyvCX4+H8RjdrFVFGmzRSl2Zy Fqm10FTQlSXK/nmo4yvD4D3BLubDf+C8AVc0VEoVlsK98pvrDoPlWAQk60PGT+raNj2PJP QlC+uWrnL+hZcc9XYSgeHsfWgK/8/awDxhdfIFtUlmQNXkYg+nsttg+eyzy9Qw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779672792; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O3Kcq5qlQEs24nyfumt+uAxGmC48/5wPOZcKgFUwFVU=; b=J/zBH2ducNksAIKMPs9J7TNiER3bjRG2l/Q5EVh20CzzCeuFJ5iIR+6vQhotVn9FQMBZfB jQAWf8H9nlIa1Dq0ColGid3bEzmZTRL2vkPm9CXMcs9aaBTiamoVuNWuJuCzGpGBNL/NpO TqLY6T7z5DwGZc+pYkKnBYRBMaFnSo/f22oIWje6yyFmlcESWJhE4ZK0KHbmGGpAXM9asG 3dfDKR4kGeamtvQiMV+6uFIPlXs+7q+n/3mLwxO2JUWsPkxXNoiC4uD4ZH2Jdt09VRsQ4p gaZBrIblo7n7jSS1H5AIgpH17Y2weg4BkPUTj6J5t7M8Gz1uiffvWvD2N9G9jQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gNz0l6rQ2z43r for ; Mon, 25 May 2026 01:33:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4361b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 25 May 2026 01:33:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: 490c53e9353f - main - net80211: add initial README.md and PROTOCOL.md List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 490c53e9353feb129fe0acb8d9ba8fa52db24e2c Auto-Submitted: auto-generated Date: Mon, 25 May 2026 01:33:11 +0000 Message-Id: <6a13a6d7.4361b.5c217572@gitrepo.freebsd.org> The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=490c53e9353feb129fe0acb8d9ba8fa52db24e2c commit 490c53e9353feb129fe0acb8d9ba8fa52db24e2c Author: Adrian Chadd AuthorDate: 2026-04-26 23:32:35 +0000 Commit: Adrian Chadd CommitDate: 2026-05-25 01:32:33 +0000 net80211: add initial README.md and PROTOCOL.md * Add top level README.md, linking to in progress and todo items * Add an 802.11 protocol overview, with todo items - this is designed to provide a basic introduction to 802.11 for people wishing to work on net80211 and drivers. * DEBUG.md - cover the debug API * DATAPATH_TRANSMIT.md - transmit datapath * DATAPATH_RECEIVE.md - receive datapath * PROTOCOL.md - a high level (for values of "high") overview of the 802.11 protocol and where it intersects with net80211 Differential Revision: https://reviews.freebsd.org/D56760 --- sys/net80211/DATAPATH_RECEIVE.md | 160 +++++++++ sys/net80211/DATAPATH_TRANSMIT.md | 390 +++++++++++++++++++++ sys/net80211/DEBUG.md | 101 ++++++ sys/net80211/PROTOCOL.md | 563 +++++++++++++++++++++++++++++++ sys/net80211/README.md | 139 ++++++++ tools/kerneldoc/subsys/Doxyfile-net80211 | 3 +- 6 files changed, 1355 insertions(+), 1 deletion(-) diff --git a/sys/net80211/DATAPATH_RECEIVE.md b/sys/net80211/DATAPATH_RECEIVE.md new file mode 100644 index 000000000000..a930aba0c3da --- /dev/null +++ b/sys/net80211/DATAPATH_RECEIVE.md @@ -0,0 +1,160 @@ +# net80211 Datapath - Receive + +## Overview + +This document provides an overview for receive data paths in +net80211, between the interface to the operating system, through net80211 and +into the driver. + +The details about underlying implementations (eg how A-MPDU RX aggregation +is handled) will be covered in dedicated documents. + +## Concurrency Notes + +The transmit path(s), receive path and control / ioctl paths all run +in parallel and can be scheduled on multiple concurrently running +kernel threads. It's important to keep this in mind. + +## Receive Path + +### Concurrency + +There must only be one packet receive path into net80211. The net80211 stack +has not yet been fully validated to ensure that state changes all occur under +sufficient locking. + +### Data Path + +The receive path is split into three broad categories: + + * The normal 802.11/802.3 packet receive path from drivers; + * The input path for reinjected frames (eg WDS, 802.11s, BPF); + * Various side channels for offloaded non-data path (eg explicitly + scan results, management frames, etc.) + +#### Data Path - Initial Input + +The driver receive path begins in ieee80211_input.c . The four +entry points are: + + * ieee80211_input() / ieee80211_input_mimo() and + * ieee80211_input_all() / ieee80211_input_mimo_all(). + +The first two are called when the destination MAC address is a known +(struct ieee80211_node) node. These are passed up to the +VAP via a call to ni->ni_vap->iv_input(). + +The second two are called when the destination MAC address is NOT +a known node. In this instance, the frames are treated as broadcast +and routed to each VAP BSS node via a call to ieee80211_input_mimo(). + +Each VAP vap->iv_input() method handles the behavioural specific +needs of the interface. + +#### Data Path - VAP type / behaviour + +Each VAP type will do roughly the same thing - for example see +sta_input() in ieee80211_sta.c . + + * Check the frame size and protocol ID; + * Check if the frame has been decrypted in hardware; + * Grab A-MPDU session frames and put them in the reorder queue; + * Handle control frames sent to the node, or general scan frames; + * Get the frame QoS information / TID information if present; + * If appropriate, check the 802.11 receive sequence number; + * Break the handling up into data, management and control; + * Reinject into a radiotap/BPF session via a call to + ieee80211_radiotap_rx(). + +The data paths will typically do the following: + + * Do decryption if needed; + * Do 802.11 decap if needed; + * Enforce security requirements if needed; + * Eventually deliver the frame up to the higher level network + stack via a call to ieee80211_deliver_data() which will + strip away any last bits of 802.11 / net80211, + call ieee80211_vap_deliver_data(), which will call the + network stack input interface. + +The control and management paths will call vap->iv_recv_mgmt() +and vap->iv_recv_ctl() which implement the per VAP type behaviours. +These will include participating in driving the scan engine, +the per-node state machines and the VAP state machine. + +#### Reinjected Path + +#### Side Channels + +Drivers may need a specific side channel for management/control +frames, MAC layer events (eg A-MPDU aggregation session state); +some power state communication, scan information and other +things that would normally show up as 802.11 frames. + +These will be covered in more detail in other documents. + +### Receive Status and Parameters + +Received 802.11 / 802.3 frames can come with a variety of information +that isn't strictly the data payload. These include receive timestamps +(at beginning or end of frame), receive noise floor / signal strength, +channel / frequency, channel width, received rate, aggregation frame +boundaries, decryption state, etc. + +The original paths - ieee80211_input() and ieee80211_input_all() - +took a noise floor and rssi parameter. Later drivers provide +information about all of the above by attaching a (struct ieee80211_rx_stats) +to the receive mbuf via a call to ieee80211_add_rx_params() bafore +calling ieee80211_input_mimo() and ieee80211_input_mimo_all() . + +Existing drivers should be migrated to the mimo versions of these +APIs and the existing API should eventually be deprecated and +replace the mimo versions. + +All new drivers must use the ieee80211_input_mimo() and +ieee80211_input_mimo_all() API calls. + +### Driver Receive Path Requirements + +The driver receive path has a few top level requirements: + + * Driver / stack locks must not be held during receive. This means that + drivers should dequeue their frames first into a local list, release + whatever locks are needed and then pass the frames up to net80211. + + * Drivers are responsible for doing the node lookup before + calling ieee80211_input() / ieee80211_input_mimo() or + calling ieee80211_input_all() / ieee80211_input_mimo_all(). + + * Drivers are also responsible for creating and attaching the + ieee80211_rx_stats information via a call to ieee80211_add_rx_params(). + + * Drivers are responsible for tagging a frame as a potential + A_MPDU by tagging the received mbuf with the M_AMPDU flag. + They should do this by just tagging all mbufs to a node + with ni->ni_flags & IEEE80211_NODE_HT set w/ the M_AMPDU flag. + This is a holdover from the 802.11n code which enforces that + only potential AMPDU frames can be added to an A-MPDU receive + aggregation session and may be relaxed / removed in the future. + +### Driver Receive Path Methods + +Drivers can hook into the receive path processing in a variety of ways. +There are a number of vap methods that a driver can hook into +processing. The details will be covered in the driver document. + +These include: + + * vap->iv_input - the driver can replace the iv_input method + with its own method to first handle frames before they are passed + to the VAP type receive path. + * vap->iv_recv_mgmt - the driver can hook here to handle + management frames before the VAP type management receive path. + * vap->iv_recv_ctl - the driver can hook here to handle + control frames before the VAP type control receive path. + * vap->iv_bmiss - the driver can hook here to be informed of + beacon miss frames. + +These may be called at any time and overlapping with others (eg +the beacon miss event - which may be triggered by a timer - +can be called in parallel with the various receive path methods.) diff --git a/sys/net80211/DATAPATH_TRANSMIT.md b/sys/net80211/DATAPATH_TRANSMIT.md new file mode 100644 index 000000000000..b3122129d938 --- /dev/null +++ b/sys/net80211/DATAPATH_TRANSMIT.md @@ -0,0 +1,390 @@ +# net80211 Datapath - Transmit + +## Overview + +This document provides an overview for the transmit data path in +net80211, between the interface to the operating system, through net80211 and +into the driver. + +The details about underlying implementations (eg how A-MPDU RX aggregation +is handled) will be covered in dedicated documents. + +## Concurrency Notes + +The transmit path(s), receive path and control / ioctl paths all run +in parallel and can be scheduled on multiple concurrently running +kernel threads. It's important to keep this in mind. + +## Transmit Path + +There are two paths from the operating system layer into the net80211 transmit +path - the normal data path and the BPF / radiotap raw frame path. + +It is important to note that both paths have no serialisation between +them, and multiple sending paths in the OS can and will queue frames +simultaneously across multiple concurrently executing threads/CPUs. +Please keep this in mind when reading the transmit handling and +how it interacts with 802.11 sequence numbering and encryption IV. + +### Data Path - net80211 + +This is configured at the ifnet setup in ieee80211_vap_setup() - +the output path is ieee80211_vap_transmit(). This input path +takes 802.3 ethernet frames with no attached metadata (such as +rate control, transmit power, etc) - it is left up to the stack. + +This hands the packet off to ieee80211_start_pkt() which will +perform the initial 802.11 destination lookup, query the node +state (eg whether it's in power save) and the VAP state (eg +is the vap itself in power state, or in a non-RUN state) +and drop or queue the frame appropriately. + +It is then handed over to ieee80211_vap_pkt_send_dest() with +a destination ieee80211_node reference. + +ieee80211_vap_pkt_send_dest() performs the bulk of the +net80211 transmit handling. Packets will be queued here if the +destination node is in a power saving mode. + +This includes: + + * Firstly - checking if the packet needs to be queued for + power saving operation and will pass it via ieee80211_pwrsave() + if needed; + * QoS classification via a call to ieee80211_classify(); + * BPF TX tap via a call to BPF_MTAP(); + * handling 802.11 encapsulation via ieee80211_encap() if required; + * A-MPDU TX decisions, AMSDU and Atheros Fast-Frames decisions. + +At this point the packet has been 802.11 encapsulated if required, +marked as needing encryption if required, and has been optionally +fragmented into a list of 802.11 fragments. + +Finally, the packet / fragment packet chain is sent up to the driver via a call +to ieee80211_parent_xmitpkt(). The driver is expected to queue the +packet / fragment list or discard the packet / fragment list. The specific +format of the mbuf chain and how ieee80211_node references are kept +is documented in ieee80211_parent_xmitpkt(). + +#### Notes on transmit path serialisation + +Note that by default the IEEE80211_TX_LOCK() is held across the call to +ieee80211_encap() and ieee80211_parent_xmitpkt(). Drivers can register +that they properly handle 802.11 sequence number offloading via +IEEE80211_FEXT_SEQNO_OFFLOAD. The lock is to ensure that packets +queued to the driver layer are added to the driver transmit queue +in the same order that they are 802.11 encapsulated - which sets the +802.11 sequence number. Drivers which set IEEE80211_FEXT_SEQNO_OFFLOAD +indicate that they will assign the sequence number themselves - likely +at the same time that the transmit encryption IV number is assigned, +or simply offloaded in firmware - and thus this lock is not +required. + +### Data path - Driver + +The call ieee80211_parent_xmit() will call the driver ic->ic_transmit() +method. At this point the driver can choose to queue / send the frame +(and take ownership of it), or return an error, and return it back +to net80211. Currently net80211 will just free the mbuf and node reference +and return, but drivers should not assume that. + +The mbuf passed in will be either a single 802.11/802.3 frame in an mbuf, +or a list of 802.11 fragments chained by m->m_nextpkt. If the driver +has not set IEEE80211_FEXT_SEQNO_OFFLOAD then the packet will have +a sequence number assigned which the driver can fetch via M_SEQNO_GET(). +The mbuf also holds an ieee80211_node reference. + +(Note that fragments do not have sequence numbers assigned nor node +references.) + +The driver needs to do a few things with this frame. Notably if it's +an 802.3 offload device, it will be handed an 802.3 frame with no +802.11 information. In that case, the driver just needs to queue +it for send to the hardware/firmware. + +For devices which accept 802.11 frames, a few things are needed: + + * It needs to queue them for send, in the order they're given. + * If there are any reasons the frames need to be buffered in the + driver - eg node power state, asynchronous node/key/state updates - + then they'll be buffered here until needed. + * It needs to do any local hardware/firmware setup - rate control, + transmit configuration, destination queue decisions, etc. + * Hardware/firmware typically has some way to mark a frame as a type + (control, data, management), whether RTS/CTS is needed, + * If IEEE80211_FEXT_SEQNO_OFFLOAD is set in the driver, it may need to + allocate 802.11 sequence numbers via a call to ieee80211_output_seqno_assign(). + * If the frame is part of an MPDU (m->m_flags & M_AMPDU_MPDU) then + the frame may need to be handled differently. (For example rtwn(4) + leaves sequence number assignment up to the firmware when A-MPDU is + enabled.) + * If the mbuf is marked as needing encryption (IEEE80211_FC1_PROTECTED + is set in the 802.11 header) then the frame needs to be encrypted + with the current encryption state via a call to ieee80211_crypto_encap(). + * Finally, the frame is queued to the hardware/firmware. + +Again it is critical that the 802.11 sequence number and encryption be +called together in the same order. This is typically done by the TX work +being done in a lock, or all frames being pushed into a single software +TX queue. + +### Data path vs control path and the need to buffer frames + +net80211 currently treats encryption key programming, VAP state +and other updates as synchronous calls. For example, the +transmit path will call the driver to add a node, then +set the encryption keys and then queue a frame to be transmitted. + +For devices which are programmed directly with no queued operations +(such as the ath(4) devices) the encryption key and node programming +is immediate. However, for many other devices - firmware and +USB are two examples - these operations are asynchronous. +And these code paths tend to be in the transmit paths from +upper layers that may have locks held, so sleeping is not an option. + +So for now this needs to be implemented in the driver itself. +It will need to maintain a per-node queue of transmit frames; +it will need to track asynchronous node creation/updates and +encryption key updates and buffer transmit frames for a node +until the node add/update and encryption key add/update is +completed. + +### Transmit Completion Notifications + +The net80211 stack may request a completion notification +to be called when a transmit frame has completed. +This will be done via a call to ieee80211_add_callback(). +It is used in various parts of the net80211 stack to +drive the MAC state machines - for example, being notified +once an BAR (Block-ACK request) frame has completed so +the retry timer can be cancelled. + +This requires that mbufs that are transmitted with a requested +completion callback be checked and handled appropriately. +This is covered in the next section. + +### Completing and freeing transmit path mbufs + +There are two paths to freeing mbufs - ieee80211_free_mbuf() and +ieee80211_tx_complete(). + +#### Before transmit - ieee80211_free_mbuf() + +ieee80211_free_mbuf() is used in drivers and net80211 to free +a list of mbufs as part of the transmit path setup so it can +properly account for and free an 802.11 MPDU / 802.3 frame, +or a list of mbufs representing 802.11 fragments. It doesn't +handle the ieee80211_node reference as at the early stage +of transmit there is a single ieee80211_node reference +covering all of the fragments being passed to the driver +for transmit. + +If you're not supporting 802.11 fragment transmit (and you have +to register your driver with the IEEE80211_C_TXFRAG capability +to even support this) then you can ignore all of the above +and just not call ieee80211_free_mbuf() for now. + +This must not be used for receive mbufs. Yes, this is not +well named and should likely just be renamed. + +#### After transmit queueing / attempts - ieee80211_tx_complete(). + +In the general case of an transmit mbuf being completed (either +successfully or unsuccessfully) net80211 provides a call +to handle everything - ieee80211_tx_complete(). This takes +the relevant destination node (struct ieee80211_node), +the mbuf, and a status indiciating success or failure. + +A call to ieee80211_tx_complete() handles a variety of +common functions: + + * It increments the ifnet counters as appropriate; + * If the frame has a TX completion notification callback attached + it will process said callback; + * If a node is supplied then the node reference is freed + +In the past some drivers implemented the mbuf TX callback +handling themselves, resulting in some drivers supporting +callback and some drivers not supporting callbacks. The goal +here is to implement a single way for completions to be +handled. + +Note that some hardware / firmware do not support per-frame +completion / status notification. For example, USB devices +tend to not send individual notifications for frames - you +may be able to request it for specific frames, but the +status notifications are expensive. In these cases, drivers +may just call ieee80211_tx_complete() with a status based +on whether the frame was queued to the USB endpoint successfully +or not. + +#### Atheros Fast Frames / 802.11n A-MSDU transmit + +(Note this is purposely short - a larger write-up for this will be +done on a separate page.) + +The transmit path above will call ieee80211_ff_check() and +ieee80211_amsdu_check() to see if the given node/frame should be +queued for an Atheros Fast Frames MPDU or an A-MSDU. + +If the frame should be queued it will be queued locally and NULL +will be returned; if there's already a frame queued it may be +paired with a queued frame and both returned as a single mbuf / MPDU +to send. + +As far as the driver is concerned, it will be handed a single +802.11 MPDU to send. + +#### 802.11n A-MPDU transmit + +net80211 implements the A-MPDU negotiation and block-ack request/response +handling. However currently the driver must implement A-MPDU packet +queuing, buffering, submission and retransmission. + +There are some methods that the driver can override to control the +A-MPDU transmit negotiation flow (ic->ic_addba_request, ic->ic_addba_response, +ic->ic_addba_response_timeout, ic->ic_addba_stop) and the Block-Ack +response completion or error/timeout (ic->ic_bar_response). + +#### Driver queue completion + +Currently there are two things a driver should do when its own queues +are (mostly) empty: + + * When the transmit queue is empty or mostly empty, call ieee80211_ff_flush() + to flush out any pending A-MSDU / Atheros Fast Frames to be transmitted; + * When the receive queue is being handled, call ieee80211_ff_age_all() to + flush out any frames that are older than a provided time interval. + +These calls ensure that any queued frames in Fast Frames / A-MSDU queue +don't stay in there permanently. + +### Non data frame transmission (management, control, action, beacon, etc) + +Non data frames are sent via ieee80211_raw_output(). The main exception to +this is beacon frames, which are separately initialised and pulled from +net80211 into the driver by the driver specific beacon handling routines. + +Raw frames differ from data frames in a couple of ways: + + * Transmit parameters are typically sent from userland or the caller + (struct ieee80211_bpf_params \*), and + * The input path into the driver is via ic->ic_raw_xmit(), not ic->ic_transmit(). + +The driver can combine the data and non-data paths into a single path. +The main reason for keeping these separate is to cleanly support drivers +and firmware which allow 802.3 frames to be sent and received, but still +need a side channel to send and receive management frames for various other +functions. + +The raw frame output path is used by: + + * The BPF output path - ieee80211_output() ; + * The management frame output path - ieee80211_mgmt_output() ; + * The NULL data output path - ieee80211_send_nulldata() ; + * Sending probe requests - ieee80211_send_probereq() ; + * Sending probe responses - ieee80211_send_proberesp() ; + * Sending 802.11n BAR frames - ieee80211_send_bar() ; + * .. and anywhere where the individual protocol (eg 802.11s) wishes to send raw + non-data frames. + +This path is not REALLY designed for high speed data - for example, +it should work for basic packet injection, but it does not pass through +the normal functions for encryption, power save, TX aggregation and other +data specific operations. It expects to be handed a raw, already encapsulated +802.11 frame. + +Note this is not an 802.11 MPDU - this is an 802.11 frame. For example, +non-data frames may not have sequence numbers. NULL data frames have a sequence +number but that sequence number must be 0. + +Once the driver ic->ic_raw_xmit() call is made, the driver can handle the +802.11 frame in any way it sees fit. Again, it can't assume it's an 802.11 +data frame. + +### BPF path + +Control frames are injected from userland and net80211 via a raw transmit path, +separate from the data path. This dates back to the earliest Orinoco/WaveLAN +cards, where the earlier firmware only allowed 802.3 frames to be sent/received, +but later firmware introduced raw packet transmit to allow wpa_supplicant +operation. + +Packet injection begins via the BPF/radiotap input path. The code in +ieee80211_radiotap.c attaches a BPF operator to the VAP during the +call to ieee80211_radiotap_vattach(). + +Raw frames start in BPF and are queued via bpf_ieee80211_write(), which will +send the frame into the driver via a call to the VAP ifp->if_output() and then +if provided, a copy of the feedback mbuf via the VAP ifp->if_input(). + +The ifp->if_output() method by default is ieee80211_output(). The driver +can override this. This takes care of validating that it is an 802.11 +frame, extracts the (struct ieee80211_bpf_params \*) header from the +destination sockaddr passed in via BPF, finds the relevant +struct ieee80211_node \*) tx node, grabs a reference, some further sanity +checks and then calls ieee80211_raw_output(). The rest of the raw output +path is the same as net80211 sourced raw frames. + +### Power Save Management + +By default, net80211 will track legacy power-save state between IBSS nodes +and STA <-> AP nodes (ie, full node buffering via the power management bit +in the 802.11 header; TIM/ATIM bitmaps in beacons, NULL data frames to wake up) +and PS-POLL frames being sent by stations to request individual frames. + +The transmit path will pass frames destined to asleep stations to the power +save queue via a call to ieee80211_pwrsave(). + +There are a number of VAP methods for the driver to tie into if it needs to be +informed about this state (vap->iv_set_tim, vap->iv_recv_pspoll, vap->iv_node_ps). +These allow the driver to keep its own internal state in sync with net80211 +and allows it to better maintain its own transmit queue state. + +See the ath(4) driver for a comprehensive example of how these methods are used +to correctly transmit and buffer frames from an AP to STA device without packet +loss. + +### Transmit path encryption + +The net80211 stack needs to handle a variety of transmit encryption schemes +based on all the combinations that driver and firmware interfaces may require. + +In general, the transmit encryption is done in two phases: + + * In ieee80211_encap(), the transmit key is chosen via a call + to ieee80211_crypto_getucastkey() or ieee80211_crypto_getmcastkey() - the + key index is added to the 802.11 header and space is reserved between + the 802.11 header/payload and at the end for the encryption key data to be + added; + * Then when the driver transmits the frame, it calls ieee80211_crypto_encap() + to actually do the encryption. + +Some hardware will completely offload encryption, so although the key choice +is made, various driver configuration options are set to inform net80211 not +to add all the padding. Others will offload encryption but require the +space to be provided in the frame for the hardware/firmware to add the +encryption information into. + +### What is IEEE80211_F_DATAPAD ? + +This is actually to support hardware such as the Atheros 802.11abgn chips, +which have a 4 byte alignment requirement between the 802.11 header and +the data payload (including the encryption parts.) + +Yes, it likely should be a more generic option. + +### Future work + + * It would be nice to more formally define and enforce what drivers should be + doing with mbufs during the whole transmit lifecycle of an mbuf. + * Perhaps add a function or two for the drivers to use to + query whether a given mbuf has a TX notification attached (rather + than drivers querying M_TXCB) so they can individually + register for explicit notifications so they can provide more + accurate completion information. + * The fast frames age / flush routines should really be expanded to + be required functionality in net80211 drivers rather than optional + when IEEE80211_SUPPORT_SUPERG is enabled, so further software transmit + queue management is possible in net80211. + diff --git a/sys/net80211/DEBUG.md b/sys/net80211/DEBUG.md new file mode 100644 index 000000000000..2231a0992fe6 --- /dev/null +++ b/sys/net80211/DEBUG.md @@ -0,0 +1,101 @@ +# Debugging in net80211 + +This document describes how debugging is implemented in net80211. + +## Overview + +net80211 has run-time configurable debugging available. It is configured +per-VAP. It is implemented as a bitmask which can be controlled via a +sysctl at runtime. + +Debugging is compiled in when IEEE80211_DEBUG is defined. + +There is currently no global debugging API available; top-level net80211 +code is typically using printf() or some wrapper around it (eg +net80211_printf). + +The debug API is defined in (ieee80211_var.h). This includes the +debug field definitions and exported debugging API. The actual implementation +of the debugging routines is currently in (ieee80211_input.c) - see +(ieee80211_note) for an example. + +The bitmap of available debugging sections is in (ieee80211_var.h), prefixed +with IEEE80211_MSG . See (IEEE80211_MSG_DEBUG) for an example. + +## Usage + +Calls to the debugging APIs should not include a terminating '\n' character. +This will be added by the debug call. + +The simplest example is a call to IEEE80211_DPRINTF(). This takes a vap +pointer, which debug option to log to, then the format string and optional +arguments. For example: + +``` +IEEE80211_DPRINTF(vap, IEEE80211_MSG_11N, "%s: called!", __func__); +``` + +The debug flags can be combined together using bitwise OR so they are +emitted if one or more debug options are set, for example: + +``` +IEEE80211_DPRINTF(vap, IEEE80211_MSG_11N | IEEE80211_MSG_ASSOC, + "%s: called!", __func__); +``` + +There are a number of different debugging calls that are designed to be +used in different contexts. Although they all currently end up printing +to the same debug output, keeping them separate allows for future +behavioural changes whilst minimising rototilling the whole codebase (eg +allowing non-DPRINTF to turn into event tracing.) + + * Straight up debugging should be done through IEEE80211_DPRINTF() . + * Debugging that's related to a specific ieee80211_node (eg a state + change for a specific node) should be done via a call to IEEE80211_NOTE() . + * Debugging that's related to a specific ethernet MAC address (eg + scan results) should be done via a call to IEEE80211_NOTE_MAC() . + * Debugging that should include a frame header should be done via + a call to IEEE80211_NOTE_FRAME(). Note this takes a (struct ieee80211_frame \*) + pointer. + * Debugging involving discarding frames (eg invalid frames) should be + done via a call to IEEE80211_DISCARD() . + * Debugging involving discarding frames due to an invalid / bad IE should + be done via a call to IEEE80211_DISCARD_IE(). + * Debugging involving discarding frames due to a MAC address (eg ACL failure) + should be done via a call to IEEE80211_DISCARD_MAC(). + +## Usage Notes + + * It is required that the debugging be compiled in/out purely by defining or not + defining IEEE80211_DEBUG. This can often trip up unused variable warnings + when debugging is disabled, so just double-check both configurations. + + * It is important to ensure calls to the debugging (and any other logging API) + do not change any state/variables. For example, do not call a function that + updates some counter or some state variable inside a call to IEEE80211_DPRINTF(). + It won't be called at best and it will just be compiled out entirely at worst. + +## Configuration + + * The 'vap->iv_debug' field is controlled by the OS specific module. + * In FreeBSD (ieee80211_freebsd.c) it is assigned a sysctl (net.wlan.X.debug) + during (ieee80211_sysctl_vattach). + * FreeBSD ships the wlandebug(8) tool to query and set this at runtime. + +## Implementation Details + +* The debug API goes out of its way to do the debug flag check before evaluating + function parameters and potentially assembling the logging output. See + (IEEE80211_DPRINTF) for an example. + +## Future work + + * Top-level net80211 debugging APIs and control would be nice (for things + that are not specific to a VAP.) + * Drivers end up having to implement their own debugging API; it may be nice + to provide drivers a net80211 API to do their own driver specific logging. + * The debug macros should likely be refactored out to a new header file, + separate from ieee80211_var.h, so they can be more easily referenced. + * The debug fields should likely be refactored out into a new separate header + file that is designed to be consumed both by the kernel and by userland + utilities wishing to query/set the debug bitmask. diff --git a/sys/net80211/PROTOCOL.md b/sys/net80211/PROTOCOL.md new file mode 100644 index 000000000000..6d7c128bfc89 --- /dev/null +++ b/sys/net80211/PROTOCOL.md @@ -0,0 +1,563 @@ +# 802.11 protocol overview + +This is a quick overview of the 802.11 protocol and where it intersects with +net80211. It is not intended as a comprehensive deep dive into all of 802.11. + +TODO: link to appropriate sections in 802.11-2016 / 802.11-2020 depending upon +which PDF is freely available. + +## 802.11 overview + +The 802.11 protocol / specification is a very large document which covers +everything from the raw signals going out over the air up to how devices +need to behave in different operating modes. + +The IEEE specification documents and amendments describe what devices should +and must do in order to interoperate. It's important to note that the +intersection of "what the standard says" and "what devices do" is not always +fully aligned. The 802.11 specification has evolved over twenty-five years +and for the most part this allows interoperability between the original 802.11b +hardware and modern multi-band 802.11ax devices. + +It's also important to note that 802.11 is not just limited to the IEEE +specifications. 802.11 devices are almost exclusively RF devices (if you +read the specification you may find the old infrared / IR protocol definition!) +and so need to operate inside of the radio regulatory rules defined by each +country. These define a wide variety of RF environmental behaviours +including frequencies can be used, when devices can transmit, what transmit +power is allowed, interoperability with other devices (802.11 and non-802.11) +and radar interoperability. For the purposes of this document these will +be called "regulatory concerns" and will be covered elsewhere. + +The 802.11 specification breaks things up into a handful of top level areas: + + * the PHY layer - how the device interfaces with the RF environment and + encodes/decodes RF transmissions into data streams. + * the MAC layer - defines how data is packetized into individual data frames, + exchanged with the upper layer (ethernet/bridge), deciding when and what + to transmit via the PHY layer. + * MLME - (MAC layer management entities) - defines all of the state methods + and transitions that underpin the 802.11 MAC state machine. + * Security - the cipher and key management components. + * PHY specifications - the specific implementations of PHYs - 2GHz DSSS + (spread spectrum), 2GHZ CCK, OFDM, ERP, 802.11n / HT, 802.11ac / VHT, etc. + +Most 802.11 implementations do not implement a 1:1 definition of each of these +layers - notably implementing every single MLME state would be a huge amount +of work. + +## 802.11 revisions + +There have been many revisions of the 802.11 specification. The specifications +can be found online at https://www.ieee802.org/11/. + +The latest specification being implemented in net80211 is 802.11-2020, however +net80211 is far from completely compliant. Generally new code which implements +802.11 features / protocol handling should identify the specification and +section which it is referencing. + +## 802.11 protocol and frame definitions + +net80211 keeps most 802.11 frame and protocol definitions in a single location +(ieee80211.h). +This contains descriptions of the 802.11 frame and field definitions, ranging +from the lowest definition of the frame itself up through frame types/subtypes, +individual field definitions, information elements, action frames, and +anything else that can be found in the 802.11 specifications. + +The PHY definitions can be found in (ieee80211_phy.c) and (ieee80211_phy.h). +Notably those include the frame timing information useful for rate control +and frame duration calculations. + +## 802.11 Revisions + +(TBD) + +### Legacy 802.11 + +The earliest 802.11 devices implement 1Mbit/s and 2Mbit/s direct spread spectrum +frames. These include the earliest Wavelan devices. These are grandfathered +into 802.11b. The PHY specification can be found in 802.11-2020 Section 15.) + +### 802.11b + +802.11b devices implement Section 15 (1Mbit/2Mbit) PHYs as well as the high +rate DSSS specification (802.11-2020 Section 16) to provide 5.5Mbit and 11Mbit +CCK rates. They interoperate with legacy 802.11 devices by using compatible +PHY encodings and will limit their performance if said legacy devices are +detected. + +### 802.11a + +802.11a devices implement OFDM rates from 6Mbit/s to 54Mbit/s on the 5GHz +band. Among other features, it also defines 5MHz and 10MHz wide channel +behaviour. This is covered in the OFDM PHY specification (802.11-2020 +Section 17.) + +### 802.11g + +802.11g devices implement OFDM rates from 802.11a, the CCK rates from 802.11b +and the DSSS rates from legacy 802.11. These are covered in the ERP +specification (802.11-2020 Section 18.) There are some MAC extensions for +negotiating 802.11b / 802.11g interoperability and these are documented +throughout the MAC specification. This also specifies support for 5MHz and +10MHz wide channels. + +### 802.11n (HT) + +802.11n introduced a variety of high throughput rates and feature support +(hence why it's called HT - high throughput). It introduces higher density +OFDM rate encodings, 20 and 40MHz wide channels with interoperability for +earlier devices, packet aggregation via A-MPDU and A-MSDU, MIMO (multiple input, +multiple output spatial streams), some initial beamforming support, power +saving extensions and more. + +The physical layer support is covered in the HT PHY specification (802.11-2020 +Section 19.) The rest of the MAC extensions are documented throughout the +rest of the specification. + +### 802.11ac (VHT) + +802.11ac extends the 802.11n specification (hence why it's VHT - Very +High Throughput) and boosts performance by adding higher density OFDM QAM +encoding (256-QAM), wider channels (80MHz, 160MHz), split 80+80MHz channel +support, much larger A-MSDU / A-MPDU frame sizes, support for MU-MIMO +(multi-user MIMO) allowing APs to transmit to multiple STAs at the same time +and various other extensions. + +It builds on top of the 802.11n MAC and PHY specification, so a lot of +802.11n feature and MAC negotiation happens as part of 802.11ac negotiation. + +The PHY layer is covered in the VHT PHY Specification (802.11-2020 Section +21.) Again, the rest of the MAC extensions are documented throughout the +rest of the specification. + +### Greenfield versus backwards compatibility + +The various protocols supported by 802.11 build on top of earlier protocols. +So typically you're not building a single implementation for each protocol - +for example, you can't handle 802.11ac support without implementing a large +amount of 802.11n support. + +(As a side note, the 802.11 frame has a protocol version field, and +that actually changed in 802.11ah (900MHz and longer distance bands) - +which changes a lot of what the fields do. No, net80211 currently does not +support 802.11ah and will drop frames whose 802.11 protocol ID is not +supported.) + +At the PHY layer, later model hardware can transmit data encodings which +earlier model hardware just won't recognise. All they'll see is an increase +in RF power on the channel at best and signals that will confuse the +RX decoder / cause hardware issues at worst.) + +So each of the PHY specifications will lay out a few things: + + * How frames should be encoded in the air in a way that earlier + hardware can decode them enough to know it's not for them; + * How devices can identify that earlier protocol devices are around and + change the configuration (eg STA changing its own configuration, + AP changing the configuration of the network it controls, etc) + to provide backwards compatibility. + +These come at a performance cost. For example, an 802.11g AP which +supports 802.11b and 802.11 devices needs to notice that an 802.11b +device wishes to associate, and when it sees this, change some of +its configuration (notably "long preamble" so 802.11b devices can +decode frames that are being transmitted, whether destined to it or not.) + +Various devices allow backwards compatbility to be configured. +For example, an 802.11n AP may be configured to deny non-802.11n clients. +This may improve performance but then earlier clients can't connect. + +In 802.11n deployments this was known as a "greenfield deployment". +This typically disables any and all pre-11n interoperability at both +a MAC and PHY layer. net80211 has some flags for this to specifically +inform devices that they can configure the hardware for such a setup. +Not all drivers implement it however, and in a lot of cases they will +still handle pre-11n framing, even if the net80211 code will deny +association. + +There are other components to backwards compatibility which are worth +keeping in mind when reading through the 802.11 specification and +net80211 stack / driver code. These include: + + * short/long preamble - (vap_update_preamble) + * short/long slot time configuration - (vap_update_slot) + * 802.11g protection mode (vap_update_erp_protmode) - + whether to use CTS-to-self around each transmission + * 802.11n protection mode (vap_update_ht_protmode) - + whether to use RTS/CTS around each transmission + * 802.11n 20/40MHz BSS operation (whether an 802.11n AP sees other APs that + overlap its frequency range and need to reconfigure how to protect + transmissions) + +## How 802.11 (very briefly) works over the air + +This is a very brief and not at all comprehensive overview of how 802.11 +works over the air. The goal of this section is to provide enough background +information to help de-mystify reading the net80211 stack and wireless +driver source. + +### Why there's timing requirements in the first place + +Each of the PHY sections in the 802.11 specification describe what +the PHY needs to do in order to transmit and receive data. It's not +anywhere as easy as "toggle some bits on a wire". + +An important thing to understand is that hardware isn't immediate. +All the state machines in your 802.11 devices take non-zero time +to make decisions about when to transmit, when to receive, locking +onto a signal, deciding it can be decoded, getting reset for the next +frame, etc. + +So a lot of what you'll see in 802.11 negotiation and feature support +is linked to the underlying hardware implementations and limitations +of the time. For example the 802.11b specification defines the slot time +as 20uS, but the 802.11g specification lowers it to 9uS. The "slot time" +value defines the unit of time used for contention management / backoff, and +it's defined partly by what the speed of light dictates (ie how big +of a physical area you want to be able to "hear" in determining if the +area is busy) and how quickly the hardware can guarantee to respond. +It dropped to 9uS because hardware got better, but to interoperate +with older devices without starting to transmit before they're +ready to react, 802.11g devices will fall back to 20uS slot time when +they detect an 802.11b device. + +This carries through everywhere in odd places that you're not necessarily +aware of. For example, the 802.11n A-MPDU definition includes negotiated +padding between frames and limits encryption ciphers (typically CCMP or +GCMP.) This is due to hardware support - the MAC may be able to support +much less padding when no encryption is used, but setting up / resetting +the encryption / decryption blocks may take more time and thus larger +A-MPDU padding values are negotiated. + +### Wait, the speed of light? + +Yes. The speed of light is roughly 300 metres for each microsecond of +travel time. + +### Preambles, SIGs, PLCP, sending actual data and waiting / slot times + +There are a few things that are worth understanding at a high level. + + * The first thing that a device needs to do is determine + whether the air is busy or free. There'll be some hardware + to determine the signal level versus noise floor and provide + a signal to the transmit hardware that the air is free, + and to the receiver that it may want to try start decoding + something. + + * The receiver needs to get in synchronisation with the transmitter. + This is a one way operation - the transmitter needs to transmit + enough of a signal that the receiver can "lock onto" and get itself + ready for further data. This is called the "preamble" - it's + typically a low bitrate repeating pattern of data that gives + the receiver hardware time to lock onto, figure out the signal + level and be ready for the next phase. + + * Note that the receiver may pick up the preamble at any point in its + transmission so it can't guarantee it will see exactly "x" bits of some + repeating pattern. + + * Then there's other bits and pieces - eg look for L-SIG, HT-SIG + in the PHY documentation - which is used to further synchronise + what's about to happen. + + * Finally it will start transmitting the PHY framing bits needed to + identify what the upcoming transmit rate and configuration is + (all the stuff leading up to the PLCP header, then the PLCP header.) + +Things get more complicated with MIMO, MU-MIMO, 802.11ax OFDM-A, etc but +don't worry about those for now - they build on top of all of these +ideas. + +Once the data is transmitted, there's some quiet time between frames +before the receiver can ACK (and then a period of time where an ACK +is expected.) The transmitter needs to finish transmitting, then +reset its internal state back to idle to be ready to receive - and +there's the pesky speed of light speed of 300m per microsecond - +so there's some MAC (interframe spacing) and PHY (slot time) enforcing +quiet so everyone has a chance to receive the frame and the reciver *** 442 LINES SKIPPED *** From nobody Mon May 25 06:33:02 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gP5fm1LvBz6dj5f; Mon, 25 May 2026 06:33:04 +0000 (UTC) (envelope-from rm@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gP5fm0rSlz3X4j; Mon, 25 May 2026 06:33:04 +0000 (UTC) (envelope-from rm@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779690784; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=15PTMMQqPSlhHhhC+dCF1ze+7ZXUsFfYJKNxLqWHMNM=; b=i0JIhEV04XT2rZZCNXQSaf5M+CTv52koH++k8F6ckuscIoOEBbl/1toczSTPadfZvIATDv d2MmKYk1Os1cO4pUtvDkKyHWEZ9pabwBl55t1yOVmbQUwwcjvZfvNRXBFaQB6uKvVgfW0f XyR3cn5UPNkb/GMUqIDcvekxUdIioagiHJkRa6VmbdEZ2fLIQm6pHpGdex85xrU45A5Lth fItueCqhuQFnI9R0R/6IanbAy7dsW1IenUciUKZXzSFXsWi7Cra88y1yAD2pCTKAR5bHiL /0sLU/AtUXiz+k6t0zI+yc+oXgH9ExlMM67K2r8yhwrrOxpAo8aZdPDFBymcSg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779690784; a=rsa-sha256; cv=none; b=VtDgs/KpNUKTN93jtCQBqfU/bea3HUj0jR0u7fJmBoO6WyXKRGqtaQt5sgN33ZRAxegilQ psTFuuhxGT1fXP90II/ZIG2oDrkaRDNmh38RxGyTQ3igdh57lA7FGVtEvUvnG3rNuWJhcc OXIgtpCJRgxEnw3QxXCEKRUG0mWFHgjRCkbaEgAEZuZUWnZ8kSyNnG4Kq3ewYM+TwC0+xB YqvrCz5AfGSf51paiL0/Xs49H8TK7mRUHlYPUjuZjWitwtFqasgNAoFWClW+WZRvUE7NnS kJnfjqPSt7ihcgo7ZxV1cbkPW92nGBSjXo7VgYqzBv8EgublE0ROS1g1wiyZvw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779690784; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=15PTMMQqPSlhHhhC+dCF1ze+7ZXUsFfYJKNxLqWHMNM=; b=p9C5OqP3/JwaBE2HG2OiTtGHOhyoIY5Q0VZH6PEldiv9uDpe1AqjXG3DLeQh1Dpii8KaRR OAPGXJdHt4+ZaUcgmr0gnxZKyxn5rzO7i6CwcRr7e8a0w9gnsiOGQ4AWObs0Kmp8Z1pvj/ nOCITxIK5ZydzGfXNTiFxDvwGh7QidrUQU1mPVgk3ST2tNlKiPzg1OzaTJXfylv57PNY9P t2FbSiqnkdufTsmZO3l/9ijtLadhJzGBq2Diop95lkXahP+8yPwiDEzCOUELq0REzthf14 GxskEELZb+5Q15GqMJ2ZcOy/i9ijBRX//Ox411GaOO1owszsvOMFn6gdNvsueA== Received: from [127.0.0.1] (unknown [127.0.1.132]) by freefall.freebsd.org (Postfix) with ESMTP id 5CAF44712; Mon, 25 May 2026 06:33:03 +0000 (UTC) (envelope-from rm@FreeBSD.org) Message-ID: Date: Mon, 25 May 2026 09:33:02 +0300 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 11d69a4558de - main - LinuxKPI: 802.11: add support for suspend/resume To: "Bjoern A. Zeeb" , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <6a130a94.1c630.6dcfa76a@gitrepo.freebsd.org> Content-Language: en-US From: Ruslan Makhmatkhanov In-Reply-To: <6a130a94.1c630.6dcfa76a@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Bjoern A. Zeeb wrote on 5/24/26 5:26 PM: > The branch main has been updated by bz: > > URL: https://cgit.FreeBSD.org/src/commit/?id=11d69a4558de2a5427d8191caed315c5f7e9a5d6 > > commit 11d69a4558de2a5427d8191caed315c5f7e9a5d6 > Author: Bjoern A. Zeeb > AuthorDate: 2025-04-09 18:00:20 +0000 > Commit: Bjoern A. Zeeb > CommitDate: 2026-05-24 01:15:02 +0000 > > LinuxKPI: 802.11: add support for suspend/resume > Thank you, thank you, thank you! Works fine there with iwlwifi on Thinkpad X13. [...] -- Regards, Ruslan T.O.S. Of Reality From nobody Mon May 25 07:05:25 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gP6NC2YqZz6dm9d for ; Mon, 25 May 2026 07:05: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gP6NC0n9mz3bTM for ; Mon, 25 May 2026 07:05:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779692731; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cfYc+hzYWSimWyYqKufh44hEJBiFsqYdiN35BmqgXHg=; b=EORBM0XQMSJPZjBp7skdSXld9o1IbJ3rrzte0PEivzi7tu+S3XMB8CCIAYung5mkBkps6u 12iYkYpTkX+nPgA8+wT7JhEKauhML1rS8J1GnXIqNnTA2XlCiDjpk4zAfyp6bZtq5c05q7 /QvdWI+RP3JgVMHFMrLULn7BKchF3/GSKpg878h23ZwW0QmnQyft2C1TBYeaLA3cNvFKE9 DHuQ9T1aRACd1XJc3Df6Q+Qqh9XtzTYWbp+tTqiy5gqVPex0bjQMIjHSslxG9LsDbxybJe OPU2lSHkXV1mm75Zq2YZD+kn7+FnkSEHqDVqzvqnQq2STwg1dX4qavyKClYoeA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779692731; a=rsa-sha256; cv=none; b=syncQvo8BAQ+F7/KK14a6MbE7rsVvB8aZbdvcBSatYg+OWuwfCeUwmDq5cqNnTjpMKSW4K WYZxwTe9Jq5z07cisoukuerg+sIMh6iZZoLwPVts0uRETJ21TACkWnErwddI2u+e+zdZeV rMpQSrE0y2jc4F0yCAhPpKJo6HhJfmYQShiaebpCJ5jXnhqTmgU45MpUoLGyMOtsu6jNAH BnwsX6XZJmsFyP8N+Y4efK3W/cblJ4Gx/Wc7esG6PumsSAXkayXwv4DTlrHZEczNy8exk/ xeixUpg6T1Nv9x/yepsFQG+Gq1dnqFSi4Nu4uRRmOKC/vFqrMU5rUNZ1nG39cw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779692731; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cfYc+hzYWSimWyYqKufh44hEJBiFsqYdiN35BmqgXHg=; b=am+wYVui1bTtzSpZ3rg4sP7H5UmJ7hNrvLgL7CcVjnEBrFIy9shus4RTB3lrEfWythlR8M 6KdDVhjvnw7wGiRpF6t5UWM2zRs3UTTIsprbV4tGPURNJeof6T2sw+HBES5CDZpwxVNM1h e7pnU3q/+zonvlayvAiDJOTMJ1s8LeVEqXxCHjURVEWHCIqA2YBn74sRhMQ7VZSpoMcxb6 mNv+C+o+iFpmNOqR6NuQsRH2ZzzEDWA/KqD+LENkKmS1AcKTSbCfT0AqXIucVXMPrc0LE5 iCBQ1E2DZqguRhxFMoKMsJG3+42Sr2NJEcSH0PJ034a1o6Em0mJGhdNlMjlfmA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gP6NB6VRYzWkb for ; Mon, 25 May 2026 07:05:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3fc5b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 25 May 2026 07:05:25 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrey V. Elsukov Subject: git: 9acea8aa36e9 - stable/15 - ipfw: treat ipv6 address with zero mask as 'any' List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ae X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 9acea8aa36e98d636f8d183ac06ec5d2d25de0e1 Auto-Submitted: auto-generated Date: Mon, 25 May 2026 07:05:25 +0000 Message-Id: <6a13f4b5.3fc5b.7a8ac2b3@gitrepo.freebsd.org> The branch stable/15 has been updated by ae: URL: https://cgit.FreeBSD.org/src/commit/?id=9acea8aa36e98d636f8d183ac06ec5d2d25de0e1 commit 9acea8aa36e98d636f8d183ac06ec5d2d25de0e1 Author: Andrey V. Elsukov AuthorDate: 2026-05-17 10:12:20 +0000 Commit: Andrey V. Elsukov CommitDate: 2026-05-25 07:03:05 +0000 ipfw: treat ipv6 address with zero mask as 'any' Make the behaviour similar for both IPv4 and IPv6. Also add the corresponding tests. PR: 294733 Differential Revision: https://reviews.freebsd.org/D56618 (cherry picked from commit 2872268c7f6d473aae9b02ebb5d2c24fc2cff9b1) --- sbin/ipfw/ipfw2.c | 7 ++++--- sbin/ipfw/ipv6.c | 11 +++++++---- sbin/ipfw/tests/test_add_rule.py | 24 ++++++++++++++++++++++++ tests/atf_python/sys/netpfil/ipfw/insns.py | 2 ++ 4 files changed, 37 insertions(+), 7 deletions(-) diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c index a2bfd63c6002..19b74c6592d3 100644 --- a/sbin/ipfw/ipfw2.c +++ b/sbin/ipfw/ipfw2.c @@ -3595,12 +3595,13 @@ fill_ip(ipfw_insn_ip *cmd, char *av, int cblen, struct tidx *tstate) * list unless it is the only item, in which case we * report an error. */ - if (cmd->o.len & F_NOT) { /* "not any" never matches */ - if (av == NULL && len == 0) /* only this entry */ + if (av == NULL && len == 0) { + if (cmd->o.len & F_NOT) /* "not any" never matches */ errx(EX_DATAERR, "not any never matches"); + return; } /* else do nothing and skip this entry */ - return; + continue; } /* A single IP can be stored in an optimized format */ if (d[1] == (uint32_t)~0 && av == NULL && len == 0) { diff --git a/sbin/ipfw/ipv6.c b/sbin/ipfw/ipv6.c index e6eb07af26dc..f34a08bb6f52 100644 --- a/sbin/ipfw/ipv6.c +++ b/sbin/ipfw/ipv6.c @@ -396,8 +396,6 @@ fill_ip6(ipfw_insn_ip6 *cmd, char *av, int cblen, struct tidx *tstate) n2mask(&d[1], masklen); } - APPLY_MASK(d, &d[1]); /* mask base address with mask */ - av = q; /* Check this entry */ @@ -408,11 +406,16 @@ fill_ip6(ipfw_insn_ip6 *cmd, char *av, int cblen, struct tidx *tstate) * list unless it is the only item, in which case we * report an error. */ - if (cmd->o.len & F_NOT && av == NULL && len == 0) - errx(EX_DATAERR, "not any never matches"); + if (av == NULL && len == 0) { + if (cmd->o.len & F_NOT) + errx(EX_DATAERR, "not any never matches"); + return (1); + } continue; } + APPLY_MASK(d, &d[1]); /* mask base address with mask */ + /* * A single IP can be stored alone */ diff --git a/sbin/ipfw/tests/test_add_rule.py b/sbin/ipfw/tests/test_add_rule.py index 4360c5f87c15..ed565f0e7c68 100755 --- a/sbin/ipfw/tests/test_add_rule.py +++ b/sbin/ipfw/tests/test_add_rule.py @@ -135,6 +135,30 @@ class TestAddRule(BaseTest): }, id="test_rulenum", ), + pytest.param( + { + "in": "add allow ip4 from 0.0.0.0/0 to 192.0.2.1/0", + "out": { + "insns": [ + InsnEmpty(IpFwOpcode.O_IP4), + InsnEmpty(IpFwOpcode.O_ACCEPT), + ], + }, + }, + id="test_zero_addrmask4", + ), + pytest.param( + { + "in": "add allow ip6 from ::/0 to 2001:DB8::/0", + "out": { + "insns": [ + InsnEmpty(IpFwOpcode.O_IP6), + InsnEmpty(IpFwOpcode.O_ACCEPT), + ], + }, + }, + id="test_zero_addrmask6", + ), pytest.param( { "in": "add allow ip from { 1.2.3.4 or 2.3.4.5 } to any", diff --git a/tests/atf_python/sys/netpfil/ipfw/insns.py b/tests/atf_python/sys/netpfil/ipfw/insns.py index dbb9af659794..c5f729ac4d63 100644 --- a/tests/atf_python/sys/netpfil/ipfw/insns.py +++ b/tests/atf_python/sys/netpfil/ipfw/insns.py @@ -682,6 +682,8 @@ insn_attrs = prepare_attrs_map( AttrDescr(IpFwOpcode.O_NOP, InsnComment), + AttrDescr(IpFwOpcode.O_IP4, InsnEmpty), + AttrDescr(IpFwOpcode.O_IP6, InsnEmpty), AttrDescr(IpFwOpcode.O_PROTO, InsnProto), AttrDescr(IpFwOpcode.O_PROB, InsnProb), AttrDescr(IpFwOpcode.O_IP_DST_ME, InsnEmpty), From nobody Mon May 25 07:06:36 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gP6PZ27vfz6dmB3 for ; Mon, 25 May 2026 07:06: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gP6PY6FpYz3cHP for ; Mon, 25 May 2026 07:06:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779692801; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zQbW0aU4DJnmxtiJSOq8hwZBGROjjv8zXAYEsPzU5xg=; b=SPuRnPM6iLgPEnOpy1dYk4iH+uvDieEkf23FO+fvc7VLVoR64RmoMqav26SHvXKvEGkBMZ +mcviHyiT+6nuDGO+63PT9mZE6N4s0+ZnX2qJd69ssKzl9RBu5+Hdvhyyy2QNH/LlFAlY9 RhQCdcK25WCOgW6KSY8UjX1je36Ql9b8ssJmNt2Y7GQwDvOzh17RzB5Vm4/IpT507If7fF BM3JQPPhBodFU140lLXJzkHeXpo2iIJD69tyO+uXwWBQYJ+O6aTHirQTglE9cBDl/DpmHm /YUr0pm38gvhczgj+HfOgNypPiDh8tRwzMzjehG+nAxFO99ehQOUxYCLO3l/5w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779692801; a=rsa-sha256; cv=none; b=OEffhRM70CrbbaOTCKYnQi18jdxYngzYXCrFwR4BzH4WRtcthLrIeCmwme5xLJKD1vZVB/ YytNBbhK3reqsA9tmLxK4koyZJlLLqJMbAO8SqtisWK23JWiHEQ18jrvHNHUXbd3nZ4VO9 Pq6Cyzg20PzFlFnrkT+GVIKjbQI1AH1Zt8ILnVFQrzlibSFjuyiMihYsoKuUW+PfsF0rA/ +jlkt4xWXPDI3Yg2j2p+QwTmoFl2EJb0yRs1SkXMh/Tcin0w/qN9Zc+RMdJAvENfHkNzeN y6pdV13n7BTDoFtKiaIU/AabnmpVgHx5DGgxl1sY9CE5h8D8f59bHo6Mr5WeHw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779692801; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zQbW0aU4DJnmxtiJSOq8hwZBGROjjv8zXAYEsPzU5xg=; b=umrMMuYHovS3r8+eCgmJ9WIIvtj0YegSLV7jRhK9I0QqVL4LAhzmoRe0dHM+TvdZ3rIYsz Bbo+rD8jGAWlntMoNgSPNmMDRw7tp+0NsmDymG9D5q4ifrQn39rVgjlOkib+oqlkHdx/wM h9ovkUw+clXXqr8Csp1GJF+raOP8QpxiomkPoLZL9dpQCFQxsngS9iQTYaQpY0Sxf3Cgn6 W/Qxpy+LkXUzPnlMbJ1ryrDupmnP6BPJInR5YPeADQl/usw8DpLZbIoI7zvrql0rZPHToy kbLf10nx+266GOfEygfGY048pcpuKsN9elfwU2FjHYLZbqdjnBn+gA8lZ6V9dQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gP6PY5XLNzWZD for ; Mon, 25 May 2026 07:06:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3f236 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 25 May 2026 07:06:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrey V. Elsukov Subject: git: 7ba922959d7e - stable/14 - ipfw: treat ipv6 address with zero mask as 'any' List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ae X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 7ba922959d7ed6e73fde54d0bd72ef0bcd8bc49a Auto-Submitted: auto-generated Date: Mon, 25 May 2026 07:06:36 +0000 Message-Id: <6a13f4fc.3f236.60d43e00@gitrepo.freebsd.org> The branch stable/14 has been updated by ae: URL: https://cgit.FreeBSD.org/src/commit/?id=7ba922959d7ed6e73fde54d0bd72ef0bcd8bc49a commit 7ba922959d7ed6e73fde54d0bd72ef0bcd8bc49a Author: Andrey V. Elsukov AuthorDate: 2026-05-17 10:12:20 +0000 Commit: Andrey V. Elsukov CommitDate: 2026-05-25 07:04:48 +0000 ipfw: treat ipv6 address with zero mask as 'any' Make the behaviour similar for both IPv4 and IPv6. Also add the corresponding tests. PR: 294733 Differential Revision: https://reviews.freebsd.org/D56618 (cherry picked from commit 2872268c7f6d473aae9b02ebb5d2c24fc2cff9b1) --- sbin/ipfw/ipfw2.c | 7 ++++--- sbin/ipfw/ipv6.c | 11 +++++++---- sbin/ipfw/tests/test_add_rule.py | 24 ++++++++++++++++++++++++ tests/atf_python/sys/netpfil/ipfw/insns.py | 2 ++ 4 files changed, 37 insertions(+), 7 deletions(-) diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c index eecf6a9c056f..56e5b0640135 100644 --- a/sbin/ipfw/ipfw2.c +++ b/sbin/ipfw/ipfw2.c @@ -3405,12 +3405,13 @@ fill_ip(ipfw_insn_ip *cmd, char *av, int cblen, struct tidx *tstate) * list unless it is the only item, in which case we * report an error. */ - if (cmd->o.len & F_NOT) { /* "not any" never matches */ - if (av == NULL && len == 0) /* only this entry */ + if (av == NULL && len == 0) { + if (cmd->o.len & F_NOT) /* "not any" never matches */ errx(EX_DATAERR, "not any never matches"); + return; } /* else do nothing and skip this entry */ - return; + continue; } /* A single IP can be stored in an optimized format */ if (d[1] == (uint32_t)~0 && av == NULL && len == 0) { diff --git a/sbin/ipfw/ipv6.c b/sbin/ipfw/ipv6.c index e6eb07af26dc..f34a08bb6f52 100644 --- a/sbin/ipfw/ipv6.c +++ b/sbin/ipfw/ipv6.c @@ -396,8 +396,6 @@ fill_ip6(ipfw_insn_ip6 *cmd, char *av, int cblen, struct tidx *tstate) n2mask(&d[1], masklen); } - APPLY_MASK(d, &d[1]); /* mask base address with mask */ - av = q; /* Check this entry */ @@ -408,11 +406,16 @@ fill_ip6(ipfw_insn_ip6 *cmd, char *av, int cblen, struct tidx *tstate) * list unless it is the only item, in which case we * report an error. */ - if (cmd->o.len & F_NOT && av == NULL && len == 0) - errx(EX_DATAERR, "not any never matches"); + if (av == NULL && len == 0) { + if (cmd->o.len & F_NOT) + errx(EX_DATAERR, "not any never matches"); + return (1); + } continue; } + APPLY_MASK(d, &d[1]); /* mask base address with mask */ + /* * A single IP can be stored alone */ diff --git a/sbin/ipfw/tests/test_add_rule.py b/sbin/ipfw/tests/test_add_rule.py index 60c8cebaceaa..213701b52eca 100755 --- a/sbin/ipfw/tests/test_add_rule.py +++ b/sbin/ipfw/tests/test_add_rule.py @@ -130,6 +130,30 @@ class TestAddRule(BaseTest): }, id="test_rulenum", ), + pytest.param( + { + "in": "add allow ip4 from 0.0.0.0/0 to 192.0.2.1/0", + "out": { + "insns": [ + InsnEmpty(IpFwOpcode.O_IP4), + InsnEmpty(IpFwOpcode.O_ACCEPT), + ], + }, + }, + id="test_zero_addrmask4", + ), + pytest.param( + { + "in": "add allow ip6 from ::/0 to 2001:DB8::/0", + "out": { + "insns": [ + InsnEmpty(IpFwOpcode.O_IP6), + InsnEmpty(IpFwOpcode.O_ACCEPT), + ], + }, + }, + id="test_zero_addrmask6", + ), pytest.param( { "in": "add allow ip from { 1.2.3.4 or 2.3.4.5 } to any", diff --git a/tests/atf_python/sys/netpfil/ipfw/insns.py b/tests/atf_python/sys/netpfil/ipfw/insns.py index 12f145f49393..3ff7314004b5 100644 --- a/tests/atf_python/sys/netpfil/ipfw/insns.py +++ b/tests/atf_python/sys/netpfil/ipfw/insns.py @@ -535,6 +535,8 @@ insn_attrs = prepare_attrs_map( AttrDescr(IpFwOpcode.O_NOP, InsnComment), + AttrDescr(IpFwOpcode.O_IP4, InsnEmpty), + AttrDescr(IpFwOpcode.O_IP6, InsnEmpty), AttrDescr(IpFwOpcode.O_PROTO, InsnProto), AttrDescr(IpFwOpcode.O_PROB, InsnProb), AttrDescr(IpFwOpcode.O_IP_DST_ME, InsnEmpty), From nobody Mon May 25 07:30:36 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gP6xB6snnz6dps7; Mon, 25 May 2026 07:30:38 +0000 (UTC) (envelope-from des@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gP6xB6J5vz3fTR; Mon, 25 May 2026 07:30:38 +0000 (UTC) (envelope-from des@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779694238; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DG/VzkxDQWFFHbdmYJ4LBkhQE3zCBH04rq0QB/CcYt4=; b=EAG71huU5QurK7+bTBViEU442P+YX1e1iJGaaMzBeUQvoAlVE2BdiUX+CpAFwXyCftdfV3 8Q1mwOIDiWMo5mm7aVEFIAv2RBehVmd06MgD734+J2GJ3McYg3ObRXoKxmTSqLX9DkjdR9 PB5Ei8yAq27gs0GhSLjiol8kxiPh+yswlk4OCZdSCHWsW+ukb3haoHDY9J7FrU5TZLj4Lx 8FpheJmBak7FAJfSH0WpknMu0hGNLK6WJF858XRgCZk9tGOCKb3L0ix96jyqMu5IWTiElp Mnd0wg8Kvwk2uO7XVc4s4uTf83bK4khS8fMn6LDPEuTVK0TRp7nsCXCg/zuREA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779694238; a=rsa-sha256; cv=none; b=Xbh6dqhshK0ayI/rBFFcA5MPZ8dLkkhFnAOOcKrjhLHajzsvUuxs2FIg4VdGYFY/bdgc+9 xWeYHGn9B6a1LFnu6fVJ9+SfNKA8yoO5C/qdm1VwCa1Z4PvCaBGlEYZmIjOzBxsmr820Nt 0A61I4B0XlcPqiF/zwYl+gTjW65qqxr0QajyI5+jYNHPvPl8OifEX94Ok+zt1WtSbcXPkp Y7at7RvdrX3Z1AEuGN0W5wk8YXHU26I8PocdGUCuDx+knw+lciY0/wBdkJcpWp/bvXw9Nj 4KOeM22B4f/nY2LQUucAi2ceJqd3IXM9iXQN3r7OF62e8FVwacLl62ELXYvEcw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779694238; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DG/VzkxDQWFFHbdmYJ4LBkhQE3zCBH04rq0QB/CcYt4=; b=xmS2Z3iVzNmsDgzYZgB30ELaTz53ScvegxGZcOCXuiyQphP/cxgIBJBxmdTtu2j2zlUNAd QWY1q6ChSa+A4dJljhkucAn2ayQgvAwWULMBCJlQvy59UTO0+4D7wBzbnfNOt+G/7sLqJ3 cYcbp0DMLTmnExVhCTAzf0N/t0A4QS/OoI/5LxXdiujlCUFGxcgK/diMg+y2qeWDg0/yS5 72MtV2EM7R1FQK+OcriKG9sFrvbZ5G2mMky5R4WBtbjC7ZfZHM/W6mhNuhqeYzdHhr/Wcq KCE1Gx0Kqly4dciq/a3KrqfpLcMSXpYRj8wN47uHVgBVHo9fibMAczDF2aa6Jg== Received: from ltc.des.dev (2a01cb0585070b00922e16fffef1acef.ipv6.abo.wanadoo.fr [IPv6:2a01:cb05:8507:b00:922e:16ff:fef1:acef]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: des/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4gP6xB5FJHzNbh; Mon, 25 May 2026 07:30:38 +0000 (UTC) (envelope-from des@freebsd.org) Received: by ltc.des.dev (Postfix, from userid 1001) id 0704268AAE; Mon, 25 May 2026 09:30:36 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Jilles Tjoelker Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 1df431576f99 - main - sh/tests: Cut down builtins/read12.0 by 2 seconds In-Reply-To: (Jilles Tjoelker's message of "Sun, 24 May 2026 21:41:01 +0200") References: <6a120625.45836.5e8588e2@gitrepo.freebsd.org> <86h5nx3e8b.fsf@ltc.des.dev> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Mon, 25 May 2026 09:30:36 +0200 Message-ID: <865x4c2bfn.fsf@ltc.des.dev> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Jilles Tjoelker writes: > Dag-Erling Sm=C3=B8rgrav writes: > > Please revert the non-functional parts of this change. > Please explain what you are worried about in the change. Is this about > false positives or false negatives? The purpose of a test is to reliably fail if the functionality it tests is broken. Your change turns my test from one that is fairly certain to fail if the timeout functionality is broken to one that has a reasonable chance of passing regardless. What's more, you justify the change with a logical argument so fallacious that you _still_ refuse to explain it. All that just to save yourself a couple of seconds once in a while, even after I showed you how to save much more than two seconds simply by enabling parallelism. Please revert, or I will. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@FreeBSD.org From nobody Sat May 23 19:05:49 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPCMy3tKMz6f8tQ; Mon, 25 May 2026 10:50:38 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPCMy3D4Wz3Fby; Mon, 25 May 2026 10:50:38 +0000 (UTC) (envelope-from dim@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779706238; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=B8jNrfqciN0S49rRNT7tmRQYIxpRFxyIYn1u3XE7ZNM=; b=ctRD6M5ER8POdPlNoPSyznMqF2Ad6Ev9cBsi1Dpu2ai0Mnth6e/tviNI5L/B2uOf0KlMB3 ADh2OZE4x6hSA4PPgzOcGvtPhJ3zrzULR+Enqh2oGTKHk4J7mVatrc66wTCFVTxI2ssu/r qRLEJ+q5sqm6yyn8V6edMDCdHpuPmbqjdWp+iokPjMzpKlBG5lZ9AdAiOsjMaOy9qg/mTX tkb+vdYaetviA4w9rLkFIUmxbQtLG4PZsUW4NhBHz3xujYAyLCWNPIGjfIwNY9QdZvxBVr 3kzDieHyfTZyG7C9XvMSogRGp4JRaNA2+P1xfkwM1DEaxekTSyGZ4v+O7h8P6A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779706238; a=rsa-sha256; cv=none; b=ZlAZjEMXRPuWLwz1wEJLyPfNe2ZnWUgYHkBblMn/icQsmiZ1B12RPnKmDJ5iCGco+5YAn7 5+PpuIg0YW8iMwtZJWESDrJsA+MCo+8AU6iW4EFZojz7ZAu8D3UVO+G3rYMVMObdFiQVA2 7p9bXTKzKQaP+GJEs2F/BNWsythdTCMN6cEtVgOLI6D2EzdTW9cY9E/lA5nahLsEoJeDM+ ZVynz+8P8e2yUIIVytgW3n420a2NFWxd3UB2MEgoqMluAK1Q2yjvkhWefZDE6pLYL72WuK L1KdFQI83Q+yAN1HDe/dDGU6EuC2LfraWVA3d2snA3NRiHclo6mmTIgNQyI/QQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779706238; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=B8jNrfqciN0S49rRNT7tmRQYIxpRFxyIYn1u3XE7ZNM=; b=dq6BCMkoGnsS19vbJ5opma5sPpVwGSdEF/om4GmjZhhpBnYMwRf2/jzmGJD40aV8YxnCxj Z+iMvdmtegkt7rtMpwM7244kWvB2tZK4DaFMqQqdYXpmQvqw77GPJjgQU+9D4J5fYRnuvB UvsjRu5GNhMi1lKnFLmrG8PVjCMRdt4Hbl8SdcmXhxVvXFja0iYN1dPprqEm7W/huFLi7P QScCvYB0gKncNUaOXoKjgY//mzQHCRVGujzv5faSKkxqkbpZr3Uf6Vk794il/sZ/1H3Gy/ n/RbGgDhjIE6IHY1ZMfD13axiJ7QZ1JV3fAL3XI9j+d+KF41byu/uAbNC1veGQ== Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature ECDSA (prime256v1) client-digest SHA256) (Client CN "tensor.andric.com", Issuer "E7" (not verified)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id 4gPCMy1mBtzjw5; Mon, 25 May 2026 10:50:38 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtpclient.apple (bladnoch-wifi.home.andric.com [192.168.0.21]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id A875C2EE88; Sat, 23 May 2026 21:05:49 +0200 (CEST) Content-Type: text/plain; charset=us-ascii List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81.1.8\)) Subject: Re: git: 700637cbb5e5 - main - Merge llvm-project main llvmorg-21-init-19288-gface93e724f4 From: Dimitry Andric In-Reply-To: <20260523142311.GA2758@zxy.spb.ru> Date: Sat, 23 May 2026 21:05:49 +0200 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <55025A7D-FB49-4E82-89C5-656598CBF71D@FreeBSD.org> References: <69eccd4e.36ab8.fd16100@gitrepo.freebsd.org> <20260522163423.GA39748@zxy.spb.ru> <4C91123F-5F4A-4ED0-B798-E474B8E219A2@FreeBSD.org> <20260523142311.GA2758@zxy.spb.ru> To: Slawa Olhovchenkov X-Mailer: Apple Mail (2.3826.700.81.1.8) On 23 May 2026, at 16:23, Slawa Olhovchenkov wrote: >=20 > On Fri, May 22, 2026 at 11:47:01PM +0200, Dimitry Andric wrote: >> On 22 May 2026, at 18:34, Slawa Olhovchenkov wrote: >>>=20 >>> On Sat, Apr 25, 2026 at 02:18:54PM +0000, Dimitry Andric wrote: >>>=20 >>>> The branch main has been updated by dim: >>>>=20 >>>> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D700637cbb5e582861067a11aaca4d053= 546871d2 >>>>=20 >>>> commit 700637cbb5e582861067a11aaca4d053546871d2 >>>> Merge: 6243d755fb82 3f709e42e3be >>>> Author: Dimitry Andric >>>> AuthorDate: 2025-12-07 15:15:22 +0000 >>>> Commit: Dimitry Andric >>>> CommitDate: 2026-04-25 14:08:55 +0000 >>>>=20 >>>> Merge llvm-project main llvmorg-21-init-19288-gface93e724f4 >>>>=20 >>>> This updates llvm, clang, compiler-rt, libc++, libunwind, lld, = lldb and >>>> openmp to llvm-project main llvmorg-21-init-19288-gface93e724f4, = the >>>> last commit before the upstream release/21.x branch was created. >>>>=20 >>>> PR: 292067 >>>> MFC after: 1 month >>>=20 >>> This is broke at least graphics/krita >>> I mean __type_traits/is_integral.h is incorrect now: template >> _Tp> struct __libcpp_is_integral defined only for >>> !__has_builtin(__is_integral) >>=20 >> Please try the patch in . >=20 > Failed > % ls -l /poudriere/ports/default/graphics/krita/files/ > total 6 > -rw-r--r-- 1 root wheel 525 Mar 10 2025 = patch-cmake_modules_FindOpenJPEG.cmake > -rw-r--r-- 1 root wheel 384 Mar 10 2025 = patch-cmake_modules_pyproject.toml.in > -rw-r--r-- 1 root wheel 2842 May 23 17:13 = patch-libs_global_KisHalfTraits.h > -rw-r--r-- 1 root wheel 639 Mar 10 2025 = patch-plugins_impex_CMakeLists.txt >=20 >=20 > In file included from = /wrkdirs/usr/ports/graphics/krita/work/krita-5.2.14/libs/pigment/KoColor.c= pp:9: > In file included from = /wrkdirs/usr/ports/graphics/krita/work/krita-5.2.14/libs/pigment/KoColor.h= :16: > In file included from = /wrkdirs/usr/ports/graphics/krita/work/krita-5.2.14/libs/pigment/KoColorSp= aceTraits.h:14: > In file included from = /wrkdirs/usr/ports/graphics/krita/work/krita-5.2.14/libs/pigment/KoColorSp= aceMaths.h:109: > = /wrkdirs/usr/ports/graphics/krita/work/krita-5.2.14/libs/global/KisHalfTra= its.h:33:10: error: no template named '__libcpp_is_integral'; did you = mean '__libcpp_is_final'? > 33 | struct __libcpp_is_integral > | ^~~~~~~~~~~~~~~~~~~~ > | __libcpp_is_final Strange, it builds just fine for me. Can you post the = /wrkdirs/usr/ports/graphics/krita/work/krita-5.2.14/libs/global/KisHalfTra= its.h file? -Dimitry From nobody Mon May 25 12:31:45 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPFcn4pJ9z6fKNH; Mon, 25 May 2026 12:31:53 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPFcn1T98z3QRy; Mon, 25 May 2026 12:31:53 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zxy.spb.ru; s=dkim; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date; bh=rBLsK4sgx++6h0ovlkQma4WDgBHqKU9x9PzXcMnt8lE=; b=q tSotRzj1stP2gIbtKOj3z2MOjTKiIRB6BDltCSF7gAFGJQ5DlBZIGuK/LZbTsKlrdyhIAdnFI7nm4 jjRa8t2T2bDy3BiqsGBp2O8IshjNERz7A/zU4TMdnVLNk+8hgD+Z2P7BpDcuFi0ECy86mfik1IEb2 ILeyfY/TsVyEaQ3R7x/GRdVfm9Um/QeOeVTb6Nyadwq30SoML9CIgJFKFMAPQpdoO54CCI6kXha0d EJuyVE627/0U8S6In19T9V1OGAbRfo8MIs0lP3mi/Dg0PJFV6nrvZAwh05w7MR5mldLZc/hBOqRx/ pSQexcIGmZ8m9pkcH191jEVEkTcf6gWAQ==; Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1wRUTB-0007HX-Ag; Mon, 25 May 2026 15:31:45 +0300 Date: Mon, 25 May 2026 15:31:45 +0300 From: Slawa Olhovchenkov To: Dimitry Andric Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Subject: Re: git: 700637cbb5e5 - main - Merge llvm-project main llvmorg-21-init-19288-gface93e724f4 Message-ID: <20260525123145.GB2758@zxy.spb.ru> References: <69eccd4e.36ab8.fd16100@gitrepo.freebsd.org> <20260522163423.GA39748@zxy.spb.ru> <4C91123F-5F4A-4ED0-B798-E474B8E219A2@FreeBSD.org> <20260523142311.GA2758@zxy.spb.ru> <55025A7D-FB49-4E82-89C5-656598CBF71D@FreeBSD.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55025A7D-FB49-4E82-89C5-656598CBF71D@FreeBSD.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:5495, ipnet:195.70.192.0/19, country:RU] X-Rspamd-Queue-Id: 4gPFcn1T98z3QRy X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated On Sat, May 23, 2026 at 09:05:49PM +0200, Dimitry Andric wrote: > On 23 May 2026, at 16:23, Slawa Olhovchenkov wrote: > > > > On Fri, May 22, 2026 at 11:47:01PM +0200, Dimitry Andric wrote: > >> On 22 May 2026, at 18:34, Slawa Olhovchenkov wrote: > >>> > >>> On Sat, Apr 25, 2026 at 02:18:54PM +0000, Dimitry Andric wrote: > >>> > >>>> The branch main has been updated by dim: > >>>> > >>>> URL: https://cgit.FreeBSD.org/src/commit/?id=700637cbb5e582861067a11aaca4d053546871d2 > >>>> > >>>> commit 700637cbb5e582861067a11aaca4d053546871d2 > >>>> Merge: 6243d755fb82 3f709e42e3be > >>>> Author: Dimitry Andric > >>>> AuthorDate: 2025-12-07 15:15:22 +0000 > >>>> Commit: Dimitry Andric > >>>> CommitDate: 2026-04-25 14:08:55 +0000 > >>>> > >>>> Merge llvm-project main llvmorg-21-init-19288-gface93e724f4 > >>>> > >>>> This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and > >>>> openmp to llvm-project main llvmorg-21-init-19288-gface93e724f4, the > >>>> last commit before the upstream release/21.x branch was created. > >>>> > >>>> PR: 292067 > >>>> MFC after: 1 month > >>> > >>> This is broke at least graphics/krita > >>> I mean __type_traits/is_integral.h is incorrect now: template >>> _Tp> struct __libcpp_is_integral defined only for > >>> !__has_builtin(__is_integral) > >> > >> Please try the patch in . > > > > Failed > > % ls -l /poudriere/ports/default/graphics/krita/files/ > > total 6 > > -rw-r--r-- 1 root wheel 525 Mar 10 2025 patch-cmake_modules_FindOpenJPEG.cmake > > -rw-r--r-- 1 root wheel 384 Mar 10 2025 patch-cmake_modules_pyproject.toml.in > > -rw-r--r-- 1 root wheel 2842 May 23 17:13 patch-libs_global_KisHalfTraits.h > > -rw-r--r-- 1 root wheel 639 Mar 10 2025 patch-plugins_impex_CMakeLists.txt > > > > > > In file included from /wrkdirs/usr/ports/graphics/krita/work/krita-5.2.14/libs/pigment/KoColor.cpp:9: > > In file included from /wrkdirs/usr/ports/graphics/krita/work/krita-5.2.14/libs/pigment/KoColor.h:16: > > In file included from /wrkdirs/usr/ports/graphics/krita/work/krita-5.2.14/libs/pigment/KoColorSpaceTraits.h:14: > > In file included from /wrkdirs/usr/ports/graphics/krita/work/krita-5.2.14/libs/pigment/KoColorSpaceMaths.h:109: > > /wrkdirs/usr/ports/graphics/krita/work/krita-5.2.14/libs/global/KisHalfTraits.h:33:10: error: no template named '__libcpp_is_integral'; did you mean '__libcpp_is_final'? > > 33 | struct __libcpp_is_integral > > | ^~~~~~~~~~~~~~~~~~~~ > > | __libcpp_is_final > > Strange, it builds just fine for me. Can you post the /wrkdirs/usr/ports/graphics/krita/work/krita-5.2.14/libs/global/KisHalfTraits.h file? > I mean path problems in patch file: # find /wrkdirs/usr/ports/graphics/krita/work/ -name "*KisHalfTraits.h*" -ls 36581 2 -rw-r--r-- 1 root wheel 430 May 25 12:23 /wrkdirs/usr/ports/graphics/krita/work/krita-5.2.14/b/graphics/krita/files/patch-libs_global_KisHalfTraits.h 36589 1 -rw-r--r-- 1 root wheel 0 May 25 12:23 /wrkdirs/usr/ports/graphics/krita/work/krita-5.2.14/b/graphics/krita/files/patch-libs_global_KisHalfTraits.h.orig 37924 3 -rw-r--r-- 1 root wheel 1283 Dec 9 09:55 /wrkdirs/usr/ports/graphics/krita/work/krita-5.2.14/libs/global/KisHalfTraits.h From nobody Mon May 25 13:36:44 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPH3j2Q18z6dwwl for ; Mon, 25 May 2026 13:36: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPH3j1wVGz3XdC for ; Mon, 25 May 2026 13:36:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779716209; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lPJ6u+NgPlP49g0kUore4zw9rejWjKiMLgCTYoyWHTA=; b=tLWGg8ge/Mlhotu7/Yc8sPZTtpA0I+vhpHQkB5FF+6WDC/Mj8rlan//CLQoI31XrgPpJD5 0xZp0nrx2GnLeaHXNUvkvCpq3qFsHChstTUC+Jiwx7iPDgfj96ik1N+W269AVdIVvr/nI9 5bQQKOK3C0Aw44o6GJFhlbuFLw9fk021wUUPdpGFQVCbRNqkUJq4CgkkoZHh0KN8t1gfiv o3YNwbd+pyZ9nn6Ez6DwoDeMjIPNQMaQpk+pGR5fX1SN0xpjv+ivNWvnwHXaNcQaDyENml 9QKf7kOEdu5Rkc5/ADdQpOuClRLU3oOI4kfNrG9EY3dShGVMOTff8z/1a9jwnA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779716209; a=rsa-sha256; cv=none; b=rsSYk2WuQbUomrl2mq8qvIdHVXsqlYKx0n4dlIATcTxCXzuh798bZUT3FhcrXsPI/QNS+T Unt1EPP5lFj6lL6zjsItshzDfIdW1Z3s/hGWROccywTpg0pJUkhAijyeGoSdNXaYDqQaKo L9AysgsGlGVHd4gPh0RBftUGPNai1asARPS0oGLM/1N65bEOO1AiAZIGm7jbut3kSMOsoh 1z5Gx8pxsJsLoKuMVj5jBZb+GNdb0++M7lId3r6FeOtlivqScQguOtrTd80uL51SZ8Td3Y 5ag2wnr3mBs58cGXmoIipG+DytLysiCCh67Bp2Y2xinUVcIxyzoOz7FwxujFnw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779716209; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lPJ6u+NgPlP49g0kUore4zw9rejWjKiMLgCTYoyWHTA=; b=rr2vmoPzh77DsjZlNXG8ONkwHOdnDaddhVJfC0L4PdoxvIL692StKLosE61GCJCi/mNigI t+CmQ9ifzGdfQdqcGjto2aH4ubNluVTchi3KKkczSVZoceq2FNRbkf2duPwZz112HAyY5i gfr212U/3Zj922h6NifSiIClgE/WrN+GohjQ8qAED+P/K/TWrR51xEDvbrUXLKsfzJ+/Sg +uN0asaLbWnIkI/9Pa/L1jlrDNvmKbERoUxVpRjvva99YC0sjZaBQXYAwTWCzrhTK13nca UYXBJXZhUzIrgeEXBajV0rCbJKtJVGQH/+5pEQiK1+U5spaqNy+zKohaySXbnQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPH3j1TkPzjmV for ; Mon, 25 May 2026 13:36:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 465dc by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 25 May 2026 13:36:44 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 414617d82c8a - stable/15 - cap_net.3: Clarify monotonic reduction in permitted operations List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 414617d82c8a4e10c8bdfc9ea50f3b3fde7cec0d Auto-Submitted: auto-generated Date: Mon, 25 May 2026 13:36:44 +0000 Message-Id: <6a14506c.465dc.6106c186@gitrepo.freebsd.org> The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=414617d82c8a4e10c8bdfc9ea50f3b3fde7cec0d commit 414617d82c8a4e10c8bdfc9ea50f3b3fde7cec0d Author: Ed Maste AuthorDate: 2026-05-20 20:27:49 +0000 Commit: Ed Maste CommitDate: 2026-05-25 13:36:20 +0000 cap_net.3: Clarify monotonic reduction in permitted operations Reviewed by: markj, oshogbo Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57141 (cherry picked from commit 59601a75d6fb1300b1aec2977eaa6adeb0300684) --- lib/libcasper/services/cap_net/cap_net.3 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/libcasper/services/cap_net/cap_net.3 b/lib/libcasper/services/cap_net/cap_net.3 index e322222e866f..2e3777337d60 100644 --- a/lib/libcasper/services/cap_net/cap_net.3 +++ b/lib/libcasper/services/cap_net/cap_net.3 @@ -203,7 +203,8 @@ will consume and apply the limits. .Pp Once a set of limits is applied, subsequent calls to .Fn cap_net_limit -will fail unless the new set is a subset of the current set. +may only further restrict the service. +Any call that would grant operations not currently permitted will fail. .Pp If the .Fn cap_net_limit From nobody Mon May 25 13:37:35 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPH4b3j95z6dwts for ; Mon, 25 May 2026 13:37: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPH4b2YRrz3XZ1 for ; Mon, 25 May 2026 13:37:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779716255; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+4+k39MI/FvM7DYfdzlwYIqql0uNxJ+lgOQi3lww7lA=; b=UR3+fwhUyp7Y7eFEzkl/1dfnatLm6qnLIsdidsMorheRP6DB2+7VEeYX7mTYMLf4MoFO3M SvrofNgheCmvhIQ6YQyXHg26Be5eAUBv3hzWREPvQDInj73SCMUhamumzir1wqZkdpUpib CtHNjVGtnyL9f7ffPXpPeAWvoTzvy3u8Wfu/Suj/XJjDIMbj05KtAFK03JxKiPMVSpvzaW o5ILbtEfnWfnUgOaeokIMM6DtJooRk0LsiEU1zW/lrY+t6CnI5b/MS3DJBs5EOQ46zvNb5 bmEcfpWdR7pwsa4WO0y7i1dgpNuL50m3zPZfFy4UAxlA2ex3qoYFLQyyuK1fOA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779716255; a=rsa-sha256; cv=none; b=a37aZR2tt677s8I0wG5NYgT2FCiLPIz3xbQZ5sSOIPhMI6+odATtM2MkyrldujG+vzewPb AXWyasXBHp2+UpPAsDP9FAA3+XiOJpCicYpAy0fwM3TrgRgatYjQasTY9S5OhvAnrdvt/+ ezcOMusvOxf6WbKE2JMZDvCpliB8D7NeGhElEsO7wDdHzQpn+6SMLnF79M0mlkOWYOxgCQ nWXvj3LDiWL3MpRdn10HR98CfiK0DbznI0kic1irJgHtv6AcBCTn1I5aOEbfe3cOZbJtSV cHGvgOt0fej39BNe0XJ2L1dqXQOLCFghALVeaSobPt03FSQIBp/s2dTBUY/YRQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779716255; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+4+k39MI/FvM7DYfdzlwYIqql0uNxJ+lgOQi3lww7lA=; b=diiC90ouLo5xSzsvjx3sYM2rvFoUAUSLrkHIpdzQzQ4MlN9wW/0K73CzgqEs/9DgaIg+oD cfrSs1PZCpMPct4bofQ4Xmg2U3D5TqIBaL/a6OLRzEHjS5b6bgm57s2yGN7adRMdsNccIW MKKxa68CLdLOLXWBKnmsVObPbc9/KKaBVhsv7NfwJ23zIFcVMWzDl5i4tcgdTcFoK4u0Wn nAbz6EVnmpdelB6HEft6x5YrTSG4Vl+LrBoL96rq4ub1VP+VvBVKJocro6/udX2lY+ax57 9FUPSfsc69T6vuwyi6Q4ox+ewUy0t9NN1goCFvA/lvO0IZEmK3Q0MugC+op8Eg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPH4b1bNGzkjL for ; Mon, 25 May 2026 13:37:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 47666 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 25 May 2026 13:37:35 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 21d9bc1629e0 - stable/14 - cap_net.3: Clarify monotonic reduction in permitted operations List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 21d9bc1629e0f8dfe83766a2c814d6b77513e641 Auto-Submitted: auto-generated Date: Mon, 25 May 2026 13:37:35 +0000 Message-Id: <6a14509f.47666.6c395e8@gitrepo.freebsd.org> The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=21d9bc1629e0f8dfe83766a2c814d6b77513e641 commit 21d9bc1629e0f8dfe83766a2c814d6b77513e641 Author: Ed Maste AuthorDate: 2026-05-20 20:27:49 +0000 Commit: Ed Maste CommitDate: 2026-05-25 13:37:06 +0000 cap_net.3: Clarify monotonic reduction in permitted operations Reviewed by: markj, oshogbo Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57141 (cherry picked from commit 59601a75d6fb1300b1aec2977eaa6adeb0300684) (cherry picked from commit 414617d82c8a4e10c8bdfc9ea50f3b3fde7cec0d) --- lib/libcasper/services/cap_net/cap_net.3 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/libcasper/services/cap_net/cap_net.3 b/lib/libcasper/services/cap_net/cap_net.3 index e322222e866f..2e3777337d60 100644 --- a/lib/libcasper/services/cap_net/cap_net.3 +++ b/lib/libcasper/services/cap_net/cap_net.3 @@ -203,7 +203,8 @@ will consume and apply the limits. .Pp Once a set of limits is applied, subsequent calls to .Fn cap_net_limit -will fail unless the new set is a subset of the current set. +may only further restrict the service. +Any call that would grant operations not currently permitted will fail. .Pp If the .Fn cap_net_limit From nobody Mon May 25 13:47:36 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPHJG0bY5z6dy34 for ; Mon, 25 May 2026 13:47: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPHJF6ws2z3Y98 for ; Mon, 25 May 2026 13:47:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779716862; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cs2jzE/RIm0P/uDhQdhsB+w0KhF8mruSRlKAxiKf8ec=; b=CLmCvAxw3raNCtU6rrnqaglstdp2Tsb2SwHZPlX95/yRsROBq6+FybSiEMAzpAWH184RZA QKBUE+6wgkiKK/l1LFNh1/8Q94icv1sSPZsBLXDWu65n3zOKvn03f8BTb0kWBa5U9UZc/k WOIQ7u/LZcJ8hQZHPUqVh7T5zwDJrMokF4hRGe8ZYoQQ/ruP12SSraj9xlEzadHHNelha4 94G6FjKtq1dJQHdQOqFkjyzsj9SKC5fjQgCwmG1uN8jQ5kD06u/yo1HV6xXhrf/XbzrtbG P72QcDHhz5kzygjSGIKEU4bBgMZFETAV7LyLYyQsVZAjy5ulAsOMjM4XWhRoSg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779716862; a=rsa-sha256; cv=none; b=NzDyWwd241+sqxQMcW3cTBTyqYL5sH6jFjj+e81tRaqIkepYMV81IDsnaFlssZ+p8AP1ar AXiWFdBj8xIbVhO5oUlgMKITyucvjiDz5Y2kdu1dcpQDC+XqxxFuUZg0CF/Oc6KbFzQ2jl EkYhwcT4nf6IE0nT6fz5KKvt/Mjy0eO9zqwanAFjllckBFbBxKI8+IViUfoznktntB71Q4 FBW/gFgSLUJ5T3bcmcHtiyuKQ37FtAFz+7FwLabrYjZ77QzkhngV9UV6/q8u+cxYqCsgtH nL9Gir+4lC6PWvEQ5QjIZii2Anm0HAGIzCBI0ENbzgZLiBRPaH+/UYujtdy4QA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779716862; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cs2jzE/RIm0P/uDhQdhsB+w0KhF8mruSRlKAxiKf8ec=; b=f84b2OtQsQr54fTErCygzi4c8kVGlSQ5aT8nJRZw3wcNTfpuGzao2K9ssGia3n5UAeZZqR cVHfpCZ6T35kx850QTQy9XeHH7D+EVUkjz1I7sinsD6EzXNXWFgn0Sx35IYwWujxyskBJA FS75LA0udWJ/JDdV/OlUNvjyGTdmC+Q5uco6E/YjPZ+CQqO67E+dEpn2COh2PhTl4Z6Cv6 wYffnMkq2lojYaDae2QxG3oTDc5ABWEJFw0MItlL95aFRHPuJ2WFumAOGyx/emHi3Jtf0C +xxsogIlHfTBS8Hx3FyNIYAt1QSFc9S8yYokH0yZ3CihvaehB7EjkuoeTYPZ/w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPHJF6WKyzkCb for ; Mon, 25 May 2026 13:47:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 471e6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 25 May 2026 13:47:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: f05fb5157ba1 - main - vtfontcvt: Return error from write_fnt_source List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f05fb5157ba1291ee5019bacece8d1e98ea95b35 Auto-Submitted: auto-generated Date: Mon, 25 May 2026 13:47:36 +0000 Message-Id: <6a1452f8.471e6.4fa5761a@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=f05fb5157ba1291ee5019bacece8d1e98ea95b35 commit f05fb5157ba1291ee5019bacece8d1e98ea95b35 Author: Ed Maste AuthorDate: 2026-05-22 18:37:51 +0000 Commit: Ed Maste CommitDate: 2026-05-25 13:46:58 +0000 vtfontcvt: Return error from write_fnt_source Previously write_fnt_source always returned 0, silently discarding errors. Return rv so that errors set vtfontcvt's shell exit appropriately. Sponsored by: The FreeBSD Foundation --- usr.bin/vtfontcvt/vtfontcvt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/vtfontcvt/vtfontcvt.c b/usr.bin/vtfontcvt/vtfontcvt.c index 1e388ef36276..f39076b09be6 100644 --- a/usr.bin/vtfontcvt/vtfontcvt.c +++ b/usr.bin/vtfontcvt/vtfontcvt.c @@ -987,7 +987,7 @@ done: if (rv != 0) perror(filename); fclose(fp); - return (0); + return (rv); } static void From nobody Mon May 25 13:56:21 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPHVM1hjyz6dyl4; Mon, 25 May 2026 13:56:27 +0000 (UTC) (envelope-from fluffy@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPHVL67kRz3Zdq; Mon, 25 May 2026 13:56:26 +0000 (UTC) (envelope-from fluffy@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779717386; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=FJIOH5bMQFjIo9ch6A1QKIc6QH19CeKyuqRxA+bEx/Q=; b=ZIHx7mN7OcThsvu0H8WyH/VdRWbBaRu4Pyc4ZTIYiJx5mdpKeyKNioXaCqgeHdrhMBchva o0q48QZHbdrMGROZeool6HgL/8V/P0x3Xe9OFr+0dZYsdVAoGuyif+KgGk7kWqsyz871Ku BHiY4FaMkH5+Wa4j6lCXviJMx6Flzsx9Xh3dzxHdBH28sI6rzi+n+iLcQB1idaFOP/JE0h EUwxIYS6FPI6NDSLhdmktucuTMdRZwCEpGXJFjzXSR+IiRc8+I2zLNZbXbAr7vcs96KJ3s l6lHIXsbGSSXBs3n5Nw5eqSNgHJrgM7MDn/rKzoEytGZcJa5iZK3KLB2QillWQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779717386; a=rsa-sha256; cv=none; b=tYhBecDsXeZZ9ulU301R9Ufg88ZAPz0v5eMi/Uu1WUussuLmuAib8xuDMtJKVtO9I3nctq DRnBMgnemWu0/asNsX3k56wunE6nKKdYliW6nCaATR/cQjDUKKYZkdNAlyoddu5rlZDIHh QEO3cxXtsaXX27NBNNgSVA3dhggC53krwxbqhDSB8/hu/7NjNnoj7xpSEqADm0n+aWJDlS xA230IFv3w13OhBhIUsyk/VFNkgUUk5PdPftYixuQWOke02u9MI7uVsbRDXVwBn/RZQhHN bMKIxbJxyDFS5TKncxsG8aLFpqdujjWGrcojuefoTWPmK4/3HXiY6r2kjOTZow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779717386; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=FJIOH5bMQFjIo9ch6A1QKIc6QH19CeKyuqRxA+bEx/Q=; b=hz66V/DpQc5WdN4E6I+170hMlnzqfoer1fiz23SJpRLL+DnvA5qrg0xJ6eEwA06ZcGn/JY Aet0XeFwHlzc/qKT5agwZzCYe+tp0+YgPTZmPnS95g9gZj+OAbt5ss++s/tvdVTleq04YX SAvfKN6axco6f+qaxuJlvGkcIvUjXgM44vNl5v6A7dekH993E+g3I6Ze1w0Avte26Ascw7 gBKP0MoJGeBQu8/Cr32OnEhPiWLVh0KBbgnw7t26MVB48PGraAF5Ai4hHSXM9JcsvRispy GYZqduuwhACGxQACFb1Lg7rosNJlkyodU3Y+/WqeBxoQ/iWlVF9ugeXhhP0hjQ== Received: from [172.16.209.2] (unknown [188.243.165.67]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: fluffy) by smtp.freebsd.org (Postfix) with ESMTPSA id 4gPHVL0XNJzn3X; Mon, 25 May 2026 13:56:25 +0000 (UTC) (envelope-from fluffy@FreeBSD.org) Message-ID: <0476b229-a515-4f5c-93e1-b796cc0a92e6@FreeBSD.org> Date: Mon, 25 May 2026 16:56:21 +0300 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 700637cbb5e5 - main - Merge llvm-project main llvmorg-21-init-19288-gface93e724f4 To: Slawa Olhovchenkov , Dimitry Andric Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" References: <69eccd4e.36ab8.fd16100@gitrepo.freebsd.org> <20260522163423.GA39748@zxy.spb.ru> <4C91123F-5F4A-4ED0-B798-E474B8E219A2@FreeBSD.org> <20260523142311.GA2758@zxy.spb.ru> <55025A7D-FB49-4E82-89C5-656598CBF71D@FreeBSD.org> <20260525123145.GB2758@zxy.spb.ru> Content-Language: ru, en-GB From: Dima Panov Autocrypt: addr=fluffy@FreeBSD.org; keydata= xsFNBEp+xiUBEAD01RkOYcyzU/Fnam2FI7PPwYqW00SwVmfUHihvVniiaMwzaYzchb+mzSha NsqRgjIN/i59OBpnS25OXMLEpQP7jDJnY2xKyJN2H4qn1HPHkF9cYuqvqkm+r5459g+2ZoGY 9Sr1PA0XSzXJMSQ1nRK3cFfqlN/L2//P36U5VuOWXGZUTwr/n2B/N0HAsYsqDOdjofLg7x9z 8p8elqwJbT/O4ltg8JBVAnof+FzqefYW4CzqkHRjq/9ORiGYh14ST9ECsCaVpfdDUTor0wgp JqzCN1HsQcHqgdMmOqigWIgN7Eg4MRQU3LDCISrNJ/45zvcKUXR0RHOjnSuflYba74q58XhZ 4eCTqHeMHjA8st4IWRzy9l0V4RunnZxjOTb806jyIhdxcb2m8o5tXwsqjf0TQ7vYowDHrQ6g XlhPg4Jvvwf+BwlB2p+w7Cs/Y9QA0YHnIOIVZAwU1wv66YSI9IDL2AbnY2gQGx+dkHiC3S5L G8HcPrMcjayyThKKIi5KQsWa3snFeK5ky+cRpVEOPQfUXFOas++91v90Xe9j+lsmRofsyvuy gzoaZE2fud0kCsOgYEg+kiLPlQicNAx5IToOs8BrVFLcxmbPKuVBfbLdWsYLjXGzbXEmzV9f NDZ1r1uNmVema8YYCiNjUDZhxIfKt8nbp6cx8UgVLGRVDEfXeQARAQABzTdEaW1hIFBhbm92 IChGcmVlQlNELk9SRyBDb21taXR0ZXIpIDxmbHVmZnlARnJlZUJTRC5PUkc+wsF2BBMBAgAg BQJKfsYlAhsDBgsJCAcDAgQVAggDBBYCAwECHgECF4AACgkQ+4ugndU5jyk6dhAArHclTYjw VRjDnoRfO3Zfj9Ssab9Vrbo7DNFWeAqPE3OTCmiq9Q0fzRHzmhVyedYMm9qNA3i0J1De3KTn LanXOrBIqsmmZpSqmrp/xXdZngDLW5H6hpE0f2PeAPwxrb9uBQax8WMR7Z4STSHAP4GRjve3 0wNNS0MlawGllcs9VKRxG5PsDA8k3ACTSjdpQ76RWldORN4LA8M40yHRX377SGMzO+XsCeOw ad65GKyLrx+6Gnd3PMOjVCJCrqd04Jgqg9G0xKNImchwIZ5ulx9jAt+ixfNbY6hwslleqimr 2t5+MMqo6dRrvJ+BsR8NHt9vGi2Jy4+4smg05fR18fck0Sk4vCYyVvtvnOk3qZf0F8zJu06G cjWWC2ZbDPbmksWXFIMxoJbyVxK55xOqcFs0t12sR6gbVJb8Nb88WrQub3MgePyMF6R3Tkfa OqkjvQur1xC2AXESTxtJw1FkdGSb3UopNKgvSPHSLFW8B0LbyDxdYRTRWPGGEUhFP6tdXi5R vb1210ks2EQAqF4Cm3iRIhYgtZvQqQgMSiO9fVyeJ0U6dYGDtg2Boi+NtXKRdmtL7pRSnI3n fAbVJ05Hhd7PBnJeob6R08nHRo9DdAG7o8ToM+egUAuEsEvoRV+v4f6k3mShdxE7gG/anwVy eh3n6LGwg9KHDr1X2FODsLLxgUjOwU0ESn7GJQEQAMBTMHQgb0vcPMAiRvb357ihlh/YYA22 FXj4p3XTrDlBlRL0QCRq1I8XDeQmL3mG3s3NBtDXSefnNM06jZ3XCAfHIDBdxJJvQZZCXfvL p/JK7nnEuqoeqT6/oKs1MeZVdUnvh1nZhphs+Z6dl01GIE8YDpzT1JMD2f3G9PHChGi3Ddzq m3VdXt/87khYJkPbaf6EN5+vDthKgMjba8jwbQ+7IUPqkfnNFIZS6irZ2LYb79BLNI5JSl9l ReSfEX2d8ByQlLzuf0TS4voy3nWGeCyj6BIOMiRSxg+hZmJLYxhNkyK4GQVCt/rLT7dIfBQM syBbX0Qw2NOcfba9VgdPZBgdrawwB4/xF9SA3NB0J0lUjhjpH9iG8NxlpleEg8OSUApyFZEJ q2A/flns4kKzNH7AGYDOFORytDzA3qkgCJrZ7nzQSsdtZ2qbyAoze0tl+YrShJhOcmQBtFem omhWVeJ8T/Bw1KH8M1ihrENBTSzYzLvN18YjNP6P0Dh/7Zda5yYI8fNqd84K3Uq5xBiI0S6+ qxViw84z2tJj8TxiNqFAk7Tbeo2Ximtq7uQ9UnFRSK3jw96yi19KU9rQQZs0xUjN5gn/tF5l BZWKjwuZCkcOiI0EWHAR+ATAEsFNXcuoC9CAGK5HFW4nI4WtE3pv1KYvivlGtF1wzf0Qrhye RrmxABEBAAHCwV8EGAECAAkFAkp+xiUCGwwACgkQ+4ugndU5jymgKg//RvnI7zEDKv6nQUqK RyLawPTrCKCtQ2vSoWyTNgRB6byNS1w5wNSAMnqaESx2bdhauaxe167VEJYqgQy241yFslpC 6v/xlH25Ppos+Jg6AKaQG/JABHO6Co4tHtBbNmM+14HESxAodA4NJuEU19iIPjRhUKC8F8R9 xBmW1uLpPiljU9Km0P3EIKjAdtdZNeMLhwsbSHBwJROFrxFGiTzWNREWZoZpQxgSbHYhwYbx HEbJi1cybl9IQvSGHrysctZsxD04Jxh6ogaziiT8aV6ear6BNh008yRf61FvrinfG3USLR3i JO8aHap4QGCPjZ3cyT+DEq8/zVfDdeidTeNEhSgRKk856RcA+yAE79KYdKkvmDUiC8poAJ7F GEYHMB+g/1+LczCr2g9GYkiB/53boYfU9esYYlarxCgedCrwXv6T48FZ3xxoH3XJ2KV8K6M8 CUb04jj3kEeCwq+R6Bk2ZXrnMzyQmmn223X+Zp89B/gchH32JY8y3j7BICcoZmgMu62XNMgW I/hRgfi3JlVCne6XPj3/w00JYG7vo+eTJOflqYr3WRTPYh7DxzYtshZswHmmkZtwizUQUZzF 9dX2CM8nY7cKucEmtcnUpjGwXMOufa/DmCTlk8ggRZ0ukCUZOlIA4ILxp95sS2oqyucARv+p wMWvrqJ/LfbZexSsIjI= Organization: FreeBSD.org In-Reply-To: <20260525123145.GB2758@zxy.spb.ru> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------b7s47nzANLJQrInBXE4Y1fRu" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------b7s47nzANLJQrInBXE4Y1fRu Content-Type: multipart/mixed; boundary="------------tItyLYUh4cde86ScWF4tnazj"; protected-headers="v1"; hp="clear" Message-ID: <0476b229-a515-4f5c-93e1-b796cc0a92e6@FreeBSD.org> Date: Mon, 25 May 2026 16:56:21 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 700637cbb5e5 - main - Merge llvm-project main llvmorg-21-init-19288-gface93e724f4 To: Slawa Olhovchenkov , Dimitry Andric Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" References: <69eccd4e.36ab8.fd16100@gitrepo.freebsd.org> <20260522163423.GA39748@zxy.spb.ru> <4C91123F-5F4A-4ED0-B798-E474B8E219A2@FreeBSD.org> <20260523142311.GA2758@zxy.spb.ru> <55025A7D-FB49-4E82-89C5-656598CBF71D@FreeBSD.org> <20260525123145.GB2758@zxy.spb.ru> Content-Language: ru, en-GB From: Dima Panov Autocrypt: addr=fluffy@FreeBSD.org; keydata= xsFNBEp+xiUBEAD01RkOYcyzU/Fnam2FI7PPwYqW00SwVmfUHihvVniiaMwzaYzchb+mzSha NsqRgjIN/i59OBpnS25OXMLEpQP7jDJnY2xKyJN2H4qn1HPHkF9cYuqvqkm+r5459g+2ZoGY 9Sr1PA0XSzXJMSQ1nRK3cFfqlN/L2//P36U5VuOWXGZUTwr/n2B/N0HAsYsqDOdjofLg7x9z 8p8elqwJbT/O4ltg8JBVAnof+FzqefYW4CzqkHRjq/9ORiGYh14ST9ECsCaVpfdDUTor0wgp JqzCN1HsQcHqgdMmOqigWIgN7Eg4MRQU3LDCISrNJ/45zvcKUXR0RHOjnSuflYba74q58XhZ 4eCTqHeMHjA8st4IWRzy9l0V4RunnZxjOTb806jyIhdxcb2m8o5tXwsqjf0TQ7vYowDHrQ6g XlhPg4Jvvwf+BwlB2p+w7Cs/Y9QA0YHnIOIVZAwU1wv66YSI9IDL2AbnY2gQGx+dkHiC3S5L G8HcPrMcjayyThKKIi5KQsWa3snFeK5ky+cRpVEOPQfUXFOas++91v90Xe9j+lsmRofsyvuy gzoaZE2fud0kCsOgYEg+kiLPlQicNAx5IToOs8BrVFLcxmbPKuVBfbLdWsYLjXGzbXEmzV9f NDZ1r1uNmVema8YYCiNjUDZhxIfKt8nbp6cx8UgVLGRVDEfXeQARAQABzTdEaW1hIFBhbm92 IChGcmVlQlNELk9SRyBDb21taXR0ZXIpIDxmbHVmZnlARnJlZUJTRC5PUkc+wsF2BBMBAgAg BQJKfsYlAhsDBgsJCAcDAgQVAggDBBYCAwECHgECF4AACgkQ+4ugndU5jyk6dhAArHclTYjw VRjDnoRfO3Zfj9Ssab9Vrbo7DNFWeAqPE3OTCmiq9Q0fzRHzmhVyedYMm9qNA3i0J1De3KTn LanXOrBIqsmmZpSqmrp/xXdZngDLW5H6hpE0f2PeAPwxrb9uBQax8WMR7Z4STSHAP4GRjve3 0wNNS0MlawGllcs9VKRxG5PsDA8k3ACTSjdpQ76RWldORN4LA8M40yHRX377SGMzO+XsCeOw ad65GKyLrx+6Gnd3PMOjVCJCrqd04Jgqg9G0xKNImchwIZ5ulx9jAt+ixfNbY6hwslleqimr 2t5+MMqo6dRrvJ+BsR8NHt9vGi2Jy4+4smg05fR18fck0Sk4vCYyVvtvnOk3qZf0F8zJu06G cjWWC2ZbDPbmksWXFIMxoJbyVxK55xOqcFs0t12sR6gbVJb8Nb88WrQub3MgePyMF6R3Tkfa OqkjvQur1xC2AXESTxtJw1FkdGSb3UopNKgvSPHSLFW8B0LbyDxdYRTRWPGGEUhFP6tdXi5R vb1210ks2EQAqF4Cm3iRIhYgtZvQqQgMSiO9fVyeJ0U6dYGDtg2Boi+NtXKRdmtL7pRSnI3n fAbVJ05Hhd7PBnJeob6R08nHRo9DdAG7o8ToM+egUAuEsEvoRV+v4f6k3mShdxE7gG/anwVy eh3n6LGwg9KHDr1X2FODsLLxgUjOwU0ESn7GJQEQAMBTMHQgb0vcPMAiRvb357ihlh/YYA22 FXj4p3XTrDlBlRL0QCRq1I8XDeQmL3mG3s3NBtDXSefnNM06jZ3XCAfHIDBdxJJvQZZCXfvL p/JK7nnEuqoeqT6/oKs1MeZVdUnvh1nZhphs+Z6dl01GIE8YDpzT1JMD2f3G9PHChGi3Ddzq m3VdXt/87khYJkPbaf6EN5+vDthKgMjba8jwbQ+7IUPqkfnNFIZS6irZ2LYb79BLNI5JSl9l ReSfEX2d8ByQlLzuf0TS4voy3nWGeCyj6BIOMiRSxg+hZmJLYxhNkyK4GQVCt/rLT7dIfBQM syBbX0Qw2NOcfba9VgdPZBgdrawwB4/xF9SA3NB0J0lUjhjpH9iG8NxlpleEg8OSUApyFZEJ q2A/flns4kKzNH7AGYDOFORytDzA3qkgCJrZ7nzQSsdtZ2qbyAoze0tl+YrShJhOcmQBtFem omhWVeJ8T/Bw1KH8M1ihrENBTSzYzLvN18YjNP6P0Dh/7Zda5yYI8fNqd84K3Uq5xBiI0S6+ qxViw84z2tJj8TxiNqFAk7Tbeo2Ximtq7uQ9UnFRSK3jw96yi19KU9rQQZs0xUjN5gn/tF5l BZWKjwuZCkcOiI0EWHAR+ATAEsFNXcuoC9CAGK5HFW4nI4WtE3pv1KYvivlGtF1wzf0Qrhye RrmxABEBAAHCwV8EGAECAAkFAkp+xiUCGwwACgkQ+4ugndU5jymgKg//RvnI7zEDKv6nQUqK RyLawPTrCKCtQ2vSoWyTNgRB6byNS1w5wNSAMnqaESx2bdhauaxe167VEJYqgQy241yFslpC 6v/xlH25Ppos+Jg6AKaQG/JABHO6Co4tHtBbNmM+14HESxAodA4NJuEU19iIPjRhUKC8F8R9 xBmW1uLpPiljU9Km0P3EIKjAdtdZNeMLhwsbSHBwJROFrxFGiTzWNREWZoZpQxgSbHYhwYbx HEbJi1cybl9IQvSGHrysctZsxD04Jxh6ogaziiT8aV6ear6BNh008yRf61FvrinfG3USLR3i JO8aHap4QGCPjZ3cyT+DEq8/zVfDdeidTeNEhSgRKk856RcA+yAE79KYdKkvmDUiC8poAJ7F GEYHMB+g/1+LczCr2g9GYkiB/53boYfU9esYYlarxCgedCrwXv6T48FZ3xxoH3XJ2KV8K6M8 CUb04jj3kEeCwq+R6Bk2ZXrnMzyQmmn223X+Zp89B/gchH32JY8y3j7BICcoZmgMu62XNMgW I/hRgfi3JlVCne6XPj3/w00JYG7vo+eTJOflqYr3WRTPYh7DxzYtshZswHmmkZtwizUQUZzF 9dX2CM8nY7cKucEmtcnUpjGwXMOufa/DmCTlk8ggRZ0ukCUZOlIA4ILxp95sS2oqyucARv+p wMWvrqJ/LfbZexSsIjI= Organization: FreeBSD.org In-Reply-To: <20260525123145.GB2758@zxy.spb.ru> --------------tItyLYUh4cde86ScWF4tnazj Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: base64 SGVsbG8hDQoNCk9uIDI1LjA1LjIwMjYgMTU6MzEsIFNsYXdhIE9saG92Y2hlbmtvdiB3cm90 ZToNCj4gT24gU2F0LCBNYXkgMjMsIDIwMjYgYXQgMDk6MDU6NDlQTSArMDIwMCwgRGltaXRy eSBBbmRyaWMgd3JvdGU6DQo+IA0KPj4gT24gMjMgTWF5IDIwMjYsIGF0IDE2OjIzLCBTbGF3 YSBPbGhvdmNoZW5rb3YgPHNsd0B6eHkuc3BiLnJ1PiB3cm90ZToNCj4+Pg0KPj4+IE9uIEZy aSwgTWF5IDIyLCAyMDI2IGF0IDExOjQ3OjAxUE0gKzAyMDAsIERpbWl0cnkgQW5kcmljIHdy b3RlOg0KPj4+PiBPbiAyMiBNYXkgMjAyNiwgYXQgMTg6MzQsIFNsYXdhIE9saG92Y2hlbmtv diA8c2x3QHp4eS5zcGIucnU+IHdyb3RlOg0KPj4+Pj4NCj4+Pj4+IE9uIFNhdCwgQXByIDI1 LCAyMDI2IGF0IDAyOjE4OjU0UE0gKzAwMDAsIERpbWl0cnkgQW5kcmljIHdyb3RlOg0KPj4+ Pj4NCj4+Pj4+PiBUaGUgYnJhbmNoIG1haW4gaGFzIGJlZW4gdXBkYXRlZCBieSBkaW06DQo+ Pj4+Pj4NCj4+Pj4+PiBVUkw6IGh0dHBzOi8vY2dpdC5GcmVlQlNELm9yZy9zcmMvY29tbWl0 Lz9pZD03MDA2MzdjYmI1ZTU4Mjg2MTA2N2ExMWFhY2E0ZDA1MzU0Njg3MWQyDQo+Pj4+Pj4N Cj4+Pj4+PiBjb21taXQgNzAwNjM3Y2JiNWU1ODI4NjEwNjdhMTFhYWNhNGQwNTM1NDY4NzFk Mg0KPj4+Pj4+IE1lcmdlOiA2MjQzZDc1NWZiODIgM2Y3MDllNDJlM2JlDQo+Pj4+Pj4gQXV0 aG9yOiAgICAgRGltaXRyeSBBbmRyaWMgPGRpbUBGcmVlQlNELm9yZz4NCj4+Pj4+PiBBdXRo b3JEYXRlOiAyMDI1LTEyLTA3IDE1OjE1OjIyICswMDAwDQo+Pj4+Pj4gQ29tbWl0OiAgICAg RGltaXRyeSBBbmRyaWMgPGRpbUBGcmVlQlNELm9yZz4NCj4+Pj4+PiBDb21taXREYXRlOiAy MDI2LTA0LTI1IDE0OjA4OjU1ICswMDAwDQo+Pj4+Pj4NCj4+Pj4+PiAgICBNZXJnZSBsbHZt LXByb2plY3QgbWFpbiBsbHZtb3JnLTIxLWluaXQtMTkyODgtZ2ZhY2U5M2U3MjRmNA0KPj4+ Pj4+DQo+Pj4+Pj4gICAgVGhpcyB1cGRhdGVzIGxsdm0sIGNsYW5nLCBjb21waWxlci1ydCwg bGliYysrLCBsaWJ1bndpbmQsIGxsZCwgbGxkYiBhbmQNCj4+Pj4+PiAgICBvcGVubXAgdG8g bGx2bS1wcm9qZWN0IG1haW4gbGx2bW9yZy0yMS1pbml0LTE5Mjg4LWdmYWNlOTNlNzI0ZjQs IHRoZQ0KPj4+Pj4+ICAgIGxhc3QgY29tbWl0IGJlZm9yZSB0aGUgdXBzdHJlYW0gcmVsZWFz ZS8yMS54IGJyYW5jaCB3YXMgY3JlYXRlZC4NCj4+Pj4+Pg0KPj4+Pj4+ICAgIFBSOiAgICAg ICAgICAgICAyOTIwNjcNCj4+Pj4+PiAgICBNRkMgYWZ0ZXI6ICAgICAgMSBtb250aA0KPj4+ Pj4NCj4+Pj4+IFRoaXMgaXMgYnJva2UgYXQgbGVhc3QgZ3JhcGhpY3Mva3JpdGENCj4+Pj4+ IEkgbWVhbiBfX3R5cGVfdHJhaXRzL2lzX2ludGVncmFsLmggaXMgaW5jb3JyZWN0IG5vdzog dGVtcGxhdGUgPGNsYXNzDQo+Pj4+PiBfVHA+IHN0cnVjdCBfX2xpYmNwcF9pc19pbnRlZ3Jh bCBkZWZpbmVkIG9ubHkgZm9yDQo+Pj4+PiAhX19oYXNfYnVpbHRpbihfX2lzX2ludGVncmFs KQ0KPj4+Pg0KPj4+PiBQbGVhc2UgdHJ5IHRoZSBwYXRjaCBpbiA8aHR0cHM6Ly9idWdzLmZy ZWVic2Qub3JnLzI5NTUwOT4uDQo+Pj4NCj4+PiBGYWlsZWQNCj4+PiAlIGxzIC1sIC9wb3Vk cmllcmUvcG9ydHMvZGVmYXVsdC9ncmFwaGljcy9rcml0YS9maWxlcy8NCj4+PiB0b3RhbCA2 DQo+Pj4gLXJ3LXItLXItLSAgMSByb290IHdoZWVsICA1MjUgTWFyIDEwICAyMDI1IHBhdGNo LWNtYWtlX21vZHVsZXNfRmluZE9wZW5KUEVHLmNtYWtlDQo+Pj4gLXJ3LXItLXItLSAgMSBy b290IHdoZWVsICAzODQgTWFyIDEwICAyMDI1IHBhdGNoLWNtYWtlX21vZHVsZXNfcHlwcm9q ZWN0LnRvbWwuaW4NCj4+PiAtcnctci0tci0tICAxIHJvb3Qgd2hlZWwgMjg0MiBNYXkgMjMg MTc6MTMgcGF0Y2gtbGlic19nbG9iYWxfS2lzSGFsZlRyYWl0cy5oDQo+Pj4gLXJ3LXItLXIt LSAgMSByb290IHdoZWVsICA2MzkgTWFyIDEwICAyMDI1IHBhdGNoLXBsdWdpbnNfaW1wZXhf Q01ha2VMaXN0cy50eHQNCj4+Pg0KPj4+DQo+Pj4gSW4gZmlsZSBpbmNsdWRlZCBmcm9tIC93 cmtkaXJzL3Vzci9wb3J0cy9ncmFwaGljcy9rcml0YS93b3JrL2tyaXRhLTUuMi4xNC9saWJz L3BpZ21lbnQvS29Db2xvci5jcHA6OToNCj4+PiBJbiBmaWxlIGluY2x1ZGVkIGZyb20gL3dy a2RpcnMvdXNyL3BvcnRzL2dyYXBoaWNzL2tyaXRhL3dvcmsva3JpdGEtNS4yLjE0L2xpYnMv cGlnbWVudC9Lb0NvbG9yLmg6MTY6DQo+Pj4gSW4gZmlsZSBpbmNsdWRlZCBmcm9tIC93cmtk aXJzL3Vzci9wb3J0cy9ncmFwaGljcy9rcml0YS93b3JrL2tyaXRhLTUuMi4xNC9saWJzL3Bp Z21lbnQvS29Db2xvclNwYWNlVHJhaXRzLmg6MTQ6DQo+Pj4gSW4gZmlsZSBpbmNsdWRlZCBm cm9tIC93cmtkaXJzL3Vzci9wb3J0cy9ncmFwaGljcy9rcml0YS93b3JrL2tyaXRhLTUuMi4x NC9saWJzL3BpZ21lbnQvS29Db2xvclNwYWNlTWF0aHMuaDoxMDk6DQo+Pj4gL3dya2RpcnMv dXNyL3BvcnRzL2dyYXBoaWNzL2tyaXRhL3dvcmsva3JpdGEtNS4yLjE0L2xpYnMvZ2xvYmFs L0tpc0hhbGZUcmFpdHMuaDozMzoxMDogZXJyb3I6IG5vIHRlbXBsYXRlIG5hbWVkICdfX2xp YmNwcF9pc19pbnRlZ3JhbCc7IGRpZCB5b3UgbWVhbiAnX19saWJjcHBfaXNfZmluYWwnPw0K Pj4+ICAgIDMzIHwgICBzdHJ1Y3QgX19saWJjcHBfaXNfaW50ZWdyYWw8aGFsZj4NCj4+PiAg ICAgICB8ICAgICAgICAgIF5+fn5+fn5+fn5+fn5+fn5+fn5+DQo+Pj4gICAgICAgfCAgICAg ICAgICBfX2xpYmNwcF9pc19maW5hbA0KPj4NCj4+IFN0cmFuZ2UsIGl0IGJ1aWxkcyBqdXN0 IGZpbmUgZm9yIG1lLiBDYW4geW91IHBvc3QgdGhlIC93cmtkaXJzL3Vzci9wb3J0cy9ncmFw aGljcy9rcml0YS93b3JrL2tyaXRhLTUuMi4xNC9saWJzL2dsb2JhbC9LaXNIYWxmVHJhaXRz LmggZmlsZT8NCj4+DQo+IA0KPiBJIG1lYW4gcGF0aCBwcm9ibGVtcyBpbiBwYXRjaCBmaWxl Og0KPiAjIGZpbmQgL3dya2RpcnMvdXNyL3BvcnRzL2dyYXBoaWNzL2tyaXRhL3dvcmsvIC1u YW1lICIqS2lzSGFsZlRyYWl0cy5oKiIgLWxzDQo+ICAgMzY1ODEgICAgICAgIDIgLXJ3LXIt LXItLSAgICAxIHJvb3QgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdoZWVsICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgNDMwIE1heSAyNSAxMjoyMyAvd3JrZGlycy91 c3IvcG9ydHMvZ3JhcGhpY3Mva3JpdGEvd29yay9rcml0YS01LjIuMTQvYi9ncmFwaGljcy9r cml0YS9maWxlcy9wYXRjaC1saWJzX2dsb2JhbF9LaXNIYWxmVHJhaXRzLmgNCj4gICAzNjU4 OSAgICAgICAgMSAtcnctci0tci0tICAgIDEgcm9vdCAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgd2hlZWwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAgTWF5IDI1 IDEyOjIzIC93cmtkaXJzL3Vzci9wb3J0cy9ncmFwaGljcy9rcml0YS93b3JrL2tyaXRhLTUu Mi4xNC9iL2dyYXBoaWNzL2tyaXRhL2ZpbGVzL3BhdGNoLWxpYnNfZ2xvYmFsX0tpc0hhbGZU cmFpdHMuaC5vcmlnDQo+ICAgMzc5MjQgICAgICAgIDMgLXJ3LXItLXItLSAgICAxIHJvb3Qg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdoZWVsICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAxMjgzIERlYyAgOSAwOTo1NSAvd3JrZGlycy91c3IvcG9ydHMvZ3JhcGhp Y3Mva3JpdGEvd29yay9rcml0YS01LjIuMTQvbGlicy9nbG9iYWwvS2lzSGFsZlRyYWl0cy5o DQo+ICAgICANCj4gDQoNCkl0IGlzIGEgS3JpdGEgcHJvYmxlbSwgbm90IExMVk0NCg0KRml4 ZWQgaW4gaHR0cHM6Ly9jZ2l0LmZyZWVic2Qub3JnL3BvcnRzL2NvbW1pdC8/aWQ9NjJmZTlj MTI0NmU0YzdhNmFhODU2MjE5NDE5MDIyNzgyZmFiZGQ4YQ0KDQotLSANClNpbmNlcmVseSwN CkRpbWEgKGZsdWZmeUBGcmVlQlNELm9yZywgaHR0cHM6Ly90Lm1lL0ZsdWZmeUJTRCwgQGZs dWZmeTptYXRyaXgtZGV2LmZyZWVic2Qub3JnKQ0KKGRlc2t0b3AsIGtkZSwgeDExLCBvZmZp Y2UsIHBvcnRzLXNlY3RlYW0pQEZyZWVCU0QgdGVhbQ0KDQo= --------------tItyLYUh4cde86ScWF4tnazj-- --------------b7s47nzANLJQrInBXE4Y1fRu Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature.asc" -----BEGIN PGP SIGNATURE----- wsF5BAABCAAjFiEELTAsy5mEEwxvh7r8+4ugndU5jykFAmoUVQYFAwAAAAAACgkQ+4ugndU5jynw kBAA3TKw7hD86gWnLJYGI/WwMkgRdYNmqEv6W9sJMYOzcHYE1AtFmuTIRm6BumHXFxQFP8/Iv3Ua nvPs/WWdennbIJIt7A8/h3CG8uBmWXpBiIgmIZ2b/XTupPHIDI+8MuXdEZB3FUKhCsGfZ/iJ4bzz 7KNiHvmrTtEQsiKLuWKHr7SX2RDvBEsLHymqMxra2aownFEqRX502raxOOgHjLYmgfJazahXjpAw nkfNA5Unr2B1+wyUBc8+YDKK2ipxnxQAVMbc0lyCMOPS278WwEaXuugsbGvTRhMUEgE23PtUpr6x qJHZCkXH/UAIUpqc1YtfXkcSgy2n0JuGw+3UZ+bT1JXF1WIamiD1VBvuJ3TYL25HA7wHKTlVTuEO 51Hx+kIT5Mm1cEqKUy77j04QtWbMSOYQ4mB7XU9XNaZ+qi2jIeQC5RvwchY8ureXnTK4g5rxQQLa +snfrlvoTySq9D2jGKi8NEwkEagj1s5+TNi4E+3gDw7KHu/gbYWTZSn8pyi6r419Z0ehUGkt5dm4 ncn7l16/5r6dOa1dIMiL9pSwRKUiRjcyyX3KeVjbahEbX/OAvyi/BWZJtmAC+Hb7vozb2lTiK6D+ /CnPueYaSIoB6i2KS8sjuA/tNT++49AU+MVSAAPiX0sdgQ5rFUx3vumfE1YNzTjCr1mKYtgxogoP KII= =wFOh -----END PGP SIGNATURE----- --------------b7s47nzANLJQrInBXE4Y1fRu-- From nobody Mon May 25 15:15:48 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPKFw6wNfz6f7Gh for ; Mon, 25 May 2026 15:15: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPKFw4vDGz3mFQ for ; Mon, 25 May 2026 15:15:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779722148; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4dg2OVbcztdfvZtaqirG1tdyUAf4UcTaHBUW4NIBvT0=; b=dk4ioyrlySsDaMXnIhAEDxFRlDZszggeF+/6es9+k8zqY4Q4t4N9QPvW4BhgMMxHT3Q5Yv Htxuk6JeYxi7MtoOD1mXXnCTbjt9I8PwOnQe0qe54gqI1VYRO+1BlN5CazunPpaL9gIkP5 YOGrhmKyqoSF2BgY2xv4PNaycSCft5/yYfVieHv2FlAulLPQLKcEs6CZtvONLJxFsN0bvX J+xdLH2JKxNpVIC9z2w2TZUVOy6ryQxqe5Aq72W6WMuHzLpE8BTtYCLbwImNbf23y5G9xz YtVnNZf82niwoP07eTnKrO8q9Od3yKoAzgXMqiNvgnxsaJ1H9ZNspjFAvQFZ3w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779722148; a=rsa-sha256; cv=none; b=ERv2t6ZgPmrQbDgQ48k0b/Bxfa3kSmVkpRDui4MJgKlTGEVl+wOOBhNnfWSLbCMy9cziWO e5droqxD3b9Q6jaBR4z/nprqBTA3Ab+xVhzjdUaeWCmqJ1e0Y1h0raaEflVXzVSWojINaj STlzdqvEn2T8zDgTUAfGNXL3OXJOOsTtlmA/dSsVlZNu1v8xallngXK4SH6fdPwMAv8Q4p 6ezZ2HhvqmmyPnB5FwWzMSDEQB96gXCo4+i59pxSCa2X9OovTwbg78Xqh/QKFQT03UWwi1 k1nKo5bqnGKW7eTC2vsFa45FN2JG7leLjsqoDm2spT/BlLk9OofpHrEXKctoGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779722148; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4dg2OVbcztdfvZtaqirG1tdyUAf4UcTaHBUW4NIBvT0=; b=pjiHy9lhI7Ba/Ih/O3WuhLnuLIYLOOJk31Ced/eD3o/Ma9loGZX5Cyseh/w9fD0zziKx39 xWcM/90hzglY/sTGAJVpBZkMRKUaLd8t5oAd+Jh40Nd3/cjxOxXzSSLNyUycilAD/nBWXf z+JH5VdNQrdTRJEa0iAcjm7Tva0L+wiXmBg3qGRxranZ3LEoqscw/Ijt+sNVVx7RDuQVV0 KjU61JAL5bRIu+kV/pvYn0xGh+RLub1PnkE49pnE2Hs+Tui9ZZEeJlSUaUMxO2NES4Afw5 QQ3w+2UTcAYe+mqxRCHqFkqaEPs9ETTdr/5M9W39GDTVWMb+dM7+migpJ9LDvw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPKFw4RqLzn32 for ; Mon, 25 May 2026 15:15:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 23b4a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 25 May 2026 15:15:48 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 473ba783fa0f - stable/15 - if_vlan: Use the exclusive lock everywhere List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 473ba783fa0f2fcfff3fc00906bd76766c5ad71f Auto-Submitted: auto-generated Date: Mon, 25 May 2026 15:15:48 +0000 Message-Id: <6a1467a4.23b4a.678aae0@gitrepo.freebsd.org> The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=473ba783fa0f2fcfff3fc00906bd76766c5ad71f commit 473ba783fa0f2fcfff3fc00906bd76766c5ad71f Author: Mark Johnston AuthorDate: 2026-05-06 11:48:24 +0000 Commit: Mark Johnston CommitDate: 2026-05-25 15:15:39 +0000 if_vlan: Use the exclusive lock everywhere Running sys/net tests in parallel reveals some panics which look like the one below: ``` shared lock of (sx) vlan_sx @ /home/markj/sb/main/src/sys/net/if_vlan.c:2395 while exclusively locked from /home/markj/sb/main/src/sys/net/if_vlan.c:1850 panic: excl->share cpuid = 9 time = 1776467219 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe00d84e0780 vpanic() at vpanic+0x136/frame 0xfffffe00d84e08b0 panic() at panic+0x43/frame 0xfffffe00d84e0910 witness_checkorder() at witness_checkorder+0xdb1/frame 0xfffffe00d84e0ad0 _sx_slock_int() at _sx_slock_int+0x64/frame 0xfffffe00d84e0b10 vlan_ioctl() at vlan_ioctl+0x25c/frame 0xfffffe00d84e0b70 if_setflag() at if_setflag+0xdc/frame 0xfffffe00d84e0be0 ifpromisc() at ifpromisc+0x27/frame 0xfffffe00d84e0c00 vlan_setflags() at vlan_setflags+0x64/frame 0xfffffe00d84e0c30 vlan_unconfig_locked() at vlan_unconfig_locked+0xb7/frame 0xfffffe00d84e0c70 vlan_clone_destroy() at vlan_clone_destroy+0x5d/frame 0xfffffe00d84e0cb0 if_clone_destroyif_flags() at if_clone_destroyif_flags+0x8c/frame 0xfffffe00d84e0cf0 if_clone_detach() at if_clone_detach+0x106/frame 0xfffffe00d84e0d20 vnet_destroy() at vnet_destroy+0x154/frame 0xfffffe00d84e0d50 prison_deref() at prison_deref+0xaf5/frame 0xfffffe00d84e0dc0 sys_jail_remove() at sys_jail_remove+0x1a7/frame 0xfffffe00d84e0e00 amd64_syscall() at amd64_syscall+0x169/frame 0xfffffe00d84e0f30 fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe00d84e0f30 --- syscall (508, FreeBSD ELF64, jail_remove), rip = 0x25bd44705ca, rsp = 0x25bcfe72ab8, rbp = 0x25bcfe72b40 --- ``` All vlan interfaces are locked by a single recursive global lock. There are cases, like in the panic above where vlans are stacked on top of each other, where the driver tries to acquire an exclusive lock while holding a shared lock, and vice versa. With longer-term goals of making the networking regression test suites stable when run in parallel, and simplifying network control plane locking, which I find is quite complex and buggy, let's change if_vlan to use the exclusive lock everywhere. Reviewed by: pouria, zlei, kp, glebius MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D56778 (cherry picked from commit 486c2dfaa7b9ed1ed79662584c9b0f4fd0c23d67) --- sys/net/if_vlan.c | 134 +++++++++++++++++++++++++++--------------------------- 1 file changed, 66 insertions(+), 68 deletions(-) diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c index 61000018e5a4..5f03beac0b76 100644 --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -236,25 +236,15 @@ static eventhandler_tag ifevent_tag; * must be sleepable and also have safe concurrent access to a vlan interface. * Since the sx(9) exists, it is used by default in most paths unless sleeping * is not permitted, or if it is not clear whether sleeping is permitted. - * */ -#define _VLAN_SX_ID ifv_sx - -static struct sx _VLAN_SX_ID; - -#define VLAN_LOCKING_INIT() \ - sx_init_flags(&_VLAN_SX_ID, "vlan_sx", SX_RECURSE) +static struct sx vlan_sx; -#define VLAN_LOCKING_DESTROY() \ - sx_destroy(&_VLAN_SX_ID) - -#define VLAN_SLOCK() sx_slock(&_VLAN_SX_ID) -#define VLAN_SUNLOCK() sx_sunlock(&_VLAN_SX_ID) -#define VLAN_XLOCK() sx_xlock(&_VLAN_SX_ID) -#define VLAN_XUNLOCK() sx_xunlock(&_VLAN_SX_ID) -#define VLAN_SLOCK_ASSERT() sx_assert(&_VLAN_SX_ID, SA_SLOCKED) -#define VLAN_XLOCK_ASSERT() sx_assert(&_VLAN_SX_ID, SA_XLOCKED) -#define VLAN_SXLOCK_ASSERT() sx_assert(&_VLAN_SX_ID, SA_LOCKED) +#define VLAN_LOCK_INIT() \ + sx_init_flags(&vlan_sx, "vlan_sx", SX_RECURSE) +#define VLAN_LOCK_DESTROY() sx_destroy(&vlan_sx) +#define VLAN_LOCK() sx_xlock(&vlan_sx) +#define VLAN_UNLOCK() sx_xunlock(&vlan_sx) +#define VLAN_LOCK_ASSERT() sx_assert(&vlan_sx, SA_XLOCKED) /* * We also have a per-trunk mutex that should be acquired when changing @@ -262,9 +252,9 @@ static struct sx _VLAN_SX_ID; */ #define TRUNK_LOCK_INIT(trunk) mtx_init(&(trunk)->lock, vlanname, NULL, MTX_DEF) #define TRUNK_LOCK_DESTROY(trunk) mtx_destroy(&(trunk)->lock) -#define TRUNK_WLOCK(trunk) mtx_lock(&(trunk)->lock) -#define TRUNK_WUNLOCK(trunk) mtx_unlock(&(trunk)->lock) -#define TRUNK_WLOCK_ASSERT(trunk) mtx_assert(&(trunk)->lock, MA_OWNED); +#define TRUNK_LOCK(trunk) mtx_lock(&(trunk)->lock) +#define TRUNK_UNLOCK(trunk) mtx_unlock(&(trunk)->lock) +#define TRUNK_LOCK_ASSERT(trunk) mtx_assert(&(trunk)->lock, MA_OWNED) /* * The VLAN_ARRAY substitutes the dynamic hash with a static array @@ -434,7 +424,7 @@ vlan_inshash(struct ifvlantrunk *trunk, struct ifvlan *ifv) int i, b; struct ifvlan *ifv2; - VLAN_XLOCK_ASSERT(); + VLAN_LOCK_ASSERT(); KASSERT(trunk->hwidth > 0, ("%s: hwidth not positive", __func__)); b = 1 << trunk->hwidth; @@ -464,7 +454,7 @@ vlan_remhash(struct ifvlantrunk *trunk, struct ifvlan *ifv) int i, b; struct ifvlan *ifv2; - VLAN_XLOCK_ASSERT(); + VLAN_LOCK_ASSERT(); KASSERT(trunk->hwidth > 0, ("%s: hwidth not positive", __func__)); b = 1 << (trunk->hwidth - 1); @@ -492,7 +482,7 @@ vlan_growhash(struct ifvlantrunk *trunk, int howmuch) struct ifvlanhead *hash2; int hwidth2, i, j, n, n2; - VLAN_XLOCK_ASSERT(); + VLAN_LOCK_ASSERT(); KASSERT(trunk->hwidth > 0, ("%s: hwidth not positive", __func__)); if (howmuch == 0) { @@ -603,7 +593,7 @@ vlan_inithash(struct ifvlantrunk *trunk) static void trunk_destroy(struct ifvlantrunk *trunk) { - VLAN_XLOCK_ASSERT(); + VLAN_LOCK_ASSERT(); vlan_freehash(trunk); trunk->parent->if_vlantrunk = NULL; @@ -629,7 +619,7 @@ vlan_setmulti(struct ifnet *ifp) struct vlan_mc_entry *mc; int error; - VLAN_XLOCK_ASSERT(); + VLAN_LOCK_ASSERT(); /* Find the parent. */ sc = ifp->if_softc; @@ -693,11 +683,11 @@ vlan_ifevent(void *arg __unused, struct ifnet *ifp, int event) return; } - TRUNK_WLOCK(trunk); + TRUNK_LOCK(trunk); VLAN_FOREACH(ifv, trunk) { ifv->ifv_ifp->if_baudrate = ifp->if_baudrate; } - TRUNK_WUNLOCK(trunk); + TRUNK_UNLOCK(trunk); NET_EPOCH_EXIT(et); } @@ -728,7 +718,7 @@ vlan_iflladdr(void *arg __unused, struct ifnet *ifp) * We need an exclusive lock here to prevent concurrent SIOCSIFLLADDR * ioctl calls on the parent garbling the lladdr of the child vlan. */ - TRUNK_WLOCK(trunk); + TRUNK_LOCK(trunk); VLAN_FOREACH(ifv, trunk) { /* * Copy new new lladdr into the ifv_ifp, enqueue a task @@ -744,7 +734,7 @@ vlan_iflladdr(void *arg __unused, struct ifnet *ifp) sdl->sdl_alen = ifp->if_addrlen; taskqueue_enqueue(taskqueue_thread, &ifv->lladdr_task); } - TRUNK_WUNLOCK(trunk); + TRUNK_UNLOCK(trunk); NET_EPOCH_EXIT(et); } @@ -764,10 +754,10 @@ vlan_ifdetach(void *arg __unused, struct ifnet *ifp) /* If the ifnet is just being renamed, don't do anything. */ if (ifp->if_flags & IFF_RENAMING) return; - VLAN_XLOCK(); + VLAN_LOCK(); trunk = ifp->if_vlantrunk; if (trunk == NULL) { - VLAN_XUNLOCK(); + VLAN_UNLOCK(); return; } @@ -782,7 +772,7 @@ vlan_ifdetach(void *arg __unused, struct ifnet *ifp) /* Trunk should have been destroyed in vlan_unconfig(). */ KASSERT(ifp->if_vlantrunk == NULL, ("%s: purge failed", __func__)); - VLAN_XUNLOCK(); + VLAN_UNLOCK(); } /* @@ -919,7 +909,7 @@ vlan_modevent(module_t mod, int type, void *data) vlan_ifevent, NULL, EVENTHANDLER_PRI_ANY); if (ifevent_tag == NULL) return (ENOMEM); - VLAN_LOCKING_INIT(); + VLAN_LOCK_INIT(); vlan_input_p = vlan_input; vlan_link_state_p = vlan_link_state; vlan_trunk_cap_p = vlan_trunk_capabilities; @@ -957,7 +947,7 @@ vlan_modevent(module_t mod, int type, void *data) vlan_cookie_p = NULL; vlan_setcookie_p = NULL; vlan_devat_p = NULL; - VLAN_LOCKING_DESTROY(); + VLAN_LOCK_DESTROY(); if (bootverbose) printf("vlan: unloaded\n"); break; @@ -1341,17 +1331,25 @@ vlan_clone_modify_nl(struct ifnet *ifp, struct ifc_data_nl *ifd) static void vlan_clone_dump_nl(struct ifnet *ifp, struct nl_writer *nw) { + struct ifvlan *ifv; uint32_t parent_index = 0; uint16_t vlan_id = 0; uint16_t vlan_proto = 0; - VLAN_SLOCK(); - struct ifvlan *ifv = ifp->if_softc; + VLAN_LOCK(); + if (__predict_false((ifv = ifp->if_softc) == NULL)) { + VLAN_UNLOCK(); + /* + * XXXGL: the interface already went through if_dead(). This + * check to be removed when we got better interface removal. + */ + return; + } if (TRUNK(ifv) != NULL) parent_index = PARENT(ifv)->if_index; vlan_id = ifv->ifv_vid; vlan_proto = ifv->ifv_proto; - VLAN_SUNLOCK(); + VLAN_UNLOCK(); if (parent_index != 0) nlattr_add_u32(nw, IFLA_LINK, parent_index); @@ -1690,7 +1688,7 @@ vlan_config(struct ifvlan *ifv, struct ifnet *p, uint16_t vid, if (trunk->parent != p) return (EBUSY); - VLAN_XLOCK(); + VLAN_LOCK(); ifv->ifv_proto = proto; @@ -1714,17 +1712,17 @@ vlan_config(struct ifvlan *ifv, struct ifnet *p, uint16_t vid, goto done; } - VLAN_XLOCK(); + VLAN_LOCK(); if (p->if_vlantrunk == NULL) { trunk = malloc(sizeof(struct ifvlantrunk), M_VLAN, M_WAITOK | M_ZERO); vlan_inithash(trunk); TRUNK_LOCK_INIT(trunk); - TRUNK_WLOCK(trunk); + TRUNK_LOCK(trunk); p->if_vlantrunk = trunk; trunk->parent = p; if_ref(trunk->parent); - TRUNK_WUNLOCK(trunk); + TRUNK_UNLOCK(trunk); } else { trunk = p->if_vlantrunk; } @@ -1832,7 +1830,7 @@ vlan_config(struct ifvlan *ifv, struct ifnet *p, uint16_t vid, done: if (error == 0) EVENTHANDLER_INVOKE(vlan_config, p, ifv->ifv_vid); - VLAN_XUNLOCK(); + VLAN_UNLOCK(); return (error); } @@ -1841,9 +1839,9 @@ static void vlan_unconfig(struct ifnet *ifp) { - VLAN_XLOCK(); + VLAN_LOCK(); vlan_unconfig_locked(ifp, 0); - VLAN_XUNLOCK(); + VLAN_UNLOCK(); } static void @@ -1855,7 +1853,7 @@ vlan_unconfig_locked(struct ifnet *ifp, int departing) struct ifnet *parent; int error; - VLAN_XLOCK_ASSERT(); + VLAN_LOCK_ASSERT(); ifv = ifp->if_softc; trunk = ifv->ifv_trunk; @@ -1929,7 +1927,7 @@ vlan_setflag(struct ifnet *ifp, int flag, int status, struct ifvlan *ifv; int error; - VLAN_SXLOCK_ASSERT(); + VLAN_LOCK_ASSERT(); ifv = ifp->if_softc; status = status ? (ifp->if_flags & flag) : 0; @@ -1988,13 +1986,13 @@ vlan_link_state(struct ifnet *ifp) return; } - TRUNK_WLOCK(trunk); + TRUNK_LOCK(trunk); VLAN_FOREACH(ifv, trunk) { ifv->ifv_ifp->if_baudrate = trunk->parent->if_baudrate; if_link_state_change(ifv->ifv_ifp, trunk->parent->if_link_state); } - TRUNK_WUNLOCK(trunk); + TRUNK_UNLOCK(trunk); NET_EPOCH_EXIT(et); } @@ -2005,7 +2003,7 @@ vlan_link_state(struct ifnet *ifp) int error; \ \ ifv = ifp->if_softc; \ - VLAN_SLOCK(); \ + VLAN_LOCK(); \ if (TRUNK(ifv) != NULL) { \ p = PARENT(ifv); \ if_ref(p); \ @@ -2014,7 +2012,7 @@ vlan_link_state(struct ifnet *ifp) } else { \ error = ENXIO; \ } \ - VLAN_SUNLOCK(); \ + VLAN_UNLOCK(); \ return (error); @@ -2085,7 +2083,7 @@ vlan_capabilities(struct ifvlan *ifv) u_long hwa = 0; NET_EPOCH_ASSERT(); - VLAN_SXLOCK_ASSERT(); + VLAN_LOCK_ASSERT(); p = PARENT(ifv); ifp = ifv->ifv_ifp; @@ -2216,17 +2214,17 @@ vlan_trunk_capabilities(struct ifnet *ifp) struct ifvlantrunk *trunk; struct ifvlan *ifv; - VLAN_SLOCK(); + VLAN_LOCK(); trunk = ifp->if_vlantrunk; if (trunk == NULL) { - VLAN_SUNLOCK(); + VLAN_UNLOCK(); return; } NET_EPOCH_ENTER(et); VLAN_FOREACH(ifv, trunk) vlan_capabilities(ifv); NET_EPOCH_EXIT(et); - VLAN_SUNLOCK(); + VLAN_UNLOCK(); } static int @@ -2261,7 +2259,7 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) ifp->if_addrlen); break; case SIOCGIFMEDIA: - VLAN_SLOCK(); + VLAN_LOCK(); if (TRUNK(ifv) != NULL) { p = PARENT(ifv); if_ref(p); @@ -2282,7 +2280,7 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) } else { error = EINVAL; } - VLAN_SUNLOCK(); + VLAN_UNLOCK(); break; case SIOCSIFMEDIA: @@ -2293,10 +2291,10 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) /* * Set the interface MTU. */ - VLAN_SLOCK(); + VLAN_LOCK(); trunk = TRUNK(ifv); if (trunk != NULL) { - TRUNK_WLOCK(trunk); + TRUNK_LOCK(trunk); if (ifr->ifr_mtu > (PARENT(ifv)->if_mtu - ifv->ifv_mtufudge) || ifr->ifr_mtu < @@ -2304,10 +2302,10 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) error = EINVAL; else ifp->if_mtu = ifr->ifr_mtu; - TRUNK_WUNLOCK(trunk); + TRUNK_UNLOCK(trunk); } else error = EINVAL; - VLAN_SUNLOCK(); + VLAN_UNLOCK(); break; case SIOCSETVLAN: @@ -2370,14 +2368,14 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) } #endif bzero(&vlr, sizeof(vlr)); - VLAN_SLOCK(); + VLAN_LOCK(); if (TRUNK(ifv) != NULL) { strlcpy(vlr.vlr_parent, PARENT(ifv)->if_xname, sizeof(vlr.vlr_parent)); vlr.vlr_tag = ifv->ifv_vid; vlr.vlr_proto = ifv->ifv_proto; } - VLAN_SUNLOCK(); + VLAN_UNLOCK(); error = copyout(&vlr, ifr_data_get_ptr(ifr), sizeof(vlr)); break; @@ -2386,10 +2384,10 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) * We should propagate selected flags to the parent, * e.g., promiscuous mode. */ - VLAN_SLOCK(); + VLAN_LOCK(); if (TRUNK(ifv) != NULL) error = vlan_setflags(ifp, 1); - VLAN_SUNLOCK(); + VLAN_UNLOCK(); break; case SIOCADDMULTI: @@ -2401,11 +2399,11 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) * XXX We need the rmlock here to avoid sleeping while * holding in6_multi_mtx. */ - VLAN_XLOCK(); + VLAN_LOCK(); trunk = TRUNK(ifv); if (trunk != NULL) error = vlan_setmulti(ifp); - VLAN_XUNLOCK(); + VLAN_UNLOCK(); break; case SIOCGVLANPCP: @@ -2439,7 +2437,7 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) break; case SIOCSIFCAP: - VLAN_SLOCK(); + VLAN_LOCK(); ifv->ifv_capenable = ifr->ifr_reqcap; trunk = TRUNK(ifv); if (trunk != NULL) { @@ -2449,7 +2447,7 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) vlan_capabilities(ifv); NET_EPOCH_EXIT(et); } - VLAN_SUNLOCK(); + VLAN_UNLOCK(); break; default: From nobody Mon May 25 15:15:49 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPKFy0ZN7z6f79x for ; Mon, 25 May 2026 15:15:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPKFx5ZnLz3mFS for ; Mon, 25 May 2026 15:15:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779722149; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JKVWVicvBw/MgXclmy+j3eI4x6hXRDN9JXPymY2dByU=; b=x3+FOxdm23DDW/I/Dl8jKmiXuyx9bdZNpzoMWvNdlq3UeWNHW8w9fdNrP95zGl9GGGnFeV qVqwwrnJPgF7ILAIjBlq2SYSZrYTknepcMxlrSrREycYaqwGS0xiSYdUdLHg8d2y8+ZPEf MgpkxuanmmnDji6H5cPxbKA0/pqqsyvU/M3z4nXrtLQisrwRwGGvtcQi1bky/UkEDfRHGw hp1sF+mSwfGjDAI9XwFSX9TZ15qQSasBDNwbYmoNb9JDXITGcC+P8qFwNOMysXip+p5364 ca8N17NF2TexEi8XpcetlnM3vvTdhgkgFhI/1/l0IrN7A/5TNzDisniq1lD21A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779722149; a=rsa-sha256; cv=none; b=kDUue0GEZ4Hc494dYlwaPKB8yaO5V342HkR7eXS1HCZgjR5uUQsCBLlsvynjiHqezQQRx9 4z4fCO9K4rq2PrKROWPnjaJxcl6BxM7pBT2BjfbknfU8Q+CSPf2QfWGGP67itVwg2krxq3 Hb1OTc4mX4C+WtqGlXmnWryG6YivSzsTS7yV7GMy0PAJ+GanbOA91kwPJmT8WH63DnZ0tA VT0JumrYJtN5gyy5V/5N2Qvva5xR8kC966wltyCmFApTrDFyz5I5IT1zK+RHRthbdncoq+ TZcBb2yJgbvt5v3HSPFeVZNI3fjni4GHqlqPeCAtDB1UaxkYQeOfjhe72IGBUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779722149; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JKVWVicvBw/MgXclmy+j3eI4x6hXRDN9JXPymY2dByU=; b=W8VTh4T3CnaKuN+d18loAUAx/o3AkQrxw+WujSCYDM6d7zlr/E//nU4PrtZ5VChD+vhOm7 ZQ+PrhDSJ9blZLfKJ122TcReQZI1/C8STsQMUfO0UnvvmNwqa6Mh9I/4MUyNkFauY3CqHZ CG0GTQ+SdSukqHnRPbZL1CZnKAmnUUPIOvIYB35WXY7pSgyJ3KGA+0pqNlJQOBK0jkB76N RRnSNpdNk+h9titQzfoJRtwMLpxvLfxLkx5Z/8oUD9i3b9kXjyrA5I1GWouCaKjNLp0hQz 5KLmc8hZwOXlH1RztoknabgrU64+SGy1KwsmvYD5Ir0ukBtlQ3orB+oh5AUU8g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPKFx4z8jzmWD for ; Mon, 25 May 2026 15:15:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 23039 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 25 May 2026 15:15:49 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: deea28af8dce - stable/15 - amd64/vmm: Fix ppt_unmap_mmio() after commit 36b855f18925 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: deea28af8dced91b7aa50dadc28ec47ca3f1d478 Auto-Submitted: auto-generated Date: Mon, 25 May 2026 15:15:49 +0000 Message-Id: <6a1467a5.23039.3f4f49ba@gitrepo.freebsd.org> The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=deea28af8dced91b7aa50dadc28ec47ca3f1d478 commit deea28af8dced91b7aa50dadc28ec47ca3f1d478 Author: Mark Johnston AuthorDate: 2026-05-22 22:18:05 +0000 Commit: Mark Johnston CommitDate: 2026-05-25 15:15:39 +0000 amd64/vmm: Fix ppt_unmap_mmio() after commit 36b855f18925 Fixes: 36b855f18925 ("amd64/vmm: Lock global PCI passthrough structures") MFC after: 3 days Reported by: bz (cherry picked from commit b133353310920aa823b1b5f83a308d0762f3bba3) --- sys/amd64/vmm/io/ppt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/amd64/vmm/io/ppt.c b/sys/amd64/vmm/io/ppt.c index b522e18e3b24..162f26796b33 100644 --- a/sys/amd64/vmm/io/ppt.c +++ b/sys/amd64/vmm/io/ppt.c @@ -577,7 +577,7 @@ ppt_unmap_mmio(struct vm *vm, int bus, int slot, int func, } out: PPT_UNLOCK(); - return (ENOENT); + return (error); } static int From nobody Mon May 25 15:15:47 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPKG11ZsYz6f6xC for ; Mon, 25 May 2026 15:15: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPKG06jtxz3m4w for ; Mon, 25 May 2026 15:15:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779722153; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F/mzrzZZFpnKcYnqTj0CIAH+wF4xA7JLLj5bRFS+tK8=; b=iPEpaXJBOayrJYKb0QBHVS0bFwG6R3dvTiDrYZjgEAzJixPhYcBGF5rhyFBvq4Y169g7mg DoLT8hJ0h2BrBafnETBOb/6kIijLb1pFg4vYyUNwffYuzQcxaHSfZd9wx/GHX/Ryio0J/0 pRwlrV8zizqnChcFAV8afDz09Hub3I2rkDEnEBj/l7M13IlcZtGg+t+QWZikCFthtCXGyL im31JuIoQ6JJdtUkXlh0S2/h5jZbvjtU5sH77fEPFwcmAayuHXql0AbuBBP/YhtlxF0RmL ycKrIgUno+YvtRe++JrYsKBdTBfbD7OjPNOi/ggnchN3sVJlPD5IKbrs4JaQuw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779722153; a=rsa-sha256; cv=none; b=Ky9fIWxIqKTS1foDTfMtO/opWS99SRLjKnkxWZfCzjHsRc7KFAadp0TUw7L3u73liADjqE gYWzFsgU6nR8ZDCVPMvjjgx35jU/z60c+/YKo7Bp/cN4pQkR/fo5N+8Pj7Nzs6HArHsi0y xvmxJuQRjHIAO+Q2H+Nddf3PMdzb1ySNhFqmwwieXiJL8U7iL9ejMKcD10aFM6Xdu5vpmN hmWR3ctZYUBPVTVC8DimQYsuBodfOJLQsC/GzTnJg7HbQJ06Ifa0X6rROIWkmtBtXkQsoP xknJ3O0nXm3xofAL2qnwYGPkHemeLXfRsSR0zr22kI+qz6zHuPQGS49EFS2q9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779722153; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F/mzrzZZFpnKcYnqTj0CIAH+wF4xA7JLLj5bRFS+tK8=; b=IIQFWICmi0pm8fk0A/mru884X1noRA6lzn+paKY0iuH3K7lM3eu031Gwle9rDizbYi++TZ TL//nyPFHPxqHu3nz7plA70Il2BGeNZXJRLec2Sbgw94OpQLpBpTHFQ8jrHA3hq+GR3+iI hLGFxG6IzQhH/NG3oKe/dsjHJUnPMSiWzTHf/m6W0AEBGAxvmRl98uEv+pULPjkfdvnlVd G9wLRulFYIzJvsAr/x9Te2Lf9XJ6dcw9bkgmiBymvAv5LnNZAlz8bPPW/qh6L9W9pNNP7d 5FCeU/G11ph/GAi2cyILTwC3PaKmtuFEn0t4xTwfnEsSt1ravEIeUJDF1b3WCA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPKG05plWzn34 for ; Mon, 25 May 2026 15:15:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2226e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 25 May 2026 15:15:47 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: bc70af0acdda - stable/15 - eventhandler: Fix a race when pruning eventhandlers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: bc70af0acdda8e9e2a2b21ccc9870f874d803408 Auto-Submitted: auto-generated Date: Mon, 25 May 2026 15:15:47 +0000 Message-Id: <6a1467a3.2226e.53f7bc19@gitrepo.freebsd.org> The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=bc70af0acdda8e9e2a2b21ccc9870f874d803408 commit bc70af0acdda8e9e2a2b21ccc9870f874d803408 Author: Mark Johnston AuthorDate: 2026-05-06 11:48:05 +0000 Commit: Mark Johnston CommitDate: 2026-05-25 15:15:39 +0000 eventhandler: Fix a race when pruning eventhandlers By default, eventhandler_deregister() blocks until it reaches some point where no threads are invoking the event. At this point, it knows that 1) no threads are currently executing the handler, 2) some thread has freed the eventhandler structure by virtue of having called eventhandler_prune_list(), so it is safe to return. Suppose a thread is trying to deregister an event handler. A different thread prunes it, and wakes up the first thread. Before the first thread runs, a third thread grabs the event handler lock, and starts executing handlers. The first thread observes el_runcount > 0, and goes back to sleep. The third thread sees no event handlers to prune, and doesn't wake up the first thread, which sleeps forever. This change fixes the race and tries to make eventhandler_invoke() more efficient: keep a count of the number of dead list entries and only prune the list if there is at least one dead entry. Also, in eventhandler_deregister(), we only need to sleep if some dead entries are present, rather than sleeping whenever some thread is running handlers. Reviewed by: kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D56767 (cherry picked from commit 735b16d490aee158beb54c415b716475a0d19cda) --- sys/kern/subr_eventhandler.c | 18 ++++++++++++++---- sys/sys/eventhandler.h | 4 ++-- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/sys/kern/subr_eventhandler.c b/sys/kern/subr_eventhandler.c index 7568101dabd2..e91647648995 100644 --- a/sys/kern/subr_eventhandler.c +++ b/sys/kern/subr_eventhandler.c @@ -198,7 +198,10 @@ _eventhandler_deregister(struct eventhandler_list *list, eventhandler_tag tag, } else { CTR3(KTR_EVH, "%s: marking item %p from \"%s\" as dead", __func__, ep, list->el_name); + KASSERT(ep->ee_priority != EHE_DEAD_PRIORITY, + ("%s: handler for %s is dead", __func__, list->el_name)); ep->ee_priority = EHE_DEAD_PRIORITY; + list->el_deadcount++; } } else { /* remove entire list */ @@ -213,11 +216,15 @@ _eventhandler_deregister(struct eventhandler_list *list, eventhandler_tag tag, } else { CTR2(KTR_EVH, "%s: marking all items from \"%s\" as dead", __func__, list->el_name); - TAILQ_FOREACH(ep, &list->el_entries, ee_link) + TAILQ_FOREACH(ep, &list->el_entries, ee_link) { + KASSERT(ep->ee_priority != EHE_DEAD_PRIORITY, + ("%s: handler for %s is dead", __func__, list->el_name)); ep->ee_priority = EHE_DEAD_PRIORITY; + list->el_deadcount++; + } } } - while (wait && list->el_runcount > 0) + while (wait && list->el_deadcount > 0) mtx_sleep(list, &list->el_lock, 0, "evhrm", 0); EHL_UNLOCK(list); } @@ -292,8 +299,11 @@ eventhandler_prune_list(struct eventhandler_list *list) pruned++; } } - if (pruned > 0) - wakeup(list); + KASSERT(pruned == list->el_deadcount, + ("%s: pruned %u entries from \"%s\" but expected %u", + __func__, pruned, list->el_name, list->el_deadcount)); + list->el_deadcount = 0; + wakeup(list); } /* diff --git a/sys/sys/eventhandler.h b/sys/sys/eventhandler.h index c0d9811dd1b9..2ed71ad1fa98 100644 --- a/sys/sys/eventhandler.h +++ b/sys/sys/eventhandler.h @@ -45,7 +45,7 @@ struct eventhandler_entry_vimage { struct eventhandler_list { char *el_name; - int el_flags; /* Unused. */ + u_int el_deadcount; u_int el_runcount; struct mtx el_lock; TAILQ_ENTRY(eventhandler_list) el_link; @@ -81,7 +81,7 @@ struct eventhandler_list { KASSERT((list)->el_runcount > 0, \ ("eventhandler_invoke: runcount underflow")); \ (list)->el_runcount--; \ - if ((list)->el_runcount == 0) \ + if ((list)->el_runcount == 0 && (list)->el_deadcount != 0) \ eventhandler_prune_list(list); \ EHL_UNLOCK((list)); \ } while (0) From nobody Mon May 25 15:58:22 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPLC818qgz6fRkl for ; Mon, 25 May 2026 15:58: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPLC7668hz3tys for ; Mon, 25 May 2026 15:58:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779724707; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oXib9n99ooEYVzhPbtSG4HedBEwpRkUGu2DouwE2dO0=; b=JBfErQtINqB9cAhHehgkCrnTyAQPtWRThIor6zWEqEnY+Li+eAWYigc122inbcwbp/un5H FHHZKmFGzW/+xyFzM+KZjYY4xUG6ByyAusy8dcEFgj5q9qn3UlohcyzjgAa6aC8EkKyZGv U/hDGArwzyw8p7IKfHeDHgEdaqaE69U4shy3mf2ivOYwm7UkTAZL6jfDUNWf4J3giTBusX fKSiItHd3HrasC19MAb5ZBjn9d3NPw0MbS6cgi+c9jcMXhbTAthsTNDETfRqHPkDrCAxJ1 9vLoSMdzqmw81qePM5XuUr+RKkZiplVtQnT1KDSOR1GvWgtt89JOgam4oj0i+A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779724707; a=rsa-sha256; cv=none; b=Tvi1iAdlONrs2eH4prjz8gZijOh3AOJqkjiEFynkWJsX8fPFdONyb1G342d0XPpFVqFWXh TMrCvTmZlLrEDywh5dQHFnbliRiZbSAnvHW7u9yKGVaWp/FtV+OmndxLZ+jPN0rbphbAzW TAni9l6lGpc8WZX+Gvm3X4/Q1MJsCe4HpKD6CSyxujnUo4oNyZgDSgj5UZOczdCR+S3DdB s0amzWQvIERK4VDnd5xfVqQX8mIytQ4hjXeVP+545BGTpMYM6wydMdDzmZ8JYL+vApxF/G GV7UiMFJHDr7ZZkh6wC0BRfSLOqddr0xximvLmTQLjRaR2ShgZodhR3CBMVAfw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779724707; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oXib9n99ooEYVzhPbtSG4HedBEwpRkUGu2DouwE2dO0=; b=YmvK3otXPhibcjm8kBcaNE2vY/1NX3/7Xlp200Pj6YTc6hOiL0tT/WAQOqfklcBX+3WTei JNRhLrvPtxm9f+QNpO1RoCz3ZwRNV11A284EIxQYTTx1NDBOP0N7MhcdfmksgoNdVpLkCm rNA7eiurXgB/e+SiVd5PV3tXyvf0rWhIUeD8yv4yX6LoPludWwEUhdV1Qn4jmGzfZMzOQQ yv9/0ysBcBbPmWPNbIqJzIIYDgiOEPMh33qx+QCAN5Wq70ODL3BKpLa/w/qbE/gApd0wnV pL+UaAJ64KQNdZYYaNxNkkIHBr8Syrbf7B7w22H6I+IA3BPZznzf1Fa6UjBw+Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPLC758dGzpNT for ; Mon, 25 May 2026 15:58:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26efa by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 25 May 2026 15:58:22 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 151f0971eaa7 - stable/15 - eventhandler: Fix the NODEBUG build List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 151f0971eaa70db86e22e8c201f05ae3f4d3bd58 Auto-Submitted: auto-generated Date: Mon, 25 May 2026 15:58:22 +0000 Message-Id: <6a14719e.26efa.7bebe228@gitrepo.freebsd.org> The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=151f0971eaa70db86e22e8c201f05ae3f4d3bd58 commit 151f0971eaa70db86e22e8c201f05ae3f4d3bd58 Author: Mark Johnston AuthorDate: 2026-05-06 14:39:52 +0000 Commit: Mark Johnston CommitDate: 2026-05-25 15:58:17 +0000 eventhandler: Fix the NODEBUG build Reported by: Michael Butler Fixes: 735b16d490ae ("eventhandler: Fix a race when pruning eventhandlers") (cherry picked from commit 3d8928114c4fec6cefbb1cd566ef8d1b3d2999e2) --- sys/kern/subr_eventhandler.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/kern/subr_eventhandler.c b/sys/kern/subr_eventhandler.c index e91647648995..ccc62253d81e 100644 --- a/sys/kern/subr_eventhandler.c +++ b/sys/kern/subr_eventhandler.c @@ -288,10 +288,12 @@ void eventhandler_prune_list(struct eventhandler_list *list) { struct eventhandler_entry *ep, *en; - int pruned = 0; + int pruned __diagused; CTR2(KTR_EVH, "%s: pruning list \"%s\"", __func__, list->el_name); EHL_LOCK_ASSERT(list, MA_OWNED); + + pruned = 0; TAILQ_FOREACH_SAFE(ep, &list->el_entries, ee_link, en) { if (ep->ee_priority == EHE_DEAD_PRIORITY) { TAILQ_REMOVE(&list->el_entries, ep, ee_link); From nobody Mon May 25 16:37:23 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPM436hzCz6fVs1 for ; Mon, 25 May 2026 16:37: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPM433dGFz3xrZ for ; Mon, 25 May 2026 16:37:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779727043; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9mshdmF0mnGRfYbiHCyiaE1FBJdrqfKzDE741JYVotY=; b=pc1oOG2I6W6lcm/JtzCP4R63jANuIW0KJBFr75b++tqbL74D1OYVkYccmSvkcvQduAeaqY W3ZGhJlZsU9qKf6hlyrP9v97ieCXlcCuz/CgGQa+iMshCXBujYPkKkupTLFuVbVw5T+buB l3xC56RyKJFiAiSGhQZrztnfz+q5XqDcKClnxWaAcsvSPgO7g2IEsh5/emvtYat5XghutI 72+r1wmp7sPDWBNH5Z/IwBtMwjaQgoM4CHDRI0FuHQ08XS0Bz+AWLrEy+pfbbCF9/aXEpb OykqaioE1KaBrBEOHz0CuWxxM/W1MjMrzv0S3ol8S5DTiEKhWOB/oCc3yIp9JA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779727043; a=rsa-sha256; cv=none; b=YRzpjTY/WL1s1XjJ8OyfGUBwxCbWRLgaYFjL7JYhbGoDHpMELqkT41+wf/04WYCXl7uGZY 8rc4Mru2MeBPuivDNm56RyMNM1oyWXFO/Zd7+hofUgJaKWtVg+cUWqAW7E1JEtGBbKVeyW 6U3vf5n2E1+X8ZRGmb8vtcEUCVmS2//Hs9II8DXhZSTnNxzj6QhlHwn10Qu+p9Mj9R9swf 8STAortXOoPGFezdF2+jeOqtW4wYllOzmkFjO0+9JKyP9GMr5hlg8o93bA+MgauaMbDn3Z GPr4zwrx2cz1QyzWdCwSRh+PxSzQMyzwJHG3DXaTYF7F3q7AFrsJb49sANMVTA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779727043; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9mshdmF0mnGRfYbiHCyiaE1FBJdrqfKzDE741JYVotY=; b=Wjj0NoK1jmy5vUdrg00glY0+/gp9r3haSg8emznFMBIUgzQ7ul9CWa5h84w+q1va8/n09b nX/+PAl9PpPvpEEJ7BEtnBwIrU2N5D6gzURrklWLpMxDoIQRIZVt+oEk7flcB10x/oC6yb DEi4ZvfPvO2U21qphWMSrhnJw4prgMluVdUYgj3b9eAcsbxS+XwmWS1eM25NSfFDDqojII DQAT92yWgrWUEZCTpQzBlQ4JgJoQ+T91ewrzHB9lpcIhJfwAz52DgzYGUdeXm4qumIfroL +42YvHDEyiGVIm1eQQRtyYt++z1h9Ryo7KnrNUgTM1CaNlbPGOjtjNJiGpmouA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPM432xn6zqR8 for ; Mon, 25 May 2026 16:37:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33b96 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 25 May 2026 16:37:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 33acf0f26b49 - main - netlink: Fix RTM_GETROUTE loop for RT_TABLE_UNSPEC List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 33acf0f26b490ea4887d820a3f45c56e3913a17d Auto-Submitted: auto-generated Date: Mon, 25 May 2026 16:37:23 +0000 Message-Id: <6a147ac3.33b96.68516d26@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=33acf0f26b490ea4887d820a3f45c56e3913a17d commit 33acf0f26b490ea4887d820a3f45c56e3913a17d Author: Ed Maste AuthorDate: 2026-05-22 14:27:53 +0000 Commit: Ed Maste CommitDate: 2026-05-25 16:37:12 +0000 netlink: Fix RTM_GETROUTE loop for RT_TABLE_UNSPEC Reviewed by: bz, pouria Fixes: 7e5bf68495cc ("netlink: add netlink support") Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57234 --- sys/netlink/route/rt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netlink/route/rt.c b/sys/netlink/route/rt.c index 8159409c9f67..ee17737426ed 100644 --- a/sys/netlink/route/rt.c +++ b/sys/netlink/route/rt.c @@ -726,7 +726,7 @@ handle_rtm_dump(struct nlpcb *nlp, uint32_t fibnum, int family, if (fibnum == RT_TABLE_UNSPEC) { for (int i = 0; i < V_rt_numfibs; i++) { - dump_rtable_fib(&wa, fibnum, family); + dump_rtable_fib(&wa, i, family); if (wa.error != 0) break; } From nobody Mon May 25 17:03:02 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPMdf5rvnz6fY1x for ; Mon, 25 May 2026 17:03: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPMdf3tKjz449p for ; Mon, 25 May 2026 17: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=1779728582; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XxCm2fwCMceJrHFxxL6NJOHvvZZ0CSmwIZ0WRaSH1jg=; b=TtJkFRBnOJqp8d5iK8vg03KaFFvhx/gXdGW2wpgZEC71fCSzByDsjI46ieGLcYqszYdFHg lZFojsLtu/e1Pox3dH35yVqLsNghOoM3awh58BvLYp/sxTL6mguhBEDXs0or0GOlWIHCcr R/+qmVGlKL57Berl2xh5Pg7/fj8FjC28RQF37SkqI3trin+cb2TSMVTNt+0x1RYXnBw08S l9CWRQHuSb0PzJApbk1JPxR5VnTAU/gAK6yyFAPIwkQp6YnqrjnMnpPLnuglIfHMeVzBuQ PcWX7BiwpKtSC8EmnLc/K6guvQF16+2sBo25UVty7So60ViOj/9XQhUwC1P+TQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779728582; a=rsa-sha256; cv=none; b=UVJ/N90lxNdxJ5fkgqy0k67D/+Nt4cCzH25W3q02TyI0vRsWa537AOXpj/VxyxfhU9VFjx LYkOH75/W7CjWxyl7+CaMV41nXGl/ZD9sd3Qokp/+cg19c5+9IXQprnn3ys+VLfU0I/coP xNPSa7qYoRIorW8/7d6jii2FyLUASFZyXejJ0aqkzdQbuGO39h+b9ZvHDiaIwRJAlsmilP XG7+Wn5H2zsrve5NYgWfjy3MMcWGA57rZfZBrYrrs52ZwwLT2uPwSlMflU+Rm/DIZohgC7 iehGd95TRpd30n3AdoC2DynChxDUtypG5hJuVyy4Z9jBCmrOHxA3ov6h+kd2BQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779728582; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XxCm2fwCMceJrHFxxL6NJOHvvZZ0CSmwIZ0WRaSH1jg=; b=rMXExxW4xOM2muIGCFnlyyb4sEbmWePtBT1uR81QItjfGxseK2Cw9E35a0RM9h/MLnpvSs wTLVu6s48SVzyf37+39NctQ2IvkH4+vbxxHRvOa4yPBC3i6G6eaNOyhi4QjHdJiRSERSU8 bQWRUmZFIneRVRivJW7V0FXRTbUSJvOSHh8NFThVCz5hb4PsOCDrkTKVUb3/cWAsH8Jc3C Ugi/sFz0VqL3YdScqk8gj/kYtKtx+OQRH60a7KUcWaBYRtaTkc/NuZ/Vp8XpKs2TMQ6AEn bXn3NEbvqC4RfwbkCxm6EUufXRZKnzOsP9/S0wH6gmSRbCKYpT6aQdSVnYb/Kg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPMdf3FWkzr9p for ; Mon, 25 May 2026 17:03:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 37b13 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 25 May 2026 17:03:02 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 05e8f2bf0906 - main - ttymsg: Overhaul List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 05e8f2bf0906875e666469e0338f922d1113d034 Auto-Submitted: auto-generated Date: Mon, 25 May 2026 17:03:02 +0000 Message-Id: <6a1480c6.37b13.546d11ae@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=05e8f2bf0906875e666469e0338f922d1113d034 commit 05e8f2bf0906875e666469e0338f922d1113d034 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-25 16:51:23 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-25 16:52:15 +0000 ttymsg: Overhaul * Instead of an error string, return the usual 0 or -1 and let the caller figure out what, if anything, to tell the user. * Avoid string manipulations by opening /dev first and using openat() with O_RESOLVE_BENEATH. * Add a boolean argument which, if false, causes ttymsg() to return without sending the message if the tty's group-writable bit is not set. This saves programs that respect this setting (like syslogd(8)) from having to check before calling ttymsg(). * Update all callers. The observable effect of this change is minimal except for slightly different error messages when ttymsg() fails. However, syslogd(8) will no longer print spurious error messages on the console after trying and failing to write a log message to an X11 session. PR: 295171 MFC after: 1 week Reviewed by: jfree, markj Differential Revision: https://reviews.freebsd.org/D57018 --- libexec/talkd/announce.c | 3 +- usr.bin/wall/ttymsg.c | 120 ++++++++++++++++++++----------------- usr.bin/wall/ttymsg.h | 2 +- usr.bin/wall/wall.c | 6 +- usr.sbin/syslogd/syslogd.c | 47 ++++----------- usr.sbin/syslogd/syslogd_cap.c | 2 +- usr.sbin/syslogd/syslogd_cap.h | 8 +-- usr.sbin/syslogd/syslogd_cap_log.c | 58 +++++++----------- 8 files changed, 106 insertions(+), 140 deletions(-) diff --git a/libexec/talkd/announce.c b/libexec/talkd/announce.c index 80c663ba48b4..cfe8b4eae65e 100644 --- a/libexec/talkd/announce.c +++ b/libexec/talkd/announce.c @@ -40,6 +40,7 @@ #include #include +#include #include #include #include @@ -152,7 +153,7 @@ print_mesg(const char *tty, CTL_MSG *request, * stack up processes trying to write messages to a tty * that is permanently blocked. */ - if (ttymsg(&iovec, 1, tty, RING_WAIT - 5) != NULL) + if (ttymsg(&iovec, 1, tty, RING_WAIT - 5, true) != 0) return (FAILED); return (SUCCESS); diff --git a/usr.bin/wall/ttymsg.c b/usr.bin/wall/ttymsg.c index 4f1c367c505f..3eee72d6805b 100644 --- a/usr.bin/wall/ttymsg.c +++ b/usr.bin/wall/ttymsg.c @@ -29,15 +29,16 @@ * SUCH DAMAGE. */ - - #include +#include #include + #include #include #include #include #include +#include #include #include #include @@ -46,65 +47,72 @@ #include "ttymsg.h" /* - * Display the contents of a uio structure on a terminal. Used by wall(1), - * syslogd(8), and talkd(8). Forks and finishes in child if write would block, - * waiting up to tmout seconds. Returns pointer to error string on unexpected - * error; string is not newline-terminated. Various "normal" errors are - * ignored (exclusive-use, lack of permission, etc.). + * Display the contents of a uio structure on a terminal. If shout is + * non-zero, do so even if the terminal has messages disabled. Used by + * wall(1), syslogd(8), and talkd(8). Forks and finishes in child if + * write would block, waiting up to timeout seconds. Various "normal" + * errors are ignored (exclusive-use, lack of permission, etc.). */ -const char * -ttymsg(struct iovec *iov, int iovcnt, const char *line, int tmout) +int +ttymsg(struct iovec *iov, int iovcnt, const char *tty, int timeout, + bool shout) { struct iovec localiov[TTYMSG_IOV_MAX]; - ssize_t left, wret; - int cnt, fd; - char device[MAXNAMLEN] = _PATH_DEV; - static char errbuf[1024]; - char *p; + struct stat sb; + ssize_t wret; + size_t resid; + int cnt, dd, fd, serrno; int forked; forked = 0; - if (iovcnt > (int)(sizeof(localiov) / sizeof(localiov[0]))) - return ("too many iov's (change code in wall/ttymsg.c)"); - - strlcat(device, line, sizeof(device)); - p = device + sizeof(_PATH_DEV) - 1; - if (strncmp(p, "pts/", 4) == 0) - p += 4; - if (strchr(p, '/') != NULL) { - /* A slash is an attempt to break security... */ - (void) snprintf(errbuf, sizeof(errbuf), - "Too many '/' in \"%s\"", device); - return (errbuf); + if (iovcnt > (int)(sizeof(localiov) / sizeof(localiov[0]))) { + errno = EFBIG; + return (-1); } - /* - * open will fail on slip lines or exclusive-use lines - * if not running as root; not an error. - */ - if ((fd = open(device, O_WRONLY|O_NONBLOCK, 0)) < 0) { - if (errno == EBUSY || errno == EACCES) - return (NULL); - (void) snprintf(errbuf, sizeof(errbuf), "%s: %s", device, - strerror(errno)); - return (errbuf); + dd = open(_PATH_DEV, O_SEARCH | O_DIRECTORY); + if (dd < 0) + return (-1); + fd = openat(dd, tty, O_WRONLY | O_NONBLOCK | O_RESOLVE_BENEATH); + if (fd < 0) { + serrno = errno; + close(dd); + /* + * open will fail on slip lines or exclusive-use lines + * if not running as root; not an error. + */ + if (serrno == EBUSY || serrno == EACCES) + return (0); + errno = serrno; + return (-1); + } + close(dd); + if (!shout) { + if (fstat(fd, &sb) != 0) { + serrno = errno; + close(fd); + errno = serrno; + return (-1); + } + if ((sb.st_mode & S_IWGRP) == 0) { + close(fd); + return (0); + } } - for (cnt = 0, left = 0; cnt < iovcnt; ++cnt) - left += iov[cnt].iov_len; + for (cnt = 0, resid = 0; cnt < iovcnt; ++cnt) + resid += iov[cnt].iov_len; - for (;;) { + do { wret = writev(fd, iov, iovcnt); - if (wret >= left) - break; if (wret >= 0) { - left -= wret; + resid -= wret; if (iov != localiov) { - bcopy(iov, localiov, + bcopy(iov, localiov, iovcnt * sizeof(struct iovec)); iov = localiov; } - for (cnt = 0; (size_t)wret >= iov->iov_len; ++cnt) { + while ((size_t)wret >= iov->iov_len) { wret -= iov->iov_len; ++iov; --iovcnt; @@ -124,21 +132,21 @@ ttymsg(struct iovec *iov, int iovcnt, const char *line, int tmout) } cpid = fork(); if (cpid < 0) { - (void) snprintf(errbuf, sizeof(errbuf), - "fork: %s", strerror(errno)); + serrno = errno; (void) close(fd); - return (errbuf); + errno = serrno; + return (-1); } if (cpid) { /* parent */ (void) close(fd); - return (NULL); + return (0); } forked++; - /* wait at most tmout seconds */ + /* wait at most timeout seconds */ (void) signal(SIGALRM, SIG_DFL); (void) signal(SIGTERM, SIG_DFL); /* XXX */ (void) sigsetmask(0); - (void) alarm((u_int)tmout); + (void) alarm((u_int)timeout); (void) fcntl(fd, F_SETFL, 0); /* clear O_NONBLOCK */ continue; } @@ -146,18 +154,18 @@ ttymsg(struct iovec *iov, int iovcnt, const char *line, int tmout) * We get ENODEV on a slip line if we're running as root, * and EIO if the line just went away. */ - if (errno == ENODEV || errno == EIO) + serrno = errno; + if (serrno == ENODEV || serrno == EIO) break; (void) close(fd); if (forked) _exit(1); - (void) snprintf(errbuf, sizeof(errbuf), - "%s: %s", device, strerror(errno)); - return (errbuf); - } + errno = serrno; + return (-1); + } while (resid > 0); (void) close(fd); if (forked) _exit(0); - return (NULL); + return (0); } diff --git a/usr.bin/wall/ttymsg.h b/usr.bin/wall/ttymsg.h index be97592f5e1c..840a49875fbb 100644 --- a/usr.bin/wall/ttymsg.h +++ b/usr.bin/wall/ttymsg.h @@ -1,4 +1,4 @@ #define TTYMSG_IOV_MAX 32 -const char *ttymsg(struct iovec *, int, const char *, int); +int ttymsg(struct iovec *, int, const char *, int, bool); diff --git a/usr.bin/wall/wall.c b/usr.bin/wall/wall.c index fcfcdcb3fbce..e29b896f838f 100644 --- a/usr.bin/wall/wall.c +++ b/usr.bin/wall/wall.c @@ -44,6 +44,7 @@ #include #include #include +#include #include #include #include @@ -90,7 +91,6 @@ main(int argc, char *argv[]) struct wallgroup *g; struct group *grp; char **np; - const char *p; struct passwd *pw; (void)setlocale(LC_CTYPE, ""); @@ -158,8 +158,8 @@ main(int argc, char *argv[]) if (ingroup == 0) continue; } - if ((p = ttymsg(&iov, 1, utmp->ut_line, 60*5)) != NULL) - warnx("%s", p); + if (ttymsg(&iov, 1, utmp->ut_line, 60 * 5, 1) != 0) + warn("%s", utmp->ut_line); } exit(0); } diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 59cb56fd5970..70cb705c0cb7 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -360,7 +360,6 @@ static int evaluate_prop_filter(const struct prop_filter *filter, static nvlist_t *prop_filter_compile(const char *); static void parsemsg(const char *, char *); static void printsys(char *); -static const char *ttymsg_check(struct iovec *, int, char *, int); static void usage(void); static bool validate(struct sockaddr *, const char *); static void unmapped(struct sockaddr *); @@ -1756,8 +1755,6 @@ iovlist_truncate(struct iovlist *il, size_t size) static void fprintlog_write(struct filed *f, struct iovlist *il, int flags) { - const char *msgret; - switch (f->f_type) { case F_FORW: { ssize_t lsent; @@ -1910,10 +1907,10 @@ fprintlog_write(struct filed *f, struct iovlist *il, int flags) dprintf(" %s%s\n", _PATH_DEV, f->f_fname); iovlist_append(il, "\r\n"); errno = 0; /* ttymsg() only sometimes returns an errno */ - if ((msgret = cap_ttymsg(cap_syslogd, il->iov, il->iovcnt, - f->f_fname, 10))) { + if (cap_ttymsg(cap_syslogd, il->iov, il->iovcnt, f->f_fname, 10, + true) != 0) { f->f_type = F_UNUSED; - logerror(msgret); + logerror(f->f_fname); } break; @@ -2143,7 +2140,6 @@ wallmsg(const struct filed *f, struct iovec *iov, const int iovlen) static int reenter; /* avoid calling ourselves */ struct utmpx *ut; int i; - const char *p; if (reenter++) return; @@ -2153,19 +2149,19 @@ wallmsg(const struct filed *f, struct iovec *iov, const int iovlen) if (ut->ut_type != USER_PROCESS) continue; if (f->f_type == F_WALL) { - if ((p = ttymsg(iov, iovlen, ut->ut_line, - TTYMSGTIME)) != NULL) - dprintf("%s\n", p); + if (ttymsg(iov, iovlen, ut->ut_line, TTYMSGTIME, + false) != 0 && errno != ENOENT) + dprintf("%s: %m\n", ut->ut_line); continue; } /* should we send the message to this user? */ for (i = 0; i < MAXUNAMES; i++) { if (!f->f_uname[i][0]) break; - if (!strcmp(f->f_uname[i], ut->ut_user)) { - if ((p = ttymsg_check(iov, iovlen, ut->ut_line, - TTYMSGTIME)) != NULL) - dprintf("%s\n", p); + if (strcmp(f->f_uname[i], ut->ut_user) == 0) { + if (ttymsg(iov, iovlen, ut->ut_line, TTYMSGTIME, + true) != 0 && errno != ENOENT) + dprintf("%s: %m\n", ut->ut_line); break; } } @@ -2174,29 +2170,6 @@ wallmsg(const struct filed *f, struct iovec *iov, const int iovlen) reenter = 0; } -/* - * Wrapper routine for ttymsg() that checks the terminal for messages enabled. - */ -static const char * -ttymsg_check(struct iovec *iov, int iovcnt, char *line, int tmout) -{ - static char device[1024]; - static char errbuf[1024]; - struct stat sb; - - (void) snprintf(device, sizeof(device), "%s%s", _PATH_DEV, line); - - if (stat(device, &sb) < 0) { - (void) snprintf(errbuf, sizeof(errbuf), - "%s: %s", device, strerror(errno)); - return (errbuf); - } - if ((sb.st_mode & S_IWGRP) == 0) - /* Messages disabled. */ - return (NULL); - return (ttymsg(iov, iovcnt, line, tmout)); -} - /* * Return a printable representation of a host address. */ diff --git a/usr.sbin/syslogd/syslogd_cap.c b/usr.sbin/syslogd/syslogd_cap.c index 7539e6b8661b..0149d09dab99 100644 --- a/usr.sbin/syslogd/syslogd_cap.c +++ b/usr.sbin/syslogd/syslogd_cap.c @@ -50,7 +50,7 @@ casper_command(const char *cmd, const nvlist_t *limits __unused, else if (strcmp(cmd, "readconfigfile") == 0) error = casper_readconfigfile(nvlin, nvlout); else if (strcmp(cmd, "ttymsg") == 0) - error = casper_ttymsg(nvlin, nvlout); + error = casper_ttymsg(nvlin); else if (strcmp(cmd, "wallmsg") == 0) error = casper_wallmsg(nvlin); diff --git a/usr.sbin/syslogd/syslogd_cap.h b/usr.sbin/syslogd/syslogd_cap.h index 2e52c57bcdf8..60106d7862bd 100644 --- a/usr.sbin/syslogd/syslogd_cap.h +++ b/usr.sbin/syslogd/syslogd_cap.h @@ -62,13 +62,13 @@ extern SLIST_HEAD(cfiled_list, cap_filed) cfiled_head; int cap_p_open(cap_channel_t *, size_t, const char *, int *); nvlist_t *cap_readconfigfile(cap_channel_t *, const char *); -const char *cap_ttymsg(cap_channel_t *, struct iovec *, int, const char *, int); +int cap_ttymsg(cap_channel_t *, struct iovec *, int, const char *, int, bool); void cap_wallmsg(cap_channel_t *, const struct filed *, struct iovec *, const int); int casper_p_open(nvlist_t *, nvlist_t *); int casper_readconfigfile(nvlist_t *, nvlist_t *); -int casper_ttymsg(nvlist_t *, nvlist_t *); +int casper_ttymsg(nvlist_t *); int casper_wallmsg(nvlist_t *); nvlist_t *filed_to_nvlist(const struct filed *); @@ -83,8 +83,8 @@ struct prop_filter *nvlist_to_prop_filter(const nvlist_t *nvl_prop_filter); p_open(prog, rpd) #define cap_readconfigfile(chan, cf) \ readconfigfile(cf) -#define cap_ttymsg(chan, iov, iovcnt, line, tmout) \ - ttymsg(iov, iovcnt, line, tmout) +#define cap_ttymsg(chan, iov, iovcnt, line, timeout) \ + ttymsg(iov, iovcnt, line, timeout) #define cap_wallmsg(chan, f, iov, iovcnt) \ wallmsg(f, iov, iovcnt) diff --git a/usr.sbin/syslogd/syslogd_cap_log.c b/usr.sbin/syslogd/syslogd_cap_log.c index 5e2034abd9eb..901349c4dc5a 100644 --- a/usr.sbin/syslogd/syslogd_cap_log.c +++ b/usr.sbin/syslogd/syslogd_cap_log.c @@ -52,14 +52,12 @@ cap_p_open(cap_channel_t *chan, size_t filed_idx, const char *prog, exit(1); } error = nvlist_get_number(nvl, "error"); - if (error != 0) { - errno = error; - logerror("Failed to open piped command"); - } pipedesc_w = dnvlist_take_descriptor(nvl, "pipedesc_w", -1); *procdesc = dnvlist_take_descriptor(nvl, "procdesc", -1); nvlist_destroy(nvl); + if (error != 0) + errno = error; return (pipedesc_w); } @@ -81,29 +79,27 @@ casper_p_open(nvlist_t *nvlin, nvlist_t *nvlout) pipedesc_w = p_open(prog, &procdesc); if (pipedesc_w == -1) - return (-1); + return (errno); nvlist_move_descriptor(nvlout, "pipedesc_w", pipedesc_w); nvlist_move_descriptor(nvlout, "procdesc", procdesc); return (0); } - - return (-1); + return (ECAPMODE); } -const char * +int cap_ttymsg(cap_channel_t *chan, struct iovec *iov, int iovcnt, - const char *line, int tmout) + const char *line, int timeout, bool shout) { nvlist_t *nvl = nvlist_create(0); - int error; - static char errbuf[1024]; - char *ret = NULL; + int error = 0; nvlist_add_string(nvl, "cmd", "ttymsg"); for (int i = 0; i < iovcnt; ++i) nvlist_append_string_array(nvl, "iov_strs", iov[i].iov_base); nvlist_add_string(nvl, "line", line); - nvlist_add_number(nvl, "tmout", tmout); + nvlist_add_number(nvl, "timeout", timeout); + nvlist_add_bool(nvl, "shout", shout); nvl = cap_xfer_nvlist(chan, nvl); if (nvl == NULL) { @@ -111,28 +107,23 @@ cap_ttymsg(cap_channel_t *chan, struct iovec *iov, int iovcnt, exit(1); } error = nvlist_get_number(nvl, "error"); + nvlist_destroy(nvl); if (error != 0) { errno = error; - logerror("Failed to ttymsg"); - } - if (nvlist_exists_string(nvl, "errstr")) { - const char *errstr = nvlist_get_string(nvl, "errstr"); - (void)strlcpy(errbuf, errstr, sizeof(errbuf)); - ret = errbuf; + return (-1); } - - nvlist_destroy(nvl); - return (ret); + return (0); } int -casper_ttymsg(nvlist_t *nvlin, nvlist_t *nvlout) +casper_ttymsg(nvlist_t *nvlin) { const char * const *nvlstrs; struct iovec *iov; - size_t iovcnt; - int tmout; const char *line; + size_t iovcnt; + int ret, timeout; + bool shout; nvlstrs = nvlist_get_string_array(nvlin, "iov_strs", &iovcnt); assert(iovcnt <= TTYMSG_IOV_MAX); @@ -144,13 +135,12 @@ casper_ttymsg(nvlist_t *nvlin, nvlist_t *nvlout) iov[i].iov_len = strlen(nvlstrs[i]); } line = nvlist_get_string(nvlin, "line"); - tmout = nvlist_get_number(nvlin, "tmout"); - line = ttymsg(iov, iovcnt, line, tmout); - if (line != NULL) - nvlist_add_string(nvlout, "errstr", line); - + timeout = nvlist_get_number(nvlin, "timeout"); + shout = nvlist_get_bool(nvlin, "shout"); + if ((ret = ttymsg(iov, iovcnt, line, timeout, shout)) != 0) + ret = errno; free(iov); - return (0); + return (ret); } void @@ -158,7 +148,6 @@ cap_wallmsg(cap_channel_t *chan, const struct filed *f, struct iovec *iov, int iovcnt) { nvlist_t *nvl = nvlist_create(0); - int error; nvlist_add_string(nvl, "cmd", "wallmsg"); /* @@ -175,11 +164,6 @@ cap_wallmsg(cap_channel_t *chan, const struct filed *f, struct iovec *iov, logerror("Failed to xfer wallmsg nvlist"); exit(1); } - error = nvlist_get_number(nvl, "error"); - if (error != 0) { - errno = error; - logerror("Failed to wallmsg"); - } nvlist_destroy(nvl); } From nobody Mon May 25 17:03:03 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPMdg6KT8z6fY7s for ; Mon, 25 May 2026 17: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPMdg4l4qz44G8 for ; Mon, 25 May 2026 17:03:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779728583; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0kuHQw15/Zpa5Fn1WMHc7gL5bBSc16l4JXbt/FrI9LI=; b=Z1dje6TfC2XC7JRQ1DpEEHPP/635sZgszTaX370zj30MN6mfB/zoqvwdhOjeZ4xIfOszXx 4p71QXUBQMHmyIp4qAzLBr0yenlcVMFBzrUhivCH/F/mzLa1qRg4NOcpFSQdEwQJZWXDXn 7sh8wykJF2H3xDCIebZjhmnbMC1DaK0rv7M50ICwym9UHsmuZ7tC4sEXEJ+G3lmvzph8lY E65838SIbI7b6EXIKzAjL0YETcc4JC3Oe0/dAfzBasSDI2SAry6/52upp5s5jGRWYLRL7I I/8uGC74APLgOc3jBj2EoKP4iTphhIa99BFZH9KYwqD5U1owR/IjhXyEe4CMCw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779728583; a=rsa-sha256; cv=none; b=UbJo1p4f3gCBW2d2JIG+oB2s9L/B9wduELzAQckUGu7heY1f8jAcA+T1kZHxZve855Rd6J 4A0MCw4qymXDrqHAmuzpHCF18tICX8Z921ruwzmnpnSv8VmS3NAO+rmv6qkcVAhP4cNV2N mSVvUX8hXL8YbCP+nOWfVU5tInEetxnsw9CGIOmCjuESWJnbd5TfMlnQuvJGX514rZFDSr mLuSJOfV1Ht/SO5rDw2NUSuEhXGNY+NCl/CEEazo6u1ndoNuz6PJaLVw6JOEPjg80EIqv1 f9LrzXjQ0CTFAlwlfMfhCKLTC2VVHJ5xX5sk/loVCuRnMg/IeaesyUIY1MlV2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779728583; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0kuHQw15/Zpa5Fn1WMHc7gL5bBSc16l4JXbt/FrI9LI=; b=tMMuUqZPoHUrsLZtynE6jBh9IvtHGivweBZn0aMeNReJCUzy1TTj7ly+iJdA/VNTxshgek z+C4OAkTeKDkccPUpEiQIBn5VpdG2r3oPRJrZRz5Dv8cuPpcRD3joVxWHi+hSoShOq0gYz i7Ldylad/AkXG7SFc70cTOEFp/hpL0ggWrh7KWTWQq407VAxenrRgI8qrxbfOmgjlmO0hO HkonLL9i6vHWy/Sstap1UpoaO0Dcsavr6bHHD2JteQHdB6wuWWkmg5hIfADYh7zfGeoNyu Qni4UrAKOje9aUWqP8S3pJ8PlnxsefdiDECQHYwQXluUX5N7Dr4jZiwp3pnmFQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPMdg49dTzqvJ for ; Mon, 25 May 2026 17:03:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38327 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 25 May 2026 17:03:03 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: c0cae7d8da50 - main - lpd: Restore ability to specify a port number List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c0cae7d8da50daa87af4cd6d7c9a2043343b506f Auto-Submitted: auto-generated Date: Mon, 25 May 2026 17:03:03 +0000 Message-Id: <6a1480c7.38327.207c9055@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=c0cae7d8da50daa87af4cd6d7c9a2043343b506f commit c0cae7d8da50daa87af4cd6d7c9a2043343b506f Author: Dag-Erling Smørgrav AuthorDate: 2026-05-25 16:51:31 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-25 16:52:16 +0000 lpd: Restore ability to specify a port number This has been broken since IPv6 support was added in 2000. We would validate the port number (which had to be a port number, but can now also be a service name) and then ignore it. MFC after: 1 week Fixes: 08829865f659 ("IPv6 support for lpr.") Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57181 --- usr.sbin/lpr/lpd/lpd.8 | 19 ++++++++++--------- usr.sbin/lpr/lpd/lpd.c | 28 +++++++++------------------- 2 files changed, 19 insertions(+), 28 deletions(-) diff --git a/usr.sbin/lpr/lpd/lpd.8 b/usr.sbin/lpr/lpd/lpd.8 index 9d24a450ba0e..269ef3580ce7 100644 --- a/usr.sbin/lpr/lpd/lpd.8 +++ b/usr.sbin/lpr/lpd/lpd.8 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd February 19, 2026 +.Dd May 25, 2026 .Dt LPD 8 .Os .Sh NAME @@ -35,7 +35,7 @@ .Nm .Op Fl cdlpsFW46 .Op Fl t Ar timeout -.Op Ar port# +.Op Ar port .Sh DEPRECATION NOTICE This facility is scheduled for removal prior to the release of .Fx 16.0 . @@ -143,13 +143,13 @@ Inet only. Inet6 only. .It Fl 46 Inet and inet6 (default). -.It Ar "port#" -The Internet port number used to rendezvous -with other processes is normally obtained with -.Xr getservbyname 3 -but can be changed with the -.Ar port# -argument. +.It Ar "port" +The Internet port number or service name used to rendezvous with other +processes. +Can be any number from 1 to 65,535 or any service name defined in +.Pa /etc/services . +Defaults to +.Li printer . .El .Pp Access control is provided by two means. @@ -346,6 +346,7 @@ but not under same administrative control. .Xr syslog 3 , .Xr hosts.lpd 5 , .Xr printcap 5 , +.Xr services 5 , .Xr chkprintcap 8 , .Xr lpc 8 , .Xr pac 8 diff --git a/usr.sbin/lpr/lpd/lpd.c b/usr.sbin/lpr/lpd/lpd.c index d1dcd0766a77..5550846dca18 100644 --- a/usr.sbin/lpr/lpd/lpd.c +++ b/usr.sbin/lpr/lpd/lpd.c @@ -101,7 +101,7 @@ static void startup(void); static void chkhost(struct sockaddr *_f, int _ch_opts); static int ckqueue(struct printer *_pp); static void fhosterr(int _ch_opts, char *_sysmsg, char *_usermsg); -static int *socksetup(int _af, int _debuglvl); +static int *socksetup(int _af, const char *portstr, int _debuglvl); static void usage(void); /* XXX from libc/net/rcmd.c */ @@ -124,7 +124,7 @@ main(int argc, char **argv) struct sockaddr_storage frominet; socklen_t fromlen; sigset_t omask, nmask; - struct servent *sp, serv; + const char *portstr = "printer"; int inet_flag = 0, inet6_flag = 0; euid = geteuid(); /* these shouldn't be different */ @@ -215,19 +215,9 @@ main(int argc, char **argv) if (errs) usage(); - if (argc == 1) { - if ((i = atoi(argv[0])) == 0) - usage(); - if (i < 0 || i > USHRT_MAX) - errx(EX_USAGE, "port # %d is invalid", i); - - serv.s_port = htons(i); - sp = &serv; + if (argc > 0) { + portstr = *argv++; argc--; - } else { - sp = getservbyname("printer", "tcp"); - if (sp == NULL) - errx(EX_OSFILE, "printer/tcp: unknown service"); } if (argc != 0) @@ -339,7 +329,7 @@ main(int argc, char **argv) FD_SET(funix, &defreadfds); listen(funix, 5); if (sflag == 0) { - finet = socksetup(family, socket_debug); + finet = socksetup(family, portstr, socket_debug); } else finet = NULL; /* pretend we couldn't open TCP socket. */ if (finet) { @@ -855,7 +845,7 @@ fhosterr(int ch_opts, char *sysmsg, char *usermsg) /* if af is PF_UNSPEC more than one socket may be returned */ /* the returned list is dynamically allocated, so caller needs to free it */ static int * -socksetup(int af, int debuglvl) +socksetup(int af, const char *portstr, int debuglvl) { struct addrinfo hints, *res, *r; int error, maxs, *s, *socks; @@ -865,7 +855,7 @@ socksetup(int af, int debuglvl) hints.ai_flags = AI_PASSIVE; hints.ai_family = af; hints.ai_socktype = SOCK_STREAM; - error = getaddrinfo(NULL, "printer", &hints, &res); + error = getaddrinfo(NULL, portstr, &hints, &res); if (error) { syslog(LOG_ERR, "%s", gai_strerror(error)); mcleanup(0); @@ -934,9 +924,9 @@ static void usage(void) { #ifdef INET6 - fprintf(stderr, "usage: lpd [-cdlsFW46] [port#]\n"); + fprintf(stderr, "usage: lpd [-cdlsFW46] [port]\n"); #else - fprintf(stderr, "usage: lpd [-cdlsFW] [port#]\n"); + fprintf(stderr, "usage: lpd [-cdlsFW] [port]\n"); #endif exit(EX_USAGE); } From nobody Mon May 25 17:03:04 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPMdj1kybz6fXyq for ; Mon, 25 May 2026 17:03: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPMdh5j6gz4471 for ; Mon, 25 May 2026 17:03:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779728584; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qog/tPD8Q/wg7f8mOwUnAJFgG8o6HaYi63Sbpx7j/p8=; b=VymlAxDWL85HSASraAiICnOPyjwAp7QnDmqqWEWscGxoaipDbH+eJRXE9sL486MUnvoIyY 9LkQ0F49k87I7fOPzrr2+88NkiLhzrNJaWGCU3YeOdBBNL3Nzjl9ukh3H1C2qheoz4qbxT MSikXh0YFMIWUBrNQIL2ZEkiyFjfOGjypnRczadMjvq3e2mknzx8LNme7m7NHNx947QE2y cmRU00UOfTCrcsbqy7cNS5/0GibUzPw0yk3Z4wEgN2r65ee0PBxKkX89A880Ysii2x9nfF Ym7//kAf0gxMtBRqaDetp6dOX/GJeOk5yWjNvSoyZ5SU7AlysgOfv0Iilqh5Uw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779728584; a=rsa-sha256; cv=none; b=exLFbsuHOGLFfTGiveHy2BtKA4PF5rBk0n5PUyIZqOeiZcH6yOm7GhMZTyUx+6zTvVw2dW yB2Z/M5EGVaEAV+uGL0HpgHXBSUmw4v2BCwLhFPUZP1lJQFE33825xBHKGJfljJ/GTd69k Yk0RoUa4p+OYr3rSZodQi/yi6+/KywxZ5Quu5jol+ot0Uc77R4FEtmx4RJuAl5WVqrnA4D U6dSgFFFmHL+LLpXIPduo6jiRt9OS7Uyl7mQ/sC6UXi0k93/y8o4f9w4lQd0wep+c7mY4i 8x/opn3hUDv8yDoTUQEByC1eyGmIWjYAsJ1rPE9VbpdaeCU2hg7ipxAFM8CbLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779728584; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qog/tPD8Q/wg7f8mOwUnAJFgG8o6HaYi63Sbpx7j/p8=; b=aU8Dz9Zg4wL2fO5uBzMoUwFG9YZpf+hN8lEXhphL1LwAzVVycVJqkHkBvq+UnYFDw9UVyt BM4OBK4XAgh5eODbXtI643fILpdM3/xuUdJrMsO6HJj2owLVvpW6/KjJyDuYQxQE6o8SCs 1qejzud+VbJDEzbPF/VZNA/ZTuB84a64AxjM6l7oUnewMPAoK54yUbXFGBKow0mh7VhpZB KkG7XpF7GfuiJfAo2/lDDCC9AAKZSGYVGvr3TGaf0Dkec1s5QITSwXr8VaqM+p5VTy6Xt8 J1OGR9GRVKvZ+0Sb1yiwP4LKePGPhGetRPnKXCKDv3Llau4HhirQmQTKOr1yMw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPMdh55GrzrDJ for ; Mon, 25 May 2026 17:03:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 379a7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 25 May 2026 17:03:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 8e917789732a - main - lpd: Reorder option list in manual page List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8e917789732ae02a480e8756899d3bc6d99fe5d8 Auto-Submitted: auto-generated Date: Mon, 25 May 2026 17:03:04 +0000 Message-Id: <6a1480c8.379a7.3f297fd8@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=8e917789732ae02a480e8756899d3bc6d99fe5d8 commit 8e917789732ae02a480e8756899d3bc6d99fe5d8 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-25 16:51:39 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-25 16:52:16 +0000 lpd: Reorder option list in manual page MFC after: 1 week Reviewed by: ziaee, markj Differential Revision: https://reviews.freebsd.org/D57182 --- usr.sbin/lpr/lpd/lpd.8 | 42 ++++++++++++++++++------------------------ 1 file changed, 18 insertions(+), 24 deletions(-) diff --git a/usr.sbin/lpr/lpd/lpd.8 b/usr.sbin/lpr/lpd/lpd.8 index 269ef3580ce7..30c69555ca24 100644 --- a/usr.sbin/lpr/lpd/lpd.8 +++ b/usr.sbin/lpr/lpd/lpd.8 @@ -63,6 +63,12 @@ the request so the parent can continue to listen for more requests. .Pp Available options: .Bl -tag -width Ds +.It Fl 4 +Accept IPv4 connections. +The default is to accept both IPv4 and IPv6. +.It Fl 6 +Accept IPv6 connections. +The default is to accept both IPv4 and IPv6. .It Fl c By default, if some remote host has a connection error while trying to send a print request to @@ -81,11 +87,20 @@ Turn on .Dv SO_DEBUG on the Internet listening socket (see .Xr setsockopt 2 ) . -.It Fl l +.It Fl F +By default, +.Nm +will daemonize into the background. The -.Fl l +.Fl F flag causes .Nm +to remain in the foreground. +Logging is still performed with +.Xr syslog 3 . +.It Fl l +Causes +.Nm to log valid requests received from the network. This can be useful for debugging purposes. @@ -99,11 +114,7 @@ It is being deprecated, and may be removed in a future version of .Nm . .It Fl s -The -.Fl s -(secure) flag causes -.Nm -not to open an Internet listening socket. +Do not open an Internet listening socket. This means that .Nm will not accept any connections from any remote @@ -114,17 +125,6 @@ Set the network receive timeout for client connections to .Ar timeout seconds. The default is 120. -.It Fl F -By default, -.Nm -will daemonize into the background. -The -.Fl F -flag causes -.Nm -to remain in the foreground. -Logging is still performed with -.Xr syslog 3 . .It Fl W By default, the .Nm @@ -137,12 +137,6 @@ flag causes to accept connections coming from any port. This is can be useful when you want to accept print jobs from certain implementations of lpr written for Windows. -.It Fl 4 -Inet only. -.It Fl 6 -Inet6 only. -.It Fl 46 -Inet and inet6 (default). .It Ar "port" The Internet port number or service name used to rendezvous with other processes. From nobody Mon May 25 17:03:05 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPMdk1Hpmz6fY24 for ; Mon, 25 May 2026 17:03: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPMdj6R51z442m for ; Mon, 25 May 2026 17:03:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779728585; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ebigjxwhE5sFj6Kh9y5MObCcgBeitBvUh0BNq4QNtpE=; b=d80ij7577UJLKnW91yuIfO7vmvgutpewsbmQAvPK23PFbKRxCd6bYPFZiZx0hfryaUSanp eWcaUdF+DGqSSo1XFEvtxlbHxLS3hTHMa2mfQe0RUzt5Nt6jkZH0NMXWoW4uGwNTah7UkE 9nljbeju8NbAyzsR6V0dJ1lpuX/fcjcdMe4KWDfNftU6yTXW7EGe4+6pCnmw/W9v1nKKJ5 tChK5gjkwaIwZD+y+f5O3pzRdOkWmTD5FIj2afGB02URntIWQojObCDISWNdmpSVNZt9Yu 0IQeVMCRl7dqyLnoHz7kzHuZQsjJZ6hV9506S6GTrX0X1oPacShK7R8Ul79hpg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779728585; a=rsa-sha256; cv=none; b=Ksnnv+uAEzrl2zGUJ1RK+kIIj5FjI63xhwdocF/95kRmBn1w4ILsVErbOXDywStA0b+8G7 tp/LfXNrh7I45Slo1SxDYj8RH6y1agDGOvsnPecLE4HOXYhI9Z5qoO7xg9lsccWAhKrnzT latF40PZs0Jja//i4rMgAqITpiuXeYLt4/oIQdnu2WMDdyzgN69DuUcr/9goPLQczxJSPu MQSt22AD6oEl2AvoRBPJfE5NQTt8aDMJUdoq83mrkNTG0eW3XLTeZEe0p0FqFvPO6q/O3m GeNZ1JGLz3SPCzNc/ER5eL+sAAmMEnAS/YnRTbxjAUBqXPHRIZmd/QoKnZT55w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779728585; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ebigjxwhE5sFj6Kh9y5MObCcgBeitBvUh0BNq4QNtpE=; b=IQ0mF4fQPZ+HhnejTrqDfz+4nNpKKmUGx7HBRWK0TWLnmKMemmYbDq85hlv10wCCq9Tj/Z zRhZGwEjLTtEBRcr/dN2+uhr8WLPsLd01+aLs9RNv8vmxie7gPJkrlub5Ne4PyibR1RCwO GD7tV1FNT0hI1OEC1jkqif/Cz3nvPhpzEDd6pYwLOvTb19G4HsO1xEsBZrO6rQp0rZnf7O 56GoWSX31UvA7StMAs8dofqQvPNpRHVXEGgnyUq4RbwhNOx+5+TWbB8EMlTDEb/EWWk2Yw RZ+7v+t/0gLFnqGto2df6zKA4nQ1cinh1KbpFd/sc1iRAomiNxNAE8/6kmADGQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPMdj5z7rzqvK for ; Mon, 25 May 2026 17:03:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3821d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 25 May 2026 17:03:05 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 6047f6a21085 - main - lpd: Drop deprecated -p option List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6047f6a21085ae3877228f8df19a0d4bce45905f Auto-Submitted: auto-generated Date: Mon, 25 May 2026 17:03:05 +0000 Message-Id: <6a1480c9.3821d.6df76465@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=6047f6a21085ae3877228f8df19a0d4bce45905f commit 6047f6a21085ae3877228f8df19a0d4bce45905f Author: Dag-Erling Smørgrav AuthorDate: 2026-05-25 16:51:44 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-25 16:52:16 +0000 lpd: Drop deprecated -p option This alias for the -s option has been deprecated since 2002. Time to drop it from the documentation. MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57183 --- usr.sbin/lpr/lpd/lpd.8 | 11 +---------- usr.sbin/lpr/lpd/lpd.c | 3 --- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/usr.sbin/lpr/lpd/lpd.8 b/usr.sbin/lpr/lpd/lpd.8 index 30c69555ca24..57331df02089 100644 --- a/usr.sbin/lpr/lpd/lpd.8 +++ b/usr.sbin/lpr/lpd/lpd.8 @@ -33,7 +33,7 @@ .Nd line printer spooler daemon .Sh SYNOPSIS .Nm -.Op Fl cdlpsFW46 +.Op Fl cdlsFW46 .Op Fl t Ar timeout .Op Ar port .Sh DEPRECATION NOTICE @@ -104,15 +104,6 @@ Causes to log valid requests received from the network. This can be useful for debugging purposes. -.It Fl p -The -.Fl p -flag is a synonym for the -.Fl s -flag. -It is being deprecated, and may be removed in a -future version of -.Nm . .It Fl s Do not open an Internet listening socket. This means that diff --git a/usr.sbin/lpr/lpd/lpd.c b/usr.sbin/lpr/lpd/lpd.c index 5550846dca18..d01aac7a7a35 100644 --- a/usr.sbin/lpr/lpd/lpd.c +++ b/usr.sbin/lpr/lpd/lpd.c @@ -153,9 +153,6 @@ main(int argc, char **argv) lflag++; break; case 'p': /* letter initially used for -s */ - /* - * This will probably be removed with 5.0-release. - */ /* FALLTHROUGH */ case 's': /* secure (no inet) */ sflag++; From nobody Mon May 25 17:03:08 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPMdm4s4Mz6fXrl for ; Mon, 25 May 2026 17:03: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPMdm3DcGz4438 for ; Mon, 25 May 2026 17:03:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779728588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UlOg3G3QaBkJhDpOMQVMwiVgEZSRXFG+yMYQfQXC9iQ=; b=VpVdMl5EsOErnF/FSXGVUjJThiv7Q/EJQcm59awStnoOxfXPVCVR5JfKGsa+uJ3mw67nlK 4r7h08LhvnMo5jxJ7RqrINB06QODLKoTD3dbp6AqjUAgiKjo1tWRQM4fjqU+N3Jya80juR /9OdlcJjCASEwDDCAS2RTVmLCJlGpIsOR6V9hjcb01nrSVJNhc16x3Mdd7bdkUxudda3AW coCTe3XacWzmY6353+Xx/TREbZQS+C0jrJYWFo7KHJwmfsJFmzpiaxtSTEjCGrqVfB00aA UYGlJp1+f56quokA+9tdMQ4HgSJuZlM0loV8lqCQUS4WHpz5DmMr3vHNfeTkLw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779728588; a=rsa-sha256; cv=none; b=OpBKv40DlwuMhHIJfgYtKFYX1GcTtj6QkqLN7jPj+fD/uG7AItxJ+UBNMzEhHndQnORlpp ERgphH4t5jnhV/xOIUE5e7mp/tIi/c1qwtY0KoBPRcxa1iALmXbLDYOvJJ3gx1+ggOuEsM O/OaPoLmMcjqOlnn4JXtsjmDL51AsiP/hsgyjhHDe8vEUBTksSPBXZe9nndsUWTTg/zs7P Bp1Fr7TMHmNS2XBvVX8if8vUNfZicq8SYCAjwuQrl4dxgqv6pGXpsXXGO4V6syEYhQIu6V cxMKMZqMOEl0kz+WI1G4aw27/6pJG9LzAzhQ8/tVfRxaY6rSFQEfvr+ZlvhDTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779728588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UlOg3G3QaBkJhDpOMQVMwiVgEZSRXFG+yMYQfQXC9iQ=; b=UABuFyyWJ23NpYfOagYnHg2XPNmWiY6g+z1rYI9Dvjyy8GWQxxhncgShpckFSvCvlT7/JO vY58m9NLa3orcZIwIUcBcO4hpGGlrC//iYZd9KR+CUgLF5K3yuI8lffPOPse9jrE+goHGc m8vL8bTCKG3eZ9sFtmsMIGPVFcu8f3NlyXZpxTdb99xB/tpSeL1sFiakmT5yv9ZVqbomPt NT83VUflkYpkBC6OOe1odR4X1ym5WtNi4WO1ftnwzyT+xr4OGQ5ZD18y+zBiSiuVQltpTg HoEWxsv9q+LT9D6DZ/22ePxmoW75QzIcYNvAH7YV6QZoQoR2VKPkLhPMXsC0kQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPMdm0c9pzr7Y for ; Mon, 25 May 2026 17:03:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 388b5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 25 May 2026 17:03:08 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 0f3e14870906 - main - lpd: Fix issues reported by clang-analyzer List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0f3e14870906da22a7ca821fb2153d375157cac2 Auto-Submitted: auto-generated Date: Mon, 25 May 2026 17:03:08 +0000 Message-Id: <6a1480cc.388b5.45c31314@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=0f3e14870906da22a7ca821fb2153d375157cac2 commit 0f3e14870906da22a7ca821fb2153d375157cac2 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-25 16:51:53 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-25 16:52:17 +0000 lpd: Fix issues reported by clang-analyzer Also, unlink our temporary file if we fail to chmod it. MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57185 --- usr.sbin/lpr/lpd/printjob.c | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/usr.sbin/lpr/lpd/printjob.c b/usr.sbin/lpr/lpd/printjob.c index 0e86e8de8fb9..5ed7f0409679 100644 --- a/usr.sbin/lpr/lpd/printjob.c +++ b/usr.sbin/lpr/lpd/printjob.c @@ -155,7 +155,7 @@ printjob(struct printer *pp) register int i, nitems; off_t pidoff; pid_t printpid; - int errcnt, jobcount, statok, tempfd; + int errcnt, jobcount, tempfd; jobcount = 0; init(pp); /* set up capabilities */ @@ -190,9 +190,6 @@ printjob(struct printer *pp) pp->spool_dir); exit(1); } - statok = stat(pp->lock_file, &stb); - if (statok == 0 && (stb.st_mode & LFM_PRINT_DIS)) - exit(0); /* printing disabled */ umask(S_IWOTH); lfd = open(pp->lock_file, O_WRONLY|O_CREAT|O_EXLOCK|O_NONBLOCK, LOCK_FILE_MODE); @@ -203,12 +200,14 @@ printjob(struct printer *pp) pp->lock_file); exit(1); } - /* - * If the initial call to stat() failed, then lock_file will have - * been created by open(). Update &stb to match that new file. - */ - if (statok != 0) - statok = stat(pp->lock_file, &stb); + if (fstat(lfd, &stb) != 0) { + syslog(LOG_ERR, "%s: fstat(%s): %m", pp->printer, + pp->lock_file); + exit(1); + } + if ((stb.st_mode & LFM_PRINT_DIS) != 0) { + exit(0); /* printing disabled */ + } /* turn off non-blocking mode (was turned on for lock effects only) */ if (fcntl(lfd, F_SETFL, 0) < 0) { syslog(LOG_ERR, "%s: fcntl(%s): %m", pp->printer, @@ -219,8 +218,7 @@ printjob(struct printer *pp) /* * write process id for others to know */ - sprintf(line, "%u\n", printpid); - pidoff = i = strlen(line); + pidoff = i = snprintf(line, sizeof(line), "%u\n", printpid); if (write(lfd, line, i) != i) { syslog(LOG_ERR, "%s: write(%s): %m", pp->printer, pp->lock_file); @@ -248,9 +246,10 @@ printjob(struct printer *pp) tempstderr); exit(1); } - if ((i = fchmod(tempfd, 0664)) == -1) { + if (fchmod(tempfd, 0664) == -1) { syslog(LOG_ERR, "%s: fchmod(%s): %m", pp->printer, tempstderr); + (void) unlink(tempstderr); exit(1); } /* lpd doesn't need it to be open, it just needs it to exist */ @@ -362,15 +361,18 @@ again: goto again; } -char fonts[4][50]; /* fonts for troff */ +char fonts[4][64]; /* fonts for troff */ -char ifonts[4][40] = { +char ifonts[4][64] = { _PATH_VFONTR, _PATH_VFONTI, _PATH_VFONTB, _PATH_VFONTS, }; +_Static_assert(sizeof(fonts) == sizeof(ifonts), "fonts != ifonts"); +_Static_assert(sizeof(fonts[0]) == sizeof(ifonts[0]), "fonts[0] != ifonts[0]"); + /* * The remaining part is the reading of the control file (cf) * and performing the various actions. @@ -394,10 +396,9 @@ printit(struct printer *pp, char *file) /* * Reset troff fonts. */ - for (i = 0; i < 4; i++) - strcpy(fonts[i], ifonts[i]); + memcpy(fonts, ifonts, sizeof(fonts)); sprintf(&width[2], "%ld", pp->page_width); - strcpy(indent+2, "0"); + strcpy(indent, "-i0"); /* initialize job-specific count of datafiles processed */ job_dfcnt = 0; @@ -945,7 +946,7 @@ sendit(struct printer *pp, char *file) strlcpy(indent+2, line + 1, sizeof(indent) - 2); } else if (line[0] >= 'a' && line[0] <= 'z') { dfcopies = 1; - strcpy(last, line); + memcpy(last, line, sizeof(last)); while ((i = get_line(cfp)) != 0) { if (strcmp(last, line) != 0) break; From nobody Mon May 25 17:03:06 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPMdl3fvbz6fXlS for ; Mon, 25 May 2026 17:03: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPMdl0BnFz43x6 for ; Mon, 25 May 2026 17:03:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779728587; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Mczp5n01XoC8le0kjPjFpd9X89HwxRvWG2xrsTc1tiE=; b=Kfu0z4oksvpWWp0DYur2qQK15Ad8c3DaBy697xnklekJfMpa4razG3IX6u1SIudHXCMx69 M9PykE3LXadTvEQfpwg+74HRBBRHIfqhqIka1aVPwOB00YJYg4d7lfjJ/zmyad1S9VDRHZ X/TGwP3YHyYjqFYkcBhq99H3kmHYzbes80inSuu+k6PQlfGPpU6MAFiQZ2FB8tmmncSSl2 eDjcmVsIM3YB34I/3ZGZ0aaHOQ9B8BWjYigrbeHrwFbEDDglk1ZYpZGhC4pLkEj7Rq1szH Ny9Grz+wbShoulV2Aw4Yp8NVH/4tsRNJG63Py2dBoblqhZ7tLoP4RHjIi4lS+Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779728587; a=rsa-sha256; cv=none; b=eIx2S6A7PA+5W+md50O8A2TtlNNtMBKBwyAmQoWLquRkbuYtAWi1NEb4OQTN9/a5n2m5k1 CRd31bYQKl/BR6wRmFgUeLeqaRLbI25H/enf/42YYgF4nNwdZHJvSZiSsuzBvm2fKag0Y2 7xH1Ywnwm6kGE96Q6YJGivpL028Rwz+NL5D71rcp4p8AmhJChr3cILdV4HBPbKSDUfP+sD FKal2FHbduto2qUFM3nFNWo34L57BaT06uUZ5W1dYqTkAXrNEMxZ6c9M/YGiNA0BYNlLit B9/toCXWLZmpDZ1xyZtxlz+7ja+NCQfRlEl8pEwTJ7UNZMH3LtTvM90j+CRiTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779728587; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Mczp5n01XoC8le0kjPjFpd9X89HwxRvWG2xrsTc1tiE=; b=QZ08s23vyaC1/ssFty18C+tLsUog0RFo/qdXdEFhxnj4jBJOZzuRMqvdeU++a0D6uMI44b hPalcFV7XdoQ4B7l971D8POr5ahQFIjNvTADUnkIcB7k0N2h/Ea4SfsA7QK08RJ7zg2thl /JDnhjDNH1xiGxSTJkxna6CZs7cJfn43m8VYzdWlwRrKusMyShCVkFUPz3hbr3lEwmxQuV VzKQLPJkG8mceg0pQkyDAQ2KuGcNJomVKtQHIWEXXIdDY68vcatzXxrSxKoX13+bo5unWV UvlBCCxs7GUtG1bQhja+yRedj+Gd8actt7XnHFscuGK2YsS0BDZ4BS4h81rkqQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPMdk6qsGzqvL for ; Mon, 25 May 2026 17:03:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 382ec by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 25 May 2026 17:03:06 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: f2c7c5f94803 - main - lpd: Avoid buffer overflow when sending a job List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f2c7c5f94803b67a9a6af625d4fc8882d2afda6c Auto-Submitted: auto-generated Date: Mon, 25 May 2026 17:03:06 +0000 Message-Id: <6a1480ca.382ec.4d1bc28@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=f2c7c5f94803b67a9a6af625d4fc8882d2afda6c commit f2c7c5f94803b67a9a6af625d4fc8882d2afda6c Author: Dag-Erling Smørgrav AuthorDate: 2026-05-25 16:51:48 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-25 16:52:16 +0000 lpd: Avoid buffer overflow when sending a job When forwarding a print job to a remote server, we could overflow the command buffer if a control or data file had a very long name. MFC after: 1 week Reported by: Joshua Rogers Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57184 --- usr.sbin/lpr/lpd/printjob.c | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/usr.sbin/lpr/lpd/printjob.c b/usr.sbin/lpr/lpd/printjob.c index 1c6736097492..0e86e8de8fb9 100644 --- a/usr.sbin/lpr/lpd/printjob.c +++ b/usr.sbin/lpr/lpd/printjob.c @@ -68,8 +68,12 @@ /* * The buffer size to use when reading/writing spool files. + * This is also used to compose commands for remote servers and therefore + * needs to be able to fit the longest command we could possibly send. */ -#define SPL_BUFSIZ BUFSIZ +#define SPL_BUFSIZ (BUFSIZ * 2) +_Static_assert(SPL_BUFSIZ > sizeof("x18446744073709551615 ") + PATH_MAX + + sizeof("_c2147483647 "), "SPL_BUFSIZ is too short"); /* * Error tokens @@ -640,7 +644,7 @@ print(struct printer *pp, int format, char *file) if (pp->filters[LPF_INPUT] == NULL && (format == 'f' || format == 'l' || format == 'o')) { pp->tof = 0; - while ((n = read(fi, buf, SPL_BUFSIZ)) > 0) + while ((n = read(fi, buf, sizeof(buf))) > 0) if (write(ofd, buf, n) != n) { (void) close(fi); return (REPRINT); @@ -1127,13 +1131,18 @@ sendfile(struct printer *pp, int type, char *file, char format, int copyreq) sendagain: copycnt++; - if (copycnt < 2) - (void) sprintf(buf, "%c%" PRId64 " %s\n", type, stb.st_size, - file); - else - (void) sprintf(buf, "%c%" PRId64 " %s_c%d\n", type, stb.st_size, - file, copycnt); - amt = strlen(buf); + if (copycnt < 2) { + amt = snprintf(buf, sizeof(buf), "%c%" PRId64 " %s\n", + type, stb.st_size, file); + } else { + amt = snprintf(buf, sizeof(buf), "%c%" PRId64 " %s_c%d\n", + type, stb.st_size, file, copycnt); + } + if (amt >= sizeof(buf)) { + syslog(LOG_ERR, "%s: file name too long", file); + sfres = ERROR; + goto return_sfres; + } for (i = 0; ; i++) { if (write(pfd, buf, amt) != amt || (resp = response(pp)) < 0 || resp == '\1') { @@ -1157,8 +1166,8 @@ sendagain: */ if (type == '\3') trstat_init(pp, file, job_dfcnt); - for (i = 0; i < stb.st_size; i += SPL_BUFSIZ) { - amt = SPL_BUFSIZ; + for (i = 0; i < stb.st_size; i += sizeof(buf)) { + amt = sizeof(buf); if (i + amt > stb.st_size) amt = stb.st_size - i; if (sizerr == 0 && read(sfd, buf, amt) != amt) From nobody Mon May 25 17:03:09 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPMdn6NcDz6fYJl for ; Mon, 25 May 2026 17:03: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPMdn1jrFz444y for ; Mon, 25 May 2026 17:03:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779728589; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h2D16L/sW1QvAwJf/H421gXQkWmzvMBpJx246zeaWs4=; b=NG0bf1OZoVnoTa16dnBk9O55pdmvTZdk13xNirP0gn6H1o7l6Lcxl0DDPapyxCMfDMnuUD 9LGpSiZUIaqFznevlIWyxQGJvS0O77GzPdFyVTsTQj6zwgeKfjFiEF5vbwX57ECAhxvkOv LbYKMEZqT1tO6l1lqBS0+0hzJ4LotyxEuPbqr8r59dtPkR/ZIa/gdHm+P8kPSGP7ufnkZ6 /e0fFybaGru6rfwc11semjRzF1BSlSHM98Hg652vyUvkjvYu2k33Ri4+/NLZuebld7B2c0 NDER5iBnxaHgUKrAoNioURqxVEtogN7UDiSd5Jk12xaptC7atAolHjyUD7znTA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779728589; a=rsa-sha256; cv=none; b=lQrnFVRdx/gFQ5fUaWlJfiWTEJGG+Ts2dELALBN347ZI6Z2nWQLnhWawd5+MoLEGsk0II1 Ka8y4QZvNPMrd+KHn6Ifn7XZxoZwDaFa+cXd1Oox94usZa9YoB2vfDCPUE7iCUc8Wcyu1u c/Y+dScutqpjPZ0Ywxrdx5pBR/Ez38elnu2KZCJ67yBShTuG5knDR2yRqUxIxS5hZJcrSz p50bXWBb9GfE2g9ND4sTeM2fdFtFeQwVQqWU3KYIoOAwrmIKNNr4Tiou5cUv+rqZosHbUc spkdPJOZp053LkeN+dmwHCGhEFgRz1RhFRi62F0xT9CK4GcM0MVi29FHXBBH2w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779728589; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h2D16L/sW1QvAwJf/H421gXQkWmzvMBpJx246zeaWs4=; b=V2tSv4FEHc0LNdMbPO9TjwXPEEGWU/YyyRLRvkOJFZzXJmqJU4cuMn9gBeehjvVMnPt/tN wSatv4H4jkiYqn6D8HB8xUmhfb0rTiC0nTVZENkIkX29RnkuMTk6hxRcjZ2MzEKNN73Atv jRJDV/NNoiYi1VwO5faQnbGXLCc/QP9M6cXE2TMEqe2O/hm17wzdy8/kbQ5cK700heB5qX GbAPcFnA79Z4B5o2Wej7emGSr6tDVzl9PEH9LXCd75x0A7lK5ABRJyjIdw63hMYEe8jiYH ZQ6sZopw1GNRNAu4RiFkf11UaUDsN7N58XHC417sOB4XbQRkRTsxkOBCbAvXTA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPMdn16h5zr7Z for ; Mon, 25 May 2026 17:03:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38221 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 25 May 2026 17:03:09 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 123591e41c55 - main - lpd: Style and whitespace cleanup List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 123591e41c559fc2ae0f179f1385df05132881da Auto-Submitted: auto-generated Date: Mon, 25 May 2026 17:03:09 +0000 Message-Id: <6a1480cd.38221.3663fb6f@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=123591e41c559fc2ae0f179f1385df05132881da commit 123591e41c559fc2ae0f179f1385df05132881da Author: Dag-Erling Smørgrav AuthorDate: 2026-05-25 16:51:58 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-25 16:52:17 +0000 lpd: Style and whitespace cleanup No functional change intended. MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57186 --- usr.sbin/lpr/lpd/printjob.c | 189 +++++++++++++++++++++----------------------- 1 file changed, 91 insertions(+), 98 deletions(-) diff --git a/usr.sbin/lpr/lpd/printjob.c b/usr.sbin/lpr/lpd/printjob.c index 5ed7f0409679..9173b69a36b9 100644 --- a/usr.sbin/lpr/lpd/printjob.c +++ b/usr.sbin/lpr/lpd/printjob.c @@ -136,10 +136,10 @@ static int printit(struct printer *_pp, char *_file); static void pstatus(const struct printer *_pp, const char *_msg, ...) __printflike(2, 3); static char response(const struct printer *_pp); -static void scan_out(struct printer *_pp, int _scfd, char *_scsp, +static void scan_out(struct printer *_pp, int _scfd, char *_scsp, int _dlm); static char *scnline(int _key, char *_p, int _c); -static int sendfile(struct printer *_pp, int _type, char *_file, +static int sendfile(struct printer *_pp, int _type, char *_file, char _format, int _copyreq); static int sendit(struct printer *_pp, char *_file); static void sendmail(struct printer *_pp, char *_userid, int _bombed); @@ -150,18 +150,17 @@ void printjob(struct printer *pp) { struct stat stb; - register struct jobqueue *q, **qp; + struct jobqueue *q, **qp; struct jobqueue **queue; - register int i, nitems; off_t pidoff; pid_t printpid; - int errcnt, jobcount, tempfd; + int i, errcnt, jobcount, nitems, tempfd; jobcount = 0; init(pp); /* set up capabilities */ (void) write(STDOUT_FILENO, "", 1); /* ack that daemon is started */ (void) close(STDERR_FILENO); /* set up log file */ - if (open(pp->log_file, O_WRONLY|O_APPEND, LOG_FILE_MODE) < 0) { + if (open(pp->log_file, O_WRONLY | O_APPEND, LOG_FILE_MODE) < 0) { syslog(LOG_ERR, "%s: open(%s): %m", pp->printer, pp->log_file); (void) open(_PATH_DEVNULL, O_WRONLY); @@ -191,8 +190,8 @@ printjob(struct printer *pp) exit(1); } umask(S_IWOTH); - lfd = open(pp->lock_file, O_WRONLY|O_CREAT|O_EXLOCK|O_NONBLOCK, - LOCK_FILE_MODE); + lfd = open(pp->lock_file, O_WRONLY | O_CREAT | O_EXLOCK | O_NONBLOCK, + LOCK_FILE_MODE); if (lfd < 0) { if (errno == EWOULDBLOCK) /* active daemon present */ exit(0); @@ -228,7 +227,7 @@ printjob(struct printer *pp) * search the spool directory for work and sort by queue order. */ if ((nitems = getq(pp, &queue)) < 0) { - syslog(LOG_ERR, "%s: can't scan %s", pp->printer, + syslog(LOG_ERR, "%s: can't scan %s", pp->printer, pp->spool_dir); exit(1); } @@ -262,7 +261,7 @@ again: * write the name of the current control file into the lock file * so the spool queue program can tell what we're working on */ - for (qp = queue; nitems--; free((char *) q)) { + for (qp = queue; nitems--; free(q)) { q = *qp++; if (stat(q->job_cfname, &stb) < 0) continue; @@ -315,12 +314,12 @@ again: } (void) close(pfd); /* close printer */ if (ftruncate(lfd, pidoff) < 0) - syslog(LOG_WARNING, "%s: ftruncate(%s): %m", + syslog(LOG_WARNING, "%s: ftruncate(%s): %m", pp->printer, pp->lock_file); openpr(pp); /* try to reopen printer */ goto restart; } else { - syslog(LOG_WARNING, "%s: job could not be %s (%s)", + syslog(LOG_WARNING, "%s: job could not be %s (%s)", pp->printer, pp->remote ? "sent to remote host" : "printed", q->job_cfname); @@ -380,9 +379,8 @@ _Static_assert(sizeof(fonts[0]) == sizeof(ifonts[0]), "fonts[0] != ifonts[0]"); static int printit(struct printer *pp, char *file) { - register int i; char *cp; - int bombed, didignorehdr; + int bombed, didignorehdr, i; bombed = OK; didignorehdr = 0; @@ -402,7 +400,7 @@ printit(struct printer *pp, char *file) /* initialize job-specific count of datafiles processed */ job_dfcnt = 0; - + /* * read the control file for work to do * @@ -450,7 +448,7 @@ printit(struct printer *pp, char *file) case 'H': strlcpy(origin_host, line + 1, sizeof(origin_host)); if (class[0] == '\0') { - strlcpy(class, line+1, sizeof(class)); + strlcpy(class, line + 1, sizeof(class)); } continue; @@ -459,14 +457,14 @@ printit(struct printer *pp, char *file) if (pp->restricted) { /* restricted */ if (getpwnam(logname) == NULL) { bombed = NOACCT; - sendmail(pp, line+1, bombed); + sendmail(pp, line + 1, bombed); goto pass2; } } continue; case 'S': - cp = line+1; + cp = line + 1; i = 0; while (*cp >= '0' && *cp <= '9') i = i * 10 + (*cp++ - '0'); @@ -502,7 +500,7 @@ printit(struct printer *pp, char *file) case 'L': /* identification line */ if (!pp->no_header && !pp->header_last) - banner(pp, line+1, jobname); + banner(pp, line + 1, jobname); continue; case '1': /* troff fonts */ @@ -516,11 +514,11 @@ printit(struct printer *pp, char *file) continue; case 'W': /* page width */ - strlcpy(width+2, line + 1, sizeof(width) - 2); + strlcpy(width + 2, line + 1, sizeof(width) - 2); continue; case 'I': /* indent amount */ - strlcpy(indent+2, line + 1, sizeof(indent) - 2); + strlcpy(indent + 2, line + 1, sizeof(indent) - 2); continue; case 'Z': /* locale for pr */ @@ -542,7 +540,7 @@ printit(struct printer *pp, char *file) pp->printer, line[0], &line[1]); continue; } - i = print(pp, line[0], line+1); + i = print(pp, line[0], line + 1); switch (i) { case ERROR: if (bombed == OK) @@ -574,18 +572,18 @@ pass2: switch (line[0]) { case 'L': /* identification line */ if (!pp->no_header && pp->header_last) - banner(pp, line+1, jobname); + banner(pp, line + 1, jobname); continue; case 'M': if (bombed < NOACCT) /* already sent if >= NOACCT */ - sendmail(pp, line+1, bombed); + sendmail(pp, line + 1, bombed); continue; case 'U': - if (strchr(line+1, '/')) + if (strchr(line + 1, '/')) continue; - (void) unlink(line+1); + (void) unlink(line + 1); } /* * clean-up in case another control file exists @@ -608,14 +606,13 @@ pass2: static int print(struct printer *pp, int format, char *file) { - register int n, i; - register char *prog; - int fi, fo; + char buf[SPL_BUFSIZ]; + struct stat stb; + char *av[15]; + char *prog; FILE *fp; - char *av[15], buf[SPL_BUFSIZ]; pid_t wpid; - int p[2], retcode, stopped, wstatus, wstatus_set; - struct stat stb; + int fi, fo, i, n, p[2], retcode, stopped, wstatus, wstatus_set; /* Make sure the entire data file has arrived. */ wait4data(pp, file); @@ -679,7 +676,7 @@ print(struct printer *pp, int format, char *file) execl(_PATH_PR, "pr", width, length, "-h", *title ? title : " ", "-L", *locale ? locale : "C", - "-F", (char *)0); + "-F", NULL); syslog(LOG_ERR, "cannot execl %s", _PATH_PR); exit(2); } @@ -728,7 +725,7 @@ print(struct printer *pp, int format, char *file) case 'd': /* print tex output */ (void) unlink(".railmag"); if ((fo = creat(".railmag", FILMOD)) < 0) { - syslog(LOG_ERR, "%s: cannot create .railmag", + syslog(LOG_ERR, "%s: cannot create .railmag", pp->printer); (void) unlink(".railmag"); } else { @@ -741,7 +738,7 @@ print(struct printer *pp, int format, char *file) } (void) close(fo); } - prog = (format == 't') ? pp->filters[LPF_TROFF] + prog = (format == 't') ? pp->filters[LPF_TROFF] : ((format == 'n') ? pp->filters[LPF_DITROFF] : pp->filters[LPF_DVI]); av[1] = pxwidth; @@ -815,7 +812,7 @@ start: dup2(fo, STDOUT_FILENO); /* setup stderr for the filter (child process) * so it goes to our temporary errors file */ - n = open(tempstderr, O_WRONLY|O_TRUNC, 0664); + n = open(tempstderr, O_WRONLY | O_TRUNC, 0664); if (n >= 0) dup2(n, STDERR_FILENO); closelog(); @@ -887,8 +884,9 @@ start: static int sendit(struct printer *pp, char *file) { + char last[sizeof(line)]; + char *cp; int dfcopies, err, i; - char *cp, last[sizeof(line)]; /* * open control file @@ -918,7 +916,7 @@ sendit(struct printer *pp, char *file) while (get_line(cfp)) { again: if (line[0] == 'S') { - cp = line+1; + cp = line + 1; i = 0; while (*cp >= '0' && *cp <= '9') i = i * 10 + (*cp++ - '0'); @@ -937,13 +935,13 @@ sendit(struct printer *pp, char *file) strlcpy(logname, line + 1, sizeof(logname)); if (pp->restricted) { /* restricted */ if (getpwnam(logname) == NULL) { - sendmail(pp, line+1, NOACCT); + sendmail(pp, line + 1, NOACCT); err = ERROR; break; } } } else if (line[0] == 'I') { - strlcpy(indent+2, line + 1, sizeof(indent) - 2); + strlcpy(indent + 2, line + 1, sizeof(indent) - 2); } else if (line[0] >= 'a' && line[0] <= 'z') { dfcopies = 1; memcpy(last, line, sizeof(last)); @@ -952,7 +950,7 @@ sendit(struct printer *pp, char *file) break; dfcopies++; } - switch (sendfile(pp, '\3', last+1, *last, dfcopies)) { + switch (sendfile(pp, '\3', last + 1, *last, dfcopies)) { case OK: if (i) goto again; @@ -977,8 +975,8 @@ sendit(struct printer *pp, char *file) */ fseek(cfp, 0L, 0); while (get_line(cfp)) - if (line[0] == 'U' && !strchr(line+1, '/')) - (void) unlink(line+1); + if (line[0] == 'U' && !strchr(line + 1, '/')) + (void) unlink(line + 1); /* * clean-up in case another control file exists */ @@ -994,11 +992,10 @@ sendit(struct printer *pp, char *file) static int sendfile(struct printer *pp, int type, char *file, char format, int copyreq) { - int i, amt; + char buf[SPL_BUFSIZ], opt_c[4], opt_h[4], opt_n[4]; struct stat stb; char *av[15], *filtcmd; - char buf[SPL_BUFSIZ], opt_c[4], opt_h[4], opt_n[4]; - int copycnt, filtstat, narg, resp, sfd, sfres, sizerr, statrc; + int amt, copycnt, filtstat, i, narg, resp, sfd, sfres, sizerr, statrc; /* Make sure the entire data file has arrived. */ wait4data(pp, file); @@ -1258,12 +1255,12 @@ return_sfres: static void wait4data(struct printer *pp, const char *dfile) { + struct stat statdf; const char *cp; - int statres; - u_int sleepreq; size_t dlen, hlen; time_t amtslept, cur_time, prev_mtime; - struct stat statdf; + unsigned int sleepreq; + int statres; /* Skip these checks if the print job is from the local host. */ dlen = strlen(dfile); @@ -1348,10 +1345,11 @@ wait4data(struct printer *pp, const char *dfile) static int execfilter(struct printer *pp, char *f_cmd, char *f_av[], int infd, int outfd) { + char buf[BUFSIZ]; + char *slash; + FILE *errfp; pid_t fpid, wpid; int errfd, retcode, wstatus; - FILE *errfp; - char buf[BUFSIZ], *slash; fpid = dofork(pp, DORETURN); if (fpid != 0) { @@ -1413,7 +1411,7 @@ execfilter(struct printer *pp, char *f_cmd, char *f_av[], int infd, int outfd) */ dup2(infd, STDIN_FILENO); dup2(outfd, STDOUT_FILENO); - errfd = open(tempstderr, O_WRONLY|O_TRUNC, 0664); + errfd = open(tempstderr, O_WRONLY | O_TRUNC, 0664); if (errfd >= 0) dup2(errfd, STDERR_FILENO); closelog(); @@ -1486,7 +1484,7 @@ banner(struct printer *pp, char *name1, char *name2) static char * scnline(int key, char *p, int c) { - register int scnwidth; + int scnwidth; for (scnwidth = WIDTH; --scnwidth;) { key <<= 1; @@ -1500,12 +1498,12 @@ scnline(int key, char *p, int c) static void scan_out(struct printer *pp, int scfd, char *scsp, int dlm) { - register char *strp; - register int nchrs, j; - char outbuf[LINELEN+1], *sp, c, cc; - int d, scnhgt; + char outbuf[LINELEN + 1]; + char *sp, *strp; + int d, j, nchrs, scnhgt; + char c, cc; - for (scnhgt = 0; scnhgt++ < HEIGHT+DROP; ) { + for (scnhgt = 0; scnhgt++ < HEIGHT + DROP; ) { strp = &outbuf[0]; sp = scsp; for (nchrs = 0; ; ) { @@ -1514,9 +1512,10 @@ scan_out(struct printer *pp, int scfd, char *scsp, int dlm) for (j = WIDTH; --j;) *strp++ = BACKGND; else - strp = scnline(scnkey[(int)c][scnhgt-1-d], strp, cc); - if (*sp == dlm || *sp == '\0' || - nchrs++ >= pp->page_width/(WIDTH+1)-1) + strp = scnline(scnkey[(int)c][scnhgt - 1 - d], + strp, cc); + if (*sp == dlm || *sp == '\0' || + nchrs++ >= pp->page_width / (WIDTH + 1) - 1) break; *strp++ = BACKGND; *strp++ = BACKGND; @@ -1532,8 +1531,7 @@ scan_out(struct printer *pp, int scfd, char *scsp, int dlm) static int dropit(int c) { - switch(c) { - + switch (c) { case TRC('_'): case TRC(';'): case TRC(','): @@ -1543,7 +1541,6 @@ dropit(int c) case TRC('q'): case TRC('y'): return (DROP); - default: return (0); } @@ -1556,11 +1553,10 @@ dropit(int c) static void sendmail(struct printer *pp, char *userid, int bombed) { - register int i; - int p[2], s; - register const char *cp; struct stat stb; FILE *fp; + const char *cp; + int i, p[2], s; pipe(p); if ((s = dofork(pp, DORETURN)) == 0) { /* child */ @@ -1571,7 +1567,7 @@ sendmail(struct printer *pp, char *userid, int bombed) cp++; else cp = _PATH_SENDMAIL; - execl(_PATH_SENDMAIL, cp, "-t", (char *)0); + execl(_PATH_SENDMAIL, cp, "-t", NULL); _exit(0); } else if (s > 0) { /* parent */ dup2(p[1], STDOUT_FILENO); @@ -1600,8 +1596,8 @@ sendmail(struct printer *pp, char *userid, int bombed) break; case FILTERERR: cp = "FILTERERR"; - if (stat(tempstderr, &stb) < 0 || stb.st_size == 0 - || (fp = fopen(tempstderr, "r")) == NULL) { + if (stat(tempstderr, &stb) < 0 || stb.st_size == 0 || + (fp = fopen(tempstderr, "r")) == NULL) { printf("\nhad some errors and may not have printed\n"); break; } @@ -1633,9 +1629,9 @@ sendmail(struct printer *pp, char *userid, int bombed) static int dofork(const struct printer *pp, int action) { + struct passwd *pwd; pid_t forkpid; int i, fail; - struct passwd *pwd; forkpid = -1; if (daemon_uname == NULL) { @@ -1714,7 +1710,6 @@ error_ret: static void abortpr(int signo __unused) { - (void) unlink(tempstderr); kill(0, SIGINT); if (of_pid > 0) @@ -1744,12 +1739,13 @@ init(struct printer *pp) void startprinting(const char *printer) { - struct printer myprinter, *pp = &myprinter; + struct printer myprinter; + struct printer *pp = &myprinter; int status; init_printer(pp); status = getprintcap(printer, pp); - switch(status) { + switch (status) { case PCAPERR_OSERR: syslog(LOG_ERR, "can't open printer description file: %m"); exit(1); @@ -1770,8 +1766,8 @@ startprinting(const char *printer) static void openpr(const struct printer *pp) { - int p[2]; char *cp; + int p[2]; if (pp->remote) { openrem(pp); @@ -1782,7 +1778,7 @@ openpr(const struct printer *pp) * local print queues. For remote machines, all 'of=' * filter processing is handled in sendfile(), and that * does not use these global "output filter" variables. - */ + */ ofd = -1; of_pid = 0; return; @@ -1816,8 +1812,7 @@ openpr(const struct printer *pp) cp = pp->filters[LPF_OUTPUT]; else cp++; - execl(pp->filters[LPF_OUTPUT], cp, width, length, - (char *)0); + execl(pp->filters[LPF_OUTPUT], cp, width, length, NULL); syslog(LOG_ERR, "%s: execl(%s): %m", pp->printer, pp->filters[LPF_OUTPUT]); exit(1); @@ -1837,11 +1832,10 @@ openpr(const struct printer *pp) static void opennet(const struct printer *pp) { - register int i; - int resp; - u_long port; - char *ep; void (*savealrm)(int); + char *ep; + unsigned long port; + int i, resp; port = strtoul(pp->lp, &ep, 0); if (*ep != '@' || port > 65535) { @@ -1874,7 +1868,7 @@ opennet(const struct printer *pp) pstatus(pp, "waiting for %s to come up", pp->lp); else - pstatus(pp, + pstatus(pp, "waiting for access to printer on %s", pp->lp); } @@ -1889,7 +1883,7 @@ opennet(const struct printer *pp) static void opentty(const struct printer *pp) { - register int i; + int i; for (i = 1; ; i = i < 32 ? i << 1 : i) { pfd = open(pp->lp, pp->rw ? O_RDWR : O_WRONLY); @@ -1902,7 +1896,7 @@ opentty(const struct printer *pp) exit(1); } if (i == 1) - pstatus(pp, + pstatus(pp, "waiting for %s to become ready (offline?)", pp->printer); sleep(i); @@ -1918,9 +1912,8 @@ opentty(const struct printer *pp) static void openrem(const struct printer *pp) { - register int i; - int resp; void (*savealrm)(int); + int i, resp; for (i = 1; ; i = i < 256 ? i << 1 : i) { resp = -1; @@ -1930,16 +1923,15 @@ openrem(const struct printer *pp) alarm(0); (void)signal(SIGALRM, savealrm); if (pfd >= 0) { - if ((writel(pfd, "\2", pp->remote_queue, "\n", - (char *)0) - == 2 + strlen(pp->remote_queue)) - && (resp = response(pp)) == 0) + if (writel(pfd, "\2", pp->remote_queue, "\n", NULL) == + 2 + strlen(pp->remote_queue) && + (resp = response(pp)) == 0) break; (void) close(pfd); } if (i == 1) { if (resp < 0) - pstatus(pp, "waiting for %s to come up", + pstatus(pp, "waiting for %s to come up", pp->remote_host); else { pstatus(pp, @@ -1961,7 +1953,7 @@ setty(const struct printer *pp) { struct termios ttybuf; - if (ioctl(pfd, TIOCEXCL, (char *)0) < 0) { + if (ioctl(pfd, TIOCEXCL, NULL) < 0) { syslog(LOG_ERR, "%s: ioctl(TIOCEXCL): %m", pp->printer); exit(1); } @@ -1990,22 +1982,23 @@ setty(const struct printer *pp) static void pstatus(const struct printer *pp, const char *msg, ...) { - int fd; - char *buf; va_list ap; - va_start(ap, msg); + char *buf; + int fd; umask(S_IWOTH); - fd = open(pp->status_file, O_WRONLY|O_CREAT|O_EXLOCK, STAT_FILE_MODE); + fd = open(pp->status_file, O_WRONLY | O_CREAT | O_EXLOCK, + STAT_FILE_MODE); if (fd < 0) { syslog(LOG_ERR, "%s: open(%s): %m", pp->printer, pp->status_file); exit(1); } ftruncate(fd, 0); + va_start(ap, msg); vasprintf(&buf, msg, ap); va_end(ap); - writel(fd, buf, "\n", (char *)0); + writel(fd, buf, "\n", NULL); close(fd); free(buf); } From nobody Mon May 25 17:08:03 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPMlR6spCz6fYhQ for ; Mon, 25 May 2026 17:08: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPMlR4XTKz46dq for ; Mon, 25 May 2026 17:08:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779728883; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k2ZL4yyBHA0T+QPf66kvD2D2D3GBcugOxHstImjRQOM=; b=puqDB5UWBU6h521utK7Pgv7TvE2hCetlAVndo4AnFG+Jk4LDCeBUaV0fCgcK5+Vz5wq9U2 P0ZG+3G+dyfzrylbXUUBeUtjuZfmFHstj4YcuAAdDUsPWuvnoMaZ6En4dqNs/I7dzRitJl uM4rQtViEk9Q7l5dTmIapl7XtaLK/Fq0emOrSsi6M8Ou/ctcABFOpSHPy9p0chyquEx5W5 SSYCJuFeJ0OCU6kZh5yZM87rnRV1H+py3Ysqqwf2NPGAaHPFziDErrUgT9ZRgoYADMxyUs 2yOu3qMPXIOzKw35E751J003/LfBFE3gj4+EJR+B9sjl3duFF1OBfKXaEraAfQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779728883; a=rsa-sha256; cv=none; b=J6arVMs01TYUWDJuhzhT0AEFMOSfPGyiuiMiL2Y87uL5LeWLtX633c7adD7ziEaXeCOySa HJKxB2JPqlM0pd+Xtt48QGDgZz17rCM/G/p6JO+XOCD5pg0MNYGNMm5B2xs1Y94DQTauHm GUGGGcB2I5msSIgtSIsgBYWYaz/pydDhmB34uJGDXNSdAYTPBeDtL9NjcykZVdPThqudpD S+Llpdv5RNPqvisV4jd5quU1fU6S1qCNUjZwutFjDSlPHHDpG+v4n8ujdNVr/8qiv/YpQU r9NcVtdXS8gHIHWkwpLGGHvsylRfUdxhWAWLzN6fm3fIRH3/fLUhDWShn5UlzA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779728883; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k2ZL4yyBHA0T+QPf66kvD2D2D3GBcugOxHstImjRQOM=; b=EnrJVa+9p83O2eQsSaaOcRIshJ4vv6uXdfo2AEGjmUJpLsIMEVtFWi6RmrlHPV1ifnKqp4 WD84OTfqaElqtNHm/HsW6S0UXfO72U3q1UOe0EIvD5xiiNkKQfYrhEIB1rm4pdVmhtgy+L RSv+T5aEvC55la4/c2grQq87+Re2w6uex+lp6YqBSpWu9LTbjVziZZByzal8L+NEtN0kDL AyKNJbsKD6hHP54Wg7NwaxtYrjpGtenirGx7x/rY7pyBmyKzaP4N4ctlYGOWxFUtZJD05o TA1iB9lodayLfYJNoxnWrkLTYAxqI1yPerS1gNw3JOTJBT7yKbU+KRt53djZrA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPMlR473tzr7m for ; Mon, 25 May 2026 17:08:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 388b9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 25 May 2026 17:08:03 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Cy Schubert Subject: git: dcb98d7da008 - Create tag vendor/sqlite3/sqlite-3530100 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/tags/vendor/sqlite3/sqlite-3530100 X-Git-Reftype: annotated tag X-Git-Commit: dcb98d7da0088dea8a8a25a0c6eaf09ded3dd3b9 Auto-Submitted: auto-generated Date: Mon, 25 May 2026 17:08:03 +0000 Message-Id: <6a1481f3.388b9.7f3b39cc@gitrepo.freebsd.org> The annotated tag vendor/sqlite3/sqlite-3530100 has been created by cy: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/sqlite3/sqlite-3530100 tag vendor/sqlite3/sqlite-3530100 Tagger: Cy Schubert TaggerDate: 2026-05-25 17:07:16 +0000 sqlite3: Tag 3.53.1 commit b00eb376e3fb28e738f9370552dae9d92c1fdd76 Author: Cy Schubert AuthorDate: 2026-05-25 17:05:16 +0000 Commit: Cy Schubert CommitDate: 2026-05-25 17:05:16 +0000 sqlite3: Vendor import of sqlite3 3.53.1 Release notes at https://www.sqlite.org/releaselog/3_53_1.html. Obtained from: https://www.sqlite.org/2026/sqlite-autoconf-3530100.tar.gz From nobody Mon May 25 17:08:03 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPMlY08Rxz6fYcM for ; Mon, 25 May 2026 17:08: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPMlX6CRmz46lG for ; Mon, 25 May 2026 17:08:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779728888; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T1nJ8LernX8l5H3QR2SKnMuwhGahSlFN7cVRuuE1fJA=; b=IYRUUdhfaLpMmkoa9KWtI4Xo8TbO4PYxgO9uIgeiPUuzg0G4Tw4+n4UXxKLZgcs6OyFl4A D7jvYPdPkFhbGIv+G/IMPs6e6QGBPnLrz9qhSViOZDqipeRJCsMPTe7gcwQw9JyQM2DNAe lQoHh03u8/ee0v+jt6eUeaEchVC3LoFhxIb6+KedoB8mWs4MRJMwflsE2BjV5aM9hW9Y+o cVExM9kLsGBSx9VwOIp1kj0VPhkXYczE1NJrqE+ceyttW7q6/nsrSxMJ9t/fUwyWJYRTKx VEj+U6MkMLq8SKkk+OFH/Aq0VjwTpIhidK41x9hB9JXpGr/Ry3DHib/45cs0bw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779728888; a=rsa-sha256; cv=none; b=Mv+oGO9gWfMiQEBnWd4ilSUBynBphVdZWaHI+abYWqoQcaoaJnvvIsL16TfivR93cNIhfp DC4UQSvjaPP9fGC7pEE/QsbcGa84EzOwqUNuEvzRGIKxNMRpxTy+RrVuyNppRDTceXb8Bf OEEuPXsRcErUxn0/GhuoXdxXlNZFAXayQ9mQM1vE0BOU5PU8Lj7ImjGd13MM6TNn+0RiG7 Yo5GR/tEDMU5WurQJ52aWMmKjGSFRpXrZiiy3Y8au34zVd7aWfvn/T8KmKDqTjUMAXkV1V FrCCHgu/xP6VJpaXVENohT+dtfpubcxUOyqIr4rZ4Z6FdXs1GJPWW1eWqFxx5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779728888; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T1nJ8LernX8l5H3QR2SKnMuwhGahSlFN7cVRuuE1fJA=; b=D8rqWGwJVDDsdnpHD7yGu1xWB2sgnuJ+/sxN26VGlWcJXyc1ryonntVvr/U+/f4x2bYpPG 1CrYFH6ny+EeRtTgB7bdLOFIKPDPvQr3QKrZd0uo1tWcnGWCRxL1VuzyeyTDTsCWbtMmpo rRX7aIYxIZl8yQzqTTR9skIFv9LjWLXPM8CxOTuB/zQmEsrI3nuEXOlA/hkTlGBd8T/PCp 5Yx46pe4dr2pV01qsHF2YpbZPHqwjz2g1zmaIAT0A7NmFj35D4U9FNGxerjRHCkQXX8xCC lHELO6Uod0hbxFRlo9um0Uioe2xfqgQhTtr5ID3iU+jP5GE/fn7j+6PPq5DMBA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPMlX4Zj3zqfS for ; Mon, 25 May 2026 17:08:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 348e1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 25 May 2026 17:08:03 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Cy Schubert Subject: git: e7e917ee3cf2..b00eb376e3fb - vendor/sqlite3 - vendor branch updated List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/vendor/sqlite3 X-Git-Reftype: branch X-Git-Commit: b00eb376e3fb28e738f9370552dae9d92c1fdd76 X-Git-Oldrev: e7e917ee3cf2b3010b1c511c6ebaf8b65b983ad7 X-Git-Newrev: b00eb376e3fb28e738f9370552dae9d92c1fdd76 Auto-Submitted: auto-generated Date: Mon, 25 May 2026 17:08:03 +0000 Message-Id: <6a1481f3.348e1.3beae2cf@gitrepo.freebsd.org> The branch vendor/sqlite3 has been updated by cy: URL: https://cgit.FreeBSD.org/src/log/?id=e7e917ee3cf2..b00eb376e3fb b00eb376e3fb sqlite3: Vendor import of sqlite3 3.53.1 From nobody Mon May 25 19:10:47 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPQT52YQSz6fmYb for ; Mon, 25 May 2026 19:10: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPQT43MFnz4NQh for ; Mon, 25 May 2026 19:10:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779736248; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G7wEHgfCagMcOwNhB+iY81CC32utVWdFwt5NUk0vxvY=; b=QGmBHF1HK1ksepgwvXugj/Qq5TWxbP8RUsGOiXIVDvqm4rcfOCH/q2QExi/OU+coW+tAjF YIugvnHU48CuyrVmmzEbkWVyg4qNKWAMvgyjvUd7VglDUlFsLZzqHhtWDWzwl/sDTiVieT e5sBFHg4slMHPyM59yUKxOfBLpOSQktAEg6476OlhF3zJMe4Ef76ez/gOe809b4omH84Ot PXBnlXX/HccxMlIFx0P/UVdgsPZsraEsNFO9yhf+bta8viFmWXaBHQJQyF/zoiyz2rCB6Y CoN7LmXsuZ9pgy+dgq4lfCYBYImOKeJZVEjRRG5jfvY5Z6IJww/8EujlizpOag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779736248; a=rsa-sha256; cv=none; b=lSN7hA0PiIGCfwi1gslZX/nDgXap2oXvn3aBS1urowVDYFDflRFnlQz2uRtLe0knDk2Lfv W9LkajA3g2ZWRTocYwanb8oyA3G5H+1aDBr/WWyDHb/sztSgS/TvH3kSGTGowLi21ezu2T 2vY/iuSS0cFzgJVdpikyt43XkS15JpsFwW6qbxkmDpOXDbSjjtoa01hr1gvik01uDg9L9y EnluLXSTgDM86lMHnf+FxCIOjlr8YnkYAtRqfVa83V/mjBC8LIQ9CwKXcrF79bEVyGO3Ms E/zQDPcg1yNNRCCSN6Fs6ISaKk8CTMAd9BKKa7ZE9/P1II50NIzEC/gb/6xn+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779736248; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G7wEHgfCagMcOwNhB+iY81CC32utVWdFwt5NUk0vxvY=; b=P7hm/9/0Bl2emF7FVZRg8tWRF2JfR8Sta0suVxctHCifuFrlo2knLH3oXFZ4DyQ24XHSzQ IIpgqFb8A/XTIYSpQCSCK/6AapuG8osw11/6okChftqEGhJOJ0Mg2JmagXoAYTONowxDHW WGdoKjn36qI192AqvKrdyhF79SLCeVIYQPobyk+B3nZi4egUcE29U6bR4VZZ8FGog5ilrh YO9Jt6GtWQkiEs/QHxEnKHvlITRETOjlcb+nvaHR0QVOk5ew4JSOboONH+hlTy4x+oHoXd FHIlQ71zKGH63yANHuAahegPZZ++tqUQ5LuvSIghL+JS8ko7KqROOxCvMCbcLw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPQT42qvpztpX for ; Mon, 25 May 2026 19:10:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 44c66 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 25 May 2026 19:10:47 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: 5b8f59e64843 - main - sqlite3: Vendor import of sqlite3 3.53.1 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5b8f59e648431715e8f5f60ef09c0be4508b3ae6 Auto-Submitted: auto-generated Date: Mon, 25 May 2026 19:10:47 +0000 Message-Id: <6a149eb7.44c66.73d11f1c@gitrepo.freebsd.org> The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=5b8f59e648431715e8f5f60ef09c0be4508b3ae6 commit 5b8f59e648431715e8f5f60ef09c0be4508b3ae6 Merge: 123591e41c55 b00eb376e3fb Author: Cy Schubert AuthorDate: 2026-05-25 17:19:28 +0000 Commit: Cy Schubert CommitDate: 2026-05-25 17:19:28 +0000 sqlite3: Vendor import of sqlite3 3.53.1 Release notes at https://www.sqlite.org/releaselog/3_53_1.html. Obtained from: https://www.sqlite.org/2026/sqlite-autoconf-3530100.tar.g Merge commit 'b00eb376e3fb28e738f9370552dae9d92c1fdd76' into sqlite3 contrib/sqlite3/Makefile.in | 11 +- contrib/sqlite3/Makefile.msc | 107 +- contrib/sqlite3/VERSION | 2 +- contrib/sqlite3/autosetup/README.md | 19 +- contrib/sqlite3/autosetup/autosetup | 18 +- contrib/sqlite3/autosetup/cc-shared.tcl | 10 +- contrib/sqlite3/autosetup/jimsh0.c | 47 +- contrib/sqlite3/autosetup/proj.tcl | 579 +- contrib/sqlite3/autosetup/sqlite-config.tcl | 259 +- contrib/sqlite3/autosetup/teaish/core.tcl | 141 +- contrib/sqlite3/autosetup/teaish/tester.tcl | 71 +- contrib/sqlite3/make.bat | 2 + contrib/sqlite3/shell.c | 21437 +++++++++++++++----------- contrib/sqlite3/sqlite3.1 | 28 +- contrib/sqlite3/sqlite3.c | 16223 +++++++++++++------ contrib/sqlite3/sqlite3.h | 946 +- contrib/sqlite3/sqlite3ext.h | 16 + contrib/sqlite3/sqlite3rc.h | 2 +- contrib/sqlite3/tea/Makefile.in | 84 +- contrib/sqlite3/tea/README.txt | 18 +- contrib/sqlite3/tea/_teaish.tester.tcl.in | 3 +- contrib/sqlite3/tea/configure | 17 +- contrib/sqlite3/tea/doc/sqlite3.n | 15 - contrib/sqlite3/tea/generic/tclsqlite3.c | 562 +- contrib/sqlite3/tea/teaish.tcl | 10 +- 25 files changed, 25692 insertions(+), 14935 deletions(-) diff --cc contrib/sqlite3/make.bat index 000000000000,2dc9b61c0e18..2dc9b61c0e18 mode 000000,100644..100644 --- a/contrib/sqlite3/make.bat +++ b/contrib/sqlite3/make.bat From nobody Mon May 25 19:17:08 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPQcT51LPz6fn9j for ; Mon, 25 May 2026 19:17:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPQcT4TxJz4PbZ for ; Mon, 25 May 2026 19:17:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779736633; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vuN+DtgiAMCkijhCLElpw0aHYnvgW1OSXOFp/ZPDRhg=; b=BGx8qazXanerGTnkWP6Ip7yjRv/1aiLIH28Z/OOF0qjtNpJn2hguDrzSc7/GqQqhGCF3Qb CMhbpf4lCkxUH9K4TJRJ167uGQk3ZYZZFJIp+e/loelmlQjVgA37kRHy2UuPCogL8daEqf lZEuHTOIYE/MZ+LYxyf+iYH5ltb/kgpedADRc52zmnaDznrZBy+xTNDkUSXYn5HVi+WCEk nu8tMeppzJ+g9sQ8xGrsSjD0Rz0a2lg64ynS0Mr4nDNqppf8o6a7+oW99noReka7144111 OxvAB/bAByNmVjuixGDE7ud6Pd3/So3AMgzPkU3WJK0vxhgcRpN2r8M8z9M6KA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779736633; a=rsa-sha256; cv=none; b=UU2dvXmBfyniuv9AM3hAfl8Q631q9CV6Tbn3uea5bIYS0FEU7UxfL2mun+ZbzvtEk4UKjH 2Sne1shcmM/IsEPw+B2SyrvamvkYzvwx71s696k8cb7kWiRFA8SHg7hpKCZG6QqjII7aqc cHbVb150nnrnsCx6F4yLQX+pQm76IMQLaI3zNZu1QFAm6FUaMnGPLW2qRYhoood8xCveNC 9ZRP21vf7NDMh2V96AjLwuS0KBRK4fFdYRvNNAuLtCxfHCrYsPClrtC7HGhdtBr1k5l4o3 8X+dc8y983CIXhvdKenjVI3YUwJQv0im8bECiwmmo2lj9AJ5z/rHCayEUEbJtg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779736633; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vuN+DtgiAMCkijhCLElpw0aHYnvgW1OSXOFp/ZPDRhg=; b=JN/fm1vSAegBnKx+RKwXIrRs3kjvMzB5q39ElsCOaHhLv7DFOGs5IVvoNBr4AXocufTU79 hITB9Q7evbQ9sFlOuM4SDPa+yyLUlIcP7c6Se2Bz5aJoNFM5pwgoKlRWX0BAg4soORduyq 7OXxCtGUqZkkuIxHYseqr/3N81FpXkZInOpxxaSOtjT5PxQK0lnm2Uyh/BmQQZMhGILPZv Rk8Za1HOa4ScIQdxaxYK9rQB0RThjRPwdIc1XpFWH5iT23+Byb4bpipBRQ457zvNJDu2xr Fls2u0+giDT2e/3bGGyRyt7Pokzv8IK8C0aatGBRKBrfzZ8luwamEKArZgh3xw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPQcT45PmzvZ7 for ; Mon, 25 May 2026 19:17:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4547b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 25 May 2026 19:17:08 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jilles Tjoelker Subject: git: be9f35396449 - main - Revert "sh/tests: Cut down builtins/read12.0 by 2 seconds" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jilles X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: be9f35396449129ebe952fdd1c080f7856dee030 Auto-Submitted: auto-generated Date: Mon, 25 May 2026 19:17:08 +0000 Message-Id: <6a14a034.4547b.382fad18@gitrepo.freebsd.org> The branch main has been updated by jilles: URL: https://cgit.FreeBSD.org/src/commit/?id=be9f35396449129ebe952fdd1c080f7856dee030 commit be9f35396449129ebe952fdd1c080f7856dee030 Author: Jilles Tjoelker AuthorDate: 2026-05-25 19:15:51 +0000 Commit: Jilles Tjoelker CommitDate: 2026-05-25 19:16:52 +0000 Revert "sh/tests: Cut down builtins/read12.0 by 2 seconds" Dag-Erling Smørgrav does not like this, but I do not understand why. This reverts commit 1df431576f99c3cc26dd4ceb1a6eda864cc9f196. --- bin/sh/tests/builtins/read11.0 | 3 +-- bin/sh/tests/builtins/read12.0 | 14 ++++++-------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/bin/sh/tests/builtins/read11.0 b/bin/sh/tests/builtins/read11.0 index e57dfdbc0ea4..07bd3e70644c 100644 --- a/bin/sh/tests/builtins/read11.0 +++ b/bin/sh/tests/builtins/read11.0 @@ -27,7 +27,6 @@ ts=$(date +%s%3N) read -t 0 v <&3 || r=$? te=$(date +%s%3N) kill -TERM "$!" || : -[ "$r" -gt 128 ] -[ "$(kill -l "$r")" = ALRM ] +[ "$r" -gt 128 ] && [ "$(kill -l "$r")" = ALRM ] [ $((te-ts)) -lt 250 ] [ -z "$v" ] diff --git a/bin/sh/tests/builtins/read12.0 b/bin/sh/tests/builtins/read12.0 index 3b501a56392b..4551555adfed 100644 --- a/bin/sh/tests/builtins/read12.0 +++ b/bin/sh/tests/builtins/read12.0 @@ -1,5 +1,5 @@ -# Verify that `read -t 1 v` succeeds immediately if input is available -# and times out after 1 s if not +# Verify that `read -t 3 v` succeeds immediately if input is available +# and times out after 3 s if not set -e @@ -15,7 +15,7 @@ exec 3 To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 1df431576f99 - main - sh/tests: Cut down builtins/read12.0 by 2 seconds Message-ID: References: <6a120625.45836.5e8588e2@gitrepo.freebsd.org> <86h5nx3e8b.fsf@ltc.des.dev> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <86h5nx3e8b.fsf@ltc.des.dev> X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:60781, ipnet:85.17.0.0/16, country:NL] X-Rspamd-Queue-Id: 4gNqBZ1vKsz3pJ7 X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated On Sun, May 24, 2026 at 01:20:20AM +0200, Dag-Erling Smørgrav wrote: > Please revert the non-functional parts of this change. Please explain what you are worried about in the change. Is this about false positives or false negatives? -- Jilles Tjoelker From nobody Mon May 25 19:22:18 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPQkP2SCXz6fnrV; Mon, 25 May 2026 19:22:21 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mail03.stack.nl (lw02.stack.nl [85.17.116.62]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) client-signature ECDSA (prime256v1)) (Client CN "adm.stack.nl", Issuer "E8" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPQkN70Bwz3Bns; Mon, 25 May 2026 19:22:20 +0000 (UTC) (envelope-from jilles@stack.nl) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=stack.nl; s=mail; t=1779736940; bh=goyPFQULQHDqFg/f3IB7JWEdtR+O/sNUZdImT3jID0k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=SSvbEzhMyX6w8cW9JAaZfyvupKyCR5XXp4QlRBEKfbiYyT9+a9TZ7bP6wuF5hlYhg bEVAT3wu1wCkMgt35rFlfyrlrueQNsH2SdQgBOtXf4Hsygt5nAk+L7tllzFPj/hzYe f99KqriK0kfh3jBb2H4J5j6pvyGhwHC4V7NWPRACw4BNg2zOi6eJJGHAeFRgRC+gyy 9gxfTMoCTVjkqOMmlY4qE0O243HYlMBHHPUH+bnhBjSqn125Y+zzUwD1pzxcNw1rl4 aYKkkszN91Hv1COxTfvaSirgPDpj+mEUh5bRiUDZOxspa53mBAzU5bpGW/s6zZ7Zhu kTIliwR9Srt+Q== Received: from localhost (localhost.localdomain [127.0.0.1]) by mail03.stack.nl (Postfix) with ESMTP id 1A112A2510; Mon, 25 May 2026 21:22:20 +0200 (CEST) Received: from mail03.stack.nl ([127.0.0.1]) by localhost (mail03.stack.nl [127.0.0.1]) (amavis, port 10024) with ESMTP id jGWCx4ApwB4V; Mon, 25 May 2026 21:22:18 +0200 (CEST) Received: from blade.stack.nl (unknown [95.211.93.133]) by mail03.stack.nl (Postfix) with ESMTPS id 6A0CCA224D; Mon, 25 May 2026 21:22:18 +0200 (CEST) Received: by blade.stack.nl (Postfix, from userid 1677) id 5D47580513; Mon, 25 May 2026 21:22:18 +0200 (CEST) Date: Mon, 25 May 2026 21:22:18 +0200 From: Jilles Tjoelker To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 1df431576f99 - main - sh/tests: Cut down builtins/read12.0 by 2 seconds Message-ID: References: <6a120625.45836.5e8588e2@gitrepo.freebsd.org> <86h5nx3e8b.fsf@ltc.des.dev> <865x4c2bfn.fsf@ltc.des.dev> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <865x4c2bfn.fsf@ltc.des.dev> X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:60781, ipnet:85.17.0.0/16, country:NL] X-Rspamd-Queue-Id: 4gPQkN70Bwz3Bns X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated On Mon, May 25, 2026 at 09:30:36AM +0200, Dag-Erling Smørgrav wrote: > Jilles Tjoelker writes: > > Dag-Erling Smørgrav writes: > > > Please revert the non-functional parts of this change. > > Please explain what you are worried about in the change. Is this about > > false positives or false negatives? > The purpose of a test is to reliably fail if the functionality it tests > is broken. Your change turns my test from one that is fairly certain to > fail if the timeout functionality is broken to one that has a reasonable > chance of passing regardless. What's more, you justify the change with > a logical argument so fallacious that you _still_ refuse to explain it. > All that just to save yourself a couple of seconds once in a while, even > after I showed you how to save much more than two seconds simply by > enabling parallelism. Please revert, or I will. I have reverted the entire commit. Let's leave it as is until I understand what the problem is. -- Jilles Tjoelker From nobody Mon May 25 19:24:11 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPQmd0GHkz6fp1n for ; Mon, 25 May 2026 19:24:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPQmc5YKRz3Cdw for ; Mon, 25 May 2026 19:24:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779737056; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hYTw3KEaPEJmatBtVlWF9DFktpFhfhaCO/kUfSwR3g4=; b=fpyIT9763Ko0+y09o9+o3J1aPX/2gcwzlHmDrNmYVGwMFeRLudJm7WrMaYZc7+SMbHb58h WFMW9ktzQSKpF6IDTgBUWQgTo/0qPzqkIW7Csz9TOlSzw42sNTQG4y6XMqf95Abg8nQQey FelrFdvKfRJQ20ECZMzLaviVL4h2D7nQlF+9AN+t+AFISa7lv3xGbnuVNO/ADvcHhDwbbd 9CxTHXOSDS/g6dKVqJJnefUQg7G8MsZPVZ0QTabqfkkfrJYpWw1aW9fSBX+D/xjssy2ebU rnViPvSyG/L53qpyYGwKpvaemWcEK/R1VwYBxQilRr4ZWe6wlirYRl0ae1P4IA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779737056; a=rsa-sha256; cv=none; b=Q2EndqgdOsf3InOBKlnyDgCHAC6LLaJRN0BrThBcXU4zUOECXrbGaLBAQV4NMdEc2fbgAn kLGFqllEOUIBbFvmFZmgopzmXLVaYWNfxCoDRd6eyGVe9cwqq11/CiV1p9KjFZmR7RdHxE DcFr2l5N+on4+p0YJeMMiF/LvCRn1HcdlJ1OPLM9MTHwrmfjl5zblTsGcTSq5+4TVCG5Ek IdXLjQ4D+8KjOqfl12T1ZO9/gwfI+7d0jfu/V6YDG+7bMxxtONRUOXUHDciekjTw6bNyOT /6QqjoWxyfCnlnECxos1Nr35PK3zTw5l9SIIMjXAlMKro/Oi2f354Z6RDSEYsA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779737056; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hYTw3KEaPEJmatBtVlWF9DFktpFhfhaCO/kUfSwR3g4=; b=cJqtl+1YhkAV1N3PJbwLtIylcF9yvT1F6wI95cSb6/A/0R7qiGOTUSQDow6Vi08ZiMuq9t w5f1GEVSf7jlsfItqgUQ3BGucQ7Tfmuq9rmAVligkXb5zmXS6a3mbZw8L6oyOvQ6R1alS8 6bV+4vufPV9bI0vGmsLhoo4z0obOhBmzDGQE6BcMCPYYlQ67cdUkMUuK0QsxbGIxukhkha J4ZJGL2cOl7Ocq6kuIJnxyPIlIa0xz8IcRRgJjRVkjwJHWO8kiUotdJMOab5AFWEoG5VXB b8qng4Q3KrYxOdSF6LZ4cdZmvBWpEpjClXi2lu0OTZ5SRa5vKJJpUdqfdNwY0A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPQmc4mzRzvL8 for ; Mon, 25 May 2026 19:24:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4593c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 25 May 2026 19:24:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: 4d80d4913e79 - main - nfs: Fix argument typo to avoid a crash List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4d80d4913e79c8b5918b1f04c1c7b38e6c76b9b4 Auto-Submitted: auto-generated Date: Mon, 25 May 2026 19:24:11 +0000 Message-Id: <6a14a1db.4593c.687b0e74@gitrepo.freebsd.org> The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=4d80d4913e79c8b5918b1f04c1c7b38e6c76b9b4 commit 4d80d4913e79c8b5918b1f04c1c7b38e6c76b9b4 Author: Rick Macklem AuthorDate: 2026-05-25 19:22:32 +0000 Commit: Rick Macklem CommitDate: 2026-05-25 19:22:32 +0000 nfs: Fix argument typo to avoid a crash A typo resulted in the wrong argument for a bytewise comparison that could result in a crash if the incorrect argument was not a valid pointer. This patch fixes the argument. While investigating this, I noticed that the correct argument was not being filled in as required, so this patch fixes that, as well. Somehow, recovery from a NFSv4.1/4.2 server crash worked during testing, so this was not detected. The bug/patch only affects NFS client mounts using NFSv4.1/4.2. PR: 294925 Reported by: Jov MFC after: 3 days --- sys/fs/nfs/nfs_commonkrpc.c | 5 +++-- sys/fs/nfs/nfs_commonsubs.c | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/fs/nfs/nfs_commonkrpc.c b/sys/fs/nfs/nfs_commonkrpc.c index 9ea4e5f4c9df..2d4c41994c0e 100644 --- a/sys/fs/nfs/nfs_commonkrpc.c +++ b/sys/fs/nfs/nfs_commonkrpc.c @@ -1265,8 +1265,9 @@ tryagain: goto out; } sep = NFSMNT_MDSSESSION(nmp); - if (bcmp(sep->nfsess_sessionid, nd->nd_sequence, - NFSX_V4SESSIONID) == 0) { + if (bcmp(sep->nfsess_sessionid, + nd->nd_sessionid, NFSX_V4SESSIONID) == 0 && + sep->nfsess_defunct == 0) { printf("Initiate recovery. If server " "has not rebooted, " "check NFS clients for unique " diff --git a/sys/fs/nfs/nfs_commonsubs.c b/sys/fs/nfs/nfs_commonsubs.c index b5f83a98b307..a11b55b11c43 100644 --- a/sys/fs/nfs/nfs_commonsubs.c +++ b/sys/fs/nfs/nfs_commonsubs.c @@ -368,6 +368,7 @@ nfscl_reqstart(struct nfsrv_descript *nd, int procnum, struct nfsmount *nmp, * First, fill in some of the fields of nd. */ nd->nd_slotseq = NULL; + NFSBZERO(nd->nd_sessionid, NFSX_V4SESSIONID); if (vers == NFS_VER4) { nd->nd_flag = ND_NFSV4 | ND_NFSCL; if (minorvers == NFSV41_MINORVERSION) @@ -5348,6 +5349,7 @@ nfsv4_setsequence(struct nfsmount *nmp, struct nfsrv_descript *nd, NFSM_BUILD(tl, uint32_t *, NFSX_V4SESSIONID + 4 * NFSX_UNSIGNED); nd->nd_sequence = tl; bcopy(sessionid, tl, NFSX_V4SESSIONID); + bcopy(sessionid, nd->nd_sessionid, NFSX_V4SESSIONID); tl += NFSX_V4SESSIONID / NFSX_UNSIGNED; nd->nd_slotseq = tl; if (error == 0) { @@ -5593,6 +5595,7 @@ nfsrpc_destroysession(struct nfsmount *nmp, struct nfsclsession *tsep, 0, NULL); NFSM_BUILD(tl, uint32_t *, NFSX_V4SESSIONID); bcopy(tsep->nfsess_sessionid, tl, NFSX_V4SESSIONID); + bcopy(tsep->nfsess_sessionid, nd->nd_sessionid, NFSX_V4SESSIONID); nd->nd_flag |= ND_USEGSSNAME; error = newnfs_request(nd, nmp, NULL, &nmp->nm_sockreq, NULL, p, cred, NFS_PROG, NFS_VER4, NULL, 1, NULL, NULL); From nobody Mon May 25 19:46:46 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPRGh596qz6fqVm for ; Mon, 25 May 2026 19:46:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPRGh23cQz3FKf for ; Mon, 25 May 2026 19:46:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779738412; 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=Vgo97L2H3lbOG2iLJGLZhuneJ7iJEQS9R4OrIUQdA3E=; b=tyRt31U54OR58+Jc8IaIAHxtvgUHPiWT90NTL/2Y8P9qZNtQVQGl4ZUuDPn9fstpp7Xg6w FR3WSvhNnU2Fbwea1h/dtX/GN8O8FWt4i9FWeCmjzO+fdST4gKMIw3HK1skYUFrwY/aBb/ qQU20BDx4srBe4/TBPa4bJjZCXQvuw11OweAgCllRv6y132i+92jnsP6/sJ6wXmPjJlYpS SKdL4WEt7VGip30Cg0ZHIkvTmeiSnFijKf35iCPfN16DNNF4MPIfiq5lI9mRlKYFc1CA1S zrQx/ZK+fRKJy3xO5Hch/8vhGkHtpxlciU9woyiBGKcunffSCdO2MlKIDkYh8w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779738412; a=rsa-sha256; cv=none; b=T4Xbe3VVZlDEc9tZbpcRlEAvLRjDCpSgBTyWpDNwyVhuZpYhkkm4A5kNNMqhUgnug//gX4 9Fb9V/1CnFBwUme6pMHVO2G+FfW0LG1lyIZ9eV/xgCvqwwzYcu6mEUcT+mn0ISfaqV4AIR zTKgUNqH6Fjlx+1AlEQ3BBAm1JmOgTI97KUAcDgPqt/rrwNINgYoi1cRGHhQy9ScMk6OZk 4HuiWU+bgukPkZ3YY0fa4vWwfActr/ICzgP1R1uMtnuVQ9gSQ4yqpEzqhVRSYjyvq0KEa/ 0jh/urChTsmQAOQXSjqNoYG9NgEI/MlKd4TEMhSlTPKGEvn4tfQPaicdnLRPTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779738412; 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=Vgo97L2H3lbOG2iLJGLZhuneJ7iJEQS9R4OrIUQdA3E=; b=asm+2YScZ8CZAI3JNPH2mhdE6Apd4hgxAA1Ba/KLO79ME8/cxrq1BfovAGc3/7y/zrcpEs z5G4lqHq9CTJJA0KhE5AbUxD1nEFT/z1wu4muBJGpdcw6z4NnHZhPoI/10BuvB+xirMyC7 7bHfHK2NjAPDOJyRxOnxd88URQyRTSQjg98yXyt5Dn4NXFkmYo0vxpgCqA/E0mmBihf+wA Pt6BIS2WWVxeP5zD37CRHHlap4un3kPiBvGNEA4xC5hYF3dBaZCO+iXqrwTaJa/zZLPRBr aFKeTr9J43hbWNxJp43rt5CAxI6xheO4Ki9G05UmlzY439ZPDZf195mpEi4Xzw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPRGh0TYxzwJd for ; Mon, 25 May 2026 19:46:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 458d4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 25 May 2026 19:46:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Peter Eriksson From: Rick Macklem Subject: git: 6e7c10c79dea - main - acl_id_to_name.c: Fix printing of uids and gids List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6e7c10c79deac3c6bb6ad3bd12c8e0ad68bb59f0 Auto-Submitted: auto-generated Date: Mon, 25 May 2026 19:46:46 +0000 Message-Id: <6a14a726.458d4.9729153@gitrepo.freebsd.org> The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=6e7c10c79deac3c6bb6ad3bd12c8e0ad68bb59f0 commit 6e7c10c79deac3c6bb6ad3bd12c8e0ad68bb59f0 Author: Peter Eriksson AuthorDate: 2026-05-25 19:44:41 +0000 Commit: Rick Macklem CommitDate: 2026-05-25 19:44:41 +0000 acl_id_to_name.c: Fix printing of uids and gids uid_t and gid_t are uint32_t (unsigned 32bit integers). They are printed as signed integers when calling getfacl (and other tools using the acl_to_text() libc function). This causes uid/gids larger than 2G (214783648) to print as negative numbers - which causes problem with setfacl since the acl_from_text() libc function fails on negative numbers. Reviewed by: rmacklem MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D57179 --- lib/libc/posix1e/acl_id_to_name.c | 4 ++-- lib/libc/posix1e/acl_to_text_nfs4.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/libc/posix1e/acl_id_to_name.c b/lib/libc/posix1e/acl_id_to_name.c index 78e050a8648a..c90e6083cca1 100644 --- a/lib/libc/posix1e/acl_id_to_name.c +++ b/lib/libc/posix1e/acl_id_to_name.c @@ -67,7 +67,7 @@ _posix1e_acl_id_to_name(acl_tag_t tag, uid_t id, ssize_t buf_len, char *buf, else p = getpwuid(id); if (!p) - i = snprintf(buf, buf_len, "%d", id); + i = snprintf(buf, buf_len, "%ju", (uintmax_t)id); else i = snprintf(buf, buf_len, "%s", p->pw_name); @@ -83,7 +83,7 @@ _posix1e_acl_id_to_name(acl_tag_t tag, uid_t id, ssize_t buf_len, char *buf, else g = getgrgid(id); if (g == NULL) - i = snprintf(buf, buf_len, "%d", id); + i = snprintf(buf, buf_len, "%ju", (uintmax_t)id); else i = snprintf(buf, buf_len, "%s", g->gr_name); diff --git a/lib/libc/posix1e/acl_to_text_nfs4.c b/lib/libc/posix1e/acl_to_text_nfs4.c index 157215c9dd52..4f19f3a9a7b2 100644 --- a/lib/libc/posix1e/acl_to_text_nfs4.c +++ b/lib/libc/posix1e/acl_to_text_nfs4.c @@ -69,7 +69,7 @@ format_who(char *str, size_t size, const acl_entry_t entry, int numeric) else pwd = NULL; if (pwd == NULL) - snprintf(str, size, "user:%d", (unsigned int)*id); + snprintf(str, size, "user:%ju", (uintmax_t)*id); else snprintf(str, size, "user:%s", pwd->pw_name); acl_free(id); @@ -89,7 +89,7 @@ format_who(char *str, size_t size, const acl_entry_t entry, int numeric) else grp = NULL; if (grp == NULL) - snprintf(str, size, "group:%d", (unsigned int)*id); + snprintf(str, size, "group:%ju", (uintmax_t)*id); else snprintf(str, size, "group:%s", grp->gr_name); acl_free(id); From nobody Mon May 25 20:35:25 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPSLq0pbCz6fwf1 for ; Mon, 25 May 2026 20:35: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPSLq0KgJz3Kf4 for ; Mon, 25 May 2026 20:35:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779741331; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wVe2Yx3MQ7bOFlRIDN3T/NkNCIgipMPdBoM4m4ftGHs=; b=JiEl2VrgpsC3Hyn1mcSUQseXI9fT0jdkaqUSigv5tqewy+NJxsBFOe+KnKPeoscaf/a3dz 0H7jWcMy9sr/0xfOCSB8BmOSN313z0G3IksGuI4N/4iMKvizqcu6C5ggl/y6OHpOZE/MqA f59wghjrK8fbAzR3LlVHTRral/o3MRFYIwyzq4rrt3KSiFF2zWg8FQOBApGRYMW3uFe4by ySRIHBdPXoZDjtQ0W+IjMNK4uhl84zJLqQmdbFW2QG0i9+5qVrhG3ahEdY6kWzdfHdWzE2 b/ygmKx1eZu4RzW/If+5oRGOPaUqVSA21afxNeF50XSL8zgL56v0f10PFDVFAg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779741331; a=rsa-sha256; cv=none; b=SSDsDh2i9ajPef67JjNVWXEd/+ELnZ3SKPL44KnX0mg/aAqLYzjRt367wGHuVZZuuqCyHa tMFZIueo0xwIwNcdCgIFdnkokG4KtiL6Yg/TQiZAED62376AjPQq1wR4Uygulxa4lrItze gyJYkApc9obSXH9VFxUQdLttg5u6h1MuUB2Sbp65FYR1joG5dwHDE0wU5aHf2fmlV38ndn ezxW7zzJ3LEq1JkK035CN6oVnnBGdQxN3QIk8Is9eEGJ/rI9AGNGuaqB1oTsJ/6GqGLHMn kK+DPl9QbvxU+sLdvhq7tE1MARrbR70qwVApobTP6n93DwIdQDfQrGGOms9KJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779741331; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wVe2Yx3MQ7bOFlRIDN3T/NkNCIgipMPdBoM4m4ftGHs=; b=oyCa0uQ9n6xNRIM6FAJQm7SXq5KarWRJyYPlaoJ3OKYudbnysPEBvL+T5FkZjc6mdsfkW9 Vn66QPIBJ7ThH9xPxmkz1IZg2EeBOxdhI8ip2FeGFKY2BVDiCIkp3aP79vwPBsWzhRveR1 deF1E0hkyPJ5XroF8F4K+9or6bO3SFlwJ9z7BTqv+b7VFdAQuep8t+uekITEyhM8NzF+iW Dua5PbIHSTdI5shDRL3zYjL8hMqWFaSTizewVnSQrjKVV37H8X/S2bpYciLo1vImtJcCYR qXoGrZr3kEn/CFO/cvfAjQdfzHOJv2AE9/gbMRbf2QIwyL2iS4ElXRA9ux3+Xg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPSLp71YtzxS9 for ; Mon, 25 May 2026 20:35:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1dbf1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 25 May 2026 20:35:25 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Gallatin Subject: git: b97ee5e9ce7b - main - hwpmc: Avoid panic on AMD cpus where IBS is not available List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gallatin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b97ee5e9ce7b5598be596ef51872c1136b20cf88 Auto-Submitted: auto-generated Date: Mon, 25 May 2026 20:35:25 +0000 Message-Id: <6a14b28d.1dbf1.3ad6d51a@gitrepo.freebsd.org> The branch main has been updated by gallatin: URL: https://cgit.FreeBSD.org/src/commit/?id=b97ee5e9ce7b5598be596ef51872c1136b20cf88 commit b97ee5e9ce7b5598be596ef51872c1136b20cf88 Author: Andrew Gallatin AuthorDate: 2026-05-25 20:33:52 +0000 Commit: Andrew Gallatin CommitDate: 2026-05-25 20:33:52 +0000 hwpmc: Avoid panic on AMD cpus where IBS is not available The recent IBS work intruduced a bug on older CPUs where the IBS handler will be called on NMIs even when IBS is not initialized. Work around this in the IBS handler by checking to see if ibs_pcpu is NULL before accessing it. --- sys/dev/hwpmc/hwpmc_ibs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/dev/hwpmc/hwpmc_ibs.c b/sys/dev/hwpmc/hwpmc_ibs.c index 8cfe7b2df145..ae14f2ccb14c 100644 --- a/sys/dev/hwpmc/hwpmc_ibs.c +++ b/sys/dev/hwpmc/hwpmc_ibs.c @@ -510,6 +510,9 @@ pmc_ibs_intr(struct trapframe *tf) int retval, cpu; uint64_t config; + if (ibs_pcpu == NULL) + return (0); + cpu = curcpu; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[ibs,%d] out of range CPU %d", __LINE__, cpu)); From nobody Mon May 25 23:39:23 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPXQz4HJXz6gKFD for ; Mon, 25 May 2026 23:39: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPXQz13tsz3j5R for ; Mon, 25 May 2026 23:39:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779752363; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X/uL2F+RIGCc96O8k9jZrug8ZN/jvjOPyruyt1XnM+o=; b=OLT8WqL4Bjvl9tjfZwKlXGgxbVpYsC7pFB8EuLX838MS5STmqMzR1T+9JEsjnbZMH2rBuB /K4TIMnR8YvNPPsC46dAk6sv7qNx0DvVwieDVPz7z/UbEluaEIXpncYjyciYZpLkVLrfcb /DwVqJWGiYtMBh85mTq0Giz/mI81YzflBk7DPtfFWrd0SzJHAhNjTjljiBOmwvrqaS4o2n g0q8jNcszZqKNnXycOdGzxCbhuSnV7j25ObJBC2gHBIKc20f9cjrrbN/QJzN8+PQX44TLb acfJw2+m89dlMUIozErk8MuFrNAN+5LJIO57xmhYtS5dsRpWxZK7nXBaRMIK0g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779752363; a=rsa-sha256; cv=none; b=qBvlGSBD2NR9IxAu+L5BLOK9nEfZP3AGWI8gs7+uhCto1Es3R4bMHwDCB7CFMuXHjgAxJ0 ZnYUh48mlu7NgxqQ19kUM7tqT1Va08mF1CshWyvU4qs/a1lgUJY56M/UGHCCDglyu6RIjb 74C0e/bPfAhAa4FOGzRxvgc9haW0k+rNSHrsyxxXNTFG1x8Epm650cSH/Jl/or4Jrj+sxX Id85CUn47M5xDrrjoc2hjmrsCoBmejC7D/OJCgZi74O29bfSDuGe+5SF8gfOQqIjegaI/j jNwir3EfJokFP5q905b7ZYKOsyQFdVudJ/b3q3DtNQu0+LPCLK6yNpr0NJixvg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779752363; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X/uL2F+RIGCc96O8k9jZrug8ZN/jvjOPyruyt1XnM+o=; b=yI8IUZp+g38xe+MrIbfDY492BC46mPgAlLJF4za9e84QnT53yB78dr1uanJ0heXoph8pOz DJ7HPWETqIjdL1pxV8f/3f9Txn8cX5TRrXYjHB2R9K84wP7hgivHqLSkj7mug7fZ6zXbd2 q0IEL5dV6VgcdWVx46npiFtFODyUM65/0yXRl+93vSwTnNhInHWn/ZlEoeBUKIAVoBV6IS o8rEpHO8yAZTOD9q+wflKLBzzxukrNq7iiAre9qgwKE1n8whSVASFcCj70LM0D7Ape8ukT 8/vSPvYFBgA55arDPZLbx5SK6eMMTfSIazq5ZXGYliMQp+sHqUMeofZA4d5+JA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPXQz0cnJz12h2 for ; Mon, 25 May 2026 23:39:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 384cc by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 25 May 2026 23:39:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Siva Mahadevan Subject: git: f09c84a87dc5 - stable/15 - universe: emit warning instead of error for bad/missing KERNCONF List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: siva X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: f09c84a87dc519ecb69537699686854d6999c45f Auto-Submitted: auto-generated Date: Mon, 25 May 2026 23:39:23 +0000 Message-Id: <6a14ddab.384cc.25acd4c4@gitrepo.freebsd.org> The branch stable/15 has been updated by siva: URL: https://cgit.FreeBSD.org/src/commit/?id=f09c84a87dc519ecb69537699686854d6999c45f commit f09c84a87dc519ecb69537699686854d6999c45f Author: Siva Mahadevan AuthorDate: 2026-05-21 14:08:32 +0000 Commit: Siva Mahadevan CommitDate: 2026-05-25 23:25:57 +0000 universe: emit warning instead of error for bad/missing KERNCONF When doing a large `make universe` build with multiple KERNCONFS, it should not be an error when a particular target has a missing KERNCONF. In this example, ``` $ make universe TARGETS='arm64 riscv' KERNCONFS='QEMU VIRT' ``` Currently, arm64 does not have a QEMU conf, and riscv does not have a VIRT conf. However, this command should still succeed instead of failing with the following message: ``` make[2]: /usr/src/Makefile:767: Target architecture for riscv/conf/VIRT unknown. config(8) likely too old. in .for loop from /usr/src/Makefile:761 with kernel = VIRT in make[2] in directory "/usr/src" make[2]: stopped making "universe_kernels" in /usr/src ``` Since the opposite is true, we should build whatever confs are available from the requested list of KERNCONFS, while making sure to still emit warnings along the way. Reviewed by: imp Approved by: lwhsu (mentor), emaste (mentor) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D55571 (cherry picked from commit c170a96dbeeb3b0d36456d21beee6c551957a456) --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8e0cae9002e5..be07e994205c 100644 --- a/Makefile +++ b/Makefile @@ -758,12 +758,16 @@ KERNCONFS!= cd ${KERNSRCDIR}/${TARGET}/conf && \ ${_THINNER} universe_kernconfs: universe_kernels_prologue .PHONY .for kernel in ${KERNCONFS} +.if !exists(${KERNSRCDIR}/${TARGET}/conf/${kernel}) +.warning ${TARGET}/conf/${kernel} missing; skipping. +.else TARGET_ARCH_${kernel}!= cd ${KERNSRCDIR}/${TARGET}/conf && \ env PATH=${HOST_OBJTOP}/tmp/legacy/bin:${PATH:Q} \ config -m ${KERNSRCDIR}/${TARGET}/conf/${kernel} 2> /dev/null | \ grep -v WARNING: | cut -f 2 .if empty(TARGET_ARCH_${kernel}) -.error Target architecture for ${TARGET}/conf/${kernel} unknown. config(8) likely too old. +.error Target architecture for ${TARGET}/conf/${kernel} cannot be determined, kernconf file may be invalid! +.endif .endif universe_kernconfs_${TARGET_ARCH_${kernel}}: universe_kernconf_${TARGET}_${kernel} universe_kernconf_${TARGET}_${kernel}: .MAKE From nobody Mon May 25 23:39:21 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPXR407kFz6gKHb for ; Mon, 25 May 2026 23:39: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPXR34Rt2z3j3T for ; Mon, 25 May 2026 23:39:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779752367; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0k+0dHtLG73HGhg0SSUIJJd06a1fZ6GsYc4LBxLfzgM=; b=LJgiLB6GpQrcfVLzldPUh5EtcTtj5fhm6IhRM6L7bQHicbK+gKul8z1Ov4zY/IOZqU08nM viMYibvutgRzWC3aapRb0shBY+uaQj8I5fvdzGY58/F5sYmBS4X07IBQG/85GqH/guoCzA sc9lqRLcW7a3nqauN/LHdUxn45MnOPa1LcC/m/63ZiIJ3kT/krA/Yu2S4qQI6T8xtYTprA FybWIy73dThwS/0juEKijldJsVYLkslTRKwXsugvGiA2sV5gfisIM9OUTH3eZtgfDJjLJG G/MATE00aksFYdOf47+/9ihEzXI3D+FQJrqjeaf3lT1VQiV7WcKjHZGPb7AmUA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779752367; a=rsa-sha256; cv=none; b=gn8pT6602lErniUAtHb9iL6h22uRKB7/1Ujiv2nAff41iIuf6p9irrRe4dlByYVbewxceZ imvKN879i0zdpeMlU1SynZyRcFGuTrLWAoMcXVL0KlntlczDH8cWLKKn97cQxGdT1+jQIG nAX5VT+qfdq4Phid51QPnv+1tzDUNTUAoBRT8Eo5hltR4UFzFg7xISvN2CeYrRgIo+GL5e kob/OHUVX2qHvFNsx0RZ2zCzlAHmJxvTIj5s/NsODbSE/timkikS+uQrjaVMSHcOqsT0Af bbNUX1Kn8XqPdW+Cb4B4oBs6AI6NaewZpMcUzq3Mbv2UI0j/cuSKkCc8XBqRTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779752367; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0k+0dHtLG73HGhg0SSUIJJd06a1fZ6GsYc4LBxLfzgM=; b=YHmYd44X0AW74OSj3PdUWd14afM/ZP5cjEMKBVYuVLICygOPQi3FmovrHsEVKLa3I+gh0Q No85yBQjCoc2Marh9ETG43gj9gqC39W1N+11XIfxayM2tY6SaQfNloyIq9Fm9eE6xekzwN tElZwfY/w/8QhAz8lpShrCf0iY9g1/OR6W6eBTbN3UV51sHm8a6hoLQqYAH+g9iA0Vnvfk 2932dxwdfThAy+zD9fVDP4sd1kXAPzr/F/DV1QII313HaJNhXcn/TrtvtgJ82d+3M4kwU5 thmFSVU+kgqbhMGX1skMH4H25gi+yvqF41O1CUe1NrJ4TWEqw61P5YxUJ18OTQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPXR3169wz12KG for ; Mon, 25 May 2026 23:39:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39787 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 25 May 2026 23:39:21 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Siva Mahadevan Subject: git: 6b1f521a42fe - stable/15 - universe: allow moving build logs to UNIVERSE_LOGDIR List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: siva X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 6b1f521a42feb705a9c181ec6d29662f4c98886f Auto-Submitted: auto-generated Date: Mon, 25 May 2026 23:39:21 +0000 Message-Id: <6a14dda9.39787.29e154a@gitrepo.freebsd.org> The branch stable/15 has been updated by siva: URL: https://cgit.FreeBSD.org/src/commit/?id=6b1f521a42feb705a9c181ec6d29662f4c98886f commit 6b1f521a42feb705a9c181ec6d29662f4c98886f Author: Siva Mahadevan AuthorDate: 2026-05-20 20:05:53 +0000 Commit: Siva Mahadevan CommitDate: 2026-05-25 23:25:34 +0000 universe: allow moving build logs to UNIVERSE_LOGDIR This allows `make universe` or `make tinderbox` to build from a read-only src tree. Reviewed by: ziaee, imp, delphij Approved by: lwhsu (mentor), emaste (mentor) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D55566 (cherry picked from commit 02ef0b6d76e9717b8e3182dd706e23fd2702701d) --- Makefile | 17 ++++++++--------- share/man/man7/build.7 | 7 ++++++- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 4a98f9d539b0..8e0cae9002e5 100644 --- a/Makefile +++ b/Makefile @@ -599,8 +599,9 @@ targets: .PHONY .endfor .endfor +UNIVERSE_LOGDIR?=${.CURDIR} .if defined(DOING_TINDERBOX) -FAILFILE=${.CURDIR}/_.tinderbox.failed +FAILFILE=${UNIVERSE_LOGDIR}/_.tinderbox.failed MAKEFAIL=tee -a ${FAILFILE} .else MAKEFAIL=cat @@ -612,9 +613,7 @@ universe_prologue: .PHONY @echo "--------------------------------------------------------------" @echo ">>> make universe started on ${STARTTIME}" @echo "--------------------------------------------------------------" -.if defined(DOING_TINDERBOX) @rm -f ${FAILFILE} -.endif universe-toolchain: .PHONY universe_prologue @echo "--------------------------------------------------------------" @@ -630,9 +629,9 @@ universe-toolchain: .PHONY universe_prologue TOOLS_PREFIX_UNDEF= \ kernel-toolchain \ MK_LLVM_TARGET_ALL=yes \ - > _.${.TARGET} 2>&1 || \ + > ${UNIVERSE_LOGDIR}/_.${.TARGET} 2>&1 || \ (echo "${.TARGET} failed," \ - "check _.${.TARGET} for details" | \ + "check ${UNIVERSE_LOGDIR}/_.${.TARGET} for details" | \ ${MAKEFAIL}; false) @if [ ! -e "${HOST_OBJTOP}/tmp/usr/bin/cc" ]; then \ echo "Missing host compiler at ${HOST_OBJTOP}/tmp/usr/bin/cc?" >&2; \ @@ -716,9 +715,9 @@ universe_${target}_${target_arch}: universe_${target}_prologue .MAKE .PHONY TARGET=${target} \ TARGET_ARCH=${target_arch} \ ${MAKE_PARAMS_${target_arch}} \ - > _.${target}.${target_arch}.${UNIVERSE_TARGET} 2>&1 || \ + > ${UNIVERSE_LOGDIR}/_.${target}.${target_arch}.${UNIVERSE_TARGET} 2>&1 || \ (echo "${target}.${target_arch} ${UNIVERSE_TARGET} failed," \ - "check _.${target}.${target_arch}.${UNIVERSE_TARGET} for details" | \ + "check ${UNIVERSE_LOGDIR}/_.${target}.${target_arch}.${UNIVERSE_TARGET} for details" | \ ${MAKEFAIL})) @echo ">> ${target}.${target_arch} ${UNIVERSE_TARGET} completed on `LC_ALL=C date`" .endfor @@ -775,9 +774,9 @@ universe_kernconf_${TARGET}_${kernel}: .MAKE TARGET_ARCH=${TARGET_ARCH_${kernel}} \ ${MAKE_PARAMS_${TARGET_ARCH_${kernel}}} \ KERNCONF=${kernel} \ - > _.${TARGET}.${kernel} 2>&1 || \ + > ${UNIVERSE_LOGDIR}/_.${TARGET}.${kernel} 2>&1 || \ (echo "${TARGET} ${kernel} kernel failed," \ - "check _.${TARGET}.${kernel} for details"| ${MAKEFAIL})) + "check ${UNIVERSE_LOGDIR}/_.${TARGET}.${kernel} for details"| ${MAKEFAIL})) @echo ">> ${TARGET}.${TARGET_ARCH_${kernel}} ${kernel} kernel completed on `LC_ALL=C date`" .endfor .for target_arch in ${TARGET_ARCHES_${TARGET}} diff --git a/share/man/man7/build.7 b/share/man/man7/build.7 index 7947f6186b71..4995400f70dc 100644 --- a/share/man/man7/build.7 +++ b/share/man/man7/build.7 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 28, 2026 +.Dd May 20, 2026 .Dt BUILD 7 .Os .Sh NAME @@ -944,6 +944,11 @@ Only build worlds for each supported architecture. Only build kernels for each supported architecture. .It Va WITHOUT_KERNELS Only build worlds for each supported architecture. +.It Va UNIVERSE_LOGDIR +Write all build logs to this directory for each supported architecture. +When invoking +.Cm tinderbox , +also write the summary of all failed targets to this directory. .It Va UNIVERSE_TARGET Execute the specified .Xr make 1 From nobody Tue May 26 09:00:54 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPmtt3zRsz6ff5F for ; Tue, 26 May 2026 09:00: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPmtt3LkZz3FBd for ; Tue, 26 May 2026 09:00:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779786054; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=517NtHwkKXZTOerbDn1o9HsZD/wP55HRaqu1ATY8id0=; b=cfsB8ZbHNxAHj77Squ4vxAvnlcHllIxi0d143KxxnDWJPVpaE68JVzfS0IvM9QgCNG6fnB eGfqKOA/zutt+huU+LqJJcN+5BvQx5PNFfVCAWX6f2cMwmDRUT28txebI1OJQkoEfl+r+f 0GgtxunzCUPIxWDeJrwkd89fASkbzquHkTPtOOE9JpI2t5sZmsx+NbuWvGkP1l83JvKawl mGfBPvDNfP+HIAJLxfHGb7r6lRmd5mzCVxU5iaP35LnMUDrFfL1Z3zor+h9ha07DmoVOoU KRP7gNqkysO7pIvJxF1mBXUqX/TX5sFhxyuo2d/OD1kQsILKu8jDqAExBuQfMQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779786054; a=rsa-sha256; cv=none; b=km/548hDGnSBpstS58vlAgZLigg3bzf0ROOcFQC1dV+/rLwYCerslrnmb1YsiLQUgw4dIQ hXnBAOYlRk/6eTg7XstZssfqtyOcQA9bSL3WHN2JmVSfjjS83mymU7IK/+LPwnlpVMyL+C waWqJBNa2gA2mEqkbEV04KiOZ26EAHGFbwssxWOXYjQeOP/ObnsYUYf8mzutSkZ5BJSwYm QQxMYoYRXvf6DDRwbEEFplJU9IqpcTWeJX+t9+gndJ8M7hPYqsbEJmmlP2pha5n1zfR3sr 4D+9c3umtla61oeOdXTHkwBvqT/63gfL15ru9GmaSfPrq4/JoHabq4H/C83/8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779786054; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=517NtHwkKXZTOerbDn1o9HsZD/wP55HRaqu1ATY8id0=; b=uLnhJk8zLTUPhZGtazVLYz0wcb1B3oIN4ZpAEmKVheU9oOAFnPogdvGKi9N+3JZQTkKGVP FXJZXtBFZQ0ogl7iwTkjETDcONhaM7CV0beDumeW9KRy/ZvRuVMweofzdXvKnRDNIsr6ey ZMzgOqXvJWY4KZ1Vb3E5YUFKBTKrHqerkZuHJ2IrXqcgfjWiuRt8UFRou77TyotLbWeAbI I/PXfck19etU+rB3hlrEuLogrSb2TxbMDWFY+9W7FNFMLO8nB30OuRKKrmpSy9q/uJYuUg MeUcVTXE9Hyr/wlpAZzTcfSLOX7dPJ59a7k8aoXaBlk2TKTYJL/GFqgWzfmeiQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPmtt2RNZz1KQ3 for ; Tue, 26 May 2026 09:00:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 248d7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 26 May 2026 09:00:54 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: e0d4064bcae3 - stable/14 - snmp_pf: fix refresh List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/14 X-Git-Reftype: branch X-Git-Commit: e0d4064bcae396d06c08a24c9670c1e68afb03d3 Auto-Submitted: auto-generated Date: Tue, 26 May 2026 09:00:54 +0000 Message-Id: <6a156146.248d7.6907aac7@gitrepo.freebsd.org> The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=e0d4064bcae396d06c08a24c9670c1e68afb03d3 commit e0d4064bcae396d06c08a24c9670c1e68afb03d3 Author: Kristof Provost AuthorDate: 2025-12-17 13:22:05 +0000 Commit: Kristof Provost CommitDate: 2026-05-26 08:53:20 +0000 snmp_pf: fix refresh Some refresh functions had two layers of 'do we need to refresh now?' checks, leading to inconsistent refreshes. Consolidate them. PR: 291725 Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit a862e4b5a27c356e2584ee74fd9e211c18b1b125) --- usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c b/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c index a5786007d3f4..c6f288d0a608 100644 --- a/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c +++ b/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c @@ -675,7 +675,7 @@ pf_tables(struct snmp_context __unused *ctx, struct snmp_value *val, return (SNMP_ERR_NOT_WRITEABLE); if (op == SNMP_OP_GET) { - if ((time(NULL) - pft_table_age) > PFT_TABLE_MAXAGE) + if (! started || (time(NULL) - pft_table_age) > PFT_TABLE_MAXAGE) if (pft_refresh() == -1) return (SNMP_ERR_GENERR); @@ -814,7 +814,7 @@ pf_tbladdr(struct snmp_context __unused *ctx, struct snmp_value __unused *val, asn_subid_t which = val->var.subs[sub - 1]; struct pfa_entry *e = NULL; - if ((time(NULL) - pfa_table_age) > PFA_TABLE_MAXAGE) + if (! started || (time(NULL) - pfa_table_age) > PFA_TABLE_MAXAGE) pfa_refresh(); switch (op) { @@ -1037,7 +1037,7 @@ pf_lbltable(struct snmp_context __unused *ctx, struct snmp_value *val, asn_subid_t which = val->var.subs[sub - 1]; struct pfl_entry *e = NULL; - if ((time(NULL) - pfl_table_age) > PFL_TABLE_MAXAGE) + if (! started || (time(NULL) - pfl_table_age) > PFL_TABLE_MAXAGE) pfl_refresh(); switch (op) { @@ -1307,9 +1307,6 @@ pft_refresh(void) struct pft_entry *e; int i, numtbls = 1; - if (started && this_tick <= pf_tick) - return (0); - while (!TAILQ_EMPTY(&pft_table)) { e = TAILQ_FIRST(&pft_table); TAILQ_REMOVE(&pft_table, e, link); @@ -1441,9 +1438,6 @@ pfa_refresh(void) struct pfa_entry *e; int i, numtbls = 1, cidx, naddrs; - if (started && this_tick <= pf_tick) - return (0); - while (!TAILQ_EMPTY(&pfa_table)) { e = TAILQ_FIRST(&pfa_table); TAILQ_REMOVE(&pfa_table, e, link); @@ -1612,9 +1606,6 @@ pfl_refresh(void) { struct pfl_entry *e; - if (started && this_tick <= pf_tick) - return (0); - while (!TAILQ_EMPTY(&pfl_table)) { e = TAILQ_FIRST(&pfl_table); TAILQ_REMOVE(&pfl_table, e, link); From nobody Tue May 26 09:06:54 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPn1w0jdhz6ffcK for ; Tue, 26 May 2026 09:07: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPn1w09ktz3G6C for ; Tue, 26 May 2026 09:07:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779786420; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YP9vnSXCXNpxrdEZbHr3fu++QkEkot/6IiR1ddMrG0E=; b=nYSRTRWaJlm1CItVejMuWju1xJunJgecht0/YkVx6B+RWwMD+tCpqYEzSEbgMaIShLlx2f f0uBGVcMe1jHDjj/Brf48Qlijhn95/jopT4htdEvxymvsh91Hg/D415p/uM0g11cThe9o9 aotwIYc3MAwZNHAbfDR96cbC73VQwZC+OAwXQ1l+woT5md7Gpv3ewwXuPtj1XSLuC72XaC dcIk9OdG4QGzwzGtmNV31YPjve2oPIo0KmMplFyRbMJE+dAsCTUeWxwlQ9wB5IMo4J46qI 4S3ygPEcUyXlmsPIggpDoF0aH/WomH3R8ZOPV2H6TSXG9ci0+C5wIoGVo2r+KA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779786420; a=rsa-sha256; cv=none; b=FN+uEixKXooMbRrkqudOpG81kEjdh9dTZzD7dbCivSeGIxwXsfL/OdW9qQD8p/F88+ZKge Cp/DYLUIvQQvKE26qAI7+75LDUUDbm8Osto34kT3dhrhZnfHa3QnM5hbnm6jhfA5/6PFAk Iv7259OLcTovgrbZV0miEu+XOrjwYwaO1Ytr/tQRkO8uWg7YnW24vqLanoN0wbNTcJSfTA NFUSIYrdDlfG4VUUoQls4f8Kz9Cy45OsQMXvRT7iMFKRFE/ylWRqAr5S6G2mc4G4F7kH2a uroTf2N4337sS2FHkL7E+W6wGtF/xAROwMtXHLeHZtILz/dfqDfYPOD6Wv0VoQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779786420; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YP9vnSXCXNpxrdEZbHr3fu++QkEkot/6IiR1ddMrG0E=; b=CfmbNjd/4erb2xDi8ZU4kpExcUvkPK1fW5PpTLuoeZJXfuZPVpMfGWQhEzFeO02UiYZ/ic Wm9mHqIr/R5I7EIcP+bAW/+6O/n8bxJA93P0wS04mgEB0UTXRTKc/5Tv13ibNimkFX88EL bTwdDY6+k6Prxp/S0b6V/PuWheD+kWrqahoXhaW2TvYhtZjq6K7BYdRhjpdA90M/rQPQgm bKSlFGVTMI2auPsIYi8YTmU2BBxfgr/hizUbvr2iPkwxzn7XZ+2fauVyleQM/j3IlwcDjF h8k0Q1Hkd8C1lYOuwOlkBy2JC08w82whwgZqX/JXWLN+dpLVhCMyu2c1K23jaA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPn1v6RLhz1KWX for ; Tue, 26 May 2026 09:06:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26584 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 26 May 2026 09:06:54 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: fda33ae0a1ac - stable/15 - snmp_pf: fix refresh List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: fda33ae0a1ac8fd070efd6a0da2c1beae9f3428a Auto-Submitted: auto-generated Date: Tue, 26 May 2026 09:06:54 +0000 Message-Id: <6a1562ae.26584.799e7852@gitrepo.freebsd.org> The branch stable/15 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=fda33ae0a1ac8fd070efd6a0da2c1beae9f3428a commit fda33ae0a1ac8fd070efd6a0da2c1beae9f3428a Author: Kristof Provost AuthorDate: 2025-12-17 13:22:05 +0000 Commit: Kristof Provost CommitDate: 2026-05-26 09:03:06 +0000 snmp_pf: fix refresh Some refresh functions had two layers of 'do we need to refresh now?' checks, leading to inconsistent refreshes. Consolidate them. PR: 291725 Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit a862e4b5a27c356e2584ee74fd9e211c18b1b125) --- usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c b/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c index f0f9e0f0e149..12cb7bb71616 100644 --- a/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c +++ b/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c @@ -673,7 +673,7 @@ pf_tables(struct snmp_context __unused *ctx, struct snmp_value *val, return (SNMP_ERR_NOT_WRITEABLE); if (op == SNMP_OP_GET) { - if ((time(NULL) - pft_table_age) > PFT_TABLE_MAXAGE) + if (! started || (time(NULL) - pft_table_age) > PFT_TABLE_MAXAGE) if (pft_refresh() == -1) return (SNMP_ERR_GENERR); @@ -812,7 +812,7 @@ pf_tbladdr(struct snmp_context __unused *ctx, struct snmp_value __unused *val, asn_subid_t which = val->var.subs[sub - 1]; struct pfa_entry *e = NULL; - if ((time(NULL) - pfa_table_age) > PFA_TABLE_MAXAGE) + if (! started || (time(NULL) - pfa_table_age) > PFA_TABLE_MAXAGE) pfa_refresh(); switch (op) { @@ -1035,7 +1035,7 @@ pf_lbltable(struct snmp_context __unused *ctx, struct snmp_value *val, asn_subid_t which = val->var.subs[sub - 1]; struct pfl_entry *e = NULL; - if ((time(NULL) - pfl_table_age) > PFL_TABLE_MAXAGE) + if (! started || (time(NULL) - pfl_table_age) > PFL_TABLE_MAXAGE) pfl_refresh(); switch (op) { @@ -1322,9 +1322,6 @@ pft_refresh(void) struct pft_entry *e; int i, numtbls = 1; - if (started && this_tick <= pf_tick) - return (0); - while (!TAILQ_EMPTY(&pft_table)) { e = TAILQ_FIRST(&pft_table); TAILQ_REMOVE(&pft_table, e, link); @@ -1427,9 +1424,6 @@ pfa_refresh(void) struct pfa_entry *e; int i, numtbls = 1, cidx, naddrs; - if (started && this_tick <= pf_tick) - return (0); - while (!TAILQ_EMPTY(&pfa_table)) { e = TAILQ_FIRST(&pfa_table); TAILQ_REMOVE(&pfa_table, e, link); @@ -1595,9 +1589,6 @@ pfl_refresh(void) { struct pfl_entry *e; - if (started && this_tick <= pf_tick) - return (0); - while (!TAILQ_EMPTY(&pfl_table)) { e = TAILQ_FIRST(&pfl_table); TAILQ_REMOVE(&pfl_table, e, link); From nobody Tue May 26 10:33:16 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPpxY1Nq3z6fp5N for ; Tue, 26 May 2026 10:33: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPpxY0r13z3QJb for ; Tue, 26 May 2026 10:33:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779791601; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VNfBiQnIZIKNEFGxot+Sd1WGg5ZyvvyY3ge4hRlIcLE=; b=HeBpq2owFns49erFyGHmkXljyM4kHGx+jYe/ErtGIWk5/tm2nkeCQw+OK1OJ8nrsfs//xs +QwK//vswA5VogpDK4gmf/0BXhF874Dd52LHohRBHSFrSzcxFN7/0XfoauKa8K3hJ+82lZ GcO7QKE3fOIvOgGPZWG22rrutRWhd4+J3BUmFiVD9FncLgO/XtrwLfXt/Hx+w9euZYXRIN 0/nkInETQuP4xeVLfCuKyMyE5QIL/R63HL7ZKpLBwyKl019/zmjzMI5WSTw97TL1lTxXn9 df/C7PyHIrsGL8CgSGvC3Acu9+3fbcbjCXajMAMo3UyNKE/tX72wRZy3wOES9w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779791601; a=rsa-sha256; cv=none; b=i5yNky5L1a5bRgk15XME+ECQaRkdXfYFjw97C8uGyE9Uq/f8EWzeGPcdBnI/lkLvvf/H5q DiIMzFFaVYkgUMnK/WFQetKvC7O2l3B9y7fSSEpmrlPZ6gJnpmCbflXZ5vFBbDgDuFP5De IW28g0X5mX+phijFan6+eE+MFzdKsR1bsaTBKVpoPYryB5537xhoGuYOZ7a8oqAR1NNnrO HgWdEAy1XDvkiiaBuSuT73E709G4EAo0d1eiunqGCjHr4vGxDRD8988jYiBQKSgwyCaOR2 BvFIPfSZFzZQ6EWV8M2c1X+UR41p7mKKRdKyfgYen0il1oGj2WYIsB3hmr7jmA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779791601; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VNfBiQnIZIKNEFGxot+Sd1WGg5ZyvvyY3ge4hRlIcLE=; b=CIo3BbYqJjCf7ybCPHMv9CkLfd1F4jyX7LwzrDapdafBwgxe4ZJKg5Yk2fw2iBn1EfW7wB +evVAa7DWCnDsRf6xiP82F3Cg8QdaeDbo2/mUEUkTt6np0M4s/4i2xPO6ZsG3m07GGIXq1 2TlXkog9z/ScjXOVuUFe99ccNctKiLtbYMm9kUoJmlm4fKkM8bVTYd7njZ9MbkwQTLeVXs HFAmLeOuT5QfYVkQ2G4V6LVwuqmKe3A3p2Za7IMhofs7ETuS3SyoKT0Na8rKDzO52PJ+Kn j/ZeFh3H5kqsQ7+POnV2WEh519uxDmoHI3bF/XYRMKTW8RPDer92dVMusVryzw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPpxY0Rvmz1N4g for ; Tue, 26 May 2026 10:33:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 37e65 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 26 May 2026 10:33:16 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: c6cefcbbbb3f - main - snd_hda: Patch Dell WYSE 7040 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c6cefcbbbb3fd5bbe9e0c36c8c553364d444e2d8 Auto-Submitted: auto-generated Date: Tue, 26 May 2026 10:33:16 +0000 Message-Id: <6a1576ec.37e65.53cb6f0d@gitrepo.freebsd.org> The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=c6cefcbbbb3fd5bbe9e0c36c8c553364d444e2d8 commit c6cefcbbbb3fd5bbe9e0c36c8c553364d444e2d8 Author: Christos Margiolis AuthorDate: 2026-05-25 11:40:05 +0000 Commit: Christos Margiolis CommitDate: 2026-05-26 10:32:56 +0000 snd_hda: Patch Dell WYSE 7040 https://forums.freebsd.org/threads/dell-wyse-7040-thin-client-intel-i5-6500te-built-in-sound-alc255-mini-how-to.102656/ Reported by: razif (on the forum) Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/dev/sound/pci/hda/hdaa_patches.c | 9 +++++++++ sys/dev/sound/pci/hda/hdac.h | 1 + 2 files changed, 10 insertions(+) diff --git a/sys/dev/sound/pci/hda/hdaa_patches.c b/sys/dev/sound/pci/hda/hdaa_patches.c index d4267aae80f8..2f3a044195c4 100644 --- a/sys/dev/sound/pci/hda/hdaa_patches.c +++ b/sys/dev/sound/pci/hda/hdaa_patches.c @@ -328,6 +328,15 @@ hdac_pin_patch(struct hdaa_widget *w) patch_str = "as=1 seq=15"; break; } + } else if (id == HDA_CODEC_ALC255 && subid == DELL_WYSE7040_SUBVENDOR) { + switch (nid) { + case 20: + patch_str = "as=1 seq=0 device=Speaker"; + break; + case 33: + patch_str = "as=1 seq=15 device=Headphones"; + break; + } } else if (id == HDA_CODEC_ALC256 && (subid == DELL_I7577_SUBVENDOR || subid == DELL_L7480_SUBVENDOR)) { switch (nid) { diff --git a/sys/dev/sound/pci/hda/hdac.h b/sys/dev/sound/pci/hda/hdac.h index 27d592242578..36fd7b6a60ab 100644 --- a/sys/dev/sound/pci/hda/hdac.h +++ b/sys/dev/sound/pci/hda/hdac.h @@ -282,6 +282,7 @@ #define DELL_164AID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x164a) #define DELL_164BID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x164b) #define DELL_I7577_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0802) +#define DELL_WYSE7040_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0727) #define DELL_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0xffff) /* Clevo */ From nobody Tue May 26 10:41:01 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPq6V62tJz6fpMj for ; Tue, 26 May 2026 10:41: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPq6V5KyGz3QjC for ; Tue, 26 May 2026 10:41:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779792066; 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=pBbN0WGyll2ihDvoAhVCDqdsXWc63Jxx5x72pah9PRo=; b=Dyn1fJVI3f/Ql4ql7khWLFPvNTiykquxZOjq14v8b/q1r7dghn8qCHi5jo5bW21OACTXeS Mg5rrF6HuOfMjzsfEWEyM6F1bTwGcmVzrdAmzwyZiSc2NM0LQc8sSymcLYdaB2mYW2NbcT lUrDBvprwtou4IBW6w3RqfoPM2DmpCI3N4Xtj2adfk16dkRb7h6NssAaOUjGSVUz4aPkwB gS1Doo5rx1BhMShX+nD/J79lYPtJwvRBAJCLODiL5bl0he+p5s+4Cfa9gXW34G9UbQ7Voz K931cKtlaBQMvb1BKfm1QxNHKdYxznPecNdbga9NdCxI2aZVNwvlllB6vILCLg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779792066; a=rsa-sha256; cv=none; b=BV80c2SHK5T4ovbFKcMorWe1vEdi6TCH5j0hM6nlfFOKcIeTHzIT0IUgz3BLTR/Zn3ZVON M9ECp4/ypovbdRRNd1zrNPeuHFbxIUj4s59PYDDDZzOfef3Y30pZE8SaHnw0mai2zQU2jg Dz7SHz7019WPNhW3dJph+pPIKfRHOsnrVEnsdjiqjVCZ7cqD2cBgydIk1VsBKdN1dnTT1Q jo12+shw7koiK5bL3pCyal0gMBA1tKPwj+zIryvkbGPSfZV4hD0fkhaimq/MOyuXqD5v5V aBIeaKqJwhLEcLBi6HGHjrejEas5Ch9g+ZiFJlrm2JbpJbdCcLY12SnCD1+kcg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779792066; 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=pBbN0WGyll2ihDvoAhVCDqdsXWc63Jxx5x72pah9PRo=; b=Qn5UzlYgE8DEQ9ducymbrI9l2dxvq19nz5UWVFvuiWI9XisTn2fOW4NEmSgX+OyJ9OVrW9 lSYSwq7xiHgjDthU11auSiHEQk+rUdeCbVFVu4XVYSAxVcOMywwSRUn8adkxei2k2EQ2GM 3+xdY1JMWEuU/tDxYFtn5pKTcpTEs73n7UTt4Knl5g63h9yjiEzrXdNUyBh1/5s4GcKB6N v/t7V9084xiTVR9OsAWxrSVCpCyuDf7fqNOUuTuIODyCyAyJDTKG6jv2Ofwf9d8TkB8zAr qNU6QH2lx0CwtHzX2xykZmvUGgjFNty28t+fSoUHFQg/oSEac6+7nDJcLBeg1g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPq6V4tW2z1NLX for ; Tue, 26 May 2026 10:41:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38b03 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 26 May 2026 10:41:01 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Abdelkader Boudih From: Christos Margiolis Subject: git: ee7148ff11ff - stable/15 - snd_hda: Reassign duplicate HDMI/DP pin sequences instead of disabling List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: ee7148ff11ff5e30242e8d20e7d6cebcad5707a1 Auto-Submitted: auto-generated Date: Tue, 26 May 2026 10:41:01 +0000 Message-Id: <6a1578bd.38b03.5522d09c@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=ee7148ff11ff5e30242e8d20e7d6cebcad5707a1 commit ee7148ff11ff5e30242e8d20e7d6cebcad5707a1 Author: Abdelkader Boudih AuthorDate: 2026-05-19 12:24:14 +0000 Commit: Christos Margiolis CommitDate: 2026-05-26 10:40:40 +0000 snd_hda: Reassign duplicate HDMI/DP pin sequences instead of disabling Some firmware (e.g. Apple EFI on Sandy Bridge Mac hardware) programs all HDMI/DP output pins in an association with identical sequence numbers. The existing code disables the entire association on the first duplicate, leaving HDMI/DP audio non-functional. For digital output pins (HDMI/DP) with seq=0 duplicates, search for the next free sequence slot and reassign the duplicate rather than disabling. The seq=0 restriction targets the known Apple firmware pattern; any other duplicate sequence is more likely a genuine firmware error and the association is still disabled. Update first after reassignment so that hpredir is not left pointing at a stale sequence. Non-digital and input associations retain the existing disable behaviour. MFC after: 1 week Reviewed by: christos Differential Revision: https://reviews.freebsd.org/D55473 (cherry picked from commit 65341ec3172936804b081c8ceca9bae88f5c7192) --- sys/dev/sound/pci/hda/hdaa.c | 49 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 45 insertions(+), 4 deletions(-) diff --git a/sys/dev/sound/pci/hda/hdaa.c b/sys/dev/sound/pci/hda/hdaa.c index 7dec437de944..8add23217d1b 100644 --- a/sys/dev/sound/pci/hda/hdaa.c +++ b/sys/dev/sound/pci/hda/hdaa.c @@ -3268,10 +3268,51 @@ hdaa_audio_as_parse(struct hdaa_devinfo *devinfo) first = seq; /* Check association correctness. */ if (as[cnt].pins[seq] != 0) { - device_printf(devinfo->dev, "%s: Duplicate pin %d (%d) " - "in association %d! Disabling association.\n", - __func__, seq, w->nid, j); - as[cnt].enable = 0; + int newseq = -1; + + /* + * Some firmware (e.g. Apple EFI on Mac hardware) + * assigns seq=0 to all HDMI/DP output pins in + * an association. Reassign the duplicate to + * the next free slot rather than disabling the + * whole association. Limit to seq=0 duplicates: + * any other duplicate sequence is more likely a + * genuine firmware error and should still disable. + */ + if (seq == 0 && dir == HDAA_CTL_OUT && + HDA_PARAM_AUDIO_WIDGET_CAP_DIGITAL( + w->param.widget_cap) && + (HDA_PARAM_PIN_CAP_HDMI(w->wclass.pin.cap) || + HDA_PARAM_PIN_CAP_DP(w->wclass.pin.cap))) { + int cand; + + for (cand = 1; cand < 16; cand++) { + if (as[cnt].pins[cand] == 0) { + newseq = cand; + break; + } + } + } + if (newseq >= 0) { + HDA_BOOTVERBOSE( + device_printf(devinfo->dev, + "%s: Duplicate pin %d (%d) " + "in association %d, " + "reassigning to seq %d.\n", + __func__, seq, w->nid, + j, newseq); + ); + seq = newseq; + /* Update hpredir anchor to lowest seq. */ + first = min(first, newseq); + } else { + device_printf(devinfo->dev, + "%s: Duplicate pin %d (%d) " + "in association %d! " + "Disabling association.\n", + __func__, seq, w->nid, j); + as[cnt].enable = 0; + } } if (dir != as[cnt].dir) { device_printf(devinfo->dev, "%s: Pin %d has wrong " From nobody Tue May 26 12:34:14 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPsd41NDjz6fkTP; Tue, 26 May 2026 12:34:16 +0000 (UTC) (envelope-from des@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPsd40jxjz3c6W; Tue, 26 May 2026 12:34:16 +0000 (UTC) (envelope-from des@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779798856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dAl/hkNOxne+k20oZeP//PvX3J9neYjqSIPPyNct3pk=; b=k30bP4GPCva+6HZoCgr6NltLyr2ZSqhy92zohU/G8mLNbtwj0UgqCTa8df6gFdvMkA52Db 1uj8BHbMEBGPJPVPa+cMZM3y0IzkGcFrKNpjXLQGO6GvOvElF/xuiehJ58IyIXf0eYFq1x 2clc3y0JrYN65p8sZZ6yra+thkBS0RormG+iKaJc4TkvT37SK8JXeQcLKkFsrAKRfmCrSx jry3KK0MRzNrh24+Pw2LvQgHR5vt+cOXITtdZl25QmYll+0QPzHoN2I4E5m55RbTDCwhc2 pKpdfJ6CQqcxR0fv5qHclk2y3IKd2Isom8xKH5aWARXyeX4llURKiwmX8Azafg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779798856; a=rsa-sha256; cv=none; b=M7yTOEhHKdbgbbUwrcA0VW75X9nqeBjgLBNIdmSfCuqGFIWc8m/Nfv29IhCj/CO1NF1JN9 EhANw1b2iKj5JG/FtAEeFj8EJI42etYiu1GoUpDfveGbxWxQoq6dGSR21nHCTQh5qS8Qhc ymuq7ms7oMzheUjXWHg0PTeNrtnZ8QiC0TbeoaIRryUHAcxPEKIz08eEv8W3gCK1CSaYPm ziq3Q4Xohi240oVdq2KBXFqwNfCwZLLCMLjLPDNHyz+P7rVKK8ik1S7TcTSyvrpMvrtdOE QxKBzEgFvy1TeIWGl+OVWeDGVY8imeeK0I44DNDNG3OiGn8NJhdbrEoeeIaQGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779798856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dAl/hkNOxne+k20oZeP//PvX3J9neYjqSIPPyNct3pk=; b=DKmAuZfu8Kxuet39nm2yiWVJYJwMjGijTBPJQzzyo9hCrRGwuzlS9mismBqCpL5Rl0BUtv eGWFhlzFGLIMg8IsVnVw4hb0Qd1+NVesa7Uncgb0WAY3G8zmYXt46AuoibLaZ329UlSoM9 ekwadxYVZSZvUG65WYmJ5wrTQE2CxDyrlJ2OyxICTpyTufPW23wyBxP6uarDwcYs71TcNP lKfga1HiH55BkZ88ChWMUanM0iSItqRyih0FWQTkAR6bYGCNBzmF3KqQzj3lTiI3row675 KkQK7KuPu/GybLLDX/U7047q7R44hoCO1rz/3T6//lrrWQ9iX7U7dEDT3rZz0A== Received: from ltc.des.dev (unknown [92.183.12.56]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: des/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4gPsd36WVjz3nM; Tue, 26 May 2026 12:34:15 +0000 (UTC) (envelope-from des@freebsd.org) Received: by ltc.des.dev (Postfix, from userid 1001) id D9A1C6C758; Tue, 26 May 2026 14:34:14 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Jilles Tjoelker Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 1df431576f99 - main - sh/tests: Cut down builtins/read12.0 by 2 seconds In-Reply-To: (Jilles Tjoelker's message of "Mon, 25 May 2026 21:22:18 +0200") References: <6a120625.45836.5e8588e2@gitrepo.freebsd.org> <86h5nx3e8b.fsf@ltc.des.dev> <865x4c2bfn.fsf@ltc.des.dev> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Tue, 26 May 2026 14:34:14 +0200 Message-ID: <86ik8a1ha1.fsf@ltc.des.dev> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Jilles Tjoelker writes: > I have reverted the entire commit. Let's leave it as is until I > understand what the problem is. The problem is the ratio of error to measurement, which you reduced to virtually nothing. However, your commit also fixed a couple of bugs. I wish you hadn't reverted those parts. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@FreeBSD.org From nobody Tue May 26 13:32:34 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPtwM2gdDz6fpTF for ; Tue, 26 May 2026 13:32: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPtwL6KhCz3jlW for ; Tue, 26 May 2026 13:32:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779802354; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bwIcW9tsFu9glyCfOQmFuYs/H6fTWPNVSsMT21ar7To=; b=XprCO3TLEVb+ut3zNJXSVrYpsQATFMdWJ2Xcchexg+dBkwYhNREu0Q9lo+pB3PXdaLIaBD tcUkGZVZ4WEjeBirrZEKkRBvl+g8qnh/oikaqO2712ms2oEaC4k3eH+QgIyuoi0Q7C/Asj KG4MpniGvSR5kiqy99Y6cAIS2YIeln4QX+do3SmWtNoVrea7ON7Uysb7PI+O6fVIAhcMeQ ug8gmuCqNjxBakWP9XBF9xwGcONYUesV+LPC5qJg6j8obEayFcmjhD1KlDihSHh0G5vVt3 Z2PLmOdsyUSWsbyndWL6h4g8uyfQ+L+ukUQlcKpTB5CASpYbCoRGgRuzH65REw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779802354; a=rsa-sha256; cv=none; b=D3WfGVm6NBZ2piUAh+7lyZ3XLSakBB27ZD/IwCDgWXjCgo0xcALSMZsajqk0ArKZl7ndeF cTTIGhn3AARNsOs+d30Z2ZXvjtw74dGctlBVTFJhEClCrxCcgD8VZrUQl3w+26YJxzSMOE 9V0zHQ5lSs19op7Styg6KlxWgCvi618fFmm8qnKp9IK2EqUkk22G/RDrU8Rhw17Dg4yyif 1P1NNhmku9edlAEFWo6dGVGaWQ82OaNdqk/fh+hPfbkOmMyKqzpHR/iVuIFi1LsWueKQN4 wCpWGgXlVDQnwka13RXXpxWx59wc28z29/3xTOSHth4b/HsacX08BwuImw/9nw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779802354; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bwIcW9tsFu9glyCfOQmFuYs/H6fTWPNVSsMT21ar7To=; b=IWJbOFHKLuP1RtiMlMf4KFwn0AqJMo5fZ6JfcOQRiOixnN1445O4uenRilYjuSPXUcnsXJ JatwW3fRWwbO2G16br/a16/NcDiyMSLvhl9v9Jn7YMbHu8OgfPFwCA4fmRCqpLmmvjmH3G VmFP1+xhGsOKBnteLj7klBdeCCr/BRpEYDo3tZlP6h5x9y2uczZG1rR2uyffraG8SYaT4n uk/D1ZQPX1BUxJXYQSI9FN0wZTbd0S3P4XX9OqfgHvwp4K3THPwzBf0r5+fCQjGRnJ8R0g Z3T49XlQHIFSXxHRKiWte3zADRmvnon6HF5Cl9JwS8SseMNHg4BDBYsR14HsTA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPtwL5dl1z9Y for ; Tue, 26 May 2026 13:32:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 47575 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 26 May 2026 13:32:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 44eb2883134e - main - acpi: On /dev/power suspend, trigger userspace notifications List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 44eb2883134e465c28468213f79567c64fe26de1 Auto-Submitted: auto-generated Date: Tue, 26 May 2026 13:32:34 +0000 Message-Id: <6a15a0f2.47575.30956a8c@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=44eb2883134e465c28468213f79567c64fe26de1 commit 44eb2883134e465c28468213f79567c64fe26de1 Author: Olivier Certner AuthorDate: 2026-05-25 16:01:10 +0000 Commit: Olivier Certner CommitDate: 2026-05-26 13:32:04 +0000 acpi: On /dev/power suspend, trigger userspace notifications On a suspend request via ioctl(), /dev/acpi (and compatible /dev/apm) both call acpi_ReqSleepState() instead of directly calling acpi_EnterSleepState(). The former does more checks, returns success if the machine is already suspending, and notifies user space (via devd(8)) about the impending suspend. In other words, it seems to have been designed for user consumption more than the latter function. So, use acpi_ReqSleepState() in place of acpi_EnterSleepState() in acpi_pm_func(), which is ultimately called by power_pm_suspend(), itself called by power_ioctl(). Other callers of power_pm_suspend() (such as the console drivers) are also user-facing facilities, so should also benefit from this change. Reviewed by: mhorne, imp Tested by: mhorne MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57239 --- sys/dev/acpica/acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index 8be94db73729..4c6d0c3679c9 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -5064,7 +5064,7 @@ acpi_pm_func(u_long cmd, void *arg, enum power_stype stype) error = EINVAL; goto out; } - if (ACPI_FAILURE(acpi_EnterSleepState(sc, stype))) + if (ACPI_FAILURE(acpi_ReqSleepState(sc, stype))) error = ENXIO; break; default: From nobody Tue May 26 15:19:21 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPxHY43wrz6fxKZ for ; Tue, 26 May 2026 15:19: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPxHY31czz3vnv for ; Tue, 26 May 2026 15:19:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779808761; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mSBk4Z8MxmZaDfwuF02ekSncjXw+xps0+jhej5PWGPU=; b=ad4yIrpFmZczhWlrYmXwPIFPmOUe/7Vm5PFd5aWPF6+x6xiBjgxTqyIA8PnbsIOUkme/OU GPoLBRut3iIbO+AHCKi92RfBWoqFbQ/rmE52j66rzqd8Ot0oHhxkHLbnw3JKp8BdZqbQzb jeJjKMGYxmjZE+wgUzLHOK8PBkjn0ocRw2rIfOj93aSnNsi4mLDkCGAXg2hhAZgfE7mYH3 CaxCIsyd19nZsSg89pW/y4jYTwvr7vWiCXgUmkP3wtR9T6ryRi6woCycQidrW+h0o+qfEM Q4PJv2bMPOrT5VZ/HX2PPm1nd9mX6q9ZA9EFnWK+ou0FRRBjYdmOnOs+Z1BH4A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779808761; a=rsa-sha256; cv=none; b=sD6x4eiZlQ0u0plR66xWJwIw2jTrsHGB6ukto18jf5aq5CBuFkthPo2ke4eKtLN7SF21SY GZvw0olFmKiIP1MyA+nW44rEGMcYA/yi5VIlBxM1cYd+kKk4RRcTawShk5+UNGdmiaftfA hf3sjTRbr7DrhyLG3RrNzKOeHABHMiLyOZkAlvgF0JyoElC8DxElRdw92XYb+9ZyqZCdWe GdA7tmvqR684aqWmzbw59nbHwrgFaBB4+QUs/Jio/0rxmr+CQYJoMCkcd1kKaDEvKiyKSw 0n9tzF35pah15Td0V2DMsK901sOmo7hqL8lfII1hMeEVxar9Lx5wqVWutlAQXw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779808761; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mSBk4Z8MxmZaDfwuF02ekSncjXw+xps0+jhej5PWGPU=; b=dKusd9/nDN/0EZBcRfrEC+98A0V/OKDM4OVk96HKgTH4MkeleIlANMTb9h9j9fvyTbtfT2 un/3VsyziO+MI5dQNC5L8ZD2BsCoGh3NyGa1Aij1pX7w8zEnA7yp2n8i6KzwXZUUnhltTu ZFAQl3MQ9dCoVKzTdwdD03cVnAVfCtPUgMI6+TmbeTnOhaqzSyiKrAlX50blc9KXvTz6eV qW2U/HmTPIQh0QJ6PGVhoHu5rlLxxwrz10xMqCOZYNNPeQ5vfi174DLiJbVwgGxj1R8d6E Ye568F5RGCKyDcSuFJmZPG3Fx5+ZjTrTxqnaw1ZHbfs2Cy3OFstO5QyNso1tSg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPxHY2P4Sz2B0 for ; Tue, 26 May 2026 15:19:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 23762 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 26 May 2026 15:19:21 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Hall Subject: git: e1e281a47d05 - stable/14 - smartpqi: Add runtime sysctl for debug_level and log device state changes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: e1e281a47d05699c71a9bf44dedbc85e0dfb510e Auto-Submitted: auto-generated Date: Tue, 26 May 2026 15:19:21 +0000 Message-Id: <6a15b9f9.23762.79ff42f2@gitrepo.freebsd.org> The branch stable/14 has been updated by jrhall: URL: https://cgit.FreeBSD.org/src/commit/?id=e1e281a47d05699c71a9bf44dedbc85e0dfb510e commit e1e281a47d05699c71a9bf44dedbc85e0dfb510e Author: John Hall AuthorDate: 2026-05-04 21:43:27 +0000 Commit: John Hall CommitDate: 2026-05-26 15:17:30 +0000 smartpqi: Add runtime sysctl for debug_level and log device state changes The smartpqi driver did not log device add/remove or controller events to syslog, and hw.smartpqi.debug_level could only be set at boot via loader.conf with no runtime sysctl interface. Add a read-write sysctl at dev.smartpqi.N.debug_level for runtime debug level changes. Add device_printf calls for device addition, removal, and controller events (hotplug, hardware, physical/logical device, AIO state/config changes) so state changes always appear in dmesg. Add DBG_DISC logging for discovery state transitions. Fix spelling errors in strings and comments across the driver. Bump driver version to 14.4691.1.2000 / 15.2.1.2000. PR: 294161 Reviewed by: imp Approved by: imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D56832 (cherry picked from commit 0d48d6d7bba77d6c3736ce56ea5667bfbde89705) --- sys/dev/smartpqi/smartpqi_cam.c | 4 ++-- sys/dev/smartpqi/smartpqi_defines.h | 8 ++++---- sys/dev/smartpqi/smartpqi_discovery.c | 21 ++++++++++++++++++--- sys/dev/smartpqi/smartpqi_event.c | 17 ++++++++++++++--- sys/dev/smartpqi/smartpqi_main.c | 12 +++++++++++- sys/dev/smartpqi/smartpqi_misc.c | 4 ++-- sys/dev/smartpqi/smartpqi_queue.c | 4 ++-- sys/dev/smartpqi/smartpqi_request.c | 4 ++-- sys/dev/smartpqi/smartpqi_response.c | 4 ++-- sys/dev/smartpqi/smartpqi_sis.c | 6 +++--- sys/dev/smartpqi/smartpqi_structures.h | 4 ++-- 11 files changed, 62 insertions(+), 26 deletions(-) diff --git a/sys/dev/smartpqi/smartpqi_cam.c b/sys/dev/smartpqi/smartpqi_cam.c index 690b38c9f855..6ded8aa97e39 100644 --- a/sys/dev/smartpqi/smartpqi_cam.c +++ b/sys/dev/smartpqi/smartpqi_cam.c @@ -1,5 +1,5 @@ /*- - * Copyright 2016-2025 Microchip Technology, Inc. and/or its subsidiaries. + * Copyright 2016-2026 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 @@ -1300,7 +1300,7 @@ register_sim(struct pqisrc_softstate *softs, int card_index) csa.callback_arg = softs; xpt_action((union ccb *)&csa); if (csa.ccb_h.status != CAM_REQ_CMP) { - DBG_ERR("Unable to register smartpqi_aysnc handler: %d!\n", + DBG_ERR("Unable to register smartpqi_async handler: %d!\n", csa.ccb_h.status); } diff --git a/sys/dev/smartpqi/smartpqi_defines.h b/sys/dev/smartpqi/smartpqi_defines.h index 0277abd3e318..c4084f069588 100644 --- a/sys/dev/smartpqi/smartpqi_defines.h +++ b/sys/dev/smartpqi/smartpqi_defines.h @@ -1,5 +1,5 @@ /*- - * Copyright 2016-2025 Microchip Technology, Inc. and/or its subsidiaries. + * Copyright 2016-2026 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 @@ -944,12 +944,12 @@ typedef uint8_t *passthru_buf_type_t; #define PQISRC_DRIVER_MAJOR __FreeBSD__ #if __FreeBSD__ <= 14 -#define PQISRC_DRIVER_MINOR 4690 +#define PQISRC_DRIVER_MINOR 4691 #else #define PQISRC_DRIVER_MINOR 2 #endif -#define PQISRC_DRIVER_RELEASE 0 -#define PQISRC_DRIVER_REVISION 2008 +#define PQISRC_DRIVER_RELEASE 1 +#define PQISRC_DRIVER_REVISION 2000 #define STR(s) # s #define PQISRC_VERSION(a, b, c, d) STR(a.b.c-d) diff --git a/sys/dev/smartpqi/smartpqi_discovery.c b/sys/dev/smartpqi/smartpqi_discovery.c index a7de5a149810..8682e6cabd7e 100644 --- a/sys/dev/smartpqi/smartpqi_discovery.c +++ b/sys/dev/smartpqi/smartpqi_discovery.c @@ -1,5 +1,5 @@ /*- - * Copyright 2016-2025 Microchip Technology, Inc. and/or its subsidiaries. + * Copyright 2016-2026 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 @@ -155,7 +155,7 @@ pqisrc_remove_target_bit(pqisrc_softstate_t *softs, int target) softs->bit_map.bit_vector[target] = SLOT_AVAILABLE; } -/* Use bit map to find availible targets */ +/* Use bit map to find available targets */ int pqisrc_find_avail_target(pqisrc_softstate_t *softs) { @@ -1423,7 +1423,11 @@ pqisrc_add_device(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device) if(device->expose_device) { pqisrc_init_device_active_io(softs, device); - /* TBD: Call OS upper layer function to add the device entry */ + device_printf(softs->os_specific.pqi_dev, + "device added: vendor=%s model=%s B%d:T%d:L%d type=%s\n", + device->vendor, device->model, + device->bus, device->target, device->lun, + device->is_physical_device ? "physical" : "logical"); os_add_device(softs,device); } DBG_FUNC("OUT\n"); @@ -1451,6 +1455,11 @@ pqisrc_remove_device(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device) } /* Wait for device outstanding Io's */ pqisrc_wait_for_device_commands_to_complete(softs, device); + device_printf(softs->os_specific.pqi_dev, + "device removed: vendor=%s model=%s B%d:T%d:L%d type=%s\n", + device->vendor, device->model, + device->bus, device->target, device->lun, + device->is_physical_device ? "physical" : "logical"); /* Call OS upper layer function to remove the exposed device entry */ os_remove_device(softs,device); DBG_FUNC("OUT\n"); @@ -1674,10 +1683,14 @@ pqisrc_update_device_list(pqisrc_softstate_t *softs, case DEVICE_NOT_FOUND: /* Device not found in existing list */ device->new_device = true; + DBG_DISC("new device found B%d:T%d:L%d\n", + device->bus, device->target, device->lun); break; case DEVICE_CHANGED: /* Actual device gone need to add device to list*/ device->new_device = true; + DBG_DISC("device changed B%d:T%d:L%d\n", + device->bus, device->target, device->lun); break; case DEVICE_IN_REMOVE: /*Older device with same target/lun is in removal stage*/ @@ -1686,6 +1699,8 @@ pqisrc_update_device_list(pqisrc_softstate_t *softs, * free call*/ device->new_device = false; same_device->schedule_rescan = true; + DBG_DISC("device in removal B%d:T%d:L%d, scheduling rescan\n", + device->bus, device->target, device->lun); break; default: break; diff --git a/sys/dev/smartpqi/smartpqi_event.c b/sys/dev/smartpqi/smartpqi_event.c index 77a70f9fb031..c3c27c9e1c0b 100644 --- a/sys/dev/smartpqi/smartpqi_event.c +++ b/sys/dev/smartpqi/smartpqi_event.c @@ -1,5 +1,5 @@ /*- - * Copyright 2016-2025 Microchip Technology, Inc. and/or its subsidiaries. + * Copyright 2016-2026 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 @@ -204,6 +204,17 @@ pqisrc_process_event_intr_src(pqisrc_softstate_t *softs,int obq_id) } if (event_index >= 0) { + static const char *event_names[] = { + [PQI_EVENT_HOTPLUG] = "hotplug", + [PQI_EVENT_HARDWARE] = "hardware", + [PQI_EVENT_PHYSICAL_DEVICE] = "physical device", + [PQI_EVENT_LOGICAL_DEVICE] = "logical device", + [PQI_EVENT_AIO_STATE_CHANGE] = "AIO state change", + [PQI_EVENT_AIO_CONFIG_CHANGE] = "AIO config change", + }; + device_printf(softs->os_specific.pqi_dev, + "event: %s (type=0x%x)\n", + event_names[event_index], response.event_type); if(response.request_acknowledge) { pending_event = &softs->pending_events[event_index]; pending_event->pending = true; @@ -385,7 +396,7 @@ pqisrc_report_event_config(pqisrc_softstate_t *softs) pqi_event_config_request_t request; pqi_event_config_t *event_config_p ; dma_mem_t buf_report_event ; - /*bytes to be allocaed for report event config data-in buffer */ + /*bytes to be allocated for report event config data-in buffer */ uint32_t alloc_size = sizeof(pqi_event_config_t) ; memset(&request, 0 , sizeof(request)); @@ -446,7 +457,7 @@ pqisrc_set_event_config(pqisrc_softstate_t *softs) pqi_event_config_request_t request; pqi_event_config_t *event_config_p; dma_mem_t buf_set_event; - /*bytes to be allocaed for set event config data-out buffer */ + /*bytes to be allocated for set event config data-out buffer */ uint32_t alloc_size = sizeof(pqi_event_config_t); memset(&request, 0 , sizeof(request)); diff --git a/sys/dev/smartpqi/smartpqi_main.c b/sys/dev/smartpqi/smartpqi_main.c index 1f006939bf7c..fbfbcc962f35 100644 --- a/sys/dev/smartpqi/smartpqi_main.c +++ b/sys/dev/smartpqi/smartpqi_main.c @@ -1,5 +1,5 @@ /*- - * Copyright 2016-2025 Microchip Technology, Inc. and/or its subsidiaries. + * Copyright 2016-2026 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 @@ -427,6 +427,16 @@ smartpqi_attach(device_t dev) goto out; } + /* Register sysctl for runtime debug_level changes */ + { + struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(dev); + struct sysctl_oid *tree = device_get_sysctl_tree(dev); + + SYSCTL_ADD_ULONG(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "debug_level", CTLFLAG_RW, &logging_level, + "Debug logging bitmask"); + } + goto out; dma_out: diff --git a/sys/dev/smartpqi/smartpqi_misc.c b/sys/dev/smartpqi/smartpqi_misc.c index 6db0d80ed993..fd0b907aa252 100644 --- a/sys/dev/smartpqi/smartpqi_misc.c +++ b/sys/dev/smartpqi/smartpqi_misc.c @@ -1,5 +1,5 @@ /*- - * Copyright 2016-2025 Microchip Technology, Inc. and/or its subsidiaries. + * Copyright 2016-2026 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 @@ -252,7 +252,7 @@ bsd_set_hint_scatter_gather_config(struct pqisrc_softstate *softs) DBG_FUNC("IN\n"); - /* At least > 16 sg's required to wotk hint correctly. + /* At least > 16 sg's required to work hint correctly. * Default the sg count set by driver/controller. */ if ((!softs->hint.sg_segments) || (softs->hint.sg_segments > diff --git a/sys/dev/smartpqi/smartpqi_queue.c b/sys/dev/smartpqi/smartpqi_queue.c index e8a467531aa4..679d956f6f36 100644 --- a/sys/dev/smartpqi/smartpqi_queue.c +++ b/sys/dev/smartpqi/smartpqi_queue.c @@ -1,5 +1,5 @@ /*- - * Copyright 2016-2025 Microchip Technology, Inc. and/or its subsidiaries. + * Copyright 2016-2026 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 @@ -729,7 +729,7 @@ pqisrc_create_op_ibq(pqisrc_softstate_t *softs, op_ib_q->pi_register_offset); } else { int i = 0; - DBG_WARN("Error Status Decsriptors\n"); + DBG_WARN("Error Status Descriptors\n"); for (i = 0; i < 4; i++) DBG_WARN(" %x\n",admin_resp.resp_type.create_op_iq.status_desc[i]); } diff --git a/sys/dev/smartpqi/smartpqi_request.c b/sys/dev/smartpqi/smartpqi_request.c index c5f8ac3c41ba..655660615797 100644 --- a/sys/dev/smartpqi/smartpqi_request.c +++ b/sys/dev/smartpqi/smartpqi_request.c @@ -1,5 +1,5 @@ /*- - * Copyright 2016-2025 Microchip Technology, Inc. and/or its subsidiaries. + * Copyright 2016-2026 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 @@ -1998,7 +1998,7 @@ pqisrc_send_raid_tmf(pqisrc_softstate_t *softs, pqi_scsi_dev_t const *devp, if (softs->timeout_in_tmf && tmf_type == SOP_TASK_MANAGEMENT_LUN_RESET) { - /* OS_TMF_TIMEOUT_SEC - 1 to accomodate driver processing */ + /* OS_TMF_TIMEOUT_SEC - 1 to accommodate driver processing */ tmf_req.timeout_in_sec = OS_TMF_TIMEOUT_SEC - 1; } diff --git a/sys/dev/smartpqi/smartpqi_response.c b/sys/dev/smartpqi/smartpqi_response.c index 38695860e520..1ae74a5b95ff 100644 --- a/sys/dev/smartpqi/smartpqi_response.c +++ b/sys/dev/smartpqi/smartpqi_response.c @@ -1,5 +1,5 @@ /*- - * Copyright 2016-2025 Microchip Technology, Inc. and/or its subsidiaries. + * Copyright 2016-2026 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 @@ -275,7 +275,7 @@ pqisrc_is_innocuous_error(pqisrc_softstate_t *softs, rcb_t *rcb, void *err_info) if (raid_err->data_out_result == PQI_RAID_DATA_IN_OUT_UNDERFLOW) return true; - /* We get these a alot: leave a tiny breadcrumb about the error, + /* We get these a lot: leave a tiny breadcrumb about the error, but don't do full spew about it */ if (raid_err->status == PQI_AIO_STATUS_CHECK_CONDITION) { diff --git a/sys/dev/smartpqi/smartpqi_sis.c b/sys/dev/smartpqi/smartpqi_sis.c index 82eb999ca4b8..99aa952eb149 100644 --- a/sys/dev/smartpqi/smartpqi_sis.c +++ b/sys/dev/smartpqi/smartpqi_sis.c @@ -1,5 +1,5 @@ /*- - * Copyright 2016-2025 Microchip Technology, Inc. and/or its subsidiaries. + * Copyright 2016-2026 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 @@ -26,7 +26,7 @@ #include "smartpqi_includes.h" -/* Function for disabling msix interrupots */ +/* Function for disabling msix interrupts */ void sis_disable_msix(pqisrc_softstate_t *softs) { @@ -96,7 +96,7 @@ sis_disable_interrupt(pqisrc_softstate_t *softs) sis_disable_msix(softs); break; default: - DBG_ERR("Inerrupt mode none!\n"); + DBG_ERR("Interrupt mode none!\n"); break; } diff --git a/sys/dev/smartpqi/smartpqi_structures.h b/sys/dev/smartpqi/smartpqi_structures.h index 0c9ad375823d..ada6676ada8f 100644 --- a/sys/dev/smartpqi/smartpqi_structures.h +++ b/sys/dev/smartpqi/smartpqi_structures.h @@ -1,5 +1,5 @@ /*- - * Copyright 2016-2025 Microchip Technology, Inc. and/or its subsidiaries. + * Copyright 2016-2026 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 @@ -1168,7 +1168,7 @@ typedef struct bmic_sense_feature_page_header { uint8_t page; uint8_t sub_page; uint16_t total_length; /** Total length of the page. - * The length is the same wheteher the request buffer is too short or not. + * The length is the same whether the request buffer is too short or not. * When printing out the page, only print the buffer length. */ } OS_ATTRIBUTE_PACKED bmic_sense_feature_page_header_t; From nobody Tue May 26 15:21:01 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPxKT1wz3z6fx7g for ; Tue, 26 May 2026 15:21: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPxKT1JqSz3wm5 for ; Tue, 26 May 2026 15:21:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779808861; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gQjCRhnt4YmkhTXmOmrA8k0xZOfWTMpNooL3VeSm4tk=; b=jMdQfGZNIH2WnUO3W5d/9G2Cs4+kgK+V7FvB6EcOgZ8FprOETJA/GIn920aCuyXFvWfnrp QZfJlMd+4JxrqhpbquVOEBYddA/ncHL+vvEbhX5kGMynIn0fFoWXTxSeqzbTyYIweEJzIP KyUV+z1taZzRG7nuiparbS41ng04fIQyMzKfMvDTI1m+SXar4TQd6w8HG2q0kEkEcXupN+ kUThrbDeZ17v9z9fbPXSipuQ42uqVKjVSKnIimV6r15ckbXYPLWo8wkC66o0VlcCl65i1s gZZ2AyA4OtDERsnMrabaksIOoEXaDA0PTnr14btjLfeW5O1tY8MJQD2+4KtqMw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779808861; a=rsa-sha256; cv=none; b=egx2IX22Yx6mF2t//YFpjVCDx7barwnTIgw2R+2h7sIhQOoD9Un4e530RlMNfququ7+BMn gMKEFa/7e+PVb5Y2FjJJ8skOnlh13QlqLdYr04pAvfjJxud/Tv8nJ4NyMuYO27V1UPDMjq 13+p73jBxh74+5rykmTvyjV9KjJi4tXXEWH/pPkhbwOjn5xAi43Pb7Y3o9GKILjLD72ttr FUJhZu9MgfUSNNuIma2h4Xd2pqfdSVP27Z5TRcG4samklZOl2uLtaYUvcDUirJCtYac4Bx LAGF5hvZGkjVet+4PHYdIQDFXCKb82GI1EZ03EwmEjK5ulkBrZpHxCsPFpOrLw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779808861; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gQjCRhnt4YmkhTXmOmrA8k0xZOfWTMpNooL3VeSm4tk=; b=acIdXODnSp3SxUVkB1luo1eRvWPJYG3Td3udJruYSUZN9MZcZHl98OkusQOvWNT8E8IFH7 LkktFg2aDiNqstr+YbeILTPsRKsVN8cC52g3lS4SQ3667GOVu9C1nhtBgJUtdO3TZIfs/U CHOc9oIhkulAg7ClmA/EL+i7JEJmapKrsaVr7muHlVeiLD5UfPdKcodPH95xAXmQ4/uKSu NvIU4qFkWoUro7jq824xyWwoQFHHJc3NIPDDkcDgsJgNYbBWBs9EUvwj09hihu/yMQSn2l lUA2qHmt5BRCbxekrV79ORIGvyirC3cVp1Y7chjy0ugB5aBGuEm2NAyRcqQ2jg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPxKT0Wg4z2wL for ; Tue, 26 May 2026 15:21:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 23d78 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 26 May 2026 15:21:01 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Hall Subject: git: 183dd2e4a3e8 - stable/15 - smartpqi: Add runtime sysctl for debug_level and log device state changes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 183dd2e4a3e8af968ae3f07b7b4c97345a348362 Auto-Submitted: auto-generated Date: Tue, 26 May 2026 15:21:01 +0000 Message-Id: <6a15ba5d.23d78.23289f04@gitrepo.freebsd.org> The branch stable/15 has been updated by jrhall: URL: https://cgit.FreeBSD.org/src/commit/?id=183dd2e4a3e8af968ae3f07b7b4c97345a348362 commit 183dd2e4a3e8af968ae3f07b7b4c97345a348362 Author: John Hall AuthorDate: 2026-05-04 21:43:27 +0000 Commit: John Hall CommitDate: 2026-05-26 15:20:39 +0000 smartpqi: Add runtime sysctl for debug_level and log device state changes The smartpqi driver did not log device add/remove or controller events to syslog, and hw.smartpqi.debug_level could only be set at boot via loader.conf with no runtime sysctl interface. Add a read-write sysctl at dev.smartpqi.N.debug_level for runtime debug level changes. Add device_printf calls for device addition, removal, and controller events (hotplug, hardware, physical/logical device, AIO state/config changes) so state changes always appear in dmesg. Add DBG_DISC logging for discovery state transitions. Fix spelling errors in strings and comments across the driver. Bump driver version to 14.4691.1.2000 / 15.2.1.2000. PR: 294161 Reviewed by: imp Approved by: imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D56832 (cherry picked from commit 0d48d6d7bba77d6c3736ce56ea5667bfbde89705) --- sys/dev/smartpqi/smartpqi_cam.c | 4 ++-- sys/dev/smartpqi/smartpqi_defines.h | 8 ++++---- sys/dev/smartpqi/smartpqi_discovery.c | 21 ++++++++++++++++++--- sys/dev/smartpqi/smartpqi_event.c | 17 ++++++++++++++--- sys/dev/smartpqi/smartpqi_main.c | 12 +++++++++++- sys/dev/smartpqi/smartpqi_misc.c | 4 ++-- sys/dev/smartpqi/smartpqi_queue.c | 4 ++-- sys/dev/smartpqi/smartpqi_request.c | 4 ++-- sys/dev/smartpqi/smartpqi_response.c | 4 ++-- sys/dev/smartpqi/smartpqi_sis.c | 6 +++--- sys/dev/smartpqi/smartpqi_structures.h | 4 ++-- 11 files changed, 62 insertions(+), 26 deletions(-) diff --git a/sys/dev/smartpqi/smartpqi_cam.c b/sys/dev/smartpqi/smartpqi_cam.c index 690b38c9f855..6ded8aa97e39 100644 --- a/sys/dev/smartpqi/smartpqi_cam.c +++ b/sys/dev/smartpqi/smartpqi_cam.c @@ -1,5 +1,5 @@ /*- - * Copyright 2016-2025 Microchip Technology, Inc. and/or its subsidiaries. + * Copyright 2016-2026 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 @@ -1300,7 +1300,7 @@ register_sim(struct pqisrc_softstate *softs, int card_index) csa.callback_arg = softs; xpt_action((union ccb *)&csa); if (csa.ccb_h.status != CAM_REQ_CMP) { - DBG_ERR("Unable to register smartpqi_aysnc handler: %d!\n", + DBG_ERR("Unable to register smartpqi_async handler: %d!\n", csa.ccb_h.status); } diff --git a/sys/dev/smartpqi/smartpqi_defines.h b/sys/dev/smartpqi/smartpqi_defines.h index 0277abd3e318..c4084f069588 100644 --- a/sys/dev/smartpqi/smartpqi_defines.h +++ b/sys/dev/smartpqi/smartpqi_defines.h @@ -1,5 +1,5 @@ /*- - * Copyright 2016-2025 Microchip Technology, Inc. and/or its subsidiaries. + * Copyright 2016-2026 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 @@ -944,12 +944,12 @@ typedef uint8_t *passthru_buf_type_t; #define PQISRC_DRIVER_MAJOR __FreeBSD__ #if __FreeBSD__ <= 14 -#define PQISRC_DRIVER_MINOR 4690 +#define PQISRC_DRIVER_MINOR 4691 #else #define PQISRC_DRIVER_MINOR 2 #endif -#define PQISRC_DRIVER_RELEASE 0 -#define PQISRC_DRIVER_REVISION 2008 +#define PQISRC_DRIVER_RELEASE 1 +#define PQISRC_DRIVER_REVISION 2000 #define STR(s) # s #define PQISRC_VERSION(a, b, c, d) STR(a.b.c-d) diff --git a/sys/dev/smartpqi/smartpqi_discovery.c b/sys/dev/smartpqi/smartpqi_discovery.c index a7de5a149810..8682e6cabd7e 100644 --- a/sys/dev/smartpqi/smartpqi_discovery.c +++ b/sys/dev/smartpqi/smartpqi_discovery.c @@ -1,5 +1,5 @@ /*- - * Copyright 2016-2025 Microchip Technology, Inc. and/or its subsidiaries. + * Copyright 2016-2026 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 @@ -155,7 +155,7 @@ pqisrc_remove_target_bit(pqisrc_softstate_t *softs, int target) softs->bit_map.bit_vector[target] = SLOT_AVAILABLE; } -/* Use bit map to find availible targets */ +/* Use bit map to find available targets */ int pqisrc_find_avail_target(pqisrc_softstate_t *softs) { @@ -1423,7 +1423,11 @@ pqisrc_add_device(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device) if(device->expose_device) { pqisrc_init_device_active_io(softs, device); - /* TBD: Call OS upper layer function to add the device entry */ + device_printf(softs->os_specific.pqi_dev, + "device added: vendor=%s model=%s B%d:T%d:L%d type=%s\n", + device->vendor, device->model, + device->bus, device->target, device->lun, + device->is_physical_device ? "physical" : "logical"); os_add_device(softs,device); } DBG_FUNC("OUT\n"); @@ -1451,6 +1455,11 @@ pqisrc_remove_device(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device) } /* Wait for device outstanding Io's */ pqisrc_wait_for_device_commands_to_complete(softs, device); + device_printf(softs->os_specific.pqi_dev, + "device removed: vendor=%s model=%s B%d:T%d:L%d type=%s\n", + device->vendor, device->model, + device->bus, device->target, device->lun, + device->is_physical_device ? "physical" : "logical"); /* Call OS upper layer function to remove the exposed device entry */ os_remove_device(softs,device); DBG_FUNC("OUT\n"); @@ -1674,10 +1683,14 @@ pqisrc_update_device_list(pqisrc_softstate_t *softs, case DEVICE_NOT_FOUND: /* Device not found in existing list */ device->new_device = true; + DBG_DISC("new device found B%d:T%d:L%d\n", + device->bus, device->target, device->lun); break; case DEVICE_CHANGED: /* Actual device gone need to add device to list*/ device->new_device = true; + DBG_DISC("device changed B%d:T%d:L%d\n", + device->bus, device->target, device->lun); break; case DEVICE_IN_REMOVE: /*Older device with same target/lun is in removal stage*/ @@ -1686,6 +1699,8 @@ pqisrc_update_device_list(pqisrc_softstate_t *softs, * free call*/ device->new_device = false; same_device->schedule_rescan = true; + DBG_DISC("device in removal B%d:T%d:L%d, scheduling rescan\n", + device->bus, device->target, device->lun); break; default: break; diff --git a/sys/dev/smartpqi/smartpqi_event.c b/sys/dev/smartpqi/smartpqi_event.c index 77a70f9fb031..c3c27c9e1c0b 100644 --- a/sys/dev/smartpqi/smartpqi_event.c +++ b/sys/dev/smartpqi/smartpqi_event.c @@ -1,5 +1,5 @@ /*- - * Copyright 2016-2025 Microchip Technology, Inc. and/or its subsidiaries. + * Copyright 2016-2026 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 @@ -204,6 +204,17 @@ pqisrc_process_event_intr_src(pqisrc_softstate_t *softs,int obq_id) } if (event_index >= 0) { + static const char *event_names[] = { + [PQI_EVENT_HOTPLUG] = "hotplug", + [PQI_EVENT_HARDWARE] = "hardware", + [PQI_EVENT_PHYSICAL_DEVICE] = "physical device", + [PQI_EVENT_LOGICAL_DEVICE] = "logical device", + [PQI_EVENT_AIO_STATE_CHANGE] = "AIO state change", + [PQI_EVENT_AIO_CONFIG_CHANGE] = "AIO config change", + }; + device_printf(softs->os_specific.pqi_dev, + "event: %s (type=0x%x)\n", + event_names[event_index], response.event_type); if(response.request_acknowledge) { pending_event = &softs->pending_events[event_index]; pending_event->pending = true; @@ -385,7 +396,7 @@ pqisrc_report_event_config(pqisrc_softstate_t *softs) pqi_event_config_request_t request; pqi_event_config_t *event_config_p ; dma_mem_t buf_report_event ; - /*bytes to be allocaed for report event config data-in buffer */ + /*bytes to be allocated for report event config data-in buffer */ uint32_t alloc_size = sizeof(pqi_event_config_t) ; memset(&request, 0 , sizeof(request)); @@ -446,7 +457,7 @@ pqisrc_set_event_config(pqisrc_softstate_t *softs) pqi_event_config_request_t request; pqi_event_config_t *event_config_p; dma_mem_t buf_set_event; - /*bytes to be allocaed for set event config data-out buffer */ + /*bytes to be allocated for set event config data-out buffer */ uint32_t alloc_size = sizeof(pqi_event_config_t); memset(&request, 0 , sizeof(request)); diff --git a/sys/dev/smartpqi/smartpqi_main.c b/sys/dev/smartpqi/smartpqi_main.c index 1f006939bf7c..fbfbcc962f35 100644 --- a/sys/dev/smartpqi/smartpqi_main.c +++ b/sys/dev/smartpqi/smartpqi_main.c @@ -1,5 +1,5 @@ /*- - * Copyright 2016-2025 Microchip Technology, Inc. and/or its subsidiaries. + * Copyright 2016-2026 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 @@ -427,6 +427,16 @@ smartpqi_attach(device_t dev) goto out; } + /* Register sysctl for runtime debug_level changes */ + { + struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(dev); + struct sysctl_oid *tree = device_get_sysctl_tree(dev); + + SYSCTL_ADD_ULONG(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "debug_level", CTLFLAG_RW, &logging_level, + "Debug logging bitmask"); + } + goto out; dma_out: diff --git a/sys/dev/smartpqi/smartpqi_misc.c b/sys/dev/smartpqi/smartpqi_misc.c index 6db0d80ed993..fd0b907aa252 100644 --- a/sys/dev/smartpqi/smartpqi_misc.c +++ b/sys/dev/smartpqi/smartpqi_misc.c @@ -1,5 +1,5 @@ /*- - * Copyright 2016-2025 Microchip Technology, Inc. and/or its subsidiaries. + * Copyright 2016-2026 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 @@ -252,7 +252,7 @@ bsd_set_hint_scatter_gather_config(struct pqisrc_softstate *softs) DBG_FUNC("IN\n"); - /* At least > 16 sg's required to wotk hint correctly. + /* At least > 16 sg's required to work hint correctly. * Default the sg count set by driver/controller. */ if ((!softs->hint.sg_segments) || (softs->hint.sg_segments > diff --git a/sys/dev/smartpqi/smartpqi_queue.c b/sys/dev/smartpqi/smartpqi_queue.c index e8a467531aa4..679d956f6f36 100644 --- a/sys/dev/smartpqi/smartpqi_queue.c +++ b/sys/dev/smartpqi/smartpqi_queue.c @@ -1,5 +1,5 @@ /*- - * Copyright 2016-2025 Microchip Technology, Inc. and/or its subsidiaries. + * Copyright 2016-2026 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 @@ -729,7 +729,7 @@ pqisrc_create_op_ibq(pqisrc_softstate_t *softs, op_ib_q->pi_register_offset); } else { int i = 0; - DBG_WARN("Error Status Decsriptors\n"); + DBG_WARN("Error Status Descriptors\n"); for (i = 0; i < 4; i++) DBG_WARN(" %x\n",admin_resp.resp_type.create_op_iq.status_desc[i]); } diff --git a/sys/dev/smartpqi/smartpqi_request.c b/sys/dev/smartpqi/smartpqi_request.c index c5f8ac3c41ba..655660615797 100644 --- a/sys/dev/smartpqi/smartpqi_request.c +++ b/sys/dev/smartpqi/smartpqi_request.c @@ -1,5 +1,5 @@ /*- - * Copyright 2016-2025 Microchip Technology, Inc. and/or its subsidiaries. + * Copyright 2016-2026 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 @@ -1998,7 +1998,7 @@ pqisrc_send_raid_tmf(pqisrc_softstate_t *softs, pqi_scsi_dev_t const *devp, if (softs->timeout_in_tmf && tmf_type == SOP_TASK_MANAGEMENT_LUN_RESET) { - /* OS_TMF_TIMEOUT_SEC - 1 to accomodate driver processing */ + /* OS_TMF_TIMEOUT_SEC - 1 to accommodate driver processing */ tmf_req.timeout_in_sec = OS_TMF_TIMEOUT_SEC - 1; } diff --git a/sys/dev/smartpqi/smartpqi_response.c b/sys/dev/smartpqi/smartpqi_response.c index 38695860e520..1ae74a5b95ff 100644 --- a/sys/dev/smartpqi/smartpqi_response.c +++ b/sys/dev/smartpqi/smartpqi_response.c @@ -1,5 +1,5 @@ /*- - * Copyright 2016-2025 Microchip Technology, Inc. and/or its subsidiaries. + * Copyright 2016-2026 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 @@ -275,7 +275,7 @@ pqisrc_is_innocuous_error(pqisrc_softstate_t *softs, rcb_t *rcb, void *err_info) if (raid_err->data_out_result == PQI_RAID_DATA_IN_OUT_UNDERFLOW) return true; - /* We get these a alot: leave a tiny breadcrumb about the error, + /* We get these a lot: leave a tiny breadcrumb about the error, but don't do full spew about it */ if (raid_err->status == PQI_AIO_STATUS_CHECK_CONDITION) { diff --git a/sys/dev/smartpqi/smartpqi_sis.c b/sys/dev/smartpqi/smartpqi_sis.c index 82eb999ca4b8..99aa952eb149 100644 --- a/sys/dev/smartpqi/smartpqi_sis.c +++ b/sys/dev/smartpqi/smartpqi_sis.c @@ -1,5 +1,5 @@ /*- - * Copyright 2016-2025 Microchip Technology, Inc. and/or its subsidiaries. + * Copyright 2016-2026 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 @@ -26,7 +26,7 @@ #include "smartpqi_includes.h" -/* Function for disabling msix interrupots */ +/* Function for disabling msix interrupts */ void sis_disable_msix(pqisrc_softstate_t *softs) { @@ -96,7 +96,7 @@ sis_disable_interrupt(pqisrc_softstate_t *softs) sis_disable_msix(softs); break; default: - DBG_ERR("Inerrupt mode none!\n"); + DBG_ERR("Interrupt mode none!\n"); break; } diff --git a/sys/dev/smartpqi/smartpqi_structures.h b/sys/dev/smartpqi/smartpqi_structures.h index 0c9ad375823d..ada6676ada8f 100644 --- a/sys/dev/smartpqi/smartpqi_structures.h +++ b/sys/dev/smartpqi/smartpqi_structures.h @@ -1,5 +1,5 @@ /*- - * Copyright 2016-2025 Microchip Technology, Inc. and/or its subsidiaries. + * Copyright 2016-2026 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 @@ -1168,7 +1168,7 @@ typedef struct bmic_sense_feature_page_header { uint8_t page; uint8_t sub_page; uint16_t total_length; /** Total length of the page. - * The length is the same wheteher the request buffer is too short or not. + * The length is the same whether the request buffer is too short or not. * When printing out the page, only print the buffer length. */ } OS_ATTRIBUTE_PACKED bmic_sense_feature_page_header_t; From nobody Tue May 26 15:52:29 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPy1p21gcz6g0fg for ; Tue, 26 May 2026 15:52: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPy1n5Bsfz42rN for ; Tue, 26 May 2026 15:52:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779810749; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vd7ZNc+nzTrlhpA02sb13g84w+/+3Lc3m9NbTMyLbmk=; b=IMm4ChSokAOpNrmHpk1GGya49Ha7Dq0Sc+qtMot2I14ucQdXYSQnkh+yTxtoEqRCAi1eVJ CYBs+kNOB94jCtFLi8dL044q+caIEKxfliEQYYV2h874jM6NfNFshkSHlYLl2Df+XOK76P PcjCsgsPPBJhjZLdLvBDoGmT4i5FhxqaU+IKjddXsGypwVH44t9K+tYDWUyQ3vho4nyplq gdpXp4PFtLfHUTFYShfFmvSk0PI9EwgQSDU/sbzSYx32nz6+eexVgKyJPpA7v/Mck7vmOy EyruT4WoX1gOfGiuUv5yB0GiIcL943OK8F8+xbGVCKaI1MQI1/5iLZJwlXGNiQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779810749; a=rsa-sha256; cv=none; b=Wu8FdmBacvQ8N0vtpohdE08hQ5rTCbWWtpmk0xdYyUML1CI4pBuukch4InJYudTGm5VrMx Q1mXWR0ZjOPcLDw3AG6fUcYm79Yv6+PvIvH2YE8Jq80X86dKQNHVytKfeIy26m+0XNRFcz cU+JYGYrPRziBMQ5HbytjeqlbrYdbRSZR1EDHUySO1j0bt45dz89IqXW6pHX5ReQABp2SU imADCR8LecxG1TSj2Y+IRQDDoLYFkiDqQZl3jikNJHOAO15ziZGZI7R9LeBuJUPg4ecSUY BBHo98fMk2+gnzlDabzttavTk4JlmuEgV4kYyCmqrImWPms5k3AVmF0M0P1tKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779810749; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vd7ZNc+nzTrlhpA02sb13g84w+/+3Lc3m9NbTMyLbmk=; b=K6ogmqv9R7lWAggPIKTetxp2hB3Xt5UqLqPeh6+lcoekwmRZhhMMOj0NVC6wpWZifymNmI rkuK1okSMw8S+FpZv+f45xfnTq7Io+vdqP+SLT9lsmNJBtEH8sC3BPOSmBsh5H+nL1EY0u iZRy0xwzkPz2IPIJmkkP4yWZ4VUEn2uKeTs9/qBBfVRMrkRy0XbIwZh0XJrihWQ9b6HjXD FscmAYfDTqxFj8thMCTs5mrnAtr1w3OhlyvKtkSMwde7dqQfvOv/VsR+sPvYsJCj3SXDRe M6+KswuTwnqNjFOkGOmsD1LLVp8m7ifBxbUADCifJHDCe2Qk6xKWRryBRVUCqg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPy1n4kySz3bp for ; Tue, 26 May 2026 15:52:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31588 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 26 May 2026 15:52:29 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 9823698a48d3 - main - RELNOTES: Add entries for various commits through early March 2026 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9823698a48d33ba70323bb0448b5274d791e58f2 Auto-Submitted: auto-generated Date: Tue, 26 May 2026 15:52:29 +0000 Message-Id: <6a15c1bd.31588.ec85c0e@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=9823698a48d33ba70323bb0448b5274d791e58f2 commit 9823698a48d33ba70323bb0448b5274d791e58f2 Author: John Baldwin AuthorDate: 2026-05-26 15:52:18 +0000 Commit: John Baldwin CommitDate: 2026-05-26 15:52:18 +0000 RELNOTES: Add entries for various commits through early March 2026 Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D56485 --- RELNOTES | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/RELNOTES b/RELNOTES index 0a25313d3f77..befc1e6556a6 100644 --- a/RELNOTES +++ b/RELNOTES @@ -21,6 +21,62 @@ b92b9da33006, 13d3bd165e22: table. One can run a multicast routing daemon within each FIB; the FIB of the routing socket determines the corresponding multicast routing table. +5c2186b99254,628d7a3270b6: + When the sector size for an NVMe namespace changes, nda(4) now + reports this as a media change rather than a disk resize + event. nda(4) also no longer reports a disk resize event in + some cases when the namespace's size had not changed. nda(4) + also reprobes NVMe namespaces each time they are opened to + check for a new sector size or namespace size. + +7a323f873662: + Remove the le(4) driver. This driver supported older 10Mbps + and 100Mbps Ethernet adapters. True hardware devices have not + been used in FreeBSD systems in many years, but the driver was + previously retained for use with MIPS QEMU virtual machines. + +e51ef8ae490f: + Add initial support for instruction-based sampling (IBS) + performance counters on AMD processors to hwpmc(4). + +d69fc3a9dc71: + The EFI boot loader now tries all ZFS pools found during + probing when looking for a boot pool. Previously it would try + only the first pool found. + +4d5c434ed16e: + Use the BSD-licensed implementation of diff3 instead of GNU diff3 + by default. + +7f54c65abc67: + Update the smartpqi(4) driver to vendor version 14.4690.0.2008 + - 15.2.0.2008. This includes support for new controllers and + renaming Microsemi to Microchip. + +350c1232a57a: + nvmecontrol(8)'s telemetry-log now works reliably. + +d14e018024bb,b125c4d13095,1322760fd127,0730a05cd383: + Permit both SCHED_ULE and SCHED_4BSD to be compiled into the + same kernel. The scheduler can be selected at boot time by + setting the kern.sched_name tunable to the scheduler name + ("4BSD" or "ULE"). The default scheduler is ULE. This is + currently enabled in amd64 kernels by default. + +90a7728cd890: + Update nuageinit to request configuration on all network + interfaces. nuageinit will now issue DHCP requests on all + network interfaces and request configuration data from the + first interface which successfully obtains a lease. + +92ba9b2fe589: + Add RoCE support for Broadcom BCM576xx controllers. + +fb4b0c911951: + Add a facility to witness(4) to provide more detailed information + about lock order reversals detailing when initial lock orders were + established. + 65f5dd42f11c: sh(1) add -l option which makes sh act as a login shell and read the profile. From nobody Tue May 26 16:07:16 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPyLr3QnLz6g25p for ; Tue, 26 May 2026 16:07: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPyLr1SdHz455d for ; Tue, 26 May 2026 16:07:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779811636; 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=0IoeVWTyU8PYfq1YepMLyWWDqfbfl8BafUXW5cmUtUY=; b=fnyInytfTF9sERv00N4GTICwWDZ6UdZDHjQhFGicbzIQtwRUEfexpSgW9X6ySWiEE4zqt3 HWfdGFof/rZdLMBOyCyZ3wH0oWHmqklFvPJSv91Jp8yhYGP3v8P/6BlCsTZfyfeIqeqtyy cfYAF07wxn78fq6t75XJfPFsJr1fhseUHQOv+s2ZUHnIbkI4EAgB7o0WluSF6BKYhPoRyJ FVbtu0VC4Yq+3tC73NTva2GXDfgWQJZS0f0uPrMSnjTQccn2aNSaCPdbfBqM9R1CzDTh/J VpmsknUTNJsfjj5+q8vvEXsxevnSiSd0qit/2c49708CUxvRR8g/ZqAgrYoMSw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779811636; a=rsa-sha256; cv=none; b=puYASP+sMp/BieQmf7fAdHht7nNPUX5nVsCTc5Jpew9NxJn/h1B4g0ShIr1/jQOI2QBRlv YFwrFDX1YPNEzS51sGlZ+UXPXqBfskocni3t3VIh6WkaX4xVN1PQDJpanZqlUKnpzrj5Wx SjnfrpbxwTrhPAF2RCZ503WDzYxVlv94U0wXuHmYmGAas0P4mWD8O0x4sUT8NFSwLMtfBD OnYWwo0phPxYk8qADj91m9dJ6FJ5MAqR/LMQylB0ykHZgTS+Wwuep5hWlHPGydhQF8h/rc rXPY4LswlVVKBDS8C3Vshlv7V0kb38DwMx0g5TW5ZM9l3BNzbq06WwIjdhPBDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779811636; 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=0IoeVWTyU8PYfq1YepMLyWWDqfbfl8BafUXW5cmUtUY=; b=ZDAQ5EO7uXWRAku62MtDCjTlpQU0zwBWZvAdPRC2M0dF0HjrZnJGZtqJsR9R8XHdWQgh91 9wocQdtVp+V5nCAkdKTtVynnvaVKeU3FJkpUvN/iNsRdzZBb8co0EJwZ7ZmKpq3oeYS+qk Lr3Ps0QD2xg1aAlb1pQFIVJznDNjMpA1RtfHaGXlZvLJUSTEJ8HLqRYo5vZmymPqfe0Ozk qlz6Vs0usFwgZzHqy/IzFjnJSxhZ8wKDnyB2qZiWv9FUWArNE433CZ6Q+dEWXVOr8cAdj/ lEiZiT7KioKjFY2L+ofHvoh4+HObmRZF84GMvAjd3yZMiFiGSSOdt0GkKDSSzw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPyLr0dYWz3pC for ; Tue, 26 May 2026 16:07:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31f83 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 26 May 2026 16:07:16 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Hans Rosenfeld From: Mark Johnston Subject: git: 19728f98cb5c - main - bhyve/virtio-scsi: Implement task management functions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 19728f98cb5c59f153de8df8b458c42e3e5168f6 Auto-Submitted: auto-generated Date: Tue, 26 May 2026 16:07:16 +0000 Message-Id: <6a15c534.31f83.612a3474@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=19728f98cb5c59f153de8df8b458c42e3e5168f6 commit 19728f98cb5c59f153de8df8b458c42e3e5168f6 Author: Hans Rosenfeld AuthorDate: 2025-10-29 11:04:20 +0000 Commit: Mark Johnston CommitDate: 2026-05-26 16:03:12 +0000 bhyve/virtio-scsi: Implement task management functions Currently, all I/O requests are queued internally, and a number of threads will pick I/O requests of the queue and send them to CTL with a synchronous CTL_IO ioctl. On the other hand, TMF requests are sent to CTL immediately using the same synchronous ioctl. Besides being unworkable for non-CTL backends such as for SCSI passthrough, this simple approach may easily run into situations where a TMF request operating on a particular I/O request is sent to CTL while it is still on our queue and thus unknown to CTL. In addition, for target and/or LUN resets we should really clear our queue and return all outstanding I/O requests with a proper status. Reviewed by: markj MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D53222 --- usr.sbin/bhyve/pci_virtio_scsi.c | 452 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 421 insertions(+), 31 deletions(-) diff --git a/usr.sbin/bhyve/pci_virtio_scsi.c b/usr.sbin/bhyve/pci_virtio_scsi.c index d7fd30f55209..a77fadf71aff 100644 --- a/usr.sbin/bhyve/pci_virtio_scsi.c +++ b/usr.sbin/bhyve/pci_virtio_scsi.c @@ -202,6 +202,8 @@ struct pci_vtscsi_softc { #define VIRTIO_SCSI_T_TMF_QUERY_TASK 6 #define VIRTIO_SCSI_T_TMF_QUERY_TASK_SET 7 +#define VIRTIO_SCSI_T_TMF_MAX_FUNC VIRTIO_SCSI_T_TMF_QUERY_TASK_SET + /* command-specific response values */ #define VIRTIO_SCSI_S_FUNCTION_COMPLETE 0 #define VIRTIO_SCSI_S_FUNCTION_SUCCEEDED 10 @@ -274,6 +276,15 @@ struct pci_vtscsi_req_cmd_wr { uint8_t sense[]; } __attribute__((packed)); +enum pci_vtscsi_walk { + PCI_VTSCSI_WALK_CONTINUE = 0, + PCI_VTSCSI_WALK_STOP, +}; + +typedef enum pci_vtscsi_walk pci_vtscsi_walk_t; +typedef pci_vtscsi_walk_t pci_vtscsi_walk_request_queue_cb_t( + struct pci_vtscsi_queue *, struct pci_vtscsi_request *, void *); + static void *pci_vtscsi_proc(void *); static void pci_vtscsi_reset(void *); static void pci_vtscsi_neg_features(void *, uint64_t); @@ -287,11 +298,24 @@ static inline uint8_t pci_vtscsi_get_target(struct pci_vtscsi_softc *, static inline uint16_t pci_vtscsi_get_lun(struct pci_vtscsi_softc *, const uint8_t *); -static void pci_vtscsi_control_handle(struct pci_vtscsi_softc *, void *, size_t); +static pci_vtscsi_walk_request_queue_cb_t pci_vtscsi_tmf_handle_abort_task; +static pci_vtscsi_walk_request_queue_cb_t pci_vtscsi_tmf_handle_abort_task_set; +static pci_vtscsi_walk_request_queue_cb_t pci_vtscsi_tmf_handle_clear_aca; +static pci_vtscsi_walk_request_queue_cb_t pci_vtscsi_tmf_handle_clear_task_set; +static pci_vtscsi_walk_request_queue_cb_t pci_vtscsi_tmf_handle_i_t_nexus_reset; +static pci_vtscsi_walk_request_queue_cb_t pci_vtscsi_tmf_handle_lun_reset; +static pci_vtscsi_walk_request_queue_cb_t pci_vtscsi_tmf_handle_query_task; +static pci_vtscsi_walk_request_queue_cb_t pci_vtscsi_tmf_handle_query_task_set; + +static pci_vtscsi_walk_t pci_vtscsi_walk_request_queue( + struct pci_vtscsi_queue *, pci_vtscsi_walk_request_queue_cb_t *, void *); + static void pci_vtscsi_tmf_handle(struct pci_vtscsi_softc *, struct pci_vtscsi_ctrl_tmf *); static void pci_vtscsi_an_handle(struct pci_vtscsi_softc *, struct pci_vtscsi_ctrl_an *); +static void pci_vtscsi_control_handle(struct pci_vtscsi_softc *, void *, + size_t); static struct pci_vtscsi_request *pci_vtscsi_alloc_request( struct pci_vtscsi_softc *); @@ -520,38 +544,270 @@ pci_vtscsi_get_lun(struct pci_vtscsi_softc *sc, const uint8_t *lun) return (((lun[2] << 8) | lun[3]) & 0x3fff); } -static void -pci_vtscsi_control_handle(struct pci_vtscsi_softc *sc, void *buf, - size_t bufsize) +/* + * ABORT TASK: Abort the specifed task queued for this LUN. + * + * We can stop once we have found the specified task queued for this LUN. + */ +static pci_vtscsi_walk_t +pci_vtscsi_tmf_handle_abort_task(struct pci_vtscsi_queue *q, + struct pci_vtscsi_request *req, void *arg) { - struct pci_vtscsi_ctrl_tmf *tmf; - struct pci_vtscsi_ctrl_an *an; - uint32_t type; + struct pci_vtscsi_ctrl_tmf *tmf = arg; - if (bufsize < sizeof(uint32_t)) { - WPRINTF("ignoring truncated control request"); - return; - } + assert(tmf->subtype == VIRTIO_SCSI_T_TMF_ABORT_TASK); - type = *(uint32_t *)buf; + if (pci_vtscsi_get_target(q->vsq_sc, tmf->lun) != + pci_vtscsi_get_target(q->vsq_sc, req->vsr_cmd_rd->lun)) + return (PCI_VTSCSI_WALK_CONTINUE); - if (type == VIRTIO_SCSI_T_TMF) { - if (bufsize != sizeof(*tmf)) { - WPRINTF("ignoring tmf request with size %zu", bufsize); - return; - } - tmf = (struct pci_vtscsi_ctrl_tmf *)buf; - pci_vtscsi_tmf_handle(sc, tmf); - } else if (type == VIRTIO_SCSI_T_AN_QUERY) { - if (bufsize != sizeof(*an)) { - WPRINTF("ignoring AN request with size %zu", bufsize); - return; - } - an = (struct pci_vtscsi_ctrl_an *)buf; - pci_vtscsi_an_handle(sc, an); + if (pci_vtscsi_get_lun(q->vsq_sc, tmf->lun) != + pci_vtscsi_get_lun(q->vsq_sc, req->vsr_cmd_rd->lun)) + return (PCI_VTSCSI_WALK_CONTINUE); + + if (tmf->id != req->vsr_cmd_rd->id) + return (PCI_VTSCSI_WALK_CONTINUE); + + req->vsr_cmd_wr->response = VIRTIO_SCSI_S_ABORTED; + STAILQ_REMOVE(&q->vsq_requests, req, pci_vtscsi_request, vsr_link); + pci_vtscsi_return_request(q, req, 0); + + return (PCI_VTSCSI_WALK_STOP); +} + +/* + * ABORT TASK SET: Abort all tasks queued for this LUN. + */ +static pci_vtscsi_walk_t +pci_vtscsi_tmf_handle_abort_task_set(struct pci_vtscsi_queue *q, + struct pci_vtscsi_request *req, void *arg) +{ + struct pci_vtscsi_ctrl_tmf *tmf = arg; + + assert(tmf->subtype == VIRTIO_SCSI_T_TMF_ABORT_TASK_SET); + + if (pci_vtscsi_get_target(q->vsq_sc, tmf->lun) != + pci_vtscsi_get_target(q->vsq_sc, req->vsr_cmd_rd->lun)) + return (PCI_VTSCSI_WALK_CONTINUE); + + if (pci_vtscsi_get_lun(q->vsq_sc, tmf->lun) != + pci_vtscsi_get_lun(q->vsq_sc, req->vsr_cmd_rd->lun)) + return (PCI_VTSCSI_WALK_CONTINUE); + + req->vsr_cmd_wr->response = VIRTIO_SCSI_S_ABORTED; + STAILQ_REMOVE(&q->vsq_requests, req, pci_vtscsi_request, vsr_link); + pci_vtscsi_return_request(q, req, 0); + + return (PCI_VTSCSI_WALK_CONTINUE); +} + +/* + * CLEAR ACA: Clear ACA (auto contingent allegiance) state. + */ +static pci_vtscsi_walk_t +pci_vtscsi_tmf_handle_clear_aca(struct pci_vtscsi_queue *q __unused, + struct pci_vtscsi_request *req __unused, void *arg) +{ + struct pci_vtscsi_ctrl_tmf *tmf = arg; + + assert(tmf->subtype == VIRTIO_SCSI_T_TMF_CLEAR_ACA); + + /* + * We don't implement handling of NACA=1 in the CONTROL byte at all. + * + * Thus, we probably should start filtering NORMACA in INQUIRY and + * reject any command that sets NACA=1. + * + * In any case, there isn't anything we need to do with our queued + * requests, so stop right here. + */ + + return (PCI_VTSCSI_WALK_STOP); +} + +/* + * CLEAR TASK SET: Clear all tasks queued for this LUN. + * + * All tasks in our queue were placed there by us, so there can be no other + * I_T nexus involved. Hence, this is handled the same as ABORT TASK SET. + */ +static pci_vtscsi_walk_t +pci_vtscsi_tmf_handle_clear_task_set(struct pci_vtscsi_queue *q, + struct pci_vtscsi_request *req, void *arg) +{ + struct pci_vtscsi_ctrl_tmf *tmf = arg; + + assert(tmf->subtype == VIRTIO_SCSI_T_TMF_CLEAR_TASK_SET); + + if (pci_vtscsi_get_target(q->vsq_sc, tmf->lun) != + pci_vtscsi_get_target(q->vsq_sc, req->vsr_cmd_rd->lun)) + return (PCI_VTSCSI_WALK_CONTINUE); + + if (pci_vtscsi_get_lun(q->vsq_sc, tmf->lun) != + pci_vtscsi_get_lun(q->vsq_sc, req->vsr_cmd_rd->lun)) + return (PCI_VTSCSI_WALK_CONTINUE); + + req->vsr_cmd_wr->response = VIRTIO_SCSI_S_ABORTED; + STAILQ_REMOVE(&q->vsq_requests, req, pci_vtscsi_request, vsr_link); + pci_vtscsi_return_request(q, req, 0); + + return (PCI_VTSCSI_WALK_CONTINUE); +} + +/* + * I_T NEXUS RESET: Abort all tasks queued for any LUN of this target. + */ +static pci_vtscsi_walk_t +pci_vtscsi_tmf_handle_i_t_nexus_reset(struct pci_vtscsi_queue *q, + struct pci_vtscsi_request *req, void *arg) +{ + struct pci_vtscsi_ctrl_tmf *tmf = arg; + + assert(tmf->subtype == VIRTIO_SCSI_T_TMF_I_T_NEXUS_RESET); + + if (pci_vtscsi_get_target(q->vsq_sc, tmf->lun) != + pci_vtscsi_get_target(q->vsq_sc, req->vsr_cmd_rd->lun)) + return (PCI_VTSCSI_WALK_CONTINUE); + + /* + * T10 "06-026r4 SAM-4 TASK ABORTED status clarifications" indicates + * that we should actually return ABORTED here, but other documents + * such as the VirtIO spec suggest RESET. + */ + req->vsr_cmd_wr->response = VIRTIO_SCSI_S_RESET; + STAILQ_REMOVE(&q->vsq_requests, req, pci_vtscsi_request, vsr_link); + pci_vtscsi_return_request(q, req, 0); + + return (PCI_VTSCSI_WALK_CONTINUE); +} + +/* + * LOGICAL UNIT RESET: Abort all tasks queued for this LUN. + */ +static pci_vtscsi_walk_t +pci_vtscsi_tmf_handle_lun_reset(struct pci_vtscsi_queue *q, + struct pci_vtscsi_request *req, void *arg) +{ + struct pci_vtscsi_ctrl_tmf *tmf = arg; + + assert(tmf->subtype == VIRTIO_SCSI_T_TMF_LOGICAL_UNIT_RESET); + + if (pci_vtscsi_get_target(q->vsq_sc, tmf->lun) != + pci_vtscsi_get_target(q->vsq_sc, req->vsr_cmd_rd->lun)) + return (PCI_VTSCSI_WALK_CONTINUE); + + if (pci_vtscsi_get_lun(q->vsq_sc, tmf->lun) != + pci_vtscsi_get_lun(q->vsq_sc, req->vsr_cmd_rd->lun)) + return (PCI_VTSCSI_WALK_CONTINUE); + + /* + * T10 "06-026r4 SAM-4 TASK ABORTED status clarifications" indicates + * that we should actually return ABORTED here, but other documents + * such as the VirtIO spec suggest RESET. + */ + req->vsr_cmd_wr->response = VIRTIO_SCSI_S_RESET; + STAILQ_REMOVE(&q->vsq_requests, req, pci_vtscsi_request, vsr_link); + pci_vtscsi_return_request(q, req, 0); + + return (PCI_VTSCSI_WALK_CONTINUE); +} + +/* + * QUERY TASK: Is the specified task present in this LUN? + * + * We can stop once we have found the specified task queued for this LUN. + * + * Note that this function may cause false negatives under the following + * rare circumstances: + * (1) the specified task is still in the virtqueue, not yet having been + * processed by pci_vtscsi_requestq_notify() + * (2) the specified task was actively being processed by a worker thread + * but not yet processed by CTL by the time the QUERY TASK request was + * handled by CTL + * + * While a false negative may be confusing for a guest OS looking for the + * state of an I/O request it sent, it is not considered a fatal error of + * any kind and is easy to recover from. Also, in both of the above cases, + * the QUERY TASK TMF request would need to overtake the I/O request in + * question, which can only happen if the TMF request is sent immediately + * after the I/O request. While it is technically perfectly fine for a + * guest to do so, any normal use of QUERY TASK would involve a certain + * delay before the TMF request is sent, giving the I/O request time to + * be processed. + */ +static pci_vtscsi_walk_t +pci_vtscsi_tmf_handle_query_task(struct pci_vtscsi_queue *q, + struct pci_vtscsi_request *req, void *arg) +{ + struct pci_vtscsi_ctrl_tmf *tmf = arg; + + assert(tmf->subtype == VIRTIO_SCSI_T_TMF_QUERY_TASK); + + if (pci_vtscsi_get_target(q->vsq_sc, tmf->lun) != + pci_vtscsi_get_target(q->vsq_sc, req->vsr_cmd_rd->lun)) + return (PCI_VTSCSI_WALK_CONTINUE); + + if (pci_vtscsi_get_lun(q->vsq_sc, tmf->lun) != + pci_vtscsi_get_lun(q->vsq_sc, req->vsr_cmd_rd->lun)) + return (PCI_VTSCSI_WALK_CONTINUE); + + if (tmf->id != req->vsr_cmd_rd->id) + return (PCI_VTSCSI_WALK_CONTINUE); + + tmf->response = VIRTIO_SCSI_S_FUNCTION_SUCCEEDED; + return (PCI_VTSCSI_WALK_STOP); +} + +/* + * QUERY TASK SET: Are there any tasks present in this LUN? + * + * We can stop as soon as we've found at least one task queued for this LUN. + */ +static pci_vtscsi_walk_t +pci_vtscsi_tmf_handle_query_task_set(struct pci_vtscsi_queue *q, + struct pci_vtscsi_request *req, void *arg) +{ + struct pci_vtscsi_ctrl_tmf *tmf = arg; + + assert(tmf->subtype == VIRTIO_SCSI_T_TMF_QUERY_TASK_SET); + + if (pci_vtscsi_get_target(q->vsq_sc, tmf->lun) != + pci_vtscsi_get_target(q->vsq_sc, req->vsr_cmd_rd->lun)) + return (PCI_VTSCSI_WALK_CONTINUE); + + if (pci_vtscsi_get_lun(q->vsq_sc, tmf->lun) != + pci_vtscsi_get_lun(q->vsq_sc, req->vsr_cmd_rd->lun)) + return (PCI_VTSCSI_WALK_CONTINUE); + + tmf->response = VIRTIO_SCSI_S_FUNCTION_SUCCEEDED; + return (PCI_VTSCSI_WALK_STOP); +} + +static pci_vtscsi_walk_t +pci_vtscsi_walk_request_queue(struct pci_vtscsi_queue *q, + pci_vtscsi_walk_request_queue_cb_t cb, void *arg) +{ + struct pci_vtscsi_request *req, *tmp; + + STAILQ_FOREACH_SAFE(req, &q->vsq_requests, vsr_link, tmp) { + if (cb(q, req, arg) == PCI_VTSCSI_WALK_STOP) + return (PCI_VTSCSI_WALK_STOP); } + + return (PCI_VTSCSI_WALK_CONTINUE); } +static pci_vtscsi_walk_request_queue_cb_t *const pci_vtscsi_tmf_handler_cb[] = { + pci_vtscsi_tmf_handle_abort_task, + pci_vtscsi_tmf_handle_abort_task_set, + pci_vtscsi_tmf_handle_clear_aca, + pci_vtscsi_tmf_handle_clear_task_set, + pci_vtscsi_tmf_handle_i_t_nexus_reset, + pci_vtscsi_tmf_handle_lun_reset, + pci_vtscsi_tmf_handle_query_task, + pci_vtscsi_tmf_handle_query_task_set +}; + static void pci_vtscsi_tmf_handle(struct pci_vtscsi_softc *sc, struct pci_vtscsi_ctrl_tmf *tmf) @@ -561,6 +817,13 @@ pci_vtscsi_tmf_handle(struct pci_vtscsi_softc *sc, int err; int fd; + if (tmf->subtype > VIRTIO_SCSI_T_TMF_MAX_FUNC) { + WPRINTF("pci_vtscsi_tmf_handle: invalid subtype %u", + tmf->subtype); + tmf->response = VIRTIO_SCSI_S_FUNCTION_REJECTED; + return; + } + if (pci_vtscsi_check_lun(sc, tmf->lun) == false) { DPRINTF("TMF request to invalid LUN %.2hhx%.2hhx-%.2hhx%.2hhx-" "%.2hhx%.2hhx-%.2hhx%.2hhx", tmf->lun[0], tmf->lun[1], @@ -575,13 +838,49 @@ pci_vtscsi_tmf_handle(struct pci_vtscsi_softc *sc, fd = sc->vss_targets[target].vst_fd; + DPRINTF("TMF request tgt %d, lun %d, subtype %d, id %lu", + target, pci_vtscsi_get_lun(sc, tmf->lun), tmf->subtype, tmf->id); + + /* + * Lock out all the worker threads from processing any waiting requests + * while we're processing the TMF request. This also effectively blocks + * pci_vtscsi_requestq_notify() from adding any new requests to the + * request queue. This in turn means we will miss any I/O requests which + * may still be in the virtqueue. + * + * This does not prevent any requests currently being processed by CTL + * from being completed and returned, which we must guarantee to adhere + * to the ordering requirements for any TMF function which aborts tasks. + */ + for (int i = 0; i < VTSCSI_REQUESTQ; i++) { + struct pci_vtscsi_queue *q = &sc->vss_queues[i]; + + pthread_mutex_lock(&q->vsq_rmtx); + } + + /* + * CTL may set response to FAILURE for the TMF request. + * + * The default response of all TMF functions is FUNCTION COMPLETE if + * there was no error, regardless of whether it actually succeeded or + * not. The two notable exceptions are QUERY TASK and QUERY TASK SET, + * which will explicitly return FUNCTION SUCCEEDED if the specified + * task or any task was active in the target/LUN, respectively. + * + * Thus, we will call CTL first. Only if the response we get is + * FUNCTION COMPLETE we'll continue processing the TMF function + * on our queues. Note that there's a slim chance that we're racing + * against a worker thread that is actively processing an I/O request, + * which may lead to our TMF request being processed by CTL before the + * same I/O request, in which case it won't be on any queue either. + */ io = ctl_scsi_alloc_io(sc->vss_iid); if (io == NULL) { WPRINTF("failed to allocate ctl_io: err=%d (%s)", errno, strerror(errno)); tmf->response = VIRTIO_SCSI_S_FAILURE; - return; + goto out; } ctl_scsi_zero_io(io); @@ -636,17 +935,108 @@ pci_vtscsi_tmf_handle(struct pci_vtscsi_softc *sc, } err = ioctl(fd, CTL_IO, io); - if (err != 0) + if (err != 0) { WPRINTF("CTL_IO: err=%d (%s)", errno, strerror(errno)); + tmf->response = VIRTIO_SCSI_S_FAILURE; + } else { + tmf->response = io->taskio.task_status; + } - tmf->response = io->taskio.task_status; ctl_scsi_free_io(io); + + if (tmf->response != VIRTIO_SCSI_S_FUNCTION_COMPLETE) { + /* + * If this is either a FAILURE or FUNCTION REJECTED, we must + * not continue to process the TMF function on our queued + * requests. + * + * If it is FUNCTION SUCCEEDED, we do not need to process the + * TMF function on our queued requests. + * + * If it is anything else, log a warning, but handle it the + * same as above. + */ + if (tmf->response != VIRTIO_SCSI_S_FAILURE && + tmf->response != VIRTIO_SCSI_S_FUNCTION_REJECTED && + tmf->response != VIRTIO_SCSI_S_FUNCTION_SUCCEEDED) { + WPRINTF("pci_vtscsi_tmf_hdl: unexpected response from " + "CTL: %d", tmf->response); + } + } else { + pci_vtscsi_walk_t ret = PCI_VTSCSI_WALK_CONTINUE; + int i; + + for (i = 0; + i < VTSCSI_REQUESTQ && ret != PCI_VTSCSI_WALK_STOP; + i++) { + struct pci_vtscsi_queue *q = &sc->vss_queues[i]; + + ret = pci_vtscsi_walk_request_queue(q, + pci_vtscsi_tmf_handler_cb[tmf->subtype], tmf); + } + } + +out: + /* Unlock the request queues before we return. */ + for (int i = 0; i < VTSCSI_REQUESTQ; i++) { + struct pci_vtscsi_queue *q = &sc->vss_queues[i]; + + pthread_mutex_unlock(&q->vsq_rmtx); + } +} + +static void +pci_vtscsi_an_handle(struct pci_vtscsi_softc *sc, struct pci_vtscsi_ctrl_an *an) +{ + int target; + + if (pci_vtscsi_check_lun(sc, an->lun) == false) { + DPRINTF("AN request to invalid LUN %.2hhx%.2hhx-%.2hhx%.2hhx-" + "%.2hhx%.2hhx-%.2hhx%.2hhx", an->lun[0], an->lun[1], + an->lun[2], an->lun[3], an->lun[4], an->lun[5], an->lun[6], + an->lun[7]); + an->response = VIRTIO_SCSI_S_BAD_TARGET; + return; + } + + target = pci_vtscsi_get_target(sc, an->lun); + + DPRINTF("AN request tgt %d, lun %d, event requested %x", + target, pci_vtscsi_get_lun(sc, an->lun), an->event_requested); + + an->response = VIRTIO_SCSI_S_FAILURE; } static void -pci_vtscsi_an_handle(struct pci_vtscsi_softc *sc __unused, - struct pci_vtscsi_ctrl_an *an __unused) +pci_vtscsi_control_handle(struct pci_vtscsi_softc *sc, void *buf, + size_t bufsize) { + uint32_t type; + + if (bufsize < sizeof(uint32_t)) { + WPRINTF("ignoring truncated control request"); + return; + } + + type = *(uint32_t *)buf; + + if (type == VIRTIO_SCSI_T_TMF) { + if (bufsize != sizeof(struct pci_vtscsi_ctrl_tmf)) { + WPRINTF("ignoring TMF request with size %zu", bufsize); + return; + } + + pci_vtscsi_tmf_handle(sc, buf); + } else if (type == VIRTIO_SCSI_T_AN_QUERY) { + if (bufsize != sizeof(struct pci_vtscsi_ctrl_an)) { + WPRINTF("ignoring AN request with size %zu", bufsize); + return; + } + + pci_vtscsi_an_handle(sc, buf); + } else { + WPRINTF("ignoring unknown control request type = %u", type); + } } static struct pci_vtscsi_request * From nobody Tue May 26 16:07:17 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPyLs3HyTz6g27Y for ; Tue, 26 May 2026 16:07: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPyLs1lXqz455f for ; Tue, 26 May 2026 16:07:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779811637; 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=9G77IxrDNZ7OVjZAsqHwnGvBNFv5LEW24j6iLtbtn9A=; b=Ljfc4mYBbTULsdOzgVvNSNQLzarKf46H6219xcBofSFjo1x8A+Hd5tKtmziuVwpKtGULth hfrlNnGaRslUgeSynpa7sLTxg+LVowUxxtcsa8aZp4FrGo+CSDarePYBJkHKa8HdFwLT4N G/yDJ7ChXzH56urKKFszNF4ky05DpOe+EEmT+a5TT2vmfJXREn7hXVpqCfLxQPSSj9ORf+ gqwPmZ6jrFQKRzKWZVUqjzl/giDRc6oqlBp7jgABkB5LEovIpVzoquTBjaQ1qKULZdnKhl X1R3BYVxyds63tbpN0HhWZfu+UrDrhmS9dzN+PGwSy+Ng0NSpbMt2srno2Wvyg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779811637; a=rsa-sha256; cv=none; b=QB2uoepGd5EotaP9t+ctZbCXwI4IvKd680QaNbmT+judZ2vwj3C02P84GkKUsh8r2cOjI4 emSBlXzwiEpPYjmgP2Qjt6CYyesAUaf/CrU08x36uDk4lw3v6B9g0KAjj7/UQEkj89XvUt zyfTjEm4x+BBatYQGES0HGJLsxkhK4bgGtC47macmEjmvzmd4dhmq2NA7mPYpbGg9aUOtr /b1wWnMu9OJ446D2obj6vyjJX2sdk9OZFKBvtx5WkeEgk54c+7q/Gn8sjdata8FgJXN5WY YdmcDN5S/6f8jTGgF5oJQSLXverZFklDUxtqWv2hiGzj2h85hH+L3KTc9fQ7QQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779811637; 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=9G77IxrDNZ7OVjZAsqHwnGvBNFv5LEW24j6iLtbtn9A=; b=Di3jNv3PKXCXpCukyk8jsqwtIKWsZnjVIYeFMvcbMTqakG73ctGDY1aeyl09MsrwRntmwi XEO3kPYkKktp9AOIPT0WCOYWVROEjBUoBgFBZAZ5mwF7788vjxrkKqwpO1pNzJ+vpSrmOZ SYcoo4KYywIl9jgcPPNkehPNo3xe/MVq0vqjjYZ/n7ec6lnEoZAGUlRLydcz7eCdj1vqSo QfljpvnaQxfF4xmzn3ZxGpKxXX2gegtmaRXLpt9V08xPSnd4WuyjRyBCVmYSl8+KcHHwrR knwvtQLxLF1TvT2f0ch7wMxtFctrywl1UpDrE8J7O3Cs040gIj5Cp1lAKKNtdw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPyLs1LTDz3pG for ; Tue, 26 May 2026 16:07:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30e3a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 26 May 2026 16:07:17 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Hans Rosenfeld From: Mark Johnston Subject: git: 9542ddb21dc1 - main - bhyve/virtio-scsi: Support multiple backends List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9542ddb21dc15986843708d3f845eb23e7090107 Auto-Submitted: auto-generated Date: Tue, 26 May 2026 16:07:17 +0000 Message-Id: <6a15c535.30e3a.7895c705@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=9542ddb21dc15986843708d3f845eb23e7090107 commit 9542ddb21dc15986843708d3f845eb23e7090107 Author: Hans Rosenfeld AuthorDate: 2025-09-16 15:34:12 +0000 Commit: Mark Johnston CommitDate: 2026-05-26 16:03:12 +0000 bhyve/virtio-scsi: Support multiple backends In order to support multiple backends for virtio-scsi, we should isolate the core of virtio-scsi from the backend-specific code. The existing interface to CTL will become the new "CTL" backend for virtio-scsi. Care has been taken to keep compatibility with previous configurations: The first backend linked (CTL) will be the default backend if none is specified, and it does provide a default configuration if no further options such as targets are explicitly configured. Reviewed by: markj MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D53223 --- usr.sbin/bhyve/Makefile | 1 + usr.sbin/bhyve/bhyve.8 | 44 ++- usr.sbin/bhyve/bhyve_config.5 | 29 +- usr.sbin/bhyve/pci_virtio_scsi.c | 617 ++++++----------------------------- usr.sbin/bhyve/pci_virtio_scsi.h | 394 ++++++++++++++++++++++ usr.sbin/bhyve/pci_virtio_scsi_ctl.c | 377 +++++++++++++++++++++ 6 files changed, 927 insertions(+), 535 deletions(-) diff --git a/usr.sbin/bhyve/Makefile b/usr.sbin/bhyve/Makefile index 25fb71b5768f..b86c56991039 100644 --- a/usr.sbin/bhyve/Makefile +++ b/usr.sbin/bhyve/Makefile @@ -53,6 +53,7 @@ SRCS= \ pci_virtio_net.c \ pci_virtio_rnd.c \ pci_virtio_scsi.c \ + pci_virtio_scsi_ctl.c \ pci_xhci.c \ qemu_fwcfg.c \ qemu_loader.c \ diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index b5b03dd9c211..01b7dba941ac 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -681,8 +681,9 @@ In that case, this feature doesn't work as expected. .Bl -bullet .Sm off .It -.Oo Cm target Ns = Ns Oo ID : Oc Ar /dev/cam/ctl Oo Ar pp Cm \&. Ar vp Oc Oc +.Oo Cm target Ns = Ns Oo ID : Oc Ar path Ns Oc .Oo Cm \&, Ar scsi-device-options Oc +.Oo Cm \&, Ar backend-specific-options Oc .Sm on .El .Pp @@ -708,25 +709,28 @@ All .Pa target .Ar ID Ns s must be unique per instance. -The +The meaning of the .Ar path -must point to a valid CAM target layer -.Po CTL -.Pc -device node. -If no -.Pa target -is configured, a single default target backed by -.Sy /dev/cam/ctl -will be created. +argument is specific to each backend: +.Bl -column "Backend" "/dev/cam/ctl[pp.vp]" +.It Sy Backend Ta Sy Path Ta Sy Description +.It ctl Ta Pa /dev/cam/ctl Ns Oo Ar pp . Ns Ar vp Oc Ta +The path of a CAM target layer (CTL) device node. +If no target is configured, a single target backed by +.Qq /dev/cam/ctl +will be configured by default. +.El .Pp The .Ar scsi-device-options are: .Bl -tag -width 10n -.It Cm iid= Ns Ar IID -Initiator ID to use when sending requests to specified CTL port. -The default value is 0. +.It Cm backend= Ns Ar backend +The virtio-scsi backend to use. +The backend name is case-insensitive. +There is currently only one backend +.Qq ctl , +which is also the default backend. .It Li bootindex= Ns Ar index Add the device to the boot order at .Ar index . @@ -734,6 +738,18 @@ A fw_cfg file is used to specify the boot order. The guest firmware may ignore or not support this fw_cfg file. In that case, this feature doesn't work as expected. .El +.Pp +The +.Ar backend-specific-options +for the +.Sy CTL +backend are: +.Bl -tag -width 10n +.It Cm iid= Ns Ar IID +Initiator ID to use when sending requests to +.Sy CTL . +The default value is 0. +.El .Ss 9P device backends .Bl -bullet .Sm off diff --git a/usr.sbin/bhyve/bhyve_config.5 b/usr.sbin/bhyve/bhyve_config.5 index ea3157cb54d6..d4361468bc22 100644 --- a/usr.sbin/bhyve/bhyve_config.5 +++ b/usr.sbin/bhyve/bhyve_config.5 @@ -762,13 +762,14 @@ If specified, it must be a unicast MAC address. The largest supported MTU advertised to the guest. .El .Ss VirtIO SCSI Settings -.Bl -column "target" "integer" "/dev/cam/ctl" +.Bl -column "backend" "string" "/dev/cam/ctl" .It Sy Name Ta Sy Format Ta Sy Default Ta Sy Description -.It Va iid Ta integer Ta 0 Ta -Initiator ID to use when sending requests to the CTL port. -.It Va target Ta Oo Va ID : Oc Ns path Ta Sy /dev/cam/ctl Ta -The path of a CAM target layer (CTL) device to use: -.Pa /dev/cam/ctl Ns Oo Ar pp . Ns Ar vp Oc +.It Va backend Ta string Ta ctl Ta +The virtio-scsi backend to use (case-insensitive). +.It Va target Ta Oo Va ID : Oc Ns path Ta /dev/cam/ctl Ta +The backend +.Ar path +of a target to configure. Optionally, a numeric target .Ar ID in the range from 0 to 255 may be specified before the @@ -789,6 +790,22 @@ configured so far, or 0 for the first target configured. The target .Ar ID Ns s must be unique within each virtio-scsi instance. +.Pp +The meaning of the +.Ar path +argument is specific to each backend: +.Bl -column "Backend" "/dev/cam/ctl[pp.vp]" +.It Sy Backend Ta Sy Path Ta Sy Description +.It ctl Ta Pa /dev/cam/ctl Ns Oo Ar pp . Ns Ar vp Oc Ta +The path of a CAM target layer (CTL) device to configure as a target. +.El +.Pp +The following backend-specific variables are supported for VirtIO SCSI: +.Bl -column "Backend" "Name" "integer" "Default" +.It Sy Backend Ta Sy Name Ta Sy Format Ta Sy Default Ta Sy Description +.It ctl Ta Va iid Ta integer Ta 0 Ta +Initiator ID to use when sending requests to CTL. +.El .Sh SEE ALSO .Xr expand_number 3 , .Xr getaddrinfo 3 , diff --git a/usr.sbin/bhyve/pci_virtio_scsi.c b/usr.sbin/bhyve/pci_virtio_scsi.c index a77fadf71aff..47b90184fe08 100644 --- a/usr.sbin/bhyve/pci_virtio_scsi.c +++ b/usr.sbin/bhyve/pci_virtio_scsi.c @@ -35,7 +35,6 @@ #include #include #include -#include #include #include @@ -48,16 +47,6 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include - #include "bhyverun.h" #include "config.h" #include "debug.h" @@ -65,216 +54,7 @@ #include "virtio.h" #include "iov.h" -#define VTSCSI_RINGSZ 64 -#define VTSCSI_REQUESTQ 1 -#define VTSCSI_THR_PER_Q 16 -#define VTSCSI_MAXQ (VTSCSI_REQUESTQ + 2) -#define VTSCSI_MAXSEG 64 - -#define VTSCSI_IN_HEADER_LEN(_sc) \ - (sizeof(struct pci_vtscsi_req_cmd_rd) + _sc->vss_config.cdb_size) - -#define VTSCSI_OUT_HEADER_LEN(_sc) \ - (sizeof(struct pci_vtscsi_req_cmd_wr) + _sc->vss_config.sense_size) - -#define VIRTIO_SCSI_MAX_CHANNEL 0 -#define VIRTIO_SCSI_MAX_TARGET 255 -#define VIRTIO_SCSI_MAX_LUN 16383 - -#define VIRTIO_SCSI_F_INOUT (1 << 0) -#define VIRTIO_SCSI_F_HOTPLUG (1 << 1) -#define VIRTIO_SCSI_F_CHANGE (1 << 2) - -static int pci_vtscsi_debug = 0; -#define WPRINTF(msg, params...) PRINTLN("virtio-scsi: " msg, ##params) -#define DPRINTF(msg, params...) if (pci_vtscsi_debug) WPRINTF(msg, ##params) - -struct pci_vtscsi_config { - uint32_t num_queues; - uint32_t seg_max; - uint32_t max_sectors; - uint32_t cmd_per_lun; - uint32_t event_info_size; - uint32_t sense_size; - uint32_t cdb_size; - uint16_t max_channel; - uint16_t max_target; - uint32_t max_lun; -} __attribute__((packed)); - -/* - * I/O request state and I/O request queues - * - * In addition to the control queue and notification queues, each virtio-scsi - * device instance has at least one I/O request queue, the state of which is - * is kept in an array of struct pci_vtscsi_queue in the device softc. - * - * Currently there is only one I/O request queue, but it's trivial to support - * more than one. - * - * Each pci_vtscsi_queue has VTSCSI_RINGSZ pci_vtscsi_request structures pre- - * allocated on vsq_free_requests. For each I/O request coming in on the I/O - * virtqueue, the request queue handler will take a pci_vtscsi_request off - * vsq_free_requests, fills in the data from the I/O virtqueue, puts it on - * vsq_requests, and signals vsq_cv. - * - * There are VTSCSI_THR_PER_Q worker threads for each pci_vtscsi_queue which - * wait on vsq_cv. When signalled, they repeatedly take one pci_vtscsi_request - * off vsq_requests, construct a ctl_io for it, and hand it off to the CTL ioctl - * Interface, which processes it synchronously. After completion of the request, - * the pci_vtscsi_request is re-initialized and put back onto vsq_free_requests. - * - * The worker threads exit when vsq_cv is signalled after vsw_exiting was set. - * - * There are three mutexes to coordinate the accesses to an I/O request queue: - * - vsq_rmtx protects vsq_requests and must be held when waiting on vsq_cv - * - vsq_fmtx protects vsq_free_requests - * - vsq_qmtx must be held when operating on the underlying virtqueue, vsq_vq - */ -STAILQ_HEAD(pci_vtscsi_req_queue, pci_vtscsi_request); - -struct pci_vtscsi_queue { - struct pci_vtscsi_softc * vsq_sc; - struct vqueue_info * vsq_vq; - pthread_mutex_t vsq_rmtx; - pthread_mutex_t vsq_fmtx; - pthread_mutex_t vsq_qmtx; - pthread_cond_t vsq_cv; - struct pci_vtscsi_req_queue vsq_requests; - struct pci_vtscsi_req_queue vsq_free_requests; - LIST_HEAD(, pci_vtscsi_worker) vsq_workers; -}; - -struct pci_vtscsi_worker { - struct pci_vtscsi_queue * vsw_queue; - pthread_t vsw_thread; - bool vsw_exiting; - LIST_ENTRY(pci_vtscsi_worker) vsw_link; -}; - -struct pci_vtscsi_request { - struct pci_vtscsi_queue * vsr_queue; - struct iovec vsr_iov[VTSCSI_MAXSEG + SPLIT_IOV_ADDL_IOV]; - struct iovec * vsr_iov_in; - struct iovec * vsr_iov_out; - struct iovec * vsr_data_iov_in; - struct iovec * vsr_data_iov_out; - struct pci_vtscsi_req_cmd_rd * vsr_cmd_rd; - struct pci_vtscsi_req_cmd_wr * vsr_cmd_wr; - union ctl_io * vsr_ctl_io; - size_t vsr_niov_in; - size_t vsr_niov_out; - size_t vsr_data_niov_in; - size_t vsr_data_niov_out; - uint32_t vsr_idx; - STAILQ_ENTRY(pci_vtscsi_request) vsr_link; -}; - -struct pci_vtscsi_target { - uint8_t vst_target; - int vst_fd; - int vst_max_sectors; -}; - -/* - * Per-device softc - */ -struct pci_vtscsi_softc { - struct virtio_softc vss_vs; - struct vqueue_info vss_vq[VTSCSI_MAXQ]; - struct pci_vtscsi_queue vss_queues[VTSCSI_REQUESTQ]; - pthread_mutex_t vss_mtx; - int vss_iid; - int vss_ctl_fd; - uint32_t vss_features; - size_t vss_num_target; - struct pci_vtscsi_config vss_config; - struct pci_vtscsi_target *vss_targets; -}; - -#define VIRTIO_SCSI_T_TMF 0 -#define VIRTIO_SCSI_T_TMF_ABORT_TASK 0 -#define VIRTIO_SCSI_T_TMF_ABORT_TASK_SET 1 -#define VIRTIO_SCSI_T_TMF_CLEAR_ACA 2 -#define VIRTIO_SCSI_T_TMF_CLEAR_TASK_SET 3 -#define VIRTIO_SCSI_T_TMF_I_T_NEXUS_RESET 4 -#define VIRTIO_SCSI_T_TMF_LOGICAL_UNIT_RESET 5 -#define VIRTIO_SCSI_T_TMF_QUERY_TASK 6 -#define VIRTIO_SCSI_T_TMF_QUERY_TASK_SET 7 - -#define VIRTIO_SCSI_T_TMF_MAX_FUNC VIRTIO_SCSI_T_TMF_QUERY_TASK_SET - -/* command-specific response values */ -#define VIRTIO_SCSI_S_FUNCTION_COMPLETE 0 -#define VIRTIO_SCSI_S_FUNCTION_SUCCEEDED 10 -#define VIRTIO_SCSI_S_FUNCTION_REJECTED 11 - -struct pci_vtscsi_ctrl_tmf { - const uint32_t type; - const uint32_t subtype; - const uint8_t lun[8]; - const uint64_t id; - uint8_t response; -} __attribute__((packed)); - -#define VIRTIO_SCSI_T_AN_QUERY 1 -#define VIRTIO_SCSI_EVT_ASYNC_OPERATIONAL_CHANGE 2 -#define VIRTIO_SCSI_EVT_ASYNC_POWER_MGMT 4 -#define VIRTIO_SCSI_EVT_ASYNC_EXTERNAL_REQUEST 8 -#define VIRTIO_SCSI_EVT_ASYNC_MEDIA_CHANGE 16 -#define VIRTIO_SCSI_EVT_ASYNC_MULTI_HOST 32 -#define VIRTIO_SCSI_EVT_ASYNC_DEVICE_BUSY 64 - -struct pci_vtscsi_ctrl_an { - const uint32_t type; - const uint8_t lun[8]; - const uint32_t event_requested; - uint32_t event_actual; - uint8_t response; -} __attribute__((packed)); - -/* command-specific response values */ -#define VIRTIO_SCSI_S_OK 0 -#define VIRTIO_SCSI_S_OVERRUN 1 -#define VIRTIO_SCSI_S_ABORTED 2 -#define VIRTIO_SCSI_S_BAD_TARGET 3 -#define VIRTIO_SCSI_S_RESET 4 -#define VIRTIO_SCSI_S_BUSY 5 -#define VIRTIO_SCSI_S_TRANSPORT_FAILURE 6 -#define VIRTIO_SCSI_S_TARGET_FAILURE 7 -#define VIRTIO_SCSI_S_NEXUS_FAILURE 8 -#define VIRTIO_SCSI_S_FAILURE 9 -#define VIRTIO_SCSI_S_INCORRECT_LUN 12 - -/* task_attr */ -#define VIRTIO_SCSI_S_SIMPLE 0 -#define VIRTIO_SCSI_S_ORDERED 1 -#define VIRTIO_SCSI_S_HEAD 2 -#define VIRTIO_SCSI_S_ACA 3 - -struct pci_vtscsi_event { - uint32_t event; - uint8_t lun[8]; - uint32_t reason; -} __attribute__((packed)); - -struct pci_vtscsi_req_cmd_rd { - const uint8_t lun[8]; - const uint64_t id; - const uint8_t task_attr; - const uint8_t prio; - const uint8_t crn; - const uint8_t cdb[]; -} __attribute__((packed)); - -struct pci_vtscsi_req_cmd_wr { - uint32_t sense_len; - uint32_t residual; - uint16_t status_qualifier; - uint8_t status; - uint8_t response; - uint8_t sense[]; -} __attribute__((packed)); +#include "pci_virtio_scsi.h" enum pci_vtscsi_walk { PCI_VTSCSI_WALK_CONTINUE = 0, @@ -285,19 +65,14 @@ typedef enum pci_vtscsi_walk pci_vtscsi_walk_t; typedef pci_vtscsi_walk_t pci_vtscsi_walk_request_queue_cb_t( struct pci_vtscsi_queue *, struct pci_vtscsi_request *, void *); +static void pci_vtscsi_print_supported_backends(void); + static void *pci_vtscsi_proc(void *); static void pci_vtscsi_reset(void *); static void pci_vtscsi_neg_features(void *, uint64_t); static int pci_vtscsi_cfgread(void *, int, int, uint32_t *); static int pci_vtscsi_cfgwrite(void *, int, int, uint32_t); -static inline bool pci_vtscsi_check_lun(struct pci_vtscsi_softc *, - const uint8_t *); -static inline uint8_t pci_vtscsi_get_target(struct pci_vtscsi_softc *, - const uint8_t *); -static inline uint16_t pci_vtscsi_get_lun(struct pci_vtscsi_softc *, - const uint8_t *); - static pci_vtscsi_walk_request_queue_cb_t pci_vtscsi_tmf_handle_abort_task; static pci_vtscsi_walk_request_queue_cb_t pci_vtscsi_tmf_handle_abort_task_set; static pci_vtscsi_walk_request_queue_cb_t pci_vtscsi_tmf_handle_clear_aca; @@ -319,7 +94,8 @@ static void pci_vtscsi_control_handle(struct pci_vtscsi_softc *, void *, static struct pci_vtscsi_request *pci_vtscsi_alloc_request( struct pci_vtscsi_softc *); -static void pci_vtscsi_free_request(struct pci_vtscsi_request *); +static void pci_vtscsi_free_request(struct pci_vtscsi_softc *, + struct pci_vtscsi_request *); static struct pci_vtscsi_request *pci_vtscsi_get_request( struct pci_vtscsi_req_queue *); static void pci_vtscsi_put_request(struct pci_vtscsi_req_queue *, @@ -341,6 +117,8 @@ static int pci_vtscsi_init_queue(struct pci_vtscsi_softc *, static void pci_vtscsi_destroy_queue(struct pci_vtscsi_queue *); static int pci_vtscsi_init(struct pci_devinst *, nvlist_t *); +SET_DECLARE(pci_vtscsi_backend_set, struct pci_vtscsi_backend); + static struct virtio_consts vtscsi_vi_consts = { .vc_name = "vtscsi", .vc_nvq = VTSCSI_MAXQ, @@ -352,6 +130,25 @@ static struct virtio_consts vtscsi_vi_consts = { .vc_hv_caps = VIRTIO_RING_F_INDIRECT_DESC, }; +int pci_vtscsi_debug = 0; + + +static void +pci_vtscsi_print_supported_backends(void) +{ + struct pci_vtscsi_backend **vbpp; + + if (SET_COUNT(pci_vtscsi_backend_set) == 0) { + printf("No virtio-scsi backends available"); + return; + } + + SET_FOREACH(vbpp, pci_vtscsi_backend_set) { + struct pci_vtscsi_backend *vbp = *vbpp; + printf("%s\n", vbp->vsb_name); + } +} + static void * pci_vtscsi_proc(void *arg) { @@ -407,8 +204,7 @@ pci_vtscsi_reset(void *vsc) .num_queues = VTSCSI_REQUESTQ, /* Leave room for the request and the response. */ .seg_max = VTSCSI_MAXSEG - 2, - /* CTL apparently doesn't have a limit here */ - .max_sectors = INT32_MAX, + .max_sectors = 0, /* overridden by backend reset() */ .cmd_per_lun = 1, .event_info_size = sizeof(struct pci_vtscsi_event), .sense_size = 96, @@ -417,6 +213,8 @@ pci_vtscsi_reset(void *vsc) .max_target = MAX(1, sc->vss_num_target) - 1, .max_lun = VIRTIO_SCSI_MAX_LUN }; + + sc->vss_backend->vsb_reset(sc); } static void @@ -445,105 +243,6 @@ pci_vtscsi_cfgwrite(void *vsc __unused, int offset __unused, int size __unused, return (0); } -/* - * LUN address parsing - * - * The LUN address consists of 8 bytes. While the spec describes this as 0x01, - * followed by the target byte, followed by a "single-level LUN structure", - * this is actually the same as a hierarchical LUN address as defined by SAM-5, - * consisting of four levels of addressing, where in each level the two MSB of - * byte 0 select the address mode used in the remaining bits and bytes. - * - * - * Only the first two levels are acutally used by virtio-scsi: - * - * Level 1: 0x01, 0xTT: Peripheral Device Addressing: Bus 1, Target 0-255 - * Level 2: 0xLL, 0xLL: Peripheral Device Addressing: Bus MBZ, LUN 0-255 - * or: Flat Space Addressing: LUN (0-16383) - * Level 3 and 4: not used, MBZ - * - * - * Alternatively, the first level may contain an extended LUN address to select - * the REPORT_LUNS well-known logical unit: - * - * Level 1: 0xC1, 0x01: Extended LUN Adressing, Well-Known LUN 1 (REPORT_LUNS) - * Level 2, 3, and 4: not used, MBZ - * - * The virtio spec says that we SHOULD implement the REPORT_LUNS well-known - * logical unit but we currently don't. - * - * According to the virtio spec, these are the only LUNS address formats to be - * used with virtio-scsi. - */ - -/* - * Check that the given LUN address conforms to the virtio spec, does not - * address an unknown target, and especially does not address the REPORT_LUNS - * well-known logical unit. - */ -static inline bool -pci_vtscsi_check_lun(struct pci_vtscsi_softc *sc, const uint8_t *lun) -{ - if (lun[0] == 0xC1) - return (false); - - if (lun[0] != 0x01) - return (false); - - if (lun[1] >= sc->vss_num_target) - return (false); - - if (lun[1] != sc->vss_targets[lun[1]].vst_target) - return (false); - - if (sc->vss_targets[lun[1]].vst_fd < 0) - return (false); - - if (lun[2] != 0x00 && (lun[2] & 0xc0) != 0x40) - return (false); - - if (lun[4] != 0 || lun[5] != 0 || lun[6] != 0 || lun[7] != 0) - return (false); - - return (true); -} - -/* - * Get the target id from a LUN address. - * - * Every code path using this function must have called pci_vtscsi_check_lun() - * before to make sure the LUN address is valid. - */ -static inline uint8_t -pci_vtscsi_get_target(struct pci_vtscsi_softc *sc, const uint8_t *lun) -{ - assert(lun[0] == 0x01); - assert(lun[1] < sc->vss_num_target); - assert(lun[1] == sc->vss_targets[lun[1]].vst_target); - assert(sc->vss_targets[lun[1]].vst_fd >= 0); - assert(lun[2] == 0x00 || (lun[2] & 0xc0) == 0x40); - - return (lun[1]); -} - -/* - * Get the LUN id from a LUN address. - * - * Every code path using this function must have called pci_vtscsi_check_lun() - * before to make sure the LUN address is valid. - */ -static inline uint16_t -pci_vtscsi_get_lun(struct pci_vtscsi_softc *sc, const uint8_t *lun) -{ - assert(lun[0] == 0x01); - assert(lun[1] < sc->vss_num_target); - assert(lun[1] == sc->vss_targets[lun[1]].vst_target); - assert(sc->vss_targets[lun[1]].vst_fd >= 0); - assert(lun[2] == 0x00 || (lun[2] & 0xc0) == 0x40); - - return (((lun[2] << 8) | lun[3]) & 0x3fff); -} - /* * ABORT TASK: Abort the specifed task queued for this LUN. * @@ -722,8 +421,8 @@ pci_vtscsi_tmf_handle_lun_reset(struct pci_vtscsi_queue *q, * (1) the specified task is still in the virtqueue, not yet having been * processed by pci_vtscsi_requestq_notify() * (2) the specified task was actively being processed by a worker thread - * but not yet processed by CTL by the time the QUERY TASK request was - * handled by CTL + * but not yet processed by the backend by the time the QUERY TASK + * request was handled by the backend * * While a false negative may be confusing for a guest OS looking for the * state of an I/O request it sent, it is not considered a fatal error of @@ -812,9 +511,7 @@ static void pci_vtscsi_tmf_handle(struct pci_vtscsi_softc *sc, struct pci_vtscsi_ctrl_tmf *tmf) { - union ctl_io *io; uint8_t target; - int err; int fd; if (tmf->subtype > VIRTIO_SCSI_T_TMF_MAX_FUNC) { @@ -848,9 +545,10 @@ pci_vtscsi_tmf_handle(struct pci_vtscsi_softc *sc, * request queue. This in turn means we will miss any I/O requests which * may still be in the virtqueue. * - * This does not prevent any requests currently being processed by CTL - * from being completed and returned, which we must guarantee to adhere - * to the ordering requirements for any TMF function which aborts tasks. + * This does not prevent any requests currently being processed by the + * backend from being completed and returned, which we must guarantee to + * adhere to the ordering requirements for any TMF function which aborts + * tasks. */ for (int i = 0; i < VTSCSI_REQUESTQ; i++) { struct pci_vtscsi_queue *q = &sc->vss_queues[i]; @@ -859,7 +557,7 @@ pci_vtscsi_tmf_handle(struct pci_vtscsi_softc *sc, } /* - * CTL may set response to FAILURE for the TMF request. + * The backend may set response to FAILURE for the TMF request. * * The default response of all TMF functions is FUNCTION COMPLETE if * there was no error, regardless of whether it actually succeeded or @@ -867,82 +565,14 @@ pci_vtscsi_tmf_handle(struct pci_vtscsi_softc *sc, * which will explicitly return FUNCTION SUCCEEDED if the specified * task or any task was active in the target/LUN, respectively. * - * Thus, we will call CTL first. Only if the response we get is - * FUNCTION COMPLETE we'll continue processing the TMF function - * on our queues. Note that there's a slim chance that we're racing - * against a worker thread that is actively processing an I/O request, - * which may lead to our TMF request being processed by CTL before the + * Thus, we will call the backend first. Only if the response we get is + * FUNCTION COMPLETE we'll continue processing the TMF function on our + * queues. Note that there's a slim chance that we're racing against a + * worker thread that is actively processing an I/O request, which may + * lead to our TMF request being processed by the backend before the * same I/O request, in which case it won't be on any queue either. */ - io = ctl_scsi_alloc_io(sc->vss_iid); - if (io == NULL) { - WPRINTF("failed to allocate ctl_io: err=%d (%s)", - errno, strerror(errno)); - - tmf->response = VIRTIO_SCSI_S_FAILURE; - goto out; - } - - ctl_scsi_zero_io(io); - - io->io_hdr.io_type = CTL_IO_TASK; - io->io_hdr.nexus.initid = sc->vss_iid; - io->io_hdr.nexus.targ_lun = pci_vtscsi_get_lun(sc, tmf->lun); - io->taskio.tag_type = CTL_TAG_SIMPLE; - io->taskio.tag_num = tmf->id; - io->io_hdr.flags |= CTL_FLAG_USER_TAG; - - switch (tmf->subtype) { - case VIRTIO_SCSI_T_TMF_ABORT_TASK: - io->taskio.task_action = CTL_TASK_ABORT_TASK; - break; - - case VIRTIO_SCSI_T_TMF_ABORT_TASK_SET: - io->taskio.task_action = CTL_TASK_ABORT_TASK_SET; - break; - - case VIRTIO_SCSI_T_TMF_CLEAR_ACA: - io->taskio.task_action = CTL_TASK_CLEAR_ACA; - break; - - case VIRTIO_SCSI_T_TMF_CLEAR_TASK_SET: - io->taskio.task_action = CTL_TASK_CLEAR_TASK_SET; - break; - - case VIRTIO_SCSI_T_TMF_I_T_NEXUS_RESET: - io->taskio.task_action = CTL_TASK_I_T_NEXUS_RESET; - break; - - case VIRTIO_SCSI_T_TMF_LOGICAL_UNIT_RESET: - io->taskio.task_action = CTL_TASK_LUN_RESET; - break; - - case VIRTIO_SCSI_T_TMF_QUERY_TASK: - io->taskio.task_action = CTL_TASK_QUERY_TASK; - break; - - case VIRTIO_SCSI_T_TMF_QUERY_TASK_SET: - io->taskio.task_action = CTL_TASK_QUERY_TASK_SET; - break; - } - - if (pci_vtscsi_debug) { - struct sbuf *sb = sbuf_new_auto(); - ctl_io_sbuf(io, sb); - sbuf_finish(sb); - DPRINTF("%s", sbuf_data(sb)); - sbuf_delete(sb); - } - - err = ioctl(fd, CTL_IO, io); - if (err != 0) { - WPRINTF("CTL_IO: err=%d (%s)", errno, strerror(errno)); - tmf->response = VIRTIO_SCSI_S_FAILURE; - } else { - tmf->response = io->taskio.task_status; - } - - ctl_scsi_free_io(io); + sc->vss_backend->vsb_tmf_hdl(sc, fd, tmf); if (tmf->response != VIRTIO_SCSI_S_FUNCTION_COMPLETE) { /* @@ -960,7 +590,7 @@ pci_vtscsi_tmf_handle(struct pci_vtscsi_softc *sc, tmf->response != VIRTIO_SCSI_S_FUNCTION_REJECTED && tmf->response != VIRTIO_SCSI_S_FUNCTION_SUCCEEDED) { WPRINTF("pci_vtscsi_tmf_hdl: unexpected response from " - "CTL: %d", tmf->response); + "backend: %d", tmf->response); } } else { pci_vtscsi_walk_t ret = PCI_VTSCSI_WALK_CONTINUE; @@ -976,7 +606,6 @@ pci_vtscsi_tmf_handle(struct pci_vtscsi_softc *sc, } } -out: /* Unlock the request queues before we return. */ for (int i = 0; i < VTSCSI_REQUESTQ; i++) { struct pci_vtscsi_queue *q = &sc->vss_queues[i]; @@ -989,6 +618,7 @@ static void pci_vtscsi_an_handle(struct pci_vtscsi_softc *sc, struct pci_vtscsi_ctrl_an *an) { int target; + int fd; if (pci_vtscsi_check_lun(sc, an->lun) == false) { DPRINTF("AN request to invalid LUN %.2hhx%.2hhx-%.2hhx%.2hhx-" @@ -1001,10 +631,12 @@ pci_vtscsi_an_handle(struct pci_vtscsi_softc *sc, struct pci_vtscsi_ctrl_an *an) target = pci_vtscsi_get_target(sc, an->lun); + fd = sc->vss_targets[target].vst_fd; + DPRINTF("AN request tgt %d, lun %d, event requested %x", target, pci_vtscsi_get_lun(sc, an->lun), an->event_requested); - an->response = VIRTIO_SCSI_S_FAILURE; + sc->vss_backend->vsb_an_hdl(sc, fd, an); } static void @@ -1055,10 +687,9 @@ pci_vtscsi_alloc_request(struct pci_vtscsi_softc *sc) if (req->vsr_cmd_wr == NULL) goto fail; - req->vsr_ctl_io = ctl_scsi_alloc_io(sc->vss_iid); - if (req->vsr_ctl_io == NULL) + req->vsr_backend = sc->vss_backend->vsb_req_alloc(sc); + if (req->vsr_backend == NULL) goto fail; - ctl_scsi_zero_io(req->vsr_ctl_io); return (req); @@ -1066,16 +697,17 @@ fail: EPRINTLN("failed to allocate request: %s", strerror(errno)); if (req != NULL) - pci_vtscsi_free_request(req); + pci_vtscsi_free_request(sc, req); return (NULL); } static void -pci_vtscsi_free_request(struct pci_vtscsi_request *req) +pci_vtscsi_free_request(struct pci_vtscsi_softc *sc, + struct pci_vtscsi_request *req) { - if (req->vsr_ctl_io != NULL) - ctl_scsi_free_io(req->vsr_ctl_io); + if (req->vsr_backend != NULL) + sc->vss_backend->vsb_req_free(req->vsr_backend); if (req->vsr_cmd_rd != NULL) free(req->vsr_cmd_rd); if (req->vsr_cmd_wr != NULL) @@ -1218,9 +850,10 @@ static void pci_vtscsi_return_request(struct pci_vtscsi_queue *q, struct pci_vtscsi_request *req, int iolen) { + struct pci_vtscsi_softc *sc = q->vsq_sc; void *cmd_rd = req->vsr_cmd_rd; void *cmd_wr = req->vsr_cmd_wr; - void *ctl_io = req->vsr_ctl_io; + void *backend = req->vsr_backend; int idx = req->vsr_idx; DPRINTF("request completed, response %d", idx, @@ -1229,7 +862,7 @@ pci_vtscsi_return_request(struct pci_vtscsi_queue *q, iolen += buf_to_iov(cmd_wr, VTSCSI_OUT_HEADER_LEN(q->vsq_sc), req->vsr_iov_out, req->vsr_niov_out); - ctl_scsi_zero_io(req->vsr_ctl_io); + sc->vss_backend->vsb_req_clear(backend); memset(cmd_rd, 0, VTSCSI_IN_HEADER_LEN(q->vsq_sc)); memset(cmd_wr, 0, VTSCSI_OUT_HEADER_LEN(q->vsq_sc)); @@ -1237,7 +870,7 @@ pci_vtscsi_return_request(struct pci_vtscsi_queue *q, req->vsr_cmd_rd = cmd_rd; req->vsr_cmd_wr = cmd_wr; - req->vsr_ctl_io = ctl_io; + req->vsr_backend = backend; pthread_mutex_lock(&q->vsq_fmtx); pci_vtscsi_put_request(&q->vsq_free_requests, req); @@ -1253,81 +886,7 @@ static int pci_vtscsi_request_handle(struct pci_vtscsi_softc *sc, int fd, struct pci_vtscsi_request *req) { - union ctl_io *io = req->vsr_ctl_io; - void *ext_data_ptr = NULL; - uint32_t ext_data_len = 0, ext_sg_entries = 0; - int err, nxferred; - - io->io_hdr.nexus.initid = sc->vss_iid; - io->io_hdr.nexus.targ_lun = - pci_vtscsi_get_lun(sc, req->vsr_cmd_rd->lun); - - io->io_hdr.io_type = CTL_IO_SCSI; - - if (req->vsr_data_niov_in > 0) { - ext_data_ptr = (void *)req->vsr_data_iov_in; - ext_sg_entries = req->vsr_data_niov_in; - ext_data_len = count_iov(req->vsr_data_iov_in, - req->vsr_data_niov_in); - io->io_hdr.flags |= CTL_FLAG_DATA_OUT; - } else if (req->vsr_data_niov_out > 0) { - ext_data_ptr = (void *)req->vsr_data_iov_out; - ext_sg_entries = req->vsr_data_niov_out; - ext_data_len = count_iov(req->vsr_data_iov_out, - req->vsr_data_niov_out); - io->io_hdr.flags |= CTL_FLAG_DATA_IN; - } - - io->scsiio.sense_len = sc->vss_config.sense_size; - io->scsiio.tag_num = req->vsr_cmd_rd->id; - io->io_hdr.flags |= CTL_FLAG_USER_TAG; - switch (req->vsr_cmd_rd->task_attr) { - case VIRTIO_SCSI_S_ORDERED: - io->scsiio.tag_type = CTL_TAG_ORDERED; - break; - case VIRTIO_SCSI_S_HEAD: - io->scsiio.tag_type = CTL_TAG_HEAD_OF_QUEUE; - break; - case VIRTIO_SCSI_S_ACA: - io->scsiio.tag_type = CTL_TAG_ACA; - break; - case VIRTIO_SCSI_S_SIMPLE: - default: - io->scsiio.tag_type = CTL_TAG_SIMPLE; - break; - } - io->scsiio.ext_sg_entries = ext_sg_entries; - io->scsiio.ext_data_ptr = ext_data_ptr; - io->scsiio.ext_data_len = ext_data_len; - io->scsiio.ext_data_filled = 0; - io->scsiio.cdb_len = sc->vss_config.cdb_size; - memcpy(io->scsiio.cdb, req->vsr_cmd_rd->cdb, sc->vss_config.cdb_size); - - if (pci_vtscsi_debug) { - struct sbuf *sb = sbuf_new_auto(); - ctl_io_sbuf(io, sb); - sbuf_finish(sb); - DPRINTF("%s", sbuf_data(sb)); - sbuf_delete(sb); - } - - err = ioctl(fd, CTL_IO, io); - if (err != 0) { - WPRINTF("CTL_IO: err=%d (%s)", errno, strerror(errno)); - req->vsr_cmd_wr->response = VIRTIO_SCSI_S_FAILURE; - } else { - req->vsr_cmd_wr->sense_len = - MIN(io->scsiio.sense_len, sc->vss_config.sense_size); - req->vsr_cmd_wr->residual = ext_data_len - - io->scsiio.ext_data_filled; - req->vsr_cmd_wr->status = io->scsiio.scsi_status; - req->vsr_cmd_wr->response = VIRTIO_SCSI_S_OK; - memcpy(&req->vsr_cmd_wr->sense, &io->scsiio.sense_data, - req->vsr_cmd_wr->sense_len); - } - - nxferred = io->scsiio.ext_data_filled; - return (nxferred); + return (sc->vss_backend->vsb_req_hdl(sc, fd, req)); } static void @@ -1439,7 +998,7 @@ pci_vtscsi_destroy_queue(struct pci_vtscsi_queue *queue) break; req = pci_vtscsi_get_request(&queue->vsq_free_requests); - pci_vtscsi_free_request(req); + pci_vtscsi_free_request(queue->vsq_sc, req); } pthread_cond_destroy(&queue->vsq_cv); @@ -1534,10 +1093,13 @@ pci_vtscsi_legacy_config(nvlist_t *nvl, const char *opts) targets = create_relative_config_node(nvl, "target"); - /* Handle legacy form (0). */ - if (opts == NULL) { - pci_vtscsi_add_target_config(targets, "/dev/cam/ctl", 0); + /* Legacy form (0) is handled in pci_vtscsi_init(). */ + if (opts == NULL) return (0); + + if (strcmp("help", opts) == 0) { + pci_vtscsi_print_supported_backends(); + exit(0); } n = strcspn(opts, ",="); @@ -1633,6 +1195,7 @@ pci_vtscsi_init_target(const char *prefix __unused, const nvlist_t *parent, const char *value; const char *errstr; uint64_t target; + int ret; assert(type == NV_TYPE_STRING); @@ -1644,23 +1207,21 @@ pci_vtscsi_init_target(const char *prefix __unused, const nvlist_t *parent, sc->vss_targets[target].vst_target = target; /* - * 'value' contains the CTL device node path of this target. + * 'value' contains the backend path. Call the backend to open it. */ value = nvlist_get_string(parent, name); - sc->vss_targets[target].vst_fd = open(value, O_RDWR); - if (sc->vss_targets[target].vst_fd < 0) { + ret = sc->vss_backend->vsb_open(sc, value, target); + if (ret != 0) EPRINTLN("cannot open target %lu at %s: %s", target, value, strerror(errno)); - return (-1); - } - - return (0); + return (ret); } static int pci_vtscsi_init(struct pci_devinst *pi, nvlist_t *nvl) { *** 843 LINES SKIPPED *** From nobody Tue May 26 16:07:18 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPyLt5NZjz6g2KC for ; Tue, 26 May 2026 16:07: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPyLt2m4Vz44n1 for ; Tue, 26 May 2026 16:07:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779811638; 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=qw5Xq8c38GfOfeo04Bo8weWE/SQc65Bwm7nE3dJT7/Q=; b=B8vqv4k1u97Mw9Msz6GLw/h0gzbz9yig1/r8jZHm/dPltvoYNICVQcFizCREZT7s/NRpgE 6pS33MfhsPQvSRWeHT0xq2LcEhFuDhIctIuuv3rFpSey00ujYKrd9OUoiuMVLHNAMosprI BRokmPWhtiX1az+iNwWXnil9keUWBdBwVdkGmqLM5yFjSRFjCZ6Ayv0QmIw7Jin9hpXdp6 0YBoRDL2CIvCqJWYYLDS93CO0UC2zrmdPUt25QdVihIy3F7xa1+ww6OIScEbc07anyfq+Q R/Xjj7xQAxEFiPwogKszTmcBCTG2j0cA4Tk7v+AbWE08ekiMXKxoaFllN0tXoQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779811638; a=rsa-sha256; cv=none; b=ZSa0PE4dhZ2t3lrM9iStjHkOJVZiQObUkGJLRXuGTuGZjqIlihysaFEDyKaiuGuh4c0oCM H+43+53UARut+91+GVFzjo+VGQMnjGbx2bcVhwL8GzG69u22u52QT9tUG4rDLrnjkh5KsC T7wtHWtnowWJYm7GuBLM2bk8z+R/8ZkZZ4CYMggK87JGhNSsaJGXmfjHsR/ESxuOnM/6Fo vgkXG5tjZoz1dwa0giNMFIc1Q6/Ubiw+/C0+7gw8m4nV90IuVIO7apdQFSPNJA+whz36k0 kWhrq38LrvvGeT1ZFVutO6uykunmQ3QW3D/xO/6OMaW0DAUvq66lFfJV213X9w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779811638; 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=qw5Xq8c38GfOfeo04Bo8weWE/SQc65Bwm7nE3dJT7/Q=; b=nZjfKIH5I5axzb79PSkaeurFuQI1w5vdtbYD0nbtBM/BGXt+NgXA0FI/ikV79o18jNeuSK TRdrW7C2R0aXx1TzoOvl9gTq/UgfuVuGzkk67mHQ/tQBgZqb115uPdrjDXlA820mII8GVa f5amCmyn8m2yknNJdfwCkipTHGmQc2RbgIYWVx3nuushakYoOOgGFIAIWDQYKWJ8AQU06r ROgO94l4FDSSaw7diLESiofp2gDInqP4/5SN3PZYdf5HpZVGIMx/sHCD9TqdPzNlSFnbOK UqwL4fDyIWYF/iCJmfZM2LvD6AqyOae38iHFJljNuOIyegY+YEOlpzyR88DsIQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPyLt2DjHz41J for ; Tue, 26 May 2026 16:07:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 310f2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 26 May 2026 16:07:18 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Hans Rosenfeld From: Mark Johnston Subject: git: ccb14be785f7 - main - bhyve/virtio-scsi: Make all I/O processing parameters configurable List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ccb14be785f79583a6a0622a89489c8d681f2bf8 Auto-Submitted: auto-generated Date: Tue, 26 May 2026 16:07:18 +0000 Message-Id: <6a15c536.310f2.415e655f@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ccb14be785f79583a6a0622a89489c8d681f2bf8 commit ccb14be785f79583a6a0622a89489c8d681f2bf8 Author: Hans Rosenfeld AuthorDate: 2025-11-10 17:08:31 +0000 Commit: Mark Johnston CommitDate: 2026-05-26 16:03:12 +0000 bhyve/virtio-scsi: Make all I/O processing parameters configurable This includes: - seg_max, the number of segments allowed in a single command - {ctl,evt,req}_ringsz, the number of descriptors in a queue - thr_per_q, the number of processing threads per request queue - num_queues, the number of request queues Reviewed by: markj MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D54073 --- usr.sbin/bhyve/bhyve.8 | 12 +++ usr.sbin/bhyve/bhyve_config.5 | 16 ++- usr.sbin/bhyve/pci_virtio_scsi.c | 222 +++++++++++++++++++++++++++++---------- usr.sbin/bhyve/pci_virtio_scsi.h | 80 ++++++++++---- 4 files changed, 252 insertions(+), 78 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index 01b7dba941ac..ec8c880b0243 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -737,6 +737,18 @@ Add the device to the boot order at A fw_cfg file is used to specify the boot order. The guest firmware may ignore or not support this fw_cfg file. In that case, this feature doesn't work as expected. +.It Li ctl_ringsz= Ns Ar ringsz +The ring size to use for the control queue. +.It Li evt_ringsz= Ns Ar ringsz +The ring size to use for the event queue. +.It Li req_ringsz= Ns Ar ringsz +The ring size to use for each I/O request queue. +.It Li num_queues= Ns Ar num +The number of I/O request queues to use. +.It Li seg_max= Ns Ar num +The maximum number of segments allowed in a single command. +.It Li thr_per_q= Ns Ar num +The number of parallel request processing threads per I/O request queue. .El .Pp The diff --git a/usr.sbin/bhyve/bhyve_config.5 b/usr.sbin/bhyve/bhyve_config.5 index d4361468bc22..8bfe9afd0b24 100644 --- a/usr.sbin/bhyve/bhyve_config.5 +++ b/usr.sbin/bhyve/bhyve_config.5 @@ -1,7 +1,7 @@ .\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2021 John H. Baldwin -.\" Copyright 2025 Hans Rosenfeld +.\" Copyright (c) 2026 Hans Rosenfeld .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -762,10 +762,22 @@ If specified, it must be a unicast MAC address. The largest supported MTU advertised to the guest. .El .Ss VirtIO SCSI Settings -.Bl -column "backend" "string" "/dev/cam/ctl" +.Bl -column "num_queues" "Format" "Default" .It Sy Name Ta Sy Format Ta Sy Default Ta Sy Description .It Va backend Ta string Ta ctl Ta The virtio-scsi backend to use (case-insensitive). +.It Va ctl_ringsz Ta integer Ta 64 Ta +The ring size of the control queue. +.It Va evt_ringsz Ta integer Ta 64 Ta +The ring size of the event queue. +.It Va req_ringsz Ta integer Ta 64 Ta +The ring size of each I/O request queue. +.It Va num_queues Ta integer Ta 1 Ta +The number of I/O request queues. +.It Va seg_max Ta integer Ta 64 Ta +The maximum number of segments allowed in a single command. +.It Va thr_per_q Ta integer Ta 16 Ta +The number of parallel request processing threads per I/O request queue. .It Va target Ta Oo Va ID : Oc Ns path Ta /dev/cam/ctl Ta The backend .Ar path diff --git a/usr.sbin/bhyve/pci_virtio_scsi.c b/usr.sbin/bhyve/pci_virtio_scsi.c index 47b90184fe08..97f1ff3c65d8 100644 --- a/usr.sbin/bhyve/pci_virtio_scsi.c +++ b/usr.sbin/bhyve/pci_virtio_scsi.c @@ -114,14 +114,15 @@ static void pci_vtscsi_requestq_notify(void *, struct vqueue_info *); static int pci_vtscsi_add_target_config(nvlist_t *, const char *, int); static int pci_vtscsi_init_queue(struct pci_vtscsi_softc *, struct pci_vtscsi_queue *, int); -static void pci_vtscsi_destroy_queue(struct pci_vtscsi_queue *); +static void pci_vtscsi_destroy_queue(struct pci_vtscsi_softc *, + struct pci_vtscsi_queue *); static int pci_vtscsi_init(struct pci_devinst *, nvlist_t *); SET_DECLARE(pci_vtscsi_backend_set, struct pci_vtscsi_backend); static struct virtio_consts vtscsi_vi_consts = { .vc_name = "vtscsi", - .vc_nvq = VTSCSI_MAXQ, + .vc_nvq = VTSCSI_DEF_REQUESTQ + VIRTIO_SCSI_ADDL_Q, .vc_cfgsize = sizeof(struct pci_vtscsi_config), .vc_reset = pci_vtscsi_reset, .vc_cfgread = pci_vtscsi_cfgread, @@ -130,6 +131,20 @@ static struct virtio_consts vtscsi_vi_consts = { .vc_hv_caps = VIRTIO_RING_F_INDIRECT_DESC, }; +static const struct pci_vtscsi_config vtscsi_config = { + .num_queues = VTSCSI_DEF_REQUESTQ, + /* Leave room for the request and the response. */ + .seg_max = VTSCSI_DEF_MAXSEG - VIRTIO_SCSI_HDR_SEG, + .max_sectors = 0, + .cmd_per_lun = 1, + .event_info_size = sizeof(struct pci_vtscsi_event), + .sense_size = 96, + .cdb_size = 32, + .max_channel = VIRTIO_SCSI_MAX_CHANNEL, + .max_target = VIRTIO_SCSI_MAX_TARGET, + .max_lun = VIRTIO_SCSI_MAX_LUN +}; + int pci_vtscsi_debug = 0; @@ -200,19 +215,9 @@ pci_vtscsi_reset(void *vsc) vi_reset_dev(&sc->vss_vs); /* initialize config structure */ - sc->vss_config = (struct pci_vtscsi_config){ - .num_queues = VTSCSI_REQUESTQ, - /* Leave room for the request and the response. */ - .seg_max = VTSCSI_MAXSEG - 2, - .max_sectors = 0, /* overridden by backend reset() */ - .cmd_per_lun = 1, - .event_info_size = sizeof(struct pci_vtscsi_event), - .sense_size = 96, - .cdb_size = 32, - .max_channel = VIRTIO_SCSI_MAX_CHANNEL, - .max_target = MAX(1, sc->vss_num_target) - 1, - .max_lun = VIRTIO_SCSI_MAX_LUN - }; + sc->vss_config = sc->vss_default_config; + + sc->vss_config.max_target = MAX(1, sc->vss_num_target) - 1; sc->vss_backend->vsb_reset(sc); } @@ -550,7 +555,7 @@ pci_vtscsi_tmf_handle(struct pci_vtscsi_softc *sc, * adhere to the ordering requirements for any TMF function which aborts * tasks. */ - for (int i = 0; i < VTSCSI_REQUESTQ; i++) { + for (uint32_t i = 0; i < sc->vss_config.num_queues; i++) { struct pci_vtscsi_queue *q = &sc->vss_queues[i]; pthread_mutex_lock(&q->vsq_rmtx); @@ -594,20 +599,21 @@ pci_vtscsi_tmf_handle(struct pci_vtscsi_softc *sc, } } else { pci_vtscsi_walk_t ret = PCI_VTSCSI_WALK_CONTINUE; - int i; + uint32_t i; - for (i = 0; - i < VTSCSI_REQUESTQ && ret != PCI_VTSCSI_WALK_STOP; - i++) { + for (i = 0; i < sc->vss_config.num_queues; i++) { struct pci_vtscsi_queue *q = &sc->vss_queues[i]; ret = pci_vtscsi_walk_request_queue(q, pci_vtscsi_tmf_handler_cb[tmf->subtype], tmf); + + if (ret == PCI_VTSCSI_WALK_STOP) + break; } } /* Unlock the request queues before we return. */ - for (int i = 0; i < VTSCSI_REQUESTQ; i++) { + for (uint32_t i = 0; i < sc->vss_config.num_queues; i++) { struct pci_vtscsi_queue *q = &sc->vss_queues[i]; pthread_mutex_unlock(&q->vsq_rmtx); @@ -680,6 +686,11 @@ pci_vtscsi_alloc_request(struct pci_vtscsi_softc *sc) if (req == NULL) goto fail; + req->vsr_iov = calloc(sc->vss_config.seg_max + VIRTIO_SCSI_HDR_SEG + + SPLIT_IOV_ADDL_IOV, sizeof(struct iovec)); + if (req->vsr_iov == NULL) + goto fail; + req->vsr_cmd_rd = calloc(1, VTSCSI_IN_HEADER_LEN(sc)); if (req->vsr_cmd_rd == NULL) goto fail; @@ -712,6 +723,8 @@ pci_vtscsi_free_request(struct pci_vtscsi_softc *sc, free(req->vsr_cmd_rd); if (req->vsr_cmd_wr != NULL) free(req->vsr_cmd_wr); + if (req->vsr_iov != NULL) + free(req->vsr_iov); free(req); } @@ -739,19 +752,23 @@ pci_vtscsi_put_request(struct pci_vtscsi_req_queue *req_queue, static void pci_vtscsi_queue_request(struct pci_vtscsi_softc *sc, struct vqueue_info *vq) { - struct pci_vtscsi_queue *q = &sc->vss_queues[vq->vq_num - 2]; + struct pci_vtscsi_queue *q; struct pci_vtscsi_request *req; struct vi_req vireq; size_t res __maybe_unused; - int n; + int n, numseg; + + q = &sc->vss_queues[vq->vq_num - VIRTIO_SCSI_ADDL_Q]; pthread_mutex_lock(&q->vsq_fmtx); req = pci_vtscsi_get_request(&q->vsq_free_requests); assert(req != NULL); pthread_mutex_unlock(&q->vsq_fmtx); - n = vq_getchain(vq, req->vsr_iov, VTSCSI_MAXSEG, &vireq); - assert(n >= 1 && n <= VTSCSI_MAXSEG); + numseg = (int)(sc->vss_config.seg_max + VIRTIO_SCSI_HDR_SEG); + + n = vq_getchain(vq, req->vsr_iov, numseg, &vireq); + assert(n >= 1 && n <= numseg); req->vsr_idx = vireq.idx; req->vsr_queue = q; @@ -851,6 +868,7 @@ pci_vtscsi_return_request(struct pci_vtscsi_queue *q, struct pci_vtscsi_request *req, int iolen) { struct pci_vtscsi_softc *sc = q->vsq_sc; + void *iov = req->vsr_iov; void *cmd_rd = req->vsr_cmd_rd; void *cmd_wr = req->vsr_cmd_wr; void *backend = req->vsr_backend; @@ -864,10 +882,13 @@ pci_vtscsi_return_request(struct pci_vtscsi_queue *q, sc->vss_backend->vsb_req_clear(backend); + memset(iov, 0, sizeof(struct iovec) * (sc->vss_config.seg_max + + VIRTIO_SCSI_HDR_SEG + SPLIT_IOV_ADDL_IOV)); memset(cmd_rd, 0, VTSCSI_IN_HEADER_LEN(q->vsq_sc)); memset(cmd_wr, 0, VTSCSI_OUT_HEADER_LEN(q->vsq_sc)); memset(req, 0, sizeof(struct pci_vtscsi_request)); + req->vsr_iov = iov; req->vsr_cmd_rd = cmd_rd; req->vsr_cmd_wr = cmd_wr; req->vsr_backend = backend; @@ -892,18 +913,17 @@ pci_vtscsi_request_handle(struct pci_vtscsi_softc *sc, int fd, static void pci_vtscsi_controlq_notify(void *vsc, struct vqueue_info *vq) { - struct pci_vtscsi_softc *sc; - struct iovec iov[VTSCSI_MAXSEG]; + struct pci_vtscsi_softc *sc = vsc; + int numseg = (int)(sc->vss_config.seg_max + VIRTIO_SCSI_HDR_SEG); + struct iovec *iov = calloc(numseg, sizeof (struct iovec)); struct vi_req req; void *buf = NULL; size_t bufsize; int n; - sc = vsc; - while (vq_has_descs(vq)) { - n = vq_getchain(vq, iov, VTSCSI_MAXSEG, &req); - assert(n >= 1 && n <= VTSCSI_MAXSEG); + n = vq_getchain(vq, iov, numseg, &req); + assert(n >= 1 && n <= numseg); bufsize = iov_to_buf(iov, n, &buf); pci_vtscsi_control_handle(sc, buf, bufsize); @@ -916,6 +936,7 @@ pci_vtscsi_controlq_notify(void *vsc, struct vqueue_info *vq) } vq_endchains(vq, 1); /* Generate interrupt if appropriate. */ free(buf); + free(iov); } static void @@ -938,10 +959,10 @@ pci_vtscsi_init_queue(struct pci_vtscsi_softc *sc, { struct pci_vtscsi_worker *workers; char tname[MAXCOMLEN + 1]; - int i; + uint32_t i; queue->vsq_sc = sc; - queue->vsq_vq = &sc->vss_vq[num + 2]; + queue->vsq_vq = &sc->vss_vq[num]; pthread_mutex_init(&queue->vsq_rmtx, NULL); pthread_mutex_init(&queue->vsq_fmtx, NULL); @@ -951,7 +972,7 @@ pci_vtscsi_init_queue(struct pci_vtscsi_softc *sc, STAILQ_INIT(&queue->vsq_free_requests); LIST_INIT(&queue->vsq_workers); - for (i = 0; i < VTSCSI_RINGSZ; i++) { + for (i = 0; i < sc->vss_req_ringsz; i++) { struct pci_vtscsi_request *req; req = pci_vtscsi_alloc_request(sc); @@ -961,11 +982,11 @@ pci_vtscsi_init_queue(struct pci_vtscsi_softc *sc, pci_vtscsi_put_request(&queue->vsq_free_requests, req); } - workers = calloc(VTSCSI_THR_PER_Q, sizeof(struct pci_vtscsi_worker)); + workers = calloc(sc->vss_thr_per_q, sizeof(struct pci_vtscsi_worker)); if (workers == NULL) goto fail; - for (i = 0; i < VTSCSI_THR_PER_Q; i++) { + for (i = 0; i < sc->vss_thr_per_q; i++) { workers[i].vsw_queue = queue; pthread_create(&workers[i].vsw_thread, NULL, &pci_vtscsi_proc, @@ -979,19 +1000,19 @@ pci_vtscsi_init_queue(struct pci_vtscsi_softc *sc, return (0); fail: - pci_vtscsi_destroy_queue(queue); + pci_vtscsi_destroy_queue(sc, queue); return (-1); - } static void -pci_vtscsi_destroy_queue(struct pci_vtscsi_queue *queue) +pci_vtscsi_destroy_queue(struct pci_vtscsi_softc *sc, + struct pci_vtscsi_queue *queue) { if (queue->vsq_sc == NULL) return; - for (int i = VTSCSI_RINGSZ; i > 0; i--) { + for (int i = sc->vss_req_ringsz; i > 0; i--) { struct pci_vtscsi_request *req; if (STAILQ_EMPTY(&queue->vsq_free_requests)) @@ -1217,19 +1238,49 @@ pci_vtscsi_init_target(const char *prefix __unused, const nvlist_t *parent, return (ret); } +static int +pci_vtscsi_get_config_num(nvlist_t *nvl, const char *name, uint32_t lim_lo, + uint32_t lim_hi, uint32_t *res) +{ + const char *value; + const char *errstr; + long long val; + + value = get_config_value_node(nvl, name); + if (value == NULL) + return (0); + + val = strtonumx(value, lim_lo, lim_hi, &errstr, 0); + if (errstr != NULL) { + EPRINTLN("Invalid value for %s: %s", name, value); + return (-1); + } + + *res = (uint32_t)val; + return (0); +} + static int pci_vtscsi_init(struct pci_devinst *pi, nvlist_t *nvl) { struct pci_vtscsi_softc *sc; struct pci_vtscsi_backend *backend, **vbpp; const char *value; + uint32_t val; size_t i; - int err; + int q, err; sc = calloc(1, sizeof(struct pci_vtscsi_softc)); if (sc == NULL) return (-1); + sc->vss_vi_consts = vtscsi_vi_consts; + sc->vss_ctl_ringsz = VTSCSI_DEF_RINGSZ; + sc->vss_evt_ringsz = VTSCSI_DEF_RINGSZ; + sc->vss_req_ringsz = VTSCSI_DEF_RINGSZ; + sc->vss_thr_per_q = VTSCSI_DEF_THR_PER_Q; + sc->vss_default_config = vtscsi_config; + value = get_config_value_node(nvl, "bootindex"); if (value != NULL) { if (pci_emul_add_boot_device(pi, atoi(value))) { @@ -1239,6 +1290,60 @@ pci_vtscsi_init(struct pci_devinst *pi, nvlist_t *nvl) } } + val = vtscsi_config.seg_max; + if (pci_vtscsi_get_config_num(nvl, "seg_max", VTSCSI_MIN_MAXSEG, + VTSCSI_MAX_MAXSEG, &val) != 0) + goto fail; + sc->vss_default_config.seg_max = val; + + val = vtscsi_config.num_queues; + if (pci_vtscsi_get_config_num(nvl, "num_queues", VTSCSI_MIN_REQUESTQ, + VTSCSI_MAX_REQUESTQ, &val) != 0) + goto fail; + sc->vss_default_config.num_queues = val; + + /* + * num_queues is only the number of request queues, but nvq must + * account for the control and event queues. + */ + sc->vss_vi_consts.vc_nvq = val + VIRTIO_SCSI_ADDL_Q; + + /* + * Allocate queues early, so that they're there for the call to + * vi_softc_linkup(). + */ + sc->vss_vq = calloc(sc->vss_vi_consts.vc_nvq, + sizeof(struct vqueue_info)); + if (sc->vss_vq == NULL) { + EPRINTLN("can't allocate space for %d virtqueues", + sc->vss_vi_consts.vc_nvq); + goto fail; + } + + sc->vss_queues = calloc(sc->vss_default_config.num_queues, + sizeof(struct pci_vtscsi_queue)); + if (sc->vss_queues == NULL) { + EPRINTLN("can't allocate space for %d request queues", + sc->vss_config.num_queues); + goto fail; + } + + if (pci_vtscsi_get_config_num(nvl, "ctl_ringsz", VTSCSI_MIN_RINGSZ, + VTSCSI_MAX_RINGSZ, &sc->vss_ctl_ringsz) != 0) + goto fail; + + if (pci_vtscsi_get_config_num(nvl, "evt_ringsz", VTSCSI_MIN_RINGSZ, + VTSCSI_MAX_RINGSZ, &sc->vss_evt_ringsz) != 0) + goto fail; + + if (pci_vtscsi_get_config_num(nvl, "req_ringsz", VTSCSI_MIN_RINGSZ, + VTSCSI_MAX_RINGSZ, &sc->vss_req_ringsz) != 0) + goto fail; + + if (pci_vtscsi_get_config_num(nvl, "thr_per_q", VTSCSI_MIN_THR_PER_Q, + VTSCSI_MAX_THR_PER_Q, &sc->vss_thr_per_q) != 0) + goto fail; + value = get_config_value_node(nvl, "backend"); if (value == NULL) { if (SET_COUNT(pci_vtscsi_backend_set) == 0) { @@ -1301,7 +1406,7 @@ pci_vtscsi_init(struct pci_devinst *pi, nvlist_t *nvl) pthread_mutex_init(&sc->vss_mtx, NULL); - vi_softc_linkup(&sc->vss_vs, &vtscsi_vi_consts, sc, pi, sc->vss_vq); + vi_softc_linkup(&sc->vss_vs, &sc->vss_vi_consts, sc, pi, sc->vss_vq); sc->vss_vs.vs_mtx = &sc->vss_mtx; /* @@ -1317,20 +1422,22 @@ pci_vtscsi_init(struct pci_devinst *pi, nvlist_t *nvl) pci_vtscsi_reset(sc); pthread_mutex_unlock(&sc->vss_mtx); - /* controlq */ - sc->vss_vq[0].vq_qsize = VTSCSI_RINGSZ; + /* virtqueue 0: control queue */ + sc->vss_vq[0].vq_qsize = sc->vss_ctl_ringsz; sc->vss_vq[0].vq_notify = pci_vtscsi_controlq_notify; - /* eventq */ - sc->vss_vq[1].vq_qsize = VTSCSI_RINGSZ; + /* virtqueue 1: event queue */ + sc->vss_vq[1].vq_qsize = sc->vss_evt_ringsz; sc->vss_vq[1].vq_notify = pci_vtscsi_eventq_notify; - /* request queues */ - for (i = 2; i < VTSCSI_MAXQ; i++) { - sc->vss_vq[i].vq_qsize = VTSCSI_RINGSZ; - sc->vss_vq[i].vq_notify = pci_vtscsi_requestq_notify; + /* virtqueue 2-n: request queues */ + for (q = VIRTIO_SCSI_ADDL_Q; q < sc->vss_vi_consts.vc_nvq; q++) { + int rq = q - VIRTIO_SCSI_ADDL_Q; + + sc->vss_vq[q].vq_qsize = sc->vss_req_ringsz; + sc->vss_vq[q].vq_notify = pci_vtscsi_requestq_notify; - err = pci_vtscsi_init_queue(sc, &sc->vss_queues[i - 2], i - 2); + err = pci_vtscsi_init_queue(sc, &sc->vss_queues[rq], q); if (err != 0) goto fail; } @@ -1351,8 +1458,15 @@ pci_vtscsi_init(struct pci_devinst *pi, nvlist_t *nvl) return (0); fail: - for (i = 2; i < VTSCSI_MAXQ; i++) - pci_vtscsi_destroy_queue(&sc->vss_queues[i - 2]); + if (sc->vss_queues != NULL) { + for (q = VIRTIO_SCSI_ADDL_Q; + q < sc->vss_vi_consts.vc_nvq; + q++) { + int rq = q - VIRTIO_SCSI_ADDL_Q; + + pci_vtscsi_destroy_queue(sc, &sc->vss_queues[rq]); + } + } pthread_mutex_destroy(&sc->vss_mtx); @@ -1365,6 +1479,8 @@ fail: free(sc->vss_targets); free(sc->vss_backend); + free(sc->vss_queues); + free(sc->vss_vq); free(sc); return (-1); } diff --git a/usr.sbin/bhyve/pci_virtio_scsi.h b/usr.sbin/bhyve/pci_virtio_scsi.h index 5a8bb7a47d40..b0f41bbdd8c3 100644 --- a/usr.sbin/bhyve/pci_virtio_scsi.h +++ b/usr.sbin/bhyve/pci_virtio_scsi.h @@ -32,6 +32,8 @@ #ifndef _PCI_VIRTIO_SCSI_H_ #define _PCI_VIRTIO_SCSI_H_ +#include "iov.h" + extern int pci_vtscsi_debug; #define WPRINTF(msg, params...) PRINTLN("virtio-scsi: " msg, ##params) @@ -41,18 +43,31 @@ extern int pci_vtscsi_debug; #define VIRTIO_SCSI_MAX_CHANNEL 0 #define VIRTIO_SCSI_MAX_TARGET 255 #define VIRTIO_SCSI_MAX_LUN 16383 +#define VIRTIO_SCSI_HDR_SEG 2 +#define VIRTIO_SCSI_ADDL_Q 2 /* Features specific to VirtIO SCSI, none of which we currently support */ #define VIRTIO_SCSI_F_INOUT (1 << 0) #define VIRTIO_SCSI_F_HOTPLUG (1 << 1) #define VIRTIO_SCSI_F_CHANGE (1 << 2) -/* Limits which we set. These should really be configurable. */ -#define VTSCSI_RINGSZ 64 -#define VTSCSI_REQUESTQ 1 -#define VTSCSI_THR_PER_Q 16 -#define VTSCSI_MAXQ (VTSCSI_REQUESTQ + 2) -#define VTSCSI_MAXSEG 64 +/* Default limits which we set. All of these are configurable. */ +#define VTSCSI_DEF_RINGSZ 64 +#define VTSCSI_MIN_RINGSZ 4 +#define VTSCSI_MAX_RINGSZ 4096 + +#define VTSCSI_DEF_THR_PER_Q 16 +#define VTSCSI_MIN_THR_PER_Q 1 +#define VTSCSI_MAX_THR_PER_Q 256 + +#define VTSCSI_DEF_MAXSEG 64 +#define VTSCSI_MIN_MAXSEG (VIRTIO_SCSI_HDR_SEG + 1) +#define VTSCSI_MAX_MAXSEG \ + (4096 - VIRTIO_SCSI_HDR_SEG - SPLIT_IOV_ADDL_IOV) + +#define VTSCSI_DEF_REQUESTQ 1 +#define VTSCSI_MIN_REQUESTQ 1 +#define VTSCSI_MAX_REQUESTQ (32 - VIRTIO_SCSI_ADDL_Q) /* * Device-specific config space registers @@ -88,20 +103,17 @@ struct pci_vtscsi_config { * device instance has at least one I/O request queue, the state of which is * is kept in an array of struct pci_vtscsi_queue in the device softc. * - * Currently there is only one I/O request queue, but it's trivial to support - * more than one. + * Each pci_vtscsi_queue has configurable number of pci_vtscsi_request + * structures pre-allocated on vsq_free_requests. For each I/O request + * coming in on the I/O virtqueue, the request queue handler will take a + * pci_vtscsi_request off vsq_free_requests, fills in the data from the + * I/O virtqueue, puts it on vsq_requests, and signals vsq_cv. * - * Each pci_vtscsi_queue has VTSCSI_RINGSZ pci_vtscsi_request structures pre- - * allocated on vsq_free_requests. For each I/O request coming in on the I/O - * virtqueue, the request queue handler will take a pci_vtscsi_request off - * vsq_free_requests, fills in the data from the I/O virtqueue, puts it on - * vsq_requests, and signals vsq_cv. - * - * There are VTSCSI_THR_PER_Q worker threads for each pci_vtscsi_queue which - * wait on vsq_cv. When signalled, they repeatedly take one pci_vtscsi_request - * off vsq_requests, construct a ctl_io for it, and hand it off to the CTL ioctl - * Interface, which processes it synchronously. After completion of the request, - * the pci_vtscsi_request is re-initialized and put back onto vsq_free_requests. + * Each pci_vtscsi_queue will have a configurable number of worker threads, + * which wait on vsq_cv. When signalled, they repeatedly take a single + * pci_vtscsi_request off vsq_requests and hand it to the backend, which + * processes it synchronously. After completion, the pci_vtscsi_request + * is re-initialized and put back onto vsq_free_requests. * * The worker threads exit when vsq_cv is signalled after vsw_exiting was set. * @@ -109,6 +121,23 @@ struct pci_vtscsi_config { * - vsq_rmtx protects vsq_requests and must be held when waiting on vsq_cv * - vsq_fmtx protects vsq_free_requests * - vsq_qmtx must be held when operating on the underlying virtqueue, vsq_vq + * + * The I/O vectors for each request are kept in the preallocated iovec array + * vsr_iov, and pointers to the respective header/data in/out portions are set + * up to point into the array when the request is queued for processing. + * + * The number of iovecs preallocated for vsr_iov is derived from the configured + * 'seg_max' parameter defined by the virtio spec: + * - 'seg_max' parameter specifies the maximum number of I/O data vectors + * we support in any request + * - we need 2 additional iovecs for the I/O headers (VIRTIO_SCSI_HDR_SEG) + * - we need another 2 additional iovecs for split_iov() (SPLIT_IOV_ADDL_IOV) + * + * The only time we explicitly need the full size of vsr_iov after preallocation + * is during re-initialization after completing a request, and implicitly in the + * calls to split_iov() the set up the pointers. In all other cases, we use only + * 'seg_max' + VIRTIO_SCSI_HDR_SEG, and we advertise only 'seg_max' to the guest + * in accordance to the virtio spec. */ STAILQ_HEAD(pci_vtscsi_req_queue, pci_vtscsi_request); @@ -133,8 +162,7 @@ struct pci_vtscsi_worker { struct pci_vtscsi_request { struct pci_vtscsi_queue *vsr_queue; - struct iovec vsr_iov[VTSCSI_MAXSEG + - SPLIT_IOV_ADDL_IOV]; + struct iovec *vsr_iov; struct iovec *vsr_iov_in; struct iovec *vsr_iov_out; struct iovec *vsr_data_iov_in; @@ -164,11 +192,17 @@ struct pci_vtscsi_target { */ struct pci_vtscsi_softc { struct virtio_softc vss_vs; - struct vqueue_info vss_vq[VTSCSI_MAXQ]; - struct pci_vtscsi_queue vss_queues[VTSCSI_REQUESTQ]; + struct virtio_consts vss_vi_consts; + struct vqueue_info *vss_vq; + struct pci_vtscsi_queue *vss_queues; pthread_mutex_t vss_mtx; uint32_t vss_features; size_t vss_num_target; + uint32_t vss_ctl_ringsz; + uint32_t vss_evt_ringsz; + uint32_t vss_req_ringsz; + uint32_t vss_thr_per_q; + struct pci_vtscsi_config vss_default_config; struct pci_vtscsi_config vss_config; struct pci_vtscsi_target *vss_targets; struct pci_vtscsi_backend *vss_backend; From nobody Tue May 26 16:07:19 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPyLw0Qslz6g2Db for ; Tue, 26 May 2026 16:07: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPyLv49tRz4563 for ; Tue, 26 May 2026 16:07:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779811639; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wPMNvqggVoTHCRsJoGTjRCsO/cdml0Gx/qGTPLEnr+k=; b=vxXdFgCQGPPa5ZFRhlA6JBfS3t1F7ue1WPZgAAe8Hc9l0gfqqWqY9UNuqfuJ8sBF3CTBDl UdeNHMCqZZr8T7vqgp1jGlxuaLy2buOFWDTVqOCYL+scy1WQn7e0B8kNtxgSQw1+4jTy0O 5vTF54YTSbKLPn+tQZS+4Fic6eSJ81s5mot1M8rwQPzG1KrOssFtqghWoMMagW2uQutWCl evGSWb3IUdspgdDRJ8S0Cmn8a6sO/vlWUpc9dkFqznQA2uRO4+Ttwot56fiEQNTjO2oVrv kXyGi/W7m4PIiSjMPJHHLU/KletaqaXIju/x/YDqJu0r5u6Q+fTbp51pgMC+Iw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779811639; a=rsa-sha256; cv=none; b=dzL+SQs8LAAorv+G8NHYmRB2jPOH1L2e+4vXPWbScUUuKM7a0KBKWW+XSh4YZALTrMIYv6 ReWBNmfWfH8UNpdg+NflzQd9RRUWoE2KMAsb2l+eUDV9JpIVFW9KLpd+JtnNzmwG08ycTB YQ1W8heG1SD5RoZWzFvgYX/O7yE6FlKohLq/v0GiqF17rgIaUTYzdi37H/hIbPX0qQHqKR 5TVTsdJT5U+BGbLdaINv49gMbRYosT5n5AWlSDHovqdEh/ojpl9o1kLWsOx4ORmEokVzZn VEGR8wjAbsdPMCKvtd8RR06zRr+xMik1WIw46RA73XJV9Aq8e6hrUm3M+JiZDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779811639; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wPMNvqggVoTHCRsJoGTjRCsO/cdml0Gx/qGTPLEnr+k=; b=EkHLq5mvub6r75kWa4D8rYeRNxzGXavSXfTqCRSElZaca0MsTvk/ke5/Oi2emEUHR8qAA8 eUqwqJbIJ5Lwfh69eBcLjfA9Sn8FZ9BBZMU65OaPPJzhVvxHCv+ulxccAcjNfnmyBhVMe6 3qXMyJHmRcivgek1cPSjbND8PQwEGMzFBAiyp+advs8061xBQn7feDRd0QtUSPy9ZOWKXK Trp6nU4Tbq5RXm7f4pTojisxvU4WiZK+FeoBKDLQ9w0iV0qQn4qgFGrLju3tl8lY27AxYQ dSTmIxtPfE382gM8iBEF2tVlaHBdhWp/ISJ9/HkYDQSyBSkP845jpc/DMEQd7Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPyLv38KJz41K for ; Tue, 26 May 2026 16:07:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31f79 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 26 May 2026 16:07:19 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 895a0ae67fe2 - main - divert: Define semantics for SO_REUSEPORT_LB on divert sockets List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 895a0ae67fe2c0c45b68991f1bba0c62f4d00ad5 Auto-Submitted: auto-generated Date: Tue, 26 May 2026 16:07:19 +0000 Message-Id: <6a15c537.31f79.2fbdade@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=895a0ae67fe2c0c45b68991f1bba0c62f4d00ad5 commit 895a0ae67fe2c0c45b68991f1bba0c62f4d00ad5 Author: Mark Johnston AuthorDate: 2026-05-26 12:43:51 +0000 Commit: Mark Johnston CommitDate: 2026-05-26 16:04:54 +0000 divert: Define semantics for SO_REUSEPORT_LB on divert sockets Allow SO_REUSEPORT_LB to be set on divert sockets. If set, then bind() will add the socket to a "load-balancing group". When a divert-to rule matches a port with an associated group, the corresponding state ID is used to select a specific socket from the group. Packets without an associated state are simply forwarded to the first socket in the group. For now I only pass a state ID from pf, as I couldn't see a useful identifier on the ipfw side. This implementation is simple but has a caveat, that being that if sockets are added to the group while flows are being processed, the size of the group will change and this changes the mapping of state IDs to sockets. So, to get a consistent mapping, the divert socket application must bind all of its sockets before any traffic is diverted by the firewall. Reviewed by: glebius MFC after: 1 month Sponsored by: OPNsense Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D56563 --- lib/libsys/getsockopt.2 | 6 +- share/man/man4/divert.4 | 24 ++++++- sys/netinet/ip_divert.c | 158 +++++++++++++++++++++++++++++++++++++----- sys/netinet/ip_var.h | 2 +- sys/netinet/raw_ip.c | 2 +- sys/netpfil/ipfw/ip_fw_pfil.c | 2 +- sys/netpfil/pf/pf.c | 2 +- 7 files changed, 172 insertions(+), 24 deletions(-) diff --git a/lib/libsys/getsockopt.2 b/lib/libsys/getsockopt.2 index 3867824681d7..85d94e014631 100644 --- a/lib/libsys/getsockopt.2 +++ b/lib/libsys/getsockopt.2 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd November 25, 2024 +.Dd April 21, 2026 .Dt GETSOCKOPT 2 .Os .Sh NAME @@ -220,6 +220,10 @@ Incoming TCP and UDP connections are distributed among the participating listening sockets based on a hash function of local port number, and foreign IP address and port number. A maximum of 256 sockets can be bound to the same load-balancing group. +.Dv PF_DIVERT +sockets may also be bound to a group, see the +.Xr divert 4 +manual page for details. .Pp .Dv SO_KEEPALIVE enables the diff --git a/share/man/man4/divert.4 b/share/man/man4/divert.4 index 647bb72ab49b..6292df190eb1 100644 --- a/share/man/man4/divert.4 +++ b/share/man/man4/divert.4 @@ -1,5 +1,4 @@ -.\" -.Dd January 23, 2026 +.Dd April 21, 2026 .Dt DIVERT 4 .Os .Sh NAME @@ -57,7 +56,26 @@ firewall processing at the next rule. .Pp By reading from and writing to a divert socket, matching packets can be passed through an arbitrary ``filter'' as they travel through -the host machine, special routing tricks can be done, etc. +the host machine, special routing tricks can be done, etc.. +.Pp +Multiple divert sockets may be bound to the same port if the +.Dv SO_REUSEPORT_LB +socket option is set on all of them. +In this case, the kernel will attempt to load-balance packets among +the sockets. +The implementation ensures that packets from the same flow are delivered +to the same socket. +To this end it relies on the firewall to provide a flow identifier with +each diverted packet. +When using the +.Xr pf 4 +firewall, this is the associated state ID, if one exists, otherwise all +packets are diverted to the first socket in the group. +Currently the +.Xr ipfw 4 +firewall does not provide a flow identifier, so all packets are diverted +to the first socket in the group. +At most 32 sockets can be bound to the same port. .Sh READING PACKETS Packets are diverted either as they are ``incoming'' or ``outgoing.'' Incoming packets are diverted after reception on an IP interface, diff --git a/sys/netinet/ip_divert.c b/sys/netinet/ip_divert.c index 39bc9de6ec9f..839048908f9f 100644 --- a/sys/netinet/ip_divert.c +++ b/sys/netinet/ip_divert.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -88,7 +89,7 @@ */ #define DIVHASHSIZE (1 << 3) /* 8 entries, one cache line. */ #define DIVHASH(port) (port % DIVHASHSIZE) -#define DCBHASH(dcb) ((dcb)->dcb_port % DIVHASHSIZE) +#define DCBHASH(dcb) (DIVHASH((dcb)->dcb_port)) /* * Divert sockets work in conjunction with ipfw or other packet filters, @@ -147,10 +148,22 @@ struct divcb { struct epoch_context dcb_epochctx; }; +struct divcblbgroup { + CK_SLIST_ENTRY(divcblbgroup) dl_next; + struct epoch_context dl_epochctx; + uint16_t dl_port; + uint16_t dl_count; +#define DIVCBLBGROUP_SIZE 32 + struct divcb *dl_dcb[DIVCBLBGROUP_SIZE]; +}; + CK_SLIST_HEAD(divhashhead, divcb); +CK_SLIST_HEAD(divlbgrouphashhead, divcblbgroup); -VNET_DEFINE_STATIC(struct divhashhead, divhash[DIVHASHSIZE]) = {}; +VNET_DEFINE_STATIC(struct divhashhead, divhash[DIVHASHSIZE]); #define V_divhash VNET(divhash) +VNET_DEFINE_STATIC(struct divlbgrouphashhead, divlbhash[DIVHASHSIZE]); +#define V_divlbhash VNET(divlbhash) VNET_DEFINE_STATIC(uint64_t, dcb_count) = 0; #define V_dcb_count VNET(dcb_count) VNET_DEFINE_STATIC(uint64_t, dcb_gencnt) = 0; @@ -163,10 +176,15 @@ MTX_SYSINIT(divert, &divert_mtx, "divert(4) socket pcb lists", MTX_DEF); /* * Divert a packet by passing it up to the divert socket at port 'port'. + * + * 'id' is an opaque identifier for the flow and is used to load-balance packets + * across multiple divert sockets bound to the same port. Packets with the same + * identifier will be delivered to the same socket. */ static void -divert_packet(struct mbuf *m, bool incoming) +divert_packet(struct mbuf *m, uint64_t id, bool incoming) { + struct divcblbgroup *dlb; struct divcb *dcb; u_int16_t nport; struct sockaddr_in divsrc; @@ -272,10 +290,27 @@ divert_packet(struct mbuf *m, bool incoming) sizeof(divsrc.sin_zero)); } - /* Put packet on socket queue, if any */ - CK_SLIST_FOREACH(dcb, &V_divhash[DIVHASH(nport)], dcb_next) - if (dcb->dcb_port == nport) + /* + * Look for a matching divert socket or socket group, and enqueue the + * packet. + */ + CK_SLIST_FOREACH(dlb, &V_divlbhash[DIVHASH(nport)], dl_next) { + uint16_t count; + + count = atomic_load_acq_16(&dlb->dl_count); + if (dlb->dl_port == nport && count > 0) { + uint32_t hash; + + hash = jenkins_hash(&id, sizeof(uint64_t), 0); + dcb = dlb->dl_dcb[hash % count]; break; + } + } + if (dlb == NULL) { + CK_SLIST_FOREACH(dcb, &V_divhash[DIVHASH(nport)], dcb_next) + if (dcb->dcb_port == nport) + break; + } if (dcb != NULL) { struct socket *sa = dcb->dcb_socket; @@ -596,6 +631,53 @@ div_free(epoch_context_t ctx) free(dcb, M_PCB); } +static void +divlbgroup_free(epoch_context_t ctx) +{ + struct divcblbgroup *dlb = __containerof(ctx, struct divcblbgroup, + dl_epochctx); + + free(dlb, M_PCB); +} + +static void +div_lbgroup_detach(struct divcb *dcb) +{ + struct divcblbgroup *dlb; + + CK_SLIST_FOREACH(dlb, &V_divlbhash[DCBHASH(dcb)], dl_next) { + if (dlb->dl_port != dcb->dcb_port) + continue; + + /* + * Delicately remove the socket from its group, taking + * care to synchronize with lookups, which do not handle + * NULL slots in the group table. + * + * Note that the hash is not stable across different + * group sizes. + */ + for (int i = 0; i < dlb->dl_count; i++) { + unsigned int count; + + if (dlb->dl_dcb[i] != dcb) + continue; + + count = dlb->dl_count; + if (i != count - 1) + dlb->dl_dcb[i] = dlb->dl_dcb[count - 1]; + atomic_store_rel_16(&dlb->dl_count, count - 1); + if (count == 1) { + CK_SLIST_REMOVE(&V_divlbhash[DCBHASH(dcb)], dlb, + divcblbgroup, dl_next); + NET_EPOCH_CALL(divlbgroup_free, + &dlb->dl_epochctx); + } + return; + } + } +} + static void div_detach(struct socket *so) { @@ -603,8 +685,10 @@ div_detach(struct socket *so) so->so_pcb = NULL; DIVERT_LOCK(); - if (dcb->dcb_bound != DCB_UNBOUND) + if (dcb->dcb_bound != DCB_UNBOUND) { CK_SLIST_REMOVE(&V_divhash[DCBHASH(dcb)], dcb, divcb, dcb_next); + div_lbgroup_detach(dcb); + } V_dcb_count--; V_dcb_gencnt++; DIVERT_UNLOCK(); @@ -614,28 +698,70 @@ div_detach(struct socket *so) static int div_bind(struct socket *so, struct sockaddr *nam, struct thread *td) { + struct divcblbgroup *dlb; struct divcb *dcb; + int error; uint16_t port; if (nam->sa_family != AF_INET) return EAFNOSUPPORT; if (nam->sa_len != sizeof(struct sockaddr_in)) return EINVAL; + + error = 0; + if ((so->so_options & SO_REUSEPORT_LB) != 0) + dlb = malloc(sizeof(*dlb), M_PCB, M_WAITOK | M_ZERO); + else + dlb = NULL; + port = ((struct sockaddr_in *)nam)->sin_port; DIVERT_LOCK(); - CK_SLIST_FOREACH(dcb, &V_divhash[DIVHASH(port)], dcb_next) - if (dcb->dcb_port == port) { - DIVERT_UNLOCK(); - return (EADDRINUSE); + if (dlb == NULL) { + CK_SLIST_FOREACH(dcb, &V_divhash[DIVHASH(port)], dcb_next) { + if (dcb->dcb_port == port) { + DIVERT_UNLOCK(); + return (EADDRINUSE); + } } + } dcb = so->so_pcb; - if (dcb->dcb_bound != DCB_UNBOUND) - CK_SLIST_REMOVE(&V_divhash[DCBHASH(dcb)], dcb, divcb, dcb_next); - dcb->dcb_port = port; - CK_SLIST_INSERT_HEAD(&V_divhash[DIVHASH(port)], dcb, dcb_next); + if (dlb != NULL) { + struct divcblbgroup *tmp; + + CK_SLIST_FOREACH(tmp, &V_divlbhash[DIVHASH(port)], dl_next) { + if (tmp->dl_port == port) + break; + } + if (tmp == NULL) { + dlb->dl_port = port; + dlb->dl_count = 1; + dlb->dl_dcb[0] = dcb; + CK_SLIST_INSERT_HEAD(&V_divlbhash[DIVHASH(port)], dlb, + dl_next); + } else if (tmp->dl_count < DIVCBLBGROUP_SIZE) { + KASSERT(tmp->dl_count > 0, + ("div_bind: lbgroup %p has count 0", tmp)); + + tmp->dl_dcb[tmp->dl_count] = dcb; + atomic_store_rel_16(&tmp->dl_count, tmp->dl_count + 1); + free(dlb, M_PCB); + } else { + error = ENOSPC; + free(dlb, M_PCB); + } + } + if (error == 0) { + if (dcb->dcb_bound != DCB_UNBOUND) { + CK_SLIST_REMOVE(&V_divhash[DCBHASH(dcb)], dcb, divcb, + dcb_next); + div_lbgroup_detach(dcb); + } + dcb->dcb_port = port; + CK_SLIST_INSERT_HEAD(&V_divhash[DIVHASH(port)], dcb, dcb_next); + } DIVERT_UNLOCK(); - return (0); + return (error); } static int diff --git a/sys/netinet/ip_var.h b/sys/netinet/ip_var.h index 934ca80a083d..081938ec7ae4 100644 --- a/sys/netinet/ip_var.h +++ b/sys/netinet/ip_var.h @@ -324,7 +324,7 @@ VNET_DECLARE(ip_fw_ctl_ptr_t, ip_fw_ctl_ptr); #define V_ip_fw_ctl_ptr VNET(ip_fw_ctl_ptr) /* Divert hooks. */ -extern void (*ip_divert_ptr)(struct mbuf *m, bool incoming); +extern void (*ip_divert_ptr)(struct mbuf *m, uint64_t id, bool incoming); /* ng_ipfw hooks -- XXX make it the same as divert and dummynet */ extern int (*ng_ipfw_input_p)(struct mbuf **, struct ip_fw_args *, bool); extern int (*ip_dn_ctl_ptr)(struct sockopt *); diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c index 48e20df3ef9a..851f70cbb0ad 100644 --- a/sys/netinet/raw_ip.c +++ b/sys/netinet/raw_ip.c @@ -96,7 +96,7 @@ VNET_DEFINE(ip_fw_ctl_ptr_t, ip_fw_ctl_ptr) = NULL; int (*ip_dn_ctl_ptr)(struct sockopt *); int (*ip_dn_io_ptr)(struct mbuf **, struct ip_fw_args *); -void (*ip_divert_ptr)(struct mbuf *, bool); +void (*ip_divert_ptr)(struct mbuf *, uint64_t, bool); int (*ng_ipfw_input_p)(struct mbuf **, struct ip_fw_args *, bool); #ifdef INET diff --git a/sys/netpfil/ipfw/ip_fw_pfil.c b/sys/netpfil/ipfw/ip_fw_pfil.c index ddd8e00316b8..7e1c24a89edd 100644 --- a/sys/netpfil/ipfw/ip_fw_pfil.c +++ b/sys/netpfil/ipfw/ip_fw_pfil.c @@ -563,7 +563,7 @@ ipfw_divert(struct mbuf **m0, struct ip_fw_args *args, bool tee) m_tag_prepend(clone, tag); /* Do the dirty job... */ - ip_divert_ptr(clone, args->flags & IPFW_ARGS_IN); + ip_divert_ptr(clone, 0, args->flags & IPFW_ARGS_IN); return 0; } diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 27d03b688937..98b5657f7285 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -11966,7 +11966,7 @@ done: pd.m->m_flags &= ~M_FASTFWD_OURS; } } - ip_divert_ptr(*m0, dir == PF_IN); + ip_divert_ptr(*m0, s != NULL ? s->id : 0, dir == PF_IN); *m0 = NULL; return (action); } else if (mtag == NULL) { From nobody Tue May 26 16:07:14 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPyLw4SmRz6g2BC for ; Tue, 26 May 2026 16:07: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPyLw1nrNz4540 for ; Tue, 26 May 2026 16:07:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779811640; 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=xxYTqboDFQXj1Ak2gtJQdoUnZREky0UO3BlNBNNQ6ro=; b=Evnxmph5iuY0Ics8MFLj0rIA6/6OqtkKSlj9ZDZM6RFid8w5grXL++oku2MkS2Fu0xLGkt odZM4tC1twaMJzC2okXQglTtP04/gQXrvHWbeUHpIxLgLc6+2/fH8yHPUnP4frumtX9DTx X9aqryYgAMrfkcU+b8bUzMovtj1cCqT+xawRg4Eq7LpG/ldQ8pViw6UwVcJbAkVSw5bQmR BNrk+CU+fphMLrzogD5lZ7D8zriNvkFN+Lukrv2OffBBu8yknk9fiAWTKBosOQ0VxbRoJ1 tc8WmfB7t1jp0ewrXUAouSwXund24IuXqyXZqNZTaRB2rjU+01PGxIf/Sz6hqg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779811640; a=rsa-sha256; cv=none; b=Jsb8IVqGFnZsl1ywyzkbRtYiGB4pEaggY/DA8TjQ/4iPCiYfKlTdjXDM/d2QkKnUtsZWjU RC4h6h23IgXxHVKotHGNIIHmH9FoYnW/JrYvNap/g88O1DxIPPAwhDMHJ/JO8pgRDcWSiV MHaYIqDA9seFpuXXkudXdQxyyKm5s9i4gJl0GJEPDhu9bwgTn2bKNiHy4WMAbI41T0fkWo WGs7NoW5vnIh2ECTxaVsrzelE1ezvxjLCsZ7vBlIdkqLv0WGjus7jHJecd63veqs56qqHl zHW8lMKu2OmRNWmbbflzQ8DtCxtVASXyM79TJOopvssOdIGnEcSB11YsxoVv9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779811640; 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=xxYTqboDFQXj1Ak2gtJQdoUnZREky0UO3BlNBNNQ6ro=; b=cTndyjMygBrmBWVaE0lU4Ws15Hq7LqSxJgOresYM34vmvw7mX294xd8C+ezdaihji8L7HF U8GBoZ5/u+W/UmwinHjoQrJXQHvfOpxLJvVKkeWzYAvjHT9zQvPwjbue2Yy794DMTEyBAz 6aylVf6+w5dMUKxVlLAUkZcd94nVWR76rLyzC2R1T1lfrbVrxikS6GfQdXLo8d2gD7wYZm AEorxD0pGH5zJIVpnNlMBwldhTzMyy4XI5O8xywo7UeDQJjPv+32jwuOnVjf/AXUG0SpAF PRMs0WVedWOwMfHJs09awILXisOzT6ErrCfYrLxnCXIwnhtklqp2rgCEmugZIg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPyLw1PHSz3lk for ; Tue, 26 May 2026 16:07:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 320fa by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 26 May 2026 16:07:14 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Hans Rosenfeld From: Mark Johnston Subject: git: 4151296fdcba - main - bhyve/virtio-scsi: Support for multiple targets List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4151296fdcbad2706936ffa7d428d8621ad11823 Auto-Submitted: auto-generated Date: Tue, 26 May 2026 16:07:14 +0000 Message-Id: <6a15c532.320fa.65b8671f@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4151296fdcbad2706936ffa7d428d8621ad11823 commit 4151296fdcbad2706936ffa7d428d8621ad11823 Author: Hans Rosenfeld AuthorDate: 2025-10-29 11:12:09 +0000 Commit: Mark Johnston CommitDate: 2026-05-26 16:03:12 +0000 bhyve/virtio-scsi: Support for multiple targets Currently, virtio-scsi supports only one target with 16383 LUNs, which fits nicely with what CTL provides. It would be useful to support more than that, multiple targets each with 16383 LUNs. While this can be useful with CTL by attaching each target to another CTL target port, this will be necessary to support SCSI passthrough. The new syntax for configuring targets will look like this: -s X,virtio-scsi,target=/dev/foo,target=/dev/bar,target=4:/dev/baz This will create the following configuration nodes: pci.0.X.0.device=virtio-scsi pci.0.X.0.target.0=/dev/foo pci.0.X.0.target.1=/dev/bar pci.0.X.0.target.4=/dev/baz The existing configuration syntax is still understood for compatibility: (1) -s X,virtio-scsi (2) -s X,virtio-scsi,/dev/foo (3) -s X,virtio-scsi,dev=/dev/foo This will create the following configuration nodes: pci.0.X.0.device=virtio-scsi (1, 2, 3) pci.0.X.0.target.0=/dev/cam/ctl (1) pci.0.X.0.target.0=/dev/foo (2, 3) Reviewed by: markj MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D53221 --- usr.sbin/bhyve/bhyve.8 | 38 ++++- usr.sbin/bhyve/bhyve_config.5 | 28 ++- usr.sbin/bhyve/pci_virtio_scsi.c | 361 ++++++++++++++++++++++++++++++++++----- 3 files changed, 378 insertions(+), 49 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index 5118974baace..b5b03dd9c211 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -2,6 +2,7 @@ .\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2013 Peter Grehan +.\" Copyright (c) 2026 Hans Rosenfeld .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -680,10 +681,45 @@ In that case, this feature doesn't work as expected. .Bl -bullet .Sm off .It -.Pa /dev/cam/ctl Oo Ar pp Cm \&. Ar vp Oc Oo Cm \&, Ar scsi-device-options Oc +.Oo Cm target Ns = Ns Oo ID : Oc Ar /dev/cam/ctl Oo Ar pp Cm \&. Ar vp Oc Oc +.Oo Cm \&, Ar scsi-device-options Oc .Sm on .El .Pp +Multiple +.Pa target +parameters may be specified, each configuring a different +.Ar path +as a distinct SCSI target. +If the +.Pa target +.Ar ID +is not explicitly configured for a +.Pa target , +the +.Pa target +will be assigned the next sequential +.Ar ID +following the highest +.Pa target +.Ar ID +used at that point, or 0 if it is the first target configured. +All +.Pa target +.Ar ID Ns s +must be unique per instance. +The +.Ar path +must point to a valid CAM target layer +.Po CTL +.Pc +device node. +If no +.Pa target +is configured, a single default target backed by +.Sy /dev/cam/ctl +will be created. +.Pp The .Ar scsi-device-options are: diff --git a/usr.sbin/bhyve/bhyve_config.5 b/usr.sbin/bhyve/bhyve_config.5 index 429ce3e38138..ea3157cb54d6 100644 --- a/usr.sbin/bhyve/bhyve_config.5 +++ b/usr.sbin/bhyve/bhyve_config.5 @@ -1,6 +1,7 @@ .\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2021 John H. Baldwin +.\" Copyright 2025 Hans Rosenfeld .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -761,14 +762,33 @@ If specified, it must be a unicast MAC address. The largest supported MTU advertised to the guest. .El .Ss VirtIO SCSI Settings -.Bl -column "Name" "integer" "Default" +.Bl -column "target" "integer" "/dev/cam/ctl" .It Sy Name Ta Sy Format Ta Sy Default Ta Sy Description -.It Va dev Ta path Ta Ta -The path of a CAM target layer (CTL) device to export: -.Pa /dev/cam/ctl Ns Oo Ar pp . Ns Ar vp Oc . .It Va iid Ta integer Ta 0 Ta Initiator ID to use when sending requests to the CTL port. +.It Va target Ta Oo Va ID : Oc Ns path Ta Sy /dev/cam/ctl Ta +The path of a CAM target layer (CTL) device to use: +.Pa /dev/cam/ctl Ns Oo Ar pp . Ns Ar vp Oc +Optionally, a numeric target +.Ar ID +in the range from 0 to 255 may be specified before the +.Ar path , +separated by a colon. .El +.Pp +The +.Va target +variable may be specified multiple times with different +.Ar path +arguments to configure multiple distinct SCSI targets. +If not explicitly configured, the target +.Ar ID Ns s +will be assigned sequentially beginning with the highest target +.Ar ID +configured so far, or 0 for the first target configured. +The target +.Ar ID Ns s +must be unique within each virtio-scsi instance. .Sh SEE ALSO .Xr expand_number 3 , .Xr getaddrinfo 3 , diff --git a/usr.sbin/bhyve/pci_virtio_scsi.c b/usr.sbin/bhyve/pci_virtio_scsi.c index 5fb867e5eae7..d7fd30f55209 100644 --- a/usr.sbin/bhyve/pci_virtio_scsi.c +++ b/usr.sbin/bhyve/pci_virtio_scsi.c @@ -78,7 +78,7 @@ (sizeof(struct pci_vtscsi_req_cmd_wr) + _sc->vss_config.sense_size) #define VIRTIO_SCSI_MAX_CHANNEL 0 -#define VIRTIO_SCSI_MAX_TARGET 0 +#define VIRTIO_SCSI_MAX_TARGET 255 #define VIRTIO_SCSI_MAX_LUN 16383 #define VIRTIO_SCSI_F_INOUT (1 << 0) @@ -170,6 +170,12 @@ struct pci_vtscsi_request { STAILQ_ENTRY(pci_vtscsi_request) vsr_link; }; +struct pci_vtscsi_target { + uint8_t vst_target; + int vst_fd; + int vst_max_sectors; +}; + /* * Per-device softc */ @@ -181,7 +187,9 @@ struct pci_vtscsi_softc { int vss_iid; int vss_ctl_fd; uint32_t vss_features; + size_t vss_num_target; struct pci_vtscsi_config vss_config; + struct pci_vtscsi_target *vss_targets; }; #define VIRTIO_SCSI_T_TMF 0 @@ -272,8 +280,12 @@ static void pci_vtscsi_neg_features(void *, uint64_t); static int pci_vtscsi_cfgread(void *, int, int, uint32_t *); static int pci_vtscsi_cfgwrite(void *, int, int, uint32_t); -static inline bool pci_vtscsi_check_lun(const uint8_t *); -static inline int pci_vtscsi_get_lun(const uint8_t *); +static inline bool pci_vtscsi_check_lun(struct pci_vtscsi_softc *, + const uint8_t *); +static inline uint8_t pci_vtscsi_get_target(struct pci_vtscsi_softc *, + const uint8_t *); +static inline uint16_t pci_vtscsi_get_lun(struct pci_vtscsi_softc *, + const uint8_t *); static void pci_vtscsi_control_handle(struct pci_vtscsi_softc *, void *, size_t); static void pci_vtscsi_tmf_handle(struct pci_vtscsi_softc *, @@ -292,13 +304,15 @@ static void pci_vtscsi_queue_request(struct pci_vtscsi_softc *, struct vqueue_info *); static void pci_vtscsi_return_request(struct pci_vtscsi_queue *, struct pci_vtscsi_request *, int); -static int pci_vtscsi_request_handle(struct pci_vtscsi_softc *, +static int pci_vtscsi_request_handle(struct pci_vtscsi_softc *, int, struct pci_vtscsi_request *); static void pci_vtscsi_controlq_notify(void *, struct vqueue_info *); static void pci_vtscsi_eventq_notify(void *, struct vqueue_info *); static void pci_vtscsi_requestq_notify(void *, struct vqueue_info *); -static int pci_vtscsi_init_queue(struct pci_vtscsi_softc *, + +static int pci_vtscsi_add_target_config(nvlist_t *, const char *, int); +static int pci_vtscsi_init_queue(struct pci_vtscsi_softc *, struct pci_vtscsi_queue *, int); static void pci_vtscsi_destroy_queue(struct pci_vtscsi_queue *); static int pci_vtscsi_init(struct pci_devinst *, nvlist_t *); @@ -320,10 +334,12 @@ pci_vtscsi_proc(void *arg) struct pci_vtscsi_worker *worker = (struct pci_vtscsi_worker *)arg; struct pci_vtscsi_queue *q = worker->vsw_queue; struct pci_vtscsi_softc *sc = q->vsq_sc; - int iolen; for (;;) { struct pci_vtscsi_request *req; + uint8_t target; + int iolen; + int fd; pthread_mutex_lock(&q->vsq_rmtx); @@ -338,11 +354,15 @@ pci_vtscsi_proc(void *arg) req = pci_vtscsi_get_request(&q->vsq_requests); pthread_mutex_unlock(&q->vsq_rmtx); - DPRINTF("I/O request lun %d, data_niov_in %zu, data_niov_out " - "%zu", pci_vtscsi_get_lun(req->vsr_cmd_rd->lun), + target = pci_vtscsi_get_target(sc, req->vsr_cmd_rd->lun); + fd = sc->vss_targets[target].vst_fd; + + DPRINTF("I/O request tgt %u, lun %d, data_niov_in %zu, " + "data_niov_out %zu", target, + pci_vtscsi_get_lun(sc, req->vsr_cmd_rd->lun), req->vsr_data_niov_in, req->vsr_data_niov_out); - iolen = pci_vtscsi_request_handle(sc, req); + iolen = pci_vtscsi_request_handle(sc, fd, req); pci_vtscsi_return_request(q, req, iolen); } @@ -370,7 +390,7 @@ pci_vtscsi_reset(void *vsc) .sense_size = 96, .cdb_size = 32, .max_channel = VIRTIO_SCSI_MAX_CHANNEL, - .max_target = VIRTIO_SCSI_MAX_TARGET, + .max_target = MAX(1, sc->vss_num_target) - 1, .max_lun = VIRTIO_SCSI_MAX_LUN }; } @@ -418,7 +438,6 @@ pci_vtscsi_cfgwrite(void *vsc __unused, int offset __unused, int size __unused, * or: Flat Space Addressing: LUN (0-16383) * Level 3 and 4: not used, MBZ * - * Currently, we only support Target 0. * * Alternatively, the first level may contain an extended LUN address to select * the REPORT_LUNS well-known logical unit: @@ -439,7 +458,7 @@ pci_vtscsi_cfgwrite(void *vsc __unused, int offset __unused, int size __unused, * well-known logical unit. */ static inline bool -pci_vtscsi_check_lun(const uint8_t *lun) +pci_vtscsi_check_lun(struct pci_vtscsi_softc *sc, const uint8_t *lun) { if (lun[0] == 0xC1) return (false); @@ -447,7 +466,13 @@ pci_vtscsi_check_lun(const uint8_t *lun) if (lun[0] != 0x01) return (false); - if (lun[1] != 0x00) + if (lun[1] >= sc->vss_num_target) + return (false); + + if (lun[1] != sc->vss_targets[lun[1]].vst_target) + return (false); + + if (sc->vss_targets[lun[1]].vst_fd < 0) return (false); if (lun[2] != 0x00 && (lun[2] & 0xc0) != 0x40) @@ -459,17 +484,37 @@ pci_vtscsi_check_lun(const uint8_t *lun) return (true); } +/* + * Get the target id from a LUN address. + * + * Every code path using this function must have called pci_vtscsi_check_lun() + * before to make sure the LUN address is valid. + */ +static inline uint8_t +pci_vtscsi_get_target(struct pci_vtscsi_softc *sc, const uint8_t *lun) +{ + assert(lun[0] == 0x01); + assert(lun[1] < sc->vss_num_target); + assert(lun[1] == sc->vss_targets[lun[1]].vst_target); + assert(sc->vss_targets[lun[1]].vst_fd >= 0); + assert(lun[2] == 0x00 || (lun[2] & 0xc0) == 0x40); + + return (lun[1]); +} + /* * Get the LUN id from a LUN address. * * Every code path using this function must have called pci_vtscsi_check_lun() * before to make sure the LUN address is valid. */ -static inline int -pci_vtscsi_get_lun(const uint8_t *lun) +static inline uint16_t +pci_vtscsi_get_lun(struct pci_vtscsi_softc *sc, const uint8_t *lun) { assert(lun[0] == 0x01); - assert(lun[1] == 0x00); + assert(lun[1] < sc->vss_num_target); + assert(lun[1] == sc->vss_targets[lun[1]].vst_target); + assert(sc->vss_targets[lun[1]].vst_fd >= 0); assert(lun[2] == 0x00 || (lun[2] & 0xc0) == 0x40); return (((lun[2] << 8) | lun[3]) & 0x3fff); @@ -512,9 +557,11 @@ pci_vtscsi_tmf_handle(struct pci_vtscsi_softc *sc, struct pci_vtscsi_ctrl_tmf *tmf) { union ctl_io *io; + uint8_t target; int err; + int fd; - if (pci_vtscsi_check_lun(tmf->lun) == false) { + if (pci_vtscsi_check_lun(sc, tmf->lun) == false) { DPRINTF("TMF request to invalid LUN %.2hhx%.2hhx-%.2hhx%.2hhx-" "%.2hhx%.2hhx-%.2hhx%.2hhx", tmf->lun[0], tmf->lun[1], tmf->lun[2], tmf->lun[3], tmf->lun[4], tmf->lun[5], @@ -524,6 +571,10 @@ pci_vtscsi_tmf_handle(struct pci_vtscsi_softc *sc, return; } + target = pci_vtscsi_get_target(sc, tmf->lun); + + fd = sc->vss_targets[target].vst_fd; + io = ctl_scsi_alloc_io(sc->vss_iid); if (io == NULL) { WPRINTF("failed to allocate ctl_io: err=%d (%s)", @@ -537,7 +588,7 @@ pci_vtscsi_tmf_handle(struct pci_vtscsi_softc *sc, io->io_hdr.io_type = CTL_IO_TASK; io->io_hdr.nexus.initid = sc->vss_iid; - io->io_hdr.nexus.targ_lun = pci_vtscsi_get_lun(tmf->lun); + io->io_hdr.nexus.targ_lun = pci_vtscsi_get_lun(sc, tmf->lun); io->taskio.tag_type = CTL_TAG_SIMPLE; io->taskio.tag_num = tmf->id; io->io_hdr.flags |= CTL_FLAG_USER_TAG; @@ -584,7 +635,7 @@ pci_vtscsi_tmf_handle(struct pci_vtscsi_softc *sc, sbuf_delete(sb); } - err = ioctl(sc->vss_ctl_fd, CTL_IO, io); + err = ioctl(fd, CTL_IO, io); if (err != 0) WPRINTF("CTL_IO: err=%d (%s)", errno, strerror(errno)); @@ -753,7 +804,7 @@ pci_vtscsi_queue_request(struct pci_vtscsi_softc *sc, struct vqueue_info *vq) assert(res == VTSCSI_IN_HEADER_LEN(q->vsq_sc)); /* Make sure this request addresses a valid LUN. */ - if (pci_vtscsi_check_lun(req->vsr_cmd_rd->lun) == false) { + if (pci_vtscsi_check_lun(sc, req->vsr_cmd_rd->lun) == false) { DPRINTF("I/O request to invalid LUN " "%.2hhx%.2hhx-%.2hhx%.2hhx-%.2hhx%.2hhx-%.2hhx%.2hhx", req->vsr_cmd_rd->lun[0], req->vsr_cmd_rd->lun[1], @@ -809,7 +860,7 @@ pci_vtscsi_return_request(struct pci_vtscsi_queue *q, } static int -pci_vtscsi_request_handle(struct pci_vtscsi_softc *sc, +pci_vtscsi_request_handle(struct pci_vtscsi_softc *sc, int fd, struct pci_vtscsi_request *req) { union ctl_io *io = req->vsr_ctl_io; @@ -818,7 +869,8 @@ pci_vtscsi_request_handle(struct pci_vtscsi_softc *sc, int err, nxferred; io->io_hdr.nexus.initid = sc->vss_iid; - io->io_hdr.nexus.targ_lun = pci_vtscsi_get_lun(req->vsr_cmd_rd->lun); + io->io_hdr.nexus.targ_lun = + pci_vtscsi_get_lun(sc, req->vsr_cmd_rd->lun); io->io_hdr.io_type = CTL_IO_SCSI; @@ -869,7 +921,7 @@ pci_vtscsi_request_handle(struct pci_vtscsi_softc *sc, sbuf_delete(sb); } - err = ioctl(sc->vss_ctl_fd, CTL_IO, io); + err = ioctl(fd, CTL_IO, io); if (err != 0) { WPRINTF("CTL_IO: err=%d (%s)", errno, strerror(errno)); req->vsr_cmd_wr->response = VIRTIO_SCSI_S_FAILURE; @@ -1006,32 +1058,222 @@ pci_vtscsi_destroy_queue(struct pci_vtscsi_queue *queue) pthread_mutex_destroy(&queue->vsq_rmtx); } +/* + * Create a target config node, return target id. If the target number isn't + * given as part of the path argument, use last_id + 1. + */ +static int +pci_vtscsi_add_target_config(nvlist_t *nvl, const char *path, int last_id) +{ + uint64_t target; + char *id; + char tmp[4]; + + if (path == NULL) { + EPRINTLN("target path must be specified"); + return (-1); + } + + if (path[0] != '/' && (id = strchr(path, ':')) != NULL) { + const char *errstr; + int len = id - path; + + id = strndup(path, len); + if (id == NULL) { + EPRINTLN("failed to get id string: %s", + strerror(errno)); + return (-1); + } + + target = strtonumx(id, 0, VIRTIO_SCSI_MAX_TARGET, &errstr, 0); + if (errstr != NULL) { + EPRINTLN("invalid target %s: target ID is %s", id, + errstr); + free(id); + return (-1); + } + + free(id); + path += len + 1; + } else { + target = last_id + 1; + + if (target > VIRTIO_SCSI_MAX_TARGET) { + EPRINTLN("max target (%d) reached, can't add another", + VIRTIO_SCSI_MAX_TARGET); + return (-1); + } + } + + snprintf(tmp, sizeof(tmp), "%lu", target); + + if (get_config_value_node(nvl, tmp) != NULL) { + EPRINTLN("cannot add '%s' as target %s: already exits as '%s'", + path, tmp, get_config_value_node(nvl, tmp)); + return (-1); + } + + set_config_value_node(nvl, tmp, path); + + return (target); +} + +/* + * The following forms are accepted for legacy config options to configure a + * single target: + * + * (0) -s B:D:F,virtio-scsi + * (1) -s B:D:F,virtio-scsi, + * (2) -s B:D:F,virtio-scsi,,,... + * (3) -s B:D:F,virtio-scsi,,... + * (4) -s B:D:F,virtio-scsi, + * + * To configure multiple targets, the following form is accepted: + * (5) -s B:D:F,virtio-scsi,[target=[id:],...] + */ static int pci_vtscsi_legacy_config(nvlist_t *nvl, const char *opts) { - char *cp, *devname; + int last_id = -1; + char *config, *tofree, *name, *value; + nvlist_t *targets; + size_t n; - if (opts == NULL) + /* Make sure no one accidentally sets "dev" anymore. */ + (void) create_relative_config_node(nvl, "dev"); + + targets = create_relative_config_node(nvl, "target"); + + /* Handle legacy form (0). */ + if (opts == NULL) { + pci_vtscsi_add_target_config(targets, "/dev/cam/ctl", 0); return (0); + } + + n = strcspn(opts, ",="); + + /* Handle legacy form (1) and (2). */ + if (opts[n] == ',' || opts[n] == '\0') { + char *tmp = strndup(opts, n); + + last_id = pci_vtscsi_add_target_config(targets, tmp, last_id); + free(tmp); + + if (last_id < 0) + return (-1); - cp = strchr(opts, ','); - if (cp == NULL) { - set_config_value_node(nvl, "dev", opts); + opts += n; + if (opts[0] == ',' && opts[1] != '\0') + opts++; + } + + /* If this was form (1), we're done. */ + if (opts[0] == '\0') return (0); + + /* + * For form (2), (3), (4), and (5), parse the remaining options. + * + * Contrary to other options, multiple target= options create a new + * target for each such option. + * + * For compatibility reasons we also accept dev= options for + * targets. + */ + config = tofree = strdup(opts); + while ((name = strsep(&config, ",")) != NULL) { + value = strchr(name, '='); + if (value != NULL) + *value++ = '\0'; + + if (strcmp(name, "dev") == 0 || strcmp(name, "target") == 0) { + int new_id = pci_vtscsi_add_target_config(targets, + value, last_id); + + if (new_id < 0) { + free(tofree); + return (-1); + } + + if (new_id > last_id) + last_id = new_id; + + } else if (value != NULL) { + set_config_value_node(nvl, name, value); + } else { + set_config_bool_node(nvl, name, true); + } } - devname = strndup(opts, cp - opts); - set_config_value_node(nvl, "dev", devname); - free(devname); - return (pci_parse_legacy_config(nvl, cp + 1)); + + free(tofree); + return (0); +} + +static int +pci_vtscsi_count_targets(const char *prefix __unused, + const nvlist_t *parent __unused, const char *name, int type, void *arg) +{ + struct pci_vtscsi_softc *sc = arg; + const char *errstr; + uint64_t target; + + if (type != NV_TYPE_STRING) { + EPRINTLN("invalid target \"%s\" type: not a string", name); + errno = EINVAL; + return (-1); + } + + target = strtonumx(name, 0, VIRTIO_SCSI_MAX_TARGET, &errstr, 0); + if (errstr != NULL) { + EPRINTLN("invalid target %s: target ID is %s", name, errstr); + return (-1); + } + + if (target >= sc->vss_num_target) + sc->vss_num_target = target + 1; + + return (0); +} + +static int +pci_vtscsi_init_target(const char *prefix __unused, const nvlist_t *parent, + const char *name, int type, void *arg) +{ + struct pci_vtscsi_softc *sc = arg; + const char *value; + const char *errstr; + uint64_t target; + + assert(type == NV_TYPE_STRING); + + /* + * Get the numeric value of the target id from 'name'. + */ + target = strtonumx(name, 0, sc->vss_num_target - 1, &errstr, 0); + assert(errstr == NULL); + sc->vss_targets[target].vst_target = target; + + /* + * 'value' contains the CTL device node path of this target. + */ + value = nvlist_get_string(parent, name); + sc->vss_targets[target].vst_fd = open(value, O_RDWR); + if (sc->vss_targets[target].vst_fd < 0) { + EPRINTLN("cannot open target %lu at %s: %s", target, value, + strerror(errno)); + return (-1); + } + + return (0); } static int pci_vtscsi_init(struct pci_devinst *pi, nvlist_t *nvl) { struct pci_vtscsi_softc *sc; - const char *devname, *value; + const char *value; + size_t i; int err; - int i; sc = calloc(1, sizeof(struct pci_vtscsi_softc)); if (sc == NULL) @@ -1045,19 +1287,42 @@ pci_vtscsi_init(struct pci_devinst *pi, nvlist_t *nvl) if (value != NULL) { if (pci_emul_add_boot_device(pi, atoi(value))) { EPRINTLN("Invalid bootindex %d", atoi(value)); + errno = EINVAL; goto fail; } } - devname = get_config_value_node(nvl, "dev"); - if (devname == NULL) - devname = "/dev/cam/ctl"; - sc->vss_ctl_fd = open(devname, O_RDWR); - if (sc->vss_ctl_fd < 0) { - WPRINTF("cannot open %s: %s", devname, strerror(errno)); - goto fail; + nvl = find_relative_config_node(nvl, "target"); + if (nvl != NULL) { + err = walk_config_nodes("", nvl, sc, pci_vtscsi_count_targets); + if (err != 0) + goto fail; + } + + if (sc->vss_num_target > 0) { + sc->vss_targets = malloc(sc->vss_num_target * + sizeof(struct pci_vtscsi_target)); + if (sc->vss_targets == NULL) { + EPRINTLN("can't allocate space for %lu targets", + sc->vss_num_target); + goto fail; + } + + memset(sc->vss_targets, -1, sc->vss_num_target * + sizeof(struct pci_vtscsi_target)); + + err = walk_config_nodes("", nvl, sc, pci_vtscsi_init_target); + if (err != 0) + goto fail; } + /* + * All targets should be open now and have a valid fd. + */ + for (i = 0; i < sc->vss_num_target; i++) + if (sc->vss_targets[i].vst_target == i) + assert(sc->vss_targets[i].vst_fd > 0); + pthread_mutex_init(&sc->vss_mtx, NULL); vi_softc_linkup(&sc->vss_vs, &vtscsi_vi_consts, sc, pi, sc->vss_vq); @@ -1101,7 +1366,8 @@ pci_vtscsi_init(struct pci_devinst *pi, nvlist_t *nvl) pci_set_cfgdata16(pi, PCIR_SUBDEV_0, VIRTIO_ID_SCSI); pci_set_cfgdata16(pi, PCIR_SUBVEND_0, VIRTIO_VENDOR); - if (vi_intr_init(&sc->vss_vs, 1, fbsdrun_virtio_msix())) + err = vi_intr_init(&sc->vss_vs, 1, fbsdrun_virtio_msix()); + if (err != 0) goto fail; vi_set_io_bar(&sc->vss_vs, 0); @@ -1112,9 +1378,16 @@ fail: for (i = 2; i < VTSCSI_MAXQ; i++) pci_vtscsi_destroy_queue(&sc->vss_queues[i - 2]); - if (sc->vss_ctl_fd > 0) - close(sc->vss_ctl_fd); + pthread_mutex_destroy(&sc->vss_mtx); + + for (i = 0; i < sc->vss_num_target; i++) { + if (sc->vss_targets[i].vst_target == i && + sc->vss_targets[i].vst_fd >= 0) { + close(sc->vss_targets[i].vst_fd); + } + } + free(sc->vss_targets); free(sc); return (-1); } From nobody Tue May 26 16:48:43 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPzGg6BFHz6g6mS for ; Tue, 26 May 2026 16:48: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPzGg4NdBz4J8K for ; Tue, 26 May 2026 16:48:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779814123; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3JS3JO5w9d43fEfA/CEvgNJBOKhKsxd5et+AaAYdkpg=; b=ccmWTm4djhB3D2cVujyxivEcroB1qp6/U/ZhNmX4Bx64ucIpBUABt9YABy3IiNeZbHOXfW T7iDzyAFsZjrlHXjrj12GyeHPeVpgjaBD3X/sS+jpvIfLwrWJJHM0dkyrmShyvuKaVlwnS jEUdOwl/5hMCJyX3EEraAEl0y7W70w0wkOQ03PXP/wh0/8PqHYbGYWMlK5kz/FyaWcfMvh DfaKIL9hXjvURuAXxxUJHNqM32K8ApEf+EHgubx/IWKnzAqay5+XCNd088LoAKouVGnBSb BWHeXRBlLvJFOHWra6yXMUdrjbBBwce17SMNgVILMbdkyrMs701CfN3lA9uNyg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779814123; a=rsa-sha256; cv=none; b=rD7z4Il21yn0y0zcQwCbEYmnuL06fNH343e7h5xluS3h26aS46KI9iqTaTEoYaX1F0QfUb JTjh/Jyh0nIx0CDz8upyAdfxsHKx0v5g6x4O/cQmIvYyEH7+EM6qfavbFDfxrGYCTpfVxP PjdX3naPtygdkK/EVs8LGCvZAbU4Al9YIpyP4yCt5okZYWCjI7xq9Wv/+9XUtD6Du0fQea jHSQntBmz/yyAvBzfQdwJnYOBvMOIF9RFKyHjGqxDWdvrTcRyJRotL5QwzjeJOpwN8t1re ZVQt3IiSvbl5IWfKXqUCz3sPHnAUkz45/C7eT/89Ast7sLZZJdPlLLS1Y488zA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779814123; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3JS3JO5w9d43fEfA/CEvgNJBOKhKsxd5et+AaAYdkpg=; b=NzuuZHKQNzikRASWUJ1qJxb5+KdnNMabiEHYm1E2Z/1jfR1jvA/nB6KhRqNQJxVgpIRqkZ 3gdO5sBWurx6LW4zTSAsig6GuItrMY9A+j5E/6q/fkHVR9ZE4A+WjiI37ayNGhkLIclC6e J213j7PGhY/CFJ81FnxRFGIN5FiXvQdlVEcYFLwVe8V1cauoahHxsc4wts1ZMbBMccKRAC wzIlHPVY6mmvLtdh/hjVzo75wsY+l0MdOL2T+ERCg4QZzQ1Gfbz3RwC3tps9GdxiSWj9k0 9HApv1lOOdR2fIlYu4DlDIqsNC8sXVu+X3rfxz8t2YFjkawRS8T9/Bk7kfmalg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPzGg3ppmz5S0 for ; Tue, 26 May 2026 16:48:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 37430 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 26 May 2026 16:48:43 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 4aa372b1fe26 - stable/15 - ldns: Update to 1.8.4 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 4aa372b1fe2638d90dadf09965ac983a2d0d5bae Auto-Submitted: auto-generated Date: Tue, 26 May 2026 16:48:43 +0000 Message-Id: <6a15ceeb.37430.58e8e2ea@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=4aa372b1fe2638d90dadf09965ac983a2d0d5bae commit 4aa372b1fe2638d90dadf09965ac983a2d0d5bae Author: Dag-Erling Smørgrav AuthorDate: 2026-05-22 17:54:09 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-26 16:48:27 +0000 ldns: Update to 1.8.4 Merge commit '3dcfa5af412125cd1bad1d383ff7c18c5effbd77' MFC after: 1 week Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D57169 (cherry picked from commit d44c9549ef31884ac069b0306bad248a74bb2825) --- contrib/ldns/Changelog | 41 ++ contrib/ldns/Makefile.in | 48 +- contrib/ldns/README | 23 - contrib/ldns/README-Travis.md | 274 ----------- contrib/ldns/README.snapshots | 2 +- contrib/ldns/acx_nlnetlabs.m4 | 223 ++++++--- contrib/ldns/ax_python_devel.m4 | 147 ++++-- contrib/ldns/compat/asctime_r.c | 16 + contrib/ldns/config.guess | 70 ++- contrib/ldns/config.sub | 239 ++++++---- contrib/ldns/configure | 876 ++++++++++++++++++++++++++--------- contrib/ldns/configure.ac | 150 +++--- contrib/ldns/dane.c | 4 +- contrib/ldns/dnssec.c | 8 +- contrib/ldns/dnssec_sign.c | 9 +- contrib/ldns/dnssec_zone.c | 3 + contrib/ldns/drill/drill.1.in | 2 +- contrib/ldns/drill/drill.c | 2 +- contrib/ldns/drill/root.c | 22 +- contrib/ldns/edns.c | 41 +- contrib/ldns/error.c | 5 + contrib/ldns/host2str.c | 20 +- contrib/ldns/keys.c | 16 +- contrib/ldns/ldns/config.h | 36 +- contrib/ldns/ldns/config.h.in | 28 +- contrib/ldns/ldns/edns.h | 15 + contrib/ldns/ldns/error.h | 4 +- contrib/ldns/ldns/net.h | 3 +- contrib/ldns/ldns/net.h.in | 3 +- contrib/ldns/ldns/parse.h | 26 +- contrib/ldns/ldns/radix.h | 2 +- contrib/ldns/ldns/rdata.h | 2 +- contrib/ldns/ldns/rr.h | 18 +- contrib/ldns/ldns/util.h | 4 +- contrib/ldns/libdns.doxygen.in | 20 +- contrib/ldns/ltmain.sh | 851 +++++++++++++++++++++------------- contrib/ldns/m4/libtool.m4 | 229 +++++---- contrib/ldns/m4/ltoptions.m4 | 4 +- contrib/ldns/m4/ltsugar.m4 | 2 +- contrib/ldns/m4/ltversion.m4 | 13 +- contrib/ldns/m4/lt~obsolete.m4 | 4 +- contrib/ldns/makewin.sh | 65 ++- contrib/ldns/net.c | 4 +- contrib/ldns/packaging/ldns-config.1 | 2 +- contrib/ldns/packet.c | 4 +- contrib/ldns/rr.c | 14 +- contrib/ldns/util.c | 2 + 47 files changed, 2295 insertions(+), 1301 deletions(-) diff --git a/contrib/ldns/Changelog b/contrib/ldns/Changelog index aba41c88c5c8..c7f36767b360 100644 --- a/contrib/ldns/Changelog +++ b/contrib/ldns/Changelog @@ -1,3 +1,44 @@ +1.8.4 2024-07-19 + * Fix building documentation in build directory. + Thanks Michael Tokarev + * Updated the configure script for split openssl directories. + * Fix for windows compile; asctime_r compat, search for inet_ntop + in ws2_32, avoid double decl of inet_ntop, check for symlink call, + include config.h in edns.c, have socket compare use correct + signedness, add -u repo option to makewin.sh, fix quoting in + makewin.sh and check return value of bind and connect in net.c + for failure instead of a socket type. And fix to install .exe files. + * Fix to compile with OpenSSL 3.2. Update acx_nlnetlabs.m4 to 48. + * Fix to compile DLLs, and pick out of the lib64 dir, and include + libssp-0.dll and ldns-config. + * bugfix #237: Resolver uses nameserver commented out in + /etc/resolv.conf. Thanks grembo. + * Added RESINFO rrtype. + * Added WALLET rrtype. + * PR #241: Fix coverity cited problems. Thanks Enji Cooper. + * PR #233: Several Python SWIG issues. Thanks Florian Weimer. + * PR #231: const ldns_rdf * typemap fixes to support swig-4.2.0 + Thanks William S Fulton + * PR #227: keys.c: fix build with libressl >= 3.8.1 + Thanks Fabrice Fontaine + * PR #224: Portable executable progs don't underlink to libldns + Thanks Ørjan Malde + * PR #216: Update declaration for function with no argument + Thanks Ed Maste + * PR #214: fix the build in FreeBSD's base system + Thanks Pierre Pronchery and Dag-Erling Smørgrav + * PR #206: improve 'next-label' algorithm in ldns-walk + Thanks Jelte Jansen + * PR #205: Add functions to extract RFC 8914 extended errors + Thanks Roland van Rijswijk-Deij + * PR #203: Expand CI: Cygwin, BSDs, musl libc, 32-bit, and big-endian + Thanks Felipe Gasper + * PR #191: 16-unit-tests-edns: Fix leak & warnings + Thanks Felipe Gasper + * Added NXNAME rrtype. + * PR #242: Openssl no engine improved support #242 + Thanks Petr Menšík + 1.8.3 2022-08-15 * bugfix #183: Assertion failure with OPT record without rdata. This caused packet creation with only a DO bit (for DNSSEC OK) diff --git a/contrib/ldns/Makefile.in b/contrib/ldns/Makefile.in index 57957d0844d3..32b91576d0d9 100644 --- a/contrib/ldns/Makefile.in +++ b/contrib/ldns/Makefile.in @@ -20,13 +20,14 @@ p5_dns_ldns_dir = $(srcdir)/contrib/DNS-LDNS PERL = @PERL@ swig = @swig@ swigpy_flags = -python @SWIGPY3@ -python_site = @PYTHON_SITE_PKG@ +python_site = @PYTHON_PLATFORM_SITE_PKG@ pyldns_inst = @PYLDNSINST@ pyldns_uninst = @PYLDNSUNINST@ pyldnsx_inst = @PYLDNSXINST@ pyldnsx_uninst = @PYLDNSXUNINST@ libtool = @libtool@ CONFIG_FILES = @CONFIG_FILES@ +top_builddir = @top_builddir@ LDNS_TRUST_ANCHOR_FILE = @LDNS_TRUST_ANCHOR_FILE@ DEFAULT_CAFILE = @DEFAULT_CAFILE@ @@ -85,6 +86,7 @@ LINTFLAGS += -D"__BEGIN_DECLS=" -D"__ssize_t=ssize_t" -D"__intptr_t=intptr # FreeBSD 9 LINTFLAGS += -D"_RuneLocale=int" DEPFLAG = @DEPFLAG@ +EXEEXT=@EXEEXT@ INSTALL = $(srcdir)/install-sh @@ -150,7 +152,8 @@ setup-builddir: # builddir/ is used by 60-compile-builddir putdown-builddir: - rm -f include/ldns lib config.h + rm -rf include/ldns + rm -f lib config.h test ! -d include || rmdir include || : if test -d examples -a ! -f examples/README; then rmdir examples || : ; fi if test -d drill -a ! -f drill/README ; then rmdir drill || : ; fi @@ -168,7 +171,7 @@ no-drill-config-h: fi drill/drill: $(DRILL_LOBJS) $(LIB) $(LIBLOBJS) - $(LINK_EXE) $(DRILL_LOBJS) $(LIBLOBJS) $(LIB) $(LIBSSL_LIBS) $(LIBS) -o drill/drill + $(LINK_EXE) $(DRILL_LOBJS) $(LIBLOBJS) $(LIB) $(LIBSSL_LIBS) $(LIBS) -o drill/drill $(top_builddir)/libldns.la drill/drill.1: $(srcdir)/drill/drill.1.in $(edit) $(srcdir)/drill/drill.1.in > drill/drill.1 @@ -177,16 +180,16 @@ install-drill: drill/drill drill/drill.1 $(INSTALL) -m 755 -d $(DESTDIR)$(bindir) $(INSTALL) -m 755 -d $(DESTDIR)$(mandir) $(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man1 - $(LIBTOOL) --mode=install cp drill/drill $(DESTDIR)$(bindir) + $(LIBTOOL) --mode=install cp drill/drill$(EXEEXT) $(DESTDIR)$(bindir) $(INSTALL) -m 644 drill/drill.1 $(DESTDIR)$(mandir)/man1/drill.1 uninstall-drill: - rm -f $(DESTDIR)$(bindir)/drill $(DESTDIR)$(mandir)/man1/drill.1 + rm -f $(DESTDIR)$(bindir)/drill$(EXEEXT) $(DESTDIR)$(mandir)/man1/drill.1 test ! -d $(DESTDIR)$(mandir) || rmdir -p $(DESTDIR)$(mandir)/man1 || :; test ! -d $(DESTDIR)$(bindir) || rmdir -p $(DESTDIR)$(bindir) || : ; clean-drill: - $(LIBTOOL) --mode clean rm -f $(DRILL_LOBJS) drill/drill drill/drill.1 + $(LIBTOOL) --mode clean rm -f $(DRILL_LOBJS) drill/drill$(EXEEXT) drill/drill.1 examples: setup-builddir no-examples-config-h $(LIB) $(EXAMPLE_PROGS) $(TESTNS) $(LDNS_DPA) $(LDNS_DANE) $(EX_SSL_PROGS) examples/ldns-dane.1 examples/ldns-verify-zone.1 no-examples-config-h: @@ -200,23 +203,23 @@ no-examples-config-h: # Need LIBSSL_LIBS $(EXAMPLE_PROGS): - $(LINK_EXE) $@.lo $(LIBLOBJS) $(LIB) $(LIBSSL_LIBS) $(LIBS) -o $@ + $(LINK_EXE) $@.lo $(LIBLOBJS) $(LIB) $(LIBSSL_LIBS) $(LIBS) -o $@ $(top_builddir)/libldns.la # Need LIBSSL_LIBS $(TESTNS): - $(LINK_EXE) $(TESTNS_LOBJS) $(LIBLOBJS) $(LIB) $(LIBSSL_LIBS) $(LIBS) -o $(TESTNS) + $(LINK_EXE) $(TESTNS_LOBJS) $(LIBLOBJS) $(LIB) $(LIBSSL_LIBS) $(LIBS) -o $(TESTNS) $(top_builddir)/libldns.la # Need LIBSSL_LIBS $(LDNS_DPA): $(LINK_EXE) $(LDNS_DPA_LOBJS) $(LIBLOBJS) $(LIB) $(LIBPCAP_LIBS) $(LIBSSL_LIBS) $(LIBS) \ - -o $(LDNS_DPA) + -o $(LDNS_DPA) $(top_builddir)/libldns.la $(LDNS_DANE): $(LINK_EXE) $(LDNS_DANE_LOBJS) $(LIBLOBJS) $(LIB) $(LIBSSL_SSL_LIBS) $(LIBS) \ - -o $(LDNS_DANE) + -o $(LDNS_DANE) $(top_builddir)/libldns.la $(EX_SSL_PROGS): - $(LINK_EXE) $@.lo $(LIBLOBJS) $(LIB) $(LIBSSL_LIBS) $(LIBS) -o $@ + $(LINK_EXE) $@.lo $(LIBLOBJS) $(LIB) $(LIBSSL_LIBS) $(LIBS) -o $@ $(top_builddir)/libldns.la examples/ldns-dane.1: $(srcdir)/examples/ldns-dane.1.in $(edit) $(srcdir)/examples/ldns-dane.1.in > examples/ldns-dane.1 @@ -229,7 +232,7 @@ install-examples: $(EXAMPLE_PROGS) $(TESTNS) $(LDNS_DPA) $(LDNS_DANE) $(EX_SSL_P $(INSTALL) -m 755 -d $(DESTDIR)$(mandir) $(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man1 for p in $(EXAMPLE_PROGS) $(TESTNS) $(LDNS_DPA) $(LDNS_DANE) $(EX_SSL_PROGS) ; do \ - $(LIBTOOL) --mode=install cp $$p $(DESTDIR)$(bindir) ; \ + $(LIBTOOL) --mode=install cp $$p$(EXEEXT) $(DESTDIR)$(bindir) ; \ if test -f $$p.1 ; \ then $(INSTALL) -m 644 $$p.1 $(DESTDIR)$(mandir)/man1 ; \ else $(INSTALL) -m 644 $(srcdir)/$$p.1 $(DESTDIR)$(mandir)/man1 ; \ @@ -238,20 +241,22 @@ install-examples: $(EXAMPLE_PROGS) $(TESTNS) $(LDNS_DPA) $(LDNS_DANE) $(EX_SSL_P uninstall-examples: for p in $(EX_PROGS_BASENM) ; do \ - rm -f $(DESTDIR)$(bindir)/$$p $(DESTDIR)$(mandir)/man1/$$p.1 ;\ + rm -f $(DESTDIR)$(bindir)/$$p$(EXEEXT) $(DESTDIR)$(mandir)/man1/$$p.1 ;\ done test ! -d $(DESTDIR)$(mandir) || rmdir -p $(DESTDIR)$(mandir)/man1 || :; test ! -d $(DESTDIR)$(bindir) || rmdir -p $(DESTDIR)$(bindir) || : ; clean-examples: - $(LIBTOOL) --mode clean rm -f $(EXAMPLE_PROGS) + for p in $(EX_PROGS_BASENM) ; do \ + $(LIBTOOL) --mode clean rm -f $$p$(EXEEXT) ;\ + done $(LIBTOOL) --mode clean rm -f $(TESTNS) $(LDNS_DPA) $(LDNS_DANE) $(EX_SSL_PROGS) $(LIBTOOL) --mode clean rm -f $(EXAMPLE_LOBJS) $(LIBTOOL) --mode clean rm -f examples/ldns-dane.1 examples/ldns-verify-zone.1 linktest: $(srcdir)/linktest.c libldns.la $(COMP_LIB) $(LIBSSL_CPPFLAGS) -c $(srcdir)/linktest.c -o linktest.lo - $(LINK_EXE) linktest.lo $(LIB) $(LIBSSL_LIBS) $(LIBS) -o linktest + $(LINK_EXE) linktest.lo $(LIB) $(LIBSSL_LIBS) $(LIBS) -o linktest $(top_builddir)/libldns.la lib: libldns.la @@ -270,7 +275,7 @@ doxygen: @if test ! -e doc/header.html ; then \ $(INSTALL) -c -m 644 $(srcdir)/doc/header.html doc/ ; \ fi ; - $(doxygen) $(srcdir)/libdns.doxygen + $(doxygen) libdns.doxygen doc: manpages $(doxygen) @$(INSTALL) -d doc @@ -641,10 +646,10 @@ dnssec_zone.lo dnssec_zone.o: $(srcdir)/dnssec_zone.c ldns/config.h $(srcdir)/ld $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h \ $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h duration.lo duration.o: $(srcdir)/duration.c ldns/config.h $(srcdir)/ldns/duration.h -edns.lo edns.o: $(srcdir)/edns.c $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h $(srcdir)/ldns/buffer.h \ - $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h \ - $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h \ - $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \ +edns.lo edns.o: $(srcdir)/edns.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h \ + $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h \ + $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h $(srcdir)/ldns/keys.h \ + $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \ $(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h \ $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \ $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \ @@ -807,6 +812,7 @@ zone.lo zone.o: $(srcdir)/zone.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \ $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \ $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h +compat/asctime_r.lo compat/asctime_r.o: $(srcdir)/compat/asctime_r.c ldns/config.h compat/b64_ntop.lo compat/b64_ntop.o: $(srcdir)/compat/b64_ntop.c ldns/config.h compat/b64_pton.lo compat/b64_pton.o: $(srcdir)/compat/b64_pton.c ldns/config.h compat/calloc.lo compat/calloc.o: $(srcdir)/compat/calloc.c ldns/config.h @@ -865,7 +871,7 @@ examples/ldns-dpa.lo examples/ldns-dpa.o: $(srcdir)/examples/ldns-dpa.c ldns/con $(srcdir)/ldns/rbtree.h $(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h \ $(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h \ $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h \ - $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h $(srcdir)/examples/ldns-dpa.h + $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h examples/ldns-gen-zone.lo examples/ldns-gen-zone.o: $(srcdir)/examples/ldns-gen-zone.c ldns/config.h $(srcdir)/ldns/ldns.h \ ldns/util.h ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h \ $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h \ diff --git a/contrib/ldns/README b/contrib/ldns/README index 98575917b448..e07fdc078aa2 100644 --- a/contrib/ldns/README +++ b/contrib/ldns/README @@ -106,26 +106,3 @@ Also, when building with SWIG older than 2.0.4, compiling pyldns produces many ``missing initializer'' warnings. Those are harmless too. -Your Support -NLnet Labs offers all of its software products as open source, most -published under a BSD license. You can download them, not only from the -NLnet Labs website but also through the various OS distributions for -which NSD, ldns, and Unbound are packaged. We therefore have little idea -who uses our software in production environments and have no direct ties -with 'our customers'. - -Therefore, we ask you to contact us at users@NLnetLabs.nl and tell us -whether you use one of our products in your production environment, -what that environment looks like, and maybe even share some praise. -We would like to refer to the fact that your organization is using our -products. We will only do that if you explicitly allow us. In all other -cases we will keep the information you share with us to ourselves. - -In addition to the moral support you can also support us -financially. NLnet Labs is a recognized not-for-profit charity foundation -that is chartered to develop open-source software and open-standards -for the Internet. If you use our software to satisfaction please express -that by giving us a donation. For small donations PayPal can be used. For -larger and regular donations please contact us at users@NLnetLabs.nl. Also -see http://www.nlnetlabs.nl/labs/contributors/. - diff --git a/contrib/ldns/README-Travis.md b/contrib/ldns/README-Travis.md deleted file mode 100644 index faa534353119..000000000000 --- a/contrib/ldns/README-Travis.md +++ /dev/null @@ -1,274 +0,0 @@ -# Travis Testing - -LDNS 1.7.1 and above leverage Travis CI to increase coverage of compilers and platforms. Compilers include Clang and GCC; while platforms include Android, iOS, Linux, and OS X on AMD64, Aarch64, PowerPC and s390x hardware. - -Android is tested on armv7a, aarch64, x86 and x86_64. The Android recipes build and install OpenSSL, and then builds LDNS. The testing is tailored for Android NDK-r19 and above, and includes NDK-r20 and NDK-r21. Mips and Mips64 are not tested because they are no longer supported under current NDKs. - -iOS is tested for iPhoneOS, WatchOS, AppleTVOS, iPhoneSimulator, AppleTVSimulator and WatchSimulator. The testing uses Xcode 10 on OS X 10.13. - -The LDNS Travis configuration file `.travis.yml` does not use top-level keys like `os:` and `compiler:` so there is no matrix expansion. Instead LDNS specifies the exact job to run under the `jobs:` and `include:` keys. - -## Typical recipe - -A typical recipe tests Clang and GCC on various hardware. The hardware includes AMD64, Aarch64, PowerPC and s390x. PowerPC is a little-endian platform, and s390x is a big-endian platform. There are pairs of recipes that are similar to the following. - -``` -- os: linux - name: GCC on Linux, Aarch64 - compiler: gcc - arch: arm64 - dist: bionic -- os: linux - name: Clang on Linux, Aarch64 - compiler: clang - arch: arm64 - dist: bionic -``` - -OS X provides a single recipe to test Clang. GCC is not tested because GCC is an alias for Clang. - -## Sanitizer builds - -Two sanitizer builds are tested using Clang and GCC, for a total of four builds. The first sanitizer is Undefined Behavior sanitizer (UBsan), and the second is Address sanitizer (Asan). The sanitizers are only run on AMD64 hardware. Note the environment includes `UBSAN=yes` or `ASAN=yes` for the sanitizer builds. - -The recipes are similar to the following. - -``` -- os: linux - name: UBsan, GCC on Linux, Amd64 - compiler: gcc - arch: amd64 - dist: bionic - env: UBSAN=yes -- os: linux - name: UBsan, Clang on Linux, Amd64 - compiler: clang - arch: amd64 - dist: bionic - env: UBSAN=yes -``` - -When the Travis script encounters a sanitizer it uses different `CFLAGS` and configuration string. - -``` -if [ "$UBSAN" = "yes" ]; then - export CFLAGS="-DNDEBUG -g2 -O3 -fsanitize=undefined -fno-sanitize-recover" - bash test/test_ci.sh -elif [ "$ASAN" = "yes" ]; then - export CFLAGS="-DNDEBUG -g2 -O3 -fsanitize=address" - bash test/test_ci.sh -... -``` - -## Android builds - -Travis tests Android builds for the armv7a, aarch64, x86 and x86_64 architectures. The builds are trickier than other builds for several reasons. The testing requires installation of the Android NDK and SDK, it requires a cross-compile, and requires OpenSSL prerequisites. The Android cross-compiles also require care to set the Autotools triplet, the OpenSSL triplet, the toolchain path, the tool variables, and the sysroot. The discussion below detail the steps of the Android recipes. - -### Android job - -The first step sets environmental variables for the cross-compile using the Travis job. A typical job with variables is shown below. - -``` -- os: linux - name: Android armv7a, Linux, Amd64 - compiler: clang - arch: amd64 - dist: bionic - env: - - ANDROID=yes - - AUTOTOOLS_HOST=armv7a-linux-androideabi - - OPENSSL_HOST=android-arm - - ANDROID_CPU=armv7a - - ANDROID_API=23 - - ANDROID_PREFIX="$HOME/android$ANDROID_API-$ANDROID_CPU" - - ANDROID_SDK_ROOT="$HOME/android-sdk" - - ANDROID_NDK_ROOT="$HOME/android-ndk" -``` - -### ANDROID_NDK_ROOT - -The second step for Android is to set the environmental variables `ANDROID_NDK_ROOT` and `ANDROID_SDK_ROOT`. This is an important step because the NDK and SDK use the variables internally to locate their own tools. Also see [Recommended NDK Directory?](https://groups.google.com/forum/#!topic/android-ndk/qZjhOaynHXc) on the android-ndk mailing list. (Many folks miss this step, or use incorrect variables like `ANDROID_NDK_HOME` or `ANDROID_SDK_HOME`). - -If you are working from a developer machine you probably already have the necessary tools installed. You should ensure `ANDROID_NDK_ROOT` and `ANDROID_SDK_ROOT` are set properly. - -### Tool installation - -The second step installs tools needed for OpenSSL, Expat and LDNS. This step is handled in by the script `contrib/android/install_tools.sh`. The tools include curl, tar, zip, unzip and java. - -``` -before_script: - - | - if [ "$ANDROID" = "yes" ]; then - ./contrib/android/install_tools.sh - elif [ "$IOS" = "yes" ]; then - ./contrib/ios/install_tools.sh - fi -``` - -### NDK installation - -The third step installs the NDK and SDK. This step is handled in by the script `contrib/android/install_ndk.sh`. The script uses `ANDROID_NDK_ROOT` and `ANDROID_SDK_ROOT` to place the NDK and SDK in the `$HOME` directory. - -If you are working from a developer machine you probably already have a NDK and SDK installed. - -### Android environment - -The fourth step sets the Android cross-compile environment using the script `contrib/android/setenv_android.sh`. The script is `sourced` so the variables in the script are available to the calling shell. The script sets variables like `CC`, `CXX`, `AS` and `AR`; sets `CFLAGS` and `CXXFLAGS`; sets a `sysroot` so Android headers and libraries are found; and adds the path to the toolchain to `PATH`. - -`contrib/android/setenv_android.sh` knows which toolchain and architecture to select by inspecting environmental variables set by Travis for the job. In particular, the variables `ANDROID_CPU` and `ANDROID_API` tell `contrib/android/setenv_android.sh` which tools and libraries to select. - -The `contrib/android/setenv_android.sh` script specifies the tools in a `case` statement like the following. There is a case for each of the architectures armv7a, aarch64, x86 and x86_64. - -``` -armv8a|aarch64|arm64|arm64-v8a) - CC="aarch64-linux-android$ANDROID_API-clang" - CXX="aarch64-linux-android$ANDROID_API-clang++" - LD="aarch64-linux-android-ld" - AS="aarch64-linux-android-as" - AR="aarch64-linux-android-ar" - RANLIB="aarch64-linux-android-ranlib" - STRIP="aarch64-linux-android-strip" - - CFLAGS="-funwind-tables -fexceptions" - CXXFLAGS="-funwind-tables -fexceptions -frtti" -``` - -### OpenSSL - -The fifth step builds OpenSSL. OpenSSL is built for iOS using the scripts `contrib/android/install_openssl.sh`. The script downloads, configures and installs the latest release version of the OpenSSL libraries. OpenSSL is configured with `--prefix="$ANDROID_PREFIX"` so the headers are placed in `$ANDROID_PREFIX/include` directory, and the libraries are placed in the `$ANDROID_PREFIX/lib` directory. - -`ANDROID_PREFIX` is the value `$HOME/android$ANDROID_API-$ANDROID_CPU`. The libraries will be installed in `$HOME/android23-armv7a`, `$HOME/android23-aarch64`, etc. For Autotools projects, the appropriate `PKG_CONFIG_PATH` is exported. - -`PKG_CONFIG_PATH` is an important variable. It is the userland equivalent to sysroot, and allows Autotools to find non-system headers and libraries for an architecture. Typical `PKG_CONFIG_PATH` are `$HOME/android23-armv7a/lib/pkgconfig` and `$HOME/android23-aarch64/lib/pkgconfig`. - -OpenSSL also uses a custom configuration file called `15-android.conf`. It is a copy of the OpenSSL's project file and located at `contrib/android/15-android.conf`. The LDNS version is copied to the OpenSSL source files after unpacking the OpenSSL distribution. The LDNS version has legacy NDK support removed and some other fixes, like `ANDROID_NDK_ROOT` awareness. The changes mean LDNS's `15-android.conf` will only work with LDNS, with NDK-r19 and above, and a properly set environment. - -OpenSSL is configured with `no-engine`. If you want to include OpenSSL engines then edit `contrib/android/install_openssl.sh` and remove the config option. - -### Android build - -Finally, once OpenSSL are built, then the Travis script configures and builds LDNS. The recipe looks as follows. - -``` -elif [ "$ANDROID" = "yes" ]; then - export AUTOTOOLS_BUILD="$(./config.guess)" - export PKG_CONFIG_PATH="$ANDROID_PREFIX/lib/pkgconfig" - ./contrib/android/install_ndk.sh - source ./contrib/android/setenv_android.sh - ./contrib/android/install_openssl.sh - ./contrib/android/bootstrap_ldns.sh - ./configure \ - --build="$AUTOTOOLS_BUILD" \ - --host="$AUTOTOOLS_HOST" \ - --prefix="$ANDROID_PREFIX" \ - --with-ssl="$ANDROID_PREFIX" \ - --disable-gost \ - --with-drill --with-examples - make -j 2 - make install -``` - -Travis only smoke tests an Android build using a compile, link and install. The self tests are not run. TODO: figure out how to fire up an emulator, push the tests to the device and run them. - -### Android flags - -`contrib/android/setenv_android.sh` uses specific flags for `CFLAGS` and `CXXFLAGS`. They are taken from `ndk-build`, so we consider them the official flag set. It is important to use the same flags across projects to avoid subtle problems due to mixing and matching different flags. - -`CXXFLAGS` includes `-fexceptions` and `-frtti` because exceptions and runtime type info are disabled by default. `CFLAGS` include `-funwind-tables` and `-fexceptions` to ensure C++ exceptions pass through C code, if needed. Also see `docs/CPLUSPLUS-SUPPORT.html` in the NDK docs. - -To inspect the flags used by `ndk-build` for a platform clone ASOP's [ndk-samples](https://github.com/android/ndk-samples/tree/master/hello-jni) and build the `hello-jni` project. Use the `V=1` flag to see the full compiler output from `ndk-build`. - -## iOS builds - -Travis tests iOS builds for the armv7a, armv7s and aarch64 architectures for iPhoneOS, AppleTVOS and WatchOS. iPhoneOS is tested using both 32-bit builds (iPhones) and 64-bit builds (iPads). Travis also tests compiles against the simulators. The builds are trickier than other builds for several reasons. The testing requires a cross-compile, and requires OpenSSL prerequisites. The iOS cross-compiles also require care to set the Autotools triplet, the OpenSSL triplet, the toolchain path, the tool variables, and the sysroot. The discussion below detail the steps of the iOS recipes. - -### iOS job - -The first step sets environmental variables for the cross-compile using the Travis job. A typical job with variables is shown below. - -``` -- os: osx - osx_image: xcode10 - name: Apple iPhone on iOS, armv7 - compiler: clang - env: - - IOS=yes - - AUTOTOOLS_HOST=armv7-apple-ios - - OPENSSL_HOST=ios-cross - - IOS_SDK=iPhoneOS - - IOS_CPU=armv7s - - IOS_PREFIX="$HOME/$IOS_SDK-$IOS_CPU" -``` - -### Tool installation - -The second step installs tools needed for OpenSSL, Expat and LDNS. This step is handled in by the script `contrib/ios/install_tools.sh`. The tools include autotools, curl and perl. The installation happens at the `before_script:` stage of Travis. - -``` -before_script: - - | - if [ "$ANDROID" = "yes" ]; then - ./contrib/android/install_tools.sh - elif [ "$IOS" = "yes" ]; then - ./contrib/ios/install_tools.sh - fi -``` - -### iOS environment - -The third step sets the iOS cross-compile environment using the script `contrib/ios/setenv_ios.sh`. The script is `sourced` so the variables in the script are available to the calling shell. The script sets variables like `CC`, `CXX`, `AS` and `AR`; sets `CFLAGS` and `CXXFLAGS`; sets a `sysroot` so iOS headers and libraries are found; and adds the path to the toolchain to `PATH`. - -`contrib/ios/setenv_ios.sh` knows which toolchain and architecture to select by inspecting environmental variables set by Travis for the job. In particular, the variables `IOS_SDK` and `IOS_CPU` tell `contrib/ios/setenv_ios.sh` which tools and libraries to select. - -The `contrib/ios/setenv_ios.sh` script specifies the tools to use during the cross-compile. For Apple SDKs, the tool names are the same as a desktop. There are no special prefixes for the mobile tools. - -``` -CPP=cpp -CC=clang -CXX=clang++ -LD=ld -AS=as -AR=ar -RANLIB=ranlib -STRIP=strip -``` - -If you are working from a developer machine you probably already have the necessary tools installed. - -### OpenSSL - -The fourth step builds OpenSSL. OpenSSL is built for iOS using the scripts `contrib/ios/install_openssl.sh`. The script downloads, configures and installs the latest release version of the OpenSSL libraries. OpenSSL is configured with `--prefix="$IOS_PREFIX"` so the headers are placed in `$IOS_PREFIX/include` directory, and the libraries are placed in the `$IOS_PREFIX/lib` directory. - -`IOS_PREFIX` is the value `$HOME/$IOS_SDK-$IOS_CPU`. The scheme handles both iOS SDKs and cpu architectures so the pair receives a unique installation directory. The libraries will be installed in `$HOME/iPhoneOS-armv7s`, `$HOME/iPhoneOS-arm64`, `$HOME/iPhoneSimulator-i386`, etc. For Autotools projects, the appropriate `PKG_CONFIG_PATH` is exported. - -`PKG_CONFIG_PATH` is an important variable. It is the userland equivalent to sysroot, and allows Autotools to find non-system headers and libraries for an architecture. Typical `PKG_CONFIG_PATH` are `$HOME/iPhoneOS-armv7s/lib/pkgconfig` and `$HOME/iPhoneOS-arm64/lib/pkgconfig`. - -OpenSSL also uses a custom configuration file called `15-ios.conf`. It is a copy of the OpenSSL's project file and located at `contrib/ios/15-ios.conf`. The LDNS version is copied to the OpenSSL source files after unpacking the OpenSSL distribution. The changes mean LDNS's `15-ios.conf` will only work with LDNS and a properly set environment. - -OpenSSL is configured with `no-engine`. Engines require dynamic loading so engines are disabled permanently in `15-ios.conf`. - -### iOS build - -Finally, once OpenSSL are built, then the Travis script configures and builds LDNS. The full recipe looks as follows. - -``` -elif [ "$IOS" = "yes" ]; then - export AUTOTOOLS_BUILD="$(./config.guess)" - export PKG_CONFIG_PATH="$IOS_PREFIX/lib/pkgconfig" - source ./contrib/ios/setenv_ios.sh - ./contrib/ios/install_openssl.sh - ./contrib/ios/bootstrap_ldns.sh - ./configure \ - --build="$AUTOTOOLS_BUILD" --host="$AUTOTOOLS_HOST" \ - --prefix="$IOS_PREFIX" \ - --with-ssl="$IOS_PREFIX" --disable-gost \ - --with-drill --with-examples - make -j 2 - make install -``` - -Travis only smoke tests an iOS build using a compile, link and install. The self tests are not run. TODO: figure out how to fire up an simulator, push the tests to the device and run them. - -### iOS flags - -`contrib/ios/setenv_ios.sh` uses specific flags for `CFLAGS` and `CXXFLAGS`. They are taken from Xcode, so we consider them the official flag set. It is important to use the same flags across projects to avoid subtle problems due to mixing and matching different flags. diff --git a/contrib/ldns/README.snapshots b/contrib/ldns/README.snapshots index 891fcca1d6ef..df7ee003cada 100644 --- a/contrib/ldns/README.snapshots +++ b/contrib/ldns/README.snapshots @@ -3,6 +3,6 @@ ldns - snapshot releases Snapshot releases are not official released. They can be released to interested parties for development. -Snapshots can be recognized from the date in the the tar file name. +Snapshots can be recognized from the date in the tar file name. They should not be used for packaging in distributions. diff --git a/contrib/ldns/acx_nlnetlabs.m4 b/contrib/ldns/acx_nlnetlabs.m4 index 39e92d875331..6a01dc5a4769 100644 --- a/contrib/ldns/acx_nlnetlabs.m4 +++ b/contrib/ldns/acx_nlnetlabs.m4 @@ -2,7 +2,16 @@ # Copyright 2009, Wouter Wijngaards, NLnet Labs. # BSD licensed. # -# Version 41 +# Version 48 +# 2024-01-16 fix to add -l:libssp.a to -lcrypto link check. +# and check for getaddrinfo with only header. +# 2024-01-15 fix to add crypt32 to -lcrypto link check when checking for gdi32. +# 2023-05-04 fix to remove unused whitespace. +# 2023-01-26 fix -Wstrict-prototypes. +# 2022-09-01 fix checking if nonblocking sockets work on OpenBSD. +# 2021-08-17 fix sed script in ssldir split handling. +# 2021-08-17 fix for openssl to detect split version, with ssldir_include +# and ssldir_lib output directories. # 2021-07-30 fix for openssl use of lib64 directory. # 2021-06-14 fix nonblocking test to use host instead of target for mingw test. # 2021-05-17 fix nonblocking socket test from grep on mingw32 to mingw for @@ -183,7 +192,7 @@ dnl cache=`echo $1 | sed 'y%.=/+- %___p__%'` AC_CACHE_VAL(cv_prog_cc_flag_needed_$cache, [ echo '$2' > conftest.c -echo 'void f(){}' >>conftest.c +echo 'void f(void){}' >>conftest.c if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then eval "cv_prog_cc_flag_needed_$cache=no" else @@ -229,7 +238,7 @@ dnl DEPFLAG: set to flag that generates dependencies. AC_DEFUN([ACX_DEPFLAG], [ AC_MSG_CHECKING([$CC dependency flag]) -echo 'void f(){}' >conftest.c +echo 'void f(void){}' >conftest.c if test "`$CC -MM conftest.c 2>&1`" = "conftest.o: conftest.c"; then DEPFLAG="-MM" else @@ -268,7 +277,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED($C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAUL #include #endif -int test() { +int test(void) { int a; char **opts = NULL; struct timeval tv; @@ -305,7 +314,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED($C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAUL #include #endif -int test() { +int test(void) { int a; char **opts = NULL; struct timeval tv; @@ -331,7 +340,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED($C99FLAG, [ #include #include -int test() { +int test(void) { int a = 0; return a; } @@ -341,7 +350,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D_BSD_SOURCE -D_DEFAULT_SOURCE, [ #include -int test() { +int test(void) { int a; a = isascii(32); return a; @@ -352,7 +361,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D_GNU_SOURCE, [ #include -int test() { +int test(void) { struct in6_pktinfo inf; int a = (int)sizeof(inf); return a; @@ -366,7 +375,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D_GNU_SOURCE -D_FRSRESGID, [ #include -int test() { +int test(void) { int a = setresgid(0,0,0); a = setresuid(0,0,0); return a; @@ -381,7 +390,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D_POSIX_C_SOURCE=200112, #endif #include -int test() { +int test(void) { int a = 0; char *t; time_t time = 0; @@ -409,7 +418,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D__EXTENSIONS__, #include #endif -int test() { +int test(void) { int a; char **opts = NULL; struct timeval tv; @@ -471,7 +480,7 @@ fi dnl Setup ATTR_FORMAT config.h parts. dnl make sure you call ACX_CHECK_FORMAT_ATTRIBUTE also. AC_DEFUN([AHX_CONFIG_FORMAT_ATTRIBUTE], -[ +[ #ifdef HAVE_ATTR_FORMAT # define ATTR_FORMAT(archetype, string_index, first_to_check) \ __attribute__ ((format (archetype, string_index, first_to_check))) @@ -647,6 +656,30 @@ AC_DEFUN([ACX_SSL_CHECKS], [ withval=$1 if test x_$withval != x_no; then AC_MSG_CHECKING(for SSL) + if test -n "$withval"; then + dnl look for openssl install with different version, eg. + dnl in /usr/include/openssl11/openssl/ssl.h + dnl and /usr/lib64/openssl11/libssl.so + dnl with the --with-ssl=/usr/include/openssl11 + if test ! -f "$withval/include/openssl/ssl.h" -a -f "$withval/openssl/ssl.h"; then + ssldir="$withval" + found_ssl="yes" + withval="" + ssldir_include="$ssldir" + dnl find the libdir + ssldir_lib=`echo $ssldir | sed -e 's/include/lib/'` + if test -f "$ssldir_lib/libssl.a" -o -f "$ssldir_lib/libssl.so"; then + : # found here + else + ssldir_lib=`echo $ssldir | sed -e 's/include/lib64/'` + if test -f "$ssldir_lib/libssl.a" -o -f "$ssldir_lib/libssl.so"; then + : # found here + else + AC_MSG_ERROR([Could not find openssl lib file, $ssldir_lib/libssl.[so,a], pass like "/usr/local" or "/usr/include/openssl11"]) + fi + fi + fi + fi if test x_$withval = x_ -o x_$withval = x_yes; then withval="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr" fi @@ -654,12 +687,12 @@ AC_DEFUN([ACX_SSL_CHECKS], [ ssldir="$dir" if test -f "$dir/include/openssl/ssl.h"; then found_ssl="yes" - AC_DEFINE_UNQUOTED([HAVE_SSL], [], [Define if you have the SSL libraries installed.]) - dnl assume /usr/include is already in the include-path. - if test "$ssldir" != "/usr"; then - CPPFLAGS="$CPPFLAGS -I$ssldir/include" - LIBSSL_CPPFLAGS="$LIBSSL_CPPFLAGS -I$ssldir/include" - fi + ssldir_include="$ssldir/include" + if test ! -d "$ssldir/lib" -a -d "$ssldir/lib64"; then + ssldir_lib="$ssldir/lib64" + else + ssldir_lib="$ssldir/lib" + fi break; fi done @@ -667,20 +700,17 @@ AC_DEFUN([ACX_SSL_CHECKS], [ AC_MSG_ERROR(Cannot find the SSL libraries in $withval) else AC_MSG_RESULT(found in $ssldir) + AC_DEFINE_UNQUOTED([HAVE_SSL], [], [Define if you have the SSL libraries installed.]) HAVE_SSL=yes - dnl assume /usr is already in the lib and dynlib paths. - if test "$ssldir" != "/usr" -a "$ssldir" != ""; then - if test ! -d "$ssldir/lib" -a -d "$ssldir/lib64"; then - LDFLAGS="$LDFLAGS -L$ssldir/lib64" - LIBSSL_LDFLAGS="$LIBSSL_LDFLAGS -L$ssldir/lib64" - ACX_RUNTIME_PATH_ADD([$ssldir/lib64]) - else - LDFLAGS="$LDFLAGS -L$ssldir/lib" - LIBSSL_LDFLAGS="$LIBSSL_LDFLAGS -L$ssldir/lib" - ACX_RUNTIME_PATH_ADD([$ssldir/lib]) - fi - fi - + dnl assume /usr is already in the include, lib and dynlib paths. + if test "$ssldir" != "/usr"; then + CPPFLAGS="$CPPFLAGS -I$ssldir_include" + LIBSSL_CPPFLAGS="$LIBSSL_CPPFLAGS -I$ssldir_include" + LDFLAGS="$LDFLAGS -L$ssldir_lib" + LIBSSL_LDFLAGS="$LIBSSL_LDFLAGS -L$ssldir_lib" + ACX_RUNTIME_PATH_ADD([$ssldir_lib]) + fi + AC_MSG_CHECKING([for EVP_sha256 in -lcrypto]) LIBS="$LIBS -lcrypto" LIBSSL_LIBS="$LIBSSL_LIBS -lcrypto" @@ -705,40 +735,73 @@ AC_DEFUN([ACX_SSL_CHECKS], [ ]])],[ AC_DEFINE([HAVE_EVP_SHA256], 1, [If you have EVP_sha256]) - AC_MSG_RESULT(yes) + AC_MSG_RESULT(yes) ],[ AC_MSG_RESULT(no) LIBS="$BAKLIBS" LIBSSL_LIBS="$BAKSSLLIBS" - LIBS="$LIBS -ldl" - LIBSSL_LIBS="$LIBSSL_LIBS -ldl" - AC_MSG_CHECKING([if -lcrypto needs -ldl]) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ - int EVP_sha256(void); - (void)EVP_sha256(); - ]])],[ - AC_DEFINE([HAVE_EVP_SHA256], 1, - [If you have EVP_sha256]) - AC_MSG_RESULT(yes) - ],[ - AC_MSG_RESULT(no) - LIBS="$BAKLIBS" - LIBSSL_LIBS="$BAKSSLLIBS" - LIBS="$LIBS -ldl -pthread" - LIBSSL_LIBS="$LIBSSL_LIBS -ldl -pthread" - AC_MSG_CHECKING([if -lcrypto needs -ldl -pthread]) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ - int EVP_sha256(void); - (void)EVP_sha256(); - ]])],[ - AC_DEFINE([HAVE_EVP_SHA256], 1, - [If you have EVP_sha256]) - AC_MSG_RESULT(yes) - ],[ - AC_MSG_RESULT(no) - AC_MSG_ERROR([OpenSSL found in $ssldir, but version 0.9.7 or higher is required]) + + LIBS="$LIBS -lgdi32 -lws2_32 -lcrypt32" + LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32 -lcrypt32" + AC_MSG_CHECKING([if -lcrypto needs -lgdi32 -lws2_32 -lcrypt32]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ + int EVP_sha256(void); + (void)EVP_sha256(); + ]])],[ + AC_DEFINE([HAVE_EVP_SHA256], 1, + [If you have EVP_sha256]) + AC_MSG_RESULT(yes) + ],[ + AC_MSG_RESULT(no) + LIBS="$BAKLIBS" + LIBSSL_LIBS="$BAKSSLLIBS" + + LIBS="$LIBS -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a" + LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a" + AC_MSG_CHECKING([if -lcrypto needs -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ + int EVP_sha256(void); + (void)EVP_sha256(); + ]])],[ + AC_DEFINE([HAVE_EVP_SHA256], 1, + [If you have EVP_sha256]) + AC_MSG_RESULT(yes) + ],[ + AC_MSG_RESULT(no) + LIBS="$BAKLIBS" + LIBSSL_LIBS="$BAKSSLLIBS" + + LIBS="$LIBS -ldl" + LIBSSL_LIBS="$LIBSSL_LIBS -ldl" + AC_MSG_CHECKING([if -lcrypto needs -ldl]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ + int EVP_sha256(void); + (void)EVP_sha256(); + ]])],[ + AC_DEFINE([HAVE_EVP_SHA256], 1, + [If you have EVP_sha256]) + AC_MSG_RESULT(yes) + ],[ + AC_MSG_RESULT(no) + LIBS="$BAKLIBS" + LIBSSL_LIBS="$BAKSSLLIBS" + LIBS="$LIBS -ldl -pthread" + LIBSSL_LIBS="$LIBSSL_LIBS -ldl -pthread" + AC_MSG_CHECKING([if -lcrypto needs -ldl -pthread]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ + int EVP_sha256(void); + (void)EVP_sha256(); + ]])],[ + AC_DEFINE([HAVE_EVP_SHA256], 1, + [If you have EVP_sha256]) + AC_MSG_RESULT(yes) + ],[ + AC_MSG_RESULT(no) + AC_MSG_ERROR([OpenSSL found in $ssldir, but version 0.9.7 or higher is required]) + ]) + ]) ]) - ]) + ]) ]) ]) fi @@ -752,13 +815,13 @@ AC_CHECK_HEADERS([openssl/rand.h],,, [AC_INCLUDES_DEFAULT]) dnl Check for SSL, where SSL is mandatory dnl Adds --with-ssl option, searches for openssl and defines HAVE_SSL if found -dnl Setup of CPPFLAGS, CFLAGS. Adds -lcrypto to LIBS. +dnl Setup of CPPFLAGS, CFLAGS. Adds -lcrypto to LIBS. dnl Checks main header files of SSL. dnl AC_DEFUN([ACX_WITH_SSL], [ AC_ARG_WITH(ssl, AS_HELP_STRING([--with-ssl=pathname],[enable SSL (will check /usr/local/ssl - /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr)]),[ + /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr or specify like /usr/include/openssl11)]),[ ],[ withval="yes" ]) @@ -776,7 +839,7 @@ dnl AC_DEFUN([ACX_WITH_SSL_OPTIONAL], [ AC_ARG_WITH(ssl, AS_HELP_STRING([--with-ssl=pathname],[enable SSL (will check /usr/local/ssl - /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr)]),[ + /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr or specify like /usr/include/openssl11)]),[ ],[ withval="yes" ]) @@ -809,7 +872,7 @@ dnl try to see if an additional _LARGEFILE_SOURCE 1 is needed to get fseeko ACX_CHECK_COMPILER_FLAG_NEEDED(-D_LARGEFILE_SOURCE=1, [ #include -int test() { +int test(void) { int a = fseeko(stdin, 0, 0); return a; } @@ -834,7 +897,7 @@ char* (*f) () = getaddrinfo; #ifdef __cplusplus } #endif -int main() { +int main(void) { ; return 0; } @@ -845,7 +908,7 @@ dnl see if on windows if test "$ac_cv_header_windows_h" = "yes"; then AC_DEFINE(USE_WINSOCK, 1, [Whether the windows socket API is used]) USE_WINSOCK="1" - if echo $LIBS | grep 'lws2_32' >/dev/null; then + if echo "$LIBS" | grep 'lws2_32' >/dev/null; then : else LIBS="$LIBS -lws2_32" @@ -853,6 +916,24 @@ if test "$ac_cv_header_windows_h" = "yes"; then fi ], dnl no quick getaddrinfo, try mingw32 and winsock2 library. +dnl perhaps getaddrinfo needs only the include +AC_LINK_IFELSE( +[AC_LANG_PROGRAM( +[ +#ifdef HAVE_WS2TCPIP_H +#include +#endif +], +[ + (void)getaddrinfo(NULL, NULL, NULL, NULL); +] +)], +[ *** 6808 LINES SKIPPED *** From nobody Tue May 26 16:48:44 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPzGj1Nvtz6g6rs for ; Tue, 26 May 2026 16:48: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPzGh563Gz4JBg for ; Tue, 26 May 2026 16:48:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779814124; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F756nCbAMiTZlJ6rp/Ns2MIzQ2fpQuYECPZHW8ot9Yk=; b=ooVamAHK9GnWY7xfPD7VYjQzpuVUYkubmVYplHdL0SxtLWVUmYSLOD4NLMjjXQNIHzaTax 7I07FTpe0D/PfNEcnRbO1US2OLleKIappSYRGrLUdP7CCRIkQutXkfOjV0Vro6OD+PPIyU gzsPlhdoMgrUu8eaGKwPRf0JBk+9+tqrqIT+1XpbP9JFGwdzIiZvf9hfHHWHp0KbqwRnqh FMPejbZ30v2IHyEIGZsRcuYgecSa5MzcC3Ngfb3Nv6GDiB4xI4ghnvWFOGNPMMqfVvi0g2 ++HSOP9iSiO84ZZ4/42/Atl69kzcF6Eb7kqYMIaskRiDIUzoS+Cbsqv1l4aUyQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779814124; a=rsa-sha256; cv=none; b=ur1+x3j0edqsNFfz4pbttQZ2CVY8UWFUOWpsBqBc5AIcqik6rvwKQfl8xuQ8xuMHcg+AJS ehySbeNbu9Tda3K8691u7N0pl3P48HutwtWxPZXB/z4VRsm37OfmfmvjHYpxmD+uwhO2ho saipRUY9I4hdJUErCKnXDTGxRwBjSFMTr1L3iZP0RwPJ5bQBWa2b0YIk6ppfXRVLcN0Akn BLcOAVEpcly4IW8RKusLpG6fqRWOc4yq1PorCEbCc6cj51M1bDN2mBsSLRnl4blWBLNE+Y hdEzgQafuPp4Xw90mlGOeH6MQlTowEfBqErh5dsrz6wINg4SuDN0S4M8+SYaEA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779814124; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F756nCbAMiTZlJ6rp/Ns2MIzQ2fpQuYECPZHW8ot9Yk=; b=UKeqvKv1W5vAztDDtz3LxuleXXDGglSitUDCi9I1tM9ogw7Q3BBUwDLn6ym1iI0B9AUFvd gFCEfqdHZ/dXXo5uIH1ShXNVDeK+u5QHEk6MYk+vhrvzUQ9yuKAlMIfW1SwNrr9j7CHHUW /6oAUdX/l5nZNT0WzufFFZ7Nd7c1H1n0gJ9DQBrwStlUI6aGJq3rCjZlgmpwaPY1L1xYNr sjSD5/cJA128aih1h4hZYocm0uTFwWLi/yrrhMQEKllczc1lvLVhvkrCv34CaKucocjlLq sm01mogC+Gu054nq5rJu1oE3Enh+j/4GShyBFsMuDX/4ok0iO10GSoTfHQADIA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPzGh4gKVz5Ny for ; Tue, 26 May 2026 16:48:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3748b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 26 May 2026 16:48:44 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 736c14784574 - stable/15 - ldns: Update to 1.9.0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 736c147845740cf8bb5bdc72c1f1d1fbc56a923e Auto-Submitted: auto-generated Date: Tue, 26 May 2026 16:48:44 +0000 Message-Id: <6a15ceec.3748b.56f8f728@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=736c147845740cf8bb5bdc72c1f1d1fbc56a923e commit 736c147845740cf8bb5bdc72c1f1d1fbc56a923e Author: Dag-Erling Smørgrav AuthorDate: 2026-05-22 17:54:58 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-26 16:48:28 +0000 ldns: Update to 1.9.0 Merge commit '5eb18e8576462f5bb33fbd60fcbd752fe5791f33' MFC after: 1 week Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D57170 (cherry picked from commit 9ed998a81bab54203604d08293089db875758686) ldns: Regenerate configuration after update MFC after: 1 week Fixes: d44c9549ef31 ("ldns: Update to 1.8.4") Fixes: 9ed998a81bab ("ldns: Update to 1.9.0") (cherry picked from commit 70739f3499b03cfff6bdd985db0d81cde76be15a) ldns: Fix unused variable on big-endian MFC after: 1 week Fixes: 9ed998a81bab ("ldns: Update to 1.9.0") (cherry picked from commit dd64155367840a3747d812577457a7ed7c8e9acb) --- contrib/ldns/Changelog | 46 +++ contrib/ldns/Makefile.in | 58 +-- contrib/ldns/README | 19 +- contrib/ldns/config.guess | 26 +- contrib/ldns/config.sub | 749 +++++++++++++++++++++++++++++---------- contrib/ldns/configure | 94 ++++- contrib/ldns/configure.ac | 41 ++- contrib/ldns/dnssec.c | 4 +- contrib/ldns/dnssec_zone.c | 50 ++- contrib/ldns/drill/drill.c | 2 +- contrib/ldns/drill/securetrace.c | 7 +- contrib/ldns/error.c | 2 + contrib/ldns/host2str.c | 60 ++++ contrib/ldns/host2wire.c | 2 +- contrib/ldns/keys.c | 2 + contrib/ldns/ldns/config.h | 15 +- contrib/ldns/ldns/config.h.in | 11 +- contrib/ldns/ldns/dnssec_zone.h | 14 +- contrib/ldns/ldns/edns.h | 6 +- contrib/ldns/ldns/error.h | 3 +- contrib/ldns/ldns/host2str.h | 18 + contrib/ldns/ldns/packet.h | 13 + contrib/ldns/ldns/rdata.h | 10 +- contrib/ldns/ldns/rr.h | 20 +- contrib/ldns/ldns/str2host.h | 10 + contrib/ldns/ldns/util.h | 26 +- contrib/ldns/ldns/util.h.in | 22 ++ contrib/ldns/net.c | 2 + contrib/ldns/packet.c | 23 +- contrib/ldns/rdata.c | 6 + contrib/ldns/resolver.c | 18 +- contrib/ldns/rr.c | 129 ++++++- contrib/ldns/sha1.c | 2 +- contrib/ldns/sha2.c | 20 +- contrib/ldns/str2host.c | 68 +++- contrib/ldns/util.c | 5 + contrib/ldns/wire2host.c | 3 + contrib/ldns/zone.c | 2 +- 38 files changed, 1303 insertions(+), 305 deletions(-) diff --git a/contrib/ldns/Changelog b/contrib/ldns/Changelog index c7f36767b360..74e2631af72d 100644 --- a/contrib/ldns/Changelog +++ b/contrib/ldns/Changelog @@ -1,3 +1,49 @@ +1.9.0 2025-12-04 + * PR #246: Make ldns_calc_keytag() available for CDNSKEY RR + Thanks tgreenx and pnax + * PR #247: Make ldns_key_rr2ds() available for CDNSKEY RR + Thanks tgreenx + * PR #248: Make ldns_rr_compare_{ds,ds_dnskey}() available for + CDS and CDNSKEY RRs. Thanks tgreenx + * PR #245: Make drill trace use IPv6 when used with -6 + Thanks Paul Radford + * Fix #254: Unquoted "value" rdata for CAA records fail to validate. + Follows the long string unquoted syntax from RFC8659, section 4.1.1. + * Fix #266: ldns-read-zone -u fails if a type is the only type in a + window and the type modulo 256 is equal to zero. + * Fix #271: Intermittent build failure with multi-job + builds (make -j). + * Add ldns-verify-zone -s option. It checks all signature results, + instead of passing by when one RRSIG validates. That prints output + for spurious RRSIGs, the failures for them. + * Fix RR types NSAP-PTR, GPOS and RESINFO to print unquoted strings. + * Fix memory leak when trying to read zones that have equal RRs. + the ldns_dnssec_*_add_rr() functions now return LDNS_STATUS_EQUAL_RR + when an already existing RR is tried to be added. This is a API + change, hence this also bumps the version to 1.9.0 + * PR #282: ensure returning pkt with LDNS_STATUS_OK. Thanks grobian. + * PR #286: Fix RR Type AMTRELAY type nogateway, to print relay '.', + and memory leaks in parsing it. + * DSYNC is no longer a draft RR type and compiled by default + * RFC 9824 support: Compact Denial of Existence in DNSSEC + * The HHIT and BRID draft RR types + * PR #249: If RNG is already seeded, return early. + Thanks crrodriguez + * PR #221: Improve error messages. Thanks jschauma + * PR #256: Use SWIG_AppendOutput to support swig 4.3 + Thanks pemensik + * PR #188: Homogenize paths for source files during compilation + Thanks duthils + * Fix #283: ldns-walk fails after update from 1.8.3 to 1.8.4 + Thanks jschauma + * PR #200: Allow compiled tests to link to ldns statically via + environment variable. Thanks FGasper and pemensik + * PR #220: Optionally exclude ZONEMD RRs in ldns-compare-zone + Thanks gjherbiet + * Fix #285: A WALLET RR breaks TXT signing. Thanks bortzmeyer + * Fix #287: ldns-verify-zone hangs with missing NSEC3 RRs. + Thanks Roy Arends + 1.8.4 2024-07-19 * Fix building documentation in build directory. Thanks Michael Tokarev diff --git a/contrib/ldns/Makefile.in b/contrib/ldns/Makefile.in index 32b91576d0d9..b5ca1d3c3adf 100644 --- a/contrib/ldns/Makefile.in +++ b/contrib/ldns/Makefile.in @@ -132,11 +132,11 @@ all: setup-builddir lib linktest manpages @P5_DNS_LDNS@ @PYLDNS@ @DRILL@ @EXAMPL .SUFFIXES: .c .o .a .lo .h .i .c.lo: - $(COMP_LIB) $(LIBSSL_CPPFLAGS) -c $< -o $@ + $(COMP_LIB) $(LIBSSL_CPPFLAGS) -c $(srcdir)/$< -o $@ # Need libtool compile .c.o: - $(COMP_LIB) $(LIBSSL_CPPFLAGS) -c $< -o $@ + $(COMP_LIB) $(LIBSSL_CPPFLAGS) -c $(srcdir)/$< -o $@ $(LDNS_LOBJS) $(LIBLOBJS) $(DRILL_LOBJS) $(EXAMPLE_LOBJS): $(COMP_LIB) $(LIBSSL_CPPFLAGS) -c $(srcdir)/$(@:.lo=.c) -o $@ @@ -571,9 +571,9 @@ depend: done; \ done for p in $(EXAMPLE_PROGS) $(LDNS_DPA) $(LDNS_DANE) $(EX_SSL_PROGS); do \ - echo "$$p: $$p.lo $$p.o \$$(LIB)" >> $(DEPEND_TMP) ; done + echo "$$p: $$p.lo \$$(LIB)" >> $(DEPEND_TMP) ; done echo "$(TESTNS): `for o in $(TESTNS_LOBJS) ; do \ - echo -n "$$o $${o%lo}o " ; done` \$$(LIB)" \ + echo -n "$$o " ; done`\$$(LIB)" \ >> $(DEPEND_TMP) cp $(DEPEND_TARGET) $(DEPEND_TMP2) head -`egrep -n "# Dependencies" $(DEPEND_TARGET) | tail -1 | sed -e 's/:.*$$//'` $(DEPEND_TMP2) > $(DEPEND_TARGET) @@ -1114,28 +1114,28 @@ drill/work.lo drill/work.o: $(srcdir)/drill/work.c $(srcdir)/drill/drill.h ldns/ $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \ $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \ $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -examples/ldns-chaos: examples/ldns-chaos.lo examples/ldns-chaos.o $(LIB) -examples/ldns-compare-zones: examples/ldns-compare-zones.lo examples/ldns-compare-zones.o $(LIB) -examples/ldnsd: examples/ldnsd.lo examples/ldnsd.o $(LIB) -examples/ldns-gen-zone: examples/ldns-gen-zone.lo examples/ldns-gen-zone.o $(LIB) -examples/ldns-key2ds: examples/ldns-key2ds.lo examples/ldns-key2ds.o $(LIB) -examples/ldns-keyfetcher: examples/ldns-keyfetcher.lo examples/ldns-keyfetcher.o $(LIB) -examples/ldns-keygen: examples/ldns-keygen.lo examples/ldns-keygen.o $(LIB) -examples/ldns-mx: examples/ldns-mx.lo examples/ldns-mx.o $(LIB) -examples/ldns-notify: examples/ldns-notify.lo examples/ldns-notify.o $(LIB) -examples/ldns-read-zone: examples/ldns-read-zone.lo examples/ldns-read-zone.o $(LIB) -examples/ldns-resolver: examples/ldns-resolver.lo examples/ldns-resolver.o $(LIB) -examples/ldns-rrsig: examples/ldns-rrsig.lo examples/ldns-rrsig.o $(LIB) -examples/ldns-test-edns: examples/ldns-test-edns.lo examples/ldns-test-edns.o $(LIB) -examples/ldns-update: examples/ldns-update.lo examples/ldns-update.o $(LIB) -examples/ldns-version: examples/ldns-version.lo examples/ldns-version.o $(LIB) -examples/ldns-walk: examples/ldns-walk.lo examples/ldns-walk.o $(LIB) -examples/ldns-zcat: examples/ldns-zcat.lo examples/ldns-zcat.o $(LIB) -examples/ldns-zsplit: examples/ldns-zsplit.lo examples/ldns-zsplit.o $(LIB) -examples/ldns-dpa: examples/ldns-dpa.lo examples/ldns-dpa.o $(LIB) -examples/ldns-dane: examples/ldns-dane.lo examples/ldns-dane.o $(LIB) -examples/ldns-nsec3-hash: examples/ldns-nsec3-hash.lo examples/ldns-nsec3-hash.o $(LIB) -examples/ldns-revoke: examples/ldns-revoke.lo examples/ldns-revoke.o $(LIB) -examples/ldns-signzone: examples/ldns-signzone.lo examples/ldns-signzone.o $(LIB) -examples/ldns-verify-zone: examples/ldns-verify-zone.lo examples/ldns-verify-zone.o $(LIB) -examples/ldns-testns: examples/ldns-testns.lo examples/ldns-testns.o examples/ldns-testpkts.lo examples/ldns-testpkts.o $(LIB) +examples/ldns-chaos: examples/ldns-chaos.lo $(LIB) +examples/ldns-compare-zones: examples/ldns-compare-zones.lo $(LIB) +examples/ldnsd: examples/ldnsd.lo $(LIB) +examples/ldns-gen-zone: examples/ldns-gen-zone.lo $(LIB) +examples/ldns-key2ds: examples/ldns-key2ds.lo $(LIB) +examples/ldns-keyfetcher: examples/ldns-keyfetcher.lo $(LIB) +examples/ldns-keygen: examples/ldns-keygen.lo $(LIB) +examples/ldns-mx: examples/ldns-mx.lo $(LIB) +examples/ldns-notify: examples/ldns-notify.lo $(LIB) +examples/ldns-read-zone: examples/ldns-read-zone.lo $(LIB) +examples/ldns-resolver: examples/ldns-resolver.lo $(LIB) +examples/ldns-rrsig: examples/ldns-rrsig.lo $(LIB) +examples/ldns-test-edns: examples/ldns-test-edns.lo $(LIB) +examples/ldns-update: examples/ldns-update.lo $(LIB) +examples/ldns-version: examples/ldns-version.lo $(LIB) +examples/ldns-walk: examples/ldns-walk.lo $(LIB) +examples/ldns-zcat: examples/ldns-zcat.lo $(LIB) +examples/ldns-zsplit: examples/ldns-zsplit.lo $(LIB) +examples/ldns-dpa: examples/ldns-dpa.lo $(LIB) +examples/ldns-dane: examples/ldns-dane.lo $(LIB) +examples/ldns-nsec3-hash: examples/ldns-nsec3-hash.lo $(LIB) +examples/ldns-revoke: examples/ldns-revoke.lo $(LIB) +examples/ldns-signzone: examples/ldns-signzone.lo $(LIB) +examples/ldns-verify-zone: examples/ldns-verify-zone.lo $(LIB) +examples/ldns-testns: examples/ldns-testns.lo examples/ldns-testpkts.lo $(LIB) diff --git a/contrib/ldns/README b/contrib/ldns/README index e07fdc078aa2..fb588f4da586 100644 --- a/contrib/ldns/README +++ b/contrib/ldns/README @@ -1,3 +1,21 @@ +DEVELOPMENT VISION + +Note: ldns has been in maintenance mode since 2020, with no plans for major +features. We welcome PRs from contributors who want to add new functionality. +We also actively fix bugs, so users can continue to rely on ldns if its +current features meet their needs. + +We will continue to make occasional use of ldns in an experimental +setting, such as during an IETF Hackathon to build a proof of concept for an +Internet Draft. + +The natural successor to the ldns library is the domain library for Rust: +https://github.com/NLnetLabs/domain + +We offer drop-in replacements for commonly used ldns example tools in dnst: +https://github.com/NLnetLabs/dnst + +--- Contents: REQUIREMENTS @@ -10,7 +28,6 @@ Contents: Solaris KNOWN ISSUES pyldns - Your Support Project page: http://www.nlnetlabs.nl/ldns/ diff --git a/contrib/ldns/config.guess b/contrib/ldns/config.guess index f6d217a49f8f..a9d01fde4617 100755 --- a/contrib/ldns/config.guess +++ b/contrib/ldns/config.guess @@ -1,10 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2024 Free Software Foundation, Inc. +# Copyright 1992-2025 Free Software Foundation, Inc. # shellcheck disable=SC2006,SC2268 # see below for rationale -timestamp='2024-01-01' +timestamp='2025-07-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -60,7 +60,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2024 Free Software Foundation, Inc. +Copyright 1992-2025 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -123,7 +123,7 @@ set_cc_for_build() { dummy=$tmp/dummy case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in ,,) echo "int x;" > "$dummy.c" - for driver in cc gcc c89 c99 ; do + for driver in cc gcc c17 c99 c89 ; do if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then CC_FOR_BUILD=$driver break @@ -634,7 +634,8 @@ EOF sed 's/^ //' << EOF > "$dummy.c" #include - main() + int + main () { if (!__power_pc()) exit(1); @@ -718,7 +719,8 @@ EOF #include #include - int main () + int + main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); @@ -1595,8 +1597,11 @@ EOF *:Unleashed:*:*) GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE ;; - *:Ironclad:*:*) - GUESS=$UNAME_MACHINE-unknown-ironclad + x86_64:[Ii]ronclad:*:*|i?86:[Ii]ronclad:*:*) + GUESS=$UNAME_MACHINE-pc-ironclad-mlibc + ;; + *:[Ii]ronclad:*:*) + GUESS=$UNAME_MACHINE-unknown-ironclad-mlibc ;; esac @@ -1621,6 +1626,7 @@ cat > "$dummy.c" <." version="\ GNU config.sub ($timestamp) -Copyright 1992-2024 Free Software Foundation, Inc. +Copyright 1992-2025 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -120,7 +120,6 @@ case $# in esac # Split fields of configuration type -# shellcheck disable=SC2162 saved_IFS=$IFS IFS="-" read field1 field2 field3 field4 <; Tue, 26 May 2026 16:48: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPzGj6Tpxz4JGp for ; Tue, 26 May 2026 16:48:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779814125; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dcq43poapMKHTktESSVSxokaB6sk250wFCdw4+Y4W9U=; b=l8ae9HoZKNRPvekRbSUKFmFlxrs/7SWFweTMB5leSU9UVrPYidTvyOvGQSDZf6km9tfRHM T5aPZFVVbg6JK4ri/Pu+XDM8CQKX1C7sxezITD9Yp8hzhpj9ypwbVuz8ONl22uGuE5WZ2N OzAnmVi1FNtWp4W30/1XVxroB23htDKWreNKMHiXxBgt55xg3r8x4y8BrRkbdVTmiX35j5 vTus3HfP+XHyK/fMiqIgYr1AZDmV3QGnKkmJDUwn1E9z5RGWIcghmD+YQL15bD2N1ZzHpB pvbouTKxzR8jara9cGGNOxl/eOFaF+9AoAdSkDGB1EkqQjwiKNIs7zUAQ9YKRQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779814125; a=rsa-sha256; cv=none; b=RzgWSV828E4XHnv0dn+3Q2gB3NnMLrUq3cO60KgNKGyfGiOmFyRbkRNpC3ZW+jLqilvG0S kVT7bomfXfb23HmOn+npcuRKQYFXZ0+ugfn9GO/cGxSt6xJBceZkRW1mGANKQOgNv1FD5R 7vV3geszJRXE49X+Cp0nsar+k1L4+DSYD0GEEhejOYLIhWng401pUVx2qZt9AhtKrT4o82 cdhyafFXvMgwQ0FEAscgTILmaITAtUWPzo1AuWJ3DfPU9TQhsyRda8AcUBAb5hj3nD8Egw 39aSAi8/cjrxF9tDG87MDn7vxnpLi54XZPMI71nNHzvTGlldii21FCKYF6b9dw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779814125; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dcq43poapMKHTktESSVSxokaB6sk250wFCdw4+Y4W9U=; b=QLWAFrcSQe1SKLpGjjyRNPI4268hMINzbdqLMCZQFYLZj8VL0ZfhHHD/75d20rcbV6UiHf 90a7BhDSghdntnjPh7DLo+aRvlm7mPxavuwh1GQv+tQ5bgctOBdOmvp9PHKHp9Spkq/FUM 0Xk0Qz3bwoX3NH8330Aope87p428Inx+/+v8nHubbxvRIO9tiFxTbH2TxPM5A+G0Fciepu Zn4i7d74Ps3i5sEV4ifhn3QYqalhDKZ+byeD+N3gtQMxZzPO7pyWN0YhQeJWWELcpfRqB6 gLn80ovyuQ83czlgvL0vuTFt8IAcGRN3W3OwYwPz4jDaXIJHjG/386xnIis19g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPzGj5hcyz4hW for ; Tue, 26 May 2026 16:48:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 37a1d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 26 May 2026 16:48:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: caae890860a9 - stable/15 - unbound: Tweak freebsd-configure script List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: caae890860a9fbf7c49ca1cef3ec9e23222f403e Auto-Submitted: auto-generated Date: Tue, 26 May 2026 16:48:45 +0000 Message-Id: <6a15ceed.37a1d.6e97bd11@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=caae890860a9fbf7c49ca1cef3ec9e23222f403e commit caae890860a9fbf7c49ca1cef3ec9e23222f403e Author: Dag-Erling Smørgrav AuthorDate: 2026-05-22 19:55:22 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-26 16:48:28 +0000 unbound: Tweak freebsd-configure script Regenerating the configure script is optional and can introduce noise if the installed versions of autoconf, automake, and libtool do not match those used upstream. Tweak our script slightly so it will skip this step if libtoolize is not found. (cherry picked from commit cd69bc03cf67b958e08206d49562903c57b5bd28) --- contrib/unbound/freebsd-configure.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/unbound/freebsd-configure.sh b/contrib/unbound/freebsd-configure.sh index cd45d4716320..a22428948574 100755 --- a/contrib/unbound/freebsd-configure.sh +++ b/contrib/unbound/freebsd-configure.sh @@ -14,7 +14,7 @@ unbound=$(dirname $(realpath $0)) cd $unbound # Run autotools before we drop LOCALBASE out of PATH -(cd $unbound && libtoolize --copy && autoheader && autoconf) +libtoolize --copy && autoheader && autoconf # Ensure we use the correct toolchain and clean our environment export CC=$(echo ".include " | make -f /dev/stdin -VCC) From nobody Tue May 26 16:48:46 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPzGl1CyZz6g6q8 for ; Tue, 26 May 2026 16:48:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPzGl00hDz4JBn for ; Tue, 26 May 2026 16:48:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779814127; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+qETYCSyivcjm3hJLYHSublZm4OmDgtFGdHnQXDJZPA=; b=NYRWT5r0+55J9jxXUD4NzpgoxfUYP0ysZqCiVZDtoIUIsZsH8Z6WnyoGkWnSzsZ895t7rx mk2phlfkTB9QcXLPBzaOObADoP3xVjJICPBy9R3f7RbN7fG3qSeh8BuJuRUYslRrF38GRV uTz5GnKNm+0Xb2KqIjm3Rcs4WAShofh39U+l+TGLf14YIy6CjQV32DPXVIPCTyLy1NhDjp 2nVdroh5R8q1Iqf+PA75EVQ0kkaPRAb2tTv/wuwBv5FNojl2qvTuSRdxD/KPspsSpPg762 4M0qmuyOZNfLrcXYTl9KPfjqvFMylt1+DNy+LkjC7OFYv+rvuQU+GZ3E9nZ8jg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779814127; a=rsa-sha256; cv=none; b=a+iIlkq1CwA3WiRsIf3DoCtA6j3PSys4SUR0KYlhGAphi1C5vxsgLqQuPnMe98oqoygRb/ +okhGilDzxYjb9+IkQny3HPD3yANsw7Ezv9eHmNNLCI+PAEKIeroz7E1PvkTsI29jErG3J 7Br3KRICSztjKnaLRylQcpOrVBic5EpjLyLx7rjUFv4dpX+LhLpkiC60ur/OiuUsD6VGlJ p1se5evj5Nb/DJCZvm8nYr8pt605VyddGx7/sgwLBUzkfmU6RZdTUVI3X1OmRWbswkaF10 TIDa9dyZjSs5j/7qy1u63w42m5sCSt7xwy3ns/FFIdVfcFPvTkxCDbGps2uMSQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779814127; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+qETYCSyivcjm3hJLYHSublZm4OmDgtFGdHnQXDJZPA=; b=teMQi5YGid+/NiHniccOJDW/Ihr7DIrpUFH+k/M9Z0nvDxLDt35A3qekJm4yMiWrc06kk3 81zI+hIlzxR4PSAy0nrkLMyPvRLS1151LIGfoKiWvkLFgCE7a3gstwvIxMcIg8OVO8qRrU VR3TYyWzkADHi/fyPpPO5Rnpn/BM08ztG8Q1IgLRSLQtARcXOMvY0N+e+1A9fECwgXqzPN +aQ5ZnQVjVK1r7ebFu29s/goc9bxV/T8INF7uX1kwkDbDqhmyvHpasyP9boMcqdLKaCChx iW+SAH/Lq84fRMSVUpc9kev4HKUFDuGwbKWtttTl41C6NNdvf5h6dU21Qe42fw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPzGk6hrQz5Vn for ; Tue, 26 May 2026 16:48:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 37171 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 26 May 2026 16:48:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: d8a5915d22c8 - stable/15 - unbound: Regenerate for 1.24.1 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: d8a5915d22c894ca59c246394f2582185a2d61f8 Auto-Submitted: auto-generated Date: Tue, 26 May 2026 16:48:46 +0000 Message-Id: <6a15ceee.37171.69e68b48@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=d8a5915d22c894ca59c246394f2582185a2d61f8 commit d8a5915d22c894ca59c246394f2582185a2d61f8 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-22 20:04:22 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-26 16:48:28 +0000 unbound: Regenerate for 1.24.1 No functional changes intended. Fixes: 8b29c373e6ab ("unbound: Vendor import 1.24.1") (cherry picked from commit 290190b26c09c307a9cd70703fa20ad2b2b600a6) --- contrib/unbound/doc/example.conf | 14 +- contrib/unbound/doc/libunbound.3 | 675 ++- contrib/unbound/doc/unbound-anchor.8 | 383 +- contrib/unbound/doc/unbound-checkconf.8 | 121 +- contrib/unbound/doc/unbound-control.8 | 2038 +++++--- contrib/unbound/doc/unbound-host.1 | 242 +- contrib/unbound/doc/unbound.8 | 169 +- contrib/unbound/doc/unbound.conf.5 | 8152 ++++++++++++++++++++----------- lib/libunbound/config.h | 24 +- 9 files changed, 7568 insertions(+), 4250 deletions(-) diff --git a/contrib/unbound/doc/example.conf b/contrib/unbound/doc/example.conf index 3a5188f00477..56bb3247b20e 100644 --- a/contrib/unbound/doc/example.conf +++ b/contrib/unbound/doc/example.conf @@ -1,7 +1,7 @@ # # Example configuration file. # -# See unbound.conf(5) man page, version 1.23.1. +# See unbound.conf(5) man page, version 1.24.1. # # this is a comment. @@ -116,8 +116,8 @@ server: # so-rcvbuf: 0 # buffer size for UDP port 53 outgoing (SO_SNDBUF socket option). - # 0 is system default. Use 4m to handle spikes on very busy servers. - # so-sndbuf: 0 + # 0 is system default. Set larger to handle spikes on very busy servers. + # so-sndbuf: 4m # use SO_REUSEPORT to distribute queries over threads. # at extreme load it could be better to turn it off to distribute even. @@ -163,7 +163,7 @@ server: # msg-cache-slabs: 4 # the number of queries that a thread gets to service. - # num-queries-per-thread: 1024 + # num-queries-per-thread: 2048 # if very busy, 50% queries run to completion, 50% get timeout in msec # jostle-timeout: 200 @@ -196,6 +196,10 @@ server: # Limit on upstream queries for an incoming query and its recursion. # max-global-quota: 200 + # Should the scrubber remove promiscuous NS from positive answers, + # protects against poison attempts. + # iter-scrub-promiscuous: yes + # msec for waiting for an unknown server to reply. Increase if you # are behind a slow satellite link, to eg. 1128. # unknown-server-time-limit: 376 @@ -279,7 +283,7 @@ server: # do-ip6: yes # If running unbound on an IPv6-only host, domains that only have - # IPv4 servers would become unresolveable. If NAT64 is available in + # IPv4 servers would become unresolvable. If NAT64 is available in # the network, unbound can use NAT64 to reach these servers with # the following option. This is NOT needed for enabling DNS64 on a # system that has IPv4 connectivity. diff --git a/contrib/unbound/doc/libunbound.3 b/contrib/unbound/doc/libunbound.3 index 8ef33b0998a2..681c141fcd76 100644 --- a/contrib/unbound/doc/libunbound.3 +++ b/contrib/unbound/doc/libunbound.3 @@ -1,335 +1,306 @@ -.TH "libunbound" "3" "Jul 16, 2025" "NLnet Labs" "unbound 1.23.1" -.\" -.\" libunbound.3 -- unbound library functions manual -.\" -.\" Copyright (c) 2007, NLnet Labs. All rights reserved. -.\" -.\" See LICENSE for the license. -.\" -.\" -.SH "NAME" -.B libunbound, -.B unbound.h, -.B ub_ctx, -.B ub_result, -.B ub_callback_type, -.B ub_ctx_create, -.B ub_ctx_delete, -.B ub_ctx_set_option, -.B ub_ctx_get_option, -.B ub_ctx_config, -.B ub_ctx_set_fwd, -.B ub_ctx_set_stub, -.B ub_ctx_set_tls, -.B ub_ctx_resolvconf, -.B ub_ctx_hosts, -.B ub_ctx_add_ta, -.B ub_ctx_add_ta_autr, -.B ub_ctx_add_ta_file, -.B ub_ctx_trustedkeys, -.B ub_ctx_debugout, -.B ub_ctx_debuglevel, -.B ub_ctx_async, -.B ub_poll, -.B ub_wait, -.B ub_fd, -.B ub_process, -.B ub_resolve, -.B ub_resolve_async, -.B ub_cancel, -.B ub_resolve_free, -.B ub_strerror, -.B ub_ctx_print_local_zones, -.B ub_ctx_zone_add, -.B ub_ctx_zone_remove, -.B ub_ctx_data_add, -.B ub_ctx_data_remove -\- Unbound DNS validating resolver 1.23.1 functions. -.SH "SYNOPSIS" -.B #include -.LP -\fIstruct ub_ctx *\fR -\fBub_ctx_create\fR(\fIvoid\fR); -.LP -\fIvoid\fR -\fBub_ctx_delete\fR(\fIstruct ub_ctx*\fR ctx); -.LP -\fIint\fR -\fBub_ctx_set_option\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR opt, \fIchar*\fR val); -.LP -\fIint\fR -\fBub_ctx_get_option\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR opt, \fIchar**\fR val); -.LP -\fIint\fR -\fBub_ctx_config\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR fname); -.LP -\fIint\fR -\fBub_ctx_set_fwd\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR addr); -.LP -\fIint\fR -\fBub_ctx_set_stub\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR zone, -\fIchar*\fR addr, -.br - \fIint\fR isprime); -.LP -\fIint\fR -\fBub_ctx_set_tls\fR(\fIstruct ub_ctx*\fR ctx, \fIint\fR tls); -.LP -\fIint\fR -\fBub_ctx_resolvconf\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR fname); -.LP -\fIint\fR -\fBub_ctx_hosts\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR fname); -.LP -\fIint\fR -\fBub_ctx_add_ta\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR ta); -.LP -\fIint\fR -\fBub_ctx_add_ta_autr\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR fname); -.LP -\fIint\fR -\fBub_ctx_add_ta_file\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR fname); -.LP -\fIint\fR -\fBub_ctx_trustedkeys\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR fname); -.LP -\fIint\fR -\fBub_ctx_debugout\fR(\fIstruct ub_ctx*\fR ctx, \fIFILE*\fR out); -.LP -\fIint\fR -\fBub_ctx_debuglevel\fR(\fIstruct ub_ctx*\fR ctx, \fIint\fR d); -.LP -\fIint\fR -\fBub_ctx_async\fR(\fIstruct ub_ctx*\fR ctx, \fIint\fR dothread); -.LP -\fIint\fR -\fBub_poll\fR(\fIstruct ub_ctx*\fR ctx); -.LP -\fIint\fR -\fBub_wait\fR(\fIstruct ub_ctx*\fR ctx); -.LP -\fIint\fR -\fBub_fd\fR(\fIstruct ub_ctx*\fR ctx); -.LP -\fIint\fR -\fBub_process\fR(\fIstruct ub_ctx*\fR ctx); -.LP -\fIint\fR -\fBub_resolve\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR name, -.br - \fIint\fR rrtype, \fIint\fR rrclass, \fIstruct ub_result**\fR result); -.LP -\fIint\fR -\fBub_resolve_async\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR name, -.br - \fIint\fR rrtype, \fIint\fR rrclass, \fIvoid*\fR mydata, -.br - \fIub_callback_type\fR callback, \fIint*\fR async_id); -.LP -\fIint\fR -\fBub_cancel\fR(\fIstruct ub_ctx*\fR ctx, \fIint\fR async_id); -.LP -\fIvoid\fR -\fBub_resolve_free\fR(\fIstruct ub_result*\fR result); -.LP -\fIconst char *\fR -\fBub_strerror\fR(\fIint\fR err); -.LP -\fIint\fR -\fBub_ctx_print_local_zones\fR(\fIstruct ub_ctx*\fR ctx); -.LP -\fIint\fR -\fBub_ctx_zone_add\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR zone_name, \fIchar*\fR zone_type); -.LP -\fIint\fR -\fBub_ctx_zone_remove\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR zone_name); -.LP -\fIint\fR -\fBub_ctx_data_add\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR data); -.LP -\fIint\fR -\fBub_ctx_data_remove\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR data); -.SH "DESCRIPTION" -.B Unbound -is an implementation of a DNS resolver, that does caching and -DNSSEC validation. This is the library API, for using the \-lunbound library. -The server daemon is described in \fIunbound\fR(8). -The library works independent from a running unbound server, and -can be used to convert hostnames to ip addresses, and back, -and obtain other information from the DNS. The library performs public\-key -validation of results with DNSSEC. -.P -The library uses a variable of type \fIstruct ub_ctx\fR to keep context -between calls. The user must maintain it, creating it with -.B ub_ctx_create -and deleting it with -.B ub_ctx_delete\fR. -It can be created and deleted at any time. Creating it anew removes any -previous configuration (such as trusted keys) and clears any cached results. -.P -The functions are thread\-safe, and a context can be used in a threaded (as -well as in a non\-threaded) environment. Also resolution (and validation) -can be performed blocking and non\-blocking (also called asynchronous). -The async method returns from the call immediately, so that processing -can go on, while the results become available later. -.P +.\" Man page generated from reStructuredText. +. +. +.nr rst2man-indent-level 0 +. +.de1 rstReportMargin +\\$1 \\n[an-margin] +level \\n[rst2man-indent-level] +level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] +- +\\n[rst2man-indent0] +\\n[rst2man-indent1] +\\n[rst2man-indent2] +.. +.de1 INDENT +.\" .rstReportMargin pre: +. RS \\$1 +. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] +. nr rst2man-indent-level +1 +.\" .rstReportMargin post: +.. +.de UNINDENT +. RE +.\" indent \\n[an-margin] +.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] +.nr rst2man-indent-level -1 +.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] +.in \\n[rst2man-indent\\n[rst2man-indent-level]]u +.. +.TH "LIBUNBOUND" "3" "Oct 22, 2025" "1.24.1" "Unbound" +.SH NAME +libunbound \- Unbound DNS validating resolver 1.24.1 functions. +.SH SYNOPSIS +.sp +\fB#include \fP +.sp +struct ub_ctx * \fBub_ctx_create\fP(void); +.sp +void \fBub_ctx_delete\fP(struct ub_ctx* ctx); +.sp +int \fBub_ctx_set_option\fP(struct ub_ctx* ctx, char* opt, char* val); +.sp +int \fBub_ctx_get_option\fP(struct ub_ctx* ctx, char* opt, char** val); +.sp +int \fBub_ctx_config\fP(struct ub_ctx* ctx, char* fname); +.sp +int \fBub_ctx_set_fwd\fP(struct ub_ctx* ctx, char* addr); +.INDENT 0.0 +.TP +int \fBub_ctx_set_stub\fP(struct ub_ctx* ctx, char* zone, char* addr, +int isprime); +.UNINDENT +.sp +int \fBub_ctx_set_tls\fP(struct ub_ctx* ctx, int tls); +.sp +int \fBub_ctx_resolvconf\fP(struct ub_ctx* ctx, char* fname); +.sp +int \fBub_ctx_hosts\fP(struct ub_ctx* ctx, char* fname); +.sp +int \fBub_ctx_add_ta\fP(struct ub_ctx* ctx, char* ta); +.sp +int \fBub_ctx_add_ta_autr\fP(struct ub_ctx* ctx, char* fname); +.sp +int \fBub_ctx_add_ta_file\fP(struct ub_ctx* ctx, char* fname); +.sp +int \fBub_ctx_trustedkeys\fP(struct ub_ctx* ctx, char* fname); +.sp +int \fBub_ctx_debugout\fP(struct ub_ctx* ctx, FILE* out); +.sp +int \fBub_ctx_debuglevel\fP(struct ub_ctx* ctx, int d); +.sp +int \fBub_ctx_async\fP(struct ub_ctx* ctx, int dothread); +.sp +int \fBub_poll\fP(struct ub_ctx* ctx); +.sp +int \fBub_wait\fP(struct ub_ctx* ctx); +.sp +int \fBub_fd\fP(struct ub_ctx* ctx); +.sp +int \fBub_process\fP(struct ub_ctx* ctx); +.INDENT 0.0 +.TP +int \fBub_resolve\fP(struct ub_ctx* ctx, char* name, +int rrtype, int rrclass, struct ub_result** result); +.TP +int \fBub_resolve_async\fP(struct ub_ctx* ctx, char* name, +int rrtype, int rrclass, void* mydata, +ub_callback_type* callback, int* async_id); +.UNINDENT +.sp +int \fBub_cancel\fP(struct ub_ctx* ctx, int async_id); +.sp +void \fBub_resolve_free\fP(struct ub_result* result); +.sp +const char * \fBub_strerror\fP(int err); +.sp +int \fBub_ctx_print_local_zones\fP(struct ub_ctx* ctx); +.sp +int \fBub_ctx_zone_add\fP(struct ub_ctx* ctx, char* zone_name, char* zone_type); +.sp +int \fBub_ctx_zone_remove\fP(struct ub_ctx* ctx, char* zone_name); +.sp +int \fBub_ctx_data_add\fP(struct ub_ctx* ctx, char* data); +.sp +int \fBub_ctx_data_remove\fP(struct ub_ctx* ctx, char* data); +.SH DESCRIPTION +.sp +Unbound is an implementation of a DNS resolver, that does caching and DNSSEC +validation. +This is the library API, for using the \fB\-lunbound\fP library. +The server daemon is described in \fI\%unbound(8)\fP\&. +The library works independent from a running unbound server, and can be used to +convert hostnames to ip addresses, and back, and obtain other information from +the DNS. +The library performs public\-key validation of results with DNSSEC. +.sp +The library uses a variable of type \fIstruct ub_ctx\fP to keep context between +calls. +The user must maintain it, creating it with \fBub_ctx_create\fP and deleting it +with \fBub_ctx_delete\fP\&. +It can be created and deleted at any time. +Creating it anew removes any previous configuration (such as trusted keys) and +clears any cached results. +.sp +The functions are thread\-safe, and a context can be used in a threaded (as well +as in a non\-threaded) environment. +Also resolution (and validation) can be performed blocking and non\-blocking +(also called asynchronous). +The async method returns from the call immediately, so that processing can go +on, while the results become available later. +.sp The functions are discussed in turn below. -.SH "FUNCTIONS" -.TP +.SH FUNCTIONS +.INDENT 0.0 +.TP .B ub_ctx_create Create a new context, initialised with defaults. -The information from /etc/resolv.conf and /etc/hosts is not utilised -by default. Use -.B ub_ctx_resolvconf -and -.B ub_ctx_hosts -to read them. -Before you call this, use the openssl functions CRYPTO_set_id_callback and -CRYPTO_set_locking_callback to set up asynchronous operation if you use -lib openssl (the application calls these functions once for initialisation). -Openssl 1.0.0 or later uses the CRYPTO_THREADID_set_callback function. +The information from \fB/etc/resolv.conf\fP and \fB/etc/hosts\fP is +not utilised by default. +Use \fBub_ctx_resolvconf\fP and \fBub_ctx_hosts\fP to read them. +Before you call this, use the openssl functions +\fBCRYPTO_set_id_callback\fP and \fBCRYPTO_set_locking_callback\fP to set +up asynchronous operation if you use lib openssl (the application calls +these functions once for initialisation). +Openssl 1.0.0 or later uses the \fBCRYPTO_THREADID_set_callback\fP +function. .TP .B ub_ctx_delete Delete validation context and free associated resources. -Outstanding async queries are killed and callbacks are not called for them. +Outstanding async queries are killed and callbacks are not called for +them. .TP .B ub_ctx_set_option -A power\-user interface that lets you specify one of the options from the -config file format, see \fIunbound.conf\fR(5). Not all options are -relevant. For some specific options, such as adding trust anchors, special -routines exist. Pass the option name with the trailing ':'. +A power\-user interface that lets you specify one of the options from +the config file format, see \fI\%unbound.conf(5)\fP\&. +Not all options are relevant. +For some specific options, such as adding trust anchors, special +routines exist. +Pass the option name with the trailing \fB\(aq:\(aq\fP\&. .TP .B ub_ctx_get_option -A power\-user interface that gets an option value. Some options cannot be -gotten, and others return a newline separated list. Pass the option name -without trailing ':'. The returned value must be free(2)d by the caller. +A power\-user interface that gets an option value. +Some options cannot be gotten, and others return a newline separated +list. +Pass the option name without trailing \fB\(aq:\(aq\fP\&. +The returned value must be free(2)d by the caller. .TP .B ub_ctx_config -A power\-user interface that lets you specify an unbound config file, see -\fIunbound.conf\fR(5), which is read for configuration. Not all options are -relevant. For some specific options, such as adding trust anchors, special -routines exist. This function is thread\-safe only if a single instance of -ub_ctx* exists in the application. If several instances exist the -application has to ensure that ub_ctx_config is not called in parallel by -the different instances. +A power\-user interface that lets you specify an unbound config file, +see \fI\%unbound.conf(5)\fP, which is read for +configuration. +Not all options are relevant. +For some specific options, such as adding trust anchors, special +routines exist. +This function is thread\-safe only if a single instance of \fBub_ctx\fP* +exists in the application. +If several instances exist the application has to ensure that +\fBub_ctx_config\fP is not called in parallel by the different instances. .TP .B ub_ctx_set_fwd -Set machine to forward DNS queries to, the caching resolver to use. -IP4 or IP6 address. Forwards all DNS requests to that machine, which -is expected to run a recursive resolver. If the proxy is not -DNSSEC capable, validation may fail. Can be called several times, in -that case the addresses are used as backup servers. -At this time it is only possible to set configuration before the -first resolve is done. +Set machine to forward DNS queries to, the caching resolver to use. +IP4 or IP6 address. +Forwards all DNS requests to that machine, which is expected to run a +recursive resolver. +If the proxy is not DNSSEC capable, validation may fail. +Can be called several times, in that case the addresses are used as +backup servers. +At this time it is only possible to set configuration before the first +resolve is done. .TP .B ub_ctx_set_stub -Set a stub zone, authoritative dns servers to use for a particular zone. -IP4 or IP6 address. If the address is NULL the stub entry is removed. -Set isprime true if you configure root hints with it. Otherwise similar to -the stub zone item from unbound's config file. Can be called several times, -for different zones, or to add multiple addresses for a particular zone. -At this time it is only possible to set configuration before the -first resolve is done. +Set a stub zone, authoritative dns servers to use for a particular +zone. +IP4 or IP6 address. +If the address is NULL the stub entry is removed. +Set isprime true if you configure root hints with it. +Otherwise similar to the stub zone item from unbound\(aqs config file. +Can be called several times, for different zones, or to add multiple +addresses for a particular zone. +At this time it is only possible to set configuration before the first +resolve is done. .TP .B ub_ctx_set_tls -Enable DNS over TLS (DoT) for machines set with -.B ub_ctx_set_fwd. -At this time it is only possible to set configuration before the -first resolve is done. +Enable DNS over TLS (DoT) for machines set with \fBub_ctx_set_fwd\fP\&. +At this time it is only possible to set configuration before the first +resolve is done. .TP .B ub_ctx_resolvconf -By default the root servers are queried and full resolver mode is used, but -you can use this call to read the list of nameservers to use from the -filename given. -Usually "/etc/resolv.conf". Uses those nameservers as caching proxies. +By default the root servers are queried and full resolver mode is used, +but you can use this call to read the list of nameservers to use from +the filename given. +Usually \fB\(dq/etc/resolv.conf\(dq\fP\&. +Uses those nameservers as caching proxies. If they do not support DNSSEC, validation may fail. Only nameservers are picked up, the searchdomain, ndots and other -settings from \fIresolv.conf\fR(5) are ignored. -If fname NULL is passed, "/etc/resolv.conf" is used (if on Windows, -the system\-wide configured nameserver is picked instead). -At this time it is only possible to set configuration before the -first resolve is done. +settings from \fIresolv.conf(5)\fP are ignored. +If fname NULL is passed, \fB\(dq/etc/resolv.conf\(dq\fP is used (if on +Windows, the system\-wide configured nameserver is picked instead). +At this time it is only possible to set configuration before the first +resolve is done. .TP .B ub_ctx_hosts Read list of hosts from the filename given. -Usually "/etc/hosts". When queried for, these addresses are not marked -DNSSEC secure. If fname NULL is passed, "/etc/hosts" is used -(if on Windows, etc/hosts from WINDIR is picked instead). -At this time it is only possible to set configuration before the -first resolve is done. -.TP -.B -ub_ctx_add_ta +Usually \fB\(dq/etc/hosts\(dq\fP\&. +When queried for, these addresses are not marked DNSSEC secure. +If fname NULL is passed, \fB\(dq/etc/hosts\(dq\fP is used (if on Windows, +\fBetc/hosts\fP from WINDIR is picked instead). +At this time it is only possible to set configuration before the first +resolve is done. +.TP +.B ub_ctx_add_ta Add a trust anchor to the given context. -At this time it is only possible to add trusted keys before the -first resolve is done. +At this time it is only possible to add trusted keys before the first +resolve is done. The format is a string, similar to the zone\-file format, -[domainname] [type] [rdata contents]. Both DS and DNSKEY records are accepted. +\fB[domainname]\fP \fB[type]\fP \fB[rdata contents]\fP\&. +Both DS and DNSKEY records are accepted. .TP .B ub_ctx_add_ta_autr -Add filename with automatically tracked trust anchor to the given context. -Pass name of a file with the managed trust anchor. You can create this -file with \fIunbound\-anchor\fR(8) for the root anchor. You can also -create it with an initial file with one line with a DNSKEY or DS record. +Add filename with automatically tracked trust anchor to the given +context. +Pass name of a file with the managed trust anchor. +You can create this file with +\fI\%unbound\-anchor(8)\fP for the root anchor. +You can also create it with an initial file with one line with a DNSKEY +or DS record. If the file is writable, it is updated when the trust anchor changes. -At this time it is only possible to add trusted keys before the -first resolve is done. +At this time it is only possible to add trusted keys before the first +resolve is done. .TP .B ub_ctx_add_ta_file Add trust anchors to the given context. Pass name of a file with DS and DNSKEY records in zone file format. -At this time it is only possible to add trusted keys before the -first resolve is done. +At this time it is only possible to add trusted keys before the first +resolve is done. .TP .B ub_ctx_trustedkeys Add trust anchors to the given context. -Pass the name of a bind\-style config file with trusted\-keys{}. -At this time it is only possible to add trusted keys before the -first resolve is done. +Pass the name of a bind\-style config file with \fBtrusted\-keys{}\fP\&. +At this time it is only possible to add trusted keys before the first +resolve is done. .TP .B ub_ctx_debugout -Set debug and error log output to the given stream. Pass NULL to disable -output. Default is stderr. File\-names or using syslog can be enabled -using config options, this routine is for using your own stream. +Set debug and error log output to the given stream. +Pass NULL to disable output. +Default is stderr. +File\-names or using syslog can be enabled using config options, this +routine is for using your own stream. .TP .B ub_ctx_debuglevel -Set debug verbosity for the context. Output is directed to stderr. +Set debug verbosity for the context. +Output is directed to stderr. Higher debug level gives more output. .TP .B ub_ctx_async Set a context behaviour for asynchronous action. -if set to true, enables threading and a call to -.B ub_resolve_async +if set to true, enables threading and a call to \fBub_resolve_async\fP creates a thread to handle work in the background. If false, a process is forked to handle work in the background. -Changes to this setting after -.B ub_resolve_async -calls have been made have no effect (delete and re\-create the context -to change). +Changes to this setting after \fBub_resolve_async\fP calls have been made +have no effect (delete and re\-create the context to change). .TP .B ub_poll Poll a context to see if it has any new results. -Do not poll in a loop, instead extract the fd below to poll for readiness, -and then check, or wait using the wait routine. +Do not poll in a loop, instead extract the \fBfd\fP below to poll for +readiness, and then check, or wait using the wait routine. Returns 0 if nothing to read, or nonzero if a result is available. -If nonzero, call -.B ub_process -to do callbacks. +If nonzero, call \fBub_process\fP to do callbacks. .TP .B ub_wait -Wait for a context to finish with results. Calls -.B ub_process -after the wait for you. After the wait, there are no more outstanding -asynchronous queries. +Wait for a context to finish with results. +Calls \fBub_process\fP after the wait for you. +After the wait, there are no more outstanding asynchronous queries. .TP .B ub_fd -Get file descriptor. Wait for it to become readable, at this point -answers are returned from the asynchronous validating resolver. -Then call the \fBub_process\fR to continue processing. +Get file descriptor. +Wait for it to become readable, at this point answers are returned from +the asynchronous validating resolver. +Then call the \fBub_process\fP to continue processing. .TP .B ub_process Call this routine to continue processing results from the validating -resolver (when the fd becomes readable). +resolver (when the \fBfd\fP becomes readable). Will perform necessary callbacks. .TP .B ub_resolve @@ -340,95 +311,111 @@ The result structure is newly allocated with the resulting data. .TP .B ub_resolve_async Perform asynchronous resolution and validation of the target name. -Arguments mean the same as for \fBub_resolve\fR except no -data is returned immediately, instead a callback is called later. -The callback receives a copy of the mydata pointer, that you can use to pass -information to the callback. The callback type is a function pointer to -a function declared as -.IP -void my_callback_function(void* my_arg, int err, -.br - struct ub_result* result); -.IP -The async_id is returned so you can (at your option) decide to track it -and cancel the request if needed. If you pass a NULL pointer the async_id -is not returned. +Arguments mean the same as for \fBub_resolve\fP except no data is +returned immediately, instead a callback is called later. +The callback receives a copy of the mydata pointer, that you can use to +pass information to the callback. +The callback type is a function pointer to a function declared as: +.INDENT 7.0 +.INDENT 3.5 +.sp +.nf +.ft C +void my_callback_function(void* my_arg, int err, + struct ub_result* result); +.ft P +.fi +.UNINDENT +.UNINDENT +.sp +The \fBasync_id\fP is returned so you can (at your option) decide to +track it and cancel the request if needed. +If you pass a NULL pointer the \fBasync_id\fP is not returned. .TP .B ub_cancel -Cancel an async query in progress. This may return an error if the query -does not exist, or the query is already being delivered, in that case you -may still get a callback for the query. +Cancel an async query in progress. +This may return an error if the query does not exist, or the query is +already being delivered, in that case you may still get a callback for +the query. .TP .B ub_resolve_free -Free struct ub_result contents after use. +Free struct \fBub_result\fP contents after use. .TP .B ub_strerror -Convert error value from one of the unbound library functions -to a human readable string. +Convert error value from one of the unbound library functions to a +human readable string. .TP .B ub_ctx_print_local_zones Debug printout the local authority information to debug output. .TP .B ub_ctx_zone_add -Add new zone to local authority info, like local\-zone \fIunbound.conf\fR(5) -statement. +Add new zone to local authority info, like local\-zone +\fI\%unbound.conf(5)\fP statement. .TP .B ub_ctx_zone_remove Delete zone from local authority info. .TP .B ub_ctx_data_add Add resource record data to local authority info, like local\-data -\fIunbound.conf\fR(5) statement. +\fI\%unbound.conf(5)\fP statement. .TP .B ub_ctx_data_remove Delete local authority data from the name given. -.SH "RESULT DATA STRUCTURE" -The result of the DNS resolution and validation is returned as -\fIstruct ub_result\fR. The result structure contains the following entries. -.P +.UNINDENT +.SH RESULT DATA STRUCTURE +.sp +The result of the DNS resolution and validation is returned as \fIstruct +ub_result\fP\&. +The result structure contains the following entries: +.INDENT 0.0 +.INDENT 3.5 +.sp .nf - struct ub_result { - char* qname; /* text string, original question */ - int qtype; /* type code asked for */ - int qclass; /* class code asked for */ - char** data; /* array of rdata items, NULL terminated*/ - int* len; /* array with lengths of rdata items */ - char* canonname; /* canonical name of result */ - int rcode; /* additional error code in case of no data */ - void* answer_packet; /* full network format answer packet */ - int answer_len; /* length of packet in octets */ - int havedata; /* true if there is data */ - int nxdomain; /* true if nodata because name does not exist */ - int secure; /* true if result is secure */ - int bogus; /* true if a security failure happened */ - char* why_bogus; /* string with error if bogus */ - int was_ratelimited; /* true if the query was ratelimited (SERVFAIL) by unbound */ - int ttl; /* number of seconds the result is valid */ - }; +.ft C +struct ub_result { + char* qname; /* text string, original question */ + int qtype; /* type code asked for */ + int qclass; /* class code asked for */ + char** data; /* array of rdata items, NULL terminated*/ + int* len; /* array with lengths of rdata items */ + char* canonname; /* canonical name of result */ + int rcode; /* additional error code in case of no data */ + void* answer_packet; /* full network format answer packet */ + int answer_len; /* length of packet in octets */ + int havedata; /* true if there is data */ + int nxdomain; /* true if nodata because name does not exist */ + int secure; /* true if result is secure */ + int bogus; /* true if a security failure happened */ + char* why_bogus; /* string with error if bogus */ + int was_ratelimited; /* true if the query was ratelimited (SERVFAIL) by unbound */ + int ttl; /* number of seconds the result is valid */ +}; +.ft P .fi -.P -If both secure and bogus are false, security was not enabled for the -domain of the query. Else, they are not both true, one of them is true. -.SH "RETURN VALUES" -Many routines return an error code. The value 0 (zero) denotes no error -happened. Other values can be passed to -.B ub_strerror -to obtain a readable error string. -.B ub_strerror -returns a zero terminated string. -.B ub_ctx_create -returns NULL on an error (a malloc failure). -.B ub_poll -returns true if some information may be available, false otherwise. -.B ub_fd -returns a file descriptor or \-1 on error. -.B ub_ctx_config -and -.B ub_ctx_resolvconf -attempt to leave errno informative on a function return with file read failure. -.SH "SEE ALSO" -\fIunbound.conf\fR(5), -\fIunbound\fR(8). -.SH "AUTHORS" -.B Unbound -developers are mentioned in the CREDITS file in the distribution. +.UNINDENT +.UNINDENT +.sp +If both secure and bogus are false, security was not enabled for the domain of +the query. +Else, they are not both true, one of them is true. +.SH RETURN VALUES +.sp +Many routines return an error code. +The value 0 (zero) denotes no error happened. +Other values can be passed to \fBub_strerror\fP to obtain a readable error +string. +\fBub_strerror\fP returns a zero terminated string. +\fBub_ctx_create\fP returns NULL on an error (a malloc failure). +\fBub_poll\fP returns true if some information may be available, false otherwise. +\fBub_fd\fP returns a file descriptor or \-1 on error. +\fBub_ctx_config\fP and \fBub_ctx_resolvconf\fP attempt to leave errno informative +on a function return with file read failure. +.SH SEE ALSO +.sp +\fI\%unbound.conf(5)\fP, \fI\%unbound(8)\fP\&. +.SH AUTHOR +Unbound developers are mentioned in the CREDITS file in the distribution. +.SH COPYRIGHT +1999-2025, NLnet Labs +.\" Generated by docutils manpage writer. +. diff --git a/contrib/unbound/doc/unbound-anchor.8 b/contrib/unbound/doc/unbound-anchor.8 index 23c1dd4b060f..ba8bd843a67c 100644 --- a/contrib/unbound/doc/unbound-anchor.8 +++ b/contrib/unbound/doc/unbound-anchor.8 @@ -1,189 +1,300 @@ -.TH "unbound-anchor" "8" "Jul 16, 2025" "NLnet Labs" "unbound 1.23.1" -.\" -.\" unbound-anchor.8 -- unbound anchor maintenance utility manual -.\" -.\" Copyright (c) 2008, NLnet Labs. All rights reserved. -.\" -.\" See LICENSE for the license. -.\" -.\" -.SH "NAME" -.B unbound\-anchor -\- Unbound anchor utility. -.SH "SYNOPSIS" -.B unbound\-anchor -.RB [ opts ] -.SH "DESCRIPTION" -.B Unbound\-anchor -performs setup or update of the root trust anchor for DNSSEC validation. -The program fetches the trust anchor with the method from RFC7958 when -regular RFC5011 update fails to bring it up to date. +.\" Man page generated from reStructuredText. +. +. +.nr rst2man-indent-level 0 +. +.de1 rstReportMargin +\\$1 \\n[an-margin] +level \\n[rst2man-indent-level] +level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] +- +\\n[rst2man-indent0] +\\n[rst2man-indent1] +\\n[rst2man-indent2] +.. +.de1 INDENT +.\" .rstReportMargin pre: +. RS \\$1 +. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] +. nr rst2man-indent-level +1 +.\" .rstReportMargin post: +.. +.de UNINDENT +. RE +.\" indent \\n[an-margin] +.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] +.nr rst2man-indent-level -1 +.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] +.in \\n[rst2man-indent\\n[rst2man-indent-level]]u +.. +.TH "UNBOUND-ANCHOR" "8" "Oct 22, 2025" "1.24.1" "Unbound" +.SH NAME +unbound-anchor \- Unbound 1.24.1 anchor utility. +.SH SYNOPSIS +.sp +\fBunbound\-anchor\fP [\fBopts\fP] +.SH DESCRIPTION +.sp +\fBunbound\-anchor\fP performs setup or update of the root trust anchor for DNSSEC +validation. +The program fetches the trust anchor with the method from \fI\%RFC 7958\fP when +regular \fI\%RFC 5011\fP update fails to bring it up to date. It can be run (as root) from the commandline, or run as part of startup -scripts. Before you start the \fIunbound\fR(8) DNS server. -.P +scripts. +Before you start the \fI\%unbound(8)\fP DNS server. +.sp Suggested usage: -.P +.INDENT 0.0 +.INDENT 3.5 +.sp .nf - # in the init scripts. - # provide or update the root anchor (if necessary) - unbound-anchor \-a "/var/unbound/root.key" - # Please note usage of this root anchor is at your own risk - # and under the terms of our LICENSE (see source). - # - # start validating resolver - # the unbound.conf contains: - # auto-trust-anchor-file: "/var/unbound/root.key" - unbound \-c unbound.conf +.ft C +# in the init scripts. +# provide or update the root anchor (if necessary) +unbound\-anchor \-a \(dq/var/unbound/root.key\(dq +# Please note usage of this root anchor is at your own risk +# and under the terms of our LICENSE (see source). +# +# start validating resolver +# the unbound.conf contains: +# auto\-trust\-anchor\-file: \(dq/var/unbound/root.key\(dq +unbound \-c unbound.conf +.ft P .fi -.P -This tool provides builtin default contents for the root anchor and root -update certificate files. -.P +.UNINDENT +.UNINDENT +.sp +This tool provides builtin default contents for the root anchor and root update +certificate files. +.sp It tests if the root anchor file works, and if not, and an update is possible, attempts to update the root anchor using the root update certificate. -It performs a https fetch of root-anchors.xml and checks the results (RFC7958), -if all checks are successful, it updates the root anchor file. Otherwise -the root anchor file is unchanged. It performs RFC5011 tracking if the -DNSSEC information available via the DNS makes that possible. -.P -It does not perform an update if the certificate is expired, if the network -is down or other errors occur. -.P +It performs a https fetch of +\fI\%root\-anchors.xml\fP +and checks the results (\fI\%RFC 7958\fP); if all checks are successful, it updates +the root anchor file. +Otherwise the root anchor file is unchanged. +It performs \fI\%RFC 5011\fP tracking if the DNSSEC information available via the +DNS makes that possible. +.sp +It does not perform an update if the certificate is expired, if the network is +down or other errors occur. +.sp The available options are: +.INDENT 0.0 .TP -.B \-a \fIfile +.B \-a The root anchor key file, that is read in and written out. -Default is /var/unbound/root.key. *** 11840 LINES SKIPPED *** From nobody Tue May 26 16:48:42 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPzGm3Fd0z6g6gl for ; Tue, 26 May 2026 16:48: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPzGl4KXqz4J12 for ; Tue, 26 May 2026 16:48:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779814127; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DaLWM3oIex8maG72iYCJdcIufYgf2lMx8Qv18cWS85c=; b=iKBz/pLShcpGpOXyoJtJZfLgy4d4knKclZNsBP8QOumC7m/ta2LLZqmyQVaNg++IptXBs1 7OEqz18UybhVKsL2kwBkbVZS6eXcj2ZoSig3zQCxP4L+B6CtLxt/KVVL8VeO62cHbsc/+K rSowK0RKVpGDcb1iGLON0DM+W9LetUNLYfQdoEGuq4tkmQtYcr/CHW8V97IAVfa6jTl1OL pYPcmVgWB/ZHbtdQq5tq6UnAesZe/a8Jl0f6h/32T63ShpKMTRoPJcyPU7e8a2ltrA+Gn8 baw0uLK53JqycpFOy5xJFPFuJGP27Dl0StPpNDVruu9Gsc6ocwC/ow6pWfZDLw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779814127; a=rsa-sha256; cv=none; b=oVtIpdmow2M+5n7nb0p/R6L/yEhRzxhMGJ0lwlDXAsuiDVX5kB7TGZt347oy0b/1uBduKB 9PnF33ac7lQQgDfGiBMBW3VbPhQT3L85bgSNqiaXZsQn/7gywzVZNVIVG6fFeWBjzKyIDh VY2KDaYuq88fsd2ZopNF4rejFtGTZPRQU1tmxBjx97zXgB8kKt2geX9gzNjIpJzGSBI1wn s3RcWlnbVT/utsJJsXYuDIxnQbhp5yLsQqQSBMWXCr1+7LLi2OmosV2c+ELhUN9P5CSlkr D1wog2CARCxNFkYWBkDXzcbvJDWQA0R402Tan2Jr8YGNhLT0T1TNYF6NsWf0cQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779814127; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DaLWM3oIex8maG72iYCJdcIufYgf2lMx8Qv18cWS85c=; b=hCHCWw9ZC0k+KNiJjVPJqvxZimq1SgQOIbq6EyvXGnmuEeHS3BFXuWFBCvKZmSAn4fXryt PpUV1MFS15gTpL5bhOZN0niHN3kPI9Oizg9Pm3QF+dozTamDUu8d8V7SBntGTa8WRpGB5v 2rtPs4CMhvFD9Pj5B5Fayqa+VDoRpVFFMdyxbOIcWOcgGKdBmnJOoSs5C4zU5Kj9PevKEi +DvGcEKTj8OpL1hlaSd2ElrJ/C+GaYkSXmMs6PQPvKQpQmViCkT4j4Dq8Qlt88Jmrab5qg ubJzEjVhnpVmmYP6DxZbvHc8sBL6gw4CVtFcUhxrTGya6wvynKPqWYxPpAYoMQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPzGl3M9Rz4bW for ; Tue, 26 May 2026 16:48:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35d71 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 26 May 2026 16:48:42 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 4a866919c37b - stable/15 - ldns: Belatedly update for OpenSSL 3.0.0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 4a866919c37b9567fc62b09d14b8a21fdfe3aa6f Auto-Submitted: auto-generated Date: Tue, 26 May 2026 16:48:42 +0000 Message-Id: <6a15ceea.35d71.10a72f24@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=4a866919c37b9567fc62b09d14b8a21fdfe3aa6f commit 4a866919c37b9567fc62b09d14b8a21fdfe3aa6f Author: Dag-Erling Smørgrav AuthorDate: 2026-05-22 13:56:16 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-26 16:48:27 +0000 ldns: Belatedly update for OpenSSL 3.0.0 MFC after: 1 week Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D57168 (cherry picked from commit cbe037c970580efc40eeca4715ac51e4d0fea082) ldns: Mark these commits as merged (cherry picked from commit 2bc6aa3c41d0dc330fefa6363a23d2cfa0253f73) (cherry picked from commit 597a090ff2ab868242e4ec1cdec7469edbe41c50) (cherry picked from commit 399f9ca49b6ecc7fc9bd8b2a0fd487fea4570a65) (cherry picked from commit f103898935e1b709adbdaed5e0b10f99a17b9a4a) --- contrib/ldns/ldns/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/ldns/ldns/config.h b/contrib/ldns/ldns/config.h index 3ac94403296f..0fe9f2c3dbce 100644 --- a/contrib/ldns/ldns/config.h +++ b/contrib/ldns/ldns/config.h @@ -118,7 +118,7 @@ #define HAVE_EVP_PKEY_BASE_ID 1 /* Define to 1 if you have the `EVP_PKEY_get_base_id' function. */ -/* #undef HAVE_EVP_PKEY_GET_BASE_ID */ +#define HAVE_EVP_PKEY_GET_BASE_ID 1 /* Define to 1 if you have the `EVP_PKEY_keygen' function. */ #define HAVE_EVP_PKEY_KEYGEN 1 From nobody Tue May 26 16:48:51 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPzGq5TLYz6g6y2 for ; Tue, 26 May 2026 16:48: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPzGq2M6Lz4J1F for ; Tue, 26 May 2026 16:48:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779814131; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZTybP+B0UftvyO+Ne9Bo8OI7Hj2SXKuAHK5DA3X+Ewg=; b=nDNxS2TqS14Fz5ZZHTiHJb2D49F8nfhOOXiM8e0DmyOx2MJLqksok62gPaNxHvorUq8Vlw 1BzAum1iBgxbJPjXTGBQf6DxyUJUFykkFt+ZdZua5Q5VcmYUGhcbcSs88ZgU68vQ51JnJJ pLBr5WKNO6aBClwO4fRQF45bOkA+oKL6yXX0lpcNN7H78lJlGoJjmpuztLbuqd9WT/V/wO zCGrUc8RyUp5Kd+LIp6AZnQpcNr0LgDels+pOlHgVtlbCQKB8rH9lz3LxTP5Co4waA37AV UQ9k3USDgCkG7FUDc6A8ompXIGLZknSthdn6VINUyX06tWkCBtDBQGW7xZ1d9w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779814131; a=rsa-sha256; cv=none; b=MVVCSYs5/xGvUrU76sxvNLSEXr6oBxJ7flPuK6fLxH6y1YkqzxqCcZ7zIk33nMYaEwgTdH rQzOEtb7wxq1HSjR9A3yz5eS7wB7v1zUM3M7D8neQSU+EivBvhRIpqJ8lo/PmpcmzlM4le P1ktqmHZCWr3yE0Jkh6KlUgXl1EmB37R0F+RXnZb/oUcwheU73rt6Sm1AcfnMmwmfEkbm6 h3Gb3l31QA1UGOBiFWx3fkpZDHxrZBa0ftLmtQv4D5qGAJEf2cTHHRPQogkzNvNsI1qJjw DoQf1J56pzecI2kwz1uAym/u9PUDeHwE5KBlroNf8JNUiAGj8ZOIGGaZFBhOiw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779814131; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZTybP+B0UftvyO+Ne9Bo8OI7Hj2SXKuAHK5DA3X+Ewg=; b=e5q1/9Gc4PHZoK3h3S8VbRb5peIZJf5WLzQ48SfFbEY/CFPjshtIee2A44FQ0fBhvctbZP pCFlb1TziuHi0FJOw2z44vJThXI1SU/je2eq1Ofad9oxXO8jn2g4uS0t8jhFBYuKMIGzH2 cpxOs54oo4zSl1g+hVpjtIe+l7FpVV8xigYIZdSHwlOkyiqVmQECABxdAgcEy6n2waDNux tvVLDkNbyBkOHXSAMLoJ8H9VnIjhDAuj4M3frv4NdFhvjb06gfKE61qxmsOnmK5FyPWwfv AKFd4QY98Td2c7sg8GB73gTD0uf8DClK5Ef9Vv2LS/mTW3fwFQwD+QJa2bq71A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPzGq1wZQz5Vr for ; Tue, 26 May 2026 16:48:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 361f8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 26 May 2026 16:48:51 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: d2a10ff4cb84 - stable/15 - unbound: Update to 1.25.1 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: d2a10ff4cb84d7656146b1dea74dcff55a0e1413 Auto-Submitted: auto-generated Date: Tue, 26 May 2026 16:48:51 +0000 Message-Id: <6a15cef3.361f8.449a8c41@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=d2a10ff4cb84d7656146b1dea74dcff55a0e1413 commit d2a10ff4cb84d7656146b1dea74dcff55a0e1413 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-23 01:57:43 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-26 16:48:28 +0000 unbound: Update to 1.25.1 Release notes at https://nlnetlabs.nl/news/2026/May/20/unbound-1.25.1-released/ Merge commit '22e58f330a151944c24e010d23ec3881df6681b6' Security: CVE-2026-33278 Security: CVE-2026-42944 Security: CVE-2026-42959 Security: CVE-2026-32792 Security: CVE-2026-40622 Security: CVE-2026-41292 Security: CVE-2026-42534 Security: CVE-2026-42923 Security: CVE-2026-42960 Security: CVE-2026-44390 Security: CVE-2026-44608 MFC after: 1 week (cherry picked from commit 50caa0ea0c16499c40e785b5aa37053b180b2830) --- contrib/unbound/aclocal.m4 | 857 +++++++----- contrib/unbound/configure | 1929 +++++++++++++++++++--------- contrib/unbound/configure.ac | 5 +- contrib/unbound/dnscrypt/dnscrypt.c | 2 +- contrib/unbound/doc/Changelog | 30 + contrib/unbound/doc/README | 2 +- contrib/unbound/doc/example.conf | 2 +- contrib/unbound/doc/example.conf.in | 2 +- contrib/unbound/doc/libunbound.3 | 4 +- contrib/unbound/doc/libunbound.3.in | 4 +- contrib/unbound/doc/unbound-anchor.8 | 4 +- contrib/unbound/doc/unbound-anchor.8.in | 4 +- contrib/unbound/doc/unbound-checkconf.8 | 4 +- contrib/unbound/doc/unbound-checkconf.8.in | 4 +- contrib/unbound/doc/unbound-control.8 | 4 +- contrib/unbound/doc/unbound-control.8.in | 4 +- contrib/unbound/doc/unbound-host.1 | 4 +- contrib/unbound/doc/unbound-host.1.in | 4 +- contrib/unbound/doc/unbound.8 | 4 +- contrib/unbound/doc/unbound.8.in | 4 +- contrib/unbound/doc/unbound.conf.5 | 4 +- contrib/unbound/doc/unbound.conf.5.in | 4 +- contrib/unbound/install-sh | 178 ++- contrib/unbound/iterator/iter_scrub.c | 8 +- contrib/unbound/ltmain.sh | 1566 +++++++++++++--------- contrib/unbound/services/cache/dns.c | 8 +- contrib/unbound/services/cache/rrset.c | 10 + contrib/unbound/services/mesh.c | 14 +- contrib/unbound/services/mesh.h | 6 + contrib/unbound/services/rpz.c | 10 +- contrib/unbound/util/configparser.c | 896 ++++++------- contrib/unbound/util/configparser.h | 4 +- contrib/unbound/util/data/msgencode.c | 38 +- contrib/unbound/util/data/msgencode.h | 4 +- contrib/unbound/util/data/msgparse.c | 19 +- contrib/unbound/validator/val_neg.c | 28 +- contrib/unbound/validator/val_nsec3.c | 76 +- contrib/unbound/validator/val_nsec3.h | 6 + contrib/unbound/validator/val_utils.c | 4 +- lib/libunbound/config.h | 6 +- 40 files changed, 3619 insertions(+), 2147 deletions(-) diff --git a/contrib/unbound/aclocal.m4 b/contrib/unbound/aclocal.m4 index bf3c57e2fd9f..375ee7a86df3 100644 --- a/contrib/unbound/aclocal.m4 +++ b/contrib/unbound/aclocal.m4 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.16.2 -*- Autoconf -*- +# generated automatically by aclocal 1.18.1 -*- Autoconf -*- -# Copyright (C) 1996-2020 Free Software Foundation, Inc. +# Copyright (C) 1996-2025 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,7 +14,8 @@ m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # -# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. +# Copyright (C) 1996-2001, 2003-2019, 2021-2024 Free Software +# Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives @@ -22,13 +23,13 @@ m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl -# Copyright (C) 2014 Free Software Foundation, Inc. +# Copyright (C) 2024 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of of the License, or +# the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, if you @@ -45,7 +46,7 @@ m4_define([_LT_COPYING], [dnl # along with this program. If not, see . ]) -# serial 58 LT_INIT +# serial 63 LT_INIT # LT_PREREQ(VERSION) @@ -73,7 +74,7 @@ esac # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], -[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK +[AC_PREREQ([2.64])dnl We use AC_PATH_PROGS_FEATURE_CHECK AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl @@ -195,6 +196,7 @@ m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl +m4_require([_LT_DECL_FILECMD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl @@ -233,8 +235,8 @@ esac ofile=libtool can_build_shared=yes -# All known linkers require a '.a' archive for static linking (except MSVC, -# which needs '.lib'). +# All known linkers require a '.a' archive for static linking (except MSVC and +# ICC, which need '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld @@ -622,7 +624,7 @@ m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before -# AC_OUTPUT is called), incase it is used in configure for compilation +# AC_OUTPUT is called), in case it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} @@ -657,9 +659,9 @@ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. -Copyright (C) 2011 Free Software Foundation, Inc. +Copyright (C) 2024 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation -gives unlimited permision to copy, distribute and modify it." +gives unlimited permission to copy, distribute and modify it." while test 0 != $[#] do @@ -736,7 +738,6 @@ _LT_CONFIG_SAVE_COMMANDS([ cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. @@ -786,7 +787,7 @@ _LT_EOF # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" \ + $SED '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || @@ -979,6 +980,7 @@ _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE + # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ @@ -1029,6 +1031,21 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ rm -f conftest.* fi]) + # Feature test to disable chained fixups since it is not + # compatible with '-undefined dynamic_lookup' + AC_CACHE_CHECK([for -no_fixup_chains linker flag], + [lt_cv_support_no_fixup_chains], + [ save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -Wl,-no_fixup_chains" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM([],[])], + lt_cv_support_no_fixup_chains=yes, + lt_cv_support_no_fixup_chains=no + ) + LDFLAGS=$save_LDFLAGS + ] + ) + AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no @@ -1048,12 +1065,12 @@ int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD - echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD - $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD + echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD + $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF -int main() { return 0;} +int main(void) { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err @@ -1073,23 +1090,37 @@ _LT_EOF _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - 10.[[012]][[,.]]*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + darwin*) + case $MACOSX_DEPLOYMENT_TARGET,$host in + 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; + *) + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' + if test yes = "$lt_cv_support_no_fixup_chains"; then + AS_VAR_APPEND([_lt_dar_allow_undefined], [' $wl-no_fixup_chains']) + fi + ;; esac ;; esac if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi + _lt_dar_needs_single_mod=no + case $host_os in + rhapsody* | darwin1.*) + _lt_dar_needs_single_mod=yes ;; + darwin*) + # When targeting Mac OS X 10.4 (darwin 8) or later, + # -single_module is the default and -multi_module is unsupported. + # The toolchain on macOS 10.14 (darwin 18) and later cannot + # target any OS version that needs -single_module. + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*-darwin[[567]].*|10.[[0-3]],*-darwin[[5-9]].*|10.[[0-3]],*-darwin1[[0-7]].*) + _lt_dar_needs_single_mod=yes ;; + esac + ;; + esac if test yes = "$lt_cv_ld_exported_symbols_list"; then _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else @@ -1132,12 +1163,12 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES], output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" + _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" + _LT_TAGVAR(module_expsym_cmds, $1)="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" m4_if([$1], [CXX], -[ if test yes != "$lt_cv_apple_cc_single_mod"; then +[ if test yes = "$_lt_dar_needs_single_mod" -a yes != "$lt_cv_apple_cc_single_mod"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" + _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi ],[]) else @@ -1251,7 +1282,8 @@ _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], -[AC_MSG_CHECKING([for sysroot]) +[m4_require([_LT_DECL_SED])dnl +AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], [Search for dependent libraries within DIR (or the compiler's sysroot @@ -1264,11 +1296,13 @@ lt_sysroot= case $with_sysroot in #( yes) if test yes = "$GCC"; then - lt_sysroot=`$CC --print-sysroot 2>/dev/null` + # Trim trailing / since we'll always append absolute paths and we want + # to avoid //, if only for less confusing output for the user. + lt_sysroot=`$CC --print-sysroot 2>/dev/null | $SED 's:/\+$::'` fi ;; #( /*) - lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` ;; #( no|'') ;; #( @@ -1298,7 +1332,7 @@ ia64-*-hpux*) # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; @@ -1315,7 +1349,7 @@ ia64-*-hpux*) echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test yes = "$lt_cv_prog_gnu_ld"; then - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; @@ -1327,7 +1361,7 @@ ia64-*-hpux*) ;; esac else - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; @@ -1349,7 +1383,7 @@ mips64*-*linux*) echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then emul=elf - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; @@ -1357,7 +1391,7 @@ mips64*-*linux*) emul="${emul}64" ;; esac - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; @@ -1365,7 +1399,7 @@ mips64*-*linux*) emul="${emul}ltsmip" ;; esac - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; @@ -1376,7 +1410,7 @@ mips64*-*linux*) ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) +s390*-*linux*|s390*-*tpf*|sparc*-*linux*|x86_64-gnu*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when @@ -1385,14 +1419,14 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # not appear in the list. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in + case `$FILECMD conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; - x86_64-*linux*) - case `/usr/bin/file conftest.o` in + x86_64-*linux*|x86_64-gnu*) + case `$FILECMD conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; @@ -1420,7 +1454,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; - x86_64-*linux*) + x86_64-*linux*|x86_64-gnu*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*linux*) @@ -1460,7 +1494,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in + case `$FILECMD conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) @@ -1499,9 +1533,22 @@ need_locks=$enable_libtool_lock m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} -: ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) -_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) + +# Use ARFLAGS variable as AR's operation code to sync the variable naming with +# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have +# higher priority because that's what people were doing historically (setting +# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS +# variable obsoleted/removed. + +test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} +lt_ar_flags=$AR_FLAGS +_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) + +# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override +# by AR_FLAGS because that was never working and AR_FLAGS is about to die. +_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], + [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no @@ -1540,7 +1587,7 @@ AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) -AC_CHECK_TOOL(RANLIB, ranlib, :) +AC_REQUIRE([AC_PROG_RANLIB]) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) @@ -1551,15 +1598,8 @@ old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then - case $host_os in - bitrig* | openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" - ;; - esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in @@ -1691,14 +1731,14 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. + gnu* | ironclad*) + # Under GNU Hurd and Ironclad, this test is not required because there + # is no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; - cygwin* | mingw* | cegcc*) + cygwin* | mingw* | windows* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, @@ -1720,7 +1760,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl lt_cv_sys_max_cmd_len=8192; ;; - bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) + darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` @@ -1763,7 +1803,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` + lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi @@ -1880,11 +1920,11 @@ else /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); +int fnord (void) __attribute__((visibility("default"))); #endif -int fnord () { return 42; } -int main () +int fnord (void) { return 42; } +int main (void) { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; @@ -1941,7 +1981,7 @@ else lt_cv_dlopen_self=yes ;; - mingw* | pw32* | cegcc*) + mingw* | windows* | pw32* | cegcc*) lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; @@ -2213,26 +2253,35 @@ m4_defun([_LT_CMD_STRIPLIB], striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) +if test -z "$STRIP"; then + AC_MSG_RESULT([no]) else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP"; then + if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + old_striplib="$STRIP --strip-debug" + striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT([yes]) + else + case $host_os in + darwin*) + # FIXME - insert some real tests, host_os isn't really good enough striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) - else + ;; + freebsd*) + if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then + old_striplib="$STRIP --strip-debug" + striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi + ;; + *) AC_MSG_RESULT([no]) - fi - ;; - *) - AC_MSG_RESULT([no]) - ;; - esac + ;; + esac + fi fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) @@ -2300,7 +2349,7 @@ if test yes = "$GCC"; then *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in - mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; + mingw* | windows* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` @@ -2358,7 +2407,7 @@ BEGIN {RS = " "; FS = "/|\n";} { # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in - mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ + mingw* | windows* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` @@ -2433,7 +2482,7 @@ aix[[4-9]]*) # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl - # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. + # linker flag in LDFLAGS as well, or --enable-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the @@ -2527,7 +2576,7 @@ bsdi[[45]]*) # libtool to hard-code these into programs ;; -cygwin* | mingw* | pw32* | cegcc*) +cygwin* | mingw* | windows* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no @@ -2538,15 +2587,29 @@ cygwin* | mingw* | pw32* | cegcc*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' + # If user builds GCC with multilib enabled, + # it should just install on $(libdir) + # not on $(libdir)/../bin or 32 bits dlls would override 64 bit ones. + if test xyes = x"$multilib"; then + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + $install_prog $dir/$dlname $destdir/$dlname~ + chmod a+x $destdir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib $destdir/$dlname'\'' || exit \$?; + fi' + else + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + fi postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' @@ -2555,30 +2618,30 @@ cygwin* | mingw* | pw32* | cegcc*) case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' + soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; - mingw* | cegcc*) + mingw* | windows* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' + library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; - *,cl*) - # Native MSVC + *,cl* | *,icl*) + # Native MSVC or ICC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in - mingw*) + mingw* | windows*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' @@ -2591,7 +2654,7 @@ m4_if([$1], [],[ done IFS=$lt_save_ifs # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form @@ -2628,7 +2691,7 @@ m4_if([$1], [],[ ;; *) - # Assume MSVC wrapper + # Assume MSVC and ICC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; @@ -2661,7 +2724,7 @@ dgux*) shlibpath_var=LD_LIBRARY_PATH ;; -freebsd* | dragonfly*) +freebsd* | dragonfly* | midnightbsd*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then @@ -2685,7 +2748,21 @@ freebsd* | dragonfly*) need_version=yes ;; esac - shlibpath_var=LD_LIBRARY_PATH + case $host_cpu in + powerpc64) + # On FreeBSD bi-arch platforms, a different variable is used for 32-bit + # binaries. See . + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[int test_pointer_size[sizeof (void *) - 5]; + ]])], + [shlibpath_var=LD_LIBRARY_PATH], + [shlibpath_var=LD_32_LIBRARY_PATH]) + ;; + *) + shlibpath_var=LD_LIBRARY_PATH + ;; + esac case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes @@ -2715,8 +2792,9 @@ haiku*) soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes + sys_lib_search_path_spec='/boot/system/non-packaged/develop/lib /boot/system/develop/lib' + sys_lib_dlsearch_path_spec='/boot/home/config/non-packaged/lib /boot/home/config/lib /boot/system/non-packaged/lib /boot/system/lib' + hardcode_into_libs=no ;; hpux9* | hpux10* | hpux11*) @@ -2826,7 +2904,7 @@ linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no - library_names_spec='$libname$release$shared_ext' + library_names_spec='$libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH @@ -2838,8 +2916,9 @@ linux*android*) hardcode_into_libs=yes dynamic_linker='Android linker' - # Don't embed -rpath directories since the linker doesn't support them. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + # -rpath works at least for libraries that are not overridden by + # libraries installed in system locations. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' ;; # This must be glibc/ELF. @@ -2876,7 +2955,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) # Add ABI-specific directories to the system library path. sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" - # Ideally, we could use ldconfig to report *all* directores which are + # Ideally, we could use ldconfig to report *all* directories which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, @@ -2896,6 +2975,18 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) dynamic_linker='GNU/Linux ld.so' ;; +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + netbsd*) version_type=sunos need_lib_prefix=no @@ -2914,6 +3005,18 @@ netbsd*) hardcode_into_libs=yes ;; +*-mlibc) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + dynamic_linker='mlibc ld.so' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' @@ -2933,7 +3036,7 @@ newsos6) dynamic_linker='ldqnx.so' ;; -openbsd* | bitrig*) +openbsd*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no @@ -2993,6 +3096,17 @@ rdos*) dynamic_linker=no ;; +serenity*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + dynamic_linker='SerenityOS LibELF' + ;; + solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no @@ -3090,6 +3204,21 @@ uts4*) shlibpath_var=LD_LIBRARY_PATH ;; +emscripten*) + version_type=none + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext' + soname_spec='$libname$release$shared_ext' + finish_cmds= + dynamic_linker="Emscripten linker" + _LT_COMPILER_PIC($1)='-fPIC' + _LT_TAGVAR(archive_cmds, $1)='$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib -s EXPORTED_FUNCTIONS=@$output_objdir/$soname.expsym' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(no_undefined_flag, $1)= + ;; + *) dynamic_linker=no ;; @@ -3265,7 +3394,7 @@ if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in - *-*-mingw*) + *-*-mingw* | *-*-windows*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) @@ -3374,7 +3503,7 @@ case $reload_flag in esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in - cygwin* | mingw* | pw32* | cegcc*) + cygwin* | mingw* | windows* | pw32* | cegcc*) if test yes != "$GCC"; then reload_cmds=false fi @@ -3446,7 +3575,6 @@ lt_cv_deplibs_check_method='unknown' # 'none' -- dependencies not supported. # 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # that responds to the $file_magic_cmd with a given extended regex. # If you have 'file' or equivalent on your system and you're not sure @@ -3463,7 +3591,7 @@ beos*) bsdi[[45]]*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_cmd='$FILECMD -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; @@ -3473,7 +3601,7 @@ cygwin*) lt_cv_file_magic_cmd='func_win32_libid' ;; -mingw* | pw32*) +mingw* | windows* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. @@ -3482,7 +3610,7 @@ mingw* | pw32*) lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. - lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64|pe-aarch64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; @@ -3497,14 +3625,14 @@ darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; -freebsd* | dragonfly*) +freebsd* | dragonfly* | midnightbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_cmd=$FILECMD lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac @@ -3518,7 +3646,7 @@ haiku*) ;; hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_cmd=$FILECMD case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' @@ -3555,7 +3683,11 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; -netbsd*) +*-mlibc) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else @@ -3565,7 +3697,7 @@ netbsd*) newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_cmd=$FILECMD lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; @@ -3573,7 +3705,7 @@ newos6*) lt_cv_deplibs_check_method=pass_all ;; -openbsd* | bitrig*) +openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then *** 12238 LINES SKIPPED *** From nobody Tue May 26 16:48:48 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPzGm3Q2Jz6g710 for ; Tue, 26 May 2026 16:48: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPzGm1lmDz4JDC for ; Tue, 26 May 2026 16:48:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779814128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c4KTu9Qh2ALrVAZ1Yg76DWZLtruMNhLVjAibCb79yio=; b=VCM+8cOIuXusGOz4jeHrf0KkULzCBce/Ext5tEC2zLD5wnWyj8jHcb3A5ebyDkXdcoblju Lz9Qecm5/C5QSKXBGKcYLSkHWUni1v1nKunvvkegzlLe94DnM/LT1Vkt0Puc2sQHX2Saml qFY4ZaAkbwDrFAvI2uRTCajbO7eB0Ylfs175D8hhRTPiDQKfTSfZxtGQGaljvi6CrHcXNi 0EmgSJBS7OjZT6bFI78pmqijFziJ73pUzIZYorR/3d2hK4fA1qttzFkd9s+Ql3kkvGIGr/ Q5HkTK/2poH0Omm4q+60RoxEhFRdZv6KPqV8PcxfyV3cPlp3oMXhF0MJXkZ2RA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779814128; a=rsa-sha256; cv=none; b=Isbutlw/Bj40Cuw1yxgZ3cUMfy78ozxSko2nQY4VGgFgBElZC5PTuuCTQGDdMd8qspSwT8 sdQ3pbYG6kG5OaaTi5stMH8x8TdwB6qFlLiFWBlfFn6gcQG4aQF6c/cVZQhkhibaOF+VoP mga07TEocwxjKuQ0tG1IxYS1HqfaXchr8+2QSuoWStUC9RkoDJ+l0/wnbey1Lgjcfnly6g nzOPryv1KRpRNah5PfXRH+vRcLpK+UUxvLWH1YlTKo5cn14YUOtw2NvFGGo7NpvaXB0DI3 Qul2nWZ+t+A9NTJ8jvMl6pQJobiAkk24Y6AzTWHegTxunoV95AmN5JzeA//l1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779814128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c4KTu9Qh2ALrVAZ1Yg76DWZLtruMNhLVjAibCb79yio=; b=ignK2UWglQ/K82f/nyp0eXMuLxMm6W9jff4Rz2UR0zG0JnScVgUR81PNnnxwZaNtTzjUNG DZQcOeUQVxQ6jC3UHDiXjqPiP/rIG9ww7cuYFZ/gdElDE54iZTbphX9vovsoKZJ30DWERx TomyOcXP4S/zwgGss9BNM+02DiIIv8ol0PgAJBBQyKgizS+blwcYfr0Yr+7bVfZMixiKxj ls3SE03tOd6ed0GQ279PNhLCPXNoA6nXIGqHiGP9hrYU04hwhzva+KarEdE/kRM9dm8Pr+ mfKCpBWEkAbokRI3IQOW7Q1IWEUsmE20lFAdxRSR69347h0RFOpfHog8c0qA5g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPzGm1FQ8z4bX for ; Tue, 26 May 2026 16:48:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35d70 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 26 May 2026 16:48:48 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 1c869f005d76 - stable/15 - unbound: Update to 1.24.2 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 1c869f005d760131cf49b965e67d4655c237f945 Auto-Submitted: auto-generated Date: Tue, 26 May 2026 16:48:48 +0000 Message-Id: <6a15cef0.35d70.cacebe3@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=1c869f005d760131cf49b965e67d4655c237f945 commit 1c869f005d760131cf49b965e67d4655c237f945 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-22 20:16:26 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-26 16:48:28 +0000 unbound: Update to 1.24.2 Merge commit 'ec5b94f552d7cb2a9d456c67e9941bcf5e3698bf' This is purely cosmetic as we already had the functional changes. MFC after: 1 week (cherry picked from commit 22fa41b4e81ad91d11e28f1837764730d744d4e4) --- contrib/unbound/config.h.in | 10 +- contrib/unbound/configure | 4673 ++++++++++++++++------------ contrib/unbound/configure.ac | 3 +- contrib/unbound/doc/README | 2 +- contrib/unbound/doc/example.conf | 2 +- contrib/unbound/doc/example.conf.in | 2 +- contrib/unbound/doc/libunbound.3 | 4 +- contrib/unbound/doc/libunbound.3.in | 4 +- contrib/unbound/doc/unbound-anchor.8 | 4 +- contrib/unbound/doc/unbound-anchor.8.in | 4 +- contrib/unbound/doc/unbound-checkconf.8 | 4 +- contrib/unbound/doc/unbound-checkconf.8.in | 4 +- contrib/unbound/doc/unbound-control.8 | 4 +- contrib/unbound/doc/unbound-control.8.in | 4 +- contrib/unbound/doc/unbound-host.1 | 4 +- contrib/unbound/doc/unbound-host.1.in | 4 +- contrib/unbound/doc/unbound.8 | 4 +- contrib/unbound/doc/unbound.8.in | 4 +- contrib/unbound/doc/unbound.conf.5 | 4 +- contrib/unbound/doc/unbound.conf.5.in | 4 +- lib/libunbound/config.h | 16 +- 21 files changed, 2774 insertions(+), 1990 deletions(-) diff --git a/contrib/unbound/config.h.in b/contrib/unbound/config.h.in index a2b3f33c32be..4f89bfb21614 100644 --- a/contrib/unbound/config.h.in +++ b/contrib/unbound/config.h.in @@ -173,11 +173,11 @@ 0 if you don't. */ #undef HAVE_DECL_SSL_CTX_SET_ECDH_AUTO -/* Define to 1 if you have the declaration of `SSL_CTX_set_tmp_ecdh', and to 0 +/* Define to 1 if you have the declaration of 'SSL_CTX_set_tmp_ecdh', and to 0 if you don't. */ #undef HAVE_DECL_SSL_CTX_SET_TMP_ECDH -/* Define to 1 if you have the declaration of `strlcat', and to 0 if you +/* Define to 1 if you have the declaration of 'strlcat', and to 0 if you don't. */ #undef HAVE_DECL_STRLCAT @@ -481,10 +481,10 @@ 'ngtcp2_crypto_quictls_from_ossl_encryption_level' function. */ #undef HAVE_NGTCP2_CRYPTO_QUICTLS_FROM_OSSL_ENCRYPTION_LEVEL -/* Define to 1 if you have the `ngtcp2_crypto_quictls_init' function. */ +/* Define to 1 if you have the 'ngtcp2_crypto_quictls_init' function. */ #undef HAVE_NGTCP2_CRYPTO_QUICTLS_INIT -/* Define to 1 if the system has the type `ngtcp2_encryption_level'. */ +/* Define to 1 if the system has the type 'ngtcp2_encryption_level'. */ #undef HAVE_NGTCP2_ENCRYPTION_LEVEL /* Define to 1 if you have the header file. @@ -655,7 +655,7 @@ function. */ #undef HAVE_SSL_CTX_SET_TLSEXT_TICKET_KEY_EVP_CB -/* Define to 1 if you have the `SSL_get0_alpn_selected' function. */ +/* Define to 1 if you have the 'SSL_get0_alpn_selected' function. */ #undef HAVE_SSL_GET0_ALPN_SELECTED /* Define to 1 if you have the 'SSL_get0_peername' function. */ diff --git a/contrib/unbound/configure b/contrib/unbound/configure index 3093412a492f..717de9beb3e1 100755 --- a/contrib/unbound/configure +++ b/contrib/unbound/configure @@ -1,11 +1,11 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for unbound 1.24.1. +# Generated by GNU Autoconf 2.72 for unbound 1.24.2. # # Report bugs to . # # -# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, +# Copyright (C) 1992-1996, 1998-2017, 2020-2023 Free Software Foundation, # Inc. # # @@ -17,7 +17,6 @@ # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -as_nop=: if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh @@ -26,12 +25,13 @@ then : # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else $as_nop - case `(set -o) 2>/dev/null` in #( +else case e in #( + e) case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; +esac ;; esac fi @@ -103,7 +103,7 @@ IFS=$as_save_IFS ;; esac -# We did not find ourselves, most probably we were run as `sh COMMAND' +# We did not find ourselves, most probably we were run as 'sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 @@ -133,15 +133,14 @@ case $- in # (((( esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. +# out after a failed 'exec'. printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="as_nop=: -if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 + as_bourne_compatible="if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh NULLCMD=: @@ -149,12 +148,13 @@ then : # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST -else \$as_nop - case \`(set -o) 2>/dev/null\` in #( +else case e in #( + e) case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; +esac ;; esac fi " @@ -172,8 +172,9 @@ as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ) then : -else \$as_nop - exitcode=1; echo positional parameters were not saved. +else case e in #( + e) exitcode=1; echo positional parameters were not saved. ;; +esac fi test x\$exitcode = x0 || exit 1 blah=\$(echo \$(echo blah)) @@ -195,14 +196,15 @@ test \$(( 1 + 1 )) = 2 || exit 1 if (eval "$as_required") 2>/dev/null then : as_have_required=yes -else $as_nop - as_have_required=no +else case e in #( + e) as_have_required=no ;; +esac fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null then : -else $as_nop - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +else case e in #( + e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do @@ -235,12 +237,13 @@ IFS=$as_save_IFS if $as_found then : -else $as_nop - if { test -f "$SHELL" || test -f "$SHELL.exe"; } && +else case e in #( + e) if { test -f "$SHELL" || test -f "$SHELL.exe"; } && as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null then : CONFIG_SHELL=$SHELL as_have_required=yes -fi +fi ;; +esac fi @@ -262,7 +265,7 @@ case $- in # (((( esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. +# out after a failed 'exec'. printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi @@ -283,7 +286,8 @@ $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 -fi +fi ;; +esac fi fi SHELL=${CONFIG_SHELL-/bin/sh} @@ -322,14 +326,6 @@ as_fn_exit () as_fn_set_status $1 exit $1 } # as_fn_exit -# as_fn_nop -# --------- -# Do nothing but, unlike ":", preserve the value of $?. -as_fn_nop () -{ - return $? -} -as_nop=as_fn_nop # as_fn_mkdir_p # ------------- @@ -398,11 +394,12 @@ then : { eval $1+=\$2 }' -else $as_nop - as_fn_append () +else case e in #( + e) as_fn_append () { eval $1=\$$1\$2 - } + } ;; +esac fi # as_fn_append # as_fn_arith ARG... @@ -416,21 +413,14 @@ then : { as_val=$(( $* )) }' -else $as_nop - as_fn_arith () +else case e in #( + e) as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` - } + } ;; +esac fi # as_fn_arith -# as_fn_nop -# --------- -# Do nothing but, unlike ":", preserve the value of $?. -as_fn_nop () -{ - return $? -} -as_nop=as_fn_nop # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- @@ -504,6 +494,8 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits /[$]LINENO/= ' <$as_myself | sed ' + t clear + :clear s/[$]LINENO.*/&-/ t lineno b @@ -552,7 +544,6 @@ esac as_echo='printf %s\n' as_echo_n='printf %s' - rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -564,9 +555,9 @@ if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. + # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable. + # In both cases, we have to default to 'cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then @@ -591,10 +582,12 @@ as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" +as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" +as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated # Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g" +as_tr_sh="eval sed '$as_sed_sh'" # deprecated SHELL=${CONFIG_SHELL-/bin/sh} @@ -622,8 +615,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='unbound' PACKAGE_TARNAME='unbound' -PACKAGE_VERSION='1.24.1' -PACKAGE_STRING='unbound 1.24.1' +PACKAGE_VERSION='1.24.2' +PACKAGE_STRING='unbound 1.24.2' PACKAGE_BUGREPORT='unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues' PACKAGE_URL='' @@ -660,6 +653,7 @@ ac_includes_default="\ ac_header_c_list= ac_func_c_list= +enable_year2038=no ac_subst_vars='LTLIBOBJS date version @@ -748,6 +742,7 @@ PTHREAD_LIBS PTHREAD_CXX PTHREAD_CC ax_pthread_config +CPP ASYNCLOOK_ALLOCCHECK_EXTRA_OBJ SLDNS_ALLOCCHECK_EXTRA_OBJ USE_SYSTEMD_FALSE @@ -758,7 +753,6 @@ SYSTEMD_LIBS SYSTEMD_CFLAGS RUNTIME_PATH LIBOBJS -CPP PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG @@ -944,6 +938,7 @@ with_libmnl enable_explicit_port_randomisation enable_linux_ip_local_port_range with_libunbound_only +enable_year2038 ' ac_precious_vars='build_alias host_alias @@ -959,11 +954,11 @@ LT_SYS_LIBRARY_PATH PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR -CPP SYSTEMD_CFLAGS SYSTEMD_LIBS SYSTEMD_DAEMON_CFLAGS SYSTEMD_DAEMON_LIBS +CPP PYTHON_VERSION SOURCE_DATE_EPOCH PROTOBUFC_CFLAGS @@ -1076,7 +1071,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: \`$ac_useropt'" + as_fn_error $? "invalid feature name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1102,7 +1097,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: \`$ac_useropt'" + as_fn_error $? "invalid feature name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1315,7 +1310,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: \`$ac_useropt'" + as_fn_error $? "invalid package name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1331,7 +1326,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: \`$ac_useropt'" + as_fn_error $? "invalid package name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1361,8 +1356,8 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" + -*) as_fn_error $? "unrecognized option: '$ac_option' +Try '$0 --help' for more information" ;; *=*) @@ -1370,7 +1365,7 @@ Try \`$0 --help' for more information" # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + as_fn_error $? "invalid variable name: '$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1420,7 +1415,7 @@ do as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done -# There might be people who depend on the old broken behavior: `$host' +# There might be people who depend on the old broken behavior: '$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias @@ -1488,7 +1483,7 @@ if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_msg="sources are in $srcdir, but 'cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` @@ -1516,7 +1511,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 unbound 1.24.1 to adapt to many kinds of systems. +'configure' configures unbound 1.24.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1530,11 +1525,11 @@ Configuration: --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages + -q, --quiet, --silent do not print 'checking ...' messages --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' + -C, --config-cache alias for '--cache-file=config.cache' -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] + --srcdir=DIR find the sources in DIR [configure dir or '..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX @@ -1542,10 +1537,10 @@ Installation directories: --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. +By default, 'make install' will install all the files in +'$ac_default_prefix/bin', '$ac_default_prefix/lib' etc. You can specify +an installation prefix other than '$ac_default_prefix' using '--prefix', +for instance '--prefix=\$HOME'. For better control, use the options below. @@ -1582,7 +1577,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of unbound 1.24.1:";; + short | recursive ) echo "Configuration of unbound 1.24.2:";; esac cat <<\_ACEOF @@ -1663,6 +1658,7 @@ Optional Features: randomness. Define this only when the target system restricts (e.g. some of SELinux enabled distributions) the use of non-ephemeral ports. + --enable-year2038 support timestamps after 2038 Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1733,12 +1729,12 @@ Some influential environment variables: LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory - YACC The `Yet Another Compiler Compiler' implementation to use. - Defaults to the first program found out of: `bison -y', `byacc', - `yacc'. + YACC The 'Yet Another Compiler Compiler' implementation to use. + Defaults to the first program found out of: 'bison -y', 'byacc', + 'yacc'. YFLAGS The list of arguments that will be passed by default to $YACC. This script will default YFLAGS to the empty string to avoid a - default value of `-d' given by some make applications. + default value of '-d' given by some make applications. LT_SYS_LIBRARY_PATH User-defined run-time library search path. PKG_CONFIG path to pkg-config utility @@ -1746,7 +1742,6 @@ Some influential environment variables: directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path - CPP C preprocessor SYSTEMD_CFLAGS C compiler flags for SYSTEMD, overriding pkg-config SYSTEMD_LIBS @@ -1755,6 +1750,7 @@ Some influential environment variables: C compiler flags for SYSTEMD_DAEMON, overriding pkg-config SYSTEMD_DAEMON_LIBS linker flags for SYSTEMD_DAEMON, overriding pkg-config + CPP C preprocessor PYTHON_VERSION The installed Python version to use, for example '2.3'. This string will be appended to the Python interpreter canonical @@ -1768,7 +1764,7 @@ Some influential environment variables: PROTOBUFC_LIBS linker flags for PROTOBUFC, overriding pkg-config -Use these variables to override the choices made by `configure' or to help +Use these variables to override the choices made by 'configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . @@ -1835,10 +1831,10 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -unbound configure 1.24.1 -generated by GNU Autoconf 2.71 +unbound configure 1.24.2 +generated by GNU Autoconf 2.72 -Copyright (C) 2021 Free Software Foundation, Inc. +Copyright (C) 2023 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1877,11 +1873,12 @@ printf "%s\n" "$ac_try_echo"; } >&5 } && test -s conftest.$ac_objext then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else case e in #( + e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 + ac_retval=1 ;; +esac fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval @@ -1900,8 +1897,8 @@ printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> @@ -1909,10 +1906,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$3=yes" -else $as_nop - eval "$3=no" +else case e in #( + e) eval "$3=no" ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -1952,11 +1951,12 @@ printf "%s\n" "$ac_try_echo"; } >&5 } then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else case e in #( + e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 + ac_retval=1 ;; +esac fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would @@ -1979,15 +1979,15 @@ printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. */ + which can conflict with char $2 (void); below. */ #include #undef $2 @@ -1998,7 +1998,7 @@ else $as_nop #ifdef __cplusplus extern "C" #endif -char $2 (); +char $2 (void); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ @@ -2017,11 +2017,13 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : eval "$3=yes" -else $as_nop - eval "$3=no" +else case e in #( + e) eval "$3=no" ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext + conftest$ac_exeext conftest.$ac_ext ;; +esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -2042,8 +2044,8 @@ printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 -else $as_nop - eval "$3=no" +else case e in #( + e) eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 @@ -2073,12 +2075,14 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : -else $as_nop - eval "$3=yes" +else case e in #( + e) eval "$3=yes" ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -2087,44 +2091,6 @@ printf "%s\n" "$ac_res" >&6; } } # ac_fn_c_check_type -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - } -then : - ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_cpp - # ac_fn_c_try_run LINENO # ---------------------- # Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that @@ -2155,12 +2121,13 @@ printf "%s\n" "$ac_try_echo"; } >&5 test $ac_status = 0; }; } then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: program exited with status $ac_status" >&5 +else case e in #( + e) printf "%s\n" "$as_me: program exited with status $ac_status" >&5 printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=$ac_status + ac_retval=$ac_status ;; +esac fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno @@ -2213,18 +2180,19 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_hi=$ac_mid; break -else $as_nop - as_fn_arith $ac_mid + 1 && ac_lo=$as_val +else case e in #( + e) as_fn_arith $ac_mid + 1 && ac_lo=$as_val if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi - as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val + as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int @@ -2259,20 +2227,23 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_lo=$ac_mid; break -else $as_nop - as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val +else case e in #( + e) as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi - as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val + as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done -else $as_nop - ac_lo= ac_hi= +else case e in #( + e) ac_lo= ac_hi= ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext # Binary search between lo and hi bounds. @@ -2295,8 +2266,9 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_hi=$ac_mid -else $as_nop - as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val +else case e in #( + e) as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done @@ -2344,8 +2316,9 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : echo >>conftest.val; read $3 &5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + } +then : + ac_retval=0 +else case e in #( + e) printf "%s\n" "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 ;; +esac +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + # ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR # ------------------------------------------------------------------ # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR @@ -2370,8 +2382,8 @@ printf %s "checking whether $as_decl_name is declared... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 -else $as_nop - as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` +else case e in #( + e) as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` eval ac_save_FLAGS=\$$6 as_fn_append $6 " $5" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2395,12 +2407,14 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$3=yes" -else $as_nop - eval "$3=no" +else case e in #( + e) eval "$3=no" ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext eval $6=\$ac_save_FLAGS - + ;; +esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -2421,8 +2435,8 @@ printf %s "checking for $2.$3... " >&6; } if eval test \${$4+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int @@ -2438,8 +2452,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$4=yes" -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int @@ -2455,12 +2469,15 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$4=yes" -else $as_nop - eval "$4=no" +else case e in #( + e) eval "$4=no" ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi eval ac_res=\$$4 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -2492,8 +2509,8 @@ 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 unbound $as_me 1.24.1, which was -generated by GNU Autoconf 2.71. Invocation command line was +It was created by unbound $as_me 1.24.2, which was +generated by GNU Autoconf 2.72. Invocation command line was $ $0$ac_configure_args_raw @@ -2739,10 +2756,10 @@ esac printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ - || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 *** 9729 LINES SKIPPED *** From nobody Tue May 26 16:48:49 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPzGp26Wpz6g6qN for ; Tue, 26 May 2026 16:48: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPzGp0tbjz4J8b for ; Tue, 26 May 2026 16:48:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779814130; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=53Hfsn8AP/maro4AJ1SMPO3J95PH60XCGQrXMavMC/c=; b=kjh/7qsyuY2gLTS4w99C6J0AIio5MES8LiRqO6o5QdEetRkThQvNo5hAlkcrY4NwX/LvUB JZH4WYiXVAyk0DeF2X41d9Rcz8PkZ5fkgeRkNT90nS3wye8zjpYnw2mmwB+V7oN8lCDimY uTLj5KXKyfnJKVGde4flYf+eINy9NEB9bZACrzadvBeXO7fFWUz0aFcheANGGSNV4RJ+YW XbpYXzuvFDjFgVqBNPKrL854jGssbES6UTiI4mEbKTRiD7kXldBnxVLjljeERGSTzDeEUV thBnS668WeMY4hgcDrpIFC69M5ddm8k9yjDBQf2tZJ/50PAeOjQ5JGtS7W7trg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779814130; a=rsa-sha256; cv=none; b=styotF4FvCvKYMK2pR0tzlNdY2KB9iGLNHTq1H9078VaXXWyP9YXTvc/dq6m3PjgTbSl3e DyvqZyv7mdnV9+1Fx/Qbnf8yy4pxR/W4ACAcP7HFzJwNItrrlYCUKel8H7YP6zLq55MMLh eFFrYmrhaR/Kcsyqk0S12w/kvzWm9nE36fAkgU/iL7buTeGtOrgwA9Q7VQQvZ77g9Kn4NT BkpCn/8imxcYHSXXqbZ4dKRGE/b+i2nA7nVl6+koEWcDKpGOM9K7TZawY7oS1pdXyzaW8B ZWNoct8K6pKVP699U7CXnLnW/6My3IO15hxjexFsxgthdQrXxeBJiHcvuaQqEA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779814130; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=53Hfsn8AP/maro4AJ1SMPO3J95PH60XCGQrXMavMC/c=; b=PFReJrwmSBaEc+MLsT9FGuTzGCLvaAP66y5K9OrFSHXCHPQ7PzbC6OJyQ1AJBR8ntQgEQf UUKAOHQSbgvEljFoQ2sC2cfNB+uvexX6ejCBl2RjV0l/C1O7aiEAH/Ajqbwk3OrAuu3yUy JaAysB43gWfuofcKpJaWkET9kAP5GUrONbt3ovYaL44jgZH5UxjV8MvVTibqg/iuC3nofC eHirhpTqYPIYg0xfHOEaiM+7JVLKArALjlcJB+6hWfFjLg9ck/ebBnMMkrCjTdqPYTnPJH MrQGiBcvSa9E8jK4GV6NbYm8O0AmtFXrODnw9VviJtIinMHEE0oWqtIX/z29Cg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPzGn72bZz4hY for ; Tue, 26 May 2026 16:48:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36c90 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 26 May 2026 16:48:49 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 64cdd794b53e - stable/15 - unbound: Update to 1.25.0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 64cdd794b53ee2b00dd312f235087056c0398e34 Auto-Submitted: auto-generated Date: Tue, 26 May 2026 16:48:49 +0000 Message-Id: <6a15cef1.36c90.4458f963@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=64cdd794b53ee2b00dd312f235087056c0398e34 commit 64cdd794b53ee2b00dd312f235087056c0398e34 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-23 01:54:22 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-26 16:48:28 +0000 unbound: Update to 1.25.0 Release notes at https://nlnetlabs.nl/news/2026/Apr/29/unbound-1.25.0-released/ Merge commit '4dd0a17edce60370304a45f2c40251e09e193bd6' MFC after: 1 week (cherry picked from commit 5fa84c6ec176d186ddad25d31f8760e50f48157f) --- contrib/unbound/README.md | 21 +- contrib/unbound/aclocal.m4 | 857 +- contrib/unbound/acx_nlnetlabs.m4 | 77 +- contrib/unbound/cachedb/cachedb.c | 108 +- contrib/unbound/cachedb/redis.c | 6 + contrib/unbound/compat/arc4random.c | 7 + contrib/unbound/compat/chacha_private.h | 4 +- contrib/unbound/compat/getentropy_linux.c | 20 + contrib/unbound/compat/gmtime_r.c | 5 +- contrib/unbound/config.h.in | 397 +- contrib/unbound/configure | 6522 ++++++--------- contrib/unbound/configure.ac | 123 +- contrib/unbound/contrib/README | 2 + contrib/unbound/contrib/gost12.patch | 325 + contrib/unbound/contrib/ios/install_openssl.sh | 12 +- contrib/unbound/contrib/ios/setenv_ios.sh | 5 + contrib/unbound/contrib/unbound.service.in | 2 +- .../unbound/contrib/unbound_portable.service.in | 2 +- contrib/unbound/daemon/daemon.c | 326 +- contrib/unbound/daemon/daemon.h | 41 + contrib/unbound/daemon/remote.c | 315 +- contrib/unbound/daemon/remote.h | 8 + contrib/unbound/daemon/stats.c | 6 + contrib/unbound/daemon/unbound.c | 51 +- contrib/unbound/daemon/worker.c | 258 +- contrib/unbound/dns64/dns64.c | 23 +- contrib/unbound/dnstap/dtstream.c | 16 +- contrib/unbound/dnstap/dtstream.h | 6 + contrib/unbound/dnstap/unbound-dnstap-socket.c | 28 +- contrib/unbound/doc/Changelog | 484 ++ contrib/unbound/doc/README | 2 +- contrib/unbound/doc/README.DNS64 | 6 +- contrib/unbound/doc/README.man | 11 +- contrib/unbound/doc/example.conf | 75 +- contrib/unbound/doc/example.conf.in | 75 +- contrib/unbound/doc/libunbound.3 | 6 +- contrib/unbound/doc/libunbound.3.in | 6 +- contrib/unbound/doc/unbound-anchor.8 | 21 +- contrib/unbound/doc/unbound-anchor.8.in | 21 +- contrib/unbound/doc/unbound-anchor.rst | 15 +- contrib/unbound/doc/unbound-checkconf.8 | 6 +- contrib/unbound/doc/unbound-checkconf.8.in | 6 +- contrib/unbound/doc/unbound-control.8 | 45 +- contrib/unbound/doc/unbound-control.8.in | 45 +- contrib/unbound/doc/unbound-control.rst | 34 + contrib/unbound/doc/unbound-host.1 | 6 +- contrib/unbound/doc/unbound-host.1.in | 6 +- contrib/unbound/doc/unbound.8 | 8 +- contrib/unbound/doc/unbound.8.in | 8 +- contrib/unbound/doc/unbound.conf.5 | 558 +- contrib/unbound/doc/unbound.conf.5.in | 558 +- contrib/unbound/doc/unbound.conf.rst | 524 +- contrib/unbound/doc/unbound.rst | 2 +- contrib/unbound/edns-subnet/subnetmod.c | 108 +- contrib/unbound/edns-subnet/subnetmod.h | 10 + contrib/unbound/install-sh | 178 +- contrib/unbound/ipsecmod/ipsecmod.c | 2 +- contrib/unbound/iterator/iter_fwd.c | 5 + contrib/unbound/iterator/iter_hints.c | 5 + contrib/unbound/iterator/iter_priv.c | 168 +- contrib/unbound/iterator/iter_scrub.c | 70 +- contrib/unbound/iterator/iter_utils.c | 50 +- contrib/unbound/iterator/iter_utils.h | 1 + contrib/unbound/iterator/iterator.c | 43 +- contrib/unbound/libunbound/unbound.h | 4 + contrib/unbound/ltmain.sh | 1566 ++-- contrib/unbound/pythonmod/interface.i | 1857 ----- contrib/unbound/pythonmod/pythonmod_utils.c | 201 - contrib/unbound/respip/respip.c | 9 +- contrib/unbound/services/authzone.c | 150 +- contrib/unbound/services/cache/dns.c | 110 +- contrib/unbound/services/cache/dns.h | 2 +- contrib/unbound/services/cache/infra.c | 3 +- contrib/unbound/services/cache/rrset.c | 37 +- contrib/unbound/services/listen_dnsport.c | 40 +- contrib/unbound/services/localzone.c | 179 +- contrib/unbound/services/localzone.h | 12 +- contrib/unbound/services/mesh.c | 130 +- contrib/unbound/services/mesh.h | 13 +- contrib/unbound/services/modstack.c | 7 +- contrib/unbound/services/outside_network.c | 65 +- contrib/unbound/services/outside_network.h | 7 + contrib/unbound/services/rpz.c | 1 + contrib/unbound/sldns/rrdef.h | 4 +- contrib/unbound/sldns/wire2str.c | 3 + contrib/unbound/smallapp/unbound-anchor.c | 12 +- contrib/unbound/smallapp/unbound-checkconf.c | 48 +- contrib/unbound/smallapp/unbound-control.c | 15 +- contrib/unbound/smallapp/unbound-host.c | 12 +- contrib/unbound/testcode/checklocks.c | 916 --- contrib/unbound/testcode/do-tests.sh | 76 - contrib/unbound/testcode/doqclient.c | 2764 ------- contrib/unbound/testcode/fake_event.c | 2044 ----- contrib/unbound/testcode/testbound.c | 788 -- contrib/unbound/testcode/unitdname.c | 1314 --- contrib/unbound/testcode/unitinfra.c | 210 - contrib/unbound/testcode/unitldns.c | 284 - contrib/unbound/testcode/unitmain.c | 1401 ---- contrib/unbound/testcode/unitmain.h | 92 - contrib/unbound/testcode/unitneg.c | 545 -- contrib/unbound/testcode/unitverify.c | 706 -- contrib/unbound/testcode/unitzonemd.c | 542 -- contrib/unbound/util/alloc.c | 2 +- contrib/unbound/util/config_file.c | 116 + contrib/unbound/util/config_file.h | 32 + contrib/unbound/util/configlexer.c | 8521 ++++++++++---------- contrib/unbound/util/configlexer.lex | 4 +- contrib/unbound/util/configparser.c | 4650 +++++------ contrib/unbound/util/configparser.h | 184 +- contrib/unbound/util/configparser.y | 53 +- contrib/unbound/util/data/msgencode.c | 58 +- contrib/unbound/util/data/msgencode.h | 4 +- contrib/unbound/util/data/msgparse.c | 12 + contrib/unbound/util/data/msgparse.h | 25 + contrib/unbound/util/data/msgreply.c | 72 +- contrib/unbound/util/data/msgreply.h | 28 +- contrib/unbound/util/data/packed_rrset.c | 36 +- contrib/unbound/util/data/packed_rrset.h | 3 + contrib/unbound/util/fptr_wlist.c | 7 +- contrib/unbound/util/fptr_wlist.h | 8 +- contrib/unbound/util/iana_ports.inc | 9 +- contrib/unbound/util/locks.h | 27 + contrib/unbound/util/log.c | 32 +- contrib/unbound/util/module.h | 19 +- contrib/unbound/util/net_help.c | 54 +- contrib/unbound/util/net_help.h | 12 +- contrib/unbound/util/netevent.c | 27 +- contrib/unbound/util/shm_side/shm_main.c | 219 +- contrib/unbound/util/shm_side/shm_main.h | 15 + contrib/unbound/util/timehist.h | 4 + contrib/unbound/validator/val_neg.c | 14 +- contrib/unbound/validator/val_sigcrypt.c | 12 + contrib/unbound/validator/val_sigcrypt.h | 2 +- contrib/unbound/validator/val_utils.c | 25 + contrib/unbound/validator/val_utils.h | 11 + contrib/unbound/validator/validator.c | 95 +- contrib/unbound/winrc/win_svc.c | 6 +- lib/libunbound/config.h | 403 +- 138 files changed, 16189 insertions(+), 27522 deletions(-) diff --git a/contrib/unbound/README.md b/contrib/unbound/README.md index 3bbd38b3b78b..d805e4d0a3d7 100644 --- a/contrib/unbound/README.md +++ b/contrib/unbound/README.md @@ -4,7 +4,7 @@ [![Packaging status](https://repology.org/badge/tiny-repos/unbound.svg)](https://repology.org/project/unbound/versions) [![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/unbound.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:unbound) [![Documentation Status](https://readthedocs.org/projects/unbound/badge/?version=latest)](https://unbound.readthedocs.io/en/latest/?badge=latest) -[![Mastodon Follow](https://img.shields.io/mastodon/follow/109262826617293067?domain=https%3A%2F%2Ffosstodon.org&style=social)](https://fosstodon.org/@nlnetlabs) +[![Mastodon Follow](https://img.shields.io/mastodon/follow/114692612288811644?domain=social.nlnetlabs.nl&style=social)](https://social.nlnetlabs.nl/@nlnetlabs) Unbound is a validating, recursive, caching DNS resolver. It is designed to be fast and lean and incorporates modern features based on open standards. If you @@ -25,18 +25,21 @@ Unbound can be compiled and installed using: ./configure && make && make install ``` -You can use libevent if you want. libevent is useful when using many (10000) -outgoing ports. By default max 256 ports are opened at the same time and the -builtin alternative is equally capable and a little faster. - +You can use libevent if you want. libevent is useful when using many (e.g., +10000) outgoing ports. Use the `--with-libevent` configure option to compile Unbound with libevent support. +If not, the default builtin alternative opens max 256 ports at the same time +and is equally capable and a little faster. + + ## Unbound configuration -All of Unbound's configuration options are described in the man pages, which -will be installed and are available on the Unbound -[documentation page](https://unbound.docs.nlnetlabs.nl/). +All of Unbound's configuration options are described in the `unbound.conf(5)` +man page, which will be installed and is also available on the Unbound +[documentation page](https://unbound.docs.nlnetlabs.nl/en/latest/manpages/unbound.conf.html) +for the latest version. -An example configuration file is located in +An example configuration file, with minimal documentation, is located in [doc/example.conf](https://github.com/NLnetLabs/unbound/blob/master/doc/example.conf.in). diff --git a/contrib/unbound/aclocal.m4 b/contrib/unbound/aclocal.m4 index 792090e178d6..bf3c57e2fd9f 100644 --- a/contrib/unbound/aclocal.m4 +++ b/contrib/unbound/aclocal.m4 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.17 -*- Autoconf -*- +# generated automatically by aclocal 1.16.2 -*- Autoconf -*- -# Copyright (C) 1996-2024 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,8 +14,7 @@ m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # -# Copyright (C) 1996-2001, 2003-2019, 2021-2024 Free Software -# Foundation, Inc. +# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives @@ -23,13 +22,13 @@ m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl -# Copyright (C) 2024 Free Software Foundation, Inc. +# Copyright (C) 2014 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# the Free Software Foundation; either version 2 of of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, if you @@ -46,7 +45,7 @@ m4_define([_LT_COPYING], [dnl # along with this program. If not, see . ]) -# serial 63 LT_INIT +# serial 58 LT_INIT # LT_PREREQ(VERSION) @@ -74,7 +73,7 @@ esac # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], -[AC_PREREQ([2.64])dnl We use AC_PATH_PROGS_FEATURE_CHECK +[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl @@ -196,7 +195,6 @@ m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl -m4_require([_LT_DECL_FILECMD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl @@ -235,8 +233,8 @@ esac ofile=libtool can_build_shared=yes -# All known linkers require a '.a' archive for static linking (except MSVC and -# ICC, which need '.lib'). +# All known linkers require a '.a' archive for static linking (except MSVC, +# which needs '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld @@ -624,7 +622,7 @@ m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before -# AC_OUTPUT is called), in case it is used in configure for compilation +# AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} @@ -659,9 +657,9 @@ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. -Copyright (C) 2024 Free Software Foundation, Inc. +Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." +gives unlimited permision to copy, distribute and modify it." while test 0 != $[#] do @@ -738,6 +736,7 @@ _LT_CONFIG_SAVE_COMMANDS([ cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. @@ -787,7 +786,7 @@ _LT_EOF # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? - $SED '$q' "$ltmain" >> "$cfgfile" \ + sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || @@ -980,7 +979,6 @@ _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE - # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ @@ -1031,21 +1029,6 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ rm -f conftest.* fi]) - # Feature test to disable chained fixups since it is not - # compatible with '-undefined dynamic_lookup' - AC_CACHE_CHECK([for -no_fixup_chains linker flag], - [lt_cv_support_no_fixup_chains], - [ save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS -Wl,-no_fixup_chains" - AC_LINK_IFELSE( - [AC_LANG_PROGRAM([],[])], - lt_cv_support_no_fixup_chains=yes, - lt_cv_support_no_fixup_chains=no - ) - LDFLAGS=$save_LDFLAGS - ] - ) - AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no @@ -1065,12 +1048,12 @@ int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD - echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD - $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD + echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD + $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF -int main(void) { return 0;} +int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err @@ -1090,37 +1073,23 @@ _LT_EOF _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - darwin*) - case $MACOSX_DEPLOYMENT_TARGET,$host in - 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - *) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' - if test yes = "$lt_cv_support_no_fixup_chains"; then - AS_VAR_APPEND([_lt_dar_allow_undefined], [' $wl-no_fixup_chains']) - fi - ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + 10.[[012]][[,.]]*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi - _lt_dar_needs_single_mod=no - case $host_os in - rhapsody* | darwin1.*) - _lt_dar_needs_single_mod=yes ;; - darwin*) - # When targeting Mac OS X 10.4 (darwin 8) or later, - # -single_module is the default and -multi_module is unsupported. - # The toolchain on macOS 10.14 (darwin 18) and later cannot - # target any OS version that needs -single_module. - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*-darwin[[567]].*|10.[[0-3]],*-darwin[[5-9]].*|10.[[0-3]],*-darwin1[[0-7]].*) - _lt_dar_needs_single_mod=yes ;; - esac - ;; - esac if test yes = "$lt_cv_ld_exported_symbols_list"; then _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else @@ -1163,12 +1132,12 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES], output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - _LT_TAGVAR(module_expsym_cmds, $1)="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" + _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" m4_if([$1], [CXX], -[ if test yes = "$_lt_dar_needs_single_mod" -a yes != "$lt_cv_apple_cc_single_mod"; then +[ if test yes != "$lt_cv_apple_cc_single_mod"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" - _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi ],[]) else @@ -1282,8 +1251,7 @@ _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], -[m4_require([_LT_DECL_SED])dnl -AC_MSG_CHECKING([for sysroot]) +[AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], [Search for dependent libraries within DIR (or the compiler's sysroot @@ -1296,13 +1264,11 @@ lt_sysroot= case $with_sysroot in #( yes) if test yes = "$GCC"; then - # Trim trailing / since we'll always append absolute paths and we want - # to avoid //, if only for less confusing output for the user. - lt_sysroot=`$CC --print-sysroot 2>/dev/null | $SED 's:/\+$::'` + lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) - lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( @@ -1332,7 +1298,7 @@ ia64-*-hpux*) # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - case `$FILECMD conftest.$ac_objext` in + case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; @@ -1349,7 +1315,7 @@ ia64-*-hpux*) echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test yes = "$lt_cv_prog_gnu_ld"; then - case `$FILECMD conftest.$ac_objext` in + case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; @@ -1361,7 +1327,7 @@ ia64-*-hpux*) ;; esac else - case `$FILECMD conftest.$ac_objext` in + case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; @@ -1383,7 +1349,7 @@ mips64*-*linux*) echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then emul=elf - case `$FILECMD conftest.$ac_objext` in + case `/usr/bin/file conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; @@ -1391,7 +1357,7 @@ mips64*-*linux*) emul="${emul}64" ;; esac - case `$FILECMD conftest.$ac_objext` in + case `/usr/bin/file conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; @@ -1399,7 +1365,7 @@ mips64*-*linux*) emul="${emul}ltsmip" ;; esac - case `$FILECMD conftest.$ac_objext` in + case `/usr/bin/file conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; @@ -1410,7 +1376,7 @@ mips64*-*linux*) ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*|x86_64-gnu*) +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when @@ -1419,14 +1385,14 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*|x86_64-gnu*) # not appear in the list. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - case `$FILECMD conftest.o` in + case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; - x86_64-*linux*|x86_64-gnu*) - case `$FILECMD conftest.o` in + x86_64-*linux*) + case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; @@ -1454,7 +1420,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*|x86_64-gnu*) x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; - x86_64-*linux*|x86_64-gnu*) + x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*linux*) @@ -1494,7 +1460,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*|x86_64-gnu*) # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - case `$FILECMD conftest.o` in + case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) @@ -1533,22 +1499,9 @@ need_locks=$enable_libtool_lock m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} +: ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) - -# Use ARFLAGS variable as AR's operation code to sync the variable naming with -# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have -# higher priority because that's what people were doing historically (setting -# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS -# variable obsoleted/removed. - -test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} -lt_ar_flags=$AR_FLAGS -_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) - -# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override -# by AR_FLAGS because that was never working and AR_FLAGS is about to die. -_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], - [Flags to create an archive]) +_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no @@ -1587,7 +1540,7 @@ AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) -AC_REQUIRE([AC_PROG_RANLIB]) +AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) @@ -1598,8 +1551,15 @@ old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then + case $host_os in + bitrig* | openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" + ;; + esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in @@ -1731,14 +1691,14 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; - gnu* | ironclad*) - # Under GNU Hurd and Ironclad, this test is not required because there - # is no limit to the length of command line arguments. + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; - cygwin* | mingw* | windows* | cegcc*) + cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, @@ -1760,7 +1720,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl lt_cv_sys_max_cmd_len=8192; ;; - darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) + bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` @@ -1803,7 +1763,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'` + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi @@ -1920,11 +1880,11 @@ else /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord (void) __attribute__((visibility("default"))); +int fnord () __attribute__((visibility("default"))); #endif -int fnord (void) { return 42; } -int main (void) +int fnord () { return 42; } +int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; @@ -1981,7 +1941,7 @@ else lt_cv_dlopen_self=yes ;; - mingw* | windows* | pw32* | cegcc*) + mingw* | pw32* | cegcc*) lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; @@ -2253,35 +2213,26 @@ m4_defun([_LT_CMD_STRIPLIB], striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) -if test -z "$STRIP"; then - AC_MSG_RESULT([no]) +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT([yes]) else - if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - old_striplib="$STRIP --strip-debug" - striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) - else - case $host_os in - darwin*) - # FIXME - insert some real tests, host_os isn't really good enough +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) - ;; - freebsd*) - if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then - old_striplib="$STRIP --strip-debug" - striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - ;; - *) + else AC_MSG_RESULT([no]) - ;; - esac - fi + fi + ;; + *) + AC_MSG_RESULT([no]) + ;; + esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) @@ -2349,7 +2300,7 @@ if test yes = "$GCC"; then *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in - mingw* | windows* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; + mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` @@ -2407,7 +2358,7 @@ BEGIN {RS = " "; FS = "/|\n";} { # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in - mingw* | windows* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ + mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` @@ -2482,7 +2433,7 @@ aix[[4-9]]*) # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl - # linker flag in LDFLAGS as well, or --enable-aix-soname=svr4 only. + # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the @@ -2576,7 +2527,7 @@ bsdi[[45]]*) # libtool to hard-code these into programs ;; -cygwin* | mingw* | windows* | pw32* | cegcc*) +cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no @@ -2587,29 +2538,15 @@ cygwin* | mingw* | windows* | pw32* | cegcc*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds - # If user builds GCC with multilib enabled, - # it should just install on $(libdir) - # not on $(libdir)/../bin or 32 bits dlls would override 64 bit ones. - if test xyes = x"$multilib"; then - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - $install_prog $dir/$dlname $destdir/$dlname~ - chmod a+x $destdir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib $destdir/$dlname'\'' || exit \$?; - fi' - else - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - fi + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' @@ -2618,30 +2555,30 @@ cygwin* | mingw* | windows* | pw32* | cegcc*) case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' + soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; - mingw* | windows* | cegcc*) + mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' + library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; - *,cl* | *,icl*) - # Native MSVC or ICC + *,cl*) + # Native MSVC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in - mingw* | windows*) + mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' @@ -2654,7 +2591,7 @@ m4_if([$1], [],[ done IFS=$lt_save_ifs # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form @@ -2691,7 +2628,7 @@ m4_if([$1], [],[ ;; *) - # Assume MSVC and ICC wrapper + # Assume MSVC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; @@ -2724,7 +2661,7 @@ dgux*) shlibpath_var=LD_LIBRARY_PATH ;; -freebsd* | dragonfly* | midnightbsd*) +freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then @@ -2748,21 +2685,7 @@ freebsd* | dragonfly* | midnightbsd*) need_version=yes ;; esac - case $host_cpu in - powerpc64) - # On FreeBSD bi-arch platforms, a different variable is used for 32-bit - # binaries. See . - AC_COMPILE_IFELSE( - [AC_LANG_SOURCE( - [[int test_pointer_size[sizeof (void *) - 5]; - ]])], - [shlibpath_var=LD_LIBRARY_PATH], - [shlibpath_var=LD_32_LIBRARY_PATH]) - ;; - *) - shlibpath_var=LD_LIBRARY_PATH - ;; - esac + shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes @@ -2792,9 +2715,8 @@ haiku*) soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/boot/system/non-packaged/develop/lib /boot/system/develop/lib' - sys_lib_dlsearch_path_spec='/boot/home/config/non-packaged/lib /boot/home/config/lib /boot/system/non-packaged/lib /boot/system/lib' - hardcode_into_libs=no + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) @@ -2904,7 +2826,7 @@ linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no - library_names_spec='$libname$release$shared_ext $libname$shared_ext' + library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH @@ -2916,9 +2838,8 @@ linux*android*) hardcode_into_libs=yes dynamic_linker='Android linker' - # -rpath works at least for libraries that are not overridden by - # libraries installed in system locations. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + # Don't embed -rpath directories since the linker doesn't support them. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ;; # This must be glibc/ELF. @@ -2955,7 +2876,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) # Add ABI-specific directories to the system library path. sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" - # Ideally, we could use ldconfig to report *all* directories which are + # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, @@ -2975,18 +2896,6 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) dynamic_linker='GNU/Linux ld.so' ;; -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; - netbsd*) version_type=sunos need_lib_prefix=no @@ -3005,18 +2914,6 @@ netbsd*) hardcode_into_libs=yes ;; -*-mlibc) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='mlibc ld.so' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' @@ -3036,7 +2933,7 @@ newsos6) dynamic_linker='ldqnx.so' ;; -openbsd*) +openbsd* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no @@ -3096,17 +2993,6 @@ rdos*) dynamic_linker=no ;; -serenity*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - dynamic_linker='SerenityOS LibELF' - ;; - solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no *** 65010 LINES SKIPPED *** From nobody Tue May 26 16:49:49 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPzHx4PYKz6g6hN for ; Tue, 26 May 2026 16:49:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPzHx2N7Zz4Kgm for ; Tue, 26 May 2026 16:49:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779814189; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iBGz/jClMHoPL0GqhY5t9F7FnsdagpDyvbqcmPNhTUY=; b=T8Nn9DestQ27OeDyNqKcKOnszD+/WCi9EHb0dpHnWgbXoG5uH+wRZcxhrx/x4O7+soTlig qYDKZdVtlSe7U5gmjxyg6cTv8+1ConSgeLUQyMxSK3zrdx3lEFCMbNBPt78hMajqLRekWZ zKKxEaT23I8iSvV1cWDZRQXRD1J2eO0PwBCxY1CFeDwWfm8k8BCs97LRiQKWpi2PcGij2l WuMzdRDjs0XoWStPAyZ4IjxgC3/xuUlPozvQh5khBYazFI2jpXQDBy+vc5XBSu4FPbA9YU BT9+YN2qNnqqOwJ4sq5I+Z37mpm6GNqUw8DSAXYZo9dd/sPBBcu64jTI09ILXg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779814189; a=rsa-sha256; cv=none; b=O+IywZncK03c9KTjh2o8ZSkS7lIwvZ97uP2ZI65XVxbWmPN2lEYNOYYHFkfw7VhxE3U9Xl qr92SZNYu0ufeOZ5Jj4suIsg3N0n0dEqz+KnryA9bQrX21AYGUOuLQV52zQ/qL/lVspBUc xDFUMN0D/SFmREIOgxyqKm9g4BD2v5JVy+xvJfrUz6LXoG936ZEUbs7Jnqbz8Kam3viNXT N+GDz+nNJsIn2PIlkou4PzPkx35Cqd0Mbx8kS0BFlzNii+MMtxjXRTMo6pcEKFAdUrBVlK maCpJjsMpMwv9N1BPxhW27pSV7UAz62bQLfNBX+xcqRBSbKh+gGHUj0bpy5HmQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779814189; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iBGz/jClMHoPL0GqhY5t9F7FnsdagpDyvbqcmPNhTUY=; b=ZuLFJQPct1opN7oKBltHe83H9wDjB7vajWd1AG+R922Rq6JVhX+IssIbj9ts8OTxfCV1m5 uvHVYJr8r8pnrCCT4EOOB+Il9YmlMt9yY82QFXKvJruu9mse9iX3odeIzK+crhV0yBvGtB 4kY2LgYR6eUvqgkoLd1GSoVJ3LulGIr+0g3b0YOCDMLZWtEJgMH+Rf9UstILrFAl9PhHn1 zuQucHT9q0DXTJcMUPAl9i/4QvQ/+1+Rj2tlsF+F1TPjefy23YccIDhzkL+Elmfz3qP/7r ieAJ/zbOQAbSRpgLHxCuLmwbiHvUjm+olunFNQeweHT4NJfDes7hR5UGxGp6Zg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPzHx1VZWz5Vt for ; Tue, 26 May 2026 16:49:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 37175 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 26 May 2026 16:49:49 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: c81fa81aab33 - stable/14 - ldns: Update to 1.8.4 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c81fa81aab339d6a2d11019e0768bd463131f87a Auto-Submitted: auto-generated Date: Tue, 26 May 2026 16:49:49 +0000 Message-Id: <6a15cf2d.37175.1d69cb8f@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=c81fa81aab339d6a2d11019e0768bd463131f87a commit c81fa81aab339d6a2d11019e0768bd463131f87a Author: Dag-Erling Smørgrav AuthorDate: 2026-05-22 17:54:09 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-26 16:49:32 +0000 ldns: Update to 1.8.4 Merge commit '3dcfa5af412125cd1bad1d383ff7c18c5effbd77' MFC after: 1 week Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D57169 (cherry picked from commit d44c9549ef31884ac069b0306bad248a74bb2825) --- contrib/ldns/Changelog | 41 ++ contrib/ldns/Makefile.in | 48 +- contrib/ldns/README | 23 - contrib/ldns/README-Travis.md | 274 ----------- contrib/ldns/README.snapshots | 2 +- contrib/ldns/acx_nlnetlabs.m4 | 223 ++++++--- contrib/ldns/ax_python_devel.m4 | 147 ++++-- contrib/ldns/compat/asctime_r.c | 16 + contrib/ldns/config.guess | 70 ++- contrib/ldns/config.sub | 239 ++++++---- contrib/ldns/configure | 876 ++++++++++++++++++++++++++--------- contrib/ldns/configure.ac | 150 +++--- contrib/ldns/dane.c | 4 +- contrib/ldns/dnssec.c | 8 +- contrib/ldns/dnssec_sign.c | 9 +- contrib/ldns/dnssec_zone.c | 3 + contrib/ldns/drill/drill.1.in | 2 +- contrib/ldns/drill/drill.c | 2 +- contrib/ldns/drill/root.c | 22 +- contrib/ldns/edns.c | 41 +- contrib/ldns/error.c | 5 + contrib/ldns/host2str.c | 20 +- contrib/ldns/keys.c | 16 +- contrib/ldns/ldns/config.h | 36 +- contrib/ldns/ldns/config.h.in | 28 +- contrib/ldns/ldns/edns.h | 15 + contrib/ldns/ldns/error.h | 4 +- contrib/ldns/ldns/net.h | 3 +- contrib/ldns/ldns/net.h.in | 3 +- contrib/ldns/ldns/parse.h | 26 +- contrib/ldns/ldns/radix.h | 2 +- contrib/ldns/ldns/rdata.h | 2 +- contrib/ldns/ldns/rr.h | 18 +- contrib/ldns/ldns/util.h | 4 +- contrib/ldns/libdns.doxygen.in | 20 +- contrib/ldns/ltmain.sh | 851 +++++++++++++++++++++------------- contrib/ldns/m4/libtool.m4 | 229 +++++---- contrib/ldns/m4/ltoptions.m4 | 4 +- contrib/ldns/m4/ltsugar.m4 | 2 +- contrib/ldns/m4/ltversion.m4 | 13 +- contrib/ldns/m4/lt~obsolete.m4 | 4 +- contrib/ldns/makewin.sh | 65 ++- contrib/ldns/net.c | 4 +- contrib/ldns/packaging/ldns-config.1 | 2 +- contrib/ldns/packet.c | 4 +- contrib/ldns/rr.c | 14 +- contrib/ldns/util.c | 2 + 47 files changed, 2295 insertions(+), 1301 deletions(-) diff --git a/contrib/ldns/Changelog b/contrib/ldns/Changelog index aba41c88c5c8..c7f36767b360 100644 --- a/contrib/ldns/Changelog +++ b/contrib/ldns/Changelog @@ -1,3 +1,44 @@ +1.8.4 2024-07-19 + * Fix building documentation in build directory. + Thanks Michael Tokarev + * Updated the configure script for split openssl directories. + * Fix for windows compile; asctime_r compat, search for inet_ntop + in ws2_32, avoid double decl of inet_ntop, check for symlink call, + include config.h in edns.c, have socket compare use correct + signedness, add -u repo option to makewin.sh, fix quoting in + makewin.sh and check return value of bind and connect in net.c + for failure instead of a socket type. And fix to install .exe files. + * Fix to compile with OpenSSL 3.2. Update acx_nlnetlabs.m4 to 48. + * Fix to compile DLLs, and pick out of the lib64 dir, and include + libssp-0.dll and ldns-config. + * bugfix #237: Resolver uses nameserver commented out in + /etc/resolv.conf. Thanks grembo. + * Added RESINFO rrtype. + * Added WALLET rrtype. + * PR #241: Fix coverity cited problems. Thanks Enji Cooper. + * PR #233: Several Python SWIG issues. Thanks Florian Weimer. + * PR #231: const ldns_rdf * typemap fixes to support swig-4.2.0 + Thanks William S Fulton + * PR #227: keys.c: fix build with libressl >= 3.8.1 + Thanks Fabrice Fontaine + * PR #224: Portable executable progs don't underlink to libldns + Thanks Ørjan Malde + * PR #216: Update declaration for function with no argument + Thanks Ed Maste + * PR #214: fix the build in FreeBSD's base system + Thanks Pierre Pronchery and Dag-Erling Smørgrav + * PR #206: improve 'next-label' algorithm in ldns-walk + Thanks Jelte Jansen + * PR #205: Add functions to extract RFC 8914 extended errors + Thanks Roland van Rijswijk-Deij + * PR #203: Expand CI: Cygwin, BSDs, musl libc, 32-bit, and big-endian + Thanks Felipe Gasper + * PR #191: 16-unit-tests-edns: Fix leak & warnings + Thanks Felipe Gasper + * Added NXNAME rrtype. + * PR #242: Openssl no engine improved support #242 + Thanks Petr Menšík + 1.8.3 2022-08-15 * bugfix #183: Assertion failure with OPT record without rdata. This caused packet creation with only a DO bit (for DNSSEC OK) diff --git a/contrib/ldns/Makefile.in b/contrib/ldns/Makefile.in index 57957d0844d3..32b91576d0d9 100644 --- a/contrib/ldns/Makefile.in +++ b/contrib/ldns/Makefile.in @@ -20,13 +20,14 @@ p5_dns_ldns_dir = $(srcdir)/contrib/DNS-LDNS PERL = @PERL@ swig = @swig@ swigpy_flags = -python @SWIGPY3@ -python_site = @PYTHON_SITE_PKG@ +python_site = @PYTHON_PLATFORM_SITE_PKG@ pyldns_inst = @PYLDNSINST@ pyldns_uninst = @PYLDNSUNINST@ pyldnsx_inst = @PYLDNSXINST@ pyldnsx_uninst = @PYLDNSXUNINST@ libtool = @libtool@ CONFIG_FILES = @CONFIG_FILES@ +top_builddir = @top_builddir@ LDNS_TRUST_ANCHOR_FILE = @LDNS_TRUST_ANCHOR_FILE@ DEFAULT_CAFILE = @DEFAULT_CAFILE@ @@ -85,6 +86,7 @@ LINTFLAGS += -D"__BEGIN_DECLS=" -D"__ssize_t=ssize_t" -D"__intptr_t=intptr # FreeBSD 9 LINTFLAGS += -D"_RuneLocale=int" DEPFLAG = @DEPFLAG@ +EXEEXT=@EXEEXT@ INSTALL = $(srcdir)/install-sh @@ -150,7 +152,8 @@ setup-builddir: # builddir/ is used by 60-compile-builddir putdown-builddir: - rm -f include/ldns lib config.h + rm -rf include/ldns + rm -f lib config.h test ! -d include || rmdir include || : if test -d examples -a ! -f examples/README; then rmdir examples || : ; fi if test -d drill -a ! -f drill/README ; then rmdir drill || : ; fi @@ -168,7 +171,7 @@ no-drill-config-h: fi drill/drill: $(DRILL_LOBJS) $(LIB) $(LIBLOBJS) - $(LINK_EXE) $(DRILL_LOBJS) $(LIBLOBJS) $(LIB) $(LIBSSL_LIBS) $(LIBS) -o drill/drill + $(LINK_EXE) $(DRILL_LOBJS) $(LIBLOBJS) $(LIB) $(LIBSSL_LIBS) $(LIBS) -o drill/drill $(top_builddir)/libldns.la drill/drill.1: $(srcdir)/drill/drill.1.in $(edit) $(srcdir)/drill/drill.1.in > drill/drill.1 @@ -177,16 +180,16 @@ install-drill: drill/drill drill/drill.1 $(INSTALL) -m 755 -d $(DESTDIR)$(bindir) $(INSTALL) -m 755 -d $(DESTDIR)$(mandir) $(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man1 - $(LIBTOOL) --mode=install cp drill/drill $(DESTDIR)$(bindir) + $(LIBTOOL) --mode=install cp drill/drill$(EXEEXT) $(DESTDIR)$(bindir) $(INSTALL) -m 644 drill/drill.1 $(DESTDIR)$(mandir)/man1/drill.1 uninstall-drill: - rm -f $(DESTDIR)$(bindir)/drill $(DESTDIR)$(mandir)/man1/drill.1 + rm -f $(DESTDIR)$(bindir)/drill$(EXEEXT) $(DESTDIR)$(mandir)/man1/drill.1 test ! -d $(DESTDIR)$(mandir) || rmdir -p $(DESTDIR)$(mandir)/man1 || :; test ! -d $(DESTDIR)$(bindir) || rmdir -p $(DESTDIR)$(bindir) || : ; clean-drill: - $(LIBTOOL) --mode clean rm -f $(DRILL_LOBJS) drill/drill drill/drill.1 + $(LIBTOOL) --mode clean rm -f $(DRILL_LOBJS) drill/drill$(EXEEXT) drill/drill.1 examples: setup-builddir no-examples-config-h $(LIB) $(EXAMPLE_PROGS) $(TESTNS) $(LDNS_DPA) $(LDNS_DANE) $(EX_SSL_PROGS) examples/ldns-dane.1 examples/ldns-verify-zone.1 no-examples-config-h: @@ -200,23 +203,23 @@ no-examples-config-h: # Need LIBSSL_LIBS $(EXAMPLE_PROGS): - $(LINK_EXE) $@.lo $(LIBLOBJS) $(LIB) $(LIBSSL_LIBS) $(LIBS) -o $@ + $(LINK_EXE) $@.lo $(LIBLOBJS) $(LIB) $(LIBSSL_LIBS) $(LIBS) -o $@ $(top_builddir)/libldns.la # Need LIBSSL_LIBS $(TESTNS): - $(LINK_EXE) $(TESTNS_LOBJS) $(LIBLOBJS) $(LIB) $(LIBSSL_LIBS) $(LIBS) -o $(TESTNS) + $(LINK_EXE) $(TESTNS_LOBJS) $(LIBLOBJS) $(LIB) $(LIBSSL_LIBS) $(LIBS) -o $(TESTNS) $(top_builddir)/libldns.la # Need LIBSSL_LIBS $(LDNS_DPA): $(LINK_EXE) $(LDNS_DPA_LOBJS) $(LIBLOBJS) $(LIB) $(LIBPCAP_LIBS) $(LIBSSL_LIBS) $(LIBS) \ - -o $(LDNS_DPA) + -o $(LDNS_DPA) $(top_builddir)/libldns.la $(LDNS_DANE): $(LINK_EXE) $(LDNS_DANE_LOBJS) $(LIBLOBJS) $(LIB) $(LIBSSL_SSL_LIBS) $(LIBS) \ - -o $(LDNS_DANE) + -o $(LDNS_DANE) $(top_builddir)/libldns.la $(EX_SSL_PROGS): - $(LINK_EXE) $@.lo $(LIBLOBJS) $(LIB) $(LIBSSL_LIBS) $(LIBS) -o $@ + $(LINK_EXE) $@.lo $(LIBLOBJS) $(LIB) $(LIBSSL_LIBS) $(LIBS) -o $@ $(top_builddir)/libldns.la examples/ldns-dane.1: $(srcdir)/examples/ldns-dane.1.in $(edit) $(srcdir)/examples/ldns-dane.1.in > examples/ldns-dane.1 @@ -229,7 +232,7 @@ install-examples: $(EXAMPLE_PROGS) $(TESTNS) $(LDNS_DPA) $(LDNS_DANE) $(EX_SSL_P $(INSTALL) -m 755 -d $(DESTDIR)$(mandir) $(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man1 for p in $(EXAMPLE_PROGS) $(TESTNS) $(LDNS_DPA) $(LDNS_DANE) $(EX_SSL_PROGS) ; do \ - $(LIBTOOL) --mode=install cp $$p $(DESTDIR)$(bindir) ; \ + $(LIBTOOL) --mode=install cp $$p$(EXEEXT) $(DESTDIR)$(bindir) ; \ if test -f $$p.1 ; \ then $(INSTALL) -m 644 $$p.1 $(DESTDIR)$(mandir)/man1 ; \ else $(INSTALL) -m 644 $(srcdir)/$$p.1 $(DESTDIR)$(mandir)/man1 ; \ @@ -238,20 +241,22 @@ install-examples: $(EXAMPLE_PROGS) $(TESTNS) $(LDNS_DPA) $(LDNS_DANE) $(EX_SSL_P uninstall-examples: for p in $(EX_PROGS_BASENM) ; do \ - rm -f $(DESTDIR)$(bindir)/$$p $(DESTDIR)$(mandir)/man1/$$p.1 ;\ + rm -f $(DESTDIR)$(bindir)/$$p$(EXEEXT) $(DESTDIR)$(mandir)/man1/$$p.1 ;\ done test ! -d $(DESTDIR)$(mandir) || rmdir -p $(DESTDIR)$(mandir)/man1 || :; test ! -d $(DESTDIR)$(bindir) || rmdir -p $(DESTDIR)$(bindir) || : ; clean-examples: - $(LIBTOOL) --mode clean rm -f $(EXAMPLE_PROGS) + for p in $(EX_PROGS_BASENM) ; do \ + $(LIBTOOL) --mode clean rm -f $$p$(EXEEXT) ;\ + done $(LIBTOOL) --mode clean rm -f $(TESTNS) $(LDNS_DPA) $(LDNS_DANE) $(EX_SSL_PROGS) $(LIBTOOL) --mode clean rm -f $(EXAMPLE_LOBJS) $(LIBTOOL) --mode clean rm -f examples/ldns-dane.1 examples/ldns-verify-zone.1 linktest: $(srcdir)/linktest.c libldns.la $(COMP_LIB) $(LIBSSL_CPPFLAGS) -c $(srcdir)/linktest.c -o linktest.lo - $(LINK_EXE) linktest.lo $(LIB) $(LIBSSL_LIBS) $(LIBS) -o linktest + $(LINK_EXE) linktest.lo $(LIB) $(LIBSSL_LIBS) $(LIBS) -o linktest $(top_builddir)/libldns.la lib: libldns.la @@ -270,7 +275,7 @@ doxygen: @if test ! -e doc/header.html ; then \ $(INSTALL) -c -m 644 $(srcdir)/doc/header.html doc/ ; \ fi ; - $(doxygen) $(srcdir)/libdns.doxygen + $(doxygen) libdns.doxygen doc: manpages $(doxygen) @$(INSTALL) -d doc @@ -641,10 +646,10 @@ dnssec_zone.lo dnssec_zone.o: $(srcdir)/dnssec_zone.c ldns/config.h $(srcdir)/ld $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h \ $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h duration.lo duration.o: $(srcdir)/duration.c ldns/config.h $(srcdir)/ldns/duration.h -edns.lo edns.o: $(srcdir)/edns.c $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h $(srcdir)/ldns/buffer.h \ - $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h \ - $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h \ - $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \ +edns.lo edns.o: $(srcdir)/edns.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h \ + $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h \ + $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h $(srcdir)/ldns/keys.h \ + $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \ $(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h \ $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \ $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \ @@ -807,6 +812,7 @@ zone.lo zone.o: $(srcdir)/zone.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \ $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \ $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h +compat/asctime_r.lo compat/asctime_r.o: $(srcdir)/compat/asctime_r.c ldns/config.h compat/b64_ntop.lo compat/b64_ntop.o: $(srcdir)/compat/b64_ntop.c ldns/config.h compat/b64_pton.lo compat/b64_pton.o: $(srcdir)/compat/b64_pton.c ldns/config.h compat/calloc.lo compat/calloc.o: $(srcdir)/compat/calloc.c ldns/config.h @@ -865,7 +871,7 @@ examples/ldns-dpa.lo examples/ldns-dpa.o: $(srcdir)/examples/ldns-dpa.c ldns/con $(srcdir)/ldns/rbtree.h $(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h \ $(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h \ $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h \ - $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h $(srcdir)/examples/ldns-dpa.h + $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h examples/ldns-gen-zone.lo examples/ldns-gen-zone.o: $(srcdir)/examples/ldns-gen-zone.c ldns/config.h $(srcdir)/ldns/ldns.h \ ldns/util.h ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h \ $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h \ diff --git a/contrib/ldns/README b/contrib/ldns/README index 98575917b448..e07fdc078aa2 100644 --- a/contrib/ldns/README +++ b/contrib/ldns/README @@ -106,26 +106,3 @@ Also, when building with SWIG older than 2.0.4, compiling pyldns produces many ``missing initializer'' warnings. Those are harmless too. -Your Support -NLnet Labs offers all of its software products as open source, most -published under a BSD license. You can download them, not only from the -NLnet Labs website but also through the various OS distributions for -which NSD, ldns, and Unbound are packaged. We therefore have little idea -who uses our software in production environments and have no direct ties -with 'our customers'. - -Therefore, we ask you to contact us at users@NLnetLabs.nl and tell us -whether you use one of our products in your production environment, -what that environment looks like, and maybe even share some praise. -We would like to refer to the fact that your organization is using our -products. We will only do that if you explicitly allow us. In all other -cases we will keep the information you share with us to ourselves. - -In addition to the moral support you can also support us -financially. NLnet Labs is a recognized not-for-profit charity foundation -that is chartered to develop open-source software and open-standards -for the Internet. If you use our software to satisfaction please express -that by giving us a donation. For small donations PayPal can be used. For -larger and regular donations please contact us at users@NLnetLabs.nl. Also -see http://www.nlnetlabs.nl/labs/contributors/. - diff --git a/contrib/ldns/README-Travis.md b/contrib/ldns/README-Travis.md deleted file mode 100644 index faa534353119..000000000000 --- a/contrib/ldns/README-Travis.md +++ /dev/null @@ -1,274 +0,0 @@ -# Travis Testing - -LDNS 1.7.1 and above leverage Travis CI to increase coverage of compilers and platforms. Compilers include Clang and GCC; while platforms include Android, iOS, Linux, and OS X on AMD64, Aarch64, PowerPC and s390x hardware. - -Android is tested on armv7a, aarch64, x86 and x86_64. The Android recipes build and install OpenSSL, and then builds LDNS. The testing is tailored for Android NDK-r19 and above, and includes NDK-r20 and NDK-r21. Mips and Mips64 are not tested because they are no longer supported under current NDKs. - -iOS is tested for iPhoneOS, WatchOS, AppleTVOS, iPhoneSimulator, AppleTVSimulator and WatchSimulator. The testing uses Xcode 10 on OS X 10.13. - -The LDNS Travis configuration file `.travis.yml` does not use top-level keys like `os:` and `compiler:` so there is no matrix expansion. Instead LDNS specifies the exact job to run under the `jobs:` and `include:` keys. - -## Typical recipe - -A typical recipe tests Clang and GCC on various hardware. The hardware includes AMD64, Aarch64, PowerPC and s390x. PowerPC is a little-endian platform, and s390x is a big-endian platform. There are pairs of recipes that are similar to the following. - -``` -- os: linux - name: GCC on Linux, Aarch64 - compiler: gcc - arch: arm64 - dist: bionic -- os: linux - name: Clang on Linux, Aarch64 - compiler: clang - arch: arm64 - dist: bionic -``` - -OS X provides a single recipe to test Clang. GCC is not tested because GCC is an alias for Clang. - -## Sanitizer builds - -Two sanitizer builds are tested using Clang and GCC, for a total of four builds. The first sanitizer is Undefined Behavior sanitizer (UBsan), and the second is Address sanitizer (Asan). The sanitizers are only run on AMD64 hardware. Note the environment includes `UBSAN=yes` or `ASAN=yes` for the sanitizer builds. - -The recipes are similar to the following. - -``` -- os: linux - name: UBsan, GCC on Linux, Amd64 - compiler: gcc - arch: amd64 - dist: bionic - env: UBSAN=yes -- os: linux - name: UBsan, Clang on Linux, Amd64 - compiler: clang - arch: amd64 - dist: bionic - env: UBSAN=yes -``` - -When the Travis script encounters a sanitizer it uses different `CFLAGS` and configuration string. - -``` -if [ "$UBSAN" = "yes" ]; then - export CFLAGS="-DNDEBUG -g2 -O3 -fsanitize=undefined -fno-sanitize-recover" - bash test/test_ci.sh -elif [ "$ASAN" = "yes" ]; then - export CFLAGS="-DNDEBUG -g2 -O3 -fsanitize=address" - bash test/test_ci.sh -... -``` - -## Android builds - -Travis tests Android builds for the armv7a, aarch64, x86 and x86_64 architectures. The builds are trickier than other builds for several reasons. The testing requires installation of the Android NDK and SDK, it requires a cross-compile, and requires OpenSSL prerequisites. The Android cross-compiles also require care to set the Autotools triplet, the OpenSSL triplet, the toolchain path, the tool variables, and the sysroot. The discussion below detail the steps of the Android recipes. - -### Android job - -The first step sets environmental variables for the cross-compile using the Travis job. A typical job with variables is shown below. - -``` -- os: linux - name: Android armv7a, Linux, Amd64 - compiler: clang - arch: amd64 - dist: bionic - env: - - ANDROID=yes - - AUTOTOOLS_HOST=armv7a-linux-androideabi - - OPENSSL_HOST=android-arm - - ANDROID_CPU=armv7a - - ANDROID_API=23 - - ANDROID_PREFIX="$HOME/android$ANDROID_API-$ANDROID_CPU" - - ANDROID_SDK_ROOT="$HOME/android-sdk" - - ANDROID_NDK_ROOT="$HOME/android-ndk" -``` - -### ANDROID_NDK_ROOT - -The second step for Android is to set the environmental variables `ANDROID_NDK_ROOT` and `ANDROID_SDK_ROOT`. This is an important step because the NDK and SDK use the variables internally to locate their own tools. Also see [Recommended NDK Directory?](https://groups.google.com/forum/#!topic/android-ndk/qZjhOaynHXc) on the android-ndk mailing list. (Many folks miss this step, or use incorrect variables like `ANDROID_NDK_HOME` or `ANDROID_SDK_HOME`). - -If you are working from a developer machine you probably already have the necessary tools installed. You should ensure `ANDROID_NDK_ROOT` and `ANDROID_SDK_ROOT` are set properly. - -### Tool installation - -The second step installs tools needed for OpenSSL, Expat and LDNS. This step is handled in by the script `contrib/android/install_tools.sh`. The tools include curl, tar, zip, unzip and java. - -``` -before_script: - - | - if [ "$ANDROID" = "yes" ]; then - ./contrib/android/install_tools.sh - elif [ "$IOS" = "yes" ]; then - ./contrib/ios/install_tools.sh - fi -``` - -### NDK installation - -The third step installs the NDK and SDK. This step is handled in by the script `contrib/android/install_ndk.sh`. The script uses `ANDROID_NDK_ROOT` and `ANDROID_SDK_ROOT` to place the NDK and SDK in the `$HOME` directory. - -If you are working from a developer machine you probably already have a NDK and SDK installed. - -### Android environment - -The fourth step sets the Android cross-compile environment using the script `contrib/android/setenv_android.sh`. The script is `sourced` so the variables in the script are available to the calling shell. The script sets variables like `CC`, `CXX`, `AS` and `AR`; sets `CFLAGS` and `CXXFLAGS`; sets a `sysroot` so Android headers and libraries are found; and adds the path to the toolchain to `PATH`. - -`contrib/android/setenv_android.sh` knows which toolchain and architecture to select by inspecting environmental variables set by Travis for the job. In particular, the variables `ANDROID_CPU` and `ANDROID_API` tell `contrib/android/setenv_android.sh` which tools and libraries to select. - -The `contrib/android/setenv_android.sh` script specifies the tools in a `case` statement like the following. There is a case for each of the architectures armv7a, aarch64, x86 and x86_64. - -``` -armv8a|aarch64|arm64|arm64-v8a) - CC="aarch64-linux-android$ANDROID_API-clang" - CXX="aarch64-linux-android$ANDROID_API-clang++" - LD="aarch64-linux-android-ld" - AS="aarch64-linux-android-as" - AR="aarch64-linux-android-ar" - RANLIB="aarch64-linux-android-ranlib" - STRIP="aarch64-linux-android-strip" - - CFLAGS="-funwind-tables -fexceptions" - CXXFLAGS="-funwind-tables -fexceptions -frtti" -``` - -### OpenSSL - -The fifth step builds OpenSSL. OpenSSL is built for iOS using the scripts `contrib/android/install_openssl.sh`. The script downloads, configures and installs the latest release version of the OpenSSL libraries. OpenSSL is configured with `--prefix="$ANDROID_PREFIX"` so the headers are placed in `$ANDROID_PREFIX/include` directory, and the libraries are placed in the `$ANDROID_PREFIX/lib` directory. - -`ANDROID_PREFIX` is the value `$HOME/android$ANDROID_API-$ANDROID_CPU`. The libraries will be installed in `$HOME/android23-armv7a`, `$HOME/android23-aarch64`, etc. For Autotools projects, the appropriate `PKG_CONFIG_PATH` is exported. - -`PKG_CONFIG_PATH` is an important variable. It is the userland equivalent to sysroot, and allows Autotools to find non-system headers and libraries for an architecture. Typical `PKG_CONFIG_PATH` are `$HOME/android23-armv7a/lib/pkgconfig` and `$HOME/android23-aarch64/lib/pkgconfig`. - -OpenSSL also uses a custom configuration file called `15-android.conf`. It is a copy of the OpenSSL's project file and located at `contrib/android/15-android.conf`. The LDNS version is copied to the OpenSSL source files after unpacking the OpenSSL distribution. The LDNS version has legacy NDK support removed and some other fixes, like `ANDROID_NDK_ROOT` awareness. The changes mean LDNS's `15-android.conf` will only work with LDNS, with NDK-r19 and above, and a properly set environment. - -OpenSSL is configured with `no-engine`. If you want to include OpenSSL engines then edit `contrib/android/install_openssl.sh` and remove the config option. - -### Android build - -Finally, once OpenSSL are built, then the Travis script configures and builds LDNS. The recipe looks as follows. - -``` -elif [ "$ANDROID" = "yes" ]; then - export AUTOTOOLS_BUILD="$(./config.guess)" - export PKG_CONFIG_PATH="$ANDROID_PREFIX/lib/pkgconfig" - ./contrib/android/install_ndk.sh - source ./contrib/android/setenv_android.sh - ./contrib/android/install_openssl.sh - ./contrib/android/bootstrap_ldns.sh - ./configure \ - --build="$AUTOTOOLS_BUILD" \ - --host="$AUTOTOOLS_HOST" \ - --prefix="$ANDROID_PREFIX" \ - --with-ssl="$ANDROID_PREFIX" \ - --disable-gost \ - --with-drill --with-examples - make -j 2 - make install -``` - -Travis only smoke tests an Android build using a compile, link and install. The self tests are not run. TODO: figure out how to fire up an emulator, push the tests to the device and run them. - -### Android flags - -`contrib/android/setenv_android.sh` uses specific flags for `CFLAGS` and `CXXFLAGS`. They are taken from `ndk-build`, so we consider them the official flag set. It is important to use the same flags across projects to avoid subtle problems due to mixing and matching different flags. - -`CXXFLAGS` includes `-fexceptions` and `-frtti` because exceptions and runtime type info are disabled by default. `CFLAGS` include `-funwind-tables` and `-fexceptions` to ensure C++ exceptions pass through C code, if needed. Also see `docs/CPLUSPLUS-SUPPORT.html` in the NDK docs. - -To inspect the flags used by `ndk-build` for a platform clone ASOP's [ndk-samples](https://github.com/android/ndk-samples/tree/master/hello-jni) and build the `hello-jni` project. Use the `V=1` flag to see the full compiler output from `ndk-build`. - -## iOS builds - -Travis tests iOS builds for the armv7a, armv7s and aarch64 architectures for iPhoneOS, AppleTVOS and WatchOS. iPhoneOS is tested using both 32-bit builds (iPhones) and 64-bit builds (iPads). Travis also tests compiles against the simulators. The builds are trickier than other builds for several reasons. The testing requires a cross-compile, and requires OpenSSL prerequisites. The iOS cross-compiles also require care to set the Autotools triplet, the OpenSSL triplet, the toolchain path, the tool variables, and the sysroot. The discussion below detail the steps of the iOS recipes. - -### iOS job - -The first step sets environmental variables for the cross-compile using the Travis job. A typical job with variables is shown below. - -``` -- os: osx - osx_image: xcode10 - name: Apple iPhone on iOS, armv7 - compiler: clang - env: - - IOS=yes - - AUTOTOOLS_HOST=armv7-apple-ios - - OPENSSL_HOST=ios-cross - - IOS_SDK=iPhoneOS - - IOS_CPU=armv7s - - IOS_PREFIX="$HOME/$IOS_SDK-$IOS_CPU" -``` - -### Tool installation - -The second step installs tools needed for OpenSSL, Expat and LDNS. This step is handled in by the script `contrib/ios/install_tools.sh`. The tools include autotools, curl and perl. The installation happens at the `before_script:` stage of Travis. - -``` -before_script: - - | - if [ "$ANDROID" = "yes" ]; then - ./contrib/android/install_tools.sh - elif [ "$IOS" = "yes" ]; then - ./contrib/ios/install_tools.sh - fi -``` - -### iOS environment - -The third step sets the iOS cross-compile environment using the script `contrib/ios/setenv_ios.sh`. The script is `sourced` so the variables in the script are available to the calling shell. The script sets variables like `CC`, `CXX`, `AS` and `AR`; sets `CFLAGS` and `CXXFLAGS`; sets a `sysroot` so iOS headers and libraries are found; and adds the path to the toolchain to `PATH`. - -`contrib/ios/setenv_ios.sh` knows which toolchain and architecture to select by inspecting environmental variables set by Travis for the job. In particular, the variables `IOS_SDK` and `IOS_CPU` tell `contrib/ios/setenv_ios.sh` which tools and libraries to select. - -The `contrib/ios/setenv_ios.sh` script specifies the tools to use during the cross-compile. For Apple SDKs, the tool names are the same as a desktop. There are no special prefixes for the mobile tools. - -``` -CPP=cpp -CC=clang -CXX=clang++ -LD=ld -AS=as -AR=ar -RANLIB=ranlib -STRIP=strip -``` - -If you are working from a developer machine you probably already have the necessary tools installed. - -### OpenSSL - -The fourth step builds OpenSSL. OpenSSL is built for iOS using the scripts `contrib/ios/install_openssl.sh`. The script downloads, configures and installs the latest release version of the OpenSSL libraries. OpenSSL is configured with `--prefix="$IOS_PREFIX"` so the headers are placed in `$IOS_PREFIX/include` directory, and the libraries are placed in the `$IOS_PREFIX/lib` directory. - -`IOS_PREFIX` is the value `$HOME/$IOS_SDK-$IOS_CPU`. The scheme handles both iOS SDKs and cpu architectures so the pair receives a unique installation directory. The libraries will be installed in `$HOME/iPhoneOS-armv7s`, `$HOME/iPhoneOS-arm64`, `$HOME/iPhoneSimulator-i386`, etc. For Autotools projects, the appropriate `PKG_CONFIG_PATH` is exported. - -`PKG_CONFIG_PATH` is an important variable. It is the userland equivalent to sysroot, and allows Autotools to find non-system headers and libraries for an architecture. Typical `PKG_CONFIG_PATH` are `$HOME/iPhoneOS-armv7s/lib/pkgconfig` and `$HOME/iPhoneOS-arm64/lib/pkgconfig`. - -OpenSSL also uses a custom configuration file called `15-ios.conf`. It is a copy of the OpenSSL's project file and located at `contrib/ios/15-ios.conf`. The LDNS version is copied to the OpenSSL source files after unpacking the OpenSSL distribution. The changes mean LDNS's `15-ios.conf` will only work with LDNS and a properly set environment. - -OpenSSL is configured with `no-engine`. Engines require dynamic loading so engines are disabled permanently in `15-ios.conf`. - -### iOS build - -Finally, once OpenSSL are built, then the Travis script configures and builds LDNS. The full recipe looks as follows. - -``` -elif [ "$IOS" = "yes" ]; then - export AUTOTOOLS_BUILD="$(./config.guess)" - export PKG_CONFIG_PATH="$IOS_PREFIX/lib/pkgconfig" - source ./contrib/ios/setenv_ios.sh - ./contrib/ios/install_openssl.sh - ./contrib/ios/bootstrap_ldns.sh - ./configure \ - --build="$AUTOTOOLS_BUILD" --host="$AUTOTOOLS_HOST" \ - --prefix="$IOS_PREFIX" \ - --with-ssl="$IOS_PREFIX" --disable-gost \ - --with-drill --with-examples - make -j 2 - make install -``` - -Travis only smoke tests an iOS build using a compile, link and install. The self tests are not run. TODO: figure out how to fire up an simulator, push the tests to the device and run them. - -### iOS flags - -`contrib/ios/setenv_ios.sh` uses specific flags for `CFLAGS` and `CXXFLAGS`. They are taken from Xcode, so we consider them the official flag set. It is important to use the same flags across projects to avoid subtle problems due to mixing and matching different flags. diff --git a/contrib/ldns/README.snapshots b/contrib/ldns/README.snapshots index 891fcca1d6ef..df7ee003cada 100644 --- a/contrib/ldns/README.snapshots +++ b/contrib/ldns/README.snapshots @@ -3,6 +3,6 @@ ldns - snapshot releases Snapshot releases are not official released. They can be released to interested parties for development. -Snapshots can be recognized from the date in the the tar file name. +Snapshots can be recognized from the date in the tar file name. They should not be used for packaging in distributions. diff --git a/contrib/ldns/acx_nlnetlabs.m4 b/contrib/ldns/acx_nlnetlabs.m4 index 39e92d875331..6a01dc5a4769 100644 --- a/contrib/ldns/acx_nlnetlabs.m4 +++ b/contrib/ldns/acx_nlnetlabs.m4 @@ -2,7 +2,16 @@ # Copyright 2009, Wouter Wijngaards, NLnet Labs. # BSD licensed. # -# Version 41 +# Version 48 +# 2024-01-16 fix to add -l:libssp.a to -lcrypto link check. +# and check for getaddrinfo with only header. +# 2024-01-15 fix to add crypt32 to -lcrypto link check when checking for gdi32. +# 2023-05-04 fix to remove unused whitespace. +# 2023-01-26 fix -Wstrict-prototypes. +# 2022-09-01 fix checking if nonblocking sockets work on OpenBSD. +# 2021-08-17 fix sed script in ssldir split handling. +# 2021-08-17 fix for openssl to detect split version, with ssldir_include +# and ssldir_lib output directories. # 2021-07-30 fix for openssl use of lib64 directory. # 2021-06-14 fix nonblocking test to use host instead of target for mingw test. # 2021-05-17 fix nonblocking socket test from grep on mingw32 to mingw for @@ -183,7 +192,7 @@ dnl cache=`echo $1 | sed 'y%.=/+- %___p__%'` AC_CACHE_VAL(cv_prog_cc_flag_needed_$cache, [ echo '$2' > conftest.c -echo 'void f(){}' >>conftest.c +echo 'void f(void){}' >>conftest.c if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then eval "cv_prog_cc_flag_needed_$cache=no" else @@ -229,7 +238,7 @@ dnl DEPFLAG: set to flag that generates dependencies. AC_DEFUN([ACX_DEPFLAG], [ AC_MSG_CHECKING([$CC dependency flag]) -echo 'void f(){}' >conftest.c +echo 'void f(void){}' >conftest.c if test "`$CC -MM conftest.c 2>&1`" = "conftest.o: conftest.c"; then DEPFLAG="-MM" else @@ -268,7 +277,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED($C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAUL #include #endif -int test() { +int test(void) { int a; char **opts = NULL; struct timeval tv; @@ -305,7 +314,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED($C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAUL #include #endif -int test() { +int test(void) { int a; char **opts = NULL; struct timeval tv; @@ -331,7 +340,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED($C99FLAG, [ #include #include -int test() { +int test(void) { int a = 0; return a; } @@ -341,7 +350,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D_BSD_SOURCE -D_DEFAULT_SOURCE, [ #include -int test() { +int test(void) { int a; a = isascii(32); return a; @@ -352,7 +361,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D_GNU_SOURCE, [ #include -int test() { +int test(void) { struct in6_pktinfo inf; int a = (int)sizeof(inf); return a; @@ -366,7 +375,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D_GNU_SOURCE -D_FRSRESGID, [ #include -int test() { +int test(void) { int a = setresgid(0,0,0); a = setresuid(0,0,0); return a; @@ -381,7 +390,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D_POSIX_C_SOURCE=200112, #endif #include -int test() { +int test(void) { int a = 0; char *t; time_t time = 0; @@ -409,7 +418,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D__EXTENSIONS__, #include #endif -int test() { +int test(void) { int a; char **opts = NULL; struct timeval tv; @@ -471,7 +480,7 @@ fi dnl Setup ATTR_FORMAT config.h parts. dnl make sure you call ACX_CHECK_FORMAT_ATTRIBUTE also. AC_DEFUN([AHX_CONFIG_FORMAT_ATTRIBUTE], -[ +[ #ifdef HAVE_ATTR_FORMAT # define ATTR_FORMAT(archetype, string_index, first_to_check) \ __attribute__ ((format (archetype, string_index, first_to_check))) @@ -647,6 +656,30 @@ AC_DEFUN([ACX_SSL_CHECKS], [ withval=$1 if test x_$withval != x_no; then AC_MSG_CHECKING(for SSL) + if test -n "$withval"; then + dnl look for openssl install with different version, eg. + dnl in /usr/include/openssl11/openssl/ssl.h + dnl and /usr/lib64/openssl11/libssl.so + dnl with the --with-ssl=/usr/include/openssl11 + if test ! -f "$withval/include/openssl/ssl.h" -a -f "$withval/openssl/ssl.h"; then + ssldir="$withval" + found_ssl="yes" + withval="" + ssldir_include="$ssldir" + dnl find the libdir + ssldir_lib=`echo $ssldir | sed -e 's/include/lib/'` + if test -f "$ssldir_lib/libssl.a" -o -f "$ssldir_lib/libssl.so"; then + : # found here + else + ssldir_lib=`echo $ssldir | sed -e 's/include/lib64/'` + if test -f "$ssldir_lib/libssl.a" -o -f "$ssldir_lib/libssl.so"; then + : # found here + else + AC_MSG_ERROR([Could not find openssl lib file, $ssldir_lib/libssl.[so,a], pass like "/usr/local" or "/usr/include/openssl11"]) + fi + fi + fi + fi if test x_$withval = x_ -o x_$withval = x_yes; then withval="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr" fi @@ -654,12 +687,12 @@ AC_DEFUN([ACX_SSL_CHECKS], [ ssldir="$dir" if test -f "$dir/include/openssl/ssl.h"; then found_ssl="yes" - AC_DEFINE_UNQUOTED([HAVE_SSL], [], [Define if you have the SSL libraries installed.]) - dnl assume /usr/include is already in the include-path. - if test "$ssldir" != "/usr"; then - CPPFLAGS="$CPPFLAGS -I$ssldir/include" - LIBSSL_CPPFLAGS="$LIBSSL_CPPFLAGS -I$ssldir/include" - fi + ssldir_include="$ssldir/include" + if test ! -d "$ssldir/lib" -a -d "$ssldir/lib64"; then + ssldir_lib="$ssldir/lib64" + else + ssldir_lib="$ssldir/lib" + fi break; fi done @@ -667,20 +700,17 @@ AC_DEFUN([ACX_SSL_CHECKS], [ AC_MSG_ERROR(Cannot find the SSL libraries in $withval) else AC_MSG_RESULT(found in $ssldir) + AC_DEFINE_UNQUOTED([HAVE_SSL], [], [Define if you have the SSL libraries installed.]) HAVE_SSL=yes - dnl assume /usr is already in the lib and dynlib paths. - if test "$ssldir" != "/usr" -a "$ssldir" != ""; then - if test ! -d "$ssldir/lib" -a -d "$ssldir/lib64"; then - LDFLAGS="$LDFLAGS -L$ssldir/lib64" - LIBSSL_LDFLAGS="$LIBSSL_LDFLAGS -L$ssldir/lib64" - ACX_RUNTIME_PATH_ADD([$ssldir/lib64]) - else - LDFLAGS="$LDFLAGS -L$ssldir/lib" - LIBSSL_LDFLAGS="$LIBSSL_LDFLAGS -L$ssldir/lib" - ACX_RUNTIME_PATH_ADD([$ssldir/lib]) - fi - fi - + dnl assume /usr is already in the include, lib and dynlib paths. + if test "$ssldir" != "/usr"; then + CPPFLAGS="$CPPFLAGS -I$ssldir_include" + LIBSSL_CPPFLAGS="$LIBSSL_CPPFLAGS -I$ssldir_include" + LDFLAGS="$LDFLAGS -L$ssldir_lib" + LIBSSL_LDFLAGS="$LIBSSL_LDFLAGS -L$ssldir_lib" + ACX_RUNTIME_PATH_ADD([$ssldir_lib]) + fi + AC_MSG_CHECKING([for EVP_sha256 in -lcrypto]) LIBS="$LIBS -lcrypto" LIBSSL_LIBS="$LIBSSL_LIBS -lcrypto" @@ -705,40 +735,73 @@ AC_DEFUN([ACX_SSL_CHECKS], [ ]])],[ AC_DEFINE([HAVE_EVP_SHA256], 1, [If you have EVP_sha256]) - AC_MSG_RESULT(yes) + AC_MSG_RESULT(yes) ],[ AC_MSG_RESULT(no) LIBS="$BAKLIBS" LIBSSL_LIBS="$BAKSSLLIBS" - LIBS="$LIBS -ldl" - LIBSSL_LIBS="$LIBSSL_LIBS -ldl" - AC_MSG_CHECKING([if -lcrypto needs -ldl]) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ - int EVP_sha256(void); - (void)EVP_sha256(); - ]])],[ - AC_DEFINE([HAVE_EVP_SHA256], 1, - [If you have EVP_sha256]) - AC_MSG_RESULT(yes) - ],[ - AC_MSG_RESULT(no) - LIBS="$BAKLIBS" - LIBSSL_LIBS="$BAKSSLLIBS" - LIBS="$LIBS -ldl -pthread" - LIBSSL_LIBS="$LIBSSL_LIBS -ldl -pthread" - AC_MSG_CHECKING([if -lcrypto needs -ldl -pthread]) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ - int EVP_sha256(void); - (void)EVP_sha256(); - ]])],[ - AC_DEFINE([HAVE_EVP_SHA256], 1, - [If you have EVP_sha256]) - AC_MSG_RESULT(yes) - ],[ - AC_MSG_RESULT(no) - AC_MSG_ERROR([OpenSSL found in $ssldir, but version 0.9.7 or higher is required]) + + LIBS="$LIBS -lgdi32 -lws2_32 -lcrypt32" + LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32 -lcrypt32" + AC_MSG_CHECKING([if -lcrypto needs -lgdi32 -lws2_32 -lcrypt32]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ + int EVP_sha256(void); + (void)EVP_sha256(); + ]])],[ + AC_DEFINE([HAVE_EVP_SHA256], 1, + [If you have EVP_sha256]) + AC_MSG_RESULT(yes) + ],[ + AC_MSG_RESULT(no) + LIBS="$BAKLIBS" + LIBSSL_LIBS="$BAKSSLLIBS" + + LIBS="$LIBS -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a" + LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a" + AC_MSG_CHECKING([if -lcrypto needs -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ + int EVP_sha256(void); + (void)EVP_sha256(); + ]])],[ + AC_DEFINE([HAVE_EVP_SHA256], 1, + [If you have EVP_sha256]) + AC_MSG_RESULT(yes) + ],[ + AC_MSG_RESULT(no) + LIBS="$BAKLIBS" + LIBSSL_LIBS="$BAKSSLLIBS" + + LIBS="$LIBS -ldl" + LIBSSL_LIBS="$LIBSSL_LIBS -ldl" + AC_MSG_CHECKING([if -lcrypto needs -ldl]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ + int EVP_sha256(void); + (void)EVP_sha256(); + ]])],[ + AC_DEFINE([HAVE_EVP_SHA256], 1, + [If you have EVP_sha256]) + AC_MSG_RESULT(yes) + ],[ + AC_MSG_RESULT(no) + LIBS="$BAKLIBS" + LIBSSL_LIBS="$BAKSSLLIBS" + LIBS="$LIBS -ldl -pthread" + LIBSSL_LIBS="$LIBSSL_LIBS -ldl -pthread" + AC_MSG_CHECKING([if -lcrypto needs -ldl -pthread]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ + int EVP_sha256(void); + (void)EVP_sha256(); + ]])],[ + AC_DEFINE([HAVE_EVP_SHA256], 1, + [If you have EVP_sha256]) + AC_MSG_RESULT(yes) + ],[ + AC_MSG_RESULT(no) + AC_MSG_ERROR([OpenSSL found in $ssldir, but version 0.9.7 or higher is required]) + ]) + ]) ]) - ]) + ]) ]) ]) fi @@ -752,13 +815,13 @@ AC_CHECK_HEADERS([openssl/rand.h],,, [AC_INCLUDES_DEFAULT]) dnl Check for SSL, where SSL is mandatory dnl Adds --with-ssl option, searches for openssl and defines HAVE_SSL if found -dnl Setup of CPPFLAGS, CFLAGS. Adds -lcrypto to LIBS. +dnl Setup of CPPFLAGS, CFLAGS. Adds -lcrypto to LIBS. dnl Checks main header files of SSL. dnl AC_DEFUN([ACX_WITH_SSL], [ AC_ARG_WITH(ssl, AS_HELP_STRING([--with-ssl=pathname],[enable SSL (will check /usr/local/ssl - /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr)]),[ + /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr or specify like /usr/include/openssl11)]),[ ],[ withval="yes" ]) @@ -776,7 +839,7 @@ dnl AC_DEFUN([ACX_WITH_SSL_OPTIONAL], [ AC_ARG_WITH(ssl, AS_HELP_STRING([--with-ssl=pathname],[enable SSL (will check /usr/local/ssl - /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr)]),[ + /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr or specify like /usr/include/openssl11)]),[ ],[ withval="yes" ]) @@ -809,7 +872,7 @@ dnl try to see if an additional _LARGEFILE_SOURCE 1 is needed to get fseeko ACX_CHECK_COMPILER_FLAG_NEEDED(-D_LARGEFILE_SOURCE=1, [ #include -int test() { +int test(void) { int a = fseeko(stdin, 0, 0); return a; } @@ -834,7 +897,7 @@ char* (*f) () = getaddrinfo; #ifdef __cplusplus } #endif -int main() { +int main(void) { ; return 0; } @@ -845,7 +908,7 @@ dnl see if on windows if test "$ac_cv_header_windows_h" = "yes"; then AC_DEFINE(USE_WINSOCK, 1, [Whether the windows socket API is used]) USE_WINSOCK="1" - if echo $LIBS | grep 'lws2_32' >/dev/null; then + if echo "$LIBS" | grep 'lws2_32' >/dev/null; then : else LIBS="$LIBS -lws2_32" @@ -853,6 +916,24 @@ if test "$ac_cv_header_windows_h" = "yes"; then fi ], dnl no quick getaddrinfo, try mingw32 and winsock2 library. +dnl perhaps getaddrinfo needs only the include +AC_LINK_IFELSE( +[AC_LANG_PROGRAM( +[ +#ifdef HAVE_WS2TCPIP_H +#include +#endif +], +[ + (void)getaddrinfo(NULL, NULL, NULL, NULL); +] +)], +[ *** 6808 LINES SKIPPED *** From nobody Tue May 26 16:49:47 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPzHw3qL8z6g71M for ; Tue, 26 May 2026 16:49: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPzHw0NsHz4KHW for ; Tue, 26 May 2026 16:49:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779814188; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zyx4zDXyYAgEBN/eVn2Tb++nudfzmezycATdzk7Msq0=; b=oU4CQ6r6W1/LH1rfUkElwliDkh7Z6JRmv/7z3aFX1kP1vSHvU4L/uYGauDS3mzxOMZNgna hQYka6p0eHfprQ5Fqsq1es7eLt91KoLa+ePQhwGF9qL+SE+VRAzgS7D3bJZyTmJRUVuNkw S+ZCkZAbKfPzYi8VePJXcsgEdiMmWeIc7VqSuZ8RCzx5suGifMnA90GSflCS0JzLMVsOdR 8Ap8BcrOz1sZh+TMk/06hRM02iAW5LnlfWxhCP6a26/5VVBQwBdXpym7QUn25Wkl2pjyFD WzX6Yz9+Kjja2zZ7TViFgntGLMStQ42wWqfYptuMvoDOFYirX2mDJCrVasksUQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779814188; a=rsa-sha256; cv=none; b=ObKfUyJg3UMMBXmHVkqdnrg0RFqvvx3z+eF3VHjdxquGffY0jxFw/2CaIQIE5QCfmDLu+e jonbC2DyqbRvu7ZHFIOK18W7mF8IfZ5EXOIyB55W4yIlf2FnJY6bBoGZjj7jAHd7fhMMJs bn0a3x7H4RlcSE2N8hNdMwgkbXkdshB6Nlmw6RVMJ75wDlloJWcXFCDyWdzWvcFKic9hP9 MbPxW7mwMtCXY7z0O3un/3dM4SO/IcAnGK4FvkStvun3niMsVEovPqE2v3ZNDKN1zBAOYK XsoEAXL9w9uGr5eIWUpsJa7a7mUJlmo8cAn+37H+O9isyqcJPWQKvxBaJaWhFw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779814188; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zyx4zDXyYAgEBN/eVn2Tb++nudfzmezycATdzk7Msq0=; b=X6pf6WbW+OlB9fXepUX8lvNpNBgyu9cgG5qCq/ctb1l/mUU/sjDCVwzOQZAJyapv0TA1ys SnQseunBw90ZDdy4ytnIo8fJovB8sBmtmTyZBKNcua381b1uKdZY5OseFJfAC8TINDE6DI KF9MEg9UHxIo3rh7t0/1KiJQOqXq8wHRL/80u2ePr40hjskLsj6CINwdgLoXZ2ykDgMBU/ /wRyMDk0TQ0MV5Zc1LDUD88NK+z9+HB7/NdZYCgnKcJyJj+g4/28xGKPKRKFLtuCXKr6TB k/WlRoxAys3rGAWi9rF0jyx2wNrvAi5VJIX4ccVn5Pcj+HwkYFiy3nqmbryMWQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPzHw00J5z4t1 for ; Tue, 26 May 2026 16:49:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 364fc by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 26 May 2026 16:49:47 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 944bd28f0882 - stable/14 - ldns: Belatedly update for OpenSSL 3.0.0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 944bd28f088282407e2c63ee023f150bb6f0fc1c Auto-Submitted: auto-generated Date: Tue, 26 May 2026 16:49:47 +0000 Message-Id: <6a15cf2b.364fc.258561b6@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=944bd28f088282407e2c63ee023f150bb6f0fc1c commit 944bd28f088282407e2c63ee023f150bb6f0fc1c Author: Dag-Erling Smørgrav AuthorDate: 2026-05-22 13:56:16 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-26 16:49:32 +0000 ldns: Belatedly update for OpenSSL 3.0.0 MFC after: 1 week Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D57168 (cherry picked from commit cbe037c970580efc40eeca4715ac51e4d0fea082) ldns: Mark these commits as merged (cherry picked from commit 2bc6aa3c41d0dc330fefa6363a23d2cfa0253f73) (cherry picked from commit 597a090ff2ab868242e4ec1cdec7469edbe41c50) (cherry picked from commit 399f9ca49b6ecc7fc9bd8b2a0fd487fea4570a65) (cherry picked from commit f103898935e1b709adbdaed5e0b10f99a17b9a4a) --- contrib/ldns/ldns/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/ldns/ldns/config.h b/contrib/ldns/ldns/config.h index 3ac94403296f..0fe9f2c3dbce 100644 --- a/contrib/ldns/ldns/config.h +++ b/contrib/ldns/ldns/config.h @@ -118,7 +118,7 @@ #define HAVE_EVP_PKEY_BASE_ID 1 /* Define to 1 if you have the `EVP_PKEY_get_base_id' function. */ -/* #undef HAVE_EVP_PKEY_GET_BASE_ID */ +#define HAVE_EVP_PKEY_GET_BASE_ID 1 /* Define to 1 if you have the `EVP_PKEY_keygen' function. */ #define HAVE_EVP_PKEY_KEYGEN 1 From nobody Tue May 26 16:49:51 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPzHz5DbRz6g6kt for ; Tue, 26 May 2026 16:49: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPzHz3Pslz4KcY for ; Tue, 26 May 2026 16:49:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779814191; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rXh8Eb9DnZERl0EbxIiY4SuVH5HNj/Q8nRq0yZX+f3Y=; b=pVCOX3vq9wiPCWWiF9GO5FfEeHUd8sLglIahU9L2ZVX3OCMQWG6UvgRcxtoyv9LebmH+Xo 9awZ1DvaM24OiqGUhNg1PoJwLAtN52VZkOrkAscZ6jLd8O8hLLRADcu3LBSiY/QKoyHlgU cgjBVohmQMCEZpygrcDIzijFU4g3LxTK11PGBOYRCMl63oJlR0i1WlH819A7LycX2JHX9C uikcbzI86vN64ANIq2SrcAwGQZ5LiuypfS40YBFijwyvr3I8wwDjBbpVTPznGTZU8sShtH q4lLaHNr3gW7XpQ+0gmw70HR8flRz+B/Z1SZVjm0v1gAJ1iZFy2ShHzVBtrdNA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779814191; a=rsa-sha256; cv=none; b=OwY+OE+ZgUDbK+W06DVvsIeLju8CZqNzD8g3jVgyv/zDY6/X4cd6BogMR3QuqdiNkZHOqr oblGXfAH9gM73D8Dm+Y6awUFkdm2Ahl3qkHJPAQ4Ehb7cNVC7uC93TDVTiiFu80wg3SP4O QJVzGT4VnUfqd79DccIk1hgFxIE5JCbjc9D0GCzpf4DRlTShR1ilgn27/yc4IIvMU2N8E8 i12xdmYC/X9CJrxFnovJvkkRIy7m5eQIV5lTL30TN1fV+5E4xwcBUcCGjNaqr05oMx4cx+ op3+gQzleVJUjnEizk8KPWEdrN2DXdazwQq2Jo67TW3INIaXmtAXD/tts7gLPA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779814191; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rXh8Eb9DnZERl0EbxIiY4SuVH5HNj/Q8nRq0yZX+f3Y=; b=YsJtQcjQ+mvAu1iq82umAHdMa5SkgocMcdxvZiaH52ALPHcgpj3Hr+sQWs5lwNxhlrB3WV oSiX3hjPIGv/sZbhJhi8tpiocahKg+0BbrAC/3P6ZwrBvltiuHhYF1YbshvmXFw8csYC1J ep2c5AXbA6HsGfso1diJoRLxoOTFFq9wFvjTK5ClKuZvWeYPjiDCE/+L0rB/lKrUikjjJ4 YGp0jv+4p1CrwNlGJJBqZBNYN8aYY4cyNPWn89vPi7F0KZ8qyVv1zeKCBiAcyPLaAIheMv 7wNTBpldOKuCc+/yWAQlRB3oXBzuKfdYjDYt8bJAA05ISPo+apMOy7TaWcDNyA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPzHz2x4Nz4t3 for ; Tue, 26 May 2026 16:49:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 37176 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 26 May 2026 16:49:51 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 22f95b69f208 - stable/14 - unbound: Tweak freebsd-configure script List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 22f95b69f2089c037eeb96266c11d60b938d6e2d Auto-Submitted: auto-generated Date: Tue, 26 May 2026 16:49:51 +0000 Message-Id: <6a15cf2f.37176.118c7a9f@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=22f95b69f2089c037eeb96266c11d60b938d6e2d commit 22f95b69f2089c037eeb96266c11d60b938d6e2d Author: Dag-Erling Smørgrav AuthorDate: 2026-05-22 19:55:22 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-26 16:49:33 +0000 unbound: Tweak freebsd-configure script Regenerating the configure script is optional and can introduce noise if the installed versions of autoconf, automake, and libtool do not match those used upstream. Tweak our script slightly so it will skip this step if libtoolize is not found. (cherry picked from commit cd69bc03cf67b958e08206d49562903c57b5bd28) --- contrib/unbound/freebsd-configure.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/unbound/freebsd-configure.sh b/contrib/unbound/freebsd-configure.sh index cd45d4716320..a22428948574 100755 --- a/contrib/unbound/freebsd-configure.sh +++ b/contrib/unbound/freebsd-configure.sh @@ -14,7 +14,7 @@ unbound=$(dirname $(realpath $0)) cd $unbound # Run autotools before we drop LOCALBASE out of PATH -(cd $unbound && libtoolize --copy && autoheader && autoconf) +libtoolize --copy && autoheader && autoconf # Ensure we use the correct toolchain and clean our environment export CC=$(echo ".include " | make -f /dev/stdin -VCC) From nobody Tue May 26 16:49:50 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPzHy74F2z6g6qt for ; Tue, 26 May 2026 16:49: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPzHy2rl3z4Kmj for ; Tue, 26 May 2026 16:49:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779814190; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9KLqs+Lavqu2eEzeOCg0wmDV/2wibxMLK+Ws8WNH/AY=; b=uqIk4+d78xhtNuHu2XWe8OkaRSd6rnioiVosbvNZ8IS4J+FYqCyt1lSNN+g5iLjXeH2ZqN 6Tb/qCs4j6rEc0bTneQXzlraWPhOYPIjNd/N19fqoG6gIUxnyiB9j7bk66d2QZPFDvpz0N s70yp2bT7FIYL6edGUq+oO7jZoAl2dpTABWkLPg/EmVZjw78+mttnYft85Oel1c4YvAZMW GdS6ZY+k+hdFcxo4puu+iAormR3XwJUaY10hVLFnvl9qRXepVJ+YxKekkk3+lx+XV8MQmg OveeHEa+Zftx8EtSzgXX4Zjej8pCR4VBpobmbozla1RWipnIunnrlvUBI/7Z5Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779814190; a=rsa-sha256; cv=none; b=XhVEnxoLgFLdTEQlw1DX3dL6OYjLIXj+Q7HN19berdd6ly8diWQ0qNNyr/WMRFThF4NXJv tDkqJGlv6tao7wT/Il8b6wOSBN8q4rykgahDWtJdWGf7maFhODZzUcjw5gFs9R/f+sz2/g qMalQdTpWB/OxIgImrat96ijoAPs4hxY+ftED4NNSZHq8q+Z6f0lSCNjq0Cd3IW8cdJuMx egZNz3pM2WxZQHRotY4cZuQHILxRPVi1BeOKuEVIUXoLXA4mWxMmzOrCWx3jMOntIiX8go rUWOC0rmzc96nYmZxZ0r8Lo31CMFMnKK3ZKzk+s+ZXdIw+0yhuIaIn4gGEUJGA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779814190; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9KLqs+Lavqu2eEzeOCg0wmDV/2wibxMLK+Ws8WNH/AY=; b=Re+8l8frGIYJIXXNj4Egiob/zEBGeY+YGkNySVfKaVVuUmfdDWnZMhQr7fVCTrF7cGDiIM OlaIFpA1Uzqte1Bn6HPqEB4mdzmTGTT9EnNQOpNe0sjsz64hVZ+S4xRrJHsxhtpGyraGYh s51NWfuPE7AdX+TIFqA6YEHBubkPR93q/ldDsybndWE1OY7Z2vDLlD+VL69WIzztuNr9oD 0r98HrSexbzR5Tsv0efketVTsOUU45FXdkb70PJTokY9EeYh88eLB4yQ5MTUgMSzxORTSL APMZLWBXPvdDJeU2tZyF97sgwN9qBy7qgP/JQQAiwkWGvmbaTxF2OU5zAo5YZQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPzHy2Mkxz4t2 for ; Tue, 26 May 2026 16:49:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36628 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 26 May 2026 16:49:50 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: f8ad4df7241d - stable/14 - ldns: Update to 1.9.0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f8ad4df7241d1db626b8ca425bd85be9ca109dc6 Auto-Submitted: auto-generated Date: Tue, 26 May 2026 16:49:50 +0000 Message-Id: <6a15cf2e.36628.90fa77b@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=f8ad4df7241d1db626b8ca425bd85be9ca109dc6 commit f8ad4df7241d1db626b8ca425bd85be9ca109dc6 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-22 17:54:58 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-26 16:49:33 +0000 ldns: Update to 1.9.0 Merge commit '5eb18e8576462f5bb33fbd60fcbd752fe5791f33' MFC after: 1 week Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D57170 (cherry picked from commit 9ed998a81bab54203604d08293089db875758686) ldns: Regenerate configuration after update MFC after: 1 week Fixes: d44c9549ef31 ("ldns: Update to 1.8.4") Fixes: 9ed998a81bab ("ldns: Update to 1.9.0") (cherry picked from commit 70739f3499b03cfff6bdd985db0d81cde76be15a) ldns: Fix unused variable on big-endian MFC after: 1 week Fixes: 9ed998a81bab ("ldns: Update to 1.9.0") (cherry picked from commit dd64155367840a3747d812577457a7ed7c8e9acb) --- contrib/ldns/Changelog | 46 +++ contrib/ldns/Makefile.in | 58 +-- contrib/ldns/README | 19 +- contrib/ldns/config.guess | 26 +- contrib/ldns/config.sub | 749 +++++++++++++++++++++++++++++---------- contrib/ldns/configure | 94 ++++- contrib/ldns/configure.ac | 41 ++- contrib/ldns/dnssec.c | 4 +- contrib/ldns/dnssec_zone.c | 50 ++- contrib/ldns/drill/drill.c | 2 +- contrib/ldns/drill/securetrace.c | 7 +- contrib/ldns/error.c | 2 + contrib/ldns/host2str.c | 60 ++++ contrib/ldns/host2wire.c | 2 +- contrib/ldns/keys.c | 2 + contrib/ldns/ldns/config.h | 15 +- contrib/ldns/ldns/config.h.in | 11 +- contrib/ldns/ldns/dnssec_zone.h | 14 +- contrib/ldns/ldns/edns.h | 6 +- contrib/ldns/ldns/error.h | 3 +- contrib/ldns/ldns/host2str.h | 18 + contrib/ldns/ldns/packet.h | 13 + contrib/ldns/ldns/rdata.h | 10 +- contrib/ldns/ldns/rr.h | 20 +- contrib/ldns/ldns/str2host.h | 10 + contrib/ldns/ldns/util.h | 26 +- contrib/ldns/ldns/util.h.in | 22 ++ contrib/ldns/net.c | 2 + contrib/ldns/packet.c | 23 +- contrib/ldns/rdata.c | 6 + contrib/ldns/resolver.c | 18 +- contrib/ldns/rr.c | 129 ++++++- contrib/ldns/sha1.c | 2 +- contrib/ldns/sha2.c | 20 +- contrib/ldns/str2host.c | 68 +++- contrib/ldns/util.c | 5 + contrib/ldns/wire2host.c | 3 + contrib/ldns/zone.c | 2 +- 38 files changed, 1303 insertions(+), 305 deletions(-) diff --git a/contrib/ldns/Changelog b/contrib/ldns/Changelog index c7f36767b360..74e2631af72d 100644 --- a/contrib/ldns/Changelog +++ b/contrib/ldns/Changelog @@ -1,3 +1,49 @@ +1.9.0 2025-12-04 + * PR #246: Make ldns_calc_keytag() available for CDNSKEY RR + Thanks tgreenx and pnax + * PR #247: Make ldns_key_rr2ds() available for CDNSKEY RR + Thanks tgreenx + * PR #248: Make ldns_rr_compare_{ds,ds_dnskey}() available for + CDS and CDNSKEY RRs. Thanks tgreenx + * PR #245: Make drill trace use IPv6 when used with -6 + Thanks Paul Radford + * Fix #254: Unquoted "value" rdata for CAA records fail to validate. + Follows the long string unquoted syntax from RFC8659, section 4.1.1. + * Fix #266: ldns-read-zone -u fails if a type is the only type in a + window and the type modulo 256 is equal to zero. + * Fix #271: Intermittent build failure with multi-job + builds (make -j). + * Add ldns-verify-zone -s option. It checks all signature results, + instead of passing by when one RRSIG validates. That prints output + for spurious RRSIGs, the failures for them. + * Fix RR types NSAP-PTR, GPOS and RESINFO to print unquoted strings. + * Fix memory leak when trying to read zones that have equal RRs. + the ldns_dnssec_*_add_rr() functions now return LDNS_STATUS_EQUAL_RR + when an already existing RR is tried to be added. This is a API + change, hence this also bumps the version to 1.9.0 + * PR #282: ensure returning pkt with LDNS_STATUS_OK. Thanks grobian. + * PR #286: Fix RR Type AMTRELAY type nogateway, to print relay '.', + and memory leaks in parsing it. + * DSYNC is no longer a draft RR type and compiled by default + * RFC 9824 support: Compact Denial of Existence in DNSSEC + * The HHIT and BRID draft RR types + * PR #249: If RNG is already seeded, return early. + Thanks crrodriguez + * PR #221: Improve error messages. Thanks jschauma + * PR #256: Use SWIG_AppendOutput to support swig 4.3 + Thanks pemensik + * PR #188: Homogenize paths for source files during compilation + Thanks duthils + * Fix #283: ldns-walk fails after update from 1.8.3 to 1.8.4 + Thanks jschauma + * PR #200: Allow compiled tests to link to ldns statically via + environment variable. Thanks FGasper and pemensik + * PR #220: Optionally exclude ZONEMD RRs in ldns-compare-zone + Thanks gjherbiet + * Fix #285: A WALLET RR breaks TXT signing. Thanks bortzmeyer + * Fix #287: ldns-verify-zone hangs with missing NSEC3 RRs. + Thanks Roy Arends + 1.8.4 2024-07-19 * Fix building documentation in build directory. Thanks Michael Tokarev diff --git a/contrib/ldns/Makefile.in b/contrib/ldns/Makefile.in index 32b91576d0d9..b5ca1d3c3adf 100644 --- a/contrib/ldns/Makefile.in +++ b/contrib/ldns/Makefile.in @@ -132,11 +132,11 @@ all: setup-builddir lib linktest manpages @P5_DNS_LDNS@ @PYLDNS@ @DRILL@ @EXAMPL .SUFFIXES: .c .o .a .lo .h .i .c.lo: - $(COMP_LIB) $(LIBSSL_CPPFLAGS) -c $< -o $@ + $(COMP_LIB) $(LIBSSL_CPPFLAGS) -c $(srcdir)/$< -o $@ # Need libtool compile .c.o: - $(COMP_LIB) $(LIBSSL_CPPFLAGS) -c $< -o $@ + $(COMP_LIB) $(LIBSSL_CPPFLAGS) -c $(srcdir)/$< -o $@ $(LDNS_LOBJS) $(LIBLOBJS) $(DRILL_LOBJS) $(EXAMPLE_LOBJS): $(COMP_LIB) $(LIBSSL_CPPFLAGS) -c $(srcdir)/$(@:.lo=.c) -o $@ @@ -571,9 +571,9 @@ depend: done; \ done for p in $(EXAMPLE_PROGS) $(LDNS_DPA) $(LDNS_DANE) $(EX_SSL_PROGS); do \ - echo "$$p: $$p.lo $$p.o \$$(LIB)" >> $(DEPEND_TMP) ; done + echo "$$p: $$p.lo \$$(LIB)" >> $(DEPEND_TMP) ; done echo "$(TESTNS): `for o in $(TESTNS_LOBJS) ; do \ - echo -n "$$o $${o%lo}o " ; done` \$$(LIB)" \ + echo -n "$$o " ; done`\$$(LIB)" \ >> $(DEPEND_TMP) cp $(DEPEND_TARGET) $(DEPEND_TMP2) head -`egrep -n "# Dependencies" $(DEPEND_TARGET) | tail -1 | sed -e 's/:.*$$//'` $(DEPEND_TMP2) > $(DEPEND_TARGET) @@ -1114,28 +1114,28 @@ drill/work.lo drill/work.o: $(srcdir)/drill/work.c $(srcdir)/drill/drill.h ldns/ $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \ $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \ $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -examples/ldns-chaos: examples/ldns-chaos.lo examples/ldns-chaos.o $(LIB) -examples/ldns-compare-zones: examples/ldns-compare-zones.lo examples/ldns-compare-zones.o $(LIB) -examples/ldnsd: examples/ldnsd.lo examples/ldnsd.o $(LIB) -examples/ldns-gen-zone: examples/ldns-gen-zone.lo examples/ldns-gen-zone.o $(LIB) -examples/ldns-key2ds: examples/ldns-key2ds.lo examples/ldns-key2ds.o $(LIB) -examples/ldns-keyfetcher: examples/ldns-keyfetcher.lo examples/ldns-keyfetcher.o $(LIB) -examples/ldns-keygen: examples/ldns-keygen.lo examples/ldns-keygen.o $(LIB) -examples/ldns-mx: examples/ldns-mx.lo examples/ldns-mx.o $(LIB) -examples/ldns-notify: examples/ldns-notify.lo examples/ldns-notify.o $(LIB) -examples/ldns-read-zone: examples/ldns-read-zone.lo examples/ldns-read-zone.o $(LIB) -examples/ldns-resolver: examples/ldns-resolver.lo examples/ldns-resolver.o $(LIB) -examples/ldns-rrsig: examples/ldns-rrsig.lo examples/ldns-rrsig.o $(LIB) -examples/ldns-test-edns: examples/ldns-test-edns.lo examples/ldns-test-edns.o $(LIB) -examples/ldns-update: examples/ldns-update.lo examples/ldns-update.o $(LIB) -examples/ldns-version: examples/ldns-version.lo examples/ldns-version.o $(LIB) -examples/ldns-walk: examples/ldns-walk.lo examples/ldns-walk.o $(LIB) -examples/ldns-zcat: examples/ldns-zcat.lo examples/ldns-zcat.o $(LIB) -examples/ldns-zsplit: examples/ldns-zsplit.lo examples/ldns-zsplit.o $(LIB) -examples/ldns-dpa: examples/ldns-dpa.lo examples/ldns-dpa.o $(LIB) -examples/ldns-dane: examples/ldns-dane.lo examples/ldns-dane.o $(LIB) -examples/ldns-nsec3-hash: examples/ldns-nsec3-hash.lo examples/ldns-nsec3-hash.o $(LIB) -examples/ldns-revoke: examples/ldns-revoke.lo examples/ldns-revoke.o $(LIB) -examples/ldns-signzone: examples/ldns-signzone.lo examples/ldns-signzone.o $(LIB) -examples/ldns-verify-zone: examples/ldns-verify-zone.lo examples/ldns-verify-zone.o $(LIB) -examples/ldns-testns: examples/ldns-testns.lo examples/ldns-testns.o examples/ldns-testpkts.lo examples/ldns-testpkts.o $(LIB) +examples/ldns-chaos: examples/ldns-chaos.lo $(LIB) +examples/ldns-compare-zones: examples/ldns-compare-zones.lo $(LIB) +examples/ldnsd: examples/ldnsd.lo $(LIB) +examples/ldns-gen-zone: examples/ldns-gen-zone.lo $(LIB) +examples/ldns-key2ds: examples/ldns-key2ds.lo $(LIB) +examples/ldns-keyfetcher: examples/ldns-keyfetcher.lo $(LIB) +examples/ldns-keygen: examples/ldns-keygen.lo $(LIB) +examples/ldns-mx: examples/ldns-mx.lo $(LIB) +examples/ldns-notify: examples/ldns-notify.lo $(LIB) +examples/ldns-read-zone: examples/ldns-read-zone.lo $(LIB) +examples/ldns-resolver: examples/ldns-resolver.lo $(LIB) +examples/ldns-rrsig: examples/ldns-rrsig.lo $(LIB) +examples/ldns-test-edns: examples/ldns-test-edns.lo $(LIB) +examples/ldns-update: examples/ldns-update.lo $(LIB) +examples/ldns-version: examples/ldns-version.lo $(LIB) +examples/ldns-walk: examples/ldns-walk.lo $(LIB) +examples/ldns-zcat: examples/ldns-zcat.lo $(LIB) +examples/ldns-zsplit: examples/ldns-zsplit.lo $(LIB) +examples/ldns-dpa: examples/ldns-dpa.lo $(LIB) +examples/ldns-dane: examples/ldns-dane.lo $(LIB) +examples/ldns-nsec3-hash: examples/ldns-nsec3-hash.lo $(LIB) +examples/ldns-revoke: examples/ldns-revoke.lo $(LIB) +examples/ldns-signzone: examples/ldns-signzone.lo $(LIB) +examples/ldns-verify-zone: examples/ldns-verify-zone.lo $(LIB) +examples/ldns-testns: examples/ldns-testns.lo examples/ldns-testpkts.lo $(LIB) diff --git a/contrib/ldns/README b/contrib/ldns/README index e07fdc078aa2..fb588f4da586 100644 --- a/contrib/ldns/README +++ b/contrib/ldns/README @@ -1,3 +1,21 @@ +DEVELOPMENT VISION + +Note: ldns has been in maintenance mode since 2020, with no plans for major +features. We welcome PRs from contributors who want to add new functionality. +We also actively fix bugs, so users can continue to rely on ldns if its +current features meet their needs. + +We will continue to make occasional use of ldns in an experimental +setting, such as during an IETF Hackathon to build a proof of concept for an +Internet Draft. + +The natural successor to the ldns library is the domain library for Rust: +https://github.com/NLnetLabs/domain + +We offer drop-in replacements for commonly used ldns example tools in dnst: +https://github.com/NLnetLabs/dnst + +--- Contents: REQUIREMENTS @@ -10,7 +28,6 @@ Contents: Solaris KNOWN ISSUES pyldns - Your Support Project page: http://www.nlnetlabs.nl/ldns/ diff --git a/contrib/ldns/config.guess b/contrib/ldns/config.guess index f6d217a49f8f..a9d01fde4617 100755 --- a/contrib/ldns/config.guess +++ b/contrib/ldns/config.guess @@ -1,10 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2024 Free Software Foundation, Inc. +# Copyright 1992-2025 Free Software Foundation, Inc. # shellcheck disable=SC2006,SC2268 # see below for rationale -timestamp='2024-01-01' +timestamp='2025-07-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -60,7 +60,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2024 Free Software Foundation, Inc. +Copyright 1992-2025 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -123,7 +123,7 @@ set_cc_for_build() { dummy=$tmp/dummy case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in ,,) echo "int x;" > "$dummy.c" - for driver in cc gcc c89 c99 ; do + for driver in cc gcc c17 c99 c89 ; do if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then CC_FOR_BUILD=$driver break @@ -634,7 +634,8 @@ EOF sed 's/^ //' << EOF > "$dummy.c" #include - main() + int + main () { if (!__power_pc()) exit(1); @@ -718,7 +719,8 @@ EOF #include #include - int main () + int + main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); @@ -1595,8 +1597,11 @@ EOF *:Unleashed:*:*) GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE ;; - *:Ironclad:*:*) - GUESS=$UNAME_MACHINE-unknown-ironclad + x86_64:[Ii]ronclad:*:*|i?86:[Ii]ronclad:*:*) + GUESS=$UNAME_MACHINE-pc-ironclad-mlibc + ;; + *:[Ii]ronclad:*:*) + GUESS=$UNAME_MACHINE-unknown-ironclad-mlibc ;; esac @@ -1621,6 +1626,7 @@ cat > "$dummy.c" <." version="\ GNU config.sub ($timestamp) -Copyright 1992-2024 Free Software Foundation, Inc. +Copyright 1992-2025 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -120,7 +120,6 @@ case $# in esac # Split fields of configuration type -# shellcheck disable=SC2162 saved_IFS=$IFS IFS="-" read field1 field2 field3 field4 <; Tue, 26 May 2026 16:49: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPzJ04xKfz4Kch for ; Tue, 26 May 2026 16:49:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779814192; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6mhUMZ9+7V8b+QG3ybzvUPJq0QaOgTTsKBuJq8S6CKE=; b=hIfCEpNi8rWVBShDDk7So17LxeBzNgt/YA9KNjo/IIpk1/k7Wfw5PRnLKcHkJ3zHW04t98 c/mQUKXGPwJlC4SV4AMrwyN8wd4EMhzbVrv0vqnj7oZilCmQqhxRNiZe2CnvjFMQELNOXD /m+hSpFvy5BOMiEM7v7FwehPmb0uqLPolqMNuOI7q3iIKPsRIvRQJ9cyflfhCh26BuwAe3 P0JB8MR/M9PLNR5vpaOfrznj4KCR56GR9I5jq1UWWSYv4Y03HkhWhrwEgjZzsFDxr0dD9U wf8pUo4u8HoYIvMO0s4s2b2yXreYvVJNf7bxY5FTrk9xDFP/qIdQpddH3nLzKQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779814192; a=rsa-sha256; cv=none; b=GzBFKLpeURgMfxhxOUk7bLNZRVDAl0SE8WUuyda+1LeGxpiICs6XVQz8ssi5O0E70Gjshn wLA1x3zFf1tGgfG3kCLFz5glLwi4g6AiQvI+vS98dk3evAJlvNIIf7HDU7qq1e6/k70W25 WUQ9B9qqgC0G2bA+quru61C761eVHX9+PyENLIkq27kaeR0lbPB7L8bmB3QZXAye9SYDFo xEkKnF3ccT3KTmj+bIPQxynBLQJVihCPguTvHRdg/6IUsYJBQkcvwAHX2GOorPOkVmEEiI vjsx/zlIDTTCCR4BQn8kicfB3bVg50H10B1y58BdbzlT7VKc6vFvKjtKMOtAtA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779814192; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6mhUMZ9+7V8b+QG3ybzvUPJq0QaOgTTsKBuJq8S6CKE=; b=H+Hwl/SAgcy41C+8XCHhGFbXWNHzinhb556OvXo4ic+m1w9/RlxgLJKZAvYChem4Tq/kCD EcyXvhV4D/ATotjHztiReTnz2Ep2MCym2kD+67JGpFZV1CYOAN3swTVQEVAfsndnn3Grkl QL70Jevj90z1HeviHWCn/30OzNKH9XdHUk/Ps+l4FMX+7lc2/HIBK0hBDz8iuCUOA4ZdOe gucxlpYftklUpN9JxV2bec72EfqeiFczhBuhvnyQjf6PlWek368R1tkTFkCcEv0jxiZpds 66gsd0vgwAMSIy33wDD3Ah2kXeYmSgV8DnsZP/xDIoIQYRmaHQOs4lFWLcrB2A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPzJ04X9fz4t4 for ; Tue, 26 May 2026 16:49:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 37199 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 26 May 2026 16:49:52 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: d61b19b6907a - stable/14 - unbound: Regenerate for 1.24.1 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d61b19b6907acbdc68202b2e62f740b42a0455e0 Auto-Submitted: auto-generated Date: Tue, 26 May 2026 16:49:52 +0000 Message-Id: <6a15cf30.37199.2f20190f@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=d61b19b6907acbdc68202b2e62f740b42a0455e0 commit d61b19b6907acbdc68202b2e62f740b42a0455e0 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-22 20:04:22 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-26 16:49:33 +0000 unbound: Regenerate for 1.24.1 No functional changes intended. Fixes: 8b29c373e6ab ("unbound: Vendor import 1.24.1") (cherry picked from commit 290190b26c09c307a9cd70703fa20ad2b2b600a6) --- contrib/unbound/doc/example.conf | 14 +- contrib/unbound/doc/libunbound.3 | 675 ++- contrib/unbound/doc/unbound-anchor.8 | 383 +- contrib/unbound/doc/unbound-checkconf.8 | 121 +- contrib/unbound/doc/unbound-control.8 | 2038 +++++--- contrib/unbound/doc/unbound-host.1 | 242 +- contrib/unbound/doc/unbound.8 | 169 +- contrib/unbound/doc/unbound.conf.5 | 8152 ++++++++++++++++++++----------- lib/libunbound/config.h | 24 +- 9 files changed, 7568 insertions(+), 4250 deletions(-) diff --git a/contrib/unbound/doc/example.conf b/contrib/unbound/doc/example.conf index 3a5188f00477..56bb3247b20e 100644 --- a/contrib/unbound/doc/example.conf +++ b/contrib/unbound/doc/example.conf @@ -1,7 +1,7 @@ # # Example configuration file. # -# See unbound.conf(5) man page, version 1.23.1. +# See unbound.conf(5) man page, version 1.24.1. # # this is a comment. @@ -116,8 +116,8 @@ server: # so-rcvbuf: 0 # buffer size for UDP port 53 outgoing (SO_SNDBUF socket option). - # 0 is system default. Use 4m to handle spikes on very busy servers. - # so-sndbuf: 0 + # 0 is system default. Set larger to handle spikes on very busy servers. + # so-sndbuf: 4m # use SO_REUSEPORT to distribute queries over threads. # at extreme load it could be better to turn it off to distribute even. @@ -163,7 +163,7 @@ server: # msg-cache-slabs: 4 # the number of queries that a thread gets to service. - # num-queries-per-thread: 1024 + # num-queries-per-thread: 2048 # if very busy, 50% queries run to completion, 50% get timeout in msec # jostle-timeout: 200 @@ -196,6 +196,10 @@ server: # Limit on upstream queries for an incoming query and its recursion. # max-global-quota: 200 + # Should the scrubber remove promiscuous NS from positive answers, + # protects against poison attempts. + # iter-scrub-promiscuous: yes + # msec for waiting for an unknown server to reply. Increase if you # are behind a slow satellite link, to eg. 1128. # unknown-server-time-limit: 376 @@ -279,7 +283,7 @@ server: # do-ip6: yes # If running unbound on an IPv6-only host, domains that only have - # IPv4 servers would become unresolveable. If NAT64 is available in + # IPv4 servers would become unresolvable. If NAT64 is available in # the network, unbound can use NAT64 to reach these servers with # the following option. This is NOT needed for enabling DNS64 on a # system that has IPv4 connectivity. diff --git a/contrib/unbound/doc/libunbound.3 b/contrib/unbound/doc/libunbound.3 index 8ef33b0998a2..681c141fcd76 100644 --- a/contrib/unbound/doc/libunbound.3 +++ b/contrib/unbound/doc/libunbound.3 @@ -1,335 +1,306 @@ -.TH "libunbound" "3" "Jul 16, 2025" "NLnet Labs" "unbound 1.23.1" -.\" -.\" libunbound.3 -- unbound library functions manual -.\" -.\" Copyright (c) 2007, NLnet Labs. All rights reserved. -.\" -.\" See LICENSE for the license. -.\" -.\" -.SH "NAME" -.B libunbound, -.B unbound.h, -.B ub_ctx, -.B ub_result, -.B ub_callback_type, -.B ub_ctx_create, -.B ub_ctx_delete, -.B ub_ctx_set_option, -.B ub_ctx_get_option, -.B ub_ctx_config, -.B ub_ctx_set_fwd, -.B ub_ctx_set_stub, -.B ub_ctx_set_tls, -.B ub_ctx_resolvconf, -.B ub_ctx_hosts, -.B ub_ctx_add_ta, -.B ub_ctx_add_ta_autr, -.B ub_ctx_add_ta_file, -.B ub_ctx_trustedkeys, -.B ub_ctx_debugout, -.B ub_ctx_debuglevel, -.B ub_ctx_async, -.B ub_poll, -.B ub_wait, -.B ub_fd, -.B ub_process, -.B ub_resolve, -.B ub_resolve_async, -.B ub_cancel, -.B ub_resolve_free, -.B ub_strerror, -.B ub_ctx_print_local_zones, -.B ub_ctx_zone_add, -.B ub_ctx_zone_remove, -.B ub_ctx_data_add, -.B ub_ctx_data_remove -\- Unbound DNS validating resolver 1.23.1 functions. -.SH "SYNOPSIS" -.B #include -.LP -\fIstruct ub_ctx *\fR -\fBub_ctx_create\fR(\fIvoid\fR); -.LP -\fIvoid\fR -\fBub_ctx_delete\fR(\fIstruct ub_ctx*\fR ctx); -.LP -\fIint\fR -\fBub_ctx_set_option\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR opt, \fIchar*\fR val); -.LP -\fIint\fR -\fBub_ctx_get_option\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR opt, \fIchar**\fR val); -.LP -\fIint\fR -\fBub_ctx_config\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR fname); -.LP -\fIint\fR -\fBub_ctx_set_fwd\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR addr); -.LP -\fIint\fR -\fBub_ctx_set_stub\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR zone, -\fIchar*\fR addr, -.br - \fIint\fR isprime); -.LP -\fIint\fR -\fBub_ctx_set_tls\fR(\fIstruct ub_ctx*\fR ctx, \fIint\fR tls); -.LP -\fIint\fR -\fBub_ctx_resolvconf\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR fname); -.LP -\fIint\fR -\fBub_ctx_hosts\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR fname); -.LP -\fIint\fR -\fBub_ctx_add_ta\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR ta); -.LP -\fIint\fR -\fBub_ctx_add_ta_autr\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR fname); -.LP -\fIint\fR -\fBub_ctx_add_ta_file\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR fname); -.LP -\fIint\fR -\fBub_ctx_trustedkeys\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR fname); -.LP -\fIint\fR -\fBub_ctx_debugout\fR(\fIstruct ub_ctx*\fR ctx, \fIFILE*\fR out); -.LP -\fIint\fR -\fBub_ctx_debuglevel\fR(\fIstruct ub_ctx*\fR ctx, \fIint\fR d); -.LP -\fIint\fR -\fBub_ctx_async\fR(\fIstruct ub_ctx*\fR ctx, \fIint\fR dothread); -.LP -\fIint\fR -\fBub_poll\fR(\fIstruct ub_ctx*\fR ctx); -.LP -\fIint\fR -\fBub_wait\fR(\fIstruct ub_ctx*\fR ctx); -.LP -\fIint\fR -\fBub_fd\fR(\fIstruct ub_ctx*\fR ctx); -.LP -\fIint\fR -\fBub_process\fR(\fIstruct ub_ctx*\fR ctx); -.LP -\fIint\fR -\fBub_resolve\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR name, -.br - \fIint\fR rrtype, \fIint\fR rrclass, \fIstruct ub_result**\fR result); -.LP -\fIint\fR -\fBub_resolve_async\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR name, -.br - \fIint\fR rrtype, \fIint\fR rrclass, \fIvoid*\fR mydata, -.br - \fIub_callback_type\fR callback, \fIint*\fR async_id); -.LP -\fIint\fR -\fBub_cancel\fR(\fIstruct ub_ctx*\fR ctx, \fIint\fR async_id); -.LP -\fIvoid\fR -\fBub_resolve_free\fR(\fIstruct ub_result*\fR result); -.LP -\fIconst char *\fR -\fBub_strerror\fR(\fIint\fR err); -.LP -\fIint\fR -\fBub_ctx_print_local_zones\fR(\fIstruct ub_ctx*\fR ctx); -.LP -\fIint\fR -\fBub_ctx_zone_add\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR zone_name, \fIchar*\fR zone_type); -.LP -\fIint\fR -\fBub_ctx_zone_remove\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR zone_name); -.LP -\fIint\fR -\fBub_ctx_data_add\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR data); -.LP -\fIint\fR -\fBub_ctx_data_remove\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR data); -.SH "DESCRIPTION" -.B Unbound -is an implementation of a DNS resolver, that does caching and -DNSSEC validation. This is the library API, for using the \-lunbound library. -The server daemon is described in \fIunbound\fR(8). -The library works independent from a running unbound server, and -can be used to convert hostnames to ip addresses, and back, -and obtain other information from the DNS. The library performs public\-key -validation of results with DNSSEC. -.P -The library uses a variable of type \fIstruct ub_ctx\fR to keep context -between calls. The user must maintain it, creating it with -.B ub_ctx_create -and deleting it with -.B ub_ctx_delete\fR. -It can be created and deleted at any time. Creating it anew removes any -previous configuration (such as trusted keys) and clears any cached results. -.P -The functions are thread\-safe, and a context can be used in a threaded (as -well as in a non\-threaded) environment. Also resolution (and validation) -can be performed blocking and non\-blocking (also called asynchronous). -The async method returns from the call immediately, so that processing -can go on, while the results become available later. -.P +.\" Man page generated from reStructuredText. +. +. +.nr rst2man-indent-level 0 +. +.de1 rstReportMargin +\\$1 \\n[an-margin] +level \\n[rst2man-indent-level] +level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] +- +\\n[rst2man-indent0] +\\n[rst2man-indent1] +\\n[rst2man-indent2] +.. +.de1 INDENT +.\" .rstReportMargin pre: +. RS \\$1 +. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] +. nr rst2man-indent-level +1 +.\" .rstReportMargin post: +.. +.de UNINDENT +. RE +.\" indent \\n[an-margin] +.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] +.nr rst2man-indent-level -1 +.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] +.in \\n[rst2man-indent\\n[rst2man-indent-level]]u +.. +.TH "LIBUNBOUND" "3" "Oct 22, 2025" "1.24.1" "Unbound" +.SH NAME +libunbound \- Unbound DNS validating resolver 1.24.1 functions. +.SH SYNOPSIS +.sp +\fB#include \fP +.sp +struct ub_ctx * \fBub_ctx_create\fP(void); +.sp +void \fBub_ctx_delete\fP(struct ub_ctx* ctx); +.sp +int \fBub_ctx_set_option\fP(struct ub_ctx* ctx, char* opt, char* val); +.sp +int \fBub_ctx_get_option\fP(struct ub_ctx* ctx, char* opt, char** val); +.sp +int \fBub_ctx_config\fP(struct ub_ctx* ctx, char* fname); +.sp +int \fBub_ctx_set_fwd\fP(struct ub_ctx* ctx, char* addr); +.INDENT 0.0 +.TP +int \fBub_ctx_set_stub\fP(struct ub_ctx* ctx, char* zone, char* addr, +int isprime); +.UNINDENT +.sp +int \fBub_ctx_set_tls\fP(struct ub_ctx* ctx, int tls); +.sp +int \fBub_ctx_resolvconf\fP(struct ub_ctx* ctx, char* fname); +.sp +int \fBub_ctx_hosts\fP(struct ub_ctx* ctx, char* fname); +.sp +int \fBub_ctx_add_ta\fP(struct ub_ctx* ctx, char* ta); +.sp +int \fBub_ctx_add_ta_autr\fP(struct ub_ctx* ctx, char* fname); +.sp +int \fBub_ctx_add_ta_file\fP(struct ub_ctx* ctx, char* fname); +.sp +int \fBub_ctx_trustedkeys\fP(struct ub_ctx* ctx, char* fname); +.sp +int \fBub_ctx_debugout\fP(struct ub_ctx* ctx, FILE* out); +.sp +int \fBub_ctx_debuglevel\fP(struct ub_ctx* ctx, int d); +.sp +int \fBub_ctx_async\fP(struct ub_ctx* ctx, int dothread); +.sp +int \fBub_poll\fP(struct ub_ctx* ctx); +.sp +int \fBub_wait\fP(struct ub_ctx* ctx); +.sp +int \fBub_fd\fP(struct ub_ctx* ctx); +.sp +int \fBub_process\fP(struct ub_ctx* ctx); +.INDENT 0.0 +.TP +int \fBub_resolve\fP(struct ub_ctx* ctx, char* name, +int rrtype, int rrclass, struct ub_result** result); +.TP +int \fBub_resolve_async\fP(struct ub_ctx* ctx, char* name, +int rrtype, int rrclass, void* mydata, +ub_callback_type* callback, int* async_id); +.UNINDENT +.sp +int \fBub_cancel\fP(struct ub_ctx* ctx, int async_id); +.sp +void \fBub_resolve_free\fP(struct ub_result* result); +.sp +const char * \fBub_strerror\fP(int err); +.sp +int \fBub_ctx_print_local_zones\fP(struct ub_ctx* ctx); +.sp +int \fBub_ctx_zone_add\fP(struct ub_ctx* ctx, char* zone_name, char* zone_type); +.sp +int \fBub_ctx_zone_remove\fP(struct ub_ctx* ctx, char* zone_name); +.sp +int \fBub_ctx_data_add\fP(struct ub_ctx* ctx, char* data); +.sp +int \fBub_ctx_data_remove\fP(struct ub_ctx* ctx, char* data); +.SH DESCRIPTION +.sp +Unbound is an implementation of a DNS resolver, that does caching and DNSSEC +validation. +This is the library API, for using the \fB\-lunbound\fP library. +The server daemon is described in \fI\%unbound(8)\fP\&. +The library works independent from a running unbound server, and can be used to +convert hostnames to ip addresses, and back, and obtain other information from +the DNS. +The library performs public\-key validation of results with DNSSEC. +.sp +The library uses a variable of type \fIstruct ub_ctx\fP to keep context between +calls. +The user must maintain it, creating it with \fBub_ctx_create\fP and deleting it +with \fBub_ctx_delete\fP\&. +It can be created and deleted at any time. +Creating it anew removes any previous configuration (such as trusted keys) and +clears any cached results. +.sp +The functions are thread\-safe, and a context can be used in a threaded (as well +as in a non\-threaded) environment. +Also resolution (and validation) can be performed blocking and non\-blocking +(also called asynchronous). +The async method returns from the call immediately, so that processing can go +on, while the results become available later. +.sp The functions are discussed in turn below. -.SH "FUNCTIONS" -.TP +.SH FUNCTIONS +.INDENT 0.0 +.TP .B ub_ctx_create Create a new context, initialised with defaults. -The information from /etc/resolv.conf and /etc/hosts is not utilised -by default. Use -.B ub_ctx_resolvconf -and -.B ub_ctx_hosts -to read them. -Before you call this, use the openssl functions CRYPTO_set_id_callback and -CRYPTO_set_locking_callback to set up asynchronous operation if you use -lib openssl (the application calls these functions once for initialisation). -Openssl 1.0.0 or later uses the CRYPTO_THREADID_set_callback function. +The information from \fB/etc/resolv.conf\fP and \fB/etc/hosts\fP is +not utilised by default. +Use \fBub_ctx_resolvconf\fP and \fBub_ctx_hosts\fP to read them. +Before you call this, use the openssl functions +\fBCRYPTO_set_id_callback\fP and \fBCRYPTO_set_locking_callback\fP to set +up asynchronous operation if you use lib openssl (the application calls +these functions once for initialisation). +Openssl 1.0.0 or later uses the \fBCRYPTO_THREADID_set_callback\fP +function. .TP .B ub_ctx_delete Delete validation context and free associated resources. -Outstanding async queries are killed and callbacks are not called for them. +Outstanding async queries are killed and callbacks are not called for +them. .TP .B ub_ctx_set_option -A power\-user interface that lets you specify one of the options from the -config file format, see \fIunbound.conf\fR(5). Not all options are -relevant. For some specific options, such as adding trust anchors, special -routines exist. Pass the option name with the trailing ':'. +A power\-user interface that lets you specify one of the options from +the config file format, see \fI\%unbound.conf(5)\fP\&. +Not all options are relevant. +For some specific options, such as adding trust anchors, special +routines exist. +Pass the option name with the trailing \fB\(aq:\(aq\fP\&. .TP .B ub_ctx_get_option -A power\-user interface that gets an option value. Some options cannot be -gotten, and others return a newline separated list. Pass the option name -without trailing ':'. The returned value must be free(2)d by the caller. +A power\-user interface that gets an option value. +Some options cannot be gotten, and others return a newline separated +list. +Pass the option name without trailing \fB\(aq:\(aq\fP\&. +The returned value must be free(2)d by the caller. .TP .B ub_ctx_config -A power\-user interface that lets you specify an unbound config file, see -\fIunbound.conf\fR(5), which is read for configuration. Not all options are -relevant. For some specific options, such as adding trust anchors, special -routines exist. This function is thread\-safe only if a single instance of -ub_ctx* exists in the application. If several instances exist the -application has to ensure that ub_ctx_config is not called in parallel by -the different instances. +A power\-user interface that lets you specify an unbound config file, +see \fI\%unbound.conf(5)\fP, which is read for +configuration. +Not all options are relevant. +For some specific options, such as adding trust anchors, special +routines exist. +This function is thread\-safe only if a single instance of \fBub_ctx\fP* +exists in the application. +If several instances exist the application has to ensure that +\fBub_ctx_config\fP is not called in parallel by the different instances. .TP .B ub_ctx_set_fwd -Set machine to forward DNS queries to, the caching resolver to use. -IP4 or IP6 address. Forwards all DNS requests to that machine, which -is expected to run a recursive resolver. If the proxy is not -DNSSEC capable, validation may fail. Can be called several times, in -that case the addresses are used as backup servers. -At this time it is only possible to set configuration before the -first resolve is done. +Set machine to forward DNS queries to, the caching resolver to use. +IP4 or IP6 address. +Forwards all DNS requests to that machine, which is expected to run a +recursive resolver. +If the proxy is not DNSSEC capable, validation may fail. +Can be called several times, in that case the addresses are used as +backup servers. +At this time it is only possible to set configuration before the first +resolve is done. .TP .B ub_ctx_set_stub -Set a stub zone, authoritative dns servers to use for a particular zone. -IP4 or IP6 address. If the address is NULL the stub entry is removed. -Set isprime true if you configure root hints with it. Otherwise similar to -the stub zone item from unbound's config file. Can be called several times, -for different zones, or to add multiple addresses for a particular zone. -At this time it is only possible to set configuration before the -first resolve is done. +Set a stub zone, authoritative dns servers to use for a particular +zone. +IP4 or IP6 address. +If the address is NULL the stub entry is removed. +Set isprime true if you configure root hints with it. +Otherwise similar to the stub zone item from unbound\(aqs config file. +Can be called several times, for different zones, or to add multiple +addresses for a particular zone. +At this time it is only possible to set configuration before the first +resolve is done. .TP .B ub_ctx_set_tls -Enable DNS over TLS (DoT) for machines set with -.B ub_ctx_set_fwd. -At this time it is only possible to set configuration before the -first resolve is done. +Enable DNS over TLS (DoT) for machines set with \fBub_ctx_set_fwd\fP\&. +At this time it is only possible to set configuration before the first +resolve is done. .TP .B ub_ctx_resolvconf -By default the root servers are queried and full resolver mode is used, but -you can use this call to read the list of nameservers to use from the -filename given. -Usually "/etc/resolv.conf". Uses those nameservers as caching proxies. +By default the root servers are queried and full resolver mode is used, +but you can use this call to read the list of nameservers to use from +the filename given. +Usually \fB\(dq/etc/resolv.conf\(dq\fP\&. +Uses those nameservers as caching proxies. If they do not support DNSSEC, validation may fail. Only nameservers are picked up, the searchdomain, ndots and other -settings from \fIresolv.conf\fR(5) are ignored. -If fname NULL is passed, "/etc/resolv.conf" is used (if on Windows, -the system\-wide configured nameserver is picked instead). -At this time it is only possible to set configuration before the -first resolve is done. +settings from \fIresolv.conf(5)\fP are ignored. +If fname NULL is passed, \fB\(dq/etc/resolv.conf\(dq\fP is used (if on +Windows, the system\-wide configured nameserver is picked instead). +At this time it is only possible to set configuration before the first +resolve is done. .TP .B ub_ctx_hosts Read list of hosts from the filename given. -Usually "/etc/hosts". When queried for, these addresses are not marked -DNSSEC secure. If fname NULL is passed, "/etc/hosts" is used -(if on Windows, etc/hosts from WINDIR is picked instead). -At this time it is only possible to set configuration before the -first resolve is done. -.TP -.B -ub_ctx_add_ta +Usually \fB\(dq/etc/hosts\(dq\fP\&. +When queried for, these addresses are not marked DNSSEC secure. +If fname NULL is passed, \fB\(dq/etc/hosts\(dq\fP is used (if on Windows, +\fBetc/hosts\fP from WINDIR is picked instead). +At this time it is only possible to set configuration before the first +resolve is done. +.TP +.B ub_ctx_add_ta Add a trust anchor to the given context. -At this time it is only possible to add trusted keys before the -first resolve is done. +At this time it is only possible to add trusted keys before the first +resolve is done. The format is a string, similar to the zone\-file format, -[domainname] [type] [rdata contents]. Both DS and DNSKEY records are accepted. +\fB[domainname]\fP \fB[type]\fP \fB[rdata contents]\fP\&. +Both DS and DNSKEY records are accepted. .TP .B ub_ctx_add_ta_autr -Add filename with automatically tracked trust anchor to the given context. -Pass name of a file with the managed trust anchor. You can create this -file with \fIunbound\-anchor\fR(8) for the root anchor. You can also -create it with an initial file with one line with a DNSKEY or DS record. +Add filename with automatically tracked trust anchor to the given +context. +Pass name of a file with the managed trust anchor. +You can create this file with +\fI\%unbound\-anchor(8)\fP for the root anchor. +You can also create it with an initial file with one line with a DNSKEY +or DS record. If the file is writable, it is updated when the trust anchor changes. -At this time it is only possible to add trusted keys before the -first resolve is done. +At this time it is only possible to add trusted keys before the first +resolve is done. .TP .B ub_ctx_add_ta_file Add trust anchors to the given context. Pass name of a file with DS and DNSKEY records in zone file format. -At this time it is only possible to add trusted keys before the -first resolve is done. +At this time it is only possible to add trusted keys before the first +resolve is done. .TP .B ub_ctx_trustedkeys Add trust anchors to the given context. -Pass the name of a bind\-style config file with trusted\-keys{}. -At this time it is only possible to add trusted keys before the -first resolve is done. +Pass the name of a bind\-style config file with \fBtrusted\-keys{}\fP\&. +At this time it is only possible to add trusted keys before the first +resolve is done. .TP .B ub_ctx_debugout -Set debug and error log output to the given stream. Pass NULL to disable -output. Default is stderr. File\-names or using syslog can be enabled -using config options, this routine is for using your own stream. +Set debug and error log output to the given stream. +Pass NULL to disable output. +Default is stderr. +File\-names or using syslog can be enabled using config options, this +routine is for using your own stream. .TP .B ub_ctx_debuglevel -Set debug verbosity for the context. Output is directed to stderr. +Set debug verbosity for the context. +Output is directed to stderr. Higher debug level gives more output. .TP .B ub_ctx_async Set a context behaviour for asynchronous action. -if set to true, enables threading and a call to -.B ub_resolve_async +if set to true, enables threading and a call to \fBub_resolve_async\fP creates a thread to handle work in the background. If false, a process is forked to handle work in the background. -Changes to this setting after -.B ub_resolve_async -calls have been made have no effect (delete and re\-create the context -to change). +Changes to this setting after \fBub_resolve_async\fP calls have been made +have no effect (delete and re\-create the context to change). .TP .B ub_poll Poll a context to see if it has any new results. -Do not poll in a loop, instead extract the fd below to poll for readiness, -and then check, or wait using the wait routine. +Do not poll in a loop, instead extract the \fBfd\fP below to poll for +readiness, and then check, or wait using the wait routine. Returns 0 if nothing to read, or nonzero if a result is available. -If nonzero, call -.B ub_process -to do callbacks. +If nonzero, call \fBub_process\fP to do callbacks. .TP .B ub_wait -Wait for a context to finish with results. Calls -.B ub_process -after the wait for you. After the wait, there are no more outstanding -asynchronous queries. +Wait for a context to finish with results. +Calls \fBub_process\fP after the wait for you. +After the wait, there are no more outstanding asynchronous queries. .TP .B ub_fd -Get file descriptor. Wait for it to become readable, at this point -answers are returned from the asynchronous validating resolver. -Then call the \fBub_process\fR to continue processing. +Get file descriptor. +Wait for it to become readable, at this point answers are returned from +the asynchronous validating resolver. +Then call the \fBub_process\fP to continue processing. .TP .B ub_process Call this routine to continue processing results from the validating -resolver (when the fd becomes readable). +resolver (when the \fBfd\fP becomes readable). Will perform necessary callbacks. .TP .B ub_resolve @@ -340,95 +311,111 @@ The result structure is newly allocated with the resulting data. .TP .B ub_resolve_async Perform asynchronous resolution and validation of the target name. -Arguments mean the same as for \fBub_resolve\fR except no -data is returned immediately, instead a callback is called later. -The callback receives a copy of the mydata pointer, that you can use to pass -information to the callback. The callback type is a function pointer to -a function declared as -.IP -void my_callback_function(void* my_arg, int err, -.br - struct ub_result* result); -.IP -The async_id is returned so you can (at your option) decide to track it -and cancel the request if needed. If you pass a NULL pointer the async_id -is not returned. +Arguments mean the same as for \fBub_resolve\fP except no data is +returned immediately, instead a callback is called later. +The callback receives a copy of the mydata pointer, that you can use to +pass information to the callback. +The callback type is a function pointer to a function declared as: +.INDENT 7.0 +.INDENT 3.5 +.sp +.nf +.ft C +void my_callback_function(void* my_arg, int err, + struct ub_result* result); +.ft P +.fi +.UNINDENT +.UNINDENT +.sp +The \fBasync_id\fP is returned so you can (at your option) decide to +track it and cancel the request if needed. +If you pass a NULL pointer the \fBasync_id\fP is not returned. .TP .B ub_cancel -Cancel an async query in progress. This may return an error if the query -does not exist, or the query is already being delivered, in that case you -may still get a callback for the query. +Cancel an async query in progress. +This may return an error if the query does not exist, or the query is +already being delivered, in that case you may still get a callback for +the query. .TP .B ub_resolve_free -Free struct ub_result contents after use. +Free struct \fBub_result\fP contents after use. .TP .B ub_strerror -Convert error value from one of the unbound library functions -to a human readable string. +Convert error value from one of the unbound library functions to a +human readable string. .TP .B ub_ctx_print_local_zones Debug printout the local authority information to debug output. .TP .B ub_ctx_zone_add -Add new zone to local authority info, like local\-zone \fIunbound.conf\fR(5) -statement. +Add new zone to local authority info, like local\-zone +\fI\%unbound.conf(5)\fP statement. .TP .B ub_ctx_zone_remove Delete zone from local authority info. .TP .B ub_ctx_data_add Add resource record data to local authority info, like local\-data -\fIunbound.conf\fR(5) statement. +\fI\%unbound.conf(5)\fP statement. .TP .B ub_ctx_data_remove Delete local authority data from the name given. -.SH "RESULT DATA STRUCTURE" -The result of the DNS resolution and validation is returned as -\fIstruct ub_result\fR. The result structure contains the following entries. -.P +.UNINDENT +.SH RESULT DATA STRUCTURE +.sp +The result of the DNS resolution and validation is returned as \fIstruct +ub_result\fP\&. +The result structure contains the following entries: +.INDENT 0.0 +.INDENT 3.5 +.sp .nf - struct ub_result { - char* qname; /* text string, original question */ - int qtype; /* type code asked for */ - int qclass; /* class code asked for */ - char** data; /* array of rdata items, NULL terminated*/ - int* len; /* array with lengths of rdata items */ - char* canonname; /* canonical name of result */ - int rcode; /* additional error code in case of no data */ - void* answer_packet; /* full network format answer packet */ - int answer_len; /* length of packet in octets */ - int havedata; /* true if there is data */ - int nxdomain; /* true if nodata because name does not exist */ - int secure; /* true if result is secure */ - int bogus; /* true if a security failure happened */ - char* why_bogus; /* string with error if bogus */ - int was_ratelimited; /* true if the query was ratelimited (SERVFAIL) by unbound */ - int ttl; /* number of seconds the result is valid */ - }; +.ft C +struct ub_result { + char* qname; /* text string, original question */ + int qtype; /* type code asked for */ + int qclass; /* class code asked for */ + char** data; /* array of rdata items, NULL terminated*/ + int* len; /* array with lengths of rdata items */ + char* canonname; /* canonical name of result */ + int rcode; /* additional error code in case of no data */ + void* answer_packet; /* full network format answer packet */ + int answer_len; /* length of packet in octets */ + int havedata; /* true if there is data */ + int nxdomain; /* true if nodata because name does not exist */ + int secure; /* true if result is secure */ + int bogus; /* true if a security failure happened */ + char* why_bogus; /* string with error if bogus */ + int was_ratelimited; /* true if the query was ratelimited (SERVFAIL) by unbound */ + int ttl; /* number of seconds the result is valid */ +}; +.ft P .fi -.P -If both secure and bogus are false, security was not enabled for the -domain of the query. Else, they are not both true, one of them is true. -.SH "RETURN VALUES" -Many routines return an error code. The value 0 (zero) denotes no error -happened. Other values can be passed to -.B ub_strerror -to obtain a readable error string. -.B ub_strerror -returns a zero terminated string. -.B ub_ctx_create -returns NULL on an error (a malloc failure). -.B ub_poll -returns true if some information may be available, false otherwise. -.B ub_fd -returns a file descriptor or \-1 on error. -.B ub_ctx_config -and -.B ub_ctx_resolvconf -attempt to leave errno informative on a function return with file read failure. -.SH "SEE ALSO" -\fIunbound.conf\fR(5), -\fIunbound\fR(8). -.SH "AUTHORS" -.B Unbound -developers are mentioned in the CREDITS file in the distribution. +.UNINDENT +.UNINDENT +.sp +If both secure and bogus are false, security was not enabled for the domain of +the query. +Else, they are not both true, one of them is true. +.SH RETURN VALUES +.sp +Many routines return an error code. +The value 0 (zero) denotes no error happened. +Other values can be passed to \fBub_strerror\fP to obtain a readable error +string. +\fBub_strerror\fP returns a zero terminated string. +\fBub_ctx_create\fP returns NULL on an error (a malloc failure). +\fBub_poll\fP returns true if some information may be available, false otherwise. +\fBub_fd\fP returns a file descriptor or \-1 on error. +\fBub_ctx_config\fP and \fBub_ctx_resolvconf\fP attempt to leave errno informative +on a function return with file read failure. +.SH SEE ALSO +.sp +\fI\%unbound.conf(5)\fP, \fI\%unbound(8)\fP\&. +.SH AUTHOR +Unbound developers are mentioned in the CREDITS file in the distribution. +.SH COPYRIGHT +1999-2025, NLnet Labs +.\" Generated by docutils manpage writer. +. diff --git a/contrib/unbound/doc/unbound-anchor.8 b/contrib/unbound/doc/unbound-anchor.8 index 23c1dd4b060f..ba8bd843a67c 100644 --- a/contrib/unbound/doc/unbound-anchor.8 +++ b/contrib/unbound/doc/unbound-anchor.8 @@ -1,189 +1,300 @@ -.TH "unbound-anchor" "8" "Jul 16, 2025" "NLnet Labs" "unbound 1.23.1" -.\" -.\" unbound-anchor.8 -- unbound anchor maintenance utility manual -.\" -.\" Copyright (c) 2008, NLnet Labs. All rights reserved. -.\" -.\" See LICENSE for the license. -.\" -.\" -.SH "NAME" -.B unbound\-anchor -\- Unbound anchor utility. -.SH "SYNOPSIS" -.B unbound\-anchor -.RB [ opts ] -.SH "DESCRIPTION" -.B Unbound\-anchor -performs setup or update of the root trust anchor for DNSSEC validation. -The program fetches the trust anchor with the method from RFC7958 when -regular RFC5011 update fails to bring it up to date. +.\" Man page generated from reStructuredText. +. +. +.nr rst2man-indent-level 0 +. +.de1 rstReportMargin +\\$1 \\n[an-margin] +level \\n[rst2man-indent-level] +level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] +- +\\n[rst2man-indent0] +\\n[rst2man-indent1] +\\n[rst2man-indent2] +.. +.de1 INDENT +.\" .rstReportMargin pre: +. RS \\$1 +. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] +. nr rst2man-indent-level +1 +.\" .rstReportMargin post: +.. +.de UNINDENT +. RE +.\" indent \\n[an-margin] +.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] +.nr rst2man-indent-level -1 +.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] +.in \\n[rst2man-indent\\n[rst2man-indent-level]]u +.. +.TH "UNBOUND-ANCHOR" "8" "Oct 22, 2025" "1.24.1" "Unbound" +.SH NAME +unbound-anchor \- Unbound 1.24.1 anchor utility. +.SH SYNOPSIS +.sp +\fBunbound\-anchor\fP [\fBopts\fP] +.SH DESCRIPTION +.sp +\fBunbound\-anchor\fP performs setup or update of the root trust anchor for DNSSEC +validation. +The program fetches the trust anchor with the method from \fI\%RFC 7958\fP when +regular \fI\%RFC 5011\fP update fails to bring it up to date. It can be run (as root) from the commandline, or run as part of startup -scripts. Before you start the \fIunbound\fR(8) DNS server. -.P +scripts. +Before you start the \fI\%unbound(8)\fP DNS server. +.sp Suggested usage: -.P +.INDENT 0.0 +.INDENT 3.5 +.sp .nf - # in the init scripts. - # provide or update the root anchor (if necessary) - unbound-anchor \-a "/var/unbound/root.key" - # Please note usage of this root anchor is at your own risk - # and under the terms of our LICENSE (see source). - # - # start validating resolver - # the unbound.conf contains: - # auto-trust-anchor-file: "/var/unbound/root.key" - unbound \-c unbound.conf +.ft C +# in the init scripts. +# provide or update the root anchor (if necessary) +unbound\-anchor \-a \(dq/var/unbound/root.key\(dq +# Please note usage of this root anchor is at your own risk +# and under the terms of our LICENSE (see source). +# +# start validating resolver +# the unbound.conf contains: +# auto\-trust\-anchor\-file: \(dq/var/unbound/root.key\(dq +unbound \-c unbound.conf +.ft P .fi -.P -This tool provides builtin default contents for the root anchor and root -update certificate files. -.P +.UNINDENT +.UNINDENT +.sp +This tool provides builtin default contents for the root anchor and root update +certificate files. +.sp It tests if the root anchor file works, and if not, and an update is possible, attempts to update the root anchor using the root update certificate. -It performs a https fetch of root-anchors.xml and checks the results (RFC7958), -if all checks are successful, it updates the root anchor file. Otherwise -the root anchor file is unchanged. It performs RFC5011 tracking if the -DNSSEC information available via the DNS makes that possible. -.P -It does not perform an update if the certificate is expired, if the network -is down or other errors occur. -.P +It performs a https fetch of +\fI\%root\-anchors.xml\fP +and checks the results (\fI\%RFC 7958\fP); if all checks are successful, it updates +the root anchor file. +Otherwise the root anchor file is unchanged. +It performs \fI\%RFC 5011\fP tracking if the DNSSEC information available via the +DNS makes that possible. +.sp +It does not perform an update if the certificate is expired, if the network is +down or other errors occur. +.sp The available options are: +.INDENT 0.0 .TP -.B \-a \fIfile +.B \-a The root anchor key file, that is read in and written out. -Default is /var/unbound/root.key. *** 11840 LINES SKIPPED *** From nobody Tue May 26 16:49:53 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPzJ22wbvz6g7F3 for ; Tue, 26 May 2026 16:49: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPzJ20P8Jz4Kf1 for ; Tue, 26 May 2026 16:49:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779814194; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8cHimeymLaj+jBzURhnyC3FSYOszGpgUWldX5jD74qE=; b=rhag1RssFZpCvXVYP/mOtber4xmEqYN3tk/MMeoJ5aMA9BxgFsEbsHnW0vMqi8nCFkINa1 GmuwhDdFKdrThEE3tqFkyL6GYLYagxZNeJZ0Zf8GMOidCaMM3S23hZUIb7t5fsG3MSY1Q2 fRvRkMoQtSOeOftmtTwhwt9WIddm5X2SSwOQqvmDFf6FstgTYTR1GSEkfXa9cQPfADORpF 5HAZNWgZVO6a5moGcxkUWjYCkQEVrJ7basahycsPPo4YZPUXkx7XisxVQyQzUM7icWiDvC vCBYNYelbDg6Q39bcDLmRmBHoAA48f+zv04L+g8GWgUethwWNHWCg2I0UpK9wQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779814194; a=rsa-sha256; cv=none; b=VVfB5GgTjONzo4nvz377ojG/vH7iui0e00MVcBHGBgIz6pIXnQr7CaaUIxaJfzM9N4RKDH CtKt/NBTOnFGSd3vCYVKkAdt0qQPvs3oH1nmmVfzJFXQFE1xUcGh3rWdA/2/0bOTg1+7Q7 Qz7aOWNcjqMclUzp7V60onW7SkWYORguIKrx4cPnKRgvaG1ig92gv4YfkVNoEo63ocXcw0 /kmuwyVo//BA2jL4n0nPgVWLsWWaNgNW/iJAzsLJnpMK6tEjEFfEaWl+9ANxlLWLjNDXXl Y/RCMSwfaW7JEZ+auRxMLd1tAeVj3L5dXO7JDNuVJ+zdPXILVt/ZjE9MiTry7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779814194; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8cHimeymLaj+jBzURhnyC3FSYOszGpgUWldX5jD74qE=; b=OKn0EmAs+xo+22j4gEVEIGJb18x74gfaTUzNOfma62JqbMINo+LgyEUP45FGZ2azYDXW8X iALPxspPAJWhXlg00HNnnzLbdcrL7O/a29XdLJjfW8KpDNbN00A6n9mXRJ621A5z8AYYIG HyGb7mn+cKxBuEb4AuLKpDus2JhRgtoLQC0cvM0UqWSeJ3XTV00jniNi7RtMepa2+XLaRC TWS8yuOXUf4y4QuoA7SogLC2EQ7Mjl1iub/R6VhJcPbC+NF1hS8X2puNZkaPd9GFF92U/4 D8qWqJFLpFGxG+lyYBBBFWPRHLSNlW8UV/sYsNJyv0oova2PMF2PEHbdwPusbA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPzJ16DgTz5Pm for ; Tue, 26 May 2026 16:49:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35d78 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 26 May 2026 16:49:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: f3a50f7cee24 - stable/14 - unbound: Update to 1.24.2 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f3a50f7cee24e0835f25fbc66201a1ba1c2b4b8d Auto-Submitted: auto-generated Date: Tue, 26 May 2026 16:49:53 +0000 Message-Id: <6a15cf31.35d78.208a7df2@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=f3a50f7cee24e0835f25fbc66201a1ba1c2b4b8d commit f3a50f7cee24e0835f25fbc66201a1ba1c2b4b8d Author: Dag-Erling Smørgrav AuthorDate: 2026-05-22 20:16:26 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-26 16:49:33 +0000 unbound: Update to 1.24.2 Merge commit 'ec5b94f552d7cb2a9d456c67e9941bcf5e3698bf' This is purely cosmetic as we already had the functional changes. MFC after: 1 week (cherry picked from commit 22fa41b4e81ad91d11e28f1837764730d744d4e4) --- contrib/unbound/config.h.in | 10 +- contrib/unbound/configure | 4673 ++++++++++++++++------------ contrib/unbound/configure.ac | 3 +- contrib/unbound/doc/README | 2 +- contrib/unbound/doc/example.conf | 2 +- contrib/unbound/doc/example.conf.in | 2 +- contrib/unbound/doc/libunbound.3 | 4 +- contrib/unbound/doc/libunbound.3.in | 4 +- contrib/unbound/doc/unbound-anchor.8 | 4 +- contrib/unbound/doc/unbound-anchor.8.in | 4 +- contrib/unbound/doc/unbound-checkconf.8 | 4 +- contrib/unbound/doc/unbound-checkconf.8.in | 4 +- contrib/unbound/doc/unbound-control.8 | 4 +- contrib/unbound/doc/unbound-control.8.in | 4 +- contrib/unbound/doc/unbound-host.1 | 4 +- contrib/unbound/doc/unbound-host.1.in | 4 +- contrib/unbound/doc/unbound.8 | 4 +- contrib/unbound/doc/unbound.8.in | 4 +- contrib/unbound/doc/unbound.conf.5 | 4 +- contrib/unbound/doc/unbound.conf.5.in | 4 +- lib/libunbound/config.h | 16 +- 21 files changed, 2774 insertions(+), 1990 deletions(-) diff --git a/contrib/unbound/config.h.in b/contrib/unbound/config.h.in index a2b3f33c32be..4f89bfb21614 100644 --- a/contrib/unbound/config.h.in +++ b/contrib/unbound/config.h.in @@ -173,11 +173,11 @@ 0 if you don't. */ #undef HAVE_DECL_SSL_CTX_SET_ECDH_AUTO -/* Define to 1 if you have the declaration of `SSL_CTX_set_tmp_ecdh', and to 0 +/* Define to 1 if you have the declaration of 'SSL_CTX_set_tmp_ecdh', and to 0 if you don't. */ #undef HAVE_DECL_SSL_CTX_SET_TMP_ECDH -/* Define to 1 if you have the declaration of `strlcat', and to 0 if you +/* Define to 1 if you have the declaration of 'strlcat', and to 0 if you don't. */ #undef HAVE_DECL_STRLCAT @@ -481,10 +481,10 @@ 'ngtcp2_crypto_quictls_from_ossl_encryption_level' function. */ #undef HAVE_NGTCP2_CRYPTO_QUICTLS_FROM_OSSL_ENCRYPTION_LEVEL -/* Define to 1 if you have the `ngtcp2_crypto_quictls_init' function. */ +/* Define to 1 if you have the 'ngtcp2_crypto_quictls_init' function. */ #undef HAVE_NGTCP2_CRYPTO_QUICTLS_INIT -/* Define to 1 if the system has the type `ngtcp2_encryption_level'. */ +/* Define to 1 if the system has the type 'ngtcp2_encryption_level'. */ #undef HAVE_NGTCP2_ENCRYPTION_LEVEL /* Define to 1 if you have the header file. @@ -655,7 +655,7 @@ function. */ #undef HAVE_SSL_CTX_SET_TLSEXT_TICKET_KEY_EVP_CB -/* Define to 1 if you have the `SSL_get0_alpn_selected' function. */ +/* Define to 1 if you have the 'SSL_get0_alpn_selected' function. */ #undef HAVE_SSL_GET0_ALPN_SELECTED /* Define to 1 if you have the 'SSL_get0_peername' function. */ diff --git a/contrib/unbound/configure b/contrib/unbound/configure index 3093412a492f..717de9beb3e1 100755 --- a/contrib/unbound/configure +++ b/contrib/unbound/configure @@ -1,11 +1,11 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for unbound 1.24.1. +# Generated by GNU Autoconf 2.72 for unbound 1.24.2. # # Report bugs to . # # -# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, +# Copyright (C) 1992-1996, 1998-2017, 2020-2023 Free Software Foundation, # Inc. # # @@ -17,7 +17,6 @@ # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -as_nop=: if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh @@ -26,12 +25,13 @@ then : # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else $as_nop - case `(set -o) 2>/dev/null` in #( +else case e in #( + e) case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; +esac ;; esac fi @@ -103,7 +103,7 @@ IFS=$as_save_IFS ;; esac -# We did not find ourselves, most probably we were run as `sh COMMAND' +# We did not find ourselves, most probably we were run as 'sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 @@ -133,15 +133,14 @@ case $- in # (((( esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. +# out after a failed 'exec'. printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="as_nop=: -if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 + as_bourne_compatible="if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh NULLCMD=: @@ -149,12 +148,13 @@ then : # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST -else \$as_nop - case \`(set -o) 2>/dev/null\` in #( +else case e in #( + e) case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; +esac ;; esac fi " @@ -172,8 +172,9 @@ as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ) then : -else \$as_nop - exitcode=1; echo positional parameters were not saved. +else case e in #( + e) exitcode=1; echo positional parameters were not saved. ;; +esac fi test x\$exitcode = x0 || exit 1 blah=\$(echo \$(echo blah)) @@ -195,14 +196,15 @@ test \$(( 1 + 1 )) = 2 || exit 1 if (eval "$as_required") 2>/dev/null then : as_have_required=yes -else $as_nop - as_have_required=no +else case e in #( + e) as_have_required=no ;; +esac fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null then : -else $as_nop - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +else case e in #( + e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do @@ -235,12 +237,13 @@ IFS=$as_save_IFS if $as_found then : -else $as_nop - if { test -f "$SHELL" || test -f "$SHELL.exe"; } && +else case e in #( + e) if { test -f "$SHELL" || test -f "$SHELL.exe"; } && as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null then : CONFIG_SHELL=$SHELL as_have_required=yes -fi +fi ;; +esac fi @@ -262,7 +265,7 @@ case $- in # (((( esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. +# out after a failed 'exec'. printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi @@ -283,7 +286,8 @@ $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 -fi +fi ;; +esac fi fi SHELL=${CONFIG_SHELL-/bin/sh} @@ -322,14 +326,6 @@ as_fn_exit () as_fn_set_status $1 exit $1 } # as_fn_exit -# as_fn_nop -# --------- -# Do nothing but, unlike ":", preserve the value of $?. -as_fn_nop () -{ - return $? -} -as_nop=as_fn_nop # as_fn_mkdir_p # ------------- @@ -398,11 +394,12 @@ then : { eval $1+=\$2 }' -else $as_nop - as_fn_append () +else case e in #( + e) as_fn_append () { eval $1=\$$1\$2 - } + } ;; +esac fi # as_fn_append # as_fn_arith ARG... @@ -416,21 +413,14 @@ then : { as_val=$(( $* )) }' -else $as_nop - as_fn_arith () +else case e in #( + e) as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` - } + } ;; +esac fi # as_fn_arith -# as_fn_nop -# --------- -# Do nothing but, unlike ":", preserve the value of $?. -as_fn_nop () -{ - return $? -} -as_nop=as_fn_nop # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- @@ -504,6 +494,8 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits /[$]LINENO/= ' <$as_myself | sed ' + t clear + :clear s/[$]LINENO.*/&-/ t lineno b @@ -552,7 +544,6 @@ esac as_echo='printf %s\n' as_echo_n='printf %s' - rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -564,9 +555,9 @@ if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. + # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable. + # In both cases, we have to default to 'cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then @@ -591,10 +582,12 @@ as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" +as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" +as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated # Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g" +as_tr_sh="eval sed '$as_sed_sh'" # deprecated SHELL=${CONFIG_SHELL-/bin/sh} @@ -622,8 +615,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='unbound' PACKAGE_TARNAME='unbound' -PACKAGE_VERSION='1.24.1' -PACKAGE_STRING='unbound 1.24.1' +PACKAGE_VERSION='1.24.2' +PACKAGE_STRING='unbound 1.24.2' PACKAGE_BUGREPORT='unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues' PACKAGE_URL='' @@ -660,6 +653,7 @@ ac_includes_default="\ ac_header_c_list= ac_func_c_list= +enable_year2038=no ac_subst_vars='LTLIBOBJS date version @@ -748,6 +742,7 @@ PTHREAD_LIBS PTHREAD_CXX PTHREAD_CC ax_pthread_config +CPP ASYNCLOOK_ALLOCCHECK_EXTRA_OBJ SLDNS_ALLOCCHECK_EXTRA_OBJ USE_SYSTEMD_FALSE @@ -758,7 +753,6 @@ SYSTEMD_LIBS SYSTEMD_CFLAGS RUNTIME_PATH LIBOBJS -CPP PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG @@ -944,6 +938,7 @@ with_libmnl enable_explicit_port_randomisation enable_linux_ip_local_port_range with_libunbound_only +enable_year2038 ' ac_precious_vars='build_alias host_alias @@ -959,11 +954,11 @@ LT_SYS_LIBRARY_PATH PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR -CPP SYSTEMD_CFLAGS SYSTEMD_LIBS SYSTEMD_DAEMON_CFLAGS SYSTEMD_DAEMON_LIBS +CPP PYTHON_VERSION SOURCE_DATE_EPOCH PROTOBUFC_CFLAGS @@ -1076,7 +1071,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: \`$ac_useropt'" + as_fn_error $? "invalid feature name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1102,7 +1097,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: \`$ac_useropt'" + as_fn_error $? "invalid feature name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1315,7 +1310,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: \`$ac_useropt'" + as_fn_error $? "invalid package name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1331,7 +1326,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: \`$ac_useropt'" + as_fn_error $? "invalid package name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1361,8 +1356,8 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" + -*) as_fn_error $? "unrecognized option: '$ac_option' +Try '$0 --help' for more information" ;; *=*) @@ -1370,7 +1365,7 @@ Try \`$0 --help' for more information" # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + as_fn_error $? "invalid variable name: '$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1420,7 +1415,7 @@ do as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done -# There might be people who depend on the old broken behavior: `$host' +# There might be people who depend on the old broken behavior: '$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias @@ -1488,7 +1483,7 @@ if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_msg="sources are in $srcdir, but 'cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` @@ -1516,7 +1511,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 unbound 1.24.1 to adapt to many kinds of systems. +'configure' configures unbound 1.24.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1530,11 +1525,11 @@ Configuration: --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages + -q, --quiet, --silent do not print 'checking ...' messages --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' + -C, --config-cache alias for '--cache-file=config.cache' -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] + --srcdir=DIR find the sources in DIR [configure dir or '..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX @@ -1542,10 +1537,10 @@ Installation directories: --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. +By default, 'make install' will install all the files in +'$ac_default_prefix/bin', '$ac_default_prefix/lib' etc. You can specify +an installation prefix other than '$ac_default_prefix' using '--prefix', +for instance '--prefix=\$HOME'. For better control, use the options below. @@ -1582,7 +1577,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of unbound 1.24.1:";; + short | recursive ) echo "Configuration of unbound 1.24.2:";; esac cat <<\_ACEOF @@ -1663,6 +1658,7 @@ Optional Features: randomness. Define this only when the target system restricts (e.g. some of SELinux enabled distributions) the use of non-ephemeral ports. + --enable-year2038 support timestamps after 2038 Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1733,12 +1729,12 @@ Some influential environment variables: LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory - YACC The `Yet Another Compiler Compiler' implementation to use. - Defaults to the first program found out of: `bison -y', `byacc', - `yacc'. + YACC The 'Yet Another Compiler Compiler' implementation to use. + Defaults to the first program found out of: 'bison -y', 'byacc', + 'yacc'. YFLAGS The list of arguments that will be passed by default to $YACC. This script will default YFLAGS to the empty string to avoid a - default value of `-d' given by some make applications. + default value of '-d' given by some make applications. LT_SYS_LIBRARY_PATH User-defined run-time library search path. PKG_CONFIG path to pkg-config utility @@ -1746,7 +1742,6 @@ Some influential environment variables: directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path - CPP C preprocessor SYSTEMD_CFLAGS C compiler flags for SYSTEMD, overriding pkg-config SYSTEMD_LIBS @@ -1755,6 +1750,7 @@ Some influential environment variables: C compiler flags for SYSTEMD_DAEMON, overriding pkg-config SYSTEMD_DAEMON_LIBS linker flags for SYSTEMD_DAEMON, overriding pkg-config + CPP C preprocessor PYTHON_VERSION The installed Python version to use, for example '2.3'. This string will be appended to the Python interpreter canonical @@ -1768,7 +1764,7 @@ Some influential environment variables: PROTOBUFC_LIBS linker flags for PROTOBUFC, overriding pkg-config -Use these variables to override the choices made by `configure' or to help +Use these variables to override the choices made by 'configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . @@ -1835,10 +1831,10 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -unbound configure 1.24.1 -generated by GNU Autoconf 2.71 +unbound configure 1.24.2 +generated by GNU Autoconf 2.72 -Copyright (C) 2021 Free Software Foundation, Inc. +Copyright (C) 2023 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1877,11 +1873,12 @@ printf "%s\n" "$ac_try_echo"; } >&5 } && test -s conftest.$ac_objext then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else case e in #( + e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 + ac_retval=1 ;; +esac fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval @@ -1900,8 +1897,8 @@ printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> @@ -1909,10 +1906,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$3=yes" -else $as_nop - eval "$3=no" +else case e in #( + e) eval "$3=no" ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -1952,11 +1951,12 @@ printf "%s\n" "$ac_try_echo"; } >&5 } then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else case e in #( + e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 + ac_retval=1 ;; +esac fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would @@ -1979,15 +1979,15 @@ printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. */ + which can conflict with char $2 (void); below. */ #include #undef $2 @@ -1998,7 +1998,7 @@ else $as_nop #ifdef __cplusplus extern "C" #endif -char $2 (); +char $2 (void); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ @@ -2017,11 +2017,13 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : eval "$3=yes" -else $as_nop - eval "$3=no" +else case e in #( + e) eval "$3=no" ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext + conftest$ac_exeext conftest.$ac_ext ;; +esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -2042,8 +2044,8 @@ printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 -else $as_nop - eval "$3=no" +else case e in #( + e) eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 @@ -2073,12 +2075,14 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : -else $as_nop - eval "$3=yes" +else case e in #( + e) eval "$3=yes" ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -2087,44 +2091,6 @@ printf "%s\n" "$ac_res" >&6; } } # ac_fn_c_check_type -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - } -then : - ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_cpp - # ac_fn_c_try_run LINENO # ---------------------- # Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that @@ -2155,12 +2121,13 @@ printf "%s\n" "$ac_try_echo"; } >&5 test $ac_status = 0; }; } then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: program exited with status $ac_status" >&5 +else case e in #( + e) printf "%s\n" "$as_me: program exited with status $ac_status" >&5 printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=$ac_status + ac_retval=$ac_status ;; +esac fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno @@ -2213,18 +2180,19 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_hi=$ac_mid; break -else $as_nop - as_fn_arith $ac_mid + 1 && ac_lo=$as_val +else case e in #( + e) as_fn_arith $ac_mid + 1 && ac_lo=$as_val if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi - as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val + as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int @@ -2259,20 +2227,23 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_lo=$ac_mid; break -else $as_nop - as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val +else case e in #( + e) as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi - as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val + as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done -else $as_nop - ac_lo= ac_hi= +else case e in #( + e) ac_lo= ac_hi= ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext # Binary search between lo and hi bounds. @@ -2295,8 +2266,9 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_hi=$ac_mid -else $as_nop - as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val +else case e in #( + e) as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done @@ -2344,8 +2316,9 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : echo >>conftest.val; read $3 &5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + } +then : + ac_retval=0 +else case e in #( + e) printf "%s\n" "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 ;; +esac +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + # ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR # ------------------------------------------------------------------ # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR @@ -2370,8 +2382,8 @@ printf %s "checking whether $as_decl_name is declared... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 -else $as_nop - as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` +else case e in #( + e) as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` eval ac_save_FLAGS=\$$6 as_fn_append $6 " $5" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2395,12 +2407,14 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$3=yes" -else $as_nop - eval "$3=no" +else case e in #( + e) eval "$3=no" ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext eval $6=\$ac_save_FLAGS - + ;; +esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -2421,8 +2435,8 @@ printf %s "checking for $2.$3... " >&6; } if eval test \${$4+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int @@ -2438,8 +2452,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$4=yes" -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int @@ -2455,12 +2469,15 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$4=yes" -else $as_nop - eval "$4=no" +else case e in #( + e) eval "$4=no" ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi eval ac_res=\$$4 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -2492,8 +2509,8 @@ 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 unbound $as_me 1.24.1, which was -generated by GNU Autoconf 2.71. Invocation command line was +It was created by unbound $as_me 1.24.2, which was +generated by GNU Autoconf 2.72. Invocation command line was $ $0$ac_configure_args_raw @@ -2739,10 +2756,10 @@ esac printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ - || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 *** 9729 LINES SKIPPED *** From nobody Tue May 26 16:49:56 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPzJ52RLNz6g6yV for ; Tue, 26 May 2026 16:49: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPzJ50Fbnz4Kr4 for ; Tue, 26 May 2026 16:49:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779814197; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oQNZv9wLZ+BYNQEut4HTtfv+tQlqfdn18VM4ddpNq4k=; b=e8hKH9p8hRoj/Ax+BIlcdNxfe7+X+F6OLtXKtbxsQjF/rhPLxJEUmBG81aOdwuf211Um3j BjLA72EFNTlBagzPSOVJeXglfLZppDp1uePj7wCGQXjc/NqCk48b0oaveZmWeHX3/3zKK6 XyQN4oDDmPD5QxS7clSD90oCLIRdz9puRiQ/V7ErWYYuSlL22vVLotCLjikP0fqezfun42 Z0TbhiVUKf66yt0w85r/clF80Yy/g4Ifh6lWGT7BYCfsLpt2nfNlK1++zcDSVUjtm6exAl GnxXtxkeHs2YOz/J6C7wPKE0jK6x7VYtFk0W2pNuOtLGlxpZJ3MP7XRr27EYng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779814197; a=rsa-sha256; cv=none; b=xc0XdsyvuSnI9E6ZX9sv8dsCXHb4myRQZDGgge78rLMQIBVOa2LywApHafxmj5b1Yg+tp9 s27yyzLwINccEc4IEUpbijqHpF0xqLrzX5qVXDeuA5VUzO4CuWScxPpWY3idA1mNAPHpFY yHCWZ5XnorQXM/rNGy2OTK4Zen9bF1ytHbpAEzti9e3j6G9j9W9k4ZJ0THouVK2HHanFbS LA62jxokoJcXlGeUbWbisBz+XzKj9V/0EIkCqn0LRKTKgnXyNd1cW6SK4sdFvMoaaXKrSf QWqRaghHEikBcX/zs9j15HFE8dYt/vVga9qYqplUTRu8R94C2x5Fgpe0grfg+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779814197; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oQNZv9wLZ+BYNQEut4HTtfv+tQlqfdn18VM4ddpNq4k=; b=CsKPY5tcUwEeBxl3SFFAA82M+VIOfq21R42/+fnNXlPnVe99CfW9sP6Ml+W0spGl8ImiyV wXralmVa3vJTzAaI+h3YNm7+HwQDk02RA2NJFF7TPirsOc3S8jeyOYbziMo+TThnR5bbN5 AM2gcXt3vppWpUOvp7oJCQmk/VRk3u0mzTRASKeRB7Vh56MDU16i+Q0TzNzOVx5tGC93In dMukB2JwKYvBg1iDevsl0ATzcdO0PukWyY629OI3kF39zivuM5z6ccvoXlL5JPMrz7l8wy p6QTh/QdIOtlbsjTyGpTFuFpTD5WGOF4T1H95S8A+FxL6RM3g0wJlGc5w89jig== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPzJ46jTLz5Vy for ; Tue, 26 May 2026 16:49:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 372cf by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 26 May 2026 16:49:56 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: de9d7a2ab8f5 - stable/14 - unbound: Update to 1.25.1 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: de9d7a2ab8f59f07b5fa1e81295d1c431bb2f548 Auto-Submitted: auto-generated Date: Tue, 26 May 2026 16:49:56 +0000 Message-Id: <6a15cf34.372cf.15e475fa@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=de9d7a2ab8f59f07b5fa1e81295d1c431bb2f548 commit de9d7a2ab8f59f07b5fa1e81295d1c431bb2f548 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-23 01:57:43 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-26 16:49:33 +0000 unbound: Update to 1.25.1 Release notes at https://nlnetlabs.nl/news/2026/May/20/unbound-1.25.1-released/ Merge commit '22e58f330a151944c24e010d23ec3881df6681b6' Security: CVE-2026-33278 Security: CVE-2026-42944 Security: CVE-2026-42959 Security: CVE-2026-32792 Security: CVE-2026-40622 Security: CVE-2026-41292 Security: CVE-2026-42534 Security: CVE-2026-42923 Security: CVE-2026-42960 Security: CVE-2026-44390 Security: CVE-2026-44608 MFC after: 1 week (cherry picked from commit 50caa0ea0c16499c40e785b5aa37053b180b2830) --- contrib/unbound/aclocal.m4 | 857 +++++++----- contrib/unbound/configure | 1929 +++++++++++++++++++--------- contrib/unbound/configure.ac | 5 +- contrib/unbound/dnscrypt/dnscrypt.c | 2 +- contrib/unbound/doc/Changelog | 30 + contrib/unbound/doc/README | 2 +- contrib/unbound/doc/example.conf | 2 +- contrib/unbound/doc/example.conf.in | 2 +- contrib/unbound/doc/libunbound.3 | 4 +- contrib/unbound/doc/libunbound.3.in | 4 +- contrib/unbound/doc/unbound-anchor.8 | 4 +- contrib/unbound/doc/unbound-anchor.8.in | 4 +- contrib/unbound/doc/unbound-checkconf.8 | 4 +- contrib/unbound/doc/unbound-checkconf.8.in | 4 +- contrib/unbound/doc/unbound-control.8 | 4 +- contrib/unbound/doc/unbound-control.8.in | 4 +- contrib/unbound/doc/unbound-host.1 | 4 +- contrib/unbound/doc/unbound-host.1.in | 4 +- contrib/unbound/doc/unbound.8 | 4 +- contrib/unbound/doc/unbound.8.in | 4 +- contrib/unbound/doc/unbound.conf.5 | 4 +- contrib/unbound/doc/unbound.conf.5.in | 4 +- contrib/unbound/install-sh | 178 ++- contrib/unbound/iterator/iter_scrub.c | 8 +- contrib/unbound/ltmain.sh | 1566 +++++++++++++--------- contrib/unbound/services/cache/dns.c | 8 +- contrib/unbound/services/cache/rrset.c | 10 + contrib/unbound/services/mesh.c | 14 +- contrib/unbound/services/mesh.h | 6 + contrib/unbound/services/rpz.c | 10 +- contrib/unbound/util/configparser.c | 896 ++++++------- contrib/unbound/util/configparser.h | 4 +- contrib/unbound/util/data/msgencode.c | 38 +- contrib/unbound/util/data/msgencode.h | 4 +- contrib/unbound/util/data/msgparse.c | 19 +- contrib/unbound/validator/val_neg.c | 28 +- contrib/unbound/validator/val_nsec3.c | 76 +- contrib/unbound/validator/val_nsec3.h | 6 + contrib/unbound/validator/val_utils.c | 4 +- lib/libunbound/config.h | 6 +- 40 files changed, 3619 insertions(+), 2147 deletions(-) diff --git a/contrib/unbound/aclocal.m4 b/contrib/unbound/aclocal.m4 index bf3c57e2fd9f..375ee7a86df3 100644 --- a/contrib/unbound/aclocal.m4 +++ b/contrib/unbound/aclocal.m4 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.16.2 -*- Autoconf -*- +# generated automatically by aclocal 1.18.1 -*- Autoconf -*- -# Copyright (C) 1996-2020 Free Software Foundation, Inc. +# Copyright (C) 1996-2025 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,7 +14,8 @@ m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # -# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. +# Copyright (C) 1996-2001, 2003-2019, 2021-2024 Free Software +# Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives @@ -22,13 +23,13 @@ m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl -# Copyright (C) 2014 Free Software Foundation, Inc. +# Copyright (C) 2024 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of of the License, or +# the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, if you @@ -45,7 +46,7 @@ m4_define([_LT_COPYING], [dnl # along with this program. If not, see . ]) -# serial 58 LT_INIT +# serial 63 LT_INIT # LT_PREREQ(VERSION) @@ -73,7 +74,7 @@ esac # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], -[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK +[AC_PREREQ([2.64])dnl We use AC_PATH_PROGS_FEATURE_CHECK AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl @@ -195,6 +196,7 @@ m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl +m4_require([_LT_DECL_FILECMD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl @@ -233,8 +235,8 @@ esac ofile=libtool can_build_shared=yes -# All known linkers require a '.a' archive for static linking (except MSVC, -# which needs '.lib'). +# All known linkers require a '.a' archive for static linking (except MSVC and +# ICC, which need '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld @@ -622,7 +624,7 @@ m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before -# AC_OUTPUT is called), incase it is used in configure for compilation +# AC_OUTPUT is called), in case it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} @@ -657,9 +659,9 @@ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. -Copyright (C) 2011 Free Software Foundation, Inc. +Copyright (C) 2024 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation -gives unlimited permision to copy, distribute and modify it." +gives unlimited permission to copy, distribute and modify it." while test 0 != $[#] do @@ -736,7 +738,6 @@ _LT_CONFIG_SAVE_COMMANDS([ cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. @@ -786,7 +787,7 @@ _LT_EOF # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" \ + $SED '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || @@ -979,6 +980,7 @@ _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE + # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ @@ -1029,6 +1031,21 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ rm -f conftest.* fi]) + # Feature test to disable chained fixups since it is not + # compatible with '-undefined dynamic_lookup' + AC_CACHE_CHECK([for -no_fixup_chains linker flag], + [lt_cv_support_no_fixup_chains], + [ save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -Wl,-no_fixup_chains" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM([],[])], + lt_cv_support_no_fixup_chains=yes, + lt_cv_support_no_fixup_chains=no + ) + LDFLAGS=$save_LDFLAGS + ] + ) + AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no @@ -1048,12 +1065,12 @@ int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD - echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD - $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD + echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD + $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF -int main() { return 0;} +int main(void) { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err @@ -1073,23 +1090,37 @@ _LT_EOF _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - 10.[[012]][[,.]]*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + darwin*) + case $MACOSX_DEPLOYMENT_TARGET,$host in + 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; + *) + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' + if test yes = "$lt_cv_support_no_fixup_chains"; then + AS_VAR_APPEND([_lt_dar_allow_undefined], [' $wl-no_fixup_chains']) + fi + ;; esac ;; esac if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi + _lt_dar_needs_single_mod=no + case $host_os in + rhapsody* | darwin1.*) + _lt_dar_needs_single_mod=yes ;; + darwin*) + # When targeting Mac OS X 10.4 (darwin 8) or later, + # -single_module is the default and -multi_module is unsupported. + # The toolchain on macOS 10.14 (darwin 18) and later cannot + # target any OS version that needs -single_module. + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*-darwin[[567]].*|10.[[0-3]],*-darwin[[5-9]].*|10.[[0-3]],*-darwin1[[0-7]].*) + _lt_dar_needs_single_mod=yes ;; + esac + ;; + esac if test yes = "$lt_cv_ld_exported_symbols_list"; then _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else @@ -1132,12 +1163,12 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES], output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" + _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" + _LT_TAGVAR(module_expsym_cmds, $1)="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" m4_if([$1], [CXX], -[ if test yes != "$lt_cv_apple_cc_single_mod"; then +[ if test yes = "$_lt_dar_needs_single_mod" -a yes != "$lt_cv_apple_cc_single_mod"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" + _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi ],[]) else @@ -1251,7 +1282,8 @@ _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], -[AC_MSG_CHECKING([for sysroot]) +[m4_require([_LT_DECL_SED])dnl +AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], [Search for dependent libraries within DIR (or the compiler's sysroot @@ -1264,11 +1296,13 @@ lt_sysroot= case $with_sysroot in #( yes) if test yes = "$GCC"; then - lt_sysroot=`$CC --print-sysroot 2>/dev/null` + # Trim trailing / since we'll always append absolute paths and we want + # to avoid //, if only for less confusing output for the user. + lt_sysroot=`$CC --print-sysroot 2>/dev/null | $SED 's:/\+$::'` fi ;; #( /*) - lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` ;; #( no|'') ;; #( @@ -1298,7 +1332,7 @@ ia64-*-hpux*) # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; @@ -1315,7 +1349,7 @@ ia64-*-hpux*) echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test yes = "$lt_cv_prog_gnu_ld"; then - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; @@ -1327,7 +1361,7 @@ ia64-*-hpux*) ;; esac else - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; @@ -1349,7 +1383,7 @@ mips64*-*linux*) echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then emul=elf - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; @@ -1357,7 +1391,7 @@ mips64*-*linux*) emul="${emul}64" ;; esac - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; @@ -1365,7 +1399,7 @@ mips64*-*linux*) emul="${emul}ltsmip" ;; esac - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; @@ -1376,7 +1410,7 @@ mips64*-*linux*) ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) +s390*-*linux*|s390*-*tpf*|sparc*-*linux*|x86_64-gnu*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when @@ -1385,14 +1419,14 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # not appear in the list. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in + case `$FILECMD conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; - x86_64-*linux*) - case `/usr/bin/file conftest.o` in + x86_64-*linux*|x86_64-gnu*) + case `$FILECMD conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; @@ -1420,7 +1454,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; - x86_64-*linux*) + x86_64-*linux*|x86_64-gnu*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*linux*) @@ -1460,7 +1494,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in + case `$FILECMD conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) @@ -1499,9 +1533,22 @@ need_locks=$enable_libtool_lock m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} -: ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) -_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) + +# Use ARFLAGS variable as AR's operation code to sync the variable naming with +# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have +# higher priority because that's what people were doing historically (setting +# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS +# variable obsoleted/removed. + +test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} +lt_ar_flags=$AR_FLAGS +_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) + +# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override +# by AR_FLAGS because that was never working and AR_FLAGS is about to die. +_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], + [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no @@ -1540,7 +1587,7 @@ AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) -AC_CHECK_TOOL(RANLIB, ranlib, :) +AC_REQUIRE([AC_PROG_RANLIB]) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) @@ -1551,15 +1598,8 @@ old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then - case $host_os in - bitrig* | openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" - ;; - esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in @@ -1691,14 +1731,14 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. + gnu* | ironclad*) + # Under GNU Hurd and Ironclad, this test is not required because there + # is no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; - cygwin* | mingw* | cegcc*) + cygwin* | mingw* | windows* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, @@ -1720,7 +1760,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl lt_cv_sys_max_cmd_len=8192; ;; - bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) + darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` @@ -1763,7 +1803,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` + lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi @@ -1880,11 +1920,11 @@ else /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); +int fnord (void) __attribute__((visibility("default"))); #endif -int fnord () { return 42; } -int main () +int fnord (void) { return 42; } +int main (void) { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; @@ -1941,7 +1981,7 @@ else lt_cv_dlopen_self=yes ;; - mingw* | pw32* | cegcc*) + mingw* | windows* | pw32* | cegcc*) lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; @@ -2213,26 +2253,35 @@ m4_defun([_LT_CMD_STRIPLIB], striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) +if test -z "$STRIP"; then + AC_MSG_RESULT([no]) else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP"; then + if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + old_striplib="$STRIP --strip-debug" + striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT([yes]) + else + case $host_os in + darwin*) + # FIXME - insert some real tests, host_os isn't really good enough striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) - else + ;; + freebsd*) + if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then + old_striplib="$STRIP --strip-debug" + striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi + ;; + *) AC_MSG_RESULT([no]) - fi - ;; - *) - AC_MSG_RESULT([no]) - ;; - esac + ;; + esac + fi fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) @@ -2300,7 +2349,7 @@ if test yes = "$GCC"; then *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in - mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; + mingw* | windows* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` @@ -2358,7 +2407,7 @@ BEGIN {RS = " "; FS = "/|\n";} { # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in - mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ + mingw* | windows* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` @@ -2433,7 +2482,7 @@ aix[[4-9]]*) # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl - # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. + # linker flag in LDFLAGS as well, or --enable-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the @@ -2527,7 +2576,7 @@ bsdi[[45]]*) # libtool to hard-code these into programs ;; -cygwin* | mingw* | pw32* | cegcc*) +cygwin* | mingw* | windows* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no @@ -2538,15 +2587,29 @@ cygwin* | mingw* | pw32* | cegcc*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' + # If user builds GCC with multilib enabled, + # it should just install on $(libdir) + # not on $(libdir)/../bin or 32 bits dlls would override 64 bit ones. + if test xyes = x"$multilib"; then + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + $install_prog $dir/$dlname $destdir/$dlname~ + chmod a+x $destdir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib $destdir/$dlname'\'' || exit \$?; + fi' + else + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + fi postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' @@ -2555,30 +2618,30 @@ cygwin* | mingw* | pw32* | cegcc*) case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' + soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; - mingw* | cegcc*) + mingw* | windows* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' + library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; - *,cl*) - # Native MSVC + *,cl* | *,icl*) + # Native MSVC or ICC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in - mingw*) + mingw* | windows*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' @@ -2591,7 +2654,7 @@ m4_if([$1], [],[ done IFS=$lt_save_ifs # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form @@ -2628,7 +2691,7 @@ m4_if([$1], [],[ ;; *) - # Assume MSVC wrapper + # Assume MSVC and ICC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; @@ -2661,7 +2724,7 @@ dgux*) shlibpath_var=LD_LIBRARY_PATH ;; -freebsd* | dragonfly*) +freebsd* | dragonfly* | midnightbsd*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then @@ -2685,7 +2748,21 @@ freebsd* | dragonfly*) need_version=yes ;; esac - shlibpath_var=LD_LIBRARY_PATH + case $host_cpu in + powerpc64) + # On FreeBSD bi-arch platforms, a different variable is used for 32-bit + # binaries. See . + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[int test_pointer_size[sizeof (void *) - 5]; + ]])], + [shlibpath_var=LD_LIBRARY_PATH], + [shlibpath_var=LD_32_LIBRARY_PATH]) + ;; + *) + shlibpath_var=LD_LIBRARY_PATH + ;; + esac case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes @@ -2715,8 +2792,9 @@ haiku*) soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes + sys_lib_search_path_spec='/boot/system/non-packaged/develop/lib /boot/system/develop/lib' + sys_lib_dlsearch_path_spec='/boot/home/config/non-packaged/lib /boot/home/config/lib /boot/system/non-packaged/lib /boot/system/lib' + hardcode_into_libs=no ;; hpux9* | hpux10* | hpux11*) @@ -2826,7 +2904,7 @@ linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no - library_names_spec='$libname$release$shared_ext' + library_names_spec='$libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH @@ -2838,8 +2916,9 @@ linux*android*) hardcode_into_libs=yes dynamic_linker='Android linker' - # Don't embed -rpath directories since the linker doesn't support them. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + # -rpath works at least for libraries that are not overridden by + # libraries installed in system locations. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' ;; # This must be glibc/ELF. @@ -2876,7 +2955,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) # Add ABI-specific directories to the system library path. sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" - # Ideally, we could use ldconfig to report *all* directores which are + # Ideally, we could use ldconfig to report *all* directories which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, @@ -2896,6 +2975,18 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) dynamic_linker='GNU/Linux ld.so' ;; +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + netbsd*) version_type=sunos need_lib_prefix=no @@ -2914,6 +3005,18 @@ netbsd*) hardcode_into_libs=yes ;; +*-mlibc) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + dynamic_linker='mlibc ld.so' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' @@ -2933,7 +3036,7 @@ newsos6) dynamic_linker='ldqnx.so' ;; -openbsd* | bitrig*) +openbsd*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no @@ -2993,6 +3096,17 @@ rdos*) dynamic_linker=no ;; +serenity*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + dynamic_linker='SerenityOS LibELF' + ;; + solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no @@ -3090,6 +3204,21 @@ uts4*) shlibpath_var=LD_LIBRARY_PATH ;; +emscripten*) + version_type=none + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext' + soname_spec='$libname$release$shared_ext' + finish_cmds= + dynamic_linker="Emscripten linker" + _LT_COMPILER_PIC($1)='-fPIC' + _LT_TAGVAR(archive_cmds, $1)='$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib -s EXPORTED_FUNCTIONS=@$output_objdir/$soname.expsym' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(no_undefined_flag, $1)= + ;; + *) dynamic_linker=no ;; @@ -3265,7 +3394,7 @@ if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in - *-*-mingw*) + *-*-mingw* | *-*-windows*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) @@ -3374,7 +3503,7 @@ case $reload_flag in esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in - cygwin* | mingw* | pw32* | cegcc*) + cygwin* | mingw* | windows* | pw32* | cegcc*) if test yes != "$GCC"; then reload_cmds=false fi @@ -3446,7 +3575,6 @@ lt_cv_deplibs_check_method='unknown' # 'none' -- dependencies not supported. # 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # that responds to the $file_magic_cmd with a given extended regex. # If you have 'file' or equivalent on your system and you're not sure @@ -3463,7 +3591,7 @@ beos*) bsdi[[45]]*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_cmd='$FILECMD -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; @@ -3473,7 +3601,7 @@ cygwin*) lt_cv_file_magic_cmd='func_win32_libid' ;; -mingw* | pw32*) +mingw* | windows* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. @@ -3482,7 +3610,7 @@ mingw* | pw32*) lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. - lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64|pe-aarch64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; @@ -3497,14 +3625,14 @@ darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; -freebsd* | dragonfly*) +freebsd* | dragonfly* | midnightbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_cmd=$FILECMD lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac @@ -3518,7 +3646,7 @@ haiku*) ;; hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_cmd=$FILECMD case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' @@ -3555,7 +3683,11 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; -netbsd*) +*-mlibc) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else @@ -3565,7 +3697,7 @@ netbsd*) newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_cmd=$FILECMD lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; @@ -3573,7 +3705,7 @@ newos6*) lt_cv_deplibs_check_method=pass_all ;; -openbsd* | bitrig*) +openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then *** 12238 LINES SKIPPED *** From nobody Tue May 26 16:49:54 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPzJ40dxKz6g789 for ; Tue, 26 May 2026 16:49: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPzJ35RR0z4KZG for ; Tue, 26 May 2026 16:49:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779814195; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gy+dr6MmrsCzdJ+r9iiixzhFLI+wgJ+d/sjy6yAYNYs=; b=oEmnkLxwUHW/MUdC5cxPTYsV9elfNz/PaYP9ep2R8/U1/oG+/a3O2GYahlQuuNjUhZXnIT CMSN/tB8Tmev5yJVwB1kORy9jt6ysH82baqjO8FeN/l1Tu4rcoY/jNoUsX5bjYS0DIHEvu 6Ia5E+rc5IFR0kfM9uTop6kW6ZbxoCkngUPkcXVGczo/bK06TFHeTX6FPQw+Y1oIlDk6xe nCqkarfCUgae78eS9gbGFkbqv2nQzRtZnN1UcjAI50/9GtaJhiD7pwvKnEtueGUc0jCpia SfGgcrp38JGTcnO+RQJg+lXieuLmn+UwRXmOndprJK8Y6adofOQr2zLuNMpRcg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779814195; a=rsa-sha256; cv=none; b=e9tLfGnZD2QZCf4pvDv3B/pyCupPK1FA9px4oC1fKUaTe700elmvj05yYfGydQjB/BHbpB XTNZ0U8SfeQ9eCBYHWGAGPktRnoUg3h+LKb7u7hX99fpD7v+nXjHZss+su+MNAflSP9bYs fyedfx0WsoMN13BzVlyceAWjKJTW/83Z0rDdVVPodNJ9nK7Iu3c3s+gDIytUAUnldKUGLQ WKrRhWfTfvbO+eBCL2eomv+Ui9OdUyQvrZqCax+GgjL109KhC8Euzu0azJeC83tBqQC7G5 o8TLL1KX7P/2HM2Iu/gmPNiwt2r7ggSZSCxc/9YO3d/G6KHq3l5iQBHcn2AY2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779814195; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gy+dr6MmrsCzdJ+r9iiixzhFLI+wgJ+d/sjy6yAYNYs=; b=t6sn/cCDVYK6LMnelNypnxr/kbvkghPMLOu3LCIPrK9uBaA95G1BHGc66nE0GM4iySjTar tqJNB8effCC8RzHZDpHpy0Vw8oBIHyr08xCfRg+z34kwhOWncR7qT2ZuwZkFr+RZKs5nuG glyflzsyDRXQfI71PQH9yKUxb3pCzrSbBN8mEUfV/bgK3iH0kJeOX2nYX0O9smkPcB9Fv+ YfDSV4Ijw04IfYemshQ5KcUZNeIVpRurG/e1wB8sljUPSMcE35fIESXUyef12T6K5799t7 CLWU7+q8u4YVZEVd9TvoLxTLtALkIod7zpL6FOqcC0ua0sF9bHHyuhsGnWczBA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPzJ34n3Bz5Vx for ; Tue, 26 May 2026 16:49:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 37a80 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 26 May 2026 16:49:54 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: a2679283778c - stable/14 - unbound: Update to 1.25.0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a2679283778cd547b9aba1161254550e26616851 Auto-Submitted: auto-generated Date: Tue, 26 May 2026 16:49:54 +0000 Message-Id: <6a15cf32.37a80.37aff3d9@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=a2679283778cd547b9aba1161254550e26616851 commit a2679283778cd547b9aba1161254550e26616851 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-23 01:54:22 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-26 16:49:33 +0000 unbound: Update to 1.25.0 Release notes at https://nlnetlabs.nl/news/2026/Apr/29/unbound-1.25.0-released/ Merge commit '4dd0a17edce60370304a45f2c40251e09e193bd6' MFC after: 1 week (cherry picked from commit 5fa84c6ec176d186ddad25d31f8760e50f48157f) --- contrib/unbound/README.md | 21 +- contrib/unbound/aclocal.m4 | 857 +- contrib/unbound/acx_nlnetlabs.m4 | 77 +- contrib/unbound/cachedb/cachedb.c | 108 +- contrib/unbound/cachedb/redis.c | 6 + contrib/unbound/compat/arc4random.c | 7 + contrib/unbound/compat/chacha_private.h | 4 +- contrib/unbound/compat/getentropy_linux.c | 20 + contrib/unbound/compat/gmtime_r.c | 5 +- contrib/unbound/config.h.in | 397 +- contrib/unbound/configure | 6522 ++++++--------- contrib/unbound/configure.ac | 123 +- contrib/unbound/contrib/README | 2 + contrib/unbound/contrib/gost12.patch | 325 + contrib/unbound/contrib/ios/install_openssl.sh | 12 +- contrib/unbound/contrib/ios/setenv_ios.sh | 5 + contrib/unbound/contrib/unbound.service.in | 2 +- .../unbound/contrib/unbound_portable.service.in | 2 +- contrib/unbound/daemon/daemon.c | 326 +- contrib/unbound/daemon/daemon.h | 41 + contrib/unbound/daemon/remote.c | 315 +- contrib/unbound/daemon/remote.h | 8 + contrib/unbound/daemon/stats.c | 6 + contrib/unbound/daemon/unbound.c | 51 +- contrib/unbound/daemon/worker.c | 258 +- contrib/unbound/dns64/dns64.c | 23 +- contrib/unbound/dnstap/dtstream.c | 16 +- contrib/unbound/dnstap/dtstream.h | 6 + contrib/unbound/dnstap/unbound-dnstap-socket.c | 28 +- contrib/unbound/doc/Changelog | 484 ++ contrib/unbound/doc/README | 2 +- contrib/unbound/doc/README.DNS64 | 6 +- contrib/unbound/doc/README.man | 11 +- contrib/unbound/doc/example.conf | 75 +- contrib/unbound/doc/example.conf.in | 75 +- contrib/unbound/doc/libunbound.3 | 6 +- contrib/unbound/doc/libunbound.3.in | 6 +- contrib/unbound/doc/unbound-anchor.8 | 21 +- contrib/unbound/doc/unbound-anchor.8.in | 21 +- contrib/unbound/doc/unbound-anchor.rst | 15 +- contrib/unbound/doc/unbound-checkconf.8 | 6 +- contrib/unbound/doc/unbound-checkconf.8.in | 6 +- contrib/unbound/doc/unbound-control.8 | 45 +- contrib/unbound/doc/unbound-control.8.in | 45 +- contrib/unbound/doc/unbound-control.rst | 34 + contrib/unbound/doc/unbound-host.1 | 6 +- contrib/unbound/doc/unbound-host.1.in | 6 +- contrib/unbound/doc/unbound.8 | 8 +- contrib/unbound/doc/unbound.8.in | 8 +- contrib/unbound/doc/unbound.conf.5 | 558 +- contrib/unbound/doc/unbound.conf.5.in | 558 +- contrib/unbound/doc/unbound.conf.rst | 524 +- contrib/unbound/doc/unbound.rst | 2 +- contrib/unbound/edns-subnet/subnetmod.c | 108 +- contrib/unbound/edns-subnet/subnetmod.h | 10 + contrib/unbound/install-sh | 178 +- contrib/unbound/ipsecmod/ipsecmod.c | 2 +- contrib/unbound/iterator/iter_fwd.c | 5 + contrib/unbound/iterator/iter_hints.c | 5 + contrib/unbound/iterator/iter_priv.c | 168 +- contrib/unbound/iterator/iter_scrub.c | 70 +- contrib/unbound/iterator/iter_utils.c | 50 +- contrib/unbound/iterator/iter_utils.h | 1 + contrib/unbound/iterator/iterator.c | 43 +- contrib/unbound/libunbound/unbound.h | 4 + contrib/unbound/ltmain.sh | 1566 ++-- contrib/unbound/pythonmod/interface.i | 1857 ----- contrib/unbound/pythonmod/pythonmod_utils.c | 201 - contrib/unbound/respip/respip.c | 9 +- contrib/unbound/services/authzone.c | 150 +- contrib/unbound/services/cache/dns.c | 110 +- contrib/unbound/services/cache/dns.h | 2 +- contrib/unbound/services/cache/infra.c | 3 +- contrib/unbound/services/cache/rrset.c | 37 +- contrib/unbound/services/listen_dnsport.c | 40 +- contrib/unbound/services/localzone.c | 179 +- contrib/unbound/services/localzone.h | 12 +- contrib/unbound/services/mesh.c | 130 +- contrib/unbound/services/mesh.h | 13 +- contrib/unbound/services/modstack.c | 7 +- contrib/unbound/services/outside_network.c | 65 +- contrib/unbound/services/outside_network.h | 7 + contrib/unbound/services/rpz.c | 1 + contrib/unbound/sldns/rrdef.h | 4 +- contrib/unbound/sldns/wire2str.c | 3 + contrib/unbound/smallapp/unbound-anchor.c | 12 +- contrib/unbound/smallapp/unbound-checkconf.c | 48 +- contrib/unbound/smallapp/unbound-control.c | 15 +- contrib/unbound/smallapp/unbound-host.c | 12 +- contrib/unbound/testcode/checklocks.c | 916 --- contrib/unbound/testcode/do-tests.sh | 76 - contrib/unbound/testcode/doqclient.c | 2764 ------- contrib/unbound/testcode/fake_event.c | 2044 ----- contrib/unbound/testcode/testbound.c | 788 -- contrib/unbound/testcode/unitdname.c | 1314 --- contrib/unbound/testcode/unitinfra.c | 210 - contrib/unbound/testcode/unitldns.c | 284 - contrib/unbound/testcode/unitmain.c | 1401 ---- contrib/unbound/testcode/unitmain.h | 92 - contrib/unbound/testcode/unitneg.c | 545 -- contrib/unbound/testcode/unitverify.c | 706 -- contrib/unbound/testcode/unitzonemd.c | 542 -- contrib/unbound/util/alloc.c | 2 +- contrib/unbound/util/config_file.c | 116 + contrib/unbound/util/config_file.h | 32 + contrib/unbound/util/configlexer.c | 8521 ++++++++++---------- contrib/unbound/util/configlexer.lex | 4 +- contrib/unbound/util/configparser.c | 4650 +++++------ contrib/unbound/util/configparser.h | 184 +- contrib/unbound/util/configparser.y | 53 +- contrib/unbound/util/data/msgencode.c | 58 +- contrib/unbound/util/data/msgencode.h | 4 +- contrib/unbound/util/data/msgparse.c | 12 + contrib/unbound/util/data/msgparse.h | 25 + contrib/unbound/util/data/msgreply.c | 72 +- contrib/unbound/util/data/msgreply.h | 28 +- contrib/unbound/util/data/packed_rrset.c | 36 +- contrib/unbound/util/data/packed_rrset.h | 3 + contrib/unbound/util/fptr_wlist.c | 7 +- contrib/unbound/util/fptr_wlist.h | 8 +- contrib/unbound/util/iana_ports.inc | 9 +- contrib/unbound/util/locks.h | 27 + contrib/unbound/util/log.c | 32 +- contrib/unbound/util/module.h | 19 +- contrib/unbound/util/net_help.c | 54 +- contrib/unbound/util/net_help.h | 12 +- contrib/unbound/util/netevent.c | 27 +- contrib/unbound/util/shm_side/shm_main.c | 219 +- contrib/unbound/util/shm_side/shm_main.h | 15 + contrib/unbound/util/timehist.h | 4 + contrib/unbound/validator/val_neg.c | 14 +- contrib/unbound/validator/val_sigcrypt.c | 12 + contrib/unbound/validator/val_sigcrypt.h | 2 +- contrib/unbound/validator/val_utils.c | 25 + contrib/unbound/validator/val_utils.h | 11 + contrib/unbound/validator/validator.c | 95 +- contrib/unbound/winrc/win_svc.c | 6 +- lib/libunbound/config.h | 403 +- 138 files changed, 16189 insertions(+), 27522 deletions(-) diff --git a/contrib/unbound/README.md b/contrib/unbound/README.md index 3bbd38b3b78b..d805e4d0a3d7 100644 --- a/contrib/unbound/README.md +++ b/contrib/unbound/README.md @@ -4,7 +4,7 @@ [![Packaging status](https://repology.org/badge/tiny-repos/unbound.svg)](https://repology.org/project/unbound/versions) [![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/unbound.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:unbound) [![Documentation Status](https://readthedocs.org/projects/unbound/badge/?version=latest)](https://unbound.readthedocs.io/en/latest/?badge=latest) -[![Mastodon Follow](https://img.shields.io/mastodon/follow/109262826617293067?domain=https%3A%2F%2Ffosstodon.org&style=social)](https://fosstodon.org/@nlnetlabs) +[![Mastodon Follow](https://img.shields.io/mastodon/follow/114692612288811644?domain=social.nlnetlabs.nl&style=social)](https://social.nlnetlabs.nl/@nlnetlabs) Unbound is a validating, recursive, caching DNS resolver. It is designed to be fast and lean and incorporates modern features based on open standards. If you @@ -25,18 +25,21 @@ Unbound can be compiled and installed using: ./configure && make && make install ``` -You can use libevent if you want. libevent is useful when using many (10000) -outgoing ports. By default max 256 ports are opened at the same time and the -builtin alternative is equally capable and a little faster. - +You can use libevent if you want. libevent is useful when using many (e.g., +10000) outgoing ports. Use the `--with-libevent` configure option to compile Unbound with libevent support. +If not, the default builtin alternative opens max 256 ports at the same time +and is equally capable and a little faster. + + ## Unbound configuration -All of Unbound's configuration options are described in the man pages, which -will be installed and are available on the Unbound -[documentation page](https://unbound.docs.nlnetlabs.nl/). +All of Unbound's configuration options are described in the `unbound.conf(5)` +man page, which will be installed and is also available on the Unbound +[documentation page](https://unbound.docs.nlnetlabs.nl/en/latest/manpages/unbound.conf.html) +for the latest version. -An example configuration file is located in +An example configuration file, with minimal documentation, is located in [doc/example.conf](https://github.com/NLnetLabs/unbound/blob/master/doc/example.conf.in). diff --git a/contrib/unbound/aclocal.m4 b/contrib/unbound/aclocal.m4 index 792090e178d6..bf3c57e2fd9f 100644 --- a/contrib/unbound/aclocal.m4 +++ b/contrib/unbound/aclocal.m4 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.17 -*- Autoconf -*- +# generated automatically by aclocal 1.16.2 -*- Autoconf -*- -# Copyright (C) 1996-2024 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,8 +14,7 @@ m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # -# Copyright (C) 1996-2001, 2003-2019, 2021-2024 Free Software -# Foundation, Inc. +# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives @@ -23,13 +22,13 @@ m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl -# Copyright (C) 2024 Free Software Foundation, Inc. +# Copyright (C) 2014 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# the Free Software Foundation; either version 2 of of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, if you @@ -46,7 +45,7 @@ m4_define([_LT_COPYING], [dnl # along with this program. If not, see . ]) -# serial 63 LT_INIT +# serial 58 LT_INIT # LT_PREREQ(VERSION) @@ -74,7 +73,7 @@ esac # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], -[AC_PREREQ([2.64])dnl We use AC_PATH_PROGS_FEATURE_CHECK +[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl @@ -196,7 +195,6 @@ m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl -m4_require([_LT_DECL_FILECMD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl @@ -235,8 +233,8 @@ esac ofile=libtool can_build_shared=yes -# All known linkers require a '.a' archive for static linking (except MSVC and -# ICC, which need '.lib'). +# All known linkers require a '.a' archive for static linking (except MSVC, +# which needs '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld @@ -624,7 +622,7 @@ m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before -# AC_OUTPUT is called), in case it is used in configure for compilation +# AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} @@ -659,9 +657,9 @@ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. -Copyright (C) 2024 Free Software Foundation, Inc. +Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." +gives unlimited permision to copy, distribute and modify it." while test 0 != $[#] do @@ -738,6 +736,7 @@ _LT_CONFIG_SAVE_COMMANDS([ cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. @@ -787,7 +786,7 @@ _LT_EOF # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? - $SED '$q' "$ltmain" >> "$cfgfile" \ + sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || @@ -980,7 +979,6 @@ _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE - # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ @@ -1031,21 +1029,6 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ rm -f conftest.* fi]) - # Feature test to disable chained fixups since it is not - # compatible with '-undefined dynamic_lookup' - AC_CACHE_CHECK([for -no_fixup_chains linker flag], - [lt_cv_support_no_fixup_chains], - [ save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS -Wl,-no_fixup_chains" - AC_LINK_IFELSE( - [AC_LANG_PROGRAM([],[])], - lt_cv_support_no_fixup_chains=yes, - lt_cv_support_no_fixup_chains=no - ) - LDFLAGS=$save_LDFLAGS - ] - ) - AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no @@ -1065,12 +1048,12 @@ int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD - echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD - $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD + echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD + $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF -int main(void) { return 0;} +int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err @@ -1090,37 +1073,23 @@ _LT_EOF _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - darwin*) - case $MACOSX_DEPLOYMENT_TARGET,$host in - 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - *) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' - if test yes = "$lt_cv_support_no_fixup_chains"; then - AS_VAR_APPEND([_lt_dar_allow_undefined], [' $wl-no_fixup_chains']) - fi - ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + 10.[[012]][[,.]]*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi - _lt_dar_needs_single_mod=no - case $host_os in - rhapsody* | darwin1.*) - _lt_dar_needs_single_mod=yes ;; - darwin*) - # When targeting Mac OS X 10.4 (darwin 8) or later, - # -single_module is the default and -multi_module is unsupported. - # The toolchain on macOS 10.14 (darwin 18) and later cannot - # target any OS version that needs -single_module. - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*-darwin[[567]].*|10.[[0-3]],*-darwin[[5-9]].*|10.[[0-3]],*-darwin1[[0-7]].*) - _lt_dar_needs_single_mod=yes ;; - esac - ;; - esac if test yes = "$lt_cv_ld_exported_symbols_list"; then _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else @@ -1163,12 +1132,12 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES], output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - _LT_TAGVAR(module_expsym_cmds, $1)="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" + _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" m4_if([$1], [CXX], -[ if test yes = "$_lt_dar_needs_single_mod" -a yes != "$lt_cv_apple_cc_single_mod"; then +[ if test yes != "$lt_cv_apple_cc_single_mod"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" - _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi ],[]) else @@ -1282,8 +1251,7 @@ _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], -[m4_require([_LT_DECL_SED])dnl -AC_MSG_CHECKING([for sysroot]) +[AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], [Search for dependent libraries within DIR (or the compiler's sysroot @@ -1296,13 +1264,11 @@ lt_sysroot= case $with_sysroot in #( yes) if test yes = "$GCC"; then - # Trim trailing / since we'll always append absolute paths and we want - # to avoid //, if only for less confusing output for the user. - lt_sysroot=`$CC --print-sysroot 2>/dev/null | $SED 's:/\+$::'` + lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) - lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( @@ -1332,7 +1298,7 @@ ia64-*-hpux*) # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - case `$FILECMD conftest.$ac_objext` in + case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; @@ -1349,7 +1315,7 @@ ia64-*-hpux*) echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test yes = "$lt_cv_prog_gnu_ld"; then - case `$FILECMD conftest.$ac_objext` in + case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; @@ -1361,7 +1327,7 @@ ia64-*-hpux*) ;; esac else - case `$FILECMD conftest.$ac_objext` in + case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; @@ -1383,7 +1349,7 @@ mips64*-*linux*) echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then emul=elf - case `$FILECMD conftest.$ac_objext` in + case `/usr/bin/file conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; @@ -1391,7 +1357,7 @@ mips64*-*linux*) emul="${emul}64" ;; esac - case `$FILECMD conftest.$ac_objext` in + case `/usr/bin/file conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; @@ -1399,7 +1365,7 @@ mips64*-*linux*) emul="${emul}ltsmip" ;; esac - case `$FILECMD conftest.$ac_objext` in + case `/usr/bin/file conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; @@ -1410,7 +1376,7 @@ mips64*-*linux*) ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*|x86_64-gnu*) +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when @@ -1419,14 +1385,14 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*|x86_64-gnu*) # not appear in the list. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - case `$FILECMD conftest.o` in + case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; - x86_64-*linux*|x86_64-gnu*) - case `$FILECMD conftest.o` in + x86_64-*linux*) + case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; @@ -1454,7 +1420,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*|x86_64-gnu*) x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; - x86_64-*linux*|x86_64-gnu*) + x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*linux*) @@ -1494,7 +1460,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*|x86_64-gnu*) # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - case `$FILECMD conftest.o` in + case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) @@ -1533,22 +1499,9 @@ need_locks=$enable_libtool_lock m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} +: ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) - -# Use ARFLAGS variable as AR's operation code to sync the variable naming with -# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have -# higher priority because that's what people were doing historically (setting -# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS -# variable obsoleted/removed. - -test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} -lt_ar_flags=$AR_FLAGS -_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) - -# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override -# by AR_FLAGS because that was never working and AR_FLAGS is about to die. -_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], - [Flags to create an archive]) +_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no @@ -1587,7 +1540,7 @@ AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) -AC_REQUIRE([AC_PROG_RANLIB]) +AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) @@ -1598,8 +1551,15 @@ old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then + case $host_os in + bitrig* | openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" + ;; + esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in @@ -1731,14 +1691,14 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; - gnu* | ironclad*) - # Under GNU Hurd and Ironclad, this test is not required because there - # is no limit to the length of command line arguments. + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; - cygwin* | mingw* | windows* | cegcc*) + cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, @@ -1760,7 +1720,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl lt_cv_sys_max_cmd_len=8192; ;; - darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) + bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` @@ -1803,7 +1763,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'` + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi @@ -1920,11 +1880,11 @@ else /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord (void) __attribute__((visibility("default"))); +int fnord () __attribute__((visibility("default"))); #endif -int fnord (void) { return 42; } -int main (void) +int fnord () { return 42; } +int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; @@ -1981,7 +1941,7 @@ else lt_cv_dlopen_self=yes ;; - mingw* | windows* | pw32* | cegcc*) + mingw* | pw32* | cegcc*) lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; @@ -2253,35 +2213,26 @@ m4_defun([_LT_CMD_STRIPLIB], striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) -if test -z "$STRIP"; then - AC_MSG_RESULT([no]) +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT([yes]) else - if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - old_striplib="$STRIP --strip-debug" - striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) - else - case $host_os in - darwin*) - # FIXME - insert some real tests, host_os isn't really good enough +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) - ;; - freebsd*) - if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then - old_striplib="$STRIP --strip-debug" - striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - ;; - *) + else AC_MSG_RESULT([no]) - ;; - esac - fi + fi + ;; + *) + AC_MSG_RESULT([no]) + ;; + esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) @@ -2349,7 +2300,7 @@ if test yes = "$GCC"; then *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in - mingw* | windows* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; + mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` @@ -2407,7 +2358,7 @@ BEGIN {RS = " "; FS = "/|\n";} { # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in - mingw* | windows* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ + mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` @@ -2482,7 +2433,7 @@ aix[[4-9]]*) # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl - # linker flag in LDFLAGS as well, or --enable-aix-soname=svr4 only. + # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the @@ -2576,7 +2527,7 @@ bsdi[[45]]*) # libtool to hard-code these into programs ;; -cygwin* | mingw* | windows* | pw32* | cegcc*) +cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no @@ -2587,29 +2538,15 @@ cygwin* | mingw* | windows* | pw32* | cegcc*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds - # If user builds GCC with multilib enabled, - # it should just install on $(libdir) - # not on $(libdir)/../bin or 32 bits dlls would override 64 bit ones. - if test xyes = x"$multilib"; then - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - $install_prog $dir/$dlname $destdir/$dlname~ - chmod a+x $destdir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib $destdir/$dlname'\'' || exit \$?; - fi' - else - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - fi + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' @@ -2618,30 +2555,30 @@ cygwin* | mingw* | windows* | pw32* | cegcc*) case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' + soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; - mingw* | windows* | cegcc*) + mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' + library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; - *,cl* | *,icl*) - # Native MSVC or ICC + *,cl*) + # Native MSVC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in - mingw* | windows*) + mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' @@ -2654,7 +2591,7 @@ m4_if([$1], [],[ done IFS=$lt_save_ifs # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form @@ -2691,7 +2628,7 @@ m4_if([$1], [],[ ;; *) - # Assume MSVC and ICC wrapper + # Assume MSVC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; @@ -2724,7 +2661,7 @@ dgux*) shlibpath_var=LD_LIBRARY_PATH ;; -freebsd* | dragonfly* | midnightbsd*) +freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then @@ -2748,21 +2685,7 @@ freebsd* | dragonfly* | midnightbsd*) need_version=yes ;; esac - case $host_cpu in - powerpc64) - # On FreeBSD bi-arch platforms, a different variable is used for 32-bit - # binaries. See . - AC_COMPILE_IFELSE( - [AC_LANG_SOURCE( - [[int test_pointer_size[sizeof (void *) - 5]; - ]])], - [shlibpath_var=LD_LIBRARY_PATH], - [shlibpath_var=LD_32_LIBRARY_PATH]) - ;; - *) - shlibpath_var=LD_LIBRARY_PATH - ;; - esac + shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes @@ -2792,9 +2715,8 @@ haiku*) soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/boot/system/non-packaged/develop/lib /boot/system/develop/lib' - sys_lib_dlsearch_path_spec='/boot/home/config/non-packaged/lib /boot/home/config/lib /boot/system/non-packaged/lib /boot/system/lib' - hardcode_into_libs=no + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) @@ -2904,7 +2826,7 @@ linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no - library_names_spec='$libname$release$shared_ext $libname$shared_ext' + library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH @@ -2916,9 +2838,8 @@ linux*android*) hardcode_into_libs=yes dynamic_linker='Android linker' - # -rpath works at least for libraries that are not overridden by - # libraries installed in system locations. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + # Don't embed -rpath directories since the linker doesn't support them. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ;; # This must be glibc/ELF. @@ -2955,7 +2876,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) # Add ABI-specific directories to the system library path. sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" - # Ideally, we could use ldconfig to report *all* directories which are + # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, @@ -2975,18 +2896,6 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) dynamic_linker='GNU/Linux ld.so' ;; -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; - netbsd*) version_type=sunos need_lib_prefix=no @@ -3005,18 +2914,6 @@ netbsd*) hardcode_into_libs=yes ;; -*-mlibc) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='mlibc ld.so' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' @@ -3036,7 +2933,7 @@ newsos6) dynamic_linker='ldqnx.so' ;; -openbsd*) +openbsd* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no @@ -3096,17 +2993,6 @@ rdos*) dynamic_linker=no ;; -serenity*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - dynamic_linker='SerenityOS LibELF' - ;; - solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no *** 65010 LINES SKIPPED *** From nobody Tue May 26 17:13:54 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPzqk4p8tz6g96V for ; Tue, 26 May 2026 17:13: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPzqk1sbsz3CWV for ; Tue, 26 May 2026 17:13:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779815634; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AHlZDGXq5nqxYrPo0EgofUJNj/VKj3bbpTaWpbNKi6Y=; b=gPzBNICWRywwUYKTws6AxuGq/gogC38HrpIkfPPrC3BrcgFhNpw6PKxyzRSTj+w5oQcg3s rx+ubFZuoF4t+JUN2p+gQH5ZwuID/A0OVpqLyUqTg+ARAQUTTEnm6O8cq8KDWU9IhRr4VT hDnPGmHmBMp/6Grjt4k36q68LxK7SUYmLibMyAUv3L0nmbFsbe/ZrYhOpZp88Y9RIdM8fS 3uvnlxoQskCvY4P1aKkvpIxFAt3lYuXOx5cz1iRknXIv8XiVFNJJ/un2TksfseyibipSqA 8sZ0gUyH8fH/GJCK1wduKnKAyh/sMuri4PjaHdH/ojbvIDmYxWwc3nlhHIONxQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779815634; a=rsa-sha256; cv=none; b=dt1tRCv++/Fmg4w8ROXNjdeq0JMbLxYL7TKmaluuDmChFwkyCnyGhHLjg+cGA1jSb+bfgW p8X3ZmHtF1+zwnGI2OQnRTrA5Y/O29iOb7KJ00Yahq5bR99un1zF4OS5dMOl5dIAO3kRY7 4m8wn7Ic3cTZ7P0A4bVJ1eB6Wy2tj4HPkU6bnfNlYU5V5TtZv/mZylhEFapZgV8k7CBNbw xNiwTpFIAUGylTZaO8uK5BUHzGA8Rmx9xyokkVytbT37PE6dxhhb2MkyX378O97DqxSR4R ZgiYB9jNbxxDLYXeSbDuSOLh6aMRh8F69+lRbJYxJGQF1y1YwMwvIdVUsY07Jw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779815634; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AHlZDGXq5nqxYrPo0EgofUJNj/VKj3bbpTaWpbNKi6Y=; b=pgwTYfW/OOvm1mjKBLQ/TGm58+dBiKM9M9bWAelYduB189Ri0d1QKnGQVhHGeoNgtsJPkw qglqZA7zuGIXnYe7hYLZyjkUGGDZCvgE7m3rU9H6DHnrHhd942BUbsknwHm6tEs6f7mkSW nyooDVjqJhOndXXwyk5pD6WJevjlK/yVDtaLXrJU1LYh5WHIUkz7FmeH3DIagTZy6AckCk E2NGGuz/EZ+XBZ4GYKxkgZvS2KKNcUOArCHkw426ny04751Mz/1HkJfg7NYHnzrAxn9tCF zCla5712QjIRA/m+1/KseNGbJ2DbdCFV95PPKHAC0GzpPlx4cUR6SLX5gDKEAA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPzqk1CR3z68W for ; Tue, 26 May 2026 17:13:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38afa by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 26 May 2026 17:13:54 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: be2da08e0b5b - stable/15 - nlist.3: Add discouraged use notice List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: be2da08e0b5b82329e36a6cf3b98f9099c6184ce Auto-Submitted: auto-generated Date: Tue, 26 May 2026 17:13:54 +0000 Message-Id: <6a15d4d2.38afa.376aa22b@gitrepo.freebsd.org> The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=be2da08e0b5b82329e36a6cf3b98f9099c6184ce commit be2da08e0b5b82329e36a6cf3b98f9099c6184ce Author: Ed Maste AuthorDate: 2026-05-17 14:29:29 +0000 Commit: Ed Maste CommitDate: 2026-05-26 17:13:35 +0000 nlist.3: Add discouraged use notice It is a relic from a.out days and is poorly specified. Although ELF support was added to nlist, there are better ways to access ELF data. Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57078 (cherry picked from commit 94b7a335683abcbcd76e8b67d37e21271d81590c) --- lib/libc/gen/nlist.3 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/libc/gen/nlist.3 b/lib/libc/gen/nlist.3 index 876af0ab6bc1..7321c1e9215c 100644 --- a/lib/libc/gen/nlist.3 +++ b/lib/libc/gen/nlist.3 @@ -40,6 +40,10 @@ .Sh DESCRIPTION The .Fn nlist +function is provided for compatibility with legacy applications. +Its use is discouraged. +The +.Fn nlist function retrieves name list entries from the symbol table of an executable file (see From nobody Tue May 26 17:13:55 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPzql5P5Vz6g96Y for ; Tue, 26 May 2026 17:13: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPzql2dStz3C69 for ; Tue, 26 May 2026 17:13:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779815635; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f0AWfmDowelR0kLXFBZUhz6SrzqYd6XuivEtTX2EjnM=; b=X2bIHeYjIaqPSbP6MBU/wtuzu6EcQlehffu789fC8idzcRL6OgKNCYPewsUypEGbUNAmbn BuSkIueIVqQLW9XTebxpztdDp6xYatjKDoLs5BcJ/hI8p2OwAAD5WE0bmhDFhwraVCCdRa X+I1hNEiyPkYfq5T+GIMH/q4Rhq7ZqEaaxQVFXdXD2DYi9aWpvaGMHfPjtJrVqBdtHSbch Sn3v2BmpzQzaZoofSM3gju0O7RLBsCYf9oFkjLpqcnUg6xd65sA7AcsRiLtGgwvgeAI+WH iG3x1qscbtJ+K2dkQvZyjvhESVIFi8ICuvkY9ocrPWEGxqPj3LE/+arPhyY1tQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779815635; a=rsa-sha256; cv=none; b=XHdmAZPqvE0gsER/XBl6hDxjNERtsEj0e2QPOObRlAc3KlsceP3TfreEnfQnr1aLHuUAwn c7L4Rw286o2glF2S2Pamqc8LGwqXWmSLIDMGs6QC5XhS6NAptrgUjoWsLSN0h10Us7IZKY McKgvxumwY6fmEXNefzxVUi//bEHra5ACqdTHgvTmSXqiICa+O1v04ntxRQsgA5deBl6iB sTkwx0omIkWW9iJ60Uva2PMQSz3y0BaoFW0lor1cGnuP5Yeff+RueBkb88ScBGU+KhR9Ox iUm4fhmki4rk26PQ/ASpfaXaEBteCz0yopT5f3QzMuPCOgdBgt3KBcQA4ihrdQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779815635; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f0AWfmDowelR0kLXFBZUhz6SrzqYd6XuivEtTX2EjnM=; b=Lz0Oaf6l04E+HMh2u7h+oCJBbpIaGPs65CivGncW0knxpcDD4BXlrZ5ObHAlD/GToomtxz 30FmEHGOqXi3WuvGCk9znjBbEKrffDku8B0czQqOrlW1nyGJf7IMXXvUmyYxuBjLpz829F +asnAIporjf6auLMM5ubpgfGrR4jr2D+16kR+kDCfToaFRfnjhMjBXaHDCjeAlKYB3XpiZ H/g7TZv0TJfwxrZyHmI+oFgUl4ZBXFH/HGSf3UilK8s4bKPsSxffu/H9LJV/Yt9eI+w5h3 ObiWoo/zUn6u/3mhqmlftarFJa1nirP6m6DgNaFlHrp4sVzxGsYJULjrxbdfrQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPzql1zHWz62P for ; Tue, 26 May 2026 17:13:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39265 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 26 May 2026 17:13:55 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: e25366d46bf5 - stable/15 - nlist.3: Clarify which symbol table is used List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: e25366d46bf5cdd840d2827524f9ed29e2fcbc66 Auto-Submitted: auto-generated Date: Tue, 26 May 2026 17:13:55 +0000 Message-Id: <6a15d4d3.39265.155f615@gitrepo.freebsd.org> The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=e25366d46bf5cdd840d2827524f9ed29e2fcbc66 commit e25366d46bf5cdd840d2827524f9ed29e2fcbc66 Author: Ed Maste AuthorDate: 2026-05-18 14:59:14 +0000 Commit: Ed Maste CommitDate: 2026-05-26 17:13:35 +0000 nlist.3: Clarify which symbol table is used nlist() requires section headers, and currently fetches symbol names only from SHT_SYMTAB, Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57065 (cherry picked from commit cd6bf930eafe850dc631feeaf8332832601f4225) --- lib/libc/gen/nlist.3 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/libc/gen/nlist.3 b/lib/libc/gen/nlist.3 index 7321c1e9215c..6aefd95e3b51 100644 --- a/lib/libc/gen/nlist.3 +++ b/lib/libc/gen/nlist.3 @@ -45,9 +45,11 @@ Its use is discouraged. The .Fn nlist function -retrieves name list entries from the symbol table of an -executable file (see -.Xr elf 5 ) . +retrieves name list entries from the +.Xr elf 5 +section with type +.Dv SHT_SYMTAB +in an ELF object (for example, an executable file or shared library). The argument .Fa \&nl is set to reference the From nobody Tue May 26 17:13:53 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPzqp4W61z6g8fN for ; Tue, 26 May 2026 17:13: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPzqp1LsCz3Cdy for ; Tue, 26 May 2026 17:13:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779815638; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0PvNy4wZnh2ZU+90cwE/zfpXA7pGhgcaullBNXuzs+0=; b=eIw8vSW2PYIE//fbgKKlOa0xISAgeJRnr/QAxOZfJ3t+9OQP8XeNB8yFSvx50R5uLa0aBc 7tFUqpjaVI3uGVkWOgW+qN9V9D38hOCuNCiFV+yLDAL9bAkAfHYGZvyRibrulpOX40Xj/X 3YbezlLGj68jCwwBWF2jFwuaVFzhtZFHh4UgG4Pnv8wFyyLELAaJ027Eh5SCjCwFeFGwgy 0qjO0+SkNLumf45LEo1opxTzKFBKMyhTGu7xrvLcZMxpDpZc7OwIOZBtOB0Qe09Ib0YOA0 9VnFWvNCbboD87wqlRChD8FLYZmomMrzWCQw6F5xiXXKBd64w4k69gNpx7DdKA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779815638; a=rsa-sha256; cv=none; b=fqoxbx1czGsRcsDyN6cUgIDNqwqmflYpkdO6vEwML6pp8CLfL0Aabpgtil61w998He/9SZ c6KDDvpANr0FIHETNYssgOB/qrudtuWu5YDBEJljth0jQL+whIZEtiyFXSwQWzn+Ra7yOK 3iZ10yjCzpaczwj3n761Pw737loRwlJ6OrBYWfdHzISc1pQ6NC8qBDPzb0PfxrnOwcGGwE S3ZF+3yEjUd90uSUk7I4wToUfzzE/JC8fR3voGFrSUMRtn28a7cfYU5R8QKDfILTuuLDFF GKvN6TxzHBGOPMAQbrh/4Li6NJeS7z0rh0jVPuhnUsDHpX8kNT4rw3Ueea225w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779815638; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0PvNy4wZnh2ZU+90cwE/zfpXA7pGhgcaullBNXuzs+0=; b=rRFguacXQzr9komKwC6Lay+598phDI71Ie6uOipWGq5g3a9X1EU6GuCJkjC/ePEgTr364d x5jrNhLBmXJeIeLaJ4OP2MfXKYdBiKeqY12IcV5zMSyvRDEh3YtTqLznjOD1q4lRYRKfbQ aKMNrlLF7QtVm+2BrzckPNCfbPZQWAFw3H2FLkeAX7LBKiz0sqAQVgI+0NuiegHuVqsAge i5K8jB4weXDdNtXuewC6AmVqxVwFzQDhPvMpL8+IhQGmTFBMcwIEHz6v5JYs48EUC0s5g2 3kulqxmdI2gWzw6ELYevOgB+5ynTWRxXuqFzj274gZvC/oqtCutdiAId3YxTnA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPzqp0sZQz62Q for ; Tue, 26 May 2026 17:13:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39d91 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 26 May 2026 17:13:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 9d9651c49575 - stable/15 - nlist.3: Replace a.out(5) Xref with elf(5) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 9d9651c49575e27f2873c10bb7fe855be29ff48a Auto-Submitted: auto-generated Date: Tue, 26 May 2026 17:13:53 +0000 Message-Id: <6a15d4d1.39d91.246aabca@gitrepo.freebsd.org> The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=9d9651c49575e27f2873c10bb7fe855be29ff48a commit 9d9651c49575e27f2873c10bb7fe855be29ff48a Author: Ed Maste AuthorDate: 2026-05-18 14:50:22 +0000 Commit: Ed Maste CommitDate: 2026-05-26 17:13:35 +0000 nlist.3: Replace a.out(5) Xref with elf(5) ELF support was added to nlist() in 1997, and a.out support was removed in 2020. The man page was not updated for either of these changes. Fixes: 77909f597881 ("Initial elf nlist support, ...") Fixes: 86cfa7e70b2b ("nlist: retire long-obsolete aout support") Sponsored by: The FreeBSD Foundation (cherry picked from commit 876a17321c896427d70de94101df4d888a19189b) struct nlist is documented in both a.out(5) and stab(5), so add an Xref to the latter. (cherry picked from commit 762e451b318c8cbfddbcaaa92a218e8b45306eb9) --- lib/libc/gen/nlist.3 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/libc/gen/nlist.3 b/lib/libc/gen/nlist.3 index f4ef59083dab..876af0ab6bc1 100644 --- a/lib/libc/gen/nlist.3 +++ b/lib/libc/gen/nlist.3 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 19, 1994 +.Dd May 18, 2026 .Dt NLIST 3 .Os .Sh NAME @@ -43,7 +43,7 @@ The function retrieves name list entries from the symbol table of an executable file (see -.Xr a.out 5 ) . +.Xr elf 5 ) . The argument .Fa \&nl is set to reference the @@ -66,7 +66,8 @@ if the file .Fa filename does not exist or is not executable, the returned value is \-1. .Sh SEE ALSO -.Xr elf 5 +.Xr elf 5 , +.Xr stab 5 .Sh HISTORY A .Fn nlist From nobody Tue May 26 17:16:56 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPzvF1PgYz6g960 for ; Tue, 26 May 2026 17:16: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPzvD636bz3DXr for ; Tue, 26 May 2026 17:16:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779815816; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AedIYRqJXoFHwzoRrcLEcyJxqaEDNg0oatP6XwPiYEg=; b=vR2xqFu7RcdPumHjadUDR5pjbW+mGrLYtKxj1vbbhRkN2ZYhwG2ksWwA8CnqGfTTONJ4o+ b2GklrsiZvdenkVScX5O++rhXifVre95ldQAsPJBKh6rYzQzJOgJnzKy2E7oP6ng/S+tSr I6xkHPwZHhcV583aRMDc9tl6dshDTVYahZkjcKUCWE1s+r+oxgRwu6wio83wzEAZGUulmG 65IdscXAlEAe2AMZpSQI++Zdqm1c2pUBeISB/v9/aOvjfgE/Dw4ILJcEDox8PuEx0+jslq Lz0W6Lz1i8YgQ8xUB39hNZzQ+drr2meAXNGIJGBBI3nT00/GAw461q1mX5v9lA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779815816; a=rsa-sha256; cv=none; b=goIiSGvETwMyXZ2IdUrA/fUBoZiHMuJtJeiVUckU1TP5+kCrM58X8Zpju4yZgRJ8qe53kM ujKyuwzVsD/dx6brOyFQr9AN7eHJbJShpn1HMvhJo6GrytoZr6dRvK27EomdiZKKRoW9Hk FP14xJELtL4kudpvE1LKe7NwqrqpwrlIf01HxgJqCm4qD/wogqjbWNWqjlmo3RdpVUk2f+ gT1Ts5DgK8BBzM4R9L8M/ecppEqYNSBp5E4xXHR2Jdv28hflk3XMXFOBtXV/xOl7FPk6yb UA8A7qkxHwfnZgurPFALK4FQblVw1rI2nzI8qeViEPu1xemJjQaZFWCQM96MAg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779815816; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AedIYRqJXoFHwzoRrcLEcyJxqaEDNg0oatP6XwPiYEg=; b=Z6CetzX4CpTpqihHK3F1WccNt5oqvXTKb76yBeGeZxvqBhsQRfEeHNMjiZj8ibI8NMLSip QDTfE2UzbZJbXNNcutMKZFlpmxP7ps560Kc4Uj7BWC4sLe9k/vGKhX5KISbNIOrhZO51ex yBb6N2ube8XBr+5D7pUqwrOo/71OK6kPIzLxlQGt6X4GHPmEsXFm0GwFd5wtF1McoDg+5e H5hzZT8tdM/zw7Fy5tKAcSFNBbsEj6fEQqUxgJwMWdxCXlnOXct88R85Le3xEFs5zXoj4W Pr6wB2JPlJoPmh+zQ/MBtieagXY/9zjHZuAYThJUBGiIvmcSZ/AWJu7ojmEhAA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPzvD5XZ2z560 for ; Tue, 26 May 2026 17:16:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39aa5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 26 May 2026 17:16:56 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 50832522ecc0 - stable/14 - nlist.3: Clarify which symbol table is used List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 50832522ecc039e8bf2f9167b261391276e6e027 Auto-Submitted: auto-generated Date: Tue, 26 May 2026 17:16:56 +0000 Message-Id: <6a15d588.39aa5.3507a2f7@gitrepo.freebsd.org> The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=50832522ecc039e8bf2f9167b261391276e6e027 commit 50832522ecc039e8bf2f9167b261391276e6e027 Author: Ed Maste AuthorDate: 2026-05-18 14:59:14 +0000 Commit: Ed Maste CommitDate: 2026-05-26 17:16:28 +0000 nlist.3: Clarify which symbol table is used nlist() requires section headers, and currently fetches symbol names only from SHT_SYMTAB, Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57065 (cherry picked from commit cd6bf930eafe850dc631feeaf8332832601f4225) (cherry picked from commit e25366d46bf5cdd840d2827524f9ed29e2fcbc66) --- lib/libc/gen/nlist.3 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/libc/gen/nlist.3 b/lib/libc/gen/nlist.3 index 876af0ab6bc1..e549843c5581 100644 --- a/lib/libc/gen/nlist.3 +++ b/lib/libc/gen/nlist.3 @@ -41,9 +41,11 @@ The .Fn nlist function -retrieves name list entries from the symbol table of an -executable file (see -.Xr elf 5 ) . +retrieves name list entries from the +.Xr elf 5 +section with type +.Dv SHT_SYMTAB +in an ELF object (for example, an executable file or shared library). The argument .Fa \&nl is set to reference the From nobody Tue May 26 17:16:57 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPzvG2Xypz6g9C5 for ; Tue, 26 May 2026 17:16: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPzvF6nYLz3DgY for ; Tue, 26 May 2026 17:16:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779815818; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ui0dGYYY9iA1p2+wsCXiUOF/sQOjhOauQOJWRMp45+Q=; b=rMeonf1cS5yuDzaK7PuSYvw1Ue70yFqKKF/mmFa9c9CIjxqPvaOH6HfpToFe55J4h+Pus2 YSZeikt2oKaJDUvK7QXWEk3UGbvUuowqoZzQfXSpkg1JpLegSTO5akV7dlPGX1yeObz8Pt qBI7tGSdeCrS4pUiUmdx+ytFHnZ70FCelHiP6rzi0Vlfl/Iy8/TZPAcY5mTMiocwBOFNkS 53Hm2nNhvZ/IMQwUlRC38Tmi6hHc7qJOfH0anL2D10akWYRuSh3hJ1McO8/kRPmyi6Eznb +KdHEmxiZ1OLHzf13T+ba/HR1/Cx8Zf0ggWsX3s3UeXg80LKOCamx+rvnfmDkg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779815818; a=rsa-sha256; cv=none; b=yqsoIoVjm0T8dRN3Zwl8A7thFBlL0gOm69E2i2NywNOdij8RCbqbWHLBXzyQFoVJkEQk8o cnBPqm4Qdy2QhRDMRkiOdvC0rUs0rtcQh+y2gSxbaaw+ZfMcdQmjsOf4PJR/Mbarve1kpB bqasHJj6CLbpH+ydIelNAyfaqsMJbVPpkSD/BZtu9N5PFiyUTsMbiCSkyIhnVFsmbuMw0D 2PH/0dWVDAQkl4uNQPdgK+8/mz1Gfa+58VwoYpfcFOz2ClfiWeEmMu98bdyVwAnesExUus 1WuaqKUMBbV6RwPu9iqf9TnSLPcp3vehPvkrz8PKDbeFpROQmEnA10cWLfstzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779815818; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ui0dGYYY9iA1p2+wsCXiUOF/sQOjhOauQOJWRMp45+Q=; b=seOwUweUGPR5XakM8fi+lUK4H/QNpliVdynr0zzS7y2GGFQnbymey2VKpYg2ztg3iHl1aa EUDuMmTiKUEHNfKH9UKAUV523fDcGKTW3IXrHt+piw7hgahOEhEbcb0ez2JfHpnpEwNyDC ejrV2/PVtPQHCpT+RU89/rKzMLuYNmPh095amyx3namWyviau2u9uRLwypdD3DryuTR/fg Z2795PLDC4i48008URzsG/Rch7sjLXs/DSZf7ESO7n79+3Ny4CstgYNDew3jNXQ89iZrma 4CEHSZYOj1TJ4ptpJA7Xn7k52rHCa5Nkg9MKW1TTypOnnt1xiFqVoWVYmGUrpQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPzvF6FCYz62V for ; Tue, 26 May 2026 17:16:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39b1c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 26 May 2026 17:16:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 2ca9d9256fd4 - stable/14 - nlist.3: Add discouraged use notice List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 2ca9d9256fd4524b17260053eb4570aa6ba4d1f1 Auto-Submitted: auto-generated Date: Tue, 26 May 2026 17:16:57 +0000 Message-Id: <6a15d589.39b1c.28a29b07@gitrepo.freebsd.org> The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=2ca9d9256fd4524b17260053eb4570aa6ba4d1f1 commit 2ca9d9256fd4524b17260053eb4570aa6ba4d1f1 Author: Ed Maste AuthorDate: 2026-05-17 14:29:29 +0000 Commit: Ed Maste CommitDate: 2026-05-26 17:16:28 +0000 nlist.3: Add discouraged use notice It is a relic from a.out days and is poorly specified. Although ELF support was added to nlist, there are better ways to access ELF data. Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57078 (cherry picked from commit 94b7a335683abcbcd76e8b67d37e21271d81590c) (cherry picked from commit be2da08e0b5b82329e36a6cf3b98f9099c6184ce) --- lib/libc/gen/nlist.3 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/libc/gen/nlist.3 b/lib/libc/gen/nlist.3 index e549843c5581..6aefd95e3b51 100644 --- a/lib/libc/gen/nlist.3 +++ b/lib/libc/gen/nlist.3 @@ -40,6 +40,10 @@ .Sh DESCRIPTION The .Fn nlist +function is provided for compatibility with legacy applications. +Its use is discouraged. +The +.Fn nlist function retrieves name list entries from the .Xr elf 5 From nobody Tue May 26 17:16:55 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gPzvK1jmqz6g9KY for ; Tue, 26 May 2026 17:17:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPzvJ5j9tz3Ddj for ; Tue, 26 May 2026 17:17:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779815820; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jbw2TtdSzqWGFStM4zir26khu8TIoP/wfciwrK+l8k0=; b=L1ihTGi0EY2LzQXm8GQg1talYtiHxnvIx4DJKZm8sYX/L/XVNA52RIMPxAc/TghJHDMEYA KbCaF2CRIhEdivweI3i0WWJUkPsVn+iuo0EM2o+t5x1PzDw4r6Gi/T+4I7tElcXr7HLWND U8icpykQtnuzbTedI4ZaJmlihXD9R20FXUkX1em+wbHRmPvz7h5iCautP0h7WUs5+JegZ5 TS2V+lhMaKeEpXL7uC1A/1i4GzFKY5toNXHI81dUfIScRRm2jwsMOFMH30NJcwTx2i6xMd VRhMynR5yT8WxH2rgnAToxTcODhzwccoPMxmofBHPR7IGyOmvJYQaav+DwB3yQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779815820; a=rsa-sha256; cv=none; b=cpEdF4BSlE36GM7uTVpYlMh/P6Yqauv+D0L9mVvthaJr2MUQlCsnYvSlC1GaIOL9bMv0V3 xxTQVUxcWf0WqjkBneK69aKMpiZvUbeHKQLUx9dfOQIAyAG/ERWqGAtM1DWeNQZghorZV2 LBzqPizHKHO71zQOkiVF9eiZRP+yO0qLxOfycb8dioCyWzW8OD7QIwFQ+BFKP1y2BkORGY mWNk/OXLi78cI4rDEEJiv14edpN83vf1UpsdSgYzEG7uzNMEi9WaJfbRT254D464jH3VNx +ltkX23h6uRrYuwgua93mU6dkTo9UaV+zEvc4Km5OxVOBlQrnqqZRn8Bo1+WLg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779815820; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jbw2TtdSzqWGFStM4zir26khu8TIoP/wfciwrK+l8k0=; b=wZuEZln40Yev1Qxq7GRSpzHCXLd2/XGGc1NBTFAftC3uZ5k2x7juvJDBqqblVlKVC7m2EP 8V1+PrHbBTR7SbnQ/d6lsuZHcts3ljCSbVs4g2oRa1pMn8gFUTID0l00j4b5rzGCxj5CtO vOhG9PKhzvDfv41hn8PpamB1k/fV4JXAwEaT1S84s9Yi+9zSLP3lFJXjswgz+eP0G7t84y 5rSofEjH3U+lGw+YNy4UdsFF4rVN9WgxSnxVtYpZ0y93Otzre/e1SZ5GBHc8cOlEK60aWe Z5GNsCkkbhCl3xWfFYcIoqrHZrJQUqKa5ptLZEOA3E7Ku2JFyTrymJ2xBHmy+g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPzvJ5GLSz62X for ; Tue, 26 May 2026 17:17:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39c23 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 26 May 2026 17:16:55 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: fea07b76a0bc - stable/14 - nlist.3: Replace a.out(5) Xref with elf(5) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: fea07b76a0bc602e087e318de1720cc19477e2ca Auto-Submitted: auto-generated Date: Tue, 26 May 2026 17:16:55 +0000 Message-Id: <6a15d587.39c23.7c30a163@gitrepo.freebsd.org> The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=fea07b76a0bc602e087e318de1720cc19477e2ca commit fea07b76a0bc602e087e318de1720cc19477e2ca Author: Ed Maste AuthorDate: 2026-05-18 14:50:22 +0000 Commit: Ed Maste CommitDate: 2026-05-26 17:16:27 +0000 nlist.3: Replace a.out(5) Xref with elf(5) ELF support was added to nlist() in 1997, and a.out support was removed in 2020. The man page was not updated for either of these changes. Fixes: 77909f597881 ("Initial elf nlist support, ...") Fixes: 86cfa7e70b2b ("nlist: retire long-obsolete aout support") Sponsored by: The FreeBSD Foundation (cherry picked from commit 876a17321c896427d70de94101df4d888a19189b) struct nlist is documented in both a.out(5) and stab(5), so add an Xref to the latter. (cherry picked from commit 762e451b318c8cbfddbcaaa92a218e8b45306eb9) (cherry picked from commit 9d9651c49575e27f2873c10bb7fe855be29ff48a) --- lib/libc/gen/nlist.3 | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/libc/gen/nlist.3 b/lib/libc/gen/nlist.3 index ef5b8d95282e..876af0ab6bc1 100644 --- a/lib/libc/gen/nlist.3 +++ b/lib/libc/gen/nlist.3 @@ -25,9 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)nlist.3 8.3 (Berkeley) 4/19/94 -.\" -.Dd April 19, 1994 +.Dd May 18, 2026 .Dt NLIST 3 .Os .Sh NAME @@ -45,7 +43,7 @@ The function retrieves name list entries from the symbol table of an executable file (see -.Xr a.out 5 ) . +.Xr elf 5 ) . The argument .Fa \&nl is set to reference the @@ -68,7 +66,8 @@ if the file .Fa filename does not exist or is not executable, the returned value is \-1. .Sh SEE ALSO -.Xr elf 5 +.Xr elf 5 , +.Xr stab 5 .Sh HISTORY A .Fn nlist From nobody Tue May 26 17:24:09 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQ03Y2r5Dz6gBHk for ; Tue, 26 May 2026 17:24: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQ03Y26hBz3G5b for ; Tue, 26 May 2026 17:24:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779816249; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CgWW2LRq8w1VX8ERyLktWr5pM0F9goX8TPhF9OYRPqQ=; b=OkG7bxgxItpsyVQ22FLny273EIMKsKJLTsehcQEBfNa0U20MTgMkMXN/ycTLbEZtoN9QRT oKdxWPqRiJNG8cvrVhU6Lk0FEhOS7HZE2RznnyDhMYYOdcIe0EXoZ7IZZX2EPaVx2/tbHD oMmIOa/3AbwXeacp6UDfgeVvxG3iEIbgM3iF4p0WLU2hDk5CzMevA7zxf9lB7//nRzw4yO kmk5vxvMMKr8D3+H51Mg7GhPnME0Kl5OJcdRocM8aP0xSNQgWTfOXnQdyfqdiWegXk6vR2 H+phFjAHfijwqz3PUQshYauxEDCnlrUPH0j84UfP4A7TFr3DGT8kPhiZC+sbPA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779816249; a=rsa-sha256; cv=none; b=ikJIlo9dW2WpFIMOXN+tXz+V7wuNGGT/TOzJSjtT9UCNyO8jQKHLs7k1LWbz8yOd/najg3 MdJZ90/fJj4s4W8U7A2Q8qCOKPu9G/s+Z7MxaYmDMMewhS6B9ygdw9f0vmCjDH1IwTE9bg CUvaAt3RNKX0B0HmPs+YH5oOu9AYNaTmK0WSMA2/TAe4rTcBNw5pCsYThiCVPhOuIJSh3r zxQbN0A6LhrvN6ueEOlBdu6GOqMnnCUtfYvPtmNkaYzu5ShN9MQ1WOicRo1qCQMS7C/zhB wv32UeLHVxIonXEtIApXzOridGCCwnYPyzWagV3T0sZx1plZFjesxSlXyAbASQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779816249; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CgWW2LRq8w1VX8ERyLktWr5pM0F9goX8TPhF9OYRPqQ=; b=Jds78IwUuFhOD1EEQ0PSx5ZTviSBMqOfeG+wdFuSuXvX9uJZ7y8Vxi3Etwl0YdLvxzduTF PXg/WEBiqz4JrDv1Vug8Sj8ZSL1eCnLseNrRdcntlxWWcmTePDkTIw+CkO+V12J9W53Kej j39k6DD5dwafVgqwLN2lrmyBjnlD+mE8PRttpjKwtmX3mNBDjQFpjHyFDbUtZBnyS7Qq+w a8ed5Cqx5obGLUzFKj+2E8L6NHV79qgc7azyrtQ77yAHN1mZqeVyZ7JteYOsmf6RZbRA2i iRCnhyEYnSkdpkqvSmb3Q/zXRj5b2eN1OONYIO1s/lh7mKYi8jIFgEvK+KUJKA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQ03Y1gD6z66d for ; Tue, 26 May 2026 17:24:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3b1c9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 26 May 2026 17:24:09 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 2750d957870a - main - tcp: fix TCP_ACCOUNTING build List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2750d957870aa45661e94cb6f7c5f1bfea52bf41 Auto-Submitted: auto-generated Date: Tue, 26 May 2026 17:24:09 +0000 Message-Id: <6a15d739.3b1c9.7a9206d2@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=2750d957870aa45661e94cb6f7c5f1bfea52bf41 commit 2750d957870aa45661e94cb6f7c5f1bfea52bf41 Author: Gleb Smirnoff AuthorDate: 2026-05-26 17:23:32 +0000 Commit: Gleb Smirnoff CommitDate: 2026-05-26 17:23:32 +0000 tcp: fix TCP_ACCOUNTING build The uninitialized timeval was discovered by the new clang. --- sys/netinet/tcp_log_buf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/netinet/tcp_log_buf.c b/sys/netinet/tcp_log_buf.c index 3e5955e5db4e..35fa0b56a9c7 100644 --- a/sys/netinet/tcp_log_buf.c +++ b/sys/netinet/tcp_log_buf.c @@ -1449,6 +1449,7 @@ tcp_log_tcpcbfini(struct tcpcb *tp) int i; memset(&log, 0, sizeof(log)); + microuptime(&tv); if (tp->t_flags2 & TF2_TCP_ACCOUNTING) { for (i = 0; i < TCP_NUM_CNT_COUNTERS; i++) { log.u_raw.u64_flex[i] = tp->tcp_cnt_counters[i]; From nobody Tue May 26 17:27:56 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQ0821JHxz6gBPS for ; Tue, 26 May 2026 17:28: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQ0820dLSz3GfY for ; Tue, 26 May 2026 17:28:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779816482; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vw/G58lCugXOBZkRoAJlPjswH+BWuYqRSf5yn3SipeE=; b=gFYkqEnMtyNOubdukJwEPvKatjkBz2semDoPl4T7+U5SNinAQkGAp4ETzDfIVSjPlHyaei mNANH05/rifx0bqED+3PLAwfhI0D2rqXTcf+p3HgVVAaDHbTc0UDf48GqgJ2icjjRusOSh 3oA1TVWDTiYEgRPyxZFacMsMfZDUTreYZ/UUmKz1mYPBcP88AKeZmIm0OHfO3KHmnyxTI8 u5AX9MGwb1VC5/UELrfYREhzI6sga0pcrTGtJLwZfQoptPeharzZncKav9f3YrHuNZm2GO 2mPaTvCL6uqMuEZNpdbZaKMaYbucHMk3UeBrt1FZLHGcDLmbe2IiRSzxvINCQg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779816482; a=rsa-sha256; cv=none; b=cFbBrcUgvTKhQlAWeYhpVPl188jfqIFxAo0VhTsiK/ZqKjQqvJ17/rr8iSzT5hPz6xG1jt RE86X86LB7YRql/71KpEytsj2vvTGR1ZYUjGeXC745CWHYRABAaP4JaKSkUZz6sH3VVw2S q+qa9nPtQGIFgj5d9LllSXq8qT0EW8IuZISeeBkiI5ozj7Eia5MpEeqmohfRW5+d27vrL2 P5lnFHAS9VA+JkXo9ADu61qeJU/bdyXrWjLqxdDeSMtemG6793DetLunR0VFef6uwa+Ped 132Djttx3IcloTdcFs+Ji6NRcBqVLU1DO4+LjO9LIfJXylwWAXGiK+7Oded2TQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779816482; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vw/G58lCugXOBZkRoAJlPjswH+BWuYqRSf5yn3SipeE=; b=bn/x9eFi1/1zvbfpjkcKwTSCbn3RNTzmLE1ARYKOfk6rD3byDtnOhBiW7HYSn/ovkXRXvm mNOZbxtwW66s6CcwnmP39G3Hx+ZnUUoAy2NDPvBEnTk/gl3Yz3Z+eJ+pCTj0Hvhc0NdAtI OCA0z7540t2cK4uz3yensZD3mIUihsKKG3PmaA3TEBH2KiSdRTKp4EzEFNxR80nmSADhRB S3YiOHI/TDuvPjcp0OXziQPbmN23yiWhmd54GDDc9YgqNKvjwptf3+Oxn8LGEzZ34JiAZp 2kxWCXgm9K/G/crzLLAsKRpVa+Zkbqtdk3s4Jg23Jqqq2YJVPpAJE6Qf2j72iA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQ0816L5kz6RF for ; Tue, 26 May 2026 17:28:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3ba8b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 26 May 2026 17:27:56 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 00b96a777845 - main - amd64: Drop segment descriptor details from trap messsages List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 00b96a777845d9b558b2303cbef03ba5197b593a Auto-Submitted: auto-generated Date: Tue, 26 May 2026 17:27:56 +0000 Message-Id: <6a15d81c.3ba8b.19c785f8@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=00b96a777845d9b558b2303cbef03ba5197b593a commit 00b96a777845d9b558b2303cbef03ba5197b593a Author: John Baldwin AuthorDate: 2026-05-26 17:27:40 +0000 Commit: John Baldwin CommitDate: 2026-05-26 17:27:40 +0000 amd64: Drop segment descriptor details from trap messsages Segment descriptor contents are fixed on amd64 and not very interesting compared to the other values that are displayed. While here, include both the thread and process details of the current thread and drop redundant output of the trap number. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D56989 --- sys/amd64/amd64/trap.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c index fb18b7d06f9e..df9cc44bcbb2 100644 --- a/sys/amd64/amd64/trap.c +++ b/sys/amd64/amd64/trap.c @@ -944,13 +944,9 @@ trap_diag(struct trapframe *frame, vm_offset_t eva, const char *type_str) { int code; u_int type; - struct soft_segment_descriptor softseg; - struct user_segment_descriptor *gdt; code = frame->tf_err; type = frame->tf_trapno; - gdt = *PCPU_PTR(gdt); - sdtossd(&gdt[IDXSEL(frame->tf_cs)], &softseg); printf("\n%s trap %d: %s while in %s mode\n", type_str, type, type < nitems(trap_msg) ? trap_msg[type] : UNKNOWN, @@ -975,11 +971,6 @@ trap_diag(struct trapframe *frame, vm_offset_t eva, const char *type_str) frame->tf_rsp); printf("frame pointer = %#hx:%#lx\n", frame->tf_ss, frame->tf_rbp); - printf("code segment = base 0x%lx, limit 0x%lx, type 0x%x\n", - softseg.ssd_base, softseg.ssd_limit, softseg.ssd_type); - printf(" = DPL %d, pres %d, long %d, def32 %d, gran %d\n", - softseg.ssd_dpl, softseg.ssd_p, softseg.ssd_long, softseg.ssd_def32, - softseg.ssd_gran); printf("processor eflags = "); if (frame->tf_rflags & PSL_T) printf("trace trap, "); @@ -990,8 +981,9 @@ trap_diag(struct trapframe *frame, vm_offset_t eva, const char *type_str) if (frame->tf_rflags & PSL_RF) printf("resume, "); printf("IOPL = %ld\n", (frame->tf_rflags & PSL_IOPL) >> 12); - printf("current process = %d (%s)\n", - curproc->p_pid, curthread->td_name); + printf("current thread = %d/%d (%s/%s)\n", + curproc->p_pid, curthread->td_tid, curproc->p_comm, + curthread->td_name); printf("rdi: %016lx rsi: %016lx rdx: %016lx\n", frame->tf_rdi, frame->tf_rsi, frame->tf_rdx); @@ -1003,8 +995,6 @@ trap_diag(struct trapframe *frame, vm_offset_t eva, const char *type_str) frame->tf_r11, frame->tf_r12); printf("r13: %016lx r14: %016lx r15: %016lx\n", frame->tf_r13, frame->tf_r14, frame->tf_r15); - - printf("trap number = %d\n", type); } static void From nobody Tue May 26 18:27:44 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQ1T218bWz6gG24 for ; Tue, 26 May 2026 18: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQ1T168y1z3RCy for ; Tue, 26 May 2026 18:27:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779820069; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gzjiswqOfTbDqSfVsC2yoEVOYBlxw0XKsBJrUfyBsn0=; b=m7lvEGPrG5gtAnobij3rYUYPYFF3kgtgTNxV3Jb64m2vy7sxxqsjcyGyUc/Tu15x8SpxKD FBJS5wFqyCP5b3H9kTNrWXPgbNIDnWaCZncVPoa2zHA6VMEx/lfK/AyjuFHTDRG6JTz0k6 rENxEipdvzBlfF/JIlkaia0uTq4P+uNv5XCBOp4gCUbYeOcHPFiN2iGlAGhxgaAHQ3Gs3d b/z+jq2gYUIaNHi415tow2hpZklxwQAQoic68coFypZiE16bHjFb9vVFcIddEgwfwhYHl3 BhAvbSGkUrRdvM6zNQtAPrrhQ28zFaVFW6enZH5ByCLMlnhfEgsCo+IvlVVXyw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779820069; a=rsa-sha256; cv=none; b=XIOa8CAf6+jRHHU/ujPTBJ/vHOJiTfy75x7ClgaFbgsOilE/KcsSwtS8p5rX8ps1QKvm6N ckxVzPfTAbDdrH1KC7pIpWuwLlSCEu2LHpNZT5675ZXdruHtDGGbl3RAQz/+YJb1oxGqlh AV9W8BI/dPZA5oAz9ccO33lj28ZupPd+dJaS4Oj0ek4ggoCY7EoIvkxYly8491qiAzVqBz iiQFGi5x7ZSWAvXuAvGJK6eN7qqbluJEDkP47UmNXv0BkhQPKC+5EDaCjMubvogNi6zjuw FfY74OQNUMAFaaeV3IsDE+RigjG/ARtPx6Fhbk2f6DIAjXcadUjWzPOB/61raA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779820069; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gzjiswqOfTbDqSfVsC2yoEVOYBlxw0XKsBJrUfyBsn0=; b=OkSvK4avv6sVH6TazVVM4Ft9FwpnM95Dphp+6WwASjdD2MgVPyzPaNk6PsmXmYAAThLy9w CKmV7yxmeiO1+cZ7uoo/VOXG24YxM0Fpm0ISfeP5PnlOJRavolH0OfBsJyLhz4PV0HRulj LyFjyUES9zpVT/0s6ESxZ7mJF+gIX+Y5W9Tk8IkC/A2WPksrvlxBhkluMz7H9oBy/daqp0 TcvsfH9jVw0zgcAUDl9eInybV6HX/sq62kWDmQxdUDoGJXaGVOIbJOPWs0baWcJdYNG7lP jumttka1xPcy1a4Otjn1Y6SwkWqEauvbwcDtFS7KmZsXKX1kclkfKP/ZbRnemQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQ1T15hZhz87n for ; Tue, 26 May 2026 18:27:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 41304 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 26 May 2026 18:27:44 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: c564074c9aaa - main - divert: Avoid using atomic_(load|store)_(acq|rel)_16 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c564074c9aaa8a3f9273de3cb802edcb3e2e2a40 Auto-Submitted: auto-generated Date: Tue, 26 May 2026 18:27:44 +0000 Message-Id: <6a15e620.41304.be8363a@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c564074c9aaa8a3f9273de3cb802edcb3e2e2a40 commit c564074c9aaa8a3f9273de3cb802edcb3e2e2a40 Author: Mark Johnston AuthorDate: 2026-05-26 18:21:27 +0000 Commit: Mark Johnston CommitDate: 2026-05-26 18:26:43 +0000 divert: Avoid using atomic_(load|store)_(acq|rel)_16 It's not implemented on some arches. Use a plain int to count the number of sockets in a divert lbgroup. Reported by: Jenkins Fixes: 895a0ae67fe2 ("divert: Define semantics for SO_REUSEPORT_LB on divert sockets") --- sys/netinet/ip_divert.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/sys/netinet/ip_divert.c b/sys/netinet/ip_divert.c index 839048908f9f..390fdd9368b6 100644 --- a/sys/netinet/ip_divert.c +++ b/sys/netinet/ip_divert.c @@ -50,12 +50,14 @@ #include #include #include -#include + +#include #include #include #include #include +#include #include #include @@ -152,7 +154,7 @@ struct divcblbgroup { CK_SLIST_ENTRY(divcblbgroup) dl_next; struct epoch_context dl_epochctx; uint16_t dl_port; - uint16_t dl_count; + int dl_count; #define DIVCBLBGROUP_SIZE 32 struct divcb *dl_dcb[DIVCBLBGROUP_SIZE]; }; @@ -297,7 +299,7 @@ divert_packet(struct mbuf *m, uint64_t id, bool incoming) CK_SLIST_FOREACH(dlb, &V_divlbhash[DIVHASH(nport)], dl_next) { uint16_t count; - count = atomic_load_acq_16(&dlb->dl_count); + count = atomic_load_acq_int(&dlb->dl_count); if (dlb->dl_port == nport && count > 0) { uint32_t hash; @@ -666,7 +668,7 @@ div_lbgroup_detach(struct divcb *dcb) count = dlb->dl_count; if (i != count - 1) dlb->dl_dcb[i] = dlb->dl_dcb[count - 1]; - atomic_store_rel_16(&dlb->dl_count, count - 1); + atomic_store_rel_int(&dlb->dl_count, count - 1); if (count == 1) { CK_SLIST_REMOVE(&V_divlbhash[DCBHASH(dcb)], dlb, divcblbgroup, dl_next); @@ -743,7 +745,7 @@ div_bind(struct socket *so, struct sockaddr *nam, struct thread *td) ("div_bind: lbgroup %p has count 0", tmp)); tmp->dl_dcb[tmp->dl_count] = dcb; - atomic_store_rel_16(&tmp->dl_count, tmp->dl_count + 1); + atomic_store_rel_int(&tmp->dl_count, tmp->dl_count + 1); free(dlb, M_PCB); } else { error = ENOSPC; From nobody Tue May 26 19:19:06 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQ2cB6Tynz6gKDD for ; Tue, 26 May 2026 19:19: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQ2cB4Hz2z3Z8x for ; Tue, 26 May 2026 19:19:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779823146; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3I0oEor6UbiymaFBrvscJeACuyOex3PhUjKwmGqtxR8=; b=T6aVJKASwMjZcps1prgZcDjHJlDGFIK18kh2zqFjIKxU9Hl77vBSXZczk68EphG+9fyHTm wLW64LHc4eca2f80G5Tl06th4ZJCiJuBWGF0wHzTmdv8gafFukvd9izclyaZ2jxhnIFVQZ OxCZxRr2JP02CUFsHwpsoG6d8WGGaoIzocGUgVN5oINWqKqmWUkNFbVe7bDvMeO9EBRkM3 5fAtDEHoM+s1uhGozNZLAQ1hfP0WKVQH6Tk/ylgYMCikzTlHaGkOOOMKwtYMQqq5ZuOlkR v0yoCfLhjGmpxlAk/2QrVhSqc6LcfhKRcSE8w3z+u2XzCsiwzwLaRvoCHugNHg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779823146; a=rsa-sha256; cv=none; b=FCkaSY5bylCt7XvknwtxrIIas8Zb4gQ9fISIgopX+tIYKwKQotHUQV0Z982VukZIzTfFpB TgE4+OR7gPnGFK5oRt4QPSMPlpAvrLpZtlZL3FFbc/E1NaLq4g7vSMbo65RZNDsjiepr0g JXAKHVNyJhubSuMr5ziNTRkoEVb5n6H/uCR3tePyxIiAuO4CJSrLmGF1sontZXVY6dU937 m2P4+/ixyxWRVz77TUBVakZyJVzlvnEKDo3z0pHGCfzYtw5BtIWL/8w8MZ3q+k7y2Lg8Em hBtUuRAHJxC1Dr/MRGg9tmy39D4VXqSHLUI6+blz7rnKhft8v8EAbXX2YtMAng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779823146; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3I0oEor6UbiymaFBrvscJeACuyOex3PhUjKwmGqtxR8=; b=Q5uF2FmylyqeUBqFt2YOGYRmir/rGXp2Kz2qRJeCewYLqLda98cH2lBhGvyQVhSd6nB3A0 Y3tkQgTqXnUvi+rxcgAyAH4NKvu8CWaeDwEz/koBjWFmYIxSku0m9qWd1Fj5E9hXPgYr8G /fIsEIRu4WsG2yg+bpo5BwJF7O2gkhcBQyMLGjB18EiDoCF0m/+hwLCMgJOkHDBy5wUu/I j/7aVkHTxwenCV6Oz7eKGtq2n6qhnDSUM1Xumy6LeEq+o9w/p5r2e8NdfSoeYhF7nmLtwq LLmipbfmnRNh7ZQONhzPdBrAd31AGNHsRvk9rPI9+VMpFvq4C5FWHCwZ+xWu9w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQ2cB3cksz9Zw for ; Tue, 26 May 2026 19:19:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 45a03 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 26 May 2026 19:19:06 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: b9d16b7fd2fa - main - sigqueue: In capability mode, only allow signalling self List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b9d16b7fd2fa6bc4b3e8364804cbdc1b76ebe8a5 Auto-Submitted: auto-generated Date: Tue, 26 May 2026 19:19:06 +0000 Message-Id: <6a15f22a.45a03.9367978@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=b9d16b7fd2fa6bc4b3e8364804cbdc1b76ebe8a5 commit b9d16b7fd2fa6bc4b3e8364804cbdc1b76ebe8a5 Author: Ed Maste AuthorDate: 2026-05-26 13:24:36 +0000 Commit: Ed Maste CommitDate: 2026-05-26 19:18:56 +0000 sigqueue: In capability mode, only allow signalling self This is copied from the check in kern_kill. Reviewed by: markj, oshogbo Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57244 --- sys/kern/kern_sig.c | 10 ++++++++++ tests/sys/capsicum/capmode.cc | 12 +++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 9be7c82ee98b..e48997ed966a 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -2038,6 +2038,16 @@ kern_sigqueue(struct thread *td, pid_t pid, int signumf, union sigval *value) if (pid <= 0) return (EINVAL); + /* + * A process in capability mode can send signals only to itself. + */ + if (pid != td->td_proc->p_pid) { + if (CAP_TRACING(td)) + ktrcapfail(CAPFAIL_SIGNAL, &signum); + if (IN_CAPABILITY_MODE(td)) + return (ECAPMODE); + } + if ((signumf & __SIGQUEUE_TID) == 0) { if ((p = pfind_any(pid)) == NULL) return (ESRCH); diff --git a/tests/sys/capsicum/capmode.cc b/tests/sys/capsicum/capmode.cc index c6eef19b350f..fdc572f11b5b 100644 --- a/tests/sys/capsicum/capmode.cc +++ b/tests/sys/capsicum/capmode.cc @@ -703,8 +703,8 @@ FORK_TEST(Capmode, NewThread) { close(thread_pipe[1]); } -static volatile sig_atomic_t had_signal = 0; -static void handle_signal(int) { had_signal = 1; } +static volatile sig_atomic_t signal_cnt = 0; +static void handle_signal(int) { signal_cnt++; } FORK_TEST(Capmode, SelfKill) { pid_t me = getpid(); @@ -722,7 +722,13 @@ FORK_TEST(Capmode, SelfKill) { // Can only kill(2) to own pid. EXPECT_CAPMODE(kill(child, SIGUSR1)); EXPECT_OK(kill(me, SIGUSR1)); - EXPECT_EQ(1, had_signal); + EXPECT_EQ(1, signal_cnt); + + union sigval sv; + sv.sival_int = 0x1234; + EXPECT_CAPMODE(sigqueue(child, SIGUSR1, sv)); + EXPECT_OK(sigqueue(me, SIGUSR1, sv)); + EXPECT_EQ(2, signal_cnt); signal(SIGUSR1, original); } From nobody Tue May 26 19:28:04 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQ2pd4SNdz6gKsS for ; Tue, 26 May 2026 19:28: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQ2pd3r8Fz3bRb for ; Tue, 26 May 2026 19:28:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779823689; 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=bFdeiqU9Tnt45F9jBtvjvmb28axYKHPqj5ZishGbHAA=; b=q7cBHyX/C0m5azMLZCdvRF/otoRXYgXZbIG9ZSVDc5FBLq3JIJ16w/jkSSpUreJwTIq583 i42O4YHgXpxHVHO7H57V5N68cJ+Hm2kl5JXbhWoJyii2PP/mQsDsm9E3ChmBNECHbx+U5+ 3U4B87B4F0lZiNqj1IJqadTO50ib3Lpjp9M8Gh4+gnLP+sxFZpquCqBxbuVxq50+P9BkAQ WFYYUgSUdWXAGAibEdCrxiMbgB2vKGoLqP03tTGwBmI/5y3k+vfCsdtDjFyl5T+vGemvsj 86VG23eMaZPNHnkEhiC3znXRPjsfZ240h0LggEq1Cddv3KFJJQHwwjQGjr062Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779823689; a=rsa-sha256; cv=none; b=r83YU2UkqBDm4hpHhn6AyU0ly4lxyoeAwzHLr6fgjEokY09y1DvA5BWGbm4GrXf9wY51ks FpEftBZQyGluwSsVNUltNdEgRtihohSs/iwCkvwUXLCo2xljymgIijFDcqo2mYIlDDRK0m SuYg7n8YcXCvEWuDNAwk3MgyifgJ40RmxOWCR4iblR2vgNeAgtDPXMquOdavibtCRzV6BP B5kB2LURN7V1k/FfnIt9Cj6k0V/jzy8VZ1jiQbblaL8jqR15K0Yn5fP0fP14of9h9KEMHi hCO9ipjRL/wpIMxUqlvADAsfyIEY0w6cOhTixs9o87Tas8YlbEfcZ1unS9pO3w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779823689; 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=bFdeiqU9Tnt45F9jBtvjvmb28axYKHPqj5ZishGbHAA=; b=eI6u4D3niwz7ojtH0kvNhA1NubRZX2iw2FCY0L77Rs2BP1Z5ApFKkcpRuADUzffUlU67OQ jiI/AS2z9/tfUnhXqypMEzZ9PF17fZ+0U9jw8FPkNYlRQPqKaY+RurRepeFat9KqKjpb4M Gnr9jspWGm4Y4pQ08q+90QnX0Te3A5ulQQdgVnIaWZJG3Ba7YDZHG9rwXQP2+VOqOgJ1dl g+e2R0ddqwdyM0Cve4N0oPzCQr3mR3AGKP8X6PUEhUj8UYUeaW0h8NR7R1nzSMgBSLOde6 PhXDw/VrKIp+lvUVDOGujk/BIAuSXSSc0mx5f4IQs4rz5skYxnySnEFkreFxSg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQ2pd39Xcz9bq for ; Tue, 26 May 2026 19:28:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 46db1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 26 May 2026 19:28:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: djm@openbsd.org From: Gleb Smirnoff Subject: git: 77fd9e0ceabc - main - upstream: fix hard-to-reach NULL deref during pubkey auth List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 77fd9e0ceabcfa99894b3e70f60013c157115ca0 Auto-Submitted: auto-generated Date: Tue, 26 May 2026 19:28:04 +0000 Message-Id: <6a15f444.46db1.3233e9a6@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=77fd9e0ceabcfa99894b3e70f60013c157115ca0 commit 77fd9e0ceabcfa99894b3e70f60013c157115ca0 Author: djm@openbsd.org AuthorDate: 2026-05-13 05:11:02 +0000 Commit: Gleb Smirnoff CommitDate: 2026-05-26 19:27:45 +0000 upstream: fix hard-to-reach NULL deref during pubkey auth To hit this, the user must be using a PEM style private key with no corresponding .pub key adjacent to it. OpenBSD-Commit-ID: b7150acc5322fa33f21491834d9471fbe3d30f20 (cherry picked from commit cf6c0b3b94cdc223f1b8be1ef2d93e993af5d976) Reviewed by: emaste --- crypto/openssh/sshconnect2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crypto/openssh/sshconnect2.c b/crypto/openssh/sshconnect2.c index 478a9a52fd38..5a48c73edbef 100644 --- a/crypto/openssh/sshconnect2.c +++ b/crypto/openssh/sshconnect2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect2.c,v 1.385 2026/04/02 07:48:13 djm Exp $ */ +/* $OpenBSD: sshconnect2.c,v 1.386 2026/05/13 05:11:02 djm Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * Copyright (c) 2008 Damien Miller. All rights reserved. @@ -1277,7 +1277,7 @@ identity_sign(struct identity *id, u_char **sigp, size_t *lenp, * PKCS#11 tokens may not support all signature algorithms, * so check what we get back. */ - if ((id->key->flags & SSHKEY_FLAG_EXT) != 0 && + if (id->key != NULL && (id->key->flags & SSHKEY_FLAG_EXT) != 0 && (r = sshkey_check_sigtype(*sigp, *lenp, alg)) != 0) { debug_fr(r, "sshkey_check_sigtype"); goto out; From nobody Tue May 26 20:41:22 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQ4R66Mvtz6gQJP for ; Tue, 26 May 2026 20:41: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQ4R634Bvz3qys for ; Tue, 26 May 2026 20:41:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779828082; 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=BI72o4TtcUuBywAg3LM1gbvCZ/2ppL3nDBB84SHRWts=; b=css+be1vUYJwdLo2R4DeF4bUKQsVg2Y93uyH+PXhOdhW28tWlJsc0vztT50Rlszl4e2rOk zCSr2bSP/FrqLx7k1YXvX1CX/Z6Mup4H3/lvEc2ovyl8brn0/c9/vnv04Jxh/obOoHDqjy j6HcX1Eo+hx3yJ5IPB17mqH5/eDBGOGR+Rl5Xr8L1AiGben1wp+vvZ/Z4BwDgh7SA3RoMY iVmejnOfhb7SRn+PGMXuTTYS38zWBDFeq5FJxcyl1o9WVHBr9r0XNjNtPC0o30+hiX6XYy 7E+hSo+60kH+pmTYO5E0DgQPpl6SQxEikFNe0WvhZY9Z2rsb+E7ViNcDVxWZXA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779828082; a=rsa-sha256; cv=none; b=EurZ4HDbbjgsGBI5djp6DUetb3Hg21IwdPbN96fAF6gYL5VV6XFdnoKi7eF2DI4fXMcTAr cg5F4mCBy0gUVJc4sUJrIG/0NG5HiFdtdDtec9XOQKKHNHA9yZmUXljx98vvGUHVF2bHl3 f3wp5qdyfjRGxyVBdLmp7H4X7Zv06iqiidbQ5y4TrpyPGBo+2sW+oj1EuA6FsWMSecnASi 9L/IRdxt9WHGzmy9d8627/UcezEco4M68Qj7gl/FP6a7pLBEHRmlDye0CBmcxvE7bjaHhT UN0TZsVilP+Gu4K2CcNNcePdQh0uphHuL4BIv1mYpRq43u3lrIga7FMRI5Yi1A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779828082; 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=BI72o4TtcUuBywAg3LM1gbvCZ/2ppL3nDBB84SHRWts=; b=PuAYida/Uz7RuSg2jyRibgoGEpeBCd51fTpNRPE0W7SRKf/Y+ie2JcWXZFxXwGsIimaXLl RRputdFzvWfX9Bhu6vsDbYZr1Sow9e88IH2sZm/79aqsk/bHNyPOdj7Kyl5+GvbRPELWF8 ltB0bcjv7YzfNmY0lkdXEXrSE0RVypO5HaAafU5u7WkDyfWjYh3Sv7E0J0skwMWCkE4p0V ck6YOCpKVzeWGfSJcKU4gO0rhuPV6uXdp+7KuUbglQXD260j58+voO1zNKw3DZjLQYk85X n0FHCy1J7cuJ7q7+DLvPLCQClBF5dJ+zlNFcyktreHR2ops9V/pNwkFvif1Z9Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQ4R622kpzCjX for ; Tue, 26 May 2026 20:41:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1fa94 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 26 May 2026 20:41:22 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Pat Maddox From: Dave Cottlehuber Subject: git: be03b0fb2241 - stable/15 - syslogd: fix memory leak in casper_ttymsg() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dch X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: be03b0fb2241260ec94db431cf4f2954161f227e Auto-Submitted: auto-generated Date: Tue, 26 May 2026 20:41:22 +0000 Message-Id: <6a160572.1fa94.31128035@gitrepo.freebsd.org> The branch stable/15 has been updated by dch: URL: https://cgit.FreeBSD.org/src/commit/?id=be03b0fb2241260ec94db431cf4f2954161f227e commit be03b0fb2241260ec94db431cf4f2954161f227e Author: Pat Maddox AuthorDate: 2026-05-22 21:45:30 +0000 Commit: Dave Cottlehuber CommitDate: 2026-05-26 20:37:18 +0000 syslogd: fix memory leak in casper_ttymsg() nvlist_take_string_array(9) takes ownership of the array and its strings. casper_ttymsg() freed neither, leaking memory on every F_CONSOLE and F_TTY message. On long-running systems with high error-rate syslog traffic routed to /dev/console, syslogd.casper grew to hundreds of MB. Use nvlist_get_string_array(9) to borrow the array instead. Update casper_wallmsg() similarly. Approved by: src (des) Closes: https://github.com/freebsd/freebsd-src/pull/2222 Fixes: 61a29eca550b ("syslogd: Log messages using libcasper") MFC after: 3 days MFC to: stable/15 PR: 295488 Reported by: Pat Maddox Reviewed by: markj Tested by: dch (cherry picked from commit c783d7181d6a71cb2453f06e40c08c892510c2f2) --- usr.sbin/syslogd/syslogd_cap_log.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/usr.sbin/syslogd/syslogd_cap_log.c b/usr.sbin/syslogd/syslogd_cap_log.c index 0156cc6f6b6c..5e2034abd9eb 100644 --- a/usr.sbin/syslogd/syslogd_cap_log.c +++ b/usr.sbin/syslogd/syslogd_cap_log.c @@ -128,19 +128,19 @@ cap_ttymsg(cap_channel_t *chan, struct iovec *iov, int iovcnt, int casper_ttymsg(nvlist_t *nvlin, nvlist_t *nvlout) { - char **nvlstrs; + const char * const *nvlstrs; struct iovec *iov; size_t iovcnt; int tmout; const char *line; - nvlstrs = nvlist_take_string_array(nvlin, "iov_strs", &iovcnt); + nvlstrs = nvlist_get_string_array(nvlin, "iov_strs", &iovcnt); assert(iovcnt <= TTYMSG_IOV_MAX); iov = calloc(iovcnt, sizeof(*iov)); if (iov == NULL) err(EXIT_FAILURE, "calloc"); for (size_t i = 0; i < iovcnt; ++i) { - iov[i].iov_base = nvlstrs[i]; + iov[i].iov_base = __DECONST(char *, nvlstrs[i]); iov[i].iov_len = strlen(nvlstrs[i]); } line = nvlist_get_string(nvlin, "line"); @@ -187,25 +187,23 @@ int casper_wallmsg(nvlist_t *nvlin) { const struct filed *f; - char **nvlstrs; + const char * const *nvlstrs; struct iovec *iov; size_t sz; f = nvlist_get_binary(nvlin, "filed", &sz); assert(sz == sizeof(*f)); - nvlstrs = nvlist_take_string_array(nvlin, "iov_strs", &sz); + nvlstrs = nvlist_get_string_array(nvlin, "iov_strs", &sz); assert(sz <= TTYMSG_IOV_MAX); iov = calloc(sz, sizeof(*iov)); if (iov == NULL) err(EXIT_FAILURE, "calloc"); for (size_t i = 0; i < sz; ++i) { - iov[i].iov_base = nvlstrs[i]; + iov[i].iov_base = __DECONST(char *, nvlstrs[i]); iov[i].iov_len = strlen(nvlstrs[i]); } wallmsg(f, iov, sz); - for (size_t i = 0; i < sz; ++i) - free(iov[i].iov_base); free(iov); return (0); } From nobody Tue May 26 21:23:00 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQ5M86TX9z6gSky for ; Tue, 26 May 2026 21:23: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQ5M85trFz3wb5 for ; Tue, 26 May 2026 21: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=1779830580; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7l/aljITUvB3hT9rSc6/73G3Ac3NHm54c2rI6dsd5lE=; b=W+kT4MXhywY3J5gG6n8OMWEtjWpjXsAtlXgsrS4XAzNss98kZcZeeTG5lOMhKjjG0YFFBo SXDsTooChJjtPP/4A7I9nmd20GFvjyp0awDBqqydxO+x3wnKPXFlCGfmoxBi65raf6mwEA LQf/aqh5VSw9YAJ3WW36tfbnoiyi8wS2whwMXD6me/Ba4d+4/U8ndMkDOeUMAC7f30s88t v5QoXSf03uoYCxIZH721OAB75/io0kLwOJhcbutVr+rlqEqSM0coX7D2vLvy9Q+MOj7hbd /Z8GwI7vwy1F+Z5M/jE3oyIzaU9V9hNWC0oPBs/gqc1Z0vKrYvTHOtOp0evoWw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779830580; a=rsa-sha256; cv=none; b=wqXbLvkg1DrpXJ/MedwbFvVP6jOd9F+tWVYukxbp/cArGNgSJN9uGgMULt4RLa/kfw/uOY QYpmp6C2WuisCvk+w9mUCla3G5cXXWL6ZIwYi3MLN1ibIczKugDI55vQbdWL79vrg25kMj x8xyXflYAkiNDO/tIgVmlkJm6843jHOQqxs0QOgyJffpInY8V0zsMGC+uk1oD0cvOWtnTI 05lEdryfYipk0mfSq/JyOUQ+lmtlR1luB0dKeMg8I8K1qqdR1WqqFmNnA3EXW0MgkzLAhS App96sMRjC93vxblOBj6n2vqSG28+cRCThoTsHdy+JNz5NuiPEYJ51CMvDD2lQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779830580; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7l/aljITUvB3hT9rSc6/73G3Ac3NHm54c2rI6dsd5lE=; b=vlbAqn8u6yw9Hkp+zg4Oq4AOXELqAChJ848eICuQdJOlHA5UsmJbrwtM61VHhVyiZ+CdOg f9zMyTPgSSEmlu/rZMYOgK4E8wXrpGqBPqqFs/ougB3lKKiRHBfQVJzmDf0vdVsytBN7f2 huU99vfTXM7weA0BLtY+OV0bq+8p9AMWeTyc+qthDu7N4nwsQCLG8hxIEdKl0BS+IbeYos dBVvckK+1aks1N6vs+ptBhWfVS4ORaO5dR6Wi0taQ5WrEJfwR9M8FenkK66luHkop+Dbwn 1O/bFrCC42KN9gu32JEohHRiBj4pTAjsIYcYcbtubuTbAGUTOj4dXaWm1NV3hw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQ5M85PYhzTk8 for ; Tue, 26 May 2026 21:23:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 24112 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 26 May 2026 21:23:00 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: 004b5935a6e6 - main - bsd.sys.mk: suppress some clang warnings for C++ for >= 19 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 004b5935a6e643033526cab623c6005b69ab11aa Auto-Submitted: auto-generated Date: Tue, 26 May 2026 21:23:00 +0000 Message-Id: <6a160f34.24112.675a05e0@gitrepo.freebsd.org> The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=004b5935a6e643033526cab623c6005b69ab11aa commit 004b5935a6e643033526cab623c6005b69ab11aa Author: Alex Richardson AuthorDate: 2026-05-26 19:37:06 +0000 Commit: Alex Richardson CommitDate: 2026-05-26 19:37:06 +0000 bsd.sys.mk: suppress some clang warnings for C++ for >= 19 I just tried building with system clang on one of my Linux systems which happens to be version 19, and these warning suppressions are needed for that version too: same errors as in the original commit. Reviewed by: imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56874 --- share/mk/bsd.sys.mk | 2 -- 1 file changed, 2 deletions(-) diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index 93e7c8572310..4ffac401eb4c 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -92,8 +92,6 @@ CWARNFLAGS.clang+= -Wno-error=unused-but-set-parameter .if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 190000 # Similar to gcc >= 8.1 -Wno-error=cast-function-type below CWARNFLAGS.clang+= -Wno-error=cast-function-type-mismatch -.endif -.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 210000 CXXWARNFLAGS.clang+= -Wno-c++20-extensions CXXWARNFLAGS.clang+= -Wno-c++23-lambda-attributes CXXWARNFLAGS.clang+= -Wno-nullability-completeness From nobody Tue May 26 21:23:01 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQ5MB1z50z6gSnM for ; Tue, 26 May 2026 21:23: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQ5M96gM8z3wxq for ; Tue, 26 May 2026 21:23:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779830581; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DHGU7LZBlbJyV8PKpB73vkdwvbs1P33ZasMBaNCZsDY=; b=pnD2MGPscAt1MnJKBm6/MdBGhZjwwTXIbqjHPEw73xjy/6ngG62BcbEpOsx0Ch9kvnSmii C6+SGnr/bXJxOfE/+ZoICeN7sz63hHTue87Mwge2488ZXR41JQguoTvU3eAArCzTiqmu9F 2+JtXSPx2BlkMdHDoGGBWuapG7shImiykmSOb4zs1DNd6NT2YqY5zw6yrg7oUMrawMwVmM kXZFEBoak11DH8UpZXZ2oMteFQ3dCBQuAlGCGAtp5RSjbTcV2VKsCiUhFCoel31bN0mIHW PukJq/NaWrAMQwsb0+bCr6l7saHcivAfAiWBy5W53MoeMa/pA+uHdiVjlOIOYg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779830581; a=rsa-sha256; cv=none; b=nqAjiWXbNFoHqhJ7r1G5EpFS6k2gIen82tZ9s/6VuVABmeppm0CPTat8WNJFqd1mn1Kt4a g4+17G55Re9NN+OA2304B0jYDt6zeZ3jb0MCIaG+jin5ZtV4bIAegMEIDAsUdSmL03n2Zf K1aCkkpCYwSbfPSHuUd+AJZqPMjUd6f6+/jG5uterqc8vdc7Gr/OZcLhZeChio7SszJ7ur W+DJ5oatIiwxW69zMi2maO6mHd14cVl2PhHemKzzqDLvDGDBlvu/pmufPDy/HDcwYsPzuf 6zLMkXYaeh08Lr6APUWf//kJ0kcWuC84cFgzGnb6z3Ah1S4nnecxO5j5k74UCw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779830581; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DHGU7LZBlbJyV8PKpB73vkdwvbs1P33ZasMBaNCZsDY=; b=vYjDapP3DvqQGtMUym/o8SDITzz5QRr37+6BHtCZzYF48OrOZEA49eHdk0kNr/F0Jd6Of8 Wl06AW9Hsp7HS6EoUmxow8Mg4v3N1XVw00qT/X2r2VuXrQH4dBCG20YPdOUmhoIfn3B4sE 0zkWZVKlGUC9ze+AOPHlRm+rGwOMWoDROLFTFHQJXLSZt488pfnfAzV90l+t6FKfjRAvZ/ gy+jlnPn4cxMvWOl8VArARp0C1oJTL8a6WR/tLQspBqVvIkbyZ+2BUSQRIXnppaiKB5HIG R1jAGy1/EMMAmR03gpvIaC4s6lH/Yeq8hGDu7WypfYcjdMhyzF9HWgkF9zuSJg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQ5M96GwtzTXj for ; Tue, 26 May 2026 21:23:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 227fd by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 26 May 2026 21:23:01 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: 675382f12b67 - main - p9fs: Refactor buffer allocations to avoid zeroing large payloads List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 675382f12b67e8b7b2f35bd1f8dfd96b8d8e4aae Auto-Submitted: auto-generated Date: Tue, 26 May 2026 21:23:01 +0000 Message-Id: <6a160f35.227fd.152a77c4@gitrepo.freebsd.org> The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=675382f12b67e8b7b2f35bd1f8dfd96b8d8e4aae commit 675382f12b67e8b7b2f35bd1f8dfd96b8d8e4aae Author: Alex Richardson AuthorDate: 2026-05-26 19:37:39 +0000 Commit: Alex Richardson CommitDate: 2026-05-26 19:37:39 +0000 p9fs: Refactor buffer allocations to avoid zeroing large payloads Allocating large buffers with M_ZERO adds unnecessary overhead since the data is immediately overwritten. This change embeds the tc and rc p9_buffer structs directly into p9_req_t so we only zero the small metadata headers. The actual data payload is allocated with M_NOWAIT. Embedding the metadata headers by value also allows the p9fs_buf_zone UMA items to be sized exactly to P9FS_MTU, ensuring they are nicely aligned. This also adds proper error handling to p9_get_request() to handle UMA allocation failures. Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56495 --- sys/dev/virtio/p9fs/virtio_p9fs.c | 10 ++--- sys/fs/p9fs/p9_client.c | 95 +++++++++++++++++---------------------- sys/fs/p9fs/p9_client.h | 4 +- 3 files changed, 49 insertions(+), 60 deletions(-) diff --git a/sys/dev/virtio/p9fs/virtio_p9fs.c b/sys/dev/virtio/p9fs/virtio_p9fs.c index 19a32fea458e..c347458b4f8e 100644 --- a/sys/dev/virtio/p9fs/virtio_p9fs.c +++ b/sys/dev/virtio/p9fs/virtio_p9fs.c @@ -112,7 +112,7 @@ SYSCTL_UINT(_vfs_9p, OID_AUTO, ackmaxidle, CTLFLAG_RW, &vt9p_ackmaxidle, 0, static int vt9p_req_wait(struct vt9p_softc *chan, struct p9_req_t *req) { - KASSERT(req->tc->tag != req->rc->tag, + KASSERT(req->tc.tag != req->rc.tag, ("%s: request %p already completed", __func__, req)); if (msleep(req, VT9P_MTX(chan), 0, "chan lock", vt9p_ackmaxidle * hz)) { @@ -124,7 +124,7 @@ vt9p_req_wait(struct vt9p_softc *chan, struct p9_req_t *req) "for an ack from host\n", vt9p_ackmaxidle); return (EIO); } - KASSERT(req->tc->tag == req->rc->tag, + KASSERT(req->tc.tag == req->rc.tag, ("%s spurious event on request %p", __func__, req)); return (0); } @@ -157,7 +157,7 @@ vt9p_request(void *handle, struct p9_req_t *req) req_retry: sglist_reset(sg); /* Handle out VirtIO ring buffers */ - error = sglist_append(sg, req->tc->sdata, req->tc->size); + error = sglist_append(sg, req->tc.sdata, req->tc.size); if (error != 0) { P9_DEBUG(ERROR, "%s: sglist append failed\n", __func__); VT9P_UNLOCK(chan); @@ -165,7 +165,7 @@ req_retry: } readable = sg->sg_nseg; - error = sglist_append(sg, req->rc->sdata, req->rc->capacity); + error = sglist_append(sg, req->rc.sdata, req->rc.capacity); if (error != 0) { P9_DEBUG(ERROR, "%s: sglist append failed\n", __func__); VT9P_UNLOCK(chan); @@ -226,7 +226,7 @@ vt9p_intr_complete(void *xsc) VT9P_LOCK(chan); again: while ((curreq = virtqueue_dequeue(vq, NULL)) != NULL) { - curreq->rc->tag = curreq->tc->tag; + curreq->rc.tag = curreq->tc.tag; wakeup_one(curreq); } if (virtqueue_enable_intr(vq) != 0) { diff --git a/sys/fs/p9fs/p9_client.c b/sys/fs/p9fs/p9_client.c index 547de98c4c03..27a6c1eb366d 100644 --- a/sys/fs/p9fs/p9_client.c +++ b/sys/fs/p9fs/p9_client.c @@ -104,43 +104,33 @@ p9_parse_opts(struct mount *mp, struct p9_client *clnt) } /* Allocate buffer for sending request and getting responses */ -static struct p9_buffer * -p9_buffer_alloc(int alloc_msize) +static void +p9_buffer_alloc(struct p9_buffer *fc, int alloc_msize) { - struct p9_buffer *fc; - - fc = uma_zalloc(p9fs_buf_zone, M_WAITOK | M_ZERO); + bzero(fc, sizeof(*fc)); fc->capacity = alloc_msize; - fc->offset = 0; - fc->size = 0; - fc->sdata = (char *)fc + sizeof(struct p9_buffer); - - return (fc); + fc->sdata = uma_zalloc(p9fs_buf_zone, M_WAITOK); } /* Free memory used by request and response buffers */ static void -p9_buffer_free(struct p9_buffer **buf) +p9_buffer_free(struct p9_buffer *buf) { - - /* Free the sdata buffers first, then the whole structure*/ - uma_zfree(p9fs_buf_zone, *buf); - *buf = NULL; + uma_zfree(p9fs_buf_zone, buf->sdata); + buf->sdata = NULL; } /* Free the request */ static void p9_free_req(struct p9_client *clnt, struct p9_req_t *req) { + if (req == NULL) + return; - if (req->tc != NULL) { - if (req->tc->tag != P9_NOTAG) - p9_tag_destroy(clnt, req->tc->tag); - p9_buffer_free(&req->tc); - } - - if (req->rc != NULL) - p9_buffer_free(&req->rc); + if (req->tc.tag != P9_NOTAG) + p9_tag_destroy(clnt, req->tc.tag); + p9_buffer_free(&req->tc); + p9_buffer_free(&req->rc); uma_zfree(p9fs_req_zone, req); } @@ -156,17 +146,17 @@ p9_get_request(struct p9_client *clnt, int *error) alloc_msize = P9FS_MTU; req = uma_zalloc(p9fs_req_zone, M_WAITOK | M_ZERO); - req->tc = p9_buffer_alloc(alloc_msize); - req->rc = p9_buffer_alloc(alloc_msize); + p9_buffer_alloc(&req->tc, alloc_msize); + p9_buffer_alloc(&req->rc, alloc_msize); tag = p9_tag_create(clnt); if (tag == P9_NOTAG) { *error = EAGAIN; - req->tc->tag = P9_NOTAG; + req->tc.tag = P9_NOTAG; p9_free_req(clnt, req); return (NULL); } - req->tc->tag = tag; + req->tc.tag = tag; return (req); } @@ -208,7 +198,7 @@ p9_client_check_return(struct p9_client *c, struct p9_req_t *req) char *ename; /* Check what we have in the receive bufer .*/ - error = p9_parse_receive(req->rc, c); + error = p9_parse_receive(&req->rc, c); if (error != 0) goto out; @@ -216,17 +206,17 @@ p9_client_check_return(struct p9_client *c, struct p9_req_t *req) * No error, We are done with the preprocessing. Return to the caller * and process the actual data. */ - if (req->rc->id != P9PROTO_RERROR && req->rc->id != P9PROTO_RLERROR) + if (req->rc.id != P9PROTO_RERROR && req->rc.id != P9PROTO_RLERROR) return (0); /* * Interpreting the error is done in different ways for Linux and * Unix version. Make sure you interpret it right. */ - if (req->rc->id == P9PROTO_RERROR) { - error = p9_buf_readf(req->rc, c->proto_version, "s?d", &ename, &ecode); - } else if (req->rc->id == P9PROTO_RLERROR) { - error = p9_buf_readf(req->rc, c->proto_version, "d", &ecode); + if (req->rc.id == P9PROTO_RERROR) { + error = p9_buf_readf(&req->rc, c->proto_version, "s?d", &ename, &ecode); + } else if (req->rc.id == P9PROTO_RLERROR) { + error = p9_buf_readf(&req->rc, c->proto_version, "d", &ecode); } else { goto out; } @@ -241,15 +231,15 @@ p9_client_check_return(struct p9_client *c, struct p9_req_t *req) * not present can hit this and return. Hence it is made a debug print. */ if (error != 0) { - if (req->rc->id == P9PROTO_RERROR) { + if (req->rc.id == P9PROTO_RERROR) { P9_DEBUG(PROTO, "RERROR error %d ename %s\n", error, ename); - } else if (req->rc->id == P9PROTO_RLERROR) { + } else if (req->rc.id == P9PROTO_RLERROR) { P9_DEBUG(PROTO, "RLERROR error %d\n", error); } } - if (req->rc->id == P9PROTO_RERROR) { + if (req->rc.id == P9PROTO_RERROR) { free(ename, M_TEMP); } return (error); @@ -308,21 +298,21 @@ p9_client_prepare_req(struct p9_client *c, int8_t type, } /* Marshall the data according to QEMU standards */ - *error = p9_buf_prepare(req->tc, type); + *error = p9_buf_prepare(&req->tc, type); if (*error != 0) { P9_DEBUG(ERROR, "%s: p9_buf_prepare failed: %d\n", __func__, *error); goto out; } - *error = p9_buf_vwritef(req->tc, c->proto_version, fmt, ap); + *error = p9_buf_vwritef(&req->tc, c->proto_version, fmt, ap); if (*error != 0) { P9_DEBUG(ERROR, "%s: p9_buf_vwrite failed: %d\n", __func__, *error); goto out; } - *error = p9_buf_finalize(c, req->tc); + *error = p9_buf_finalize(c, &req->tc); if (*error != 0) { P9_DEBUG(ERROR, "%s: p9_buf_finalize failed: %d \n", __func__, *error); @@ -474,7 +464,7 @@ p9_client_version(struct p9_client *c) if (error != 0) return (error); - error = p9_buf_readf(req->rc, c->proto_version, "ds", &msize, &version); + error = p9_buf_readf(&req->rc, c->proto_version, "ds", &msize, &version); if (error != 0) { P9_DEBUG(ERROR, "%s: version error: %d\n", __func__, error); goto out; @@ -519,8 +509,7 @@ p9_init_zones(void) /* Create the buffer zone */ p9fs_buf_zone = uma_zcreate("p9fs buf zone", - sizeof(struct p9_buffer) + P9FS_MTU, NULL, NULL, - NULL, NULL, UMA_ALIGN_PTR, 0); + P9FS_MTU, NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); } void @@ -623,7 +612,7 @@ p9_client_attach(struct p9_client *clnt, struct p9_fid *afid, if (*error != 0) goto out; - *error = p9_buf_readf(req->rc, clnt->proto_version, "Q", &qid); + *error = p9_buf_readf(&req->rc, clnt->proto_version, "Q", &qid); if (*error != 0) { P9_DEBUG(ERROR, "%s: p9_buf_readf failed: %d \n", __func__, *error); @@ -777,7 +766,7 @@ p9_client_walk(struct p9_fid *oldfid, uint16_t nwnames, char **wnames, return (NULL); } - *error = p9_buf_readf(req->rc, clnt->proto_version, "R", &nwqids, + *error = p9_buf_readf(&req->rc, clnt->proto_version, "R", &nwqids, &wqids); if (*error != 0) goto out; @@ -842,7 +831,7 @@ p9_client_open(struct p9_fid *fid, int mode) if (error != 0) return (error); - error = p9_buf_readf(req->rc, clnt->proto_version, "Qd", &fid->qid, + error = p9_buf_readf(&req->rc, clnt->proto_version, "Qd", &fid->qid, &mtu); if (error != 0) goto out; @@ -892,7 +881,7 @@ p9_client_readdir(struct p9_fid *fid, char *data, uint64_t offset, return (-error); } - error = p9_buf_readf(req->rc, clnt->proto_version, "D", &count, + error = p9_buf_readf(&req->rc, clnt->proto_version, "D", &count, &dataptr); if (error != 0) { P9_DEBUG(ERROR, "%s: p0_buf_readf failed: %d\n", @@ -945,7 +934,7 @@ p9_client_read(struct p9_fid *fid, uint64_t offset, uint32_t count, char *data) return (-error); } - error = p9_buf_readf(req->rc, clnt->proto_version, "D", &count, + error = p9_buf_readf(&req->rc, clnt->proto_version, "D", &count, &dataptr); if (error != 0) { P9_DEBUG(ERROR, "%s: p9_buf_readf failed: %d\n", @@ -1017,7 +1006,7 @@ p9_client_write(struct p9_fid *fid, uint64_t offset, uint32_t count, char *data) return (-error); } - error = p9_buf_readf(req->rc, clnt->proto_version, "d", &ret); + error = p9_buf_readf(&req->rc, clnt->proto_version, "d", &ret); if (error != 0) { P9_DEBUG(ERROR, "%s: p9_buf_readf error: %d\n", __func__, error); @@ -1069,7 +1058,7 @@ p9_client_file_create(struct p9_fid *fid, char *name, uint32_t perm, int mode, if (error != 0) return (error); - error = p9_buf_readf(req->rc, clnt->proto_version, "Qd", &qid, &mtu); + error = p9_buf_readf(&req->rc, clnt->proto_version, "Qd", &qid, &mtu); if (error != 0) goto out; @@ -1101,7 +1090,7 @@ p9_client_statfs(struct p9_fid *fid, struct p9_statfs *stat) return (error); } - error = p9_buf_readf(req->rc, clnt->proto_version, "ddqqqqqqd", + error = p9_buf_readf(&req->rc, clnt->proto_version, "ddqqqqqqd", &stat->type, &stat->bsize, &stat->blocks, &stat->bfree, &stat->bavail, &stat->files, &stat->ffree, &stat->fsid, &stat->namelen); @@ -1173,7 +1162,7 @@ p9_create_symlink(struct p9_fid *fid, char *name, char *symtgt, gid_t gid) if (error != 0) return (error); - error = p9_buf_readf(req->rc, clnt->proto_version, "Q", &qid); + error = p9_buf_readf(&req->rc, clnt->proto_version, "Q", &qid); if (error != 0) { P9_DEBUG(ERROR, "%s: buf_readf failed %d\n", __func__, error); return (error); @@ -1226,7 +1215,7 @@ p9_readlink(struct p9_fid *fid, char **target) if (error != 0) return (error); - error = p9_buf_readf(req->rc, clnt->proto_version, "s", target); + error = p9_buf_readf(&req->rc, clnt->proto_version, "s", target); if (error != 0) { P9_DEBUG(ERROR, "%s: buf_readf failed %d\n", __func__, error); return (error); @@ -1260,7 +1249,7 @@ p9_client_getattr(struct p9_fid *fid, struct p9_stat_dotl *stat_dotl, goto error; } - err = p9_buf_readf(req->rc, clnt->proto_version, "A", stat_dotl); + err = p9_buf_readf(&req->rc, clnt->proto_version, "A", stat_dotl); if (err != 0) { P9_DEBUG(ERROR, "%s: buf_readf failed %d\n", __func__, err); goto error; diff --git a/sys/fs/p9fs/p9_client.h b/sys/fs/p9fs/p9_client.h index 4eb82c0232f4..5db46d97c704 100644 --- a/sys/fs/p9fs/p9_client.h +++ b/sys/fs/p9fs/p9_client.h @@ -54,8 +54,8 @@ enum p9_proto_versions { /* P9 Request exchanged between Host and Guest */ struct p9_req_t { - struct p9_buffer *tc; /* request buffer */ - struct p9_buffer *rc; /* response buffer */ + struct p9_buffer tc; /* request buffer */ + struct p9_buffer rc; /* response buffer */ }; /* 9P transport status */ From nobody Tue May 26 21:23:02 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQ5MC2lLTz6gT8m for ; Tue, 26 May 2026 21:23: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQ5MC0SJRz3wb9 for ; Tue, 26 May 2026 21:23:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779830583; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MTdl8FX1W1Wi2T87M1JVYbg4/Ht7xL8UGALAB6GKgqQ=; b=CP3F2e8LQKcW6/ymWd+15mwjzpBI0Du2A4cHOmeBo1QuhUmykPCN6DgqyvonhbawXdpOTY 7wuIGD/Ce2u15gENzyfbU+dpFx0w7X4ScJ3JzsPpgUbyj+QmdnPdn7gaGoICCrpLvkl52V IPVuYgW0o97laFEXHIb5spD/oMi1tgNal1H9xKWu3oYAi21m8syV9r4NbRhuTYvsy96+us GFxmzseYUnxibkzAHg1b1zpRanvC/iw6Z1hWpt9RkBX6/5rBS+g+PDAOBZmXUIoBM0/JPR PsFKyB3Sw42V4Gx6xcsaEZTm+MhuuPBEy74HldonlwbjhZmXNEXonRJPCa7muA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779830583; a=rsa-sha256; cv=none; b=vQG2zjJqkuLGe5yM4cu+PlqccLvhKVvWioyJFSGpkSNiJsDfvuhisTIGBn+9DM9y93BgCo MDGl9ELfkr+KBSm4A7Sev2J8lm6l8tMrA1Vh4II5p5Fjm4F63q/IwwqDQE7q9O9urHrI8J tdUU5UZfDhXARPpdtGivFLWOnOD0g44jKUy1IJZuAHT9MArrc+v6mrORucrPHc767I9aO0 AP0bsOLdVegWjT+nSQ9WPshG/YcnSvlbFeT0M+CirTSv2xpEYCmTUSnK/gphaluuzmP6ks 4C0s/H2UAxfYIVaFeux0twWG2tfCbVXF6+AyEhl6DiLnjQYRXBeODx6rLCsIfw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779830583; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MTdl8FX1W1Wi2T87M1JVYbg4/Ht7xL8UGALAB6GKgqQ=; b=xc6JUMFY0rwWiJee7EPIcyHKyRCgxMC65a0kvR2VdpFRVJaTviK4lwv7qNafsRQJFD+fx1 mTy0LF6qEBsUcysm4BXmz7+TJhsjUd6UYg8b8w3WrGwJ1KJ6Zd1gjzCehBeIK+qgiVEXnt ofXBlWAEXEVVnZ6bsVM7k0ymMRFEjf2Pp2eZrz/QfTLGEWoRxczrtvjrF2PnLZlxFl7/El hsXiQWn0xGu6zBVjZhpUSDyTGQs679lkwWAV4z69NyIwLIYelWJy8m+Q2BzDbCoEiW1PWT iej+iausEs59eI0iVoe1wseJulAaqJvVsFuNDRPQ7dx3NcPxZmNjp1QNbwTq6A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQ5MC00z8zTw0 for ; Tue, 26 May 2026 21:23:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 22e4e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 26 May 2026 21:23:02 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: 882181b1ae4c - main - p9fs: Implement msize mount option and bump default to 128 KiB List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 882181b1ae4c78b4f191fdb7cf6fe1b6ff83c9ff Auto-Submitted: auto-generated Date: Tue, 26 May 2026 21:23:02 +0000 Message-Id: <6a160f36.22e4e.1d353044@gitrepo.freebsd.org> The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=882181b1ae4c78b4f191fdb7cf6fe1b6ff83c9ff commit 882181b1ae4c78b4f191fdb7cf6fe1b6ff83c9ff Author: Alex Richardson AuthorDate: 2026-05-26 19:38:18 +0000 Commit: Alex Richardson CommitDate: 2026-05-26 19:38:18 +0000 p9fs: Implement msize mount option and bump default to 128 KiB QEMU warns when msize is <= 8192 due to degraded performance. This change bumps our default msize to 128 KiB, matching the Linux Kernel v5.15 and newer default. Linux supports even larger values, but 128 KiB is a sensible default. We also add a new 'msize' mount option to allow users to override this value, and we validate it against our maximum supported MTU (currently fixed by the UMA zone size). Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56496 --- sys/fs/p9fs/p9_client.c | 9 ++++++++- sys/fs/p9fs/p9_client.h | 7 +++++-- sys/fs/p9fs/p9fs_vfsops.c | 2 +- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/sys/fs/p9fs/p9_client.c b/sys/fs/p9fs/p9_client.c index 27a6c1eb366d..d3be87ee1645 100644 --- a/sys/fs/p9fs/p9_client.c +++ b/sys/fs/p9fs/p9_client.c @@ -95,7 +95,14 @@ p9_parse_opts(struct mount *mp, struct p9_client *clnt) /* These are defaults for now */ clnt->proto_version = p9_proto_2000L; - clnt->msize = 8192; + clnt->msize = P9FS_MTU; + + vfs_scanopt(mp->mnt_optnew, "msize", "%u", &clnt->msize); + if (clnt->msize > P9FS_MTU) { + vfs_mount_error(mp, "msize %u is greater than max allowed %u", + clnt->msize, P9FS_MTU); + return (EINVAL); + } /* Get the default trans callback */ clnt->ops = p9_get_trans_by_name(trans); diff --git a/sys/fs/p9fs/p9_client.h b/sys/fs/p9fs/p9_client.h index 5db46d97c704..e5167f9a0f58 100644 --- a/sys/fs/p9fs/p9_client.h +++ b/sys/fs/p9fs/p9_client.h @@ -65,8 +65,11 @@ enum transport_status { P9FS_DISCONNECT, /* transport has been dosconnected */ }; -/* This is set by QEMU so we will oblige */ -#define P9FS_MTU 8192 +/* + * This matches the Linux 5.15 and newer default. + * Note: Linux allows larger msize values than this. + */ +#define P9FS_MTU 131072 /* * Even though we have a 8k buffer, Qemu is typically doing 8168 diff --git a/sys/fs/p9fs/p9fs_vfsops.c b/sys/fs/p9fs/p9fs_vfsops.c index a0f0a5a4e494..fe8c1b5ded31 100644 --- a/sys/fs/p9fs/p9fs_vfsops.c +++ b/sys/fs/p9fs/p9fs_vfsops.c @@ -59,7 +59,7 @@ extern struct vop_vector p9fs_vnops; /* option parsing */ static const char *p9fs_opts[] = { - "from", "trans", "access", NULL + "from", "trans", "access", "msize", NULL }; /* Dispose p9fs node, freeing it to the UMA zone */ From nobody Tue May 26 21:23:04 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQ5MD5PpZz6gSwd for ; Tue, 26 May 2026 21: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQ5MD1WTKz3wwb for ; Tue, 26 May 2026 21: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=1779830584; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F69pcMzXh48PkqBnRhy/tDvL8i5E4OKCgmoHbSVT0tY=; b=flfRE9b3UyZTmNgFmQruH2DssHxD/wvde4KHv8L+Eq5tJx0TScGDUV+aKXMHTzyNriIBb/ tGkzgJpU7DwFtlprPNc6iBNzmY7EJOoGsllyXbRWSOu9+TcmBVkRBfWXUN4dF5n0hXXWnR VQkw3iZcEHfU3TmPDP+gUN/Pl5s5Tqad2boBwfT2oOuEa4c9toSCTsjFZuQiG8zq5A8VAQ MNTvPo7BcLYcyLcslEII+LfcEKmcKepwS9ovp3PbuEb7HdJ5ZkjM3MlUKOgAFoRS1agJA3 DCSerwYGkJIiPPQq5zbcv8bVfjH7QqL8PPP0M8GPSR1RWEzDIzrsJsZr+lSdKQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779830584; a=rsa-sha256; cv=none; b=Y2gvTGAMU+x4y1l4SUNhL1Do7hpRPhbZgvnKDdoeD84pF99jrJ4d3gJJBFQ6is0/ZAFHGN zoBk1JwU9Ub6FxjKTKzZzvQ32hQvROtuCrrm59eEXRNiQC+C6Lfgzu5JBpFNAnKkmyPmYu XbYobUtsZbHy27f3Q90oifLzxLfD46UtM6daYGSDFGEowzFRlrrQUbpzn1gqA287EImWsR x0jvWW59CGSgDOz6enKKVzCJZ6Qfy2XpkrT/2OroZKxao14vg1DxUnxdmvQ0iAe/7+APhg NXKLJ3jFjFqDtuU9Kk775f/HkA5UKKowG18feglhmYdEs8p6oTKVqVdJFIJA4g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779830584; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F69pcMzXh48PkqBnRhy/tDvL8i5E4OKCgmoHbSVT0tY=; b=xKe8GFig7pLfp938Y7KWart1JYIAYg0cSrNFOOA+bfygSrVt6D5APB/4JuhtJz6xca5Tfk EIo0ent8zh5PU+lhQSFwZD8V4sIwnD4Vu1lXNmr74QVrbmajAL5jGAHEmKg+q80qmasfLy 48smRRGF/L+P0tvjFVfLV6CwUboI9r/ZlxRwa4j7b7Tn8YYvLJOwOnffB+xqqCPHajuYf8 UaYHkLYDZ5K11EejSvSNVdMXDTrc/kJFXtfPshFAKNshKGcTlmQ9bp5mA8VMKPi9cD7mNF dcNm7CNA1Plo+rQf9HKdqmza3ilWCyi1wv1B5Z1W2/lE48CYKZOZKDBHPaEpbw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQ5MD0sPDzDSM for ; Tue, 26 May 2026 21:23:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 237dc by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 26 May 2026 21:23:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: 3525c619abdb - main - Fix building with LLVM_BINUTILS_BOOSTRAP but without CLANG_BOOTSTRAP List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3525c619abdb646601e74194a6e15e8407a677da Auto-Submitted: auto-generated Date: Tue, 26 May 2026 21:23:04 +0000 Message-Id: <6a160f38.237dc.2129f4c3@gitrepo.freebsd.org> The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=3525c619abdb646601e74194a6e15e8407a677da commit 3525c619abdb646601e74194a6e15e8407a677da Author: Alex Richardson AuthorDate: 2026-05-26 19:38:58 +0000 Commit: Alex Richardson CommitDate: 2026-05-26 19:38:59 +0000 Fix building with LLVM_BINUTILS_BOOSTRAP but without CLANG_BOOTSTRAP Without this change I get various undefined symbol errors when trying to link llvm-nm and llvm-objcopy during the cross-tools stage. Test Plan: builds now Reviewed by: dim, emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56873 --- lib/clang/libllvm/Makefile | 70 +++++++++++++++++++++++----------------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/lib/clang/libllvm/Makefile b/lib/clang/libllvm/Makefile index 327724bcb52e..ea90b37f8cbd 100644 --- a/lib/clang/libllvm/Makefile +++ b/lib/clang/libllvm/Makefile @@ -562,8 +562,8 @@ SRCS_EXT+= DWARFLinker/Parallel/SyntheticTypeNameBuilder.cpp SRCS_EXT+= DWARFLinker/Utils.cpp SRCS_EXT+= DWP/DWP.cpp SRCS_EXT+= DWP/DWPError.cpp -SRCS_MIW+= DebugInfo/BTF/BTFContext.cpp -SRCS_MIW+= DebugInfo/BTF/BTFParser.cpp +SRCS_MIN+= DebugInfo/BTF/BTFContext.cpp +SRCS_MIN+= DebugInfo/BTF/BTFParser.cpp SRCS_MIN+= DebugInfo/CodeView/AppendingTypeTableBuilder.cpp SRCS_MIN+= DebugInfo/CodeView/CVSymbolVisitor.cpp SRCS_MIN+= DebugInfo/CodeView/CVTypeVisitor.cpp @@ -607,7 +607,7 @@ SRCS_MIN+= DebugInfo/CodeView/TypeTableCollection.cpp SRCS_MIN+= DebugInfo/DWARF/DWARFAbbreviationDeclaration.cpp SRCS_MIN+= DebugInfo/DWARF/DWARFAcceleratorTable.cpp SRCS_MIN+= DebugInfo/DWARF/DWARFAddressRange.cpp -SRCS_MIW+= DebugInfo/DWARF/DWARFCFIPrinter.cpp +SRCS_MIN+= DebugInfo/DWARF/DWARFCFIPrinter.cpp SRCS_MIN+= DebugInfo/DWARF/DWARFCompileUnit.cpp SRCS_MIN+= DebugInfo/DWARF/DWARFContext.cpp SRCS_MIN+= DebugInfo/DWARF/DWARFDebugAbbrev.cpp @@ -630,11 +630,11 @@ SRCS_MIN+= DebugInfo/DWARF/DWARFListTable.cpp SRCS_MIN+= DebugInfo/DWARF/DWARFTypeUnit.cpp SRCS_MIN+= DebugInfo/DWARF/DWARFUnit.cpp SRCS_MIN+= DebugInfo/DWARF/DWARFUnitIndex.cpp -SRCS_MIW+= DebugInfo/DWARF/DWARFUnwindTablePrinter.cpp +SRCS_MIN+= DebugInfo/DWARF/DWARFUnwindTablePrinter.cpp SRCS_MIN+= DebugInfo/DWARF/DWARFVerifier.cpp -SRCS_MIW+= DebugInfo/DWARF/LowLevel/DWARFCFIProgram.cpp +SRCS_MIN+= DebugInfo/DWARF/LowLevel/DWARFCFIProgram.cpp SRCS_MIN+= DebugInfo/DWARF/LowLevel/DWARFExpression.cpp -SRCS_MIW+= DebugInfo/DWARF/LowLevel/DWARFUnwindTable.cpp +SRCS_MIN+= DebugInfo/DWARF/LowLevel/DWARFUnwindTable.cpp SRCS_MIW+= DebugInfo/GSYM/CallSiteInfo.cpp SRCS_MIW+= DebugInfo/GSYM/DwarfTransformer.cpp SRCS_MIW+= DebugInfo/GSYM/ExtractRanges.cpp @@ -748,8 +748,8 @@ SRCS_EXT+= DebugInfo/PDB/UDTLayout.cpp SRCS_MIW+= DebugInfo/Symbolize/DIPrinter.cpp SRCS_MIW+= DebugInfo/Symbolize/Markup.cpp SRCS_MIW+= DebugInfo/Symbolize/MarkupFilter.cpp -SRCS_MIW+= DebugInfo/Symbolize/SymbolizableObjectFile.cpp -SRCS_MIW+= DebugInfo/Symbolize/Symbolize.cpp +SRCS_MIN+= DebugInfo/Symbolize/SymbolizableObjectFile.cpp +SRCS_MIN+= DebugInfo/Symbolize/Symbolize.cpp SRCS_MIW+= Debuginfod/BuildIDFetcher.cpp SRCS_MIW+= Debuginfod/Debuginfod.cpp SRCS_MIW+= Debuginfod/HTTPClient.cpp @@ -1077,28 +1077,28 @@ SRCS_EXT+= MCA/Stages/RetireStage.cpp SRCS_EXT+= MCA/Stages/Stage.cpp SRCS_EXT+= MCA/Support.cpp SRCS_EXT+= MCA/View.cpp -SRCS_MIW+= ObjCopy/Archive.cpp -SRCS_MIW+= ObjCopy/COFF/COFFObjcopy.cpp -SRCS_MIW+= ObjCopy/COFF/COFFObject.cpp -SRCS_MIW+= ObjCopy/COFF/COFFReader.cpp -SRCS_MIW+= ObjCopy/COFF/COFFWriter.cpp -SRCS_MIW+= ObjCopy/CommonConfig.cpp -SRCS_MIW+= ObjCopy/ConfigManager.cpp -SRCS_MIW+= ObjCopy/ELF/ELFObjcopy.cpp -SRCS_MIW+= ObjCopy/ELF/ELFObject.cpp -SRCS_MIW+= ObjCopy/MachO/MachOLayoutBuilder.cpp -SRCS_MIW+= ObjCopy/MachO/MachOObjcopy.cpp -SRCS_MIW+= ObjCopy/MachO/MachOObject.cpp -SRCS_MIW+= ObjCopy/MachO/MachOReader.cpp -SRCS_MIW+= ObjCopy/MachO/MachOWriter.cpp -SRCS_MIW+= ObjCopy/ObjCopy.cpp -SRCS_MIW+= ObjCopy/XCOFF/XCOFFObjcopy.cpp -SRCS_MIW+= ObjCopy/XCOFF/XCOFFReader.cpp -SRCS_MIW+= ObjCopy/XCOFF/XCOFFWriter.cpp -SRCS_MIW+= ObjCopy/wasm/WasmObjcopy.cpp -SRCS_MIW+= ObjCopy/wasm/WasmObject.cpp -SRCS_MIW+= ObjCopy/wasm/WasmReader.cpp -SRCS_MIW+= ObjCopy/wasm/WasmWriter.cpp +SRCS_MIN+= ObjCopy/Archive.cpp +SRCS_MIN+= ObjCopy/COFF/COFFObjcopy.cpp +SRCS_MIN+= ObjCopy/COFF/COFFObject.cpp +SRCS_MIN+= ObjCopy/COFF/COFFReader.cpp +SRCS_MIN+= ObjCopy/COFF/COFFWriter.cpp +SRCS_MIN+= ObjCopy/CommonConfig.cpp +SRCS_MIN+= ObjCopy/ConfigManager.cpp +SRCS_MIN+= ObjCopy/ELF/ELFObjcopy.cpp +SRCS_MIN+= ObjCopy/ELF/ELFObject.cpp +SRCS_MIN+= ObjCopy/MachO/MachOLayoutBuilder.cpp +SRCS_MIN+= ObjCopy/MachO/MachOObjcopy.cpp +SRCS_MIN+= ObjCopy/MachO/MachOObject.cpp +SRCS_MIN+= ObjCopy/MachO/MachOReader.cpp +SRCS_MIN+= ObjCopy/MachO/MachOWriter.cpp +SRCS_MIN+= ObjCopy/ObjCopy.cpp +SRCS_MIN+= ObjCopy/XCOFF/XCOFFObjcopy.cpp +SRCS_MIN+= ObjCopy/XCOFF/XCOFFReader.cpp +SRCS_MIN+= ObjCopy/XCOFF/XCOFFWriter.cpp +SRCS_MIN+= ObjCopy/wasm/WasmObjcopy.cpp +SRCS_MIN+= ObjCopy/wasm/WasmObject.cpp +SRCS_MIN+= ObjCopy/wasm/WasmReader.cpp +SRCS_MIN+= ObjCopy/wasm/WasmWriter.cpp SRCS_MIN+= Object/Archive.cpp SRCS_MIN+= Object/ArchiveWriter.cpp SRCS_MIN+= Object/Binary.cpp @@ -1115,7 +1115,7 @@ SRCS_MIN+= Object/IRObjectFile.cpp SRCS_MIN+= Object/IRSymtab.cpp SRCS_MIN+= Object/MachOObjectFile.cpp SRCS_MIN+= Object/MachOUniversal.cpp -SRCS_MIW+= Object/MachOUniversalWriter.cpp +SRCS_MIN+= Object/MachOUniversalWriter.cpp SRCS_MIN+= Object/Minidump.cpp SRCS_MIN+= Object/ModuleSymbolTable.cpp SRCS_EXT+= Object/Object.cpp @@ -1124,12 +1124,12 @@ SRCS_MIN+= Object/OffloadBinary.cpp SRCS_MIW+= Object/OffloadBundle.cpp SRCS_MIN+= Object/RecordStreamer.cpp SRCS_MIN+= Object/RelocationResolver.cpp -SRCS_MIW+= Object/SymbolSize.cpp +SRCS_MIN+= Object/SymbolSize.cpp SRCS_MIN+= Object/SymbolicFile.cpp SRCS_MIN+= Object/TapiFile.cpp SRCS_MIN+= Object/TapiUniversal.cpp SRCS_MIN+= Object/WasmObjectFile.cpp -SRCS_MIW+= Object/WindowsMachineFlag.cpp +SRCS_MIN+= Object/WindowsMachineFlag.cpp SRCS_MIN+= Object/WindowsResource.cpp SRCS_MIN+= Object/XCOFFObjectFile.cpp SRCS_MIN+= ObjectYAML/COFFYAML.cpp @@ -1298,7 +1298,7 @@ SRCS_MIN+= Support/OptimizedStructLayout.cpp SRCS_MIN+= Support/OptionStrCmp.cpp SRCS_MIN+= Support/Optional.cpp SRCS_MIN+= Support/PGOOptions.cpp -SRCS_MIW+= Support/Parallel.cpp +SRCS_MIN+= Support/Parallel.cpp SRCS_MIN+= Support/Path.cpp SRCS_MIN+= Support/PluginLoader.cpp SRCS_MIN+= Support/PrettyStackTrace.cpp @@ -1849,7 +1849,7 @@ SRCS_MIN+= TextAPI/TextStubCommon.cpp SRCS_MIN+= TextAPI/TextStubV5.cpp SRCS_MIN+= TextAPI/Utils.cpp SRCS_MIN+= ToolDrivers/llvm-dlltool/DlltoolDriver.cpp -SRCS_MIW+= ToolDrivers/llvm-lib/LibDriver.cpp +SRCS_MIN+= ToolDrivers/llvm-lib/LibDriver.cpp SRCS_MIN+= Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp SRCS_MIN+= Transforms/AggressiveInstCombine/TruncInstCombine.cpp SRCS_MIN+= Transforms/CFGuard/CFGuard.cpp From nobody Tue May 26 21:48:53 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQ5x70kJBz6gVMB for ; Tue, 26 May 2026 21:48: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQ5x70GCMz43ZK for ; Tue, 26 May 2026 21:48:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779832139; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lzvD1ZwDtR3wlAaOiEwBWWXG4UxneRIFMK18Up9g5lI=; b=bzvXG+CjRCp6FvzIEjmKBff2jykliMTFr0bhaIc1u5CEgB3zz0fQ9gN+99DNB3SvdI4LUT kA+Zo25EdPLct+VJ553l+EuTHgaNmvB8qzQQzrvkYVE/sLvZhQzo8Xg5mE3Qpb2QcRP7dw VIgWQEVZ9TMp/qRRf5AyrVSj0wUzb62ZAcQjff1qz35Rcz0fdEGy761ewFlNQ9SV/hFOuo AuiPVM6cSgTub0BmDXCZV1uYOHgVQ+kP3hP+wKZLnT5YsXebe3wsNqwvhFW6+5T8/FJI04 HmkgfLstIgKF1tORZhpf6Iq9rro8xF+T2T6kBkhcU1QMxXu4wEdLyR1p77Cgfg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779832139; a=rsa-sha256; cv=none; b=gAhTvf3xD47smOA/eaaqOEMq8uPiHcI4CEwCuPCeI8YW51yaCiJzzM0pgqpYK8ynNMtipl /gLgGkCsB5RhtgJNMXTJ4TJmbhgVPg98pr8v7sU/wKlfS56XgfukOydrECrAtVZiJohx4A 9tyxX1Un3Dh7huRb4iwx2AX1awQZdv3BOkBXHID+Tj/2io5kxxF/iwMm8UcpuMDCRZeLvl KSxpwrppKmL6WUyYmb/FlZzEuAjL5yuuZ4JV/eiNpaZtgYAJnX/ta8/8jw+LE3LVn5xQQx zg5YrPe9nFr4mXpTt49QBkOenKL4SIuf4gqlxVW93cA+JfSbSuRDutTN7Fju8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779832139; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lzvD1ZwDtR3wlAaOiEwBWWXG4UxneRIFMK18Up9g5lI=; b=oRahlBaMYFpLNPfLlftld56cxTWDQf7bC9ACT9skwvODd0I+IhPpHUyr3qFeRbV2VZCAHY PBi/8y7xDjsUv2B4qFMF/Z6HC6V9iboA+jn++6x39colJ4Hh5Qay2dXxgw4e25DCDDjb0N URk6DDdV2PIv5pPvUFgzJQvpg4zIdL3QyGdpczGc35b2qQ9l3JUDGg6oX3q0oTVS+XTd/u 66S3I1gN1Zo4VxysqfVMB57ieC4RAgiw47TGJCf4Y712Gm34jAaPe1aWtNiR5UEwSDZr0D 9CEjRcDfxJAxJ+06oVgd0WezAnJoccfJ4SSRa4vnMnXnsY8ayOV40oPQQ5btUA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQ5x66y83zVfX for ; Tue, 26 May 2026 21:48:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26de0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 26 May 2026 21:48:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: 14b8531c4ccb - main - padlock: Restore padlock_rng to the amd64 build List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 14b8531c4ccb836d755ce8a4f1b384164b5d9d94 Auto-Submitted: auto-generated Date: Tue, 26 May 2026 21:48:53 +0000 Message-Id: <6a161545.26de0.7c9648fe@gitrepo.freebsd.org> The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=14b8531c4ccb836d755ce8a4f1b384164b5d9d94 commit 14b8531c4ccb836d755ce8a4f1b384164b5d9d94 Author: Alan Somers AuthorDate: 2026-05-24 00:19:13 +0000 Commit: Alan Somers CommitDate: 2026-05-26 21:43:57 +0000 padlock: Restore padlock_rng to the amd64 build Revert 88a53301e19 and d1ca01059d5 . They removed padlock_rng from the amd64 build under the mistaken belief that this device was available on 32-bit processors only. But it's also available on the 64-bit Via Nano, Nano X2, and some Zhaoxin CPUs. PR: 295517 Fixes: 88a53301e19 ("padlock.4: only install on i386") Fixes: d1ca01059d5 ("padlock(4)/nehemiah: move i386-only entropy") MFC after: 1 week Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D57215 --- share/man/man4/Makefile | 5 +---- sys/amd64/conf/GENERIC | 1 + sys/amd64/conf/MINIMAL | 1 + sys/conf/files.i386 | 1 - sys/conf/files.x86 | 1 + sys/i386/conf/NOTES | 7 ------- sys/modules/Makefile | 4 +--- sys/x86/conf/NOTES | 1 + 8 files changed, 6 insertions(+), 15 deletions(-) diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 0b94158659fb..4b9740e12081 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -903,6 +903,7 @@ _ntb_hw_intel.4= ntb_hw_intel.4 _ntb_hw_plx.4= ntb_hw_plx.4 _ntb_transport.4=ntb_transport.4 _nvram.4= nvram.4 +_padlock.4= padlock.4 _pchtherm.4= pchtherm.4 _qat.4= qat.4 _qat_c2xxx.4= qat_c2xxx.4 @@ -949,10 +950,6 @@ _vmm.4= vmm.4 .endif .endif -.if ${MACHINE_CPUARCH} == "i386" -_padlock.4= padlock.4 -.endif - .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "aarch64" _hwt.4= hwt.4 .if ${MACHINE_CPUARCH} == "amd64" diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC index c6a095f2d98a..9d76736cc46b 100644 --- a/sys/amd64/conf/GENERIC +++ b/sys/amd64/conf/GENERIC @@ -329,6 +329,7 @@ device xz # lzma decompression device bpf # Berkeley packet filter # random(4) +device padlock_rng # VIA Padlock RNG device rdrand_rng # Intel Bull Mountain RNG # Disabled for now since tpm(4) breaks suspend/resume. #device tpm # Trusted Platform Module diff --git a/sys/amd64/conf/MINIMAL b/sys/amd64/conf/MINIMAL index d67ae8189a9e..ba64c39bc6b9 100644 --- a/sys/amd64/conf/MINIMAL +++ b/sys/amd64/conf/MINIMAL @@ -125,6 +125,7 @@ device ether # Ethernet support device bpf # Berkeley packet filter # random(4) +device padlock_rng # VIA Padlock RNG device rdrand_rng # Intel Bull Mountain RNG # Disabled for now since tpm(4) breaks suspend/resume. #device tpm # Trusted Platform Module diff --git a/sys/conf/files.i386 b/sys/conf/files.i386 index 0e7a1f24be7e..b65d78d1ea3c 100644 --- a/sys/conf/files.i386 +++ b/sys/conf/files.i386 @@ -33,7 +33,6 @@ dev/hyperv/vmbus/i386/hyperv_machdep.c optional hyperv dev/le/if_le_isa.c optional le isa dev/ofw/ofw_pcib.c optional fdt pci dev/pcf/pcf_isa.c optional pcf -dev/random/nehemiah.c optional padlock_rng !random_loadable dev/sbni/if_sbni.c optional sbni dev/sbni/if_sbni_isa.c optional sbni isa dev/sbni/if_sbni_pci.c optional sbni pci diff --git a/sys/conf/files.x86 b/sys/conf/files.x86 index 8a7e0b78feb4..a9b9d8875ad1 100644 --- a/sys/conf/files.x86 +++ b/sys/conf/files.x86 @@ -310,6 +310,7 @@ dev/ntb/ntb_hw/ntb_hw_plx.c optional ntb_hw_plx | ntb_hw dev/ntb/test/ntb_tool.c optional ntb_tool dev/nvram/nvram.c optional nvram isa dev/random/ivy.c optional rdrand_rng !random_loadable +dev/random/nehemiah.c optional padlock_rng !random_loadable dev/random/rdseed.c optional rdrand_rng !random_loadable dev/qat_c2xxx/qat.c optional qat_c2xxx dev/qat_c2xxx/qat_ae.c optional qat_c2xxx diff --git a/sys/i386/conf/NOTES b/sys/i386/conf/NOTES index 25bfb99c1fef..b21f05b685b5 100644 --- a/sys/i386/conf/NOTES +++ b/sys/i386/conf/NOTES @@ -296,13 +296,6 @@ envvar hint.pcf.0.irq="5" # device glxsb # AMD Geode LX Security Block -# -# padlock is a driver for the cryptographic functions and RNG in -# VIA C3, C7, and Eden processors. -# Requires 'device crypto'. -# -device padlock_rng # VIA Padlock RNG - ##################################################################### # ABI Emulation diff --git a/sys/modules/Makefile b/sys/modules/Makefile index faedb856977c..f21f22c174cd 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -838,6 +838,7 @@ _nfe= nfe _nvram= nvram .if ${MK_CRYPT} != "no" || defined(ALL_MODULES) _padlock= padlock +_padlock_rng= padlock_rng _rdrand_rng= rdrand_rng _rdseed_rng= rdseed_rng .endif @@ -911,9 +912,6 @@ _glxsb= glxsb _pcfclock= pcfclock _pst= pst _sbni= sbni -.if ${MK_CRYPT} != "no" || defined(ALL_MODULES) -_padlock_rng= padlock_rng -.endif .endif .if ${MACHINE_ARCH} == "armv7" diff --git a/sys/x86/conf/NOTES b/sys/x86/conf/NOTES index 3ae80fbe45c5..ebe272769818 100644 --- a/sys/x86/conf/NOTES +++ b/sys/x86/conf/NOTES @@ -549,6 +549,7 @@ envvar hint.pbio.0.port="0x360" device smbios device vpd device tpm +device padlock_rng # VIA Padlock RNG device rdrand_rng # Intel Bull Mountain RNG device aesni # AES-NI OpenCrypto module device ossl # OpenSSL OpenCrypto module From nobody Tue May 26 22:20:46 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQ6dw1KK6z6gY49 for ; Tue, 26 May 2026 22:20: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQ6dv4rVdz47W6 for ; Tue, 26 May 2026 22:20:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779834051; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LJBNxBWLoB4sftBpbJeDFTdQrPsgKwGxoFhiQzq7MnA=; b=Y4XoMQk9Go6Hreh7+Y4CCv9id13diuRA9bX2KTMgoHKHI4XIj9MQNiaGN1C0zx9gQfTi8H fUgwHqKH+oBMsGcvbfJNCvWdrvtPApgca4y6PjyD0CiF63W5KwDv9+1p7QALWKbCkgSW1L yMHOLebd6cwHUkvFvZw7NbMSbBwLJG+rdLp66QtYabCAnvLLYN/uV1uiBisxf0xqgZS7Qs S7OBLqnjYMmcyuGKQwYkT6cDR27QoFD5cD6SMP+nTWISMunQzY1+MXeAiC54B/H3Laq14E 7UVdv3djNdb1QQGzh2JfBTuipqxzzMM9vwgrbXcMOP4LRzlJ8nD7V81WasRN/A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779834051; a=rsa-sha256; cv=none; b=cAZbDvmDYufbD6+l/VHEUfK4wT/8Vbjf3L3GSW7Hdg3sRxITJ2LF7B0EWlDx8knt7+AE1f BgKpg6J+LGnlWu9px6MqHPJbSREODX+oVKIwtoi+XAyLDPD6PvNSK6q0nJpr/5AggMYzsO E7fdrnIHDUn+q1Z7DBaRK4UQV4191tHIu5yeDxtidiJiOd3ht9hZIJGlQ+PKNechayJ0Lv wC/JUcUpLQyBJ/7c5tDTJxqcYWtRCxjbITm0jI96wR/NWWSt6aEfhS2xM3T9/ol3xIGT5V +yh2GcBuaV68cOWR//bDoaAVZFVAs29gf/M7bVdQxCQr2dp1Oy+3D1OG0W89Jw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779834051; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LJBNxBWLoB4sftBpbJeDFTdQrPsgKwGxoFhiQzq7MnA=; b=r8MYnv1Tu4q+n9gIP/YTR0b0RHWeztkzfwFAxxLo4ZEiDfNMZYskQQQzCIgJieGrgDq/hl fuh5V9d1VJkUe+CCHvaaQWiq9jnlwZQ+73174K5VkoUKin8fjeEBMKKfW0ZowuS/iYVnCh 2Sj4A3PHnlvNxlUCr3Hy6b5QleM5uUAw608XsiQ5WfSkky1eVvXFcvc9Awn8d35+cn2FOd 7KTwyVvELk3oAC8FhHlGziVrA8q41AfqnEAYiwpeJCqELEX/6D5st8MlCtNxZ4ULFQ9Xy2 uTHZpRkmTc7R5KG+llJfehp9tXroDELoQRomTWrufp9QzCOeX6zTdo80bJRB0g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQ6dv4SRLzXNs for ; Tue, 26 May 2026 22:20:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 328dd by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 26 May 2026 22:20:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: 7669a182c232 - stable/15 - mtree: usr: Add missing pkg/triggers entry List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 7669a182c232fcb9e1e4b627df2f306e7b0d23ea Auto-Submitted: auto-generated Date: Tue, 26 May 2026 22:20:46 +0000 Message-Id: <6a161cbe.328dd.7e71f5f9@gitrepo.freebsd.org> The branch stable/15 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=7669a182c232fcb9e1e4b627df2f306e7b0d23ea commit 7669a182c232fcb9e1e4b627df2f306e7b0d23ea Author: Jose Luis Duran AuthorDate: 2026-01-14 14:28:35 +0000 Commit: Jose Luis Duran CommitDate: 2026-05-26 22:19:51 +0000 mtree: usr: Add missing pkg/triggers entry Reviewed by: ivy Fixes: ea5e50c2985b ("packages: Add a mandoc package") Differential Revision: https://reviews.freebsd.org/D54682 (cherry picked from commit b8480379adcefaff0553aed1df67b249a0b194c8) --- etc/mtree/BSD.usr.dist | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/etc/mtree/BSD.usr.dist b/etc/mtree/BSD.usr.dist index f0e7941258ae..0597690f49bf 100644 --- a/etc/mtree/BSD.usr.dist +++ b/etc/mtree/BSD.usr.dist @@ -833,6 +833,10 @@ .. .. .. + pkg + triggers + .. + .. security .. sendmail From nobody Tue May 26 23:06:07 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQ7fD4MM3z6gbp1 for ; Tue, 26 May 2026 23:06: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQ7fD3sPWz3D20 for ; Tue, 26 May 2026 23:06:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779836772; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B/cjfoULFGOjJPHzrFuPpu5OlUAOy+Zh8rtHmb91JS0=; b=HhZGkR3yva4jdXPC1SHzDEttHRPJ+ZFJQny9mVuGzZlHepke6B1Zt8yIYoNexy4g/sWd6g X+Wyy7l8h9cS0fRwss4acQhSkFJ6v+iv+2Zput7FjB28yRK4zdHhEz1GvTTBP6Iuevnrl5 4vLJf5uLwVwejoD3aOr3OuyDYA34PytUqW+NiTYWnuUHSeNt3Yx77ID/WUUH7qfSUjqidb vx+h/WrkV2pmofO3FPH97vjjjwKZnlZCB9lh8dy0PDpKXAi1Oz0Oe2HPDXjPLS7WG8ckdQ LrrVb884+kfb5xPTwWQs5XcqKdCUAS5UcT/kJ7OPBt7/wfi5X6qGFtSDW/gANQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779836772; a=rsa-sha256; cv=none; b=atgkcMrSKLJGnKv6AdGSRk3zblQfAOts3xSKHR4bTgNv6zRz2MZQwxmh3I0cmO5R/RrTxu 5BBKUTgq+ysBOOsXzpygyqdPD4PO24u9d6BYrhqlVribEZ5TG1ySnOdQBBg/XR3MWooTs0 3RPy4or+NoHcPkNhXMxBbKy1Wb7gbovzaFj6ncSKZvjoaR6wAsF+hwZSly0RKmhO4dntZS Cej/RpkbOxlJ3q2R85md8saQy+pnVjNHE7gz0NLMeQEfIz73ZZvh3F6BnW4aSPeVM6IOmz X8GCi9J6cPG0c529YbfixnxasEkmx+aXlc9zG1bm8qBu6XHi2zmVbsBF+8ezDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779836772; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B/cjfoULFGOjJPHzrFuPpu5OlUAOy+Zh8rtHmb91JS0=; b=pxZTTgzoZAb7IpPtHKaALCHHikh8JoIZXXSfbpUDHcjywbqxTGg+PZM4lWvRHfkqc5jVJk Tfr/TmSKqaqrdIh234yEwlblKZaFqgvX3ljkYuKqSnWF8ZqJHWYh/u/kofJD6XLRYBhl3e aNVz3tQHbnBmNjS5nqn18NA/lsIC8UAp8rk6pqoHYcZ9NmwvhlXqHwm5/wWB+xFPMaZNLW EtFNUnARw6FkUEdFxtcEgREE72KwwFXgJVbJEZI7DfEJJIoRXcPrtobB1yo9rMCMd6UfCE BqWBzQjrLFjk5wlT17EyKWQujkA3dd5FlfC2q6te+CODlp/Ov+6r0MI0JUhdBg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQ7fD2xRyzYwQ for ; Tue, 26 May 2026 23:06:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3718f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 26 May 2026 23:06:07 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Aymeric Wibo Subject: git: aba599a6cc55 - main - zzz: Rewrite to use new power device List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: obiwac X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aba599a6cc550bf209b42a81a3cdb3f6e94d0613 Auto-Submitted: auto-generated Date: Tue, 26 May 2026 23:06:07 +0000 Message-Id: <6a16275f.3718f.cf1cf42@gitrepo.freebsd.org> The branch main has been updated by obiwac: URL: https://cgit.FreeBSD.org/src/commit/?id=aba599a6cc550bf209b42a81a3cdb3f6e94d0613 commit aba599a6cc550bf209b42a81a3cdb3f6e94d0613 Author: Aymeric Wibo AuthorDate: 2026-05-10 08:48:03 +0000 Commit: Aymeric Wibo CommitDate: 2026-05-26 23:05:45 +0000 zzz: Rewrite to use new power device Previous script called acpiconf(8) (or apm(8) if ACPI wasn't supported, although this was anyway redundant because APMIO just uses ACPI now). Since a new generic power management interface was introduced, this isn't sufficient, as this would only work for ACPI systems and for ACPI S3 suspend (so no way to select suspend-to-idle). Rewrite in C to take advantage of the new power interface. We may want to add a switch to manually override the kern.power.suspend sysctl, which is otherwise what the power device uses to decide which suspend type to switch to (suspend-to-idle or firmware suspend), but this will require us to amend the power interface. Reviewed by: olce, imp, mhorne, ziaee Tested by: mhorne Approved by: olce, imp, mhorne, ziaee Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56918 --- include/paths.h | 1 + usr.sbin/zzz/Makefile | 4 ++- usr.sbin/zzz/zzz.8 | 86 ++++++++++++++++++++++++--------------------------- usr.sbin/zzz/zzz.c | 47 ++++++++++++++++++++++++++++ usr.sbin/zzz/zzz.sh | 41 ------------------------ 5 files changed, 92 insertions(+), 87 deletions(-) diff --git a/include/paths.h b/include/paths.h index 26924bcdba91..9157c17524c7 100644 --- a/include/paths.h +++ b/include/paths.h @@ -54,6 +54,7 @@ #define _PATH_DEFTAPE "/dev/sa0" #define _PATH_DEVGPIOC "/dev/gpioc" #define _PATH_DEVNULL "/dev/null" +#define _PATH_DEVPOWER "/dev/power" #define _PATH_DEVZERO "/dev/zero" #define _PATH_DRUM "/dev/drum" #define _PATH_ESDB "/usr/share/i18n/esdb" diff --git a/usr.sbin/zzz/Makefile b/usr.sbin/zzz/Makefile index 4d1a2dd9dc34..6ce3e03fa6cf 100644 --- a/usr.sbin/zzz/Makefile +++ b/usr.sbin/zzz/Makefile @@ -1,4 +1,6 @@ -SCRIPTS=zzz.sh +.include + +PROG= zzz MAN= zzz.8 .include diff --git a/usr.sbin/zzz/zzz.8 b/usr.sbin/zzz/zzz.8 index c2799c28e177..e7df72c1e830 100644 --- a/usr.sbin/zzz/zzz.8 +++ b/usr.sbin/zzz/zzz.8 @@ -1,63 +1,59 @@ -.\" Copyright (c) 2003 Nate Lawson -.\" All rights reserved. +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause .\" -.\" 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. +.\" Copyright (c) 2026 The FreeBSD Foundation .\" -.\" 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. +.\" This documentation was written by Aymeric Wibo under +.\" sponsorship from the FreeBSD Foundation. .\" -.Dd July 13, 2003 +.Dd May 26, 2026 .Dt ZZZ 8 .Os .Sh NAME .Nm zzz -.Nd suspend an ACPI or APM system +.Nd suspend the system .Sh SYNOPSIS .Nm .Sh DESCRIPTION The .Nm -utility -checks for -.Tn ACPI -or -.Tn APM -support and then suspends the system appropriately. -For -.Tn APM , -.Pp -.Dl apm -z -.Pp -will be issued. -For -.Tn ACPI, -the configured suspend state will be looked up, checked to see -if it is supported and, +utility suspends the system by writing a suspend transition request to +.Pa /dev/power . .Pp -.Dl acpiconf -s -.Pp -will be issued. +The specific sleep method used +.Pq e.g.\& suspend-to-idle or firmware suspend +is determined by the +.Va kern.power.suspend +sysctl. .Sh SEE ALSO .Xr acpi 4 , -.Xr apm 4 , -.Xr acpiconf 8 , +.Xr acpiconf 8 +.Sh HISTORY +The +.Nm +utility first appeared as a shell script in +.Fx 5.1 . +It suspended the system by invoking +.Xr acpiconf 8 +with the suspend state configured via +.Va hw.acpi.suspend_state , +or .Xr apm 8 +on systems without ACPI support. +.Pp +It was rewritten in C in +.Fx 16.0 +to use the generic power management interface provided by +.Pa /dev/power . .Sh AUTHORS -This manual page was written by +The original +.Nm +script was written by +.An Mark Santcroos Aq Mt marks@ripe.net . +This manual page was originally written by .An Nate Lawson Aq Mt njl@FreeBSD.org . +Both the current program and manual page were written by +.An Aymeric Wibo Aq Mt obiwac@FreeBSD.org , +under sponsorship from the +.Fx +Foundation. diff --git a/usr.sbin/zzz/zzz.c b/usr.sbin/zzz/zzz.c new file mode 100644 index 000000000000..a014537720cf --- /dev/null +++ b/usr.sbin/zzz/zzz.c @@ -0,0 +1,47 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2026 The FreeBSD Foundation + * + * This software was developed by Aymeric Wibo + * under sponsorship from the FreeBSD Foundation. + */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +static void +usage(void) +{ + (void)fprintf(stderr, "usage: zzz\n"); + exit(1); +} + +int +main(int argc, char *argv[]) +{ + int powerfd; + enum power_transition trans; + + (void)argv; + if (argc > 1) + usage(); + + powerfd = open(_PATH_DEVPOWER, O_RDWR); + if (powerfd < 0) + err(EX_OSFILE, "could not open power device"); + + trans = POWER_TRANSITION_SUSPEND; + if (ioctl(powerfd, PIOTRANSITION, &trans) != 0) + err(EX_IOERR, "could not request suspend transition"); + + return (EXIT_SUCCESS); +} diff --git a/usr.sbin/zzz/zzz.sh b/usr.sbin/zzz/zzz.sh deleted file mode 100644 index dde36e7984c6..000000000000 --- a/usr.sbin/zzz/zzz.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh -# -# Suspend the system using either ACPI or APM. -# For APM, "apm -z" will be issued. -# For ACPI, the configured suspend state will be looked up, checked to see -# if it is supported, and "acpiconf -s " will be issued. -# -# Mark Santcroos -# - -PATH=/sbin:/usr/sbin:/usr/bin:/bin - -ACPI_SUSPEND_STATE=hw.acpi.suspend_state -ACPI_SUPPORTED_STATES=hw.acpi.supported_sleep_state -APM_SUSPEND_DELAY=machdep.apm_suspend_delay - -# Check for ACPI support -if sysctl $ACPI_SUSPEND_STATE >/dev/null 2>&1; then - # Get configured suspend state - SUSPEND_STATE=$(sysctl -n $ACPI_SUSPEND_STATE) - - # Get list of supported suspend states - SUPPORTED_STATES=$(sysctl -n $ACPI_SUPPORTED_STATES) - - # Check if the configured suspend state is supported by the system - if echo "$SUPPORTED_STATES" | grep "$SUSPEND_STATE" >/dev/null; then - # execute ACPI style suspend command - exec acpiconf -s "$SUSPEND_STATE" - else - echo "Requested suspend state $SUSPEND_STATE is not supported." - echo "Supported states: $SUPPORTED_STATES" - fi -# Check for APM support -elif sysctl $APM_SUSPEND_DELAY >/dev/null 2>&1; then - # Execute APM style suspend command - exec apm -z -else - echo "Error: no ACPI or APM suspend support found." -fi - -exit 1 From nobody Wed May 27 00:36:57 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQ9fy1XjHz6f0sm for ; Wed, 27 May 2026 00:36: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQ9fy0Mgkz3LZ8 for ; Wed, 27 May 2026 00:36:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779842218; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x9uvXhPTAn96YXVQu8qPRkkQ00bUrqwJ5D3tZ658Sbs=; b=gK6lxjno6UszKO0QRlWIhNq78JJxotw8YTwhXdGH+rWpmP5dQKetak31cHcSVlQszvltdp L1jGvnJVWyKl4MZfi9SCxuVJVRspHE1vP4orMRlhRm7afVltomIX/JYsGOK8KU4dpgjuoG 0Agz6LJ72gD6sZgwxLFDVjfIwvSolNMuPfzQJBpwCmER7FlhD3oDyEbbb5AXt8EdTO5b/L XNRkR1a4x0p27VEmFiJXu55Cf2r2giU8JDxPnNIso88TgbuwtVD5T0JWQuMSXIPGVQPL+r Zcibd64k9BBv3qHdBXH1muV7ZYVpHHtoae4lpKWpZNw3q07UICurt3LGQhkwPg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779842218; a=rsa-sha256; cv=none; b=HqyHNGF9gP0WHR8c2FHKy8q1AuoU5jvkOS/pF7f6u8AtwETKdsGvrw9r5rFzQ+kQZ4OcJj Uj5Dx8u0mtzRUltbLWGjSF181/D3dgCR0EUdoSV1SHRri0iW6VpcwyMMYCxMmX4mbrPCpY 0xgJlwnuheMSfS8CsunpptThskl/13JGba6IcyEPBzW4LjIKiifvEZToNB0GJWYfJTuTiJ HFajTgnyMpRABm/492hjuAGk8Q2SgAwr6KBlDHiMpNT4+ocw9zokvTJl1t/opqIrZKnnpP xPIOfjVk7r2I55Lp7dQQ8klJTQAxyhTNTiUUQQ058NwO6sqKGj/B4iO1RfqOGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779842218; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x9uvXhPTAn96YXVQu8qPRkkQ00bUrqwJ5D3tZ658Sbs=; b=ojY9loX5GNJ+rMc5+tOcFoHbH/LTUmTFA7Iwg3RuiQ5rzPnxc5j+et/FooZjXLT92iHwMg 0aeNQoFlvum5/R7d+0PTChdWr6ImKe8YrL9zphwIJ0P3mkCgFGOHFRqFBn2LRtoli7QQfD dpJlHFZTisuZVUEW8gEQJ4eMwZYFPGxScpRI+RNQjoLdEgfWc4q58gQE1PluJrBMcky/GF 0yohQPySuxZl0yjuZk8sHqU0hqNg8a9zPb+g0zb2in1kJ6dgz8U/ow2hpwWJeSdCO57Va9 QG6Kh6hq64bhPfpSVqclSX3fRZChDWoM9JbWGsrBlllNKeAxm9E48NBZqLqLZQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQ9fx6dC5zcgk for ; Wed, 27 May 2026 00:36:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3de69 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 00:36:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 689f7466c1ae - main - nanobsd: Use NANO_IMG1NAME List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 689f7466c1aee7810e6a965e82338c765105a1cf Auto-Submitted: auto-generated Date: Wed, 27 May 2026 00:36:57 +0000 Message-Id: <6a163ca9.3de69.53228e7a@gitrepo.freebsd.org> The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=689f7466c1aee7810e6a965e82338c765105a1cf commit 689f7466c1aee7810e6a965e82338c765105a1cf Author: Jose Luis Duran AuthorDate: 2026-05-27 00:12:48 +0000 Commit: Jose Luis Duran CommitDate: 2026-05-27 00:12:48 +0000 nanobsd: Use NANO_IMG1NAME Do not hard-code _.disk.image, use NANO_IMG1NAME instead. Reviewed by: imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D57040 --- tools/tools/nanobsd/legacy.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/tools/nanobsd/legacy.sh b/tools/tools/nanobsd/legacy.sh index fde4be9c7d5b..6ce477ea0c88 100644 --- a/tools/tools/nanobsd/legacy.sh +++ b/tools/tools/nanobsd/legacy.sh @@ -108,7 +108,7 @@ create_code_slice() { pprint 3 "log: ${NANO_OBJ}/_.cs" ( - IMG=${NANO_DISKIMGDIR}/_.disk.image + IMG=${NANO_DISKIMGDIR}/${NANO_IMG1NAME} MNT=${NANO_OBJ}/_.mnt mkdir -p ${MNT} CODE_SIZE=$(head -n 1 ${NANO_LOG}/_.partitioning | awk '{ print $2 }') @@ -145,8 +145,8 @@ create_code_slice() { nano_umount ${MNT} if [ "${NANO_MD_BACKING}" = "swap" ] ; then - echo "Writing out _.disk.image..." - dd conv=sparse if=/dev/${MD} of=${NANO_DISKIMGDIR}/_.disk.image bs=64k + echo "Writing out ${NANO_IMG1NAME}..." + dd conv=sparse if=/dev/${MD} of=${IMG} bs=64k fi mdconfig -d -u $MD @@ -160,7 +160,7 @@ _create_code_slice() { pprint 3 "log: ${NANO_OBJ}/_.cs" ( - IMG=${NANO_DISKIMGDIR}/_.disk.image + IMG=${NANO_DISKIMGDIR}/${NANO_IMG1NAME} CODE_SIZE=$(head -n 1 "${NANO_LOG}/_.partitioning" | awk '{ print $2 }') CODE_SIZE=$(_xxx_adjust_code_size "$CODE_SIZE") @@ -177,7 +177,7 @@ _create_code_slice() { mkimg -s bsd \ ${bootcode} \ -p freebsd-ufs:="${NANO_OBJ}/_.disk.part" \ - -o "${NANO_DISKIMGDIR}/_.disk.image" + -o "${IMG}" rm -f "${NANO_OBJ}/_.disk.part" ) > ${NANO_OBJ}/_.cs 2>&1 @@ -231,7 +231,7 @@ create_diskimage() { fi echo "Writing code image..." - dd conv=sparse if=${NANO_DISKIMGDIR}/_.disk.image of=/dev/${MD}${NANO_SLICE_ROOT} bs=64k + dd conv=sparse if=${NANO_DISKIMGDIR}/${NANO_IMG1NAME} of=/dev/${MD}${NANO_SLICE_ROOT} bs=64k if [ $NANO_IMAGES -gt 1 -a $NANO_INIT_IMG2 -gt 0 ] ; then # Duplicate to second image (if present) @@ -300,7 +300,7 @@ _create_diskimage() { echo "Image will not be bootable" fi - diskimage="-p freebsd:=${NANO_DISKIMGDIR}/_.disk.image" + diskimage="-p freebsd:=${NANO_DISKIMGDIR}/${NANO_IMG1NAME}" if [ "$NANO_IMAGES" -gt 1 ] && [ "$NANO_INIT_IMG2" -gt 0 ] ; then echo "Duplicating to second image..." From nobody Wed May 27 00:36:58 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQ9fz3Klyz6f0qB for ; Wed, 27 May 2026 00:36: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQ9fz0b2Bz3LZ9 for ; Wed, 27 May 2026 00:36:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779842219; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZIO3i6r/iA288KSnv7VXpwFZQ/iTFO/LnUn4LKgDep8=; b=LlRtbqnjPP16wMkTnR0jtCc5YJOF4SPIzCfPedoK2sRbR964nMX5c3K8xngPrzNiiRYAjR ZDXGxZreC1qnychiRFq1Kls83g+BhpOXZzXJtYFjm6/laIi2vFY2sswCILcz8TETSVzx6D UZqF+NTesxGhgXNTfSd+8iQDI5GWD1qjgFoYGH+ooC5U+neZ41KHJ4+xi4DdDx3xsJuQup dSrvN6c2hXmczTZKy/lKUAgbkGXHU6NWeooGEYVfHYSZjbdGJ7H6ODqkPL7vw5WQrnjKxc QLWros75oktiEgZxAOBfMibeWaRKqgeLoaAjA/c5DnOU+DDDkJahIThEVildxA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779842219; a=rsa-sha256; cv=none; b=GxBBTiMunnBc5y8bdmbt0U2wRC5EjnXaGwXRfiTibdvgdNrab06wfAWqpC9m/+hjK7IVrr nxHRK9a5U0njyngDcuXO9PBhjN8GhCQFfQrXYxIb2dT+nYAFT8xjNeGQJYZdc1wrnoEu4V amqmWuQ1ElHi1e7lpHJ1zLXMLQhzPe1xFRkmPyj57hKuVT0d18/9e03Go7mqtY31v+E167 klL0BvsayP4l5bz+LGFuaqe8lDt1Tytr3z/jDvdTm195pahQvOQVJ1oLjSHPVv+d8seAh1 tytL2xYgcLgQVo+vylDbpkzkmgBXebK4E1p/cfknlvlsddMyfbR5JD1YdaPShg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779842219; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZIO3i6r/iA288KSnv7VXpwFZQ/iTFO/LnUn4LKgDep8=; b=R568XRJiDcam2W5i00jB4hJCjdoS5z6KlkrC5DX0au3ySiKkkJpk7LR6ZHWiViFlfVsySL TCe4SqRCjWz+mRxL2xibL6SMCwL1QVtXO6K2+9qjziSR/sS8z0mwQANmuDpANJp3+agKAT S1dSjEdXCyN9qfshrIgs0fwn7c9ru5SOlKxhOyzSaV5/iXNsEsvk1929C+5teJJi0in24o E4Ytp4K1KA2niOrdh3EgYfrhH6rIDWcyvb3C2Q6aV0U5HWUHHX+2Z/J2q1G9Ax8kWEpddx nyHLL0X50s9brP6Z02l5/B+KSCN41PPB6Atph8UIotNE9rZOdeVE2Dswx4uLpQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQ9fy715Nzclb for ; Wed, 27 May 2026 00:36:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3ffb2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 00:36:58 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 9d133c76402e - main - nanobsd: Get the code size by its partition index List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9d133c76402e769fd63ed838ad641572439cd126 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 00:36:58 +0000 Message-Id: <6a163caa.3ffb2.269c78a7@gitrepo.freebsd.org> The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=9d133c76402e769fd63ed838ad641572439cd126 commit 9d133c76402e769fd63ed838ad641572439cd126 Author: Jose Luis Duran AuthorDate: 2026-05-27 00:13:15 +0000 Commit: Jose Luis Duran CommitDate: 2026-05-27 00:13:15 +0000 nanobsd: Get the code size by its partition index Previously the code was assumed to be on the on the first line of the _.partitioning file. Instead, explicitly look up the size by its partition index to make the parsing order-independent. The _.partitioning file: 1. First column: starting sector. 2. Second column: size in 512-byte sectors. 3. Third column: partition index. Get the code size by explicitly selecting when the partition index is 1. Reviewed by: imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D57216 --- tools/tools/nanobsd/legacy.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/tools/nanobsd/legacy.sh b/tools/tools/nanobsd/legacy.sh index 6ce477ea0c88..efe49bbf692c 100644 --- a/tools/tools/nanobsd/legacy.sh +++ b/tools/tools/nanobsd/legacy.sh @@ -111,7 +111,7 @@ create_code_slice() { IMG=${NANO_DISKIMGDIR}/${NANO_IMG1NAME} MNT=${NANO_OBJ}/_.mnt mkdir -p ${MNT} - CODE_SIZE=$(head -n 1 ${NANO_LOG}/_.partitioning | awk '{ print $2 }') + CODE_SIZE=$(awk '$3 == 1 {print $2}' "${NANO_LOG}/_.partitioning") if [ "${NANO_MD_BACKING}" = "swap" ] ; then MD=$(mdconfig -a -t swap -s ${CODE_SIZE} -x ${NANO_SECTS} \ @@ -161,7 +161,7 @@ _create_code_slice() { ( IMG=${NANO_DISKIMGDIR}/${NANO_IMG1NAME} - CODE_SIZE=$(head -n 1 "${NANO_LOG}/_.partitioning" | awk '{ print $2 }') + CODE_SIZE=$(awk '$3 == 1 {print $2}' "${NANO_LOG}/_.partitioning") CODE_SIZE=$(_xxx_adjust_code_size "$CODE_SIZE") echo "Writing code image..." @@ -290,7 +290,7 @@ _create_diskimage() { ( local altroot bootloader cfgimage dataimage diskimage - CODE_SIZE=$(head -n 1 "${NANO_LOG}/_.partitioning" | awk '{ print $2 }') + CODE_SIZE=$(awk '$3 == 1 {print $2}' "${NANO_LOG}/_.partitioning") CODE_SIZE=$(_xxx_adjust_code_size "$CODE_SIZE") IMG=${NANO_DISKIMGDIR}/${NANO_IMGNAME} From nobody Wed May 27 00:37:00 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQ9g02pxHz6f0lF for ; Wed, 27 May 2026 00:37: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQ9g011Xwz3LQ3 for ; Wed, 27 May 2026 00:37:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779842220; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VwQ9ek7D2tgIbXRiuAL2pR+sMfgsFrzDC52oyRqszWw=; b=rLwI1vqJkyoA8nl0MOmRP/E0YAOxo0YIGtij5Ol7cQcwak5T69lhRuq5ZbG/iz5/Crr1dq 5UxxmbX9DmXHh9aLLQCFYm/pxVRALOVsBcZPbrrJau0cQv0c3my9K7Ypzly7BRa1G/aGFK lW+VWqVQiLCLQiNKSafrqUf2cMgy1hGDmtfufB/sNZaeN3K2ZduNngJlZhLVDZCh7UL3sn Iz0QhADnlWmmXGIvk7iedC7s/JfnKfGEcc+zKW668jyPgxOUTF8+HTJMiln4fkp20ifL/o D4hPtLQRZP7iAOGKcOa2wqWbi8mftNy27pMApobcDOeMh/HcKTecSFrQvuly3g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779842220; a=rsa-sha256; cv=none; b=t7MK58OjkxxD6kwQubLkxplxN7FVgBFnXi35Ay1oVTAP2LvJnmA/awiutb7vhgP+Wwc/De VPEHA8ff6hr4zZw6ePaLG8jDo0wb0SXcqxRNvBrAVT05T2ap2H+sHgcM2qlanUEpdJqY4s vCHa49HebSfjs/gcywfyYZxCbRrQJpZMh7MKGPawu95m0LjfoJK0f4ElxH+Z2vROBefGEt 1alH137Dg2wlgE/MqVLNJoO/iU0BkuXwgTQdYiIyqzPiITr40bUNGG4VatFQqk1eYktBzJ qPDbD8oZTrUtyZq7TbOay+ZbgBumE3ymZlXkQpuOOvgu67n1AF7ArGqPmgspig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779842220; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VwQ9ek7D2tgIbXRiuAL2pR+sMfgsFrzDC52oyRqszWw=; b=F/vliPEZQnV1p065jgzf+s4TludAx9Voyj3YDKEej3vGislDXAV5r8vwY32eJRjYBgbm0n SeN2ea+Hpk4DLjKCWDdVgezClZiHXDmrBNsaK3tCc0INjw7qjNJI4FqMFQSkU8fN7uicj2 +Ev5IQqIq6OCvHenlMw/vFc0Q9+tXjku9DRTDwnYslyq1zXbT3DMsmxMAp9P+pZC5x4RBd 4U7YKHkB02jNmdiaKVUJDgiOs0EIDkbsoP2PyenjvkSyF4kY+2W9A6rm7oiuiHP3y48M1Z IYkiWH5ugx6O/Qy60e0ZBRaNk50fsQ8kEKyjy7YtJ051/u7Jhsr1MLWtv3FqZQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQ9g00Jg5zcgm for ; Wed, 27 May 2026 00:37:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3fd16 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 00:37:00 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: d2a9ad033c3c - main - nanobsd: Remove spurious exit call List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d2a9ad033c3cb42b3b2a888baf63374b613df03e Auto-Submitted: auto-generated Date: Wed, 27 May 2026 00:37:00 +0000 Message-Id: <6a163cac.3fd16.4b945b71@gitrepo.freebsd.org> The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=d2a9ad033c3cb42b3b2a888baf63374b613df03e commit d2a9ad033c3cb42b3b2a888baf63374b613df03e Author: Jose Luis Duran AuthorDate: 2026-05-27 00:13:47 +0000 Commit: Jose Luis Duran CommitDate: 2026-05-27 00:13:47 +0000 nanobsd: Remove spurious exit call Reviewed by: imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D57217 --- tools/tools/nanobsd/legacy.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/tools/nanobsd/legacy.sh b/tools/tools/nanobsd/legacy.sh index efe49bbf692c..ac9cf4a3abe9 100644 --- a/tools/tools/nanobsd/legacy.sh +++ b/tools/tools/nanobsd/legacy.sh @@ -351,7 +351,6 @@ _create_diskimage() { ${cfgimage} \ ${dataimage} \ -o ${IMG} - exit ) > ${NANO_LOG}/_.di 2>&1 } From nobody Wed May 27 00:36:56 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQ9g21PGNz6f0mn for ; Wed, 27 May 2026 00:37: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQ9g16Mclz3Ln5 for ; Wed, 27 May 2026 00:37:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779842221; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ghwd0KN8xBHXlWzV83znHJJUd1+ZuuXPlV1Kw2Rz14Q=; b=tD7rYkLdL7T3YLbtMzhHdS8Da1zRpmsa+Vs1H1dlEzLVptZ29Cq+WGtP6HAePJagdgZrnr 7txfTbxA5ZbfQwqafNKvHFzG1p+W0cPM9ghKdwbFdf/Noa6GJr9HHOC2LKU6HEFHjwCjWu Ag9WbVMFY50eL11BJerk34YmphjGQ6x1YID9PApjBq7sCDObMfekjj2PDdUZqebkh7dg8i 1BirsbGaDBe/PnHCK3stZXWhJ2pNRPbO4n/H9SH6myWcw/fsY0XR88RW9VnYB5O9jACuss k9qTwIcN10XyeX3wWWYC5kF+SpPmGjJyXWw21FBF+TJxlt1px7CJktNWFpVe0g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779842221; a=rsa-sha256; cv=none; b=ZPiHbGl4EF2nRJEuAsz/VQN8ERO0p/kjPrRwG9G5r83Zj+Ib91XUue2QilOVj8pDSvU/V0 pQboRzg8VoVwsAL2myENPCSieNBp4rw5knE1VPQKTATb2ANCWWCCsF7dydz/2YF1uK/ksR XBH8cA6s+N4exALHRUsn88YOUgmN92AMvkW8ofSKbhfJ4FG3xskDInD2Zbu5cYo04Mb33L 62zvz7uygF1/appKect0jHpdii8huu2Z3xNz18hUBF8fcDKIqCiRQjNRMCqOMIPfi8c3C9 dTb9yLtjlJoJBT58z99wgT3i2UPKqGye0gJbyPL0cJg4Q4tXmgCyIJQ3PhSXUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779842221; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ghwd0KN8xBHXlWzV83znHJJUd1+ZuuXPlV1Kw2Rz14Q=; b=UjjCwPw2jCFWB1McMjDr2GRpBmpGk5c3YGhMpZ5ubf1aidCZz8W2WjWGTatzyV8veDmxv1 Jl9pyoY7VTzGYkmt4ZmedhoPF8V+j7zdmjLb+q+22FUOjSHCpnu562nXwmGhsqfe4mS8b4 NQtyKVhozavccYfrDoteNpkGxHCmnMzw12wbwgJSLz0K1v8Dv6SOPpzwdqgB7s4oDwz0Ld E6UyXvlPjMf3DYDLS/Za5BXvuoz5LSgBxijac0bv5N4nWDM3kISDaFYogZPupPZA/2B9jl 61nVydQVfUdJiTiPZofPO6kqEJmaUiLwH2Da2T7yML8o/YfKo4PriCMRN+uoRA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQ9g15p2xzcQb for ; Wed, 27 May 2026 00:37:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 18617 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 00:36:56 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 1dac971fbdfb - main - nanobsd: Minor style fixes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1dac971fbdfbe0acc8289eceddc383172a9aac44 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 00:36:56 +0000 Message-Id: <6a163ca8.18617.45310add@gitrepo.freebsd.org> The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=1dac971fbdfbe0acc8289eceddc383172a9aac44 commit 1dac971fbdfbe0acc8289eceddc383172a9aac44 Author: Jose Luis Duran AuthorDate: 2026-05-27 00:12:07 +0000 Commit: Jose Luis Duran CommitDate: 2026-05-27 00:12:07 +0000 nanobsd: Minor style fixes - Use $(...) notation instead of legacy backticked `...` - Use tabs for indentation - Indent continuation lines with 4 spaces Reviewed by: imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D57039 --- tools/tools/nanobsd/legacy.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tools/tools/nanobsd/legacy.sh b/tools/tools/nanobsd/legacy.sh index 06dce15ffa0a..fde4be9c7d5b 100644 --- a/tools/tools/nanobsd/legacy.sh +++ b/tools/tools/nanobsd/legacy.sh @@ -111,17 +111,17 @@ create_code_slice() { IMG=${NANO_DISKIMGDIR}/_.disk.image MNT=${NANO_OBJ}/_.mnt mkdir -p ${MNT} - CODE_SIZE=`head -n 1 ${NANO_LOG}/_.partitioning | awk '{ print $2 }'` + CODE_SIZE=$(head -n 1 ${NANO_LOG}/_.partitioning | awk '{ print $2 }') if [ "${NANO_MD_BACKING}" = "swap" ] ; then - MD=`mdconfig -a -t swap -s ${CODE_SIZE} -x ${NANO_SECTS} \ - -y ${NANO_HEADS}` + MD=$(mdconfig -a -t swap -s ${CODE_SIZE} -x ${NANO_SECTS} \ + -y ${NANO_HEADS}) else echo "Creating md backing file..." rm -f ${IMG} dd if=/dev/zero of=${IMG} seek=${CODE_SIZE} count=0 - MD=`mdconfig -a -t vnode -f ${IMG} -x ${NANO_SECTS} \ - -y ${NANO_HEADS}` + MD=$(mdconfig -a -t vnode -f ${IMG} -x ${NANO_SECTS} \ + -y ${NANO_HEADS}) fi trap "echo 'Running exit trap code' ; df -i ${MNT} ; nano_umount ${MNT} || true ; mdconfig -d -u $MD" 1 2 15 EXIT @@ -129,10 +129,10 @@ create_code_slice() { gpart create -s bsd "${MD}" gpart add -t freebsd-ufs -b 16 "${MD}" if [ -f ${NANO_WORLDDIR}/boot/boot ]; then - echo "Making bootable partition" - gpart bootcode -b ${NANO_WORLDDIR}/boot/boot ${MD} + echo "Making bootable partition" + gpart bootcode -b ${NANO_WORLDDIR}/boot/boot ${MD} else - echo "Partition will not be bootable" + echo "Partition will not be bootable" fi gpart list ${MD} @@ -194,14 +194,14 @@ create_diskimage() { mkdir -p ${MNT} if [ "${NANO_MD_BACKING}" = "swap" ] ; then - MD=`mdconfig -a -t swap -s ${NANO_MEDIASIZE} -x ${NANO_SECTS} \ - -y ${NANO_HEADS}` + MD=$(mdconfig -a -t swap -s ${NANO_MEDIASIZE} -x ${NANO_SECTS} \ + -y ${NANO_HEADS}) else echo "Creating md backing file..." rm -f ${IMG} dd if=/dev/zero of=${IMG} seek=${NANO_MEDIASIZE} count=0 - MD=`mdconfig -a -t vnode -f ${IMG} -x ${NANO_SECTS} \ - -y ${NANO_HEADS}` + MD=$(mdconfig -a -t vnode -f ${IMG} -x ${NANO_SECTS} \ + -y ${NANO_HEADS}) fi awk ' From nobody Wed May 27 00:37:01 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQ9g15cdjz6f0mm for ; Wed, 27 May 2026 00:37: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQ9g12YTwz3Ln4 for ; Wed, 27 May 2026 00:37:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779842221; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B0WCjbN9FExl27S5Dg3M9gA8h4TfMDqEqL7ksfLSVPA=; b=pjq/QDBhlw1MF9QzOD3+Mo1hU0oF/njiEXNEh/1qYmK66F6NuMMcIrx17ulMhAn/kuCP8G aAakXHcDMnXtiN65yp+XN3eT1RN6uUZnyNpzel9NcT5nKOF1a0PbYIhk6PrSCwUer6T2xD Pun/84f54TsWkfzv9jjS9NSHhRpckqVTDNUHBeKMahc1Wt+SfPfXbmop85A4zEwhKqMGgz j3CzbbK/30FoIaRiRPlHPuW+u1LYgEfvk1WZ+LwY85eErwmV/9BxDeEzhzzUE1EDqkkUWu kg0t47GTGIOMCiKY4WNSHlOjZzvVMs5BgRTDot7UiFLYVMnQjWazJoQWljCO/Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779842221; a=rsa-sha256; cv=none; b=VxwlOGwp5xUW7ic8t/mOgz3NMjJGWd1YGmZrU2r8FX/a7zDocmXnTUSk6lqapF5miPMmVN T/omxqqk8ahyKxARTDoryguphrDcI84jYBiTURNRw/xZx2J3tZdMK6ezcIPo00eq6PH1U2 FjSLIcRv7wpdRFvrKRUHXD0GjrvI8iLw73tLRCOicXweFKpVVD0EgA/+qXtv1eN20Ngov+ 4KNs5shfCGGajC70yx3jT8kUK1wdVtgV1HO2AHLPWtE1sLUvsFUFMOE8f6O98Ktctrplmu gy1IoIgA+BNt+w/ozLRfZ9XXhFqW+ZaQnBdCbItfgrksUQhEp/ybABvptGcM5A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779842221; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B0WCjbN9FExl27S5Dg3M9gA8h4TfMDqEqL7ksfLSVPA=; b=r8n7NBMY/pyZctPl3fVY0xUKtZ90xF6DEemBaCx+wbc2Yf47/4vWV1ddBDEvIfKirKjDd7 rYb1zm3GYuhjRjIniEE3QO+Ib2GDKqx7R2IbEPdV9kRjOuOAXyNsfxXAX2cI48TIzizLOG Y16XqxRfOVXczENog3Q8PdLd9R5dq40/dIsalslFpxN71fAMo3R01RQEGNgMbQfPE7dCK2 cFjvUCPG+nPHLJ9OgTwnbNNtLhHbD3oVio56a/welOvvUZDlcVeRYguKTm0A/MgNRrsSJV k6C4eariRTOyO4K9SCCjBSNjF+7uZ+s6RYN2diubhe7rvaAhsmNUFozia2qEDw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQ9g116J4zcWX for ; Wed, 27 May 2026 00:37:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3ef3a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 00:37:01 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: beddf2c59173 - main - nanobsd: Use rounded sizes for cfg and data slices List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: beddf2c591739a43e36c339b393e0beb3878d01a Auto-Submitted: auto-generated Date: Wed, 27 May 2026 00:37:01 +0000 Message-Id: <6a163cad.3ef3a.260a82f5@gitrepo.freebsd.org> The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=beddf2c591739a43e36c339b393e0beb3878d01a commit beddf2c591739a43e36c339b393e0beb3878d01a Author: Jose Luis Duran AuthorDate: 2026-05-27 00:14:09 +0000 Commit: Jose Luis Duran CommitDate: 2026-05-27 00:14:09 +0000 nanobsd: Use rounded sizes for cfg and data slices Use the calculated (rounded up) cfg and data sizes from the _.partitioning file, instead of consuming them directly from the global variables. We obtain the size of the cfg and data slices by explicitly searching for index 3 and 4 respectively in the _.partitioning file. This ensures that the final image has the rounded-up sizes, and not the raw sizes. Reviewed by: imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D57219 --- tools/tools/nanobsd/legacy.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/tools/nanobsd/legacy.sh b/tools/tools/nanobsd/legacy.sh index ac9cf4a3abe9..670a2f5ca968 100644 --- a/tools/tools/nanobsd/legacy.sh +++ b/tools/tools/nanobsd/legacy.sh @@ -292,6 +292,8 @@ _create_diskimage() { CODE_SIZE=$(awk '$3 == 1 {print $2}' "${NANO_LOG}/_.partitioning") CODE_SIZE=$(_xxx_adjust_code_size "$CODE_SIZE") + CONF_SIZE=$(awk '$3 == 3 {print $2}' "${NANO_LOG}/_.partitioning") + DATA_SIZE=$(awk '$3 == 4 {print $2}' "${NANO_LOG}/_.partitioning") IMG=${NANO_DISKIMGDIR}/${NANO_IMGNAME} if [ -f "${NANO_WORLDDIR}/${NANO_BOOTLOADER}" ]; then @@ -327,7 +329,7 @@ _create_diskimage() { # Create Config slice _populate_cfg_part "${NANO_OBJ}/_.cfg.part" "${NANO_CFGDIR}" \ - "${NANO_SLICE_CFG}" "${NANO_CONFSIZE}" "${NANO_METALOG_CFG}" + "${NANO_SLICE_CFG}" "${CONF_SIZE}" "${NANO_METALOG_CFG}" cfgimage="-p freebsd:=${NANO_OBJ}/_.cfg.part" # Create Data slice, if any. @@ -339,7 +341,7 @@ _create_diskimage() { fi if [ "${NANO_DATASIZE}" -ne 0 ] && [ -n "${NANO_SLICE_DATA}" ] ; then _populate_data_part "${NANO_OBJ}/_.data.part" "${NANO_DATADIR}" \ - "${NANO_SLICE_DATA}" "${NANO_DATASIZE}" "${NANO_METALOG_DATA}" + "${NANO_SLICE_DATA}" "${DATA_SIZE}" "${NANO_METALOG_DATA}" dataimage="-p freebsd:=${NANO_OBJ}/_.data.part" fi From nobody Wed May 27 00:37:02 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQ9g24b99z6f0t9 for ; Wed, 27 May 2026 00:37: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQ9g225QVz3LlT for ; Wed, 27 May 2026 00:37:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779842222; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wXaFe3dXTR6XLIB+ELjx9lrFacjRAlrXcL02rnjoMQA=; b=xX8+fl10mt7rhdExR6WmROHprnQH1iD1Pz5Oikv11GBpdrEqUo4/Le2BlwMfRJBcJV2Tz1 spYueSNo9/J1A6XnxdaWfQqcJY9dcjxSJtJJZ/r3k6dWnurpW1rL2phrpxTbpVBFfGZD7S oJGSxUJY4iVNHL8pipMWm/2EoC2i9naiOgKPV1Tdr7qf4RV9+iikCfYobHgt6mcwiExg2W ALbzIMsI7X+ofNjwth8DtUmsDef8i70fbWtRlL41VSpXpXgnWfXWzPm5R1AdmaFKyyIEYY 1z9C/k5j2VCh99Hkq+qK9iHz4Q+XnlBuStIcsrDlSat0a0wJ5wz5lpbzowq32w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779842222; a=rsa-sha256; cv=none; b=G3/FveiiPBkvL57fc0s0VbVZB1fWaWukyvCz9u0rB/hjw5w2iTUnm422je6DI3lqayhSqn x+61BhGZHYEpcPT3YrhAeCSnnhFCMMYZDHak5Jihw/U/9Tz3FP33mxuaLIp1j2QqulkGIF MtK4ZWKrYP1TTF+20sOt5gTo+OE3F/TLa5uj6JDK5C8zyaoTx/sippCmXJzH/85n0QSZCd ig2iJTm9JVKAtCheTzipg1UQYGe03VGjhsyNh8rE3kE3bpmDS3TUK2yOiTDR0xjnnsMCS1 2f8S3c8rJqGC0cFaxfNPPO8rJln11KRAM3qVsyd1eT3t4uRce+mZsD5cT/iTgg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779842222; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wXaFe3dXTR6XLIB+ELjx9lrFacjRAlrXcL02rnjoMQA=; b=ABDzeT72i+nAGRBCbhLIhs3uPGfPzrlFGq4yBFAJV1lXyuxZhnHci2KjJHaba+zSUGMLfK BjSUQYP8L64lC6raDpAJ9zt2acC8mPxjYSlIAe3il1glBeoroz2mDUpwTfZjJIsOyloZRP uwz8+ihvvSeU6sbOLo8tzM1gCjIWlTq0/N1AxLCnOB42yUMDhKsqKQMjvfIjxQQu5vL0lt zbgnO8+b443Xz8zeCzjCnj0ArROZ8vLuF7CkH+cgSiMcClS7WB0i90MtG4EUTkQIEFk3qr y7VF+fd2khRU2wLzRaJRBrZDmL5tQY2fZa3KBLOY69iiX/rtONUem2Wm3owlpA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQ9g21dPGzcPj for ; Wed, 27 May 2026 00:37:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3fc9c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 00:37:02 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: dadbbccd8049 - main - nanobsd: Account for metadata overhead in code slice List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dadbbccd804980895a098b01f553b5f7193daa81 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 00:37:02 +0000 Message-Id: <6a163cae.3fc9c.3976a787@gitrepo.freebsd.org> The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=dadbbccd804980895a098b01f553b5f7193daa81 commit dadbbccd804980895a098b01f553b5f7193daa81 Author: Jose Luis Duran AuthorDate: 2026-05-27 00:14:56 +0000 Commit: Jose Luis Duran CommitDate: 2026-05-27 00:14:56 +0000 nanobsd: Account for metadata overhead in code slice The code slice size (CODE_SIZE) includes 16 sectors reserved for disk metadata (see bsdlabel(8) offset). Subtract these 16 sectors from the total size passed to nano_makefs. This prevents the generated filesystem from consuming the entire slice allocation, ensuring there is enough space for the metadata without overflowing the partition boundary. Reviewed by: imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D57220 --- tools/tools/nanobsd/legacy.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tools/tools/nanobsd/legacy.sh b/tools/tools/nanobsd/legacy.sh index 670a2f5ca968..8e57163c030d 100644 --- a/tools/tools/nanobsd/legacy.sh +++ b/tools/tools/nanobsd/legacy.sh @@ -31,6 +31,10 @@ [ -n "$NANO_SECTS" ] || NANO_SECTS=63 [ -n "$NANO_HEADS" ] || NANO_HEADS=16 +# The first partition should start at offset 16, +# because the first 16 sectors are reserved for metadata. +METADATA_SECTS=16 + # Functions and variable definitions used by the legacy nanobsd # image building system. @@ -127,7 +131,7 @@ create_code_slice() { trap "echo 'Running exit trap code' ; df -i ${MNT} ; nano_umount ${MNT} || true ; mdconfig -d -u $MD" 1 2 15 EXIT gpart create -s bsd "${MD}" - gpart add -t freebsd-ufs -b 16 "${MD}" + gpart add -t freebsd-ufs -b "${METADATA_SECTS}" "${MD}" if [ -f ${NANO_WORLDDIR}/boot/boot ]; then echo "Making bootable partition" gpart bootcode -b ${NANO_WORLDDIR}/boot/boot ${MD} @@ -172,8 +176,8 @@ _create_code_slice() { echo "Partition will not be bootable" fi nano_makefs "-DxZ ${NANO_MAKEFS} -o minfree=0,optimization=space" \ - "${NANO_METALOG}" "${CODE_SIZE}" "${NANO_OBJ}/_.disk.part" \ - "${NANO_WORLDDIR}" + "${NANO_METALOG}" "$(( CODE_SIZE - METADATA_SECTS ))" \ + "${NANO_OBJ}/_.disk.part" "${NANO_WORLDDIR}" mkimg -s bsd \ ${bootcode} \ -p freebsd-ufs:="${NANO_OBJ}/_.disk.part" \ @@ -308,8 +312,8 @@ _create_diskimage() { echo "Duplicating to second image..." tgt_switch_root_fstab "${NANO_SLICE_ROOT}" "${NANO_SLICE_ALTROOT}" nano_makefs "-DxZ ${NANO_MAKEFS} -o minfree=0,optimization=space" \ - "${NANO_METALOG}" "${CODE_SIZE}" "${NANO_OBJ}/_.altroot.part" \ - "${NANO_WORLDDIR}" + "${NANO_METALOG}" "$(( CODE_SIZE - METADATA_SECTS ))" \ + "${NANO_OBJ}/_.altroot.part" "${NANO_WORLDDIR}" tgt_switch_root_fstab "${NANO_SLICE_ALTROOT}" "${NANO_SLICE_ROOT}" if [ -f "${NANO_WORLDDIR}/boot/boot" ]; then bootcode="-b ${NANO_WORLDDIR}/boot/boot" From nobody Wed May 27 00:37:04 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQ9g473ktz6f0tC for ; Wed, 27 May 2026 00:37: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQ9g440Tjz3Lty for ; Wed, 27 May 2026 00:37:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779842224; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WP05kPHp1J6tUqPZACqUYdZVmj1AbOwqmCVBcQre9RI=; b=Qi4ak6LlXayXsUK1hQAtBCqR1rNR4smBaSbhC5wCpxLOHvxccNz9qRxBc5m2kSmo3DP1J/ OSujO2xEZheX7CNBQkYnDfXyiMJuIzo+KgjJuID4eBjkUqXnPuJPcRlKJ3BA7O9YNj2KFi 1u9m70encDVgAJpElNKLcpar9dABovgoIMl7xChPLB9NffgowvlUglMMf9+DgMxfa9A9NR VVGLXYrvnVo7Ss6221SSze9eO57mH/+J9rfjeQvpaca4t5hviEQL/Y7GtOzAh0/OQ757zf yL3d2XL7pfgRha13AYv5nNzzQWoFewWwvJupBcITjkLhsNy8Cz52gA2SEqNIMg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779842224; a=rsa-sha256; cv=none; b=Uabs4ihrKxAdbrXH7WlT3E3p3U3VyRfFw/g1uVugvxiN97wmZhxGlP5y6luQPcNJDJqS1M SEOWZcjLX7rBfHTJZyWZbNSrT3OGwoBC37QEhDbaobeUSgiwlUScT6gf+yuS83Go+2vYe7 TcSOemaRMIADTImXohlvag1OFVl1NBOVD+nS0zJNd4kgdZ7RwKYkucPhswpbB/uWvnM4DF WaS7gN5Crf7bD4+883FIjaUPVDuh5pxh5pwUHEvkr8Tj+GIxN9fYQWsOmvQW+719FP4Zbi ib803lcOzGlgF06gw++pFnwFnn4ZeMQCCbqyTO2zDqOkkXF+mBrDnCyeSQEtfA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779842224; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WP05kPHp1J6tUqPZACqUYdZVmj1AbOwqmCVBcQre9RI=; b=ExWy40sEXNZUggW2ta0FjkCexqLxAxM9EyIXO5sJULTBRvpLZNV23QszbXApgNtHFyQE6K 7nMXNT2PsIsTwxzRVS9Ez18YWZSY0iet5E0yXgmCL7rSoYdM5Y6a2phzXBs0hn7gGUk2k7 +C2qCo8mZNOJPDeeHceGsMKQh8td6eVLsGDG8KX+Eo6OztPoeet+DdGGIgy9GvqnELz8zv OAfZQMN1KVgRGMi78+R90SRoGFIibRQW+fUgP10pvhfQNREB9WNbS5xgA0tWW5wN9Y3DxQ L8boNrq06B/GePe78xh2lWSwFI8KXmI89qFTvsV9G7wA2vc+DgKeqPH4NE1Dnw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQ9g43Mv8zcQf for ; Wed, 27 May 2026 00:37:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3fca0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 00:37:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 318a85d4b201 - main - nanobsd: Explicitly set image size and secsz in mkimg List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 318a85d4b201b1cb77f25c8a98d2b0687e8259e5 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 00:37:04 +0000 Message-Id: <6a163cb0.3fca0.379fe6f2@gitrepo.freebsd.org> The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=318a85d4b201b1cb77f25c8a98d2b0687e8259e5 commit 318a85d4b201b1cb77f25c8a98d2b0687e8259e5 Author: Jose Luis Duran AuthorDate: 2026-05-27 00:21:57 +0000 Commit: Jose Luis Duran CommitDate: 2026-05-27 00:21:57 +0000 nanobsd: Explicitly set image size and secsz in mkimg When building an unprivileged NanoBSD image, explicitly set the desired image size, by passing --capacity to mkimg in bytes, and the logical sector size (-S) to 512 bytes. Reviewed by: imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D57222 --- tools/tools/nanobsd/legacy.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/tools/nanobsd/legacy.sh b/tools/tools/nanobsd/legacy.sh index 763f65c4dbdc..1d7a0cef2fed 100644 --- a/tools/tools/nanobsd/legacy.sh +++ b/tools/tools/nanobsd/legacy.sh @@ -178,7 +178,7 @@ _create_code_slice() { nano_makefs "-DxZ ${NANO_MAKEFS} -o minfree=0,optimization=space" \ "${NANO_METALOG}" "$(( CODE_SIZE - METADATA_SECTS ))" \ "${NANO_OBJ}/_.disk.part" "${NANO_WORLDDIR}" - mkimg -s bsd \ + mkimg -s bsd -S 512 --capacity $(( CODE_SIZE * 512 )) \ ${bootcode} \ -p freebsd-ufs:="${NANO_OBJ}/_.disk.part" \ -o "${IMG}" @@ -318,7 +318,7 @@ _create_diskimage() { if [ -f "${NANO_WORLDDIR}/boot/boot" ]; then bootcode="-b ${NANO_WORLDDIR}/boot/boot" fi - mkimg -s bsd \ + mkimg -s bsd -S 512 --capacity $(( CODE_SIZE * 512 )) \ ${bootcode} \ -p freebsd-ufs:="${NANO_OBJ}/_.altroot.part" \ -o "${NANO_OBJ}/_.altroot.image" @@ -350,7 +350,7 @@ _create_diskimage() { fi echo "Writing out ${NANO_IMGNAME}..." - mkimg -s mbr \ + mkimg -s mbr -S 512 --capacity $(( NANO_MEDIASIZE * 512 )) \ ${bootloader} \ ${diskimage} \ ${altroot} \ From nobody Wed May 27 00:37:03 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQ9g417Gxz6f0ms for ; Wed, 27 May 2026 00:37: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQ9g333K0z3Llh for ; Wed, 27 May 2026 00:37:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779842223; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u8AfzvQ3HG40YVVi3kBonRe/x2kIkenwvovDdPzwQcs=; b=CQ0f8UoJf6PqeoeKAQRCTGJ1m8zb8a4AIGlk8kldw8SUmQgSPEgNo4lVBQt2V/EUqRgckW 69fxP2xLFoLV/nlYfjUbg3qBiosh8v2cLiX/gbTH37nqXNjfbnI1aMCrfSCQf5LjDOWnLK 4OGXIOmtpuANI22fx53VG6XSbdzEmmzGLzinVLat/6xuwpb8esgDPzf/iBU4RE66codX5R gXW2VUEQNp6m0i81/72NYEhBnbPwkfb2pIqaylGx6361/anCda5CWub2LIwSLR6LZevXdv PWCWxyzW73il+Ii3WpDWmOEEvcyTnu8G/IQkUdfqi8OOh2Ahlh9HmWZUtkJaqg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779842223; a=rsa-sha256; cv=none; b=O+P0ghOTogGYu3bpp5Vs7NevwfvS4A7mOL1XMzZJpMmORM168WmxOBoEjevcwfLI5m+PL7 vWX/bE8qpcrj9KVTbjdSFw2M8HUVzppaOUAFkF2gsWYMYAMaElEY86XBrzsOmfdvCY8Pp1 HPh4jXHybSIl+XixKUO0B8sXCQ2QTwDg9uqi1Glq++Xicik2pPC1gltsMkDtNA0DnH3xZP S/QRHaUk4reEx5HZO80K9NIp5iS6YuGnzkTLFbLBKjUAeBiYX7VAQwyNFQH3uwxr7CeyIj 14kPbJBFfLTyZaUIR0OdMNhDttnLNh6wditLHcXMuPnvleGqgLVTKbw0o9KK9g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779842223; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u8AfzvQ3HG40YVVi3kBonRe/x2kIkenwvovDdPzwQcs=; b=KvEP712hRNbKje2TPTzyOgQpCYXOXEMWU9uNxioLP6mY/LdzH8ogBtRmR4OR7K1XvS16/X xkIytDRB+E2OiQnvEzCbwlWo6u0FC84CBX6U6RE7qVg6JrcE3Ma06k2RvS6Rw4MtCJ8Brp 69nDX0HQ8zTjXiKeltmppgR28ZeOeRmmJo6060cA1IeAGGo77B1zI5Ng+ehraKqL0WxEry dFbGlKuDZKI/E9ooOsBCRVbheV120BFSK1cLYdlRB8Fvku3zhfOC3zdBS7fi8DcAHKUwRi S4NW0t6XkiCPViBRcJTUT3v183kAXFTXhMYfbld2s0WNIsZZe6zmsXLRuEoc1w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQ9g32S1TzcPk for ; Wed, 27 May 2026 00:37:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3fdb6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 00:37:03 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: f1de49f50871 - main - nanobsd: Offset code partition to a track boundary List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f1de49f508714b024ac6f3a60845108f81c7aee7 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 00:37:03 +0000 Message-Id: <6a163caf.3fdb6.283217ed@gitrepo.freebsd.org> The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=f1de49f508714b024ac6f3a60845108f81c7aee7 commit f1de49f508714b024ac6f3a60845108f81c7aee7 Author: Jose Luis Duran AuthorDate: 2026-05-27 00:15:39 +0000 Commit: Jose Luis Duran CommitDate: 2026-05-27 00:15:39 +0000 nanobsd: Offset code partition to a track boundary Ensure the primary and secondary code partitions start at a proper track boundary by applying a NANO_SECTS offset in bytes. While track-boundary alignment is largely obsolete on modern storage, this change maintains compatibility with current images (legacy). A future commit will transition to 1 MiB alignment boundaries. Reviewed by: imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D57221 --- tools/tools/nanobsd/legacy.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/tools/nanobsd/legacy.sh b/tools/tools/nanobsd/legacy.sh index 8e57163c030d..763f65c4dbdc 100644 --- a/tools/tools/nanobsd/legacy.sh +++ b/tools/tools/nanobsd/legacy.sh @@ -306,7 +306,7 @@ _create_diskimage() { echo "Image will not be bootable" fi - diskimage="-p freebsd:=${NANO_DISKIMGDIR}/${NANO_IMG1NAME}" + diskimage="-p freebsd:=${NANO_DISKIMGDIR}/${NANO_IMG1NAME}:$(( NANO_SECTS * 512 ))" if [ "$NANO_IMAGES" -gt 1 ] && [ "$NANO_INIT_IMG2" -gt 0 ] ; then echo "Duplicating to second image..." @@ -322,13 +322,13 @@ _create_diskimage() { ${bootcode} \ -p freebsd-ufs:="${NANO_OBJ}/_.altroot.part" \ -o "${NANO_OBJ}/_.altroot.image" - altroot="-p freebsd:=${NANO_OBJ}/_.altroot.image" + altroot="-p freebsd:=${NANO_OBJ}/_.altroot.image:+$(( NANO_SECTS * 512 ))" rm -f "${NANO_OBJ}/_.altroot.part" else altroot="-p-" fi if [ "${NANO_INIT_IMG2}" -eq 0 ]; then - altroot="-p freebsd::${CODE_SIZE}b" + altroot="-p freebsd::${CODE_SIZE}b:+$(( NANO_SECTS * 512 ))" fi # Create Config slice From nobody Wed May 27 00:37:06 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQ9g70DsPz6f0qY for ; Wed, 27 May 2026 00:37: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQ9g65l1pz3LmC for ; Wed, 27 May 2026 00:37:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779842226; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V1Q29aN92vGHhlobk7a0wfSIL0yxs4rqvgJ/M1DFhCs=; b=WFe3PXSWVU8SkBSrrWmwOJV0X0jmx3+ClMoxFwpgyEO8kl0V1viJSUsX2CHb7ICcWNvdn1 TS3dc3YgQsxUTQse4TRcYcmkORqIFeYoVY9L47+sG9k04JBsk9Rl/mdsdN+GQk8m0XAVoE pI+8ktnZyRgDXIMAfKCWbsm1DNnwkrCmnmKOpq6OUbiPBX/AjtXaAv9d/Gv/noV22mMSOk LhPtkQ3z4xeJ8J/IYaf09aC+ySh2cNdseZIfRLInC6FaIF6Lu/e1KEaR55LKT+auoC0e2n daXSzIQ0liJmr45KMcsriJYgDJYyikmP7G31rQwE53IWEHv2fTihvASbtuV36A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779842226; a=rsa-sha256; cv=none; b=e59mfdnbou/BocPfPoOZzq063CwYR41gxVT+k1CzQrs2HRw0fePj2ogkAitE8w96b6I6pE 0kxOON7JQfhdI7LkNNiBZgOp8Y+PPh10zAKlDEkDsPMb1/EedWbO8aR0eg/N2NA3rdrPQH W5OuNQpPU782+UUt4MEpPXSk9bIk4byz0Uoee/Q+2Th49a1gAUslSB/1mOtC3QtHMlSJ8F Pf0cNQTAbGlTz7NiI2fjnptC/evQGX/jdQhviHHLHgB9X62JDIk/Y0sUVuWM6augJBuRSq tQ9iKteSwPzpIgcEjEGxmx7x8IUuwYPKK1kRCtuXZdeD8tkqdyU/JY7FRQjHWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779842226; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V1Q29aN92vGHhlobk7a0wfSIL0yxs4rqvgJ/M1DFhCs=; b=We/R6fD7CS4JB7O90C7XPXhtJfwqDv2rjEg/ZZSMSDXMJU2Bal+35SFlcbAS+GP+wZ3z+i kr53gz8zEMgnZoecNZ+kj+1sNCp0oy0mpE++WLrHy5VvpOtYAxiNdQKjsPZLaDW11WjTky 1JqPYsriF2kCHpaL5ivmVERdLxLT5DPNHy7UPe0uJPKciEmWenvPC2RNmuEdEuKzcsxj8A MnZcwcD/P9O/U3Ej6Gg63FbS8Gw1RQZibk685X7XTCd5Wy5a7Hs2/qoBEbhD3LNWBT+i5E 016QiV4BL2DNpPj92HEn6IxU2DkoWFLVudrJnvDRD+Q7503MUDB39PRrgtJ0TA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQ9g653jYzcQh for ; Wed, 27 May 2026 00:37:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3de6d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 00:37:06 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: ca2d4026c3f2 - main - nanobsd: Fix code image size formatting List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ca2d4026c3f2bb8eeab888cf50f2c2e3914ab3e5 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 00:37:06 +0000 Message-Id: <6a163cb2.3de6d.651e5a77@gitrepo.freebsd.org> The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=ca2d4026c3f2bb8eeab888cf50f2c2e3914ab3e5 commit ca2d4026c3f2bb8eeab888cf50f2c2e3914ab3e5 Author: Jose Luis Duran AuthorDate: 2026-05-27 00:23:05 +0000 Commit: Jose Luis Duran CommitDate: 2026-05-27 00:23:05 +0000 nanobsd: Fix code image size formatting mkimg(8) parses sizes using expand_number(3). It is an error to use "b" as a suffix. This is the result of a confusion with makefs(8), which uses NetBSD's strsuftoll(3). Reviewed by: imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D57224 --- tools/tools/nanobsd/legacy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/tools/nanobsd/legacy.sh b/tools/tools/nanobsd/legacy.sh index 52d60b4fda8c..ed4bd493c8d7 100644 --- a/tools/tools/nanobsd/legacy.sh +++ b/tools/tools/nanobsd/legacy.sh @@ -326,7 +326,7 @@ _create_diskimage() { altroot="-p freebsd:=${NANO_OBJ}/_.altroot.image:+$(( NANO_SECTS * 512 ))" rm -f "${NANO_OBJ}/_.altroot.part" else - altroot="-p freebsd::${CODE_SIZE}b:+$(( NANO_SECTS * 512 ))" + altroot="-p freebsd::$(( CODE_SIZE * 512 )):+$(( NANO_SECTS * 512 ))" fi else altroot="-p-" From nobody Wed May 27 00:37:05 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQ9g64d9Hz6f0qV for ; Wed, 27 May 2026 00:37: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQ9g55DW8z3LgY for ; Wed, 27 May 2026 00:37:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779842225; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Nj+KOpCbASDAr3a2dTs4w2HOxxSqbA/H2u+hyD99LMA=; b=sSbGmtcT3toyWT4h/iOTcrCO+eQ9IxHtKxkx3NePKxuTe3h7fCs2hUEcyYOt+lnA0HrrrC C98Ukabwiv4B8dh2WlsQVEohWEJV/EPn4feTkZhjGMxL3/11cU7sNMYnw2720x0998FQOy N8k4unAxOrYFe8SgkOcV99FGOe1ExtveRmMPAV/fww+g1mbX7z6M+wIQby+tL718+1fIiO VdvZTZ42De3M4ikImBPangDWeSN5rWoMWRRPjxN4eg9X4X3mFie0+xJj6BUPC58rJDPvqV gFUNssRt1yKWxEB2h84rCbFTTZYhKf3myzIZ9xuvTPXSD/fWmHw6w3E0i8vxPA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779842225; a=rsa-sha256; cv=none; b=QQhO3vuqJlkeRyBjxnRwGzUTe3OoWQKjgE4pnEYJe9Uop2N18DC/sNqzYEDz3LDl/SfJUV Y5X5ebBwTvqQ/CIu4OXIfOqPhgUbO3PcijIqLL4AL8I9wYTRSo6VZM60ym37L9aXeaLgEA D4HBMUvQLKnnqq2c/64nat5dFgmB94N4QpFOgVf6g4decVc/3Wlm7IeMFGAS/QFllysQw8 IBMS12kEstnpVzb+AIVua7s1Z/GmEDX68x+FsEeNDEQUyEKtArzZKeM7+IdFZzE0hM+nrs Ipa4QFS6R16e+50JSLkcjc9lNu8Mq+4w4oeFiioYnWRne//UIw6TX/phIf88gw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779842225; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Nj+KOpCbASDAr3a2dTs4w2HOxxSqbA/H2u+hyD99LMA=; b=vrewAlQQh0OubQ5aSxj4ThJCI4l7EmE+YkGtdcJnG+KNXU+wzXthU5iJ2Sd+JvB9tDBooL NfR0wTxy+r+k1Ot9KrHpRT54pVSAHVzhuLdM2sJI894G5lPS8uRRC64+5boAgvaKulx6f+ 9Fk2mUlhwv/p6/XTidJFtBodVry2PSpUFGo1roZ2Jo2RiAd3mPhUjUHw8c1W7RGKr/VNee dFawQtMUtjaKzdMamLnTrMAKPsoSzUrE8396ueJn45qd8wxN+bpbB5pipa7Tv0YaF9XvKb Gom4dISRX7YDYsnskhnjtQwt/2cFHjB07+RxitRhWBt+pnxwS2sofjCXrtEuVg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQ9g545tFzcQg for ; Wed, 27 May 2026 00:37:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3fb23 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 00:37:05 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 87150a2ed140 - main - nanobsd: Refactor secondary code partition logic List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 87150a2ed140d5a3c1272ce9cfe815f19282840b Auto-Submitted: auto-generated Date: Wed, 27 May 2026 00:37:05 +0000 Message-Id: <6a163cb1.3fb23.3680830c@gitrepo.freebsd.org> The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=87150a2ed140d5a3c1272ce9cfe815f19282840b commit 87150a2ed140d5a3c1272ce9cfe815f19282840b Author: Jose Luis Duran AuthorDate: 2026-05-27 00:22:39 +0000 Commit: Jose Luis Duran CommitDate: 2026-05-27 00:22:39 +0000 nanobsd: Refactor secondary code partition logic Rearrange the conditional logic for building the secondary code slice (altroot). Reviewed by: imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D57223 --- tools/tools/nanobsd/legacy.sh | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/tools/tools/nanobsd/legacy.sh b/tools/tools/nanobsd/legacy.sh index 1d7a0cef2fed..52d60b4fda8c 100644 --- a/tools/tools/nanobsd/legacy.sh +++ b/tools/tools/nanobsd/legacy.sh @@ -308,28 +308,29 @@ _create_diskimage() { diskimage="-p freebsd:=${NANO_DISKIMGDIR}/${NANO_IMG1NAME}:$(( NANO_SECTS * 512 ))" - if [ "$NANO_IMAGES" -gt 1 ] && [ "$NANO_INIT_IMG2" -gt 0 ] ; then - echo "Duplicating to second image..." - tgt_switch_root_fstab "${NANO_SLICE_ROOT}" "${NANO_SLICE_ALTROOT}" - nano_makefs "-DxZ ${NANO_MAKEFS} -o minfree=0,optimization=space" \ - "${NANO_METALOG}" "$(( CODE_SIZE - METADATA_SECTS ))" \ - "${NANO_OBJ}/_.altroot.part" "${NANO_WORLDDIR}" - tgt_switch_root_fstab "${NANO_SLICE_ALTROOT}" "${NANO_SLICE_ROOT}" - if [ -f "${NANO_WORLDDIR}/boot/boot" ]; then - bootcode="-b ${NANO_WORLDDIR}/boot/boot" + if [ "$NANO_IMAGES" -gt 1 ] ; then + if [ "$NANO_INIT_IMG2" -gt 0 ] ; then + echo "Duplicating to second image..." + tgt_switch_root_fstab "${NANO_SLICE_ROOT}" "${NANO_SLICE_ALTROOT}" + nano_makefs "-DxZ ${NANO_MAKEFS} -o minfree=0,optimization=space" \ + "${NANO_METALOG}" "$(( CODE_SIZE - METADATA_SECTS ))" \ + "${NANO_OBJ}/_.altroot.part" "${NANO_WORLDDIR}" + tgt_switch_root_fstab "${NANO_SLICE_ALTROOT}" "${NANO_SLICE_ROOT}" + if [ -f "${NANO_WORLDDIR}/boot/boot" ]; then + bootcode="-b ${NANO_WORLDDIR}/boot/boot" + fi + mkimg -s bsd -S 512 --capacity $(( CODE_SIZE * 512 )) \ + ${bootcode} \ + -p freebsd-ufs:="${NANO_OBJ}/_.altroot.part" \ + -o "${NANO_OBJ}/_.altroot.image" + altroot="-p freebsd:=${NANO_OBJ}/_.altroot.image:+$(( NANO_SECTS * 512 ))" + rm -f "${NANO_OBJ}/_.altroot.part" + else + altroot="-p freebsd::${CODE_SIZE}b:+$(( NANO_SECTS * 512 ))" fi - mkimg -s bsd -S 512 --capacity $(( CODE_SIZE * 512 )) \ - ${bootcode} \ - -p freebsd-ufs:="${NANO_OBJ}/_.altroot.part" \ - -o "${NANO_OBJ}/_.altroot.image" - altroot="-p freebsd:=${NANO_OBJ}/_.altroot.image:+$(( NANO_SECTS * 512 ))" - rm -f "${NANO_OBJ}/_.altroot.part" else altroot="-p-" fi - if [ "${NANO_INIT_IMG2}" -eq 0 ]; then - altroot="-p freebsd::${CODE_SIZE}b:+$(( NANO_SECTS * 512 ))" - fi # Create Config slice _populate_cfg_part "${NANO_OBJ}/_.cfg.part" "${NANO_CFGDIR}" \ From nobody Wed May 27 00:37:07 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQ9g81gGmz6f0qd for ; Wed, 27 May 2026 00:37: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQ9g76XQTz3Lx0 for ; Wed, 27 May 2026 00:37:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779842227; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PtOqdp0JE8qyANOlSplk7QzHUNH787XK6KHWe4yWwGs=; b=cBfi7YgF0R3DuhgrJ0g9gssLlBNOnlG7++9peDDyp7xLvrriUfYQ39t782Meii92taKPg8 z1kR7qUNCWrJ3PsLPKMXkpEM5/fzejDzyn/hU+gochz/HvUBX59dspiqvks7NqP9Df4GUI AJFF9RMZzLHO2upz7Q5nCMF658b4Y9y7Rgw/83hCjkpCzb2XkAfpFOoJQexRojQkhaZPs3 bmRpmCDDTVXIbVFrf9zKeB2JimOKMQVbWGNU/BraPR5+PxbuAMHFufsapjRVKZpTpktFU1 jVhoOvW2cAQfCm1S8/+RHJqPFGBGN0z0EY4KBqOvdvA6jVG1SSZaSTrn4mx3Ug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779842227; a=rsa-sha256; cv=none; b=ULWGFNEmCeBzezXripBoh2rCvhsjfaG6sESRMPABpLw9pPKwegoBxp2cQQYyiq9fCu4GJA zywVkMSPbQn8QILCJ5Npzo1O0F6Eug82rMpI0xmzPrbMid89xIOF3XaAhPMS1d4E/jecHb Q/iPCif3IfiHdfU3stF+JAYNF+1rr+iSBRVzG4wLJX9axgNZ2+2/EKiQsbSLLW624FO1do CpsmEHl74N42LLH3UO5v09hGBnM5iGykfzmi6mgB3NAezv1a3nyk2aY3yKGTv16LZv0sdV uuz4GIOFjwIzrVNvqcDKHZNhmeXldCe74n+kxW4CaOzxwtvloG6Acm63oOFbCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779842227; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PtOqdp0JE8qyANOlSplk7QzHUNH787XK6KHWe4yWwGs=; b=RDi1E8iOU73QqY0lWBPQqXqWujOg3P9RceiWXtaeCH9ksLCtTl7znmPIjF1hAnRHzpcItd xlRfpjZMCJGEwqBqq+LD1wkZC+WZzJBF+1hcfcjmQ2xGFh2SKZ3Egbbojz1WTUIC/Mv6lR rpCxnmbQardF2REzdFESzWlZw+ed9DvjAf7+wL3zD2vNMkXDWgp9mTC9lqLwCt6p+6oXZG T0fZhKH6TlU06+htp7rNFX42NjgArLW/yQFJKbIAegm5S+VZgRRjTRf5K7O/SQAKMe+LIt yCaL3GJ2c3Pi0RxfYqG51M1HZDviZ/TgCbnrKpUaR07f+9IJbY9/LeKN/1wPVw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQ9g7617NzcPl for ; Wed, 27 May 2026 00:37:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3fbb4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 00:37:07 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: c579927ac591 - main - nanobsd: Use makefs -R flag to honor rounded sizes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c579927ac591ffcf36f4cd06444d167ba467ec8d Auto-Submitted: auto-generated Date: Wed, 27 May 2026 00:37:07 +0000 Message-Id: <6a163cb3.3fbb4.6c410483@gitrepo.freebsd.org> The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=c579927ac591ffcf36f4cd06444d167ba467ec8d commit c579927ac591ffcf36f4cd06444d167ba467ec8d Author: Jose Luis Duran AuthorDate: 2026-05-27 00:23:46 +0000 Commit: Jose Luis Duran CommitDate: 2026-05-27 00:23:46 +0000 nanobsd: Use makefs -R flag to honor rounded sizes Switch from the min/max size flag (-s) to the round-up flag (-R) when invoking makefs(8). Because the partition sizes passed to nano_makefs have already been rounded up by calculate_partitioning(), using -s can cause makefs to try to perform sizing adjustments that usually result in failures. Reviewed by: imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D57225 --- tools/tools/nanobsd/defaults.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/tools/nanobsd/defaults.sh b/tools/tools/nanobsd/defaults.sh index adeb83365050..6f55b28eb77f 100755 --- a/tools/tools/nanobsd/defaults.sh +++ b/tools/tools/nanobsd/defaults.sh @@ -719,7 +719,7 @@ nano_makefs() { dir=$5 makefs ${options} -F "${metalog}" -N "${NANO_WORLDDIR}/etc" \ - -s "${size}b" -T "${NANO_TIMESTAMP}" -t ffs "${image}" "${dir}" + -R "${size}b" -T "${NANO_TIMESTAMP}" -t ffs "${image}" "${dir}" } # Convenient spot to work around any umount issues that your build environment From nobody Wed May 27 00:37:08 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQ9g92Gl4z6f0JW for ; Wed, 27 May 2026 00:37: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQ9g874mJz3LpP for ; Wed, 27 May 2026 00:37:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779842229; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OLiFquDZvwP6UV/LpH3r8zzn2ig8PN3agORi91UofII=; b=sFfZmJqLLaqIUOZvGcebVhsK4R+iS993do2tEO/J5vNhjTXq/k4rufkySKeraL0cJQx1Fs GwME4soZgLkxs4+OfDz9KahIu8vtUiJP/beb9icEg8U70Na9FURvrWIlM3pK7S8aRguEfg bT0xj6WNmzhH3F4WrgfvFjAPOMGmuxvVwr44iL3QUcpn3soL6BM2tg9yJP0wnWA8kq3t++ YNQpbgUhcm8BFBaN3FSbkSJh/t9VnfIhB1zBmsza/6Kh7aw5bnt8yGvFgSXeVGoHDWeakd YFmxS21mbdMMUIItr4hi6c3V2OIsXTxNZl5IcxIk5cwskiAaoDEiMFLjDfXprg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779842229; a=rsa-sha256; cv=none; b=AAGlC65dQxYSUVcGUw3qynIQBdk5jHBvV8bfocAGNXGq5RkmYfLJYkgziIC172oE9CRUDQ FQRyRiuIeFb296ZAUvvHPShVIS15BbL0xkkhVupE0n4cmnc6TTFK3MH7pAw+ajg4vvC4jR W3+C4cxY+rjW1KkI8Gxk8Q1f/XTPF2JxQyT1jPGAgjYA30Vaujq3mZlocyh4LwFIMsh3K3 qG7K974TroxuNsep2no15whWEo0a3eiRNsC7xvejZhR2gOrsR3GesiMQQGEq91XsE37dXk sf11t1eGziR5Q+x4rPg9e3XweeOXsIFpHKuPv6C1KhIKv67t/LVDSKv9SRVzXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779842229; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OLiFquDZvwP6UV/LpH3r8zzn2ig8PN3agORi91UofII=; b=KCQ9SzXWPulYhwDI5mm1SfVEtQpAoDOZtqVJWFYZeiMlzQN+Tut0LHq/pc7YQwbJvseRkl PmOmoNTe14irko4DinI8wWxR6Ju49vJhdf2S1OunXsBt+v3nhD+OLnHGQgcQYkJwHpAWSF H7YJVjwJneOiasCT3PVFDBbQKjKHo0KlpacA/162dsUrS3Zs0gCKZYK9x8R8p2fwxBJr8B TPi5vdHevNQrGg10Ry2utnSB4kGztJCrZjiXD8kFNvNZ7slrLXFPFWxD3KQxKI9GSB+f7+ /ADGKKJbiBQFg0aw/yIBtohosFKL9ISrWsKnsaOu0PtSokfaLkMuNQS3HnrsFA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQ9g86dPTzcCZ for ; Wed, 27 May 2026 00:37:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3de71 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 00:37:08 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 54359982309e - main - nanobsd: Adjust the order of the flags in makefs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 54359982309e63254424eea1f981215c84d2b9c6 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 00:37:08 +0000 Message-Id: <6a163cb4.3de71.78e8d8f2@gitrepo.freebsd.org> The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=54359982309e63254424eea1f981215c84d2b9c6 commit 54359982309e63254424eea1f981215c84d2b9c6 Author: Jose Luis Duran AuthorDate: 2026-05-27 00:24:26 +0000 Commit: Jose Luis Duran CommitDate: 2026-05-27 00:24:26 +0000 nanobsd: Adjust the order of the flags in makefs The order of the flags matter in makefs(8). The -t (type) flag must come before the -o (options) flag; otherwise, the options are reset. Move the -t flag before the -o flag and remove the shim function _xxx_adjust_code_size() that was created to align to the default makefs FFS values. It effectively prevented us from generating NanoBSD images using unprivileged builds with the partitions internally aligned as intended. Reviewed by: senguptaangshuman17_gmail.com, imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D57226 --- tools/tools/nanobsd/defaults.sh | 4 ++-- tools/tools/nanobsd/legacy.sh | 13 ------------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/tools/tools/nanobsd/defaults.sh b/tools/tools/nanobsd/defaults.sh index 6f55b28eb77f..4997812cb15f 100755 --- a/tools/tools/nanobsd/defaults.sh +++ b/tools/tools/nanobsd/defaults.sh @@ -718,8 +718,8 @@ nano_makefs() { image=$4 dir=$5 - makefs ${options} -F "${metalog}" -N "${NANO_WORLDDIR}/etc" \ - -R "${size}b" -T "${NANO_TIMESTAMP}" -t ffs "${image}" "${dir}" + makefs -t ffs ${options} -F "${metalog}" -N "${NANO_WORLDDIR}/etc" \ + -R "${size}b" -T "${NANO_TIMESTAMP}" "${image}" "${dir}" } # Convenient spot to work around any umount issues that your build environment diff --git a/tools/tools/nanobsd/legacy.sh b/tools/tools/nanobsd/legacy.sh index ed4bd493c8d7..467c7b845672 100644 --- a/tools/tools/nanobsd/legacy.sh +++ b/tools/tools/nanobsd/legacy.sh @@ -96,17 +96,6 @@ calculate_partitioning() { ' > ${NANO_LOG}/_.partitioning } -_xxx_adjust_code_size() -{ - # XXX adjust the CODE_SIZE value by rounding it up to - # a bsize of 32768 (DFL_BLKSIZE). - # Otherwise makefs -s will fail because of the guard - # introduced in 5ad283b3c60d. - codesize=$1 - bsize=32768 - echo $(( ((codesize + (bsize - 1)) / bsize) * bsize )) -} - create_code_slice() { pprint 2 "build code slice" pprint 3 "log: ${NANO_OBJ}/_.cs" @@ -166,7 +155,6 @@ _create_code_slice() { ( IMG=${NANO_DISKIMGDIR}/${NANO_IMG1NAME} CODE_SIZE=$(awk '$3 == 1 {print $2}' "${NANO_LOG}/_.partitioning") - CODE_SIZE=$(_xxx_adjust_code_size "$CODE_SIZE") echo "Writing code image..." if [ -f "${NANO_WORLDDIR}/boot/boot" ]; then @@ -295,7 +283,6 @@ _create_diskimage() { local altroot bootloader cfgimage dataimage diskimage CODE_SIZE=$(awk '$3 == 1 {print $2}' "${NANO_LOG}/_.partitioning") - CODE_SIZE=$(_xxx_adjust_code_size "$CODE_SIZE") CONF_SIZE=$(awk '$3 == 3 {print $2}' "${NANO_LOG}/_.partitioning") DATA_SIZE=$(awk '$3 == 4 {print $2}' "${NANO_LOG}/_.partitioning") IMG=${NANO_DISKIMGDIR}/${NANO_IMGNAME} From nobody Wed May 27 00:37:10 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQ9gB460zz6f0tM for ; Wed, 27 May 2026 00:37: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQ9gB12QKz3Lvq for ; Wed, 27 May 2026 00:37:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779842230; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X+L0LShblSA2Qg9pSjVljWhbIntVXG8FuaGmhYyeICI=; b=hTBv8uQyX5nFbBNO/s0VTTlBfRJ3N2Adqxrw6Pm8BikrIZYnrKgXr2PTMMGOrqeCxWeZMp DCH5G4rCWfmDLJO4mGH6bXTDk/O+Kvt94lPN9vnW44y8L2VcOh8VaOoiodrz2KippcF8Qm vwtW6rHNZoGWmZvJORY50vU8GnHl7AG7tIMayjbW7NH590VYzBuJFo3mSwt1114iKGOtWy LSgFTe7zIf93pcA+oD1UATTqVABYMT88y5q/NkomULs/dBtM0E6POlr5ZMIXHivqPn9C3q rgyfv8cDJcESS4Fhz9m7A0MJWyyT/colI+vuSwpZKBMOpeB7RN3uMpQd9K2KMA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779842230; a=rsa-sha256; cv=none; b=D7l9EvtaRkSUj33eXuseoX3nFD5RTrG8f66n/M/Ec13ghGDG3pfRovFrPzGj/g6SvYhajk th5EkCX7YJ9gjUcNbMMmGvI09JFz0pGUZTxE5psBryIDLYe5xdt7OB9HxQnw9wpOEwcrT0 mRDAuV0d0LXWfUvNUkDdwanNKXjW+aHGdIyqpchJVtVp1Nr7w5ket1gu15cjSZZP7Aoaqp Ww1oP9M3wYdP8zNVIY5C/a9LdxhpduonEIABMYxZEUBpBLBL+Vh7RKOBsFNo+RL9OGhYuG 6mlh7ToLVCte2uqYOiCwk4Hbku5Z6yIJ+aG+ojn+3ZbWBpxXYbNc6eOIFfLlCA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779842230; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X+L0LShblSA2Qg9pSjVljWhbIntVXG8FuaGmhYyeICI=; b=uqPkqjWP2OfCIEbKB+dvCTvAk4yfb5Av38kAW1/izUEUnwfb6yX0E5I000XAjw0H/TS3E9 n3ZxRCx2IGvg5WgafKwuIby+2PoBKGVNgn+vDiMvakYI3hKrCnCx8OByma0iDxSJ2sqPwO c1AHuYDCMEDjTN4YvBywBnovji+fuQdVsqkg1EbJZ8YX+vNwnRptED9rOs9LY2VpMbHe/P PMJIeg/TfgoGfyKWhqLccCir2K/3RiAACyfrdn+sQ4Kkh29X0xbNP9/r4QO8BoU9i255j/ 6aZzhXG40ZzZ5Ckr8F3UZ7N95sT52clz1y/xb8Wb6OzFAL+DrHerto5Z8Yv+Pw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQ9gB0bC3zcgt for ; Wed, 27 May 2026 00:37:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3eda4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 00:37:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: f1de8e3511d0 - main - nanobsd: Register the boot.config file in the metalog List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f1de8e3511d043e707cf4a63ea76a15a42f81ab0 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 00:37:10 +0000 Message-Id: <6a163cb6.3eda4.470a47e3@gitrepo.freebsd.org> The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=f1de8e3511d043e707cf4a63ea76a15a42f81ab0 commit f1de8e3511d043e707cf4a63ea76a15a42f81ab0 Author: Jose Luis Duran AuthorDate: 2026-05-27 00:25:10 +0000 Commit: Jose Luis Duran CommitDate: 2026-05-27 00:25:10 +0000 nanobsd: Register the boot.config file in the metalog Ensure that the boot.config file gets an entry in the metalog by tgt_touch()ing it. If a file is not present in the metalog, it gets excluded from the final image when using "-U" (unprivileged builds). MFC after: 2 weeks --- tools/tools/nanobsd/defaults.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/tools/nanobsd/defaults.sh b/tools/tools/nanobsd/defaults.sh index 4997812cb15f..3bbbcf472ae7 100755 --- a/tools/tools/nanobsd/defaults.sh +++ b/tools/tools/nanobsd/defaults.sh @@ -883,6 +883,7 @@ cust_comconsole() { # Tell loader to use serial console early. echo "${NANO_BOOT2CFG}" > ${NANO_WORLDDIR}/boot.config + tgt_touch boot.config } ####################################################################### From nobody Wed May 27 06:26:21 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQKQ55mVWz6fT30 for ; Wed, 27 May 2026 06:26: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQKQ52M3lz47hb for ; Wed, 27 May 2026 06:26:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779863181; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YGrJEgXjxLOKZ9l5nCiPJAHcSm8brF177ugVKOnBg/o=; b=Y5wsh4XyPgBr0JypI978IglAk+67Tbj5iM7xwT1a7vBm1a3UO+8RNiGCTA1KIp6RAOt/1Q zyJkhkjVpzdwD5z15vjSDnbls6nDGKJ/2UUe3xSZoLPjpsLGyOvVdJbkmcla7u8tf58VV9 CDBOKdszzyS0Wri7t6J38jJX+5Dkz1dbAdqSvsgR8zwB6vf+o8Tnl/cL8Z665LqZ55iueY o5DTvvlN7wdyF2wiYwUtYZ1LeoSSGKkKoeGKsKc8feFR7LMdBQdgpCkHqqS8RvCf9yCnH9 MBMsVx1UeGBBtykCmzNIqKctm8Du0BlSKL8Upvq1jHkmYOdj3KrUGMcsuZmwhQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779863181; a=rsa-sha256; cv=none; b=p49LMbvBGS84mG/QU9AwBIah8yDAIO/6ZL7lA+4dHCSCzPsJIbsrNnIkRd5E2WFQUilYtD k+MD0WGME4CNpK5AdJaDf36Zj5XFMBZG2qlRvK/qSm+HY5npcddkgoUSc/ohd/DWDJU+p7 74kQLFMNRnhMfKKGmFPRVCtAX+fFgOfXKcyklf/jBcuX8VgjyR8c/yc81WqP4mNzJbEwcX hS1EvQpGdfQt0EXtZUnbFAuin3N/FqN6/pKOS3BMPLVJ9z8e5Kqe9C1jWWcH1Sj5oIEPi1 QQg2WBzsXLMFYgrX4xNB5lezcXQChG1IzgfWM/DAXN/Ibr16Apf0vMmnRVur1Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779863181; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YGrJEgXjxLOKZ9l5nCiPJAHcSm8brF177ugVKOnBg/o=; b=LL7n4/iJGxseMdrk84K2T1WNFuiHayeV/OYgX0SpUPZPKNuRiMDmcvQElWBLRAP7YzO43W lfiLXe1aiC2t46u3mATG79iueVSqL5hEQnDNh+GsFyiE/EfZNhqkZ0K7JGNVn7xBvsoAtL 3gxzX5zWvSb8Tk7Wv0jZnXrzFtcF1kNU6m2gpw+de+/LhsaN8Dx+IFr54VwDzBV3Ogiaq3 TAheZL0ovjz4Sx5Ilhkez5ZdrpOWoJDULdRiLcbruKZlw0hg7xBiQj0pJMSANVLOJ7nKtX 3GzH0VAz9ADJCH4p9i6RA12csvEiz42Hv8XjuV20ZncK5VeV3SFCGlw5In9nGA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQKQ51vDzznm9 for ; Wed, 27 May 2026 06:26:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 45031 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 06:26:21 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 0c0f66541aa2 - stable/15 - LinuxKPI: 802.11: add support for suspend/resume List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 0c0f66541aa220af38261af6360713ded6e3f15d Auto-Submitted: auto-generated Date: Wed, 27 May 2026 06:26:21 +0000 Message-Id: <6a168e8d.45031.2ea72c91@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=0c0f66541aa220af38261af6360713ded6e3f15d commit 0c0f66541aa220af38261af6360713ded6e3f15d Author: Bjoern A. Zeeb AuthorDate: 2025-04-09 18:00:20 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-05-27 01:31:08 +0000 LinuxKPI: 802.11: add support for suspend/resume Add support for automatic suspend/resume as we know it for wireless. The problem is that the PCI driver which would normally gets the code is the LinuxKPI PCI framework/Linux wireless driver, which we cannot ammend or generally add extra suspend/resume code to. A further problem is that with growing support, the LinuxKPI 802.11 (mac80211) layer also is involved in suspend/resume for WoWLAN (not yet supported) meaning that we need to hook the suspend/resume framework into that as well. Unlike Linux we do not have a general suspend/resume "hook" we can hang into and we need to tie this one to the hardware so cannot indepedently (after the driver one) run it. The solution for FreeBSD, in order to not mangle the Linux native drivers and get extra maintanace overhead, is to add a bus child which inherits the general framework and thus is 2 lines + #includes for each driver extra to add to. The general suspend/resume framework lives in LinuxKPI (linuxkpi_80211_pm) and imitates the normal suspend/resume path overloading it (there is a slight code/logic duplication from the PCI code). Given we are passed the LinuxKPI p(ci)dev, we can go and peel out the net80211 ic from the native bsddev and that way get access to the wireless stack. We then call into LinuxKPI 802.11 in order to do the suspend/resume dance there, and, if needed also call the official suspend/resume routine from the device driver after (reverse for resume). If any in this fails, suspend will be blocked as we will return the error (no different to any native driver could do). The LinuxKPI 802.11 suspend/resume code has the initial code for doing a WoWLAN suspend (one could change the sysctl) but other bits like access to ifnet flags etc. has to be sorted out before we can go and support that. The default code path calles into net80211 to clear everything like native wireless drivers do. The one thing we need to do in addition is to remove the vif devices from the firmware and restore them prior to net80211 resume. We also check for a possible HW SCAN to still be runinng on resume and warn as that may cause problems though the scan should be stopped before suspend (we may still get a callback). You can easily see these problems if you suspend/resume without stopping the wlan. Enable the PM framework for iwlwifi in the module Makefile to be able to use all this; others can follow as tested. In case anyone has problems with this, they can change the sysctl back to 0 until we can figure out any further problems. The linuxkpi_wlan.4 man page got adjusted to document this. Sponsored by: The FreeBSD Foundation Tested on: Dell XPS 13 (AX200), Lenovo TP X270 (AX210) PR: 263632 (cherry picked from commit 11d69a4558de2a5427d8191caed315c5f7e9a5d6) --- share/man/man4/linuxkpi_wlan.4 | 8 +- sys/compat/linuxkpi/common/src/linux_80211.c | 137 +++++++++++++ sys/compat/linuxkpi/common/src/linux_80211.h | 16 +- .../linuxkpi/common/src/linux_80211_macops.c | 116 +++++++++++ sys/compat/linuxkpi/common/src/linuxkpi_80211_pm.c | 214 +++++++++++++++++++++ sys/conf/files | 2 + sys/contrib/dev/iwlwifi/lkpi_iwlwifi_pm.c | 8 + sys/contrib/dev/rtw88/lkpi_rtw88_pm.c | 8 + sys/contrib/dev/rtw89/lkpi_rtw89_pm.c | 8 + sys/modules/iwlwifi/Makefile | 3 +- sys/modules/linuxkpi_wlan/Makefile | 1 + sys/modules/rtw88/Makefile | 1 + sys/modules/rtw89/Makefile | 3 +- 13 files changed, 521 insertions(+), 4 deletions(-) diff --git a/share/man/man4/linuxkpi_wlan.4 b/share/man/man4/linuxkpi_wlan.4 index 65c77d8d7631..fa0b15b5e0b1 100644 --- a/share/man/man4/linuxkpi_wlan.4 +++ b/share/man/man4/linuxkpi_wlan.4 @@ -6,7 +6,7 @@ .\" This documentation was written by Bj\xc3\xb6rn Zeeb under sponsorship from .\" the FreeBSD Foundation. .\" -.Dd December 28, 2025 +.Dd May 23, 2026 .Dt LINUXKPI_WLAN 4 .Os .Sh NAME @@ -107,6 +107,12 @@ debug messages. See .Pa sys/compat/linuxkpi/common/src/linux_80211.h for details. +.It Va compat.linuxkpi.80211.suspend_type +For the time being this variable allows suspend/resume to be +enabled/disabled. +The default is 1 which enables normal suspend/resume. +To disable any suspend/resume set it to 0. +Other values may enable specific features in the future. .It Va compat.linuxkpi.80211.IF.dump_stas Print statistics for a given, associated .Xr wlan 4 diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index efd1d9bae3cc..cade61e8446f 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -105,6 +105,11 @@ SYSCTL_DECL(_compat_linuxkpi); SYSCTL_NODE(_compat_linuxkpi, OID_AUTO, 80211, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "LinuxKPI 802.11 compatibility layer"); +static int lkpi_suspend_type = 1; +SYSCTL_INT(_compat_linuxkpi_80211, OID_AUTO, suspend_type, CTLFLAG_RW, + &lkpi_suspend_type, 0, + "LinuxKPI 802.11 suspend type bitmask (0=off, 1=net80211, 2=wowlan"); + static bool lkpi_order_scanlist = false; SYSCTL_BOOL(_compat_linuxkpi_80211, OID_AUTO, order_scanlist, CTLFLAG_RW, &lkpi_order_scanlist, 0, "Enable LinuxKPI 802.11 scan list shuffeling"); @@ -6859,10 +6864,19 @@ linuxkpi_set_ieee80211_dev(struct ieee80211_hw *hw) /* * Set a proper name before ieee80211_ifattach() if dev is set. * ath1xk also unset the dev so we need to check. + * Also we will (ab)use this opportunity to register the + * power management sub-children if thay exist (for suspend/resume). */ dev = wiphy_dev(hw->wiphy); if (dev != NULL) { ic->ic_name = dev_name(dev); + if (dev->bsddev != NULL) { + bus_identify_children(dev->bsddev); + bus_enumerate_hinted_children(dev->bsddev); + bus_topo_lock(); + bus_attach_children(dev->bsddev); + bus_topo_unlock(); + } } else { TODO("adjust arguments to still have the old dev or go through " "the hoops of getting the bsddev from hw and detach; " @@ -9538,7 +9552,130 @@ ieee80211_emulate_switch_vif_chanctx(struct ieee80211_hw *hw, } /* -------------------------------------------------------------------------- */ +/* LinuxKPI 802.11 PM. */ +int +lkpi_80211_suspend(struct ieee80211com *ic, pm_message_t state) +{ + struct lkpi_hw *lhw; + struct ieee80211_hw *hw; + int error; + + lhw = ic->ic_softc; + hw = LHW_TO_HW(lhw); + error = 0; + + /* Check: + * - device_set_wakeup_capable() / device_can_wakeup() + * - hw->wiphy->wowlan to be non-NULL, if so contents. + * - hw->wiphy->max_sched_scan_ssids (rtw88) + */ + if ((lkpi_suspend_type & 0x2) != 0) { + struct cfg80211_wowlan wowlan; + + IMPROVE("various options for WoWLAN"); + memset(&wowlan, 0, sizeof(wowlan)); + wiphy_lock(hw->wiphy); + error = lkpi_80211_mo_suspend(hw, &wowlan); + wiphy_unlock(hw->wiphy); + if (error == EOPNOTSUPP) + error = 0; + } + if ((lkpi_suspend_type & 0x1) != 0) { + struct lkpi_vif *lvif; + + ieee80211_suspend_all(ic); + wiphy_lock(hw->wiphy); + /* + * At the end of this net80211 will run a task to call + * (*ic_parent)() which is entirely unhelpful as we do not + * know when it will happen. So deal with it here. + */ + TAILQ_FOREACH(lvif, &lhw->lvif_head, lvif_entry) { + lkpi_80211_mo_remove_interface(hw, LVIF_TO_VIF(lvif)); + } + + if ((lhw->sc_flags & LKPI_MAC80211_DRV_STARTED) != 0) + lkpi_80211_mo_stop(hw, true); + wiphy_unlock(hw->wiphy); + } + + if (error < 0) + error = -error; + + if (error != 0) + ic_printf(ic, "%s: SUSPEND FAILED: %d\n", __func__, error); + + return (error); +} + +int +lkpi_80211_resume(struct ieee80211com *ic) +{ + struct lkpi_hw *lhw; + struct ieee80211_hw *hw; + int error; + bool hw_scan_running; + + lhw = ic->ic_softc; + hw = LHW_TO_HW(lhw); + error = 0; + + /* + * Ongoing HW scans during suspend are a problem on resume. + * Be verbose about that. + */ + LKPI_80211_LHW_SCAN_LOCK(lhw); + hw_scan_running = (lhw->scan_flags & (LKPI_LHW_SCAN_RUNNING|LKPI_LHW_SCAN_HW)) != 0; + LKPI_80211_LHW_SCAN_UNLOCK(lhw); + if (hw_scan_running) + ic_printf(ic, "%s: WARNING: ongoing hw scan on resume!\n", __func__); + + if ((lkpi_suspend_type & 0x1) != 0) { + struct lkpi_vif *lvif; + + wiphy_lock(hw->wiphy); + error = lkpi_80211_mo_start(hw); + if (error != 0 && error != EEXIST) { + ic_printf(ic, "%s: mo_start failed: %d\n", + __func__, error); + wiphy_unlock(hw->wiphy); + goto err; + } + + TAILQ_FOREACH(lvif, &lhw->lvif_head, lvif_entry) { + error = lkpi_80211_mo_add_interface(hw, LVIF_TO_VIF(lvif)); + if (error != 0) { + struct ieee80211vap *vap; + + vap = LVIF_TO_VAP(lvif); + ic_printf(ic, "%s: mo_add_interface %s failed: %d\n", + __func__, if_name(vap->iv_ifp), error); + wiphy_unlock(hw->wiphy); + goto err; + } + } + wiphy_unlock(hw->wiphy); + + ieee80211_resume_all(ic); + } + + if ((lkpi_suspend_type & 0x2) != 0) { + wiphy_lock(hw->wiphy); + error = lkpi_80211_mo_resume(hw); + wiphy_unlock(hw->wiphy); + if (error == EOPNOTSUPP) + error = 0; + } + +err: + if (error < 0) + error = -error; + + return (error); +} + +/* -------------------------------------------------------------------------- */ MODULE_VERSION(linuxkpi_wlan, 1); MODULE_DEPEND(linuxkpi_wlan, linuxkpi, 1, 1, 1); MODULE_DEPEND(linuxkpi_wlan, wlan, 1, 1, 1); diff --git a/sys/compat/linuxkpi/common/src/linux_80211.h b/sys/compat/linuxkpi/common/src/linux_80211.h index 569c4f12f6d6..89416edfae73 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.h +++ b/sys/compat/linuxkpi/common/src/linux_80211.h @@ -1,6 +1,6 @@ /*- * Copyright (c) 2020-2026 The FreeBSD Foundation - * Copyright (c) 2020-2021 Bjoern A. Zeeb + * Copyright (c) 2020-2025 Bjoern A. Zeeb * * This software was developed by Björn Zeeb under sponsorship from * the FreeBSD Foundation. @@ -44,6 +44,9 @@ #include "opt_wlan.h" +#include +#include + #if defined(IEEE80211_DEBUG) && !defined(LINUXKPI_DEBUG_80211) #define LINUXKPI_DEBUG_80211 #endif @@ -504,5 +507,16 @@ int lkpi_80211_mo_ampdu_action(struct ieee80211_hw *, struct ieee80211_vif *, struct ieee80211_ampdu_params *); int lkpi_80211_mo_sta_statistics(struct ieee80211_hw *, struct ieee80211_vif *, struct ieee80211_sta *, struct station_info *); +int lkpi_80211_mo_suspend(struct ieee80211_hw *, struct cfg80211_wowlan *); +int lkpi_80211_mo_resume(struct ieee80211_hw *); +int lkpi_80211_mo_set_wakeup(struct ieee80211_hw *, bool); +int lkpi_80211_mo_set_rekey_data(struct ieee80211_hw *, + struct ieee80211_vif *, struct cfg80211_gtk_rekey_data *); +int lkpi_80211_mo_set_default_unicast_key(struct ieee80211_hw *, + struct ieee80211_vif *, int); + +/* LinuxKPI 802.11 PM. */ +int lkpi_80211_suspend(struct ieee80211com *, pm_message_t); +int lkpi_80211_resume(struct ieee80211com *); #endif /* _LKPI_SRC_LINUX_80211_H */ diff --git a/sys/compat/linuxkpi/common/src/linux_80211_macops.c b/sys/compat/linuxkpi/common/src/linux_80211_macops.c index 42067e36c953..aa6b158b70a7 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211_macops.c +++ b/sys/compat/linuxkpi/common/src/linux_80211_macops.c @@ -819,3 +819,119 @@ lkpi_80211_mo_sta_statistics(struct ieee80211_hw *hw, struct ieee80211_vif *vif, out: return (error); } + +int +lkpi_80211_mo_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan) +{ + struct lkpi_hw *lhw; + int error; + + might_sleep(); + lockdep_assert_wiphy(hw->wiphy); + + lhw = HW_TO_LHW(hw); + if (lhw->ops->suspend == NULL) { + error = EOPNOTSUPP; + goto out; + } + + LKPI_80211_TRACE_MO("hw %p wowlan %p", hw, wowlan); + error = lhw->ops->suspend(hw, wowlan); + +out: + return (error); +} + +int +lkpi_80211_mo_resume(struct ieee80211_hw *hw) +{ + struct lkpi_hw *lhw; + int error; + + might_sleep(); + lockdep_assert_wiphy(hw->wiphy); + + lhw = HW_TO_LHW(hw); + if (lhw->ops->resume == NULL) { + error = EOPNOTSUPP; + goto out; + } + + LKPI_80211_TRACE_MO("hw %p", hw); + error = lhw->ops->resume(hw); + +out: + return (error); +} + +int +lkpi_80211_mo_set_wakeup(struct ieee80211_hw *hw, bool enable) +{ + struct lkpi_hw *lhw; + int error; + + might_sleep(); + lockdep_assert_wiphy(hw->wiphy); + + lhw = HW_TO_LHW(hw); + if (lhw->ops->set_wakeup == NULL) { + error = EOPNOTSUPP; + goto out; + } + + LKPI_80211_TRACE_MO("hw %p enable %d", hw, enable); + lhw->ops->set_wakeup(hw, enable); + error = 0; + +out: + return (error); +} + +int +lkpi_80211_mo_set_rekey_data(struct ieee80211_hw *hw, + struct ieee80211_vif *vif, struct cfg80211_gtk_rekey_data *grd) +{ + struct lkpi_hw *lhw; + int error; + + might_sleep(); + lockdep_assert_wiphy(hw->wiphy); + + lhw = HW_TO_LHW(hw); + if (lhw->ops->set_rekey_data == NULL) { + error = EOPNOTSUPP; + goto out; + } + + LKPI_80211_TRACE_MO("hw %p vif %p grd %p", hw, vif, grd); + lhw->ops->set_rekey_data(hw, vif, grd); + error = 0; + +out: + return (error); +} + +int +lkpi_80211_mo_set_default_unicast_key(struct ieee80211_hw *hw, + struct ieee80211_vif *vif, int idx) +{ + struct lkpi_hw *lhw; + int error; + + might_sleep(); + lockdep_assert_wiphy(hw->wiphy); + + lhw = HW_TO_LHW(hw); + if (lhw->ops->set_default_unicast_key == NULL) { + error = EOPNOTSUPP; + goto out; + } + + LKPI_80211_TRACE_MO("hw %p vif %p idx %d", hw, vif, idx); + lhw->ops->set_default_unicast_key(hw, vif, idx); + error = 0; + +out: + return (error); +} + diff --git a/sys/compat/linuxkpi/common/src/linuxkpi_80211_pm.c b/sys/compat/linuxkpi/common/src/linuxkpi_80211_pm.c new file mode 100644 index 000000000000..c69288bd5886 --- /dev/null +++ b/sys/compat/linuxkpi/common/src/linuxkpi_80211_pm.c @@ -0,0 +1,214 @@ +/* + * Copyright (c) 2025 The FreeBSD Foundation + * + * This software was developed by Björn Zeeb under sponsorship from + * the FreeBSD Foundation. + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include +#include +#include + +#include +#include "linux_80211.h" + +#include + +struct lkpi_80211_pm_softc { + /* PCI */ + int (*suspend) (struct pci_dev *pdev, pm_message_t state); + int (*resume) (struct pci_dev *pdev); +}; + +static int +lkpi_80211_pm_suspend(struct pci_dev *pdev, pm_message_t state) +{ + const struct dev_pm_ops *pmops; + struct lkpi_80211_pm_softc *sc; + struct ieee80211com *ic; + device_t dev; + int error; + + dev = device_find_child(pdev->dev.bsddev, "lkpi80211_pm", + DEVICE_UNIT_ANY); + if (dev == NULL) { + /* Must not happen, so abort suspend if it does. */ + device_printf(pdev->dev.bsddev, + "%s: cannot find lkpi80211_pm child for %s\n", + __func__, device_get_name(pdev->dev.bsddev)); + return (ENXIO); + } + sc = device_get_softc(dev); + error = 0; + + /* Call order: wireless then pdev. */ + + ic = ieee80211_find_com(device_get_nameunit(pdev->dev.bsddev)); + if (ic != NULL) { + error = lkpi_80211_suspend(ic, state); + } else { + device_printf(pdev->dev.bsddev, + "%s: WARNING: wireless device not found\n", __func__); + } + if (error != 0) + goto err; + + /* Logic duplicated from linux_pci_suspend(). */ + pmops = pdev->pdrv->driver.pm; + if (sc->suspend != NULL) + error = sc->suspend(pdev, state); + else if (pmops != NULL && pmops->suspend != NULL) { + error = -pmops->suspend(&pdev->dev); + if (error == 0 && pmops->suspend_late != NULL) + error = -pmops->suspend_late(&pdev->dev); + if (error == 0 && pmops->suspend_noirq != NULL) + error = -pmops->suspend_noirq(&pdev->dev); + } + +err: + if (error < 0) + error = -error; + + if (error != 0) + device_printf(pdev->dev.bsddev, + "%s: WARNING: SUSPEND FAILED: %d\n", __func__, error); + + return (error); +} + +static int +lkpi_80211_pm_resume(struct pci_dev *pdev) +{ + const struct dev_pm_ops *pmops; + struct lkpi_80211_pm_softc *sc; + struct ieee80211com *ic; + device_t dev; + int error; + + dev = device_find_child(pdev->dev.bsddev, "lkpi80211_pm", + DEVICE_UNIT_ANY); + if (dev == NULL) { + /* Must not happen, so abort suspend if it does. */ + device_printf(pdev->dev.bsddev, + "%s: cannot find lkpi80211_pm child\n", __func__); + return (ENXIO); + } + sc = device_get_softc(dev); + error = 0; + + /* Call order: pdev then wireless. */ + + /* Logic duplicated from linux_pci_resume(). */ + pmops = pdev->pdrv->driver.pm; + if (sc->resume != NULL) { + error = sc->resume(pdev); + } else if (pmops != NULL && pmops->resume != NULL) { + if (pmops->resume_early != NULL) + error = -pmops->resume_early(&pdev->dev); + if (error == 0 && pmops->resume != NULL) + error = -pmops->resume(&pdev->dev); + } + if (error != 0) + device_printf(pdev->dev.bsddev, "%s: resume failed!\n", __func__); + /* Do not error out but give wireless also a chance. */ + + ic = ieee80211_find_com(device_get_nameunit(pdev->dev.bsddev)); + if (ic != NULL) { + error = lkpi_80211_resume(ic); + } else { + device_printf(pdev->dev.bsddev, + "%s: WARNING: wireless device not found\n", __func__); + } + + if (error < 0) + error = -error; + + return (error); +} + +/* -------------------------------------------------------------------------- */ +static void +lkpi_80211_pm_identify(driver_t *driver, device_t parent) +{ + + /* Make sure we're not being doubly invoked per parent. */ + if (device_find_child(parent, driver->name, DEVICE_UNIT_ANY) != NULL) + return; + + /* Make sure this is PCI for now. */ + if (device_get_devclass(parent) == devclass_find("pci")) + return; + + if (BUS_ADD_CHILD(parent, 0, driver->name, DEVICE_UNIT_ANY) == NULL) + device_printf(parent, "%s: failed to add child\n", __func__); +} + +static int +lkpi_80211_pm_probe(device_t dev) +{ + device_set_descf(dev, "LinuxKPI 802.11 %s mac80211 PM", + device_get_nameunit(device_get_parent(dev))); + return (BUS_PROBE_DEFAULT); +} + +static int +lkpi_80211_pm_attach(device_t dev) +{ + struct lkpi_80211_pm_softc *sc; + struct pci_dev *pdev; + + sc = device_get_softc(dev); + pdev = device_get_softc(device_get_parent(dev)); + + /* Intercept the driver suspend/resume calls. */ + sc->suspend = pdev->pdrv->suspend; + pdev->pdrv->suspend = lkpi_80211_pm_suspend; + sc->resume = pdev->pdrv->resume; + pdev->pdrv->resume = lkpi_80211_pm_resume; + + return (0); +} + +static int +lkpi_80211_pm_detach(device_t dev) +{ + struct lkpi_80211_pm_softc *sc; + struct pci_dev *pdev; + + sc = device_get_softc(dev); + pdev = device_get_softc(device_get_parent(dev)); + + /* Restore the original notifications. */ + pdev->pdrv->suspend = sc->suspend; + pdev->pdrv->resume = sc->resume; + + return (0); +} + +static device_method_t lkpi_80211_pm_methods[] = { + /* Device interface */ + DEVMETHOD(device_identify, lkpi_80211_pm_identify), + DEVMETHOD(device_probe, lkpi_80211_pm_probe), + DEVMETHOD(device_attach, lkpi_80211_pm_attach), + DEVMETHOD(device_detach, lkpi_80211_pm_detach), + /* + * Do not think about device_suspend/resume here. + * We are not a PCI device and LinuxKPI PCI linux_pci_suspend/resume + * are getting the notifications so we have to hijack the + * LinuxKPI upcalls. + */ + + DEVMETHOD_END +}; + +driver_t lkpi_80211_pm_driver = { + "lkpi80211_pm", + lkpi_80211_pm_methods, + sizeof(struct lkpi_80211_pm_softc), +}; + +MODULE_DEPEND(lkpi80211_pm, linuxkpi_wlan, 1, 1, 1); +MODULE_VERSION(lkpi80211_pm, 1); diff --git a/sys/conf/files b/sys/conf/files index 7f925bfc3f23..670ae0c7f469 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -4636,6 +4636,8 @@ compat/linuxkpi/common/src/linux_80211.c optional compat_linuxkpi wlan \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_80211_macops.c optional compat_linuxkpi wlan \ compile-with "${LINUXKPI_C}" +compat/linuxkpi/common/src/linuxkpi_80211_pm.c optional compat_linuxkpi wlan \ + compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_kmod.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_acpi.c optional compat_linuxkpi acpi \ diff --git a/sys/contrib/dev/iwlwifi/lkpi_iwlwifi_pm.c b/sys/contrib/dev/iwlwifi/lkpi_iwlwifi_pm.c new file mode 100644 index 000000000000..7843e27d559c --- /dev/null +++ b/sys/contrib/dev/iwlwifi/lkpi_iwlwifi_pm.c @@ -0,0 +1,8 @@ +#include +#include +#include +#include + +extern driver_t lkpi_80211_pm_driver; +DRIVER_MODULE(lkpi80211_pm, iwlwifi, lkpi_80211_pm_driver, 0, 0); + diff --git a/sys/contrib/dev/rtw88/lkpi_rtw88_pm.c b/sys/contrib/dev/rtw88/lkpi_rtw88_pm.c new file mode 100644 index 000000000000..53da7b2ea715 --- /dev/null +++ b/sys/contrib/dev/rtw88/lkpi_rtw88_pm.c @@ -0,0 +1,8 @@ +#include +#include +#include +#include + +extern driver_t lkpi_80211_pm_driver; +DRIVER_MODULE(lkpi80211_pm, rtw88, lkpi_80211_pm_driver, 0, 0); + diff --git a/sys/contrib/dev/rtw89/lkpi_rtw89_pm.c b/sys/contrib/dev/rtw89/lkpi_rtw89_pm.c new file mode 100644 index 000000000000..6f75557fa7ca --- /dev/null +++ b/sys/contrib/dev/rtw89/lkpi_rtw89_pm.c @@ -0,0 +1,8 @@ +#include +#include +#include +#include + +extern driver_t lkpi_80211_pm_driver; +DRIVER_MODULE(lkpi80211_pm, rtw89, lkpi_80211_pm_driver, 0, 0); + diff --git a/sys/modules/iwlwifi/Makefile b/sys/modules/iwlwifi/Makefile index 471509c2bb1c..0212830835df 100644 --- a/sys/modules/iwlwifi/Makefile +++ b/sys/modules/iwlwifi/Makefile @@ -4,7 +4,7 @@ DEVIWLWIFIDIR= ${SRCTOP}/sys/contrib/dev/iwlwifi .PATH: ${DEVIWLWIFIDIR} -IWLWIFI_CONFIG_PM= 0 +IWLWIFI_CONFIG_PM= 1 IWLWIFI_DEBUGFS= 0 .if ${KERN_OPTS:MDEV_ACPI} IWLWIFI_CONFIG_ACPI= 1 @@ -59,6 +59,7 @@ CFLAGS+= -DCONFIG_MAC80211_DEBUGFS .if defined(IWLWIFI_CONFIG_PM) && ${IWLWIFI_CONFIG_PM} > 0 SRCS+= mvm/d3.c SRCS+= mld/d3.c +SRCS+= lkpi_iwlwifi_pm.c CFLAGS+= -DCONFIG_PM CFLAGS+= -DCONFIG_PM_SLEEP .endif diff --git a/sys/modules/linuxkpi_wlan/Makefile b/sys/modules/linuxkpi_wlan/Makefile index bafeb2d5d22a..a8dd06f06bc0 100644 --- a/sys/modules/linuxkpi_wlan/Makefile +++ b/sys/modules/linuxkpi_wlan/Makefile @@ -3,6 +3,7 @@ KMOD= linuxkpi_wlan SRCS= linux_80211.c \ linux_80211_macops.c +SRCS+= linuxkpi_80211_pm.c # QCA ath11k support. SRCS+= linux_mhi.c diff --git a/sys/modules/rtw88/Makefile b/sys/modules/rtw88/Makefile index 1978e2392da9..d9dfd5c2efb1 100644 --- a/sys/modules/rtw88/Makefile +++ b/sys/modules/rtw88/Makefile @@ -66,6 +66,7 @@ CFLAGS+= -DCONFIG_RTW88_USB .if defined(RTW88_CONFIG_PM) && ${RTW88_CONFIG_PM} > 0 SRCS+= wow.c +SRCS+= lkpi_rtw88_pm.c CFLAGS+= -DCONFIG_PM=${RTW88_CONFIG_PM} .endif diff --git a/sys/modules/rtw89/Makefile b/sys/modules/rtw89/Makefile index b7f8dc7a2c6e..682bd2ed9b53 100644 --- a/sys/modules/rtw89/Makefile +++ b/sys/modules/rtw89/Makefile @@ -54,8 +54,9 @@ SRCS+= rtw8852cu.c .endif .if defined(RTW89_CONFIG_PM) && ${RTW89_CONFIG_PM} > 0 -CFLAGS+= -DCONFIG_PM=${RTW89_CONFIG_PM} SRCS+= wow.c +SRCS+= lkpi_rtw89_pm.c +CFLAGS+= -DCONFIG_PM=${RTW89_CONFIG_PM} .endif .if defined(RTW89_DEBUGFS) && ${RTW89_DEBUGFS} > 0 From nobody Wed May 27 06:26:20 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQKQ940gNz6fT0b for ; Wed, 27 May 2026 06:26: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQKQ921w7z47hh for ; Wed, 27 May 2026 06:26:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779863185; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OPjpk30jIjqgHD/P+jWixMML3vhA92hb7vC20ioKl9w=; b=dT7dSxXa2phBdbrqy9cZ0gmc+9dRxtOsdpFRCEGtGG1GtX7rJCnt4kIJWYyB5/pg5Ivsok Vd0j2zuUchbPewJYdGxehfl7fP7kp3mMZsUe0mFpfvvYO/MpS1061KBGoQ9blOltbqCZJe VjCh7183dcX1b2rPruZJJEsihmufnXIOscX+AJjqBoUd2XzaK6jSkt4+mj+pYczuAkdKll HWEMlauWFs49IahVZqES4jN+18nS/goBC2qOpwAwkuiLy0I3sqEnqQg/+oCEgtYeLaGTo7 dT6zpQKj4cXSrKcGDMTSzPRB9maqzri3xueqi+xtn/c2nfo0f19ytFbfJmwvew== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779863185; a=rsa-sha256; cv=none; b=MHttds/j0D8j10loKRAcVfGgiA3DI0qZ59GUg7xBKOJ0nlejBZYYh3UXvdlpxxefM3Cfzg rCCDaKsT5N2uY7CFON0cQEMuXn4SkToZR7ePwdOhi0sXz0w5UpFXj8HYMF+xxKRhsijz21 VOXuZZD0E17tjNISTBOowZjbCNz48zWnPea0SoWuOOpo3f7HhYXCaHOEU11DdnSTQP1YOi I2VBEh+lfyT3q8eghahqKo6lEm+4U34RaitFSK6P7JXx1OD4Hxo3jASJLJbapkMebFG6Yo FQaQr4tDQk7QYEDJYuuQl4YeJlWLCOGcJAmn2StzbjW4h46aoh0Fsi5Q/sNMcQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779863185; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OPjpk30jIjqgHD/P+jWixMML3vhA92hb7vC20ioKl9w=; b=XeJBo75SQytlmfFeklM49+FRTYgBa1goq499+REAs8kfxTezB0/u9YHhwSkVLX8Dn15ocP XvCZeGyx+52UYSegBaXxaH7sjPoA6qP77eKzJtYP4SbAjcNIg4V7xRQUoCg9mP54OjZvgc ki6/RhnV+0b4v56oH42Qh+a0mFeXlaBeYUm69u2VnueRa4XfTWT9zge2ywaRFNB6FWHCAm /ZalOZy0jSOOhIX+huve3c8bOh91lTdEvKNxR3skFWiX/vwHNc+SkWPmjgGrgcbnusLaZF WUJJDxJHyQ1JNm6GhpPMeSk32xlKz0VaEjEPZgawPfe3SzI0WMgY4Y224fomOA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQKQ91PHLznCN for ; Wed, 27 May 2026 06:26:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 45b02 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 06:26:20 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: de65e20f8579 - stable/15 - LinuxKPI: 802.11: reset chanctx when recycling List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: de65e20f8579e659adce86a1de05e194199427cf Auto-Submitted: auto-generated Date: Wed, 27 May 2026 06:26:20 +0000 Message-Id: <6a168e8c.45b02.46e05830@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=de65e20f8579e659adce86a1de05e194199427cf commit de65e20f8579e659adce86a1de05e194199427cf Author: Bjoern A. Zeeb AuthorDate: 2026-05-23 21:06:32 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-05-27 01:31:01 +0000 LinuxKPI: 802.11: reset chanctx when recycling When we no longer need a channel context and put it back on the reserved list, zero it for all but the vif so that we get the same state as if it was freshly allocated. Sponsored by: The FreeBSD Foundation Fixes: e62c92c0a5cf, 88cb1e17f471 (cherry picked from commit 8ead19207e56790bd4c64dba4ddbf2e0eb6922f7) --- sys/compat/linuxkpi/common/src/linux_80211.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index b9528295ad8e..efd1d9bae3cc 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -2426,6 +2426,8 @@ lkpi_set_chanctx_conf(struct ieee80211_hw *hw, struct ieee80211_vif *vif, rcu_assign_pointer(vif->bss_conf.chanctx_conf, NULL); lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); list_del(&lchanctx->entry); + memset(lchanctx, 0, sizeof(*lchanctx)); + lchanctx->lvif = VIF_TO_LVIF(vif); list_add_rcu(&lchanctx->entry, &lhw->lchanctx_list_reserved); } @@ -2460,6 +2462,8 @@ lkpi_remove_chanctx(struct ieee80211_hw *hw, struct ieee80211_vif *vif) lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); list_del(&lchanctx->entry); lhw = HW_TO_LHW(hw); + memset(lchanctx, 0, sizeof(*lchanctx)); + lchanctx->lvif = VIF_TO_LVIF(vif); list_add_rcu(&lchanctx->entry, &lhw->lchanctx_list_reserved); } @@ -6806,6 +6810,7 @@ linuxkpi_ieee80211_iffree(struct ieee80211_hw *hw) lkpi_80211_mo_remove_chanctx(hw, chanctx_conf); } list_del(&lchanctx->entry); + /* No need to reset the lchanctx here as we will free it below. */ list_add_rcu(&lchanctx->entry, &lhw->lchanctx_list_reserved); } } From nobody Wed May 27 07:59:49 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQMTx6WDnz6fbY7 for ; Wed, 27 May 2026 07:59: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQMTx5h8Mz3NR6 for ; Wed, 27 May 2026 07:59:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779868789; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7cVHe+5Mp+eKqP2OBIQUrkYGQ/jGE2v7ooMKeL/Q/Nc=; b=S52JzZ/FM27YYQSc2LyhaJeot/d7tDCfs+t6j/0YHPluNlIJ2r6r+1JpMox8lMtKIV0dm8 0YrfAGeE7AKHhToVGsDf12qfcwy+JUYxXjCjo1yNyyuGbLoJ6Y/7tZnfS+S12m4r3dl8H2 l6qtYEYdg5az2YlkSZktH7dhg0bqfVdAoCRCWjfaJ+63byda0lcw/mtwXZmm+/EALPgqWY 1Ag9w2/OG2W/2xyAkx9ctmFByzaja+m5Xi/qmecy+5Z2sY77gWOQTTtCkqWIx6gNAryh95 7sVb3qD36EFaKjetp/aYbD2MAZJp3t2YSCSn3ELWPheMXwrV1asypaC3T6XDtw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779868789; a=rsa-sha256; cv=none; b=te8f4jqt2ZpGeGBheXhCO5XydIk+g7pwM64sH1lbptKEg5WpaodKFa+2YkAFar86QU34AB J/Te0L7vaxB6FhFx4enCK/w2j55UxvQIEJiVjGM9ykoxnWzHYoJt/U3QDbZ2g6VByOeU6S icwZK+WiZvFBWrzmAQCK4ZxDu7oQIQjIBYbmtzDvP/Cj5wtIUHgund8aKwGHl/syJPFQug QfmHhrQt6pvAdJw1yuZMA5Vj+E9DYXhEVkSPOZe1X2k25nO+EIZU5zv9SbRxaxOdNXmLEV NFMUmX2iXkCcSn33LfjByMoP4/6nB1ip1xau7XnXJH8R5e2sLQZv7o2bSyNd6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779868789; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7cVHe+5Mp+eKqP2OBIQUrkYGQ/jGE2v7ooMKeL/Q/Nc=; b=kjNL1o5VChibVTcHaK81N2Nynn7hFQ0p+j1O6DL+edOd8rIo+cIOX/aozQZQYsCZDRRNDU iw7qYlqsChkiqE7Rd3UMSVpPOHcOmD5dvBNErn3quC1I86o47AaeF+WDHHG3ZvGKgBy1pV WGnByseVfoQLBdjJSkc73FNfTZf94IJQb3C2fYuhCxr0zRMiEF89+EbJzqVKJ0Kpt4ML56 kdxaJ4Mhinhjakb2GLf10Y8agZd9leUUbWY7cJGwjZJwgdeUWJsyGZ2G3EpX3sI0TvF2N8 uRkcOBzWlXR2yOGGsiD7zeYjuDDH1cUILp3HEuVUNldTjwLoPz5ln8FLm8v0uQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQMTx4sqHzr0N for ; Wed, 27 May 2026 07:59:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1f864 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 07:59:49 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 7a070ca45b09 - stable/15 - fcntl.2: clarify arg use for F_SETFD List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 7a070ca45b097b787ebd2397dbaaca0a7250d8be Auto-Submitted: auto-generated Date: Wed, 27 May 2026 07:59:49 +0000 Message-Id: <6a16a475.1f864.4af50bad@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=7a070ca45b097b787ebd2397dbaaca0a7250d8be commit 7a070ca45b097b787ebd2397dbaaca0a7250d8be Author: Konstantin Belousov AuthorDate: 2026-05-22 04:01:20 +0000 Commit: Konstantin Belousov CommitDate: 2026-05-27 07:59:25 +0000 fcntl.2: clarify arg use for F_SETFD (cherry picked from commit db513f3a55d59339055e6033829964738b879501) --- lib/libsys/fcntl.2 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/libsys/fcntl.2 b/lib/libsys/fcntl.2 index d67c38cfbc6c..b919e1b8674b 100644 --- a/lib/libsys/fcntl.2 +++ b/lib/libsys/fcntl.2 @@ -176,7 +176,9 @@ descriptor to also have the flag set. .El .It Dv F_SETFD Set flags associated with -.Fa fd . +.Fa fd +to +.Fa arg . The available flags are .Dv FD_CLOEXEC , .Dv FD_CLOFORK From nobody Wed May 27 08:10:05 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQMjv2nmcz6fcZC for ; Wed, 27 May 2026 08:10: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQMjt3txtz3PSB for ; Wed, 27 May 2026 08:10:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779869410; 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=Ye2tiscLWMUVIx36dgU28S9iyDpFDC7ThUIRVxiq2rE=; b=jGEODMNbJefFd/3NvZbi14s+T6wM60wAB0to5cBnHygNOrkUEwV0a+FOLkyHciJFKYtLJQ F5BP61MvZMoQYjQ2Fci+WL4WG2EHvCitaTSedwZivWsHA/PSmuojxdAwA/gnZCHOjNjrWe IOo3BV0p1+JVBOza4+78BcsYoe4PTuMj9JmZR2aw58MyFqotVg2G761J6WYuwv37XHZjBV vvoJWXDweIHAr9GLvVPazbzOZUvcohwuslOoIu5vO575gra5mw36iKA3sos0I7c1uqzeOC GZyWjhxtJ+gp4TvHscXY6b6+yM8vXXlPKfJpES/lqHgFae8FSmlQjn2AYSMX/Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779869410; a=rsa-sha256; cv=none; b=fO+ATt92MVGAch+E+J8PInItlKuR4fVFfvhscVoUZvLJd6eQTgZhaHrPdSI0z787Ef7XZQ R8jYnh283TpypPRx3HQ711z9cdKWnCyqEXlSqfYYA0OjP6RoGIA1qGBjYxxoAhgPeJ36hC qxO26zWXExtWJl76TVE8WRKr+QWFyFkCWBomVApdXrsXtqHeYAjpyEe4H6ynExmBjHM1sk RIncNl2vxqC+KznxsgFv9Mve2c/cWQWwTJMj/SLYbRUdq4ZQ++gGhc/0pJuh4WkPzndy5V nDrWB25oQuVg9KGVGRNwHOTLwHrbnrFlv84ERQwgyD7ZCgINfX5zGE7kW2fA0w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779869410; 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=Ye2tiscLWMUVIx36dgU28S9iyDpFDC7ThUIRVxiq2rE=; b=o5f8rIv3/sTZvVhxtcXn7Q3s26E8p0lr1Xq1oV94jX5JIbC4nAVWLy7XUML72d08XOoqr7 6/HuW74CrzF1dg9ihsqOx4lgyb/cDSmDpibFqdma+AMDSbWBf6pjxoYtTn+CJ3ZnL+5ZB/ 7cRVf+4wp8khTJLcB1xIRQDsTs3UIudvkqR6qobYPNvBWEVudOVmNwM56FQ7NRsvW68uU6 f3mx3+iWA43EKLQ1PYakJUvLdzV2N9mC9XVRW/mJTzWWEBSHuIpG+jJUyeqKA2rVfbHJ+5 vWN5zUQlc4YNsB4xhNRWAuyPcAgY6y0SqFu+CJPVHghw7uF4s5FKxVZeY+UP6Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQMjt2MvszrQT for ; Wed, 27 May 2026 08:10:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 20730 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 08:10:05 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Haoxiang Li From: Konstantin Belousov Subject: git: f0e702a7a289 - main - smbfs: plug smbfs_node_alloc() leak of name buffers when insmntque() fails List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f0e702a7a289f0f350bdaeb943805d6d17f9e403 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 08:10:05 +0000 Message-Id: <6a16a6dd.20730.617c5cab@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=f0e702a7a289f0f350bdaeb943805d6d17f9e403 commit f0e702a7a289f0f350bdaeb943805d6d17f9e403 Author: Haoxiang Li AuthorDate: 2026-05-26 13:21:39 +0000 Commit: Konstantin Belousov CommitDate: 2026-05-27 08:09:31 +0000 smbfs: plug smbfs_node_alloc() leak of name buffers when insmntque() fails PR: 295577 MFC after: 2 weeks --- sys/fs/smbfs/smbfs_node.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/fs/smbfs/smbfs_node.c b/sys/fs/smbfs/smbfs_node.c index 9893987f7ccd..b2b5d63e2eaf 100644 --- a/sys/fs/smbfs/smbfs_node.c +++ b/sys/fs/smbfs/smbfs_node.c @@ -212,6 +212,10 @@ smbfs_node_alloc(struct mount *mp, struct vnode *dvp, const char *dirnm, SMBERROR("new vnode '%s' born without parent ?\n", np->n_name); error = insmntque(vp, mp); if (error) { + smbfs_name_free(np->n_name); + free(np->n_rpath, M_SMBNODENAME); + if (np->n_parent != NULL && (np->n_flag & NREFPARENT) != 0) + vrele(np->n_parent); free(np, M_SMBNODE); return (error); } From nobody Wed May 27 08:17:56 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQMtx4B8Yz6fd78 for ; Wed, 27 May 2026 08:18: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQMtx1d48z3Qkh for ; Wed, 27 May 2026 08:18:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779869881; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D5NnEdmFlO1EubbHge46t5fl7bjrrTObXk/6SCeYEjY=; b=OgVPK1sshhNmzMNN8CmtcL6mZxQDpRkzpdSveKLybI7pv4vd5xjL9IP2O5SqI/pAyxWuUO wARVFAzjtK5ju+NSvZuNe3AIhvGU5rkGaRgnWq7jCnrzomBSyC2PyctGsmGhiUvYtvTFQm kbXOeH3t41NYfJNyrpBjlrKU4bZHnHqaf0B5L0FepyT50ThA+c3pdP06mRVjx6FgBy54r9 8u5FVCc+BjTlpBfY2YgV7I+MWyuMnH+OGvcw8Sd6sklaHzmXQO9yhBvtUE3vji4hvaWp4U lvzZwlsi+UuxAQ7RcCfv025uSFbO1woZtGxFS4wYj7+/9Tp6K0whXFpPrIy/1A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779869881; a=rsa-sha256; cv=none; b=Hd9UyZUHKa3n+j8EoMvkKvP8IhrQYCOoES6pzDqn4GqjXiZuNGDFfQZrPOIEJ/IdsUWsY8 NVnU3WR5lICdAQesQJT58t7vL6GqkmfI0+SR4E16ooKcRbDPRLrADxHQuIRImkdMfnWKAh CeOihyUIc2z91DuhXyBhH8c+tDwelV9jou2uSJWE30y48LgWWR2WgxOL7lDT8zkPIptyNL GifR0DvyIqka+h8DrJmibmOwTelndOpqfglzCaZ1fcpqVpIyzSGQAfOpMQ4jQSt3r3p4t1 2GYJFsjFIJxoAS9Qj1TJbzrNv0vH81VTgjkSXAnS3YZV/P9LY+MtMcKNrK3JaQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779869881; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D5NnEdmFlO1EubbHge46t5fl7bjrrTObXk/6SCeYEjY=; b=KdwUnVYCUGMbeN2OVyP3T9hy6z0iulX15es5YrcB7m6Jr21lcrjv/JB0jK1WKk1x+Ft5tc TiFWmqCkMZHJ1dJg0nJ0b0753+cRHyTmU/fhs3wYItRXZt7Facyz43khEv2akrc5wIWUAd yhqHctp96+IfP3HBuv/UKnthTAnDaX8n96+mb0b7gw9TmsOvI3bjHJeRuuASlNXdd9GryG jwyqxQ/TSUwxfBPPDnqPO35FTiIyqN06i24QY1fyQmrnIGTpFsiG+42hwJh4JVN6CVPoB/ K9Fw6txo5rjTVl4CySdC4kRG4Mi3hwtWnZblQJ49mbJ/VqbTix+0KCYQUWYshA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQMtx0pKTzrDy for ; Wed, 27 May 2026 08:18:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 22767 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 08:17:56 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Tom Jones Subject: git: e4328c1398e5 - main - acpi: Update s2idle strings to new name List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: thj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e4328c1398e5ea47d039fbcffffe1a64ed92b981 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 08:17:56 +0000 Message-Id: <6a16a8b4.22767.4b401681@gitrepo.freebsd.org> The branch main has been updated by thj: URL: https://cgit.FreeBSD.org/src/commit/?id=e4328c1398e5ea47d039fbcffffe1a64ed92b981 commit e4328c1398e5ea47d039fbcffffe1a64ed92b981 Author: Tom Jones AuthorDate: 2026-05-27 08:16:49 +0000 Commit: Tom Jones CommitDate: 2026-05-27 08:16:49 +0000 acpi: Update s2idle strings to new name Reviewed by: obiwac, emaste, olce Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57232 --- sys/dev/acpica/acpi.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index 4c6d0c3679c9..5cb0afa581ca 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -666,10 +666,11 @@ acpi_attach(device_t dev) /* * Pick the first valid sleep type for the sleep button default. If that - * type was hibernate and we support s2idle, set it to that. The sleep - * button prefers s2mem instead of s2idle at the moment as s2idle may not - * yet work reliably on all machines. In the future, we should set this to - * s2idle when ACPI_FADT_LOW_POWER_S0 is set. + * type was hibernate and we support suspend_to_idle , set it to that. The + * sleep button prefers fw_suspend instead of suspend_to_idle at the moment + * as suspend_to_idle may not yet work reliably on all machines. In the + * future, we should set this to suspend_to_idle when + * ACPI_FADT_LOW_POWER_S0 is set. */ sc->acpi_sleep_button_stype = POWER_STYPE_UNKNOWN; for (stype = POWER_STYPE_STANDBY; stype <= POWER_STYPE_FW_HIBERNATE; stype++) @@ -743,7 +744,7 @@ acpi_attach(device_t dev) OID_AUTO, "lid_switch_state", CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_MPSAFE, &sc->acpi_lid_switch_stype, 0, acpi_stype_sysctl, "A", - "Lid ACPI sleep state. Set to s2idle or s2mem if you want to suspend " + "Lid ACPI sleep state. Set to suspend_to_idle or fw_suspend if you want to suspend " "your laptop when you close the lid."); SYSCTL_ADD_PROC(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree), OID_AUTO, "suspend_state", CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_MPSAFE, @@ -2154,9 +2155,9 @@ acpi_device_pwr_for_sleep_sxd(device_t dev, ACPI_HANDLE handle, int state, * we are currently entering (sc->acpi_stype is set in acpi_EnterSleepState * before the ACPI bus gets suspended, and thus before this function is called). * - * If entering s2idle, we will try to enter whichever D-state we would've been - * transitioning to in S3. If we are entering an ACPI S-state, we evaluate the - * relevant _SxD state instead (ACPI 7.3.16 - 7.3.19). + * If entering suspend_to_idle, we will try to enter whichever D-state we + * would've been transitioning to in S3. If we are entering an ACPI S-state, we + * evaluate the relevant _SxD state instead (ACPI 7.3.16 - 7.3.19). */ int acpi_device_pwr_for_sleep(device_t bus, device_t dev, int *dstate) From nobody Wed May 27 08:48:06 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQNYg0vKXz6fgQx for ; Wed, 27 May 2026 08:48: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQNYf2z1Fz3TGT for ; Wed, 27 May 2026 08:48:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779871686; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5Bn/IYHDVnxVsJ8Elbxv/0M8l8BD0+B0LBLrGYeuPgk=; b=LNkvUYXA5ggIiLTlwndt5DowfAWdi9Q/0JHSi2U2cfdCW/o9KGLBsPNCStNESI6fSkW38K SD+koZJD0GXhIjQjVfanSzPfGdaT8fpivJSLSNW4oIL8PtUk91QIz9pA969LZ/7acIcIB3 yIg8tPbcIFpbwNFJyjVKhFq3TtETeJvVURe1mx+3vb2SIqo3Mp8AbfcmtOWj4MuvTD9AS7 Rn/wTTyLvbWgQ+qnt6eVo9747vdDFKsEsowycIIn4g5dq4uCX3RMFSq3Ourw8TcX16ICiq 5J39A1RLBkoX2y3gx0gRI6Gc8x08xzA8ALmgQDuDx4FdsTnxd0tQw0mhA8aSJw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779871686; a=rsa-sha256; cv=none; b=fHiC24FwI+DRsRdJKMLovFI60cB6XdG2RHGRwh2/+bkKcM+FL5BsQk0qcYMP02ygUFUknt b55Wbu0t4hrGjBAKSkCkZdXnDmxe7/3tBBRtkBZMKIWIEtspJucLyAL9r03JBJ43L7nGlH fbX2zQgurhwVReeNPox8mI6oJaejZpdSZawgEet74N5OhsRCjazJfFZ+dhQwrli1Pr30xX T187Xpxkdzf7HJd2KzA0W8Uyz8a6VPbAucEv7MraL6G07kIR6dqOlbV+x9fT8gwhCPF+iI OKGm9Q6qy0xhcbhdcdjt0hRpx2vXzAwdf21rRQYM+TaHuFBh+WcLCoxehOjlFw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779871686; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5Bn/IYHDVnxVsJ8Elbxv/0M8l8BD0+B0LBLrGYeuPgk=; b=jJvbgZC5WPDXfTdodn14XHNXA89eRW5H8MLvTkaz0Epdi8N1IuotHhGZ+GFQz2TZj6CANk Asm1M1+sgDyYMw0sA9PY6qWiHcG5ZBJ8a7hrjh863iUElavVM1bv/DpCXzbzRGKGC/BTvz RTDH1NnZGGlzDEit9NyKphfwnVk1JWvi4UWh3CghrvcAzB1CHayPjRGVWUQ06G53YlQc4n KbahAQOguhLdDqdFqZaUovoVwOWuuXgGwBVnMZWe7Ybrlxzc04FnpqMTLKeQ1mUmMnl2A6 0RWZLbxpMhm07+79uanUTMYtCYx3SHQ2HCe23eX/hvpcxrWZJTXt0OMyzAqWBg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQNYf2YWczrSR for ; Wed, 27 May 2026 08:48:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 23ab2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 08:48:06 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Aymeric Wibo Subject: git: 7a11a6c64d4f - main - acpi: Update mentions of s2idle in comments List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: obiwac X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7a11a6c64d4f52f41e63e535605d4187650c3651 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 08:48:06 +0000 Message-Id: <6a16afc6.23ab2.79e4ade0@gitrepo.freebsd.org> The branch main has been updated by obiwac: URL: https://cgit.FreeBSD.org/src/commit/?id=7a11a6c64d4f52f41e63e535605d4187650c3651 commit 7a11a6c64d4f52f41e63e535605d4187650c3651 Author: Aymeric Wibo AuthorDate: 2026-05-27 08:47:12 +0000 Commit: Aymeric Wibo CommitDate: 2026-05-27 08:47:14 +0000 acpi: Update mentions of s2idle in comments We use the explicit "suspend-to-idle" name now. Sponsored by: The FreeBSD Foundation --- sys/compat/linuxkpi/common/src/linux_acpi.c | 2 +- sys/dev/acpi_support/acpi_ibm.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_acpi.c b/sys/compat/linuxkpi/common/src/linux_acpi.c index 85a3afe5d01d..680d111d0194 100644 --- a/sys/compat/linuxkpi/common/src/linux_acpi.c +++ b/sys/compat/linuxkpi/common/src/linux_acpi.c @@ -126,7 +126,7 @@ linux_handle_power_suspend_event(void *arg __unused, enum power_stype stype) /* * XXX: obiwac Not 100% sure this is correct, but * acpi_target_sleep_state does seem to be set to - * ACPI_STATE_S3 during s2idle on Linux. + * ACPI_STATE_S3 during suspend-to-idle (aka s2idle) on Linux. */ linux_acpi_target_sleep_state = ACPI_STATE_S3; pm_suspend_target_state = PM_SUSPEND_TO_IDLE; diff --git a/sys/dev/acpi_support/acpi_ibm.c b/sys/dev/acpi_support/acpi_ibm.c index 693d793532c1..a5c44b1f81b9 100644 --- a/sys/dev/acpi_support/acpi_ibm.c +++ b/sys/dev/acpi_support/acpi_ibm.c @@ -1449,8 +1449,8 @@ acpi_ibm_eventhandler(struct acpi_ibm_softc *sc, int arg) switch (arg) { /* * XXX "Suspend-to-RAM" here is as opposed to suspend-to-disk, but it is - * fine if our suspend sleep state transition request puts us in s2idle - * instead of suspend-to-RAM. + * fine if our suspend sleep state transition request puts us in + * suspend-to-idle instead of actual suspend-to-RAM. */ case IBM_EVENT_SUSPEND_TO_RAM: (void)power_pm_suspend(POWER_TRANSITION_SUSPEND); From nobody Wed May 27 08:48:05 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQNYk5wgLz6fgR1 for ; Wed, 27 May 2026 08:48: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQNYk438Kz3Td3 for ; Wed, 27 May 2026 08:48:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779871690; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0Omkq/LKdrmikIBWcNPvGhi54grY1SHa/Zx6JlB/0mU=; b=U+z4JpEjcTECssMM0G0aWJkTHxOLUzXl/dyEPYDvv5wbqRcEtAiAveYOU/YTp/GR/WoMcD YZdQR5irVHYQdu8og7lKV9Q3UG9qbpGZVzuw7nTPcQL/TuzCIcCRqSRhBxWBkWvADzn1Gc 8LH8v5kqEcxB05671PdITLmreCPPOQSOjp2EHCQdYDx5WowTabYKfFERa3NCCEZSSe0n8P EGtGX+akL4sIeOrmF9KE4AgPIMmg5rm2IdTGwOCT1hy2qZI99Okkr/8xpVsGVFrlXapnjf ZVqu7XoDkI/DB1ayBRqSRTVOTDYnJ6/6w6qRsMb6nl9GucwSbmASm1tHC9xI2A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779871690; a=rsa-sha256; cv=none; b=wqrhdYYvQmkMOq5AQFvOLE7ASNV+PMUm1vxRnxrqFzeGnSuOcpr2nML1zboSymgtbPc2Yr GCvVlL2Ym7fKC3DzxNeNqLQS9JpwLEaJ7i2LxJVj0ZRsHPSG0hQX+k+wJmlcJAROUbh0h3 sxihzD05p2iipY5F5HDbY4T/VHW2+byR6M5LXkmnhgXCVQORQDUZwu34VAzIhOtBZd50W/ GUZS2pVn+uoyuiCtcedPmTRzW8LqRb3PhRUpwknuWAWD9QnIS/nzj73yA5VuZEHPLnEw8H OHjPGk00E0oCPhuvl8OadT+9QjroRZepB1ZUqFmaZk336Pj2i56eQnpCuehAhQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779871690; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0Omkq/LKdrmikIBWcNPvGhi54grY1SHa/Zx6JlB/0mU=; b=PJ926xz9U4P0On8PNS2MD+xglYQSzt7nOENtgcOH6SXp1WLTw7B19DvGVYtnfW3+NE/ylC Mjs1xKWa8xayyioQRyPaWdB1xFEcsdDC1flktgXy9Eb85E2Wb11RmpaTdN4TH7d1OmiNDJ FRvmmv3T1qHTzOKfAqUebs88QQkYrm1l4xbRXYzXJW5CRrUR82anK9uy3BoCW0+ks3KjKz a1NEQEVYBCl85IHCjpMX4O3k9fj+qCQlibGcejHo1aPLf8tpbILVr4g5/iGubjn2rmsRE4 90tvhwYqwJxvFrmiEmX2LIXtasoabyNrkRZXEYbFMQ0Z9ZIK5y8csscCmuV34Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQNYk34c4zrGM for ; Wed, 27 May 2026 08:48:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 24b0e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 08:48:05 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Aymeric Wibo Subject: git: 071d82d99736 - main - acpi.4: Update sysctl descriptions with new stype names List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: obiwac X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 071d82d9973660742e771b23365a82eb8dd2dd0f Auto-Submitted: auto-generated Date: Wed, 27 May 2026 08:48:05 +0000 Message-Id: <6a16afc5.24b0e.73bb50ed@gitrepo.freebsd.org> The branch main has been updated by obiwac: URL: https://cgit.FreeBSD.org/src/commit/?id=071d82d9973660742e771b23365a82eb8dd2dd0f commit 071d82d9973660742e771b23365a82eb8dd2dd0f Author: Aymeric Wibo AuthorDate: 2026-05-27 08:44:12 +0000 Commit: Aymeric Wibo CommitDate: 2026-05-27 08:44:44 +0000 acpi.4: Update sysctl descriptions with new stype names Sponsored by: The FreeBSD Foundation --- share/man/man4/acpi.4 | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/share/man/man4/acpi.4 b/share/man/man4/acpi.4 index 91193d899200..27e7d7ba414d 100644 --- a/share/man/man4/acpi.4 +++ b/share/man/man4/acpi.4 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd March 21, 2026 +.Dd May 27, 2026 .Dt ACPI 4 .Os .Sh NAME @@ -123,7 +123,8 @@ Some newer systems require use of this register, while some only work with legacy rebooting support. .It Va hw.acpi.lid_switch_state Sleep type -.Pq Li awake , Li standby , Li s2mem , Li s2idle , Li hibernate , Li poweroff +.Pq Li awake , Li standby , Li fw_suspend , Li suspend_to_idle , \ +Li fw_hibernate , Li poweroff to enter when the lid switch (i.e., a notebook screen) is closed, or .Dq Li NONE .Pq do nothing . @@ -131,7 +132,8 @@ Default is .Dq Li NONE . .It Va hw.acpi.power_button_state Sleep type -.Pq Li awake , Li standby , Li s2mem , Li s2idle , Li hibernate , Li poweroff +.Pq Li awake , Li standby , Li fw_suspend , Li suspend_to_idle , \ +Li fw_hibernate , Li poweroff to enter when the power button is pressed, or .Dq Li NONE .Pq do nothing . @@ -152,13 +154,14 @@ Most current systems do not support .Li S4BIOS . .It Va hw.acpi.sleep_button_state Sleep type -.Pq Li awake , Li standby , Li s2mem , Li s2idle , Li hibernate , Li poweroff +.Pq Li awake , Li standby , Li fw_suspend , Li suspend_to_idle , \ +Li fw_hibernate , Li poweroff to enter when the sleep button is pressed. This is usually a special function button on the keyboard. Default is usually -.Li s2mem +.Li fw_suspend if supported, and -.Li s2idle +.Li suspend_to_idle if not. .It Va hw.acpi.sleep_delay Wait this number of seconds between preparing the system to suspend and From nobody Wed May 27 09:03:26 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQNvL4K7Vz6fhSB for ; Wed, 27 May 2026 09:03: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQNvL3Y7nz3Wrw for ; Wed, 27 May 2026 09:03:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779872606; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4yZ2onQ9D6qoTsE1fgl3FGtrPAN/uSoQEo1Fb/swzCI=; b=IZu3caO7tOvVBPv0/7wd44gmLcanL50x8r0HxzNERNhL+ktS5ogyyfwqszIOSyNZ9wb7Go DoIMnQmKBuspWUU12vCAWar2OeRJbnvFAvjCjKoAZGoC/WNkbIwplcEfIqzSzU0v1X7ttk JUVHLzNS0K70jt9fZrUGQHIw+H8xXW63bWYvpj9r9Fzx1wXkOmHo+sbIHBwFuIV/oAmtls AtiLGTcEqjuTpwddVRaXyon5OQzsoiVWuw3mOLQboZPH53ej5OJpeuyaZ2mX0V0WazFte9 nbo1CHrz3goUS+uzEm1YibbbgDvJzMNGfr8bTqAzrFWDTbOkmOwM43MNVe7N0w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779872606; a=rsa-sha256; cv=none; b=Zj4eumdSBN6gnwfnVskjScb069uQ0NCbWM70/OSLBjnFghh0WCG9PRixXVT8Cch3RZk97K tmsm04yDHQwbYm0b7+2flbUMbEQvPlyyWXnPuOkhNBYKHWlGey1tHM05LngDD49QfzIC// l1Z2lap8LBEOnq4oHMvcEX/YoCK0HIpLAeOhhvAzYJXHLHrr6JElkj2DyWC9sxB2Mbfwul PV9h/by8DjKx0r+gTRroKHs/QZ+1UdpwV9oFfgvnGBWv4pWhtRpm72cTG4Is3ofS28WQoG 3cKpIKtv2ec9LSnaa/dxkJ+ATgof0m96+jm3LypyIgMBXOn62n+NFo+6r0VEIg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779872606; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4yZ2onQ9D6qoTsE1fgl3FGtrPAN/uSoQEo1Fb/swzCI=; b=CVnuIcDn9HzFPOk5wAlEUDuMkNhe3O2c9HIyQ/GV9E3YeKy3hy3ieHsmTQQU3PAZg68we0 hGkSyZTY584zw4/ok0ygy5SLbL4h34AIMmv8JQGlxCderkt8tTOIzeQceTSruhThiHlC5A fMHQdUCR4I6+mXPfejnFkID86CUOhdaRxax38CBhK9CLWgPSkLfNrzh+Q3CWB6lD/b9V7l ZEV9ySGFEWW0ClXDoaSlD/LRFFDNU+8HliHh4W1LaeGPjknA8qYTT6K7nOqJgM3v5wnNCy eleHsG4SVu6qlH+N8d0YkT19022N5mKn/B6KKO6w10P201l8bknwrg3f9SzPgw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQNvL33LHzt0w for ; Wed, 27 May 2026 09:03:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2636a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 09:03:26 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 5a0d8a7065a0 - stable/15 - nlist: Handle multiple symbol tables List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 5a0d8a7065a078475532e2fd2b8780942d69ea0a Auto-Submitted: auto-generated Date: Wed, 27 May 2026 09:03:26 +0000 Message-Id: <6a16b35e.2636a.28d5ff66@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=5a0d8a7065a078475532e2fd2b8780942d69ea0a commit 5a0d8a7065a078475532e2fd2b8780942d69ea0a Author: Dag-Erling Smørgrav AuthorDate: 2026-05-19 06:52:53 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-27 09:03:20 +0000 nlist: Handle multiple symbol tables * Instead of looking for and stopping at the first SHT_SYMTAB section, iterate over all SHT_DYNSYM and SHT_SYMTAB sections until we've either found all our symbols or run out. * Perform bounds checks on section and string table offsets and sizes before attempting to mmap() the string table. * Perform bounds checks on individual symbol table entries before attempting to access the corresponding strings. * Stop treating _Foo and Foo as the same symbol. This unbreaks OpenSSH which uses nlist(3) to verify PKCS#11 providers. PR: 295336 MFC after: 1 week Fixes: 77909f597881 ("Initial elf nlist support [...]") Fixes: 644b4646c7ac ("OpenSSH: Update to 10.1p1") Reviewed by: kib, emaste Differential Revision: https://reviews.freebsd.org/D57034 (cherry picked from commit 4617a6cb82a673b02257257c1f5f8a3c8d2bb943) nlist: Decrement nent on match PR: 295336 MFC after: 1 week Fixes: 4617a6cb82a6 ("nlist: Handle multiple symbol tables") (cherry picked from commit e9cbbf04d6fe24b3a207cf085122def72145742e) --- lib/libc/gen/nlist.3 | 8 +-- lib/libc/gen/nlist.c | 150 ++++++++++++++++++++++++++++----------------------- 2 files changed, 88 insertions(+), 70 deletions(-) diff --git a/lib/libc/gen/nlist.3 b/lib/libc/gen/nlist.3 index 6aefd95e3b51..4912180e9bcd 100644 --- a/lib/libc/gen/nlist.3 +++ b/lib/libc/gen/nlist.3 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 18, 2026 +.Dd May 19, 2026 .Dt NLIST 3 .Os .Sh NAME @@ -45,9 +45,11 @@ Its use is discouraged. The .Fn nlist function -retrieves name list entries from the +retrieves name list entries from .Xr elf 5 -section with type +sections with type +.Dv SHT_DYNSYM +or .Dv SHT_SYMTAB in an ELF object (for example, an executable file or shared library). The argument diff --git a/lib/libc/gen/nlist.c b/lib/libc/gen/nlist.c index ebf4ae92641a..2a9d22852b9a 100644 --- a/lib/libc/gen/nlist.c +++ b/lib/libc/gen/nlist.c @@ -36,8 +36,9 @@ #include #include -#include #include +#include +#include #include #include #include @@ -85,6 +86,8 @@ __fdnlist(int fd, struct nlist *list) #define ISLAST(p) (p->n_un.n_name == 0 || p->n_un.n_name[0] == 0) +static int elf_scan_symtab(Elf_Shdr *, int, int, off_t, size_t, char *, size_t, + struct nlist *, int); static void elf_sym_to_nlist(struct nlist *, Elf_Sym *, Elf_Shdr *, int); /* @@ -121,22 +124,19 @@ int __elf_fdnlist(int fd, struct nlist *list) { struct nlist *p; - Elf_Off symoff = 0, symstroff = 0; - Elf_Size symsize = 0, symstrsize = 0; - Elf_Ssize cc, i; + Elf_Off symoff = 0, stroff = 0; + Elf_Size symsize = 0, strsize = 0; + Elf_Ssize i; int nent = -1; int errsave; - Elf_Sym sbuf[1024]; - Elf_Sym *s; Elf_Ehdr ehdr; - char *strtab = NULL; - Elf_Shdr *shdr = NULL; + Elf_Shdr *shdr; Elf_Size shdr_size; void *base; struct stat st; /* Make sure obj is OK */ - if (lseek(fd, (off_t)0, SEEK_SET) == -1 || + if (lseek(fd, 0, SEEK_SET) == -1 || _read(fd, &ehdr, sizeof(Elf_Ehdr)) != sizeof(Elf_Ehdr) || !__elf_is_okay__(&ehdr) || _fstat(fd, &st) < 0) @@ -158,39 +158,6 @@ __elf_fdnlist(int fd, struct nlist *list) return (-1); shdr = (Elf_Shdr *)base; - /* - * Find the symbol table entry and it's corresponding - * string table entry. Version 1.1 of the ABI states - * that there is only one symbol table but that this - * could change in the future. - */ - for (i = 0; i < ehdr.e_shnum; i++) { - if (shdr[i].sh_type == SHT_SYMTAB) { - symoff = shdr[i].sh_offset; - symsize = shdr[i].sh_size; - symstroff = shdr[shdr[i].sh_link].sh_offset; - symstrsize = shdr[shdr[i].sh_link].sh_size; - break; - } - } - - /* Check for files too large to mmap. */ - if (symstrsize > SIZE_T_MAX) { - errno = EFBIG; - goto done; - } - /* - * Map string table into our address space. This gives us - * an easy way to randomly access all the strings, without - * making the memory allocation permanent as with malloc/free - * (i.e., munmap will return it to the system). - */ - base = mmap(NULL, (size_t)symstrsize, PROT_READ, MAP_PRIVATE, fd, - (off_t)symstroff); - if (base == MAP_FAILED) - goto done; - strtab = (char *)base; - /* * clean out any left-over information for all valid entries. * Type and value defined to be 0 if not found; historical @@ -210,46 +177,95 @@ __elf_fdnlist(int fd, struct nlist *list) ++nent; } - /* Don't process any further if object is stripped. */ - if (symoff == 0) - goto done; - - if (lseek(fd, (off_t) symoff, SEEK_SET) == -1) { - nent = -1; - goto done; + /* + * Find the symbol table entry and it's corresponding + * string table entry. Version 1.1 of the ABI states + * that there is only one symbol table but that this + * could change in the future. + */ + for (i = 0; nent > 0 && i < ehdr.e_shnum; i++) { + if (shdr[i].sh_type != SHT_SYMTAB && + shdr[i].sh_type != SHT_DYNSYM) + continue; + symoff = shdr[i].sh_offset; + symsize = shdr[i].sh_size; + stroff = shdr[shdr[i].sh_link].sh_offset; + strsize = shdr[shdr[i].sh_link].sh_size; + + /* + * Skip this section if it or its string table is empty or + * extends beyond the end of the file, or if the string + * table is too large to map into memory. + */ + if (symoff == 0 || symsize == 0 || + symsize > SIZE_MAX - symoff || + symoff + symsize > st.st_size || + stroff == 0 || strsize == 0 || + strsize > SIZE_MAX - stroff || + stroff + strsize > st.st_size) { + errno = ENOENT; + continue; + } + + /* + * Map string table into our address space. This gives us + * an easy way to randomly access all the strings, without + * making the memory allocation permanent as with + * malloc/free (i.e., munmap will return it to the + * system). + */ + base = mmap(NULL, (size_t)strsize, PROT_READ, + MAP_PRIVATE, fd, (off_t)stroff); + if (base == MAP_FAILED) + continue; + + nent = elf_scan_symtab(shdr, ehdr.e_shnum, fd, symoff, symsize, + base, strsize, list, nent); + + errsave = errno; + munmap(base, strsize); + errno = errsave; } + errsave = errno; + munmap(shdr, shdr_size); + errno = errsave; + return (nent); +} + +static int +elf_scan_symtab(Elf_Shdr *shdr, int shnum, int fd, off_t symoff, size_t symsize, + char *strtab, size_t strsize, struct nlist *list, int nent) +{ + Elf_Sym sbuf[1024]; + Elf_Sym *s; + char *name; + struct nlist *p; + Elf_Ssize cc; + size_t slen; + if (lseek(fd, symoff, SEEK_SET) == -1) + return (-1); while (symsize > 0 && nent > 0) { cc = MIN(symsize, sizeof(sbuf)); if (_read(fd, sbuf, cc) != cc) break; symsize -= cc; for (s = sbuf; cc > 0 && nent > 0; ++s, cc -= sizeof(*s)) { - char *name; - struct nlist *p; - + if (s->st_name >= strsize) + continue; name = strtab + s->st_name; if (name[0] == '\0') continue; - for (p = list; !ISLAST(p); p++) { - if ((p->n_un.n_name[0] == '_' && - strcmp(name, p->n_un.n_name+1) == 0) - || strcmp(name, p->n_un.n_name) == 0) { - elf_sym_to_nlist(p, s, shdr, - ehdr.e_shnum); - if (--nent <= 0) - break; + slen = strnlen(name, strsize - s->st_name); + for (p = list; nent > 0 && !ISLAST(p); p++) { + if (strncmp(name, p->n_un.n_name, slen) == 0 && + p->n_un.n_name[slen] == '\0') { + elf_sym_to_nlist(p, s, shdr, shnum); + --nent; } } } } - done: - errsave = errno; - if (strtab != NULL) - munmap(strtab, symstrsize); - if (shdr != NULL) - munmap(shdr, shdr_size); - errno = errsave; return (nent); } From nobody Wed May 27 09:03:27 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQNvM6BBlz6fhV5 for ; Wed, 27 May 2026 09:03: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQNvM4GSdz3WgJ for ; Wed, 27 May 2026 09:03:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779872607; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5jjNth3UF8WZYo5EZxUoT+mWcOPO5UhzhZ5nPziIoWc=; b=kZhRwFy3lqsj1DcfytAfnM0YbfOhLwN1MEsg2PKbBGPVWBDKtdrIdJpwJs0UOnUvSgPqGJ P+q8Eysmy71hUEUqAcc/9m5WeMvf30SgbBnzn9MimPnvccsEDwgm5iP8fUpudBmULSDaaR 4FCUIIPXcpXAzNX+A/ep7ui6/croCxOxN+uNJu7la2acSkBXkyrfeo7Lh1j8DNI4TNcwQi 0Y6FZqKMQzKtkrMXiS2YCUKfEaegOPl9Vrvxu+k0mukcZwLUQdGnQCH4+xn0d1MXTar1M2 +1GXHAYsmnHHf4lr2Rs2LMm4pPdUP2VRYS6uIr3nOkj1KuLDrJ26eKBPzOPZJg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779872607; a=rsa-sha256; cv=none; b=UUYfvx9eeHNBXtn1xNboyuEw2eMXM9xGMfRRnqwoslsBAYNndH0dTvGlVTET3zXicp1W0u 6LuLVmZetblg2M2E48tgUKfcVeimFgyTRqYulJiTucEk+AmZgJ6BEMWTnjnghl2Zo34TsI LpEJexSR8+junfCuIOWgrx+7OGcn+B2R/KUc+b8w3D2Hx55qTcmKb38pwaErun82k9Kdvc JEsZbb+6LMFsA2rDUgnhBoZsWFQ2V0lMeJ0Mk9/UbYfYdZ5hJUDc7QnzwzSqrs1Hw5WIjQ 4r5E2PDkvfv4oBuz9K7bSsBsP7Pz4hGUr1xSuOsPnRUjM5gqlwUnyIbFySEbTw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779872607; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5jjNth3UF8WZYo5EZxUoT+mWcOPO5UhzhZ5nPziIoWc=; b=MhiWird/pu9G40Ze9xoqzlfMDvKV05dqk+j4T0jEnqpZ9NqKWOnYLuSYM9aAZgyvdGoMt4 R7UtcYa6phKMlk2emxu8wod7qLthoP23L06i7A+H714JSSmdzilDtKmB979gVKNP4uLK2T 7drVxe1P5fCvCv+zckw62vb79IoniuNn6PCzPBUi5U0vOHrDTMkbWB0aFLrGnhS49OiM75 qw+bTZ1+WiMZTPCY61SxrrhuAJckntRq9oZW6NM+zgDKPFlJFsPC4nVXOs4JduByIAo0eT +IghaunLr/lCxDwrr83inQvzKdB4/Ww8eTZYepbXHNYrMgxbGquExazG1dbVUg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQNvM3WjFzsdB for ; Wed, 27 May 2026 09:03:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26431 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 09:03:27 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: b838a022036a - stable/15 - tftp: Simplify URI handling List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: b838a022036aeee8dbbb1470eee65b619215152a Auto-Submitted: auto-generated Date: Wed, 27 May 2026 09:03:27 +0000 Message-Id: <6a16b35f.26431.7f21a6a@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=b838a022036aeee8dbbb1470eee65b619215152a commit b838a022036aeee8dbbb1470eee65b619215152a Author: Dag-Erling Smørgrav AuthorDate: 2026-05-22 17:57:08 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-27 09:03:20 +0000 tftp: Simplify URI handling * No need to copy our argument into a new buffer; it is writeable and will not be reused after we return. * Instead of constructing the string "get path" and then splitting it into an argument vector, just construct the vector directly. This avoid potentially overrunning the buffer. * Call settftpmode() just once, with either the default mode or the user-provided value we already validated. * Use errx() instead of fprintf(stderr) + exit(). Reported by: Moyao, Minghao Fu MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57070 (cherry picked from commit a4b17594181502cea38ab0d8b2a9a10782286334) --- usr.bin/tftp/main.c | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/usr.bin/tftp/main.c b/usr.bin/tftp/main.c index 8e36c9e04f9b..9b7ea7155d82 100644 --- a/usr.bin/tftp/main.c +++ b/usr.bin/tftp/main.c @@ -225,23 +225,18 @@ main(int argc, char *argv[]) static void urihandling(char *URI) { - char uri[ARG_MAX]; + char meth[] = "get"; char *host = NULL; char *path = NULL; char *opts = NULL; const char *tmode = "octet"; char *s; - char line[MAXLINE]; int i; - strlcpy(uri, URI, ARG_MAX); - host = uri + 7; + host = URI + 7; - if ((s = strchr(host, '/')) == NULL) { - fprintf(stderr, - "Invalid URI: Couldn't find / after hostname\n"); - exit(1); - } + if ((s = strchr(host, '/')) == NULL) + errx(1, "Invalid URI: Couldn't find / after hostname"); *s = '\0'; path = s + 1; @@ -253,24 +248,21 @@ urihandling(char *URI) tmode = opts; tmode += 5; - for (i = 0; modes[i].m_name != NULL; i++) { + for (i = 0; modes[i].m_name != NULL; i++) if (strcmp(modes[i].m_name, tmode) == 0) break; - } - if (modes[i].m_name == NULL) { - fprintf(stderr, "Invalid mode: '%s'\n", mode); - exit(1); - } - settftpmode(modes[i].m_mode); + if (modes[i].m_name == NULL) + errx(1, "Invalid mode: '%s'", mode); } - } else { - settftpmode("octet"); } + settftpmode(tmode); setpeer0(host, NULL); - sprintf(line, "get %s", path); - makeargv(line); + margc = 0; + margv[margc++] = meth; + margv[margc++] = path; + margv[margc] = NULL; get(margc, margv); } From nobody Wed May 27 09:03:28 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQNvP027Dz6fhSF for ; Wed, 27 May 2026 09:03: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQNvN4p6Xz3WpK for ; Wed, 27 May 2026 09:03:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779872608; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WpztRVec2zZ+L8Ua8uqmbl9dO5FC6HAfUbgkPohgcm8=; b=ii05LHK8No7HoeHxrMgDB8SAu4zlIc3RNw2LylwSKZGu2TuCGWow2zHHbfxOwd+vQWvIy5 LZg7ySaUecbtSCnKGLClvAPSE5E81YAaOgDLSuP+SHZN1Wklg8myC2MCmc2vkzpW6Zbu2I jg/zgSAjQt22YhFG9qWBhm9DjbtPi6zMXEQAh9hFaeS0QwHFySwIvXDJRGITWXX5SnU/Hq 2b2fCIXuySiSP5CA/kbIOvGF/cE48LJhK++rZLHUoJMamHcyICXTUnOzNUdMNlyN5nd/vy 66CEMc3CKXUhTfqYn+oQAfgIOpa12vS3rkpELtj5GWqsW+OfJLKvPhMbaUu7fg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779872608; a=rsa-sha256; cv=none; b=Ahpr1jFfxYWIA42Z5OIPX8iRzhN++X/HcCY/xSPWBbu3KruwMbJyYVYA6w9APjJ5xRCvTK 3p61W7Pk72GUmFeUUEzVezZadUWEbd+1fLa++KVBjf2G1ZzBCUetyTPknmkvnRBO5egROO 1R1/hM4sX+kmoa90ZC476hvSznH9QayHL/nKSlbHg4kK2HXc3NiKuJQB5LyZtuHdFDVXiF TX8G3WPFvp05TzRzIVtWF7Er2b+waFSeuCo7WdJYi64ynbmNcJT1URb5o26PBfFPzriNby XL49km0ldcHrsCZwUkYLEkzqkArqKYsij/mJdzqs+qGmRKLpgVKJ/SbakUtl3w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779872608; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WpztRVec2zZ+L8Ua8uqmbl9dO5FC6HAfUbgkPohgcm8=; b=TUmx7EKJoriEZHXkaGI51eEEf71syaz1NPg9d1b6mFsbQ3z7Oxx1OyCge9m9dhDRqM+tLi vY01gxlEAYEZeiufl5i1A4WYBu0pkj930yxzgHjLMOTRr0An++miC+NHU86xxIrAgw/xXA AFV+fe3ELyGIHYhGfIq/e1Ypu9kCMleqWnffFE7qp+rZeS/FfPvMl7op7WucVCpaG2soB4 v+odv4UC+GbrVx4/nQJc4wymtmFIStjK/5s5TX1QcaFg6fu+FvpIbt9lxV43DBpcT3sUzq pzJcBzt4fqEOOCSW5FVYw8Q3TRvQF/u+HQrFGQhiF/zkQACpqjVotQCx4rncjQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQNvN4PZpzs3J for ; Wed, 27 May 2026 09:03:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25b4b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 09:03:28 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 66a6b7e7e92f - stable/15 - tftp: Close files when we're done with them List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 66a6b7e7e92f6526a1fd98277bc45ec48f24d4fe Auto-Submitted: auto-generated Date: Wed, 27 May 2026 09:03:28 +0000 Message-Id: <6a16b360.25b4b.6e99f38b@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=66a6b7e7e92f6526a1fd98277bc45ec48f24d4fe commit 66a6b7e7e92f6526a1fd98277bc45ec48f24d4fe Author: Dag-Erling Smørgrav AuthorDate: 2026-05-22 17:57:12 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-27 09:03:20 +0000 tftp: Close files when we're done with them Also, delete the file we created if receiving it failed. MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57071 (cherry picked from commit 29351335704e39ce3ca09c528d534c7898bbdc2c) --- usr.bin/tftp/main.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/usr.bin/tftp/main.c b/usr.bin/tftp/main.c index 9b7ea7155d82..a26561eaa982 100644 --- a/usr.bin/tftp/main.c +++ b/usr.bin/tftp/main.c @@ -584,8 +584,11 @@ get(int argc, char *argv[]) if (verbose) printf("getting from %s:%s to %s [%s]\n", hostname, src, cp, mode); - if (recvfile(peer, port, fd, src, mode) != 0) + if (recvfile(peer, port, fd, src, mode) != 0) { + (void) unlink(cp); txrx_error = 1; + } + close(fd); break; } cp = tail(src); /* new .. jdg */ @@ -597,8 +600,11 @@ get(int argc, char *argv[]) if (verbose) printf("getting from %s:%s to %s [%s]\n", hostname, src, cp, mode); - if (recvfile(peer, port, fd, src, mode) != 0) + if (recvfile(peer, port, fd, src, mode) != 0) { + (void) unlink(cp); txrx_error = 1; + } + close(fd); } } From nobody Wed May 27 09:03:29 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQNvQ0j8wz6fhXS for ; Wed, 27 May 2026 09:03: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQNvP5vRlz3WvQ for ; Wed, 27 May 2026 09:03:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779872609; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1N42WroKDnYijiS4B8jihTi7c2PKn/tZgPv5qe3zuyk=; b=Q8Ykc9pVCxNDuWsOr6jtRGy4ap2TT8J5j3PmIXVmCyfc9DMVWqW3UbO63wekkpRBvpWyHs /p20A5w/feQuF4JjWii+YN39SblztSTfWwwM2sdbubQ1Zx7JkLJmi2jrTk60L7htg3O9Dm VCR8Oi3QHjqdnY51ZrHl279IsCbEaMQvR03vDm2mRCkgZDezpXIj5TqZzre7b138PSJA4p l+F+4EtTk5UXsvWg/kljXnCRtPqD8Yux+I0arWYMBN31iKw8DjGpmrutHJh4rH1kjNXQs8 1vZ4XKRptpEuN4vmZC833rRJ48wHOZO9SBiLbtZUn7XPzkPjtoneqNOK2q7a9w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779872609; a=rsa-sha256; cv=none; b=vlDgbQkEnNBGIn8vFq2++83U/2hd9Y91jlzoF3iJHd2X5zPhT3eAS7jVtGlzFNpx1VhzSd 69vabzcBHv2AwsCzpEi5DOj2t5PrWX6it5LvgbMsFTFQIYI8epVnoQiyIF6BEEKkTOriEG EfSD7kNSq0uQvTdragdC8RO5VKw2vM5m+5mDNHsuGTu9iST1fSiOE2DTAMM+81hIttoctD eVEPKgRUYjYgCe4lgsBFnDkA3mb2nyoKIfqKdMliSbBCtHcDGFGRAVrMWul3l3SZcASgEn gAqCwV1NAmN7b30iev/t1rDPKBsvMkovgSKpyoCKcIjbbkt7EM/uPeYB5ttQWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779872609; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1N42WroKDnYijiS4B8jihTi7c2PKn/tZgPv5qe3zuyk=; b=uhaNhQB7l8JCcxJNqEc28Qth56SB4hG0uCCT2rMNn2vpdtA7orFABR1/zCjev+1zpCkT0e MqmdSY6etT2EczGLFiflcE66OxlyfIuiYtzWB47+87J1/cuyWwRziwTHEcdI+h3R21RKj5 8eZryH4o5oluLa1nzZaijwQ0/SxbEPTLNzXHdKColA1GeQghMBZzofzLcOeCCXn0Dx1yky hLwg50240vxFRv27S0BpMK+AcARyja+jobnBSbBoNdW6oV+37w1YoD3C05zP3mtWI1rrm7 uNnbKUycLOiP35zdwhXPL8yJJkihbpYW9HhUJqwbYVpNOCyu87kO6Q5EluhHFQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQNvP5J4tzs3K for ; Wed, 27 May 2026 09:03:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26c8d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 09:03:29 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 8c11ec396445 - stable/15 - tftp: Fix handling of port name or number List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 8c11ec3964455154512c50fb3d9afb2a206df084 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 09:03:29 +0000 Message-Id: <6a16b361.26c8d.3948338@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=8c11ec3964455154512c50fb3d9afb2a206df084 commit 8c11ec3964455154512c50fb3d9afb2a206df084 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-22 17:57:16 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-27 09:03:20 +0000 tftp: Fix handling of port name or number MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57105 (cherry picked from commit 47e4571df15804fe2b010a3c82b22691d80ee680) --- usr.bin/tftp/main.c | 7 ++++--- usr.bin/tftp/tftp.c | 40 ++++++++++++++++++++++------------------ 2 files changed, 26 insertions(+), 21 deletions(-) diff --git a/usr.bin/tftp/main.c b/usr.bin/tftp/main.c index a26561eaa982..02a84f864071 100644 --- a/usr.bin/tftp/main.c +++ b/usr.bin/tftp/main.c @@ -331,6 +331,8 @@ setpeer0(char *host, const char *lport) } freeaddrinfo(res0); + free(port); + port = strdup(lport); } static void @@ -350,10 +352,9 @@ setpeer(int argc, char *argv[]) printf("usage: %s [host [port]]\n", argv[0]); return; } - if (argc == 3) { - port = argv[2]; + if (argc == 3) setpeer0(argv[1], argv[2]); - } else + else setpeer0(argv[1], NULL); } diff --git a/usr.bin/tftp/tftp.c b/usr.bin/tftp/tftp.c index 31a22f416135..e5c307a572fb 100644 --- a/usr.bin/tftp/tftp.c +++ b/usr.bin/tftp/tftp.c @@ -64,8 +64,9 @@ int xmitfile(int peer, char *port, int fd, char *name, char *mode) { struct tftphdr *rp; + struct servent *se; int n, i, ret = 0; - uint16_t block; + uint16_t block, portn; struct sockaddr_storage serv; /* valid server port number */ char recvbuffer[MAXPKTSIZE]; struct tftp_stats tftp_stats; @@ -75,14 +76,15 @@ xmitfile(int peer, char *port, int fd, char *name, char *mode) memset(&serv, 0, sizeof(serv)); rp = (struct tftphdr *)recvbuffer; - if (port == NULL) { - struct servent *se; - se = getservbyname("tftp", "udp"); - assert(se != NULL); - ((struct sockaddr_in *)&peer_sock)->sin_port = se->s_port; - } else - ((struct sockaddr_in *)&peer_sock)->sin_port = - htons(atoi(port)); + if ((se = getservbyname(port ? port : "tftp", "udp")) != NULL) + portn = se->s_port; + else + portn = htons(atoi(port)); + if (portn == 0) { + printf("Invalid port '%s'.\n", port ? port : "tftp"); + return -1; + } + ((struct sockaddr_in *)&peer_sock)->sin_port = portn; for (i = 0; i < 12; i++) { struct sockaddr_storage from; @@ -166,7 +168,8 @@ int recvfile(int peer, char *port, int fd, char *name, char *mode) { struct tftphdr *rp; - uint16_t block; + struct servent *se; + uint16_t block, portn; char recvbuffer[MAXPKTSIZE]; int n, i, ret = 0; struct tftp_stats tftp_stats; @@ -175,14 +178,15 @@ recvfile(int peer, char *port, int fd, char *name, char *mode) rp = (struct tftphdr *)recvbuffer; - if (port == NULL) { - struct servent *se; - se = getservbyname("tftp", "udp"); - assert(se != NULL); - ((struct sockaddr_in *)&peer_sock)->sin_port = se->s_port; - } else - ((struct sockaddr_in *)&peer_sock)->sin_port = - htons(atoi(port)); + if ((se = getservbyname(port ? port : "tftp", "udp")) != NULL) + portn = se->s_port; + else + portn = htons(atoi(port)); + if (portn == 0) { + printf("Invalid port '%s'.\n", port ? port : "tftp"); + return (-1); + } + ((struct sockaddr_in *)&peer_sock)->sin_port = portn; for (i = 0; i < 12; i++) { struct sockaddr_storage from; From nobody Wed May 27 09:03:30 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQNvR4qRgz6fhVB for ; Wed, 27 May 2026 09:03: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQNvQ6tg4z3Wvf for ; Wed, 27 May 2026 09:03:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779872611; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Oa88mZMn+tk4n/o7bN67gC0ZkPe8gRdMAZslPqfnPm8=; b=X82oxQfHqwLQZUnJ1+jBUx01vpNpUP+hZeX7HiSmwIrEQDNQzUMXkukJ1mIxPsKFBqbAoV 3Yj25eLXL+CRk/+PP34f+maBX1dwgc9uK+VI2pi3hH+XkvlBgdMcmpBUbWnAdFWA19+w8s jUfD/SQ5wunTaPBnuAOcftK+HVuo6eYD4q5CQnVCb+jbJOWX4iT2EwJyU+VEVkQgExHZJC kFOJhUXL1cIJA1k5RBW62YigNH/a9XsZzT6VGx+65oP7kFqvMPF0PUGY9fUb0PQyQFBSE9 SfFdFJZSqJSr4AZpZKx1JkhSyAHXxvWHq85aa4uuJwbAFAOt8Lc/R+oocMEnnA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779872611; a=rsa-sha256; cv=none; b=lYRV/dqvzFZD4NFkgOU2HEY9yhBVlAHmu9BkUdfYkv4mXsr8GkSz4I14eeTi1qeE+FIlFU Tl5mnnTStj9xuJORCWNvQdBt9sCFra2G+24iUhSRruTamP0fle5si3hUMSXrttcIVCSpQu neQ/SUCwZzgQqIYlpoZD0CiXC5r8+qeVf7m4o5584w/1Bm+IPlfNRNwp95+cIGKTwzrVxA MNMm9K7G3rbljOyUsk+u/OHOrBMXvmfC4KkkzhwMYAA2MAFeFFTFglTWNTbWiuCD6UJlYq 8+KBWE9kc254h2Z7WrycGHp2KvpfVrCPhuVcnEFf5kPJf0jG6+5gGUATQ14QCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779872611; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Oa88mZMn+tk4n/o7bN67gC0ZkPe8gRdMAZslPqfnPm8=; b=vJ+4MbztQutO4mO0uPgu5rn2HuZ+uUziwSLZs5AAjaf9D1WSXXuoglLRsgXYrvDmcpJTNW 07XwdbTgg6nBacIEJuDJtEbSXs0QURsNnghFArikwKAVi09Y/OIkAuBj0TQTL23fyFTpjS sdAHkD5qm9I5YX3wKgW4WXJ2vTlf/oYlyIPownlQSSmDU0dsZJHbQCAsLGg6vlfXmM6X5i xNwfSORNI/hDnh/ICgPs9DXtNZmf7IXVbtc70wJRYkJ4I63WGm6qhw61C3h4GgwAvSu5Sn MtRERJxnhTk4oNDcD0KPxyltcStYhScLOABEVGU45hW+6ZTKtvlONC4Sa9tQ1g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQNvQ5p49zs3L for ; Wed, 27 May 2026 09:03:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25b4f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 09:03:30 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 547c9c640e24 - stable/15 - tftp: Replace fgets with getline List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 547c9c640e24f81493dbb8c7afce07705f2136a8 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 09:03:30 +0000 Message-Id: <6a16b362.25b4f.30be95ba@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=547c9c640e24f81493dbb8c7afce07705f2136a8 commit 547c9c640e24f81493dbb8c7afce07705f2136a8 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-22 17:57:20 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-27 09:03:20 +0000 tftp: Replace fgets with getline MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57072 (cherry picked from commit 5fd928cf1cef21e0fc20ab7c2be156a0eeecdf40) --- usr.bin/tftp/main.c | 90 ++++++++++++++++++++++++++--------------------------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/usr.bin/tftp/main.c b/usr.bin/tftp/main.c index 02a84f864071..849069fa9e8e 100644 --- a/usr.bin/tftp/main.c +++ b/usr.bin/tftp/main.c @@ -62,7 +62,6 @@ #include "tftp-options.h" #include "tftp.h" -#define MAXLINE (2 * MAXPATHLEN) #define TIMEOUT 5 /* secs between rexmt's */ typedef struct sockaddr_storage peeraddr; @@ -72,7 +71,7 @@ static jmp_buf toplevel; static int txrx_error; static int peer; -#define MAX_MARGV 20 +#define MAX_MARGV 32 static int margc; static char *margv[MAX_MARGV]; @@ -106,7 +105,7 @@ static const char *command_prompt(void); static void urihandling(char *URI); static void getusage(char *); -static void makeargv(char *line); +static void makeargv(char *argv0, char *line); static void putusage(char *); static void settftpmode(const char *); @@ -338,13 +337,13 @@ setpeer0(char *host, const char *lport) static void setpeer(int argc, char *argv[]) { - char line[MAXLINE]; + static char *line; + static size_t sz; if (argc < 2) { - strcpy(line, "Connect "); printf("(to) "); - fgets(&line[strlen(line)], sizeof line - strlen(line), stdin); - makeargv(line); + getline(&line, &sz, stdin); + makeargv(argv[0], line); argc = margc; argv = margv; } @@ -421,17 +420,16 @@ settftpmode(const char *newmode) static void put(int argc, char *argv[]) { - int fd; - int n; - char *cp, *targ, *path; - char line[MAXLINE]; + static char *line; + static size_t sz; + int fd, n; + char *cp, *targ, *path; struct stat sb; if (argc < 2) { - strcpy(line, "send "); printf("(file) "); - fgets(&line[strlen(line)], sizeof line - strlen(line), stdin); - makeargv(line); + getline(&line, &sz, stdin); + makeargv(argv[0], line); argc = margc; argv = margv; } @@ -531,17 +529,15 @@ putusage(char *s) static void get(int argc, char *argv[]) { - int fd; - int n; - char *cp; - char *src; - char line[MAXLINE]; + static char *line; + static size_t sz; + int fd, n; + char *cp, *src; if (argc < 2) { - strcpy(line, "get "); printf("(files) "); - fgets(&line[strlen(line)], sizeof line - strlen(line), stdin); - makeargv(line); + getline(&line, &sz, stdin); + makeargv(argv[0], line); argc = margc; argv = margv; } @@ -621,14 +617,14 @@ getusage(char *s) static void settimeoutpacket(int argc, char *argv[]) { + static char *line; + static size_t sz; int t; - char line[MAXLINE]; if (argc < 2) { - strcpy(line, "Packet timeout "); printf("(value) "); - fgets(&line[strlen(line)], sizeof line - strlen(line), stdin); - makeargv(line); + getline(&line, &sz, stdin); + makeargv(argv[0], line); argc = margc; argv = margv; } @@ -648,14 +644,14 @@ settimeoutpacket(int argc, char *argv[]) static void settimeoutnetwork(int argc, char *argv[]) { + static char *line; + static size_t sz; int t; - char line[MAXLINE]; if (argc < 2) { - strcpy(line, "Network timeout "); printf("(value) "); - fgets(&line[strlen(line)], sizeof line - strlen(line), stdin); - makeargv(line); + getline(&line, &sz, stdin); + makeargv(argv[0], line); argc = margc; argv = margv; } @@ -731,23 +727,22 @@ command_prompt(void) static void command(bool interactive, EditLine *el, History *hist, HistEvent *hep) { + static char *line; + static size_t sz; const struct cmd *c; const char *bp; - char *cp; - int len, num; - char line[MAXLINE]; + int len; for (;;) { if (interactive) { - if ((bp = el_gets(el, &num)) == NULL || num == 0) + if ((bp = el_gets(el, &len)) == NULL || len == 0) exit(0); - len = MIN(MAXLINE, num); - memcpy(line, bp, len); - line[len - 1] = '\0'; - history(hist, hep, H_ENTER, bp); + if ((size_t)len >= sz) + line = realloc(line, sz = len + 1); + strlcpy(line, bp, sz); + history(hist, hep, H_ENTER, line); } else { - line[0] = 0; - if (fgets(line, sizeof line , stdin) == NULL) { + if ((len = getline(&line, &sz, stdin)) <= 0) { if (feof(stdin)) { exit(txrx_error); } else { @@ -755,11 +750,11 @@ command(bool interactive, EditLine *el, History *hist, HistEvent *hep) } } } - if ((cp = strchr(line, '\n'))) - *cp = '\0'; + if (line[len - 1] == '\n') + line[--len] = '\0'; if (line[0] == 0) continue; - makeargv(line); + makeargv(NULL, line); if (margc == 0) continue; c = getcmd(margv[0]); @@ -808,12 +803,16 @@ getcmd(const char *name) * Slice a string up into argc/argv. */ static void -makeargv(char *line) +makeargv(char *argv0, char *line) { char *cp; char **argp = margv; margc = 0; + if (argv0 != NULL) { + *argp++ = argv0; + margc++; + } if ((cp = strchr(line, '\n')) != NULL) *cp = '\0'; for (cp = line; margc < MAX_MARGV - 1 && *cp != '\0';) { @@ -822,13 +821,14 @@ makeargv(char *line) if (*cp == '\0') break; *argp++ = cp; - margc += 1; + margc++; while (*cp != '\0' && !isspace(*cp)) cp++; if (*cp == '\0') break; *cp++ = '\0'; } + /* XXX warn about truncation if *cp != '\0'? */ *argp++ = 0; } From nobody Wed May 27 09:03:31 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQNvS3S2dz6fh9b for ; Wed, 27 May 2026 09:03: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQNvS0Jvkz3Wpv for ; Wed, 27 May 2026 09:03:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779872612; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QE92L4OgPUIGFj4d//2ApzD/7lnoTt62b/a7tcpgtC0=; b=r3FG9oK8hiy0Thzw5bm2dRErX3ZygZ2qxgr235DxONi9o9tVmbvO45pIRU0a5s6QhHzjSh 8qK0vKtF5Jukz0N6VMueFRmQTvmpKtbkadIqi1xCsiOPuM9LzHLMEoE96DH9F2BAGE1ouW JhlMXWF1nQDnweItzsamHQIAewkgpy1O7vxx3Sbknp3ugBCYIZk/YESMoGxOSxgwRgwE4w i7W5QwTJe8g22DNITEsZQrhmLcZX3H61og7ssbjcnqA7f7IftsREqTkwszQe2jOe+vH/ne 8aOOMB5Ldds06aBw7oHo0N9+oYe3r2S/7gMqpIvAsUicxX3l9gL0e7T4kKsGxA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779872612; a=rsa-sha256; cv=none; b=eaIXmaeNF5UfB2wtmZTEziWmx4ezWaYCDIKZ08LXibdX/gV4LRxr8Ixri/J+ZBsIJXG27o Sf2nxjKn66acj0+RHfSXgtToIDMuzLRYMtzgHIL4FSMySvYq1nxGqbDR+TL/qet+RO5qOO 8hLxJHN42yTYac1nAAptQn+OF1lPC9oMlTH/quadOSqok1/gCdiwk10BOHMYJijcNi6Qa5 SwUqIdnWjGWoTTAlz9UKTmjQ4CamZh0gqKctBAXB0QQLIl778uA962+gZX3SKqy0RvOk0v fpjoFYyqyfrrxYDCFgwvwzJ1hetUx+pdImrZmRXwSEVthmlpD398LvqB601GOg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779872612; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QE92L4OgPUIGFj4d//2ApzD/7lnoTt62b/a7tcpgtC0=; b=jVyGqiTCuafcX8zzJHNjAKAVrfL1YakOhmuLIFzvUYwapdMknpxN3bMFHX5cmrq2RNO6E3 XNdWx2rCsTw/iNDDUpAQNRLSvmnMGRk+TlcJNUFgSw13BjTZzGo8aMo4sGyHlEQ1J7H/74 U7x7++rJtlGbtmeZqN4edHn+B6rGkh6mFkDlILuR3zANDeaQ3ObgXMVcnXsMx3cUmx04Mo pniiU8+OuaS9FSUOzv8g6G0lq522KHreEokhZSHfseEllIndpT490JN97o50Mg0La/ReEl gnpox2MuBlKe4MwhiMkH2N7Vl3HZK+mUOhBwW+BLEitqaTX8cKHZVcvA7J8V4Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQNvR6df4zt11 for ; Wed, 27 May 2026 09:03:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2636e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 09:03:31 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 838c8a562316 - stable/15 - tftp: Style cleanup List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 838c8a562316e1bfeb9505cdb8ace433a01119a7 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 09:03:31 +0000 Message-Id: <6a16b363.2636e.222ec051@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=838c8a562316e1bfeb9505cdb8ace433a01119a7 commit 838c8a562316e1bfeb9505cdb8ace433a01119a7 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-22 17:57:23 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-27 09:03:21 +0000 tftp: Style cleanup MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57073 (cherry picked from commit 29aaaa5e6660310311fe443d8792b31181e1dd3c) --- usr.bin/tftp/main.c | 56 +++++++++++++++++++---------------------------------- usr.bin/tftp/tftp.c | 40 +++++++++++++++++++------------------- 2 files changed, 40 insertions(+), 56 deletions(-) diff --git a/usr.bin/tftp/main.c b/usr.bin/tftp/main.c index 849069fa9e8e..3bfee5fc1346 100644 --- a/usr.bin/tftp/main.c +++ b/usr.bin/tftp/main.c @@ -76,7 +76,7 @@ static int margc; static char *margv[MAX_MARGV]; int verbose; -static char *port = NULL; +static char *port; static void get(int, char **); static void help(int, char **); @@ -100,14 +100,14 @@ static void setrollover(int, char **); static void setpacketdrop(int, char **); static void setwindowsize(int, char **); -static void command(bool, EditLine *, History *, HistEvent *) __dead2; +static void command(bool, EditLine *, History *, HistEvent *) __dead2; static const char *command_prompt(void); -static void urihandling(char *URI); -static void getusage(char *); -static void makeargv(char *argv0, char *line); -static void putusage(char *); -static void settftpmode(const char *); +static void urihandling(char *URI); +static void getusage(char *); +static void makeargv(char *argv0, char *line); +static void putusage(char *); +static void settftpmode(const char *); static char *tail(char *); static const struct cmd *getcmd(const char *); @@ -116,7 +116,7 @@ static const struct cmd *getcmd(const char *); struct cmd { const char *name; - void (*handler)(int, char **); + void (*handler)(int, char **); const char *help; }; @@ -224,13 +224,13 @@ main(int argc, char *argv[]) static void urihandling(char *URI) { - char meth[] = "get"; - char *host = NULL; - char *path = NULL; - char *opts = NULL; const char *tmode = "octet"; - char *s; - int i; + char meth[] = "get"; + char *host = NULL; + char *path = NULL; + char *opts = NULL; + char *s; + int i; host = URI + 7; @@ -271,8 +271,8 @@ static void setpeer0(char *host, const char *lport) { struct addrinfo hints, *res0, *res; - int error; const char *cause = "unknown"; + int error; if (connected) { close(peer); @@ -285,7 +285,7 @@ setpeer0(char *host, const char *lport) hints.ai_socktype = SOCK_DGRAM; hints.ai_protocol = IPPROTO_UDP; hints.ai_flags = AI_CANONNAME; - if (!lport) + if (lport == NULL) lport = "tftp"; error = getaddrinfo(host, lport, &hints, &res0); if (error) { @@ -347,7 +347,7 @@ setpeer(int argc, char *argv[]) argc = margc; argv = margv; } - if ((argc < 2) || (argc > 3)) { + if (argc < 2 || argc > 3) { printf("usage: %s [host [port]]\n", argv[0]); return; } @@ -393,21 +393,18 @@ modecmd(int argc, char *argv[]) static void setbinary(int argc __unused, char *argv[] __unused) { - settftpmode("octet"); } static void setascii(int argc __unused, char *argv[] __unused) { - settftpmode("netascii"); } static void settftpmode(const char *newmode) { - strlcpy(mode, newmode, sizeof(mode)); if (verbose) printf("mode set to %s\n", mode); @@ -422,9 +419,9 @@ put(int argc, char *argv[]) { static char *line; static size_t sz; - int fd, n; - char *cp, *targ, *path; struct stat sb; + char *cp, *targ, *path; + int fd, n; if (argc < 2) { printf("(file) "); @@ -517,7 +514,6 @@ put(int argc, char *argv[]) static void putusage(char *s) { - printf("usage: %s file [remotename]\n", s); printf(" %s file host:remotename\n", s); printf(" %s file1 file2 ... fileN [[host:]remote-directory]\n", s); @@ -531,8 +527,8 @@ get(int argc, char *argv[]) { static char *line; static size_t sz; - int fd, n; char *cp, *src; + int fd, n; if (argc < 2) { printf("(files) "); @@ -608,7 +604,6 @@ get(int argc, char *argv[]) static void getusage(char *s) { - printf("usage: %s file [localname]\n", s); printf(" %s [host:]file [localname]\n", s); printf(" %s [host1:]file1 [host2:]file2 ... [hostN:]fileN\n", s); @@ -671,7 +666,6 @@ settimeoutnetwork(int argc, char *argv[]) static void showstatus(int argc __unused, char *argv[] __unused) { - printf("Remote host: %s\n", connected ? hostname : "none specified yet"); printf("RFC2347 Options support: %s\n", @@ -692,7 +686,6 @@ showstatus(int argc __unused, char *argv[] __unused) static void intr(int dummy __unused) { - signal(SIGALRM, SIG_IGN); alarm(0); longjmp(toplevel, -1); @@ -717,7 +710,6 @@ tail(char *filename) static const char * command_prompt(void) { - return ("tftp> "); } @@ -835,7 +827,6 @@ makeargv(char *argv0, char *line) static void quit(int argc __unused, char *argv[] __unused) { - exit(txrx_error); } @@ -873,7 +864,6 @@ help(int argc, char *argv[]) static void setverbose(int argc __unused, char *argv[] __unused) { - verbose = !verbose; printf("Verbose mode %s.\n", verbose ? "on" : "off"); } @@ -881,7 +871,6 @@ setverbose(int argc __unused, char *argv[] __unused) static void setoptions(int argc, char *argv[]) { - if (argc == 2) { if (strcasecmp(argv[1], "enable") == 0 || strcasecmp(argv[1], "on") == 0) { @@ -911,7 +900,6 @@ setoptions(int argc, char *argv[]) static void setrollover(int argc, char *argv[]) { - if (argc == 2) { if (strcasecmp(argv[1], "never") == 0 || strcasecmp(argv[1], "none") == 0) { @@ -962,7 +950,6 @@ setdebug(int argc, char *argv[]) static void setblocksize(int argc, char *argv[]) { - if (!options_rfc_enabled) printf("RFC2347 style options are not enabled " "(but proceeding anyway)\n"); @@ -998,7 +985,6 @@ setblocksize(int argc, char *argv[]) static void setblocksize2(int argc, char *argv[]) { - if (!options_rfc_enabled || !options_extra_enabled) printf( "RFC2347 style or non-RFC defined options are not enabled " @@ -1054,7 +1040,6 @@ setblocksize2(int argc, char *argv[]) static void setpacketdrop(int argc, char *argv[]) { - if (argc != 1) packetdroppercentage = atoi(argv[1]); @@ -1065,7 +1050,6 @@ setpacketdrop(int argc, char *argv[]) static void setwindowsize(int argc, char *argv[]) { - if (!options_rfc_enabled) printf("RFC2347 style options are not enabled " "(but proceeding anyway)\n"); diff --git a/usr.bin/tftp/tftp.c b/usr.bin/tftp/tftp.c index e5c307a572fb..63d4a882e5c8 100644 --- a/usr.bin/tftp/tftp.c +++ b/usr.bin/tftp/tftp.c @@ -63,13 +63,13 @@ int xmitfile(int peer, char *port, int fd, char *name, char *mode) { + char recvbuffer[MAXPKTSIZE]; + struct sockaddr_storage serv; /* valid server port number */ + struct tftp_stats tftp_stats; struct tftphdr *rp; struct servent *se; int n, i, ret = 0; uint16_t block, portn; - struct sockaddr_storage serv; /* valid server port number */ - char recvbuffer[MAXPKTSIZE]; - struct tftp_stats tftp_stats; stats_init(&tftp_stats); @@ -82,7 +82,7 @@ xmitfile(int peer, char *port, int fd, char *name, char *mode) portn = htons(atoi(port)); if (portn == 0) { printf("Invalid port '%s'.\n", port ? port : "tftp"); - return -1; + return (-1); } ((struct sockaddr_in *)&peer_sock)->sin_port = portn; @@ -96,7 +96,7 @@ xmitfile(int peer, char *port, int fd, char *name, char *mode) n = send_wrq(peer, name, mode); if (n > 0) { printf("Cannot send WRQ packet\n"); - return -1; + return (-1); } /* @@ -125,11 +125,11 @@ xmitfile(int peer, char *port, int fd, char *name, char *mode) } if (i == 12) { printf("Transfer timed out.\n"); - return -1; + return (-1); } if (rp->th_opcode == ERROR) { printf("Got ERROR, aborted\n"); - return -1; + return (-1); } /* @@ -140,7 +140,7 @@ xmitfile(int peer, char *port, int fd, char *name, char *mode) if (!options_rfc_enabled) { printf("Got OACK while options are not enabled!\n"); send_error(peer, EBADOP); - return -1; + return (-1); } parse_options(peer, rp->th_stuff, n + 2); @@ -148,7 +148,7 @@ xmitfile(int peer, char *port, int fd, char *name, char *mode) if (read_init(fd, NULL, mode) < 0) { warn("read_init()"); - return -1; + return (-1); } block = 1; @@ -158,7 +158,7 @@ xmitfile(int peer, char *port, int fd, char *name, char *mode) read_close(); if (tftp_stats.amount > 0) printstats("Sent", verbose, &tftp_stats); - return ret; + return (ret); } /* @@ -167,12 +167,12 @@ xmitfile(int peer, char *port, int fd, char *name, char *mode) int recvfile(int peer, char *port, int fd, char *name, char *mode) { + char recvbuffer[MAXPKTSIZE]; + struct tftp_stats tftp_stats; struct tftphdr *rp; struct servent *se; - uint16_t block, portn; - char recvbuffer[MAXPKTSIZE]; int n, i, ret = 0; - struct tftp_stats tftp_stats; + uint16_t block, portn; stats_init(&tftp_stats); @@ -198,7 +198,7 @@ recvfile(int peer, char *port, int fd, char *name, char *mode) n = send_rrq(peer, name, mode); if (n > 0) { printf("Cannot send RRQ packet\n"); - return -1; + return (-1); } /* @@ -227,16 +227,16 @@ recvfile(int peer, char *port, int fd, char *name, char *mode) } if (i == 12) { printf("Transfer timed out.\n"); - return -1; + return (-1); } if (rp->th_opcode == ERROR) { tftp_log(LOG_ERR, "Error code %d: %s", rp->th_code, rp->th_msg); - return -1; + return (-1); } if (write_init(fd, NULL, mode) < 0) { warn("write_init"); - return -1; + return (-1); } /* @@ -247,7 +247,7 @@ recvfile(int peer, char *port, int fd, char *name, char *mode) if (!options_rfc_enabled) { printf("Got OACK while options are not enabled!\n"); send_error(peer, EBADOP); - return -1; + return (-1); } parse_options(peer, rp->th_stuff, n + 2); @@ -255,7 +255,7 @@ recvfile(int peer, char *port, int fd, char *name, char *mode) n = send_ack(peer, 0); if (n > 0) { printf("Cannot send ACK on OACK.\n"); - return -1; + return (-1); } block = 0; if (tftp_receive(peer, &block, &tftp_stats, NULL, 0) != 0) @@ -268,5 +268,5 @@ recvfile(int peer, char *port, int fd, char *name, char *mode) if (tftp_stats.amount > 0) printstats("Received", verbose, &tftp_stats); - return ret; + return (ret); } From nobody Wed May 27 09:03:33 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQNvT5Txfz6fhVF for ; Wed, 27 May 2026 09:03: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQNvT0nJ4z3Wgh for ; Wed, 27 May 2026 09:03:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779872613; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m325wbz0BhIvr2Z//dSxXUL4xpT9yjb2HXQCOOdIfdg=; b=AYwOkzuiYKbt30TD0Bwficie8ifbDzYDSvp78dhHO9UDPYOA7Z+LJDIIWyKyQUJiHu/rKs cI91xaFhiEjHiX63to7TP/dUbgmrYRAxTu577hxXnKGV+LxOFf1YS02ssryMBoQM0wCVzc dvirCLppvtiPCJjcjqiwKEaVo0xW0RkQfND3RIVNU/NeAiOhj1coPXMjEk3sSXg++MLhV7 qeDiNtVsALMQ+BOQJpjY+T0ohh6QINgEAmaQODlejOrxvkPZvNrR+ur8bWyOaaIguVoGgo COIiNYsfuCGpUD+Orjc2OcWIZ7c6A4a6FBskqsUpuzxdouuZxW7keuXVlkCv8Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779872613; a=rsa-sha256; cv=none; b=wUEoboUxNMynxUTTEg6X6xF4Gmila5vti589KdHltYsgExJ+wUxhXkP6Y8MRuR1V5uS2f6 +tBsf6RBFo+dwk3t/bRSEqyooHESAD15T750I6kLb3yreqxOjaATBnQEnJsoTGb+VqR7gY Osn4V8puRDc1pTJKR598NTOkJsFg7uIUCBoHQaZORwOfvKfVKjHFVMBZUzykB9FCt76imc Fiim1/VW7WuQQiZ+9YyYBA3+iAUgL0biLiy7C2h3+8UJSg9uVwtmAmOleyma2H1MEr7eSU 3Ubqu1t2FcCXnJtEMPnyuOVT+cEPaTD+E+EB87WWhf7F8I5kgtG1PHcDiUWlDw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779872613; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m325wbz0BhIvr2Z//dSxXUL4xpT9yjb2HXQCOOdIfdg=; b=gPIX3iho/pSnJbaC3OYfaR4CTILeXP2CldOZNoPsJbg3xhug2iBwmGhUhJrlGiFltQGnoI CnXqk3CeP4OcCT5DEs/o+IeDiozpPHFyM1ZSTdYFee5kkOS4GxgAqeJxStKnUmGf9VQSBT VThbfgYkfeScKQFCGCOqGObE49E/Vn4Eq6OXIJ2rpC/kDc06AjlV6rrAyhpJAKdTaDgtO/ XicQ+VJ4TjyWuGIbTKRWs2R07JgLRW5355v0o0/sW081qfAVmuR609PBEfnHoGH3qyIXn0 z7CVte+2N3hLQ6FRifVqVp7i/KeXzWjr0PtqLBzfDShUKIBuTPVPf+e8nzV6Cg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQNvT0NLfzslv for ; Wed, 27 May 2026 09:03:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 261ea by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 09:03:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 99cbf1f6d7d2 - stable/15 - tftp: Add test case with over-long URL List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 99cbf1f6d7d263ec276e7c4955f3c64f1a3bf24b Auto-Submitted: auto-generated Date: Wed, 27 May 2026 09:03:33 +0000 Message-Id: <6a16b365.261ea.273d6b38@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=99cbf1f6d7d263ec276e7c4955f3c64f1a3bf24b commit 99cbf1f6d7d263ec276e7c4955f3c64f1a3bf24b Author: Dag-Erling Smørgrav AuthorDate: 2026-05-22 17:57:27 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-27 09:03:21 +0000 tftp: Add test case with over-long URL This adds a test case that passes a very long URL on the command line, which would previously have resulted in a benign buffer overflow in urihandling(), detectable only by compiling tftp with ASAN enabled. MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57074 (cherry picked from commit b94689d036c5f5bdc04d080ff7dd5d0e9df9b8d4) --- usr.bin/tftp/tests/tftp_test.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/usr.bin/tftp/tests/tftp_test.sh b/usr.bin/tftp/tests/tftp_test.sh index a4c9f3b898e7..12c008b2c78c 100644 --- a/usr.bin/tftp/tests/tftp_test.sh +++ b/usr.bin/tftp/tests/tftp_test.sh @@ -442,6 +442,29 @@ tftp_url_ipv6_cleanup() { stop_tftpd } +atf_test_case tftp_url_long cleanup +tftp_url_long_head() { + atf_set "descr" "Very long URL" + atf_set "require.user" "root" +} +tftp_url_long_body() { + start_tftpd + mkdir "${tftp_dir}/subdirectory" + local remote_file="${tftp_dir}/hello.txt" + echo "Hello, $$!" >"${remote_file}" + local local_file="${remote_file##*/}" + local d="subdirectory/../" + d="${d}${d}${d}${d}${d}${d}${d}${d}" + d="${d}${d}${d}${d}${d}${d}${d}${d}" + d="${d}${d}${d}${d}${d}${d}${d}${d}" + atf_check -s exit:1 -o match:"Illegal TFTP operation" \ + tftp "tftp://localhost/${d}${remote_file##*/}" + atf_check -s exit:1 test -f "${local_file}" +} +tftp_url_long_cleanup() { + stop_tftpd +} + atf_init_test_cases() { atf_add_test_case tftp_get_big atf_add_test_case tftp_get_host @@ -462,4 +485,5 @@ atf_init_test_cases() { atf_add_test_case tftp_url_host atf_add_test_case tftp_url_ipv4 atf_add_test_case tftp_url_ipv6 + atf_add_test_case tftp_url_long } From nobody Wed May 27 09:03:34 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQNvV2wTYz6fh7D for ; Wed, 27 May 2026 09:03: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQNvV1k7nz3WsY for ; Wed, 27 May 2026 09:03:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779872614; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xsKtCfaPBGM6x3Jcwa+dd2tcND8kiU4xm/Qxfk3Q9Pg=; b=eOlGLhIbTdHg4xu4YjT1uYzfM0Z9xTaEjCgKzEwftXaEzsNhHLkTB83wHzriS+pZJL55Hu /O1LWKk038KIX6yPjvbL1xlonLdR7onfr6SSIhqj+2Q/pqx3bjrAZQoPxwhsmrJJnUVEtY C9PWP/4SIHw0v7s6sfOvNQc2ANJFQTrpRFCmUGA84jUyXPxfosa1EAZzZkzmJCR2xxPeOy n91tNkbd6xZppRrirvdG/UaMnf2edWyRB0up1ILnqkxR+PhPO5b8El7TBBtE+1zyKn6NHv QMox5nYatcZUXuB46MY1Z/rAI/qg72SF83Kk8ekYfUZaDWAvKp245gEoKc+7cQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779872614; a=rsa-sha256; cv=none; b=jMmGQIWJCxY8JZyKburPUNbL832uhePm60Mg+mvH6EajcTq6zERbehMuXeaixlkv6yUUYA XV9HOqtArkl0zhI8QziPjptinvoARcvLnopftoyWmcwVYzXhJRPPAn3ukrQt3FmMVtvwHf RSYFLjzofiNAuwmJsCRWhvmsuNaWoDqVitD1A9t9U/+fZYITKfxgouoX4LqNG9pS/r17po YZWBlAdyM84j8mz39gKgaPNQrFUQ6HIMI8dd9yiIrD0aR2te2Nn+h96XUCTf7OajejvKXp XUL5QYwipB0yxxBbsAoJ2eRQjGTmAt5Djh95ij5DZUgoc4hOMwtWTfApLlmSrg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779872614; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xsKtCfaPBGM6x3Jcwa+dd2tcND8kiU4xm/Qxfk3Q9Pg=; b=vf+k8XiYwElHBOcZVFD8cbGieXnB1ij0x4UyYbFKDIuYydpshGIR2qefiKcRBzQom4DV1/ fwvUrh10WGRl6MXSlNFKA43rzBTe3je3od/Co0uJJR7y2JbvsIu6I4lf5KTlpVtOQv/KRh R49oZB6xXondutk2UDYG1DUOZFNYyBgbuUxqfgcZAt7YfLYRxxZfqrwJQV3u3ms040C0qf wryJDPMWtSol1y3zoi5MmJx53Vhb/VpnwcaIFJOU4lgKvurjR7xJGDieEgMXtc27cz3nD+ ns+ZtJdFqZMorudwJpL9+QTvkKVjWhp4IMO07LGN+WVYkxoRH9UX2QKoHXIwpg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQNvV15XjzspL for ; Wed, 27 May 2026 09:03:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25bd7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 09:03:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: dd9272210d45 - stable/15 - tftpd: Add missing bounds checks List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: dd9272210d456df3e2ce98e4c5696e15170edcf4 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 09:03:34 +0000 Message-Id: <6a16b366.25bd7.793f6a1c@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=dd9272210d456df3e2ce98e4c5696e15170edcf4 commit dd9272210d456df3e2ce98e4c5696e15170edcf4 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-22 17:57:31 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-27 09:03:21 +0000 tftpd: Add missing bounds checks In send_[rw]rq(), we were using strlcpy() to avoid overflowing our packet buffer, then failing to check the result and blithely advancing our pointer by the full length. Luckily, this code is only ever used by tftp(1), not tftpd(8). MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57075 (cherry picked from commit 933893771344e1647eeda152016b938fdc30ccdc) --- libexec/tftpd/tftp-io.c | 62 +++++++++++++++++++++++++++---------------------- 1 file changed, 34 insertions(+), 28 deletions(-) diff --git a/libexec/tftpd/tftp-io.c b/libexec/tftpd/tftp-io.c index 50102e652d2f..3384071d6df2 100644 --- a/libexec/tftpd/tftp-io.c +++ b/libexec/tftpd/tftp-io.c @@ -173,11 +173,11 @@ send_error(int peer, int error) int send_wrq(int peer, char *filename, char *mode) { - int n; + char buf[MAXPKTSIZE]; struct tftphdr *tp; char *bp; - char buf[MAXPKTSIZE]; - int size; + size_t len; + int n, size; if (debug & DEBUG_PACKETS) tftp_log(LOG_DEBUG, "Sending WRQ: filename: '%s', mode '%s'", @@ -191,17 +191,17 @@ send_wrq(int peer, char *filename, char *mode) size = offsetof(struct tftphdr, th_stuff); bp = tp->th_stuff; - strlcpy(bp, filename, sizeof(buf) - size); - bp += strlen(filename); - *bp = 0; - bp++; - size += strlen(filename) + 1; - - strlcpy(bp, mode, sizeof(buf) - size); - bp += strlen(mode); - *bp = 0; - bp++; - size += strlen(mode) + 1; + len = strlcpy(bp, filename, sizeof(buf) - size); + if (len >= sizeof(buf) - size) + goto overflow; + bp += len + 1; + size += len + 1; + + len = strlcpy(bp, mode, sizeof(buf) - size); + if (len >= sizeof(buf) - size) + goto overflow; + bp += len + 1; + size += len + 1; if (options_rfc_enabled) size += make_options(peer, bp, sizeof(buf) - size); @@ -213,6 +213,9 @@ send_wrq(int peer, char *filename, char *mode) return (1); } return (0); +overflow: + tftp_log(LOG_ERR, "%s: file name too long", __func__); + return (1); } /* @@ -221,11 +224,11 @@ send_wrq(int peer, char *filename, char *mode) int send_rrq(int peer, char *filename, char *mode) { - int n; + char buf[MAXPKTSIZE]; struct tftphdr *tp; char *bp; - char buf[MAXPKTSIZE]; - int size; + size_t len; + int n, size; if (debug & DEBUG_PACKETS) tftp_log(LOG_DEBUG, "Sending RRQ: filename: '%s', mode '%s'", @@ -239,17 +242,17 @@ send_rrq(int peer, char *filename, char *mode) size = offsetof(struct tftphdr, th_stuff); bp = tp->th_stuff; - strlcpy(bp, filename, sizeof(buf) - size); - bp += strlen(filename); - *bp = 0; - bp++; - size += strlen(filename) + 1; - - strlcpy(bp, mode, sizeof(buf) - size); - bp += strlen(mode); - *bp = 0; - bp++; - size += strlen(mode) + 1; + len = strlcpy(bp, filename, sizeof(buf) - size); + if (len >= sizeof(buf) - size) + goto overflow; + bp += len + 1; + size += len + 1; + + len = strlcpy(bp, mode, sizeof(buf) - size); + if (len >= sizeof(buf) - size) + goto overflow; + bp += len + 1; + size += len + 1; if (options_rfc_enabled) { options_set_request(OPT_TSIZE, "0"); @@ -263,6 +266,9 @@ send_rrq(int peer, char *filename, char *mode) return (1); } return (0); +overflow: + tftp_log(LOG_ERR, "%s: file name too long", __func__); + return (1); } /* From nobody Wed May 27 09:03:35 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQNvX2DBCz6fhDh for ; Wed, 27 May 2026 09:03: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQNvW2HtPz3X59 for ; Wed, 27 May 2026 09:03:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779872615; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zuNj5Nv0aY+79y6BWm6LBvfqzQWpFOdIBcby8TEgcts=; b=X2H2bGckvr0skjVnGTOpUcjE2X7AkPv5Ey8LD2jsXVlFUzdwglhZw0orzJwrumTgtywshi bGiDZCsedW5vrjwzl4r8fW/Eohng1nk3gRbbOz4xJyfeXspvLhCwMF5w3l4qVP0MjLim5Y Uc79MCwVBp7Cm1yEk9vVnXUfuHXbdAEg/1Mxi6mfJW0DK83PyZo6zxp35BJgyURQ4Wy8hd iZhhSsMArifNQb3j+KlScGIhdM4RQF5XZwqwHoqwEhRuT2ChtBMNDar3r93GeZDdPg7WXp KYBRI97ou6RIx7kJ/Cxz4/CRI9MDlLiaudHHXSHzQhBRFZ7Jh5dq0oWZu2Tbzg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779872615; a=rsa-sha256; cv=none; b=R9uhJ8Ns/kNeCv106q1HotsoXyIZ0/D9buzi77k+9zx5fpfyzpgASTtdfnGrqy5ppUoNLi 1z2EAh7bP1LcUV5ZODpvNwtboAvygFBDWrutQ75fC6NEs+QAzzFwacGg9+gmWxd9gKhnoK BRamrWr3M7IJOWmchHtQ/ZM5xIp30l0lVCYwDB4WJA+bT6h2cMYfhf1WojkUxpocyYJFpT yE7yNpMu8l9oYSlVeQqfN6v/uLaqEAk++araEFzkC/arae+yxaAEx6nx3eAkHbfTaqxHNL M2vPGBXwd6AOm4G8YM53s6vOwrOLKutef71NJS+akNhkK8ZLaZP/eps13I8rBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779872615; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zuNj5Nv0aY+79y6BWm6LBvfqzQWpFOdIBcby8TEgcts=; b=hHuMfH+XErbZUO8nVmRtmeRgHTDinWC5CbbZa5ft9hE24y3SJ/DLd5+DeZu0dCIBhC3XxE 2gVbk1PUvMfb3ABlSoEXsy2Uv0NYaTqEjUmp2y/pcYyW/+jOKVOf2vOK0ExV7+siVO9yZ7 +1EafEG8qhTRB/SL4KMDkogQ5ONsbGDZiDdWfHufgD3EUMhMnmopYuFYHamleQl0ZgRmI2 zk62Ww9H4AZ7PgazYkdbynhoUzysv4YBD06YcZ+mElfcQEIiIRN5wxDAGJt2e4g39KXQsP BMrDuRWBZjWums2YayIY/gO8Y0zvBEESTc4lzlMjIrIlgl2qApBaJcw2jzqpRw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQNvW1t0fzsdG for ; Wed, 27 May 2026 09:03:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26372 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 09:03:35 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 1f784851fcb3 - stable/15 - tftpd: Simplify packet drop macro List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 1f784851fcb32614564cb46cdf2307035065c140 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 09:03:35 +0000 Message-Id: <6a16b367.26372.5ce10787@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=1f784851fcb32614564cb46cdf2307035065c140 commit 1f784851fcb32614564cb46cdf2307035065c140 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-22 17:57:35 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-27 09:03:21 +0000 tftpd: Simplify packet drop macro The first argument is always the function name, for which we can simply use __func__. This leaves only the optional return value, so we can use a single variadic macro instead of two nearly-identical copies. MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57076 (cherry picked from commit 76c3387024b40c2e28ed2d1bb64b3a14371c3c0b) --- libexec/tftpd/tftp-io.c | 51 ++++++++++++++++++++++--------------------------- 1 file changed, 23 insertions(+), 28 deletions(-) diff --git a/libexec/tftpd/tftp-io.c b/libexec/tftpd/tftp-io.c index 3384071d6df2..3697c13f358f 100644 --- a/libexec/tftpd/tftp-io.c +++ b/libexec/tftpd/tftp-io.c @@ -69,17 +69,12 @@ static struct errmsg { { -1, NULL } }; -#define DROPPACKET(s) \ +#define DROPPACKET(...) \ if (packetdroppercentage != 0 && \ - arc4random()%100 < packetdroppercentage) { \ - tftp_log(LOG_DEBUG, "Artificial packet drop in %s", s); \ - return; \ - } -#define DROPPACKETn(s,n) \ - if (packetdroppercentage != 0 && \ - arc4random()%100 < packetdroppercentage) { \ - tftp_log(LOG_DEBUG, "Artificial packet drop in %s", s); \ - return (n); \ + arc4random() % 100 < packetdroppercentage) { \ + tftp_log(LOG_DEBUG, "Artificial packet drop in %s", \ + __func__); \ + return __VA_ARGS__; \ } const char * @@ -104,7 +99,7 @@ send_packet(int peer, uint16_t block, char *pkt, int size) int t = 1; for (i = 0; i < 12 ; i++) { - DROPPACKETn("send_packet", 0); + DROPPACKET(0); if (sendto(peer, pkt, size, 0, (struct sockaddr *)&peer_sock, peer_sock.ss_len) == size) { @@ -144,7 +139,7 @@ send_error(int peer, int error) if (debug & DEBUG_PACKETS) tftp_log(LOG_DEBUG, "Sending ERROR %d", error); - DROPPACKET("send_error"); + DROPPACKET(); tp = (struct tftphdr *)buf; tp->th_opcode = htons((u_short)ERROR); @@ -179,12 +174,12 @@ send_wrq(int peer, char *filename, char *mode) size_t len; int n, size; - if (debug & DEBUG_PACKETS) + if (debug & DEBUG_PACKETS) { tftp_log(LOG_DEBUG, "Sending WRQ: filename: '%s', mode '%s'", - filename, mode - ); + filename, mode); + } - DROPPACKETn("send_wrq", 0); + DROPPACKET(0); tp = (struct tftphdr *)buf; tp->th_opcode = htons((u_short)WRQ); @@ -209,7 +204,7 @@ send_wrq(int peer, char *filename, char *mode) n = sendto(peer, buf, size, 0, (struct sockaddr *)&peer_sock, peer_sock.ss_len); if (n != size) { - tftp_log(LOG_ERR, "send_wrq: %s", strerror(errno)); + tftp_log(LOG_ERR, "%s: %m", __func__); return (1); } return (0); @@ -230,12 +225,12 @@ send_rrq(int peer, char *filename, char *mode) size_t len; int n, size; - if (debug & DEBUG_PACKETS) + if (debug & DEBUG_PACKETS) { tftp_log(LOG_DEBUG, "Sending RRQ: filename: '%s', mode '%s'", - filename, mode - ); + filename, mode); + } - DROPPACKETn("send_rrq", 0); + DROPPACKET(0); tp = (struct tftphdr *)buf; tp->th_opcode = htons((u_short)RRQ); @@ -262,7 +257,7 @@ send_rrq(int peer, char *filename, char *mode) n = sendto(peer, buf, size, 0, (struct sockaddr *)&peer_sock, peer_sock.ss_len); if (n != size) { - tftp_log(LOG_ERR, "send_rrq: %d %s", n, strerror(errno)); + tftp_log(LOG_ERR, "%s: %m", __func__); return (1); } return (0); @@ -285,7 +280,7 @@ send_oack(int peer) if (debug & DEBUG_PACKETS) tftp_log(LOG_DEBUG, "Sending OACK"); - DROPPACKETn("send_oack", 0); + DROPPACKET(0); /* * Send back an options acknowledgement (only the ones with @@ -299,8 +294,8 @@ send_oack(int peer) if (options[i].o_reply != NULL) { n = snprintf(bp, size, "%s%c%s", options[i].o_type, 0, options[i].o_reply); - bp += n+1; - size -= n+1; + bp += n + 1; + size -= n + 1; if (size < 0) { tftp_log(LOG_ERR, "oack: buffer overflow"); exit(1); @@ -331,7 +326,7 @@ send_ack(int fp, uint16_t block) if (debug & DEBUG_PACKETS) tftp_log(LOG_DEBUG, "Sending ACK for block %d", block); - DROPPACKETn("send_ack", 0); + DROPPACKET(0); tp = (struct tftphdr *)buf; tp->th_opcode = htons((u_short)ACK); @@ -361,7 +356,7 @@ send_data(int peer, uint16_t block, char *data, int size) tftp_log(LOG_DEBUG, "Sending DATA packet %d of %d bytes", block, size); - DROPPACKETn("send_data", 0); + DROPPACKET(0); pkt = (struct tftphdr *)buf; @@ -408,7 +403,7 @@ receive_packet(int peer, char *data, int size, struct sockaddr_storage *from, fromlen = sizeof(*pfrom); n = recvfrom(peer, data, size, 0, (struct sockaddr *)pfrom, &fromlen); - DROPPACKETn("receive_packet", RP_TIMEOUT); + DROPPACKET(RP_TIMEOUT); if (n < 0) { /* No idea what could have happened if it isn't a timeout */ From nobody Wed May 27 09:03:40 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQNvd0Pfgz6fhXd for ; Wed, 27 May 2026 09:03: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQNvc3GDDz3X41 for ; Wed, 27 May 2026 09:03:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779872620; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6jsE52d23GIc0wvqo3NSqLZioovNjAAFqrcGShYaEzI=; b=Yc9E+zqJGb33N3t95pdjTkM6Y84YnOg8xfIqYhB+3BhxY6xsAodBd2kNMkpL/8HHNRxTa7 6KUXH1nKhU2R3wJZQupnLo03VM9JagX2o/M74+09q1TvqfvLKQl/SdOnv7t1GIPuBkk0O7 MhRdlIKPZVGKJ/qaHjRXUWumMCnyqtap0IV5yMM+Ms02JqEOz1E5sKfRuT74yJBfZY3pYC Pr9LH0K2qr+fOv9hRnkz+ExUmUnFZtuKA3r3pc9tFFRKtoDcPFsUBfLWXgrTUAuQRI4gF7 ATU/Le9EMAKTVwnq+rlX+ub9O04XNRK/u2RWMhbrqjR5j3ibgpPiO+5SJaVgiA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779872620; a=rsa-sha256; cv=none; b=XKc2Btu9RoomQurfmKv//pEUMsLkAM6xbV8lcmd9OFAH8wxJwW/El8NtIQkAXuOJHj4Goq wzkdYiUxG3ejb5UN+cuGOJQKhTFM9myJ3ZBgpv5RQ1NgMmrvU+b4nlFEwYqh+6RSxk30P6 CRLYjPOaGWAQh+KtsGXta4D81GIgL3z6cIhlq6kPybvYdBmvOZrbppjEhNfPYBXCMefTLF 0LH45WE79PYqbyo2ub4ciC436B55zsJiqScmtfCVX+TmGyFt4Gm5afwH/dju9ulu6mZ0fT ud1PTbHQ/DiYT4OHb/h4ihZ8U1xTHCc2BdfSmraHXkPRVIG9QSDnT9iAkVAQqA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779872620; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6jsE52d23GIc0wvqo3NSqLZioovNjAAFqrcGShYaEzI=; b=w4fPm4JVnjH7dWeg+174z2B88vAEKgFJup/SDrF9YUyerXQf5V4qdRfeLfQWNF+zv+tCUg TpGPj7TzWNzTijiFo2os3DzMYVO0YPc4gib2+hiHR/QZ3IQGxhO8NQkTGqWtEVYgTRgmEs ixp557wwrjxFHh3B9dXzA7UwILND9GG6zeMvFHLbtWx8hCTFfSuMtG88ty/t0eTIz+Wyxt suypjIqO6hytpN/FSzGs+/xtcla/da/zuuWUU7O7ieBQYJrMTTqmp2Z61Sdqs0ne0z2Mf2 KYquB+N0ZpzdOM3LfCoKNkEeVIg5zOeCnX3o8BJtfwYlIHrVqPKTF/8+dErjgQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQNvc2g7KzstL for ; Wed, 27 May 2026 09:03:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25dbb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 09:03:40 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 5999b12bf908 - stable/14 - nlist: Handle multiple symbol tables List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5999b12bf908689da72c8b0044176c66d03a723e Auto-Submitted: auto-generated Date: Wed, 27 May 2026 09:03:40 +0000 Message-Id: <6a16b36c.25dbb.76f85f56@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=5999b12bf908689da72c8b0044176c66d03a723e commit 5999b12bf908689da72c8b0044176c66d03a723e Author: Dag-Erling Smørgrav AuthorDate: 2026-05-19 06:52:53 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-27 09:03:28 +0000 nlist: Handle multiple symbol tables * Instead of looking for and stopping at the first SHT_SYMTAB section, iterate over all SHT_DYNSYM and SHT_SYMTAB sections until we've either found all our symbols or run out. * Perform bounds checks on section and string table offsets and sizes before attempting to mmap() the string table. * Perform bounds checks on individual symbol table entries before attempting to access the corresponding strings. * Stop treating _Foo and Foo as the same symbol. This unbreaks OpenSSH which uses nlist(3) to verify PKCS#11 providers. PR: 295336 MFC after: 1 week Fixes: 77909f597881 ("Initial elf nlist support [...]") Fixes: 644b4646c7ac ("OpenSSH: Update to 10.1p1") Reviewed by: kib, emaste Differential Revision: https://reviews.freebsd.org/D57034 (cherry picked from commit 4617a6cb82a673b02257257c1f5f8a3c8d2bb943) nlist: Decrement nent on match PR: 295336 MFC after: 1 week Fixes: 4617a6cb82a6 ("nlist: Handle multiple symbol tables") (cherry picked from commit e9cbbf04d6fe24b3a207cf085122def72145742e) --- lib/libc/gen/nlist.3 | 8 +-- lib/libc/gen/nlist.c | 150 ++++++++++++++++++++++++++++----------------------- 2 files changed, 88 insertions(+), 70 deletions(-) diff --git a/lib/libc/gen/nlist.3 b/lib/libc/gen/nlist.3 index 6aefd95e3b51..4912180e9bcd 100644 --- a/lib/libc/gen/nlist.3 +++ b/lib/libc/gen/nlist.3 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 18, 2026 +.Dd May 19, 2026 .Dt NLIST 3 .Os .Sh NAME @@ -45,9 +45,11 @@ Its use is discouraged. The .Fn nlist function -retrieves name list entries from the +retrieves name list entries from .Xr elf 5 -section with type +sections with type +.Dv SHT_DYNSYM +or .Dv SHT_SYMTAB in an ELF object (for example, an executable file or shared library). The argument diff --git a/lib/libc/gen/nlist.c b/lib/libc/gen/nlist.c index 0e00d8d23f99..ad63318f7653 100644 --- a/lib/libc/gen/nlist.c +++ b/lib/libc/gen/nlist.c @@ -38,8 +38,9 @@ __SCCSID("@(#)nlist.c 8.1 (Berkeley) 6/4/93"); #include #include -#include #include +#include +#include #include #include #include @@ -87,6 +88,8 @@ __fdnlist(int fd, struct nlist *list) #define ISLAST(p) (p->n_un.n_name == 0 || p->n_un.n_name[0] == 0) +static int elf_scan_symtab(Elf_Shdr *, int, int, off_t, size_t, char *, size_t, + struct nlist *, int); static void elf_sym_to_nlist(struct nlist *, Elf_Sym *, Elf_Shdr *, int); /* @@ -123,22 +126,19 @@ int __elf_fdnlist(int fd, struct nlist *list) { struct nlist *p; - Elf_Off symoff = 0, symstroff = 0; - Elf_Size symsize = 0, symstrsize = 0; - Elf_Ssize cc, i; + Elf_Off symoff = 0, stroff = 0; + Elf_Size symsize = 0, strsize = 0; + Elf_Ssize i; int nent = -1; int errsave; - Elf_Sym sbuf[1024]; - Elf_Sym *s; Elf_Ehdr ehdr; - char *strtab = NULL; - Elf_Shdr *shdr = NULL; + Elf_Shdr *shdr; Elf_Size shdr_size; void *base; struct stat st; /* Make sure obj is OK */ - if (lseek(fd, (off_t)0, SEEK_SET) == -1 || + if (lseek(fd, 0, SEEK_SET) == -1 || _read(fd, &ehdr, sizeof(Elf_Ehdr)) != sizeof(Elf_Ehdr) || !__elf_is_okay__(&ehdr) || _fstat(fd, &st) < 0) @@ -160,39 +160,6 @@ __elf_fdnlist(int fd, struct nlist *list) return (-1); shdr = (Elf_Shdr *)base; - /* - * Find the symbol table entry and it's corresponding - * string table entry. Version 1.1 of the ABI states - * that there is only one symbol table but that this - * could change in the future. - */ - for (i = 0; i < ehdr.e_shnum; i++) { - if (shdr[i].sh_type == SHT_SYMTAB) { - symoff = shdr[i].sh_offset; - symsize = shdr[i].sh_size; - symstroff = shdr[shdr[i].sh_link].sh_offset; - symstrsize = shdr[shdr[i].sh_link].sh_size; - break; - } - } - - /* Check for files too large to mmap. */ - if (symstrsize > SIZE_T_MAX) { - errno = EFBIG; - goto done; - } - /* - * Map string table into our address space. This gives us - * an easy way to randomly access all the strings, without - * making the memory allocation permanent as with malloc/free - * (i.e., munmap will return it to the system). - */ - base = mmap(NULL, (size_t)symstrsize, PROT_READ, MAP_PRIVATE, fd, - (off_t)symstroff); - if (base == MAP_FAILED) - goto done; - strtab = (char *)base; - /* * clean out any left-over information for all valid entries. * Type and value defined to be 0 if not found; historical @@ -212,46 +179,95 @@ __elf_fdnlist(int fd, struct nlist *list) ++nent; } - /* Don't process any further if object is stripped. */ - if (symoff == 0) - goto done; - - if (lseek(fd, (off_t) symoff, SEEK_SET) == -1) { - nent = -1; - goto done; + /* + * Find the symbol table entry and it's corresponding + * string table entry. Version 1.1 of the ABI states + * that there is only one symbol table but that this + * could change in the future. + */ + for (i = 0; nent > 0 && i < ehdr.e_shnum; i++) { + if (shdr[i].sh_type != SHT_SYMTAB && + shdr[i].sh_type != SHT_DYNSYM) + continue; + symoff = shdr[i].sh_offset; + symsize = shdr[i].sh_size; + stroff = shdr[shdr[i].sh_link].sh_offset; + strsize = shdr[shdr[i].sh_link].sh_size; + + /* + * Skip this section if it or its string table is empty or + * extends beyond the end of the file, or if the string + * table is too large to map into memory. + */ + if (symoff == 0 || symsize == 0 || + symsize > SIZE_MAX - symoff || + symoff + symsize > st.st_size || + stroff == 0 || strsize == 0 || + strsize > SIZE_MAX - stroff || + stroff + strsize > st.st_size) { + errno = ENOENT; + continue; + } + + /* + * Map string table into our address space. This gives us + * an easy way to randomly access all the strings, without + * making the memory allocation permanent as with + * malloc/free (i.e., munmap will return it to the + * system). + */ + base = mmap(NULL, (size_t)strsize, PROT_READ, + MAP_PRIVATE, fd, (off_t)stroff); + if (base == MAP_FAILED) + continue; + + nent = elf_scan_symtab(shdr, ehdr.e_shnum, fd, symoff, symsize, + base, strsize, list, nent); + + errsave = errno; + munmap(base, strsize); + errno = errsave; } + errsave = errno; + munmap(shdr, shdr_size); + errno = errsave; + return (nent); +} + +static int +elf_scan_symtab(Elf_Shdr *shdr, int shnum, int fd, off_t symoff, size_t symsize, + char *strtab, size_t strsize, struct nlist *list, int nent) +{ + Elf_Sym sbuf[1024]; + Elf_Sym *s; + char *name; + struct nlist *p; + Elf_Ssize cc; + size_t slen; + if (lseek(fd, symoff, SEEK_SET) == -1) + return (-1); while (symsize > 0 && nent > 0) { cc = MIN(symsize, sizeof(sbuf)); if (_read(fd, sbuf, cc) != cc) break; symsize -= cc; for (s = sbuf; cc > 0 && nent > 0; ++s, cc -= sizeof(*s)) { - char *name; - struct nlist *p; - + if (s->st_name >= strsize) + continue; name = strtab + s->st_name; if (name[0] == '\0') continue; - for (p = list; !ISLAST(p); p++) { - if ((p->n_un.n_name[0] == '_' && - strcmp(name, p->n_un.n_name+1) == 0) - || strcmp(name, p->n_un.n_name) == 0) { - elf_sym_to_nlist(p, s, shdr, - ehdr.e_shnum); - if (--nent <= 0) - break; + slen = strnlen(name, strsize - s->st_name); + for (p = list; nent > 0 && !ISLAST(p); p++) { + if (strncmp(name, p->n_un.n_name, slen) == 0 && + p->n_un.n_name[slen] == '\0') { + elf_sym_to_nlist(p, s, shdr, shnum); + --nent; } } } } - done: - errsave = errno; - if (strtab != NULL) - munmap(strtab, symstrsize); - if (shdr != NULL) - munmap(shdr, shdr_size); - errno = errsave; return (nent); } From nobody Wed May 27 09:03:42 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQNvf6528z6fhQF for ; Wed, 27 May 2026 09:03: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQNvf4Yk2z3XFN for ; Wed, 27 May 2026 09:03:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779872622; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RRDA8bfxSHiXTWtrQl/DWWu1tnCStmW9JwzUjV7Z2Qs=; b=BpaU4d1lo9c9AytiXoindAmYOF98CeQxatyBegekzv99/ymSXD2rF7rAd1KapUZeBNgmu+ +3YXLdaMMhQ2vdG70MvaVoUaxe1fX4rvKTowVyMB9cwgZXe7vSaRR1Mvypd0+0DSsUlU7o 2Fiho1nPtX57ZAWkCsmGhKUpibZLMId2nx0B6WOGU74uiRL/VmahLq9jPVgklTVkaujunR lU5LRPUXs8t8hgbg0VA9i/bCQX90DGjZqVRgifzCJ7gLtkuYFwd02399ghnM4YPOp7cQgi vDLvWkf0vOecS2CKlorVs1qnYDsCE9rxJULEU8gRTEEeNLdvl6ihGThtuSgHzg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779872622; a=rsa-sha256; cv=none; b=g80d7XSxFBQ5VxT5jc7gnQ0xuLj8IFrMoaZHqxYR9dRGj4JPW/EKsYlF3FT/KST+ueGxv1 Vd0WwdKIWdtXajGAZCjLeCjl+rGHkqKWs1o1sDZy8UIuFn7v7JksM1zPJwxwVmKr6hUip5 GE+4n+LtTyAEBpx2X4qHWTOtQ7y4MBYDstEvrN8c92U1zAMIReVr07fYjyv7w34fZzbDIu cenDqQiAuw2ztd/9IFBUUN/lQPBZ75ze9zly+fOi77Eur+SUFjBByi8BCHjYT3zgz4dktu 806KZ+YgG27ST5wuCy6+cHzlmrLMdKdVs6E2rCeLUy9x5GXLDjlHr2ToSemacA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779872622; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RRDA8bfxSHiXTWtrQl/DWWu1tnCStmW9JwzUjV7Z2Qs=; b=xbo82T/dlHaKpu9923KbeOpwSG5x/epsWhIDDn+HnVLFoSGRH89kTbF/Muvs2ll8T1h85w 3LAL8hdCgbmsNd3IPlRIR9pSpIyd3n1l1SuVFnU7NzUloQdeW2OS8+NbsD2J9z9/yw0b/q kyU1KFVs5PG0iPyE1k7LDHbfS+9cNTKawD0lg0MooA3U1610952Kyd2t52OkbShowBPEXE Tq/8jcgWF8oKdcxkGGiOcnXJYE2K8gRM2fgmsydUrOkdOveTT1lm1QsFEFQS2ej1/EOcIf P7U3HGngpuNXmZ1j5ezywtwuN1fJM1zgkyu1HbAtY9AjNKhpZChYDraqW3s6WQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQNvf40WTzt14 for ; Wed, 27 May 2026 09:03:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25574 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 09:03:42 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: ddd16aef6b03 - stable/14 - tftp: Close files when we're done with them List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ddd16aef6b03f83a42f8b547563e0deb2d6cc1a4 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 09:03:42 +0000 Message-Id: <6a16b36e.25574.33420411@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=ddd16aef6b03f83a42f8b547563e0deb2d6cc1a4 commit ddd16aef6b03f83a42f8b547563e0deb2d6cc1a4 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-22 17:57:12 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-27 09:03:29 +0000 tftp: Close files when we're done with them Also, delete the file we created if receiving it failed. MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57071 (cherry picked from commit 29351335704e39ce3ca09c528d534c7898bbdc2c) --- usr.bin/tftp/main.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/usr.bin/tftp/main.c b/usr.bin/tftp/main.c index 32eee2fb9afd..3db01f53dd78 100644 --- a/usr.bin/tftp/main.c +++ b/usr.bin/tftp/main.c @@ -597,8 +597,11 @@ get(int argc, char *argv[]) if (verbose) printf("getting from %s:%s to %s [%s]\n", hostname, src, cp, mode); - if (recvfile(peer, port, fd, src, mode) != 0) + if (recvfile(peer, port, fd, src, mode) != 0) { + (void) unlink(cp); txrx_error = 1; + } + close(fd); break; } cp = tail(src); /* new .. jdg */ @@ -610,8 +613,11 @@ get(int argc, char *argv[]) if (verbose) printf("getting from %s:%s to %s [%s]\n", hostname, src, cp, mode); - if (recvfile(peer, port, fd, src, mode) != 0) + if (recvfile(peer, port, fd, src, mode) != 0) { + (void) unlink(cp); txrx_error = 1; + } + close(fd); } } From nobody Wed May 27 09:03:41 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQNvf0RGrz6fhVX for ; Wed, 27 May 2026 09:03: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQNvd40Fgz3XBm for ; Wed, 27 May 2026 09:03:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779872621; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hrQBzC2rjCUfRvzma+QopVO8fpBcekHqnWAWrcbHkhQ=; b=vMwXel7y3RmOTUKObO40JwY565KI86SlgfnZWSXEaU0HIyEWLKF0vUDnkDKRueIm9Hv46t MX/ewY0kQ5LJ029S/4grBWnlZfRluTqJ+b63heGwRO8TRAuB4nd4tzA/kKrrZJnpdn9HAB AwmtDScA8eqUzdDzblsX4e2qnVdwJy+B6TxL6KWwpiTMahrShEAGwxe7Z6G0uw7GiVh0Yn ES0ozJ2ZC8v7zJsuIguf8H7Nxy6WOBNoFMdF0Lh3YzB+0hqZGsB4gFdwTfRm6XRPZ5v/rR Sz5tPBL1PXoCpAQ6SRrr5a6Nqf3kftJjyS8OG+GtF1/sACrdMOcIcaSw1V01+w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779872621; a=rsa-sha256; cv=none; b=gerZ80W+hewQxS8FR1MpJEV1HbbLJDJR7IyOquFhcbdfAXCEaCu8IBl+/K+EhoxcBkuykM jiv5HmlqYA5D4+WhCq5l8XZeYDrSmEVSPf009UcPwSIMwMMfcwdLN+mTK5zZ+WGK+gSU8Q 0F0J/MhfX8DAdKPvrDaHJL6bH5uCL3A05lxbhAsA3h9sgKnIk/D3vdKm7q1ZZdHOKHXe7V UTOe4pE4dPzC9CJdLECq2TSdhIM0PBKHuByjfrrS+w5sqW4mVme9dA2oeoLUt5x6uIZbLy kBzCzEkZ1b7pbBaHotjrNm+vjcgthCcy/hFys0RMfmyNNV4yEWt/pg1WpWOVZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779872621; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hrQBzC2rjCUfRvzma+QopVO8fpBcekHqnWAWrcbHkhQ=; b=IkwQ5OjIAatyhLW2cZz8IDyVjSi3HefKhxopbNlb+S6MezwC8S2Xv3tIiv385AM/UZv4QV 9kO53M2BwVOwiooXkbhUNCHkaHehmFGZhGgoy6qMWz9gHC8L9cWlJA5g7m0KqaFQBRrtuS 8CUwiY2P6GIsUQ4o6M02MC3yweGdBTw2T6FHHNjo83VoSLsrcbHPtgeS8fh2SadNFPU4tt 6Q+syPedzU+Fr5vHPBTcC767///NNDAd/SA8TVUzNadrH0mA0/oIlS9mRWMwFY/x2hvH93 Cgc5w9FJBO+q6pbdgvhlmCjr1IxkTrw6I9SHLaygdR6JMnu1P9EACUxzTekhZg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQNvd3PnxzstM for ; Wed, 27 May 2026 09:03:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25bdc by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 09:03:41 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 2d0b4eef72ef - stable/14 - tftp: Simplify URI handling List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 2d0b4eef72ef8180a51108c279a81462fcfa289d Auto-Submitted: auto-generated Date: Wed, 27 May 2026 09:03:41 +0000 Message-Id: <6a16b36d.25bdc.6cb41ff9@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=2d0b4eef72ef8180a51108c279a81462fcfa289d commit 2d0b4eef72ef8180a51108c279a81462fcfa289d Author: Dag-Erling Smørgrav AuthorDate: 2026-05-22 17:57:08 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-27 09:03:29 +0000 tftp: Simplify URI handling * No need to copy our argument into a new buffer; it is writeable and will not be reused after we return. * Instead of constructing the string "get path" and then splitting it into an argument vector, just construct the vector directly. This avoid potentially overrunning the buffer. * Call settftpmode() just once, with either the default mode or the user-provided value we already validated. * Use errx() instead of fprintf(stderr) + exit(). Reported by: Moyao, Minghao Fu MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57070 (cherry picked from commit a4b17594181502cea38ab0d8b2a9a10782286334) --- usr.bin/tftp/main.c | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/usr.bin/tftp/main.c b/usr.bin/tftp/main.c index 15ca7e03eb70..32eee2fb9afd 100644 --- a/usr.bin/tftp/main.c +++ b/usr.bin/tftp/main.c @@ -238,23 +238,18 @@ main(int argc, char *argv[]) static void urihandling(char *URI) { - char uri[ARG_MAX]; + char meth[] = "get"; char *host = NULL; char *path = NULL; char *opts = NULL; const char *tmode = "octet"; char *s; - char line[MAXLINE]; int i; - strlcpy(uri, URI, ARG_MAX); - host = uri + 7; + host = URI + 7; - if ((s = strchr(host, '/')) == NULL) { - fprintf(stderr, - "Invalid URI: Couldn't find / after hostname\n"); - exit(1); - } + if ((s = strchr(host, '/')) == NULL) + errx(1, "Invalid URI: Couldn't find / after hostname"); *s = '\0'; path = s + 1; @@ -266,24 +261,21 @@ urihandling(char *URI) tmode = opts; tmode += 5; - for (i = 0; modes[i].m_name != NULL; i++) { + for (i = 0; modes[i].m_name != NULL; i++) if (strcmp(modes[i].m_name, tmode) == 0) break; - } - if (modes[i].m_name == NULL) { - fprintf(stderr, "Invalid mode: '%s'\n", mode); - exit(1); - } - settftpmode(modes[i].m_mode); + if (modes[i].m_name == NULL) + errx(1, "Invalid mode: '%s'", mode); } - } else { - settftpmode("octet"); } + settftpmode(tmode); setpeer0(host, NULL); - sprintf(line, "get %s", path); - makeargv(line); + margc = 0; + margv[margc++] = meth; + margv[margc++] = path; + margv[margc] = NULL; get(margc, margv); } From nobody Wed May 27 09:03:43 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQNvh1t3pz6fhSm for ; Wed, 27 May 2026 09:03: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQNvg5V1gz3X2L for ; Wed, 27 May 2026 09:03:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779872623; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hw0KRsdUPazoct/a+8hf8NIhA3KYhgrqlljHOQ85nPg=; b=Oawzj71SFU/25UDyEPyPWs+llKAXMKpgDSONF/DSlzu+a2Waq1x3NQcmjt903Qdwy7Ig9l bDWkNQJDg+pdJ+snUebq1RUPuVUn+A3lkUDvMvyKOASxsrE/mIzJOgOhi/Nqo5+CuxYnn9 R3PQpXxloqeyp88O+2cUBzeMLLy3gGxRRrRWNNX5t0mnZ77w3BAnplpat+Sxu3cSG4kexJ sc2iYMeExY9PV8iSiIRSlFVDAsloH8IqBoT8XTc5yRU6MBKPLVx9lmib1YqHGXngDC7+EH Y1ejQWUmfna+UaQF0mmI6DV2EouGNhVBI6zB1bqMghmRjZ2xy3z2b1b03ar+YA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779872623; a=rsa-sha256; cv=none; b=Q9mAE1ny5drUb7DJ5qD3LQ16G3hN6rmJqfHsdQSEf0zUe+DjtCVGUNdKqcMug7E5v2JEOJ x7j8DF6quuvLw9knvwcFkNA8U2YwVpW9FOZjaL2trL8pgyAot6hWcwN+tfGDkbfo9uycp0 vJNFy1ljHBWiOwuYgPASJqP1Ol8dJ0pifd4lfzRYF4mtOymwnDLlFJbbV8HatKIq7TSFay pAznaqetat6RM9Vl6uwNI0F6bGTAD9ol/BGtT7aBECluAsjkZz8vCtE4NZB1za3uuhrg93 ufiHKmZLIhOuF+y7RzyvzQFZ3XB+vy41Dk8ZjB12+8+7LQNQbdM/chCbAc/iCA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779872623; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hw0KRsdUPazoct/a+8hf8NIhA3KYhgrqlljHOQ85nPg=; b=PUI7JMgUeCGWqxZFZWxQgB6hrqYhr/UCUH3HdGvmx3ABz5ykZb6vEO1oStWttl7rSwGA7F VC1G+WXkYjStwDFIu1uWZfSBAwEr9Bon5wvSRVqq58CB+7bSDEmAFyIoV4/2R5M1UVeP8Q bUmsgic8Ekmn5aubQRff54AD/z07LKrFtgjmv2OTB0OB7wtf8Rjr/fByRATH7JRZyPtgkq 76QOJeeJYP9zMZQHdG/Kw67X9w+VNyk+efUaroU2lIFDDpVgfCqm7qPHz/pymrtnbLfJxq Eit5zEOYhX697R5bXcIThWOTzKXyxp7l/tCcNDD1SXgp8fPV81Dj7OXUMv0+PQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQNvg4k5SzsZM for ; Wed, 27 May 2026 09:03:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26435 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 09:03:43 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 12e8c16e3424 - stable/14 - tftp: Fix handling of port name or number List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 12e8c16e34241ecdafd97b0926e07385b4389aca Auto-Submitted: auto-generated Date: Wed, 27 May 2026 09:03:43 +0000 Message-Id: <6a16b36f.26435.386fbde0@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=12e8c16e34241ecdafd97b0926e07385b4389aca commit 12e8c16e34241ecdafd97b0926e07385b4389aca Author: Dag-Erling Smørgrav AuthorDate: 2026-05-22 17:57:16 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-27 09:03:29 +0000 tftp: Fix handling of port name or number MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57105 (cherry picked from commit 47e4571df15804fe2b010a3c82b22691d80ee680) --- usr.bin/tftp/main.c | 7 ++++--- usr.bin/tftp/tftp.c | 40 ++++++++++++++++++++++------------------ 2 files changed, 26 insertions(+), 21 deletions(-) diff --git a/usr.bin/tftp/main.c b/usr.bin/tftp/main.c index 3db01f53dd78..10343bff412e 100644 --- a/usr.bin/tftp/main.c +++ b/usr.bin/tftp/main.c @@ -344,6 +344,8 @@ setpeer0(char *host, const char *lport) } freeaddrinfo(res0); + free(port); + port = strdup(lport); } static void @@ -363,10 +365,9 @@ setpeer(int argc, char *argv[]) printf("usage: %s [host [port]]\n", argv[0]); return; } - if (argc == 3) { - port = argv[2]; + if (argc == 3) setpeer0(argv[1], argv[2]); - } else + else setpeer0(argv[1], NULL); } diff --git a/usr.bin/tftp/tftp.c b/usr.bin/tftp/tftp.c index 9d727fe8bc2c..d1923864a06d 100644 --- a/usr.bin/tftp/tftp.c +++ b/usr.bin/tftp/tftp.c @@ -70,8 +70,9 @@ int xmitfile(int peer, char *port, int fd, char *name, char *mode) { struct tftphdr *rp; + struct servent *se; int n, i, ret = 0; - uint16_t block; + uint16_t block, portn; struct sockaddr_storage serv; /* valid server port number */ char recvbuffer[MAXPKTSIZE]; struct tftp_stats tftp_stats; @@ -81,14 +82,15 @@ xmitfile(int peer, char *port, int fd, char *name, char *mode) memset(&serv, 0, sizeof(serv)); rp = (struct tftphdr *)recvbuffer; - if (port == NULL) { - struct servent *se; - se = getservbyname("tftp", "udp"); - assert(se != NULL); - ((struct sockaddr_in *)&peer_sock)->sin_port = se->s_port; - } else - ((struct sockaddr_in *)&peer_sock)->sin_port = - htons(atoi(port)); + if ((se = getservbyname(port ? port : "tftp", "udp")) != NULL) + portn = se->s_port; + else + portn = htons(atoi(port)); + if (portn == 0) { + printf("Invalid port '%s'.\n", port ? port : "tftp"); + return -1; + } + ((struct sockaddr_in *)&peer_sock)->sin_port = portn; for (i = 0; i < 12; i++) { struct sockaddr_storage from; @@ -172,7 +174,8 @@ int recvfile(int peer, char *port, int fd, char *name, char *mode) { struct tftphdr *rp; - uint16_t block; + struct servent *se; + uint16_t block, portn; char recvbuffer[MAXPKTSIZE]; int n, i, ret = 0; struct tftp_stats tftp_stats; @@ -181,14 +184,15 @@ recvfile(int peer, char *port, int fd, char *name, char *mode) rp = (struct tftphdr *)recvbuffer; - if (port == NULL) { - struct servent *se; - se = getservbyname("tftp", "udp"); - assert(se != NULL); - ((struct sockaddr_in *)&peer_sock)->sin_port = se->s_port; - } else - ((struct sockaddr_in *)&peer_sock)->sin_port = - htons(atoi(port)); + if ((se = getservbyname(port ? port : "tftp", "udp")) != NULL) + portn = se->s_port; + else + portn = htons(atoi(port)); + if (portn == 0) { + printf("Invalid port '%s'.\n", port ? port : "tftp"); + return (-1); + } + ((struct sockaddr_in *)&peer_sock)->sin_port = portn; for (i = 0; i < 12; i++) { struct sockaddr_storage from; From nobody Wed May 27 09:03:44 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQNvj0pJ4z6fhB4 for ; Wed, 27 May 2026 09:03: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQNvh5Rfvz3X2V for ; Wed, 27 May 2026 09:03:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779872624; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UV3tRgPRRyApQKj3EkdPKSXPSQ+fnbesAgg24XW04GA=; b=h5hWd+ntoVwdzYqnVgMVXoLlXJ8yqaK3eKRYgIF4cun5D+2DwAjeg9WhB4SN2Ctj6NiSit SxHs3ZTcSnxGt+99+kZZ6+4Qe681aIa0O9WbED0g13WBKj4K923ohUsSZw5OfyptxKszFy WnS4TviDpDWck/CdmxeEYkTLVnlUf7iB9Olsj6QkfrV523GwEIV3/v3cTs5aiq2gKAZugg 8GQew0YK8uLHsEmcBEH1posp1em2Nbmu6Ae24hiOKfRmT8q7fV4ooat8kMi9KtuNMLiV/s aYbb/hMD2x0QXOx+IBXE5Bw3kxeoh0t55tXtlWubA8lqJBvI9niDIoQC4ssnnQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779872624; a=rsa-sha256; cv=none; b=obN0x6ouagcQzyHcNS09REV/krIWDZm/OdGgaIVp8bO3aecb1F4BpErdNznqYq0aZmhQ9S JsjnSr+kc7UQJmUrQlegnpdVuC4u7//Wwp4wj8xWPG/PZmDR1AYQqJ90H2Vy5UHTs2h+wo Yo8hIopwQgzRIpCK2K+f1HMXZ1IzrKVx7xjNGoKQrp3VM3dbkQwA+UelrF1pLfzAUh86dr 71wp1CuOy3fDiuQysFZx8XlLMMBub6tLL4kZQkNFjA+porX8DkN8B/2JqrFSukIAJW8tVy Q/DvpDQqKM5+HefZ+kRL6j5TR1BBFFqIDR4SFnWEQKZqpUOquh2mPhJtsRNFiQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779872624; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UV3tRgPRRyApQKj3EkdPKSXPSQ+fnbesAgg24XW04GA=; b=L0+ucfpl01k+RA7612FmwvljULQO/JWRP60uVVKRRW1wlEWXFKCG+GBOeGm5DXSyVBRA/X NYfJ8xq6y96NGVzN8xdpIa8+XqV5TdFtNFwL2ZguResDEGqU0C60bjRriL4lFKNRHCl/bV +M39MF1jnKvDt+GWAHMrI8/XCegytvo/BMiVyQhiV3iHtkktQzPjkeZ6sU7BKSX8zxp0/+ pvET3XxlT9ng5F0WTZa8W2uAyJPD3dMzckEzQ0qgHzvkH4hfMGPqE7OI2xeMHGqGKlFETD YP6HrMg368x3/LzNYw3qpUESBo5uW3AvD+a7JhfLS9slZOl4tNGVqMWWkDqZdg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQNvh52WKzslw for ; Wed, 27 May 2026 09:03:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26c91 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 09:03:44 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 13f6bf4f841c - stable/14 - tftp: Replace fgets with getline List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 13f6bf4f841cc799d97c69e5cea502b764183846 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 09:03:44 +0000 Message-Id: <6a16b370.26c91.42aeea0f@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=13f6bf4f841cc799d97c69e5cea502b764183846 commit 13f6bf4f841cc799d97c69e5cea502b764183846 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-22 17:57:20 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-27 09:03:29 +0000 tftp: Replace fgets with getline MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57072 (cherry picked from commit 5fd928cf1cef21e0fc20ab7c2be156a0eeecdf40) --- usr.bin/tftp/main.c | 90 ++++++++++++++++++++++++++--------------------------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/usr.bin/tftp/main.c b/usr.bin/tftp/main.c index 10343bff412e..3a26903a2076 100644 --- a/usr.bin/tftp/main.c +++ b/usr.bin/tftp/main.c @@ -75,7 +75,6 @@ static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/6/93"; #include "tftp-options.h" #include "tftp.h" -#define MAXLINE (2 * MAXPATHLEN) #define TIMEOUT 5 /* secs between rexmt's */ typedef struct sockaddr_storage peeraddr; @@ -85,7 +84,7 @@ static jmp_buf toplevel; static int txrx_error; static int peer; -#define MAX_MARGV 20 +#define MAX_MARGV 32 static int margc; static char *margv[MAX_MARGV]; @@ -119,7 +118,7 @@ static const char *command_prompt(void); static void urihandling(char *URI); static void getusage(char *); -static void makeargv(char *line); +static void makeargv(char *argv0, char *line); static void putusage(char *); static void settftpmode(const char *); @@ -351,13 +350,13 @@ setpeer0(char *host, const char *lport) static void setpeer(int argc, char *argv[]) { - char line[MAXLINE]; + static char *line; + static size_t sz; if (argc < 2) { - strcpy(line, "Connect "); printf("(to) "); - fgets(&line[strlen(line)], sizeof line - strlen(line), stdin); - makeargv(line); + getline(&line, &sz, stdin); + makeargv(argv[0], line); argc = margc; argv = margv; } @@ -434,17 +433,16 @@ settftpmode(const char *newmode) static void put(int argc, char *argv[]) { - int fd; - int n; - char *cp, *targ, *path; - char line[MAXLINE]; + static char *line; + static size_t sz; + int fd, n; + char *cp, *targ, *path; struct stat sb; if (argc < 2) { - strcpy(line, "send "); printf("(file) "); - fgets(&line[strlen(line)], sizeof line - strlen(line), stdin); - makeargv(line); + getline(&line, &sz, stdin); + makeargv(argv[0], line); argc = margc; argv = margv; } @@ -544,17 +542,15 @@ putusage(char *s) static void get(int argc, char *argv[]) { - int fd; - int n; - char *cp; - char *src; - char line[MAXLINE]; + static char *line; + static size_t sz; + int fd, n; + char *cp, *src; if (argc < 2) { - strcpy(line, "get "); printf("(files) "); - fgets(&line[strlen(line)], sizeof line - strlen(line), stdin); - makeargv(line); + getline(&line, &sz, stdin); + makeargv(argv[0], line); argc = margc; argv = margv; } @@ -634,14 +630,14 @@ getusage(char *s) static void settimeoutpacket(int argc, char *argv[]) { + static char *line; + static size_t sz; int t; - char line[MAXLINE]; if (argc < 2) { - strcpy(line, "Packet timeout "); printf("(value) "); - fgets(&line[strlen(line)], sizeof line - strlen(line), stdin); - makeargv(line); + getline(&line, &sz, stdin); + makeargv(argv[0], line); argc = margc; argv = margv; } @@ -661,14 +657,14 @@ settimeoutpacket(int argc, char *argv[]) static void settimeoutnetwork(int argc, char *argv[]) { + static char *line; + static size_t sz; int t; - char line[MAXLINE]; if (argc < 2) { - strcpy(line, "Network timeout "); printf("(value) "); - fgets(&line[strlen(line)], sizeof line - strlen(line), stdin); - makeargv(line); + getline(&line, &sz, stdin); + makeargv(argv[0], line); argc = margc; argv = margv; } @@ -744,23 +740,22 @@ command_prompt(void) static void command(bool interactive, EditLine *el, History *hist, HistEvent *hep) { + static char *line; + static size_t sz; const struct cmd *c; const char *bp; - char *cp; - int len, num; - char line[MAXLINE]; + int len; for (;;) { if (interactive) { - if ((bp = el_gets(el, &num)) == NULL || num == 0) + if ((bp = el_gets(el, &len)) == NULL || len == 0) exit(0); - len = MIN(MAXLINE, num); - memcpy(line, bp, len); - line[len - 1] = '\0'; - history(hist, hep, H_ENTER, bp); + if ((size_t)len >= sz) + line = realloc(line, sz = len + 1); + strlcpy(line, bp, sz); + history(hist, hep, H_ENTER, line); } else { - line[0] = 0; - if (fgets(line, sizeof line , stdin) == NULL) { + if ((len = getline(&line, &sz, stdin)) <= 0) { if (feof(stdin)) { exit(txrx_error); } else { @@ -768,11 +763,11 @@ command(bool interactive, EditLine *el, History *hist, HistEvent *hep) } } } - if ((cp = strchr(line, '\n'))) - *cp = '\0'; + if (line[len - 1] == '\n') + line[--len] = '\0'; if (line[0] == 0) continue; - makeargv(line); + makeargv(NULL, line); if (margc == 0) continue; c = getcmd(margv[0]); @@ -821,12 +816,16 @@ getcmd(const char *name) * Slice a string up into argc/argv. */ static void -makeargv(char *line) +makeargv(char *argv0, char *line) { char *cp; char **argp = margv; margc = 0; + if (argv0 != NULL) { + *argp++ = argv0; + margc++; + } if ((cp = strchr(line, '\n')) != NULL) *cp = '\0'; for (cp = line; margc < MAX_MARGV - 1 && *cp != '\0';) { @@ -835,13 +834,14 @@ makeargv(char *line) if (*cp == '\0') break; *argp++ = cp; - margc += 1; + margc++; while (*cp != '\0' && !isspace(*cp)) cp++; if (*cp == '\0') break; *cp++ = '\0'; } + /* XXX warn about truncation if *cp != '\0'? */ *argp++ = 0; } From nobody Wed May 27 09:03:46 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQNvl2wTzz6fhDv for ; Wed, 27 May 2026 09:03:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQNvl06S4z3XJJ for ; Wed, 27 May 2026 09:03:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779872627; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=odrQtqsIoDUvZr4Zfnq27rBrL+3v01zTEZFKl1IwSXs=; b=FtEVb+zhpH3D+494koezDSkGJsbHmi8w08/sPyStC6Kz6TkOmFYrOixv0A8fQAYxcmMgOw gOViQeJS9t2OjJ/sgJ74NoC4tx0oy+sqEPmLxBcgp48sYfsiidTy2D1BWIhsQId6Erweir xFWgu+FB61voLoal/hWa0tCRd8MLfQ28HmMyUOfgRXpKfXPRXqZvfk7c5LHAvax4eba7R2 7XDMD6nSrOUqNiXeHu2eWkuvLeFWmlecvYgpmiW73bbvUASJR7DrbLRy2M7FnsJl6fBd++ meJzwgGaEK4N3woUu/4GYHPNFoUk7ofe1ajGZ9gk2br04Jd4AM7B92XaBwilCA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779872627; a=rsa-sha256; cv=none; b=t2D2C6afec4DTvVZ5gaOEqTp9IC7mF5zBMzBk0Hw6pgU6q2pKrIg19A8fW3ucIXq3AMUKY pVJKvN/wQ3JLLMICRSh2XUugQsAr/cLFb5Cxf/ZEk+eZhxsl5fdkbG3pMIa1JnaeDXN4Ge wxZ/QN2oj3ijMWI4SXxxMPhdiXLJ8HVQ/b+e88wb86AnEBCGKDhmTUjf0a0oa0TLLF7Yrg a96uXYlHOAMVm/aID6QXvWp7qN+2a+qs323sm3x7RrA77pu2lTabpVqPdYwCtCkgpOmtyf +7JOWJmQA+Pm6KTxGhprCZNAom1DQZKyoIMAZGZwyvWYegF7qg/aQLeH6KVwig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779872627; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=odrQtqsIoDUvZr4Zfnq27rBrL+3v01zTEZFKl1IwSXs=; b=LEYMwPyyYCkKR4O52H5DPTjL9esxL5QaSDcyD98sVLJcZtcyra0YmLGUY/704jTZ/QwfgR n3vZciemKha7dNHZxh7JvTo+t/SnvrEsIKRkBMVWxYDVCOGTMl6jNJhBtf2otsrRRxgMD2 ZuI/C0X0xYMjjAM9Agrt0JcwbHgFEHc0RPs4yyjJ/5BIqoHCCJK++fOR/aGOL015Q7icMb AhddcDP9VLoCfEDKkZBpun0FLbPsez+tV7EoNNmtOHLzTdkaSu7XJN80A2QydpnOehbpyW MfeaW7SdOsx8sSMp46V6tpuqxuyvDV4wbhEzJktudJ3tn6frmK2hVglU/SY2qw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQNvk6lFJzsQy for ; Wed, 27 May 2026 09:03:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26576 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 09:03:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 6764267a99db - stable/14 - tftp: Add test case with over-long URL List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6764267a99dbe8ec1fbb125cfc3b0f1d15bbc500 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 09:03:46 +0000 Message-Id: <6a16b372.26576.3e28201f@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=6764267a99dbe8ec1fbb125cfc3b0f1d15bbc500 commit 6764267a99dbe8ec1fbb125cfc3b0f1d15bbc500 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-22 17:57:27 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-27 09:03:29 +0000 tftp: Add test case with over-long URL This adds a test case that passes a very long URL on the command line, which would previously have resulted in a benign buffer overflow in urihandling(), detectable only by compiling tftp with ASAN enabled. MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57074 (cherry picked from commit b94689d036c5f5bdc04d080ff7dd5d0e9df9b8d4) --- usr.bin/tftp/tests/tftp_test.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/usr.bin/tftp/tests/tftp_test.sh b/usr.bin/tftp/tests/tftp_test.sh index a4c9f3b898e7..12c008b2c78c 100644 --- a/usr.bin/tftp/tests/tftp_test.sh +++ b/usr.bin/tftp/tests/tftp_test.sh @@ -442,6 +442,29 @@ tftp_url_ipv6_cleanup() { stop_tftpd } +atf_test_case tftp_url_long cleanup +tftp_url_long_head() { + atf_set "descr" "Very long URL" + atf_set "require.user" "root" +} +tftp_url_long_body() { + start_tftpd + mkdir "${tftp_dir}/subdirectory" + local remote_file="${tftp_dir}/hello.txt" + echo "Hello, $$!" >"${remote_file}" + local local_file="${remote_file##*/}" + local d="subdirectory/../" + d="${d}${d}${d}${d}${d}${d}${d}${d}" + d="${d}${d}${d}${d}${d}${d}${d}${d}" + d="${d}${d}${d}${d}${d}${d}${d}${d}" + atf_check -s exit:1 -o match:"Illegal TFTP operation" \ + tftp "tftp://localhost/${d}${remote_file##*/}" + atf_check -s exit:1 test -f "${local_file}" +} +tftp_url_long_cleanup() { + stop_tftpd +} + atf_init_test_cases() { atf_add_test_case tftp_get_big atf_add_test_case tftp_get_host @@ -462,4 +485,5 @@ atf_init_test_cases() { atf_add_test_case tftp_url_host atf_add_test_case tftp_url_ipv4 atf_add_test_case tftp_url_ipv6 + atf_add_test_case tftp_url_long } From nobody Wed May 27 09:03:45 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQNvk59wVz6fhQP for ; Wed, 27 May 2026 09:03: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQNvj6Hf0z3X6k for ; Wed, 27 May 2026 09:03:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779872625; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8PKu8Edt87U00zjM4Yx5ADKKeco1z4hkGqtxF2ZO5p4=; b=ou1M64M+nM2UHOWNNlZ+ImQRjvxiti1hA5Srwv9uqeoT+Jkn6nw9nksJGMl6e1GtgG8ALp FY8WNSioYE6K2/qmKnOFwlzFbaO5qgSyJOQzN7EyvlAg2lViFI2fPJDKiUsc3i4f1sXFXw MaBWXlWnvcx/wAxGT7tCqzqHgZsxj9NyqjNtIGnibHYpXcSaOxAIXNViWl+mbeGVA/bE7M uqKpUne4dNgJH9sP1rZXcsEJS0u2xHE9Icdyl21iqGNO+EEoidcOFqflpyR61mh7aXEF5j WRu7V60wcEEipduYSM2HvB4j3NuPgGud5qWUQASI46P1Ma+jDnigLPjemjZKRg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779872625; a=rsa-sha256; cv=none; b=LKCQObKqwdMjkMHV05M/MxRJKoSuh4G9wSiMF918y3eh2QvN4JvmWqMANolNBgMf4c44rl nZFi2nZRH7KZ8E0E4vaOk/PE2Qzcf4/WWKBaM2ORlQVLJYg2UKM9A+dsNggaKjZWPsOl9G jU0OZA/e/MpO98O5v3HnsZLB+8O6YZVAEpUBHh6HpV7W/hnQeR0E0wepQOZIvffy8Rem5z PpzWb4yzz3Awt8JQonPB1UV9gxvECi5cfYeuolZND6L8r8YFbgtgkcMnmNjFkG0wNhLBOe /rW9IlSfdoXQnT8e0PWXSisE9lakZ07TSeO6iSvovfiKtCbtzXUsmS80GCaKCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779872625; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8PKu8Edt87U00zjM4Yx5ADKKeco1z4hkGqtxF2ZO5p4=; b=NzJiTsE6OJMuHDMShYKm1GPJC/ttTHbxOqx4gXfiluDlXALynYYcF/XStC6ADSjaCApfmY XVEWY4v21ij+nVrq99MX2LH23BkRtetstm7M2SFIQRTJRyCC4TWzYQBsSOvTgwtW6GcRFp rHt29FN8Fz8TxDs21qXm27yCA+xHQMRlKobLZeRlfyFMCBHglYERq9qA5xlvQGHCbIPYBG N6yE/5jk9hyVAVcZYJBGpTs8wZMDpZ9Rux3Ks6iUAHUemfoE2qnZ0Q1M3KCmd3E216d+sL tN3aeB1KYkSoVS8lFIWfEZZgUTqS5/J+GmjB/RBuESMMk4b0xL+nimBRYPesfA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQNvj5t6RzspP for ; Wed, 27 May 2026 09:03:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26149 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 09:03:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: e1703e169d9e - stable/14 - tftp: Style cleanup List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e1703e169d9e3197eb8fc25a092090213163c68d Auto-Submitted: auto-generated Date: Wed, 27 May 2026 09:03:45 +0000 Message-Id: <6a16b371.26149.79593838@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=e1703e169d9e3197eb8fc25a092090213163c68d commit e1703e169d9e3197eb8fc25a092090213163c68d Author: Dag-Erling Smørgrav AuthorDate: 2026-05-22 17:57:23 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-27 09:03:29 +0000 tftp: Style cleanup MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57073 (cherry picked from commit 29aaaa5e6660310311fe443d8792b31181e1dd3c) --- usr.bin/tftp/main.c | 56 +++++++++++++++++++---------------------------------- usr.bin/tftp/tftp.c | 40 +++++++++++++++++++------------------- 2 files changed, 40 insertions(+), 56 deletions(-) diff --git a/usr.bin/tftp/main.c b/usr.bin/tftp/main.c index 3a26903a2076..d7c974a2b040 100644 --- a/usr.bin/tftp/main.c +++ b/usr.bin/tftp/main.c @@ -89,7 +89,7 @@ static int margc; static char *margv[MAX_MARGV]; int verbose; -static char *port = NULL; +static char *port; static void get(int, char **); static void help(int, char **); @@ -113,14 +113,14 @@ static void setrollover(int, char **); static void setpacketdrop(int, char **); static void setwindowsize(int, char **); -static void command(bool, EditLine *, History *, HistEvent *) __dead2; +static void command(bool, EditLine *, History *, HistEvent *) __dead2; static const char *command_prompt(void); -static void urihandling(char *URI); -static void getusage(char *); -static void makeargv(char *argv0, char *line); -static void putusage(char *); -static void settftpmode(const char *); +static void urihandling(char *URI); +static void getusage(char *); +static void makeargv(char *argv0, char *line); +static void putusage(char *); +static void settftpmode(const char *); static char *tail(char *); static const struct cmd *getcmd(const char *); @@ -129,7 +129,7 @@ static const struct cmd *getcmd(const char *); struct cmd { const char *name; - void (*handler)(int, char **); + void (*handler)(int, char **); const char *help; }; @@ -237,13 +237,13 @@ main(int argc, char *argv[]) static void urihandling(char *URI) { - char meth[] = "get"; - char *host = NULL; - char *path = NULL; - char *opts = NULL; const char *tmode = "octet"; - char *s; - int i; + char meth[] = "get"; + char *host = NULL; + char *path = NULL; + char *opts = NULL; + char *s; + int i; host = URI + 7; @@ -284,8 +284,8 @@ static void setpeer0(char *host, const char *lport) { struct addrinfo hints, *res0, *res; - int error; const char *cause = "unknown"; + int error; if (connected) { close(peer); @@ -298,7 +298,7 @@ setpeer0(char *host, const char *lport) hints.ai_socktype = SOCK_DGRAM; hints.ai_protocol = IPPROTO_UDP; hints.ai_flags = AI_CANONNAME; - if (!lport) + if (lport == NULL) lport = "tftp"; error = getaddrinfo(host, lport, &hints, &res0); if (error) { @@ -360,7 +360,7 @@ setpeer(int argc, char *argv[]) argc = margc; argv = margv; } - if ((argc < 2) || (argc > 3)) { + if (argc < 2 || argc > 3) { printf("usage: %s [host [port]]\n", argv[0]); return; } @@ -406,21 +406,18 @@ modecmd(int argc, char *argv[]) static void setbinary(int argc __unused, char *argv[] __unused) { - settftpmode("octet"); } static void setascii(int argc __unused, char *argv[] __unused) { - settftpmode("netascii"); } static void settftpmode(const char *newmode) { - strlcpy(mode, newmode, sizeof(mode)); if (verbose) printf("mode set to %s\n", mode); @@ -435,9 +432,9 @@ put(int argc, char *argv[]) { static char *line; static size_t sz; - int fd, n; - char *cp, *targ, *path; struct stat sb; + char *cp, *targ, *path; + int fd, n; if (argc < 2) { printf("(file) "); @@ -530,7 +527,6 @@ put(int argc, char *argv[]) static void putusage(char *s) { - printf("usage: %s file [remotename]\n", s); printf(" %s file host:remotename\n", s); printf(" %s file1 file2 ... fileN [[host:]remote-directory]\n", s); @@ -544,8 +540,8 @@ get(int argc, char *argv[]) { static char *line; static size_t sz; - int fd, n; char *cp, *src; + int fd, n; if (argc < 2) { printf("(files) "); @@ -621,7 +617,6 @@ get(int argc, char *argv[]) static void getusage(char *s) { - printf("usage: %s file [localname]\n", s); printf(" %s [host:]file [localname]\n", s); printf(" %s [host1:]file1 [host2:]file2 ... [hostN:]fileN\n", s); @@ -684,7 +679,6 @@ settimeoutnetwork(int argc, char *argv[]) static void showstatus(int argc __unused, char *argv[] __unused) { - printf("Remote host: %s\n", connected ? hostname : "none specified yet"); printf("RFC2347 Options support: %s\n", @@ -705,7 +699,6 @@ showstatus(int argc __unused, char *argv[] __unused) static void intr(int dummy __unused) { - signal(SIGALRM, SIG_IGN); alarm(0); longjmp(toplevel, -1); @@ -730,7 +723,6 @@ tail(char *filename) static const char * command_prompt(void) { - return ("tftp> "); } @@ -848,7 +840,6 @@ makeargv(char *argv0, char *line) static void quit(int argc __unused, char *argv[] __unused) { - exit(txrx_error); } @@ -886,7 +877,6 @@ help(int argc, char *argv[]) static void setverbose(int argc __unused, char *argv[] __unused) { - verbose = !verbose; printf("Verbose mode %s.\n", verbose ? "on" : "off"); } @@ -894,7 +884,6 @@ setverbose(int argc __unused, char *argv[] __unused) static void setoptions(int argc, char *argv[]) { - if (argc == 2) { if (strcasecmp(argv[1], "enable") == 0 || strcasecmp(argv[1], "on") == 0) { @@ -924,7 +913,6 @@ setoptions(int argc, char *argv[]) static void setrollover(int argc, char *argv[]) { - if (argc == 2) { if (strcasecmp(argv[1], "never") == 0 || strcasecmp(argv[1], "none") == 0) { @@ -975,7 +963,6 @@ setdebug(int argc, char *argv[]) static void setblocksize(int argc, char *argv[]) { - if (!options_rfc_enabled) printf("RFC2347 style options are not enabled " "(but proceeding anyway)\n"); @@ -1011,7 +998,6 @@ setblocksize(int argc, char *argv[]) static void setblocksize2(int argc, char *argv[]) { - if (!options_rfc_enabled || !options_extra_enabled) printf( "RFC2347 style or non-RFC defined options are not enabled " @@ -1067,7 +1053,6 @@ setblocksize2(int argc, char *argv[]) static void setpacketdrop(int argc, char *argv[]) { - if (argc != 1) packetdroppercentage = atoi(argv[1]); @@ -1078,7 +1063,6 @@ setpacketdrop(int argc, char *argv[]) static void setwindowsize(int argc, char *argv[]) { - if (!options_rfc_enabled) printf("RFC2347 style options are not enabled " "(but proceeding anyway)\n"); diff --git a/usr.bin/tftp/tftp.c b/usr.bin/tftp/tftp.c index d1923864a06d..f8bb0edc7c06 100644 --- a/usr.bin/tftp/tftp.c +++ b/usr.bin/tftp/tftp.c @@ -69,13 +69,13 @@ static char sccsid[] = "@(#)tftp.c 8.1 (Berkeley) 6/6/93"; int xmitfile(int peer, char *port, int fd, char *name, char *mode) { + char recvbuffer[MAXPKTSIZE]; + struct sockaddr_storage serv; /* valid server port number */ + struct tftp_stats tftp_stats; struct tftphdr *rp; struct servent *se; int n, i, ret = 0; uint16_t block, portn; - struct sockaddr_storage serv; /* valid server port number */ - char recvbuffer[MAXPKTSIZE]; - struct tftp_stats tftp_stats; stats_init(&tftp_stats); @@ -88,7 +88,7 @@ xmitfile(int peer, char *port, int fd, char *name, char *mode) portn = htons(atoi(port)); if (portn == 0) { printf("Invalid port '%s'.\n", port ? port : "tftp"); - return -1; + return (-1); } ((struct sockaddr_in *)&peer_sock)->sin_port = portn; @@ -102,7 +102,7 @@ xmitfile(int peer, char *port, int fd, char *name, char *mode) n = send_wrq(peer, name, mode); if (n > 0) { printf("Cannot send WRQ packet\n"); - return -1; + return (-1); } /* @@ -131,11 +131,11 @@ xmitfile(int peer, char *port, int fd, char *name, char *mode) } if (i == 12) { printf("Transfer timed out.\n"); - return -1; + return (-1); } if (rp->th_opcode == ERROR) { printf("Got ERROR, aborted\n"); - return -1; + return (-1); } /* @@ -146,7 +146,7 @@ xmitfile(int peer, char *port, int fd, char *name, char *mode) if (!options_rfc_enabled) { printf("Got OACK while options are not enabled!\n"); send_error(peer, EBADOP); - return -1; + return (-1); } parse_options(peer, rp->th_stuff, n + 2); @@ -154,7 +154,7 @@ xmitfile(int peer, char *port, int fd, char *name, char *mode) if (read_init(fd, NULL, mode) < 0) { warn("read_init()"); - return -1; + return (-1); } block = 1; @@ -164,7 +164,7 @@ xmitfile(int peer, char *port, int fd, char *name, char *mode) read_close(); if (tftp_stats.amount > 0) printstats("Sent", verbose, &tftp_stats); - return ret; + return (ret); } /* @@ -173,12 +173,12 @@ xmitfile(int peer, char *port, int fd, char *name, char *mode) int recvfile(int peer, char *port, int fd, char *name, char *mode) { + char recvbuffer[MAXPKTSIZE]; + struct tftp_stats tftp_stats; struct tftphdr *rp; struct servent *se; - uint16_t block, portn; - char recvbuffer[MAXPKTSIZE]; int n, i, ret = 0; - struct tftp_stats tftp_stats; + uint16_t block, portn; stats_init(&tftp_stats); @@ -204,7 +204,7 @@ recvfile(int peer, char *port, int fd, char *name, char *mode) n = send_rrq(peer, name, mode); if (n > 0) { printf("Cannot send RRQ packet\n"); - return -1; + return (-1); } /* @@ -233,16 +233,16 @@ recvfile(int peer, char *port, int fd, char *name, char *mode) } if (i == 12) { printf("Transfer timed out.\n"); - return -1; + return (-1); } if (rp->th_opcode == ERROR) { tftp_log(LOG_ERR, "Error code %d: %s", rp->th_code, rp->th_msg); - return -1; + return (-1); } if (write_init(fd, NULL, mode) < 0) { warn("write_init"); - return -1; + return (-1); } /* @@ -253,7 +253,7 @@ recvfile(int peer, char *port, int fd, char *name, char *mode) if (!options_rfc_enabled) { printf("Got OACK while options are not enabled!\n"); send_error(peer, EBADOP); - return -1; + return (-1); } parse_options(peer, rp->th_stuff, n + 2); @@ -261,7 +261,7 @@ recvfile(int peer, char *port, int fd, char *name, char *mode) n = send_ack(peer, 0); if (n > 0) { printf("Cannot send ACK on OACK.\n"); - return -1; + return (-1); } block = 0; if (tftp_receive(peer, &block, &tftp_stats, NULL, 0) != 0) @@ -274,5 +274,5 @@ recvfile(int peer, char *port, int fd, char *name, char *mode) if (tftp_stats.amount > 0) printstats("Received", verbose, &tftp_stats); - return ret; + return (ret); } From nobody Wed May 27 09:03:48 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQNvm4FLbz6fh7c for ; Wed, 27 May 2026 09:03:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQNvm0xvXz3X9f for ; Wed, 27 May 2026 09:03:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779872628; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6CWdKASWeRYoZbMdtcCnYaNfipuBy2+Q/M3Af3s+bDg=; b=p+EGe+5DGYQfJTPE0FlluKQMfpDEdHqJ8AZB1EqBJL47x69xfH84lpvEotmEICG9HK8RoM g2mQkIGhmyYggGhNs5MbDHL7ya1D2+eMFxkG6EfH8FCdZ1oSSXB240gLNi3WzJMcoPguPl Pu0Xh74Mjhs9ds/tWQF6OAU1dDpc1OgRL/EUL3YX0smZOONw2u6nrkdoIf1PAgq1hB3vxN Ws4bIDtRM8Cpzw5q07jNaRIpt+81kwdiV9ZnukNtkPACsNzgkzAn2SD4M/30siMDx5L57f c6fKBz+V4i73Bdi4x5udU8mHsHCSQ74x3LZoFtGL5YqHB/avHIPXBTKKVy4w7A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779872628; a=rsa-sha256; cv=none; b=yyOwAwEg0zSEwSanZ7j2ozr+e56gVz95AnSXsHUHXMjfucLHsbqkmYyll07lMoYte6PHHp n3DGm3io+hnLdP1pnD4VNtrY3yxVXK8F8dR8kE5kcI6ZfmUwZYTbPVMJ+GTOksgGGoCzaR T4shwxCnXOY6nph1xt031GM06NE0nGT2YBj8/3Me7QaSWrXP/Q2dEuppby5c7XSe1D3JhY FV6GF6WGGjlwO+LE3Pl7LS9JfY53STNFQTCNejKT875Sm5EOYGrl7DiG5Rggq7511oW74U ftMZh30rj3sCs+sMbUUcl3Cv5SE57ivjqDN70HSwjfLzA1L/lkeavi3prm09Nw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779872628; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6CWdKASWeRYoZbMdtcCnYaNfipuBy2+Q/M3Af3s+bDg=; b=HvLg7H4frdV2MeTIfcFXoF+sMqwkG3Q9M7Pseiq5l8w6e2VkaVYVxyNoJL3FWZWIZfSj+O /wW6DUD5UHfnkCr0PokszkGW+R1XIm6Z3DSV0wCa7B49z+ucMLNGn/DKfOX75TxisCVwep +z7zPZzLBq+HUbamsObaK4q9krAuwfetcybEjoMZdltFg9ghv6vlN0qaTXvi82QzggJWDM /SM6UHBYrmzJwAK+XppeZQWn/zrGu75vUB+1ExEan2GkC1jepaldPo1DGwwkA+MJKuop3A 2AFFnZO86kc/gETPDBADxJ74g4REiMWT1bEo92VkzdiyzI0Q9FEoHM41rYqFAw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQNvm0VLfzt16 for ; Wed, 27 May 2026 09:03:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25578 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 09:03:48 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 2d9d04064354 - stable/14 - tftpd: Add missing bounds checks List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 2d9d0406435446ecffaab9c2908b3506ce709b8b Auto-Submitted: auto-generated Date: Wed, 27 May 2026 09:03:48 +0000 Message-Id: <6a16b374.25578.26e12173@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=2d9d0406435446ecffaab9c2908b3506ce709b8b commit 2d9d0406435446ecffaab9c2908b3506ce709b8b Author: Dag-Erling Smørgrav AuthorDate: 2026-05-22 17:57:31 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-27 09:03:30 +0000 tftpd: Add missing bounds checks In send_[rw]rq(), we were using strlcpy() to avoid overflowing our packet buffer, then failing to check the result and blithely advancing our pointer by the full length. Luckily, this code is only ever used by tftp(1), not tftpd(8). MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57075 (cherry picked from commit 933893771344e1647eeda152016b938fdc30ccdc) --- libexec/tftpd/tftp-io.c | 62 +++++++++++++++++++++++++++---------------------- 1 file changed, 34 insertions(+), 28 deletions(-) diff --git a/libexec/tftpd/tftp-io.c b/libexec/tftpd/tftp-io.c index aaacc9dd7f45..8a560cbb76b0 100644 --- a/libexec/tftpd/tftp-io.c +++ b/libexec/tftpd/tftp-io.c @@ -174,11 +174,11 @@ send_error(int peer, int error) int send_wrq(int peer, char *filename, char *mode) { - int n; + char buf[MAXPKTSIZE]; struct tftphdr *tp; char *bp; - char buf[MAXPKTSIZE]; - int size; + size_t len; + int n, size; if (debug & DEBUG_PACKETS) tftp_log(LOG_DEBUG, "Sending WRQ: filename: '%s', mode '%s'", @@ -192,17 +192,17 @@ send_wrq(int peer, char *filename, char *mode) size = offsetof(struct tftphdr, th_stuff); bp = tp->th_stuff; - strlcpy(bp, filename, sizeof(buf) - size); - bp += strlen(filename); - *bp = 0; - bp++; - size += strlen(filename) + 1; - - strlcpy(bp, mode, sizeof(buf) - size); - bp += strlen(mode); - *bp = 0; - bp++; - size += strlen(mode) + 1; + len = strlcpy(bp, filename, sizeof(buf) - size); + if (len >= sizeof(buf) - size) + goto overflow; + bp += len + 1; + size += len + 1; + + len = strlcpy(bp, mode, sizeof(buf) - size); + if (len >= sizeof(buf) - size) + goto overflow; + bp += len + 1; + size += len + 1; if (options_rfc_enabled) size += make_options(peer, bp, sizeof(buf) - size); @@ -214,6 +214,9 @@ send_wrq(int peer, char *filename, char *mode) return (1); } return (0); +overflow: + tftp_log(LOG_ERR, "%s: file name too long", __func__); + return (1); } /* @@ -222,11 +225,11 @@ send_wrq(int peer, char *filename, char *mode) int send_rrq(int peer, char *filename, char *mode) { - int n; + char buf[MAXPKTSIZE]; struct tftphdr *tp; char *bp; - char buf[MAXPKTSIZE]; - int size; + size_t len; + int n, size; if (debug & DEBUG_PACKETS) tftp_log(LOG_DEBUG, "Sending RRQ: filename: '%s', mode '%s'", @@ -240,17 +243,17 @@ send_rrq(int peer, char *filename, char *mode) size = offsetof(struct tftphdr, th_stuff); bp = tp->th_stuff; - strlcpy(bp, filename, sizeof(buf) - size); - bp += strlen(filename); - *bp = 0; - bp++; - size += strlen(filename) + 1; - - strlcpy(bp, mode, sizeof(buf) - size); - bp += strlen(mode); - *bp = 0; - bp++; - size += strlen(mode) + 1; + len = strlcpy(bp, filename, sizeof(buf) - size); + if (len >= sizeof(buf) - size) + goto overflow; + bp += len + 1; + size += len + 1; + + len = strlcpy(bp, mode, sizeof(buf) - size); + if (len >= sizeof(buf) - size) + goto overflow; + bp += len + 1; + size += len + 1; if (options_rfc_enabled) { options_set_request(OPT_TSIZE, "0"); @@ -264,6 +267,9 @@ send_rrq(int peer, char *filename, char *mode) return (1); } return (0); +overflow: + tftp_log(LOG_ERR, "%s: file name too long", __func__); + return (1); } /* From nobody Wed May 27 09:03:49 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQNvn4H12z6fhB9 for ; Wed, 27 May 2026 09:03: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQNvn1nM5z3XR3 for ; Wed, 27 May 2026 09:03:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779872629; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9K3ZyyVkxs6PUC6kTy3XN/GBNRcoKMZJs38ARXcX8UM=; b=RPgC1AZRKEu9zg5icwTs/JRh4F5/hjRG21F+2d8R7EwmiOb54EdDDNFuPWKRWrtjBuXuz3 hqFzN9o1DR0oOXl3n/rnZPdakd0f5MHXbkPCCXGxRlYVGJT5Tq6Poak6nbGFhNY/rSmD9Y yYmahDF5XRglfcXT6KMSTr3Zl6swZC27uQ+F5eL25bzdAhAP68DShUycrcNbA1pr6pF7t5 QDj+A1dVxb2uL39Sj4MzxHpjTw1JMjb3s/BJNChgDhUH324Q0kjuT0EDhfsQDoUlWgg1Wf dypWoB+DFYlc3CNcxsXiZZTZkdtUIPZ0x9eLjK6Vpt3amTsZPfAwm5dL8WyVng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779872629; a=rsa-sha256; cv=none; b=Hp9PKlWuysOzDauOvsRGsnDWdf0SdV9dwLMHA+sQ95eVAzOowlRhi/ed+ZCg7/SIHyHYlP nIkzwvTpAQ2tIm94P99EuC7hEmVaiddqIZeH67klyixkwU8RMT/wZqivd/UpjnISDvQyfj rYPklgKT0MS88Wr+d/KkeswARiPBsB0XECKrzlv+vITaDxC/rpYe02jLxL/XyKPE7lrCSz fb8X5VbCoJoRX594VUDw9qnhaJ/pVRFXziPg6d9cDpjq5tcebrYgLgOi47FJ0HZ8okErpF RkoNwtb7CrV48sJN8LvQvtyJf+S78PHmca5PfGW0lW2yaMtAl5/ZcqjxSCVUOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779872629; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9K3ZyyVkxs6PUC6kTy3XN/GBNRcoKMZJs38ARXcX8UM=; b=g3nvVQL0E2q5uqleYkIXzTJnvcYYn5iPRwAr+bZPrLkOuOSREgEKEogi7f+K+ErYzr6orF vf0/1KjIpyfC15Q+Bvm1tsavYQs5p4qLlvqpVkS/TI0/C47ewI8WTOy5bDVvPRIrFjhENj ChgcxgDDkaqHqOZeWgkr0NP0Lt+dv6tOhKDk5Wl45s7vz8FsLQ5afsgCpXNb+pavckbOYn Xi6NJgV19/NdQ8qWVUtyr+2crzn4eLetLURG0docz3UM1kgdxJjjdySQlwOZnVwjkS+/9B sTLscKE72F5JbGeB1MnUywbr87S0BS7naAZURIWrsaqLNq6IIRxzwxnDkAZ7Pg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQNvn1NFWzsR0 for ; Wed, 27 May 2026 09:03:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25add by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 09:03:49 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 210bee005865 - stable/14 - tftpd: Simplify packet drop macro List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 210bee0058652662feb04379d511bcba48e04210 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 09:03:49 +0000 Message-Id: <6a16b375.25add.b6ef9ea@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=210bee0058652662feb04379d511bcba48e04210 commit 210bee0058652662feb04379d511bcba48e04210 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-22 17:57:35 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-27 09:03:30 +0000 tftpd: Simplify packet drop macro The first argument is always the function name, for which we can simply use __func__. This leaves only the optional return value, so we can use a single variadic macro instead of two nearly-identical copies. MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57076 (cherry picked from commit 76c3387024b40c2e28ed2d1bb64b3a14371c3c0b) --- libexec/tftpd/tftp-io.c | 51 ++++++++++++++++++++++--------------------------- 1 file changed, 23 insertions(+), 28 deletions(-) diff --git a/libexec/tftpd/tftp-io.c b/libexec/tftpd/tftp-io.c index 8a560cbb76b0..b553bd7fa4eb 100644 --- a/libexec/tftpd/tftp-io.c +++ b/libexec/tftpd/tftp-io.c @@ -70,17 +70,12 @@ static struct errmsg { { -1, NULL } }; -#define DROPPACKET(s) \ +#define DROPPACKET(...) \ if (packetdroppercentage != 0 && \ - arc4random()%100 < packetdroppercentage) { \ - tftp_log(LOG_DEBUG, "Artificial packet drop in %s", s); \ - return; \ - } -#define DROPPACKETn(s,n) \ - if (packetdroppercentage != 0 && \ - arc4random()%100 < packetdroppercentage) { \ - tftp_log(LOG_DEBUG, "Artificial packet drop in %s", s); \ - return (n); \ + arc4random() % 100 < packetdroppercentage) { \ + tftp_log(LOG_DEBUG, "Artificial packet drop in %s", \ + __func__); \ + return __VA_ARGS__; \ } const char * @@ -105,7 +100,7 @@ send_packet(int peer, uint16_t block, char *pkt, int size) int t = 1; for (i = 0; i < 12 ; i++) { - DROPPACKETn("send_packet", 0); + DROPPACKET(0); if (sendto(peer, pkt, size, 0, (struct sockaddr *)&peer_sock, peer_sock.ss_len) == size) { @@ -145,7 +140,7 @@ send_error(int peer, int error) if (debug & DEBUG_PACKETS) tftp_log(LOG_DEBUG, "Sending ERROR %d", error); - DROPPACKET("send_error"); + DROPPACKET(); tp = (struct tftphdr *)buf; tp->th_opcode = htons((u_short)ERROR); @@ -180,12 +175,12 @@ send_wrq(int peer, char *filename, char *mode) size_t len; int n, size; - if (debug & DEBUG_PACKETS) + if (debug & DEBUG_PACKETS) { tftp_log(LOG_DEBUG, "Sending WRQ: filename: '%s', mode '%s'", - filename, mode - ); + filename, mode); + } - DROPPACKETn("send_wrq", 0); + DROPPACKET(0); tp = (struct tftphdr *)buf; tp->th_opcode = htons((u_short)WRQ); @@ -210,7 +205,7 @@ send_wrq(int peer, char *filename, char *mode) n = sendto(peer, buf, size, 0, (struct sockaddr *)&peer_sock, peer_sock.ss_len); if (n != size) { - tftp_log(LOG_ERR, "send_wrq: %s", strerror(errno)); + tftp_log(LOG_ERR, "%s: %m", __func__); return (1); } return (0); @@ -231,12 +226,12 @@ send_rrq(int peer, char *filename, char *mode) size_t len; int n, size; - if (debug & DEBUG_PACKETS) + if (debug & DEBUG_PACKETS) { tftp_log(LOG_DEBUG, "Sending RRQ: filename: '%s', mode '%s'", - filename, mode - ); + filename, mode); + } - DROPPACKETn("send_rrq", 0); + DROPPACKET(0); tp = (struct tftphdr *)buf; tp->th_opcode = htons((u_short)RRQ); @@ -263,7 +258,7 @@ send_rrq(int peer, char *filename, char *mode) n = sendto(peer, buf, size, 0, (struct sockaddr *)&peer_sock, peer_sock.ss_len); if (n != size) { - tftp_log(LOG_ERR, "send_rrq: %d %s", n, strerror(errno)); + tftp_log(LOG_ERR, "%s: %m", __func__); return (1); } return (0); @@ -286,7 +281,7 @@ send_oack(int peer) if (debug & DEBUG_PACKETS) tftp_log(LOG_DEBUG, "Sending OACK"); - DROPPACKETn("send_oack", 0); + DROPPACKET(0); /* * Send back an options acknowledgement (only the ones with @@ -300,8 +295,8 @@ send_oack(int peer) if (options[i].o_reply != NULL) { n = snprintf(bp, size, "%s%c%s", options[i].o_type, 0, options[i].o_reply); - bp += n+1; - size -= n+1; + bp += n + 1; + size -= n + 1; if (size < 0) { tftp_log(LOG_ERR, "oack: buffer overflow"); exit(1); @@ -332,7 +327,7 @@ send_ack(int fp, uint16_t block) if (debug & DEBUG_PACKETS) tftp_log(LOG_DEBUG, "Sending ACK for block %d", block); - DROPPACKETn("send_ack", 0); + DROPPACKET(0); tp = (struct tftphdr *)buf; tp->th_opcode = htons((u_short)ACK); @@ -362,7 +357,7 @@ send_data(int peer, uint16_t block, char *data, int size) tftp_log(LOG_DEBUG, "Sending DATA packet %d of %d bytes", block, size); - DROPPACKETn("send_data", 0); + DROPPACKET(0); pkt = (struct tftphdr *)buf; @@ -409,7 +404,7 @@ receive_packet(int peer, char *data, int size, struct sockaddr_storage *from, fromlen = sizeof(*pfrom); n = recvfrom(peer, data, size, 0, (struct sockaddr *)pfrom, &fromlen); - DROPPACKETn("receive_packet", RP_TIMEOUT); + DROPPACKET(RP_TIMEOUT); if (n < 0) { /* No idea what could have happened if it isn't a timeout */ From nobody Wed May 27 13:10:45 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQVNj63gqz6f1RL for ; Wed, 27 May 2026 13:10: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQVNj2ZPqz4BP6 for ; Wed, 27 May 2026 13:10:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779887445; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TTcovKmYntAG+iHrXSuA8ijAJSC58ZAT5tWxCtbtusM=; b=iLiZUQJeVEqmDm8oHr7wqS9VJVhzeTStyueO2QnGYmVDVRhRiUY/RX0Ses8Pr2VCbXBaXK tiB5I5+L0KyD8DraIa37TfflOFqHF6R7zFV9kRvjzrQGb5UZ1RtCOCp5QwV0IkYbQZS9yP 0/faPkYma8pLAop44vcVHtfU7fcC87X5VtO5zon3zEhRca0SUcdtml07E31vgjAMf8VD4c mAyvFn9GUamWwnLojO7VDywyIi70dBmQJoIQTbSy/82QHzdM2xTbe2CIE2Gyt50cmSk/Lh JmaZa1hayR9jBhaIK3zyVhVi1kU4LrO7k5lVeQE7sKLsX3r0P8fif54sbRv+EA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779887445; a=rsa-sha256; cv=none; b=nQjcaw1nGBpa0PLvZ4U7A8oz9MFcYmAdq/HJmCzpw/6X34x5igbivmh2+jG8EGK6hkTFmS ZSE5KqmipgUtGq0p3i9TOIPpPJyIuMbhpN9xu2ytl2jEaJdhDW67j+PAO1zxhaxHDSlTF7 hm89a1vGYxaRq4Eq7seXWNT0UxWtXXEVw+KgfKOj22qkfd2ehUr9UBL//2FTdE8GDc5aRy rIASxxrVBaRCkvXzjnxRIhXvoLNUfcItmbV8k9+yrNOzKHQ9MvaR1hkqbboeGAhAwWlpvs ss/bDt2cPlb7EXPkZ/QRvTl+zNr/YYRyFSnIuK6Iz5xsv8v9rBLQul3r+ubySg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779887445; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TTcovKmYntAG+iHrXSuA8ijAJSC58ZAT5tWxCtbtusM=; b=wJfiuhzcnQ8YgzULI6sIvUgRe4fI+MEFex/2moThd2Xy18ljf2h7PXTyoxW6pnVEYRR9yd kfVu7+VjkANHQ3yjfmocWWrkHrRg1BrkDXeKHixyOTePoY9BoN0OgdA//fGjQOO/aKNHZi Aw8Lm4E2mo2DBrW/y2hjCZ8g2pACSRFeVzW2g2CcrSAKVQ2mYCYDDocx42dEk1upuTnLfo 15fcxG38DHnuzyKhd47wpMeogqE/0GNiLetuhasfVHrRr6YMnRufDFakae+raKURQ3x50K uUQDUb/VmrV4ZVQbZkD6jbYFOVSO/OCM7sznCC6v/oRFr7z9jq6djKCt7DcTTA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQVNj11Sgz11Fj for ; Wed, 27 May 2026 13:10:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 18510 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 13:10:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: e9346d1d1383 - main - login.conf(5): Add missing resource limits List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e9346d1d1383e8c1dced50a3aceb28edd5a4a5e2 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 13:10:45 +0000 Message-Id: <6a16ed55.18510.4befb2c8@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=e9346d1d1383e8c1dced50a3aceb28edd5a4a5e2 commit e9346d1d1383e8c1dced50a3aceb28edd5a4a5e2 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-27 13:10:35 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-27 13:10:35 +0000 login.conf(5): Add missing resource limits While here, reorder the table. PR: 295618 MFC after: 1 week Reviewed by: olce Differential Revision: https://reviews.freebsd.org/D57258 --- lib/libutil/login.conf.5 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/libutil/login.conf.5 b/lib/libutil/login.conf.5 index d4bbc1d67780..9b136291dc1e 100644 --- a/lib/libutil/login.conf.5 +++ b/lib/libutil/login.conf.5 @@ -17,7 +17,7 @@ .\" 5. Modifications may be freely made to this file providing the above .\" conditions are met. .\" -.Dd December 15, 2025 +.Dd May 27, 2026 .Dt LOGIN.CONF 5 .Os .Sh NAME @@ -194,17 +194,18 @@ login environment. .It "cputime time CPU usage limit." .It "datasize size Maximum data size limit." .It "filesize size Maximum file size limit." +.It "kqueues number Maximum number of kernel event queues." .It "maxproc number Maximum number of processes." .It "memorylocked size Maximum locked in core memory size limit." .It "memoryuse size Maximum of core memory use size limit." .It "openfiles number Maximum number of open files per process." +.It "pipebuf size Maximum size of pipe buffers." +.It "pseudoterminals number Maximum number of pseudo-terminals." .It "sbsize size Maximum permitted socketbuffer size." -.It "vmemoryuse size Maximum permitted total VM usage per process." .It "stacksize size Maximum stack size limit." -.It "pseudoterminals number Maximum number of pseudo-terminals." .It "swapuse size Maximum swap space size limit." .It "umtxp number Maximum number of process-shared pthread locks." -.It "pipebuf size Maximum size of pipe buffers." +.It "vmemoryuse size Maximum permitted total VM usage per process." .El .Pp These resource limit entries actually specify both the maximum From nobody Wed May 27 13:17:35 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQVXj6VMNz6f2C5 for ; Wed, 27 May 2026 13:17: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQVXj26qvz4FwK for ; Wed, 27 May 2026 13:17:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779887861; 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=5qXWO/o1DFOwn6sP9KTIf9AKTiWILjfvsvStw3xB/eI=; b=g/h9vjfHSFowBmSA0/6vO5hCrBo4gq0Zfmll0A/BUlRTP+dy0NGu+M4JsHAFVAKLGAVVMI 1jsrG0UwPU9xwjwFOXEyyBCnVVOWk6+FD/XwOrAGYyrlGjnW9njakkv4za2sxYaZdZUV1R 00oFigqxqGoiC6oAF022mZUk9MzBpLJGHVmgKcJ7Ch/lGv8m3x8VrX8QWD+alOkpLC6tcS 4uAKvDoLP80kBRTZCxQHh1zDu5TJW33PnmJ17c9G+yt9cbV+Nvy2WDt5hgcT1V39lnmh2A xu+D+I0ZvsyM/0nldu9UhjerUmxHi8OCiC4QHoepHtTp1I4zV/evcbm+mrHRHA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779887861; a=rsa-sha256; cv=none; b=azFAuQNiQy/YpazFjHy1/cHrVjJFVaraKPweND1VsZVaRRizjn0MTBB/8wDNfTUdS7Wys0 TTHuIpPg8Pr3mPo1oFzW8BavuJj8mg5ZwvApRrAXDavKktcMhL4NmtO5BxQWRu9vzqT16u xglDVgXLRvCdlR1jgW9l3JmctjKtLaevJGknRbTCOqaUFi4vB2g2feAp0+nkIkTbRm4qVz N6g93zzRWhurGa222ZUNCgSzTVfLArbPGthI5VC0qi8cWIMsTMlUbuX7S+XHWyRREiFJ14 slWvR6NyUxoY9Rss+Hr3L+rUtTlqUCXVUWKrvCc9OpXChdd1pSsv7Pr7LiJsbA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779887861; 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=5qXWO/o1DFOwn6sP9KTIf9AKTiWILjfvsvStw3xB/eI=; b=PrnqgBHpb24OmaxfWFWR2Jn7ysmFtWUrCkSHJdKpeG78GDIhwoXi0Qc+jtYSnLZyWy5b3t 9NHVegGmwSb8Po1652m2LN9Ok5eax5cJ/KyZnzHUrPbTN/tfXKOdvL3bN8xqMIknWxHATd gfYQsgXjdC5T4jcRdqX2Eho4LWnHXbS1G4Iznh58R1a6kcaZb1dlWeCEMXm5tYmvBpX4rb Kw9qTMy4/lZApT1FZzDh3M4FnPMRJ1XlODe16epmhkWZp1zW6LLee2om4TK/Vgnc7ujrKt SKU7jNhA9VVVRHdsxbiT2durvEKe61AyeSIR45UekHuKrrrE6mqlz+BgIRmaqQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQVXj1YJSz10lF for ; Wed, 27 May 2026 13:17:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 475db by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 13:17:35 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Mark Johnston From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: bd15d6ef126e - main - libarchive: Force GNU iconv compatibility on FreeBSD List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bd15d6ef126ee4c0eac931117f6bbbf6f9a3fc72 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 13:17:35 +0000 Message-Id: <6a16eeef.475db.2283bfa4@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=bd15d6ef126ee4c0eac931117f6bbbf6f9a3fc72 commit bd15d6ef126ee4c0eac931117f6bbbf6f9a3fc72 Author: Mark Johnston AuthorDate: 2026-05-20 16:39:40 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-27 13:10:57 +0000 libarchive: Force GNU iconv compatibility on FreeBSD When libarchive is compiled with FreeBSD's native iconv instead of libiconv, as happens with libarchive in the base system, we need to configure iconv(3) to handle invalid sequences by returning -1, as iconv_strncat_in_locale() assumes GNU iconv semantics. This corresponds to upstream PR 3056. PR: 294577 MFC after: 1 week --- contrib/libarchive/libarchive/archive_string.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/contrib/libarchive/libarchive/archive_string.c b/contrib/libarchive/libarchive/archive_string.c index c6ae8968d54f..4fb96a9fa178 100644 --- a/contrib/libarchive/libarchive/archive_string.c +++ b/contrib/libarchive/libarchive/archive_string.c @@ -1314,7 +1314,17 @@ create_sconv_object(const char *fc, const char *tc, else if (strcmp(fc, "CP932") == 0) sc->cd = iconv_open(tc, "SJIS"); } -#if defined(_WIN32) && !defined(__CYGWIN__) +#if defined(__FreeBSD__) && !defined(HAVE_LIBICONV) + /* + * FreeBSD's native iconv() by default returns the number of + * invalid characters in the input string, as specified by + * POSIX, but iconv_strncat_in_locale() assumes GNU iconv + * semantics. + */ + int v = 1; + + (void)iconvctl(sc->cd, ICONV_SET_ILSEQ_INVALID, &v); +#elif defined(_WIN32) && !defined(__CYGWIN__) /* * archive_mstring on Windows directly convert multi-bytes * into archive_wstring in order not to depend on locale From nobody Wed May 27 13:41:43 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQW4R6rCVz6f3s7 for ; Wed, 27 May 2026 13:41: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQW4R50w1z4Jlw for ; Wed, 27 May 2026 13:41:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779889303; 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=WQw3mMCM0Xnv1Cy0xmlFiD0XnKAz+1A1evRA72g692s=; b=ixfNjFFk12L2iHirU4AZLZ1cLyXDMLSQpwbeT1gKTBI3V02svW9p2sNOGfrh2MB9xUXMWy HUMLpQt7cNIkVPzTuN4NUp4LnTIiqgHfMvI3owvXI9I7uKAmCwarKFDScBQ/sddjO0/jL+ EomLrEIaOvmQW9nC9hm4J0sAbKyxDluyhA5qNB6kQ0Yoj2rFmGPI3pxdRRa9e2RDUDR2eD 7gs13mMITjQKVT/lJ7bWXHH4N8VA2GOhrYgUJaWP5GLkmbieqz5HGiJQYfjdBuWSYV/LoD 4vu4pPPMUwB5ZvZvoyiPm9/ACSbjWhT9ZvOVrsyBKcvdRHeE/TV99UONKeJkSQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779889303; a=rsa-sha256; cv=none; b=kCZ4crb/DJfGDkJKiJss5l6Xqj0qKH1R6h5lI2ajDQDc2GnakrzvNuiFw3SUw7n+yogHEk kvvjrtUdktDuRmTt38aVsF1z5w/jB7Si0rwcFUqKc9jWnV0OVgYQYzKSo905mI0FdIPzF8 3jZfd6nwTx5EgKxE2r6JSy0P+QO/chVIScZdgZARuDvdCMYd0ag/0IVIrlFIp5J6w7wkBT MHIEzSbaOFZ/Arz6Jc9XRay8TfzrfnOvEtis0aOdD1YNifyJ2hc9EKIIoXFDGnaRYDt87n l5wMtVaxCqnxME6CrdyRTxnxsYoRWey2S+N5o4otxntmvHoHMxNBYqKn97tKsA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779889303; 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=WQw3mMCM0Xnv1Cy0xmlFiD0XnKAz+1A1evRA72g692s=; b=wtY8nPQ/Nvpw+rGMuFYY6dEYVf8xPNieJxqe8OJPYhLJA9cu2KtMO9c9doqyZVbgXP4Pyk Hc719LgVeWX8bI2bcvjcg8kQif3GSEZha3jj3D4bEKr/mkd5/sx9kNG8BEJf75ywqEt1T1 HRcYJilben+JNG3NwGlFzjddNGT9DIVDe2W47trqchxFjtt5M8Ezo78vyQf5upe+xy0Kpi VQ7n82zWKzwaLwvzwpfUxAUMCxlGIiLJlYTeqCcpQ0hEpeByOhwhprsQ1DbrXXokIS8i6t 2CU3oLUWjPHJG7QYV6Vq86UTsfgPNA/vtQYhmSO9H/tqtnTQj1eZW3p5pqPQgA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQW4R4cZ3z125c for ; Wed, 27 May 2026 13:41:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1c535 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 13:41:43 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Teddy Engel From: Cy Schubert Subject: git: b2076f39a117 - stable/15 - ipfilter: Add NULL check for fin_dp in ICMP packet handlers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: b2076f39a11723506f202f980fda281af3448bf4 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 13:41:43 +0000 Message-Id: <6a16f497.1c535.72b4fc66@gitrepo.freebsd.org> The branch stable/15 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=b2076f39a11723506f202f980fda281af3448bf4 commit b2076f39a11723506f202f980fda281af3448bf4 Author: Teddy Engel AuthorDate: 2026-05-19 21:36:15 +0000 Commit: Cy Schubert CommitDate: 2026-05-27 13:41:25 +0000 ipfilter: Add NULL check for fin_dp in ICMP packet handlers Add NULL checks for fin->fin_dp in ipf_pr_icmp6() and ipf_pr_icmp() before dereferencing. When processing packets with IPv6 extension headers, ipf_pr_pullup() can succeed but fin->fin_dp may still be NULL due to extension header processing leaving insufficient data for the protocol header. PR: 288333 Pull Request: https://github.com/freebsd/freebsd-src/pull/2214 Signed-off-by: Teddy Engel (cherry picked from commit 68ed81631afa20c07883f7f60343f6da8397ee41) --- sys/netpfil/ipfilter/netinet/fil.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/netpfil/ipfilter/netinet/fil.c b/sys/netpfil/ipfilter/netinet/fil.c index 8acf37c4c81f..cc723eba4ffc 100644 --- a/sys/netpfil/ipfilter/netinet/fil.c +++ b/sys/netpfil/ipfilter/netinet/fil.c @@ -890,6 +890,8 @@ ipf_pr_icmp6(fr_info_t *fin) ip6_t *ip6; icmp6 = fin->fin_dp; + if (icmp6 == NULL) + return; fin->fin_data[0] = *(u_short *)icmp6; @@ -1198,6 +1200,8 @@ ipf_pr_icmp(fr_info_t *fin) } icmp = fin->fin_dp; + if (icmp == NULL) + return; fin->fin_data[0] = *(u_short *)icmp; fin->fin_data[1] = icmp->icmp_id; From nobody Wed May 27 13:41:44 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQW4T1JDPz6f3fC for ; Wed, 27 May 2026 13:41:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQW4S5cz4z4Jcw for ; Wed, 27 May 2026 13:41:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779889304; 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=RDhuDMO9jXRa+b6ZuE+gWa1AZmMIfdLZNYvC/4xncq0=; b=mclqrWtLkkNeWcHJKX98Q3XrpdshOqwWfsy8YFZY57SyCrKVvs25TG6pSvIrG/u6ZpJo4w Ll3HDL71oWfH5ggw6RoHg5mXSCPLdd0mCFusTEMtmb6f7817dRhtk2LygWBV8xnBUAz0gP /KgXpBVwHC3JFATdwqFf+MJ+COcWGIX3yXBCCJ+GRWQSHYnI6rX+APVBtDhrwKXfn6miGk f2B3p5jUpeVDVzVv0OU4ESW1HsU8HJmQlyxZIluYgyPab+1+G6FhdImZfgpp+HH3LuqMAH H9gHJl+c3Y13t3PxY5gs1Ao4i1P1ecsd3Ovkjt8hg/s7UMpMz45hvrl4lW+b9A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779889304; a=rsa-sha256; cv=none; b=pRJKMmqWwzMhnXd3cfJerGfDWoZv/cQhZgrGvLgPQmuKmNFbeKmXDMzDsJia+ejeyon+GQ bvgCEJ23muwcFkPP/CriI5uoreKp6uDcAHHFgNlINAw5UZtmGkn3dt5Z6IdSgZ2K+9TBNV VRAYYpch0Bx9G7751S2daGGIdhFfOl7L3ge0owZw4zynBAfr8T4R5KPhJqs5016zdUBGS9 4tPpez8FPn9oeOsoXsJcVk/xv3FmFdDQuhjvUVqCeeMKCTLpiC5dC9JUw6E23n558mikMt ZRtTmrlVgSVy4+dHgsHZpJzw0kc41YS/wai/jVDhwyx7vjTx5miwSXlD81JyDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779889304; 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=RDhuDMO9jXRa+b6ZuE+gWa1AZmMIfdLZNYvC/4xncq0=; b=X6x3Lc6S1IozpMHbw3FzzB4m9jhaz5e/PaIKoS2TLmFcZKuRLo59mjdcbPk2euihxmm+uM ZWDhEylw38pWnHfJW3LznVdCbPRUNLCygngFDbh/csqH+ZWgRU3evZ3EP+KxNttgCRXtxC TZNjO0tKSfk2nesqbRjpSt58COHIzPdqn1jg7mIQi0tammpqSJFnApDi3rmhI3QEsgMad9 eLCUOy8aRdPvq7hAfRzZgOP84e3ouqt2XGgklv0KqU2OfVZt68xDshYqG8P4NtYJgpuuWZ i6xxBnWGIPpBv60h4CN2yfQkz1RM9EZvpkMaBOMdU+ZQrS0RLR6RiyW70cWy4Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQW4S54Hfz11d1 for ; Wed, 27 May 2026 13:41:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1d680 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 13:41:44 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Teddy Engel From: Cy Schubert Subject: git: fefcd4994069 - stable/15 - ipfilter: Add NULL check for fin_m in ipf_pr_icmp6() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: fefcd4994069de7fe0d4f94f2f9f9d3e5ae47ba2 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 13:41:44 +0000 Message-Id: <6a16f498.1d680.749626c5@gitrepo.freebsd.org> The branch stable/15 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=fefcd4994069de7fe0d4f94f2f9f9d3e5ae47ba2 commit fefcd4994069de7fe0d4f94f2f9f9d3e5ae47ba2 Author: Teddy Engel AuthorDate: 2026-05-19 21:36:23 +0000 Commit: Cy Schubert CommitDate: 2026-05-27 13:41:25 +0000 ipfilter: Add NULL check for fin_m in ipf_pr_icmp6() Add NULL check for fin->fin_m before calling M_LEN() in the ICMPv6 error handling code path. When ipf_checkicmp6matchingstate() calls ipf_makefrip() with a synthesized fr_info_t that has fin_m set to NULL, the subsequent call to ipf_pr_ipv6hdr() can reach ipf_pr_icmp6() which would crash when trying to access the mbuf via M_LEN(). PR: 288333 MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/2214 Signed-off-by: Teddy Engel (cherry picked from commit cdc40489a7a617b742e295cf9005b3569b45e823) --- sys/netpfil/ipfilter/netinet/fil.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/netpfil/ipfilter/netinet/fil.c b/sys/netpfil/ipfilter/netinet/fil.c index cc723eba4ffc..2eb921621f6b 100644 --- a/sys/netpfil/ipfilter/netinet/fil.c +++ b/sys/netpfil/ipfilter/netinet/fil.c @@ -916,6 +916,9 @@ ipf_pr_icmp6(fr_info_t *fin) if (fin->fin_plen < ICMP6ERR_IPICMPHLEN) break; + if (fin->fin_m == NULL) + break; + if (M_LEN(fin->fin_m) < fin->fin_plen) { if (ipf_coalesce(fin) != 1) return; From nobody Wed May 27 13:41:45 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQW4V1xt9z6f3fD for ; Wed, 27 May 2026 13:41: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQW4T5wskz4Jjr for ; Wed, 27 May 2026 13:41:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779889305; 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=Ayg7sYNZFPZz03UuE7yB7EEuhWXnMeCZIZslL3DZxS4=; b=fdshHyq4whRekuuPv7RD6XQ54MGT8KpOrHENOxpsbVcq4wurfGiSHFybQn3sHaBLozLBc8 bTMu3qfPb7WPBBuvGm4a6f5O8o4Ul8WbOw3BFVNF7VjlYsZpXDuHtP9PFKpjHz1ieVZeop rq1s+I8dwuq97AgEr+q2o8nB8c3Se7P0Rjwqnht/Iz0WY3POkf9qKAMQifEQfAF/MkK7Ic VaASybqq500EVi6DEWOQQsuElKwQuY9UqHpx7VepkdmUWKfhBPeF0lqyBwXUzfpk8EMH4I r/I20PVHjxEZzENIhXofDl2qCaQaRe8WPDg7GI0jW3g6Nb1iwyhaUzksfhZa/Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779889305; a=rsa-sha256; cv=none; b=LpVZxyDN5OelhvF6Ocw9PkYlwD0s+xC9AmqeeBxT00Pj1iy5loN86GDc0FFXcbud4Zh4j4 5gVLIDk2P6BmV/F7RjBZIu1LyWSWN5RRzCwIigYEc3MiKamN56Sxv38TiHFJ1nYjyUDB8T 5AS48K2EEk+L3mWxLukBJn2N+K4yKoDUklXIrfg4HrlVFo7LdvCn4pwhE0+WWTozqfTQP2 jnA02HY7YDCymZoyDFUjJYt4Ar+0w6hRE4EHZO9xcAxFiGvYjgOOqTGGOv2G429rRgnVbt iKCLJdJCkvOkC9wLZFk5FDzUy0W3JvX9SLEKFzNz6ccqN+VBhpDKl4Jsw9/eCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779889305; 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=Ayg7sYNZFPZz03UuE7yB7EEuhWXnMeCZIZslL3DZxS4=; b=exH4VWqdw2D/A8/0pvHGauC1OLNz9CUJx+rghFFS2PWjUhjGTOUPUW+nBcOJx5o2M4kMjj +orMGSkC1WZ7Thg9j6NivK/tJxoACc42YnjeAN3vQnGG5D5sSWL58WSmE0DyrpHZKYIAtc wb+iEuq/1H0FUH2hDU5kMLR0BsuCVRwuV3aJlY4poyUKZcTp1XzNieEgJDtOXZKYn85+H/ 7Ut1lWuU1yLKeR/I6PTxaa5W42zGjHXOqnsnOEXJec+DRcqtRY8HvW8TXEKuak2dlAtVco YezGvpG8qNMf5zjjNvu7zElp4XkET9m8fuZ9mrkSnGCCNWH2Q7yZAQmzNVQ3fQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQW4T5W2bz11L8 for ; Wed, 27 May 2026 13:41:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1c80c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 13:41:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Teddy Engel From: Cy Schubert Subject: git: 2349f5a91587 - stable/15 - ipfilter: Fix NULL dereferences in ipf_checkicmp6matchingstate() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 2349f5a91587eaf00c02ae49b0471cf191bec73a Auto-Submitted: auto-generated Date: Wed, 27 May 2026 13:41:45 +0000 Message-Id: <6a16f499.1c80c.2202e9c1@gitrepo.freebsd.org> The branch stable/15 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=2349f5a91587eaf00c02ae49b0471cf191bec73a commit 2349f5a91587eaf00c02ae49b0471cf191bec73a Author: Teddy Engel AuthorDate: 2026-05-19 21:36:33 +0000 Commit: Cy Schubert CommitDate: 2026-05-27 13:41:26 +0000 ipfilter: Fix NULL dereferences in ipf_checkicmp6matchingstate() Add NULL checks for ic6 (the ICMPv6 header pointer from fin->fin_dp) and oic (the inner ICMPv6 header from ofin.fin_dp after ipf_makefrip). These pointers can be NULL when processing malformed ICMPv6 error packets with extension headers. Also fix the length validation: the original check (fin->fin_plen < sizeof(ip6_t)) could never trigger because an earlier check already ensures fin->fin_plen >= ICMP6ERR_MINPKTLEN (48). Replace with a proper check that fin->fin_dlen contains at least ICMPERR_ICMPHLEN + sizeof(ip6_t) bytes to ensure sufficient data exists for both the ICMPv6 error header and the embedded IPv6 header. PR: 288333 MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/2214 Signed-off-by: Teddy Engel (cherry picked from commit c028080749c09e68c555155df0e9f681ba63c6ae) --- sys/netpfil/ipfilter/netinet/ip_state.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sys/netpfil/ipfilter/netinet/ip_state.c b/sys/netpfil/ipfilter/netinet/ip_state.c index 8a21e7593995..774e04b36fd4 100644 --- a/sys/netpfil/ipfilter/netinet/ip_state.c +++ b/sys/netpfil/ipfilter/netinet/ip_state.c @@ -4364,9 +4364,13 @@ ipf_checkicmp6matchingstate(fr_info_t *fin) } ic6 = fin->fin_dp; + if (ic6 == NULL) { + SBUMPD(ipf_state_stats, iss_icmp6_miss); + return (NULL); + } oip6 = (ip6_t *)((char *)ic6 + ICMPERR_ICMPHLEN); - if (fin->fin_plen < sizeof(*oip6)) { + if (fin->fin_dlen < ICMPERR_ICMPHLEN + sizeof(*oip6)) { SBUMPD(ipf_state_stats, iss_icmp_short); return (NULL); } @@ -4408,6 +4412,10 @@ ipf_checkicmp6matchingstate(fr_info_t *fin) if (oip6->ip6_nxt == IPPROTO_ICMPV6) { oic = ofin.fin_dp; + if (oic == NULL) { + SBUMPD(ipf_state_stats, iss_icmp6_miss); + return (NULL); + } /* * an ICMP error can only be generated as a result of an * ICMP query, not as the response on an ICMP error From nobody Wed May 27 13:41:42 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQW4X4144z6f3fK for ; Wed, 27 May 2026 13:41: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQW4W6vBPz4Jd1 for ; Wed, 27 May 2026 13:41:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779889308; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AQ9+sQ+GAWizbuRirusVeYS325l8fvvezQ0vm9B/Inc=; b=AUdYj75lo14O/8KS8AQF5hjWIEjR+0j7DiRFx0lshNd5z2ItSU2xO0Q7j2OWbuqzTW3Dgq TO3XO2/PP5dpYaFmsKSQ7kFAdmAzt6gINAXamBuzN/n2g1uv8GKQfH7D97pF9ZYNCnVma5 Q4t08yCgtZNUk6R6T2mvxcke8cbm7WtatRoCZdJnvv6WEkO5n3Y3Sc3jL+quXtydVK5VRo xm/zLXV6UUSVI6r9sHWWcW2Cmc0JhdgACNFfKh9Wc26DY+N/oOw/qroOJSDuRB5LvNMfVN tvtJroKjeg9qbyYeX9i+Rd/VY/fB5Q0KDY5sHE3FQ5RnFxVtmN0ajZQNT9gkig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779889308; a=rsa-sha256; cv=none; b=HiB/dytFdHTu8N6Q78VmDEKaLaUhABy5pCuJ7qMbo7JGoD5iQI3v/bh8Mk2OeiPCKdaufE UtsPCgjAwmJ3h3s25551g658/AZtRA/kFEJeXEaNI9MmubneYMLUnJqO3QvAd13L4OfhCV 04Eika+IExWeOXN/J7B2H2CPPhg1El4lW8wZboY04jU6UYACufGJ09t9RJjqTPPur6dOaq bzCN+nTKVaSV/eY2gAUw26DWytqaHlVx9aj+BIKbrvKKF2q4lfTpTDqA/+lL7VTDcAAEBm BdTG05vswPU8HC2dXrXZ6Edb840raOqcjsdqgl5+1Zs3pIkNz7m/x9n844MjRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779889308; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AQ9+sQ+GAWizbuRirusVeYS325l8fvvezQ0vm9B/Inc=; b=E1+Rti7nKTvVDQ6qGUc1POW1O33jSRDEOsAro2+5uGBXbLT0CXj5ODJ+qBSom+uzDk0oVl vXyDe/XVr4OrbQv6CTU9xP18MdaSMsqoxrTDtM8s+JAUTL/MXWFvzJmf8v7+fRKO+f01Jk PEoJwxo1Z6SHy7w/T/n+wkzeW3Bw7qti/x5WG4lQuzN05Zadp4XBnFZxIa5DBGNtHRkCPL iL7o6MhqDgv3XqfuaP4XqiLrpk7JM0E9p1wAHer5Co16RVELUKGY1iXzKEz6igJvE0E+Gb WihOM8/0tKtc4ryICZ6JyFwXyfrsgFbZHcBkH2WyNCEi9p7upAuSV1UnIxFLnA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQW4W5zGyz11LB for ; Wed, 27 May 2026 13:41:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1a1da by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 13:41:42 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 77dd10b2408e - stable/15 - ipfilter: Validate length before checksum List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 77dd10b2408eced1ac9eb63e27658491bf3ef701 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 13:41:42 +0000 Message-Id: <6a16f496.1a1da.4f0a585@gitrepo.freebsd.org> The branch stable/15 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=77dd10b2408eced1ac9eb63e27658491bf3ef701 commit 77dd10b2408eced1ac9eb63e27658491bf3ef701 Author: Cy Schubert AuthorDate: 2026-05-11 15:44:52 +0000 Commit: Cy Schubert CommitDate: 2026-05-27 13:41:25 +0000 ipfilter: Validate length before checksum Validate the length of the packet listed in the mbuf is the same as the calculated packet length. If not reject the packet and bump the bad packet stat. PR: 295198 Differential Revision: https://reviews.freebsd.org/D57095 (cherry picked from commit 8dfb0805fc31cd78940429ab0560dae7e8ab6536) --- sys/netpfil/ipfilter/netinet/fil.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/sys/netpfil/ipfilter/netinet/fil.c b/sys/netpfil/ipfilter/netinet/fil.c index 09640623fdf2..8acf37c4c81f 100644 --- a/sys/netpfil/ipfilter/netinet/fil.c +++ b/sys/netpfil/ipfilter/netinet/fil.c @@ -1991,7 +1991,7 @@ ipf_checkcipso(fr_info_t *fin, u_char *s, int ol) /* ------------------------------------------------------------------------ */ /* Function: ipf_makefrip */ -/* Returns: int - 0 == packet ok, -1 == packet freed */ +/* Returns: int - 0 == packet ok, -1 == packet freed or bad length */ /* Parameters: hlen(I) - length of IP packet header */ /* ip(I) - pointer to the IP header */ /* fin(IO) - pointer to packet information */ @@ -2019,14 +2019,23 @@ ipf_makefrip(int hlen, ip_t *ip, fr_info_t *fin) if (v == 4) { fin->fin_plen = ntohs(ip->ip_len); fin->fin_dlen = fin->fin_plen - hlen; - ipf_pr_ipv4hdr(fin); + if (fin->fin_m != NULL && fin->fin_m->m_flags & M_PKTHDR && fin->fin_m->m_pkthdr.len < fin->fin_plen) { + LBUMPD(ipf_stats[fin->fin_out], fr_bad); + return (-1); + } else { + ipf_pr_ipv4hdr(fin); + } #ifdef USE_INET6 } else if (v == 6) { fin->fin_plen = ntohs(((ip6_t *)ip)->ip6_plen); fin->fin_dlen = fin->fin_plen; fin->fin_plen += hlen; - - ipf_pr_ipv6hdr(fin); + if (fin->fin_m != NULL && fin->fin_m->m_flags & M_PKTHDR && fin->fin_m->m_pkthdr.len < fin->fin_plen) { + LBUMPD(ipf_stats[fin->fin_out], fr_v6_bad); + return (-1); + } else { + ipf_pr_ipv6hdr(fin); + } #endif } if (fin->fin_ip == NULL) { From nobody Wed May 27 13:42:09 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQW4x5CtQz6f3sg for ; Wed, 27 May 2026 13:42: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQW4x1QC0z4KSS for ; Wed, 27 May 2026 13:42:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779889329; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hzA0QEcPlogIKkJFf6hrd2PUuP9YrBT5/KKWcAHL5fg=; b=AZcLIQEAcFDClz2iPVWhMqbF0tm9gUTj8fvITh8YWzcoCogKcVzY0Wl0suSU8genGrtBc8 3s4YNXy3qeuCvH7ifMEarYXuIZmrtqWhp3+PDN/Hqtj1zz7U2qQexaEvE3GGQ+kRVzFg4Y YZ9kTm0Jrt+R/TSATtvelUHV/KeiyTT0t88fQgziFLi3cVfkCvgVHCC0zwlWuklswWIMS6 /im5Jao0FzjtLfnt+DFI9qPQLtLbFr+ElR1yS9DKn3voc+JU2LrQnqzIxMlxPQL9Obxv8C CLvbgViU+Roj67H4TmUUsLjRFPjE/BGE5NCQtgKvbOYKmLEUeoJ/n6JxSBUm1w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779889329; a=rsa-sha256; cv=none; b=E//xPbnXSIH1EhPuA9jLZfVPtwL6VEi3KM+X2eMaL6JDjYmQQ+aZxIpSR4rivZKhvDIkMu GuxRdNL6xnFG/Xy/QCBSaAu/ZdEk9w09YRtTaDPH2S3ka5HEu83uexmWI6O8gCHNkVkTln dtgHKPbovJS9u3HdNTmzQOsAqjKim0BNTr3X9HBV9VQspscpU86HuNXdLjIFvn5jAxoMmY YS0McTLp5Mn5Ma0f778nwYg16KnZjRCdZmrPHdXGW3b8WELBKqrZs9G8hh/PPV3Qyf6d8s x5GpCFfTD6twj9pniXjwoAfAQa4/Rxh52Eq07PXLwHVHiR4NVGtH5Ga/OYzfNA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779889329; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hzA0QEcPlogIKkJFf6hrd2PUuP9YrBT5/KKWcAHL5fg=; b=RbcSkU2NwQBVXRHByqj7UDMKyu42nWJpY7ro/Djr3tX66UQ2K9D3aI5r8Qp8Yo8mS8G+To hdHr8d29Sn93b6LxDGF9+L2gb2ZFMgNb6uN89t6+4a+FkNysMZwfyzI3J0qi7zp+ilfCii hyJdYB/FzNrzWnyfTWsxyC+tDlUFCyw3fOeStE3ivYTe4n2lvWBgw4ea+mwBgcWn7F50pd WZVxTDiJWqZXHA4sZCCj4XOYrswaRwORT5akvfbLJiO8MFGUYmEpilRP+dGUBByyTkUkbp MuU08jmVcuiCLQTgoMA85hWDj2IkIsajf0SZmh/+BXXXon5JkJNPIcUmShw4RA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQW4x0gf5z11LH for ; Wed, 27 May 2026 13:42:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1d687 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 13:42:09 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: f296b1fd3e9a - stable/14 - ipfilter: Validate length before checksum List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: f296b1fd3e9a00835988215118d8d8b996f3c02b Auto-Submitted: auto-generated Date: Wed, 27 May 2026 13:42:09 +0000 Message-Id: <6a16f4b1.1d687.344d07b@gitrepo.freebsd.org> The branch stable/14 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=f296b1fd3e9a00835988215118d8d8b996f3c02b commit f296b1fd3e9a00835988215118d8d8b996f3c02b Author: Cy Schubert AuthorDate: 2026-05-11 15:44:52 +0000 Commit: Cy Schubert CommitDate: 2026-05-27 13:42:01 +0000 ipfilter: Validate length before checksum Validate the length of the packet listed in the mbuf is the same as the calculated packet length. If not reject the packet and bump the bad packet stat. PR: 295198 Differential Revision: https://reviews.freebsd.org/D57095 (cherry picked from commit 8dfb0805fc31cd78940429ab0560dae7e8ab6536) --- sys/netpfil/ipfilter/netinet/fil.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/sys/netpfil/ipfilter/netinet/fil.c b/sys/netpfil/ipfilter/netinet/fil.c index 2b81af276cb9..2c9a0732da1c 100644 --- a/sys/netpfil/ipfilter/netinet/fil.c +++ b/sys/netpfil/ipfilter/netinet/fil.c @@ -1995,7 +1995,7 @@ ipf_checkcipso(fr_info_t *fin, u_char *s, int ol) /* ------------------------------------------------------------------------ */ /* Function: ipf_makefrip */ -/* Returns: int - 0 == packet ok, -1 == packet freed */ +/* Returns: int - 0 == packet ok, -1 == packet freed or bad length */ /* Parameters: hlen(I) - length of IP packet header */ /* ip(I) - pointer to the IP header */ /* fin(IO) - pointer to packet information */ @@ -2023,14 +2023,23 @@ ipf_makefrip(int hlen, ip_t *ip, fr_info_t *fin) if (v == 4) { fin->fin_plen = ntohs(ip->ip_len); fin->fin_dlen = fin->fin_plen - hlen; - ipf_pr_ipv4hdr(fin); + if (fin->fin_m != NULL && fin->fin_m->m_flags & M_PKTHDR && fin->fin_m->m_pkthdr.len < fin->fin_plen) { + LBUMPD(ipf_stats[fin->fin_out], fr_bad); + return (-1); + } else { + ipf_pr_ipv4hdr(fin); + } #ifdef USE_INET6 } else if (v == 6) { fin->fin_plen = ntohs(((ip6_t *)ip)->ip6_plen); fin->fin_dlen = fin->fin_plen; fin->fin_plen += hlen; - - ipf_pr_ipv6hdr(fin); + if (fin->fin_m != NULL && fin->fin_m->m_flags & M_PKTHDR && fin->fin_m->m_pkthdr.len < fin->fin_plen) { + LBUMPD(ipf_stats[fin->fin_out], fr_v6_bad); + return (-1); + } else { + ipf_pr_ipv6hdr(fin); + } #endif } if (fin->fin_ip == NULL) { From nobody Wed May 27 13:42:11 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQW4z75FPz6f3lZ for ; Wed, 27 May 2026 13:42: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQW4z2yGXz4KDy for ; Wed, 27 May 2026 13:42:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779889331; 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=X9lZd9PEueYmbbQ9f94wxZ0KIkQaliH14uzy0oDMPMM=; b=q+8m3GiQALTzuylPFHffYhqxVYRrNY/MaT1qD/wG0BN5vou1w8LZ5N4YLpS9MrcdY2oD2Z rDZzg/+ek4IZetrCIwPONXpqK9S7apUvq66WI87a98q6Ef48dX1PIFMk8NTZa7VVv0uR6Z 8BpRhT/Kmv4Ae9IreppMCS7OZldPWkGD+tICXicEQLqzNaKRWs6eyOroSQ44WAgK2VSdxk dFw6JrCQq4Lr0emQosLgq0WtenvMNpFZkO0ufEPBMaS7AkWcp8Ub0OJxIzczkoXvo0zPjs XeZXdPuJFmFl0nGMg7l6DqHfVquddlQzyaN3HQ30RNmly81hPHiDuXhL48nkTA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779889331; a=rsa-sha256; cv=none; b=KqfEzajdqmUfaXMnXkB3NEiAHgw1kF4Yj5BcCsAzDbt3d+xaF/7drcs2IkRLGtufryAMLj KonwOb+u0L3+wvLZuerXcxvdbPhxjb4OrUZESCLXsEZK7EvoQ4b9oTYVW4l8DvUR1YfXro DWZ48hbsjkfXE+IAUTW+2ucSJyV9E2jxcyY35k+LfwgxxztI+zWDGFC5/0VvYeY7qtiNSy kc7nLPIR/t+Gyudu3/YLEsGU7qKx80KtyUb0ktydePYMUQIS37adxAij6sY4yILY3IzJ68 GmuMw1A0mJ1gyCFePFRJ8No4jmMcWhVLmNg6nYsTJRK/muauNaIoSrLmquCMOw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779889331; 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=X9lZd9PEueYmbbQ9f94wxZ0KIkQaliH14uzy0oDMPMM=; b=azPb7EK+fKhtmXU43aTbgngpSDRUhIP9hykU03dKEIcJkJLSO57uFzdGJE+K+bP8So9Npc tCh2ogFYRC77iEMneALFIO5gi0JC2Bttb9EOuLjz7egAB3TFf/xpvI3y7asng1e8e/c4v2 oT6/loCGgLNpbimqqCyCEDlw38aMStjNnipiZvKSIkvgnfzjR8HUR2EXveKgDVsQnLbYVU 7D4S8w7DD7CK/YhyHdIAgyHMqldpArWkq0VG0EgU6/ZVb8UakIyU4pc1KrC5qux7KVeRF9 A1i4F1GHMntEC7iJfQTZ2C8vx/2FdsjtAaS9gGid2YLy3S9ksMaV0RIq0j9HXw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQW4z2SN9z11q1 for ; Wed, 27 May 2026 13:42:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1c5b2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 13:42:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Teddy Engel From: Cy Schubert Subject: git: a98f5fa64217 - stable/14 - ipfilter: Add NULL check for fin_m in ipf_pr_icmp6() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: a98f5fa642171f1ec89a4b13b23e0fc1c180b663 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 13:42:11 +0000 Message-Id: <6a16f4b3.1c5b2.5b709294@gitrepo.freebsd.org> The branch stable/14 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=a98f5fa642171f1ec89a4b13b23e0fc1c180b663 commit a98f5fa642171f1ec89a4b13b23e0fc1c180b663 Author: Teddy Engel AuthorDate: 2026-05-19 21:36:23 +0000 Commit: Cy Schubert CommitDate: 2026-05-27 13:42:01 +0000 ipfilter: Add NULL check for fin_m in ipf_pr_icmp6() Add NULL check for fin->fin_m before calling M_LEN() in the ICMPv6 error handling code path. When ipf_checkicmp6matchingstate() calls ipf_makefrip() with a synthesized fr_info_t that has fin_m set to NULL, the subsequent call to ipf_pr_ipv6hdr() can reach ipf_pr_icmp6() which would crash when trying to access the mbuf via M_LEN(). PR: 288333 Pull Request: https://github.com/freebsd/freebsd-src/pull/2214 Signed-off-by: Teddy Engel (cherry picked from commit cdc40489a7a617b742e295cf9005b3569b45e823) --- sys/netpfil/ipfilter/netinet/fil.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/netpfil/ipfilter/netinet/fil.c b/sys/netpfil/ipfilter/netinet/fil.c index 7d2b21775be9..ebb1d3cd0746 100644 --- a/sys/netpfil/ipfilter/netinet/fil.c +++ b/sys/netpfil/ipfilter/netinet/fil.c @@ -920,6 +920,9 @@ ipf_pr_icmp6(fr_info_t *fin) if (fin->fin_plen < ICMP6ERR_IPICMPHLEN) break; + if (fin->fin_m == NULL) + break; + if (M_LEN(fin->fin_m) < fin->fin_plen) { if (ipf_coalesce(fin) != 1) return; From nobody Wed May 27 13:42:10 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQW4z22yzz6f3mc for ; Wed, 27 May 2026 13:42: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQW4y281qz4KQ9 for ; Wed, 27 May 2026 13:42:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779889330; 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=+7YTNfIjT+ifzR4wDfmXq3VLKnEk4N5Rp6H0JtuGX6A=; b=sLiN1ViyTnOwTo3atYlbhNR6uaM3Tvc7/V7KpzXA1CFYJ1g4Yy6TOFy6jPnVQFrsGKUTQ4 qn28nEahfMoLt+6a/Kpgk0+mbIkDV+1KJ+iVUZAtko8zHTdO2uVfsHgS/nUhC4XcZ9N2Ji sOsdzyqkL3pcPptgWAaxYnMH61nwb1/t52E5cm2Gd0XJX1i0tjqtNhJVX+pzgCSNtyB6zB q1cxYg9uDfOzZ2qmEaKqLePacoZKidFOnvlKsz518po4d5kDEhG/bkoM127QEfxQ+4jeC+ C6LQzus3jo7a4eENoL6LC/qS1qTY/n+QCRBcVm1iFzD4iRxDR4FgjbbfMAUtAw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779889330; a=rsa-sha256; cv=none; b=FpIrZQcNpGz8E1biXShaWQN/nDZZqoxyMZEIKwE+zO8zIpufTOMduMUx5B76axvO6o+S2W gtlI+/ccJwZwao0FjLpMo81dwJE7SutMB+y5sfXDtwXTYA5+Sl9t0IBUvoerq1VXDuLkHw 1hLZ6Ucx7vMpgGYI5I/2nowpgKb/vALP0wutlhgyPQO//v1PIVC4SugmxWjec42gpBf0aw 0jx/qstZ8Huz+e39dF0RV1Wrv0OMc/oQS/z0/9FmMZFDkZgxWKzl8e/vCluo0P0jtp1Z+r uwDDW+x+NUGxALfRqHsLpHyPdVrV1DLbNiIhYmcZso5bm+P9n+B+wyQq/5RRyA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779889330; 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=+7YTNfIjT+ifzR4wDfmXq3VLKnEk4N5Rp6H0JtuGX6A=; b=IpBT0vtoHg06CtWzWXocPQH5lOV/lGIRnNiLATFFnf4EjhKCKgChkVMw02m2az1Q6YAgNh Nza8rqlC+7AFqqXx2E7fY85XCkfkB91SnTTOvYV1U3y8Da78dv+WeeGtnQ7edxWOJ+PtUk nEw/vXDNVyitS22Pivo6owDxJrWglKTto+ZfvhyExVXe7YJLxVmJshq7SZFKebg6p+HS4Q hH4dzwagd35N8M6VRLZF1DYd3n8c3/iUJq8u51wfNOe07kpdoGOBm/4jeSm3M8Euzx/oSw Z72I0GgiDOaLKyBwNqlGNcYYP7dHfcn/mIuQEXrKwsPpWYmvkUsVcEu7CNFZ5g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQW4y1Zpnz125w for ; Wed, 27 May 2026 13:42:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1d0bf by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 13:42:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Teddy Engel From: Cy Schubert Subject: git: fb0729bdc278 - stable/14 - ipfilter: Add NULL check for fin_dp in ICMP packet handlers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: fb0729bdc278d5402fc935998b5051d471c5380b Auto-Submitted: auto-generated Date: Wed, 27 May 2026 13:42:10 +0000 Message-Id: <6a16f4b2.1d0bf.a70a7b2@gitrepo.freebsd.org> The branch stable/14 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=fb0729bdc278d5402fc935998b5051d471c5380b commit fb0729bdc278d5402fc935998b5051d471c5380b Author: Teddy Engel AuthorDate: 2026-05-19 21:36:15 +0000 Commit: Cy Schubert CommitDate: 2026-05-27 13:42:01 +0000 ipfilter: Add NULL check for fin_dp in ICMP packet handlers Add NULL checks for fin->fin_dp in ipf_pr_icmp6() and ipf_pr_icmp() before dereferencing. When processing packets with IPv6 extension headers, ipf_pr_pullup() can succeed but fin->fin_dp may still be NULL due to extension header processing leaving insufficient data for the protocol header. PR: 288333 Pull Request: https://github.com/freebsd/freebsd-src/pull/2214 Signed-off-by: Teddy Engel (cherry picked from commit 68ed81631afa20c07883f7f60343f6da8397ee41) --- sys/netpfil/ipfilter/netinet/fil.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/netpfil/ipfilter/netinet/fil.c b/sys/netpfil/ipfilter/netinet/fil.c index 2c9a0732da1c..7d2b21775be9 100644 --- a/sys/netpfil/ipfilter/netinet/fil.c +++ b/sys/netpfil/ipfilter/netinet/fil.c @@ -894,6 +894,8 @@ ipf_pr_icmp6(fr_info_t *fin) ip6_t *ip6; icmp6 = fin->fin_dp; + if (icmp6 == NULL) + return; fin->fin_data[0] = *(u_short *)icmp6; @@ -1202,6 +1204,8 @@ ipf_pr_icmp(fr_info_t *fin) } icmp = fin->fin_dp; + if (icmp == NULL) + return; fin->fin_data[0] = *(u_short *)icmp; fin->fin_data[1] = icmp->icmp_id; From nobody Wed May 27 13:42:12 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQW512sL1z6f3mg for ; Wed, 27 May 2026 13:42:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQW504Y4bz4KKq for ; Wed, 27 May 2026 13:42:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779889332; 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=1QBxQ7EojWaNwxzDztEBgzb998yIRJxhJ/OKFcBTCDc=; b=SlE7bYObEcrOwUlO3xzcX+huvlazSlDZs1ZCfdcBK8psUzoOTIdmfW9M6Ya2WOGJSjSDs9 qx2Rnhwz4+QrxBJ3vwumWV7Cp8w+4Bx9bPe23jB8gigsTB2PVy+qFdwKaZXfGlslEbN0vj BYKbDHBozWYTerjqhRNqVxZsFTaJnEortEJ6VpBQAl5pVB+OBx90P0U/vU7BA1sh8scQIp jTQkn4SOCNyo4EQtZ7cnbv/2ywsD78Hf79wPF9w7oxCD68HwQf9SuHZJCeYgT7je7B5n78 VbikgUS70je8vjmw+6nnM2ztEjoidIN1jKC8FAkG4gWFJu04CLFFLHK1O5/nmw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779889332; a=rsa-sha256; cv=none; b=YOEcdahcWssUVPyKGfcbCnRHZF0PRlIMUat5tP9ysNAc29cHf6fHO1xJycCrQGV5bhKuia BV5YMffZr05fiRc0cdm71LJoN+aj5KPQCgO06uXJBIPZBEKhHcFF8jiNa9lPVpmj+/NxeI I86u6w+rbjgxApfbyHydAJelzKti/tg/e9tPRwY5wP4BWg5y8+iBNtA3uUugqcyBtP4Pj8 3rHLWSyV2Doz6kVlZNUXkW+f+3iqN3dKMRx1MAV01m0p4qEw2A3zpAZuHVhA8W9EvxrhkG dIuROFEZSb+dvEl0JKdwCWUsBoQk98IZaiLHSGoJ602+S4osLUuounNAux6KUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779889332; 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=1QBxQ7EojWaNwxzDztEBgzb998yIRJxhJ/OKFcBTCDc=; b=Al8wafYId8ZuAk6X4ffyconJaA3zGHtcXvO4phkSV7VGg1tdDwQXBAEe6bKJT3Uy927ipj EdFuFk+uDB1tD9qJ/F+p62LgEDXJ0KjNlsHLwj/PJha908msUIj7GddvcYR8DPDvQe7V7U 4WYRBTd/7zhgiovOA4RKOoK380JqMxSV+LIpAx13FW8lZOMlFy01pq+mZWHQlsRYxHZM12 N6VIxAIylXUlO0saY8BqSekqaHjr7vsM+7KrweWpdpwcC0LuKs/psooaEx1W3/vuIpW473 vnxgT0B4ikRPEVhl6XQvUdk16OtydmeYXWZMFsu7UKX1EpBugt6hZVWJP8q7Ew== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQW503C34z1260 for ; Wed, 27 May 2026 13:42:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1c814 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 13:42:12 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Teddy Engel From: Cy Schubert Subject: git: 36ab14d79529 - stable/14 - ipfilter: Fix NULL dereferences in ipf_checkicmp6matchingstate() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 36ab14d7952997b102ca07ae2b61590b52144078 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 13:42:12 +0000 Message-Id: <6a16f4b4.1c814.1af10b9f@gitrepo.freebsd.org> The branch stable/14 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=36ab14d7952997b102ca07ae2b61590b52144078 commit 36ab14d7952997b102ca07ae2b61590b52144078 Author: Teddy Engel AuthorDate: 2026-05-19 21:36:33 +0000 Commit: Cy Schubert CommitDate: 2026-05-27 13:42:02 +0000 ipfilter: Fix NULL dereferences in ipf_checkicmp6matchingstate() Add NULL checks for ic6 (the ICMPv6 header pointer from fin->fin_dp) and oic (the inner ICMPv6 header from ofin.fin_dp after ipf_makefrip). These pointers can be NULL when processing malformed ICMPv6 error packets with extension headers. Also fix the length validation: the original check (fin->fin_plen < sizeof(ip6_t)) could never trigger because an earlier check already ensures fin->fin_plen >= ICMP6ERR_MINPKTLEN (48). Replace with a proper check that fin->fin_dlen contains at least ICMPERR_ICMPHLEN + sizeof(ip6_t) bytes to ensure sufficient data exists for both the ICMPv6 error header and the embedded IPv6 header. PR: 288333 Pull Request: https://github.com/freebsd/freebsd-src/pull/2214 Signed-off-by: Teddy Engel (cherry picked from commit c028080749c09e68c555155df0e9f681ba63c6ae) --- sys/netpfil/ipfilter/netinet/ip_state.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sys/netpfil/ipfilter/netinet/ip_state.c b/sys/netpfil/ipfilter/netinet/ip_state.c index bfb9b9eb19f3..a22e19db15aa 100644 --- a/sys/netpfil/ipfilter/netinet/ip_state.c +++ b/sys/netpfil/ipfilter/netinet/ip_state.c @@ -4368,9 +4368,13 @@ ipf_checkicmp6matchingstate(fr_info_t *fin) } ic6 = fin->fin_dp; + if (ic6 == NULL) { + SBUMPD(ipf_state_stats, iss_icmp6_miss); + return (NULL); + } oip6 = (ip6_t *)((char *)ic6 + ICMPERR_ICMPHLEN); - if (fin->fin_plen < sizeof(*oip6)) { + if (fin->fin_dlen < ICMPERR_ICMPHLEN + sizeof(*oip6)) { SBUMPD(ipf_state_stats, iss_icmp_short); return (NULL); } @@ -4412,6 +4416,10 @@ ipf_checkicmp6matchingstate(fr_info_t *fin) if (oip6->ip6_nxt == IPPROTO_ICMPV6) { oic = ofin.fin_dp; + if (oic == NULL) { + SBUMPD(ipf_state_stats, iss_icmp6_miss); + return (NULL); + } /* * an ICMP error can only be generated as a result of an * ICMP query, not as the response on an ICMP error From nobody Wed May 27 14:59:19 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQXnz73bPz6f8xR for ; Wed, 27 May 2026 14:59:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQXnz6GgSz3H9t for ; Wed, 27 May 2026 14:59:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779893959; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RH5qab0ck7c3/bHCr3jlzmBEML+pr2jms9cAh5NPwXc=; b=MXhn2Lv5feNMknDCVmBLHUOzDyWRrs7bfyFtVj35yPQrv/Tm5c0A12KEipyNVPfPUMaxot NFM0u/PVjC3Uk0HcOguH2lZ/Z6RLz6dp21CGa1ptomuAjHnItfKDuVx8amg91ZOyRDGsEr dKUw9DzMVCrBWe3k8dP4PADW8zeZNtWsZoWDgX6k3bkbw94XRmWmSi9i7S6nY5dkPdLj2t u0KUoY+A+iCw0Zw2t+p3EIQOvGovkzQNMX6IkAw17mDadxR/t9ApVewu40+jCINOI3neCr T3weRjPfZV4ef7OQrzq8iNgxh4cOBt9C47ETZ1P22mXtjfhOixldjRu1KBfZvg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779893959; a=rsa-sha256; cv=none; b=Z3h6H5aCyXpm31mTsNJO6sBO65gMP1gr0DpFdV1MauiwBJCULISi3aVAzheOxneIHTW0Av nEk+hFPhruuRU1+6oysKbS/yoJHAaUBUOBY/O9HJnH2m+rwVWQXXEkwzde7mElWzRb8RDx vMEpRlob8rGFTMwp+fqUj8MvymfUGZCKPee0xYKpQ5wP6N6jvkJlYdIZc4gP1hXXIRd4VT JiPngTLVQ/v8aNmYONX/ZccPF0LzaEzUo8uvCVR3CYicUQT0HRLPgLOr6OOt/9FXpYmYSl dZVjTh6JCM4c3pmrV/rIVDe8VMQiUsT100DTlnOfQsp4mNhw98HNPPrD4JNkqQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779893959; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RH5qab0ck7c3/bHCr3jlzmBEML+pr2jms9cAh5NPwXc=; b=aWtm6AYSHI9y+L7zF+IKKRUr2AI0TyDce8v2/GoXj3KM6jBd+7QB70MBTsEcVnSo+nN+U8 ArA3iI3+4e0aRjv3G9DkNI5NxRWjvSQlHRTVx6aR5jsuw7dz3j+O3sjolOt+95FH7qqmrB rKN8Gq7cRALdECn/uEMRVYKpu9dFYWtdUDVTDMDKK3bPHTf76B23YLMCJ6ry092Ppycugs lHJ4XnKZMzu8o5ZvAoMVK0bUNzampyODZ9d3YykJzBfMVUdnjGBjLdWeM1LFVKhnCPu+S8 Ax69WyGSd3EYLQ9AYO2TVIbSLXpuZtR4viFZVTGrAv7fDRVFLS9gFXnU6kvq8A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQXnz5dDyz140w for ; Wed, 27 May 2026 14:59:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 224dc by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 14:59:19 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: d01e5afbbf9b - main - arm64: Remove unneeded declaration from List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d01e5afbbf9bc879e570f59dddc147c0efa8b990 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 14:59:19 +0000 Message-Id: <6a1706c7.224dc.5da5bcb1@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=d01e5afbbf9bc879e570f59dddc147c0efa8b990 commit d01e5afbbf9bc879e570f59dddc147c0efa8b990 Author: John Baldwin AuthorDate: 2026-03-25 15:17:27 +0000 Commit: John Baldwin CommitDate: 2026-05-27 13:43:37 +0000 arm64: Remove unneeded declaration from Reviewed by: kib, andrew Sponsored by: AFRL, DARPA Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/23 --- sys/arm64/include/pcpu.h | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/arm64/include/pcpu.h b/sys/arm64/include/pcpu.h index 286a40e7de3d..d04f975350d8 100644 --- a/sys/arm64/include/pcpu.h +++ b/sys/arm64/include/pcpu.h @@ -55,7 +55,6 @@ struct debug_monitor_state; #ifdef _KERNEL -struct pcb; struct pcpu; static inline struct pcpu * From nobody Wed May 27 14:59:20 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQXp11PSNz6f914 for ; Wed, 27 May 2026 14:59: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQXp06rP9z3HG0 for ; Wed, 27 May 2026 14:59:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779893961; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/iJ6GqwjfI4Nu8xo6w33yjIVYsmQy1OhwKvI5UTVyx8=; b=KAdhs1zuEpfLGXnqLRtJTEcylrLPFh1NybLTroeRGiaAOaqvu2zKwDYDQHJ/yFBcCNTlPZ SJuF9w8USdeMJISlchJmcJufZoA3opbTM0axTAe2jr5Rff1CGvMIfiSRps2a3PINX1T4a/ OkUV/JOOxAa7Y8QqG0+6Kyw1VvFodHh1MQK58X48LyhFuVD0lWK44xz8x4cXzwI2JRkYar GcGsrsxweS2Xp69hokEliv7/kDwvUtfjLfn4f8ODGaaoh4Qeco2iglOrsC7nSsSlAQ1U88 qqOTZBGPT/+mYA0qsmqQwqEZbuccrHNE+7x7rbpxlmqEWS2j47lIUkl4K105zw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779893961; a=rsa-sha256; cv=none; b=gB/3+4MtdBHvNHTvIxPxtZYnYhFbk5OcN6WGgHT1VqY+Czo3UMkl1HOnW3eV9SKM4LImZn g6rx2oDsChtlvLtoTjj2Tcu3+D0l6K8crly5vdC4RrgQVeTjxvFuG2iLsWp6x5zdD4t0dn oTfQpNnvFR6rSHTsg/GsHedOH/Z6d0Gop1HCVNy0wbdlNUWrmRYnFb0IqxX7HF7rd8PGBz /domnt3DVfoAtzfEiATxzzB241j96t+mjKACxk4GCqJzrrADMgBCQc2Uupqr3Yb61sPXf9 Wm+BqLEcqw5FyWs6iDk5f+xGyuJL7e/FsTXLNDBN0LL3ELXUqEKab8NmwT8aZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779893961; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/iJ6GqwjfI4Nu8xo6w33yjIVYsmQy1OhwKvI5UTVyx8=; b=JJ8S1RTmBTwVNvVFwiUeA60SWMVPHV7roJ6YnDsdp+18p6nZKpf0z1M6aaSr++KlFzH1Dm 3DPeFX+t2CaCzDoI7LEfKMuWVGYjKgT04wOFzDhsw2A5fbCjva9QJ9lmZSjPCg9aHtLW2c GtWnkGib8hfHloz+P+2kaZdGiOmq0nwu48n1cNFEXj9v5qFx0YVMjTxP4GKCN0OVQIxDfQ GCaoD9jfcegyPlasiHK4qIvAd2fBHSdTG15YwekwI9HIqgzVKdxLYCVKC8mvMyAe05mseV 1JmQX2j9kYmSON15dhY69KI7SJopHxRw4Oj+vaqOW/pqNU6yNhZVy6cHmQz+Hg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQXp06R83z13vR for ; Wed, 27 May 2026 14:59:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 22d47 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 14:59:20 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 860aaecf1bb6 - main - amd64: Don't set an initial FPU state save size List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 860aaecf1bb659d8cc6023aaa2d27273823faa75 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 14:59:20 +0000 Message-Id: <6a1706c8.22d47.4501a199@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=860aaecf1bb659d8cc6023aaa2d27273823faa75 commit 860aaecf1bb659d8cc6023aaa2d27273823faa75 Author: John Baldwin AuthorDate: 2026-03-26 17:09:59 +0000 Commit: John Baldwin CommitDate: 2026-05-27 13:43:40 +0000 amd64: Don't set an initial FPU state save size This used to be needed to initialize the pcb pointer when the pcb was allocated on the kstack. Reviewed by: kib Sponsored by: AFRL, DARPA Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/23 --- sys/amd64/amd64/machdep.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index e338db372df3..20c4be7880ff 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -1521,7 +1521,6 @@ hammer_time(u_int64_t modulep, u_int64_t physfree) * We initialize the PCB pointer early so that exception * handlers will work. */ - cpu_max_ext_state_size = sizeof(struct savefpu); set_top_of_stack_td(&thread0); thread0.td_pcb = get_pcb_td(&thread0); From nobody Wed May 27 14:59:22 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQXp25dkrz6f8v6 for ; Wed, 27 May 2026 14:59: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQXp2102fz3HLV for ; Wed, 27 May 2026 14:59:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779893962; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g2cLyjr1rYw65CG1lPqWAUIFi1xaCdw5uzOXXRHU1nY=; b=ksYUq55Ii8tcGQqTVbMinPIKJWAKU7x6H/197aXvG+mpI+/+3ZCD/5LcqCvalwPsiP2hgA FsCyjje08Qseb33/l/H3Sy1P9L6ke0/kuWvIsu6UPlZAqKWxFAj/HAuKvRCoypUqDsN7Tb wxXQDrEoY3k/uSyvZDYWDXlFjf1qCN4RG1Z/yn620NquSxYDmCnnW0CWV1HmStAQfMv+Fs tHSkWGvlcgy3Uufk6p5VX5SzRFd1wqYbJa08OI5Mxqoq5c9Zx6ccbUJL3rkRSfn12sgvh+ zrb9F4y3HKA4dk2lUHKQgeyWYEFcGKeuR+XyBC3eC6i75igXfYFEMQ6vXAQBbA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779893962; a=rsa-sha256; cv=none; b=D9G9Oi/ZHW9gquxLiqtBWorgCUIxAdFCGxj4IgJS9PtB/+TQwP6ndQLmbZCRwshKFtvnj6 oKFVcRaIPS21S+FyukbDi7ZwjQVMQfEgHj87UVpoZk6CGG+nZk5BZDpOHgOfKW8qi0RgQl up/iy+RDN7LgCPD1Wqm6q35NyWqdcKZKOWOB+DhEahqVHOWxAg69PTxgl0u1n4N3J4ufWh bpwJIQbDBZBNyZRzmzuFl19rzQ5MJvNtjvEdqAdrAkK+HVVIs/1qdkUoCEFE418B+uhsfL 7b4NEE8tagrqe0z12fw4aOLkHcpEvy+nmqFh339JpfmIIGwFbk3vOjNTpt7vqQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779893962; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g2cLyjr1rYw65CG1lPqWAUIFi1xaCdw5uzOXXRHU1nY=; b=fUpMu4X2nShLnmGG4VaQTOE0K15mVuIWq8LF5Z86cPk5uD/fkqnMaoezN7IED59FgrNSKn 5cdPEpz9ud/7nGvgXAnZgjC8xCHERYQwxaLgStl1+R9MoXovxYhTiwdEqizg8dCkFteuqP YYWpDsmFtRrxhyYxxqZdKvOcSqNb+yBS+1kRq7/3NxrGW1jyapPuI0RCWh+rZrSwonwPcp 47dFUq88zGk4TCOfZeDpi48IEGY5s0t2yhLfl7e5GaFLHIUDuoDWMv+Y4Ks5LL6kntjADs FWB+ghg9ZGow7FbJDWSmeL7L0XEfo/0Fy9ZYZzlZ32JxNktp1tKjNdtZuzh0sQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQXp20FB9z145y for ; Wed, 27 May 2026 14:59:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 23e13 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 14:59:22 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 187b46e1c4d7 - main - cpu_fork: Remove redundant assignments to td_pcb and td_frame List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 187b46e1c4d761efe2e92f662d68c0f49cd04b44 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 14:59:22 +0000 Message-Id: <6a1706ca.23e13.4f26e07f@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=187b46e1c4d761efe2e92f662d68c0f49cd04b44 commit 187b46e1c4d761efe2e92f662d68c0f49cd04b44 Author: John Baldwin AuthorDate: 2026-03-26 17:39:52 +0000 Commit: John Baldwin CommitDate: 2026-05-27 13:43:43 +0000 cpu_fork: Remove redundant assignments to td_pcb and td_frame cpu_thread_alloc() already sets these fields anytime td_kstack changes. Reviewed by: kib, andrew (arm changes) Sponsored by: AFRL, DARPA Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/23 --- sys/amd64/amd64/vm_machdep.c | 6 +----- sys/arm/arm/vm_machdep.c | 8 ++------ sys/arm64/arm64/vm_machdep.c | 9 ++------- sys/i386/i386/vm_machdep.c | 12 +++++------- sys/powerpc/powerpc/vm_machdep.c | 8 ++------ sys/riscv/riscv/vm_machdep.c | 2 -- 6 files changed, 12 insertions(+), 33 deletions(-) diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c index 2e180003e93d..e37f122dffa3 100644 --- a/sys/amd64/amd64/vm_machdep.c +++ b/sys/amd64/amd64/vm_machdep.c @@ -167,8 +167,6 @@ copy_thread(struct thread *td1, struct thread *td2) clear_pcb_flags(pcb2, PCB_TLSBASE); } - td2->td_frame = (struct trapframe *)td2->td_md.md_stack_base - 1; - /* * Set registers for trampoline to user mode. Leave space for the * return address on stack. These are the kernel mode register values. @@ -240,9 +238,7 @@ cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags) return; } - /* Point the stack and pcb to the actual location */ - set_top_of_stack_td(td2); - td2->td_pcb = pcb2 = get_pcb_td(td2); + pcb2 = td2->td_pcb; copy_thread(td1, td2); diff --git a/sys/arm/arm/vm_machdep.c b/sys/arm/arm/vm_machdep.c index bee1c705fbbd..b1197255c281 100644 --- a/sys/arm/arm/vm_machdep.c +++ b/sys/arm/arm/vm_machdep.c @@ -97,9 +97,6 @@ cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags) if ((flags & RFPROC) == 0) return; - /* Point the pcb to the top of the stack */ - pcb2 = (struct pcb *) - (td2->td_kstack + td2->td_kstack_pages * PAGE_SIZE) - 1; #ifdef VFP /* Store actual state of VFP */ if (curthread == td1) { @@ -107,7 +104,7 @@ cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags) vfp_save_state(td1, td1->td_pcb); } #endif - td2->td_pcb = pcb2; + pcb2 = td2->td_pcb; /* Clone td1's pcb */ bcopy(td1->td_pcb, pcb2, sizeof(*pcb2)); @@ -116,8 +113,7 @@ cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags) mdp2 = &p2->p_md; bcopy(&td1->td_proc->p_md, mdp2, sizeof(*mdp2)); - /* Point the frame to the stack in front of pcb and copy td1's frame */ - td2->td_frame = (struct trapframe *)pcb2 - 1; + /* Copy td1's frame */ *td2->td_frame = *td1->td_frame; /* diff --git a/sys/arm64/arm64/vm_machdep.c b/sys/arm64/arm64/vm_machdep.c index 4cb87ca9856e..01542848ab56 100644 --- a/sys/arm64/arm64/vm_machdep.c +++ b/sys/arm64/arm64/vm_machdep.c @@ -89,10 +89,7 @@ cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags) #endif } - pcb2 = (struct pcb *)(td2->td_kstack + - td2->td_kstack_pages * PAGE_SIZE) - 1; - - td2->td_pcb = pcb2; + pcb2 = td2->td_pcb; bcopy(td1->td_pcb, pcb2, sizeof(*pcb2)); /* Clear the debug register state. */ @@ -100,14 +97,12 @@ cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags) ptrauth_fork(td2, td1); - tf = STACKALIGN((struct trapframe *)pcb2 - 1); + tf = td2->td_frame; bcopy(td1->td_frame, tf, sizeof(*tf)); tf->tf_x[0] = 0; tf->tf_x[1] = 0; tf->tf_spsr = td1->td_frame->tf_spsr & (PSR_M_32 | PSR_DAIF); - td2->td_frame = tf; - /* Set the return value registers for fork() */ td2->td_pcb->pcb_x[PCB_X19] = (uintptr_t)fork_return; td2->td_pcb->pcb_x[PCB_X20] = (uintptr_t)td2; diff --git a/sys/i386/i386/vm_machdep.c b/sys/i386/i386/vm_machdep.c index 672ec9360c35..003f00070bff 100644 --- a/sys/i386/i386/vm_machdep.c +++ b/sys/i386/i386/vm_machdep.c @@ -232,9 +232,7 @@ cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags) return; } - /* Point the pcb to the top of the stack */ - pcb2 = get_pcb_td(td2); - td2->td_pcb = pcb2; + pcb2 = td2->td_pcb; copy_thread(td1, td2); @@ -248,11 +246,7 @@ cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags) /* * Copy the trap frame for the return to user mode as if from a * syscall. This copies most of the user mode register values. - * The -VM86_STACK_SPACE (-16) is so we can expand the trapframe - * if we go to vm86. */ - td2->td_frame = (struct trapframe *)((caddr_t)td2->td_pcb - - VM86_STACK_SPACE) - 1; bcopy(td1->td_frame, td2->td_frame, sizeof(struct trapframe)); /* Set child return values. */ @@ -381,6 +375,10 @@ cpu_thread_alloc(struct thread *td) struct pcb *pcb; struct xstate_hdr *xhdr; + /* + * The -VM86_STACK_SPACE (-16) is so we can expand the trapframe + * if we go to vm86. + */ td->td_pcb = pcb = get_pcb_td(td); td->td_frame = (struct trapframe *)((caddr_t)pcb - VM86_STACK_SPACE) - 1; diff --git a/sys/powerpc/powerpc/vm_machdep.c b/sys/powerpc/powerpc/vm_machdep.c index 00fdc301a7e7..1dc28739ad7c 100644 --- a/sys/powerpc/powerpc/vm_machdep.c +++ b/sys/powerpc/powerpc/vm_machdep.c @@ -123,9 +123,7 @@ cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags) if (td1 == curthread) cpu_update_pcb(td1); - pcb = (struct pcb *)__align_down(td2->td_kstack + - td2->td_kstack_pages * PAGE_SIZE - sizeof(struct pcb), 0x40); - td2->td_pcb = pcb; + pcb = td2->td_pcb; /* Copy the pcb */ bcopy(td1->td_pcb, pcb, sizeof(struct pcb)); @@ -135,7 +133,7 @@ cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags) * Copy the trap frame for the return to user mode as if from a * syscall. This copies most of the user mode register values. */ - tf = (struct trapframe *)pcb - 1; + tf = td2->td_frame; bcopy(td1->td_frame, tf, sizeof(*tf)); /* Set up trap frame. */ @@ -143,8 +141,6 @@ cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags) tf->fixreg[FIRSTARG + 1] = 0; tf->cr &= ~0x10000000; - td2->td_frame = tf; - cf = (struct callframe *)tf - 1; memset(cf, 0, sizeof(struct callframe)); #if defined(__powerpc64__) && (!defined(_CALL_ELF) || _CALL_ELF == 1) diff --git a/sys/riscv/riscv/vm_machdep.c b/sys/riscv/riscv/vm_machdep.c index 206110157233..e718d522e572 100644 --- a/sys/riscv/riscv/vm_machdep.c +++ b/sys/riscv/riscv/vm_machdep.c @@ -100,8 +100,6 @@ cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags) critical_exit(); } - cpu_set_pcb_frame(td2); - pcb2 = td2->td_pcb; bcopy(td1->td_pcb, pcb2, sizeof(*pcb2)); From nobody Wed May 27 14:59:23 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQXp34fTMz6f918 for ; Wed, 27 May 2026 14:59: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQXp31bFrz3HB9 for ; Wed, 27 May 2026 14:59:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779893963; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NXKmDfJUBgz5dDEuZCOTmeTpM2CDy6WHGP3pe9gWxm0=; b=pVT2pm5aBDB0nvFoQx/HoQNdnZTIRxf9CkAM/bA18H3+GCauaCSB4jo2GRu/qyv+ZVVXN/ G+t9i5djoQau+9Q8nRoSqJ3AkOu8VtjpyLyVvwsPOfYhHAav3M9aj63Tf94qbt44CHLKJU vM4khdOJo6X7xe3NGeBJ0tqheOyUEiFflDES+TbMJ3dwxnB1CijfsnpqlUa1/YItF/3iE4 +Ib98W+k6YDNUW4mGAm/SXrAjo4pBkeY9wX3Z7PpUw3uwr6DuVseP+jGlxSAExOB/PXVzg zKfnkBqg8ivrkEOjENizy/JXBScLff6DBk1NFKjhZC7C4pKQCixPEDs5AHLgzQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779893963; a=rsa-sha256; cv=none; b=oiUx9iC0P9Vn4O77T5Csg/jeBW2hI+lIc3bYg91eKOoiyxo3HZnDCDFZimMW2cJfZcBgQO /oJUfG6F0M2NtXHw0VyMGt2Tl+DA3Il5MQt49XZ3bQ9XbebuqbVIG7z5S0IcM/RGMjny4q wv6qhLxVPr/Lzm+c8l21X/iIlx8PrOtm2EucaaypUtmF7zSAksMfh8i/2+WydXv5dbikZE 1WBKkMtBnQzHLsvy1cKDxfXCR+o/2KCIAfqwfEEiVAdXJ5FI6pogMudnVkIHL6Ami+j1Ow lsrG+lP2ys0tsFAzXqzIzxEPHsEQ0Haa/WoeTrJyH6xUAr6A+P+bnNDQuu64PA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779893963; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NXKmDfJUBgz5dDEuZCOTmeTpM2CDy6WHGP3pe9gWxm0=; b=kKayM7WUAtMp4jkuOJmdLrushyC0bnuRzftEJvsZDJBfb+jpOmHnmMuF7b7o/X3F5PUrMs LS4Aihm5/qtgMWJjc2J6UKz+05ozsOfnJD30bdtl5RXLwGstsqUPHKaWlFKI6vVDTh9WT+ dKNFGCh8AnqtBJR+IyRrNZLKVbwN7/z7MmVkOx8+HFgcyrTSWKPr3bCnZaxNo2tv1MhF5x aOhW7i4V4C8Nc9Ynswy7wBASRwudJczJyzbgH1xyR05HCdF3ljU7RY18u0VY++byOvukXJ FsE2coGck1MN3OxeZvGh1sHwkzCq9vwfMx+Rjf/FLFahp3GqmTPrKnJNw1o1rQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQXp311cMz14C1 for ; Wed, 27 May 2026 14:59:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 21e60 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 14:59:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 59d67f2868b1 - main - amd64/i386: Remove dead code to clear XSAVE header List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 59d67f2868b17dc6ae897a3afd3ec4d96301e160 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 14:59:23 +0000 Message-Id: <6a1706cb.21e60.4bcaaba0@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=59d67f2868b17dc6ae897a3afd3ec4d96301e160 commit 59d67f2868b17dc6ae897a3afd3ec4d96301e160 Author: John Baldwin AuthorDate: 2026-03-28 11:19:10 +0000 Commit: John Baldwin CommitDate: 2026-05-27 13:43:46 +0000 amd64/i386: Remove dead code to clear XSAVE header If XSAVE is being used, the XSAVE header will be overwritten either by copying it from the parent thread in copy_thread for user threads, or by a fresh copy from fpu/npx_initialstate on the first use of the FPU for kernel threads. Reviewed by: kib Sponsored by: AFRL, DARPA Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/23 --- sys/amd64/amd64/vm_machdep.c | 6 ------ sys/i386/i386/vm_machdep.c | 6 ------ 2 files changed, 12 deletions(-) diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c index e37f122dffa3..8121a17d885a 100644 --- a/sys/amd64/amd64/vm_machdep.c +++ b/sys/amd64/amd64/vm_machdep.c @@ -375,18 +375,12 @@ void cpu_thread_alloc(struct thread *td) { struct pcb *pcb; - struct xstate_hdr *xhdr; set_top_of_stack_td(td); td->td_pcb = pcb = get_pcb_td(td); td->td_frame = (struct trapframe *)td->td_md.md_stack_base - 1; td->td_md.md_usr_fpu_save = fpu_save_area_alloc(); pcb->pcb_save = get_pcb_user_save_pcb(pcb); - if (use_xsave) { - xhdr = (struct xstate_hdr *)(pcb->pcb_save + 1); - bzero(xhdr, sizeof(*xhdr)); - xhdr->xstate_bv = xsave_mask; - } } void diff --git a/sys/i386/i386/vm_machdep.c b/sys/i386/i386/vm_machdep.c index 003f00070bff..bf08f7dd3882 100644 --- a/sys/i386/i386/vm_machdep.c +++ b/sys/i386/i386/vm_machdep.c @@ -373,7 +373,6 @@ void cpu_thread_alloc(struct thread *td) { struct pcb *pcb; - struct xstate_hdr *xhdr; /* * The -VM86_STACK_SPACE (-16) is so we can expand the trapframe @@ -384,11 +383,6 @@ cpu_thread_alloc(struct thread *td) VM86_STACK_SPACE) - 1; pcb->pcb_ext = NULL; pcb->pcb_save = get_pcb_user_save_pcb(pcb); - if (use_xsave) { - xhdr = (struct xstate_hdr *)(pcb->pcb_save + 1); - bzero(xhdr, sizeof(*xhdr)); - xhdr->xstate_bv = xsave_mask; - } } void From nobody Wed May 27 14:59:24 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQXp442nvz6f989 for ; Wed, 27 May 2026 14:59: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQXp41w2lz3HV3 for ; Wed, 27 May 2026 14:59:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779893964; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=69FZKbZLdKwYCqq29GhMU0dAzKpztr/M2IRtxMJ4fpU=; b=nBN0sm5dOVPaer9N38nFdoCwMpiZ2VcoOfVtittDtiv8C6cytt/fSzDQST5n23bmy97Hoq gtPBg6pi87oXE848lb674IveLw3/3M/UdhzjzS6xJh/9O4LhywzZQtaINbDuBZFVmueWH4 ++5vEiEOtcNmyTw4JSsg+vcz+wxuCcxNscU1p8jpEpqafOsl+0s7Pmk5O+piV0C7tcLkKB fdeTkzwxAfcfTqcUoiKzWIUmVWJF8yetwvSk2QHo8nzVhyJ4tbTifvGAI0cxOM6Qnm9TnC g/PdqERBq3xwH3facNBfUIIGBVh+HMkyXrcAQTXimrUdgSOylTMooQvMS+J06g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779893964; a=rsa-sha256; cv=none; b=dD+q1XIAl22PFZVpqjDOJm8+MFzhMqpQ19IsFvyJ7WSwsn96Fgi+qPIA66FBG9NFKVQggx Oo2YAgx9I3sYMaBlI+J/CxllykWyHwhA4sc7e1n9FGuMRtJyDRjwTYySgSBDxp5u2OUBsE 7Q6znQfkqk9BBjYvmeTpj+WMaPOZBkHJysHyV5Lkug0WVAbuRCFL7b9pH2mhKi+x5oyzxs uKNbP8OmOInDwCRIY+guIwasbBoQti6uB0v0RdWYH2FTfv4cTT9pgC8iLDlXUcHknY6gcc 75L3UqVaEfME5HSXFF63tBttChO3vyYjdWoaAhxkhSzP+JlnJlJpNWj1hF2E1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779893964; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=69FZKbZLdKwYCqq29GhMU0dAzKpztr/M2IRtxMJ4fpU=; b=xC4A2y2Y1yAZ8eShE9GAZdKxkc8zWc+CZB3+QF69+3xCrVfANhldWSCEwN4s9zGxHgsj0+ Bn3acHvP0Twl77XBmcraoUhiW8cmG202C78jg/o6xL+W0Ha4VhdChGzaxcxfaFoajYBVxc vXVhKi9F9HmB/9bK/RsLiRCpI8j3n4beaKzptD2wg4D/pomYUe2JyWOa5y+Gt5Q60r7uEi 2jkbMUq+TJXhuwMtcvIO+DicKvl301TRSE8kgz2kprw1O4GKffYBzgCYAS/oiiYQ8Crr82 DASrvoelxTdEHXQUriZLsTNf/Na0X28UmNAY8JEazRh3E85o3TXdlBojnMgMCA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQXp41TbPz14C3 for ; Wed, 27 May 2026 14:59:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 23664 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 14:59:24 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 2893bb741b4b - main - cpu_thread_new_kstack: Introduce new MD callback List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2893bb741b4bb67bde9ee27e5f18ea5715e3f0e9 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 14:59:24 +0000 Message-Id: <6a1706cc.23664.1f39b403@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=2893bb741b4bb67bde9ee27e5f18ea5715e3f0e9 commit 2893bb741b4bb67bde9ee27e5f18ea5715e3f0e9 Author: John Baldwin AuthorDate: 2026-03-28 13:56:24 +0000 Commit: John Baldwin CommitDate: 2026-05-27 13:45:22 +0000 cpu_thread_new_kstack: Introduce new MD callback Previously, the cpu_thread_alloc callback was invoked each time a kernel stack was allocated for a thread. This included thread creation, but it was also invoked if a recycled thread had to allocate a new kstack. This means that cpu_thread_alloc could be called multiple times for a single thread, but cpu_thread_free is only called once. Not only that, but the cpu_thread_alloc callback can't tell if it is being invoked on a new thread object, or a recycled thread. Calling *_alloc multiple times on an object is also atypical for kernel APIs. As a result of this confusion, amd64 was potentially leaking an XSAVE buffer each time a new kstack was allocated for an existing thread, since cpu_thread_alloc for amd64 always allocated a new XSAVE buffer. In practice, this edge case is probably rare. A process object needs to be recycled where either the new or old process is a kernel process with a non-default kernel stack size. Nevertheless, to ease the confusion, redefine cpu_thread_alloc to only be called once when a new thread is allocated. The new callback, cpu_thread_new_kstack is invoked each time a kstack is allocated for a thread, including both at thread creation time and if a recycled thread allocates a new kstack. The new callback should set any fields whose value is dependent on td_kstack (e.g. the user frame in td_frame, or td_pcb if the PCB is allocated on the kstack). Reviewed by: kib, andrew (arm changes) Sponsored by: AFRL, DARPA Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/23 --- share/man/man9/Makefile | 1 + share/man/man9/cpu_machdep.9 | 28 ++++++++++++++++++++++------ sys/amd64/amd64/vm_machdep.c | 9 +++++++-- sys/arm/arm/vm_machdep.c | 5 +++++ sys/arm64/arm64/vm_machdep.c | 6 +++++- sys/i386/i386/vm_machdep.c | 5 +++++ sys/kern/kern_thread.c | 3 ++- sys/powerpc/powerpc/exec_machdep.c | 5 +++++ sys/riscv/riscv/vm_machdep.c | 5 ++--- sys/sys/proc.h | 1 + 10 files changed, 55 insertions(+), 13 deletions(-) diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 7044b6f1bb68..894a9971295c 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -943,6 +943,7 @@ MLINKS+=cpu_machdep.9 cpu_copy_thread.9 \ cpu_machdep.9 cpu_thread_clean.9 \ cpu_machdep.9 cpu_thread_exit.9 \ cpu_machdep.9 cpu_thread_free.9 \ + cpu_machdep.9 cpu_thread_new_kstack.9 \ cpu_machdep.9 cpu_throw.9 \ cpu_machdep.9 cpu_update_pcb.9 MLINKS+=cpuset.9 CPUSET_T_INITIALIZER.9 \ diff --git a/share/man/man9/cpu_machdep.9 b/share/man/man9/cpu_machdep.9 index 415d86a8b766..514f3f0104cc 100644 --- a/share/man/man9/cpu_machdep.9 +++ b/share/man/man9/cpu_machdep.9 @@ -8,7 +8,7 @@ .\" Technology), and Capabilities Limited under Defense Advanced Research .\" Projects Agency (DARPA) Contract No. FA8750-24-C-B047 ("DEC"). .\" -.Dd January 31, 2025 +.Dd May 27, 2026 .Dt cpu_machdep 9 .Os .Sh NAME @@ -31,6 +31,7 @@ .Nm cpu_thread_clean , .Nm cpu_thread_exit , .Nm cpu_thread_free , +.Nm cpu_thread_new_kstack , .Nm cpu_throw , .Nm cpu_update_pcb .Nd machine-dependent interfaces to handle CPU and thread state @@ -84,6 +85,8 @@ .Ft void .Fn cpu_thread_free "struct thread *td" .Ft void +.Fn cpu_thread_new_kstack "struct thread *td" +.Ft void .Fn cpu_throw "struct thread *old" "struct thread *new" .Ft void .Fn cpu_update_pcb "struct thread *td" @@ -366,19 +369,25 @@ When the process object is later reused for a new process in .Xr fork 2 , the kernel recycles that last thread object and uses it as the initial thread in the new process. -When a thread is recycled, some of the steps in the thread allocation -and free cycle are skipped as an optimization. +When a thread is recycled, a new kernel stack may be allocated if +the existing kernel stack is not suitable for the new process. .Pp .Fn cpu_thread_alloc initializes machine-dependent fields in .Fa td +when allocating a new thread object. +.Pp +.Fn cpu_thread_new_kstack +initializes kernel stack-related machine-dependent fields in +.Fa td after allocating a new kernel stack. This function typically sets the .Fa td_pcb +.Pq on architectures which store the pcb in the kernel stack and initial .Fa td_frame pointers. -.Fn cpu_thread_alloc +.Fn cpu_thread_new_kstack is called both when allocating a new thread object and when a recycled thread allocates a new kernel stack. Note that this function is @@ -386,12 +395,19 @@ Note that this function is called if a recycled thread reuses its existing kernel stack. .Pp .Fn cpu_thread_clean -releases any machine-dependent resources for the last thread in a +releases machine-dependent resources for the last thread in a process during .Xr wait 2 . -The thread is a candidate for recycling so should be reset to run as a +Since the thread is a candidate for recycling, +machine-dependent fields should be reset to run as a new thread in case it is recycled by a future .Xr fork 2 . +In particular, +if the thread reuses its existing kernel stack, +no other +.Fn cpu_thread_* +function will be invoked before the thread is reused as the main +thread of a new process. .Pp .Fn cpu_thread_exit cleans any machine-dependent state in diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c index 8121a17d885a..2df53285d71d 100644 --- a/sys/amd64/amd64/vm_machdep.c +++ b/sys/amd64/amd64/vm_machdep.c @@ -376,13 +376,18 @@ cpu_thread_alloc(struct thread *td) { struct pcb *pcb; - set_top_of_stack_td(td); td->td_pcb = pcb = get_pcb_td(td); - td->td_frame = (struct trapframe *)td->td_md.md_stack_base - 1; td->td_md.md_usr_fpu_save = fpu_save_area_alloc(); pcb->pcb_save = get_pcb_user_save_pcb(pcb); } +void +cpu_thread_new_kstack(struct thread *td) +{ + set_top_of_stack_td(td); + td->td_frame = (struct trapframe *)td->td_md.md_stack_base - 1; +} + void cpu_thread_free(struct thread *td) { diff --git a/sys/arm/arm/vm_machdep.c b/sys/arm/arm/vm_machdep.c index b1197255c281..559c90509f11 100644 --- a/sys/arm/arm/vm_machdep.c +++ b/sys/arm/arm/vm_machdep.c @@ -240,6 +240,11 @@ cpu_thread_exit(struct thread *td) void cpu_thread_alloc(struct thread *td) +{ +} + +void +cpu_thread_new_kstack(struct thread *td) { td->td_pcb = (struct pcb *)(td->td_kstack + td->td_kstack_pages * PAGE_SIZE) - 1; diff --git a/sys/arm64/arm64/vm_machdep.c b/sys/arm64/arm64/vm_machdep.c index 01542848ab56..4fe7c76d473d 100644 --- a/sys/arm64/arm64/vm_machdep.c +++ b/sys/arm64/arm64/vm_machdep.c @@ -260,12 +260,16 @@ cpu_thread_exit(struct thread *td) void cpu_thread_alloc(struct thread *td) { + ptrauth_thread_alloc(td); +} +void +cpu_thread_new_kstack(struct thread *td) +{ td->td_pcb = (struct pcb *)(td->td_kstack + td->td_kstack_pages * PAGE_SIZE) - 1; td->td_frame = (struct trapframe *)STACKALIGN( (struct trapframe *)td->td_pcb - 1); - ptrauth_thread_alloc(td); } void diff --git a/sys/i386/i386/vm_machdep.c b/sys/i386/i386/vm_machdep.c index bf08f7dd3882..d59d98542241 100644 --- a/sys/i386/i386/vm_machdep.c +++ b/sys/i386/i386/vm_machdep.c @@ -371,6 +371,11 @@ cpu_thread_clean(struct thread *td) void cpu_thread_alloc(struct thread *td) +{ +} + +void +cpu_thread_new_kstack(struct thread *td) { struct pcb *pcb; diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index ec65bd16dd50..15a327e66c7d 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -803,6 +803,7 @@ thread_alloc(int pages) kasan_thread_alloc(td); kmsan_thread_alloc(td); cpu_thread_alloc(td); + cpu_thread_new_kstack(td); EVENTHANDLER_DIRECT_INVOKE(thread_ctor, td); return (td); } @@ -815,7 +816,7 @@ thread_recycle(struct thread *td, int pages) vm_thread_dispose(td); if (!vm_thread_new(td, pages)) return (ENOMEM); - cpu_thread_alloc(td); + cpu_thread_new_kstack(td); } kasan_thread_alloc(td); kmsan_thread_alloc(td); diff --git a/sys/powerpc/powerpc/exec_machdep.c b/sys/powerpc/powerpc/exec_machdep.c index 00c04b4ddbaa..1778737be610 100644 --- a/sys/powerpc/powerpc/exec_machdep.c +++ b/sys/powerpc/powerpc/exec_machdep.c @@ -1079,6 +1079,11 @@ cpu_thread_clean(struct thread *td) void cpu_thread_alloc(struct thread *td) +{ +} + +void +cpu_thread_new_kstack(struct thread *td) { struct pcb *pcb; diff --git a/sys/riscv/riscv/vm_machdep.c b/sys/riscv/riscv/vm_machdep.c index e718d522e572..b078695ae718 100644 --- a/sys/riscv/riscv/vm_machdep.c +++ b/sys/riscv/riscv/vm_machdep.c @@ -58,8 +58,8 @@ #define TP_OFFSET 16 /* sizeof(struct tcb) */ #endif -static void -cpu_set_pcb_frame(struct thread *td) +void +cpu_thread_new_kstack(struct thread *td) { td->td_pcb = (struct pcb *)(td->td_kstack + td->td_kstack_pages * PAGE_SIZE) - 1; @@ -228,7 +228,6 @@ cpu_thread_exit(struct thread *td) void cpu_thread_alloc(struct thread *td) { - cpu_set_pcb_frame(td); } void diff --git a/sys/sys/proc.h b/sys/sys/proc.h index b560ea2e8020..3f2af5583a19 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -1246,6 +1246,7 @@ void cpu_thread_alloc(struct thread *); void cpu_thread_clean(struct thread *); void cpu_thread_exit(struct thread *); void cpu_thread_free(struct thread *); +void cpu_thread_new_kstack(struct thread *); struct thread *thread_alloc(int pages); int thread_check_susp(struct thread *td, bool sleep); void thread_cow_get_proc(struct thread *newtd, struct proc *p); From nobody Wed May 27 14:59:18 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQXp40rybz6f8pY for ; Wed, 27 May 2026 14:59: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQXp36l4xz3HRd for ; Wed, 27 May 2026 14:59:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779893963; 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=dq2g9OVzes1aELdiSOfdn/f30/0W5C6JQ+FlsxnTigU=; b=QqPZSfOzKx7V2EUkmMY4M/sORsKErkcMt9pOd1zyhCh8VE8y0jhMMjntymZQIw5nnkydIv L0j3dbZ0/qX5ohFpm34MbKAJl5L72Kns4S+NM1BPRjhYHdYvid4ZE8i0bss5H+9ZAVvJbO Pw5IvfY//VfaUFW/dw2M5jU6gIdJP+iCX29AE1Cq1EsjWG40I9BnTU7HafULypJPM1BMuv TNlr41Q7F/418pgovWMrOd82xG7sy+5o/wcZLNPfG7zFipa4VzLbWIgfXjYGQ0THKKYp7n 66tcnjENna4yFkzNRf/vjTjj19OM+gW4qy/hYALxW35bivw4Cpcv+oYjgtbb7A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779893963; a=rsa-sha256; cv=none; b=H3JkLT80Jhf5EoeyrYZNu9USP0CYEJeHwKsmjpt5FmJbtVx7TVgyE4CFJOf3ynsc/1Nuig ZcpC5PC1bVGjfidTUeF8scss/jsDnQbFYN731c0CFWaalSZJD0YPxyCr2++rrCW5+UcitZ qMHFfSt8bCG45xBsqvS6COrG+jmtwtu/geThpBCWXuRdFC+25Bzw3DqU8pu76mw3n3qcJ/ KThbr9uFaw7wgLU1vRzH/nWALuw9pxrujXeQ0CbE9gYQDzXDn8/DxrPyMx6YXglJVAGGbI o+A9tzW3F4KrkV845TfV9Eo9xVTSUrPXZIND6e6WdPP9QlVupWX8ZfekHGfuvQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779893963; 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=dq2g9OVzes1aELdiSOfdn/f30/0W5C6JQ+FlsxnTigU=; b=ZcsVHENsPyfecullFSLeKMrQrcs0A4LmTrHSpi06A7P1bctAGFXR5qy32TdW7it69wdTQ2 ys69duiK5M91OPm1zJQjlCtDrfmqcqEOz0RMZUHc06QzT5JO9ESLNBsB4Ld0cGpUEZgnj3 SLMiQFjykzjzYhwIXEFszWYnTvNHxPEP0z7Q0y+iIZcZrmVL7uXwPS2FHh/oWX+gM4U+75 /ZB0jpQZYwR/cJJgNok9+CdP0+bljn1WOqEXG1qbIlEIdV3ckebx0Of9SzJog1qpSY0vqj M+g0kkGcGs79DuFkI9TKEXr62FWQFGn0hm7CatO4BrNCrhbpODSD/jYkC0UKQw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQXp368Hpz13Pc for ; Wed, 27 May 2026 14:59:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 22d42 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 14:59:18 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Alfredo Mazzinghi From: John Baldwin Subject: git: a1e07f21dc74 - main - arm64: Adjust the kernel stack pointer at the end of fork_trampoline List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a1e07f21dc7458d85bd0d04c294f0389d4591666 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 14:59:18 +0000 Message-Id: <6a1706c6.22d42.2f82f92c@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a1e07f21dc7458d85bd0d04c294f0389d4591666 commit a1e07f21dc7458d85bd0d04c294f0389d4591666 Author: Alfredo Mazzinghi AuthorDate: 2026-04-22 23:46:14 +0000 Commit: John Baldwin CommitDate: 2026-05-27 13:43:09 +0000 arm64: Adjust the kernel stack pointer at the end of fork_trampoline All other paths that return from the kernel to userspace pop the user trapframe off of the kernel stack pointer before returning to userspace in restore_registers. fork_trampoline was missing this, so all of the user faults after fork pushed another trapframe leaving a trapframe's worth of wasted space on the kstack. This would be fatal after a future change to remove duplicate initialization of td_frame in cpu_fork() as without this fix each time a thread was recycled it would "lose" another trapframe's worth of space. Reviewed by: kib, andrew Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/23 --- sys/arm64/arm64/swtch.S | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/arm64/arm64/swtch.S b/sys/arm64/arm64/swtch.S index b3bf88135e57..0cc0d7462ae6 100644 --- a/sys/arm64/arm64/swtch.S +++ b/sys/arm64/arm64/swtch.S @@ -276,6 +276,8 @@ ENTRY(fork_trampoline) ldp x26, x27, [sp, #TF_X + 26 * 8] ldp x28, x29, [sp, #TF_X + 28 * 8] + add sp, sp, #(TF_SIZE) + /* * No need for interrupts reenabling since PSR * will be set to the desired value anyway. From nobody Wed May 27 14:59:25 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQXp550Slz6f95d for ; Wed, 27 May 2026 14:59: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQXp52lmBz3HRv for ; Wed, 27 May 2026 14:59:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779893965; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P9lDJELIgFGVdpqTnQK2oCoK+ByZxzMEbvRmpp3wSVg=; b=fwLaPBoCKOghxcqNscIICKaJGq8waywHC9JtGUgsnnm6HsN20Rv5TsoSw0rg0X+d+OMCjZ 4RpomHSceeSgOhr98SWtqILtol+pxZToL20RD+a3qv3CUD5hRjYHe7slfVxDOutPm3aScM 7SKMmvKRPKIk506AcKmrJ0W7IKmwjv12rp5uGe6idUvs5orgFtUE2HL6tgsgZaftPuc399 RyJa7kr37MCYMIs9zH3fUO001lao6X05sFX4KrTx+NwrhMUcPBl3EmVvoyWLYp0mUg1xGG N03XMa/6ty3koT0S/37kHv5AQ3BHMWMXsNLeScc7y7bNc4PBzadUyb8+HfGgvA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779893965; a=rsa-sha256; cv=none; b=VkCFIocA8sthHoH+gDAJuS6YdqZ1nMy/lPnqnHzZvK1tmnADbIwtcAfh02CeG86MxqIOHi GNTyv696Plp9GmzRsj6sfWU8erJWsgIufyKbcvVbyNGwThTRuRsX5tsCiZQFp5laXMTgVc Zhx+U17gmkpcaq/eM3J2zjTzG3dzeuSzTyfPcrOYk5QrTSKCeZeGY+Hm/VOhwHKvknqOTv +cFIF7hpTaj/nv6Qc1UTk1RHrd3kAlJC/DSSFNNiQuqjidFDmO8LtQL6WjulRG3nMjlvzQ nUeMNMVWc36MzNviu8v6CsCDrM1mSvGDGagJDC42iABAR2CfYD2+E1YRYwGGFQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779893965; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P9lDJELIgFGVdpqTnQK2oCoK+ByZxzMEbvRmpp3wSVg=; b=ypTq4OCYOBIc5uvsJMj5YRr9Eso/YXaC0I5QKx3jWBltcxlevxFG9MUv1coLzHFGwIAISk 40Ai8d2Uw6SKcQn0qTrNZw1RU99ym0mb88yH/8tTZarrdJpU1LWrCuQDBFKFAbqI96wd9H weEkn9HKgTEb3RIsRjh1Y1c9Mh9pyfKHPin0bX4Bsv0BAT2HCqQLNHCRCUiatVnBBHowLD vAArfubTbxHIE1kkAPJQWNcNbROtE8rNCwtnylFz5dw/i+CiSEYka0bDKJXbyw6QSAp2tr 8kFIa+dsaLIEjxt8/VEpE67Hwzvw+kcF3cPzYtF9ud5DtusYKGht+n8DpOy0dw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQXp5224Cz13gg for ; Wed, 27 May 2026 14:59:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 246ad by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 14:59:25 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: f7524d8fcbd7 - main - amd64: Inline set_top_of_stack_td into cpu_thread_new_kstack List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f7524d8fcbd76a432c163200a7c77ce964805beb Auto-Submitted: auto-generated Date: Wed, 27 May 2026 14:59:25 +0000 Message-Id: <6a1706cd.246ad.1498e044@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=f7524d8fcbd76a432c163200a7c77ce964805beb commit f7524d8fcbd76a432c163200a7c77ce964805beb Author: John Baldwin AuthorDate: 2026-05-05 14:43:10 +0000 Commit: John Baldwin CommitDate: 2026-05-27 13:45:25 +0000 amd64: Inline set_top_of_stack_td into cpu_thread_new_kstack Reviewed by: kib Sponsored by: AFRL, DARPA Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/23 --- sys/amd64/amd64/machdep.c | 2 +- sys/amd64/amd64/vm_machdep.c | 10 ++-------- sys/amd64/include/md_var.h | 1 - 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 20c4be7880ff..510c6d375a2d 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -1369,6 +1369,7 @@ hammer_time(u_int64_t modulep, u_int64_t physfree) thread0.td_kstack_pages = kstack_pages; kstack0_sz = thread0.td_kstack_pages * PAGE_SIZE; bzero(thread0.td_kstack, kstack0_sz); + cpu_thread_new_kstack(&thread0); physfree += kstack0_sz; /* @@ -1521,7 +1522,6 @@ hammer_time(u_int64_t modulep, u_int64_t physfree) * We initialize the PCB pointer early so that exception * handlers will work. */ - set_top_of_stack_td(&thread0); thread0.td_pcb = get_pcb_td(&thread0); /* diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c index 2df53285d71d..244d82ee8ebb 100644 --- a/sys/amd64/amd64/vm_machdep.c +++ b/sys/amd64/amd64/vm_machdep.c @@ -83,13 +83,6 @@ _Static_assert(OFFSETOF_MONITORBUF == offsetof(struct pcpu, pc_monitorbuf), "OFFSETOF_MONITORBUF does not correspond with offset of pc_monitorbuf."); -void -set_top_of_stack_td(struct thread *td) -{ - td->td_md.md_stack_base = td->td_kstack + - td->td_kstack_pages * PAGE_SIZE; -} - struct savefpu * get_pcb_user_save_td(struct thread *td) { @@ -384,7 +377,8 @@ cpu_thread_alloc(struct thread *td) void cpu_thread_new_kstack(struct thread *td) { - set_top_of_stack_td(td); + td->td_md.md_stack_base = td->td_kstack + + td->td_kstack_pages * PAGE_SIZE; td->td_frame = (struct trapframe *)td->td_md.md_stack_base - 1; } diff --git a/sys/amd64/include/md_var.h b/sys/amd64/include/md_var.h index 46a30518b212..4b98c5d8c418 100644 --- a/sys/amd64/include/md_var.h +++ b/sys/amd64/include/md_var.h @@ -94,7 +94,6 @@ void gsbase_load_fault(void) __asm(__STRING(gsbase_load_fault)); void fpstate_drop(struct thread *td); void pagezero(void *addr); void setidt(int idx, alias_for_inthand_t *func, int typ, int dpl, int ist); -void set_top_of_stack_td(struct thread *td); struct savefpu *get_pcb_user_save_td(struct thread *td); struct savefpu *get_pcb_user_save_pcb(struct pcb *pcb); void pci_early_quirks(void); From nobody Wed May 27 14:59:26 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQXp70PPdz6f8xf for ; Wed, 27 May 2026 14:59:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQXp63SGlz3HGZ for ; Wed, 27 May 2026 14:59:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779893966; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q3j3tQGQRZ1+7PpivKbIlzfTjXYWhAWnRjNcpN14pMA=; b=iBLR1d38E+e71CLqYQ+OhauDC459SU/Ul8AKWInJbvmQ2u3otHiSfZQa4oxOfA0qVT4a/s sQx7QxLDSTkTsi7OXFw14G9xtd11CjcUAVflBeAtsrMn7dB2ggiTmgnghr2PnK0Z2/5fCf koCHzy52W7JTblYxdhzAMvKCL+Mcu7xoQ/8hX6dzcKGuWzvUON4ipnxILCDjvbU8jASL9z 6JjXut6AkHgagHPYlPrtQndQy/vw7f4I5xiScFFqeo8qrsVesioU+CxuxfX8yMDcFoZjUF oOpAA9/Nwq7xqrtiK4arAEUJNOKITb45npScLacFTsHcYyQYJnZvmFcpWpiF4w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779893966; a=rsa-sha256; cv=none; b=P9aIuCKY/Q4PBE3gQ6gDAhtmEz+KVTLRETLqCqAhofkOTgD5yw50i/la43t4P7/At3mpUF B8u0TlRl/jbjpTVO8SjLyFYPeQ4Dc13szntw35Xb/ZSX6vq8hbcTpVzUprCrG8EDxDPbDt zH5tCE5I0+IRfuDCyjItDXSY6z11SZPcqB/Ej22w+w5HeRyuxzO6WA9Nd6uB1ypCPdG0Ni pFEfkXgaNySU71z7bWyTHnWiDYkKkHX6QqydfZuQ8SQ8EZOjoG+jvzd61YLo8u8hedGjL0 F1Y7oFqAR+5m02HG/5Se+HkBcoYnf8DMj9f5UYb2Fy1h3KHeYW9qOfE5HAdd6A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779893966; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q3j3tQGQRZ1+7PpivKbIlzfTjXYWhAWnRjNcpN14pMA=; b=kfomSSug2MVKpBufBUQRDdTaJowmyzL/20si8gWPSpdLhioeTtdUFmEmFg5wH108Jky8mY bUH7jJTiSeXay3Wk0DH42+bax3Wuuh8AgR9ae5gBwhYO9SB+Y5xz7ZnEUTtqzdMlCgKQ5U kAsuw1gkCw10AygZ1vPydxmLkq5MiJrRxi9QfbPJ5ZF9GY99YCxJCmUD70y35bJrCfP9Wn QWD3Z0e/3Z5ArJQGebvb8jJEPrEoty5c7ivFcEcj28aT5A7eReCwPpiSgI6j/Y8WEIuvVM ZYmTLDq/jjnBkPQEnTjMGOO5i+A01BQCTAd9tRrpn9I7qC0d/JY+P7evZ6B/QA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQXp62q2Hz14C4 for ; Wed, 27 May 2026 14:59:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2247f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 14:59:26 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: fce595344c51 - main - arm64 locore: Fix a comment typo: Of -> If List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fce595344c51850a7113430c77e70c8777383a98 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 14:59:26 +0000 Message-Id: <6a1706ce.2247f.79a08f14@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=fce595344c51850a7113430c77e70c8777383a98 commit fce595344c51850a7113430c77e70c8777383a98 Author: John Baldwin AuthorDate: 2026-03-26 13:03:51 +0000 Commit: John Baldwin CommitDate: 2026-05-27 13:45:26 +0000 arm64 locore: Fix a comment typo: Of -> If Reviewed by: kib, andrew Sponsored by: AFRL, DARPA Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/23 --- sys/arm64/arm64/swtch.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm64/arm64/swtch.S b/sys/arm64/arm64/swtch.S index 0cc0d7462ae6..af2c278baecf 100644 --- a/sys/arm64/arm64/swtch.S +++ b/sys/arm64/arm64/swtch.S @@ -75,7 +75,7 @@ * void cpu_throw(struct thread *old, struct thread *new) */ ENTRY(cpu_throw) - /* Of old == NULL skip disabling stepping */ + /* If old == NULL skip disabling stepping */ cbz x0, 1f /* If we were single stepping, disable it */ From nobody Wed May 27 14:59:27 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQXp775C7z6f8pl for ; Wed, 27 May 2026 14:59:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQXp747Ddz3HSF for ; Wed, 27 May 2026 14:59:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779893967; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eJNByQKZcvPUVvzbD+ejh0q5TLtwEoRnVlyYUsz1V/4=; b=rKBmy51q0MGfKqHJj5MhOehlSVjNrRfoSBtQfUchk4G+8Jb5jy0A/OPiBy8Xo2zUCCM2c2 R4dhR84JbFrnVJcCN72ZtM20cpVLhU1IVTxcdWfHz/pN6DA2ZXBO92m1vARRCDwtfW32WE 8MCOshm4F0wlWefsth+M/JGz/FoBb8Lz7YE/OFI76p3uSXEwzGjD3hlBon6pdO9frovDoa /xBQSvvs1idlndeUIgYQJGEAgyPcHb8p3PvNPup1hBQAx1/e67AVtAsI/WbjlBcG5blN4u 0WqLIWrG4cZABcl3YCgkxoyNiOGichmQuwTCeF54vN0f2I3UTpNeD5ebGph31Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779893967; a=rsa-sha256; cv=none; b=dBkk0tYSJsUwCDO7dmQzcWn/p1fNSrI31LyoyaNj82bSRUyb4GiEGFksCn4EutY2ddXKGp VqHKLOZ39D6mfYmONdqJ5iRKjMNSW5rMiq/9JobnEeI3o2zV0qkWlFzaEXm/PW0vV3Ni/e /Ri5OJTIInxnbCX0GAdWI5VQEfW+2tGUhWBRKoiIjAVtsQzpLMEssg4O35KHlE+l/JDrC2 oeBHoV7H0OULfMD+WEsDaoxE3fY/UZmBhGIKLilPol8pnSs9IOr0noMhKN+HMtufx9AQ/z /T4et30ZRHGlc/nXQYWutvjob4GiyFfXrAU/7fEBxLydvH0EcWY1U3gLpnpyzg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779893967; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eJNByQKZcvPUVvzbD+ejh0q5TLtwEoRnVlyYUsz1V/4=; b=dsMQpK6A4bhUDchaxN5XPaYK/lAAlYermYdMD13fB3cyMbKA7GyRRi2evqiyjJ935XAl/f aC3h4qmCcFQfnRmS/UH4cUMt05LihFWJidToz3NenFpGAMp5kb+ho1bx0+gL27ygCGJ3vG HNR9MWaefrypGI7CnIe74eMEYUdIdh3jYUoTIgkBlZzCciRCYohSszWh8aYYUkGmPx9bsu OxgMZVAYunBchIwWiQllTdndWFHulktQNQXGUqnTrP01x9B8HUyc1E8NDYWAbIAKZO9wWY 65cNR8KCfRSMpNvmO8XLiIaqC7AIWUf5ss+DHJVj2yho+7HvK0/ZjfyhLNnyDA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQXp73dVNz14C6 for ; Wed, 27 May 2026 14:59:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 246b1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 14:59:27 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 8b9023cfc185 - main - sys: Add td_kstack_top inline helper function List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8b9023cfc1851a18518111d286ebd59b573008c1 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 14:59:27 +0000 Message-Id: <6a1706cf.246b1.211fb9ff@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=8b9023cfc1851a18518111d286ebd59b573008c1 commit 8b9023cfc1851a18518111d286ebd59b573008c1 Author: John Baldwin AuthorDate: 2026-04-27 19:04:22 +0000 Commit: John Baldwin CommitDate: 2026-05-27 13:45:26 +0000 sys: Add td_kstack_top inline helper function This function returns a pointer to the top of the kstack. Reviewed by: kib, andrew (arm changes) Sponsored by: AFRL, DARPA Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/23 --- sys/amd64/amd64/vm_machdep.c | 3 +-- sys/amd64/include/stack.h | 6 ++---- sys/arm/arm/machdep.c | 3 +-- sys/arm/arm/vm_machdep.c | 3 +-- sys/arm/include/stack.h | 3 +-- sys/arm64/arm64/machdep.c | 3 +-- sys/arm64/arm64/vm_machdep.c | 3 +-- sys/arm64/include/stack.h | 3 +-- sys/ddb/db_ps.c | 3 +-- sys/i386/i386/machdep.c | 4 ++-- sys/i386/i386/vm_machdep.c | 4 ++-- sys/powerpc/include/stack.h | 3 +-- sys/powerpc/powerpc/exec_machdep.c | 4 ++-- sys/powerpc/powerpc/machdep.c | 4 ++-- sys/riscv/include/stack.h | 3 +-- sys/riscv/riscv/machdep.c | 3 +-- sys/riscv/riscv/vm_machdep.c | 3 +-- sys/sys/proc.h | 6 ++++++ sys/vm/vm_glue.c | 2 +- 19 files changed, 29 insertions(+), 37 deletions(-) diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c index 244d82ee8ebb..1de891680f94 100644 --- a/sys/amd64/amd64/vm_machdep.c +++ b/sys/amd64/amd64/vm_machdep.c @@ -377,8 +377,7 @@ cpu_thread_alloc(struct thread *td) void cpu_thread_new_kstack(struct thread *td) { - td->td_md.md_stack_base = td->td_kstack + - td->td_kstack_pages * PAGE_SIZE; + td->td_md.md_stack_base = td_kstack_top(td); td->td_frame = (struct trapframe *)td->td_md.md_stack_base - 1; } diff --git a/sys/amd64/include/stack.h b/sys/amd64/include/stack.h index 3c27266b775b..765a8e78daed 100644 --- a/sys/amd64/include/stack.h +++ b/sys/amd64/include/stack.h @@ -13,16 +13,14 @@ #define GET_STACK_USAGE(total, used) do { \ struct thread *td = curthread; \ (total) = td->td_kstack_pages * PAGE_SIZE; \ - (used) = td->td_kstack + td->td_kstack_pages * PAGE_SIZE - \ - (char *)&td; \ + (used) = td_kstack_top(td) - (char *)&td; \ } while (0) static __inline bool kstack_contains(struct thread *td, vm_offset_t va, size_t len) { return (va >= (vm_offset_t)td->td_kstack && va + len >= va && - va + len <= (vm_offset_t)td->td_kstack + td->td_kstack_pages * - PAGE_SIZE); + va + len <= (vm_offset_t)td_kstack_top(td)); } #endif /* _SYS_PROC_H_ */ diff --git a/sys/arm/arm/machdep.c b/sys/arm/arm/machdep.c index a06e6773cd49..989adef3478d 100644 --- a/sys/arm/arm/machdep.c +++ b/sys/arm/arm/machdep.c @@ -378,8 +378,7 @@ init_proc0(void *kstack) proc_linkup0(&proc0, &thread0); thread0.td_kstack = kstack; thread0.td_kstack_pages = kstack_pages; - thread0.td_pcb = (struct pcb *)(thread0.td_kstack + - thread0.td_kstack_pages * PAGE_SIZE) - 1; + thread0.td_pcb = (struct pcb *)td_kstack_top(&thread0) - 1; thread0.td_pcb->pcb_flags = 0; thread0.td_pcb->pcb_fpflags = 0; thread0.td_pcb->pcb_vfpcpu = -1; diff --git a/sys/arm/arm/vm_machdep.c b/sys/arm/arm/vm_machdep.c index 559c90509f11..a8a4b6b8c7be 100644 --- a/sys/arm/arm/vm_machdep.c +++ b/sys/arm/arm/vm_machdep.c @@ -246,8 +246,7 @@ cpu_thread_alloc(struct thread *td) void cpu_thread_new_kstack(struct thread *td) { - td->td_pcb = (struct pcb *)(td->td_kstack + td->td_kstack_pages * - PAGE_SIZE) - 1; + td->td_pcb = (struct pcb *)td_kstack_top(td) - 1; /* * Ensure td_frame is aligned to an 8 byte boundary as it will be * placed into the stack pointer which must be 8 byte aligned in diff --git a/sys/arm/include/stack.h b/sys/arm/include/stack.h index e80d3dc060fd..6af9418aba42 100644 --- a/sys/arm/include/stack.h +++ b/sys/arm/include/stack.h @@ -76,8 +76,7 @@ static __inline bool kstack_contains(struct thread *td, vm_offset_t va, size_t len) { return (va >= (vm_offset_t)td->td_kstack && va + len >= va && - va + len <= (vm_offset_t)td->td_kstack + td->td_kstack_pages * - PAGE_SIZE - sizeof(struct pcb)); + va + len <= (vm_offset_t)td_kstack_top(td) - sizeof(struct pcb)); } #endif /* _SYS_PROC_H_ */ diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c index d219c737c215..6b6dd2c510a2 100644 --- a/sys/arm64/arm64/machdep.c +++ b/sys/arm64/arm64/machdep.c @@ -443,8 +443,7 @@ init_proc0(void *kstack) #if defined(PERTHREAD_SSP) thread0.td_md.md_canary = boot_canary; #endif - thread0.td_pcb = (struct pcb *)(thread0.td_kstack + - thread0.td_kstack_pages * PAGE_SIZE) - 1; + thread0.td_pcb = (struct pcb *)td_kstack_top(&thread0) - 1; thread0.td_pcb->pcb_flags = 0; thread0.td_pcb->pcb_fpflags = 0; thread0.td_pcb->pcb_fpusaved = &thread0.td_pcb->pcb_fpustate; diff --git a/sys/arm64/arm64/vm_machdep.c b/sys/arm64/arm64/vm_machdep.c index 4fe7c76d473d..29a1c8667e7d 100644 --- a/sys/arm64/arm64/vm_machdep.c +++ b/sys/arm64/arm64/vm_machdep.c @@ -266,8 +266,7 @@ cpu_thread_alloc(struct thread *td) void cpu_thread_new_kstack(struct thread *td) { - td->td_pcb = (struct pcb *)(td->td_kstack + - td->td_kstack_pages * PAGE_SIZE) - 1; + td->td_pcb = (struct pcb *)td_kstack_top(td) - 1; td->td_frame = (struct trapframe *)STACKALIGN( (struct trapframe *)td->td_pcb - 1); } diff --git a/sys/arm64/include/stack.h b/sys/arm64/include/stack.h index 19e9e837e3ee..b89019fbbec6 100644 --- a/sys/arm64/include/stack.h +++ b/sys/arm64/include/stack.h @@ -51,8 +51,7 @@ static __inline bool kstack_contains(struct thread *td, vm_offset_t va, size_t len) { return (va >= (vm_offset_t)td->td_kstack && va + len >= va && - va + len <= (vm_offset_t)td->td_kstack + td->td_kstack_pages * - PAGE_SIZE - sizeof(struct pcb)); + va + len <= (vm_offset_t)td_kstack_top(td) - sizeof(struct pcb)); } #endif /* _SYS_PROC_H_ */ diff --git a/sys/ddb/db_ps.c b/sys/ddb/db_ps.c index 8e027997ea75..59dcde453b93 100644 --- a/sys/ddb/db_ps.c +++ b/sys/ddb/db_ps.c @@ -358,8 +358,7 @@ DB_SHOW_COMMAND(thread, db_show_thread) if (td->td_name[0] != '\0') db_printf(" name: %s\n", td->td_name); db_printf(" pcb: %p\n", td->td_pcb); - db_printf(" stack: %p-%p\n", td->td_kstack, - td->td_kstack + td->td_kstack_pages * PAGE_SIZE - 1); + db_printf(" stack: %p-%p\n", td->td_kstack, td_kstack_top(td) - 1); db_printf(" flags: %#x ", td->td_flags); db_printf(" pflags: %#x\n", td->td_pflags); db_printf(" state: "); diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index f9afb9afe45f..71992f18e8fb 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -1492,8 +1492,8 @@ init386(int first) PCPU_SET(fsgs_gdt, &gdt[GUFS_SEL].sd); /* Initialize the tss (except for the final esp0) early for vm86. */ - common_tss0.tss_esp0 = (vm_offset_t)thread0.td_kstack + - thread0.td_kstack_pages * PAGE_SIZE - VM86_STACK_SPACE; + common_tss0.tss_esp0 = (vm_offset_t)td_kstack_top(&thread0) - + VM86_STACK_SPACE; common_tss0.tss_ss0 = GSEL(GDATA_SEL, SEL_KPL); common_tss0.tss_ioopt = sizeof(struct i386tss) << 16; gsel_tss = GSEL(GPROC0_SEL, SEL_KPL); diff --git a/sys/i386/i386/vm_machdep.c b/sys/i386/i386/vm_machdep.c index d59d98542241..72fe83d3fdd4 100644 --- a/sys/i386/i386/vm_machdep.c +++ b/sys/i386/i386/vm_machdep.c @@ -89,7 +89,7 @@ get_pcb_user_save_td(struct thread *td) { char *p; - p = td->td_kstack + td->td_kstack_pages * PAGE_SIZE - + p = td_kstack_top(td) - roundup2(cpu_max_ext_state_size, XSAVE_AREA_ALIGN); KASSERT(__is_aligned(p, XSAVE_AREA_ALIGN), ("Unaligned pcb_user_save area")); @@ -110,7 +110,7 @@ get_pcb_td(struct thread *td) { char *p; - p = td->td_kstack + td->td_kstack_pages * PAGE_SIZE - + p = td_kstack_top(td) - roundup2(cpu_max_ext_state_size, XSAVE_AREA_ALIGN) - sizeof(struct pcb); return ((struct pcb *)p); diff --git a/sys/powerpc/include/stack.h b/sys/powerpc/include/stack.h index 928256b26468..0fb9a929128b 100644 --- a/sys/powerpc/include/stack.h +++ b/sys/powerpc/include/stack.h @@ -46,8 +46,7 @@ static __inline bool kstack_contains(struct thread *td, vm_offset_t va, size_t len) { return (va >= (vm_offset_t)td->td_kstack && va + len >= va && - va + len <= (vm_offset_t)td->td_kstack + td->td_kstack_pages * - PAGE_SIZE - sizeof(struct pcb)); + va + len <= (vm_offset_t)td_kstack_top(td) - sizeof(struct pcb)); } #endif /* _SYS_PROC_H_ */ diff --git a/sys/powerpc/powerpc/exec_machdep.c b/sys/powerpc/powerpc/exec_machdep.c index 1778737be610..18e0ba004a13 100644 --- a/sys/powerpc/powerpc/exec_machdep.c +++ b/sys/powerpc/powerpc/exec_machdep.c @@ -1087,8 +1087,8 @@ cpu_thread_new_kstack(struct thread *td) { struct pcb *pcb; - pcb = (struct pcb *)__align_down(td->td_kstack + td->td_kstack_pages * - PAGE_SIZE - sizeof(struct pcb), 0x40); + pcb = (struct pcb *)__align_down(td_kstack_top(td) - sizeof(struct pcb), + 0x40); td->td_pcb = pcb; td->td_frame = (struct trapframe *)pcb - 1; } diff --git a/sys/powerpc/powerpc/machdep.c b/sys/powerpc/powerpc/machdep.c index a975bebebaad..e1e0885e3ecf 100644 --- a/sys/powerpc/powerpc/machdep.c +++ b/sys/powerpc/powerpc/machdep.c @@ -487,8 +487,8 @@ powerpc_init(vm_offset_t fdt, vm_offset_t toc, vm_offset_t ofentry, void *mdp, /* * Finish setting up thread0. */ - thread0.td_pcb = (struct pcb *)__align_down(thread0.td_kstack + - thread0.td_kstack_pages * PAGE_SIZE - sizeof(struct pcb), 16); + thread0.td_pcb = (struct pcb *)__align_down(td_kstack_top(&thread0) - + sizeof(struct pcb), 16); bzero((void *)thread0.td_pcb, sizeof(struct pcb)); pc->pc_curpcb = thread0.td_pcb; diff --git a/sys/riscv/include/stack.h b/sys/riscv/include/stack.h index 03b5794c2b13..7de9f05b567b 100644 --- a/sys/riscv/include/stack.h +++ b/sys/riscv/include/stack.h @@ -61,8 +61,7 @@ static __inline bool kstack_contains(struct thread *td, vm_offset_t va, size_t len) { return (va >= (vm_offset_t)td->td_kstack && va + len >= va && - va + len <= (vm_offset_t)td->td_kstack + td->td_kstack_pages * - PAGE_SIZE - sizeof(struct pcb)); + va + len <= (vm_offset_t)td_kstack_top(td) - sizeof(struct pcb)); } #endif /* _SYS_PROC_H_ */ diff --git a/sys/riscv/riscv/machdep.c b/sys/riscv/riscv/machdep.c index 91219676454b..47d9636492db 100644 --- a/sys/riscv/riscv/machdep.c +++ b/sys/riscv/riscv/machdep.c @@ -296,8 +296,7 @@ init_proc0(void *kstack) proc_linkup0(&proc0, &thread0); thread0.td_kstack = kstack; thread0.td_kstack_pages = KSTACK_PAGES; - thread0.td_pcb = (struct pcb *)(thread0.td_kstack + - thread0.td_kstack_pages * PAGE_SIZE) - 1; + thread0.td_pcb = (struct pcb *)td_kstack_top(&thread0) - 1; thread0.td_pcb->pcb_fpflags = 0; thread0.td_frame = &proc0_tf; pcpup->pc_curpcb = thread0.td_pcb; diff --git a/sys/riscv/riscv/vm_machdep.c b/sys/riscv/riscv/vm_machdep.c index b078695ae718..1810fe88283c 100644 --- a/sys/riscv/riscv/vm_machdep.c +++ b/sys/riscv/riscv/vm_machdep.c @@ -61,8 +61,7 @@ void cpu_thread_new_kstack(struct thread *td) { - td->td_pcb = (struct pcb *)(td->td_kstack + - td->td_kstack_pages * PAGE_SIZE) - 1; + td->td_pcb = (struct pcb *)td_kstack_top(td) - 1; /* * td->td_frame + TF_SIZE will be the saved kernel stack pointer whilst diff --git a/sys/sys/proc.h b/sys/sys/proc.h index 3f2af5583a19..ed69a09422e2 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -1327,6 +1327,12 @@ td_get_sched(struct thread *td) return ((struct td_sched *)&td[1]); } +static __inline char * +td_kstack_top(struct thread *td) +{ + return (td->td_kstack + ptoa(td->td_kstack_pages)); +} + static __inline void ruxreset(struct rusage_ext *rux) { diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c index 191711ec7765..02e1c993529e 100644 --- a/sys/vm/vm_glue.c +++ b/sys/vm/vm_glue.c @@ -739,7 +739,7 @@ intr_prof_stack_use(struct thread *td, struct trapframe *frame) if (TRAPF_USERMODE(frame)) return; - stack_top = td->td_kstack + td->td_kstack_pages * PAGE_SIZE; + stack_top = td_kstack_top(td); current = (char *)&stack_top; /* From nobody Wed May 27 14:59:28 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQXp91xkbz6f937 for ; Wed, 27 May 2026 14:59: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQXp85JK5z3HVr for ; Wed, 27 May 2026 14:59:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779893968; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TpkKZgG85rbESN8DodtmD38JchDtUhqqdxV+eOgE/w4=; b=PJqcfaqb8vGi1a496WuTqIBIa2YNnbQiBSU5hL91+dlv9JN3kV+ywUkUblFMmnFONN+XRm 8HoUClJ6VUp3AlpSI1JfBD6pWo/+VMNVkPprS/4ZZX2OmEVEgk3n9HVgEtK94TMkzCO1RP QQwYI9RzOhGPRMMow33ri09HEKIPmbhW3jhi6GzdvOfXmHLel309NuuoR/MJC8MzyvA7uI Xk8B010OKaAI56vE/TFmsWX3KOaWLj997mtrGLAyXnTEnOcqY/ShMo6KJboaNZbf+dpt4u jLB5kHayXq7miKdCl49QyQ04Yc9Ma+jd5kC3b3gF/H/mIbAX9CRvcCW8GZ+GLA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779893968; a=rsa-sha256; cv=none; b=cfMJW2+5no2023cDf7WNof65tDENGdsNpoZqmm8h9umtEWP9Kd187TrBHD4iecwn6aMrqQ HNpcAeabhBRxoIXVlEJ1LW4Pu2MgRVxuCZBuEg39nZPr/K126iPpT3OHmFM2JO4ZbzRlTG AFgLo1PiVZtta+T6ve/BlcJ/0YU7V8kB91Qudub+KNozvltfy6p+S3wgC7Y3zDj/g4ZvdU L2jQ5GHwPv2o5GWyWOU8bx4o/khyy/ydStzcYbdTVsGuA9yDKogokc6iaOhQlLIKbgMEjA ypH2XPlGz5WD8KhIoW3X2C8aPdOymKDkXksGuF1Pi/p506zcmWnAoZFD34Taqw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779893968; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TpkKZgG85rbESN8DodtmD38JchDtUhqqdxV+eOgE/w4=; b=g6SIyfhHnQBymfJWc/Q54dX3yagwJcHUUmAQ8V/B1II4wh7aH4UJ9m+ZKzLugMhBqVhVmT NlnII3D/e+mQWAy1RarI/FIz0jTscIsMlS/VXwo6pSP5f7WEnfiWqLLIet2V/xAzQGfGZg XFwEbsigttZx2Gv18F0H8+rdMNrwN7jKZaVYH+TJcgJy6bR4ACq56aQ8+bT7u1iDWUwXEV VT02PL1zjsp0ynd1QwKvJB6wFOtFB2TwHeh8fwmtov32xgRGJHHC2Y1D6xjTFILMKmin6r gs0XCBOIsqQa5TiH4BgNMvtcrCi+kL5nQnTp5+mjerFmgksjXtBgzrMQKvTV8A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQXp84gcQz14FW for ; Wed, 27 May 2026 14:59:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 23e92 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 14:59:28 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: dcae0f7d7aa6 - main - sys: Consistently use ptoa() with td_kstack_pages List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dcae0f7d7aa67ed6ec6b8da5e1b444a828898595 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 14:59:28 +0000 Message-Id: <6a1706d0.23e92.788bff0a@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=dcae0f7d7aa67ed6ec6b8da5e1b444a828898595 commit dcae0f7d7aa67ed6ec6b8da5e1b444a828898595 Author: John Baldwin AuthorDate: 2026-04-27 19:05:54 +0000 Commit: John Baldwin CommitDate: 2026-05-27 13:45:26 +0000 sys: Consistently use ptoa() with td_kstack_pages Suggested by: kib Reviewed by: kib, andrew (arm changes) Sponsored by: AFRL, DARPA Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/23 --- sys/amd64/amd64/machdep.c | 2 +- sys/amd64/include/stack.h | 2 +- sys/arm/include/stack.h | 2 +- sys/arm64/include/stack.h | 2 +- sys/powerpc/include/stack.h | 2 +- sys/riscv/include/stack.h | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 510c6d375a2d..dbad85096a1d 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -1367,7 +1367,7 @@ hammer_time(u_int64_t modulep, u_int64_t physfree) thread0.td_kstack = (char *)physfree - kernphys + KERNSTART; thread0.td_kstack_pages = kstack_pages; - kstack0_sz = thread0.td_kstack_pages * PAGE_SIZE; + kstack0_sz = ptoa(kstack_pages); bzero(thread0.td_kstack, kstack0_sz); cpu_thread_new_kstack(&thread0); physfree += kstack0_sz; diff --git a/sys/amd64/include/stack.h b/sys/amd64/include/stack.h index 765a8e78daed..7d821348be0e 100644 --- a/sys/amd64/include/stack.h +++ b/sys/amd64/include/stack.h @@ -12,7 +12,7 @@ /* Get the current kernel thread stack usage. */ #define GET_STACK_USAGE(total, used) do { \ struct thread *td = curthread; \ - (total) = td->td_kstack_pages * PAGE_SIZE; \ + (total) = ptoa(td->td_kstack_pages); \ (used) = td_kstack_top(td) - (char *)&td; \ } while (0) diff --git a/sys/arm/include/stack.h b/sys/arm/include/stack.h index 6af9418aba42..f6bc67dbe771 100644 --- a/sys/arm/include/stack.h +++ b/sys/arm/include/stack.h @@ -68,7 +68,7 @@ void unwind_module_unloaded(struct linker_file *); /* Get the current kernel thread stack usage. */ #define GET_STACK_USAGE(total, used) do { \ struct thread *td = curthread; \ - (total) = td->td_kstack_pages * PAGE_SIZE - sizeof(struct pcb); \ + (total) = ptoa(td->td_kstack_pages) - sizeof(struct pcb); \ (used) = td->td_kstack + (total) - (char *)&td; \ } while (0) diff --git a/sys/arm64/include/stack.h b/sys/arm64/include/stack.h index b89019fbbec6..0aa483e15e64 100644 --- a/sys/arm64/include/stack.h +++ b/sys/arm64/include/stack.h @@ -43,7 +43,7 @@ bool unwind_frame(struct thread *, struct unwind_state *); #define GET_STACK_USAGE(total, used) do { \ struct thread *td = curthread; \ - (total) = td->td_kstack_pages * PAGE_SIZE - sizeof(struct pcb); \ + (total) = ptoa(td->td_kstack_pages) - sizeof(struct pcb); \ (used) = td->td_kstack + (total) - (char *)&td; \ } while (0) diff --git a/sys/powerpc/include/stack.h b/sys/powerpc/include/stack.h index 0fb9a929128b..533ff0fa2056 100644 --- a/sys/powerpc/include/stack.h +++ b/sys/powerpc/include/stack.h @@ -38,7 +38,7 @@ extern int end[]; /* Get the current kernel thread stack usage. */ #define GET_STACK_USAGE(total, used) do { \ struct thread *td = curthread; \ - (total) = td->td_kstack_pages * PAGE_SIZE - sizeof(struct pcb); \ + (total) = ptoa(td->td_kstack_pages) - sizeof(struct pcb); \ (used) = td->td_kstack + (total) - (char *)&td; \ } while (0) diff --git a/sys/riscv/include/stack.h b/sys/riscv/include/stack.h index 7de9f05b567b..5669dcda6c67 100644 --- a/sys/riscv/include/stack.h +++ b/sys/riscv/include/stack.h @@ -53,7 +53,7 @@ bool unwind_frame(struct thread *, struct unwind_state *); /* Get the current kernel thread stack usage. */ #define GET_STACK_USAGE(total, used) do { \ struct thread *td = curthread; \ - (total) = td->td_kstack_pages * PAGE_SIZE - sizeof(struct pcb); \ + (total) = ptoa(td->td_kstack_pages) - sizeof(struct pcb); \ (used) = td->td_kstack + (total) - (char *)&td; \ } while (0) From nobody Wed May 27 14:59:29 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQXpB05jPz6f91g for ; Wed, 27 May 2026 14:59: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQXp95pWwz3HK4 for ; Wed, 27 May 2026 14:59:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779893969; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tGvuZf+1OiCGxuaAli6qHIKfTWq4rrcr/BIeTo8/5j8=; b=Z4QGOcITtu5bEzxd6c5Z/L6p9kvrylrMgEqLk5FxxxLP8UGadesVpnp4FYr+dashDQx3ZX xn6EATKThaVOiXPliASwoGDXlJug4VzqzwVUwRdkUXjONv/usYJIeQzxz49vCVqlGRfyXh 2tnejZm71fqpGDKm0WY4gSqW6sS3fSU1t3C4DaqVqT9ybYp1RzqmEFjnZae+5eknGRZB8P 9EWTTPAyqiCByx+NzhFW3fClQgX0N5hSfkdgHx14CrqyOlkCrNJL/xG0n2vODtCwfUVaTV oWnC8KkkNn4OAM+OuUzMuQztj3BD0y5/VqTxrbdCEOajPoS8AlEBWgSLMgH5jQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779893969; a=rsa-sha256; cv=none; b=VcbnsHYxRu8MbUs0nyWnmt5W3dzu3pHDQyMrXb+1qHz56Xx0APKHCu22ZBatVQxQzknPkB eYg0VLLU1cLhkZpr76jlmZyJcWXIi08F8/vjtgV45B9HXl3KjblFGRl3j/dFtcrP5I/4zB cYTMblrg7iN0nzb4v8+mjfcnUjD6C5pqaILizqixzxPgmVR6OarMfp+F5igqkiWcvCQliM nSs4wXf4KCo5tDdVToM8xFbp/TMqHaQFMVzULTvNhKaVi8qdYVvzGwUYfJ+L6bOWcR+ylq imbL4ehdEE0ebyveu9CJvY7QkhiDAq3a92Nopw0SnqPoScgHL5EjjKdkjhp3aA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779893969; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tGvuZf+1OiCGxuaAli6qHIKfTWq4rrcr/BIeTo8/5j8=; b=LG89pkCTm5f9PcbQOHlKwl9GDhim43NjqkOK1WhxjITQ/7XGRXFo+p44ffTUy6+ZwwJmzi I2qos6OCaJ2v0S7dPHokfM/2RFNYeJ/xGiy43JCslz/yiyoOJxug2bBdeZELy49WjkxUtz nYFJXN/105CWryycuNkpOv379ajC/iMRhpa5Yu+B/pHP2iArRTupOhfqZKJ5tqiM1yJDjC eE7hmBLNe7a26eE3l0FBOvo4ZEjqPk62rILI2AyMIB5Dn9NbLXIEiXjgenCinyjZIz789w pX3htF7+5thaOq21nJqJdjE4fMqRQ8cJ812J0srrkLnpnxsHFljuSBkRNnb01A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQXp958Yyz14FX for ; Wed, 27 May 2026 14:59:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 22d4f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 14:59:29 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: d0b10df718e3 - main - arm64: Move pcb out of kstack into a new UMA zone List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d0b10df718e3560cd041ba9ddb157591ac7fa886 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 14:59:29 +0000 Message-Id: <6a1706d1.22d4f.1910a0d4@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=d0b10df718e3560cd041ba9ddb157591ac7fa886 commit d0b10df718e3560cd041ba9ddb157591ac7fa886 Author: John Baldwin AuthorDate: 2026-03-25 15:18:05 +0000 Commit: John Baldwin CommitDate: 2026-05-27 13:45:26 +0000 arm64: Move pcb out of kstack into a new UMA zone This is similar to commit 5e921ff49ea8bb70506248a4675894729cdad8c2 which moved the pcb for amd64, but a bit different. arm64's pcb is much larger (over 1KB!) than amd64's since it still embeds FP registers. Moving the pcb out of the kstack frees up that much additional kstack space. Unlike amd64 however, embedding the pcb in struct mdthread is not practical as the resulting struct thread would grow such that UMA would now store 1 thread per 4k page instead of 2 threads per page. By using a separate UMA zone for pcbs, 2 struct threads can continue to fit in a single 4k page, and 3 pcbs can fit in another 4k page. Reviewed by: kib, jrtc27, andrew Sponsored by: AFRL, DARPA Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/23 --- sys/arm64/arm64/genassym.c | 2 -- sys/arm64/arm64/locore.S | 3 +-- sys/arm64/arm64/machdep.c | 3 ++- sys/arm64/arm64/vm_machdep.c | 18 ++++++++++++++---- sys/arm64/include/stack.h | 6 ++---- 5 files changed, 19 insertions(+), 13 deletions(-) diff --git a/sys/arm64/arm64/genassym.c b/sys/arm64/arm64/genassym.c index 22696796e69d..b54f446e83bd 100644 --- a/sys/arm64/arm64/genassym.c +++ b/sys/arm64/arm64/genassym.c @@ -53,8 +53,6 @@ ASSYM(PC_CURPCB, offsetof(struct pcpu, pc_curpcb)); ASSYM(PC_CURTHREAD, offsetof(struct pcpu, pc_curthread)); ASSYM(PC_SSBD, offsetof(struct pcpu, pc_ssbd)); -/* Size of pcb, rounded to keep stack alignment */ -ASSYM(PCB_SIZE, roundup2(sizeof(struct pcb), STACKALIGNBYTES + 1)); ASSYM(PCB_SINGLE_STEP_SHIFT, PCB_SINGLE_STEP_SHIFT); ASSYM(PCB_REGS, offsetof(struct pcb, pcb_x)); ASSYM(PCB_X19, PCB_X19); diff --git a/sys/arm64/arm64/locore.S b/sys/arm64/arm64/locore.S index b200aa93c281..bd61b485edf7 100644 --- a/sys/arm64/arm64/locore.S +++ b/sys/arm64/arm64/locore.S @@ -128,8 +128,7 @@ virtdone: /* Set up the stack */ adrp x25, initstack_end - add x25, x25, :lo12:initstack_end - sub sp, x25, #PCB_SIZE + add sp, x25, :lo12:initstack_end /* Zero the BSS */ ldr x15, .Lbss diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c index 6b6dd2c510a2..d33208a0819d 100644 --- a/sys/arm64/arm64/machdep.c +++ b/sys/arm64/arm64/machdep.c @@ -131,6 +131,7 @@ uintptr_t boot_canary = 0x49a2d892bc05a0b1ul; #endif static struct trapframe proc0_tf; +static struct pcb pcb0; int early_boot = 1; int cold = 1; @@ -443,7 +444,7 @@ init_proc0(void *kstack) #if defined(PERTHREAD_SSP) thread0.td_md.md_canary = boot_canary; #endif - thread0.td_pcb = (struct pcb *)td_kstack_top(&thread0) - 1; + thread0.td_pcb = &pcb0; thread0.td_pcb->pcb_flags = 0; thread0.td_pcb->pcb_fpflags = 0; thread0.td_pcb->pcb_fpusaved = &thread0.td_pcb->pcb_fpustate; diff --git a/sys/arm64/arm64/vm_machdep.c b/sys/arm64/arm64/vm_machdep.c index 29a1c8667e7d..3789dd318c49 100644 --- a/sys/arm64/arm64/vm_machdep.c +++ b/sys/arm64/arm64/vm_machdep.c @@ -27,8 +27,8 @@ #include "opt_platform.h" -#include #include +#include #include #include #include @@ -61,6 +61,8 @@ */ cpu_reset_hook_t cpu_reset_hook = psci_reset; +static uma_zone_t pcb_zone; + /* * Finish a fork operation, with process p2 nearly set up. * Copy and update the pcb, set up the stack so that the child @@ -260,20 +262,20 @@ cpu_thread_exit(struct thread *td) void cpu_thread_alloc(struct thread *td) { + td->td_pcb = uma_zalloc(pcb_zone, M_WAITOK); ptrauth_thread_alloc(td); } void cpu_thread_new_kstack(struct thread *td) { - td->td_pcb = (struct pcb *)td_kstack_top(td) - 1; - td->td_frame = (struct trapframe *)STACKALIGN( - (struct trapframe *)td->td_pcb - 1); + td->td_frame = (struct trapframe *)td_kstack_top(td) - 1; } void cpu_thread_free(struct thread *td) { + uma_zfree(pcb_zone, td->td_pcb); } void @@ -333,3 +335,11 @@ cpu_sync_core(void) * return from ELx is a context synchronization event. */ } + +static void +pcbinit(void *dummy __unused) +{ + pcb_zone = uma_zcreate("pcb", sizeof(struct pcb), NULL, NULL, NULL, + NULL, UMA_ALIGNOF(struct pcb), 0); +} +SYSINIT(pcbinit, SI_SUB_INTRINSIC, SI_ORDER_ANY, pcbinit, NULL); diff --git a/sys/arm64/include/stack.h b/sys/arm64/include/stack.h index 0aa483e15e64..23e7a5af27de 100644 --- a/sys/arm64/include/stack.h +++ b/sys/arm64/include/stack.h @@ -39,11 +39,9 @@ bool unwind_frame(struct thread *, struct unwind_state *); #ifdef _SYS_PROC_H_ -#include - #define GET_STACK_USAGE(total, used) do { \ struct thread *td = curthread; \ - (total) = ptoa(td->td_kstack_pages) - sizeof(struct pcb); \ + (total) = ptoa(td->td_kstack_pages); \ (used) = td->td_kstack + (total) - (char *)&td; \ } while (0) @@ -51,7 +49,7 @@ static __inline bool kstack_contains(struct thread *td, vm_offset_t va, size_t len) { return (va >= (vm_offset_t)td->td_kstack && va + len >= va && - va + len <= (vm_offset_t)td_kstack_top(td) - sizeof(struct pcb)); + va + len <= (vm_offset_t)td_kstack_top(td)); } #endif /* _SYS_PROC_H_ */ From nobody Wed May 27 14:59:30 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQXpC1T0Dz6f98S for ; Wed, 27 May 2026 14:59: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQXpB6jC9z3HN1 for ; Wed, 27 May 2026 14:59:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779893971; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CbtDeE5XlzLnVJ3wVM3Oxr+MztxJu0WkCBJPV3Ex3mI=; b=DyLWi/zqYhnNUyztYP/Gyp6+5vHsPu/Ug8V6B4aXLw/ooSs063Jrjt4SAy8udNCFKQ7WwM kwNx19YEgVi609y77dTtPaAbMCkf708gxQNPhvw43RYrTNmy66QJsOjx+UDE84dlywjkF0 oLi+uwrvnhxGgHfxlPH//X5HSLgEXSxPC9CaKOii9so3hb6yRqAs38buHDhfFjB+sj1U1G lvTthcbrMYi9v2cH4sS0szamcn4GOpP+lIYPqmO2UBKkW1TlS917oPKQAI4tO6XVEj9wVM WH/+BBWwreL5BwmxD9xj/b2bsr/livu8mnrYCz1DQTSGok1vz0sRNJBI8SJl1w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779893971; a=rsa-sha256; cv=none; b=P/ET3HiWJdkeHT09n9l88byCYaOPC4PamCzcIn3pZVV/STxxeaPf5c+GqnlFfpuhR7K6xS W1nq2bHQ/4Xzx+99+nKHIseDYWwdA8EPzwLd5K8iOY3mflzTeZJl9UAYp9EIpfMHEnDBbQ x5m496fZffOvqBpNQxjQ5vK6QSl1tFw1xxVEAz4cTaPEoQbpZIiGRXa8ehsGD2Q9v/q5mk b0BpufNtWNiLVSA2t+5KgkMMmecBny2b2eNAv9cH+wLML/2sGg9FxiLUyK/OXKQvxHp9eq OJrO6lBmrcCV6Xpo0519eICfMnJ0lytud2yMS2NQ0UbvTmpBj9InKiV11EEmWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779893971; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CbtDeE5XlzLnVJ3wVM3Oxr+MztxJu0WkCBJPV3Ex3mI=; b=RtkvkKBfYKXnMF6XmRm8xAH/kNvmKj74ea0wsIecalV92nf1j2WbUfhWEQ5L9bZXQq1t+O +fJtM/9a4PgXDa78+444on9T9SXte5qCqBFChh5+54lTztm94Mbw1TWh6srxTDHWDDUBG+ RXpAXkPktKKbgGWFrvf10kJgEHefpOirHygrxAJyg9LhrEbH0xtu6qVkOU8Rg2VPljPr+g xumDhOg9Uia2yUDQHgSS7Y2Y04oDwVCZPhiSqUftQGQTg1gVg7q95qwyVezrIpAs+L9apK 4NxXy5NmVY+ElEklmem0HDPVN+5E2DTIeV9+7CEE5WJJ2/m6cVq+gpARK3WN2A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQXpB63v6z1465 for ; Wed, 27 May 2026 14:59:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 22b35 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 14:59:30 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 4f876cec30af - main - riscv64: Move pcb out of kstack into a new UMA zone List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4f876cec30afca1a32d0187fc81d6c3ffd1abc30 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 14:59:30 +0000 Message-Id: <6a1706d2.22b35.2d945453@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=4f876cec30afca1a32d0187fc81d6c3ffd1abc30 commit 4f876cec30afca1a32d0187fc81d6c3ffd1abc30 Author: John Baldwin AuthorDate: 2026-03-28 15:19:53 +0000 Commit: John Baldwin CommitDate: 2026-05-27 13:45:26 +0000 riscv64: Move pcb out of kstack into a new UMA zone Similar to arm64, riscv's pcb embeds a copy of the floating point registers and is too large to store directly in struct mdthread as is done on amd64. Instead, use a separate UMA zone for pcbs. riscv's floating point state is not as large as arm64's, so its pcb is also somewhat smaller and a single 4k page can hold 6 pcbs. Reviewed by: kib, jrtc27 Sponsored by: AFRL, DARPA Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/23 --- sys/riscv/include/stack.h | 6 ++---- sys/riscv/riscv/genassym.c | 1 - sys/riscv/riscv/locore.S | 4 ++-- sys/riscv/riscv/machdep.c | 3 ++- sys/riscv/riscv/vm_machdep.c | 20 +++++++++++++++----- 5 files changed, 21 insertions(+), 13 deletions(-) diff --git a/sys/riscv/include/stack.h b/sys/riscv/include/stack.h index 5669dcda6c67..fac8d4f317b6 100644 --- a/sys/riscv/include/stack.h +++ b/sys/riscv/include/stack.h @@ -48,12 +48,10 @@ bool unwind_frame(struct thread *, struct unwind_state *); #ifdef _SYS_PROC_H_ -#include - /* Get the current kernel thread stack usage. */ #define GET_STACK_USAGE(total, used) do { \ struct thread *td = curthread; \ - (total) = ptoa(td->td_kstack_pages) - sizeof(struct pcb); \ + (total) = ptoa(td->td_kstack_pages); \ (used) = td->td_kstack + (total) - (char *)&td; \ } while (0) @@ -61,7 +59,7 @@ static __inline bool kstack_contains(struct thread *td, vm_offset_t va, size_t len) { return (va >= (vm_offset_t)td->td_kstack && va + len >= va && - va + len <= (vm_offset_t)td_kstack_top(td) - sizeof(struct pcb)); + va + len <= (vm_offset_t)td_kstack_top(td)); } #endif /* _SYS_PROC_H_ */ diff --git a/sys/riscv/riscv/genassym.c b/sys/riscv/riscv/genassym.c index c216c686db9a..998183e92db6 100644 --- a/sys/riscv/riscv/genassym.c +++ b/sys/riscv/riscv/genassym.c @@ -63,7 +63,6 @@ ASSYM(PMAP_MAPDEV_EARLY_SIZE, PMAP_MAPDEV_EARLY_SIZE); ASSYM(PM_SATP, offsetof(struct pmap, pm_satp)); ASSYM(PCB_ONFAULT, offsetof(struct pcb, pcb_onfault)); -ASSYM(PCB_SIZE, sizeof(struct pcb)); ASSYM(PCB_RA, offsetof(struct pcb, pcb_ra)); ASSYM(PCB_SP, offsetof(struct pcb, pcb_sp)); ASSYM(PCB_GP, offsetof(struct pcb, pcb_gp)); diff --git a/sys/riscv/riscv/locore.S b/sys/riscv/riscv/locore.S index 305ed8d79f10..e2126af5cad2 100644 --- a/sys/riscv/riscv/locore.S +++ b/sys/riscv/riscv/locore.S @@ -241,8 +241,8 @@ va: /* Clear frame pointer */ mv s0, zero - /* Allocate space for thread0 PCB and riscv_bootparams */ - addi sp, sp, -(PCB_SIZE + RISCV_BOOTPARAMS_SIZE) & ~STACKALIGNBYTES + /* Allocate space for riscv_bootparams */ + addi sp, sp, -RISCV_BOOTPARAMS_SIZE & ~STACKALIGNBYTES /* Clear BSS */ la t0, _C_LABEL(__bss_start) diff --git a/sys/riscv/riscv/machdep.c b/sys/riscv/riscv/machdep.c index 47d9636492db..f5479c479109 100644 --- a/sys/riscv/riscv/machdep.c +++ b/sys/riscv/riscv/machdep.c @@ -105,6 +105,7 @@ struct pcpu __pcpu[MAXCPU]; static struct trapframe proc0_tf; +static struct pcb pcb0; int early_boot = 1; int cold = 1; @@ -296,7 +297,7 @@ init_proc0(void *kstack) proc_linkup0(&proc0, &thread0); thread0.td_kstack = kstack; thread0.td_kstack_pages = KSTACK_PAGES; - thread0.td_pcb = (struct pcb *)td_kstack_top(&thread0) - 1; + thread0.td_pcb = &pcb0; thread0.td_pcb->pcb_fpflags = 0; thread0.td_frame = &proc0_tf; pcpup->pc_curpcb = thread0.td_pcb; diff --git a/sys/riscv/riscv/vm_machdep.c b/sys/riscv/riscv/vm_machdep.c index 1810fe88283c..e538921c9f60 100644 --- a/sys/riscv/riscv/vm_machdep.c +++ b/sys/riscv/riscv/vm_machdep.c @@ -32,8 +32,8 @@ * SUCH DAMAGE. */ -#include #include +#include #include #include #include @@ -58,23 +58,23 @@ #define TP_OFFSET 16 /* sizeof(struct tcb) */ #endif +static uma_zone_t pcb_zone; + void cpu_thread_new_kstack(struct thread *td) { - td->td_pcb = (struct pcb *)td_kstack_top(td) - 1; - /* * td->td_frame + TF_SIZE will be the saved kernel stack pointer whilst * in userspace, so keep it aligned so it's also aligned when we * subtract TF_SIZE in the trap handler (and here for the initial stack * pointer). This also keeps the struct kernframe just afterwards - * aligned no matter what's in it or struct pcb. + * aligned no matter what's in it. * * NB: TF_SIZE not sizeof(struct trapframe) as we need the rounded * value to match the trap handler. */ td->td_frame = (struct trapframe *)(STACKALIGN( - (char *)td->td_pcb - sizeof(struct kernframe)) - TF_SIZE); + td_kstack_top(td) - sizeof(struct kernframe)) - TF_SIZE); } /* @@ -227,11 +227,13 @@ cpu_thread_exit(struct thread *td) void cpu_thread_alloc(struct thread *td) { + td->td_pcb = uma_zalloc(pcb_zone, M_WAITOK); } void cpu_thread_free(struct thread *td) { + uma_zfree(pcb_zone, td->td_pcb); } void @@ -285,3 +287,11 @@ cpu_sync_core(void) { fence_i(); } + +static void +pcbinit(void *dummy __unused) +{ + pcb_zone = uma_zcreate("pcb", sizeof(struct pcb), NULL, NULL, NULL, + NULL, UMA_ALIGNOF(struct pcb), 0); +} +SYSINIT(pcbinit, SI_SUB_INTRINSIC, SI_ORDER_ANY, pcbinit, NULL); From nobody Wed May 27 15:24:08 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQYLc5ptlz6fBXQ for ; Wed, 27 May 2026 15:24: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQYLc2p8Bz3PjB for ; Wed, 27 May 2026 15:24:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779895448; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n6bJY6dgrNPH4Iy0mq4d6Vs3mNsgDejZ4L0qtBEs0aE=; b=VTIhxTSgMA7zJpVGBMYSZEhfjLAGS3aApZCgL/Fkml0riHyz3zI8vhykObpxCYyD2wvz79 RqKNnXppb8Ffbaoaa9HdUvHtjPk8nGBEAMnFIF6eqGgHECyydOqurv+a6jTDq2Acg13L88 QpXh5KD7PHZTQNVzh0so5udOUUFTtE3hVoF286ZFajMp4kZLlOT+sBfV3SEJTW42mZW4cR qdjYS449zSYCE1F25y5idCD5JcvTue1cuaGwYpJzLYX0ndaNPzs36lAzvvH26ADFKt23Rz 4cyO+6XC4FffN9nJkXOE8Lf5ZwkYdikiNkl02CNyksrYmG4UcI6c5UoXcKGCFg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779895448; a=rsa-sha256; cv=none; b=FueMWV5U1ugfz/mp5dj2kk9pcggV/HoigI/ZBkwo3r5u5hHm+K4XW2pXQIevyHFix2u2Ua 2Et4XD6XE0ez5xNE22SjHcEbQTOAS3lVSBp8SORcug1+yFZ7ROMO286VJzSqIo6y4KFSsq uQj+B9RetPGDkHsfUqEXiAj1+014+QYzFrjOHKJNMLmKdXaai1zOzukYZFtEUZCfo5W7P6 Q9dbNyvYXWjqlBKTdzqLX0qJuIxCp/DhtUKG1zkKk2RmQpj+QijLrPX0Q74R46ISemiQxp 7KKMtiQRNW4sIpHsPduKhxZLQev8DgA3fP61mNQWcvry7miuH9H8YbTwYWf3AA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779895448; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n6bJY6dgrNPH4Iy0mq4d6Vs3mNsgDejZ4L0qtBEs0aE=; b=QyeE0FCNz6w7oeIAYEWQUrzUTWrOg+K21B5i03iI3Qb9mwrtxX6fkQELMedKlneIqNddJ3 jjpco4nJ/3hHWeQYMHEi8+g21xqmrmbdsY7dCDTtnXbuEOCfo0tCy6mVDnz6ozFNxP2zmL eVKA7ApJYNvD1f//LRAoyZs4rYwkmRSGSxVLqucPere7ko8Hn9dpeWuSkPRVSchgyyHKi1 gR3MEi/u6jtYqQOf+AKN9ZjkztJwJaTFk6MSK0zMnBBkzjbnkcstu+k4yjS6CD7SXd5Ddr u9P+9DnGdgR3u3d5zA1YeEt2ThdVnJP4kwa2mE79EpEDGMws+/nd9Wl9pXXrNg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQYLc2Ms4z14nn for ; Wed, 27 May 2026 15:24:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2793d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 15:24:08 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 48da01ad0b16 - main - arm64: Add a comment about HWCAP values List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 48da01ad0b165b4dd38a4c22449216c1babc068b Auto-Submitted: auto-generated Date: Wed, 27 May 2026 15:24:08 +0000 Message-Id: <6a170c98.2793d.d955f47@gitrepo.freebsd.org> The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=48da01ad0b165b4dd38a4c22449216c1babc068b commit 48da01ad0b165b4dd38a4c22449216c1babc068b Author: Andrew Turner AuthorDate: 2026-05-14 15:04:32 +0000 Commit: Andrew Turner CommitDate: 2026-05-27 15:22:25 +0000 arm64: Add a comment about HWCAP values They must be identical to Linux. Document this requirement to allow userspace to depend on this. Sponsored by: Arm Ltd --- sys/arm64/include/elf.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/arm64/include/elf.h b/sys/arm64/include/elf.h index a5a90f8c7712..7940bb259256 100644 --- a/sys/arm64/include/elf.h +++ b/sys/arm64/include/elf.h @@ -96,6 +96,12 @@ __ElfType(Auxinfo); /* First __FreeBSD_version that supports Top Byte Ignore (TBI) */ #define TBI_VERSION 1500058 +/* + * The HWCAP values must be identical to Linux. Many userspace programs + * will define missing HWCAP values to the Linux version. To keep these + * working when we add the HWCAP it must be the same. + */ + /* HWCAP */ #define HWCAP_FP (1 << 0) #define HWCAP_ASIMD (1 << 1) From nobody Wed May 27 15:24:09 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQYLd63ZNz6fBTg for ; Wed, 27 May 2026 15:24: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQYLd3gDWz3Pfy for ; Wed, 27 May 2026 15:24:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779895449; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iJRTnMA2mTmAstppENquvlHtN8EYRbJ6FbrgHnsFjZ8=; b=qp8gWMTDwsZ7ubeIVZwKfVs853A/1k5xzts57REK5fMkh/uMsVcPVtdDpK13Bl75xENj8r bgZOlq3NLHYUewxQscOoxL+78QLFUwqdX/w0WGHlpKHhBJvLlHgfIBWwMFZRQKwXcm67F7 OGHYE7kkcVPcRvqFR5cmRgQE0aDm1gItHbE59yj9EFUXP8FtxHGQbqUz4bA9nE6b8Nye3M I/pnYm0Zmp1kI3clzzzyn/xn//yOPt/sdp62PGNC6VH9MaU5ZDq1RlBJXlKtW7kXqaCw4B /wwDeKOMY/qRAeutAgGoNTVrEea3afnVyu3VKUbm+rgVR8y8f1sDIqyPqAnLuQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779895449; a=rsa-sha256; cv=none; b=NLF2aQvZXINNMFiw0U+3vnbHnbYNb2yLQFZ6JDUnofYIGTMJf+LhTHWDGIVsQ+67cUbcMr b9MN7vvwDXMwQdUGH+qJ5bMuGq1pK8CGlJAhWHkZpGSzxs+mMd2QPQ9ruKKLCfhD7RPwvB 0rOgY5YC5LWPnGL3gJkv6kaIL6H8oGbplXYPxxVqgByNTteptLPouyycSpjVrGo4W7phg+ PiARYzTS8hz+hnPpkR8LnfKUffSWGjB8cQFJKwPuFwNb5sOFD0un8KNp+duMjcmdb21j2c q0m36t2hZ0paG+n0sG+Rf3c1J/69W1HRJgx0sP9UAas0JIDBUyVLha85kurT+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779895449; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iJRTnMA2mTmAstppENquvlHtN8EYRbJ6FbrgHnsFjZ8=; b=xHP2zBHLqLjkPY14CHKbja24+Xzeu1n8z2R/baZJ/ZOLI8GX6MObeP5M9wzZRCb6qGVOxN +dhd3aH5lzvmyf101RcN4wmEUISTFeg3M22OC3621v4RCcGSGKPRKuflhH9gKi43cGmy9R Rv4P7+4nJRtdQKxJpUKqF98Z3PR39XiuqBiptp5oQZSPps6Ov8KjbbvTQUwlyVMvgWXf7Y NPggUZcKaG4JOwIeCsXBLDlkpNTbLcWEDRwhxUSxg4injJJXg4/ImOMUDY5e+5YE0Cxn5G pSBwzytyavmU67oua1UyFuuro0ve1KYt2XjtEKVux//jKkuk53CqTxqlqTQMEA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQYLd3C7rz14Q4 for ; Wed, 27 May 2026 15:24:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27186 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 15:24:09 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: a780d21eab97 - main - arm64: Support changing the DMAP memory type List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a780d21eab9724b0667df84b02074994595d51c7 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 15:24:09 +0000 Message-Id: <6a170c99.27186.58925c24@gitrepo.freebsd.org> The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=a780d21eab9724b0667df84b02074994595d51c7 commit a780d21eab9724b0667df84b02074994595d51c7 Author: Andrew Turner AuthorDate: 2026-05-15 15:16:57 +0000 Commit: Andrew Turner CommitDate: 2026-05-27 15:22:25 +0000 arm64: Support changing the DMAP memory type When MTE is enabled we will use the DMAP to manage tags. To be able to read/write them we need to change the memory attribute to VM_MEMATTR_TAGGED. Support changing the DMAP memory type to values known to have equivalent cache properties. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D55949 --- sys/arm64/arm64/pmap.c | 64 ++++++++++++++++++++++++++++++++++++++---------- sys/arm64/include/pmap.h | 1 + 2 files changed, 52 insertions(+), 13 deletions(-) diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index adc583812e5b..fd4232711697 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -358,6 +358,7 @@ struct pv_chunks_list __exclusive_cache_line pv_chunks[PMAP_MEMDOM]; vm_paddr_t dmap_phys_base; /* The start of the dmap region */ vm_paddr_t dmap_phys_max; /* The limit of the dmap region */ vm_offset_t dmap_max_addr; /* The virtual address limit of the dmap */ +static int dmap_attr = VM_MEMATTR_WRITE_BACK; extern pt_entry_t pagetable_l0_ttbr1[]; @@ -483,7 +484,7 @@ static void pmap_abort_ptp(pmap_t pmap, vm_offset_t va, vm_page_t mpte); static bool pmap_activate_int(struct thread *td, pmap_t pmap); static void pmap_alloc_asid(pmap_t pmap); static int pmap_change_props_locked(void *addr, vm_size_t size, - vm_prot_t prot, int mode, bool skip_unmapped); + vm_prot_t prot, int mode, int old_mode, bool skip_unmapped); static bool pmap_copy_l3c(pmap_t pmap, pt_entry_t *l3p, vm_offset_t va, pt_entry_t l3e, vm_page_t ml3, struct rwlock **lockp); static pt_entry_t *pmap_demote_l1(pmap_t pmap, pt_entry_t *l1, vm_offset_t va); @@ -8161,7 +8162,7 @@ pmap_unmapbios(void *p, vm_size_t size) /* Ensure the attributes are as expected for the DMAP region */ PMAP_LOCK(kernel_pmap); error = pmap_change_props_locked(va, size, - PROT_READ | PROT_WRITE, VM_MEMATTR_DEFAULT, false); + PROT_READ | PROT_WRITE, VM_MEMATTR_DEFAULT, -1, false); PMAP_UNLOCK(kernel_pmap); KASSERT(error == 0, ("%s: Failed to reset DMAP attributes: %d", __func__, error)); @@ -8267,7 +8268,25 @@ pmap_change_attr(void *va, vm_size_t size, int mode) int error; PMAP_LOCK(kernel_pmap); - error = pmap_change_props_locked(va, size, PROT_NONE, mode, false); + error = pmap_change_props_locked(va, size, PROT_NONE, mode, -1, false); + PMAP_UNLOCK(kernel_pmap); + return (error); +} + +int +pmap_change_dmap_attr(int mode) +{ + int error; + + KASSERT(mode == VM_MEMATTR_WRITE_BACK || + mode == VM_MEMATTR_TAGGED, + ("%s: mode %d must be compatible with write-back", __func__, mode)); + + PMAP_LOCK(kernel_pmap); + error = pmap_change_props_locked((void *)DMAP_MIN_ADDRESS, + dmap_max_addr - DMAP_MIN_ADDRESS, PROT_NONE, mode, dmap_attr, true); + if (error == 0) + dmap_attr = mode; PMAP_UNLOCK(kernel_pmap); return (error); } @@ -8289,20 +8308,20 @@ pmap_change_prot(void *va, vm_size_t size, vm_prot_t prot) return (EINVAL); PMAP_LOCK(kernel_pmap); - error = pmap_change_props_locked(va, size, prot, -1, false); + error = pmap_change_props_locked(va, size, prot, -1, -1, false); PMAP_UNLOCK(kernel_pmap); return (error); } static int pmap_change_props_locked(void *addr, vm_size_t size, vm_prot_t prot, - int mode, bool skip_unmapped) + int mode, int old_mode, bool skip_unmapped) { vm_offset_t base, offset, tmpva, va; vm_size_t pte_size; vm_paddr_t pa; pt_entry_t pte, *ptep, *newpte; - pt_entry_t bits, mask; + pt_entry_t bits, mask, old_mode_bits, old_mode_mask; char *tmpptep; int lvl, rv; @@ -8316,8 +8335,8 @@ pmap_change_props_locked(void *addr, vm_size_t size, vm_prot_t prot, !(base >= VM_MIN_KERNEL_ADDRESS && base < VM_MAX_KERNEL_ADDRESS)) return (EINVAL); - bits = 0; - mask = 0; + bits = old_mode_bits = 0; + mask = old_mode_mask = 0; if (mode != -1) { bits = ATTR_S1_IDX(mode); mask = ATTR_S1_IDX_MASK; @@ -8326,6 +8345,10 @@ pmap_change_props_locked(void *addr, vm_size_t size, vm_prot_t prot, bits |= ATTR_S1_XN; } } + if (old_mode != -1) { + old_mode_bits = ATTR_S1_IDX(old_mode); + old_mode_mask = ATTR_S1_IDX_MASK; + } if (prot != VM_PROT_NONE) { /* Don't mark the DMAP as executable. It never is on arm64. */ if (VIRT_IN_DMAP(base)) { @@ -8353,11 +8376,14 @@ pmap_change_props_locked(void *addr, vm_size_t size, vm_prot_t prot, if (ptep == NULL && !skip_unmapped) { return (EINVAL); } else if ((ptep == NULL && skip_unmapped) || - (pmap_load(ptep) & mask) == bits) { + (pmap_load(ptep) & mask) == bits || + (pmap_load(ptep) & old_mode_mask) != old_mode_bits) { /* - * We already have the correct attribute or there - * is no memory mapped at this address and we are - * skipping unmapped memory. + * We already have one of the following meaning + * we can skip this memory region:: + * - No memory mapped at this address + * - The new attributes are already set + * - The expected attributes are incorrect */ switch (lvl) { default: @@ -8487,12 +8513,24 @@ pmap_change_props_locked(void *addr, vm_size_t size, vm_prot_t prot, pa = PTE_TO_PHYS(pte); if (!VIRT_IN_DMAP(tmpva) && PHYS_IN_DMAP(pa)) { + int dmap_mode; + + /* + * When booting on HW with MTE enabled we may + * need to swap to a tagged type for the DMAP + * to allow tags to be set through it. + */ + if (mode == VM_MEMATTR_WRITE_BACK) + dmap_mode = dmap_attr; + else + dmap_mode = mode; + /* * Keep the DMAP memory in sync. */ rv = pmap_change_props_locked( PHYS_TO_DMAP(pa), pte_size, - prot, mode, true); + prot, dmap_mode, old_mode, true); if (rv != 0) return (rv); } diff --git a/sys/arm64/include/pmap.h b/sys/arm64/include/pmap.h index 00b54a874e12..1d90e8d472f2 100644 --- a/sys/arm64/include/pmap.h +++ b/sys/arm64/include/pmap.h @@ -148,6 +148,7 @@ void pmap_activate_vm(pmap_t); void pmap_bootstrap_dmap(vm_size_t); void pmap_bootstrap(void); int pmap_change_attr(void *va, vm_size_t size, int mode); +int pmap_change_dmap_attr(int); int pmap_change_prot(void *va, vm_size_t size, vm_prot_t prot); void pmap_kenter(vm_offset_t sva, vm_size_t size, vm_paddr_t pa, int mode); void pmap_kenter_device(vm_offset_t, vm_size_t, vm_paddr_t); From nobody Wed May 27 15:24:10 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQYLf6nqfz6fBTm for ; Wed, 27 May 2026 15:24: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQYLf4Rf9z3PjF for ; Wed, 27 May 2026 15:24:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779895450; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lfWD9yqqUC0rZYEJMmGyf1+Jj6scJ7+9GlFcXn3B7TI=; b=GD6DwudmRuGfGCmLm99SZUZLTkhWUoDsf4htHZ/roEkAbmpLhcBPFJ68p2VqnDEfZsPBjP 0LfMtfN92GdrbLabg5BWEqQ/DAB8HLqjX8RIBVWf9YkC4JayBLkjfY+1A4KN77BTz27WJR ttOMVa32emTgk5prt4eCn4Uf+mMacHQraNFw+zysERYk9EgEkatp/b1w6m4BInMCOIuhRl DRInM8FMiAvWP5KbNvbipolYtltPkwlJBd1rukwdW+iOUX0gZN5giNR/OYXwCylXoHf40a xU2kqTxssPLY3y2acnn46IEIz76mtc7ZHo8Ci5ztLvjLXTtuecSyiTNN2UAJPg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779895450; a=rsa-sha256; cv=none; b=eMvxl/Rh5pSZGAugrXiKMRYuwXxhZIMHBfAh2vtwl+h6oax+xEodwwbVhTEOooyUDTea7x BkOyeBHRsJG8LBLH99HXyHZWGL7nUs2/Yft4aI0mFMT6ONhHybDuoIUXHJGbfGA+Mt2Cj6 4GwwFVPCkSK3qQrDMYCoeWMZa0DmaCqr3n93osCrDxJZbOnlparcU/7I+frBwx1VuRnsyH 0gAqpX08QGSZpcoVNz3ZBaTjcQqC4orEw/QRz4k3tRi7qiyHrvLZUZxwSG5CHKbAtIOhtc g0Urb6lPoDM1z4m/PJHYInUrtDqrgbQTlyMdJNDM/hiCK6YIHBbopLSi9vepnQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779895450; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lfWD9yqqUC0rZYEJMmGyf1+Jj6scJ7+9GlFcXn3B7TI=; b=PmAh2vJ2puuz2rfsxiExIATd6kAC4mC7aUSplD0bYhXSI6Z5AiOpLDkz8rZJtYGzluIBrM jU6zFB0MMkAC7nyfoOFVZEnbVxodT11Qzeh0+moyRs+oodLeDCGOM65FgXvAu3EmoLt2XY KfFuvO23L+BtcsPCQKmGfG0h9GBEADlibXkMNOpehXTwkFDV7dmogiW8c/RI1YSjHkvoDS ResoOJumZFoutPDITNUobgabyGMhJQwYSEK4IBcom6I5/tLDM5vvZgvr8/42n6Isr4r0/l SP1bWXkU6AZBG0Ttp+WU2RdO64zWaDvo9lobG01ZENvGV8EUZsGecAM5ViDQ5w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQYLf41Ztz14np for ; Wed, 27 May 2026 15:24:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26de4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 15:24:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 5a6ae4230b04 - main - arm64: Manage the MTE state like pointer auth List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5a6ae4230b046854641b8f80bff0f77fc0e5caae Auto-Submitted: auto-generated Date: Wed, 27 May 2026 15:24:10 +0000 Message-Id: <6a170c9a.26de4.67262417@gitrepo.freebsd.org> The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=5a6ae4230b046854641b8f80bff0f77fc0e5caae commit 5a6ae4230b046854641b8f80bff0f77fc0e5caae Author: Andrew Turner AuthorDate: 2026-05-15 15:27:53 +0000 Commit: Andrew Turner CommitDate: 2026-05-27 15:22:25 +0000 arm64: Manage the MTE state like pointer auth Add the same group of functions we use to manage pointer authentication in userspace threads. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D55951 --- sys/arm64/arm64/exec_machdep.c | 1 + sys/arm64/arm64/machdep.c | 1 + sys/arm64/arm64/mte.c | 112 +++++++++++++++++++++++++++++++++++++++++ sys/arm64/arm64/swtch.S | 6 ++- sys/arm64/arm64/vm_machdep.c | 3 ++ sys/arm64/include/cpu.h | 7 +++ sys/arm64/include/proc.h | 2 +- sys/conf/files.arm64 | 1 + 8 files changed, 130 insertions(+), 3 deletions(-) diff --git a/sys/arm64/arm64/exec_machdep.c b/sys/arm64/arm64/exec_machdep.c index a2e1e42249b4..d0a7302e2f7d 100644 --- a/sys/arm64/arm64/exec_machdep.c +++ b/sys/arm64/arm64/exec_machdep.c @@ -471,6 +471,7 @@ exec_setregs(struct thread *td, struct image_params *imgp, uintptr_t stack) /* Generate new pointer authentication keys */ ptrauth_exec(td); + mte_exec(td); } /* Sanity check these are the same size, they will be memcpy'd to and from */ diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c index d33208a0819d..f35ec7ab2e2e 100644 --- a/sys/arm64/arm64/machdep.c +++ b/sys/arm64/arm64/machdep.c @@ -451,6 +451,7 @@ init_proc0(void *kstack) thread0.td_pcb->pcb_vfpcpu = UINT_MAX; thread0.td_frame = &proc0_tf; ptrauth_thread0(&thread0); + mte_thread0(&thread0); pcpup->pc_curpcb = thread0.td_pcb; /* diff --git a/sys/arm64/arm64/mte.c b/sys/arm64/arm64/mte.c new file mode 100644 index 000000000000..88f394dc72c3 --- /dev/null +++ b/sys/arm64/arm64/mte.c @@ -0,0 +1,112 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2024-2026 Arm Ltd + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +/* Version of MTE implemented. 0 == unimplemented */ +static u_int __read_mostly mte_version = 0; + +/* + * FEAT_MTE (mte_version == 1) has userspace instructions, but no tag + * checking. May of the registers/fields need FEAT_MTE2 to be implemented + * before we can access them. + */ +#define MTE_HAS_TAG_CHECK (mte_version >= 2) + +struct thread *mte_switch(struct thread *); + +static void +mte_update_sctlr(struct thread *td, uint64_t sctlr) +{ + MPASS((sctlr & ~(SCTLR_ATA0 | SCTLR_TCF0_MASK)) == 0); + td->td_md.md_sctlr &= ~(SCTLR_ATA0 | SCTLR_TCF0_MASK); + td->td_md.md_sctlr |= sctlr; +} + +void +mte_fork(struct thread *new_td, struct thread *orig_td) +{ + if (!MTE_HAS_TAG_CHECK) + return; + + mte_update_sctlr(new_td, + orig_td->td_md.md_sctlr & SCTLR_TCF0_MASK); + new_td->td_md.md_gcr = orig_td->td_md.md_gcr; +} + +void +mte_exec(struct thread *td) +{ + if (!MTE_HAS_TAG_CHECK) + return; + + mte_update_sctlr(td, SCTLR_TCF0_NONE); + td->td_md.md_gcr = GCR_RRND; +} + +void +mte_copy_thread(struct thread *new_td, struct thread *orig_td) +{ + if (!MTE_HAS_TAG_CHECK) + return; + + mte_update_sctlr(new_td, + orig_td->td_md.md_sctlr & SCTLR_TCF0_MASK); + new_td->td_md.md_gcr = orig_td->td_md.md_gcr; +} + +/* Only for kernel threads */ +void +mte_thread_alloc(struct thread *td) +{ +} + +/* Only for a kernel thread */ +void +mte_thread0(struct thread *td) +{ +} + + +struct thread * +mte_switch(struct thread *td) +{ + if (MTE_HAS_TAG_CHECK) { + WRITE_SPECIALREG(GCR_EL1_REG, td->td_md.md_gcr); + } + return (td); +} diff --git a/sys/arm64/arm64/swtch.S b/sys/arm64/arm64/swtch.S index af2c278baecf..b349072c06f4 100644 --- a/sys/arm64/arm64/swtch.S +++ b/sys/arm64/arm64/swtch.S @@ -96,8 +96,9 @@ ENTRY(cpu_throw) mov x0, x1 #endif - /* This returns the thread pointer so no need to save it */ + /* These return the thread pointer so no need to save it */ bl ptrauth_switch + bl mte_switch #ifdef PERTHREAD_SSP mov x19, x0 #endif @@ -176,8 +177,9 @@ ENTRY(cpu_switch) mov x0, x1 #endif - /* This returns the thread pointer so no need to save it */ + /* These return the thread pointer so no need to save it */ bl ptrauth_switch + bl mte_switch /* This returns the thread pcb */ bl pmap_switch /* Move the new pcb out of the way */ diff --git a/sys/arm64/arm64/vm_machdep.c b/sys/arm64/arm64/vm_machdep.c index 3789dd318c49..635bdcef7025 100644 --- a/sys/arm64/arm64/vm_machdep.c +++ b/sys/arm64/arm64/vm_machdep.c @@ -98,6 +98,7 @@ cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags) bzero(&pcb2->pcb_dbg_regs, sizeof(pcb2->pcb_dbg_regs)); ptrauth_fork(td2, td1); + mte_fork(td2, td1); tf = td2->td_frame; bcopy(td1->td_frame, tf, sizeof(*tf)); @@ -200,6 +201,7 @@ cpu_copy_thread(struct thread *td, struct thread *td0) /* Generate new pointer authentication keys. */ ptrauth_copy_thread(td, td0); + mte_copy_thread(td, td0); } /* @@ -264,6 +266,7 @@ cpu_thread_alloc(struct thread *td) { td->td_pcb = uma_zalloc(pcb_zone, M_WAITOK); ptrauth_thread_alloc(td); + mte_thread_alloc(td); } void diff --git a/sys/arm64/include/cpu.h b/sys/arm64/include/cpu.h index 05844ad63036..8d8a80a8d02a 100644 --- a/sys/arm64/include/cpu.h +++ b/sys/arm64/include/cpu.h @@ -277,6 +277,13 @@ void ptrauth_thread0(struct thread *); void ptrauth_mp_start(uint64_t); #endif +/* Memory Tagging Extension (MTE) support */ +void mte_fork(struct thread *, struct thread *); +void mte_exec(struct thread *); +void mte_copy_thread(struct thread *, struct thread *); +void mte_thread_alloc(struct thread *); +void mte_thread0(struct thread *); + /* Functions to read the sanitised view of the special registers */ void update_special_regs(u_int); void update_special_reg_iss(u_int, uint64_t, uint64_t); diff --git a/sys/arm64/include/proc.h b/sys/arm64/include/proc.h index d5879a794269..a455ab098ee9 100644 --- a/sys/arm64/include/proc.h +++ b/sys/arm64/include/proc.h @@ -71,7 +71,7 @@ struct mdthread { int md_reserved0; uint64_t md_sctlr; - uint64_t md_reserved1; + uint64_t md_gcr; /* FEAT_MTE: Tag Control Register */ }; struct mdproc { diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index 172f79cc5773..2f6052da7e51 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -76,6 +76,7 @@ arm64/arm64/ofw_machdep.c optional fdt arm64/arm64/pl031_rtc.c optional fdt pl031 arm64/arm64/ptrauth.c standard \ compile-with "${NORMAL_C:N-mbranch-protection*} -mbranch-protection=bti" +arm64/arm64/mte.c standard arm64/arm64/pmap.c standard arm64/arm64/ptrace_machdep.c standard arm64/arm64/rsi.c standard From nobody Wed May 27 15:24:11 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQYLg70gkz6fBdJ for ; Wed, 27 May 2026 15:24:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQYLg51s1z3PQd for ; Wed, 27 May 2026 15:24:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779895451; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jXsfCtHjNTI4priY++dJBL6nUZP8gDPr4TOHoQGfah8=; b=uX0YjXyg4X+1RdeFm+RooOywuD5CfE7Gmrb+yCI37X7JJ//Apm8PkjcsSEZlYB0hhd1P9b 4hHsEt0zBeM9if9apEadQo1EMkWG5TwL+Caf+PXyvJ0FrY4NTYyKZiEx70wW4g8U5fHIgc 2B2IP+rinvhTJRlGTYy55bSG+63UhfxS7cQpIpXsaTIO8nnLC+VCJfPosVQ7uarKOdXuJq 7SyD0BqbwyuMVZJTuq3y0qMb4ffumh2KURvQlQGZDKTEvxMYhbRFoCf92fnUju3JFrc5gp +QSaYxqp+RIF+XzoV4NQk97hdGGp7Mm0tle2z95DTy2SU19b08PvHx29bmgnQw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779895451; a=rsa-sha256; cv=none; b=gJmngwjrhYQMD53SBZVBHE9B1dxrWIDktNkxewVuIbfaIKoIuOm0VMRxZvvf/LTzV195KR kSr7v0fUDtcBkPB8U2QZ3TBQCW0jKkmm2cID/BTLU33yavUgbsWHIUW/ZELX1EXi/E+da7 j/kplOkDpcPNAB/qwN5Q8Q6taPXAMpxtbgM05WO5nC/GykAWjEBnwnIHkf58eD70Bp8FtJ 0kugQf5Z1Akp1j2dqNi13YnNxbmp8WVf0UxSP3Yc3wRHcw89me9V5iUC6gMRsIG7xnOXPG jv9mmNCHlLInQc82X2TkPx7HgqIx0U9fzIWeUe3cgBV7jKbK3pMXlaW0lUivsg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779895451; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jXsfCtHjNTI4priY++dJBL6nUZP8gDPr4TOHoQGfah8=; b=ZiOuhQGOQB1hd98+BlvcjZF0VRXHY/alirvodrOFyIoJc16tT+VnHAUDhRUQi50B4TUF5K ZdDOqGqCakXEaYn4cleFMg/8y7EEauYADU5e0EUZaGxs7NZZDCedI2YsMky5jpmRhrhEZZ B8t8zmbm77NcLxkirb9o424zm0xL8du9exMJEwOH5A9OE37HIc29Qd/cZmxvynPmV+VX73 1DEPjYrbMI9bkvyuJc1dVm4bhIv+Ua5PGc/n5OHgndO6g1nJKutg8nEr0kxYbmurRBYn1b juz+FnMHeUfRevgRGzpwXDVW45c51gsYi7MDZVJHA3wlNddeEOVMz/jSxXQn9A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQYLg4b7Wz14g2 for ; Wed, 27 May 2026 15:24:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 272a9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 15:24:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 5cb511e62763 - main - arm64: Check for MTE tag failures on kernel entry List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5cb511e62763621cf7672db4294002411c3e897d Auto-Submitted: auto-generated Date: Wed, 27 May 2026 15:24:11 +0000 Message-Id: <6a170c9b.272a9.68b4c51d@gitrepo.freebsd.org> The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=5cb511e62763621cf7672db4294002411c3e897d commit 5cb511e62763621cf7672db4294002411c3e897d Author: Andrew Turner AuthorDate: 2026-05-15 16:13:33 +0000 Commit: Andrew Turner CommitDate: 2026-05-27 15:22:25 +0000 arm64: Check for MTE tag failures on kernel entry When entering the kernel from userspace we need to check for MTE tag failures when using asynchronous MTE. This is done by checking if either tag fault check types that have asynchronous checks are enabled, and if so check the register the result is stored. It then sets a flag the kernel can later use to raise a signal. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D55952 --- sys/arm64/arm64/exception.S | 36 ++++++++++++++++++++++++++++++++++-- sys/arm64/arm64/genassym.c | 3 +++ sys/arm64/include/proc.h | 4 +++- 3 files changed, 40 insertions(+), 3 deletions(-) diff --git a/sys/arm64/arm64/exception.S b/sys/arm64/arm64/exception.S index 5a4181348a54..5efbc4b36710 100644 --- a/sys/arm64/arm64/exception.S +++ b/sys/arm64/arm64/exception.S @@ -92,10 +92,34 @@ blr x1 1: - ldr x0, [x18, #PC_CURTHREAD] + ldr x19, [x18, #PC_CURTHREAD] + + ldr x1, [x19, #TD_MD_SCTLR] + /* + * If the upper bit in SCTLR_EL1.TCF0 is set we are either in async + * or asym modes. Either of which could set TFSRE0_EL1. + */ + tbz x1, #(SCTLR_TCF0_SHIFT + 1), 2f + /* Check for a tag fault */ + mrs x1, TFSRE0_EL1_REG + tbz x1, #TFSRE0_TF0_SHIFT, 2f + + /* + * A fault has happened, set MD_FLAG_MTE_ASYNC_FAULT. As FEAT_LSE + * is a required feature where FEAT_MTE_ASYNC could be implemented + * we can depend on it being present to set the flag. + */ + ldr w1, =MD_FLAG_MTE_ASYNC_FAULT + add x2, x19, #TD_MD_FLAGS +.arch_extension lse + stset w1, [x2] +.arch_extension nolse + +2: + mov x0, x19 bl ptrauth_exit_el0 - ldr x0, [x18, #(PC_CURTHREAD)] + mov x0, x19 bl dbg_monitor_enter /* Unmask debug and SError exceptions */ @@ -118,6 +142,14 @@ msr daifset, #(DAIF_ALL) .if \el == 0 ldr x0, [x18, #PC_CURTHREAD] + + ldr x1, [x0, #TD_MD_SCTLR] + /* See above for why we check this field */ + tbz x1, #(SCTLR_TCF0_SHIFT + 1), 1f + dsb ish + msr TFSRE0_EL1_REG, xzr +1: + mov x1, sp bl dbg_monitor_exit diff --git a/sys/arm64/arm64/genassym.c b/sys/arm64/arm64/genassym.c index b54f446e83bd..6c86f190282d 100644 --- a/sys/arm64/arm64/genassym.c +++ b/sys/arm64/arm64/genassym.c @@ -74,6 +74,9 @@ ASSYM(TD_FRAME, offsetof(struct thread, td_frame)); ASSYM(TD_LOCK, offsetof(struct thread, td_lock)); ASSYM(TD_MD_CANARY, offsetof(struct thread, td_md.md_canary)); ASSYM(TD_MD_EFIRT_TMP, offsetof(struct thread, td_md.md_efirt_tmp)); +ASSYM(TD_MD_FLAGS, offsetof(struct thread, td_md.md_flags)); +ASSYM(MD_FLAG_MTE_ASYNC_FAULT, MD_FLAG_MTE_ASYNC_FAULT); +ASSYM(TD_MD_SCTLR, offsetof(struct thread, td_md.md_sctlr)); ASSYM(TF_SIZE, sizeof(struct trapframe)); ASSYM(TF_SP, offsetof(struct trapframe, tf_sp)); diff --git a/sys/arm64/include/proc.h b/sys/arm64/include/proc.h index a455ab098ee9..22ceb614413d 100644 --- a/sys/arm64/include/proc.h +++ b/sys/arm64/include/proc.h @@ -69,7 +69,9 @@ struct mdthread { uint64_t md_efirt_tmp; int md_efirt_dis_pf; - int md_reserved0; + u_int md_flags; +#define MD_FLAG_MTE_ASYNC_FAULT_SHIFT 0 +#define MD_FLAG_MTE_ASYNC_FAULT (1u << 0) uint64_t md_sctlr; uint64_t md_gcr; /* FEAT_MTE: Tag Control Register */ }; From nobody Wed May 27 15:24:12 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQYLj1Hr7z6fBXY for ; Wed, 27 May 2026 15:24:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQYLh63bmz3PKy for ; Wed, 27 May 2026 15: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=1779895452; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W8ONOWUf7RuBEodzSxUn8Q8NBCrQXOXpjnBV8ehy8EI=; b=uejQcv2aNSodPsO7ffyK9cA6BPRL1T+oxNrY6nFMIM4nLec3/GzoGX/k9T0L5Xbk5Zayhf eoJGTSHAI7j9viNgEHhDRt17jt8Ys0T0/G2ZMgD+mevgBtHlvmfNIilnR2HPSYJNGEqv+s YvnsmYNBJMl3EyBKG77U49YF5HFtJJ4RHT6I1sc+Bg8hzhIhPDssss3+Fk38AzM2fu6lR8 l8XpRC78TeuhqZSiKpjKwGdXSnsNVUMP5QnDkSyBbvE5oyQP1BygTC6U42b3GM9f9xiSvg sZEya0WZ8qor66obseDJ0crIWf8FkfC7ulwG0T1sIMi7FzHU+Dr/WUHhls9YUw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779895452; a=rsa-sha256; cv=none; b=LW2MiEkB4JibqR3JqwmFr3Zwa1THGAC1CR3LyCE9MVhAbLm2nlGmta1MI+FUlldlHR4L0g 7qmplILkSJbT9FDJ/D7lg9lApwSd2gG+jcw1sLEUwXBDZ1xY55r+b3arBZxugxpJi1cUDk fBB2mVrgg8tX7jUZKta1fC86AJuRtsZY9ihzi6c4smlmccQyD9y5dj/hqjy/rlBroUCw9w oN3Sz+3ddVBAjxdw1WH7QTkpVmv0M0JGQJWjsJ8mtP2lSMgIE/0rqbFTgJBikYu+PccnZ2 Ze7+chAY+TFWBev1a5Hfz7NbdELnjGSQ6DZbcrWyeSGmAGvNA9KjBz3xvFSzLA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779895452; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W8ONOWUf7RuBEodzSxUn8Q8NBCrQXOXpjnBV8ehy8EI=; b=nDSv7VrVBBKR05nR7G458FheBypWL/7mV29v8o3m9OBAFudfaNWwdewAgL8Hxr/x2gCRaY 0p/uUgvocr2si1fH/ZGBC1gaZjW9/eWobBwLgqUCpPwlN3botRGbt+RANA5zvfxdbeea2W S2bOYP1HaCUmNJLAL8i7pXwzfGBK2SeqSKmoyy3XqDXXIi8o0Vzyd0Vge8ONkTEfGQvj15 5Vsz3p9QENs9bBZU4mc5XYT9T1cPfRGpb8ibv1Umf0riVArS3NWjlsJwGDBkXvrEuHSA+u ilQj8S9W2EfHG0bDKvF9tXqU64O61v66LtJ8l0nruanqsrYgOsik7b3hitkKjQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQYLh5Q0nz14nr for ; Wed, 27 May 2026 15:24:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27108 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 15:24:12 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: d63a62fb3504 - main - arm64: Add support for per-page flags List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d63a62fb3504df36457cac5718073a12d10e6cdc Auto-Submitted: auto-generated Date: Wed, 27 May 2026 15:24:12 +0000 Message-Id: <6a170c9c.27108.4d2abced@gitrepo.freebsd.org> The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=d63a62fb3504df36457cac5718073a12d10e6cdc commit d63a62fb3504df36457cac5718073a12d10e6cdc Author: Andrew Turner AuthorDate: 2026-05-18 09:01:19 +0000 Commit: Andrew Turner CommitDate: 2026-05-27 15:22:25 +0000 arm64: Add support for per-page flags We need to store some extra information about a page, e.g. the state of the MTE tags. Add a MD flags field to each page. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D55953 --- sys/arm64/arm64/pmap.c | 1 + sys/arm64/include/pmap.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index fd4232711697..0aa1ee8d5801 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -1587,6 +1587,7 @@ pmap_page_init(vm_page_t m) TAILQ_INIT(&m->md.pv_list); m->md.pv_memattr = VM_MEMATTR_WRITE_BACK; + m->md.pv_flags = 0; } static void diff --git a/sys/arm64/include/pmap.h b/sys/arm64/include/pmap.h index 1d90e8d472f2..69ae8e5c80b7 100644 --- a/sys/arm64/include/pmap.h +++ b/sys/arm64/include/pmap.h @@ -70,7 +70,8 @@ struct md_page { TAILQ_HEAD(,pv_entry) pv_list; int pv_gen; vm_memattr_t pv_memattr; - uint8_t pv_reserve[3]; + uint8_t pv_flags; + uint8_t pv_reserve[2]; }; enum pmap_stage { From nobody Wed May 27 15:24:13 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQYLk3dlKz6fBRJ for ; Wed, 27 May 2026 15:24: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQYLk0Bjdz3PQr for ; Wed, 27 May 2026 15:24:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779895454; 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=Vd2JjRe5KTIQ6HSW5URwUQIDEQzbcW7LuETprhxZ/nc=; b=d0SnM1dQXw7bnMQEO5+D/QUG6/jbmJKzvZGHEC1UeP/FJ42D2L7r78Uuo9zlBgvbw2oKAi H7MZ5Fg4UvvFfoEq7wZ9jSpn545iGisfsEpqZAVezbsF31fsqC5sYm+S6izpKzUL+6v9r4 lOrpLrufhejsZQP/7Mhgs5xl38nsaD8N8saKT3UQPqhk0dWXMIE6vCbWXH6Bx8MD2q17C+ KWpo4cGvvhaP4xmH5tR/mCNCqeUFnMi98blbsJ/ihXr9jyXz5FU/jKbsQ5XaZq/Y9m/eRM J5zVQ2oyanxVSxNdQqXHh9qlew1QE6Lz/sCrwjkmGA5n8ZIIn6hnb3H0AZIcHw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779895454; a=rsa-sha256; cv=none; b=cifQv3IcokmHGn3vWdX/jqj1I15NsAO4B5surDSzmOtv8hohrTmnUzJh90YLiXcC1QZ5nF utmX7iDaCX2aAQqhnfM1xfba8y8MMyrE3qI/XtMjQbkAhMI/P77jVltlS6ZrQgRFG7GqEn lvpfKo2HiTszd1kFvb5mOadh3mV/3Aduxy9NvOFZNeFVdstZljMGdhKNts641187R0Cdw7 Rje8NxmMHFVmoXMii+Bk8A6jKfgoJVxOhQpnIda7pJJreQsQ2D5j4ctjojWEK2kabHIqSe HytmZZjtWQ5usJaEf7cEDoRQQvfEyHhizyn0RvUxVxlrqh9FG6pmptdgShYRig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779895454; 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=Vd2JjRe5KTIQ6HSW5URwUQIDEQzbcW7LuETprhxZ/nc=; b=FPp6yQKxB7siF5B3P8jXo86gScNTOxAReXP5Z4JaIYCseGv/YXHkqw+CBtlwmap/r6xXij vN1FO+BlCY8sg8+dxJU+Bx3sMs9nje111QoC8Qc+WHuJkFmacLq3hhs4xW+lFfHvG2Bx91 Ytv5viBvOKHv6K1q1f+1ShKn+V1vcTbZ0HnKy0BYego7Z+5ihhtPwI2nZ0toHj6YDbGCpy JizqA03e4Op5TaxIRsNOOoYYq1SL0+UhQfUyuKQv5vI8OskBsRR2H2ijNQin24/aN/eMad zpl7MRPfkuRQLhzWxuPSKR8S5xOH6A8OYSysjiSuvPCA4IlH4WjfTNSbNACLHA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQYLj6FWBz14g4 for ; Wed, 27 May 2026 15:24:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26e27 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 15:24:13 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Harry Moulton From: Andrew Turner Subject: git: bb9497a2d462 - main - arm64: Add vm_page_t MTE flags List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bb9497a2d462e668455d0a561bd5677f447b4acf Auto-Submitted: auto-generated Date: Wed, 27 May 2026 15:24:13 +0000 Message-Id: <6a170c9d.26e27.6932ecae@gitrepo.freebsd.org> The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=bb9497a2d462e668455d0a561bd5677f447b4acf commit bb9497a2d462e668455d0a561bd5677f447b4acf Author: Harry Moulton AuthorDate: 2026-05-18 09:09:23 +0000 Commit: Andrew Turner CommitDate: 2026-05-27 15:22:26 +0000 arm64: Add vm_page_t MTE flags To track which pages have MTE tags. Add a flag field to md_page. We can then use this in MD code to mark which pages have MTE tags. Reviewed by: andrew Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D55954 --- sys/arm64/arm64/mte.c | 38 ++++++++++++++++++++++++++++++++++++++ sys/arm64/arm64/pmap.c | 1 + sys/arm64/include/cpu.h | 2 ++ sys/arm64/include/pmap.h | 3 +++ 4 files changed, 44 insertions(+) diff --git a/sys/arm64/arm64/mte.c b/sys/arm64/arm64/mte.c index 88f394dc72c3..ba5d9df3b01c 100644 --- a/sys/arm64/arm64/mte.c +++ b/sys/arm64/arm64/mte.c @@ -49,6 +49,13 @@ static u_int __read_mostly mte_version = 0; struct thread *mte_switch(struct thread *); +/* Fetch the block size used by tag load and store instructions */ +static inline size_t +mte_block_size(void) +{ + return (sizeof(int) << GMID_BS_SIZE(READ_SPECIALREG(GMID_EL1_REG))); +} + static void mte_update_sctlr(struct thread *td, uint64_t sctlr) { @@ -57,6 +64,37 @@ mte_update_sctlr(struct thread *td, uint64_t sctlr) td->td_md.md_sctlr |= sctlr; } +/** + * Clear/sync the allocation tags for a given page. This should be done on + * allocation of a page to ensure a tag check fault does not occur immediately + * after accessing newly tagged memory. + */ +void +mte_sync_tags(vm_page_t page) +{ + char *addr; + size_t block_size; + + if (!MTE_HAS_TAG_CHECK) + return; + + /* don't clear the tags on a page that's already setup for mte */ + if ((page->md.pv_flags & PV_MTE_TAGGED) != 0) + return; + + block_size = mte_block_size(); + addr = PHYS_TO_DMAP(page->phys_addr); + + for (size_t count = 0; count < PAGE_SIZE; + count += block_size, addr += block_size) + asm volatile( + ".arch_extension memtag \n" + "stgm xzr, [%0] \n" + ".arch_extension nomemtag" : : "r" (addr)); + + page->md.pv_flags |= PV_MTE_TAGGED; +} + void mte_fork(struct thread *new_td, struct thread *orig_td) { diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index 0aa1ee8d5801..6914fc13b065 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -6922,6 +6922,7 @@ pmap_zero_page(vm_page_t m) void *va = VM_PAGE_TO_DMAP(m); pagezero(va); + m->md.pv_flags &= ~PV_MTE_TAGGED; } /* diff --git a/sys/arm64/include/cpu.h b/sys/arm64/include/cpu.h index 8d8a80a8d02a..d36e1e56c91c 100644 --- a/sys/arm64/include/cpu.h +++ b/sys/arm64/include/cpu.h @@ -284,6 +284,8 @@ void mte_copy_thread(struct thread *, struct thread *); void mte_thread_alloc(struct thread *); void mte_thread0(struct thread *); +void mte_sync_tags(vm_page_t page); + /* Functions to read the sanitised view of the special registers */ void update_special_regs(u_int); void update_special_reg_iss(u_int, uint64_t, uint64_t); diff --git a/sys/arm64/include/pmap.h b/sys/arm64/include/pmap.h index 69ae8e5c80b7..cf20827fa666 100644 --- a/sys/arm64/include/pmap.h +++ b/sys/arm64/include/pmap.h @@ -74,6 +74,9 @@ struct md_page { uint8_t pv_reserve[2]; }; +/* machine page flags */ +#define PV_MTE_TAGGED 0x01 /* page is tagged with MTE */ + enum pmap_stage { PM_INVALID, PM_STAGE1, From nobody Wed May 27 15:24:14 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQYLl4x4nz6fBZp for ; Wed, 27 May 2026 15:24: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQYLl0f0fz3PR2 for ; Wed, 27 May 2026 15:24:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779895455; 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=OhyeRMfGtInq0oXB73yioXSxorLwzCrrkRN/6HaqZFs=; b=Y9wNOYNuR5gl3Zv+5FGlRmMNPm1oECdQLyQ+oS8ScEjZSCRJLhwL0ki8UAP7x4Mw7/iqL8 lJIbzVRWZnXZvJxogGZnr8DaYJxSp1g+hy+B/T6a9CtsFvMYOt+JUX+Phiu0D6YPG8t/E1 hRAAWlAu3P6LKeMkDf5hehy/0RmEmYpw5I9JqZuf4u5ou6Wp1ubhAXUp+Ic5SEUd2UO5h6 ybOFd3p9My58gY9ZLtIYYF9rJtx8d5xqCa+BamS3dHqjPgPwYphin0P1JD8zSHLWjNEMUn IjyhXmn/J4LaV0N0G5qCYK3+7EpDQ6dtAUPjGgeGbXRqiTzVJHFj/bkO9jjGmQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779895455; a=rsa-sha256; cv=none; b=Ut/BrjwN2olR8T/+ICdTHGagk2CEx4YKQbOBaU7MwMcdDibQdqpE3T01JxHIRqlE/c3+x/ BqGVmr6RKAjZfaY9FflxchTfNOM+vA5fJ5TeD8X/vrPi0iHcS/rkDRu8aJJRmm4rjzjeE2 hU63Vg3ohePLyA10OC68D1yFW2NKRo7LhAVBf9bzwvcqUHEm1a00cQLtnRJOWv7c5rsxa8 NR2Q1h3zPYtIYBkMvj4CTrxAnCM9OICWJyam6omWrGl17DDRSfBZ+fZO7juIvw9pAkhRT9 4b2NRe6zhKMAvA+xRMCRdsQNZ3h1s5X5QsWM6z37vWNLPL91Jzgb8UivNROd8w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779895455; 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=OhyeRMfGtInq0oXB73yioXSxorLwzCrrkRN/6HaqZFs=; b=P7DlrJ+KZhrCtDQsu5N73QTj0BP6JIkZpTpmDbrrxUTuho+b8oEgMbq0iYTlyUM5hum4Ne F5+y34XT7kcrvrOYBhdifStfmE06vmEVdaIz19apLmgodbU+yIOV5gpqntjG46qfNeqUg7 I/qw+Rj14feLlUJU6hmGSpvYRh0RHUr57AAQ5GrxJQgVdfF4D86kpT3l9os6BD4jvzUMqG JNFsXrHsbXZHe6Bu3dWaenr+mzGPh2byd1jhERTdq9mqIEDm20WLqt2xKoR70E29GwgjVI TKucz+BzP5uyDUHsvjLITF7lT26NwhoTKnyR0Ht2ofZaR5YnglIk72GD7GJV1A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQYLk71d7z14jC for ; Wed, 27 May 2026 15:24:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 277fc by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 15:24:14 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Harry Moulton From: Andrew Turner Subject: git: 7bb6b62394d3 - main - arm64: mte: copy/save tags on copy-on-write List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7bb6b62394d3036567cf1453395d9e8b63d3dda1 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 15:24:14 +0000 Message-Id: <6a170c9e.277fc.6fdde7de@gitrepo.freebsd.org> The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=7bb6b62394d3036567cf1453395d9e8b63d3dda1 commit 7bb6b62394d3036567cf1453395d9e8b63d3dda1 Author: Harry Moulton AuthorDate: 2026-05-18 09:29:03 +0000 Commit: Andrew Turner CommitDate: 2026-05-27 15:22:26 +0000 arm64: mte: copy/save tags on copy-on-write On a copy-on-write, copy the memory tags from the source pages to the destination pages so the forked process can continue to use MTE. Reviewed by: andrew Sponsored by: Arm Ltd Signed-off-by: Harry Moulton Differential Revision: https://reviews.freebsd.org/D55955 --- sys/arm64/arm64/mte.c | 41 +++++++++++++++++++++++++++++++++++++++++ sys/arm64/arm64/pmap.c | 13 +++++++++++++ sys/arm64/include/cpu.h | 1 + 3 files changed, 55 insertions(+) diff --git a/sys/arm64/arm64/mte.c b/sys/arm64/arm64/mte.c index ba5d9df3b01c..6e902858a8b9 100644 --- a/sys/arm64/arm64/mte.c +++ b/sys/arm64/arm64/mte.c @@ -49,6 +49,22 @@ static u_int __read_mostly mte_version = 0; struct thread *mte_switch(struct thread *); +#define load_tags(addr) ({ \ + uint64_t __val; \ + asm volatile( \ + ".arch_extension memtag \n" \ + "ldgm %0, [%1] \n" \ + ".arch_extension nomemtag" : "=r" (__val) : "r" (addr)); \ + __val; \ +}) + +#define set_tags(tags, addr) do { \ + asm volatile( \ + ".arch_extension memtag \n" \ + "stgm %0, [%1] \n" \ + ".arch_extension nomemtag" : "=r" (tags) : "r" (addr)); \ +} while (0) + /* Fetch the block size used by tag load and store instructions */ static inline size_t mte_block_size(void) @@ -95,6 +111,31 @@ mte_sync_tags(vm_page_t page) page->md.pv_flags |= PV_MTE_TAGGED; } +/** + * Copy the allocation tags from given target to destination page. This is called + * on a copy-on-write and anything that causes a pmap_copy_page call. + */ +void +mte_copy_tags(vm_page_t srcpage, vm_page_t dstpage, char *src, char *dst) +{ + size_t block_size; + uint64_t tags; + + MPASS((srcpage->md.pv_flags & PV_MTE_TAGGED) != 0); + + /* + * Copy the tags from the source page to the destination page, + * incrementing by the block count read from GMID_EL1 + */ + block_size = mte_block_size(); + for (size_t count = 0; count < PAGE_SIZE; + count += block_size, src += block_size, dst += block_size) { + tags = load_tags(src); + set_tags(tags, dst); + } + dstpage->md.pv_flags |= PV_MTE_TAGGED; +} + void mte_fork(struct thread *new_td, struct thread *orig_td) { diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index 6914fc13b065..1fb9ac2011aa 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -146,6 +146,7 @@ #include #include +#include #include #include #include @@ -6954,6 +6955,15 @@ pmap_copy_page(vm_page_t msrc, vm_page_t mdst) void *src = VM_PAGE_TO_DMAP(msrc); void *dst = VM_PAGE_TO_DMAP(mdst); + /* + * On a page copy, check whether the src page is tagged. If it is, + * we must copy the tags before copying the contents of the page. + */ + if ((msrc->md.pv_flags & PV_MTE_TAGGED) != 0) + mte_copy_tags(msrc, mdst, src, dst); + else + mdst->md.pv_flags &= ~PV_MTE_TAGGED; + pagecopy(src, dst); } @@ -6970,6 +6980,9 @@ pmap_copy_pages(vm_page_t ma[], vm_offset_t a_offset, vm_page_t mb[], int cnt; while (xfersize > 0) { + KASSERT(ADDR_IS_CANONICAL(a_offset), + ("%s: Address not in canonical form: %lx", __func__, a_offset)); + a_pg_offset = a_offset & PAGE_MASK; m_a = ma[a_offset >> PAGE_SHIFT]; p_a = m_a->phys_addr; diff --git a/sys/arm64/include/cpu.h b/sys/arm64/include/cpu.h index d36e1e56c91c..bdbc601edd26 100644 --- a/sys/arm64/include/cpu.h +++ b/sys/arm64/include/cpu.h @@ -285,6 +285,7 @@ void mte_thread_alloc(struct thread *); void mte_thread0(struct thread *); void mte_sync_tags(vm_page_t page); +void mte_copy_tags(vm_page_t, vm_page_t, char *, char *); /* Functions to read the sanitised view of the special registers */ void update_special_regs(u_int); From nobody Wed May 27 15:24:43 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQYMJ1x72z6fBxL for ; Wed, 27 May 2026 15:24: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQYMJ0GY3z3QJp for ; Wed, 27 May 2026 15:24:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779895484; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OCplEQ2j+DsiS9OxA4pzG3kBxLNpjRKEVjgnF1lI6wo=; b=Bp6jpY2AlAnYxQt77QhomC963dbQKP2SzNzO35RUVP77tNCl5uulfGANLaYYmTIDR5M5Yg w+q7VnbNnr8jeuDoWNrnn9LvpR2NsIb3XaYbn65LU0CJOSJas0xc4uBx3B0CvfAAfHwvUI ub07ALcIrvn/YrTqjH9SZAzsECraQHrXyfDxWsK05mSyPGsRPgEJkMxKR0I5kY5bQPKQq9 gwKPP55GJKLCXDe3RzqHa6PFwNmqHM1dwA1Ly2k8hhrk1fyM66RENDOeb6ZH2AsXzdfkRS oc4yw59dJj29fhMMBXNFlZ+Gg64tZ7F1zift8gdv3JGNhh8RNLCW1kmyGsR4bA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779895484; a=rsa-sha256; cv=none; b=BoKuC2VHdI0GYHOaxOd12dvABnMAVwPTuRYQY+S4AA3wYfRTSiy2NkCIwET/8ky4c9AlX4 3nOvMB/FAMO7e4BKRKETYlCcfVVbkYaVx3BaQhAZzNS18LyoJLG48GYQiDMLqwiWXiNMj0 89owAb4Ke1TXOfVH7uNzGelgLap1kWKPaDlU+DLL0Iz7OobSuD579mXAqCuSmofHeMURr/ EBEydaJxxRdvTjIU6+6aC5PG8JZrAO4U2oVd1OnkeykPf9XJg6tPrkBIq6MfuWNQQ88kBp tlFbcnrntTPgq1/Oh8qquu/OP+2D9nWTXWeiKgbYtf5ZqQRcL7EukFBZbIvXlA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779895484; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OCplEQ2j+DsiS9OxA4pzG3kBxLNpjRKEVjgnF1lI6wo=; b=MVddJu0UMuC7LWU3GHT/0x4Ltx2ifGpQSgJhJDCTih1uxl8Q+6HCxmLRU3vnrjLNY8CRmp YD69lJgpBFSK95nPIs+A1RRZqSy0kZ4/qMiiL4cZ/BBkO6+kQmrEY1VEHMtqSpO3MTM3tN vLbYT036VEVWdKfpBIVfqGxfxTxU+/8NxU5XYzDsWH/W5sOnrdeyHlLStTgkRcNtHoVyUx TK0yI9MV7lGuqnzQmFwBregxzsBekykb5aGbD601wb6OsUsJq4eFGL3pbSJcW3n6319+Mn kGTT3wlfB7dhUN1qGVVrAnlrGR+IjiuUVIzAkmzvp0itymx3mvT9ZOZ8IyhDFw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQYMH6YKwz14Q7 for ; Wed, 27 May 2026 15:24:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2637c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 15:24:43 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Tai-hwa Liang Subject: git: 3dab4ea82a0e - stable/14 - net: bandaid for plugging a fw_com leak in fwip_detach() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avatar X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3dab4ea82a0e1111128d16ac513e831f8e84ef0e Auto-Submitted: auto-generated Date: Wed, 27 May 2026 15:24:43 +0000 Message-Id: <6a170cbb.2637c.2a76697@gitrepo.freebsd.org> The branch stable/14 has been updated by avatar: URL: https://cgit.FreeBSD.org/src/commit/?id=3dab4ea82a0e1111128d16ac513e831f8e84ef0e commit 3dab4ea82a0e1111128d16ac513e831f8e84ef0e Author: Tai-hwa Liang AuthorDate: 2024-02-15 01:00:49 +0000 Commit: Tai-hwa Liang CommitDate: 2026-05-27 14:47:21 +0000 net: bandaid for plugging a fw_com leak in fwip_detach() Adding a temporary workaround for plugging a fw_com upon if_fwip unloading. Steps to reproduce(needs two hosts connected with firewire): while true; do ifconfig fwip0 10.0.0.5 up fwcontrol -r ping -c 10.0.0.3 kldunload if_fwip done There's a chance that the unloading of if_fwip.ko triggers following warning: Warning: memory type fw_com leaked memory on destroy (1 allocations, 64 bytes leaked). commit d79b6b8ec267e7eef6e07cf4245159705e24acd5 (origin/main, origin/HEAD) (cherry picked from commit 25a5bb7318052322190a2880e0e7ef18e06d54bd) From nobody Wed May 27 15:30:07 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQYTW1mBHz6fByy for ; Wed, 27 May 2026 15:30:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQYTW17rsz3Sxh for ; Wed, 27 May 2026 15:30:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779895807; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T1af2xo5tFvxNaQMukkkjFJQBQ6WYCy0CJYBZSEqWaM=; b=G3oCnj+KefZCqhce+ek1O3BX5lmPIFTBVD/vj9+SlNabibzhTNLYbG4NB21OKAdjE3l9Rp S5cvCYT1cMkVOjcL8JQIKK+PJS511Fu4Cgbz3+oG6fpsdo4ndoF/HCd4vjRoGhhxjXprTU nrY1g44v0HLpTsR+KY+WojteN1+E+12T2HFxqZiGugyVtxvrJiw4aFYgkqPcT1sbsMWGAR 4pTCkb0knK3eJmqmRqtL4qXsn/2+/bTIafQLDdYvkhvZJGfrGoTTeTyvGZiLq5G7QA2+OU G/JxKiO3LvxyOnncUGqdjp0oa9+pinfF5/0SBrnKUFszCahLuQl0lHsdq4M2vA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779895807; a=rsa-sha256; cv=none; b=jq9pJpSL70Y0xdOd2U13vvd3ISSKRXaQLBh7wBgY9rbQgPwkcLLADfVFMicMSJZwlMhcNp n774K6RXW/CewTkbIO2U2SIWG37+SQvPephzn6gvcH9EY4vWuUNJdzCT0bvOqGnv7wd9UB VzKuOGrYezL7MJyZOcdS8A14LnA0vv709ovcBSdGQQJmC3agsqnDa74GZMR05Jv0Pk4F2M e+GyJY71QvVE+ouVXzKD2egSsObPmSp08bhIlz9wVzfMej7AMM+u/CvVYNnTWh7LO4b0eI tLOG6zzs1rSmLiJe7V1Co2BlHIf9FwvZbUTD23AfBH5vID+QhRQO4mq3sxUdMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779895807; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T1af2xo5tFvxNaQMukkkjFJQBQ6WYCy0CJYBZSEqWaM=; b=pGyh2gG3FKXmKnCzm/bsyiwct3Y5VIsWmfQfGNUgvV57XNYy65FuJuBp65DUwXrjhmkJiM 5SpUbnliogR+Llx4IBvqhsLYGiLyT5XUrS50/ztC1QOr3R6exRP2RH2K+6zv+vddnIeedn Nz8jL+HVzDn7owWxcE33gR6oIj5EoillHxpnn+5x2BIKJWToYwWJFWZgxohBQ3tvlsSZnt V1WMVW/c1SU8aEmnRk8ahK6ifuDGVnh+3pDtzv5+I77xL2iz52QLILHyNKsCTnWPsbQUTI jp+utIevxmf+E0/RwuAed92vfCEmqmkiPOLmXliFZEhP0cJyRmGXmn3Wen4WfQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQYTW0hJZz14Gl for ; Wed, 27 May 2026 15:30:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25fe1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 15:30:07 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 54a03b44ae38 - main - sound: Retire FEEDEQ_BYPASS List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 54a03b44ae386e26d29df6eece3fadb5c0d1105a Auto-Submitted: auto-generated Date: Wed, 27 May 2026 15:30:07 +0000 Message-Id: <6a170dff.25fe1.484f2a0a@gitrepo.freebsd.org> The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=54a03b44ae386e26d29df6eece3fadb5c0d1105a commit 54a03b44ae386e26d29df6eece3fadb5c0d1105a Author: Christos Margiolis AuthorDate: 2026-04-17 14:45:40 +0000 Commit: Christos Margiolis CommitDate: 2026-05-27 15:27:11 +0000 sound: Retire FEEDEQ_BYPASS In effect, this is the same as the disable state. There is a comment that says the bypass state skips EQ altogether, which is what the disable should be. The disable state according to the comment disables EQ but keeps the EQ preamp (dev.pcm.%d.eq_preamp), however after testing it seems that the preamp does not really take effect, because with EQ disabled, feeder_eq is non existent, so we never execute any EQ code in the first place. Make things simpler and clearer and have 2 states; enable and disable, and do what they should do intuitively. Sponsored by: The FreeBSD Foundation MFC after: 1 week Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/15 --- sys/dev/sound/pcm/channel.c | 4 +--- sys/dev/sound/pcm/feeder.h | 1 - sys/dev/sound/pcm/feeder_eq.c | 26 +++++++------------------- sys/dev/sound/pcm/sound.h | 4 ++-- 4 files changed, 10 insertions(+), 25 deletions(-) diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index c1e0d8d3bc52..be6d7f82f502 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -2209,9 +2209,7 @@ chn_syncstate(struct pcm_channel *c) device_printf(c->dev, "EQ: Failed to set preamp -- %d\n", d->eqpreamp); - if (d->flags & SD_F_EQ_BYPASSED) - state = FEEDEQ_BYPASS; - else if (d->flags & SD_F_EQ_ENABLED) + if (d->flags & SD_F_EQ_ENABLED) state = FEEDEQ_ENABLE; else state = FEEDEQ_DISABLE; diff --git a/sys/dev/sound/pcm/feeder.h b/sys/dev/sound/pcm/feeder.h index e1e91d468455..7d14022c6849 100644 --- a/sys/dev/sound/pcm/feeder.h +++ b/sys/dev/sound/pcm/feeder.h @@ -122,7 +122,6 @@ enum { FEEDEQ_STATE, FEEDEQ_DISABLE, FEEDEQ_ENABLE, - FEEDEQ_BYPASS, FEEDEQ_UNKNOWN }; diff --git a/sys/dev/sound/pcm/feeder_eq.c b/sys/dev/sound/pcm/feeder_eq.c index 4cf9d4f6695f..8f3acbf4e156 100644 --- a/sys/dev/sound/pcm/feeder_eq.c +++ b/sys/dev/sound/pcm/feeder_eq.c @@ -334,8 +334,7 @@ feed_eq_set(struct pcm_feeder *f, int what, int value) info->preamp = FEEDEQ_PREAMP2IDX(value); break; case FEEDEQ_STATE: - if (!(value == FEEDEQ_BYPASS || value == FEEDEQ_ENABLE || - value == FEEDEQ_DISABLE)) + if (!(value == FEEDEQ_ENABLE || value == FEEDEQ_DISABLE)) return (EINVAL); info->state = value; feed_eq_reset(info); @@ -370,13 +369,7 @@ feed_eq_feed(struct pcm_feeder *f, struct pcm_channel *c, uint8_t *b, info = f->data; - /* - * 3 major states: - * FEEDEQ_BYPASS - Bypass entirely, nothing happened. - * FEEDEQ_ENABLE - Preamp+biquad filtering. - * FEEDEQ_DISABLE - Preamp only. - */ - if (info->state == FEEDEQ_BYPASS) + if (info->state == FEEDEQ_DISABLE) return (FEEDER_FEED(f->source, c, b, count, source)); dst = b; @@ -482,9 +475,7 @@ sysctl_dev_pcm_eq(SYSCTL_HANDLER_ARGS) PCM_LOCK(d); PCM_WAIT(d); - if (d->flags & SD_F_EQ_BYPASSED) - val = 2; - else if (d->flags & SD_F_EQ_ENABLED) + if (d->flags & SD_F_EQ_ENABLED) val = 1; else val = 0; @@ -495,18 +486,15 @@ sysctl_dev_pcm_eq(SYSCTL_HANDLER_ARGS) err = sysctl_handle_int(oidp, &val, 0, req); if (err == 0 && req->newptr != NULL && val != oval) { - if (!(val == 0 || val == 1 || val == 2)) { + if (!(val == 0 || val == 1)) { PCM_RELEASE_QUICK(d); return (EINVAL); } PCM_LOCK(d); - d->flags &= ~(SD_F_EQ_ENABLED | SD_F_EQ_BYPASSED); - if (val == 2) { - val = FEEDEQ_BYPASS; - d->flags |= SD_F_EQ_BYPASSED; - } else if (val == 1) { + d->flags &= ~(SD_F_EQ_ENABLED); + if (val == 1) { val = FEEDEQ_ENABLE; d->flags |= SD_F_EQ_ENABLED; } else @@ -612,7 +600,7 @@ feeder_eq_initsys(device_t dev) SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "eq", CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, d, sizeof(d), sysctl_dev_pcm_eq, "I", - "Bass/Treble Equalizer (0=disable, 1=enable, 2=bypass)"); + "Bass/Treble Equalizer (0=disable, 1=enable)"); (void)snprintf(buf, sizeof(buf), "Bass/Treble Equalizer Preamp " "(-/+ %d.0dB , %d.%ddB step)", diff --git a/sys/dev/sound/pcm/sound.h b/sys/dev/sound/pcm/sound.h index 7a05cb373054..4d527d69086a 100644 --- a/sys/dev/sound/pcm/sound.h +++ b/sys/dev/sound/pcm/sound.h @@ -107,7 +107,7 @@ struct snd_mixer; #define SD_F_VPC 0x00000080 /* volume-per-channel */ /* unused 0x00000100 */ #define SD_F_EQ_ENABLED 0x00000200 /* EQ enabled */ -#define SD_F_EQ_BYPASSED 0x00000400 /* EQ bypassed */ +/* unused 0x00000400 */ #define SD_F_EQ_PC 0x00000800 /* EQ per-channel */ #define SD_F_PVCHANS 0x00001000 /* Playback vchans enabled */ #define SD_F_RVCHANS 0x00002000 /* Recording vchans enabled */ @@ -123,7 +123,7 @@ struct snd_mixer; "\010VPC" \ /* "\011 */ \ "\012EQ_ENABLED" \ - "\013EQ_BYPASSED" \ + /* "\013 */ \ "\014EQ_PC" \ "\015PVCHANS" \ "\016RVCHANS" From nobody Wed May 27 15:30:08 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQYTX3Yjwz6fC5Q for ; Wed, 27 May 2026 15:30: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQYTX1XdYz3SvN for ; Wed, 27 May 2026 15:30:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779895808; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hjfDuZe2q84+/YUkcdxG98p4aVypiS3nzPVIZs3DMsM=; b=Oho5nXaOXCf+BbPzEH7vpx7sBb4lQXkc2035TtqPw4GrAe85ldpYb6xLS9py/agdPQpnp9 KyydS0BRIEXnhAYUP9qs90FcY9VyTNRp9akNvTLn3XIHmgK9Xd7vXTul0dqmHxZsu0YRNU S4HMXVyFLsVHaseKImxaG0Ju5m3/yQ0ZDAlags9nhzS8ea7wtbRTJu4nCmcm5eC9nPBUzB HSO7idEFGpaSi937W7mYLwTerPGYHvQKVW94CyKZINoSkUv0RW7WtX2zt5wkvQXfnnK9/v sG5f+A1BG0zT6H7kMqpx2zvzAKbQcutca+sm7Mrxo7tOnwYM+xzQqQ0O+AvUDw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779895808; a=rsa-sha256; cv=none; b=Q5jm38Fo12qBqCEbz8orlWrFduLGadQSFV1mdAI2vgyZuVmItc9CxGecDnv7cYRTC7WOHO mYntgibZPYvyk3B0GmYyXth04t4iIgpSJZuW8cwnlFJvSXmi9cXygELLej3olRGSNRVgl8 GwSfUUWAiH7wHwufWaVxNcRvadDgXHrVOcjd/XmoAdkZi+CJ7bDWF4eHT2bo8j1gtAtsE5 wVGRYn/lVTC6fTEXCpCauhfBnIX3oV9Lyel2Ku1c8jPS7qgRM+xV0ArEKn3DcYytvxrEjd XsOe48nVWyUkdDLPp5wGKHsiokxIffDCmFzea/YNddnwOPerJEIvczKYfDCxpg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779895808; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hjfDuZe2q84+/YUkcdxG98p4aVypiS3nzPVIZs3DMsM=; b=WwmvqN0A/858IpvLWu2QmDDjDFPT/P0eI2O4utsTSiyMa2/LXf0sq4AUEyEz4nkjl+XcbT 0lpYEqN1ULT5r9cuTD+Cp0+fJYKGn6jI1urRTx0bviuc11w5AJILf6npyvKfpdmEXavXL0 InIkAGZLVPv4YruDfIiLptitwGSn+StXapteU0aXdtSQbBd9ljjhZ6OMKmCV88qwXsJ8Os 1oQ0YAzR7JfqXUPt2iSST8porMWgqPWqTtpuyfzXg/LwWzqo+1jNI8GwovtipiL2Iupc7P eizlrsUSAUqwUZlBTZlQ/sI7ejXQ95p+GobsTf5BOIObaucgisZQHqASfq0Isw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQYTX13FHz14QC for ; Wed, 27 May 2026 15:30:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27f29 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 15:30:08 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 6f130b220d7c - main - sound: Remove dead EQ FEEDEQ_DISABLE code List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6f130b220d7ce64ce65f076a21edea034d14482b Auto-Submitted: auto-generated Date: Wed, 27 May 2026 15:30:08 +0000 Message-Id: <6a170e00.27f29.454c1d56@gitrepo.freebsd.org> The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=6f130b220d7ce64ce65f076a21edea034d14482b commit 6f130b220d7ce64ce65f076a21edea034d14482b Author: Christos Margiolis AuthorDate: 2026-04-17 15:05:33 +0000 Commit: Christos Margiolis CommitDate: 2026-05-27 15:27:11 +0000 sound: Remove dead EQ FEEDEQ_DISABLE code If EQ is disabled, we never reach those code paths in the first place. Sponsored by: The FreeBSD Foundation MFC after: 1 week Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/15 --- sys/dev/sound/pcm/feeder_eq.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/sys/dev/sound/pcm/feeder_eq.c b/sys/dev/sound/pcm/feeder_eq.c index 8f3acbf4e156..fe47a9d7e434 100644 --- a/sys/dev/sound/pcm/feeder_eq.c +++ b/sys/dev/sound/pcm/feeder_eq.c @@ -148,19 +148,6 @@ feed_eq_biquad(struct feed_eq_info *info, uint8_t *dst, uint32_t count, pmul = feed_eq_preamp[info->preamp].mul; pshift = feed_eq_preamp[info->preamp].shift; - if (info->state == FEEDEQ_DISABLE) { - j = count * info->channels; - dst += j * AFMT_BPS(fmt); - do { - dst -= AFMT_BPS(fmt); - v = pcm_sample_read(dst, fmt); - v = ((intpcm64_t)pmul * v) >> pshift; - pcm_sample_write(dst, v, fmt); - } while (--j != 0); - - return; - } - treble = &(info->coeff[info->treble.gain].treble); bass = &(info->coeff[info->bass.gain].bass); @@ -369,9 +356,6 @@ feed_eq_feed(struct pcm_feeder *f, struct pcm_channel *c, uint8_t *b, info = f->data; - if (info->state == FEEDEQ_DISABLE) - return (FEEDER_FEED(f->source, c, b, count, source)); - dst = b; count = SND_FXROUND(count, info->align); From nobody Wed May 27 15:30:09 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQYTY5bKYz6fC9p for ; Wed, 27 May 2026 15:30:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQYTY1p0cz3T3H for ; Wed, 27 May 2026 15:30:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779895809; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N5h0Oh8/f3vgP7Zjh/Gj2a3MNJOrLbRlZfa3ZWtc0sM=; b=Eo1HiNTFwIQjazTVvOXB9nrWVPvoubZ7XdBiag7mv5EzWy/mtCh6RrW16rEgjskCiD5Qce IjQo5UiHMIQ2T3tMFmGKK51eTJ8OIEIt2N2pkf6EYnACJO5JWh9cCI/YuQeBlFcsBEP7ou +HvKTCECCrteMPmvy/VQuNtClpeXUCI0BTcXm9oEUOFLr9U/ejVMMtL8HiY7ChbQp0SHEM PGKaagGhrNxDd4ZkhTcPOxf25vnXYt/UQJNCgs1Kf/jazghs0u/Mmca2b74b3iQmLXFHq5 BB3ZWS9orCr5lpnP3DMfDj9H1uR+mdDPruFs00hDK2s01aVgMLPTXYyPtxUitw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779895809; a=rsa-sha256; cv=none; b=Qs+R1LJIARSjNmhW4/17QAwoVc66MsimDqVVpbyqv8v9ohWNm/5c3lbHXm4M3aBPFL/3w8 EJ7bQizYGQxiQ1BAUIvJTUvj9J8vcnTGaGGrVxmmLtC//XcOh73UIZMLntLT7y+KuwnIV5 3SkJ3faBLhTEiBZFnJVW08SmTdJ68apEWgkKAKPaL/WoLBcijGMB3JBUdTQhi2kmpLAd3J qBBvPm9GMfnk8dVK8APaVqXDkUsvGCiTBMqzTqFI5ISqLIsmLA4uU828KQVZOCRlbQHU3P q8RSjsQE8eOLEoS44ME9+j/+nj5N1EuuEqlalpzd6pB41qFvokOZtsp/b7HlOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779895809; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N5h0Oh8/f3vgP7Zjh/Gj2a3MNJOrLbRlZfa3ZWtc0sM=; b=uxEOu0osEoiXQY8YlIpOCekaAeGPGSNunGNRLjx1IuOdXOXmEV00N9jVTLN5TCe7dDT3f3 +h9OBPn1xbv2IoGNo3NtSXR4le4u4Q75QdqPL82OusYyVyl6r8dtFK2LVvHoeyB4h3r1Me Ma4K+PPcaEn+A8B4E/ncmjjXAAiMfPXEMx2TvIWP3ISWmlUKOk6pywTl+GsN9nmGDYM0Aq oNp4u17hIXYUYnyBOUcKcX3n8+waSagKbrdnwl8+MpQMFCYeQb1z1IzU0KImUTTbYE2Qej uxKtiI3PaCxG9nfFQGokM29bb1Tu4882LrqD64Xgch4/9Yzy3+LWlSCqziAUvg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQYTY1Q9fz14QG for ; Wed, 27 May 2026 15:30:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27f94 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 15:30:09 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: f5d6e5cb5c3e - main - sound: Retire FEEDEQ_DISABLE List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f5d6e5cb5c3e0593d24c90671d72654aa59cdd1a Auto-Submitted: auto-generated Date: Wed, 27 May 2026 15:30:09 +0000 Message-Id: <6a170e01.27f94.274215ca@gitrepo.freebsd.org> The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=f5d6e5cb5c3e0593d24c90671d72654aa59cdd1a commit f5d6e5cb5c3e0593d24c90671d72654aa59cdd1a Author: Christos Margiolis AuthorDate: 2026-04-17 15:14:46 +0000 Commit: Christos Margiolis CommitDate: 2026-05-27 15:27:11 +0000 sound: Retire FEEDEQ_DISABLE We can do this more efficiently by just using the SD_F_EQ* flags. In fact, the dev.pcm.%d.eq handler will (un)set SD_F_EQ_ENABLED and this is what we actually test with when choosing to creating the EQ feeder or not, so setting the state to FEEDEQ_DISABLE does not really an effect in the first place. Sponsored by: The FreeBSD Foundation MFC after: 1 week Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/15 --- sys/dev/sound/pcm/channel.c | 12 ++++-------- sys/dev/sound/pcm/feeder.h | 1 - sys/dev/sound/pcm/feeder_eq.c | 5 ++--- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index be6d7f82f502..c97a3158dbd9 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -2177,7 +2177,7 @@ chn_syncstate(struct pcm_channel *c) if (c->feederflags & (1 << FEEDER_EQ)) { struct pcm_feeder *f; - int treble, bass, state; + int treble, bass; /* CHN_UNLOCK(c); */ treble = mix_get(m, SOUND_MIXER_TREBLE); @@ -2209,13 +2209,9 @@ chn_syncstate(struct pcm_channel *c) device_printf(c->dev, "EQ: Failed to set preamp -- %d\n", d->eqpreamp); - if (d->flags & SD_F_EQ_ENABLED) - state = FEEDEQ_ENABLE; - else - state = FEEDEQ_DISABLE; - if (FEEDER_SET(f, FEEDEQ_STATE, state) != 0) - device_printf(c->dev, - "EQ: Failed to set state -- %d\n", state); + if (d->flags & SD_F_EQ_ENABLED && + FEEDER_SET(f, FEEDEQ_STATE, FEEDEQ_ENABLE) != 0) + device_printf(c->dev, "EQ: Failed to enable\n"); } } } diff --git a/sys/dev/sound/pcm/feeder.h b/sys/dev/sound/pcm/feeder.h index 7d14022c6849..10bfe9dca8f3 100644 --- a/sys/dev/sound/pcm/feeder.h +++ b/sys/dev/sound/pcm/feeder.h @@ -120,7 +120,6 @@ enum { FEEDEQ_BASS, FEEDEQ_PREAMP, FEEDEQ_STATE, - FEEDEQ_DISABLE, FEEDEQ_ENABLE, FEEDEQ_UNKNOWN }; diff --git a/sys/dev/sound/pcm/feeder_eq.c b/sys/dev/sound/pcm/feeder_eq.c index fe47a9d7e434..6fd7d7f2bfff 100644 --- a/sys/dev/sound/pcm/feeder_eq.c +++ b/sys/dev/sound/pcm/feeder_eq.c @@ -321,7 +321,7 @@ feed_eq_set(struct pcm_feeder *f, int what, int value) info->preamp = FEEDEQ_PREAMP2IDX(value); break; case FEEDEQ_STATE: - if (!(value == FEEDEQ_ENABLE || value == FEEDEQ_DISABLE)) + if (value != FEEDEQ_ENABLE) return (EINVAL); info->state = value; feed_eq_reset(info); @@ -477,12 +477,11 @@ sysctl_dev_pcm_eq(SYSCTL_HANDLER_ARGS) PCM_LOCK(d); - d->flags &= ~(SD_F_EQ_ENABLED); if (val == 1) { val = FEEDEQ_ENABLE; d->flags |= SD_F_EQ_ENABLED; } else - val = FEEDEQ_DISABLE; + d->flags &= ~SD_F_EQ_ENABLED; CHN_FOREACH(c, d, channels.pcm.busy) { CHN_LOCK(c); From nobody Wed May 27 15:30:10 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQYTZ5vxMz6fCJN for ; Wed, 27 May 2026 15:30:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQYTZ3bTJz3Svt for ; Wed, 27 May 2026 15:30:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779895810; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wkbhoSYiVG7FBDpASfC8QQxjAKJiPqWc+3Elo7XKpos=; b=vftzmUWz3WlO8WQq44ReHfhss2YTMRyofbfSUatzcAwydB1Q6I/ffUYatuWzJeFw+BVVMO s7icFcEkV8/g4QUrmzwXZzRnbBv9cMuSwmcH2irNnPhHS1I5StvimqpWN/tjfJrRf7mj7n gMG6AWmVJBBk4rBn1lPySbxyWZYjESagDfPANcLIfzEohDkew3k9D7VJxtFan3OFuZzj2S Lz7SlVy0ZGutPCHDPdyyMVBQiE49wCyI+Y/4C9PDqrVu/c/6i+lgnbXmsOx+gvBChWXbCt R8ltkcP57uuq3E8oyMg+0Ri8qhbu9t4yUng5P61UJFvYGd/u6NdPewiwBESlUw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779895810; a=rsa-sha256; cv=none; b=JAqBUhLT+IIkqjtzcpUovns12CbQ/eGcRdOJUy+B/zrBZf7+9mIJmOA8h88RXs2Jx8RyIp Q9oRKFQ7Jhi5EbBv3nenWem4OBqBpi/Ur61bGDJKmHyVx3RBf0rNtz5/6+N/08Tn93ZNDT omK13C0k1mdvnGBj2s6ZidfWA8eA0mkjn30mSJI4FUyBvHC8giQ+/hfh97u1anebKXzveP SjA1NaoVnkCsGIueyS2CG7ptj3Lu+TvBgatbJdraOKpQEAT8yAeKKHhJLttAfNx0F+gIMM 1i2R7cl1UWWMSp43Piz+HQPZbrZGuSiGIevmio50gYgP16SeG6liOHF45DUb3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779895810; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wkbhoSYiVG7FBDpASfC8QQxjAKJiPqWc+3Elo7XKpos=; b=iazxV0Ht3tGv6bq5KWXP/KPht19lotjWOPcc0bnZlvbxKOPpi2BYDnVAY4pU1zObbbZsd6 fCfGo66xf8kfNbNTfe6Fo5ZUIEKj3/W8UwKWzIWxna9VLJi9NdGidcTdRHE0/qM/l1UeXX 0tEfMUJ/XYlKDxDAsjjobmwQE6tEPJ2ZCAEIGRcpBhLc/Gv6wwo7JRgb3OnkZG+LOOcf+2 A0Tm/D6XwuuxKAIRfixgla0HXD2EAY5nZowGVSaRmsEn1aDFWWwwdR+BRL3vcJ2zsZKfM1 u82A+0mvFYIUHpVeHyB7CVYdAok91jg+hOF+YggPyZ/0S53n58d1hPiSvoO75w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQYTZ1mWVz14xs for ; Wed, 27 May 2026 15:30:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3000d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 15:30:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 88bc1d7325aa - main - sound: Retire EQ states List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 88bc1d7325aa97520f7a308d70a5fcb39acdc5d2 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 15:30:10 +0000 Message-Id: <6a170e02.3000d.7bf78db0@gitrepo.freebsd.org> The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=88bc1d7325aa97520f7a308d70a5fcb39acdc5d2 commit 88bc1d7325aa97520f7a308d70a5fcb39acdc5d2 Author: Christos Margiolis AuthorDate: 2026-04-17 15:23:38 +0000 Commit: Christos Margiolis CommitDate: 2026-05-27 15:27:11 +0000 sound: Retire EQ states The SD_F_EQ_ENABLED does the same thing, and is actually what we test against in order to create the EQ feeder. Sponsored by: The FreeBSD Foundation MFC after: 1 week Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/15 --- sys/dev/sound/pcm/channel.c | 3 --- sys/dev/sound/pcm/feeder.h | 3 --- sys/dev/sound/pcm/feeder_eq.c | 25 ++----------------------- 3 files changed, 2 insertions(+), 29 deletions(-) diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index c97a3158dbd9..a0ee16a14386 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -2209,9 +2209,6 @@ chn_syncstate(struct pcm_channel *c) device_printf(c->dev, "EQ: Failed to set preamp -- %d\n", d->eqpreamp); - if (d->flags & SD_F_EQ_ENABLED && - FEEDER_SET(f, FEEDEQ_STATE, FEEDEQ_ENABLE) != 0) - device_printf(c->dev, "EQ: Failed to enable\n"); } } } diff --git a/sys/dev/sound/pcm/feeder.h b/sys/dev/sound/pcm/feeder.h index 10bfe9dca8f3..127b479cd7c9 100644 --- a/sys/dev/sound/pcm/feeder.h +++ b/sys/dev/sound/pcm/feeder.h @@ -119,9 +119,6 @@ enum { FEEDEQ_TREBLE, FEEDEQ_BASS, FEEDEQ_PREAMP, - FEEDEQ_STATE, - FEEDEQ_ENABLE, - FEEDEQ_UNKNOWN }; int feeder_eq_validrate(uint32_t); diff --git a/sys/dev/sound/pcm/feeder_eq.c b/sys/dev/sound/pcm/feeder_eq.c index 6fd7d7f2bfff..fdb786171d5a 100644 --- a/sys/dev/sound/pcm/feeder_eq.c +++ b/sys/dev/sound/pcm/feeder_eq.c @@ -122,7 +122,6 @@ struct feed_eq_info { uint32_t rate; uint32_t align; int32_t preamp; - int state; }; #if !defined(_KERNEL) && defined(FEEDEQ_ERR_CLIP) @@ -277,7 +276,6 @@ feed_eq_init(struct pcm_feeder *f) info->treble.gain = FEEDEQ_L2GAIN(50); info->bass.gain = FEEDEQ_L2GAIN(50); info->preamp = FEEDEQ_PREAMP2IDX(FEEDEQ_PREAMP_DEFAULT); - info->state = FEEDEQ_UNKNOWN; f->data = info; @@ -303,8 +301,6 @@ feed_eq_set(struct pcm_feeder *f, int what, int value) if (feeder_eq_validrate(value) == 0) return (EINVAL); info->rate = (uint32_t)value; - if (info->state == FEEDEQ_UNKNOWN) - info->state = FEEDEQ_ENABLE; return (feed_eq_setup(info)); case FEEDEQ_TREBLE: case FEEDEQ_BASS: @@ -320,12 +316,6 @@ feed_eq_set(struct pcm_feeder *f, int what, int value) return (EINVAL); info->preamp = FEEDEQ_PREAMP2IDX(value); break; - case FEEDEQ_STATE: - if (value != FEEDEQ_ENABLE) - return (EINVAL); - info->state = value; - feed_eq_reset(info); - break; default: return (EINVAL); } @@ -449,8 +439,6 @@ static int sysctl_dev_pcm_eq(SYSCTL_HANDLER_ARGS) { struct snddev_info *d; - struct pcm_channel *c; - struct pcm_feeder *f; int err, val, oval; d = oidp->oid_arg1; @@ -477,20 +465,11 @@ sysctl_dev_pcm_eq(SYSCTL_HANDLER_ARGS) PCM_LOCK(d); - if (val == 1) { - val = FEEDEQ_ENABLE; + if (val == 1) d->flags |= SD_F_EQ_ENABLED; - } else + else d->flags &= ~SD_F_EQ_ENABLED; - CHN_FOREACH(c, d, channels.pcm.busy) { - CHN_LOCK(c); - f = feeder_find(c, FEEDER_EQ); - if (f != NULL) - (void)FEEDER_SET(f, FEEDEQ_STATE, val); - CHN_UNLOCK(c); - } - PCM_RELEASE(d); PCM_UNLOCK(d); } else From nobody Wed May 27 15:30:11 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQYTb45Jdz6fCD0 for ; Wed, 27 May 2026 15:30:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQYTb2hKKz3T58 for ; Wed, 27 May 2026 15:30:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779895811; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PqnIZB+cGfU4N21E7gyII7jW8sRBCy4BwRZvkAGkv/Q=; b=cYD4+W4P8lryACMgalnlBazzQctOLvGjNVRFIWFuk/37Rt6N/+K4q92/8rCK6s9ZUhMo2o vxJRQvjBK91AvyBajZZCTOA8xBtVnERA0Wea20W4t1wFpb5IEbfcSVbS3sUjKc4HgrFmjO ObzWZAr2Ia947cq/a4sSIaSa8kcGrSVgunjC7jeNHwWNLiJZ2bFxqdxPgne/TaekHvUS0w bcneKWGqSP1GT0eToJik8Yqyt7sHgSpwqzivGBCbIzXXdBthN16iTufFPQvagdWpXi45Mj 3vdA9A6HcFJjRsi9IDTyRPl86rGZVEZmFGY4cNgid1TOmEY6INTf9AyIidDMpw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779895811; a=rsa-sha256; cv=none; b=rr+Rm0UCRolPvVCbJXAHTiU8xCwVx8CRwj6afVlxwt3i5kpalxglKwOzaQYBjiilXOTcYJ POr4wCZ7MV491uoxsLaGMzM0veIb5AD92FGhupRx0zpqZg0w/T46ETyTkKvjJT9TQ5C5vp oW3cWLjf4ZKXssRL7LLkOsuZnt951ObuRn5cTZTeAaq8w9afzJzrFQxi/LQ6VRHWDT+8Ft eaI3k+fxT6N8ZQw2JOurhjRdAgFk1d2ct/uCwtcsImPskZZy/3Hy53TQXf10fsH3LP8vG3 XDM/C4Kcm+t81Yb3URUAALmftDSSFouMl3xvSpIwN0jvE+l9PAyIlGAAQ8DIiA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779895811; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PqnIZB+cGfU4N21E7gyII7jW8sRBCy4BwRZvkAGkv/Q=; b=mR2I+rJBWuVUZIe3IVf28qGlpnfFHMSlzMRpiGUMRWS2EP4FXoEYs/WUDI2im6ibDlVW0a rN3RdfG/5r+HYRjAEf1v151N7ppgRiTj8o9NJQ64i4cwPml0cNpObjifrGFTl0Dj1SuE4P wJr6WK59yyrhpKga+a7C31GPUMqurGVvEJvp/mHk0SmBpbmFj2YeBgiZ/+h2hPbj8BARBG jChuBY0V3pwZMVYm+scXJGC493yTVu8Dk3Uga/kFLpozt/7cwzT1c8YrrpOPP+YOy0a4JS SWRRUMVqjbKNjXDfzlq92YPIqOlHW3HhyTE2/VGXW9ipFMoHm+FkHUW4HVxcSg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQYTb2DPmz14nx for ; Wed, 27 May 2026 15:30:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 271ae by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 15:30:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 3a3cb16ad418 - main - sound: Retire hint.pcm.%d.eq_preamp List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3a3cb16ad4181700d787e6b24bedafe85c791901 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 15:30:11 +0000 Message-Id: <6a170e03.271ae.55ca0d60@gitrepo.freebsd.org> The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=3a3cb16ad4181700d787e6b24bedafe85c791901 commit 3a3cb16ad4181700d787e6b24bedafe85c791901 Author: Christos Margiolis AuthorDate: 2026-04-17 16:14:44 +0000 Commit: Christos Margiolis CommitDate: 2026-05-27 15:27:11 +0000 sound: Retire hint.pcm.%d.eq_preamp It wasn't documented in the first place, but it is easier to just use the sysctl. Sponsored by: The FreeBSD Foundation MFC after: 1 week Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/15 --- sys/dev/sound/pcm/feeder_eq.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/sys/dev/sound/pcm/feeder_eq.c b/sys/dev/sound/pcm/feeder_eq.c index fdb786171d5a..9179148d2bd2 100644 --- a/sys/dev/sound/pcm/feeder_eq.c +++ b/sys/dev/sound/pcm/feeder_eq.c @@ -542,17 +542,11 @@ void feeder_eq_initsys(device_t dev) { struct snddev_info *d; - const char *preamp; char buf[64]; d = device_get_softc(dev); - if (!(resource_string_value(device_get_name(dev), device_get_unit(dev), - "eq_preamp", &preamp) == 0 && - (d->eqpreamp = feed_eq_scan_preamp_arg(preamp)) != - FEEDEQ_PREAMP_INVALID)) - d->eqpreamp = FEEDEQ_PREAMP_DEFAULT; - + d->eqpreamp = FEEDEQ_PREAMP_DEFAULT; if (d->eqpreamp < FEEDEQ_PREAMP_MIN) d->eqpreamp = FEEDEQ_PREAMP_MIN; else if (d->eqpreamp > FEEDEQ_PREAMP_MAX) From nobody Wed May 27 15:30:06 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQYTb5g3Lz6fCJW for ; Wed, 27 May 2026 15:30:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQYTb13dZz3T20 for ; Wed, 27 May 2026 15:30:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779895811; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=usi8pCtGqixIXIn60vFwuORgaHLODQfMJ5v5Yi2/9fA=; b=VMDxOWKAfGO9Y9nlIl/GLEDLzAB5UfLeDGiRG0KtM27hfZ45l0X9oeV3a9bSHREM2eFSO9 0TAV7SMBVVu9s70/s7QkLBiAQLGA/Op5r5mrr/lEgo1AJFb2Dmzlq8TAXifNybpI52VLiu K8bynDx3fj209HDFLAHnetRIxzzvGtFPH8lqYMkcTdRhIzaJuDN1QnnracmpalXPfWM6Qq g8/Zp7QyB00RlrsaHT62lwkcNr2ANI8cxXBZkru9WZHOaF7Fv55uprQVotRfbCn08ztwZj 6QSq+Qd005nTUclFa96TfKWZ9K1OH7B1A1EJpeOgZ3PIP1v8gO+gbFL6rwztGA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779895811; a=rsa-sha256; cv=none; b=Tp+hyZZ/uMoWxiSkQoyNOyRWVuG2nbvf1EtERNdB0Gv7ddgulCIBlOV3Jamzl5RgWoM2Bs brcQ6LP7krezSy2EKD4QCQB12w5XtfYgQW0VuAuDr31PZHNf2fsJKUdGr0WrlIHKw+P9FF Bn3SwAz1/Sx9iiXlOIPJqfS4Fqy+IotT4tR5f5/7AWPb67KdQjt8pGd3SyABs4nCTYUHq/ ZR97mtOmimcYuLSutVUvYDOnRua03aILilJK9pWiMMxCc/AtPhDgFDfB63g/XXP+E134xM SryAvPIXW94ORfJ8fUmzbFouaiQbaETbe4umP1yoEe2L3MWHqSMO0IaP6oPvgA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779895811; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=usi8pCtGqixIXIn60vFwuORgaHLODQfMJ5v5Yi2/9fA=; b=V5zLqLTVonFgpWEjyouZmVg76xlTGvY+ZM0SYACTV33Wxfsypa1yytWXuYKEppakxJVUSC cx2d65bswp8utOZmQFwtuMwsXXYhtZf431JsKqWzsg8NEO377nhZEReKZcNgxqZB0rl+Ku 3xrwuA3CMG0qrgVKaI47/5HJdOuRzZIGGTK1AaOkulHpoYWtrnAO5GTx5UidmqJdQh7XUI CdtFNgh0/BgyHrfjpc3IsPIfNHhL4jKUgxi/YQqv1cW2a9EWIg+SkjxftfsCs6d7MYRNwv Z5My4h1MKNpbqZugsaCHnLHDElGCcM1biVdHwf4JS0sxOMmUhnBPH/H9THy+QA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQYTb0Krkz14jH for ; Wed, 27 May 2026 15:30:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26d5f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 15:30:06 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: a0011c74f8f0 - main - sound: Expose EQ by default List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a0011c74f8f026e04803b9815198a56f50c247e6 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 15:30:06 +0000 Message-Id: <6a170dfe.26d5f.25d39963@gitrepo.freebsd.org> The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=a0011c74f8f026e04803b9815198a56f50c247e6 commit a0011c74f8f026e04803b9815198a56f50c247e6 Author: Christos Margiolis AuthorDate: 2026-04-16 14:26:25 +0000 Commit: Christos Margiolis CommitDate: 2026-05-27 15:27:11 +0000 sound: Expose EQ by default The dev.pcm.%d.eq* sysctls and mixer "bass" and "treble" controls are exposed only if hint.pcm.%d.eq is set. However, there is no good reason why we shouldn't at least expose the controls, and let the user enable/disable/bypass equalization through the sysctl. Sponsored by: The FreeBSD Foundation MFC after: 1 week Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/15 --- share/man/man4/pcm.4 | 9 --------- sys/dev/sound/pcm/feeder_chain.c | 2 +- sys/dev/sound/pcm/mixer.c | 17 +++-------------- sys/dev/sound/pcm/sound.c | 3 +-- sys/dev/sound/pcm/sound.h | 8 ++------ 5 files changed, 7 insertions(+), 32 deletions(-) diff --git a/share/man/man4/pcm.4 b/share/man/man4/pcm.4 index 4e70d95d5441..3f228d703b1a 100644 --- a/share/man/man4/pcm.4 +++ b/share/man/man4/pcm.4 @@ -197,9 +197,6 @@ The Parametric Software Equalizer (EQ) enables the use of controls (bass and treble). Commonly used for ear-candy or frequency compensation due to the vast difference in hardware quality. -EQ is disabled by default, but can be enabled with the -.Va hint.pcm.%d.eq -tunable. .Ss VCHANs Each device can optionally support more playback and recording channels than physical hardware provides by using @@ -230,12 +227,6 @@ driver. The following tunables can not be changed during runtime using .Xr sysctl 8 . .Bl -tag -width indent -.It Va hint.pcm.%d.eq -Set to 1 or 0 to explicitly enable (1) or disable (0) the equalizer. -Requires a driver reload if changed. -Enabling this will make bass and treble controls appear in mixer applications. -This tunable is undefined by default. -Equalizing is disabled by default. .It Va hint.pcm.%d.vpc Set to 1 or 0 to explicitly enable (1) or disable (0) the VPC feature. This tunable is undefined by default. diff --git a/sys/dev/sound/pcm/feeder_chain.c b/sys/dev/sound/pcm/feeder_chain.c index 4fc846f77496..35bb12a062ec 100644 --- a/sys/dev/sound/pcm/feeder_chain.c +++ b/sys/dev/sound/pcm/feeder_chain.c @@ -725,7 +725,7 @@ feeder_chain(struct pcm_channel *c) /* Soft EQ only applicable for PLAY. */ if (cdesc.dummy == 0 && - c->direction == PCMDIR_PLAY && (d->flags & SD_F_EQ) && + c->direction == PCMDIR_PLAY && (d->flags & SD_F_EQ_ENABLED) && (((d->flags & SD_F_EQ_PC) && !(c->flags & CHN_F_HAS_VCHAN)) || (!(d->flags & SD_F_EQ_PC) && !(c->flags & CHN_F_VIRTUAL)))) diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c index 6ed2d0c3ce5c..8015c8fc0c32 100644 --- a/sys/dev/sound/pcm/mixer.c +++ b/sys/dev/sound/pcm/mixer.c @@ -304,7 +304,7 @@ mixer_set(struct snd_mixer *m, u_int dev, u_int32_t muted, u_int lev) if (dev == SOUND_MIXER_PCM && (d->flags & SD_F_SOFTPCMVOL)) (void)mixer_set_softpcmvol(m, d, l, r); else if ((dev == SOUND_MIXER_TREBLE || - dev == SOUND_MIXER_BASS) && (d->flags & SD_F_EQ)) + dev == SOUND_MIXER_BASS) && (d->flags & SD_F_EQ_ENABLED)) (void)mixer_set_eq(m, d, dev, (l + r) >> 1); else if (realdev != SOUND_MIXER_NONE && MIXER_SET(m, realdev, l, r) < 0) { @@ -484,8 +484,7 @@ mix_setdevs(struct snd_mixer *m, u_int32_t v) d = device_get_softc(m->dev); if (d != NULL && (d->flags & SD_F_SOFTPCMVOL)) v |= SOUND_MASK_PCM; - if (d != NULL && (d->flags & SD_F_EQ)) - v |= SOUND_MASK_TREBLE | SOUND_MASK_BASS; + v |= SOUND_MASK_TREBLE | SOUND_MASK_BASS; for (i = 0; i < SOUND_MIXER_NRDEVICES; i++) { if (m->parent[i] < SOUND_MIXER_NRDEVICES) v |= 1 << m->parent[i]; @@ -706,15 +705,6 @@ mixer_init(device_t dev, kobj_class_t cls, void *devinfo) name = device_get_name(dev); unit = device_get_unit(dev); - if (resource_int_value(name, unit, "eq", &val) == 0 && - val != 0) { - snddev->flags |= SD_F_EQ; - if ((val & SD_F_EQ_MASK) == val) - snddev->flags |= val; - else - snddev->flags |= SD_F_EQ_DEFAULT; - snddev->eqpreamp = 0; - } m = mixer_obj_create(dev, cls, devinfo, MIXER_TYPE_PRIMARY, NULL); if (m == NULL) @@ -762,8 +752,7 @@ mixer_init(device_t dev, kobj_class_t cls, void *devinfo) } if (snddev->flags & SD_F_SOFTPCMVOL) device_printf(dev, "Soft PCM mixer ENABLED\n"); - if (snddev->flags & SD_F_EQ) - device_printf(dev, "EQ Treble/Bass ENABLED\n"); + device_printf(dev, "EQ Treble/Bass ENABLED\n"); } return (0); diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c index 9eb2dffeb908..d98952d7a984 100644 --- a/sys/dev/sound/pcm/sound.c +++ b/sys/dev/sound/pcm/sound.c @@ -415,8 +415,7 @@ pcm_register(device_t dev, char *str) "mode (1=mixer, 2=play, 4=rec. The values are OR'ed if more than " "one mode is supported)"); vchan_initsys(dev); - if (d->flags & SD_F_EQ) - feeder_eq_initsys(dev); + feeder_eq_initsys(dev); if (snd_unit_auto < 0) snd_unit_auto = (snd_unit < 0) ? 1 : 0; diff --git a/sys/dev/sound/pcm/sound.h b/sys/dev/sound/pcm/sound.h index 4795eb7585c5..7a05cb373054 100644 --- a/sys/dev/sound/pcm/sound.h +++ b/sys/dev/sound/pcm/sound.h @@ -105,17 +105,13 @@ struct snd_mixer; #define SD_F_REGISTERED 0x00000020 #define SD_F_BITPERFECT 0x00000040 #define SD_F_VPC 0x00000080 /* volume-per-channel */ -#define SD_F_EQ 0x00000100 /* EQ */ +/* unused 0x00000100 */ #define SD_F_EQ_ENABLED 0x00000200 /* EQ enabled */ #define SD_F_EQ_BYPASSED 0x00000400 /* EQ bypassed */ #define SD_F_EQ_PC 0x00000800 /* EQ per-channel */ #define SD_F_PVCHANS 0x00001000 /* Playback vchans enabled */ #define SD_F_RVCHANS 0x00002000 /* Recording vchans enabled */ -#define SD_F_EQ_DEFAULT (SD_F_EQ | SD_F_EQ_ENABLED) -#define SD_F_EQ_MASK (SD_F_EQ | SD_F_EQ_ENABLED | \ - SD_F_EQ_BYPASSED | SD_F_EQ_PC) - #define SD_F_BITS "\020" \ "\001SIMPLEX" \ /* "\002 */ \ @@ -125,7 +121,7 @@ struct snd_mixer; "\006REGISTERED" \ "\007BITPERFECT" \ "\010VPC" \ - "\011EQ" \ + /* "\011 */ \ "\012EQ_ENABLED" \ "\013EQ_BYPASSED" \ "\014EQ_PC" \ From nobody Wed May 27 15:30:12 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQYTc5mTVz6fCJY for ; Wed, 27 May 2026 15:30:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQYTc3BKqz3T3g for ; Wed, 27 May 2026 15:30:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779895812; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sfZB0CF595OIiy8DZpsMgb13NcDYGYGBG3aNPuY8tc4=; b=ylHynQ3UEVokUA1uCWNVwt/fC/V08aCXdx8CVH8uaHFATRTnaZc0gp7FZYzuc5H+8FWqra 05x2d/o1JJDbqmNOoXpC478qO8+Q2u7vmllnh7p/NqcdccU2DtK84ne/cQDpN5CjwGdZjB +526X20e4fK0mnGxs43NCFr7L4FrsURyZGTltgCKp3cc8qQa76VQQ0yM6oh3bguxifOk5E 949+MHx3oIZS/USpYw0+yH86vfawT6kBHg+DTOzmhwykEUpbcJp9V4UFGwZs9iA/twGpDa oYU0Kij80StwKM61a/YiTTtmZI+01kfGcCYJtST636fGIsftlyLZF5U22+memg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779895812; a=rsa-sha256; cv=none; b=QnEisLE89b5l/y7ZjJ+XMPYF1BxWqF72kcsdW35I/qRPMIL2syKPzsjZSbGRPkv35+zEnl F9VH+VZ0mRJG2sCv18zwXQmYoARjBxRmH9zHVVM8Dj/rAN0lGJtLsXEvtUL06Mw1maKjWC BcVnUU79UkB0gEu0RhSmhd6VSeDsuYtHPHpBnJ4qYh8IO9e/P7wzHBRX8Q4OOKqyei0NJb P/MyQ/qUI014vHFkkgA5WtBs7rumRvK1/kVrz/dhep8JyOtQELU+wsLLPqcKGZBYCfJ0d4 Wbb/nkT/g7p4nqq1r4EyzyEzEFWEudcWsibZRVUssq9njMyUgBPLOVQ9apn9Ow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779895812; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sfZB0CF595OIiy8DZpsMgb13NcDYGYGBG3aNPuY8tc4=; b=gYNecErXUnMEVqbCXOnkKgWSy8cT32oWjsQOx2o8LEECy9nKizpe3K1q3kK8c9qK+J929Y kquWAwv5ELl9GEvFG7j8hVcZeGYF6NWWlhYBX/2n64ae5lIJCoUYzk03Gk9Ld3hkHd5GBV GHdk6zVA7h/JUMOoPr9bqfQMsu/yk+srCVGXz0RLegNBVhigfR9IlIejBIUg+Fev6BLQK/ su2UDUG1taeZlMjwNse6BuYMDuSc9v6katpbSHDNwuGoPmNNDydRxNtubFDJIf1CB+RnRs ToLilRgjbob7dtuCg3Y3JNCjM/MC4Tf3ORK9q3ZfM0Bb9ZnRk0LCdHM+N409Ag== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQYTc2k5Bz14QJ for ; Wed, 27 May 2026 15:30:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 272e3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 15:30:12 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 98a62ccab6ac - main - pcm.4: Document dev.pcm.%d.eq* List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 98a62ccab6ac30d13c2dbcdc7468af8f87df4ec9 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 15:30:12 +0000 Message-Id: <6a170e04.272e3.7fd69b48@gitrepo.freebsd.org> The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=98a62ccab6ac30d13c2dbcdc7468af8f87df4ec9 commit 98a62ccab6ac30d13c2dbcdc7468af8f87df4ec9 Author: Christos Margiolis AuthorDate: 2026-04-17 15:47:44 +0000 Commit: Christos Margiolis CommitDate: 2026-05-27 15:27:11 +0000 pcm.4: Document dev.pcm.%d.eq* Sponsored by: The FreeBSD Foundation MFC after: 1 week Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/15 --- share/man/man4/pcm.4 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/share/man/man4/pcm.4 b/share/man/man4/pcm.4 index 3f228d703b1a..b0f944a0d443 100644 --- a/share/man/man4/pcm.4 +++ b/share/man/man4/pcm.4 @@ -430,6 +430,17 @@ the definitive format/rate target. The recommended way to use bitperfect mode is to disable VCHANs and enable this sysctl. Default is disabled. +.It Va dev.pcm.%d.eq +Set to 1 or 0 to enable (1) or disable (0) the equalizer. +Default is disabled. +When enabled, the mixer bass and treble controls can be used, as well as the +.Va dev.pcm.%d.eq_preamp +tunable. +.It Va dev.pcm.%d.eq_preamp +Equalizer preamp (in dB). +.Va dev.pcm.%d.eq +has to be enabled, in order for this tunable to take effect. +Read the tunable's description to see the available range of values. .It Va dev.pcm.%d.[play|rec].vchans Enable (1) or disable (0) VCHANs. Default is enabled. From nobody Wed May 27 15:30:13 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQYTd5cpWz6fC2t for ; Wed, 27 May 2026 15:30:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQYTd3wcGz3T7g for ; Wed, 27 May 2026 15:30:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779895813; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KgDeuZ7bYKrf6HDtiCJXlFHTJR+g0UPsbn2q3AgPLII=; b=YgDwk4Itvil9UqcdVJlxv1YBlCeJcJ4hkSXLXc15yUzclPcvjhWdV6d7XH4XjcoEHWrAbN gkjbyECsPP+ju2b/shvJgf5NVkAncIchuG43u/Q61QWuPIr0llZ/7QhLzkHy/V7viBwcyR N449/5MhC/4+0maDdN1dSuqS8O32dFNp5IsjwGhrY4iUNlRMDyGRhcKVxmBCOz1uYRExu8 D5FH5Q4uZgaAMji532sHuErT3r4cfo9kI8w8/J9cpo+GqF8B+nVFLItInLKU+r2O6Fbp31 AL9c7KmpFu3UGDG7OWC7TJKx1L7sehWU8yjmL9xUzLOB3d/YbFEXGhTmFUsJiA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779895813; a=rsa-sha256; cv=none; b=yrymQ7RsBFgMOhv+cttutvwglRgd7T1rMPWk0X4glVu5dkthQEW8gcg0/hzn5+6hCTna19 6AD4VXSBfQ4LX9qiMSy+bb5xhPQShTPgEoL79s0ouFffIUCO6FeIPlFZoU3qn+k06g/19u 8MugX8Yx7LMu4OKgDFFJWYNVXvc+I8SSMtgF2uLKqvgA4GTaQxAhi9J29ewgfUFz1xfi2i mi6pcg+qtwaticFOE3ACyRwbuXOzfzN8r51CTg0+8h9EcUckbuehQZ6dXUsD5jiKKcxJ1D DEX6EPZc1eEbGLSCwVknwZ44+A3m7o4/Mre2YbDRS6ULdx3the+wZWlThIycTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779895813; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KgDeuZ7bYKrf6HDtiCJXlFHTJR+g0UPsbn2q3AgPLII=; b=Unw5qm3N013eZvEcQJ2NA2sqi9YP7TIQCErPoykZWaT+0w5s+xthi140OoZ6u6d2v+l1X1 GhvgJ9G27UhiLbkO6LUdTuL6IPqAeJhUmJ9JsW9eAk13UnzLP48wcDTpZvSzOjqtzR8PAd gVeUIwkGH3dv2A5q2oYg/7yuzOZJT95N669yBLlf5mbiXLfqMqhMX/AjWou09HYux2Y6ZR QBwyaIRgrslsOphuT948zhBFSqrXcMnO0C9i/KKQQ1f+EKJeFadBRonfBPgmnL8+CnNSF7 wBDMBK7m7qvW9nWRDidQhbk95ryjD9qDHgWJR4ZWV3aYc7OBXaxh3d94zCDm1Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQYTd39mRz14g9 for ; Wed, 27 May 2026 15:30:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27f99 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 15:30:13 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 8b8dbc6bbe39 - main - sndctl(8): Implement EQ controls List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8b8dbc6bbe391fd95a19bd1d9f0aac47bac085f8 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 15:30:13 +0000 Message-Id: <6a170e05.27f99.78beea47@gitrepo.freebsd.org> The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=8b8dbc6bbe391fd95a19bd1d9f0aac47bac085f8 commit 8b8dbc6bbe391fd95a19bd1d9f0aac47bac085f8 Author: Christos Margiolis AuthorDate: 2026-04-17 16:10:48 +0000 Commit: Christos Margiolis CommitDate: 2026-05-27 15:27:11 +0000 sndctl(8): Implement EQ controls Sponsored by: The FreeBSD Foundation MFC after: 1 week Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/15 --- usr.sbin/sndctl/sndctl.8 | 4 +++- usr.sbin/sndctl/sndctl.c | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/usr.sbin/sndctl/sndctl.8 b/usr.sbin/sndctl/sndctl.8 index 73414bd95325..44dcb791ca51 100644 --- a/usr.sbin/sndctl/sndctl.8 +++ b/usr.sbin/sndctl/sndctl.8 @@ -27,7 +27,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 2, 2025 +.Dd April 17, 2026 .Dt SNDCTL 8 .Os .Sh NAME @@ -82,6 +82,8 @@ The device controls are as follows: .It bitperfect Ta Boolean Ta Read/Write Ta Bit-perfect mode enabled .It autoconv Ta Boolean Ta Read/Write Ta Auto-conversions enabled .It realtime Ta Boolean Ta Read/Write Ta Real-time mode enabled +.It eq Ta Boolean Ta Read/Write Ta Equalization enabled +.It eq_preamp Ta String Ta Read/Write Ta Equalization preamp value (in dB) .It play Ta Group Ta Read Ta Playback properties .It play.format Ta String Ta Read/Write Ta Playback format .It play.rate Ta Number Ta Read/Write Ta Playback sample rate diff --git a/usr.sbin/sndctl/sndctl.c b/usr.sbin/sndctl/sndctl.c index bbc2da6a4ab9..778643a2a978 100644 --- a/usr.sbin/sndctl/sndctl.c +++ b/usr.sbin/sndctl/sndctl.c @@ -97,6 +97,8 @@ struct snd_dev { int bitperfect; int realtime; int autoconv; + int eq; + char eq_preamp[BUFSIZ]; struct { char format[FMTSTR_LEN]; int rate; @@ -130,6 +132,8 @@ struct map { static int mod_bitperfect(struct snd_dev *, void *); static int mod_autoconv(struct snd_dev *, void *); static int mod_realtime(struct snd_dev *, void *); +static int mod_eq(struct snd_dev *, void *); +static int mod_eq_preamp(struct snd_dev *, void *); static int mod_play_vchans(struct snd_dev *, void *); static int mod_play_rate(struct snd_dev *, void *); static int mod_play_format(struct snd_dev *, void *); @@ -149,6 +153,8 @@ static struct snd_ctl dev_ctls[] = { { "bitperfect", F(bitperfect), NUM, mod_bitperfect }, { "autoconv", F(autoconv), NUM, mod_autoconv }, { "realtime", F(realtime), NUM, mod_realtime }, + { "eq", F(eq), NUM, mod_eq }, + { "eq_preamp", F(eq_preamp), STR, mod_eq_preamp }, { "play", F(play), GRP, NULL }, { "play.format", F(play.format), STR, mod_play_format }, { "play.rate", F(play.rate), NUM, mod_play_rate }, @@ -436,6 +442,7 @@ read_dev(char *path) struct sndstioc_nv_arg arg; struct snd_dev *dp = NULL; struct snd_chan *ch; + char buf[64]; size_t nitems, nchans, i, j; int fd, caps, unit, t1, t2, t3; @@ -557,6 +564,14 @@ read_dev(char *path) if (t1 == 0 && t2 == 0 && t3 == 0) dp->realtime = 1; + snprintf(buf, sizeof(buf), "dev.pcm.%d.eq", dp->unit); + if (sysctl_int(buf, NULL, &dp->eq)) + xo_err(1, "%s: sysctl", dp->name); + + snprintf(buf, sizeof(buf), "dev.pcm.%d.eq_preamp", dp->unit); + if (sysctl_str(buf, NULL, dp->eq_preamp, sizeof(dp->eq_preamp))) + xo_err(1, "%s: sysctl", dp->name); + if (!nvlist_exists(nvlist_get_nvlist(di[i], SNDST_DSPS_PROVIDER_INFO), SNDST_DSPS_SOUND4_CHAN_INFO)) xo_errx(1, "%s: channel info list empty", dp->name); @@ -842,6 +857,32 @@ mod_realtime(struct snd_dev *dp, void *arg) return (rc); } +static int +mod_eq(struct snd_dev *dp, void *arg) +{ + char buf[64]; + + if (dp->from_user) + return (-1); + + snprintf(buf, sizeof(buf), "dev.pcm.%d.eq", dp->unit); + + return (sysctl_int(buf, arg, &dp->eq)); +} + +static int +mod_eq_preamp(struct snd_dev *dp, void *arg) +{ + char buf[64]; + + if (dp->from_user) + return (-1); + + snprintf(buf, sizeof(buf), "dev.pcm.%d.eq_preamp", dp->unit); + + return (sysctl_str(buf, arg, dp->eq_preamp, sizeof(dp->eq_preamp))); +} + static int mod_play_vchans(struct snd_dev *dp, void *arg) { From nobody Wed May 27 15:30:14 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQYTg0yDnz6fCJg for ; Wed, 27 May 2026 15:30:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQYTf46zQz3SwM for ; Wed, 27 May 2026 15:30:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779895814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GiCkNOIpbyMV05J/oMgHAmcsmpQeAZIOi0aO24+7L1Q=; b=ANkq8x7Dk1VfcHXY3xsbyfHbx7jDPoA+zVxEIZaVLBHghBHXa6Q1WaKsPREuZ8nwy5Tz90 /hOegDqgHAsho2fagt87OsidjbxqI99/8LQTI5B690kOVg67yw27tLtQhSRdvwY/lw1ZVP F8cz/xxkHll3GRu3mPiSYjJZKw+SdwLto8vRd+YxpDqIgTrzde+TkmBqBIFCzMFX4drizi siDBHD/eWZCIOA6uSpAeLHGRHVwbuw0f9fWCxVO74QX6ptnY9W+xb8384pW7TMFWbiP0rG x43ow4z2NnMb1hue3FNYLlvvLdigAwOH6bJSQiBbJKkGyFrf6sJhdaaljg7hrQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779895814; a=rsa-sha256; cv=none; b=kExLsFuXo3O/aFD81vgGpnmOylbD0xeeQIk28BEgf6a5jKiyZ4+6ct40n3Ly+gilOWZ3fg 784id4o2+kNMWNDGE9crRVlo3lHuBldbEJl/P4SEq51QijVy6U3e89gcp05H53t4YUd+tN /rdPEbHGhSBXbUrvh5hos/QGMyqp//YhWuUjPan7FlKu57+hAUwWO09HT3J34ZjBG9oiYf RrbRiJ9Aope9nQgWKFl8a0C9LRr9Ci7lq56/ZVsAggdav9NEc+sJAeLPsobFjkjweZkZs9 whGs0wlc2Mo+nbfYVqMXGDfViOinDbBpZfQlE6GikQsuH+FuGhNhdKGXM7OMHw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779895814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GiCkNOIpbyMV05J/oMgHAmcsmpQeAZIOi0aO24+7L1Q=; b=WaRQXlNaxJaRDyzmfJIA766yRhbvQubc44eooA6K4r6SjeSxTkANmI+1WMflP5pODwSpzW eied5cZv6puGfjZfOrsczUPuN+dnMY6ObRFvMC1zGg7QA850U4nJBo98/M6NikkHvNte8C AAV8Ug82HtEg7Ii4QIPcmJ2bff0sAJlYU5/4CikCdq7NnmftM6CiJz12jDU9kSJI+PRC1a PnWDifHZQa1CfonjqzNNV0/wzQfTvwJIFHu1G+qNUqvlGapTE9y+8iqxKZ4oXp7H071HQJ AH7VYTRPIfIOKS96CmAVTWvOQL5xx3D+iYgTsqz6z7oTQeNSIRHuYamKyrVCOQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQYTf3Yxdz14WP for ; Wed, 27 May 2026 15:30:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 260d1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 15:30:14 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: dfa52e8ed5b5 - main - sound: Update feeder_eq.c LICENSE header List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dfa52e8ed5b5c00f0a587f02258c90e407e5bf6b Auto-Submitted: auto-generated Date: Wed, 27 May 2026 15:30:14 +0000 Message-Id: <6a170e06.260d1.789bd89f@gitrepo.freebsd.org> The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=dfa52e8ed5b5c00f0a587f02258c90e407e5bf6b commit dfa52e8ed5b5c00f0a587f02258c90e407e5bf6b Author: Christos Margiolis AuthorDate: 2026-04-17 16:54:03 +0000 Commit: Christos Margiolis CommitDate: 2026-05-27 15:27:11 +0000 sound: Update feeder_eq.c LICENSE header Sponsored by: The FreeBSD Foundation MFC after: 1 week Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/15 --- sys/dev/sound/pcm/feeder_eq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/sound/pcm/feeder_eq.c b/sys/dev/sound/pcm/feeder_eq.c index 9179148d2bd2..0a28dfa1ba17 100644 --- a/sys/dev/sound/pcm/feeder_eq.c +++ b/sys/dev/sound/pcm/feeder_eq.c @@ -3,7 +3,7 @@ * * Copyright (c) 2008-2009 Ariff Abdullah * All rights reserved. - * Copyright (c) 2024-2025 The FreeBSD Foundation + * Copyright (c) 2024-2026 The FreeBSD Foundation * * Portions of this software were developed by Christos Margiolis * under sponsorship from the FreeBSD Foundation. From nobody Wed May 27 15:33:28 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQYYN4MCLz6fCpn for ; Wed, 27 May 2026 15:33: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQYYN331Cz3XBn for ; Wed, 27 May 2026 15:33:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779896008; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Mst7fsqNhKOfNiCbyQF06HPVH/piXD5KBMG7+iRDkkk=; b=eoel0mTP7pZDTzFWc3Ray1aDtvgeXFwkWyrBsT9Yp3uKO8IeeAFjEHyNYCW+3Q6rWMkjGr PIILsmdgsWftY1t1REvwhFeHiu8dEaIXcocA29d2x/l38eyiyTLZL4t3V6hmLJidY5P5if XsP+jRY1banjvzghEl1wd9SvlfLO07Qxhij44M9PP+Bj1OkLyIGeH6tX4VC3PWL+dOyegz lD2jH4IPwSubgAGPWhO/Aao8+WA5szkgBHMiiXtxVeXrWg4D2oT6i6hDaZ+rklS1oHpGXn Z9Ax7HjQWQS6vBALo+m1nlI/r1Szu1IUG2hHvuU0CwMIdSm7wUEU4ITf9NYWzQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779896008; a=rsa-sha256; cv=none; b=VqUVy7RyA1oASMrGkfGG7Rq03gBRVuafg+1oL8zyohzZG4MvV9UWUK9m5q2e17IF0nLp9a wZy76bKASeUbv3ZOMqZd/xWfRBxP6P1UoVeMjLtqmYEEJAyrEYVeRGnW4LvZY5XYaBLxRq yx9TIbWOZrTHwIWCG04dkYl1CFQsduAuKr/KxwpN43tiKWyVlZRbreU1g85cnyH1UNiL1r /+C8B81lg3W6Jc/0ERUQ2XNDVpiRdn8/z7g4v2V29zd6sz/N9oreRpAXxAjgYih0iuS70/ 3PBi9hIkJmgcc8gT8XHuHtmhj/gG8IByBfrG+ql4mqeZ+jZCjOW5sCNhn8XGoQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779896008; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Mst7fsqNhKOfNiCbyQF06HPVH/piXD5KBMG7+iRDkkk=; b=nNFwiTw9BwIYO5eWNWLV6bxm600IZ4pKa5d0LoqpwV8YG8twMx3XuwQMjkCU7eBNWV16uT LOStauAY5lf/PT0NWmhX71gv2gBdzKlFof7VulY9G1xOIwNqDWk/VBtCQCKrY6b+g+G9Bo iYoEkDyLJS1qkJnk/wx1DcJuXenElSzibVy8HoNjnwD7/QEnKdGXbUFyMFQEdxpiwtmNAh OjjRtgGRVtHLwhIRj+qwdZXtBM0HV940XRj1Lz0zTmesUAINgpFmHiamCQkF4yQFUT13QM QLryFFIj/2FuJC3Pnkh5yiNrMrYHwNojUc3IBec07zXiAWArfsabDp/svowxgg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQYYN2NV6z14gv for ; Wed, 27 May 2026 15:33:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30ba9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 15:33:28 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: f61e65e1b2ac - main - sound: Retire mixer_ioctl_channel() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f61e65e1b2ac74034bfc5d1230ae23ea4b9faa60 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 15:33:28 +0000 Message-Id: <6a170ec8.30ba9.3ab5233a@gitrepo.freebsd.org> The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=f61e65e1b2ac74034bfc5d1230ae23ea4b9faa60 commit f61e65e1b2ac74034bfc5d1230ae23ea4b9faa60 Author: Christos Margiolis AuthorDate: 2026-04-16 11:00:16 +0000 Commit: Christos Margiolis CommitDate: 2026-05-27 15:32:11 +0000 sound: Retire mixer_ioctl_channel() This function never succeeds when it is not called from the same process that has opened the file descriptor (e.g., mixer(8)). The reason is that the CHN_FOREACH() loop tries to match the pid of each channel with the pid of the process performing the ioctl, which will not be the same, unless it's the same process that both opened the channel and performed the ioctl. In the case that the same process opens the channels and performs the ioctl, however, we still do not need to worry, because mixer_ioctl_cmd() essentially does the same thing anyway. Additionally, this scenario should be quite rare, given that most applications do not open both /dev/dsp* and /dev/mixer*, and in fact, it is actively encouraged by the official OSSv4 specification not to do that. Sponsored by: The FreeBSD Foundation MFC after: 1 week Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/18 --- sys/dev/sound/pcm/mixer.c | 117 +--------------------------------------------- 1 file changed, 1 insertion(+), 116 deletions(-) diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c index 7ccb57c205ba..be4447b13964 100644 --- a/sys/dev/sound/pcm/mixer.c +++ b/sys/dev/sound/pcm/mixer.c @@ -1032,113 +1032,6 @@ mixer_close(struct cdev *i_dev, int flags, int mode, struct thread *td) return (0); } -static int -mixer_ioctl_channel(struct cdev *dev, u_long cmd, caddr_t arg, int mode, - struct thread *td, int from) -{ - struct snddev_info *d; - struct snd_mixer *m; - struct pcm_channel *c, *rdch, *wrch; - pid_t pid; - int j, ret; - - if (td == NULL || td->td_proc == NULL) - return (-1); - - m = dev->si_drv1; - d = device_get_softc(m->dev); - j = cmd & 0xff; - - switch (j) { - case SOUND_MIXER_PCM: - case SOUND_MIXER_RECLEV: - case SOUND_MIXER_DEVMASK: - case SOUND_MIXER_CAPS: - case SOUND_MIXER_STEREODEVS: - break; - default: - return (-1); - } - - pid = td->td_proc->p_pid; - rdch = NULL; - wrch = NULL; - c = NULL; - ret = -1; - - /* - * This is unfair. Imagine single proc opening multiple - * instances of same direction. What we do right now - * is looking for the first matching proc/pid, and just - * that. Nothing more. Consider it done. - * - * The better approach of controlling specific channel - * pcm or rec volume is by doing mixer ioctl - * (SNDCTL_DSP_[SET|GET][PLAY|REC]VOL / SOUND_MIXER_[PCM|RECLEV] - * on its open fd, rather than cracky mixer bypassing here. - */ - CHN_FOREACH(c, d, channels.pcm.opened) { - CHN_LOCK(c); - if (c->pid != pid || - !(c->feederflags & (1 << FEEDER_VOLUME))) { - CHN_UNLOCK(c); - continue; - } - if (rdch == NULL && c->direction == PCMDIR_REC) { - rdch = c; - if (j == SOUND_MIXER_RECLEV) - goto mixer_ioctl_channel_proc; - } else if (wrch == NULL && c->direction == PCMDIR_PLAY) { - wrch = c; - if (j == SOUND_MIXER_PCM) - goto mixer_ioctl_channel_proc; - } - CHN_UNLOCK(c); - if (rdch != NULL && wrch != NULL) - break; - } - - if (rdch == NULL && wrch == NULL) - return (-1); - - if ((j == SOUND_MIXER_DEVMASK || j == SOUND_MIXER_CAPS || - j == SOUND_MIXER_STEREODEVS) && - (cmd & ~0xff) == MIXER_READ(0)) { - mtx_lock(&m->lock); - *(int *)arg = mix_getdevs(m); - mtx_unlock(&m->lock); - if (rdch != NULL) - *(int *)arg |= SOUND_MASK_RECLEV; - if (wrch != NULL) - *(int *)arg |= SOUND_MASK_PCM; - ret = 0; - } - - return (ret); - -mixer_ioctl_channel_proc: - - KASSERT(c != NULL, ("%s(): NULL channel", __func__)); - CHN_LOCKASSERT(c); - - if ((cmd & ~0xff) == MIXER_WRITE(0)) { - int left, right, center; - - left = *(int *)arg & 0x7f; - right = (*(int *)arg >> 8) & 0x7f; - center = (left + right) >> 1; - chn_setvolume_multi(c, SND_VOL_C_PCM, left, right, center); - } else if ((cmd & ~0xff) == MIXER_READ(0)) { - *(int *)arg = chn_getvolume_matrix(c, SND_VOL_C_PCM, SND_CHN_T_FL); - *(int *)arg |= - chn_getvolume_matrix(c, SND_VOL_C_PCM, SND_CHN_T_FR) << 8; - } - - CHN_UNLOCK(c); - - return (0); -} - static int mixer_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, struct thread *td) @@ -1156,15 +1049,7 @@ mixer_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, PCM_GIANT_ENTER(d); PCM_ACQUIRE_QUICK(d); - ret = -1; - - if (mixer_bypass != 0 && (d->flags & SD_F_VPC)) - ret = mixer_ioctl_channel(i_dev, cmd, arg, mode, td, - MIXER_CMD_CDEV); - - if (ret == -1) - ret = mixer_ioctl_cmd(i_dev, cmd, arg, mode, td, - MIXER_CMD_CDEV); + ret = mixer_ioctl_cmd(i_dev, cmd, arg, mode, td, MIXER_CMD_CDEV); PCM_RELEASE_QUICK(d); PCM_GIANT_LEAVE(d); From nobody Wed May 27 15:33:29 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQYYP5bfVz6fCLn for ; Wed, 27 May 2026 15:33:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQYYP3Tw3z3XTC for ; Wed, 27 May 2026 15:33:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779896009; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=onRzVuamNmEDiF05j0dAF9z36QYP6MVYsb3aFlGWmcg=; b=qMXfDawnWNQHdxxW7Yr8ErKVXtScqi9rQcrD2jlLFUQL/+iQsk+wdvp9kVbGMUR8XKC11B Uu+2Wck/f8KRfTDRgFFSfrCY3MS2k2g29KxgQm3/SrQHtZs5hmMGF2W09jfDeorQue7MEJ Q7SPulkk6/UosnpO4HQuBqMfu4i8pE0fIIgxyOnHt2alVo5qnjQ3YrYjEk/P9DgfeNZwLO qXoCJKwAVgaBkGI1M5MWncWMtnKWuEfmmhzuEikdVAhdiOGbSG2wJjSckqY7fFXqheDCHb etu7gZSDGTZTbQ+7e4mmQEuZVmNNCmUVg63leC81G+76Sj4IkhkRJkb1Eebriw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779896009; a=rsa-sha256; cv=none; b=bZ/hzMtXZo6n1QZHJg2WchYL4OT1LSIM4RQcny9bbwG9HrXcy2ry5MUveOEAnX35embAY3 97pnLVodz6s+V28nbbj0sqINgtscGddV3IfKkZWzMNq11JSpm92YYg9hkqqClXKdywLM8v XLZy/zJW7vuXRJfazzElBumj7duQDXk5en9gLkh6nVWr/R7n/eAuabFDEEHEmVz4z72/Q4 8R+aM/SMSmHVjAIdaIVaxC3Nn6pvVPpMict+vG1kdHeCN8m3XvM93WrjjMnFjfFvwDY/UX /rYrkN48YQ/Oxw3NRoPPMadlR/VTOHpY00LWWpcta9p7Qme6m2nnQOEK09nKew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779896009; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=onRzVuamNmEDiF05j0dAF9z36QYP6MVYsb3aFlGWmcg=; b=AI4iU/tzsOJ9ofa2lwpBvdJFdoIle46FDaGjb7PBL9XGNJXfrwiFHIJShbYGc02nvv3DBQ Q+g9uJTKLm2vsvXkq8oZIV2w8Ny7WWw8/dwlIswpBYV83jnTBfL3iD6jc/XVdy4wD+C7yE rRbEg4x9xLXZ35LgAI9YrufMV3Mi+S1bSTTdmpSoacPRRQK0Ddmyj6VBeUWUr9fPxWeNqO KmsXg8RBnGkwanvJMKUG/TkWINe/zeRalhRkpFXbg/bh2L5lyTRqVb0IMNyHniSPC0gQqb kXM2ra+B6d8Squc37ELPEeA6GrVHRuxpmjmn4wP91J0LANiPeHMns26+KcbpPw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQYYP2lLDz1578 for ; Wed, 27 May 2026 15:33:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3036c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 15:33:29 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 8e804f3dd629 - main - sound: Retire unused hw.snd.vpc_mixer_bypass List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8e804f3dd6298d6aa8cbaf0f2a0267c6207ac8f7 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 15:33:29 +0000 Message-Id: <6a170ec9.3036c.2571a1df@gitrepo.freebsd.org> The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=8e804f3dd6298d6aa8cbaf0f2a0267c6207ac8f7 commit 8e804f3dd6298d6aa8cbaf0f2a0267c6207ac8f7 Author: Christos Margiolis AuthorDate: 2026-04-16 11:25:20 +0000 Commit: Christos Margiolis CommitDate: 2026-05-27 15:32:11 +0000 sound: Retire unused hw.snd.vpc_mixer_bypass Sponsored by: The FreeBSD Foundation MFC after: 1 week Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/18 --- share/man/man4/pcm.4 | 9 --------- sys/dev/sound/pcm/mixer.c | 5 ----- 2 files changed, 14 deletions(-) diff --git a/share/man/man4/pcm.4 b/share/man/man4/pcm.4 index b0f944a0d443..9ea0f14c3930 100644 --- a/share/man/man4/pcm.4 +++ b/share/man/man4/pcm.4 @@ -407,15 +407,6 @@ When a channel is closed the channel volume will be reset to 0db. This means that any changes to the volume will be lost. Enabling this will preserve the volume, at the cost of possible confusion when applications tries to re-open the same device. -.It Va hw.snd.vpc_mixer_bypass -The recommended way to use the VPC feature is to teach applications to use the -correct -.Fn ioctl : -.Dv SNDCTL_DSP_GETPLAYVOL , SNDCTL_DSP_SETPLAYVOL , -.Dv SNDCTL_DSP_SETRECVOL , SNDCTL_DSP_SETRECVOL . -This is however not always possible. -Enable this to allow applications to use their own existing mixer logic -to control their own channel volume. .It Va hw.snd.vpc_reset Enable to restore all channel volumes back to the default value of 0db. .It Va dev.pcm.%d.bitperfect diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c index be4447b13964..d73361fe7e16 100644 --- a/sys/dev/sound/pcm/mixer.c +++ b/sys/dev/sound/pcm/mixer.c @@ -37,11 +37,6 @@ #include "feeder_if.h" #include "mixer_if.h" -static int mixer_bypass = 1; -SYSCTL_INT(_hw_snd, OID_AUTO, vpc_mixer_bypass, CTLFLAG_RWTUN, - &mixer_bypass, 0, - "control channel pcm/rec volume, bypassing real mixer device"); - #define MIXER_NAMELEN 16 struct snd_mixer { KOBJ_FIELDS; From nobody Wed May 27 15:33:30 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQYYR1dTSz6fCqg for ; Wed, 27 May 2026 15:33: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQYYQ43zTz3X4f for ; Wed, 27 May 2026 15:33:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779896010; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GQRcPcqR2eFCjFCFkR3lk8QvVVN+3qZXZprVTilk/iU=; b=OkqEMntG2NXrAP6+pmT8i3kyzS0AVHo/MPyTAswLaf3lfjChl6Tr7IW03pwx9BHF53etQe dI7o9YKB5UedhaSH23Ogy9XQHwHkuBgZF6SJvCMaHi19yPEVsrV5JjbtC7QNiRDnfAN+Ui i4wEEgbuPsQa3SHGOCk8bPC46h8FwEaRz4oSjRmZFGnGx/0PU9eogN6sLLX9JETaTd6oNI EnBfL6m7dBAcfTAjxTZytovnglltJPA/3+ilUut/oQ1t1JeRYxgzjKO2qbQvA9UQyqa7wi l+AlKsrGLaIIQ6URn4425fy9yiStkD8HLqLHgieC7iTZC5mpJhYdAePHCpvPnQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779896010; a=rsa-sha256; cv=none; b=Vp1zhXzwaLUOqFAl0vTdcE3/RyM+3sFaqKNy7v/MDZ5F7W0HYMva+z7KszBqBfdpkT9BrT 1c0H+6Iwi8tdHX+8PS64hYVH8/vYNcswBJxF6lMxUBFghdphmOK9X/Egwyyf1hmkGbKWVP arz+Gspc1iFVsUFN3zdu6FHwyKnvrf//XXujIsOulPflsua7qHOjHicSWwfepVVNLR1eY1 R53Cb7oYY9Xf7/9+xxNQpEo9rkP2TAm4TkrsKiigzNDBabRHwJlgPd5VxizedAlrO+b2Li JcXT6h5QJJHzKUP3Y6gRMAC1c05r5f191ElaTU0HEod5tFO7HhnrmsGx9CTaHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779896010; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GQRcPcqR2eFCjFCFkR3lk8QvVVN+3qZXZprVTilk/iU=; b=SQUInj+0CUbz1wSlxDAxoih848APCIDc230rK1T3j84bse0lIc5ZIHQQQDWQ+damomeTGG DcgRZpdKVQhLYEmy6Jf/0ypx/vrAyvV582RVlCyC74p29AVPRkz7IoJgZb9PD45dXUKDg2 AaG8Hq10PyrGu6XERKaPZoWQG3LHYWiNb7KUfFx22vaBt85Xpn+Xtx0WXa9C+Ce0MX7Bo1 +mRDfHkiF9WgbhaTg6PVy8SPvytWDVWP8WgeKMbNrR+7N4k+m+ESWc2jT1w5RIC9IJYq1W J7HSUqlmGgf/Qx83izMZXxLA0J0oypaz39u2ca4FFXOKwiGoAbUOckiWYX5npA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQYYQ3Zwzz14ph for ; Wed, 27 May 2026 15:33:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 274d4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 15:33:30 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 22730c4b10ba - main - sound: Remove unused "from" mixer_ioctl_cmd() argument List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 22730c4b10ba391859a06966ea3e429aaf43cd09 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 15:33:30 +0000 Message-Id: <6a170eca.274d4.2c5f71d5@gitrepo.freebsd.org> The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=22730c4b10ba391859a06966ea3e429aaf43cd09 commit 22730c4b10ba391859a06966ea3e429aaf43cd09 Author: Christos Margiolis AuthorDate: 2026-04-16 11:32:03 +0000 Commit: Christos Margiolis CommitDate: 2026-05-27 15:32:11 +0000 sound: Remove unused "from" mixer_ioctl_cmd() argument Sponsored by: The FreeBSD Foundation MFC after: 1 week Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/18 --- sys/dev/sound/pcm/dsp.c | 9 +++------ sys/dev/sound/pcm/mixer.c | 4 ++-- sys/dev/sound/pcm/mixer.h | 5 +---- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index 0f76791448ca..bc92a3fbd530 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -728,8 +728,7 @@ dsp_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, if (d->mixer_dev != NULL) { PCM_ACQUIRE_QUICK(d); - ret = mixer_ioctl_cmd(d->mixer_dev, cmd, arg, -1, td, - MIXER_CMD_DIRECT); + ret = mixer_ioctl_cmd(d->mixer_dev, cmd, arg, -1, td); PCM_RELEASE_QUICK(d); } else ret = EBADF; @@ -1526,8 +1525,7 @@ dsp_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, if (d->mixer_dev != NULL) { PCM_ACQUIRE_QUICK(d); - ret = mixer_ioctl_cmd(d->mixer_dev, xcmd, arg, -1, td, - MIXER_CMD_DIRECT); + ret = mixer_ioctl_cmd(d->mixer_dev, xcmd, arg, -1, td); PCM_RELEASE_QUICK(d); } else ret = ENOTSUP; @@ -1539,8 +1537,7 @@ dsp_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, case SNDCTL_DSP_SET_RECSRC: if (d->mixer_dev != NULL) { PCM_ACQUIRE_QUICK(d); - ret = mixer_ioctl_cmd(d->mixer_dev, cmd, arg, -1, td, - MIXER_CMD_DIRECT); + ret = mixer_ioctl_cmd(d->mixer_dev, cmd, arg, -1, td); PCM_RELEASE_QUICK(d); } else ret = ENOTSUP; diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c index d73361fe7e16..73d1b5870b83 100644 --- a/sys/dev/sound/pcm/mixer.c +++ b/sys/dev/sound/pcm/mixer.c @@ -1044,7 +1044,7 @@ mixer_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, PCM_GIANT_ENTER(d); PCM_ACQUIRE_QUICK(d); - ret = mixer_ioctl_cmd(i_dev, cmd, arg, mode, td, MIXER_CMD_CDEV); + ret = mixer_ioctl_cmd(i_dev, cmd, arg, mode, td); PCM_RELEASE_QUICK(d); PCM_GIANT_LEAVE(d); @@ -1067,7 +1067,7 @@ mixer_mixerinfo(struct snd_mixer *m, mixer_info *mi) */ int mixer_ioctl_cmd(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, - struct thread *td, int from) + struct thread *td) { struct snd_mixer *m; int ret = EINVAL, *arg_i = (int *)arg; diff --git a/sys/dev/sound/pcm/mixer.h b/sys/dev/sound/pcm/mixer.h index 3ce8a4f5adee..4ced76082e31 100644 --- a/sys/dev/sound/pcm/mixer.h +++ b/sys/dev/sound/pcm/mixer.h @@ -36,7 +36,7 @@ int mixer_delete(struct snd_mixer *m); int mixer_init(device_t dev, kobj_class_t cls, void *devinfo); int mixer_uninit(device_t dev); int mixer_reinit(device_t dev); -int mixer_ioctl_cmd(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, struct thread *td, int from); +int mixer_ioctl_cmd(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, struct thread *td); int mixer_oss_mixerinfo(struct cdev *i_dev, oss_mixerinfo *mi); int mixer_hwvol_init(device_t dev); @@ -63,9 +63,6 @@ u_int32_t mix_getparent(struct snd_mixer *m, u_int32_t dev); void *mix_getdevinfo(struct snd_mixer *m); struct mtx *mixer_get_lock(struct snd_mixer *m); -#define MIXER_CMD_DIRECT 0 /* send command within driver */ -#define MIXER_CMD_CDEV 1 /* send command from cdev/ioctl */ - #define MIXER_TYPE_PRIMARY 0 /* mixer_init() */ #define MIXER_TYPE_SECONDARY 1 /* mixer_create() */ From nobody Wed May 27 15:33:27 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQYYS4Fjhz6fCpj for ; Wed, 27 May 2026 15:33: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQYYS2R6Hz3XS7 for ; Wed, 27 May 2026 15:33:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779896012; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zH9JF3gVuku2JDouS6FF6/1azRVlhlF2/vTB9RkEvtI=; b=O4+Qf86vQi7c5cI1b8MiD9wcElkWmcbVSnBIK+4gKFE+3nWDtygbAdjYWeqsgCPZfxg/fh LiYey0C4voOrdQo+qCmUjmw7xHDCVai0PS/iP1P1YJelCmzmLQKBmAyFleSK+JrXEMDO4S 7Fz6dj7B8SPGqm/B2NdSCmvwPwCIfmBJ7GYI7Ur341lMKvPddMYP7pa/BeZbLnUFhRr4v8 1+lumP0pdsAXomDlH2GVwM5g+PuiiHglKfrjdqLp9T0dH60aq0TvIpWGaOCcEw488jdbVz NVmF4Qx5u0+Eru7pISbT65WeYbuLAeJFEKgajRGACM9zTZcHknmdTF1KMqXrFA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779896012; a=rsa-sha256; cv=none; b=FUt7Uw5XDZlwg50EeYX37qhFkYyiKfXLTxTlu8NJUTsbukcfF5CZj6jo7EQxfjms6+OSZk 6KoU7h1boTWjuuhfGras6Zd9efGV3wlMsJgm/rQLiQcts2/aGAY8BrYKYQBq+PaWX1a5oZ PbE5Wea/EU6YH/NuNBJ7p2ZT+ovJDnVq6mo4j4nRJB9u7CWef6sFdVtC+DbDTsKRAqd0mb qDd6dr1wwWvh8hftvT6A+KYukouku0edzhkyc31cgvyWUih5hE6cU36JjY16mdljrljeTH UGoQWecHo8Kmnu3j9gtvT4vUJNRBKmu/5+sxSuSP1XeMZtP+HKJkUUs0UFLX3Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779896012; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zH9JF3gVuku2JDouS6FF6/1azRVlhlF2/vTB9RkEvtI=; b=QMUKxEdXB6teAqEWf21bhXUi1HzRCEycgBF3x4hZcBou1SEaUYnFJ9KASLv1I5QURyQS3p gxMALjAPsSq5O2EjbYXKrRURUzEKtXAd7SY5k4Eui0NoWzss1EJbb8g5LeyVq6lCfM/Gqi uU5h9o73zyi8rmvJxBri0fSu080VajxY8Iq7swVxSkAoq3sDhc3obPCGMt54PsWZprU9I6 qzc1rdnvVZ7ThIfeuZLQYCVd998Vr5FQ60wW467Spq0vGpYsMHgjS1YMxApAeFioNyFjAc ed+oH1Lc7zV5egtZHb1qKGmk+YWdP/Hw8E7wrshqkIX42sXw+VOqEgVqJsvETg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQYYS1xk3z14yk for ; Wed, 27 May 2026 15:33:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27fa0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 15:33:27 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: e8ea97602ca9 - main - sound: Retire M_MIXER List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e8ea97602ca97166a0729fdc32c84c9016fe7b0c Auto-Submitted: auto-generated Date: Wed, 27 May 2026 15:33:27 +0000 Message-Id: <6a170ec7.27fa0.5e664930@gitrepo.freebsd.org> The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=e8ea97602ca97166a0729fdc32c84c9016fe7b0c commit e8ea97602ca97166a0729fdc32c84c9016fe7b0c Author: Christos Margiolis AuthorDate: 2026-04-15 23:39:23 +0000 Commit: Christos Margiolis CommitDate: 2026-05-27 15:32:11 +0000 sound: Retire M_MIXER Even though harmless, it is not really useful, as there is essentially only one allocation with M_MIXER. Sponsored by: The FreeBSD Foundation MFC after: 1 week Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/18 --- sys/dev/sound/pcm/mixer.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c index 8015c8fc0c32..7ccb57c205ba 100644 --- a/sys/dev/sound/pcm/mixer.c +++ b/sys/dev/sound/pcm/mixer.c @@ -37,8 +37,6 @@ #include "feeder_if.h" #include "mixer_if.h" -static MALLOC_DEFINE(M_MIXER, "mixer", "mixer"); - static int mixer_bypass = 1; SYSCTL_INT(_hw_snd, OID_AUTO, vpc_mixer_bypass, CTLFLAG_RWTUN, &mixer_bypass, 0, @@ -638,7 +636,7 @@ mixer_obj_create(device_t dev, kobj_class_t cls, void *devinfo, KASSERT(type == MIXER_TYPE_PRIMARY || type == MIXER_TYPE_SECONDARY, ("invalid mixer type=%d", type)); - m = (struct snd_mixer *)kobj_create(cls, M_MIXER, M_WAITOK | M_ZERO); + m = (struct snd_mixer *)kobj_create(cls, M_DEVBUF, M_WAITOK | M_ZERO); snprintf(m->name, sizeof(m->name), "%s:mixer", device_get_nameunit(dev)); if (desc != NULL) { @@ -659,7 +657,7 @@ mixer_obj_create(device_t dev, kobj_class_t cls, void *devinfo, if (MIXER_INIT(m)) { mtx_lock(&m->lock); mtx_destroy(&m->lock); - kobj_delete((kobj_t)m, M_MIXER); + kobj_delete((kobj_t)m, M_DEVBUF); return (NULL); } @@ -678,7 +676,7 @@ mixer_delete(struct snd_mixer *m) MIXER_UNINIT(m); mtx_destroy(&m->lock); - kobj_delete((kobj_t)m, M_MIXER); + kobj_delete((kobj_t)m, M_DEVBUF); return (0); } @@ -793,7 +791,7 @@ mixer_uninit(device_t dev) MIXER_UNINIT(m); mtx_destroy(&m->lock); - kobj_delete((kobj_t)m, M_MIXER); + kobj_delete((kobj_t)m, M_DEVBUF); d->mixer_dev = NULL; From nobody Wed May 27 15:33:31 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQYYS2CHRz6fCPv for ; Wed, 27 May 2026 15:33: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQYYR5H3Cz3X9Q for ; Wed, 27 May 2026 15:33:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779896011; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FMcR/+EMaXSkDgyxdjLLVEyuV7vvfw/lXX9usA9Z/K0=; b=jbNHdoail995eEmBhZC9DUfOlt1px62d+zOfWW5b9VdVtVOrh9BVnpt/4nCpmb0lerfWPV 7rGJWSWrCJcUstgzj6BD7Jokda26icJmORyRtx4aH+hW+2FG/UrOFeTWY/u+lolHgFYV3Z BdGrJVGFXT4NLkKr6DGCShQ3eEs9Gq7dao0exBg1Tyi4Y5B+3xJbNtqHR8ZhQRSELtlxN1 N5VCiWH7F5GOCvqSG2UxuCoTIDSeznz9Z5sXGnJSMR25kJBIzxDdTXRLQs988gQPmCc5Fa KwhA11dCtXHgu90Uf94AO+tAAio19GO3jsmpN624xzzOaMwtn1+jjemzvvOJuQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779896011; a=rsa-sha256; cv=none; b=cdHSP+BAsVXR93FV6qTFLtRLt2IBQB+nP5OYZjaJdpVL9K3nlAVRkYjxTx+co/nfyr3Cb5 oMEzMRKiKUQQwqkuse42MndKuknIp+Tpnn2ZxUv0gNDmnOujw1UtmMSNU1duNBKxh3mqmJ 1a9krHMSsoHTK8HsGR+rD2puFDto7zYZ7kqWKkcXp2iaXmngaD3JcPar47PTWQcCM9RFAR vHNx3GflXY1xaxWe6lLhmMliPRHGkl6K//5fLQpSkMQUSlsGDR7xxL0JZL4NNqz3IxNy9l 2FFLycpH7sGFxGHlMq9VIgoF07JQ6jxFllkfEJenJf6i2+V/PwGZvujDuyu1jQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779896011; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FMcR/+EMaXSkDgyxdjLLVEyuV7vvfw/lXX9usA9Z/K0=; b=HjbdD5bmxKdAGnS1lgO//KG1tNcl37f2EEY9P0f7rYWJtck7lEHwWNDh2eQPxAyp0W1V4P sobfdZZlLYmsDIKCsnh2/NtwCLY5aYn0teUOAt9akoM5JXsNamgOpiFzNKELSrlHFIqjMO G3g6kLl/75oyz9faIJfZRyT111bCUw/oY4dv7x6O/vGibqLw1mbtZtMnHpXWNtKqugZCcE CFMTODh+WD/OTZW1YT77Lp6B6WZ+FwcPllvPDqful2dssv4/AumSonVvgLxusgSsbra69w dkg0w82NG06LQl8zZLrQawxOslVQf1PrEZxs5+7heqASHgNjz837A6WfVMfpPA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQYYR4Rr6z14XC for ; Wed, 27 May 2026 15:33:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30bad by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 15:33:31 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 9a00e0b8ca56 - main - snd_uaudio: Do not use snd_mixer->lock as mixer_lock List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9a00e0b8ca566b6942874eb08c03baf035a17702 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 15:33:31 +0000 Message-Id: <6a170ecb.30bad.2cbf3f6f@gitrepo.freebsd.org> The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=9a00e0b8ca566b6942874eb08c03baf035a17702 commit 9a00e0b8ca566b6942874eb08c03baf035a17702 Author: Christos Margiolis AuthorDate: 2026-04-16 12:15:21 +0000 Commit: Christos Margiolis CommitDate: 2026-05-27 15:32:11 +0000 snd_uaudio: Do not use snd_mixer->lock as mixer_lock In similar fashion to c234740c9d34 ("snd_uaudio: Do not use pcm_channel->lock to protect uaudio_chan"), stop this layering violation, and introduce a snd_uaudio(4)-internal mixer_lock. Sponsored by: The FreeBSD Foundation MFC after: 1 week Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/18 --- sys/dev/sound/usb/uaudio.c | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/sys/dev/sound/usb/uaudio.c b/sys/dev/sound/usb/uaudio.c index f477eb768fde..27d5009da4fa 100644 --- a/sys/dev/sound/usb/uaudio.c +++ b/sys/dev/sound/usb/uaudio.c @@ -356,7 +356,7 @@ struct uaudio_hid { struct uaudio_softc_child { device_t pcm_device; - struct mtx *mixer_lock; + struct mtx mixer_lock; struct snd_mixer *mixer_dev; uint32_t mix_info; @@ -2955,12 +2955,9 @@ uaudio_mixer_sysctl_handler(SYSCTL_HANDLER_ARGS) sc = (struct uaudio_softc *)oidp->oid_arg1; hint = oidp->oid_arg2; - if (sc->sc_child[0].mixer_lock == NULL) - return (ENXIO); - /* lookup mixer node */ - mtx_lock(sc->sc_child[0].mixer_lock); + mtx_lock(&sc->sc_child[0].mixer_lock); for (pmc = sc->sc_mixer_root; pmc != NULL; pmc = pmc->next) { for (chan = 0; chan != (int)pmc->nchan; chan++) { if (pmc->wValue[chan] != -1 && @@ -2971,7 +2968,7 @@ uaudio_mixer_sysctl_handler(SYSCTL_HANDLER_ARGS) } } found: - mtx_unlock(sc->sc_child[0].mixer_lock); + mtx_unlock(&sc->sc_child[0].mixer_lock); error = sysctl_handle_int(oidp, &temp, 0, req); if (error != 0 || req->newptr == NULL) @@ -2979,7 +2976,7 @@ found: /* update mixer value */ - mtx_lock(sc->sc_child[0].mixer_lock); + mtx_lock(&sc->sc_child[0].mixer_lock); if (pmc != NULL && temp >= pmc->minval && temp <= pmc->maxval) { @@ -2989,7 +2986,7 @@ found: /* start the transfer, if not already started */ usbd_transfer_start(sc->sc_mixer_xfer[0]); } - mtx_unlock(sc->sc_child[0].mixer_lock); + mtx_unlock(&sc->sc_child[0].mixer_lock); return (0); } @@ -3220,10 +3217,7 @@ uaudio_mixer_reload_all(struct uaudio_softc *sc) struct uaudio_mixer_node *pmc; int chan; - if (sc->sc_child[0].mixer_lock == NULL) - return; - - mtx_lock(sc->sc_child[0].mixer_lock); + mtx_lock(&sc->sc_child[0].mixer_lock); for (pmc = sc->sc_mixer_root; pmc != NULL; pmc = pmc->next) { /* use reset defaults for non-oss controlled settings */ if (pmc->ctl == SOUND_MIXER_NRDEVICES) @@ -3235,7 +3229,7 @@ uaudio_mixer_reload_all(struct uaudio_softc *sc) /* start HID volume keys, if any */ usbd_transfer_start(sc->sc_hid.xfer[0]); - mtx_unlock(sc->sc_child[0].mixer_lock); + mtx_unlock(&sc->sc_child[0].mixer_lock); } static void @@ -5439,13 +5433,13 @@ uaudio_mixer_init_sub(struct uaudio_softc *sc, struct snd_mixer *m) DPRINTF("child=%u\n", i); - sc->sc_child[i].mixer_lock = mixer_get_lock(m); + mtx_init(&sc->sc_child[i].mixer_lock, "uaudio mixer lock", NULL, MTX_DEF); sc->sc_child[i].mixer_dev = m; if (i == 0 && usbd_transfer_setup(sc->sc_udev, &sc->sc_mixer_iface_index, sc->sc_mixer_xfer, uaudio_mixer_config, 1, sc, - sc->sc_child[i].mixer_lock)) { + &sc->sc_child[i].mixer_lock)) { DPRINTFN(0, "could not allocate USB transfer for mixer!\n"); return (ENOMEM); } @@ -5470,7 +5464,7 @@ uaudio_mixer_uninit_sub(struct uaudio_softc *sc, struct snd_mixer *m) if (index == 0) usbd_transfer_unsetup(sc->sc_mixer_xfer, 1); - sc->sc_child[index].mixer_lock = NULL; + mtx_destroy(&sc->sc_child[index].mixer_lock); return (0); } @@ -6186,9 +6180,6 @@ uaudio_hid_attach(struct uaudio_softc *sc, if (!(sc->sc_hid.flags & UAUDIO_HID_VALID)) return (-1); - if (sc->sc_child[0].mixer_lock == NULL) - return (-1); - /* Get HID descriptor */ error = usbd_req_get_hid_desc(uaa->device, NULL, &d_ptr, &d_len, M_TEMP, sc->sc_hid.iface_index); @@ -6247,7 +6238,7 @@ uaudio_hid_attach(struct uaudio_softc *sc, /* allocate USB transfers */ error = usbd_transfer_setup(uaa->device, &sc->sc_hid.iface_index, sc->sc_hid.xfer, uaudio_hid_config, UAUDIO_HID_N_TRANSFER, - sc, sc->sc_child[0].mixer_lock); + sc, &sc->sc_child[0].mixer_lock); if (error) { DPRINTF("error=%s\n", usbd_errstr(error)); return (-1); From nobody Wed May 27 15:33:32 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQYYT0bWRz6fCQ0 for ; Wed, 27 May 2026 15:33: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQYYS5gQqz3Xch for ; Wed, 27 May 2026 15:33:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779896012; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l5zbGz8SEb48hEViMCKZ00onjDI2ocdiDB6gYdOGkaQ=; b=Y6kReIsPjvLsPYlsG2j4166UjUS9OT8K+bP9bT18JMimrIdln0d09nW0OM3jag/dwdSibh IRk/lJVontRAcx8HhMewE0nruJpuJyrfD9WFhcoJxbOszFLhVodmQmNY0nnUUZt3lqVvQQ go60TnmsrbCLunVAZd6z6gtmX9QkFwDpl0KK5sv99R9yRIlNaFHBG4TffiPuzLQ9tY5PEj 7cIaIUYKZaYx0t1A/LoOFQA3ELsxDU7D9EbWGWgfccs+oXg7nNMmf4UUifj5u6EnLC1QU+ BoILRL0UqJ77Da4FUv91I99nogDLgpo+zSWb0po535l/KvB1XC5MKR1SD5Xv/w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779896012; a=rsa-sha256; cv=none; b=JvjmwIqzvzWiekKv/E+IqJ4kOUUm6tQ06CCHqIuI8uBFcXxVtMDv/0FrAMP571ueYH40GW 5ab6/97X/UwLEusGGCDmIxotfiTWv7TNCcU0C+QURj+OGh1JLb9eZPituoIfwslbP9apWH ADGMMTdavbJaILhIXLAXQmbjYJrnEds/nvw1/CVijeE1DFfJGC2h4PgO/7XTH00vtQQgpM xf6tBfahXsFkjaG9f8FB0qQbbBmWMmTebgE3iKnfoZWyE6Fs58Db+ufu8qT/MNLAvATtjO KVfjtx+5LsATlS+aLk3FG7WFpjYwFahLuU7QAM+7u5hFHFZaW/VkCLTt/wyWLA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779896012; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l5zbGz8SEb48hEViMCKZ00onjDI2ocdiDB6gYdOGkaQ=; b=Ssa/Kt/kvrSMFHelj3dLOOa7OsSAWh0d6lzru7DxofxDkzzHONFw8eBj24tzr4Ms3vt120 f9ft0vDNpk4+mIr6mOltdJXG/lcmuFW1eeH2P5oJg341nHv/qFeYtjbSVNhbSNAB9RRMQG JLgbKdCVkCMtHzy/q48LlIAiLrsJwn/6zYkmNc6p3OvyHBC085WccWxyBZ5JeniAEFKAcT uCZjx/d0AFtq6jEixLUvherXP16jhL/d5MwFy1zjbBsx+vs77lg7Dj2DQSKaoTiMgJp1Vr ud13XBHa4TrivEkVtOOUo60OjdgeRPIrRgAEa8mvxX9Law7q1utjcsPzPEXzyw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQYYS5CzGz1579 for ; Wed, 27 May 2026 15:33:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27fa4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 15:33:32 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: e87654db5a09 - main - snd_uaudio: Stop using mixer_get_lock() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e87654db5a0923856afbaace9bd0975331782044 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 15:33:32 +0000 Message-Id: <6a170ecc.27fa4.15e5474b@gitrepo.freebsd.org> The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=e87654db5a0923856afbaace9bd0975331782044 commit e87654db5a0923856afbaace9bd0975331782044 Author: Christos Margiolis AuthorDate: 2026-04-16 12:30:25 +0000 Commit: Christos Margiolis CommitDate: 2026-05-27 15:32:11 +0000 snd_uaudio: Stop using mixer_get_lock() There is no reason to lock snd_mixer->lock here, since the only thing we are doing with snd_mixer is to call mix_getdevinfo() and mix_get_dev(), which are one-line getters, which are needed to eventually call uaudio_get_child_index_by_dev(). Sponsored by: The FreeBSD Foundation MFC after: 1 week Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/18 --- sys/dev/sound/usb/uaudio_pcm.c | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/sys/dev/sound/usb/uaudio_pcm.c b/sys/dev/sound/usb/uaudio_pcm.c index c24c111f983c..4b1762cfc3ec 100644 --- a/sys/dev/sound/usb/uaudio_pcm.c +++ b/sys/dev/sound/usb/uaudio_pcm.c @@ -134,39 +134,18 @@ ua_mixer_init(struct snd_mixer *m) static int ua_mixer_set(struct snd_mixer *m, unsigned type, unsigned left, unsigned right) { - struct mtx *mtx = mixer_get_lock(m); - uint8_t do_unlock; - - if (mtx_owned(mtx)) { - do_unlock = 0; - } else { - do_unlock = 1; - mtx_lock(mtx); - } uaudio_mixer_set(mix_getdevinfo(m), m, type, left, right); - if (do_unlock) { - mtx_unlock(mtx); - } + return (left | (right << 8)); } static uint32_t ua_mixer_setrecsrc(struct snd_mixer *m, uint32_t src) { - struct mtx *mtx = mixer_get_lock(m); int retval; - uint8_t do_unlock; - if (mtx_owned(mtx)) { - do_unlock = 0; - } else { - do_unlock = 1; - mtx_lock(mtx); - } retval = uaudio_mixer_setrecsrc(mix_getdevinfo(m), m, src); - if (do_unlock) { - mtx_unlock(mtx); - } + return (retval); } From nobody Wed May 27 15:33:33 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQYYV2Tzcz6fCQ1 for ; Wed, 27 May 2026 15:33: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQYYT6T6Rz3XCg for ; Wed, 27 May 2026 15:33:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779896013; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/FJN1qYPIhRqRLI0kmDtM2JF2tfHha9ZgQosmAnuv8w=; b=Kv0ai4Cg1bLvYVM37G3SkN8mfQc16OE3nzQCxM7ndf+Wo4+JRLan4NDBmPBuyJQY9F5b0p LtR5YoaP535R/Ey3SlJeL1pevRFs+mBwqGps5qZxP6xxic9k9yTgd5UrItO5og4o78Q8EN Dp32hkRYGFtvg5QeKaOT7Sv5/2okfgu/Vw2O7ZUVUaHoIZA6VIwvHby4o0qNUF3JOcfqtP KJKPWwaXx5TIWh7JQjIikBPwG0YBy2BgYSSjD+fKtWSqWYFKTktWzq55zs+THVRmGW4WIy p8tk5z4jmNSoH+BJlTUZkM4TV5suHM2vKnfxI10qDuPRA8YRgHD2WXpPCopqTA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779896013; a=rsa-sha256; cv=none; b=gG5gdyiyelyH+CftFWGE9+GMUEOgct8D+WDNLwxb+ATkJwTRG/TsWrfh1t3rrIwkxyzZcF f6ZAgaKPuWOF2yh+4gK/IngvxZs+n+XxWpGgr+3WKNIQD0HJrELLr41XqLlvn4IOIs+3V2 JUykf1d5jF6qwzQbFf/kqWmxHdR4wQXNOzqn6HPfwCHpNQqgmFe53HU/4nQVIIVU+YPzhS 6paXVl6AQs5ZwjIfFFx0eEZ99GOeAai17by2jDV4Iqy+fL10Egl/7uSHJo8B1YYhs1kgYI HDBrhOVWDYPamuDgdpM9BUeYQTjbp4j5rgtVjFhCTWMDtlMovNCEi0InRAWWwA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779896013; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/FJN1qYPIhRqRLI0kmDtM2JF2tfHha9ZgQosmAnuv8w=; b=ctn69qPrzxAasw8LEo9DFIBw4fwnfelisfGZg7jopEynGhMj9Io9FZ5dXrkbYY43R8aCIR UWgLc5quZCTIJYzQ5TEaFSQ0olYvkQxI+TJvVmZoM3BU5DRgHW8y2TiZRCqFQhGSq0WTLX ZiybGfYO/0t7DGAe9oMGHQ3OP89t1EzCeLgqToxY7d5KPto+nR/j9+gcWI1b9e/dSVdrF8 w26f12R6YzW1JprKNKCep/cy0EhNX53T9dA+BGY19eM4nj5IGr4gQ6JsXuBXyET/SKXTvU LxeTPNlTkI+3AjnSi98cY7K3VlK4MdCYj1yhCtxGQ58NbSRdhWjK/PS712RUHw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQYYT64ccz14gy for ; Wed, 27 May 2026 15:33:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 270ca by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 15:33:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 1e72608a3c6a - main - sound: Remove all remaining uses of mixer_get_lock() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1e72608a3c6a60b76938c5ded2a290d0b9ff6456 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 15:33:33 +0000 Message-Id: <6a170ecd.270ca.661b05a@gitrepo.freebsd.org> The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=1e72608a3c6a60b76938c5ded2a290d0b9ff6456 commit 1e72608a3c6a60b76938c5ded2a290d0b9ff6456 Author: Christos Margiolis AuthorDate: 2026-04-16 12:41:13 +0000 Commit: Christos Margiolis CommitDate: 2026-05-27 15:32:12 +0000 sound: Remove all remaining uses of mixer_get_lock() These functions are called from sound(4) through MIXER_SET() in mixer_set(), but nothing mixer-related is used or needs to be locked in these cases. Sponsored by: The FreeBSD Foundation MFC after: 1 week Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/18 --- sys/arm/allwinner/a64/sun50i_a64_acodec.c | 14 -------------- sys/arm64/rockchip/rk3328_codec.c | 14 -------------- sys/dev/sound/macio/onyx.c | 17 ----------------- sys/dev/sound/macio/snapper.c | 17 ----------------- sys/dev/sound/macio/tumbler.c | 17 ----------------- 5 files changed, 79 deletions(-) diff --git a/sys/arm/allwinner/a64/sun50i_a64_acodec.c b/sys/arm/allwinner/a64/sun50i_a64_acodec.c index 12c9a86cf361..93b0328e99e0 100644 --- a/sys/arm/allwinner/a64/sun50i_a64_acodec.c +++ b/sys/arm/allwinner/a64/sun50i_a64_acodec.c @@ -339,19 +339,9 @@ static int a64codec_mixer_set(struct snd_mixer *m, unsigned dev, unsigned left, unsigned right) { struct a64codec_softc *sc; - struct mtx *mixer_lock; - uint8_t do_unlock; u_int val; sc = device_get_softc(mix_getdevinfo(m)); - mixer_lock = mixer_get_lock(m); - - if (mtx_owned(mixer_lock)) { - do_unlock = 0; - } else { - do_unlock = 1; - mtx_lock(mixer_lock); - } right = left; @@ -375,10 +365,6 @@ a64codec_mixer_set(struct snd_mixer *m, unsigned dev, unsigned left, unsigned ri } A64CODEC_UNLOCK(sc); - if (do_unlock) { - mtx_unlock(mixer_lock); - } - return (left | (right << 8)); } diff --git a/sys/arm64/rockchip/rk3328_codec.c b/sys/arm64/rockchip/rk3328_codec.c index 22e3cde9093e..a019cab27cc9 100644 --- a/sys/arm64/rockchip/rk3328_codec.c +++ b/sys/arm64/rockchip/rk3328_codec.c @@ -416,18 +416,8 @@ static int rkcodec_mixer_set(struct snd_mixer *m, unsigned dev, unsigned left, unsigned right) { struct rkcodec_softc *sc; - struct mtx *mixer_lock; - uint8_t do_unlock; sc = device_get_softc(mix_getdevinfo(m)); - mixer_lock = mixer_get_lock(m); - - if (mtx_owned(mixer_lock)) { - do_unlock = 0; - } else { - do_unlock = 1; - mtx_lock(mixer_lock); - } right = left; @@ -443,10 +433,6 @@ rkcodec_mixer_set(struct snd_mixer *m, unsigned dev, unsigned left, unsigned rig } RKCODEC_UNLOCK(sc); - if (do_unlock) { - mtx_unlock(mixer_lock); - } - return (left | (right << 8)); } diff --git a/sys/dev/sound/macio/onyx.c b/sys/dev/sound/macio/onyx.c index f4f825a705cc..5ba22dd7c495 100644 --- a/sys/dev/sound/macio/onyx.c +++ b/sys/dev/sound/macio/onyx.c @@ -268,38 +268,21 @@ static int onyx_set(struct snd_mixer *m, unsigned dev, unsigned left, unsigned right) { struct onyx_softc *sc; - struct mtx *mixer_lock; - int locked; uint8_t l, r; sc = device_get_softc(mix_getdevinfo(m)); - mixer_lock = mixer_get_lock(m); - locked = mtx_owned(mixer_lock); switch (dev) { case SOUND_MIXER_VOLUME: - - /* - * We need to unlock the mixer lock because iicbus_transfer() - * may sleep. The mixer lock itself is unnecessary here - * because it is meant to serialize hardware access, which - * is taken care of by the I2C layer, so this is safe. - */ if (left > 100 || right > 100) return (0); l = left + 128; r = right + 128; - if (locked) - mtx_unlock(mixer_lock); - onyx_write(sc, PCM3052_REG_LEFT_ATTN, l); onyx_write(sc, PCM3052_REG_RIGHT_ATTN, r); - if (locked) - mtx_lock(mixer_lock); - return (left | (right << 8)); } diff --git a/sys/dev/sound/macio/snapper.c b/sys/dev/sound/macio/snapper.c index f14009f447a8..ed83990d563b 100644 --- a/sys/dev/sound/macio/snapper.c +++ b/sys/dev/sound/macio/snapper.c @@ -436,14 +436,10 @@ static int snapper_set(struct snd_mixer *m, unsigned dev, unsigned left, unsigned right) { struct snapper_softc *sc; - struct mtx *mixer_lock; - int locked; u_int l, r; u_char reg[6]; sc = device_get_softc(mix_getdevinfo(m)); - mixer_lock = mixer_get_lock(m); - locked = mtx_owned(mixer_lock); if (left > 100 || right > 100) return (0); @@ -460,21 +456,8 @@ snapper_set(struct snd_mixer *m, unsigned dev, unsigned left, unsigned right) reg[4] = (r & 0x00ff00) >> 8; reg[5] = r & 0x0000ff; - /* - * We need to unlock the mixer lock because iicbus_transfer() - * may sleep. The mixer lock itself is unnecessary here - * because it is meant to serialize hardware access, which - * is taken care of by the I2C layer, so this is safe. - */ - - if (locked) - mtx_unlock(mixer_lock); - snapper_write(sc, SNAPPER_VOLUME, reg); - if (locked) - mtx_lock(mixer_lock); - return (left | (right << 8)); } diff --git a/sys/dev/sound/macio/tumbler.c b/sys/dev/sound/macio/tumbler.c index bd40ea6b4f6b..89af4434e7fe 100644 --- a/sys/dev/sound/macio/tumbler.c +++ b/sys/dev/sound/macio/tumbler.c @@ -383,14 +383,10 @@ static int tumbler_set(struct snd_mixer *m, unsigned dev, unsigned left, unsigned right) { struct tumbler_softc *sc; - struct mtx *mixer_lock; - int locked; u_int l, r; u_char reg[6]; sc = device_get_softc(mix_getdevinfo(m)); - mixer_lock = mixer_get_lock(m); - locked = mtx_owned(mixer_lock); switch (dev) { case SOUND_MIXER_VOLUME: @@ -407,21 +403,8 @@ tumbler_set(struct snd_mixer *m, unsigned dev, unsigned left, unsigned right) reg[4] = (r & 0x00ff00) >> 8; reg[5] = r & 0x0000ff; - /* - * We need to unlock the mixer lock because iicbus_transfer() - * may sleep. The mixer lock itself is unnecessary here - * because it is meant to serialize hardware access, which - * is taken care of by the I2C layer, so this is safe. - */ - - if (locked) - mtx_unlock(mixer_lock); - tumbler_write(sc, TUMBLER_VOLUME, reg); - if (locked) - mtx_lock(mixer_lock); - return (left | (right << 8)); } From nobody Wed May 27 15:33:34 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQYYW2X0qz6fCq2 for ; Wed, 27 May 2026 15:33: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQYYW0M6Bz3XSd for ; Wed, 27 May 2026 15:33:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779896015; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7T3R6ROUGQ312TbVJHtH0J0+56+SxenkYcaUIduHvko=; b=C6TDyVPpG26DIXkh+eFmqjfCys079uEpmKbOEwrQnPxdHszvQU1iU+zpOER35Jp1c8Q7ZY vBw0r0VJfpVFTuTQRz84gRH56+Afsfh+1Qi7tcy2Zf8uPyTLrgBcd5caBtoymuqi++if/2 JZm9AehOJqopcA0rvbWtb8uynI9Ea5e5IOqywS/Ce5nhC5kgs+u+AznEqexHTK4zYp/mfd l7zXBxkGAkfw6ZI8YJWr2I+8OGrJ6no5co6D/TWP5hNf/QqYcgoQ5K5T1XfsNglQ0mjRY/ Ic16rww68vpODgB3SAq9eZTjQBISs/Oaa7jblOoTLYUyUpF9UHhODqn6G09UvQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779896015; a=rsa-sha256; cv=none; b=Ao9+hH1e1oVNeEpEvg7FmU3Pt1GjB3e8j5JmuQq/lolFHzcSeW/Fq7uysepYZ8CVcqDkQy cito1F/2kjoSfjU+Nrrqh8ncmVySuvA3sf5+oqMOBjaAIhnhTbL2pTj94xJzo42NDiOfj5 VArq/xiuym1Eb9C7SMgTOVrpojao5N8Z+gKt4a2dZDUGXb5HCBvr3xzil1Kg2hDJBPZWX0 ndC/OZY70203+VRvE6bjmV0Wqm5Zf6R9yk9AXWZ7yZ+FNR9/6WuAIuT4Kr8QW4SxSKJlHR yBkW/uXrhFRKXM8pKfg+jLHcY75/brC1EuefN0q7xX+ez4CMpkzY1Wfz4Y2jJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779896015; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7T3R6ROUGQ312TbVJHtH0J0+56+SxenkYcaUIduHvko=; b=foMsPXA8FbesEx+DQFwvpFvmM+aOjkal+OkT44hQk1sdhU92F+QJ0SBybYSAqbx4hOTUXS o8BY3odZdUlJMmyD2ZHf6Xyl72K90TNaHzhiwh6KCpq2LMhCymrBWvEyeuljEF0PbsEKp/ WNOyjl8RsdcTgYYXlAOnQBFeaezfEWIn2Oq4uyL3hMnmpQecnZlV4IZ4kd8TjVI8/lz2ri AbukHncXSIoNplMOTzKvb/eGjX4FoCH0Qi94+kvXe+7KEa+UfYtbAApcHyXvR3kKl0TSZv DwF+bXaiRsU1gBGTjQqd0Z087ohW1+woBrMm0A7PR/pUDFJ0AalAKNT2cGHWIQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQYYV6vZHz14k9 for ; Wed, 27 May 2026 15:33:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27262 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 15:33:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 6a3a42c57cf4 - main - sound: Retire unused mixer_get_lock() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6a3a42c57cf45874294105419f5c5de6602db3f8 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 15:33:34 +0000 Message-Id: <6a170ece.27262.4a51f104@gitrepo.freebsd.org> The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=6a3a42c57cf45874294105419f5c5de6602db3f8 commit 6a3a42c57cf45874294105419f5c5de6602db3f8 Author: Christos Margiolis AuthorDate: 2026-04-16 12:46:48 +0000 Commit: Christos Margiolis CommitDate: 2026-05-27 15:32:12 +0000 sound: Retire unused mixer_get_lock() Sponsored by: The FreeBSD Foundation MFC after: 1 week Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/18 --- sys/dev/sound/pcm/mixer.c | 10 ---------- sys/dev/sound/pcm/mixer.h | 1 - 2 files changed, 11 deletions(-) diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c index 73d1b5870b83..1baeb1b23077 100644 --- a/sys/dev/sound/pcm/mixer.c +++ b/sys/dev/sound/pcm/mixer.c @@ -1382,13 +1382,3 @@ mixer_oss_mixerinfo(struct cdev *i_dev, oss_mixerinfo *mi) return (EINVAL); } - -/* - * Allow the sound driver to use the mixer lock to protect its mixer - * data: - */ -struct mtx * -mixer_get_lock(struct snd_mixer *m) -{ - return (&m->lock); -} diff --git a/sys/dev/sound/pcm/mixer.h b/sys/dev/sound/pcm/mixer.h index 4ced76082e31..b16256862b4f 100644 --- a/sys/dev/sound/pcm/mixer.h +++ b/sys/dev/sound/pcm/mixer.h @@ -61,7 +61,6 @@ void mix_setparentchild(struct snd_mixer *m, u_int32_t parent, u_int32_t childs) void mix_setrealdev(struct snd_mixer *m, u_int32_t dev, u_int32_t realdev); u_int32_t mix_getparent(struct snd_mixer *m, u_int32_t dev); void *mix_getdevinfo(struct snd_mixer *m); -struct mtx *mixer_get_lock(struct snd_mixer *m); #define MIXER_TYPE_PRIMARY 0 /* mixer_init() */ #define MIXER_TYPE_SECONDARY 1 /* mixer_create() */ From nobody Wed May 27 15:33:36 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQYYX3Rqkz6fCsw for ; Wed, 27 May 2026 15:33: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQYYX1FhRz3XdH for ; Wed, 27 May 2026 15:33:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779896016; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mm49BvmkSzIFjLGXsx+zLkrAHsQvsR4xWZtKce0UlmY=; b=Ob6mj0+0eKm68iXdlhqQNbm8AsOV1lBW651AMQNYbloNqphMs54FoivKPLPYRfcVU3m2Aj 4UbOd2kIEGdmCH/eVEhv70r/BfPpCqnBvuEAtFybIH1s/IIDanR0COHoznsmsHCOabSGRZ 4WWw/Ee73A0Fgnl01WDcuWzqJBcYhRxVuVD0q3/lvY66mYpw94w8LlHEwbPWbX4sRC1cCT MsXUHICvItkblRoiP05TTiYAFLqdXUeL5NJa4KIpkvBxChxVW4Mc7nIWT+7QMUShvmOh/m E2LnSnbD+vKjzkuYQQsWMm9/kGprfqvonlbUOmF2sTKImLp6Zpl9s/2Hw9qmxw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779896016; a=rsa-sha256; cv=none; b=HDN1vc0+sqmKV1xwKYz/FsM1kh9iJcS/9NcTvDsGWNUjqZFb5HzHRr+FLwsy63fvi7JzLb nrLP1s+lkzxJiXMeHjKYg6unGOYfMIjaMFtLSm2y+0fziRVGa08KNsqevYF4sNjLHAN7fB z7BKHVrOEiHWxlOcKKCS4ax0C/e5cW4TfYPEk2CCdRDqNyqjScX/mAY8gAMd2xEwYFIPXr T0KFhgqwpuHsjg0QQi839jBDHMwGCfByd1M0GrjPnchX2MoV6tJT1nzDYaK3S4KEVbdEQx AmWX95NpAcHzA5xrRdpAumx9wEC3bB+bdNS6LW8BUi6pJGYl9RJCDhQk+YtR2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779896016; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mm49BvmkSzIFjLGXsx+zLkrAHsQvsR4xWZtKce0UlmY=; b=XtTaEMVyzwIINr4n7+5If0KqLXXs1q2upiTPN2F03sg6fmkxLd04NFFHf/1dRW0EF1Utog Ggd620V7s45Jdd7zEKAGaI2V7IfHFhJb/ctcn/x6l810WWVIeeyAEXOjySHfkO6XJgBt27 00OZ+NyXextti1I09YLx586AkzlbA3HlUXRbiGjRuWO9/JRqoyL8ok+NXjIxOAllVBsCkf ggoyUVZLsdQeLTqRxUGaez84oqeaVdMZsmB3S2hI5AuWUBUwv1gq0bro3MoHFlQLnbNBiw bw6xDdMUl2P+G7IVhORKGVm2WFkfkvMw1pVRzSUkHBH2ebK7y7YUeiO4PfjHSQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQYYX0c2Nz157B for ; Wed, 27 May 2026 15:33:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2713f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 15:33:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 7485519d5634 - main - sound: Do not lock before destroying snd_mixer->lock List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7485519d56346909c4db595ab0342128353d5b8d Auto-Submitted: auto-generated Date: Wed, 27 May 2026 15:33:36 +0000 Message-Id: <6a170ed0.2713f.63ec4fd@gitrepo.freebsd.org> The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=7485519d56346909c4db595ab0342128353d5b8d commit 7485519d56346909c4db595ab0342128353d5b8d Author: Christos Margiolis AuthorDate: 2026-04-16 12:51:56 +0000 Commit: Christos Margiolis CommitDate: 2026-05-27 15:32:12 +0000 sound: Do not lock before destroying snd_mixer->lock Sponsored by: The FreeBSD Foundation MFC after: 1 week Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/18 --- sys/dev/sound/pcm/mixer.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c index 1baeb1b23077..0001ea7b481a 100644 --- a/sys/dev/sound/pcm/mixer.c +++ b/sys/dev/sound/pcm/mixer.c @@ -650,7 +650,6 @@ mixer_obj_create(device_t dev, kobj_class_t cls, void *devinfo, } if (MIXER_INIT(m)) { - mtx_lock(&m->lock); mtx_destroy(&m->lock); kobj_delete((kobj_t)m, M_DEVBUF); return (NULL); From nobody Wed May 27 15:33:37 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQYYY3WYbz6fCVq for ; Wed, 27 May 2026 15:33: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQYYY1vC4z3XXq for ; Wed, 27 May 2026 15:33:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779896017; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fV90/9M3yf2GOUwH28foDST6j/OmGnRe/CHYuWMozeU=; b=OX8BmWs2ARLQuH9bdJ0ssfL7/wKtWUNYmgH2M2whc8DQqKpwSA6lEQe2JdqWZrrCvfRQOm XajDC7FJzYNKBUBHIYtTUdYqhUxGmpevctk4QcZ3Sf9gMrt3KRSx3hwQ+jCmkjLcpcbNzP 3DHTy6bglQYDQ+Ov9cordiyUoIfv55pCVl0+YEKoc7jjINmCQ+kf/inawbPiON8tooK4gv Is5jteIhjnEpLTHSSPWAQeR+fsUeeDectIonjagyFNz9uWHKtgYlIgV+xwuyuwlNeqjkZb UtjLVIeHxvvixwGVPMlGRP+NjbFiT2bDAB5Gt7J7VeGVlzEA9G8hIOdRIU8AfQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779896017; a=rsa-sha256; cv=none; b=ONbY6tZz1rGszamYkTv+5+8T0XKd4bo7SUWAEgsFLOR4CwHxQIfguT9mv06hYQiaAHGRCT kuNqLuIrUvUBzycQoGgOhx2ImtU2olc3NplgLS8csSva5cdGBlCG1OQc6fqqvTb014Kp8/ NtryOxjX0bDqcVw3fQqdY27nwuyKElMqGkbmJAoji5rKF3wvEJx1UOUnqKT1BYhaUM5GT4 EgO7hooMlGUeWnTV796hG+DyA/YCinJMPWQcbG4PiSwo3S9mdzJ827nnvHh2uyTGplFCbx o4V5e+XYnzB9xOetuBM+lTTADDQs88qZ+/VJ3tbMOK2jXu73fVb6oxrFjsdiJw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779896017; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fV90/9M3yf2GOUwH28foDST6j/OmGnRe/CHYuWMozeU=; b=gBrndcPqSL9UVvH+ke0GFEOqS1HZS2z7d0sLonCNXHUSg0xbIIM1rFj+97VlMtmm+z0wpl SK+B1ji8V2q84ZP9YzGbEOKy3TecL1N3mS17NqQxbMefORzlOy6E3tFF350hiAUBZBRVBT bvXz0XYj6x1gLg3POVKC5xUg5ld8ucGvg7LXh9odQ08V+YrYVbCL4yjNzGMD/Y1V+bzh1p 33QtePS1+eIC2/8/xRfbgijvpm3a31Rx54QlZkou61AXo278H9nWdI//ayD8aghYa3SSJr nOzBSdfx2JFgPOR4hAbvpXHtzfeSv5SgiQN/Kl1h3aXtOp30j/ptku5tFR1ThA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQYYY1Qpqz14pj for ; Wed, 27 May 2026 15:33:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 270cb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 15:33:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 5589a7499add - main - sound: Retire snd_mixer->enuminfo List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5589a7499add5912a88e9424b0aec843e099fb60 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 15:33:37 +0000 Message-Id: <6a170ed1.270cb.17e985b7@gitrepo.freebsd.org> The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=5589a7499add5912a88e9424b0aec843e099fb60 commit 5589a7499add5912a88e9424b0aec843e099fb60 Author: Christos Margiolis AuthorDate: 2026-04-17 17:31:00 +0000 Commit: Christos Margiolis CommitDate: 2026-05-27 15:32:12 +0000 sound: Retire snd_mixer->enuminfo Instead of caching this when mix_setrecdevs() is called (which many drivers never call), calculate it when we need it. After all, it is quite rare that this structure is used by applications. Sponsored by: The FreeBSD Foundation MFC after: 1 week Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/18 --- sys/dev/sound/pcm/mixer.c | 78 ++++++++++++++--------------------------------- 1 file changed, 23 insertions(+), 55 deletions(-) diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c index 0001ea7b481a..e61371d13610 100644 --- a/sys/dev/sound/pcm/mixer.c +++ b/sys/dev/sound/pcm/mixer.c @@ -56,7 +56,6 @@ struct snd_mixer { u_int8_t realdev[32]; char name[MIXER_NAMELEN]; struct mtx lock; - oss_mixer_enuminfo enuminfo; int modify_counter; }; @@ -493,64 +492,12 @@ mix_setdevs(struct snd_mixer *m, u_int32_t v) * recording devices. This function records that value in a structure * used by the rest of the mixer code. * - * This function also populates a structure used by the SNDCTL_DSP_*RECSRC* - * family of ioctls that are part of OSSV4. All recording device labels - * are concatenated in ascending order corresponding to their routing - * numbers. (Ex: a system might have 0 => 'vol', 1 => 'cd', 2 => 'line', - * etc.) For now, these labels are just the standard recording device - * names (cd, line1, etc.), but will eventually be fully dynamic and user - * controlled. - * * @param m mixer device context container thing * @param v mask of recording devices */ void mix_setrecdevs(struct snd_mixer *m, u_int32_t v) { - oss_mixer_enuminfo *ei; - char *loc; - int i, nvalues, nwrote, nleft, ncopied; - - ei = &m->enuminfo; - - nvalues = 0; - nwrote = 0; - nleft = sizeof(ei->strings); - loc = ei->strings; - - for (i = 0; i < SOUND_MIXER_NRDEVICES; i++) { - if ((1 << i) & v) { - ei->strindex[nvalues] = nwrote; - ncopied = strlcpy(loc, snd_mixernames[i], nleft) + 1; - /* strlcpy retval doesn't include terminator */ - - nwrote += ncopied; - nleft -= ncopied; - nvalues++; - - /* - * XXX I don't think this should ever be possible. - * Even with a move to dynamic device/channel names, - * each label is limited to ~16 characters, so that'd - * take a LOT to fill this buffer. - */ - if ((nleft <= 0) || (nvalues >= OSS_ENUM_MAXVALUE)) { - device_printf(m->dev, - "mix_setrecdevs: Not enough room to store device names--please file a bug report.\n"); - device_printf(m->dev, - "mix_setrecdevs: Please include details about your sound hardware, OS version, etc.\n"); - break; - } - - loc = &ei->strings[nwrote]; - } - } - - /* - * NB: The SNDCTL_DSP_GET_RECSRC_NAMES ioctl ignores the dev - * and ctrl fields. - */ - ei->nvalues = nvalues; m->recdevs = v; } @@ -1104,10 +1051,31 @@ mixer_ioctl_cmd(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, mtx_lock(&m->lock); switch (cmd) { - case SNDCTL_DSP_GET_RECSRC_NAMES: - bcopy((void *)&m->enuminfo, arg, sizeof(oss_mixer_enuminfo)); + case SNDCTL_DSP_GET_RECSRC_NAMES: { + oss_mixer_enuminfo *ei = (oss_mixer_enuminfo *)arg; + char *loc; + int i, nvalues, nwrote, nleft, ncopied; + + nvalues = 0; + nwrote = 0; + nleft = sizeof(ei->strings); + loc = ei->strings; + + for (i = 0; i < SOUND_MIXER_NRDEVICES; i++) { + if (!((1 << i) & m->recdevs)) + continue; + ei->strindex[nvalues] = nwrote; + ncopied = strlcpy(loc, snd_mixernames[i], nleft) + 1; + nwrote += ncopied; + nleft -= ncopied; + nvalues++; + loc = &ei->strings[nwrote]; + } + ei->nvalues = nvalues; + ret = 0; goto done; + } case SNDCTL_DSP_GET_RECSRC: ret = mixer_get_recroute(m, arg_i); goto done; From nobody Wed May 27 15:33:38 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQYYZ3rqPz6fCt9 for ; Wed, 27 May 2026 15:33: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQYYZ2jFXz3Xbh for ; Wed, 27 May 2026 15:33:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779896018; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ShXiKXK8Wj4rj+cIc5r5/m/0ffFfza5X3HaG26ziy8k=; b=sSvpGBV0Cl8intZ88reyHRe+Esw0wP3np5RBnM5tLVL0AsAGLR5QU6Xq/0VuQ7vzWu1Wu3 rMqWfY59oqFK+ZsOXbdzPwHd2oYdlAtmvmq1RLhjv1Fa9CrxxT0D6GDpdJhQkHPmBhL5UP /Nzdz+Gr7CbYrE+oTKxYJiG98YElJhWiiXPumeqRvFLmUpMLazwzd5+xdYUytFQmtRBtL5 w7BVZe4YAbmVBLqzQu3DLRY0wsm9c5xio0fgDI3+qHSxib5uxJyQw3Ywao+KPpxFJG/YVm mwKenCLXZip9N2v4K6vbYsG2RuUtjTiBxUm4gkzrVRL0e+9Z27RofDPCmh0BcA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779896018; a=rsa-sha256; cv=none; b=tcFQ7O2MQIb981WZ9/TfiklgA63xyNUeD+U73mGb2+YrHk9oUzuekVFz2ss0MwhvOGFKZO s38Ch3ZPDUbubfUNQJ7O2UD2iN1AsUPUJ6ckouM6fbYKiHYV7rT/DaMUJpwd2CDZRkCEHW csqfp94QMUnVBLi+VpbUdPP78SDfKgu46GaRGz16oKVHf80SCLbtu+Br0QUBMtHv25dKrs LBPAmbpb1m5OkxUNhDkVh21sfs5gMhaEXnDzvZ3ymyZu3Jcl7y9Wpgrh7jvqGSUYbjwYTT w2Bpnzh+ZJvQjIaLu8weTDSaQ813SJQAyoONyCYu2fUnAoJfGhAUSp6tinkjVQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779896018; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ShXiKXK8Wj4rj+cIc5r5/m/0ffFfza5X3HaG26ziy8k=; b=A0I63T//orLykveKWnIeT2H552dYozs6Ffgu+uz0fQmvavYcjgWPz3SdsENIhP/TDanc05 RntVzdbEXMYsNvSB5u3dtGnHg6nUTaxfdtiSckB83UpZLYL7hywycGRdGh+dwr99yr3cAM QsqPkaxBeluEqqyToKUB81edjH65F6DF+jmcquBKiNoRaKnRja83P73usZC0gK3bHNt809 L/6/UNpRAZBCqjkMr2ysmf/UrZionk32Fl5WFQVM0OPYRZhWi6xKHHTbJMi2vEa3Y9DxB7 Hc88vaY9ulIOdiamRa5dWR9RpSotz5MiiWsEu/Nb3HYFR315OBqBmJNSHTH1GA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQYYZ1y6Tz14pk for ; Wed, 27 May 2026 15:33:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27266 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 15:33:38 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 64ebbb1d7441 - main - sound: Retire MIXER_SIZE and use correct size in DEFINE_CLASS List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 64ebbb1d74415cb93445cc625da63449f01ac8c5 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 15:33:38 +0000 Message-Id: <6a170ed2.27266.287a6f95@gitrepo.freebsd.org> The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=64ebbb1d74415cb93445cc625da63449f01ac8c5 commit 64ebbb1d74415cb93445cc625da63449f01ac8c5 Author: Christos Margiolis AuthorDate: 2026-04-18 10:29:39 +0000 Commit: Christos Margiolis CommitDate: 2026-05-27 15:32:12 +0000 sound: Retire MIXER_SIZE and use correct size in DEFINE_CLASS I am not sure why this hack was needed, but the size should be sizeof(struct snd_mixer). Unfortunately, we have to expose snd_mixer, but it should be better than relying on a hack. Sponsored by: The FreeBSD Foundation MFC after: 1 week Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/18 --- sys/dev/sound/pcm/mixer.c | 22 ---------------------- sys/dev/sound/pcm/mixer.h | 32 ++++++++++++++++++++++++-------- 2 files changed, 24 insertions(+), 30 deletions(-) diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c index e61371d13610..8d96486c862b 100644 --- a/sys/dev/sound/pcm/mixer.c +++ b/sys/dev/sound/pcm/mixer.c @@ -37,28 +37,6 @@ #include "feeder_if.h" #include "mixer_if.h" -#define MIXER_NAMELEN 16 -struct snd_mixer { - KOBJ_FIELDS; - void *devinfo; - int hwvol_mixer; - int hwvol_step; - int type; - device_t dev; - u_int32_t devs; - u_int32_t mutedevs; - u_int32_t recdevs; - u_int32_t recsrc; - u_int16_t level[32]; - u_int16_t level_muted[32]; - u_int8_t parent[32]; - u_int32_t child[32]; - u_int8_t realdev[32]; - char name[MIXER_NAMELEN]; - struct mtx lock; - int modify_counter; -}; - static u_int16_t snd_mixerdefaults[SOUND_MIXER_NRDEVICES] = { [SOUND_MIXER_VOLUME] = 75, [SOUND_MIXER_BASS] = 50, diff --git a/sys/dev/sound/pcm/mixer.h b/sys/dev/sound/pcm/mixer.h index b16256862b4f..34f0514c6271 100644 --- a/sys/dev/sound/pcm/mixer.h +++ b/sys/dev/sound/pcm/mixer.h @@ -30,6 +30,28 @@ #ifndef _PCM_MIXER_H_ #define _PCM_MIXER_H_ +#define MIXER_NAMELEN 16 +struct snd_mixer { + KOBJ_FIELDS; + void *devinfo; + int hwvol_mixer; + int hwvol_step; + int type; + device_t dev; + u_int32_t devs; + u_int32_t mutedevs; + u_int32_t recdevs; + u_int32_t recsrc; + u_int16_t level[32]; + u_int16_t level_muted[32]; + u_int8_t parent[32]; + u_int32_t child[32]; + u_int8_t realdev[32]; + char name[MIXER_NAMELEN]; + struct mtx lock; + int modify_counter; +}; + struct snd_mixer *mixer_create(device_t dev, kobj_class_t cls, void *devinfo, const char *desc); int mixer_delete(struct snd_mixer *m); @@ -65,13 +87,7 @@ void *mix_getdevinfo(struct snd_mixer *m); #define MIXER_TYPE_PRIMARY 0 /* mixer_init() */ #define MIXER_TYPE_SECONDARY 1 /* mixer_create() */ -/* - * this is a kludge to allow hiding of the struct snd_mixer definition - * 512 should be enough for all architectures - */ -#define MIXER_SIZE (512 + sizeof(struct kobj) + \ - sizeof(oss_mixer_enuminfo)) - -#define MIXER_DECLARE(name) static DEFINE_CLASS(name, name ## _methods, MIXER_SIZE) +#define MIXER_DECLARE(name) static DEFINE_CLASS(name, name ## _methods, \ + sizeof(struct snd_mixer)) #endif /* _PCM_MIXER_H_ */ From nobody Wed May 27 15:33:39 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQYYb4QHgz6fCr4 for ; Wed, 27 May 2026 15:33: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQYYb2yzkz3Xby for ; Wed, 27 May 2026 15:33:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779896019; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D6kHCszV2oeilqRW30EEGTgC9vKJnWUvyWM+Nza1UJ4=; b=fsyLVluvEpgwwBBuKh6PWNPmfat4oideO9p3F+nxX39l8USFWH6r/iLz8+syChZ+9cbzDQ oxUhYKPwOOIGYmdmVYfbyX/oZ3MsxtEOPbZN4OgBF3CWeXF8SzhsMG9idiYH87KTVJK8si KYwcuJqgfjliOEIMYWez9ulH2tCEtByOIYvUSW+l7iN1r4L1Dmo9uuhX6hnhQqhM+yLrf6 sLUFPcC26BAEcrmOGM5+LbRFX1TqMzxxA5cTl/leC1HW5zjv5FziNvHYKCceU9GXgThQIB xd9EBlqV4N0L6ltCMs+emNQwSoOzRu/xpoqa7IbgX4Mi0zShtB8w/CYtdBLY4g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779896019; a=rsa-sha256; cv=none; b=UVnuakxaph6cyu0LRZGU16tslYVG7jhmQdqp2zAdmaprPLZAFCMIgv45TTha7yLwIRQbmI 2z5BdmUZ5LDCGFDeKSU2sa8QJizaXUikwxtigdaQh6h0bqKkpQ+RW4xIZHSrg67NfFYLms Zn9UzoD1WtaZ2tncUhfKDN/XbRSu2CAotIVc9d8Fp0jp4dJEex+z/Gf4Dpm3xKS/lsExg/ nvZEK5nvttOb7YOLG2P7U0MBuh7kTX19u1sksOs1KwwUOpeiv9VWTCYu0lg99ZYlCpTGm9 ilSZfb/eUIboVKO8Jzy1mIuUG25Prf/P05loZOtkFZ603RkkK9n0ojKIja2Slw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779896019; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D6kHCszV2oeilqRW30EEGTgC9vKJnWUvyWM+Nza1UJ4=; b=UQjCCpF7yfdLAOvs4FPwgrZ94Pyv8Vge1tdeCKrFfxCd6t5kb8KMX+YSjbO8cIgtbEayvs C5GzAfn789YWKhtZsizP9ksLKfmXvJCA76DGX1tg5NbRbSy9c/+BmeRnc78Q+SVrcGo+r1 BlNz2Tp3p7G+JA0vSV2rjKVlnHfOyEMKdEbmWayxV2OiLP3cVsTBn+hD6tTV8US4IrUpG3 QQIWdTLPgsLc1Kk0AugfbR+ylfFFUOpSvGTFbM1b1WY/Iuu5F4+zAXqJN6ub7tcEs5m4qK IkqY/Mbwroy3gAqPH97MQp2pJdJ4iw6Ww6eeztNlG5RZWt2q9/qJebverfIpoQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQYYb2P9kz157C for ; Wed, 27 May 2026 15:33:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27143 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 15:33:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 773bbfc57328 - main - sound: Update mixer.c LICENSE header List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 773bbfc57328f0a7947f2ad9a30de6a45ccce758 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 15:33:39 +0000 Message-Id: <6a170ed3.27143.29e28ff@gitrepo.freebsd.org> The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=773bbfc57328f0a7947f2ad9a30de6a45ccce758 commit 773bbfc57328f0a7947f2ad9a30de6a45ccce758 Author: Christos Margiolis AuthorDate: 2026-04-17 17:33:00 +0000 Commit: Christos Margiolis CommitDate: 2026-05-27 15:32:12 +0000 sound: Update mixer.c LICENSE header Sponsored by: The FreeBSD Foundation MFC after: 1 week Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/18 --- sys/dev/sound/pcm/mixer.c | 4 ++++ sys/dev/sound/pcm/mixer.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c index 8d96486c862b..3ddee24417cc 100644 --- a/sys/dev/sound/pcm/mixer.c +++ b/sys/dev/sound/pcm/mixer.c @@ -5,6 +5,10 @@ * Portions Copyright (c) Ryan Beasley - GSoC 2006 * Copyright (c) 1999 Cameron Grant * All rights reserved. + * Copyright (c) 2026 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 diff --git a/sys/dev/sound/pcm/mixer.h b/sys/dev/sound/pcm/mixer.h index 34f0514c6271..6f764307cfc8 100644 --- a/sys/dev/sound/pcm/mixer.h +++ b/sys/dev/sound/pcm/mixer.h @@ -4,6 +4,10 @@ * Copyright (c) 2005-2009 Ariff Abdullah * Copyright (c) 1999 Cameron Grant * All rights reserved. + * Copyright (c) 2026 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 Wed May 27 17:02:42 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQbXM0gLlz6fLsW for ; Wed, 27 May 2026 17:02: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQbXM00RXz3rrH for ; Wed, 27 May 2026 17:02:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779901363; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a52chv5Imf7woCvI2mD40Z/mtTKQMYdXe5mkW4q/b0I=; b=xVmhhv1kprBNutClflw6Ie0XeCym/1x4RCnyf+3Wcj5c1jukDQSV2H+RdjxYtNpglCMDhj RraKsWVlsITpaYlyi7o/oYxJ7KMCR5s8CmW/0c4XbgztTts6X5Xv3mxrdjwT2Y3niqBgwV bNyH9fNb8I3aPL+s93AK+r8Le9YgaCFilswtRUvJKXvrlfZvqj1lKVEJuLeru356nKJUnL uNqazMrlDNDJNRQ7dt73KjeEdg9A+LMP+yxwM8jrjCrtU61Ffpbbxi+S6Z1ZNFS96IceVF XEnM23TeJFRg9Pc/SdvMcpGVIO/8xnWLFfqMOFLgE1XUHKBdzAi5Qd0JgI4vYw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779901363; a=rsa-sha256; cv=none; b=oZdnjyDrOvFnaxj3204DTpyJmuiV1ip9V++rux18xKCd2VuBIL/m+1Z6njLtUSm6T6qvBu Ft4+eQQh/7jjU1qsqi0ol1Bt3D586d2yXUlT38srWsCgL3OwWczwLA2ER1/WH0m+WyVeR/ 9jyD56g0xIaHThn+7jq2E5IN7CJ/yf9TXyF7ini2sd/yvh/OnIsyK79+z9wkXqfqpZ/CFL FargBwtfy/uCWSy5EFYVhXraN8uKQMDl/d60vSEngAjzpLUI/Xqi4UwkhAyx9GNdKWfIkR juCWFgglePT+Sw2LOFNpu94IXx6+kleQZITs9FsvuF6uiZx+yqixX5CNS9TP3w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779901363; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a52chv5Imf7woCvI2mD40Z/mtTKQMYdXe5mkW4q/b0I=; b=i9wgA55z05eeTIF7fnFuZvPc/YvKYm8KC+rWcqMQYsc9Pqu94xEEszNDVaKvjDRNm0V9d/ XOTWIX0GlM8cWQwdOSf0gD2t1H6uxbvNk/hhLheuQJC39zoYixzXtcr4itMdBntshM18LO DrUx+QhV5cD3iyqV3TSfd64dBPxi+mlUPq22+3SJ/VVlgFpAe3DKGit9fjTsurYJl0Ml0h 6JM4C1XsTBpShG5HoB30Uv+VuYhwsNUSMp7qd6XxK+dreHX3THJv+GRrur2KKFRKCup9Zn 6QFSyu00bBfbt+vhVYY8L8H6ylNdjrijJkzGXHHnCulkGa6UyM3NgQ571NkM7A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQbXL6Ynrz172m for ; Wed, 27 May 2026 17:02:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39d9e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 17:02:42 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 6880405bf97d - main - cap_mkdb: Fix memory leak List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6880405bf97df03ffce227d34c2faa99b602a49d Auto-Submitted: auto-generated Date: Wed, 27 May 2026 17:02:42 +0000 Message-Id: <6a1723b2.39d9e.375f4785@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=6880405bf97df03ffce227d34c2faa99b602a49d commit 6880405bf97df03ffce227d34c2faa99b602a49d Author: Dag-Erling Smørgrav AuthorDate: 2026-05-27 17:02:12 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-27 17:02:12 +0000 cap_mkdb: Fix memory leak This is not a big deal since it only iterates once before exiting, but that's no reason to set a bad example. PR: 195128 MFC after: 1 week Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D57251 --- usr.bin/cap_mkdb/cap_mkdb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.bin/cap_mkdb/cap_mkdb.c b/usr.bin/cap_mkdb/cap_mkdb.c index 7ee6d2ddd2b3..019dad1ee72e 100644 --- a/usr.bin/cap_mkdb/cap_mkdb.c +++ b/usr.bin/cap_mkdb/cap_mkdb.c @@ -117,6 +117,7 @@ main(int argc, char *argv[]) if (capdbp->close(capdbp) < 0) err(1, "%s", capname); + free(capname); capname = NULL; exit(0); } @@ -151,7 +152,7 @@ db_build(char **ifiles) data.data = NULL; key.data = NULL; - for (reccnt = 0, bplen = 0; (st = cgetnext(&bp, ifiles)) > 0;) { + for (reccnt = 0, bplen = 0; (st = cgetnext(&bp, ifiles)) > 0; free(bp)) { /* * Allocate enough memory to store record, terminating From nobody Wed May 27 17:02:41 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQbXR19KJz6fLQT for ; Wed, 27 May 2026 17:02:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQbXR0DQrz3rvG for ; Wed, 27 May 2026 17:02:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779901367; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cOA285zLHtr9eKnVWRbEsRg6VGXvQofk5Gg9mk3eXlc=; b=WhdrG+cHux2JSrciU/BOlPTv1zM9jC3gdI8epeG3ODn84mcfXxGl4+7/FMOsRyWeU6FXrL wqlPi8X1+jFzJFUrkNWvb3J7RJHgD8zJEqfvngKJb8PkB2WNsgUktR2Heu1VV4gcoc5MdJ LGNPhP1i6l5QCukKKre8CjKtH7506xYF0SpstYR0OrnqAWD1OkGqSVEXpJK9vN0GrUAKlt bhtISXkaUjAj7V61K6dz2awEp3/zcr/o6Xk8/e9C2A1Cm5j+XJCGnQwx2FXjw2CVzRwSaz 5ZD2Rz8/ROpRHl/RbVv2Q6H7HvL8AVx25jUBHytm+zYoh48V4xNuF3ani+9pJw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779901367; a=rsa-sha256; cv=none; b=N1f5wScQj61w2UHzqQaDXAQc6fK1l7sDxj7TsXPQ0jwlohpDovkaRGFeNRzR/1umuombr0 iFmRPuYvRBZ5hi2wLEr+IFfJzypnGPBd2L6KXWhmRVZW25d5uNHlvoRtn9+iswPJz2P+Po wNbtsHX9p+4dM48ihP3Q2R4RWp/LK2RJkRtUtxnXaw01aMqy8q7+I8lc7ZflOG9jn9Pk1J rJiod6lFknLO841+J8WR4rHvjOWbKkoZNYUVCdH7/6KU4FZf9LQvjMlLRXZBmv5h7FKCgZ ewci+9x8iYLA2yM9d1HSYijEtNmlQh0tp+kFG2gD2pbMYzl0FftE2YT7yTmmIg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779901367; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cOA285zLHtr9eKnVWRbEsRg6VGXvQofk5Gg9mk3eXlc=; b=AdvMg9bDxWBxnhqVyl2DnaJ0Mj1qJK5RZeby6Kkqt3kwtnnmxgQwFu8UIaPo2plboHughJ Sp9YB4MAz/dYGKyahAHPidBXLuDMz17jclhAxByBZ1CqZWeFyTtgq24rwJFJWceHOI/PQE i0OCdVDD+B1XYIX6f/Uk2hoTqbeST8sQbNjg34D2+ozuYbQzoitigHHxgXbcGQPjV4D8ZS w3298WakjQuFXDvJdX6vVmKkxfTcTk9bly15TG7rnHPZ+I4GJago3jx5L4kCVJyq7cH5Nm IERry5B/m3OxtC3570F3Xe0NN8qRE82lkPf7qKzUQi3Z3vBcO8/FRnW1PvZydA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQbXQ6tCPz17Xp for ; Wed, 27 May 2026 17:02:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3954e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 17:02:41 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: f2a89e7e1d87 - main - limits: Improve consistency List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f2a89e7e1d87c5a3aaa243aff3f6086e7312ecf5 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 17:02:41 +0000 Message-Id: <6a1723b1.3954e.554c9451@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=f2a89e7e1d87c5a3aaa243aff3f6086e7312ecf5 commit f2a89e7e1d87c5a3aaa243aff3f6086e7312ecf5 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-27 17:02:07 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-27 17:02:07 +0000 limits: Improve consistency Historical precedent seems pretty consistent: size limits have singular names, number limits have plural names. RLIMIT_VMM broke this, and I made matters worse by referring to this limit as “vmms†in limits(1). Consistently use “vms†everywhere user-visible, while leaving the question of whether or not to rename RLIMIT_VMM itself for another day. Fixes: 1092ec8b3375 ("kern: Introduce RLIMIT_VMM") Fixes: 53af2026f213 ("limits: Unbreak after RLIMIT_VMM addition") Reviewed by: bnovkov Differential Revision: https://reviews.freebsd.org/D57265 --- sys/sys/resource.h | 2 +- usr.bin/limits/limits.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/sys/resource.h b/sys/sys/resource.h index 9e0635cdb328..6d8d17a05e02 100644 --- a/sys/sys/resource.h +++ b/sys/sys/resource.h @@ -145,7 +145,7 @@ static const char *rlimit_ident[] = { "kqueues", "umtx", "pipebuf", - "vmm", + "vms", }; #endif diff --git a/usr.bin/limits/limits.c b/usr.bin/limits/limits.c index fbb19289e6ca..a6e95e7c37a9 100644 --- a/usr.bin/limits/limits.c +++ b/usr.bin/limits/limits.c @@ -247,7 +247,7 @@ static struct { { "kqueues", login_getcapnum }, { "umtxp", login_getcapnum }, { "pipebuf", login_getcapnum }, - { "vmms", login_getcapnum }, + { "vms", login_getcapnum }, }; _Static_assert(nitems(resources) == RLIM_NLIMITS, From nobody Wed May 27 18:22:58 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQdJy4pYDz6fS6b for ; Wed, 27 May 2026 18:22: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQdJy35Gcz424q for ; Wed, 27 May 2026 18:22:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779906178; 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=Q9oHfv5uZ20IfP3TnpP/BOaDqnyGAj6Ih/OaKbWNWuQ=; b=tx5UCE6nft1ADJ7kvdyuapK+fXKjXSDXIU3aVIxAMx4eriWM91B04Fz/ISoNwBO+C33qDW 0VnRdYDOXPGD9rh2b1lR3xeQL3YkUghTzZyzjxv2GpPJcVtNflWfW7o6EjDalgc/Angr5o i/TZlP9vtCbybAqLfFTVQ+NVdcXoSX2fZoIMI2gYpJxAic/v0qUQs3DVlbsJ7J9hce3Ycd vuiIb9K4KjkLs8/IZSuEiO3o6t2ZMxRH1fNCHmkZX8vgx9/5lXXL35GM6KYnC7m71BoQch gGyMrKGvomsuJzuca0EvTGCSJjDA0wkpgS/IJbs4Sol2Pi7clXc7pDTPb+3N0Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779906178; a=rsa-sha256; cv=none; b=oOnk8q/e4uWPu933bIm2FhA3MVoSE7nVijJKccvFmmJUhWThJGG7cDu9IWqvJddIlncNzl wABPElS8EtedJeZZ9srITTB1VGXDZzD/ksRPRznC+Ru2EF2WQba+xq6cbyMixnthzWvB5s S8ayYmkw8nOPS1v8fwbGLq1hY35/3pxLeDvuUxBMHKfke/SxFvGtJlaA31dT7j9pmJDd7e u9EbfzmiZ4ccCUtoxLt5FtgRirXYyq9Kl1QbUrwy1GLdO6/XAH/zOIsdWmctSYjbplGhW/ 6zbzJXuql6zfVVukyh7rhSlxoKpOU8oEwg7KgNli/+4FnRxqcM/1GYXwU09ZRA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779906178; 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=Q9oHfv5uZ20IfP3TnpP/BOaDqnyGAj6Ih/OaKbWNWuQ=; b=mQsu/Km99dRgF+DmB82biP9fPw7TKu6tsI7Kslg2AN1M4rYLESNaMPkfFp3K0RQVoRy6Ak F2IEzL5vTypDpvW3irVWI9ZUya8w9fmZb5Ua8mBhcfvG4pilnNhp/e98YTU4qnQ9gwoGzw TAfF91cLWxP9NP0TOxHvu2FjVPOwpXeaR3hUkb/yf7x2D5HKwYoQ3naL9jV7wipznaGPhY tF/MhrfkaaEg+2/HISYJssgZfIg7speZBfdHZrAki9bLvI4OELZNhjtqFOLvK73JpVyGU6 3WVu5zjN5GWk/XFbilUa1PMLNDf/G8FEMh11lI5l/XNz7u6KxRDPXl8fZ5CHCw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQdJy2NM7z1989 for ; Wed, 27 May 2026 18:22:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3fb6f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 18:22:58 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Kyle Crenshaw From: Mitchell Horne Subject: git: ccda002ca10f - main - rk_gpio: implement PIC masking methods and mask unhandled IRQs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ccda002ca10f9fb88e65d4bc27f0676e6f97d16d Auto-Submitted: auto-generated Date: Wed, 27 May 2026 18:22:58 +0000 Message-Id: <6a173682.3fb6f.4ddf8fab@gitrepo.freebsd.org> The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=ccda002ca10f9fb88e65d4bc27f0676e6f97d16d commit ccda002ca10f9fb88e65d4bc27f0676e6f97d16d Author: Kyle Crenshaw AuthorDate: 2026-05-14 21:07:42 +0000 Commit: Mitchell Horne CommitDate: 2026-05-27 18:21:19 +0000 rk_gpio: implement PIC masking methods and mask unhandled IRQs The Rockchip GPIO controller implements PIC operations for the INTRNG framework but is missing four masking methods that INTRNG calls during the filter/ithread handoff: pic_disable_intr, pic_enable_intr, pic_pre_ithread, pic_post_ithread. Without them, level-sensitive interrupt sources connected to a Rockchip GPIO pin re-fire continuously while their ithread runs. On a RockPro64 with a FUSB302B Type-C controller (i2c) attached to gpio1 INT_N, the system enters a ~210 kHz interrupt storm the moment the fusb302 driver attaches and INT_N goes low. Two complementary changes: 1. Add the four pic_disable_intr/pic_enable_intr/pic_pre_ithread/ pic_post_ithread method bodies. Each toggles the pin's RK_GPIO_INTMASK bit so the source is masked during the in-flight ithread window and unmasked on return, honouring the generic INTRNG mask/unmask sequence. 2. When the GPIO IRQ filter dispatches a pin and finds no consumer registered, mask the pin at the controller (INTMASK=1, INTEN=0) before continuing. Level-triggered sources keep asserting until acked, so a single stuck pin used to flood the console with thousands of "Interrupt pin=N unhandled" lines per second. The mask survives until something re-attaches and re-enables the IRQ via the standard pic_enable_intr path. Affects all level-triggered IRQs on Rockchip GPIO banks; edge- triggered IRQs were already self-acking and unaffected. Signed-off-by: Kyle Crenshaw Reviewed by: mhorne MFC after: 2 weeks Pull Request: https://github.com/freebsd/freebsd-src/pull/2197 --- sys/arm64/rockchip/rk_gpio.c | 106 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 100 insertions(+), 6 deletions(-) diff --git a/sys/arm64/rockchip/rk_gpio.c b/sys/arm64/rockchip/rk_gpio.c index 8da37d516802..7c2071d2d178 100644 --- a/sys/arm64/rockchip/rk_gpio.c +++ b/sys/arm64/rockchip/rk_gpio.c @@ -227,8 +227,22 @@ rk_gpio_intr(void *arg) status &= ~(1 << pin); if (intr_isrc_dispatch(RK_GPIO_ISRC(sc, pin), tf)) { - device_printf(sc->sc_dev, "Interrupt pin=%d unhandled\n", - pin); + /* + * Pin asserted but no consumer is registered for it + * yet (or anymore). Level-triggered sources keep + * firing on every interrupt cycle, so a single stuck + * pin floods the console with thousands of these + * messages per second. Mask the pin's IRQ at the + * controller and disable further dispatches; if a + * consumer attaches later it will re-enable through + * pic_enable_intr / rk_gpio_pic_enable_intr. + */ + RK_GPIO_LOCK(sc); + rk_gpio_write_bit(sc, RK_GPIO_INTMASK, pin, 1); + rk_gpio_write_bit(sc, RK_GPIO_INTEN, pin, 0); + RK_GPIO_UNLOCK(sc); + device_printf(sc->sc_dev, + "Interrupt pin=%d unhandled — masked\n", pin); continue; } @@ -818,10 +832,14 @@ rk_pic_setup_intr(device_t dev, struct intr_irqsrc *isrc, return (EINVAL); } rk_gpio_write_bit(sc, RK_GPIO_DEBOUNCE, pin, 1); - rk_gpio_write_bit(sc, RK_GPIO_INTMASK, pin, 0); - rk_gpio_write_bit(sc, RK_GPIO_INTEN, pin, 1); RK_GPIO_UNLOCK(sc); + /* + * Leave the interrupt masked + disabled here. INTRNG will call + * pic_enable_intr() next to make it live. That keeps the + * masking responsibility cleanly in enable/disable rather than + * split between setup and disable. + */ return (0); } @@ -837,14 +855,86 @@ rk_pic_teardown_intr(device_t dev, struct intr_irqsrc *isrc, if (isrc->isrc_handlers == 0) { irqsrc->mode = GPIO_INTR_CONFORM; RK_GPIO_LOCK(sc); - rk_gpio_write_bit(sc, RK_GPIO_INTEN, irqsrc->irq, 0); - rk_gpio_write_bit(sc, RK_GPIO_INTMASK, irqsrc->irq, 0); + /* + * INTEN/INTMASK are already cleared by pic_disable_intr, + * which INTRNG calls before teardown of the last handler. + * We only need to undo what setup_intr configured -- here, + * the debounce filter. + */ rk_gpio_write_bit(sc, RK_GPIO_DEBOUNCE, irqsrc->irq, 0); RK_GPIO_UNLOCK(sc); } return (0); } +/* + * INTRNG calls pic_disable_intr() during teardown of the final handler + * for a source, OR when a consumer explicitly wants the source off. + * Clear INTEN so the controller will not raise this pin at all. + * + * The in-flight masking between FILTER_SCHEDULE_THREAD and ithread + * completion is handled by pic_pre_ithread() / pic_post_ithread() + * below, NOT by this method. + */ +static void +rk_pic_disable_intr(device_t dev, struct intr_irqsrc *isrc) +{ + struct rk_gpio_softc *sc = device_get_softc(dev); + struct rk_pin_irqsrc *rkisrc = (struct rk_pin_irqsrc *)isrc; + + RK_GPIO_LOCK(sc); + rk_gpio_write_bit(sc, RK_GPIO_INTMASK, rkisrc->irq, 1); + rk_gpio_write_bit(sc, RK_GPIO_INTEN, rkisrc->irq, 0); + RK_GPIO_UNLOCK(sc); +} + +/* + * INTRNG calls pic_enable_intr() to make a source live for the first + * time (after setup_intr), or to re-enable after a prior + * pic_disable_intr(). Set INTEN and unmask so the controller starts + * delivering this pin. + */ +static void +rk_pic_enable_intr(device_t dev, struct intr_irqsrc *isrc) +{ + struct rk_gpio_softc *sc = device_get_softc(dev); + struct rk_pin_irqsrc *rkisrc = (struct rk_pin_irqsrc *)isrc; + + RK_GPIO_LOCK(sc); + rk_gpio_write_bit(sc, RK_GPIO_INTEN, rkisrc->irq, 1); + rk_gpio_write_bit(sc, RK_GPIO_INTMASK, rkisrc->irq, 0); + RK_GPIO_UNLOCK(sc); +} + +/* + * Called by INTRNG before delivering to the ithread. Mask the source + * so it cannot re-fire during the ithread window -- without this, + * level-low IRQs (e.g. FUSB302 INT_N) re-trigger continuously and + * starve the ithread (~210 kHz storm observed via dtrace). + * Re-unmasked in pic_post_ithread() once the ithread acks the source. + */ +static void +rk_pic_pre_ithread(device_t dev, struct intr_irqsrc *isrc) +{ + struct rk_gpio_softc *sc = device_get_softc(dev); + struct rk_pin_irqsrc *rkisrc = (struct rk_pin_irqsrc *)isrc; + + RK_GPIO_LOCK(sc); + rk_gpio_write_bit(sc, RK_GPIO_INTMASK, rkisrc->irq, 1); + RK_GPIO_UNLOCK(sc); +} + +static void +rk_pic_post_ithread(device_t dev, struct intr_irqsrc *isrc) +{ + struct rk_gpio_softc *sc = device_get_softc(dev); + struct rk_pin_irqsrc *rkisrc = (struct rk_pin_irqsrc *)isrc; + + RK_GPIO_LOCK(sc); + rk_gpio_write_bit(sc, RK_GPIO_INTMASK, rkisrc->irq, 0); + RK_GPIO_UNLOCK(sc); +} + static device_method_t rk_gpio_methods[] = { /* Device interface */ DEVMETHOD(device_probe, rk_gpio_probe), @@ -873,6 +963,10 @@ static device_method_t rk_gpio_methods[] = { DEVMETHOD(pic_map_intr, rk_pic_map_intr), DEVMETHOD(pic_setup_intr, rk_pic_setup_intr), DEVMETHOD(pic_teardown_intr, rk_pic_teardown_intr), + DEVMETHOD(pic_disable_intr, rk_pic_disable_intr), + DEVMETHOD(pic_enable_intr, rk_pic_enable_intr), + DEVMETHOD(pic_pre_ithread, rk_pic_pre_ithread), + DEVMETHOD(pic_post_ithread, rk_pic_post_ithread), /* ofw_bus interface */ DEVMETHOD(ofw_bus_get_node, rk_gpio_get_node), From nobody Wed May 27 18:22:57 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQdK26WjCz6fS6c for ; Wed, 27 May 2026 18:23: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQdK249Qvz42Rg for ; Wed, 27 May 2026 18:23:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779906182; 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=RgVy7dIB6Dlp1CVZj3HtQ4Y2Vyn76uvb49neURyhF88=; b=ps2bw32NuFPssyElMrOzXQEZdKbM7QRw2lryNv4/aG3hrGGdEw7YmIdY4+5e2ZLtjNBZhe gUS1nQ2/RSZJE4Y97rY3R7Gne1eSu+qrRDMOiGetxmPqP4aitW/ijUDCItcIkNgRWoWiv2 1M7Y/I7UxNzt/XWni7U651VT/YUUFFkV0jP0OaFM8YkErtVu6f+zjiF+WOK/2/E+muOLZ+ Qa2aBCsR+rV+2AXPXuBC38Xp/AGPTtboY8SmCoFKLfNnkjvYxCvCYeKEPAXxJRUMGllGOp /ZkpeQUkaPXJ2q807Bepckc1LMYi9ixw7Zc0HlFqpBn8hUilDjkTqLUiMzwb5w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779906182; a=rsa-sha256; cv=none; b=DYixUEIc9v/MIXSW5GHafFHZrLRBMNl8fQzCJClM6VLiyQaLkndn9/SKLVtDtdk2tgUSQ8 IQPLmBA1Bpm4Ogx2YtJvV5mn72PWZGLIMx9kTcP0mYR3F/Kxjx6tGXhRlgStoiX5gIFKO8 fEVrh57CvdCCyFcvhLk2m8WLcR896oCMJ+NBGovZ/tAPRipL4AtT00YVcm7oer+LHpEMwx TJQ5d2DgNX/aJIKo930E9JhTPJld2qTiyu3kCfkWP/DDb16olLmCdvJbzHGwY1Eqt2G3m1 LG/1CnJVZPl75HtL0lljRbY8A+xvaHpN7bsIiLLYYRw9+Wp8gGngVHKfGFiMMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779906182; 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=RgVy7dIB6Dlp1CVZj3HtQ4Y2Vyn76uvb49neURyhF88=; b=MXXeTfF/j7Dztn51qwxTAmSqmU/4hgdjWFgEq2RCVsd4FNZBQdLP1ip4CCpoLMd9lm78qj fTMK6SYQDpP3pzmHEHZtF+bK/WoXmSuSubZrcMRa2jJ0YqVn7WcTFZAxe77sb8vEemIfH9 aUtQ9SStdIrRCVngPd3QM2kIOTJbi+8sWcolvIVqXLXIJWdqDLxJrhdLKFnxjK9JuPAXFk rt20vn7tyQiW0fyBdSEKlxVMNYF8Qjv92F+WFriwm/IO0C/Psgyn0Slo/KT40yJKisCFeH s+B1rajFVFlGKvI6hI+Tdi4OeO7YQVNZS6nohzaGrhzOJHiLvmUqT6W1EtZdlQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQdK23XKGz19jL for ; Wed, 27 May 2026 18:23:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 410bc by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 18:22:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Haoxiang Li From: Mitchell Horne Subject: git: d1488cd762be - main - bcm2835_sdhci: Clean up DMA resources on attach failure List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d1488cd762bee79240a715bf04f3d30e9a121b26 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 18:22:57 +0000 Message-Id: <6a173681.410bc.778c744e@gitrepo.freebsd.org> The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=d1488cd762bee79240a715bf04f3d30e9a121b26 commit d1488cd762bee79240a715bf04f3d30e9a121b26 Author: Haoxiang Li AuthorDate: 2026-05-27 02:42:43 +0000 Commit: Mitchell Horne CommitDate: 2026-05-27 18:12:09 +0000 bcm2835_sdhci: Clean up DMA resources on attach failure bcm_sdhci_attach() allocates a DMA channel with bcm_dma_allocate() before creating the bus_dma tag and map. If a later initialization step fails, the common error path releases the interrupt and memory resources, but leaves the DMA channel allocated. Call bcm_dma_free() for cleanup, as it already performs the required internal checks and can therefore be invoked directly. Signed-off-by: Haoxiang Li Reviewed by: mhorne MFC after: 3 days Pull Request: https://github.com/freebsd/freebsd-src/pull/2241 --- sys/arm/broadcom/bcm2835/bcm2835_sdhci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c b/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c index e0c4327d8e05..6e974a1a61bb 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c @@ -365,6 +365,7 @@ bcm_sdhci_attach(device_t dev) return (0); fail: + bcm_dma_free(sc->sc_dma_ch); if (sc->sc_intrhand) bus_teardown_intr(dev, sc->sc_irq_res, sc->sc_intrhand); if (sc->sc_irq_res) From nobody Wed May 27 20:15:08 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQgpN667sz6fcPb for ; Wed, 27 May 2026 20:15:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQgpN5SnCz3HVs for ; Wed, 27 May 2026 20:15:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779912908; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w5xRTNF2yjGKd2QO1dPaHN9mKoT5C2myP0IT9JWsxQI=; b=Byo75kOA9ehTTAk3Y7wliKksA9hwqb4t/rTAO7p/LvuwS39vcDKIQyxqa4amo2UbUmNZDj RR2wYpWMMS7X2/bcf4n81vGoIrAcAKidKeaXClwnjb1okOylBISPnc6sagmvOsKjWc3sYu 4J86lNM6BnK9F+4DN2mCno8y8J3pmfgq8h1W9GlXFkw4aE/DSv8RJydXKq1/4uUunRBMwG ca7pzNGfb2FycjPLLlnP0FPSjYHOcbf2IZl2wiIMMWy4EN0PVFhUIMC4ukX/EHZ4HNqrvV 6WQFRvEt0O8Q0uP0nk4yjepvEhtolkH5yw0mCTDkIRGsVDaulSMQM80hxFPNWA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779912908; a=rsa-sha256; cv=none; b=fpObu+uZxuIbSXqfsYOdkjqagkviKPalBzr8TfmT7kelrzPcqdUFMpj2JBVdEX6negSQiu oFgQFqv8eiR616rym4GI217dClcThryzK1Z4Cb3lnjkGA1QxjvFK6h8mSy7j8dkr+Dv7jX plu5DuKVDkYQGsV/bL6o3zkh/PxzZnx35Au4bIGFu0xlpaty9UcLBg1HjL9+I1xsHqGwbc RqtsEdtih0PEAVBSoFqgDUjW+uAnr+W5bNbE5o9SgSVWX737wSu3DKXH8KzR6s8KeUsYTI 2lz8+cNii6qTEMXDN4PDmHCDrjhzJyxMuZJrY+A6kk4LSF8Qoq6oD/TveVeaBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779912908; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w5xRTNF2yjGKd2QO1dPaHN9mKoT5C2myP0IT9JWsxQI=; b=kdjdmEVb0Ozx+rHFWS9RwYNbpUa4rVIVIYXcPzij9b0JgUR8VsYAA3o+Du4CqfGhqpqr3+ HeseywE9COt7j6mTjtA4FIRqwVqMyY7uQakqaoOI1w49sk1wsj2TOGoq+DPAOBOFbADGHs l+hpRWlHxtY51w2BI4HSuaP4neart0/xGLJmtAqdDl1u2HON9i/LaL16FxA9UAiATNC0pR if2dg3wXNZo/NS5+f9TVbG0ysVgFaSca8VKNJ011xe6KUcm7guRYg2SKJ6KcoeqOX6kh6L oyRpUsMVM5rGFEiDx1RALuhRHK33wzFAmAsOlaDUw07b3HBfzrl9v881q5u7wA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQgpN50FLzSL for ; Wed, 27 May 2026 20:15:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1de87 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 20:15:08 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 40c846dc0794 - main - uart: Tidy the compat tables List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 40c846dc07943df7cdebf091de09d5680a3f3606 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 20:15:08 +0000 Message-Id: <6a1750cc.1de87.5904db4@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=40c846dc07943df7cdebf091de09d5680a3f3606 commit 40c846dc07943df7cdebf091de09d5680a3f3606 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-27 20:14:58 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-27 20:14:58 +0000 uart: Tidy the compat tables No functional change intended. MFC after: 1 week Sponsored by: Klara, Inc. Sponsored by: NetApp, Inc. Reviewed by: royger Differential Revision: https://reviews.freebsd.org/D57269 --- sys/dev/uart/uart_dev_ns8250.c | 44 +++++++++++++++++++++--------------------- sys/dev/uart/uart_dev_pl011.c | 30 ++++++++++++++-------------- 2 files changed, 37 insertions(+), 37 deletions(-) diff --git a/sys/dev/uart/uart_dev_ns8250.c b/sys/dev/uart/uart_dev_ns8250.c index c13eabe9055e..d6940dc80005 100644 --- a/sys/dev/uart/uart_dev_ns8250.c +++ b/sys/dev/uart/uart_dev_ns8250.c @@ -529,40 +529,40 @@ UART_CLASS(uart_ns8250_class); */ #ifdef DEV_ACPI static struct acpi_spcr_compat_data acpi_spcr_compat_data[] = { - { &uart_ns8250_class, ACPI_DBG2_16550_COMPATIBLE }, - { &uart_ns8250_class, ACPI_DBG2_16550_SUBSET }, - { &uart_ns8250_class, ACPI_DBG2_16550_WITH_GAS }, + { &uart_ns8250_class, ACPI_DBG2_16550_COMPATIBLE }, + { &uart_ns8250_class, ACPI_DBG2_16550_SUBSET }, + { &uart_ns8250_class, ACPI_DBG2_16550_WITH_GAS }, { NULL, 0 }, }; UART_ACPI_SPCR_CLASS(acpi_spcr_compat_data); static struct acpi_uart_compat_data acpi_compat_data[] = { {"AMD0020", &uart_ns8250_class, 2, 0, 48000000, UART_F_BUSY_DETECT, "AMD / Synopsys Designware UART"}, - {"AMDI0020", &uart_ns8250_class, 2, 0, 48000000, UART_F_BUSY_DETECT, "AMD / Synopsys Designware UART"}, - {"APMC0D08", &uart_ns8250_class, 2, 4, 0, 0, "APM compatible UART"}, - {"MRVL0001", &uart_ns8250_class, 2, 0, 200000000, UART_F_BUSY_DETECT, "Marvell / Synopsys Designware UART"}, - {"SCX0006", &uart_ns8250_class, 2, 0, 62500000, UART_F_BUSY_DETECT, "SynQuacer / Synopsys Designware UART"}, - {"HISI0031", &uart_ns8250_class, 2, 0, 200000000, UART_F_BUSY_DETECT, "HiSilicon / Synopsys Designware UART"}, - {"INTC1006", &uart_ns8250_class, 2, 0, 25000000, 0, "Intel ARM64 UART"}, - {"NXP0018", &uart_ns8250_class, 0, 0, 350000000, UART_F_BUSY_DETECT, "NXP / Synopsys Designware UART"}, - {"PNP0500", &uart_ns8250_class, 0, 0, 0, 0, "Standard PC COM port"}, - {"PNP0501", &uart_ns8250_class, 0, 0, 0, 0, "16550A-compatible COM port"}, - {"PNP0502", &uart_ns8250_class, 0, 0, 0, 0, "Multiport serial device (non-intelligent 16550)"}, - {"PNP0510", &uart_ns8250_class, 0, 0, 0, 0, "Generic IRDA-compatible device"}, - {"PNP0511", &uart_ns8250_class, 0, 0, 0, 0, "Generic IRDA-compatible device"}, - {"WACF004", &uart_ns8250_class, 0, 0, 0, 0, "Wacom Tablet PC Screen"}, - {"WACF00E", &uart_ns8250_class, 0, 0, 0, 0, "Wacom Tablet PC Screen 00e"}, - {"FUJ02E5", &uart_ns8250_class, 0, 0, 0, 0, "Wacom Tablet at FuS Lifebook T"}, - {NULL, NULL, 0 , 0, 0, 0, NULL}, + {"AMDI0020", &uart_ns8250_class, 2, 0, 48000000, UART_F_BUSY_DETECT, "AMD / Synopsys Designware UART"}, + {"APMC0D08", &uart_ns8250_class, 2, 4, 0, 0, "APM compatible UART"}, + {"MRVL0001", &uart_ns8250_class, 2, 0, 200000000, UART_F_BUSY_DETECT, "Marvell / Synopsys Designware UART"}, + {"SCX0006", &uart_ns8250_class, 2, 0, 62500000, UART_F_BUSY_DETECT, "SynQuacer / Synopsys Designware UART"}, + {"HISI0031", &uart_ns8250_class, 2, 0, 200000000, UART_F_BUSY_DETECT, "HiSilicon / Synopsys Designware UART"}, + {"INTC1006", &uart_ns8250_class, 2, 0, 25000000, 0, "Intel ARM64 UART"}, + {"NXP0018", &uart_ns8250_class, 0, 0, 350000000, UART_F_BUSY_DETECT, "NXP / Synopsys Designware UART"}, + {"PNP0500", &uart_ns8250_class, 0, 0, 0, 0, "Standard PC COM port"}, + {"PNP0501", &uart_ns8250_class, 0, 0, 0, 0, "16550A-compatible COM port"}, + {"PNP0502", &uart_ns8250_class, 0, 0, 0, 0, "Multiport serial device (non-intelligent 16550)"}, + {"PNP0510", &uart_ns8250_class, 0, 0, 0, 0, "Generic IRDA-compatible device"}, + {"PNP0511", &uart_ns8250_class, 0, 0, 0, 0, "Generic IRDA-compatible device"}, + {"WACF004", &uart_ns8250_class, 0, 0, 0, 0, "Wacom Tablet PC Screen"}, + {"WACF00E", &uart_ns8250_class, 0, 0, 0, 0, "Wacom Tablet PC Screen 00e"}, + {"FUJ02E5", &uart_ns8250_class, 0, 0, 0, 0, "Wacom Tablet at FuS Lifebook T"}, + {NULL, NULL, 0, 0, 0, 0, NULL}, }; UART_ACPI_CLASS_AND_DEVICE(acpi_compat_data); #endif #ifdef FDT static struct ofw_compat_data compat_data[] = { - {"ns16550", (uintptr_t)&uart_ns8250_class}, - {"ns16550a", (uintptr_t)&uart_ns8250_class}, - {NULL, (uintptr_t)NULL}, + {"ns16550", (uintptr_t)&uart_ns8250_class}, + {"ns16550a", (uintptr_t)&uart_ns8250_class}, + {NULL, (uintptr_t)NULL}, }; UART_FDT_CLASS_AND_DEVICE(compat_data); #endif diff --git a/sys/dev/uart/uart_dev_pl011.c b/sys/dev/uart/uart_dev_pl011.c index ae3c4d3218cf..f0d7bcda1fa4 100644 --- a/sys/dev/uart/uart_dev_pl011.c +++ b/sys/dev/uart/uart_dev_pl011.c @@ -382,32 +382,32 @@ static struct uart_class uart_pl011_class = { }; UART_CLASS(uart_pl011_class); -#ifdef FDT -static struct ofw_compat_data fdt_compat_data[] = { - {"arm,pl011", (uintptr_t)&uart_pl011_class}, - {NULL, (uintptr_t)NULL}, -}; -UART_FDT_CLASS_AND_DEVICE(fdt_compat_data); -#endif - #ifdef DEV_ACPI static struct acpi_spcr_compat_data acpi_spcr_compat_data[] = { - { &uart_pl011_class, ACPI_DBG2_ARM_PL011 }, - { &uart_pl011_class, ACPI_DBG2_ARM_SBSA_GENERIC }, - { &uart_pl011_class, ACPI_DBG2_ARM_SBSA_32BIT }, + { &uart_pl011_class, ACPI_DBG2_ARM_PL011 }, + { &uart_pl011_class, ACPI_DBG2_ARM_SBSA_GENERIC }, + { &uart_pl011_class, ACPI_DBG2_ARM_SBSA_32BIT }, { NULL, 0 }, }; UART_ACPI_SPCR_CLASS(acpi_spcr_compat_data); static struct acpi_uart_compat_data acpi_compat_data[] = { - {"ARMH0011", &uart_pl011_class, 2, 0, 0, 0, "uart pl011"}, - {"ARMHB000", &uart_pl011_class, 2, 0, 0, 0, "uart pl011"}, - {"ARMHB000", &uart_pl011_class, 2, 0, 0, 0, "uart pl011"}, - {NULL, NULL, 0, 0, 0, 0, NULL}, + {"ARMH0011", &uart_pl011_class, 2, 0, 0, 0, "uart pl011"}, + {"ARMHB000", &uart_pl011_class, 2, 0, 0, 0, "uart pl011"}, + {"ARMHB000", &uart_pl011_class, 2, 0, 0, 0, "uart pl011"}, + {NULL, NULL, 0, 0, 0, 0, NULL}, }; UART_ACPI_CLASS_AND_DEVICE(acpi_compat_data); #endif +#ifdef FDT +static struct ofw_compat_data fdt_compat_data[] = { + {"arm,pl011", (uintptr_t)&uart_pl011_class}, + {NULL, (uintptr_t)NULL}, +}; +UART_FDT_CLASS_AND_DEVICE(fdt_compat_data); +#endif + static int uart_pl011_bus_attach(struct uart_softc *sc) { From nobody Wed May 27 21:00:32 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQhpm5qHnz6fghN for ; Wed, 27 May 2026 21: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQhpm5BNvz3PDD for ; Wed, 27 May 2026 21:00:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779915632; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FmKEK5TO87cygLKVvQTmFIOkpLh2hQYj7UuM7fOysaY=; b=VgBRPNKnHhoEqIqCsHix4XijMxDOtCbm9S6a9r8S1UQrfWu5/+H+YReVD/TztfvvrZVv9k mx5m3H4rxRbZzQMMJlBXDclN4VMAr8S1sbFJxiQ6tnmqefBHHuKorb9XakXNXREnMNufSK pyZ35t8O1AWpg3Yklmyv7U0K/VNc6cRfRPcEQ2XH8AJWYOOCwrkc6LYWqJ8AYtpprIiFhx xBPFbDKcAw7ebqoV1LsOERY7oKP/xpo82vOoVbZD8XPWKMu+pFD+u9nEqDyiAu272CutwC MFlX4eIjVydkctqDjF4uVzuukGsCyoK/8GjYfgrnAakBwWaOT0Q27LgHWhY5JQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779915632; a=rsa-sha256; cv=none; b=oCvRELw9hhAZGwLlx23autKNkvti4QURn5yaS+6MNfzmSfz8q/xtANfa6yKLVrEdG8f85a HfKGTCXdQ9UWGJq/ZeU3xi8N9aeynoN7dfjJ6yIyn4X16YigNUtl9t20ic5hQ+SdwwsCte cj1FlT4JahhYTg00aznvJ5ehCZKPOdMkdpdS/HtEFKwP8hNRD2sYQIeWYJo34N16+OCjBS V5/4RTcXpM8aXelzE1Q8cKE9SLH4+AwTspNONDliXiWjw8PgO3SXz7goAYliVo9QsvMGtJ 5Crda6nOj6irhzhl4nQtSJKc+eXbDRzWyY5WVoacbiq9i4hBCf5OyxHv/FoVLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779915632; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FmKEK5TO87cygLKVvQTmFIOkpLh2hQYj7UuM7fOysaY=; b=EVpJxbn+d0FUAl1SNwjVD6RtMF+mfIMNmi1sSAmxjoBnyM0g6YAjaQvpa0uVmxT+87CqG7 RYTI5qqyWM38yGalNwGxl/nGDhM3/LR1BVD7+Tj0d5L/ieGoQLUPuFc/oGcELlYG8PESr+ LSkBKvD679SmrGRo0JcRo0Vx59AiNoHKejPKBLr7KJRPawxh2g/Al/9UArVNK7f4ZtmWQA BxYCd8Nfzzl+GrKGEW5FTXbum3qxXxaG4msTEflpAwtJtYIFdasx57nLVDPTWadiCmJIJe COioszoYI9+cCrBqW8L0VbSHfQVE3GBIVPZBJFCekClWHWFfs3MRcO4KoMgi6Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQhpm4jTHz18T for ; Wed, 27 May 2026 21:00:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 22673 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 21:00:32 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 7a436d378951 - main - ctld: Don't ignore pp/vp values of kernel ports with pp == 0 but vp != 0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7a436d378951bedbdaa71d45bf236fb001323549 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 21:00:32 +0000 Message-Id: <6a175b70.22673.65ed394f@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=7a436d378951bedbdaa71d45bf236fb001323549 commit 7a436d378951bedbdaa71d45bf236fb001323549 Author: John Baldwin AuthorDate: 2026-05-27 20:56:39 +0000 Commit: John Baldwin CommitDate: 2026-05-27 20:56:56 +0000 ctld: Don't ignore pp/vp values of kernel ports with pp == 0 but vp != 0 Fixes: c6f1e9b8a412 ("ctld: Simplify XML parsing memory management") Sponsored by: Chelsio Communications --- usr.sbin/ctld/kernel.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/ctld/kernel.cc b/usr.sbin/ctld/kernel.cc index a6b0a79850ec..59a339e1c96b 100644 --- a/usr.sbin/ctld/kernel.cc +++ b/usr.sbin/ctld/kernel.cc @@ -549,7 +549,7 @@ conf_new_from_kernel(struct kports &kports) continue; std::string name = port.port_name; - if (port.pp != 0) { + if (port.pp != 0 || port.vp != 0) { name += "/" + std::to_string(port.pp); if (port.vp != 0) name += "/" + std::to_string(port.vp); From nobody Wed May 27 21:00:33 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQhpp6jGkz6fgx9 for ; Wed, 27 May 2026 21: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQhpn691pz3PGG for ; Wed, 27 May 2026 21: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=1779915633; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gfPlbozd8aELjELqMumpqpHVIqq5lF0Alfwd8zH98rE=; b=QeVHgxpJcZSIS86MbyyaGlfs1qGhdRA44V9pofh5doENyvilUH5NE48kdVK1w9IHOi5/Ew Mm8LKYmW23m6+EtcFccxbftv4o4CLOhn3clso8ha/jPhP2EYhYq64rXmGwogvCGI/0D4ZS WLcpXQ4g5hmR8Znaehgaq96Pa/2FoV++G54MS/X9bTIrM25JuGZCU/MDCmNjLfe0Op4JFl 4GuK2vXP3VYledw9/ckUA/b05PSBHDoZiNs1QlkXUNnnjrM/s7HYx36QlkJJ2oxfm57z5q x2FJLWgM1vO8a3mEDvNalZHwQZOAiSuHYrYMyIjqOHj7IVLm3vL9iB9dZNvQhQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779915633; a=rsa-sha256; cv=none; b=uWyPvDC/xpZIrfLTTdHNdz2rOOLaCqF9bgtPp53lYn15HzstsSwRDfiEz5IbZNnRTEk2Qp 0nzUYxcUiiQ6WYTXPZaioHFM6IsWRyLxZWwj8gQyW7tOssaSQU2roIvNIKu1LmhWGRabRF HhLBIMxiEHl+YHBjCNngKKD+ikZfLyXFYYtejZA8NZ3nWSeVB7Bj9vgbXCif5fxixDprTZ 6gjRpQsDclhIRFSRyQ6xbg8qti1XqBvoyxNA5yQdWHxlpfxKmY+EZYIKp4U8kWeu+oDH0s puGyT40JDSKYnfVK3bec/b9FrH1bmGo6zeGvxCKm5Wk93EeVoPc1dVeYUJN9lQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779915633; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gfPlbozd8aELjELqMumpqpHVIqq5lF0Alfwd8zH98rE=; b=g6JSOCwucC+jR1Mqen0B51AnILWvHS5rFWr30dRYt4yh9DvtNCL2suluQMoVY9Sl04o/+H 7Qb8l0H5FrLS5oduIFCRA3IgWpU2G8o3itCUtgvPOO85/IeQtpyBUPy9IVxIn0Oxo0wyxp FVabi4t5mBu2L05kqJINs1XYHoZa8QhlEfFS3Dn6pxl4nWF+fi3x2o8nCRWfFEbAS/m3dj o45MIEP/MnE4kawQGWRTKjKH8PDEhZHnw00Ec8JEBHCJZLm88crmxmpWvfwXTv16BNAXdM Sbm76f6FpedugSX+tfdliEF7vOQBM1DrIH4AF4UZQ9mBySQ2ZuhQxXkPBwAywg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQhpn5TWDz137 for ; Wed, 27 May 2026 21:00:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 23698 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 21:00:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: caef3c50ac06 - main - ctld: Refactor ioctl port handling List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: caef3c50ac067ca751ba4950f310821a521ebf57 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 21:00:33 +0000 Message-Id: <6a175b71.23698.7ab2b30a@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=caef3c50ac067ca751ba4950f310821a521ebf57 commit caef3c50ac067ca751ba4950f310821a521ebf57 Author: John Baldwin AuthorDate: 2026-05-27 20:57:23 +0000 Commit: John Baldwin CommitDate: 2026-05-27 20:57:23 +0000 ctld: Refactor ioctl port handling - Normalize ioctl port names when the port name is first added to the configuration. This can catch potential duplicate port names sooner and helps with other parts of this change. - When recognizing existing ioctl ports, always expand the name to include the physical and virtual port numbers. This permits binding ioctl/0/0 or ioctl/1/0 to a target, for example. - When adding physical ports to a target, first check for an existing kernel port to reuse. This handles both ioctl and non-ioctl ports and removes the need for the conf::add_port method for ioctl ports to check in kports. - If an existing kport isn't found when adding physical ports, check to see if the port name is an ioctl port. If so, call conf::add_port to add an ioctl port. This add_port method overload is now simpler as it always creates a new port. NB: The kernel_port class handles CTL ports that already existed before ctld started including existing ioctl ports, whereas the ioctl_port class handles ioctl ports that are created and completely managed by ctld. This was true before this change but is perhaps more obvious after this change. Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D57092 --- usr.sbin/ctld/ctld.cc | 80 ++++++++++++++++++++++++++++++------------------- usr.sbin/ctld/ctld.hh | 2 +- usr.sbin/ctld/kernel.cc | 5 +++- 3 files changed, 54 insertions(+), 33 deletions(-) diff --git a/usr.sbin/ctld/ctld.cc b/usr.sbin/ctld/ctld.cc index 9bdf15976911..8b99bde14911 100644 --- a/usr.sbin/ctld/ctld.cc +++ b/usr.sbin/ctld/ctld.cc @@ -1180,16 +1180,8 @@ conf::add_port(struct target *target, struct pport *pp) } bool -conf::add_port(struct kports &kports, struct target *target, int pp, int vp) +conf::add_port(struct target *target, const std::string &pname, int pp, int vp) { - struct pport *pport; - - std::string pname = freebsd::stringf("ioctl/%d/%d", pp, vp); - - pport = kports.find_port(pname); - if (pport != NULL) - return (add_port(target, pport)); - std::string name = pname + "-" + target->name(); const auto &pair = conf_ports.try_emplace(name, std::make_unique(target, pp, vp)); @@ -1387,6 +1379,19 @@ target::set_auth_type(const char *type) bool target::add_physical_port(std::string_view pport) { + /* Normalize ioctl port names. */ + std::string pname; + if (pport.compare(0, strlen("ioctl/"), "ioctl/") == 0) { + int ret, pp, vp; + + pname = std::string(pport); + ret = sscanf(pname.c_str(), "ioctl/%d/%d", &pp, &vp); + if (ret == 2) { + pname = freebsd::stringf("ioctl/%d/%d", pp, vp); + pport = pname; + } + } + for (const auto &s : t_pports) { if (s == pport) { log_warnx("duplicate physical port \"%s\" for target " @@ -2643,35 +2648,48 @@ conf::add_pports(struct kports &kports) struct target *targ = kv.second.get(); for (const auto &pport : targ->pports()) { - ret = sscanf(pport.c_str(), "ioctl/%d/%d", &i_pp, - &i_vp); - if (ret > 0) { - if (!add_port(kports, targ, i_pp, i_vp)) { - log_warnx("can't create new ioctl port " - "for %s", targ->label()); + /* + * If this port is already present in the + * kernel, reuse the existing port. + */ + pp = kports.find_port(pport); + if (pp != nullptr) { + if (pp->linked()) { + log_warnx("can't link port \"%s\" to " + "%s, port already linked to some " + "target", pport.c_str(), + targ->label()); return (false); } + if (!add_port(targ, pp)) { + log_warnx( + "can't link port \"%s\" to %s", + pport.c_str(), targ->label()); + return (false); + } continue; } - pp = kports.find_port(pport); - if (pp == NULL) { - log_warnx("unknown port \"%s\" for %s", - pport.c_str(), targ->label()); - return (false); - } - if (pp->linked()) { - log_warnx("can't link port \"%s\" to %s, " - "port already linked to some target", - pport.c_str(), targ->label()); - return (false); - } - if (!add_port(targ, pp)) { - log_warnx("can't link port \"%s\" to %s", - pport.c_str(), targ->label()); - return (false); + /* + * If this port is an ioctl port, create a new + * port. + */ + ret = sscanf(pport.c_str(), "ioctl/%d/%d", &i_pp, + &i_vp); + if (ret == 2) { + if (!add_port(targ, pport, i_pp, i_vp)) { + log_warnx("can't create new port %s " + "for %s", pport.c_str(), + targ->label()); + return (false); + } + continue; } + + log_warnx("unknown port \"%s\" for %s", + pport.c_str(), targ->label()); + return (false); } } return (true); diff --git a/usr.sbin/ctld/ctld.hh b/usr.sbin/ctld/ctld.hh index 7ae033804157..8d63de06dd80 100644 --- a/usr.sbin/ctld/ctld.hh +++ b/usr.sbin/ctld/ctld.hh @@ -487,7 +487,7 @@ struct conf { bool add_port(struct target *target, struct portal_group *pg, uint32_t ctl_port); bool add_port(struct target *target, struct pport *pp); - bool add_port(struct kports &kports, struct target *target, int pp, + bool add_port(struct target *target, const std::string &pname, int pp, int vp); bool add_pports(struct kports &kports); diff --git a/usr.sbin/ctld/kernel.cc b/usr.sbin/ctld/kernel.cc index 59a339e1c96b..8c5c447f3e80 100644 --- a/usr.sbin/ctld/kernel.cc +++ b/usr.sbin/ctld/kernel.cc @@ -549,7 +549,10 @@ conf_new_from_kernel(struct kports &kports) continue; std::string name = port.port_name; - if (port.pp != 0 || port.vp != 0) { + if (port.port_frontend == "ioctl") + name += "/" + std::to_string(port.pp) + "/" + + std::to_string(port.vp); + else if (port.pp != 0 || port.vp != 0) { name += "/" + std::to_string(port.pp); if (port.vp != 0) name += "/" + std::to_string(port.vp); From nobody Wed May 27 21:00:34 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQhpq3nWgz6fgkj for ; Wed, 27 May 2026 21: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQhpp6kjrz3PLv for ; Wed, 27 May 2026 21: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=1779915635; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2U0dCnjFlSaLJ63nvujJfVloP6DK3MZkgDhCIcuFetw=; b=OCVgFskHW7oj9fiCjgO7mY0TFFBlQLeubzfxF2vqcIfa7YZFTxA2hFkbD7sCWX/oEa8S7/ Lxs1ATqsZLyb0h0Zc2WGFYxGRJO5TlKn/FzLrq6hf785N5VfZSdqiphm3JWpvNCvGoqlPU y7Xdhhhprxkgc/MnIirdB7EKD6hABH78hAxD4PJ0KxNXThMytnz+ZdabcMB2nludOphZdv KUfiBM/GnblGiMLSc7hGqgrzw2koNhe+qohRIqgPs/LXJDTOkJL4f6aZb120jdrz4SJceV TuQuiHvpLuS03a4/dCXY5InYm2flot2vfekohJYTgtlwdBty1jeRi5UxkF2Kgg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779915635; a=rsa-sha256; cv=none; b=wjcz35+n1K4+krQdAovj+dX9DYl2iFY/hdbRTi79nYrpRnFstUbSM+Q46AfIK9PJvBcN3C rug13b8+ygcpEMmWX9yZVFWbwq1Seh2ZGe6IJab+OBtxE36D33z+OYQVOvzXo6K94e3kQJ 1j322Li98ObF/ojL5yaoohAk7lPmSNuaXbe/+nFRs7XPvnvpWQ+cd4V2bvLKOGhizMTfTZ qLBxxM/btVuaulNFVaAD+ShrsJFpwSoV6evhiWIHOlGvRqkAMlcDRCk7WJpnCfQ4rdp78j JXCnyXiduiMorUpJc4bntl0nn9Ck12HXnZNbfu2STrHuQbwBiqaKmBGFx08uNg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779915635; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2U0dCnjFlSaLJ63nvujJfVloP6DK3MZkgDhCIcuFetw=; b=v3tipMmV+lh/eLb3KffHV+lwtJkzzNP4GRFxc8APJ6Y/yYJ6fmfZmW4CVeEjoCgzZzvsve aRPqMa+x4ot9BUVCtS4lU4ZdWvKmttSZFPzTBH7rfrGgeMzFJdDSXHcAQdLuMst9qRxpGV SqBqgYDEaZUaHm4aDa/4LhWfal72xleuRDRcgRYCLgxL7ema61SwbuPCmZkN1EYGMsWmvi QkgpcTLM6Pb6X95pG6ApvNF5eR7YIgGX5Z1KITgk/c87F9268xTJhBpzPr6D7zWmem6Lok /hOyH+pV7hceWBjZqwyRZOF2z/ORUnAaJi9hgWIKt1/pZzszkiS6ImPnxvF3Pg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQhpp6H2rz18X for ; Wed, 27 May 2026 21:00:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 23b10 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 21:00:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: d1a8fa2e0f41 - main - ctld: Only check physical port linking in a single configuration context List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d1a8fa2e0f415f941e628f959fa0e70f23058fdb Auto-Submitted: auto-generated Date: Wed, 27 May 2026 21:00:34 +0000 Message-Id: <6a175b72.23b10.16d36bc4@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=d1a8fa2e0f415f941e628f959fa0e70f23058fdb commit d1a8fa2e0f415f941e628f959fa0e70f23058fdb Author: John Baldwin AuthorDate: 2026-05-27 20:57:38 +0000 Commit: John Baldwin CommitDate: 2026-05-27 20:57:38 +0000 ctld: Only check physical port linking in a single configuration context Commit 969876fcee57 moved struct pport from being per-configuration to being a "global" object shared across multiple configurations. As a result, the check for duplicate ports actually spanned across configurations, such that reloading a configuration would now think that existing physical ports were already linked. The linking field in pport added in the C++-ification (commit 6acc7afa34aa) faithfully replicated this bug (albeit simpler as I had noticed that the TAILQ links weren't used after the earlier commit). To restore the desired behavior, remove the linking field from struct pport entirely and use a local unordered_map in conf::add_pports which tracks if a given pport is claimed by more than one target. PR: 293076 Reported by: Ken J. Thomson Fixes: 969876fcee57 ("ctld: parse config file independently of getting kernel info") Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D57093 --- usr.sbin/ctld/ctld.cc | 12 +++++++----- usr.sbin/ctld/ctld.hh | 4 ---- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/usr.sbin/ctld/ctld.cc b/usr.sbin/ctld/ctld.cc index 8b99bde14911..834bef4ef363 100644 --- a/usr.sbin/ctld/ctld.cc +++ b/usr.sbin/ctld/ctld.cc @@ -1175,7 +1175,6 @@ conf::add_port(struct target *target, struct pport *pp) return (false); } - pp->link(); return (true); } @@ -2641,6 +2640,7 @@ conf_new_from_file(const char *path, bool ucl) bool conf::add_pports(struct kports &kports) { + std::unordered_map linked_ports; struct pport *pp; int ret, i_pp, i_vp; @@ -2654,11 +2654,13 @@ conf::add_pports(struct kports &kports) */ pp = kports.find_port(pport); if (pp != nullptr) { - if (pp->linked()) { + const auto &pair = linked_ports.try_emplace(pp, + targ); + if (!pair.second) { log_warnx("can't link port \"%s\" to " - "%s, port already linked to some " - "target", pport.c_str(), - targ->label()); + "%s, port already linked to %s", + pport.c_str(), targ->label(), + pair.first->second->label()); return (false); } diff --git a/usr.sbin/ctld/ctld.hh b/usr.sbin/ctld/ctld.hh index 8d63de06dd80..3bc92449e372 100644 --- a/usr.sbin/ctld/ctld.hh +++ b/usr.sbin/ctld/ctld.hh @@ -567,13 +567,9 @@ struct pport { const char *name() const { return pp_name.c_str(); } uint32_t ctl_port() const { return pp_ctl_port; } - bool linked() const { return pp_linked; } - void link() { pp_linked = true; } - private: std::string pp_name; uint32_t pp_ctl_port; - bool pp_linked = false; }; struct kports { From nobody Wed May 27 21:00:35 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQhpr3qqlz6fgvF for ; Wed, 27 May 2026 21: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQhpr06N0z3P59 for ; Wed, 27 May 2026 21: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=1779915636; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0VAkwTlpw63q/Ia2whio9nFIWyRdseE3POZ3oXk3tlA=; b=sUdP1YxMTwQ3MpsPJWS5V/UXoAoIvWD1FytDmYn8y0cpWoJGXAIkiLmTiv2VzfiwL+Vvi5 Fldonpd1Lvcmgv7I2iueFQSqaw57SSB2pv7u1TzmNT/cZJQnuMyzua/X9nHnfsNerPverb oFRrm5aX+AwZvn+uCJjfFenydLYRxsQ0znfOXDm/0UblzoPcrBikl7v7Q85+N4hUheCafo Ajs7R1EoMm3UVtuySpII2buXKiB8fy3m9X11MHmJ4MvMxa4wPvNhwyGnoK2wTpt9O5c02Z uMKeNE6v6hCUSuGrRpeNON3huW0dJQyLaun06v/e9lIvoS/1hQcCu9aQ7iPpdg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779915636; a=rsa-sha256; cv=none; b=nll+nHfMIEfiXf/8t+2rKsQ9b6R/nDcDNw/0Bh8FjOOGDmaHGu7yjMT3VluGlcfTgUPR5s 3p3y2sXPX19OWyl0/MYErI8lfeH2OWSQyGL50cv91/HjQd8VY5xBW9YTBckp0IKd3fCQG9 l1reN1dZqCBJ9t4oWcKIR5/zqL2tLoCIMN6VmeSmPKmeiT2dUnCrCYk0csvjNsB2EkCa8C lQL4L1BpWXQJipgshfXfI2CfH4Pze9IZ4cVm4i7Eljo/EsCT2ZF6izLxBqf6RB1bn/HaO2 JnD+0Q7d4+cf+luAC+j7YLaBVSAw/a05QQAYvjd06i4irb63AuWmomoUfBNGFw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779915636; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0VAkwTlpw63q/Ia2whio9nFIWyRdseE3POZ3oXk3tlA=; b=OXljOCBAvB2OpjH3Aojr7wSUIm6hqFb742kQvdmUFA72j6PQTWI9GKsw0Ct7zBpf5T8eDE tKdJQrTyt2W/2ZsOK8onymIXL3+jm7jorMfu6Pi+SpW4cYpIAyzq4tlZZbtp5Woctpht2b ngzDwia6T53jC7v1MARIPprII4RI85Sadi7mjDdkX0OuIncu3vy5pm0Vni4sRlh+PVcugR LRDwmGVjiYX1r/3PrBTv2sLJNzzATuvdrzbjeP2gKczGBGZ28xGue/OooGMYC/0S0urJzl +UdgypFW6BDJTIGSoWnW8+tB3OG+7X08/HxpC2Bwx+PdBo00rlugfFONoe438Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQhpq6d0Kz18Z for ; Wed, 27 May 2026 21:00:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2389a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 21:00:35 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 887841731be6 - main - ctl: Use CAM_PRIORITY_NORMAL for queued CCBs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 887841731be60a958e471b9fd79261169b67b7ad Auto-Submitted: auto-generated Date: Wed, 27 May 2026 21:00:35 +0000 Message-Id: <6a175b73.2389a.154600ac@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=887841731be60a958e471b9fd79261169b67b7ad commit 887841731be60a958e471b9fd79261169b67b7ad Author: John Baldwin AuthorDate: 2026-05-27 20:58:05 +0000 Commit: John Baldwin CommitDate: 2026-05-27 20:58:05 +0000 ctl: Use CAM_PRIORITY_NORMAL for queued CCBs Previously this was using CAM_PRIORITY_NONE which tripped over the assertion added in b4b166b8c46b8. PR: 293076 Reported by: Ken J. Thomson Reviewed by: imp Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D56995 --- sys/cam/ctl/scsi_ctl.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/cam/ctl/scsi_ctl.c b/sys/cam/ctl/scsi_ctl.c index 68f1cabf6d07..6a55aba2669b 100644 --- a/sys/cam/ctl/scsi_ctl.c +++ b/sys/cam/ctl/scsi_ctl.c @@ -522,7 +522,8 @@ ctlferegister(struct cam_periph *periph, void *arg) new_ccb->ccb_h.io_ptr = new_io; LIST_INSERT_HEAD(&softc->atio_list, &new_ccb->ccb_h, periph_links.le); - xpt_setup_ccb(&new_ccb->ccb_h, periph->path, CAM_PRIORITY_NONE); + xpt_setup_ccb(&new_ccb->ccb_h, periph->path, + CAM_PRIORITY_NORMAL); new_ccb->ccb_h.func_code = XPT_ACCEPT_TARGET_IO; new_ccb->ccb_h.cbfcnp = ctlfedone; new_ccb->ccb_h.flags |= CAM_UNLOCKED; @@ -569,7 +570,8 @@ ctlferegister(struct cam_periph *periph, void *arg) new_ccb->ccb_h.io_ptr = new_io; LIST_INSERT_HEAD(&softc->inot_list, &new_ccb->ccb_h, periph_links.le); - xpt_setup_ccb(&new_ccb->ccb_h, periph->path, CAM_PRIORITY_NONE); + xpt_setup_ccb(&new_ccb->ccb_h, periph->path, + CAM_PRIORITY_NORMAL); new_ccb->ccb_h.func_code = XPT_IMMEDIATE_NOTIFY; new_ccb->ccb_h.cbfcnp = ctlfedone; new_ccb->ccb_h.flags |= CAM_UNLOCKED; @@ -1003,7 +1005,7 @@ ctlfe_requeue_ccb(struct cam_periph *periph, union ccb *ccb, int unlock) * target/lun. Reset the target and LUN fields back to the wildcard * values before we send them back down to the SIM. */ - xpt_setup_ccb_flags(&ccb->ccb_h, periph->path, CAM_PRIORITY_NONE, + xpt_setup_ccb_flags(&ccb->ccb_h, periph->path, CAM_PRIORITY_NORMAL, ccb->ccb_h.flags); xpt_action(ccb); From nobody Wed May 27 21:12:53 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQj522171z6fhpP for ; Wed, 27 May 2026 21:12:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQj515TYdz3S4F for ; Wed, 27 May 2026 21:12:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779916373; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L+nqS+KqaHrmztOrxSqjqngmFIqME2czJ+Z9O/kMU0I=; b=AJztgp0wGD6QiNuDVciOSQH9lQ3DFVx5YuhKzbRssmzawP/kQP1oSdF/Ps/c7ImBord5EE EyJeA73OB16jeQMOKbfTYGnN8qok1a3oYeILo9/9kuEmWgGPBpX9eN++9a/CXIH/D3+cqB Ff63DeQKZLx5HSdUOHsg3lSTG5SArSLu+8FqDO/R5tAJ0eC03754Srzst4a0LPVdEMN502 LP9ED/z0YM99/p6NiNeC65eo4Km0WW9y6OlzONMnpbAg1cFozuKA+6CjQU2PvKlQ2zifLp quCXcNAkp8PYhTXkL8XqbTxwS67laJrdj+AnYsKDFedtfoy6MoHQGPCcO9yEKQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779916373; a=rsa-sha256; cv=none; b=YzemT4wdJdzGnrlzdGVHuAH3jEF+N9lbwJ8YH8alQSo/qgLhfQgWvhajcg1j30yp6sv5KV K7UCg7rTORGLmgnf9yoj27YehCIEm/FYRVw/3aE3OMwdiDZm+eQ2LnbRw3JA7w3iXHaz4y k6J4pcfkeWykDSa0j02dpOB6hspvJ0claN6pxoUzzCaJ7HQPryIfz+vmM/yqhFA69FDguk lh5KE/J+qaiug9Kj23LYRV2vm8nJE2142Rpfu9hgl/XcY3qTyq5cA2Fmb7eafHLvyLLusc s+OQqqLOFoVBHmZEC/+Vjte8+NCBCwCeA1GmS9ISz48So7nkN6C021hRzmWb4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779916373; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L+nqS+KqaHrmztOrxSqjqngmFIqME2czJ+Z9O/kMU0I=; b=xlE/sG2GZoKDBcnRB+6dC/ib3j6K9Us4FEon5EoZCISfapUd02TpD9LnUVO8/yZkwL9ecn C7SKSNtKF86k1k3APDG7ZNFbX/A9vgh122k36ZLn2TuDPp4zlUr1i74XdjFl+pKNJWm8ku 0JM2+hDMrR0idSUnp7Ah8LZJTBAVc3Ujq8hLyohxdDPisgt8tHh81hH8oqWjmKSK7lm2dX +pcrwuVaMPrp6da+WR4HONGFvzeO0omO13V/faClBxKhnTZzuza3l+o4k+reVNdwPulGXq yBcOHKZ7I11Kl1qRjf0d/MFsXdqKJw68v0724uJcbwSZh7Qeh9RXScObf3qApQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQj514mtbz1Rq for ; Wed, 27 May 2026 21:12:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 24294 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 21:12:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 0beb17289849 - main - ucode: Fix validation on Intel platforms List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0beb172898499fff51eed4df3d9284cd1094afbb Auto-Submitted: auto-generated Date: Wed, 27 May 2026 21:12:53 +0000 Message-Id: <6a175e55.24294.94fa17d@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=0beb172898499fff51eed4df3d9284cd1094afbb commit 0beb172898499fff51eed4df3d9284cd1094afbb Author: Mark Johnston AuthorDate: 2026-05-27 20:18:05 +0000 Commit: Mark Johnston CommitDate: 2026-05-27 21:12:35 +0000 ucode: Fix validation on Intel platforms The check for the extended signature table was backwards, so we always ignored it. We should verify that the extended signature table fits within the total image size. Reviewed by: jrm, kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D57209 --- sys/x86/x86/ucode.c | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/sys/x86/x86/ucode.c b/sys/x86/x86/ucode.c index 72133de211f8..2e996331dd2e 100644 --- a/sys/x86/x86/ucode.c +++ b/sys/x86/x86/ucode.c @@ -204,7 +204,6 @@ ucode_intel_match(const uint8_t *data, size_t *len) uint64_t platformid; size_t resid; uint32_t data_size, flags, regs[4], sig, total_size; - int i; do_cpuid(1, regs); sig = regs[0]; @@ -226,19 +225,35 @@ ucode_intel_match(const uint8_t *data, size_t *len) if (total_size == 0) total_size = UCODE_INTEL_DEFAULT_DATA_SIZE + sizeof(struct ucode_intel_header); - if (data_size > total_size + sizeof(struct ucode_intel_header)) + + if (total_size > data_size + sizeof(struct ucode_intel_header)) table = (const struct ucode_intel_extsig_table *) ((const uint8_t *)(hdr + 1) + data_size); else table = NULL; - if (hdr->processor_signature == sig) { - if ((hdr->processor_flags & flags) != 0) { - *len = data_size; - return (hdr + 1); + if (hdr->processor_signature == sig && + (hdr->processor_flags & flags) != 0) { + *len = data_size; + return (hdr + 1); + } + if (table != NULL) { + size_t extsize; + + extsize = total_size - + (data_size + sizeof(struct ucode_intel_header)); + if (extsize < sizeof(struct ucode_intel_extsig_table)) { + ucode_error = VERIFICATION_FAILED; + break; } - } else if (table != NULL) { - for (i = 0; i < table->signature_count; i++) { + extsize -= sizeof(struct ucode_intel_extsig_table); + for (uint32_t i = 0; i < table->signature_count; i++) { + if (extsize < sizeof(struct ucode_intel_extsig)) { + ucode_error = VERIFICATION_FAILED; + goto out; + } + extsize -= sizeof(struct ucode_intel_extsig); + entry = &table->entries[i]; if (entry->processor_signature == sig && (entry->processor_flags & flags) != 0) { @@ -248,6 +263,7 @@ ucode_intel_match(const uint8_t *data, size_t *len) } } } +out: return (NULL); } From nobody Wed May 27 21:12:54 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQj533fpfz6fhL2 for ; Wed, 27 May 2026 21:12:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQj5307vwz3S4G for ; Wed, 27 May 2026 21:12:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779916375; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bEq9KidXlS0K8VboRlfi+t5y1fcgIARPSKD40W2FX8c=; b=dvMnAEaEelR3Xwqp7uvhcLWQh13zZai7N5Tx8wjwSDktg6C59eCmSlrtTYQDQRfuTNSnqa yzhgBx+JxzrKeB1qdNZc1ND23NC/17/xB4zQSgOBosFfOJhyyn7ciA5D970+tvEM9La/gD IewBaR8+fsTFaD3Irwl/PA8INA7DiOEw7ZRrg1NVcVNtkCH9cG9W3D2Uo86ZnNIPmF2fnd mETB1YCaCqQWk+Kwz79LfRGjY6ugzTkZjQOj+YOPbzZ9NlBDxqYei02LZbq2ZK+xZ5hyuw lqde6NrFj4GAAcpzVHcP1uuWcL2K1eXvoqwxM9BbIEsDSsmm8EEWd0ClB3MRYA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779916375; a=rsa-sha256; cv=none; b=saDkiIRvb1oKD7T09Pn2jrZz5I4wCNhzJI7QCoEvZwEA+k2qTg6q0e2wQcl0QQ2RvbXPAh rUn56zopKc9InA+7+8cpIulWYLaIB8YNSBX8bTt0mbRDtoriiCfBuN/n7VRS7R1icwJCa+ Izyt7TJ15yBxAo2uZPaFHlCPLp/AlqCxlVCIVek0Pz8qAjdS8p7oC8OrkTjBjL6y38t9ZB PIuAeRef6OPLbyhTK5A5vocYdRie5CRBqw2LSE22SX2l5MFvZMf/6YQn4sV0pwWsN6l5zB Fs6Z8kZn0lQVRdnzgVCAEPPNUeJpphnTuLojHYNsjHn72LA5bmXJISpv33vVyA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779916375; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bEq9KidXlS0K8VboRlfi+t5y1fcgIARPSKD40W2FX8c=; b=W6WTHxwZw/MwpA62Ml5onC8t1DeUNhb04KEqstFK0L9pdazRa2+m9GN0ZbKH8q1rfeqAzV FwA7n7wdu/t10eQb/Gm317Y4xBj6Gnezr2xStmiB0ASAZIKRUfhgnIMDdxk4Ld49Vu5DaW 1ueIyFnrLyjEmAljQHLnulP2uM1Itly7tIVH6cr6DK8qweNCJknO7blXIG9YATgHbi6B1n jf/kf8mcY2WPwU7RTQfb3Tlaiv/M2k749VG+7xG5dkgEoDiv3yPgGLxkBzRk3agw4ISYOG uRPZaepa8ZbFdL5wb3EMcBNz8ZzCP+xdZaAfR+JjShpVFkWrm+eoABW1W2lzCg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQj525YDMz26D for ; Wed, 27 May 2026 21:12:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 245a9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 21:12:54 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 96256587b06c - main - ucode: ucode_error can be defined with static List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 96256587b06cfcdbeb1789145f5e427831b3d732 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 21:12:54 +0000 Message-Id: <6a175e56.245a9.3038e1cf@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=96256587b06cfcdbeb1789145f5e427831b3d732 commit 96256587b06cfcdbeb1789145f5e427831b3d732 Author: Mark Johnston AuthorDate: 2026-05-27 20:41:15 +0000 Commit: Mark Johnston CommitDate: 2026-05-27 21:12:35 +0000 ucode: ucode_error can be defined with static MFC after: 1 week --- sys/x86/x86/ucode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/x86/x86/ucode.c b/sys/x86/x86/ucode.c index 2e996331dd2e..3d7008eb30f2 100644 --- a/sys/x86/x86/ucode.c +++ b/sys/x86/x86/ucode.c @@ -80,7 +80,7 @@ static const void *ucode_data; static struct ucode_ops *ucode_loader; /* Variables used for reporting success or failure. */ -enum { +static enum { NO_ERROR, NO_MATCH, VERIFICATION_FAILED, From nobody Wed May 27 21:42:09 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQjkn56QFz6fkTb for ; Wed, 27 May 2026 21:42: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQjkn3D85z3XHh for ; Wed, 27 May 2026 21:42:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779918129; 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=rWm+gPoH5St10AxElM8H6N4pgvPe0ODq43Bw4Xs61I8=; b=xp0pyzEAp1roSyMchBIzP5T1WemgSKxGN5W13D+ViDvCZsGFN0AwJK3RxHItqmb01mwdyf /xyXK6COZJIKK4yEX6+K8es3fNJwp/ooEUFcqIyM7yhWZBmzbuM4degnMk7QK+KieF5Nd6 l8NL2UpkUdodiMx5vO01lNJ1pkkkINJC0cTfaUOptG+UxXDQlcfWRBOAtFCGAp88CZAc6n 5u1pvHTLvNdzNEiAP/uJ5tQEodBViKjfbNTyEDAlt6oThIwKPKSLfDiVSDV3UtPqh0Tcue 7crvL4NRu/swZ/dU4yEElMzVzi08/YbNgSl9dTihUQyi9Vnh8GdGhTfwjuH1mw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779918129; a=rsa-sha256; cv=none; b=KGQmSN+QFF2la2X7XsNvh0ZtwZklZNAGhi9PqdbGuN995cmKS9P7wmz7WGpNjKu7i6rMRd t1zgNDPl6YwZZnKnir2Bp1ZYVYTZBrZKVCcjl+c0qm850zsZ6cEVZmBGi9AiRxnZeVxLEQ T4UQE9CSf/qrk/btYoO2/snY9XE5AwZaN/T4eCKAMLpwyLLBMb4mKRn3Sg2DTo/bxdgbqH ft5uqK6dYUU+25AJeXcf/BHPV0OmW2w65UgJRjQA0MGsEtx9ERyyZhIqWZ8xBLSY9qsiNy RD1wROICbCUkv74Jn65vN+LgeTbwK5DRPlWQ4ZoeCChj9PVP9S5ZXqBKlIB2xA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779918129; 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=rWm+gPoH5St10AxElM8H6N4pgvPe0ODq43Bw4Xs61I8=; b=GDFx5gch/J3O+JBqnpGTYIbcgmcGKx6tzOSveihj3ijXBTA13uu5LMk0WVwzDy0lED5zKr deMgIpPj+Iu5vmLmIPYx3JQ1PgTdL541Ywxt1PWdupWFSpAI7ZLiuOfpaOUDnR6GG70Laq 3aTwXmtLbAbjHeaZvIEyYgZHxNDlYq9m7BhJNG7CBhGTDcDJlgViJK7PPSGuJvE0V89129 ND8ousFM9Lss5FnpGoPdidh2payQGB8GHLmfrKOLRIPrmclZl5D1RxQiDkxdbLsNjov3EK 6yn0DoLTnsAYkzdnTnhkvMxmr+ML2a15UU4q45szp5hu1ar2fLnG0AcgDzi0xQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQjkn2Ht1z2bS for ; Wed, 27 May 2026 21:42:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2720f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 21:42:09 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Alex Richardson From: Dimitry Andric Subject: git: 4d8f612e5b26 - stable/15 - if_ovpn.c: fix use of uninitialized variable List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 4d8f612e5b26469732252b7f727acd9e0271f6a6 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 21:42:09 +0000 Message-Id: <6a176531.2720f.463f82a7@gitrepo.freebsd.org> The branch stable/15 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=4d8f612e5b26469732252b7f727acd9e0271f6a6 commit 4d8f612e5b26469732252b7f727acd9e0271f6a6 Author: Alex Richardson AuthorDate: 2025-09-15 22:08:43 +0000 Commit: Dimitry Andric CommitDate: 2026-05-27 21:41:03 +0000 if_ovpn.c: fix use of uninitialized variable In case we use OVPN_CIPHER_ALG_NONE, the memcpy will attempt to copy 0 bytes from an uninitialized pointer. While the memcpy() implementation will treat this as a no-op and not actually dereferece the undefined variable it is still undefined behaviour to the compiler and should be fixed. Found by building with clang HEAD Reviewed by: kp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52543 (cherry picked from commit 969be39fb3caf4272f128dbf3267ceba5966a6ce) --- sys/net/if_ovpn.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/net/if_ovpn.c b/sys/net/if_ovpn.c index 99c99369d22a..7c416055e939 100644 --- a/sys/net/if_ovpn.c +++ b/sys/net/if_ovpn.c @@ -914,9 +914,11 @@ ovpn_create_kkey_dir(struct ovpn_kkey_dir **kdirp, kdir->cipher = cipher; kdir->keylen = keylen; kdir->tx_seq = 1; - memcpy(kdir->key, key, keylen); + if (keylen != 0) + memcpy(kdir->key, key, keylen); kdir->noncelen = ivlen; - memcpy(kdir->nonce, iv, ivlen); + if (ivlen != 0) + memcpy(kdir->nonce, iv, ivlen); if (kdir->cipher != OVPN_CIPHER_ALG_NONE) { /* Crypto init */ From nobody Wed May 27 21:42:10 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQjkp5wyXz6fkQl for ; Wed, 27 May 2026 21:42: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQjkp3K9tz3X4k for ; Wed, 27 May 2026 21:42:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779918130; 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=Qt7a4zGEUYD1Jtb9f4W/NzSc9T961xAIL2N4HUa+zYY=; b=uoGmUYLS8qYztNL3BNY7Vl1251JvVFhPG6EQKqj+vlhf6ZodU5giuIBnRqjyH2v4HLfWQe GdujoGGRcvm9K0ywmlQ9qzbmkM8ojz8LT7JwJKi4RyB3xo/OQMdqyPi0lEyFJqp3FOC5Ku yKE3AuR++kG0DanRcNrpr85R1eHrQhRW8S7BFrOCTuK+Uvyb7mZwyKCZO3WG9PfbptOqSE RRbRIRezdDp4nfBcvOJIgeAVe7kPjG8BejKqfLvB27km+OiWdmlf2OOOebAolBDqSecRLk Dlq6veryS3CnB7oiejg0DmHXs4v00dqu+K8yvbNWFkYH70MhrpfVmEMdcRaMSw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779918130; a=rsa-sha256; cv=none; b=Mbta7q1oHybVZWjGygH/3dMTbAN3nptTH7p/4SprXqCVei/xMBTdww3xA0RNYFRFqgrZBo RGKMYIYj6Y79WwIjAQOfNh76V3pkwr3yhrbHTsDuvvogYaLPyVJd1kW24VZPFP4nZlL9lg drGMmr8k9177GvF5crol3OSlt0DN3T+FM6XApq9Xy1lOUqIrhaDSPFJP/OeEhIeBtmqNe6 gR6TvIGTeOP5VaaV8DG/4TcJZkocYSNBezPvkTifHPxe+NwNVZhqS9y+kzu9ZLWNSHKSPn ocsKkBSTt8o/9I3G64s1yviLpbO62vO9nHI8YsuqDSX2w3xR6uYsIquYhmO3xw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779918130; 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=Qt7a4zGEUYD1Jtb9f4W/NzSc9T961xAIL2N4HUa+zYY=; b=w+n2DgnTC37ZWCY8emi51wCc/4Q7+SG9zkPHG9YW9WBtFd0Jbp/8ITXLvT3ehP0cIJ3LfI Dbbhmun9mLg8/CpFthlht/kGIh+qUHHjmK+FGBOWVNZX9jQwqiYdlXv8y27me4NmrNxgT+ BxcP/2Og24s47Z9AhpiihnuQZ9idSf+NPaa6AO7J/Ezo/CVGNEQ07Z1vfpAC0ht2nUxuUA FyJ0O4OVYylwEtno4Vj3ofHYWZfyckzKaLLkIa4wszLpbdbFFW5BXrCUiWZCOe7tQi7EhH 8zRno+6kh2REWTC7VA6KA6Nn7dWTT5QlgTWWUHyrxKBCHfL6PwjICWRGgwfCaA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQjkp2g1sz2Ys for ; Wed, 27 May 2026 21:42:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26c3f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 21:42:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Alex Richardson From: Dimitry Andric Subject: git: 3c3a20199ac9 - stable/15 - netmap: silence -Wdefault-const-init-field-unsafe warning List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 3c3a20199ac9ef10f2bd90c0bd6e1c862578ab0d Auto-Submitted: auto-generated Date: Wed, 27 May 2026 21:42:10 +0000 Message-Id: <6a176532.26c3f.16053612@gitrepo.freebsd.org> The branch stable/15 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=3c3a20199ac9ef10f2bd90c0bd6e1c862578ab0d commit 3c3a20199ac9ef10f2bd90c0bd6e1c862578ab0d Author: Alex Richardson AuthorDate: 2025-12-16 18:09:57 +0000 Commit: Dimitry Andric CommitDate: 2026-05-27 21:41:03 +0000 netmap: silence -Wdefault-const-init-field-unsafe warning The netmap_ring struct starts with various const members and rencent clang warns about leaving them uninitialized. Having them const in the first place is highly suspicious since they are updated with various macros but using hand-coded __DECONST(). But fixing that is a more invasive change that I am unable to test. ``` .../freebsd/sys/dev/netmap/netmap_kloop.c:320:21: error: default initialization of an object of type 'struct netmap_ring' with const member leaves the object uninitialized [-Werror,-Wdefault-const-init-field-unsafe] 320 | struct netmap_ring shadow_ring; /* shadow copy of the netmap_ring */ | ^ .../freebsd/sys/net/netmap.h:290:16: note: member 'buf_ofs' declared 'const' here 290 | const int64_t buf_ofs; | ^ ``` Test Plan: Compiles Reviewed by: vmaffione, jhb MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52568 (cherry picked from commit 2ed21f90906b230476d3f12ff9dce0e2c4642af2) --- sys/dev/netmap/netmap_kloop.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/dev/netmap/netmap_kloop.c b/sys/dev/netmap/netmap_kloop.c index ba9e67076e72..ac3ca2d8d21f 100644 --- a/sys/dev/netmap/netmap_kloop.c +++ b/sys/dev/netmap/netmap_kloop.c @@ -161,7 +161,8 @@ netmap_sync_kloop_tx_ring(const struct sync_kloop_ring_args *a) struct netmap_kring *kring = a->kring; struct nm_csb_atok *csb_atok = a->csb_atok; struct nm_csb_ktoa *csb_ktoa = a->csb_ktoa; - struct netmap_ring shadow_ring; /* shadow copy of the netmap_ring */ + /* shadow copy of the netmap_ring */ + struct netmap_ring shadow_ring = {0}; #ifdef SYNC_KLOOP_POLL bool more_txspace = false; #endif /* SYNC_KLOOP_POLL */ @@ -317,7 +318,8 @@ netmap_sync_kloop_rx_ring(const struct sync_kloop_ring_args *a) struct netmap_kring *kring = a->kring; struct nm_csb_atok *csb_atok = a->csb_atok; struct nm_csb_ktoa *csb_ktoa = a->csb_ktoa; - struct netmap_ring shadow_ring; /* shadow copy of the netmap_ring */ + /* shadow copy of the netmap_ring */ + struct netmap_ring shadow_ring = {0}; int dry_cycles = 0; #ifdef SYNC_KLOOP_POLL bool some_recvd = false; From nobody Wed May 27 21:46:38 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQjqz13kfz6fkxD for ; Wed, 27 May 2026 21:46: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQjqy5ZF1z3Y52 for ; Wed, 27 May 2026 21:46:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779918398; 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=tymeJnaUKMxAJdvwHL3ZHJBdTnCKWrB1q/qYm8pPedA=; b=Pu9C95asOsM+EPOu5kIWkidGrxPH6Dvy2i+URgG7A+NgBjrEaEBLxJE6rIzTSK2TrzrSEK QD8xnFEW3vh+Jz0Hebe7LhH59d3+65gVPbioakDAXf8PKUTgU7xTF2dRk9VTRnyeSLC9XG rpfh7/3nqbEOru1tzeWWZs93ECqzK1b6wxHdSFLhgr6fg2rek7bZDXvmgYgs0NYpym13d8 Z4gKzkSHT3frLmGSv5iuD1n3ix/T9h29D1NBP2l0I23dzpZev4pXToAedg10f3sTN5QR2M bdM403Bk1SWvwz81WaSXwTTJh/6wiRM09X2J+DaGcp1mnDjJ2apqcB/Ou61W5g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779918398; a=rsa-sha256; cv=none; b=A1nhiEe/ILgqnDpZPKqrt/ex4aq57OC9fB8/+cB37maYvYsA8R3pnPuwcsPOZUpNPGYn+N nad/K9hyV3nsXPNVyh+gemTGlde49/VIk1wQ5wTAz7iqnk8XgToUc7HTEarCILtM73L33H wsKJAHwQRUSUdnrBPXbBI2Bnh00dUuFQTpnNieiC6IEb1IhgzFSMo2y/3lg7Y4RjvxuB32 u9g6OXEOhDOHtYlxcLOeRs25mZSqCGa09fgwJggieylBVhXLdeAGrHssgVlf0gshWn0dHZ SbOwJmGS6gkIvTXDgd99zJZvhnoRSpT8TRjZqiNneEaJJTQGX3im+P3qsKfbEw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779918398; 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=tymeJnaUKMxAJdvwHL3ZHJBdTnCKWrB1q/qYm8pPedA=; b=DBB8CPv0wzoOkT0y4a55Y4WdjF/wMjsexDKVO285Sn7+ALOJorqGfe+cohT2BNCWg4A1r1 a4/4HuFZ8w6hqcWCQ0xje/OT9MPn/KsMhK9XFigVVD9uLGzpriQOHf27DiNYE49s6ynK+c JT7A4bdgS5CqA3BsIoWk7Jp+pVC0HsjiAjzZOuqWdHCeHEIGfnnLwVuBtfdNghhA8J5kE1 aBzlWBDilvzjD9eHEJlsO/xnz5SCr66o4M/+KdnHyGXvSYLeyo2/CsmBaKrNHkE/1FZolS C0TS/DHysBkCyK0QQtVA8Z5dOoWSXHlmS0O/J+Cb20JrgU6Gx7ptfLkh39OOfQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQjqy4tYRz2dx for ; Wed, 27 May 2026 21:46:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27286 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 21:46:38 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Alex Richardson From: Dimitry Andric Subject: git: 5d64055eaaf2 - stable/14 - netmap: silence -Wdefault-const-init-field-unsafe warning List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 5d64055eaaf259ccb72a785bf5c2297e87dfa103 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 21:46:38 +0000 Message-Id: <6a17663e.27286.165b89e7@gitrepo.freebsd.org> The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=5d64055eaaf259ccb72a785bf5c2297e87dfa103 commit 5d64055eaaf259ccb72a785bf5c2297e87dfa103 Author: Alex Richardson AuthorDate: 2025-12-16 18:09:57 +0000 Commit: Dimitry Andric CommitDate: 2026-05-27 21:41:14 +0000 netmap: silence -Wdefault-const-init-field-unsafe warning The netmap_ring struct starts with various const members and rencent clang warns about leaving them uninitialized. Having them const in the first place is highly suspicious since they are updated with various macros but using hand-coded __DECONST(). But fixing that is a more invasive change that I am unable to test. ``` .../freebsd/sys/dev/netmap/netmap_kloop.c:320:21: error: default initialization of an object of type 'struct netmap_ring' with const member leaves the object uninitialized [-Werror,-Wdefault-const-init-field-unsafe] 320 | struct netmap_ring shadow_ring; /* shadow copy of the netmap_ring */ | ^ .../freebsd/sys/net/netmap.h:290:16: note: member 'buf_ofs' declared 'const' here 290 | const int64_t buf_ofs; | ^ ``` Test Plan: Compiles Reviewed by: vmaffione, jhb MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52568 (cherry picked from commit 2ed21f90906b230476d3f12ff9dce0e2c4642af2) --- sys/dev/netmap/netmap_kloop.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/dev/netmap/netmap_kloop.c b/sys/dev/netmap/netmap_kloop.c index 005b9af2a3da..65c4fd89e0d5 100644 --- a/sys/dev/netmap/netmap_kloop.c +++ b/sys/dev/netmap/netmap_kloop.c @@ -161,7 +161,8 @@ netmap_sync_kloop_tx_ring(const struct sync_kloop_ring_args *a) struct netmap_kring *kring = a->kring; struct nm_csb_atok *csb_atok = a->csb_atok; struct nm_csb_ktoa *csb_ktoa = a->csb_ktoa; - struct netmap_ring shadow_ring; /* shadow copy of the netmap_ring */ + /* shadow copy of the netmap_ring */ + struct netmap_ring shadow_ring = {0}; #ifdef SYNC_KLOOP_POLL bool more_txspace = false; #endif /* SYNC_KLOOP_POLL */ @@ -317,7 +318,8 @@ netmap_sync_kloop_rx_ring(const struct sync_kloop_ring_args *a) struct netmap_kring *kring = a->kring; struct nm_csb_atok *csb_atok = a->csb_atok; struct nm_csb_ktoa *csb_ktoa = a->csb_ktoa; - struct netmap_ring shadow_ring; /* shadow copy of the netmap_ring */ + /* shadow copy of the netmap_ring */ + struct netmap_ring shadow_ring = {0}; int dry_cycles = 0; #ifdef SYNC_KLOOP_POLL bool some_recvd = false; From nobody Wed May 27 21:46:37 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQjr26C4wz6fknS for ; Wed, 27 May 2026 21:46: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQjr25Ns9z3YDj for ; Wed, 27 May 2026 21:46:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779918402; 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=WVX26dXCXCw76SIapqWnxWdvEgdy7SsyIvV9rNFn+UE=; b=hu4B+dfr5vNH8iJVyO2mEkskYSp1X+hjhnH7sLQoqy+/pc4QqLipqltFgMiozWUGdLFHEh WvOFHNWSGfgVN3w2+MOcJEUM/+wXOEYbAwwc4+9+NuAsMwZvbmXsVHik3qVcyZETW3QIm6 5XB5VUUVyWd5IEvLsRcg1ks7u3Zn+ALmd5sFLimP/cDxCFInOgS7JXQXyNA6QpdTd0kUwt 9MJ0xOOuJWi4UVuwtNfRENGQfkxeqau7nE/qgPXxatJKyPjxnZRahAFT1miRNv5q666HON AvcsmyqGZbMaq6cPDwAH7gAvsVKi5hVl5tAaVAwwjVBBGGDL8Lxfjg7FE1Mlng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779918402; a=rsa-sha256; cv=none; b=M0HIwKOmaT63H+3isDuQH20eCOxV0XrOmZmEffImWpo5oOz02uQb0YsbK4iQOG4UYT/rKz CRZxP1uY/gJ+NI+7EEf1sqJ8G6sDfcJ44uaeaULs7M0iDminH1nzhvaJFUNsV1BhevQNro 90AETHR+2IQMRiQvFjyyBu5XJnvO2Bx8bRa6lCiVr80Tf9ZOKd3CaMr5wx7qHKLgQbzSJ3 pX7bz9VUKttFbVmSPwF2ci4NhqwyUt7ROhIqvKTAPKB0AXG3/+NjvPPjt6NOARAycfhw+u c/Pm+BgP9LXyrFGhP4DGB3pAxo2Mf7J9+VhmWqYi8lkeKZs/gn59uSCzO5furw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779918402; 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=WVX26dXCXCw76SIapqWnxWdvEgdy7SsyIvV9rNFn+UE=; b=kT3cPy98BVx71SozTA7doUcl7uPMgk35iF4uKAX2xSi98EZRG+U7MB81w4Dc0NwdVOLSlm 45KweKTJv6DNxt2Nfwh8brSgc1Z9J9dr6SEtIMJwdAcpcXuO5l7WckVnx1dHZ2COS8Ooe/ yr3xstAzgskBBn7rVnv1WCSqT4pIYe7ss3lqLcXjgO1TDGhbeUhDvIxXERiYb0CL7uTdnB OTC7fBuhz+2qOftCSZBvb/BebC8n91e16V11TuSPc8t1JYJkIHQ3snHdfy/xE+SskXU0K4 0RTRLKdculB0xc6uzznY3wWucghrPm1X8Kq3bUoz0wqHXPkEeC0zTg7dwRxX0A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQjr24nQKz2r5 for ; Wed, 27 May 2026 21:46:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 252f7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 21:46:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Alex Richardson From: Dimitry Andric Subject: git: 1ebf5f54ada8 - stable/14 - if_ovpn.c: fix use of uninitialized variable List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 1ebf5f54ada8a35c736a16ea07fb2057021c0e65 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 21:46:37 +0000 Message-Id: <6a17663d.252f7.4783dada@gitrepo.freebsd.org> The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=1ebf5f54ada8a35c736a16ea07fb2057021c0e65 commit 1ebf5f54ada8a35c736a16ea07fb2057021c0e65 Author: Alex Richardson AuthorDate: 2025-09-15 22:08:43 +0000 Commit: Dimitry Andric CommitDate: 2026-05-27 21:41:13 +0000 if_ovpn.c: fix use of uninitialized variable In case we use OVPN_CIPHER_ALG_NONE, the memcpy will attempt to copy 0 bytes from an uninitialized pointer. While the memcpy() implementation will treat this as a no-op and not actually dereferece the undefined variable it is still undefined behaviour to the compiler and should be fixed. Found by building with clang HEAD Reviewed by: kp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52543 (cherry picked from commit 969be39fb3caf4272f128dbf3267ceba5966a6ce) --- sys/net/if_ovpn.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/net/if_ovpn.c b/sys/net/if_ovpn.c index 1037154f26b5..3a04249ec554 100644 --- a/sys/net/if_ovpn.c +++ b/sys/net/if_ovpn.c @@ -951,9 +951,11 @@ ovpn_create_kkey_dir(struct ovpn_kkey_dir **kdirp, kdir->cipher = cipher; kdir->keylen = keylen; kdir->tx_seq = 1; - memcpy(kdir->key, key, keylen); + if (keylen != 0) + memcpy(kdir->key, key, keylen); kdir->noncelen = ivlen; - memcpy(kdir->nonce, iv, ivlen); + if (ivlen != 0) + memcpy(kdir->nonce, iv, ivlen); if (kdir->cipher != OVPN_CIPHER_ALG_NONE) { /* Crypto init */ From nobody Wed May 27 22:09:33 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQkLV74lkz6fmBJ for ; Wed, 27 May 2026 22:09: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQkLV6SFvz3br1 for ; Wed, 27 May 2026 22:09:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779919778; 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=4dUoqWEiAs2281yQsVd8SvLx8JXeGay6dZ+s3sDN3hU=; b=HZao5VSdNosDSlziv50nGXSs0AujKpx8GLTPUTJ+BFqauN79l/XhyV45jmo7oyzzkTMCDS DRXT/ZjxQMlBDNBOv2/9adCJZ2gVAr6HXr5K5B9NzY/wAJZ/K9eHGiZRI3PjWpTgOi1gym D9MQKerBD2j1JmTrTn1cdOqpTYBB/xc04D0Oq7c0sjOdApeyY9uraOz0hLXGl8gX90x8Yq zL7udH5YqiKdHBlBAg4yWnblxBd8pG9ZGzuTlHsvJJ/R72O3xw7EefB41zKk39rIGJ4Me8 TInOTwWyneNjtJSY1IsSmkewOD+6n5b5V7lY4TBnROQaJhz3kz0uPPVi6VdC1Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779919778; a=rsa-sha256; cv=none; b=NyijQwqbhqi66ZlJWDZiAZ+EYQBkJyC7wDlz8U+Mgc2lusYOTbqaxYFUV0GQ5PNETm+e3m L9Irt7cL4s9UFLWRLeMOFI4TuumP3LTqQg1Y1BdjeZjF9Y1Cd+mO0q10vIFUj4dZ5sSW/c 8u8dkWkcl+ora/OITHt+fgfUiCfB3eXUsInctchMSXKNYtJ8j+D6sU0syQAJD9E28t8I7i HJLtE34tnZga99GIwo2DM960dgZYFhsmO0yXPdR2xZxrMBFECRKzsx9xjgqEtUpB0P1BFn 6COu5O9tU5AA6ogIf4C+YEEHmjDIVdV+2jLTzaaiarDALIhOUahPbwP9aNm+Tw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779919778; 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=4dUoqWEiAs2281yQsVd8SvLx8JXeGay6dZ+s3sDN3hU=; b=NiP56fsn8ti/NeajkUaQiqBlen90IBekkcvEulQDrJRJMaS3Tq6sbQqAXpF04YGVP7tqQB 0TZc/5J3y41zDq9B1yr2+EGcMKuVlbBc9qfVkmc5P7WX/fcEoK3GQIIA/Rg5fYqpy9fMOw B0qTY0nRrwCHsdMk4UV3VS3+3wt1a5I1zAGUshLXEJpt5Z9hqReZ4nE0nWdimjJ6pfUrWc EMQBEHNC++Gpqb33lmhqMWXjOW0aMolImpNAME/6nlk84BiuNAIdlaneQIEI3JHX6EH5ZI ALBP2LLKCMe0Ipa+NOE6THSsv67x8sxKQ+lf4a13dxc2fLW3e04PODxM0unr6w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQkLV5q6qz3HJ for ; Wed, 27 May 2026 22:09:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 32083 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 22:09:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: tzyt From: Enji Cooper Subject: git: 2018defe9b98 - stable/15 - syslogd: Fix ereregex property filters and add test List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 2018defe9b98a378dbc98ab53c8d000e922fe0b8 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 22:09:33 +0000 Message-Id: <6a176b9d.32083.39c9068f@gitrepo.freebsd.org> The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=2018defe9b98a378dbc98ab53c8d000e922fe0b8 commit 2018defe9b98a378dbc98ab53c8d000e922fe0b8 Author: tzyt AuthorDate: 2026-03-22 08:40:57 +0000 Commit: Enji Cooper CommitDate: 2026-05-27 22:09:07 +0000 syslogd: Fix ereregex property filters and add test This change fixes Bug 293879, where ereregex filters in syslogd did not handle alternation correctly. The issue appears to come from mixing up two different kinds of flags: syslogd's internal serialized filter flags in usr.sbin/syslogd/syslogd.h, and the regex compilation flags from include/regex.h. ereregex was storing REG_EXTENDED in cmp_flags, even though cmp_flags is meant to carry syslogd's own FILT_FLAG_* values for configuration serialization and reconstruction. REG_EXTENDED has the same bit value as FILT_FLAG_EXCLUDE, so the filter could be reconstructed with the wrong semantics. The fix stores FILT_FLAG_EXTENDED instead, allowing syslogd to correctly REG_EXTENDED when compiling the regex. A test was also added for both ereregex and !ereregex filters. PR: 293879 Signed-off-by: tzyt Fixes: 2567168dc4986 MFC after: 1 week Reviewed-by: markj, ngie Pull-Request: https://github.com/freebsd/freebsd-src/pull/2088 (cherry picked from commit 69042706604752f42072f422671a72c49343ac45) --- usr.sbin/syslogd/syslogd.c | 2 +- usr.sbin/syslogd/tests/syslogd_test.sh | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index ee15fa70807d..3a446baf504b 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -2818,7 +2818,7 @@ prop_filter_compile(const char *cfilter) pfilter.cmp_type = FILT_CMP_REGEX; else if (strcasecmp(argv[1], "ereregex") == 0) { pfilter.cmp_type = FILT_CMP_REGEX; - pfilter.cmp_flags |= REG_EXTENDED; + pfilter.cmp_flags |= FILT_FLAG_EXTENDED; } else { dprintf("unknown cmp function"); goto error; diff --git a/usr.sbin/syslogd/tests/syslogd_test.sh b/usr.sbin/syslogd/tests/syslogd_test.sh index 1f235c476c49..253a26258959 100644 --- a/usr.sbin/syslogd/tests/syslogd_test.sh +++ b/usr.sbin/syslogd/tests/syslogd_test.sh @@ -238,6 +238,28 @@ prop_filter_body() syslogd_check_log_nomatch "prop1: FreeBSD" syslogd_check_log_nomatch "prop2: freebsd" syslogd_check_log "prop3: Solaris" + + printf ":msg,ereregex,\"substring1|substring2\"\nuser.debug\t${SYSLOGD_LOGFILE}\n" \ + > "${SYSLOGD_CONFIG}" + syslogd_reload + + syslogd_log -p user.debug -t "prop1" -h "${SYSLOGD_LOCAL_SOCKET}" "substring1" + syslogd_check_log "prop1: substring1" + syslogd_log -p user.debug -t "prop2" -h "${SYSLOGD_LOCAL_SOCKET}" "substring2" + syslogd_check_log "prop2: substring2" + syslogd_log -p user.debug -t "prop3" -h "${SYSLOGD_LOCAL_SOCKET}" "substring3" + syslogd_check_log_nomatch "prop3: substring3" + + printf ":msg,!ereregex,\"substring1|substring2\"\nuser.debug\t${SYSLOGD_LOGFILE}\n" \ + > "${SYSLOGD_CONFIG}" + syslogd_reload + + syslogd_log -p user.debug -t "prop1" -h "${SYSLOGD_LOCAL_SOCKET}" "substring1" + syslogd_check_log_nomatch "prop1: substring1" + syslogd_log -p user.debug -t "prop2" -h "${SYSLOGD_LOCAL_SOCKET}" "substring2" + syslogd_check_log_nomatch "prop2: substring2" + syslogd_log -p user.debug -t "prop3" -h "${SYSLOGD_LOCAL_SOCKET}" "substring3" + syslogd_check_log "prop3: substring3" } prop_filter_cleanup() { From nobody Wed May 27 22:59:06 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQlRb0CcKz6fqdK for ; Wed, 27 May 2026 22:59: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQlRZ59mpz3kdZ for ; Wed, 27 May 2026 22:59:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779922746; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aZtMGMtQUtzx9eK0Zl5otR11CqzVfLVbBpXBQObh5bU=; b=nY2Zt7QaBemQi1d0NIJK38QCvcJA0Kn3sLMbw3jat9LbFoLZiHrmxHdBD7yLcq3jUkCsDk 36OTYnkI+e0eLxs678HQeWsCl7ODGayQRmieWJ2L6SFt6K0ibidRtoM86+7nQtLVmbjjWc 2spBwWHGANN0C+LYhZb+y3UhAmOQrrS8CNAp93/qKIIEaE2SNi+FP55pdECRqBGzc9brHs HIB++HEpvxDQz3IL+CamdO8zdt+8EzhCnSpoaxqlB8gXxsdSeL+92s1KDbQjQdzoB8unN+ iOEd0/nOky4wtUekfx5IiM3fzUmIHfCjxRGQgtLK02cz0bAlQZSYk/BCX7l1HA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779922746; a=rsa-sha256; cv=none; b=K1rI92ATPE+JTPTPRwoAkhQIp1UxjA27VgPgvUsFdpLVdcKMVKINWI1VATXz+M9nabjp6C jPS7Mu+dksnwiJX8IZFfoQ7qpZF3wyx5sfqcQpaFwde8n23OWM3nD5EsV4Rr+E+B9J+ORO vjrKxQD3tsLfFv+ZzRnGmorxVQ4WBFeq8TrwFO10jlK0ft4LFRwwPvNmuVjiDjkeqAGZg5 Ac4SmPkdqpLSG1D70Q4bEOa01uJizPE5T0ALKEOKJq1/3A7BdbHpL1ifpyBvko6rbtIhs0 QImED3Ntlc3HqD3Dpmv9gCvrM4ssETWrSxCHNLSVOw6qzNzBOSrLZlgHingdIw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779922746; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aZtMGMtQUtzx9eK0Zl5otR11CqzVfLVbBpXBQObh5bU=; b=LohdspWhENtFYnpdKSzstaPG2QmaotW6AQJKTzOxboHjWkVSDUPlxruH6j10c9O/YSfPO6 P2FAw65JyhW6agdKAGoIOl1wMURPSvpTUeCLbzC927su4XXtx3TtPQSNve6L4CmGNJY9qH Ru5CzFXYoE56C5o0ZggAariVSyIK5z/TbY+BKDeobnubAerI54C6MWDcxlaY58zyP8xrqx pJly9NQpzmWyYmjwdKFrC4QsJ305qA1K1lD7P741kr6SEvKsu5cZ3yuSlP5SKEHe/YLJQc JB8HmCW5cXJI9IXp5Pg6rXErVg2oYa4ekA7YZNtO571gvz5OXXkTSKSL8DyeZQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQlRZ4X1Xz4fW for ; Wed, 27 May 2026 22:59:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 370a1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 22:59:06 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Aleksandr Rybalko Subject: git: 5a8e0e03ae86 - main - install: Bump compare size limit (128MB) to support large binaries List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ray X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5a8e0e03ae86b449f29626b4f9db25d17c89b273 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 22:59:06 +0000 Message-Id: <6a17773a.370a1.46119b52@gitrepo.freebsd.org> The branch main has been updated by ray: URL: https://cgit.FreeBSD.org/src/commit/?id=5a8e0e03ae86b449f29626b4f9db25d17c89b273 commit 5a8e0e03ae86b449f29626b4f9db25d17c89b273 Author: Aleksandr Rybalko AuthorDate: 2026-05-27 12:07:47 +0000 Commit: Aleksandr Rybalko CommitDate: 2026-05-27 22:55:57 +0000 install: Bump compare size limit (128MB) to support large binaries Preserve metadata and prevent redundant disk writes during builds with the install's -C (compare) flag. The previous historical comparison limit of 16MB is insufficient for modern toolchains, frequently choked or bypassed by a large base components like LLVM/Clang, kernels, Rust apps, and large runtime libraries. By leaving matching files alone, install keeps their modification timestamps intact. make(1) safely ignores those files on subsequent runs. Base examples: 15.0 amd64 GENERIC kernel - 28MB, clang - 105MB, lldb - 97MB, etc. Reviewed by: glebius Approved by: glebius (mentor) Obtained from: Fudo Security MFC after: 2 weeks Sponsored by: Fudo Security Differential Revision: https://reviews.freebsd.org/D57271 --- usr.bin/xinstall/xinstall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/xinstall/xinstall.c b/usr.bin/xinstall/xinstall.c index 611274d0af68..d389bdbe3737 100644 --- a/usr.bin/xinstall/xinstall.c +++ b/usr.bin/xinstall/xinstall.c @@ -88,7 +88,7 @@ #define HAVE_STRUCT_STAT_ST_FLAGS 0 #endif -#define MAX_CMP_SIZE (16 * 1024 * 1024) +#define MAX_CMP_SIZE (128 * 1024 * 1024) #define LN_ABSOLUTE 0x01 #define LN_RELATIVE 0x02 From nobody Wed May 27 22:59:05 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQlRh080Fz6fqV9 for ; Wed, 27 May 2026 22:59: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQlRg0qcsz3kqM for ; Wed, 27 May 2026 22:59:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779922751; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mAEwckJTQOGE4Zk5oBN5gzIVgWY7B9L7wAvtu3VDXcQ=; b=uNTVw7RB2bysTJ0Gg1iuyybMBsNlE2KoTgCUhVH+14QfLr3NOxQpTQp1d8VpVUDRw8XLnw M/l3ygW1A6TbsTA4lG4Wm5Mg3KR5CHuHfPsRnnBOZadOGWAbB4CaPAe0k/0HUOT6dgQazs Wuu9fjufCgX7y/+EyWXLcNmtvC5IeCl5z/HMRZ5Ozl6Gk0X/8UAY0KWo1wZn1tb2+ntsOl PtbtbpfCtCO12X3Jzzl9UPzr/58hctpFTJTxQ6MM1qTocaFDFFSh0peXafCx5CUBKJgD2z wWVuKMoapa/daaRgRWi2H06GdejQKGxPJb30wthkBuD92LW8Aq1T/tUtwxFbPA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779922751; a=rsa-sha256; cv=none; b=n7NrHjZb26PaPmvu8MjkZUK8cmEkZ0Uikb56Kygf1qkysH1rI0GThN1JgimA3Cml7pk8df kWs79/myyR8EB/Wsehrzryc0PCWXONGt8dvsCvjsqOYmjdhZmlQ/A1H2EcYsFPd1pdmjAz cvsUGm1Q8tEh4r0invIDdmrQ856ZGrYG1dQPnPgqnEncoaicsxsBeGU6CWnKR6Sgy7CqLd QsVrHR9/yK+eCdvf7M3AHxqlDcvQ13Z4sBx9+8xJMkYbY4InXrxb9bjDNoPjNA1q5B969z 4nPTtPeAZOzo8lZVqdetICcLo8eAq+SV67n9ITKT7M1L2mM+9GoKz0mPTxXuag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779922751; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mAEwckJTQOGE4Zk5oBN5gzIVgWY7B9L7wAvtu3VDXcQ=; b=Qgw01PkQ4fdm0hhwDXrRke3dFGlq/u1O9ydfSvSoz8CbubzzL1jnhA2FQQuYvMgIi18VUt ouupRUZpvWE4WirNlLxvXo+CkyQ4IpMRHTavb10CP65jBnG4xnbah45ucRcz5Yv/rNcL5l 8pxTHap528UCPPMTMZb2l1/A08SVoVoVNj3CwLksN/pDdbKmuf72slGgmmI9mL/K5BIZFu KETxpRowy0+a0XekoGrcBU2HdFiQo1rcv20HOFY1GM9osCAl+M+lUThbXC8Npe2btTgxfA 9B5SB5BnsCCCk33DPlzfrJdCyaeDVeF87NMOO1XWKapXIYl+842IRqLLQK5aig== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQlRf5tLdz4Ms for ; Wed, 27 May 2026 22:59:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 341ea by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 22:59:05 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Aleksandr Rybalko Subject: git: 97cad013a50a - main - install: add -z option List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ray X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 97cad013a50a4012328e11424ed2350c1efc036c Auto-Submitted: auto-generated Date: Wed, 27 May 2026 22:59:05 +0000 Message-Id: <6a177739.341ea.6d7e7300@gitrepo.freebsd.org> The branch main has been updated by ray: URL: https://cgit.FreeBSD.org/src/commit/?id=97cad013a50a4012328e11424ed2350c1efc036c commit 97cad013a50a4012328e11424ed2350c1efc036c Author: Aleksandr Rybalko AuthorDate: 2026-05-25 07:53:20 +0000 Commit: Aleksandr Rybalko CommitDate: 2026-05-27 22:55:57 +0000 install: add -z option Introduces the -z flag, enabling users to set a custom file size limit for pre-installation change checks and avoiding future hard-coded limit modifications. Reviewed by: glebius Approved by: glebius (mentor) Obtained from: Fudo Security MFC after: 2 weeks Sponsored by: Fudo Security Differential Revision: https://reviews.freebsd.org/D57230 --- usr.bin/xinstall/Makefile | 2 +- usr.bin/xinstall/install.1 | 13 +++++++++++-- usr.bin/xinstall/xinstall.c | 18 ++++++++++++++---- 3 files changed, 26 insertions(+), 7 deletions(-) diff --git a/usr.bin/xinstall/Makefile b/usr.bin/xinstall/Makefile index fd95b97160fe..c05a50420c82 100644 --- a/usr.bin/xinstall/Makefile +++ b/usr.bin/xinstall/Makefile @@ -11,7 +11,7 @@ MAN= install.1 CFLAGS+= -I${SRCTOP}/contrib/mtree CFLAGS+= -I${SRCTOP}/lib/libnetbsd -LIBADD= md +LIBADD= md util CFLAGS+= -DWITH_MD5 -DWITH_RIPEMD160 .ifdef BOOTSTRAPPING diff --git a/usr.bin/xinstall/install.1 b/usr.bin/xinstall/install.1 index c923321f20fe..169bf4ef11fe 100644 --- a/usr.bin/xinstall/install.1 +++ b/usr.bin/xinstall/install.1 @@ -33,7 +33,7 @@ .Nd install binaries .Sh SYNOPSIS .Nm -.Op Fl bCcpSsUv +.Op Fl bCcpSsUvz .Op Fl B Ar suffix .Op Fl D Ar destdir .Op Fl f Ar flags @@ -45,9 +45,10 @@ .Op Fl N Ar dbdir .Op Fl o Ar owner .Op Fl T Ar tags +.Op Fl z Ar size .Ar file1 file2 .Nm -.Op Fl bCcpSsUv +.Op Fl bCcpSsUvz .Op Fl B Ar suffix .Op Fl D Ar destdir .Op Fl f Ar flags @@ -59,6 +60,7 @@ .Op Fl N Ar dbdir .Op Fl o Ar owner .Op Fl T Ar tags +.Op Fl z Ar size .Ar file1 ... fileN directory .Nm .Fl d @@ -264,6 +266,13 @@ Cause .Nm to be verbose, showing files as they are installed or backed up. +.It Fl z Ar maxsize +Limit the comparison feature of +.Fl C +to files no larger than +.Ar maxsize . +Files exceeding this limit bypass the comparison step and are directly overwritten. +The default maximum size is 128MiB. .El .Pp By default, diff --git a/usr.bin/xinstall/xinstall.c b/usr.bin/xinstall/xinstall.c index 1aed8c1b24e4..611274d0af68 100644 --- a/usr.bin/xinstall/xinstall.c +++ b/usr.bin/xinstall/xinstall.c @@ -57,6 +57,7 @@ #include #include #include +#include #include #include "mtree.h" @@ -137,6 +138,7 @@ static FILE *metafp; static const char *group, *owner; static const char *suffix = BACKUP_SUFFIX; static char *destdir, *digest, *fflags, *metafile, *tags; +static size_t max_compare_size = MAX_CMP_SIZE; static int compare(int, const char *, size_t, int, const char *, size_t, char **); @@ -168,12 +170,13 @@ main(int argc, char *argv[]) u_int iflags; char *p; const char *to_name; + uint64_t num; fset = 0; iflags = 0; set = NULL; group = owner = NULL; - while ((ch = getopt(argc, argv, "B:bCcD:df:g:h:l:M:m:N:o:pSsT:Uv")) != + while ((ch = getopt(argc, argv, "B:bCcD:df:g:h:l:M:m:N:o:pSsT:Uvz:")) != -1) switch((char)ch) { case 'B': @@ -270,6 +273,13 @@ main(int argc, char *argv[]) case 'v': verbose = 1; break; + case 'z': + if (expand_number(optarg, &num) != 0 || num == 0) { + errx(EX_USAGE, "invalid max compare filesize:" + " %s", optarg); + } + max_compare_size = num; + break; case '?': default: usage(); @@ -1092,7 +1102,7 @@ compare(int from_fd, const char *from_name __unused, size_t from_len, do_digest = (digesttype != DIGEST_NONE && dresp != NULL && *dresp == NULL); - if (from_len <= MAX_CMP_SIZE) { + if (from_len <= max_compare_size) { static char *buf, *buf1, *buf2; static size_t bufsize; int n1, n2; @@ -1484,11 +1494,11 @@ usage(void) { (void)fprintf(stderr, "usage: install [-bCcpSsUv] [-f flags] [-g group] [-m mode] [-o owner]\n" -" [-M log] [-D dest] [-h hash] [-T tags]\n" +" [-M log] [-D dest] [-h hash] [-T tags] [-z maxcmpsize]\n" " [-B suffix] [-l linkflags] [-N dbdir]\n" " file1 file2\n" " install [-bCcpSsUv] [-f flags] [-g group] [-m mode] [-o owner]\n" -" [-M log] [-D dest] [-h hash] [-T tags]\n" +" [-M log] [-D dest] [-h hash] [-T tags] [-z maxcmpsize]\n" " [-B suffix] [-l linkflags] [-N dbdir]\n" " file1 ... fileN directory\n" " install -dU [-vU] [-g group] [-m mode] [-N dbdir] [-o owner]\n" From nobody Thu May 28 02:46:10 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQrTb1MLwz6g6f9 for ; Thu, 28 May 2026 02:46: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQrTZ5m2jz47tD for ; Thu, 28 May 2026 02:46:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779936370; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yBSp7DaX8ESwlwJLGWYffwvc9hbWAJmoHwFEVghGSgo=; b=w4PqTLpVZsrVXmJfDddUnyEM8coAno63IAlYumDKWgAjWqzhLMO20OF2kpq6YJCQeTa9fC gdVLTeT2Ps5dcBYn1P6WrGoR41+ZWJW0mkvE+fq7vHuVjuWu6rjbnA5aU33uncrD4qibZj zH5eLNJ6wGTM+NQSCaxycvGUUKQ7iKUKKMUo34DF6kKoDvNxdj9Gcahp/KoQv/pDQzrBNt +628K97v8F5tKTt2MMglLHO9etYP+iJBWCd5qd2qww6C9To1fgYyJN3gQkknYppxbHtHD8 RpfvSknSd/Yal10X8Xm67XsZgtHN0BcGuhBCuSjEE/uxluSN758QbEm9pNLfww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779936370; a=rsa-sha256; cv=none; b=YfxtAoHx60oHi5G3T9b6F6slGSZifVYiut7zQo5TcMlheIB3SsfU2tXL6xJ7/kEKgu82Sy f0cROmgmpqzrMbgUQ1JD+fe4UZzITURBTHk6/5NNAoAF6D7ApCFgueMVnz+pUMo5z4UWby 2J4t1GxoTYPLVG5RUiKTyEEf9n8WjXUbHqnHmULiUTrJQCOvnKj7oY6yKOa4SzeBkh6jUP a17VmxwElXUU4I2ZeGq08uEHwCA9KiJl+HNkkMlFxv6xrp+mJNk9Qn4N92MkORZv3Tf0A0 n48mIU0nG4JosnjBxJHDTq81s5iwAUsFjZWQXvaUvGudnmnYaXSxIkQQtrQ8Og== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779936370; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yBSp7DaX8ESwlwJLGWYffwvc9hbWAJmoHwFEVghGSgo=; b=Zjhi6k1jGzMo/f/arh/JchfGyFtyXZN5RYn063u+B2QwRmTL6PINcFhDMakO1Z6Z4fBwI8 ROGozqjHPl3CWHXxGVfq+CN6IZrQj6iVpbRhim3IuX23gm6wILKDcYUXVI+QipCtR6EC32 6wBFnfGRSzNFuBriulI8Y7rBhX/0871kCZFYrp2gr/7f2ruiOU/qmzbqzX/E6kxTKDuRG4 +lGEt44oATax6+dcRS7n3fEC8XPa1ag/yhv9SyddpCi3E/lIf4yg2sI1USVrYqM46e5W/j nBNW1uHV2cjUGO/UP4PGw8FHRko3WCYDzkW/nCYfjleBdVv9Mb8939jUc6gWkg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQrTZ4hZZzBpQ for ; Thu, 28 May 2026 02:46:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27816 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 02:46:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: 947dd1ca1297 - stable/15 - subr_uio.c: Remove a KASSERT() for large NFS server I/O List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 947dd1ca129787b93cca3bf390c3a34032a49ac9 Auto-Submitted: auto-generated Date: Thu, 28 May 2026 02:46:10 +0000 Message-Id: <6a17ac72.27816.5335c2a2@gitrepo.freebsd.org> The branch stable/15 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=947dd1ca129787b93cca3bf390c3a34032a49ac9 commit 947dd1ca129787b93cca3bf390c3a34032a49ac9 Author: Rick Macklem AuthorDate: 2026-05-14 22:17:55 +0000 Commit: Rick Macklem CommitDate: 2026-05-28 02:44:46 +0000 subr_uio.c: Remove a KASSERT() for large NFS server I/O When the NFS server is set to allow an I/O size greater than 1Mbyte (not allowed in FreeBSD's main yet), a KASSERT() in allocuio() can fail when: zfs_freebsd_write()->zfs_write()->zfs_uiocopy() ->cloneuio()->allocuio() is called for a large NFS server write. Since the userland API callers to allocuio() already check that the size does not exceed UIO_MAXIOV, there does not seem to be a need to a KASSERT() here. Removing the KASSERT() allows NFS server writes of greater than 1Mbyte to work, once the NFS code is patched to allow them. (cherry picked from commit 13d3bd165e225eec9af91b6e3361c2482931f95b) --- sys/kern/subr_uio.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/kern/subr_uio.c b/sys/kern/subr_uio.c index 6ac932fb6690..fa5865fbe938 100644 --- a/sys/kern/subr_uio.c +++ b/sys/kern/subr_uio.c @@ -441,8 +441,6 @@ allocuio(u_int iovcnt) struct uio *uio; int iovlen; - KASSERT(iovcnt <= UIO_MAXIOV, - ("Requested %u iovecs exceed UIO_MAXIOV", iovcnt)); iovlen = iovcnt * sizeof(struct iovec); uio = malloc(iovlen + sizeof(*uio), M_IOV, M_WAITOK); uio->uio_iov = (struct iovec *)(uio + 1); From nobody Thu May 28 02:47:08 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQrVn5Wnjz6g6F4 for ; Thu, 28 May 2026 02:47:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQrVn4tVXz48J0 for ; Thu, 28 May 2026 02:47:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779936433; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yZtxmy+kSsKBj6L2PQj7LRiHsobIWLjC6nfcAAvAxHk=; b=O1ATPYWiEIRkeboscjEv7yOILMotrfoGEvNMMZ6lB18LzOfG+oSPEYRQ6vKx/UL3zune9e 0bzhtryqqcUlznOM5PaXDyO5DYAH1rr+2Ilk2UTC6D4dTBKSohVEkl9gXIDkMMoUTzwuiC kJKU+CG6COIJcuKxlMRNT4XXzk32LOZ+zi2hPvFTqJR6rr74R5Hw22w0ENoxHfrtE61Oq8 PaYIMYSnlQDJgnPCuREi7VjyFylLELu+nDUwL3OAPlxMLk/QwEXAsn22gk9+/vyiKzXHqa mJvDsQ1zDNE8keUudeh4n5yOtlx2q6Dd5+8Je+Jy4iYow3rsAOzCTkPZ+s15mA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779936433; a=rsa-sha256; cv=none; b=XHfFbnLdEAXzg0w7YeBO4yjnLHLehcpn6m512u+6OJmnvACD8CKPIEtHisF6gCHBam/tzR duu97mAO1wQdCJUXnCdvU5UCu+ARSC1pKtTRpa25SNakYlt8EmXFpPxZrRcHCx2tLBLQuQ a7q4ohGcMyZdlyBjykfFvoBktkOa47geEmtUG1RA54Oeas1XUqtrsdYqlik6+S8DKLlCwx hUDQwxooZp3fX40UZ7LLkrNBgG9NEJeKCQxM9fl0+FK4K+STQe5sQkKmC8UFkjfUBH4bRv L+N3RxDSe/sqUS2ghrMUHF+6IcHuqAAjsRc5pwDzYAt3x/tiblD+O+p0iVCyAw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779936433; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yZtxmy+kSsKBj6L2PQj7LRiHsobIWLjC6nfcAAvAxHk=; b=En0R1aDYY696KOXXLiTy23kChfGjp6SqS6TdW2D3THb3vHVKbqQgWzPi2iu2r+WDezgdIy C/wI8N2yHLRYQhOp/Yj9wfGYiL38/m5aGUTpZmenLpT33KiqRUFIZZvXjWiiGQ76/OOyRX 2ic2pv0NfBzbbKWpfKuFVl06BlshK6qEOhNSK3IPUD7CV9B2Jkyh0HlbgHI3d+YlBCiva2 bJAxKBqFU34fKUGlf4qL4zob0cLKdHQYrkWjF68rLgLcPVLLoxtMoBNN4rsO8l7hpCi8Ji AP7OpNaJdtZ6KpzwvlNVsqXFAxAKk9MpDfhwNa5LekSvsgYT4w0o5CvaLqQfUw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQrVn4DTGz9sR for ; Thu, 28 May 2026 02:47:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30785 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 02:47:08 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: efe287822bcb - stable/15 - nfsd: Allow vfs.nfsd.srvmaxio to be up to 4Mbytes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: efe287822bcbebbf5ad5448280c6d91aa3676fe4 Auto-Submitted: auto-generated Date: Thu, 28 May 2026 02:47:08 +0000 Message-Id: <6a17acac.30785.38ac59ba@gitrepo.freebsd.org> The branch stable/15 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=efe287822bcbebbf5ad5448280c6d91aa3676fe4 commit efe287822bcbebbf5ad5448280c6d91aa3676fe4 Author: Rick Macklem AuthorDate: 2026-05-14 22:33:23 +0000 Commit: Rick Macklem CommitDate: 2026-05-28 02:45:54 +0000 nfsd: Allow vfs.nfsd.srvmaxio to be up to 4Mbytes Without this patch, the maximum setting for vfs.nfsd.srvmaxio was 1Mbyte. This patch increases that to 4Mbytes. The same as for any setting above 128Kbytes, settings up to 4Mbytes require that kern.ipc.maxsockbuf be increased. (A message generated after setting vfs.nfsd.srvmaxio via the /etc/rc.conf variable nfs_server_maxio will indicate the minimum setting, which will be somewhat greater than four times the setting of vfs.nfsd.srvmaxio.) (cherry picked from commit b92b9da3300655c86dcd42ea8a5ba45badd90847) --- sys/fs/nfs/nfsproto.h | 3 +++ sys/fs/nfsserver/nfs_nfsdport.c | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/fs/nfs/nfsproto.h b/sys/fs/nfs/nfsproto.h index 6e67c5be3416..1054c85d8e8f 100644 --- a/sys/fs/nfs/nfsproto.h +++ b/sys/fs/nfs/nfsproto.h @@ -89,8 +89,11 @@ * It used to be called NFS_MAXDATA, but has been renamed to clarify that * it refers to server side only and doesn't conflict with the NFS_MAXDATA * defined in rpcsvc/nfs_prot.h for userland. + * NFS_SRVMAXIO is the default setting for vfs.nfsd.srvmaxio + * NFS_SRVLIMITIO is the maximum setting allowed for vfs.nfsd.srvmaxio */ #define NFS_SRVMAXIO (128 * 1024) +#define NFS_SRVLIMITIO (4 * 1024 * 1024) /* Stat numbers for rpc returns (version 2, 3 and 4) */ /* diff --git a/sys/fs/nfsserver/nfs_nfsdport.c b/sys/fs/nfsserver/nfs_nfsdport.c index 63f7b5ecf564..a33b5ed620a2 100644 --- a/sys/fs/nfsserver/nfs_nfsdport.c +++ b/sys/fs/nfsserver/nfs_nfsdport.c @@ -241,8 +241,9 @@ sysctl_srvmaxio(SYSCTL_HANDLER_ARGS) printf("nfsd: vfs.nfsd.srvmaxio can only be increased\n"); return (EINVAL); } - if (newsrvmaxio > 1048576) { - printf("nfsd: vfs.nfsd.srvmaxio cannot be > 1Mbyte\n"); + if (newsrvmaxio > NFS_SRVLIMITIO) { + printf("nfsd: vfs.nfsd.srvmaxio cannot be > %d\n", + NFS_SRVLIMITIO); return (EINVAL); } if ((newsrvmaxio & (newsrvmaxio - 1)) != 0) { From nobody Thu May 28 05:05:36 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQvZS323qz6f3nL for ; Thu, 28 May 2026 05:05:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQvZS1VzSz3P7w for ; Thu, 28 May 2026 05:05:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779944736; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0J9xnRtRYCmjjRuWJhafoyeXRF1o8f/5xehrmj78NoY=; b=wa+jWVUdvtcwRWpGoA8m+RE4Sznn/F9fwEZUFLqu9Qiwqwq5gKLswC9mYHxEwVP/a93QMt w+DNzE4rJrJWoFdJDjFG+mHkvzlb5NyVST9cv30kbddARbM6UDKYTzs3lSSN56xsPmP++T dLdubSD/YAPOx/o1fI9vQd5k03wtOf38A62H1Rih3fJr9zGjpV3m8Kp8D115GfcpBgEOwb xWy8s9MYMBzAKmR/jgycsRTUtwEL94p7ULl8qylut9QmqjwQjRjz05i+sPE/iNtTagjz+0 8+AurTtXG5lxYQFmDSSQrm77gJkD4d902BfZk16csgjsSk+aZCySQKegP30QNg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779944736; a=rsa-sha256; cv=none; b=oEAC9oqPJpsCyXXuG/S4l3q+49+utDi9GdFnC7HwhQ+i3jtxeT5EmZtFMHVt9b7hpiUMqL ZdZMkr5dS3S4GnoyHmk7AfypAWICcug+YufkYkzhztqn0QC2u6Dj98yc0Fm7BE3mLuF+Hi /J5uzYD+5ZeGnjF1ovkPHiwn9CkzuuXI4R0yfgLc5Zvh0X+mYuWgo41WWd+IseHgzqRBGZ ZfnHlYNzm/yncztc2nk2GoxV0sCadn/cTzaoA0aA999lKF+86hjh8crlPG8AR5+CFKFson soTa78YMaWZznjLWg07I5s11L4Zsgwit2IxVZguo1AM6y5tXw9ZJaIHLWTTwAQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779944736; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0J9xnRtRYCmjjRuWJhafoyeXRF1o8f/5xehrmj78NoY=; b=QSRmH7oJ+/4pIaIB1WAeIqDmAGMf4cgNdsSIXOsQTNjBpBKGz3DwVHuXPmPhBCJr7qtU8o ATzRwNnw9fdEW30KhD7Vz9Sk0EDUN6GALV4LRvAxiDH3FwmTzm3dsGk9oE8mR8EL3Zpl+n FFIeBrKrLpVHZ8is1CDmRxZ3MtIFzUgp+yFm1QRCkFju5NH+aGllYUCVy70nOiBMSIyRfW IdERm7OQRytSxEt+38SRjyfIM3R/AdI+QoPSd2IRIoVNK93OSkbEy1Yi9MEwSsfeABYLRm pe9mPtPbjmBMY9yfIrR3GWES4JmEozFYKyDtv/0PhKflDhtljoiiQFb6EZHiIw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQvZS154bzWZL for ; Thu, 28 May 2026 05:05:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3da74 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 05:05:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: d62e8c5c6fdc - main - inpcb: update inpcb multipath routing information only on success List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d62e8c5c6fdc9e3b006bf126e1fb863e8bdd6c51 Auto-Submitted: auto-generated Date: Thu, 28 May 2026 05:05:36 +0000 Message-Id: <6a17cd20.3da74.17ec6fb1@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=d62e8c5c6fdc9e3b006bf126e1fb863e8bdd6c51 commit d62e8c5c6fdc9e3b006bf126e1fb863e8bdd6c51 Author: Gleb Smirnoff AuthorDate: 2026-05-26 16:02:06 +0000 Commit: Gleb Smirnoff CommitDate: 2026-05-28 04:46:38 +0000 inpcb: update inpcb multipath routing information only on success This is very similar to IPv4 change 24e5c2ee2a18. Don't modify inpcb until we are sure connect(2) will be successful. Fixes: 0c325f53f16731f608919a4489f96fbbe28d2344 --- sys/netinet6/in6_pcb.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c index 8132899bb0d9..0cf6be2f9b33 100644 --- a/sys/netinet6/in6_pcb.c +++ b/sys/netinet6/in6_pcb.c @@ -465,15 +465,6 @@ in6_pcbconnect(struct inpcb *inp, struct sockaddr_in6 *sin6, struct ucred *cred, bzero(&laddr6, sizeof(laddr6)); laddr6.sin6_family = AF_INET6; - if (V_fib_hash_outbound) { - uint32_t hash_type, hash_val; - - hash_val = fib6_calc_software_hash(&inp->in6p_laddr, - &sin6->sin6_addr, 0, sin6->sin6_port, - inp->inp_socket->so_proto->pr_protocol, &hash_type); - inp->inp_flowid = hash_val; - inp->inp_flowtype = hash_type; - } /* * Call inner routine, to assign local interface address. * in6_pcbladdr() may automatically fill in sin6_scope_id. @@ -520,6 +511,16 @@ in6_pcbconnect(struct inpcb *inp, struct sockaddr_in6 *sin6, struct ucred *cred, in_pcbrehash(inp); INP_HASH_WUNLOCK(pcbinfo); + if (V_fib_hash_outbound) { + uint32_t hash_type, hash_val; + + hash_val = fib6_calc_software_hash(&inp->in6p_laddr, + &sin6->sin6_addr, 0, sin6->sin6_port, + inp->inp_socket->so_proto->pr_protocol, &hash_type); + inp->inp_flowid = hash_val; + inp->inp_flowtype = hash_type; + } + return (0); } From nobody Thu May 28 05:05:35 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQvZX1qRtz6f3kQ for ; Thu, 28 May 2026 05:05:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQvZX18Frz3PZr for ; Thu, 28 May 2026 05:05:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779944740; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DIXyQOwfgqYHls6Z1UG4vin1avFr9bUSBdYO72qEYSg=; b=OCnjBDjZ4LJm6xt44B01w8XC5EMN3rh+lLQP4A0X4WUWGLI1521m3SUwHVaBvN05cb40+b Ob3jQd+XHlGwRlPNp6a2gGJ1WNH1x1ZSPmj2mQChcvoOXFgxVpXHR0erYVLSEFXuFl1qKq HhybKKNs+O8IJj2JQ2MfYr/Q4yHS7MZKGL2cpNp/LoDqdc9J+i6R2vlWWf9aRs2dHxAPwk q2HGGK9wp1Q31L+Rkrt1qOoQoPfcwhN4VSFltvTeAdns5tTCN0L0agkBKybBfuAeLU9A55 CXWacKb0rJ8Y/T3+sMrLOZDp+Rl2CnVGER/PTDmKR+RwileQ9h0lqGU3VQ44hg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779944740; a=rsa-sha256; cv=none; b=jNulXXf1CzBUbuAGNX8wa2wOeu2bQYAZzn1h26jScnUQxehDYtXKtjnMLDQL3Ac6tiV0sn k0zmb0DKMHqYzQ10mGiOm2uRC+DOTainBz4HRa7lXRH3fcczKCsFb0jqCwOVTycJ/LrmsP nL7i3mHgu6DMM3BXfXCG2ebfEhubDG9gejUMWG4FaBVPdSGvtrBhxJLpM0OAUM8nIGMiae wymXvGtYH5m/QAOR/Bm7K9kP3MIV0A9cXePfHwKTC5MDfmaa31YFQ5c/jXAD8fKteQP3rn uKOw5MVtZoCD09ZPKguZfezPhZOV5XBErfPyi8VlYaEygSLmfyhs7jM59U7QaQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779944740; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DIXyQOwfgqYHls6Z1UG4vin1avFr9bUSBdYO72qEYSg=; b=LKtmIjqnX+JYfqRw0KqxLd9SZLl0Ob5r5gzp+4cXoUb+2sphrZjs9hh1/wEYFb3J39ORyJ Gqw9VaQcwAPfxOuPe9oy9Hwo7KCIvjd/RzTAk164nSx7TewTtu8GB9197gQWkr8/BTUYIn si91FkeOiiVC6R4QLNwbDchhVyqn9ILNU/84fs9uGc9skOZbGlk1W2kb3aqybLyOYSiCev 8nc5DZHkj04d0IDDO+eHb01Lsp6KXfqfD7lfEfdtki7PM0L+0/TAzSWj1/yD4DtN974jEU AeNPxa8JzVEJkvU44QPLLTvewGxigmSqm6cByzm1W+hBURgKUalX5FpQR4iFpw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQvZX0dLMzXVR for ; Thu, 28 May 2026 05:05:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3e417 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 05:05:35 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: ca91300c0749 - main - inpcb: a pcb may travel only from the wild hash to exact, not vice versa List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ca91300c074923cecfe197de16a3318b06876134 Auto-Submitted: auto-generated Date: Thu, 28 May 2026 05:05:35 +0000 Message-Id: <6a17cd1f.3e417.5bc42168@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=ca91300c074923cecfe197de16a3318b06876134 commit ca91300c074923cecfe197de16a3318b06876134 Author: Gleb Smirnoff AuthorDate: 2026-05-28 04:46:27 +0000 Commit: Gleb Smirnoff CommitDate: 2026-05-28 04:46:27 +0000 inpcb: a pcb may travel only from the wild hash to exact, not vice versa The only possible way to exercise in_pcbrehash() is to bind(2) and then connect(2). The second branch was a dead code since fdb987bebddf. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57241 --- sys/netinet/in_pcb.c | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index 66d2c610139f..84b175b42eec 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -2805,7 +2805,6 @@ in_pcbrehash(struct inpcb *inp) struct inpcbinfo *pcbinfo = inp->inp_pcbinfo; struct inpcbhead *head; uint32_t hash; - bool connected; INP_WLOCK_ASSERT(inp); INP_HASH_WLOCK_ASSERT(pcbinfo); @@ -2815,34 +2814,24 @@ in_pcbrehash(struct inpcb *inp) #ifdef INET6 if (inp->inp_vflag & INP_IPV6) { + MPASS(!IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_faddr)); hash = INP6_PCBHASH(&inp->in6p_faddr, inp->inp_lport, inp->inp_fport, pcbinfo->ipi_hashmask); - connected = !IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_faddr); } else #endif { + MPASS(!in_nullhost(inp->inp_faddr)); hash = INP_PCBHASH(&inp->inp_faddr, inp->inp_lport, inp->inp_fport, pcbinfo->ipi_hashmask); - connected = !in_nullhost(inp->inp_faddr); } /* See the comment in in_pcbinshash(). */ - if (connected && (inp->inp_flags & INP_INLBGROUP) != 0) + if ((inp->inp_flags & INP_INLBGROUP) != 0) in_pcbremlbgrouphash(inp); - /* - * When rehashing, the caller must ensure that either the new or the old - * foreign address was unspecified. - */ - if (connected) { - CK_LIST_REMOVE(inp, inp_hash_wild); - head = &pcbinfo->ipi_hash_exact[hash]; - CK_LIST_INSERT_HEAD(head, inp, inp_hash_exact); - } else { - CK_LIST_REMOVE(inp, inp_hash_exact); - head = &pcbinfo->ipi_hash_wild[hash]; - CK_LIST_INSERT_HEAD(head, inp, inp_hash_wild); - } + CK_LIST_REMOVE(inp, inp_hash_wild); + head = &pcbinfo->ipi_hash_exact[hash]; + CK_LIST_INSERT_HEAD(head, inp, inp_hash_exact); } void From nobody Thu May 28 07:08:16 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQyJH1jL9z6fDJ7 for ; Thu, 28 May 2026 07:08:31 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: from mail-qt1-f177.google.com (mail-qt1-f177.google.com [209.85.160.177]) (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 4gQyJG5pcqz3fgf for ; Thu, 28 May 2026 07:08:30 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qt1-f177.google.com with SMTP id d75a77b69052e-514ae601e01so128392761cf.1 for ; Thu, 28 May 2026 00:08:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1779952109; cv=none; d=google.com; s=arc-20240605; b=F0kutu2+4oBZkRCXinouj0xIUB9+zS07Y/x33QKt+IlSnqOZza4f5OcTi8wRD6wrFm 7v1Vnh+CMub3Dov3AR/shVovxmntwA5EetTUop51xSzhFUDwWstiuXkuTimTzpOdTAVE moCWtZ/SAPExoDL0rEj2b1+6ItPPEQ0JyLicAaz1FuyiiA6XURacPF+5PPcNKF14eK2j WoDdAEgxjZ5XLF0HxwKJT8XyFisJwwsfK1+JQTVNK82vAvu3kMpjG5Ge3h5OesX8li8a FiUndHbuqq8zZ+r18GeTRPtuCr2OoGAIkkzYZ6yv3GdfEcWIg5+A/FlHzEy5nVIQWk5N 6AWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=ZVFp/9XOlKqF0EFm3bqSnP4GOAlox6eQTmlYe+x1W8Q=; fh=Z94+NOugy4IBLusVBT8g5BKC1CVolz40jfT0Td8BDnE=; b=WV1/jZzvF0NgheXX9reFq2y1ZP1ih/cZN6aJQVwEq2q1Mp+Qxop7YvYlJlu4hoTLT5 P4U3tKAdK1dtV8pLIhzawjctaKQaPbyw1ipNzjv/y1uh5HteytkpP5fXY5TZ1yM0212H eloEoobgRlMwQro37+wbG9BDuqcr3ONHN75zBJhjITlhg8H7zCXtUZC3M5/3vWf8EaMd pG2om11CYxjTabkdAYHEGvCwVo1TFiQc+5fh6FpWkkY/By2tmYL73YqPQhGzsdSk6LPq BEfx+f/yF/6YxyW2tz9SojTbpnyzkt0b3fA7jgWmid2JS4OvUXREppo+ChAWIva8tNpQ q56g==; darn=freebsd.org ARC-Authentication-Results: i=1; mx.google.com; arc=none X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779952109; x=1780556909; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=ZVFp/9XOlKqF0EFm3bqSnP4GOAlox6eQTmlYe+x1W8Q=; b=oOrypx0GUepdYaesg8VizTzETRwBfgaoyjgieejqfeBQeJCyKLBHXSo/TxtwB07uys u9/MWl9nlkRLeGN2nqNact3AjXnArIEcIpztsiJMjEbKa10NUV8p7l9MxI1rUdJxDtPs ex8KjDY7yMhIylr9IL8XirKacZnVvj/Ahajktju7Hdb/R1n+siT6Yali6ZSV56fWHQMy lsjBjZYCL44v+tgVnnCscKQcbl6cAagxpF6UN0zOYIRCvs5QJjqGoOYsIchZ82pc3Pp2 P2oRZngi1aywRRu0xrQNLGMT2sAGhnZvtWHj7cC0sFSRgo8UoS+8EdDJyNcG6nY1Y3G6 Eg0Q== X-Forwarded-Encrypted: i=1; AFNElJ9T/eEvfOPPLurDXh4mNv8KKjDDXggkcuCfowYN87J6fbakjQ85PXeTFf0vUHsKCGjk3uPj/Q/tv9XxNnZ+N7g1OEf9@freebsd.org X-Gm-Message-State: AOJu0YxNIx6LCnyIS/LFY6/pCCwrJCGjNxQMixdLMVtzu1p+i7eoi6/u jJ4ofLy6zwozy0ahyBxUmY3CWXGkF+OtV6ADSUxUtMw9iOsCjWFqy/nVAddbx6TlpCuFf/KKUFp KpS4//iSOR1eBEPjJkazxc36hErvk6qE= X-Gm-Gg: Acq92OHrrQ0JiA57LV8WarhyCLpCb1yysvb+aLr7odDMwHNemuporN3TCjuj9Fsbv56 RaL1Sa3HH+rM+SZ5sfrVUnINj5m5SfOy0Z8z8AoH/0gRAhm5ly8abVq93z6H78Hyb2y6Jg4xIyO 6u0S2nlAIl/iRU8zd4r0mxMqV5X6/yWm85d9nnmbLSnWbLEvgqTeDGVMUdGbzhyBv19M7u42WZQ mc3hYXBE5cC6JFT8wewd9qolgzZ/0l3Y7OGHxPrNYDDa/o5Ds8fN6F/u3F59P4zrOLZdM/2+DrY mJ60jozR1wOkL9SD/C/W2LUZufh852j5BlKbyhcmSZpA0ClX+/E05lgNfgDjfw== X-Received: by 2002:a05:622a:1441:b0:516:da58:35c with SMTP id d75a77b69052e-516da58061bmr331996221cf.24.1779952108953; Thu, 28 May 2026 00:08:28 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 References: <6a16eeef.475db.2283bfa4@gitrepo.freebsd.org> In-Reply-To: <6a16eeef.475db.2283bfa4@gitrepo.freebsd.org> From: Antoine Brodin Date: Thu, 28 May 2026 09:08:16 +0200 X-Gm-Features: AVHnY4KERz6TXxkwxJLmfH4U0g9v3cqAeCdcu7-KXc68IQ_LVoCZUGC2RkYndjw Message-ID: Subject: Re: git: bd15d6ef126e - main - libarchive: Force GNU iconv compatibility on FreeBSD To: =?UTF-8?Q?Dag=2DErling_Sm=C3=B8rgrav?= Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, Mark Johnston Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4gQyJG5pcqz3fgf X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated On Wed, May 27, 2026 at 3:17=E2=80=AFPM Dag-Erling Sm=C3=B8rgrav wrote: > > The branch main has been updated by des: > > URL: https://cgit.FreeBSD.org/src/commit/?id=3Dbd15d6ef126ee4c0eac931117f= 6bbbf6f9a3fc72 > > commit bd15d6ef126ee4c0eac931117f6bbbf6f9a3fc72 > Author: Mark Johnston > AuthorDate: 2026-05-20 16:39:40 +0000 > Commit: Dag-Erling Sm=C3=B8rgrav > CommitDate: 2026-05-27 13:10:57 +0000 > > libarchive: Force GNU iconv compatibility on FreeBSD > > When libarchive is compiled with FreeBSD's native iconv instead of > libiconv, as happens with libarchive in the base system, we need to > configure iconv(3) to handle invalid sequences by returning -1, as > iconv_strncat_in_locale() assumes GNU iconv semantics. > > This corresponds to upstream PR 3056. > > PR: 294577 > MFC after: 1 week Hello, Could this change break some ports? (during previous run they were ok) https://pkg-status.freebsd.org/beefy24/data/main-amd64-default/p50aa2c1cc25= 8_s5a8e0e03ae8/logs/errors/py311-game-2.6.1_5.log https://pkg-status.freebsd.org/beefy24/data/main-amd64-default/p50aa2c1cc25= 8_s5a8e0e03ae8/logs/errors/py311-django52-5.2.14.log https://pkg-status.freebsd.org/beefy24/data/main-amd64-default/p50aa2c1cc25= 8_s5a8e0e03ae8/logs/errors/py311-django60-6.0.5.log https://pkg-status.freebsd.org/beefy24/data/main-amd64-default/p50aa2c1cc25= 8_s5a8e0e03ae8/logs/errors/aisleriot-3.22.35.log etc. Antoine From nobody Thu May 28 07:57:37 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQzNy1FTcz6fJ36 for ; Thu, 28 May 2026 07:57: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQzNx6Wv6z3lC6 for ; Thu, 28 May 2026 07:57:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779955057; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PAgBtGAi6nKP8bXa1BrzFyie342sdf9qrCi6JSz+Rjc=; b=G/WzJmEy9Vyx2IyuSJhI6ItMMT+P9h7kWyRZQB3baWkyY2gkTPoN+Y5PFkJdNPXK1DzAts yCLw4FEBrT9MftGr8tuEWbj/6GFtFOoftcNA0jrmf1+UAEYKc2lT8Anyslx43DRVWqQ8Mf UlTaJN04cS1eEM0MqRLhJeqG/PET9LfHL/GPac69AkftzHrK/U+l4dt75jNhO7l1FIKILa +XGdhlI+Wiutgi3ASTwGMR3yAcDDifA8msRBIqWqRqTjXiMZyjxpjdsXAzeNOh8v8IxyHd qwX2OAu5lxFOokXr+PUCrpJaxQkfKzptsbPFH4+mGH3uh0mCZU8SUMy7Q1OI2w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779955057; a=rsa-sha256; cv=none; b=oFz8Tt9QmdUYlD8XurjPlK8WJhUjk/m+wawuylcj4J1QEa50v0ncaw5AX0srYhuXQciAFx ZYfqudtWntonFWtt0+Drj513A5MCdqXB2cwMCS0ZdQLQ1U1IP6y4a6bVGeUOllHSp2XCEN sSwCeN7SGWORytE4Edx8uA2GPMv59/IlnrsHFXSFoPZFaqt1Gt13kG+K63IGkLoKXAvQoV 81oPAIbsld1dA0WsxoBhpmLk9juNJHqEOxDFPfzTePF7NtyRGYfFqOXMBuhxPrqCPzMaUN FMJEazN1OQ8vD+aNuX20WHGBDaTnQRfYGQZRbH4t2SMWOTFI89qCjLmXVWKo9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779955057; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PAgBtGAi6nKP8bXa1BrzFyie342sdf9qrCi6JSz+Rjc=; b=WruJ6ZwL/XlMtH0ExbgEIxT4pKeTsMKl5FQT91s2XA7cSPWChvXYKxCECSEnYmrFwSJe6w Ef/ucr3nfj7rImKrQGT1nJlluehb4nCTHNW3cald5Pu4yVfIMbJB20HxLfVZmWcLrhAzGr FGm4YbSDrLP/ZVtZ6gxYq+KITcnj2c9Nl9bQtcnqDLfZ13vKn8wZ4IRLd9lifZZr1aeTvN 63HXoJ15ADWSasST2py0Ge0sEgzMYuvYhmeyatcVjQvBAu+p9+jK93PRcdzew6z4mWCir7 tF4PCJesqdR1bl0uRLpG/mlMvrU/KcW92gKDaIYY8pRPe4cGKaWzOYLJ4rGykw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQzNx5Z75zdfH for ; Thu, 28 May 2026 07:57:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 20698 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 07:57:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: ea10118fe373 - stable/15 - vfs_domount(): handle the case when vn_lock_pair() only locked once List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: ea10118fe3736cd079b335e0f471b9fa853460e4 Auto-Submitted: auto-generated Date: Thu, 28 May 2026 07:57:37 +0000 Message-Id: <6a17f571.20698.d0d0db4@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ea10118fe3736cd079b335e0f471b9fa853460e4 commit ea10118fe3736cd079b335e0f471b9fa853460e4 Author: Konstantin Belousov AuthorDate: 2026-05-17 21:27:52 +0000 Commit: Konstantin Belousov CommitDate: 2026-05-28 07:57:14 +0000 vfs_domount(): handle the case when vn_lock_pair() only locked once (cherry picked from commit f5433e784078ee139a37eb43ffa1d9e0e1f4f217) --- sys/kern/vfs_mount.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index 383ccf98c10e..9cea2d8acc64 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -1281,7 +1281,8 @@ vfs_domount_first( * Use vn_lock_pair to avoid establishing an ordering between vnodes * from different filesystems. */ - vn_lock_pair(vp, false, LK_EXCLUSIVE, newdp, false, LK_EXCLUSIVE); + error1 = vn_lock_pair(vp, false, LK_EXCLUSIVE, newdp, false, + LK_EXCLUSIVE); VI_LOCK(vp); vp->v_iflag &= ~VI_MOUNT; @@ -1291,7 +1292,10 @@ vfs_domount_first( TAILQ_INSERT_TAIL(&mountlist, mp, mnt_list); mtx_unlock(&mountlist_mtx); vfs_event_signal(NULL, VQ_MOUNT, 0); - VOP_UNLOCK(vp); + if (error1 == 0) + VOP_UNLOCK(vp); + else + MPASS(error1 == EDEADLK); EVENTHANDLER_DIRECT_INVOKE(vfs_mounted, mp, newdp, td); VOP_UNLOCK(newdp); mount_devctl_event("MOUNT", mp, false); From nobody Thu May 28 07:57:36 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQzP16Kvtz6fHqw for ; Thu, 28 May 2026 07:57: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQzP15gPxz3lfY for ; Thu, 28 May 2026 07:57:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779955061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h44RTcmn0g5VjjmAnIVoXspMgujDxlgD/3ID467Vj+U=; b=Yqpt7rd9T0C8EDaNhgJdftT4rOp+TTItButUqANixYiPg5mZqfbgFJwh4PAHsiDIRX4vZH UFsoZcy7m8xy1jKyaHqiS0LvmojJyUpKNePg8knrdIGcSJDxhqq1do0qbUPlHjDFxzwEHY mJOhUIPyD7MqhvN5y50XdtkzVNMHg7+Rr0bEuwj5yX8BKA2IuFEr1kIxX6QO+RHadD2AHN bblnbDxN2gvW8WXylRCpTIBjIIo7alzysepcEjhUHJGmsJViWtWWjGZ95QbgnGD7zvNT1O ioVTaHyNTQvC16j+OqCnksHZ14rPNSPVw5NnohDp1+a8i5dW8ffdkRiWwscTQA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779955061; a=rsa-sha256; cv=none; b=LldVhjE/4U7GH6lZuGqwG2GAtyAW7AAKaxxY+Lgd1IRKpy6JHO41tGsRe7gWbf/4CaMJXl WVTtMUKwMucvlE8Le07Xx7B0wBgm9LF54J+i7Em/EviSpQ7Y6Fn6gvKOSKWWIfyB/TnxEA dFXrdIqM8fmcxQnytb5mSbUxzUVxnFOW/czEue96a6gws/eiAAqietCw4JQg7FIVu+Uzn3 Ki4fp7lFUOGu31dS2AsDtuNXlp/iUh6Dk2rYjY241sPXGZ8YiJAY10vY2arvhla0SvZmud ojB0yBhmW21/Wbj4tEgd2rbSk6NB6krMqFBla8vAV84b9DjllMq+53Bolx6Ieg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779955061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h44RTcmn0g5VjjmAnIVoXspMgujDxlgD/3ID467Vj+U=; b=OkyVWv8uk9FHF26zyxipqikRdvDpoti3Vzdb+yGlkZ/+YVUpwmFtaqC3Z2bAFwUvizmJbC RmcehwHQonqdeaRrdBU5HvIN39awOxRpwxdHO1B0iPvY+TWJVgQyrN6fzL3A3TjAm8dvw/ MkY/PeXVZz/JjN6Lu22LcgMuKPe4/+IoPLq96T6K+IxkMjsOz1qVkMRukU8WsUtsNd+4SV x+U9hsm0GiibYk6zvarqWfQ1naIHhiAxYL6yccq8bclz6eYL0fryMqokHeo+IvSIDckpfH kY8JJW11wKIHPEaRCOhI7c55/Qb3NmWfaLySlATyneQq4IsqsQFGmPckNBrQTw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQzP15967zdfJ for ; Thu, 28 May 2026 07:57:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2116c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 07:57:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: bae3d28fb6a7 - stable/15 - vn_lock_pair(): handle the case of vp1->v_vnlock == vp2->v_vnlock List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: bae3d28fb6a72a5be337bf92c2294bbfdccbb13c Auto-Submitted: auto-generated Date: Thu, 28 May 2026 07:57:36 +0000 Message-Id: <6a17f570.2116c.67d93632@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=bae3d28fb6a72a5be337bf92c2294bbfdccbb13c commit bae3d28fb6a72a5be337bf92c2294bbfdccbb13c Author: Konstantin Belousov AuthorDate: 2026-05-16 23:19:50 +0000 Commit: Konstantin Belousov CommitDate: 2026-05-28 07:57:14 +0000 vn_lock_pair(): handle the case of vp1->v_vnlock == vp2->v_vnlock (cherry picked from commit ace4a3e177c0da5efd9ceee0d9f46068562e3f5e) --- sys/kern/vfs_vnops.c | 32 +++++++++++++++++++++++++------- sys/sys/vnode.h | 2 +- 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index 393353d8c038..1746d344aa64 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -4358,9 +4358,16 @@ vn_lock_pair_pause(const char *wmesg) * Only one of LK_SHARED and LK_EXCLUSIVE must be specified. * LK_NODDLKTREAT can be optionally passed. * - * If vp1 == vp2, only one, most exclusive, lock is obtained on it. + * If vp1->v_vnlock == vp2->v_vnlock, only one, most exclusive, lock + * is obtained on the vnode(s). The function accounts for the + * possibility of vp1 or vp2' v_vnlock changing while the + * corresponding vnode is unlocked. + * + * Return values: + * 0 - locked, two unlocks are required + * EDEADLK - locked, vnodes share the same lock, only one unlock is due. */ -void +int vn_lock_pair(struct vnode *vp1, bool vp1_locked, int lkflags1, struct vnode *vp2, bool vp2_locked, int lkflags2) { @@ -4374,9 +4381,10 @@ vn_lock_pair(struct vnode *vp1, bool vp1_locked, int lkflags1, MPASS((lkflags2 & ~(LK_SHARED | LK_EXCLUSIVE | LK_NODDLKTREAT)) == 0); if (vp1 == NULL && vp2 == NULL) - return; + return (0); - if (vp1 == vp2) { +recheck_same: + if (vp1 != NULL && vp2 != NULL && vp1->v_vnlock == vp2->v_vnlock) { MPASS(vp1_locked == vp2_locked); /* Select the most exclusive mode for lock. */ @@ -4389,20 +4397,26 @@ vn_lock_pair(struct vnode *vp1, bool vp1_locked, int lkflags1, /* No need to relock if any lock is exclusive. */ if ((vp1->v_vnlock->lock_object.lo_flags & LK_NOSHARE) != 0) - return; + return (EDEADLK); locked1 = VOP_ISLOCKED(vp1); if (((lkflags1 & LK_SHARED) != 0 && locked1 != LK_EXCLUSIVE) || ((lkflags1 & LK_EXCLUSIVE) != 0 && locked1 == LK_EXCLUSIVE)) - return; + return (EDEADLK); VOP_UNLOCK(vp1); } ASSERT_VOP_UNLOCKED(vp1, "vp1"); vn_lock(vp1, lkflags1 | LK_RETRY); - return; + if (vp1->v_vnlock == vp2->v_vnlock) + return (EDEADLK); + VOP_UNLOCK(vp1); + if (vp2_locked) { + VOP_UNLOCK(vp2); + vp2_locked = false; + } } if (vp1 != NULL) { @@ -4473,6 +4487,9 @@ vn_lock_pair(struct vnode *vp1, bool vp1_locked, int lkflags1, vn_lock(vp1, lkflags1 | LK_RETRY); vp1_locked = true; } + if (vp1 != NULL && vp2 != NULL && + vp1->v_vnlock == vp2->v_vnlock) + goto recheck_same; } if (vp1 != NULL) { if (lkflags1 == LK_EXCLUSIVE) @@ -4486,6 +4503,7 @@ vn_lock_pair(struct vnode *vp1, bool vp1_locked, int lkflags1, else ASSERT_VOP_LOCKED(vp2, "vp2 ret"); } + return (0); } int diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index e48c4db95341..bb1d3faf567e 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -794,7 +794,7 @@ bool vn_isdisk_error(struct vnode *vp, int *errp); bool vn_isdisk(struct vnode *vp); int _vn_lock(struct vnode *vp, int flags, const char *file, int line); #define vn_lock(vp, flags) _vn_lock(vp, flags, __FILE__, __LINE__) -void vn_lock_pair(struct vnode *vp1, bool vp1_locked, int lkflags1, +int vn_lock_pair(struct vnode *vp1, bool vp1_locked, int lkflags1, struct vnode *vp2, bool vp2_locked, int lkflags2); int vn_open(struct nameidata *ndp, int *flagp, int cmode, struct file *fp); int vn_open_cred(struct nameidata *ndp, int *flagp, int cmode, From nobody Thu May 28 08:03:04 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQzWD4T87z6fJJD for ; Thu, 28 May 2026 08:03: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQzWD2BPtz3mSF for ; Thu, 28 May 2026 08:03:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779955384; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cw4brEz1WuXwPB2t7WTbQCbWmg5R1m7z0De0lfwG0NM=; b=jwPkytznVznTUZMa4m96IKi1Kyog4QSMsOTgY6USKZc0AcvCWHy3WvpFnZTaU/q/X51IFC 19pgzxwpBh8Ri7z2T3v147/zDc3SMSaQCHoqrTQzRvzcrdYWyGIBar49Zf7v53c3fTbQbb 70nQoO0uBV5US0dJQ3xMeuXuDi8A+2SmIa4npcmE6zPBsvVKxeVzreOenJoBeT3j2njLxY lFxgJfPbigZjZ18aKEEVJh0g4PzZLL2Wp1CTgcmo1dee1e6qpIEargmlpAOd3p8WlQ4gwX 4sPEFrbowtIYH3vCbWoE1dv6QmAsYfmm3/jHS6xkFlgThDVAsWrQrDcn3yFlIQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779955384; a=rsa-sha256; cv=none; b=qaEdi9mRsL8CCbQ7MBB5x575ai73e1NQgRN4RENd9ZdynHxTcGcyIsCLd9uDLWKb+Pm3iJ Z7wqXGpznjptrW286m95xweTVVlVq5ClLAiG2FeuyhposC5ZxcBjM7KlNYl7XaJNOjidnv hI9f/l/nsjrSX+wEbe29ioVa1D/RR83sev9yTJiZoZk2Qk4/XgVqXoSA3gzQPianQXaiTK 4QfIA+J2qDUoF1J63Qn4Ls1mPJ1fhErRCu+L69HTYwcEHpoXp0piT1UbxadxgZFiJVD7hc iT9SXAS4BjtNIosklruX2AFO8Zm7IU38W5WbxBMuF4uPMWw2xUH8SqI6bsX7Gw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779955384; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cw4brEz1WuXwPB2t7WTbQCbWmg5R1m7z0De0lfwG0NM=; b=mu2E6K1XcLa5DFV0H4DB5hngC9U3Likkzpud+7xc022rfVWetugWcbZykLEbFjQJfhZIZ3 4TJ39wI67kvt2Ic/WR1ZZ6x7JhsBXTx1z0MC+1FTg74fpkWV5PNWGXZy8Y+lJhPN4mx7Zo xSdhXJSSvyy6U2lDV/whryQOYQStseen/CJuxgcv8o2XxUBu1l/XarNEM8fvzyniEX8qjW b1oNOdiKW4Q8teLDos417OfxCs9mkVP1eS4PgIEkgqigqPOYRjngwErvu6pfunr9okSfI4 4t9EThTt0VeQ8QCBhWfigveL1F/LBuVMMt6I+iXMs5LoJkAPM7Q2SFRF8Ub5oQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQzWD1kmhzdq8 for ; Thu, 28 May 2026 08:03:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 21b11 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 08:03:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 3d6c7334c73e - stable/14 - ttymsg: Overhaul List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3d6c7334c73ee459feb57dcd8bc350f5f6308b41 Auto-Submitted: auto-generated Date: Thu, 28 May 2026 08:03:04 +0000 Message-Id: <6a17f6b8.21b11.bb4a95c@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=3d6c7334c73ee459feb57dcd8bc350f5f6308b41 commit 3d6c7334c73ee459feb57dcd8bc350f5f6308b41 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-25 16:51:23 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-28 08:02:52 +0000 ttymsg: Overhaul * Instead of an error string, return the usual 0 or -1 and let the caller figure out what, if anything, to tell the user. * Avoid string manipulations by opening /dev first and using openat() with O_RESOLVE_BENEATH. * Add a boolean argument which, if false, causes ttymsg() to return without sending the message if the tty's group-writable bit is not set. This saves programs that respect this setting (like syslogd(8)) from having to check before calling ttymsg(). * Update all callers. The observable effect of this change is minimal except for slightly different error messages when ttymsg() fails. However, syslogd(8) will no longer print spurious error messages on the console after trying and failing to write a log message to an X11 session. PR: 295171 MFC after: 1 week Reviewed by: jfree, markj Differential Revision: https://reviews.freebsd.org/D57018 (cherry picked from commit 05e8f2bf0906875e666469e0338f922d1113d034) --- libexec/talkd/announce.c | 3 +- usr.bin/wall/ttymsg.c | 118 ++++++++++++++++++++++++--------------------- usr.bin/wall/ttymsg.h | 2 +- usr.bin/wall/wall.c | 6 +-- usr.sbin/syslogd/syslogd.c | 48 ++++-------------- 5 files changed, 79 insertions(+), 98 deletions(-) diff --git a/libexec/talkd/announce.c b/libexec/talkd/announce.c index b1b1acc09553..71e4342c6068 100644 --- a/libexec/talkd/announce.c +++ b/libexec/talkd/announce.c @@ -46,6 +46,7 @@ static char sccsid[] = "@(#)announce.c 8.3 (Berkeley) 4/28/95"; #include #include +#include #include #include #include @@ -158,7 +159,7 @@ print_mesg(const char *tty, CTL_MSG *request, * stack up processes trying to write messages to a tty * that is permanently blocked. */ - if (ttymsg(&iovec, 1, tty, RING_WAIT - 5) != NULL) + if (ttymsg(&iovec, 1, tty, RING_WAIT - 5, true) != 0) return (FAILED); return (SUCCESS); diff --git a/usr.bin/wall/ttymsg.c b/usr.bin/wall/ttymsg.c index dc149db84885..5f57f7b00509 100644 --- a/usr.bin/wall/ttymsg.c +++ b/usr.bin/wall/ttymsg.c @@ -35,12 +35,15 @@ static const char sccsid[] = "@(#)ttymsg.c 8.2 (Berkeley) 11/16/93"; #endif #include +#include #include + #include #include #include #include #include +#include #include #include #include @@ -49,65 +52,72 @@ static const char sccsid[] = "@(#)ttymsg.c 8.2 (Berkeley) 11/16/93"; #include "ttymsg.h" /* - * Display the contents of a uio structure on a terminal. Used by wall(1), - * syslogd(8), and talkd(8). Forks and finishes in child if write would block, - * waiting up to tmout seconds. Returns pointer to error string on unexpected - * error; string is not newline-terminated. Various "normal" errors are - * ignored (exclusive-use, lack of permission, etc.). + * Display the contents of a uio structure on a terminal. If shout is + * non-zero, do so even if the terminal has messages disabled. Used by + * wall(1), syslogd(8), and talkd(8). Forks and finishes in child if + * write would block, waiting up to timeout seconds. Various "normal" + * errors are ignored (exclusive-use, lack of permission, etc.). */ -const char * -ttymsg(struct iovec *iov, int iovcnt, const char *line, int tmout) +int +ttymsg(struct iovec *iov, int iovcnt, const char *tty, int timeout, + bool shout) { struct iovec localiov[TTYMSG_IOV_MAX]; - ssize_t left, wret; - int cnt, fd; - char device[MAXNAMLEN] = _PATH_DEV; - static char errbuf[1024]; - char *p; + struct stat sb; + ssize_t wret; + size_t resid; + int cnt, dd, fd, serrno; int forked; forked = 0; - if (iovcnt > (int)(sizeof(localiov) / sizeof(localiov[0]))) - return ("too many iov's (change code in wall/ttymsg.c)"); - - strlcat(device, line, sizeof(device)); - p = device + sizeof(_PATH_DEV) - 1; - if (strncmp(p, "pts/", 4) == 0) - p += 4; - if (strchr(p, '/') != NULL) { - /* A slash is an attempt to break security... */ - (void) snprintf(errbuf, sizeof(errbuf), - "Too many '/' in \"%s\"", device); - return (errbuf); + if (iovcnt > (int)(sizeof(localiov) / sizeof(localiov[0]))) { + errno = EFBIG; + return (-1); } - /* - * open will fail on slip lines or exclusive-use lines - * if not running as root; not an error. - */ - if ((fd = open(device, O_WRONLY|O_NONBLOCK, 0)) < 0) { - if (errno == EBUSY || errno == EACCES) - return (NULL); - (void) snprintf(errbuf, sizeof(errbuf), "%s: %s", device, - strerror(errno)); - return (errbuf); + dd = open(_PATH_DEV, O_SEARCH | O_DIRECTORY); + if (dd < 0) + return (-1); + fd = openat(dd, tty, O_WRONLY | O_NONBLOCK | O_RESOLVE_BENEATH); + if (fd < 0) { + serrno = errno; + close(dd); + /* + * open will fail on slip lines or exclusive-use lines + * if not running as root; not an error. + */ + if (serrno == EBUSY || serrno == EACCES) + return (0); + errno = serrno; + return (-1); + } + close(dd); + if (!shout) { + if (fstat(fd, &sb) != 0) { + serrno = errno; + close(fd); + errno = serrno; + return (-1); + } + if ((sb.st_mode & S_IWGRP) == 0) { + close(fd); + return (0); + } } - for (cnt = 0, left = 0; cnt < iovcnt; ++cnt) - left += iov[cnt].iov_len; + for (cnt = 0, resid = 0; cnt < iovcnt; ++cnt) + resid += iov[cnt].iov_len; - for (;;) { + do { wret = writev(fd, iov, iovcnt); - if (wret >= left) - break; if (wret >= 0) { - left -= wret; + resid -= wret; if (iov != localiov) { - bcopy(iov, localiov, + bcopy(iov, localiov, iovcnt * sizeof(struct iovec)); iov = localiov; } - for (cnt = 0; (size_t)wret >= iov->iov_len; ++cnt) { + while ((size_t)wret >= iov->iov_len) { wret -= iov->iov_len; ++iov; --iovcnt; @@ -127,21 +137,21 @@ ttymsg(struct iovec *iov, int iovcnt, const char *line, int tmout) } cpid = fork(); if (cpid < 0) { - (void) snprintf(errbuf, sizeof(errbuf), - "fork: %s", strerror(errno)); + serrno = errno; (void) close(fd); - return (errbuf); + errno = serrno; + return (-1); } if (cpid) { /* parent */ (void) close(fd); - return (NULL); + return (0); } forked++; - /* wait at most tmout seconds */ + /* wait at most timeout seconds */ (void) signal(SIGALRM, SIG_DFL); (void) signal(SIGTERM, SIG_DFL); /* XXX */ (void) sigsetmask(0); - (void) alarm((u_int)tmout); + (void) alarm((u_int)timeout); (void) fcntl(fd, F_SETFL, 0); /* clear O_NONBLOCK */ continue; } @@ -149,18 +159,18 @@ ttymsg(struct iovec *iov, int iovcnt, const char *line, int tmout) * We get ENODEV on a slip line if we're running as root, * and EIO if the line just went away. */ - if (errno == ENODEV || errno == EIO) + serrno = errno; + if (serrno == ENODEV || serrno == EIO) break; (void) close(fd); if (forked) _exit(1); - (void) snprintf(errbuf, sizeof(errbuf), - "%s: %s", device, strerror(errno)); - return (errbuf); - } + errno = serrno; + return (-1); + } while (resid > 0); (void) close(fd); if (forked) _exit(0); - return (NULL); + return (0); } diff --git a/usr.bin/wall/ttymsg.h b/usr.bin/wall/ttymsg.h index be97592f5e1c..840a49875fbb 100644 --- a/usr.bin/wall/ttymsg.h +++ b/usr.bin/wall/ttymsg.h @@ -1,4 +1,4 @@ #define TTYMSG_IOV_MAX 32 -const char *ttymsg(struct iovec *, int, const char *, int); +int ttymsg(struct iovec *, int, const char *, int, bool); diff --git a/usr.bin/wall/wall.c b/usr.bin/wall/wall.c index 335f83623576..c75b7a71bf0a 100644 --- a/usr.bin/wall/wall.c +++ b/usr.bin/wall/wall.c @@ -55,6 +55,7 @@ static const char sccsid[] = "@(#)wall.c 8.2 (Berkeley) 11/16/93"; #include #include #include +#include #include #include #include @@ -101,7 +102,6 @@ main(int argc, char *argv[]) struct wallgroup *g; struct group *grp; char **np; - const char *p; struct passwd *pw; (void)setlocale(LC_CTYPE, ""); @@ -169,8 +169,8 @@ main(int argc, char *argv[]) if (ingroup == 0) continue; } - if ((p = ttymsg(&iov, 1, utmp->ut_line, 60*5)) != NULL) - warnx("%s", p); + if (ttymsg(&iov, 1, utmp->ut_line, 60 * 5, 1) != 0) + warn("%s", utmp->ut_line); } exit(0); } diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index be12e8db7b85..fc4afe3161f5 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -449,7 +449,6 @@ static void parsemsg(const char *, char *); static void printsys(char *); static int p_open(const char *, pid_t *); static void reapchild(int); -static const char *ttymsg_check(struct iovec *, int, char *, int); static void usage(void); static int validate(struct sockaddr *, const char *); static void unmapped(struct sockaddr *); @@ -1836,7 +1835,6 @@ fprintlog_write(struct filed *f, struct iovlist *il, int flags) struct msghdr msghdr; struct addrinfo *r; struct socklist *sl; - const char *msgret; ssize_t lsent; switch (f->f_type) { @@ -1966,9 +1964,9 @@ fprintlog_write(struct filed *f, struct iovlist *il, int flags) dprintf(" %s%s\n", _PATH_DEV, f->fu_fname); iovlist_append(il, "\r\n"); errno = 0; /* ttymsg() only sometimes returns an errno */ - if ((msgret = ttymsg(il->iov, il->iovcnt, f->fu_fname, 10))) { + if (ttymsg(il->iov, il->iovcnt, f->fu_fname, 10, true) != 0) { f->f_type = F_UNUSED; - logerror(msgret); + logerror(f->fu_fname); } break; @@ -2190,7 +2188,6 @@ wallmsg(struct filed *f, struct iovec *iov, const int iovlen) static int reenter; /* avoid calling ourselves */ struct utmpx *ut; int i; - const char *p; if (reenter++) return; @@ -2200,23 +2197,19 @@ wallmsg(struct filed *f, struct iovec *iov, const int iovlen) if (ut->ut_type != USER_PROCESS) continue; if (f->f_type == F_WALL) { - if ((p = ttymsg(iov, iovlen, ut->ut_line, - TTYMSGTIME)) != NULL) { - errno = 0; /* already in msg */ - logerror(p); - } + if (ttymsg(iov, iovlen, ut->ut_line, TTYMSGTIME, + false) != 0 && errno != ENOENT) + dprintf("%s: %m\n", ut->ut_line); continue; } /* should we send the message to this user? */ for (i = 0; i < MAXUNAMES; i++) { if (!f->fu_uname[i][0]) break; - if (!strcmp(f->fu_uname[i], ut->ut_user)) { - if ((p = ttymsg_check(iov, iovlen, ut->ut_line, - TTYMSGTIME)) != NULL) { - errno = 0; /* already in msg */ - logerror(p); - } + if (strcmp(f->fu_uname[i], ut->ut_user) == 0) { + if (ttymsg(iov, iovlen, ut->ut_line, TTYMSGTIME, + true) != 0 && errno != ENOENT) + dprintf("%s: %m\n", ut->ut_line); break; } } @@ -2225,29 +2218,6 @@ wallmsg(struct filed *f, struct iovec *iov, const int iovlen) reenter = 0; } -/* - * Wrapper routine for ttymsg() that checks the terminal for messages enabled. - */ -static const char * -ttymsg_check(struct iovec *iov, int iovcnt, char *line, int tmout) -{ - static char device[1024]; - static char errbuf[1024]; - struct stat sb; - - (void) snprintf(device, sizeof(device), "%s%s", _PATH_DEV, line); - - if (stat(device, &sb) < 0) { - (void) snprintf(errbuf, sizeof(errbuf), - "%s: %s", device, strerror(errno)); - return (errbuf); - } - if ((sb.st_mode & S_IWGRP) == 0) - /* Messages disabled. */ - return (NULL); - return ttymsg(iov, iovcnt, line, tmout); -} - static void reapchild(int signo __unused) { From nobody Thu May 28 08:03:02 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQzWH5DzYz6fJht for ; Thu, 28 May 2026 08:03: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQzWH4CnKz3mSR for ; Thu, 28 May 2026 08:03:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779955387; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GsrCZcM1PHuRUO9ca6k8QqWDXEopWaOHSefAg38MN2U=; b=GKk7eJUKSZhjdM0hzZfHBZYXcPmLTPH5D2BnjkxM88E4AiKPV1MnxrHYhHFJDTvJkNdml6 YYaVjQ7VVufLCrOBd0qjDJLanfm9CgZ3lObRx3dYAtg6CgW7V4oasFof2yhlGsXIDp7IO7 YFpaLbKBByRQ4BwDOtT4FM50WsFw6zK3NWGsGtqZtcRPGQlsk+q/+WiQIzgj+I70HuG01K nrK1QQ+hy6Hc+eKPHj4Ld/iXGJ8RSG1qaR4AitgNmar4++Ch0s8enenNGqg7kZ/BiDcZ1N iPI9PNHnf7yfWLyPE2CAe4GzdGFE9z6/GYDrhWMhJJ21B4aNWcT75DcEuxLz1Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779955387; a=rsa-sha256; cv=none; b=CDeZqQFjFSWQejsjfaDb4PyFpq5AUlDlLpBa8Ao/n/WFeeEbggJl0ZfugcGVIcLVJcbv9J qDaLdemg9FDQaYKnK4b1eKhiIVJq5/U8iZIx9wcSm1enRlRrwNR49XAzBSWaozGTY2wzVI Y1MEFFgGBtuRqUjn7QSEsCP9RtDWSnaIMgxUqRsAL51qe/675S3iyVmtOe7qgsiJQ57S2G tU/pBmjsfS41sZfjHoDK+keTv3bhEw/ASae4Pj76wSP5QZLfjFJpJ5XQPlcEzePpcKwZyI 6hvA3rG9IMd7cnKooMoPi/Syabqg1Mx342fyiZSTkV1YnWJremGCbpY/CYWjkA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779955387; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GsrCZcM1PHuRUO9ca6k8QqWDXEopWaOHSefAg38MN2U=; b=FCPjdgcW1k7mQ/8NKkt8JZ4JoykRUU63sklAqUSEuxM+JjQCJpoMEmcaLFxIvhuSXgferv 4MuXIQ+zu5cFeTEaoBkYpZQ4IKavnxfxkXLzd9m3XyFGxw8KB9kdvt+FD0B66iJZnuBL0B /opfUJpBuEaZ1btyjGem41MliQnzzgcPVnvtpmXmuSgHPkUX00q5OKQJ4IscJcYWpWvHjf +mKy0+W69D9kiLvs4hdvZdLcOLk3gd1AI5TdVC+RZ5oG7xeWguRbr6GRAQnbu8R1UxTZpP bqvg9m4hGXdsP4XFXjjkOcj7UK2ipoHi1pDekp7vOxFS+7ajf6kY6FzX6Kwo2w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQzWH2sXwzdcm for ; Thu, 28 May 2026 08:03:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2199c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 08:03:02 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: cf5cb2c231fc - stable/15 - ttymsg: Overhaul List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: cf5cb2c231fc63d36287321261742b2c63e956f8 Auto-Submitted: auto-generated Date: Thu, 28 May 2026 08:03:02 +0000 Message-Id: <6a17f6b6.2199c.735b04fe@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=cf5cb2c231fc63d36287321261742b2c63e956f8 commit cf5cb2c231fc63d36287321261742b2c63e956f8 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-25 16:51:23 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-28 08:02:48 +0000 ttymsg: Overhaul * Instead of an error string, return the usual 0 or -1 and let the caller figure out what, if anything, to tell the user. * Avoid string manipulations by opening /dev first and using openat() with O_RESOLVE_BENEATH. * Add a boolean argument which, if false, causes ttymsg() to return without sending the message if the tty's group-writable bit is not set. This saves programs that respect this setting (like syslogd(8)) from having to check before calling ttymsg(). * Update all callers. The observable effect of this change is minimal except for slightly different error messages when ttymsg() fails. However, syslogd(8) will no longer print spurious error messages on the console after trying and failing to write a log message to an X11 session. PR: 295171 MFC after: 1 week Reviewed by: jfree, markj Differential Revision: https://reviews.freebsd.org/D57018 (cherry picked from commit 05e8f2bf0906875e666469e0338f922d1113d034) --- libexec/talkd/announce.c | 3 +- usr.bin/wall/ttymsg.c | 120 ++++++++++++++++++++----------------- usr.bin/wall/ttymsg.h | 2 +- usr.bin/wall/wall.c | 6 +- usr.sbin/syslogd/syslogd.c | 47 ++++----------- usr.sbin/syslogd/syslogd_cap.c | 2 +- usr.sbin/syslogd/syslogd_cap.h | 8 +-- usr.sbin/syslogd/syslogd_cap_log.c | 58 +++++++----------- 8 files changed, 106 insertions(+), 140 deletions(-) diff --git a/libexec/talkd/announce.c b/libexec/talkd/announce.c index 80c663ba48b4..cfe8b4eae65e 100644 --- a/libexec/talkd/announce.c +++ b/libexec/talkd/announce.c @@ -40,6 +40,7 @@ #include #include +#include #include #include #include @@ -152,7 +153,7 @@ print_mesg(const char *tty, CTL_MSG *request, * stack up processes trying to write messages to a tty * that is permanently blocked. */ - if (ttymsg(&iovec, 1, tty, RING_WAIT - 5) != NULL) + if (ttymsg(&iovec, 1, tty, RING_WAIT - 5, true) != 0) return (FAILED); return (SUCCESS); diff --git a/usr.bin/wall/ttymsg.c b/usr.bin/wall/ttymsg.c index 4f1c367c505f..3eee72d6805b 100644 --- a/usr.bin/wall/ttymsg.c +++ b/usr.bin/wall/ttymsg.c @@ -29,15 +29,16 @@ * SUCH DAMAGE. */ - - #include +#include #include + #include #include #include #include #include +#include #include #include #include @@ -46,65 +47,72 @@ #include "ttymsg.h" /* - * Display the contents of a uio structure on a terminal. Used by wall(1), - * syslogd(8), and talkd(8). Forks and finishes in child if write would block, - * waiting up to tmout seconds. Returns pointer to error string on unexpected - * error; string is not newline-terminated. Various "normal" errors are - * ignored (exclusive-use, lack of permission, etc.). + * Display the contents of a uio structure on a terminal. If shout is + * non-zero, do so even if the terminal has messages disabled. Used by + * wall(1), syslogd(8), and talkd(8). Forks and finishes in child if + * write would block, waiting up to timeout seconds. Various "normal" + * errors are ignored (exclusive-use, lack of permission, etc.). */ -const char * -ttymsg(struct iovec *iov, int iovcnt, const char *line, int tmout) +int +ttymsg(struct iovec *iov, int iovcnt, const char *tty, int timeout, + bool shout) { struct iovec localiov[TTYMSG_IOV_MAX]; - ssize_t left, wret; - int cnt, fd; - char device[MAXNAMLEN] = _PATH_DEV; - static char errbuf[1024]; - char *p; + struct stat sb; + ssize_t wret; + size_t resid; + int cnt, dd, fd, serrno; int forked; forked = 0; - if (iovcnt > (int)(sizeof(localiov) / sizeof(localiov[0]))) - return ("too many iov's (change code in wall/ttymsg.c)"); - - strlcat(device, line, sizeof(device)); - p = device + sizeof(_PATH_DEV) - 1; - if (strncmp(p, "pts/", 4) == 0) - p += 4; - if (strchr(p, '/') != NULL) { - /* A slash is an attempt to break security... */ - (void) snprintf(errbuf, sizeof(errbuf), - "Too many '/' in \"%s\"", device); - return (errbuf); + if (iovcnt > (int)(sizeof(localiov) / sizeof(localiov[0]))) { + errno = EFBIG; + return (-1); } - /* - * open will fail on slip lines or exclusive-use lines - * if not running as root; not an error. - */ - if ((fd = open(device, O_WRONLY|O_NONBLOCK, 0)) < 0) { - if (errno == EBUSY || errno == EACCES) - return (NULL); - (void) snprintf(errbuf, sizeof(errbuf), "%s: %s", device, - strerror(errno)); - return (errbuf); + dd = open(_PATH_DEV, O_SEARCH | O_DIRECTORY); + if (dd < 0) + return (-1); + fd = openat(dd, tty, O_WRONLY | O_NONBLOCK | O_RESOLVE_BENEATH); + if (fd < 0) { + serrno = errno; + close(dd); + /* + * open will fail on slip lines or exclusive-use lines + * if not running as root; not an error. + */ + if (serrno == EBUSY || serrno == EACCES) + return (0); + errno = serrno; + return (-1); + } + close(dd); + if (!shout) { + if (fstat(fd, &sb) != 0) { + serrno = errno; + close(fd); + errno = serrno; + return (-1); + } + if ((sb.st_mode & S_IWGRP) == 0) { + close(fd); + return (0); + } } - for (cnt = 0, left = 0; cnt < iovcnt; ++cnt) - left += iov[cnt].iov_len; + for (cnt = 0, resid = 0; cnt < iovcnt; ++cnt) + resid += iov[cnt].iov_len; - for (;;) { + do { wret = writev(fd, iov, iovcnt); - if (wret >= left) - break; if (wret >= 0) { - left -= wret; + resid -= wret; if (iov != localiov) { - bcopy(iov, localiov, + bcopy(iov, localiov, iovcnt * sizeof(struct iovec)); iov = localiov; } - for (cnt = 0; (size_t)wret >= iov->iov_len; ++cnt) { + while ((size_t)wret >= iov->iov_len) { wret -= iov->iov_len; ++iov; --iovcnt; @@ -124,21 +132,21 @@ ttymsg(struct iovec *iov, int iovcnt, const char *line, int tmout) } cpid = fork(); if (cpid < 0) { - (void) snprintf(errbuf, sizeof(errbuf), - "fork: %s", strerror(errno)); + serrno = errno; (void) close(fd); - return (errbuf); + errno = serrno; + return (-1); } if (cpid) { /* parent */ (void) close(fd); - return (NULL); + return (0); } forked++; - /* wait at most tmout seconds */ + /* wait at most timeout seconds */ (void) signal(SIGALRM, SIG_DFL); (void) signal(SIGTERM, SIG_DFL); /* XXX */ (void) sigsetmask(0); - (void) alarm((u_int)tmout); + (void) alarm((u_int)timeout); (void) fcntl(fd, F_SETFL, 0); /* clear O_NONBLOCK */ continue; } @@ -146,18 +154,18 @@ ttymsg(struct iovec *iov, int iovcnt, const char *line, int tmout) * We get ENODEV on a slip line if we're running as root, * and EIO if the line just went away. */ - if (errno == ENODEV || errno == EIO) + serrno = errno; + if (serrno == ENODEV || serrno == EIO) break; (void) close(fd); if (forked) _exit(1); - (void) snprintf(errbuf, sizeof(errbuf), - "%s: %s", device, strerror(errno)); - return (errbuf); - } + errno = serrno; + return (-1); + } while (resid > 0); (void) close(fd); if (forked) _exit(0); - return (NULL); + return (0); } diff --git a/usr.bin/wall/ttymsg.h b/usr.bin/wall/ttymsg.h index be97592f5e1c..840a49875fbb 100644 --- a/usr.bin/wall/ttymsg.h +++ b/usr.bin/wall/ttymsg.h @@ -1,4 +1,4 @@ #define TTYMSG_IOV_MAX 32 -const char *ttymsg(struct iovec *, int, const char *, int); +int ttymsg(struct iovec *, int, const char *, int, bool); diff --git a/usr.bin/wall/wall.c b/usr.bin/wall/wall.c index fcfcdcb3fbce..e29b896f838f 100644 --- a/usr.bin/wall/wall.c +++ b/usr.bin/wall/wall.c @@ -44,6 +44,7 @@ #include #include #include +#include #include #include #include @@ -90,7 +91,6 @@ main(int argc, char *argv[]) struct wallgroup *g; struct group *grp; char **np; - const char *p; struct passwd *pw; (void)setlocale(LC_CTYPE, ""); @@ -158,8 +158,8 @@ main(int argc, char *argv[]) if (ingroup == 0) continue; } - if ((p = ttymsg(&iov, 1, utmp->ut_line, 60*5)) != NULL) - warnx("%s", p); + if (ttymsg(&iov, 1, utmp->ut_line, 60 * 5, 1) != 0) + warn("%s", utmp->ut_line); } exit(0); } diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 3a446baf504b..896593248461 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -360,7 +360,6 @@ static int evaluate_prop_filter(const struct prop_filter *filter, static nvlist_t *prop_filter_compile(const char *); static void parsemsg(const char *, char *); static void printsys(char *); -static const char *ttymsg_check(struct iovec *, int, char *, int); static void usage(void); static bool validate(struct sockaddr *, const char *); static void unmapped(struct sockaddr *); @@ -1754,8 +1753,6 @@ iovlist_truncate(struct iovlist *il, size_t size) static void fprintlog_write(struct filed *f, struct iovlist *il, int flags) { - const char *msgret; - switch (f->f_type) { case F_FORW: { ssize_t lsent; @@ -1908,10 +1905,10 @@ fprintlog_write(struct filed *f, struct iovlist *il, int flags) dprintf(" %s%s\n", _PATH_DEV, f->f_fname); iovlist_append(il, "\r\n"); errno = 0; /* ttymsg() only sometimes returns an errno */ - if ((msgret = cap_ttymsg(cap_syslogd, il->iov, il->iovcnt, - f->f_fname, 10))) { + if (cap_ttymsg(cap_syslogd, il->iov, il->iovcnt, f->f_fname, 10, + true) != 0) { f->f_type = F_UNUSED; - logerror(msgret); + logerror(f->f_fname); } break; @@ -2141,7 +2138,6 @@ wallmsg(const struct filed *f, struct iovec *iov, const int iovlen) static int reenter; /* avoid calling ourselves */ struct utmpx *ut; int i; - const char *p; if (reenter++) return; @@ -2151,19 +2147,19 @@ wallmsg(const struct filed *f, struct iovec *iov, const int iovlen) if (ut->ut_type != USER_PROCESS) continue; if (f->f_type == F_WALL) { - if ((p = ttymsg(iov, iovlen, ut->ut_line, - TTYMSGTIME)) != NULL) - dprintf("%s\n", p); + if (ttymsg(iov, iovlen, ut->ut_line, TTYMSGTIME, + false) != 0 && errno != ENOENT) + dprintf("%s: %m\n", ut->ut_line); continue; } /* should we send the message to this user? */ for (i = 0; i < MAXUNAMES; i++) { if (!f->f_uname[i][0]) break; - if (!strcmp(f->f_uname[i], ut->ut_user)) { - if ((p = ttymsg_check(iov, iovlen, ut->ut_line, - TTYMSGTIME)) != NULL) - dprintf("%s\n", p); + if (strcmp(f->f_uname[i], ut->ut_user) == 0) { + if (ttymsg(iov, iovlen, ut->ut_line, TTYMSGTIME, + true) != 0 && errno != ENOENT) + dprintf("%s: %m\n", ut->ut_line); break; } } @@ -2172,29 +2168,6 @@ wallmsg(const struct filed *f, struct iovec *iov, const int iovlen) reenter = 0; } -/* - * Wrapper routine for ttymsg() that checks the terminal for messages enabled. - */ -static const char * -ttymsg_check(struct iovec *iov, int iovcnt, char *line, int tmout) -{ - static char device[1024]; - static char errbuf[1024]; - struct stat sb; - - (void) snprintf(device, sizeof(device), "%s%s", _PATH_DEV, line); - - if (stat(device, &sb) < 0) { - (void) snprintf(errbuf, sizeof(errbuf), - "%s: %s", device, strerror(errno)); - return (errbuf); - } - if ((sb.st_mode & S_IWGRP) == 0) - /* Messages disabled. */ - return (NULL); - return (ttymsg(iov, iovcnt, line, tmout)); -} - /* * Return a printable representation of a host address. */ diff --git a/usr.sbin/syslogd/syslogd_cap.c b/usr.sbin/syslogd/syslogd_cap.c index 7539e6b8661b..0149d09dab99 100644 --- a/usr.sbin/syslogd/syslogd_cap.c +++ b/usr.sbin/syslogd/syslogd_cap.c @@ -50,7 +50,7 @@ casper_command(const char *cmd, const nvlist_t *limits __unused, else if (strcmp(cmd, "readconfigfile") == 0) error = casper_readconfigfile(nvlin, nvlout); else if (strcmp(cmd, "ttymsg") == 0) - error = casper_ttymsg(nvlin, nvlout); + error = casper_ttymsg(nvlin); else if (strcmp(cmd, "wallmsg") == 0) error = casper_wallmsg(nvlin); diff --git a/usr.sbin/syslogd/syslogd_cap.h b/usr.sbin/syslogd/syslogd_cap.h index 2e52c57bcdf8..60106d7862bd 100644 --- a/usr.sbin/syslogd/syslogd_cap.h +++ b/usr.sbin/syslogd/syslogd_cap.h @@ -62,13 +62,13 @@ extern SLIST_HEAD(cfiled_list, cap_filed) cfiled_head; int cap_p_open(cap_channel_t *, size_t, const char *, int *); nvlist_t *cap_readconfigfile(cap_channel_t *, const char *); -const char *cap_ttymsg(cap_channel_t *, struct iovec *, int, const char *, int); +int cap_ttymsg(cap_channel_t *, struct iovec *, int, const char *, int, bool); void cap_wallmsg(cap_channel_t *, const struct filed *, struct iovec *, const int); int casper_p_open(nvlist_t *, nvlist_t *); int casper_readconfigfile(nvlist_t *, nvlist_t *); -int casper_ttymsg(nvlist_t *, nvlist_t *); +int casper_ttymsg(nvlist_t *); int casper_wallmsg(nvlist_t *); nvlist_t *filed_to_nvlist(const struct filed *); @@ -83,8 +83,8 @@ struct prop_filter *nvlist_to_prop_filter(const nvlist_t *nvl_prop_filter); p_open(prog, rpd) #define cap_readconfigfile(chan, cf) \ readconfigfile(cf) -#define cap_ttymsg(chan, iov, iovcnt, line, tmout) \ - ttymsg(iov, iovcnt, line, tmout) +#define cap_ttymsg(chan, iov, iovcnt, line, timeout) \ + ttymsg(iov, iovcnt, line, timeout) #define cap_wallmsg(chan, f, iov, iovcnt) \ wallmsg(f, iov, iovcnt) diff --git a/usr.sbin/syslogd/syslogd_cap_log.c b/usr.sbin/syslogd/syslogd_cap_log.c index 5e2034abd9eb..901349c4dc5a 100644 --- a/usr.sbin/syslogd/syslogd_cap_log.c +++ b/usr.sbin/syslogd/syslogd_cap_log.c @@ -52,14 +52,12 @@ cap_p_open(cap_channel_t *chan, size_t filed_idx, const char *prog, exit(1); } error = nvlist_get_number(nvl, "error"); - if (error != 0) { - errno = error; - logerror("Failed to open piped command"); - } pipedesc_w = dnvlist_take_descriptor(nvl, "pipedesc_w", -1); *procdesc = dnvlist_take_descriptor(nvl, "procdesc", -1); nvlist_destroy(nvl); + if (error != 0) + errno = error; return (pipedesc_w); } @@ -81,29 +79,27 @@ casper_p_open(nvlist_t *nvlin, nvlist_t *nvlout) pipedesc_w = p_open(prog, &procdesc); if (pipedesc_w == -1) - return (-1); + return (errno); nvlist_move_descriptor(nvlout, "pipedesc_w", pipedesc_w); nvlist_move_descriptor(nvlout, "procdesc", procdesc); return (0); } - - return (-1); + return (ECAPMODE); } -const char * +int cap_ttymsg(cap_channel_t *chan, struct iovec *iov, int iovcnt, - const char *line, int tmout) + const char *line, int timeout, bool shout) { nvlist_t *nvl = nvlist_create(0); - int error; - static char errbuf[1024]; - char *ret = NULL; + int error = 0; nvlist_add_string(nvl, "cmd", "ttymsg"); for (int i = 0; i < iovcnt; ++i) nvlist_append_string_array(nvl, "iov_strs", iov[i].iov_base); nvlist_add_string(nvl, "line", line); - nvlist_add_number(nvl, "tmout", tmout); + nvlist_add_number(nvl, "timeout", timeout); + nvlist_add_bool(nvl, "shout", shout); nvl = cap_xfer_nvlist(chan, nvl); if (nvl == NULL) { @@ -111,28 +107,23 @@ cap_ttymsg(cap_channel_t *chan, struct iovec *iov, int iovcnt, exit(1); } error = nvlist_get_number(nvl, "error"); + nvlist_destroy(nvl); if (error != 0) { errno = error; - logerror("Failed to ttymsg"); - } - if (nvlist_exists_string(nvl, "errstr")) { - const char *errstr = nvlist_get_string(nvl, "errstr"); - (void)strlcpy(errbuf, errstr, sizeof(errbuf)); - ret = errbuf; + return (-1); } - - nvlist_destroy(nvl); - return (ret); + return (0); } int -casper_ttymsg(nvlist_t *nvlin, nvlist_t *nvlout) +casper_ttymsg(nvlist_t *nvlin) { const char * const *nvlstrs; struct iovec *iov; - size_t iovcnt; - int tmout; const char *line; + size_t iovcnt; + int ret, timeout; + bool shout; nvlstrs = nvlist_get_string_array(nvlin, "iov_strs", &iovcnt); assert(iovcnt <= TTYMSG_IOV_MAX); @@ -144,13 +135,12 @@ casper_ttymsg(nvlist_t *nvlin, nvlist_t *nvlout) iov[i].iov_len = strlen(nvlstrs[i]); } line = nvlist_get_string(nvlin, "line"); - tmout = nvlist_get_number(nvlin, "tmout"); - line = ttymsg(iov, iovcnt, line, tmout); - if (line != NULL) - nvlist_add_string(nvlout, "errstr", line); - + timeout = nvlist_get_number(nvlin, "timeout"); + shout = nvlist_get_bool(nvlin, "shout"); + if ((ret = ttymsg(iov, iovcnt, line, timeout, shout)) != 0) + ret = errno; free(iov); - return (0); + return (ret); } void @@ -158,7 +148,6 @@ cap_wallmsg(cap_channel_t *chan, const struct filed *f, struct iovec *iov, int iovcnt) { nvlist_t *nvl = nvlist_create(0); - int error; nvlist_add_string(nvl, "cmd", "wallmsg"); /* @@ -175,11 +164,6 @@ cap_wallmsg(cap_channel_t *chan, const struct filed *f, struct iovec *iov, logerror("Failed to xfer wallmsg nvlist"); exit(1); } - error = nvlist_get_number(nvl, "error"); - if (error != 0) { - errno = error; - logerror("Failed to wallmsg"); - } nvlist_destroy(nvl); } From nobody Thu May 28 08:20:15 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQzv4628Pz6fKt2; Thu, 28 May 2026 08:20:16 +0000 (UTC) (envelope-from des@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQzv43vLbz3ppc; Thu, 28 May 2026 08:20:16 +0000 (UTC) (envelope-from des@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779956416; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LN6nr915MFzf9sk0PkZpuHPqX2jREj3GFZ0Pa5A9EP8=; b=BJsJHCAbI8vBQw9rL9ae/FaVKOyyGx+uJocLdqWnlqEgB7HZ1ManJQD8XR2Z8YjIFuPwLU Sj+7UnQi0JM6+nIVQJZFZwI9yqiHRhpAr6rboePYW7lERUvjoPom4cmQg8Mau9RYmlQnNz Tnhu38a/Lb6iOMalgyeloFgTEJ4oyXhZHMGfuLq4kyAhoW6MTEd9oxh4Uu50oL8+FnRrID +TNyRJQOWjPw1k+A9n9jWTSos66DxeSQV+ko6mbggEysIgAcWrleSccJrJxlvMQCuAdoHO mbaCYAkMfGPQld/OLl63cwobE7a2ih3xAUAZ8EJh6WRJN8DP4cZNqSkm1pMgNg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779956416; a=rsa-sha256; cv=none; b=BtivqY6MiOYgv4IPyRsr+PkvQQEI0OQm1a75849KUS6QDZk9ivgA3D1GlNs7fJhFG2acLz 9a4hSOMF6g6TTRDcl6z+02bnB96QFUc4U4AWk81b+vdrBxWf56cQAwy6kqtCZq9g8v9xkn aGhe8XzDNABYr3wAYzKQ2FKEVUql7kodqFvHURe01ndVTP+EVnhoR20ZsG8zEvYzmF9RCH Wh/Hl1a/vvDELhlEq9Oq3iaVeJdz1Hq9DT6pRcg21YwjCXw2csg1+3UcVhxwp78binzP8W CuucdA/q0dDYDfmEZcUHhdwYxJYlmjQsGQey4whOw5kXdrQv7ArG9Z1dLKl0sQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779956416; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LN6nr915MFzf9sk0PkZpuHPqX2jREj3GFZ0Pa5A9EP8=; b=CvIxNXqlD6eQI429iDnA31AU5N/TrLWUuCeNM5iIiRpeQTBz2wHpsHL8HUewTRNR/MAfa+ ZqNg4rwrPhcVYJlf4rysKRnZDwDNPBSc9NcygXx4V8sabLSzCqPYqqZBPc9FWBQDnuYdWc RUWSGVqukcgd3LMwC2SR3GfgvblA0xdPqlupxbUceASPtXTuCe7yVnQb3k7B9B2LEZok2g qaE5Gx0ooETtfTRHIxz2uUcKLFSo8+TwUv5VakVpt+kaJZPtKrQHHvkTshSfKnJ93NPW3B w1yooEVocY0u1X/vkilSYoMESDXBwUKb/hYHMRs39/ikhm9mb8rmCzzrsOHCNA== Received: from ltc.des.dev (unknown [92.183.12.56]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: des/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4gQzv42Rysz1HqB; Thu, 28 May 2026 08:20:16 +0000 (UTC) (envelope-from des@freebsd.org) Received: by ltc.des.dev (Postfix, from userid 1001) id 42E8A74797; Thu, 28 May 2026 10:20:15 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Antoine Brodin Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, Mark Johnston Subject: Re: git: bd15d6ef126e - main - libarchive: Force GNU iconv compatibility on FreeBSD In-Reply-To: (Antoine Brodin's message of "Thu, 28 May 2026 09:08:16 +0200") References: <6a16eeef.475db.2283bfa4@gitrepo.freebsd.org> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Thu, 28 May 2026 10:20:15 +0200 Message-ID: <86eciwx7wg.fsf@ltc.des.dev> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Antoine Brodin writes: > Dag-Erling Sm=C3=B8rgrav writes: > > commit bd15d6ef126ee4c0eac931117f6bbbf6f9a3fc72 > > Author: Mark Johnston > > AuthorDate: 2026-05-20 16:39:40 +0000 > > Commit: Dag-Erling Sm=C3=B8rgrav > > CommitDate: 2026-05-27 13:10:57 +0000 > > > > libarchive: Force GNU iconv compatibility on FreeBSD > > > > When libarchive is compiled with FreeBSD's native iconv instead of > > libiconv, as happens with libarchive in the base system, we need to > > configure iconv(3) to handle invalid sequences by returning -1, as > > iconv_strncat_in_locale() assumes GNU iconv semantics. > > > > This corresponds to upstream PR 3056. > > > > PR: 294577 > > MFC after: 1 week > Could this change break some ports? Your logs show that LC_COLLATE is set to C. It should be set to C.UTF-8, or simply not set at all since LANG is already C.UTF-8. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@FreeBSD.org From nobody Thu May 28 08:25:17 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gR00t4WM3z6fKvv for ; Thu, 28 May 2026 08:25: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gR00t04D7z3r02 for ; Thu, 28 May 2026 08:25:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779956718; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ld5sjfqVwO59gPDtBBGjbTzjQlGJ8M3e1d+Ym5hkjF0=; b=dgGqj/uLqlsyFsRTNmSuP0OauTd+kHNQYWe/pFj1kL5bMyCk55jU0boEHAjq4DEW9syodo dk+FEMgQIIDpqxS2RC56JlDaDY+NhDKYmbI14z+UkdZnWnsFGLBzVgAWSMFknttVrSQnH6 JlV4JOuCs2uRGovFZ9gX1BEeX7LQvT+BOKGw9mq8bhe40ztMw7ij/Q6XPRK91oibp9UX5+ h8/bYTjFRQnWffHFSQQLXPJaUNQKydXcDAfFH7D5KtM6WX2XBhu2Wb85Wwb7sna+lEVHZ0 y6nivZV/7rrfpxFDAVY5PNm0LhO+7h7Lx+rEjx0sRxf4hlvMtWJVl7kBMa4DeA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779956718; a=rsa-sha256; cv=none; b=XlZODnncxborPdjomYJZv/3UK2ZYywmPEbhO1rT+BI4GdaVgeBCt0lBt3Y96JrKyFWoM/s YJ9RyRXkkGDzAzDtIgmUYZbQJPZUR9gDJ4Fi1I7OSbMOYJFU8UHvtVvRPpyRKyAZxEtXV0 sJJh3lQRv8YFh4JP/mzQm/p083dJ4An24HZBt69iTGiW/jKM8fzAo9Jv+505AJ/H0wg2++ yHSBApaUYWOIZ4GkSyytZgeCgCoDZzARDMGuMpQ2WCtHZCBq9tdoJN4Olw3gV+UvYlxZMR ccyLuTDrfo5AbUXXSN+MjL2UY0EtwFPgM4xmced/xTXNqvO6O+ESXe2MtbGSxQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779956718; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ld5sjfqVwO59gPDtBBGjbTzjQlGJ8M3e1d+Ym5hkjF0=; b=ErxiAdc6GMWbwbWdW0Ac9fVr1+Zyi2GSpFapNnMpehm2lzlofIK7poMaPQqRqoOOAPynND zW3kuvhCuHZ7X3Q62fEXaaYdtrmB9w4UmCkVHefL86hVkHUPXyEJdd/oKE1kddfOEKh5VF 4zSnVQsi16HWXEILOecS3Cn/VXmr3ZA+bZTT/ZF69Ipvm0ZF78Snr6cnpllFETmz7g4flV lUaK2yWhYU4G2QIsi7+rwLUWIvf2NI/qbt/PMtJdcHtFtwlIuI8qltLmtOJ1jEmybY/6eC YeCv7QJ7UinGV+ZVtCnJnr+fUEqHmKTJJnFNS59MoznHYKKilxGGvVeHXRsfFQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gR00s5Q5Lzf4C for ; Thu, 28 May 2026 08:25:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2459c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 08:25:17 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: eb5bab240e00 - stable/15 - lpd: Restore ability to specify a port number List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: eb5bab240e00c539c6e43edcc2625b40e010863b Auto-Submitted: auto-generated Date: Thu, 28 May 2026 08:25:17 +0000 Message-Id: <6a17fbed.2459c.66345bc7@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=eb5bab240e00c539c6e43edcc2625b40e010863b commit eb5bab240e00c539c6e43edcc2625b40e010863b Author: Dag-Erling Smørgrav AuthorDate: 2026-05-25 16:51:31 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-28 08:24:16 +0000 lpd: Restore ability to specify a port number This has been broken since IPv6 support was added in 2000. We would validate the port number (which had to be a port number, but can now also be a service name) and then ignore it. MFC after: 1 week Fixes: 08829865f659 ("IPv6 support for lpr.") Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57181 (cherry picked from commit c0cae7d8da50daa87af4cd6d7c9a2043343b506f) --- usr.sbin/lpr/lpd/lpd.8 | 19 ++++++++++--------- usr.sbin/lpr/lpd/lpd.c | 28 +++++++++------------------- 2 files changed, 19 insertions(+), 28 deletions(-) diff --git a/usr.sbin/lpr/lpd/lpd.8 b/usr.sbin/lpr/lpd/lpd.8 index 9d24a450ba0e..269ef3580ce7 100644 --- a/usr.sbin/lpr/lpd/lpd.8 +++ b/usr.sbin/lpr/lpd/lpd.8 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd February 19, 2026 +.Dd May 25, 2026 .Dt LPD 8 .Os .Sh NAME @@ -35,7 +35,7 @@ .Nm .Op Fl cdlpsFW46 .Op Fl t Ar timeout -.Op Ar port# +.Op Ar port .Sh DEPRECATION NOTICE This facility is scheduled for removal prior to the release of .Fx 16.0 . @@ -143,13 +143,13 @@ Inet only. Inet6 only. .It Fl 46 Inet and inet6 (default). -.It Ar "port#" -The Internet port number used to rendezvous -with other processes is normally obtained with -.Xr getservbyname 3 -but can be changed with the -.Ar port# -argument. +.It Ar "port" +The Internet port number or service name used to rendezvous with other +processes. +Can be any number from 1 to 65,535 or any service name defined in +.Pa /etc/services . +Defaults to +.Li printer . .El .Pp Access control is provided by two means. @@ -346,6 +346,7 @@ but not under same administrative control. .Xr syslog 3 , .Xr hosts.lpd 5 , .Xr printcap 5 , +.Xr services 5 , .Xr chkprintcap 8 , .Xr lpc 8 , .Xr pac 8 diff --git a/usr.sbin/lpr/lpd/lpd.c b/usr.sbin/lpr/lpd/lpd.c index d1dcd0766a77..5550846dca18 100644 --- a/usr.sbin/lpr/lpd/lpd.c +++ b/usr.sbin/lpr/lpd/lpd.c @@ -101,7 +101,7 @@ static void startup(void); static void chkhost(struct sockaddr *_f, int _ch_opts); static int ckqueue(struct printer *_pp); static void fhosterr(int _ch_opts, char *_sysmsg, char *_usermsg); -static int *socksetup(int _af, int _debuglvl); +static int *socksetup(int _af, const char *portstr, int _debuglvl); static void usage(void); /* XXX from libc/net/rcmd.c */ @@ -124,7 +124,7 @@ main(int argc, char **argv) struct sockaddr_storage frominet; socklen_t fromlen; sigset_t omask, nmask; - struct servent *sp, serv; + const char *portstr = "printer"; int inet_flag = 0, inet6_flag = 0; euid = geteuid(); /* these shouldn't be different */ @@ -215,19 +215,9 @@ main(int argc, char **argv) if (errs) usage(); - if (argc == 1) { - if ((i = atoi(argv[0])) == 0) - usage(); - if (i < 0 || i > USHRT_MAX) - errx(EX_USAGE, "port # %d is invalid", i); - - serv.s_port = htons(i); - sp = &serv; + if (argc > 0) { + portstr = *argv++; argc--; - } else { - sp = getservbyname("printer", "tcp"); - if (sp == NULL) - errx(EX_OSFILE, "printer/tcp: unknown service"); } if (argc != 0) @@ -339,7 +329,7 @@ main(int argc, char **argv) FD_SET(funix, &defreadfds); listen(funix, 5); if (sflag == 0) { - finet = socksetup(family, socket_debug); + finet = socksetup(family, portstr, socket_debug); } else finet = NULL; /* pretend we couldn't open TCP socket. */ if (finet) { @@ -855,7 +845,7 @@ fhosterr(int ch_opts, char *sysmsg, char *usermsg) /* if af is PF_UNSPEC more than one socket may be returned */ /* the returned list is dynamically allocated, so caller needs to free it */ static int * -socksetup(int af, int debuglvl) +socksetup(int af, const char *portstr, int debuglvl) { struct addrinfo hints, *res, *r; int error, maxs, *s, *socks; @@ -865,7 +855,7 @@ socksetup(int af, int debuglvl) hints.ai_flags = AI_PASSIVE; hints.ai_family = af; hints.ai_socktype = SOCK_STREAM; - error = getaddrinfo(NULL, "printer", &hints, &res); + error = getaddrinfo(NULL, portstr, &hints, &res); if (error) { syslog(LOG_ERR, "%s", gai_strerror(error)); mcleanup(0); @@ -934,9 +924,9 @@ static void usage(void) { #ifdef INET6 - fprintf(stderr, "usage: lpd [-cdlsFW46] [port#]\n"); + fprintf(stderr, "usage: lpd [-cdlsFW46] [port]\n"); #else - fprintf(stderr, "usage: lpd [-cdlsFW] [port#]\n"); + fprintf(stderr, "usage: lpd [-cdlsFW] [port]\n"); #endif exit(EX_USAGE); } From nobody Thu May 28 08:25:18 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gR00v2Nm3z6fLQc for ; Thu, 28 May 2026 08:25:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gR00t6j1dz3qly for ; Thu, 28 May 2026 08:25:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779956719; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4Dxz9XmxxkyLV3NVar8o4W+w4pDcQGvc0Ip5ypavHF8=; b=CiN/VITkyDLfd+WMO3Mo3+AYAWGme0N3ihvik+u654U344izF60ghuB4JQWu2XZK54AXYj kTlXVcLWLpfqL/FfgLDdifKHtdszFBmDnMHA+biB6rId6vlMEsWy1OBhlJ31qLQyGYRoI9 BHlEyT1XffdJGuBBB+yBHNFgYYbmgH2CGVol0/cMcQL8n/YOMIy1XqQoWxFXcjbODxzqYO IYU6uRJKTXx9yyCUzHlk0QVS/9crATf7+UvvvWDB4TxlcM+7vJ2Cj6vpt9WW20M7WmMX25 SjJLRmR/IGk31MwkXkpqNEum2CnA32bV1ZKM9RCZK4dfLvGNhAz94xV6iA0JaQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779956719; a=rsa-sha256; cv=none; b=qyTzTrJblAI/UnsiqLP5ss+Rzx0c8wLaGe21U0F7+wccYIb/nAuGh9sEMv4cgcKSnuIbTg dNkZXs+iuF9hquAa3TOhWq57tRaxnY7kdHt5KS5C4aFL5FNJTRE5+UcJuhh5hRknfFznED jgJS7obbmYCEuKjeFDxZBCvvqx79KQ9GModiNnbU0rRuUczdKW89uoTpbfi5O7oeNd1cZG s/kvW03j/e25aOoB9GVz4msUrEth3DVsp3DC/HkZvoVa9Kj9ufDH3dfe30hFM45KGQ0oCH mA259XImewyhmHCDmTLDNUPXp1KDDlmuQFQGxNL1NzL/d80C4A4x4+PvO/tn/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779956719; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4Dxz9XmxxkyLV3NVar8o4W+w4pDcQGvc0Ip5ypavHF8=; b=OhYyW5GaZh+xJOzJ8ajA3e0Prd69mauu/1UhJAbRFkUgaTM1r40SZV0L+9K+VYjma1U3g4 ITgZxXjg2nX3mwRbLwIgtXFBmh8UeqCKERbG7lFH7TdkUaVt2u5tLGv3x6ilEvJdnI1Qde t47OijZ+KHybxZNLvcf41iK2z1I8FMNE4f6f0V8aRiwOQtgcbI8TUw53Lcu1jW0Vi1bd7Q A3kkJbuaFvpRPl+zTVMGTZFwJRh4TZdQTSp+AlF+b+5RncvcmgtmDrooUVyR983MbnMykg leQMZCR+/grDRjidqA+I/VmWfK8pmHRIDI3LUU94CpkoXfs5Ja+mKrpwFhkj4g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gR00t6C91zfYQ for ; Thu, 28 May 2026 08:25:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 24409 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 08:25:18 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 966ed8230b88 - stable/15 - lpd: Reorder option list in manual page List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 966ed8230b88f88d8459062bcd60aff01b344087 Auto-Submitted: auto-generated Date: Thu, 28 May 2026 08:25:18 +0000 Message-Id: <6a17fbee.24409.3c2e0e6e@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=966ed8230b88f88d8459062bcd60aff01b344087 commit 966ed8230b88f88d8459062bcd60aff01b344087 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-25 16:51:39 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-28 08:24:16 +0000 lpd: Reorder option list in manual page MFC after: 1 week Reviewed by: ziaee, markj Differential Revision: https://reviews.freebsd.org/D57182 (cherry picked from commit 8e917789732ae02a480e8756899d3bc6d99fe5d8) --- usr.sbin/lpr/lpd/lpd.8 | 42 ++++++++++++++++++------------------------ 1 file changed, 18 insertions(+), 24 deletions(-) diff --git a/usr.sbin/lpr/lpd/lpd.8 b/usr.sbin/lpr/lpd/lpd.8 index 269ef3580ce7..30c69555ca24 100644 --- a/usr.sbin/lpr/lpd/lpd.8 +++ b/usr.sbin/lpr/lpd/lpd.8 @@ -63,6 +63,12 @@ the request so the parent can continue to listen for more requests. .Pp Available options: .Bl -tag -width Ds +.It Fl 4 +Accept IPv4 connections. +The default is to accept both IPv4 and IPv6. +.It Fl 6 +Accept IPv6 connections. +The default is to accept both IPv4 and IPv6. .It Fl c By default, if some remote host has a connection error while trying to send a print request to @@ -81,11 +87,20 @@ Turn on .Dv SO_DEBUG on the Internet listening socket (see .Xr setsockopt 2 ) . -.It Fl l +.It Fl F +By default, +.Nm +will daemonize into the background. The -.Fl l +.Fl F flag causes .Nm +to remain in the foreground. +Logging is still performed with +.Xr syslog 3 . +.It Fl l +Causes +.Nm to log valid requests received from the network. This can be useful for debugging purposes. @@ -99,11 +114,7 @@ It is being deprecated, and may be removed in a future version of .Nm . .It Fl s -The -.Fl s -(secure) flag causes -.Nm -not to open an Internet listening socket. +Do not open an Internet listening socket. This means that .Nm will not accept any connections from any remote @@ -114,17 +125,6 @@ Set the network receive timeout for client connections to .Ar timeout seconds. The default is 120. -.It Fl F -By default, -.Nm -will daemonize into the background. -The -.Fl F -flag causes -.Nm -to remain in the foreground. -Logging is still performed with -.Xr syslog 3 . .It Fl W By default, the .Nm @@ -137,12 +137,6 @@ flag causes to accept connections coming from any port. This is can be useful when you want to accept print jobs from certain implementations of lpr written for Windows. -.It Fl 4 -Inet only. -.It Fl 6 -Inet6 only. -.It Fl 46 -Inet and inet6 (default). .It Ar "port" The Internet port number or service name used to rendezvous with other processes. From nobody Thu May 28 08:25:19 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gR00w2DqDz6fLNg for ; Thu, 28 May 2026 08:25: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gR00w01xmz3qwh for ; Thu, 28 May 2026 08:25:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779956720; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U2nm7bB22x4opJo2ViY41AIbPfY42CvsBNq1XYa1iPA=; b=Cc2gje/rRIjWCpITXIynytLi824xp4EbPwflTsHtCr2GW0iO++viqOPlzUSGJJe+Xn/2Cp qLCVZNSGI4DN2AzWQuyjStqWFeoXjAtZ3PIEfP5zCMhdKBdepYUOoqKvcF/Qu8xLRlHhzy 6n5k8WziV5OYMbUFv9XhxAcemHyP3HQ3dIjlo7sbWQcBwQbpQ271T/uHZemRikIO4URh9T w7TGmZTViA3DpnSAmbyg7tf8eb0eotRzcvxhJL4wY80J5gdGGXT5sxiruKGgdV2iMRIJcG s1x4xlAnC7dqbm2PzZnm0d8Zcz71ns1PLsjQntDSWCcBc85BvAjADOt6dE+tJg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779956720; a=rsa-sha256; cv=none; b=LQbTC4CeOsr/A4+mjuZFYWINg+dmL8LjOH4LQUEOOBsyH/eN53x9EBmGplUcccWUI5yW3Y OHeAJKvPtrP8IjiA2tuyYKtINFNpYsInt2dscStLpfKwS6lzfRsv513Ht3v/+m9xCxoR63 iLFwPqSHdyrQwYXsArNSrtc4/3uYcD0PgeDz3lTQ0JFpsLfFgwgtsCJuJB4+EOvEOkwq3h 68v9eY3qiTPOk+zIa/JwF4nMYRJnVgt2xzZxw8wXATCOJhnhXBBQmMNhWMDyqgsa0DDRAU mljwhQIbqA93ianYtx6HThkqEne0YeVKE94AAyYLJd/L99hfJswULXwrObDhHw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779956720; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U2nm7bB22x4opJo2ViY41AIbPfY42CvsBNq1XYa1iPA=; b=O/8H36gWvh0NJbP/lFURd5UUbniYUIDrdOBZCQE+lxa43oH6xfCewHYBQBPGJjFERpAeE8 VXg1MFXXTscWI/kCM434SXkzu8OOm+8vUesLrQFrg+lm78LUCngua4FtXlzXGQLpgd1FQu 8XpOw8EBnYci0GElraIZOYbbJ5i7I0f9XZZ1ChhpNNW2Ei0n6EaBOQLK+Py/Zr8Hc0G15Q VCu63cfe6j0Jh7rc6ETDRIZs3iC1JPpXSJ0Inckzuno20O478E0bRE4M8BbimqudDfKwkI +2gxJylv6PihdC8Sv53P/dYBMqR1IKb1566M1sHy9Qtw4/WILFAgRg0IuF6gkQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gR00v6klSzf8g for ; Thu, 28 May 2026 08:25:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 244b2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 08:25:19 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: a89539402359 - stable/15 - lpd: Drop deprecated -p option List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: a895394023597d063979c10b96a3a187f29dd7fc Auto-Submitted: auto-generated Date: Thu, 28 May 2026 08:25:19 +0000 Message-Id: <6a17fbef.244b2.9a05724@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=a895394023597d063979c10b96a3a187f29dd7fc commit a895394023597d063979c10b96a3a187f29dd7fc Author: Dag-Erling Smørgrav AuthorDate: 2026-05-25 16:51:44 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-28 08:24:16 +0000 lpd: Drop deprecated -p option This alias for the -s option has been deprecated since 2002. Time to drop it from the documentation. MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57183 (cherry picked from commit 6047f6a21085ae3877228f8df19a0d4bce45905f) --- usr.sbin/lpr/lpd/lpd.8 | 11 +---------- usr.sbin/lpr/lpd/lpd.c | 3 --- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/usr.sbin/lpr/lpd/lpd.8 b/usr.sbin/lpr/lpd/lpd.8 index 30c69555ca24..57331df02089 100644 --- a/usr.sbin/lpr/lpd/lpd.8 +++ b/usr.sbin/lpr/lpd/lpd.8 @@ -33,7 +33,7 @@ .Nd line printer spooler daemon .Sh SYNOPSIS .Nm -.Op Fl cdlpsFW46 +.Op Fl cdlsFW46 .Op Fl t Ar timeout .Op Ar port .Sh DEPRECATION NOTICE @@ -104,15 +104,6 @@ Causes to log valid requests received from the network. This can be useful for debugging purposes. -.It Fl p -The -.Fl p -flag is a synonym for the -.Fl s -flag. -It is being deprecated, and may be removed in a -future version of -.Nm . .It Fl s Do not open an Internet listening socket. This means that diff --git a/usr.sbin/lpr/lpd/lpd.c b/usr.sbin/lpr/lpd/lpd.c index 5550846dca18..d01aac7a7a35 100644 --- a/usr.sbin/lpr/lpd/lpd.c +++ b/usr.sbin/lpr/lpd/lpd.c @@ -153,9 +153,6 @@ main(int argc, char **argv) lflag++; break; case 'p': /* letter initially used for -s */ - /* - * This will probably be removed with 5.0-release. - */ /* FALLTHROUGH */ case 's': /* secure (no inet) */ sflag++; From nobody Thu May 28 08:25:21 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gR00x2d0Fz6fLQk for ; Thu, 28 May 2026 08:25: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gR00x17Z1z3qwj for ; Thu, 28 May 2026 08:25:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779956721; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Sx+kX/IxIyGgu/VFhW9WqW9neJMXRz0NfuES41TxJG4=; b=bhK3GcOdl/lZ8bFmhK7AbycgTM62+GDaWrRIAOo/71xQgkxevvbRNbfk9VK6xjWm8mnvaC 8iedvW/OYpBUVXpitUbFrcFA71XHx7iHXUYav60m/j732JSss/5cgcWR64c5H+f0ltrK9U 096Q+Oqc+zuU0fyutpLK7BKSerq334/aily8P41WLnBtH6k5pXspahtjg8KN8Kdgv3uQEs v3jRCYnZNGkyhZ6LZzVRnGSRrPbMgRMZyZEtdAogoTwTkZrHXUqML+/Dtg2mrwU4lefb47 1Kd3rE0jnNlmoUvvfTd7B2GRIb7r0Fi22Z8vyS5u+ui94/tVCw3gFKUNO4hoSg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779956721; a=rsa-sha256; cv=none; b=Cm1EDv2X/Ybltk8Jhla1NwtwXuRNWOeBBCHPH2pBeOE1YAjIOTXihQ1fyxEuSR/kHHB4Xv P1o/RE9BFhZAYCL0WEQLOJdvXv2m9YFFO+afbu65ozXOfQGwKf3mWnGbJ5haqxO+8Cb6SR NQka02PZ03EGmUd5W0+dk+dLolT06ukA32hG8LJg+OHsdSV5mR8IhAllY+RVRcyelG1Gw/ 54AXcQcQYr/rj0eg4JgPXJ42Rq5dKTm5CDXCR/M0bzA6dsxzBPT5bLEPNU29rCXjVaJHAS 9F885dd6eNKFpkmJQgX++k+dZgcXP6ccPWSOL94qGrTTGgbd47JNJGRIe3Teyw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779956721; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Sx+kX/IxIyGgu/VFhW9WqW9neJMXRz0NfuES41TxJG4=; b=pKIiUoom9OlRNLS/MJRfGQsEFn/+GtOo1dEjHZGeHuKQP3dzX0n11R2TdvVcnVqBdYa0Sn kOcHZzki3+LPaJj2vnho/szKdLgKu4e067Sr2n0TlvND6Qndym0j7FQkknA/tct+tFr1F/ EqFNLDr52wJWGc9R9xZmh3eyf0R0Ggyn+nfC80EROS+wRwqYhN3ofr25BPrVdJzxIMekwe Gbys2hX153eoTBljFuumSlDWNBJ84jgeisMo2CqTxuRH1uFnF2NgG243RjMZd1KGGg4sE9 M9TPLQAbjpXlMEwBNAV+R7Xt0sIft7YxhAIidHSphIVm9LyIqj+207UU/mn7dQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gR00x0VTFzfZT for ; Thu, 28 May 2026 08:25:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 245a0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 08:25:21 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 02f9207a8140 - stable/15 - lpd: Avoid buffer overflow when sending a job List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 02f9207a81403d06b7d0cb52e141572ffeafb54a Auto-Submitted: auto-generated Date: Thu, 28 May 2026 08:25:21 +0000 Message-Id: <6a17fbf1.245a0.19cd02b5@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=02f9207a81403d06b7d0cb52e141572ffeafb54a commit 02f9207a81403d06b7d0cb52e141572ffeafb54a Author: Dag-Erling Smørgrav AuthorDate: 2026-05-25 16:51:48 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-28 08:24:16 +0000 lpd: Avoid buffer overflow when sending a job When forwarding a print job to a remote server, we could overflow the command buffer if a control or data file had a very long name. MFC after: 1 week Reported by: Joshua Rogers Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57184 (cherry picked from commit f2c7c5f94803b67a9a6af625d4fc8882d2afda6c) --- usr.sbin/lpr/lpd/printjob.c | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/usr.sbin/lpr/lpd/printjob.c b/usr.sbin/lpr/lpd/printjob.c index 1c6736097492..0e86e8de8fb9 100644 --- a/usr.sbin/lpr/lpd/printjob.c +++ b/usr.sbin/lpr/lpd/printjob.c @@ -68,8 +68,12 @@ /* * The buffer size to use when reading/writing spool files. + * This is also used to compose commands for remote servers and therefore + * needs to be able to fit the longest command we could possibly send. */ -#define SPL_BUFSIZ BUFSIZ +#define SPL_BUFSIZ (BUFSIZ * 2) +_Static_assert(SPL_BUFSIZ > sizeof("x18446744073709551615 ") + PATH_MAX + + sizeof("_c2147483647 "), "SPL_BUFSIZ is too short"); /* * Error tokens @@ -640,7 +644,7 @@ print(struct printer *pp, int format, char *file) if (pp->filters[LPF_INPUT] == NULL && (format == 'f' || format == 'l' || format == 'o')) { pp->tof = 0; - while ((n = read(fi, buf, SPL_BUFSIZ)) > 0) + while ((n = read(fi, buf, sizeof(buf))) > 0) if (write(ofd, buf, n) != n) { (void) close(fi); return (REPRINT); @@ -1127,13 +1131,18 @@ sendfile(struct printer *pp, int type, char *file, char format, int copyreq) sendagain: copycnt++; - if (copycnt < 2) - (void) sprintf(buf, "%c%" PRId64 " %s\n", type, stb.st_size, - file); - else - (void) sprintf(buf, "%c%" PRId64 " %s_c%d\n", type, stb.st_size, - file, copycnt); - amt = strlen(buf); + if (copycnt < 2) { + amt = snprintf(buf, sizeof(buf), "%c%" PRId64 " %s\n", + type, stb.st_size, file); + } else { + amt = snprintf(buf, sizeof(buf), "%c%" PRId64 " %s_c%d\n", + type, stb.st_size, file, copycnt); + } + if (amt >= sizeof(buf)) { + syslog(LOG_ERR, "%s: file name too long", file); + sfres = ERROR; + goto return_sfres; + } for (i = 0; ; i++) { if (write(pfd, buf, amt) != amt || (resp = response(pp)) < 0 || resp == '\1') { @@ -1157,8 +1166,8 @@ sendagain: */ if (type == '\3') trstat_init(pp, file, job_dfcnt); - for (i = 0; i < stb.st_size; i += SPL_BUFSIZ) { - amt = SPL_BUFSIZ; + for (i = 0; i < stb.st_size; i += sizeof(buf)) { + amt = sizeof(buf); if (i + amt > stb.st_size) amt = stb.st_size - i; if (sizerr == 0 && read(sfd, buf, amt) != amt) From nobody Thu May 28 08:25:22 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gR00y4tPNz6fLJS for ; Thu, 28 May 2026 08:25: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gR00y2pHtz3r09 for ; Thu, 28 May 2026 08:25:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779956722; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mWTCymsyzsbcNyFY4fYS01Ukl6qj1otiDUORv68z2fA=; b=ONXoKdnq/69+QKUfWj5XW+dF5LPftbLBhtHYGXbuYa5HrO7I01OHW8mhC5tzCM/VbwBg15 YG1EVGaYXEYKUOA8SxeuR1r+JaaJuEEBeqBrnHN+EiX1N/Q2LrAxELpaztz9vPLCjNnxRZ fBy5EMd9XchFe4MH1R4AwZgGPMutiCZ6hDL7JB5BkesxXTczDKc8y1xG2FFS/z2JgHRmYn bIHPf/+mxXWTVPjQJXwzCDdn7JLo3Q8FbeBVJb9tlgri0NDPEdGSYPBGoPfrfcLfGZqjqQ KNcxzY2/8iUa0pxUBEwJoPCkvexPG2shQ8iAzXzBCuG9tsav94E5bBONtHLHUA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779956722; a=rsa-sha256; cv=none; b=wYLCRiezihrDVbMS6Ml4r7Uzlb7yVyLDjnzwwXjiaxa1Y7JioBbPObHR725cIMWOLT4WTD 5Qnlp9JSMYOxJor31kuGvFSk7Owr88/j9pzVKtTpAvUSY/LS/maQUF4QAQW8xI8PloIbXQ jV6jC+dR0FGIUNLfPPb0a9AM3G1pOmfqunxw71cXUvu2ZRkEzaA6/zIk1cD1OYAZBJIsH0 A9OesL8jPsgqYd3PpxRdCjzkIIsq/dWC7wUbbHagqYD5EcIZbz0me5Y6RsL2kz/W4M208D qOznodT8hvjJptMCHpUH2SLaRR/V++xPQufW3rnB4xb6DtiqP29UKKwOYKhMKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779956722; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mWTCymsyzsbcNyFY4fYS01Ukl6qj1otiDUORv68z2fA=; b=dla1kMMt9dHKQdXzrWX6IBBfWR4FsmHO7Xt4L5oVN7MNUXno59jNOdThjy182g4ar8FOlL Cy4tZo85H9qkLmuIw0dVevcvTRTVR/vODvMUKj5NimpPbXjP7UQxrBYK34O+yUH0f9tSoY OfWSPqlNGh1Qmwf56xqPjRyuOj81cfOozMPXOEYPnm+6824EOyavkGD7aW1jaP2m5LDk43 7MkXJX83D91SJ9CEk+e9CQfSKHIJ75wBtV3rIjKPpQ9eUrx4IT7h0KsNn3Bha0Ys/31egS t7EKQ+zUJIxar1qrU73NM9rtqtKrgulVXZsFJ/dqOnlHhpuXqHUuk6kG+o8Mbg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gR00y1P64zfCZ for ; Thu, 28 May 2026 08:25:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 24aea by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 08:25:22 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: b3a76ab96216 - stable/15 - lpd: Fix issues reported by clang-analyzer List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: b3a76ab96216f87076c30001615c6be45f1efa85 Auto-Submitted: auto-generated Date: Thu, 28 May 2026 08:25:22 +0000 Message-Id: <6a17fbf2.24aea.79fcb180@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=b3a76ab96216f87076c30001615c6be45f1efa85 commit b3a76ab96216f87076c30001615c6be45f1efa85 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-25 16:51:53 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-28 08:24:16 +0000 lpd: Fix issues reported by clang-analyzer Also, unlink our temporary file if we fail to chmod it. MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57185 (cherry picked from commit 0f3e14870906da22a7ca821fb2153d375157cac2) --- usr.sbin/lpr/lpd/printjob.c | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/usr.sbin/lpr/lpd/printjob.c b/usr.sbin/lpr/lpd/printjob.c index 0e86e8de8fb9..5ed7f0409679 100644 --- a/usr.sbin/lpr/lpd/printjob.c +++ b/usr.sbin/lpr/lpd/printjob.c @@ -155,7 +155,7 @@ printjob(struct printer *pp) register int i, nitems; off_t pidoff; pid_t printpid; - int errcnt, jobcount, statok, tempfd; + int errcnt, jobcount, tempfd; jobcount = 0; init(pp); /* set up capabilities */ @@ -190,9 +190,6 @@ printjob(struct printer *pp) pp->spool_dir); exit(1); } - statok = stat(pp->lock_file, &stb); - if (statok == 0 && (stb.st_mode & LFM_PRINT_DIS)) - exit(0); /* printing disabled */ umask(S_IWOTH); lfd = open(pp->lock_file, O_WRONLY|O_CREAT|O_EXLOCK|O_NONBLOCK, LOCK_FILE_MODE); @@ -203,12 +200,14 @@ printjob(struct printer *pp) pp->lock_file); exit(1); } - /* - * If the initial call to stat() failed, then lock_file will have - * been created by open(). Update &stb to match that new file. - */ - if (statok != 0) - statok = stat(pp->lock_file, &stb); + if (fstat(lfd, &stb) != 0) { + syslog(LOG_ERR, "%s: fstat(%s): %m", pp->printer, + pp->lock_file); + exit(1); + } + if ((stb.st_mode & LFM_PRINT_DIS) != 0) { + exit(0); /* printing disabled */ + } /* turn off non-blocking mode (was turned on for lock effects only) */ if (fcntl(lfd, F_SETFL, 0) < 0) { syslog(LOG_ERR, "%s: fcntl(%s): %m", pp->printer, @@ -219,8 +218,7 @@ printjob(struct printer *pp) /* * write process id for others to know */ - sprintf(line, "%u\n", printpid); - pidoff = i = strlen(line); + pidoff = i = snprintf(line, sizeof(line), "%u\n", printpid); if (write(lfd, line, i) != i) { syslog(LOG_ERR, "%s: write(%s): %m", pp->printer, pp->lock_file); @@ -248,9 +246,10 @@ printjob(struct printer *pp) tempstderr); exit(1); } - if ((i = fchmod(tempfd, 0664)) == -1) { + if (fchmod(tempfd, 0664) == -1) { syslog(LOG_ERR, "%s: fchmod(%s): %m", pp->printer, tempstderr); + (void) unlink(tempstderr); exit(1); } /* lpd doesn't need it to be open, it just needs it to exist */ @@ -362,15 +361,18 @@ again: goto again; } -char fonts[4][50]; /* fonts for troff */ +char fonts[4][64]; /* fonts for troff */ -char ifonts[4][40] = { +char ifonts[4][64] = { _PATH_VFONTR, _PATH_VFONTI, _PATH_VFONTB, _PATH_VFONTS, }; +_Static_assert(sizeof(fonts) == sizeof(ifonts), "fonts != ifonts"); +_Static_assert(sizeof(fonts[0]) == sizeof(ifonts[0]), "fonts[0] != ifonts[0]"); + /* * The remaining part is the reading of the control file (cf) * and performing the various actions. @@ -394,10 +396,9 @@ printit(struct printer *pp, char *file) /* * Reset troff fonts. */ - for (i = 0; i < 4; i++) - strcpy(fonts[i], ifonts[i]); + memcpy(fonts, ifonts, sizeof(fonts)); sprintf(&width[2], "%ld", pp->page_width); - strcpy(indent+2, "0"); + strcpy(indent, "-i0"); /* initialize job-specific count of datafiles processed */ job_dfcnt = 0; @@ -945,7 +946,7 @@ sendit(struct printer *pp, char *file) strlcpy(indent+2, line + 1, sizeof(indent) - 2); } else if (line[0] >= 'a' && line[0] <= 'z') { dfcopies = 1; - strcpy(last, line); + memcpy(last, line, sizeof(last)); while ((i = get_line(cfp)) != 0) { if (strcmp(last, line) != 0) break; From nobody Thu May 28 08:25:23 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gR00z6f3Mz6fLWg for ; Thu, 28 May 2026 08:25: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gR00z3LZhz3qx8 for ; Thu, 28 May 2026 08: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=1779956723; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xVptw6WZjdzFPcEXW1eKvKGZ6cqDtDZeAb4u+XmiUnQ=; b=M2gKz3VTsChKcexn7UI5sAkUrXejdIoeZ4yudmRkJKlAT5J3nMeFMOXKsJ6pFz72+fiWZ/ mDOGUhcIG/4zaSGgEcNyee4TJREpp3U6lli2t4oX4VzbvneQ4Ypt8TDaOlIOLalkf0h3np pfXp4Ql/esPiV44Ftn3VlH0+2b+eoUUUJXecPmOyMQkdA7cZqIbwBcJiVnZ4AohEx/7j5W TP0Q2j8ofR3jiGO0E/Abrzk5Flbctxv00FTS7TdK6zwoISJGJpUusb/6gK7mIvXgJ2zXnr jNw/alr8aCtwO4np2gBDkOYoyfgQ5sd/IInNEL/ilH5VaYsG5j60V84nrfrpkA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779956723; a=rsa-sha256; cv=none; b=v37uARBM1hQO7BYQCdvMGi6G4cF3P/UJ/u8/O6oQZGyQgOtWLroXI5gsfFNLY4pb75kGe2 GBH2QD2sWTvGF9GH1Uob4pXaSeumL/yco4dBl+iugwnw7vO1GdX5GNeYzcSLdpsqhocIrS kRe0PQGNPNWDEe51j9W0G2Z/FxcKkPZ4kzufbSGBrqg0DYcrO0j3EBJheQIM0b1AsAe/Or ZepS73S1P4EPDyn9DPbNvA7guFlWwm7HEEvQ0cO91Mm5xmGgcV3omUNlPXcMuSPP2pHGpx Xewv9YWVvy5cdzUkAjmebYG/2N4DyDN/m5mhRB3lWH0OWUPEeIPEiqvSj8KzwA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779956723; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xVptw6WZjdzFPcEXW1eKvKGZ6cqDtDZeAb4u+XmiUnQ=; b=e635VoifFGrkS3lJh866q5etk2NiYyfpEWxVChtjssHalbYxIo1CL5mp75380e40/JzRPt 0lRjiMkYInYB+2j/uJXK3hGAXrJp5HEybB94WVkMVxTsj7GYf6KzcRbYNYOfRflOi92LAU UEOAcRktU4T8N7cDebwdYpSWYq8Jm4DdgoXvOmNGrRHGzKBOz9V4r+gqWXVykf3U0Ck1IQ jLRtDXiGA0kZiTT5uQ+yG1LB+sTFFHiKBOp1qnP9+wArSeVAN79nlf5FrG5kWVoHhW2KCU 5jpGNWoWvtf9ItPbeoRFA3KWbRzeD0V0Hm3qKLxEIujEFprVOjduveIECMXP6w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gR00z2Gg9zfCb for ; Thu, 28 May 2026 08:25:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 245a4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 08:25:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: c4a0289976bf - stable/15 - lpd: Style and whitespace cleanup List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: c4a0289976bfac652067c47c6c4b744743e8edc5 Auto-Submitted: auto-generated Date: Thu, 28 May 2026 08:25:23 +0000 Message-Id: <6a17fbf3.245a4.346c5074@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=c4a0289976bfac652067c47c6c4b744743e8edc5 commit c4a0289976bfac652067c47c6c4b744743e8edc5 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-25 16:51:58 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-28 08:24:16 +0000 lpd: Style and whitespace cleanup No functional change intended. MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57186 (cherry picked from commit 123591e41c559fc2ae0f179f1385df05132881da) --- usr.sbin/lpr/lpd/printjob.c | 189 +++++++++++++++++++++----------------------- 1 file changed, 91 insertions(+), 98 deletions(-) diff --git a/usr.sbin/lpr/lpd/printjob.c b/usr.sbin/lpr/lpd/printjob.c index 5ed7f0409679..9173b69a36b9 100644 --- a/usr.sbin/lpr/lpd/printjob.c +++ b/usr.sbin/lpr/lpd/printjob.c @@ -136,10 +136,10 @@ static int printit(struct printer *_pp, char *_file); static void pstatus(const struct printer *_pp, const char *_msg, ...) __printflike(2, 3); static char response(const struct printer *_pp); -static void scan_out(struct printer *_pp, int _scfd, char *_scsp, +static void scan_out(struct printer *_pp, int _scfd, char *_scsp, int _dlm); static char *scnline(int _key, char *_p, int _c); -static int sendfile(struct printer *_pp, int _type, char *_file, +static int sendfile(struct printer *_pp, int _type, char *_file, char _format, int _copyreq); static int sendit(struct printer *_pp, char *_file); static void sendmail(struct printer *_pp, char *_userid, int _bombed); @@ -150,18 +150,17 @@ void printjob(struct printer *pp) { struct stat stb; - register struct jobqueue *q, **qp; + struct jobqueue *q, **qp; struct jobqueue **queue; - register int i, nitems; off_t pidoff; pid_t printpid; - int errcnt, jobcount, tempfd; + int i, errcnt, jobcount, nitems, tempfd; jobcount = 0; init(pp); /* set up capabilities */ (void) write(STDOUT_FILENO, "", 1); /* ack that daemon is started */ (void) close(STDERR_FILENO); /* set up log file */ - if (open(pp->log_file, O_WRONLY|O_APPEND, LOG_FILE_MODE) < 0) { + if (open(pp->log_file, O_WRONLY | O_APPEND, LOG_FILE_MODE) < 0) { syslog(LOG_ERR, "%s: open(%s): %m", pp->printer, pp->log_file); (void) open(_PATH_DEVNULL, O_WRONLY); @@ -191,8 +190,8 @@ printjob(struct printer *pp) exit(1); } umask(S_IWOTH); - lfd = open(pp->lock_file, O_WRONLY|O_CREAT|O_EXLOCK|O_NONBLOCK, - LOCK_FILE_MODE); + lfd = open(pp->lock_file, O_WRONLY | O_CREAT | O_EXLOCK | O_NONBLOCK, + LOCK_FILE_MODE); if (lfd < 0) { if (errno == EWOULDBLOCK) /* active daemon present */ exit(0); @@ -228,7 +227,7 @@ printjob(struct printer *pp) * search the spool directory for work and sort by queue order. */ if ((nitems = getq(pp, &queue)) < 0) { - syslog(LOG_ERR, "%s: can't scan %s", pp->printer, + syslog(LOG_ERR, "%s: can't scan %s", pp->printer, pp->spool_dir); exit(1); } @@ -262,7 +261,7 @@ again: * write the name of the current control file into the lock file * so the spool queue program can tell what we're working on */ - for (qp = queue; nitems--; free((char *) q)) { + for (qp = queue; nitems--; free(q)) { q = *qp++; if (stat(q->job_cfname, &stb) < 0) continue; @@ -315,12 +314,12 @@ again: } (void) close(pfd); /* close printer */ if (ftruncate(lfd, pidoff) < 0) - syslog(LOG_WARNING, "%s: ftruncate(%s): %m", + syslog(LOG_WARNING, "%s: ftruncate(%s): %m", pp->printer, pp->lock_file); openpr(pp); /* try to reopen printer */ goto restart; } else { - syslog(LOG_WARNING, "%s: job could not be %s (%s)", + syslog(LOG_WARNING, "%s: job could not be %s (%s)", pp->printer, pp->remote ? "sent to remote host" : "printed", q->job_cfname); @@ -380,9 +379,8 @@ _Static_assert(sizeof(fonts[0]) == sizeof(ifonts[0]), "fonts[0] != ifonts[0]"); static int printit(struct printer *pp, char *file) { - register int i; char *cp; - int bombed, didignorehdr; + int bombed, didignorehdr, i; bombed = OK; didignorehdr = 0; @@ -402,7 +400,7 @@ printit(struct printer *pp, char *file) /* initialize job-specific count of datafiles processed */ job_dfcnt = 0; - + /* * read the control file for work to do * @@ -450,7 +448,7 @@ printit(struct printer *pp, char *file) case 'H': strlcpy(origin_host, line + 1, sizeof(origin_host)); if (class[0] == '\0') { - strlcpy(class, line+1, sizeof(class)); + strlcpy(class, line + 1, sizeof(class)); } continue; @@ -459,14 +457,14 @@ printit(struct printer *pp, char *file) if (pp->restricted) { /* restricted */ if (getpwnam(logname) == NULL) { bombed = NOACCT; - sendmail(pp, line+1, bombed); + sendmail(pp, line + 1, bombed); goto pass2; } } continue; case 'S': - cp = line+1; + cp = line + 1; i = 0; while (*cp >= '0' && *cp <= '9') i = i * 10 + (*cp++ - '0'); @@ -502,7 +500,7 @@ printit(struct printer *pp, char *file) case 'L': /* identification line */ if (!pp->no_header && !pp->header_last) - banner(pp, line+1, jobname); + banner(pp, line + 1, jobname); continue; case '1': /* troff fonts */ @@ -516,11 +514,11 @@ printit(struct printer *pp, char *file) continue; case 'W': /* page width */ - strlcpy(width+2, line + 1, sizeof(width) - 2); + strlcpy(width + 2, line + 1, sizeof(width) - 2); continue; case 'I': /* indent amount */ - strlcpy(indent+2, line + 1, sizeof(indent) - 2); + strlcpy(indent + 2, line + 1, sizeof(indent) - 2); continue; case 'Z': /* locale for pr */ @@ -542,7 +540,7 @@ printit(struct printer *pp, char *file) pp->printer, line[0], &line[1]); continue; } - i = print(pp, line[0], line+1); + i = print(pp, line[0], line + 1); switch (i) { case ERROR: if (bombed == OK) @@ -574,18 +572,18 @@ pass2: switch (line[0]) { case 'L': /* identification line */ if (!pp->no_header && pp->header_last) - banner(pp, line+1, jobname); + banner(pp, line + 1, jobname); continue; case 'M': if (bombed < NOACCT) /* already sent if >= NOACCT */ - sendmail(pp, line+1, bombed); + sendmail(pp, line + 1, bombed); continue; case 'U': - if (strchr(line+1, '/')) + if (strchr(line + 1, '/')) continue; - (void) unlink(line+1); + (void) unlink(line + 1); } /* * clean-up in case another control file exists @@ -608,14 +606,13 @@ pass2: static int print(struct printer *pp, int format, char *file) { - register int n, i; - register char *prog; - int fi, fo; + char buf[SPL_BUFSIZ]; + struct stat stb; + char *av[15]; + char *prog; FILE *fp; - char *av[15], buf[SPL_BUFSIZ]; pid_t wpid; - int p[2], retcode, stopped, wstatus, wstatus_set; - struct stat stb; + int fi, fo, i, n, p[2], retcode, stopped, wstatus, wstatus_set; /* Make sure the entire data file has arrived. */ wait4data(pp, file); @@ -679,7 +676,7 @@ print(struct printer *pp, int format, char *file) execl(_PATH_PR, "pr", width, length, "-h", *title ? title : " ", "-L", *locale ? locale : "C", - "-F", (char *)0); + "-F", NULL); syslog(LOG_ERR, "cannot execl %s", _PATH_PR); exit(2); } @@ -728,7 +725,7 @@ print(struct printer *pp, int format, char *file) case 'd': /* print tex output */ (void) unlink(".railmag"); if ((fo = creat(".railmag", FILMOD)) < 0) { - syslog(LOG_ERR, "%s: cannot create .railmag", + syslog(LOG_ERR, "%s: cannot create .railmag", pp->printer); (void) unlink(".railmag"); } else { @@ -741,7 +738,7 @@ print(struct printer *pp, int format, char *file) } (void) close(fo); } - prog = (format == 't') ? pp->filters[LPF_TROFF] + prog = (format == 't') ? pp->filters[LPF_TROFF] : ((format == 'n') ? pp->filters[LPF_DITROFF] : pp->filters[LPF_DVI]); av[1] = pxwidth; @@ -815,7 +812,7 @@ start: dup2(fo, STDOUT_FILENO); /* setup stderr for the filter (child process) * so it goes to our temporary errors file */ - n = open(tempstderr, O_WRONLY|O_TRUNC, 0664); + n = open(tempstderr, O_WRONLY | O_TRUNC, 0664); if (n >= 0) dup2(n, STDERR_FILENO); closelog(); @@ -887,8 +884,9 @@ start: static int sendit(struct printer *pp, char *file) { + char last[sizeof(line)]; + char *cp; int dfcopies, err, i; - char *cp, last[sizeof(line)]; /* * open control file @@ -918,7 +916,7 @@ sendit(struct printer *pp, char *file) while (get_line(cfp)) { again: if (line[0] == 'S') { - cp = line+1; + cp = line + 1; i = 0; while (*cp >= '0' && *cp <= '9') i = i * 10 + (*cp++ - '0'); @@ -937,13 +935,13 @@ sendit(struct printer *pp, char *file) strlcpy(logname, line + 1, sizeof(logname)); if (pp->restricted) { /* restricted */ if (getpwnam(logname) == NULL) { - sendmail(pp, line+1, NOACCT); + sendmail(pp, line + 1, NOACCT); err = ERROR; break; } } } else if (line[0] == 'I') { - strlcpy(indent+2, line + 1, sizeof(indent) - 2); + strlcpy(indent + 2, line + 1, sizeof(indent) - 2); } else if (line[0] >= 'a' && line[0] <= 'z') { dfcopies = 1; memcpy(last, line, sizeof(last)); @@ -952,7 +950,7 @@ sendit(struct printer *pp, char *file) break; dfcopies++; } - switch (sendfile(pp, '\3', last+1, *last, dfcopies)) { + switch (sendfile(pp, '\3', last + 1, *last, dfcopies)) { case OK: if (i) goto again; @@ -977,8 +975,8 @@ sendit(struct printer *pp, char *file) */ fseek(cfp, 0L, 0); while (get_line(cfp)) - if (line[0] == 'U' && !strchr(line+1, '/')) - (void) unlink(line+1); + if (line[0] == 'U' && !strchr(line + 1, '/')) + (void) unlink(line + 1); /* * clean-up in case another control file exists */ @@ -994,11 +992,10 @@ sendit(struct printer *pp, char *file) static int sendfile(struct printer *pp, int type, char *file, char format, int copyreq) { - int i, amt; + char buf[SPL_BUFSIZ], opt_c[4], opt_h[4], opt_n[4]; struct stat stb; char *av[15], *filtcmd; - char buf[SPL_BUFSIZ], opt_c[4], opt_h[4], opt_n[4]; - int copycnt, filtstat, narg, resp, sfd, sfres, sizerr, statrc; + int amt, copycnt, filtstat, i, narg, resp, sfd, sfres, sizerr, statrc; /* Make sure the entire data file has arrived. */ wait4data(pp, file); @@ -1258,12 +1255,12 @@ return_sfres: static void wait4data(struct printer *pp, const char *dfile) { + struct stat statdf; const char *cp; - int statres; - u_int sleepreq; size_t dlen, hlen; time_t amtslept, cur_time, prev_mtime; - struct stat statdf; + unsigned int sleepreq; + int statres; /* Skip these checks if the print job is from the local host. */ dlen = strlen(dfile); @@ -1348,10 +1345,11 @@ wait4data(struct printer *pp, const char *dfile) static int execfilter(struct printer *pp, char *f_cmd, char *f_av[], int infd, int outfd) { + char buf[BUFSIZ]; + char *slash; + FILE *errfp; pid_t fpid, wpid; int errfd, retcode, wstatus; - FILE *errfp; - char buf[BUFSIZ], *slash; fpid = dofork(pp, DORETURN); if (fpid != 0) { @@ -1413,7 +1411,7 @@ execfilter(struct printer *pp, char *f_cmd, char *f_av[], int infd, int outfd) */ dup2(infd, STDIN_FILENO); dup2(outfd, STDOUT_FILENO); - errfd = open(tempstderr, O_WRONLY|O_TRUNC, 0664); + errfd = open(tempstderr, O_WRONLY | O_TRUNC, 0664); if (errfd >= 0) dup2(errfd, STDERR_FILENO); closelog(); @@ -1486,7 +1484,7 @@ banner(struct printer *pp, char *name1, char *name2) static char * scnline(int key, char *p, int c) { - register int scnwidth; + int scnwidth; for (scnwidth = WIDTH; --scnwidth;) { key <<= 1; @@ -1500,12 +1498,12 @@ scnline(int key, char *p, int c) static void scan_out(struct printer *pp, int scfd, char *scsp, int dlm) { - register char *strp; - register int nchrs, j; - char outbuf[LINELEN+1], *sp, c, cc; - int d, scnhgt; + char outbuf[LINELEN + 1]; + char *sp, *strp; + int d, j, nchrs, scnhgt; + char c, cc; - for (scnhgt = 0; scnhgt++ < HEIGHT+DROP; ) { + for (scnhgt = 0; scnhgt++ < HEIGHT + DROP; ) { strp = &outbuf[0]; sp = scsp; for (nchrs = 0; ; ) { @@ -1514,9 +1512,10 @@ scan_out(struct printer *pp, int scfd, char *scsp, int dlm) for (j = WIDTH; --j;) *strp++ = BACKGND; else - strp = scnline(scnkey[(int)c][scnhgt-1-d], strp, cc); - if (*sp == dlm || *sp == '\0' || - nchrs++ >= pp->page_width/(WIDTH+1)-1) + strp = scnline(scnkey[(int)c][scnhgt - 1 - d], + strp, cc); + if (*sp == dlm || *sp == '\0' || + nchrs++ >= pp->page_width / (WIDTH + 1) - 1) break; *strp++ = BACKGND; *strp++ = BACKGND; @@ -1532,8 +1531,7 @@ scan_out(struct printer *pp, int scfd, char *scsp, int dlm) static int dropit(int c) { - switch(c) { - + switch (c) { case TRC('_'): case TRC(';'): case TRC(','): @@ -1543,7 +1541,6 @@ dropit(int c) case TRC('q'): case TRC('y'): return (DROP); - default: return (0); } @@ -1556,11 +1553,10 @@ dropit(int c) static void sendmail(struct printer *pp, char *userid, int bombed) { - register int i; - int p[2], s; - register const char *cp; struct stat stb; FILE *fp; + const char *cp; + int i, p[2], s; pipe(p); if ((s = dofork(pp, DORETURN)) == 0) { /* child */ @@ -1571,7 +1567,7 @@ sendmail(struct printer *pp, char *userid, int bombed) cp++; else cp = _PATH_SENDMAIL; - execl(_PATH_SENDMAIL, cp, "-t", (char *)0); + execl(_PATH_SENDMAIL, cp, "-t", NULL); _exit(0); } else if (s > 0) { /* parent */ dup2(p[1], STDOUT_FILENO); @@ -1600,8 +1596,8 @@ sendmail(struct printer *pp, char *userid, int bombed) break; case FILTERERR: cp = "FILTERERR"; - if (stat(tempstderr, &stb) < 0 || stb.st_size == 0 - || (fp = fopen(tempstderr, "r")) == NULL) { + if (stat(tempstderr, &stb) < 0 || stb.st_size == 0 || + (fp = fopen(tempstderr, "r")) == NULL) { printf("\nhad some errors and may not have printed\n"); break; } @@ -1633,9 +1629,9 @@ sendmail(struct printer *pp, char *userid, int bombed) static int dofork(const struct printer *pp, int action) { + struct passwd *pwd; pid_t forkpid; int i, fail; - struct passwd *pwd; forkpid = -1; if (daemon_uname == NULL) { @@ -1714,7 +1710,6 @@ error_ret: static void abortpr(int signo __unused) { - (void) unlink(tempstderr); kill(0, SIGINT); if (of_pid > 0) @@ -1744,12 +1739,13 @@ init(struct printer *pp) void startprinting(const char *printer) { - struct printer myprinter, *pp = &myprinter; + struct printer myprinter; + struct printer *pp = &myprinter; int status; init_printer(pp); status = getprintcap(printer, pp); - switch(status) { + switch (status) { case PCAPERR_OSERR: syslog(LOG_ERR, "can't open printer description file: %m"); exit(1); @@ -1770,8 +1766,8 @@ startprinting(const char *printer) static void openpr(const struct printer *pp) { - int p[2]; char *cp; + int p[2]; if (pp->remote) { openrem(pp); @@ -1782,7 +1778,7 @@ openpr(const struct printer *pp) * local print queues. For remote machines, all 'of=' * filter processing is handled in sendfile(), and that * does not use these global "output filter" variables. - */ + */ ofd = -1; of_pid = 0; return; @@ -1816,8 +1812,7 @@ openpr(const struct printer *pp) cp = pp->filters[LPF_OUTPUT]; else cp++; - execl(pp->filters[LPF_OUTPUT], cp, width, length, - (char *)0); + execl(pp->filters[LPF_OUTPUT], cp, width, length, NULL); syslog(LOG_ERR, "%s: execl(%s): %m", pp->printer, pp->filters[LPF_OUTPUT]); exit(1); @@ -1837,11 +1832,10 @@ openpr(const struct printer *pp) static void opennet(const struct printer *pp) { - register int i; - int resp; - u_long port; - char *ep; void (*savealrm)(int); + char *ep; + unsigned long port; + int i, resp; port = strtoul(pp->lp, &ep, 0); if (*ep != '@' || port > 65535) { @@ -1874,7 +1868,7 @@ opennet(const struct printer *pp) pstatus(pp, "waiting for %s to come up", pp->lp); else - pstatus(pp, + pstatus(pp, "waiting for access to printer on %s", pp->lp); } @@ -1889,7 +1883,7 @@ opennet(const struct printer *pp) static void opentty(const struct printer *pp) { - register int i; + int i; for (i = 1; ; i = i < 32 ? i << 1 : i) { pfd = open(pp->lp, pp->rw ? O_RDWR : O_WRONLY); @@ -1902,7 +1896,7 @@ opentty(const struct printer *pp) exit(1); } if (i == 1) - pstatus(pp, + pstatus(pp, "waiting for %s to become ready (offline?)", pp->printer); sleep(i); @@ -1918,9 +1912,8 @@ opentty(const struct printer *pp) static void openrem(const struct printer *pp) { - register int i; - int resp; void (*savealrm)(int); + int i, resp; for (i = 1; ; i = i < 256 ? i << 1 : i) { resp = -1; @@ -1930,16 +1923,15 @@ openrem(const struct printer *pp) alarm(0); (void)signal(SIGALRM, savealrm); if (pfd >= 0) { - if ((writel(pfd, "\2", pp->remote_queue, "\n", - (char *)0) - == 2 + strlen(pp->remote_queue)) - && (resp = response(pp)) == 0) + if (writel(pfd, "\2", pp->remote_queue, "\n", NULL) == + 2 + strlen(pp->remote_queue) && + (resp = response(pp)) == 0) break; (void) close(pfd); } if (i == 1) { if (resp < 0) - pstatus(pp, "waiting for %s to come up", + pstatus(pp, "waiting for %s to come up", pp->remote_host); else { pstatus(pp, @@ -1961,7 +1953,7 @@ setty(const struct printer *pp) { struct termios ttybuf; - if (ioctl(pfd, TIOCEXCL, (char *)0) < 0) { + if (ioctl(pfd, TIOCEXCL, NULL) < 0) { syslog(LOG_ERR, "%s: ioctl(TIOCEXCL): %m", pp->printer); exit(1); } @@ -1990,22 +1982,23 @@ setty(const struct printer *pp) static void pstatus(const struct printer *pp, const char *msg, ...) { - int fd; - char *buf; va_list ap; - va_start(ap, msg); + char *buf; + int fd; umask(S_IWOTH); - fd = open(pp->status_file, O_WRONLY|O_CREAT|O_EXLOCK, STAT_FILE_MODE); + fd = open(pp->status_file, O_WRONLY | O_CREAT | O_EXLOCK, + STAT_FILE_MODE); if (fd < 0) { syslog(LOG_ERR, "%s: open(%s): %m", pp->printer, pp->status_file); exit(1); } ftruncate(fd, 0); + va_start(ap, msg); vasprintf(&buf, msg, ap); va_end(ap); - writel(fd, buf, "\n", (char *)0); + writel(fd, buf, "\n", NULL); close(fd); free(buf); } From nobody Thu May 28 08:27:25 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gR03L67MGz6fLd0 for ; Thu, 28 May 2026 08:27: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gR03L4dLFz3sbl for ; Thu, 28 May 2026 08:27:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779956846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AoH00mGGre+DI67Sgmp3GHOwGWMyQJaai5DCgcH908s=; b=n7Nkh92U0vG3ggt6mL2/P0X2pc7N6BKboyC08AAZ7QUt3SkcnPySdpis2SUWuxi/6ktfVa 4+8Iuytk2k+WX3Hk1xKF37TE1eE29ZiWNq7+4YjQBGpZxEKubl2UZHL6L+ayK5ZRlRPAEv 7BYHciyyA+DR7pc30amixCgQ8LenU/3q5vJK//p+J8RxHc+WAgxJOY64jnBbKg8p9aZERl 1wYvGc97XsJB3rvQ9z4grn0YVl34gRX40+Tb9IykQnY2gUHXjyWzX77JwcqBm06ymxsCWw VlvR9gl7WQBPh21o3HX7Qw3LGGoLuhrt94aGBGAWUe+k9u2Og/8OwcLczjstKg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779956846; a=rsa-sha256; cv=none; b=cg0gaPKzx8ykd5Yf353XxopOBx93XmuDjEb4QJAVTqfM9m+ft7sWohwsq4DabKY06qz2T8 bt7koKGa5h9yVNVim/WWgKk7sYfhuK/h6c2ndJpRbnnjsxr4cTKLBgkzXkC6/8HPbFcJoQ BSehMGiBm5Lwj10c6RJa8cOw0N/tFR98ieeTq7YcOd8hLZhk/de1TaCCHpL5tdx2pf9QWq GvcKf0QU+RCQMrX+2yd6XZNwkcyHUcbMdNMwQOB27V28Kn6fF3xEH2xWhILQ/RayP81+rF otX/YIC5G/z0prd0O1eLBlBHtuLZKt/4w0Nwch7ZMMfZ9jalkkwFYvnhdoe05A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779956846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AoH00mGGre+DI67Sgmp3GHOwGWMyQJaai5DCgcH908s=; b=Ve8FqpWQ+nzMNujSX3gRFu8nFIBqlHdenqHSvh6G/igvFGlCs3eeNKdph0ixd6W0VonLu7 BUcWUeovBX/OSNuXdSRTXR5bB8oFV7KjtIrrdH2xEs7I2yxZkQXiVa/nyn6cA+1CDE0g+F 62s0DSZSqp7idtJZWzrRmA1PlQEh+0LCfhp1K3aQcOU/nUjE6JBxU5qME1ov7/VQyDa6CB cmuwGx2f5vQHVyy4QjvRwO5eqqBysgVEb+osR52X+i96WJTU0WWIMG0kDuQbFiFrhR0jAX SmFTTMw3zjMTzAmH2GFEY87thiMn9TlpkvkZLqt3TIk02tOf/msJyfqvfYUO8Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gR03K70c8zf8j for ; Thu, 28 May 2026 08:27:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 22c2f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 08:27:25 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: b734006cafa1 - stable/14 - lpr: Add deprecation notice List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b734006cafa1915922de2a6a3a0aee9969d28d04 Auto-Submitted: auto-generated Date: Thu, 28 May 2026 08:27:25 +0000 Message-Id: <6a17fc6d.22c2f.42da5e58@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=b734006cafa1915922de2a6a3a0aee9969d28d04 commit b734006cafa1915922de2a6a3a0aee9969d28d04 Author: Dag-Erling Smørgrav AuthorDate: 2026-02-19 17:55:06 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-28 08:26:48 +0000 lpr: Add deprecation notice These programs require elevated privileges to work and have not seen regular maintenance in decades. Unless someone steps up and overhauls them, we will have to remove them before 16.0. Better-maintained alternatives are available in ports (print/cups, sysutils/LPRng). MFC after: 3 days (cherry picked from commit d57dee7ab66f60537b557cb602be194e3eed253d) --- usr.sbin/lpr/chkprintcap/chkprintcap.8 | 3 +++ usr.sbin/lpr/lp/lp.1 | 3 +++ usr.sbin/lpr/lpc/lpc.8 | 3 +++ usr.sbin/lpr/lpd/lpd.8 | 3 +++ usr.sbin/lpr/lpq/lpq.1 | 3 +++ usr.sbin/lpr/lpr/lpr.1 | 3 +++ usr.sbin/lpr/lpr/printcap.5 | 3 +++ usr.sbin/lpr/lprm/lprm.1 | 3 +++ usr.sbin/lpr/lptest/lptest.1 | 3 +++ usr.sbin/lpr/pac/pac.8 | 3 +++ 10 files changed, 30 insertions(+) diff --git a/usr.sbin/lpr/chkprintcap/chkprintcap.8 b/usr.sbin/lpr/chkprintcap/chkprintcap.8 index 7aecf9fbb1b7..1e9638c2b5aa 100644 --- a/usr.sbin/lpr/chkprintcap/chkprintcap.8 +++ b/usr.sbin/lpr/chkprintcap/chkprintcap.8 @@ -34,6 +34,9 @@ .Nm .Op Fl d .Op Fl f Ar printcap +.Sh DEPRECATION NOTICE +This facility is scheduled for removal prior to the release of +.Fx 16.0 . .Sh DESCRIPTION The .Nm diff --git a/usr.sbin/lpr/lp/lp.1 b/usr.sbin/lpr/lp/lp.1 index 907ce867279e..fee272c456e5 100644 --- a/usr.sbin/lpr/lp/lp.1 +++ b/usr.sbin/lpr/lp/lp.1 @@ -44,6 +44,9 @@ .Op Fl d Ar printer .Op Fl n Ar num .Op Ar name ... +.Sh DEPRECATION NOTICE +This facility is scheduled for removal prior to the release of +.Fx 16.0 . .Sh DESCRIPTION The .Nm diff --git a/usr.sbin/lpr/lpc/lpc.8 b/usr.sbin/lpr/lpc/lpc.8 index 4fad123a0642..5a52af061c43 100644 --- a/usr.sbin/lpr/lpc/lpc.8 +++ b/usr.sbin/lpr/lpc/lpc.8 @@ -36,6 +36,9 @@ .Sh SYNOPSIS .Nm .Op Ar command Op Ar argument ... +.Sh DEPRECATION NOTICE +This facility is scheduled for removal prior to the release of +.Fx 16.0 . .Sh DESCRIPTION The .Nm diff --git a/usr.sbin/lpr/lpd/lpd.8 b/usr.sbin/lpr/lpd/lpd.8 index 97f1acb23032..83b8c457d969 100644 --- a/usr.sbin/lpr/lpd/lpd.8 +++ b/usr.sbin/lpr/lpd/lpd.8 @@ -38,6 +38,9 @@ .Op Fl cdlpsFW46 .Op Fl t Ar timeout .Op Ar port# +.Sh DEPRECATION NOTICE +This facility is scheduled for removal prior to the release of +.Fx 16.0 . .Sh DESCRIPTION The .Nm diff --git a/usr.sbin/lpr/lpq/lpq.1 b/usr.sbin/lpr/lpq/lpq.1 index 7ad5675ceb02..d0394e6a0279 100644 --- a/usr.sbin/lpr/lpq/lpq.1 +++ b/usr.sbin/lpr/lpq/lpq.1 @@ -40,6 +40,9 @@ .Op Fl P Ns Ar printer .Op job # ...\& .Op user ...\& +.Sh DEPRECATION NOTICE +This facility is scheduled for removal prior to the release of +.Fx 16.0 . .Sh DESCRIPTION The .Nm diff --git a/usr.sbin/lpr/lpr/lpr.1 b/usr.sbin/lpr/lpr/lpr.1 index 362fac0f8da7..90ebe0941ccc 100644 --- a/usr.sbin/lpr/lpr/lpr.1 +++ b/usr.sbin/lpr/lpr/lpr.1 @@ -48,6 +48,9 @@ .Op Fl w Ar num .Op Fl cdfghlnmprstv .Op Ar name ... +.Sh DEPRECATION NOTICE +This facility is scheduled for removal prior to the release of +.Fx 16.0 . .Sh DESCRIPTION The .Nm diff --git a/usr.sbin/lpr/lpr/printcap.5 b/usr.sbin/lpr/lpr/printcap.5 index 39446bfbf904..cf3179bf4e78 100644 --- a/usr.sbin/lpr/lpr/printcap.5 +++ b/usr.sbin/lpr/lpr/printcap.5 @@ -35,6 +35,9 @@ .Nd printer capability data base .Sh SYNOPSIS .Nm +.Sh DEPRECATION NOTICE +This facility is scheduled for removal prior to the release of +.Fx 16.0 . .Sh DESCRIPTION The .Nm Printcap diff --git a/usr.sbin/lpr/lprm/lprm.1 b/usr.sbin/lpr/lprm/lprm.1 index 92b3bc1fdb69..fa481811ef73 100644 --- a/usr.sbin/lpr/lprm/lprm.1 +++ b/usr.sbin/lpr/lprm/lprm.1 @@ -39,6 +39,9 @@ .Op Fl .Op job # ...\& .Op Ar user ...\& +.Sh DEPRECATION NOTICE +This facility is scheduled for removal prior to the release of +.Fx 16.0 . .Sh DESCRIPTION The .Nm diff --git a/usr.sbin/lpr/lptest/lptest.1 b/usr.sbin/lpr/lptest/lptest.1 index 3bd844b6a087..af372c733d4b 100644 --- a/usr.sbin/lpr/lptest/lptest.1 +++ b/usr.sbin/lpr/lptest/lptest.1 @@ -37,6 +37,9 @@ .Nm .Op Ar length .Op Ar count +.Sh DEPRECATION NOTICE +This facility is scheduled for removal prior to the release of +.Fx 16.0 . .Sh DESCRIPTION The .Nm diff --git a/usr.sbin/lpr/pac/pac.8 b/usr.sbin/lpr/pac/pac.8 index 25ad26cc3d39..ec9bf6463e6a 100644 --- a/usr.sbin/lpr/pac/pac.8 +++ b/usr.sbin/lpr/pac/pac.8 @@ -42,6 +42,9 @@ .Op Fl s .Op Fl r .Op Ar name ... +.Sh DEPRECATION NOTICE +This facility is scheduled for removal prior to the release of +.Fx 16.0 . .Sh DESCRIPTION The .Nm From nobody Thu May 28 08:27:27 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gR03M4WbWz6fLZP for ; Thu, 28 May 2026 08:27: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gR03M1Jznz3sVS for ; Thu, 28 May 2026 08:27:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779956847; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YR7DW5CUpyhlJkd0ftx8kgopYCAcF/8ANe56r2weMH8=; b=SVC2zW49mRQUebFr68ivfjpUsBHOH7kG1ao7IMjGC1q/4uy0Flyg/8KbHgMqKIBSuhpvbU d3e7dpmXQYfRYgnU/WwpdQT/i3EbBekwev33eoTi8J+tBGnPff3SABZaARDkbpRSvvkTNl umdMngPw0r4DUVjMG77uw4fpYhZfzHUePLCPG1lmlbKHPEBj6gyEy0HYSVD58xV0xSSeAu u/Xemn4Dj581ICLS482++ucEiOkOEPDvhPz2HDGyOImp9c+CP364+FHwExkm8crrWSIyN+ NjoIAtzc7BsbqjDxrt8Vuq1HgpXmizmhYlTyJEfYPuCO9VILUeaD7PoaU507gA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779956847; a=rsa-sha256; cv=none; b=nKGSCGXzeBt1fqfh8IuZL5LVvKRkZvcO/F0yGTAnXRoN8MQ2zbZPmGtSeRl6QeYnqwLGlW x1Okf3wY/6xvbAdPEmTleMa9ZP1xO7yLCVFg9C6PrFv3fytmRMeMbaDVNS45AqiL9XSw1Q NscYbjWPozw4y4vI/E6gA8qqAtMkBLbeXt3N3VvyJEaSN3d9S1M27DnUTCA3wgZ6jCcChc MPLTVPzQNP32fiypo68cDQqxFhK4OCZeZcNTaSVGLTlEo5+2BCKBgso00IFzNK5NTE3x0F RyyaQQwE786ZSV5H6QD8ngfeYDNiEhGlkAoU25kP+RuPoloWoGWkVmbTlEBQwg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779956847; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YR7DW5CUpyhlJkd0ftx8kgopYCAcF/8ANe56r2weMH8=; b=mFQLqAB1xaAhS3+mtmeQAYYfpU6p/nHBqfCx6XD6WXe7azOZKxFEsDAvgQ7TENrX+9q5n5 0m6grFJvqyVDpLUVNsUX4l8bo77aJo6cJe3mTr2+T0zKVAbADa3dwAuFtA4uMyRLzvJrUD LIkN7Gb69H/EdpZYHjzBmUj9s/G1RurxkP/2FSdYv2NIcI7kWebbi1bHh89Q+eCA7Odjk1 GfxqSWZq823N/uxQiTWYdsgyIlZAbV0qEDZDjJpXDnGGxwoQ7C0/6LZ6TMTOf18xt/9INl 5EVMJvUlyguLaZgHlSY7iCQuA8BEVbYIwqiodWQvmd63ek34uq27+rmyKb4Xjg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gR03M0RrjzfYW for ; Thu, 28 May 2026 08:27:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 22d5d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 08:27:27 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 85852fe5e4a9 - stable/14 - lpd: Restore ability to specify a port number List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 85852fe5e4a9dc48e328c7f33c3be770412de5ef Auto-Submitted: auto-generated Date: Thu, 28 May 2026 08:27:27 +0000 Message-Id: <6a17fc6f.22d5d.5a14075@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=85852fe5e4a9dc48e328c7f33c3be770412de5ef commit 85852fe5e4a9dc48e328c7f33c3be770412de5ef Author: Dag-Erling Smørgrav AuthorDate: 2026-05-25 16:51:31 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-28 08:27:11 +0000 lpd: Restore ability to specify a port number This has been broken since IPv6 support was added in 2000. We would validate the port number (which had to be a port number, but can now also be a service name) and then ignore it. MFC after: 1 week Fixes: 08829865f659 ("IPv6 support for lpr.") Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57181 (cherry picked from commit c0cae7d8da50daa87af4cd6d7c9a2043343b506f) --- usr.sbin/lpr/lpd/lpd.8 | 19 ++++++++++--------- usr.sbin/lpr/lpd/lpd.c | 28 +++++++++------------------- 2 files changed, 19 insertions(+), 28 deletions(-) diff --git a/usr.sbin/lpr/lpd/lpd.8 b/usr.sbin/lpr/lpd/lpd.8 index 83b8c457d969..fc28afe51a6f 100644 --- a/usr.sbin/lpr/lpd/lpd.8 +++ b/usr.sbin/lpr/lpd/lpd.8 @@ -27,7 +27,7 @@ .\" .\" @(#)lpd.8 8.3 (Berkeley) 4/19/94 .\" -.Dd February 19, 2026 +.Dd May 25, 2026 .Dt LPD 8 .Os .Sh NAME @@ -37,7 +37,7 @@ .Nm .Op Fl cdlpsFW46 .Op Fl t Ar timeout -.Op Ar port# +.Op Ar port .Sh DEPRECATION NOTICE This facility is scheduled for removal prior to the release of .Fx 16.0 . @@ -145,13 +145,13 @@ Inet only. Inet6 only. .It Fl 46 Inet and inet6 (default). -.It Ar "port#" -The Internet port number used to rendezvous -with other processes is normally obtained with -.Xr getservbyname 3 -but can be changed with the -.Ar port# -argument. +.It Ar "port" +The Internet port number or service name used to rendezvous with other +processes. +Can be any number from 1 to 65,535 or any service name defined in +.Pa /etc/services . +Defaults to +.Li printer . .El .Pp Access control is provided by two means. @@ -348,6 +348,7 @@ but not under same administrative control. .Xr syslog 3 , .Xr hosts.lpd 5 , .Xr printcap 5 , +.Xr services 5 , .Xr chkprintcap 8 , .Xr lpc 8 , .Xr pac 8 diff --git a/usr.sbin/lpr/lpd/lpd.c b/usr.sbin/lpr/lpd/lpd.c index df9bfcec5de1..3371a764caf7 100644 --- a/usr.sbin/lpr/lpd/lpd.c +++ b/usr.sbin/lpr/lpd/lpd.c @@ -113,7 +113,7 @@ static void startup(void); static void chkhost(struct sockaddr *_f, int _ch_opts); static int ckqueue(struct printer *_pp); static void fhosterr(int _ch_opts, char *_sysmsg, char *_usermsg); -static int *socksetup(int _af, int _debuglvl); +static int *socksetup(int _af, const char *portstr, int _debuglvl); static void usage(void); /* XXX from libc/net/rcmd.c */ @@ -136,7 +136,7 @@ main(int argc, char **argv) struct sockaddr_storage frominet; socklen_t fromlen; sigset_t omask, nmask; - struct servent *sp, serv; + const char *portstr = "printer"; int inet_flag = 0, inet6_flag = 0; euid = geteuid(); /* these shouldn't be different */ @@ -227,19 +227,9 @@ main(int argc, char **argv) if (errs) usage(); - if (argc == 1) { - if ((i = atoi(argv[0])) == 0) - usage(); - if (i < 0 || i > USHRT_MAX) - errx(EX_USAGE, "port # %d is invalid", i); - - serv.s_port = htons(i); - sp = &serv; + if (argc > 0) { + portstr = *argv++; argc--; - } else { - sp = getservbyname("printer", "tcp"); - if (sp == NULL) - errx(EX_OSFILE, "printer/tcp: unknown service"); } if (argc != 0) @@ -351,7 +341,7 @@ main(int argc, char **argv) FD_SET(funix, &defreadfds); listen(funix, 5); if (sflag == 0) { - finet = socksetup(family, socket_debug); + finet = socksetup(family, portstr, socket_debug); } else finet = NULL; /* pretend we couldn't open TCP socket. */ if (finet) { @@ -867,7 +857,7 @@ fhosterr(int ch_opts, char *sysmsg, char *usermsg) /* if af is PF_UNSPEC more than one socket may be returned */ /* the returned list is dynamically allocated, so caller needs to free it */ static int * -socksetup(int af, int debuglvl) +socksetup(int af, const char *portstr, int debuglvl) { struct addrinfo hints, *res, *r; int error, maxs, *s, *socks; @@ -877,7 +867,7 @@ socksetup(int af, int debuglvl) hints.ai_flags = AI_PASSIVE; hints.ai_family = af; hints.ai_socktype = SOCK_STREAM; - error = getaddrinfo(NULL, "printer", &hints, &res); + error = getaddrinfo(NULL, portstr, &hints, &res); if (error) { syslog(LOG_ERR, "%s", gai_strerror(error)); mcleanup(0); @@ -946,9 +936,9 @@ static void usage(void) { #ifdef INET6 - fprintf(stderr, "usage: lpd [-cdlsFW46] [port#]\n"); + fprintf(stderr, "usage: lpd [-cdlsFW46] [port]\n"); #else - fprintf(stderr, "usage: lpd [-cdlsFW] [port#]\n"); + fprintf(stderr, "usage: lpd [-cdlsFW] [port]\n"); #endif exit(EX_USAGE); } From nobody Thu May 28 08:27:28 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gR03N4tCCz6fLZQ for ; Thu, 28 May 2026 08:27: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gR03N23H0z3sbn for ; Thu, 28 May 2026 08:27:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779956848; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ymhBzeBHCGX2wRCTS6Txchkh/ueqMOKZh+n7eGi6bWE=; b=jPf+mwkzZ3t5zgzTY7WEZncPLNZyq8O7cZlKSEmf67qEpW+EfbbZuZzg/ST5BiO14goeun HdeyjyCF/wDUPfSdgnGwu5Yenuj2idtfqmcGnHG8lWy+g4eYWpmQvkXhii/NJtg0ZqrfMI N2WY82Xi/Z4pmozLotUhheyW+B5w/Dp9tqiRIIuHyjoM+3yFvinB271xWNeAUhdA55AL5j 2AIKaWb+zqZYuNqfUC9szGOdwN7U4BgkdnI8VLgIZlsm2RTZCT+RzcO49k9iOC1+azej05 Qqf0OX5uYDGomR9I141gOouCbWxlHrPsR3BihNPZU3NuCrZ9Kk6xTLXxTDp88Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779956848; a=rsa-sha256; cv=none; b=mFsjL8+Lmz4SaEANx7eL5rY1N2WAFWCZalO5SfmpSaOzAbUDcGWk+VBDd905DnHxYM4PTH 1PegA3loF0hUmkFLJ/o6Cz1BUc2R/aNGve8LE9Fm+A5VJ80TMmTEAlQlRLd8QLPuTSdHeP 9CP6uR6YrwwbU60QkR2uE95I49u1Xrjlepru87OUaF04fJ0JgBRdX7qk99Kg5YP4ucyLuK LeUZCSPWTZCW4O7iwb7+q0PnhfGH6U8K4QGaQUpWZVaU1Ss0UeWZuvJMb2Glnb9s1imXho yJ9+Y2dx2VgjQx8vFxYcOkV1z/4iVbTinTJxjtKZUJhMs9crLhwwup23fz5WFQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779956848; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ymhBzeBHCGX2wRCTS6Txchkh/ueqMOKZh+n7eGi6bWE=; b=yTOMU835I+iP8cnCB5AW0oOvwLgerODvQm6N5Q9FVL0SBfrfQiVE3R7Jz+yDGGMSA+Cq8b AVuG1Y5MrvsGiVXMwBM6EHiT33PNkitvClsk46eGgV1nn4TZV/cZZKI/+WGJdn9N0kaEHK u/UkNAM59fRqcPz7/KOOc3XG5vo89/4arlKbm4PCF5tH6/wwGbq+/6Y1a5VJE71qR8dqck Op3ZAo8IQJB3vjNyHCFKriAtmWQTJO0/fp0JbuSu6C0g9vGRwnVDPK5pFKgUUn3Ucy0pmu 6nRKRXLhVeyXn1zZog/7qkpqZ7pTll34cE05nIFRrLKWkVfQ9jZXQDhm7yVLGA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gR03N1K1vzf6m for ; Thu, 28 May 2026 08:27:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 21b51 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 08:27:28 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 6e2940af1c49 - stable/14 - lpd: Reorder option list in manual page List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6e2940af1c49d7489b9c881d84bac7bf9fdae1ca Auto-Submitted: auto-generated Date: Thu, 28 May 2026 08:27:28 +0000 Message-Id: <6a17fc70.21b51.737e6c7a@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=6e2940af1c49d7489b9c881d84bac7bf9fdae1ca commit 6e2940af1c49d7489b9c881d84bac7bf9fdae1ca Author: Dag-Erling Smørgrav AuthorDate: 2026-05-25 16:51:39 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-28 08:27:12 +0000 lpd: Reorder option list in manual page MFC after: 1 week Reviewed by: ziaee, markj Differential Revision: https://reviews.freebsd.org/D57182 (cherry picked from commit 8e917789732ae02a480e8756899d3bc6d99fe5d8) --- usr.sbin/lpr/lpd/lpd.8 | 42 ++++++++++++++++++------------------------ 1 file changed, 18 insertions(+), 24 deletions(-) diff --git a/usr.sbin/lpr/lpd/lpd.8 b/usr.sbin/lpr/lpd/lpd.8 index fc28afe51a6f..24bbcd3b5340 100644 --- a/usr.sbin/lpr/lpd/lpd.8 +++ b/usr.sbin/lpr/lpd/lpd.8 @@ -65,6 +65,12 @@ the request so the parent can continue to listen for more requests. .Pp Available options: .Bl -tag -width Ds +.It Fl 4 +Accept IPv4 connections. +The default is to accept both IPv4 and IPv6. +.It Fl 6 +Accept IPv6 connections. +The default is to accept both IPv4 and IPv6. .It Fl c By default, if some remote host has a connection error while trying to send a print request to @@ -83,11 +89,20 @@ Turn on .Dv SO_DEBUG on the Internet listening socket (see .Xr setsockopt 2 ) . -.It Fl l +.It Fl F +By default, +.Nm +will daemonize into the background. The -.Fl l +.Fl F flag causes .Nm +to remain in the foreground. +Logging is still performed with +.Xr syslog 3 . +.It Fl l +Causes +.Nm to log valid requests received from the network. This can be useful for debugging purposes. @@ -101,11 +116,7 @@ It is being deprecated, and may be removed in a future version of .Nm . .It Fl s -The -.Fl s -(secure) flag causes -.Nm -not to open an Internet listening socket. +Do not open an Internet listening socket. This means that .Nm will not accept any connections from any remote @@ -116,17 +127,6 @@ Set the network receive timeout for client connections to .Ar timeout seconds. The default is 120. -.It Fl F -By default, -.Nm -will daemonize into the background. -The -.Fl F -flag causes -.Nm -to remain in the foreground. -Logging is still performed with -.Xr syslog 3 . .It Fl W By default, the .Nm @@ -139,12 +139,6 @@ flag causes to accept connections coming from any port. This is can be useful when you want to accept print jobs from certain implementations of lpr written for Windows. -.It Fl 4 -Inet only. -.It Fl 6 -Inet6 only. -.It Fl 46 -Inet and inet6 (default). .It Ar "port" The Internet port number or service name used to rendezvous with other processes. From nobody Thu May 28 08:27:29 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gR03Q0lyHz6fLKC for ; Thu, 28 May 2026 08:27: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gR03P2jlDz3sXc for ; Thu, 28 May 2026 08:27:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779956849; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SuYvztDZaQH24haUnpr2a01baxLDxBs1gicNwVmK0ZE=; b=w7IFkT0hQ557+Ubaw/vrk/Fk95R2VOTBLxWZglIHFvz7QXJSZsXUIy/ROEdgZzu0kw0235 O/u34HeQ7OXE/SSawUjWCrmU6snFQp4iir5+lwuUeY3oGEUWLjAU2ySNGEJgFYxGpPXh2u ZrA8TTp1xqJhgk62ehHdLyblyobAh1oSZZ3fBjmOF6uW4qhpSOSeBpdCphiBwEiYfgDzdw JUEUzjnO1CXWaiTsKpsMI9poAh1ttYcxSjHyzrvQwr2aHVvDy/AkF1DslQVUS+zdsFY3cF Pg0lNg9BumHjR69K3lNFzUEpfSbZjG2GezeDlYC7fUfLK+MwsDL9jEoXGrzQ3w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779956849; a=rsa-sha256; cv=none; b=lXaz1HdW6HAXsN6qpiz85doK5W2MZ4i3o4r01gmMgAcgi+6D01uLIlczo5f+yTyLoxfkRt g48vKtkbWvwBIH6VXZYlQnjdRMEg127SSplZwnnWLfDYReoi9SZ/e4FvbNW3+QnGYulcKY LfNU9i+KHXbL6S7CjaFIIYs5M9fV1sn1+EJ4EQNGE2K2SD7vvVXvTppL3eBTbUBH/2OL2D +5tqXsUX3H396bOG1HXyAXv2Sh6UepUBtNc310rUs+LRXQGv6ylh+YlxLlLKrczMgFr++p /lfsD0VWNlH+H1bFiMo8q7mCDTBnMf8cteI0pd1vu+o9g2j5tIUZ/+h5NkL2qA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779956849; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SuYvztDZaQH24haUnpr2a01baxLDxBs1gicNwVmK0ZE=; b=hiCXrz5DWqV3ga01nO4ogc5gct8KsZ2MID2o/wKAo8pFD5jEHQrIdhxPqRDhFkPuFPbAMq bfU8GgKxbJPI8bcvho9d9cPjFYufKDxlUPoZWs1GfmjXM04Na4hHXXTle5Grm6yWFzMdZy MKz8lfLEy5SozhZeJOuoOT8gLvsDxyD1T++roZ8EutPfZo0p9vWgnQbQ1qXYrS5Omb1e6G 5qXF63N+Of1NyXUtfIEePPL9qF9ISyTfkUm6gBaXnSqmoaHM5MFCT05/FDMkahO5pZ+zPo GkJV/rX0XFx3AU5sG6/YtW/fT40gWPKKY0b5wxU/zMxIMBD+3TARGg/aZoSDwg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gR03P27yqzf4F for ; Thu, 28 May 2026 08:27:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 21b55 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 08:27:29 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 5f10e369a13a - stable/14 - lpd: Drop deprecated -p option List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5f10e369a13af824de5244c12f4e7216a9d0750e Auto-Submitted: auto-generated Date: Thu, 28 May 2026 08:27:29 +0000 Message-Id: <6a17fc71.21b55.4eafaf75@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=5f10e369a13af824de5244c12f4e7216a9d0750e commit 5f10e369a13af824de5244c12f4e7216a9d0750e Author: Dag-Erling Smørgrav AuthorDate: 2026-05-25 16:51:44 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-28 08:27:12 +0000 lpd: Drop deprecated -p option This alias for the -s option has been deprecated since 2002. Time to drop it from the documentation. MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57183 (cherry picked from commit 6047f6a21085ae3877228f8df19a0d4bce45905f) --- usr.sbin/lpr/lpd/lpd.8 | 11 +---------- usr.sbin/lpr/lpd/lpd.c | 3 --- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/usr.sbin/lpr/lpd/lpd.8 b/usr.sbin/lpr/lpd/lpd.8 index 24bbcd3b5340..099ee65a1c60 100644 --- a/usr.sbin/lpr/lpd/lpd.8 +++ b/usr.sbin/lpr/lpd/lpd.8 @@ -35,7 +35,7 @@ .Nd line printer spooler daemon .Sh SYNOPSIS .Nm -.Op Fl cdlpsFW46 +.Op Fl cdlsFW46 .Op Fl t Ar timeout .Op Ar port .Sh DEPRECATION NOTICE @@ -106,15 +106,6 @@ Causes to log valid requests received from the network. This can be useful for debugging purposes. -.It Fl p -The -.Fl p -flag is a synonym for the -.Fl s -flag. -It is being deprecated, and may be removed in a -future version of -.Nm . .It Fl s Do not open an Internet listening socket. This means that diff --git a/usr.sbin/lpr/lpd/lpd.c b/usr.sbin/lpr/lpd/lpd.c index 3371a764caf7..be41e81b7b5f 100644 --- a/usr.sbin/lpr/lpd/lpd.c +++ b/usr.sbin/lpr/lpd/lpd.c @@ -165,9 +165,6 @@ main(int argc, char **argv) lflag++; break; case 'p': /* letter initially used for -s */ - /* - * This will probably be removed with 5.0-release. - */ /* FALLTHROUGH */ case 's': /* secure (no inet) */ sflag++; From nobody Thu May 28 08:27:30 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gR03R0504z6fLKN for ; Thu, 28 May 2026 08:27: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gR03Q43ctz3sP4 for ; Thu, 28 May 2026 08:27:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779956850; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YhtP969Cu1lHJ49d2Pdd++NKy0OMQf+Wb6B1FxFCqTw=; b=QbMNAtSYsbG4XMGsayF9YobuACpLlJfCIGJUfT8BuhhKnz9LSNTUCcTzELKOA/uqIPOOU1 PdtLKDSK0+0+Q+sL1yF3Q/J5JtjSGHo5WRh/TyUdeoNgYGAoHeoELqo/41pjmGgAEmIL1G /BWtmSHNKrpAB4tQWstBhPoF6jB2RPl9glYsd+yoIU7kBao5igLBZ1TpIG0fo5w/FsWmCL n8E5I/cTHhDFTOi7/WER8onXqFhRLFE8A+QFu7GjXUxDSCXYC7qesF8MjhvvO7oxG8pWdl VuNW146qah75Qd5mLg1BEnq2IX8elB7nkyZp3keu8BGQyO0Hv7K75u3nSvytPQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779956850; a=rsa-sha256; cv=none; b=H8doleZhgzlfUbXHbcObT361RTp4T4823VBsHZjUYMLe9wy6kXOMp6xV1WMBSIZxHG7kIF HIp7TdfR9JQI6g8MJzpjSc/0txkt2P2DKEwsqEoLAU4XdX36kyaRkUR2RBxpTqohk0TuPU lUd7fxF0GWgzThRLbIJNP72X2WXhQzjsGLudqlSVo8+6kP66Z9LKwjLzGmBqy8uPtJfeRc HUP7NSlxRGMGbbxj7DKSUF5ZniBA+jCjG3hRZ/f403RiGcSEi56lu+HEUXVh5FmT6ZQAGA ODwbufqFdafBi+HqMaZ4RmaCNy+xt5rIyF3rXmadVSw1yKpIpfAQiqwRAe9ELA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779956850; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YhtP969Cu1lHJ49d2Pdd++NKy0OMQf+Wb6B1FxFCqTw=; b=dEt/by/Jlu31dF7tMpqJSFZ9SRWJp2aKCL+lVGDY32Nmu4sGhrgtWhmPLr25D4/gp+yuMB X/kBwuJrRrJG5hHqa1NEnpOZr+aehr6ki4+FuD/CszPYgVL/ycQlYsQGnA9pfKSBvnGDpk JpUdo68hRQ8Pn1lRiVuBf54uH6croEySOYvu8GJwTxpZV/qiSGu+ktnOieTjV/Ua6/Le+B ukvTZJxSw6xmW1t9+4FUuVW6i9jTSjOd1LhL9JABj1a/TjC5suV8UTG//bBusptf78+ERZ qrZ4Yvq59LCSBsKsjJH+B85k4cIYO3fKpaUqaiw6Um6GplhKXisHqoOWvjLBFQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gR03Q33YFzf8k for ; Thu, 28 May 2026 08:27:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 22c33 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 08:27:30 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 7c11b5f0ecdb - stable/14 - lpd: Avoid buffer overflow when sending a job List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 7c11b5f0ecdb6e543882fb54ca81da6bc3ac3ebb Auto-Submitted: auto-generated Date: Thu, 28 May 2026 08:27:30 +0000 Message-Id: <6a17fc72.22c33.503ccaae@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=7c11b5f0ecdb6e543882fb54ca81da6bc3ac3ebb commit 7c11b5f0ecdb6e543882fb54ca81da6bc3ac3ebb Author: Dag-Erling Smørgrav AuthorDate: 2026-05-25 16:51:48 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-28 08:27:12 +0000 lpd: Avoid buffer overflow when sending a job When forwarding a print job to a remote server, we could overflow the command buffer if a control or data file had a very long name. MFC after: 1 week Reported by: Joshua Rogers Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57184 (cherry picked from commit f2c7c5f94803b67a9a6af625d4fc8882d2afda6c) --- usr.sbin/lpr/lpd/printjob.c | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/usr.sbin/lpr/lpd/printjob.c b/usr.sbin/lpr/lpd/printjob.c index 79bc36aef13d..63d0101f6ff0 100644 --- a/usr.sbin/lpr/lpd/printjob.c +++ b/usr.sbin/lpr/lpd/printjob.c @@ -80,8 +80,12 @@ static char sccsid[] = "@(#)printjob.c 8.7 (Berkeley) 5/10/95"; /* * The buffer size to use when reading/writing spool files. + * This is also used to compose commands for remote servers and therefore + * needs to be able to fit the longest command we could possibly send. */ -#define SPL_BUFSIZ BUFSIZ +#define SPL_BUFSIZ (BUFSIZ * 2) +_Static_assert(SPL_BUFSIZ > sizeof("x18446744073709551615 ") + PATH_MAX + + sizeof("_c2147483647 "), "SPL_BUFSIZ is too short"); /* * Error tokens @@ -652,7 +656,7 @@ print(struct printer *pp, int format, char *file) if (pp->filters[LPF_INPUT] == NULL && (format == 'f' || format == 'l' || format == 'o')) { pp->tof = 0; - while ((n = read(fi, buf, SPL_BUFSIZ)) > 0) + while ((n = read(fi, buf, sizeof(buf))) > 0) if (write(ofd, buf, n) != n) { (void) close(fi); return (REPRINT); @@ -1139,13 +1143,18 @@ sendfile(struct printer *pp, int type, char *file, char format, int copyreq) sendagain: copycnt++; - if (copycnt < 2) - (void) sprintf(buf, "%c%" PRId64 " %s\n", type, stb.st_size, - file); - else - (void) sprintf(buf, "%c%" PRId64 " %s_c%d\n", type, stb.st_size, - file, copycnt); - amt = strlen(buf); + if (copycnt < 2) { + amt = snprintf(buf, sizeof(buf), "%c%" PRId64 " %s\n", + type, stb.st_size, file); + } else { + amt = snprintf(buf, sizeof(buf), "%c%" PRId64 " %s_c%d\n", + type, stb.st_size, file, copycnt); + } + if (amt >= sizeof(buf)) { + syslog(LOG_ERR, "%s: file name too long", file); + sfres = ERROR; + goto return_sfres; + } for (i = 0; ; i++) { if (write(pfd, buf, amt) != amt || (resp = response(pp)) < 0 || resp == '\1') { @@ -1169,8 +1178,8 @@ sendagain: */ if (type == '\3') trstat_init(pp, file, job_dfcnt); - for (i = 0; i < stb.st_size; i += SPL_BUFSIZ) { - amt = SPL_BUFSIZ; + for (i = 0; i < stb.st_size; i += sizeof(buf)) { + amt = sizeof(buf); if (i + amt > stb.st_size) amt = stb.st_size - i; if (sizerr == 0 && read(sfd, buf, amt) != amt) From nobody Thu May 28 08:27:31 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gR03S1gVsz6fLL1 for ; Thu, 28 May 2026 08:27: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gR03R5wSrz3sjN for ; Thu, 28 May 2026 08:27:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779956851; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KovKObKmtiCx01Epfs/xVm9igazM3b8IF8a66yX1EV0=; b=bTqBNiT2+FzTk/UTgI45h6/GHnDEuq+UFqHLYLT51HEosAyM/0xWEoloWI059rViesJsOY nuJ8QOzphgS/MDn6GSr3SiQ4vHuN2EaPmXNrtPq2kaqORBGuDiC3SYZ2L79KzPtPSWwMoX p8L8itgwi4IA1OxbO3owGF/+nS/DCSunkFtj0O7kxc7RCi66PGNYF6YeC/B/WsCioVyP+5 hsgoDkpRXjiJusG/i4LypeIXeXM7AWcwoPxUqsQgOpqE813WwFA2HMGSPWFTVi+dBQTSxz kqMQJwTpmBSPRWstv+iEfiSD4No/8k8sIXz5qQSNnDws37BTRlJgXXPw8cpvmw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779956851; a=rsa-sha256; cv=none; b=sY2RhsuG6iRRdYTDU7Qc/7qDV4Qz3qgJiyBSqPyUP6acH3JkFpTPvPy7+7bEOvAun2dAD9 WByz0jj6CQ8vNw7khIymyuaMcI26yzDlS21nD6oqLLvvICzZZwt1bd4dJYlv3fQiQpYx75 6BkddYK7eHDDk41qu7kAwkUKuA/PD4R4+bPTPRV+nN6P4WGxPe0cB2jL2UlKNhq8xtGnKN mjrGes6sVzyCbviNCTF8MUMcDvk+NuHC5F3pHT2IwshfTwNSiDZT1xR+OTgBC2q6bd9K27 jFxqb1zGWRtDwrEXXZhWv2JU54g5pCqQ8tJWtFiukO7lvLWkqhlbdXMHQx+Wvg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779956851; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KovKObKmtiCx01Epfs/xVm9igazM3b8IF8a66yX1EV0=; b=HToADYpaPHLfMNpI0ibLtlxtN6RFChXIn2Ct5f+3LC0rG2DmhzSmiwfAnjy1J8O93aArcM J1jiF6z+14J9RCAUhJO9UOGEZQEOA4AMXgTCtENtgMqH8R5UeT2d2OsZ5zn1mLYBhsFWMB wHENV/g5kPnuBvLU7uG0TMXFM6QcM0gMSD+eHJm0YzeFMG00TlQW5huMoreU/VeCQe/fDq MIsF9KDC6+lKt5Mt+0IPeoLa7WKNZWq/jSwo1ElvJoy35jT1ehcyAYarKIF7mjds8L2BZ/ 7oCCV3fkF8A1fN592e/bYGVdK3/6uCdmI63mkSrVodeJGMmoYmjVlpBFcQPPbQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gR03R4K5wzf4G for ; Thu, 28 May 2026 08:27:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 22b45 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 08:27:31 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 980ead5949be - stable/14 - lpd: Fix issues reported by clang-analyzer List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 980ead5949bedcfbc72c57907ff775b030e0cb31 Auto-Submitted: auto-generated Date: Thu, 28 May 2026 08:27:31 +0000 Message-Id: <6a17fc73.22b45.68cb6938@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=980ead5949bedcfbc72c57907ff775b030e0cb31 commit 980ead5949bedcfbc72c57907ff775b030e0cb31 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-25 16:51:53 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-28 08:27:12 +0000 lpd: Fix issues reported by clang-analyzer Also, unlink our temporary file if we fail to chmod it. MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57185 (cherry picked from commit 0f3e14870906da22a7ca821fb2153d375157cac2) --- usr.sbin/lpr/lpd/printjob.c | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/usr.sbin/lpr/lpd/printjob.c b/usr.sbin/lpr/lpd/printjob.c index 63d0101f6ff0..e85cc5dd280e 100644 --- a/usr.sbin/lpr/lpd/printjob.c +++ b/usr.sbin/lpr/lpd/printjob.c @@ -167,7 +167,7 @@ printjob(struct printer *pp) register int i, nitems; off_t pidoff; pid_t printpid; - int errcnt, jobcount, statok, tempfd; + int errcnt, jobcount, tempfd; jobcount = 0; init(pp); /* set up capabilities */ @@ -202,9 +202,6 @@ printjob(struct printer *pp) pp->spool_dir); exit(1); } - statok = stat(pp->lock_file, &stb); - if (statok == 0 && (stb.st_mode & LFM_PRINT_DIS)) - exit(0); /* printing disabled */ umask(S_IWOTH); lfd = open(pp->lock_file, O_WRONLY|O_CREAT|O_EXLOCK|O_NONBLOCK, LOCK_FILE_MODE); @@ -215,12 +212,14 @@ printjob(struct printer *pp) pp->lock_file); exit(1); } - /* - * If the initial call to stat() failed, then lock_file will have - * been created by open(). Update &stb to match that new file. - */ - if (statok != 0) - statok = stat(pp->lock_file, &stb); + if (fstat(lfd, &stb) != 0) { + syslog(LOG_ERR, "%s: fstat(%s): %m", pp->printer, + pp->lock_file); + exit(1); + } + if ((stb.st_mode & LFM_PRINT_DIS) != 0) { + exit(0); /* printing disabled */ + } /* turn off non-blocking mode (was turned on for lock effects only) */ if (fcntl(lfd, F_SETFL, 0) < 0) { syslog(LOG_ERR, "%s: fcntl(%s): %m", pp->printer, @@ -231,8 +230,7 @@ printjob(struct printer *pp) /* * write process id for others to know */ - sprintf(line, "%u\n", printpid); - pidoff = i = strlen(line); + pidoff = i = snprintf(line, sizeof(line), "%u\n", printpid); if (write(lfd, line, i) != i) { syslog(LOG_ERR, "%s: write(%s): %m", pp->printer, pp->lock_file); @@ -260,9 +258,10 @@ printjob(struct printer *pp) tempstderr); exit(1); } - if ((i = fchmod(tempfd, 0664)) == -1) { + if (fchmod(tempfd, 0664) == -1) { syslog(LOG_ERR, "%s: fchmod(%s): %m", pp->printer, tempstderr); + (void) unlink(tempstderr); exit(1); } /* lpd doesn't need it to be open, it just needs it to exist */ @@ -374,15 +373,18 @@ again: goto again; } -char fonts[4][50]; /* fonts for troff */ +char fonts[4][64]; /* fonts for troff */ -char ifonts[4][40] = { +char ifonts[4][64] = { _PATH_VFONTR, _PATH_VFONTI, _PATH_VFONTB, _PATH_VFONTS, }; +_Static_assert(sizeof(fonts) == sizeof(ifonts), "fonts != ifonts"); +_Static_assert(sizeof(fonts[0]) == sizeof(ifonts[0]), "fonts[0] != ifonts[0]"); + /* * The remaining part is the reading of the control file (cf) * and performing the various actions. @@ -406,10 +408,9 @@ printit(struct printer *pp, char *file) /* * Reset troff fonts. */ - for (i = 0; i < 4; i++) - strcpy(fonts[i], ifonts[i]); + memcpy(fonts, ifonts, sizeof(fonts)); sprintf(&width[2], "%ld", pp->page_width); - strcpy(indent+2, "0"); + strcpy(indent, "-i0"); /* initialize job-specific count of datafiles processed */ job_dfcnt = 0; @@ -957,7 +958,7 @@ sendit(struct printer *pp, char *file) strlcpy(indent+2, line + 1, sizeof(indent) - 2); } else if (line[0] >= 'a' && line[0] <= 'z') { dfcopies = 1; - strcpy(last, line); + memcpy(last, line, sizeof(last)); while ((i = get_line(cfp)) != 0) { if (strcmp(last, line) != 0) break; From nobody Thu May 28 08:27:32 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gR03Z0dwNz6fLPg for ; Thu, 28 May 2026 08: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gR03Y59mFz3svH for ; Thu, 28 May 2026 08: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=1779956857; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+HhhuWNDwMF7qjsftXqxly0UhXy5qQWlHwGwhY4L3Ag=; b=L5KrE49qX0xoalZXtbZPdhnIkhTRojf96Il+ZyhKN2ODZoj8E7KXiCHaMEPheZWQ17DKxp UEAZgojnnUKNzLLeMM3qf5VVBQyVna7IFY+ems6D/OyuHIm7mZoir5juvA+3+33hla5fB2 S18vHBt+Ra3bMCRW0oRdN9W5gKca4fjLbDgvDNwyLdzuKkgm31l5HumWSpbk4yg63avfeF 4XLAUK9blKHiUG+5+NhfJOy8JmIVK16GCdciCTy0s1ZjGdd/Zi46dmA7FF/7f/JOJh/vA1 Pl5CDB1596TJBwS9J6UY6lLKZG8pBxaz8NKlDrXujphUxXI8ljxAQZudAcMC7g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779956857; a=rsa-sha256; cv=none; b=AoOOHpyX8Lp25Gc/JDucTkAdQkk9UM4pJ3iDfzE0Vcr1meATsNdvk9Bl18ss7PkJ93GVfc 83acMsVw7TYkR0rNXd0QatTY/tRpxcafrnOud6ell8yZwudByyeNGZILtmry72OoTNNK4+ 1DJguEi5PxMLAglOZKqavy4IPyf1olrgczHK6QRdLFg94FbudA6TYiyvAHn0Z4OAlxEVpj yRtIZH7qLlGN4qFvyxaCXVhfqEwxfYLGIwTqe6i1/Xkz59K1/TAHUc3U4zlCYiv/Fgli4C G+GetFSNzIzYdW5WZ67qVf8TxFUYbqPxLdkWXTLsJudF7fqplA/tESpb/11VLw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779956857; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+HhhuWNDwMF7qjsftXqxly0UhXy5qQWlHwGwhY4L3Ag=; b=UOW2YLxFHYKA+1zZ9jt86NgupjpuIjyod2Kx2Wt8jreBf/nbgfDdEyKxlrJgynamx1ZLgW q5DBqdk3S2AVQJatTH6WwZT5+tIt3taEzYtTGZPU+zzVddRiLaoPLeM2Phzx4I3gOKUb3J MDdGkGvWIr9GCaaXV68SJIU3LNFQMJ9uzO6bNqEeuyJv2dWfNoVVm5anveIEHeq4OEX6DF mX9Ui1ShStEhi94MZy1mRtgEML+sgUGbYoRtcaqMuHZ1IZdxBr0Kw4GuG+Wu91kSC8kaC5 MMKtT+QQmBjvNsjBcUowmvtchUE1MS4pgaBL2FaRL9XXAupipBXjpsNy5eXB3Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gR03Y4hd1zdsL for ; Thu, 28 May 2026 08:27:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2440d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 08:27:32 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 94da67bb05fb - stable/14 - lpd: Style and whitespace cleanup List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 94da67bb05fb5527f1fc4547e75d648292a9698f Auto-Submitted: auto-generated Date: Thu, 28 May 2026 08:27:32 +0000 Message-Id: <6a17fc74.2440d.12d83216@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=94da67bb05fb5527f1fc4547e75d648292a9698f commit 94da67bb05fb5527f1fc4547e75d648292a9698f Author: Dag-Erling Smørgrav AuthorDate: 2026-05-25 16:51:58 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-28 08:27:12 +0000 lpd: Style and whitespace cleanup No functional change intended. MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57186 (cherry picked from commit 123591e41c559fc2ae0f179f1385df05132881da) --- usr.sbin/lpr/lpd/printjob.c | 189 +++++++++++++++++++++----------------------- 1 file changed, 91 insertions(+), 98 deletions(-) diff --git a/usr.sbin/lpr/lpd/printjob.c b/usr.sbin/lpr/lpd/printjob.c index e85cc5dd280e..a4754937b9e7 100644 --- a/usr.sbin/lpr/lpd/printjob.c +++ b/usr.sbin/lpr/lpd/printjob.c @@ -148,10 +148,10 @@ static int printit(struct printer *_pp, char *_file); static void pstatus(const struct printer *_pp, const char *_msg, ...) __printflike(2, 3); static char response(const struct printer *_pp); -static void scan_out(struct printer *_pp, int _scfd, char *_scsp, +static void scan_out(struct printer *_pp, int _scfd, char *_scsp, int _dlm); static char *scnline(int _key, char *_p, int _c); -static int sendfile(struct printer *_pp, int _type, char *_file, +static int sendfile(struct printer *_pp, int _type, char *_file, char _format, int _copyreq); static int sendit(struct printer *_pp, char *_file); static void sendmail(struct printer *_pp, char *_userid, int _bombed); @@ -162,18 +162,17 @@ void printjob(struct printer *pp) { struct stat stb; - register struct jobqueue *q, **qp; + struct jobqueue *q, **qp; struct jobqueue **queue; - register int i, nitems; off_t pidoff; pid_t printpid; - int errcnt, jobcount, tempfd; + int i, errcnt, jobcount, nitems, tempfd; jobcount = 0; init(pp); /* set up capabilities */ (void) write(STDOUT_FILENO, "", 1); /* ack that daemon is started */ (void) close(STDERR_FILENO); /* set up log file */ - if (open(pp->log_file, O_WRONLY|O_APPEND, LOG_FILE_MODE) < 0) { + if (open(pp->log_file, O_WRONLY | O_APPEND, LOG_FILE_MODE) < 0) { syslog(LOG_ERR, "%s: open(%s): %m", pp->printer, pp->log_file); (void) open(_PATH_DEVNULL, O_WRONLY); @@ -203,8 +202,8 @@ printjob(struct printer *pp) exit(1); } umask(S_IWOTH); - lfd = open(pp->lock_file, O_WRONLY|O_CREAT|O_EXLOCK|O_NONBLOCK, - LOCK_FILE_MODE); + lfd = open(pp->lock_file, O_WRONLY | O_CREAT | O_EXLOCK | O_NONBLOCK, + LOCK_FILE_MODE); if (lfd < 0) { if (errno == EWOULDBLOCK) /* active daemon present */ exit(0); @@ -240,7 +239,7 @@ printjob(struct printer *pp) * search the spool directory for work and sort by queue order. */ if ((nitems = getq(pp, &queue)) < 0) { - syslog(LOG_ERR, "%s: can't scan %s", pp->printer, + syslog(LOG_ERR, "%s: can't scan %s", pp->printer, pp->spool_dir); exit(1); } @@ -274,7 +273,7 @@ again: * write the name of the current control file into the lock file * so the spool queue program can tell what we're working on */ - for (qp = queue; nitems--; free((char *) q)) { + for (qp = queue; nitems--; free(q)) { q = *qp++; if (stat(q->job_cfname, &stb) < 0) continue; @@ -327,12 +326,12 @@ again: } (void) close(pfd); /* close printer */ if (ftruncate(lfd, pidoff) < 0) - syslog(LOG_WARNING, "%s: ftruncate(%s): %m", + syslog(LOG_WARNING, "%s: ftruncate(%s): %m", pp->printer, pp->lock_file); openpr(pp); /* try to reopen printer */ goto restart; } else { - syslog(LOG_WARNING, "%s: job could not be %s (%s)", + syslog(LOG_WARNING, "%s: job could not be %s (%s)", pp->printer, pp->remote ? "sent to remote host" : "printed", q->job_cfname); @@ -392,9 +391,8 @@ _Static_assert(sizeof(fonts[0]) == sizeof(ifonts[0]), "fonts[0] != ifonts[0]"); static int printit(struct printer *pp, char *file) { - register int i; char *cp; - int bombed, didignorehdr; + int bombed, didignorehdr, i; bombed = OK; didignorehdr = 0; @@ -414,7 +412,7 @@ printit(struct printer *pp, char *file) /* initialize job-specific count of datafiles processed */ job_dfcnt = 0; - + /* * read the control file for work to do * @@ -462,7 +460,7 @@ printit(struct printer *pp, char *file) case 'H': strlcpy(origin_host, line + 1, sizeof(origin_host)); if (class[0] == '\0') { - strlcpy(class, line+1, sizeof(class)); + strlcpy(class, line + 1, sizeof(class)); } continue; @@ -471,14 +469,14 @@ printit(struct printer *pp, char *file) if (pp->restricted) { /* restricted */ if (getpwnam(logname) == NULL) { bombed = NOACCT; - sendmail(pp, line+1, bombed); + sendmail(pp, line + 1, bombed); goto pass2; } } continue; case 'S': - cp = line+1; + cp = line + 1; i = 0; while (*cp >= '0' && *cp <= '9') i = i * 10 + (*cp++ - '0'); @@ -514,7 +512,7 @@ printit(struct printer *pp, char *file) case 'L': /* identification line */ if (!pp->no_header && !pp->header_last) - banner(pp, line+1, jobname); + banner(pp, line + 1, jobname); continue; case '1': /* troff fonts */ @@ -528,11 +526,11 @@ printit(struct printer *pp, char *file) continue; case 'W': /* page width */ - strlcpy(width+2, line + 1, sizeof(width) - 2); + strlcpy(width + 2, line + 1, sizeof(width) - 2); continue; case 'I': /* indent amount */ - strlcpy(indent+2, line + 1, sizeof(indent) - 2); + strlcpy(indent + 2, line + 1, sizeof(indent) - 2); continue; case 'Z': /* locale for pr */ @@ -554,7 +552,7 @@ printit(struct printer *pp, char *file) pp->printer, line[0], &line[1]); continue; } - i = print(pp, line[0], line+1); + i = print(pp, line[0], line + 1); switch (i) { case ERROR: if (bombed == OK) @@ -586,18 +584,18 @@ pass2: switch (line[0]) { case 'L': /* identification line */ if (!pp->no_header && pp->header_last) - banner(pp, line+1, jobname); + banner(pp, line + 1, jobname); continue; case 'M': if (bombed < NOACCT) /* already sent if >= NOACCT */ - sendmail(pp, line+1, bombed); + sendmail(pp, line + 1, bombed); continue; case 'U': - if (strchr(line+1, '/')) + if (strchr(line + 1, '/')) continue; - (void) unlink(line+1); + (void) unlink(line + 1); } /* * clean-up in case another control file exists @@ -620,14 +618,13 @@ pass2: static int print(struct printer *pp, int format, char *file) { - register int n, i; - register char *prog; - int fi, fo; + char buf[SPL_BUFSIZ]; + struct stat stb; + char *av[15]; + char *prog; FILE *fp; - char *av[15], buf[SPL_BUFSIZ]; pid_t wpid; - int p[2], retcode, stopped, wstatus, wstatus_set; - struct stat stb; + int fi, fo, i, n, p[2], retcode, stopped, wstatus, wstatus_set; /* Make sure the entire data file has arrived. */ wait4data(pp, file); @@ -691,7 +688,7 @@ print(struct printer *pp, int format, char *file) execl(_PATH_PR, "pr", width, length, "-h", *title ? title : " ", "-L", *locale ? locale : "C", - "-F", (char *)0); + "-F", NULL); syslog(LOG_ERR, "cannot execl %s", _PATH_PR); exit(2); } @@ -740,7 +737,7 @@ print(struct printer *pp, int format, char *file) case 'd': /* print tex output */ (void) unlink(".railmag"); if ((fo = creat(".railmag", FILMOD)) < 0) { - syslog(LOG_ERR, "%s: cannot create .railmag", + syslog(LOG_ERR, "%s: cannot create .railmag", pp->printer); (void) unlink(".railmag"); } else { @@ -753,7 +750,7 @@ print(struct printer *pp, int format, char *file) } (void) close(fo); } - prog = (format == 't') ? pp->filters[LPF_TROFF] + prog = (format == 't') ? pp->filters[LPF_TROFF] : ((format == 'n') ? pp->filters[LPF_DITROFF] : pp->filters[LPF_DVI]); av[1] = pxwidth; @@ -827,7 +824,7 @@ start: dup2(fo, STDOUT_FILENO); /* setup stderr for the filter (child process) * so it goes to our temporary errors file */ - n = open(tempstderr, O_WRONLY|O_TRUNC, 0664); + n = open(tempstderr, O_WRONLY | O_TRUNC, 0664); if (n >= 0) dup2(n, STDERR_FILENO); closelog(); @@ -899,8 +896,9 @@ start: static int sendit(struct printer *pp, char *file) { + char last[sizeof(line)]; + char *cp; int dfcopies, err, i; - char *cp, last[sizeof(line)]; /* * open control file @@ -930,7 +928,7 @@ sendit(struct printer *pp, char *file) while (get_line(cfp)) { again: if (line[0] == 'S') { - cp = line+1; + cp = line + 1; i = 0; while (*cp >= '0' && *cp <= '9') i = i * 10 + (*cp++ - '0'); @@ -949,13 +947,13 @@ sendit(struct printer *pp, char *file) strlcpy(logname, line + 1, sizeof(logname)); if (pp->restricted) { /* restricted */ if (getpwnam(logname) == NULL) { - sendmail(pp, line+1, NOACCT); + sendmail(pp, line + 1, NOACCT); err = ERROR; break; } } } else if (line[0] == 'I') { - strlcpy(indent+2, line + 1, sizeof(indent) - 2); + strlcpy(indent + 2, line + 1, sizeof(indent) - 2); } else if (line[0] >= 'a' && line[0] <= 'z') { dfcopies = 1; memcpy(last, line, sizeof(last)); @@ -964,7 +962,7 @@ sendit(struct printer *pp, char *file) break; dfcopies++; } - switch (sendfile(pp, '\3', last+1, *last, dfcopies)) { + switch (sendfile(pp, '\3', last + 1, *last, dfcopies)) { case OK: if (i) goto again; @@ -989,8 +987,8 @@ sendit(struct printer *pp, char *file) */ fseek(cfp, 0L, 0); while (get_line(cfp)) - if (line[0] == 'U' && !strchr(line+1, '/')) - (void) unlink(line+1); + if (line[0] == 'U' && !strchr(line + 1, '/')) + (void) unlink(line + 1); /* * clean-up in case another control file exists */ @@ -1006,11 +1004,10 @@ sendit(struct printer *pp, char *file) static int sendfile(struct printer *pp, int type, char *file, char format, int copyreq) { - int i, amt; + char buf[SPL_BUFSIZ], opt_c[4], opt_h[4], opt_n[4]; struct stat stb; char *av[15], *filtcmd; - char buf[SPL_BUFSIZ], opt_c[4], opt_h[4], opt_n[4]; - int copycnt, filtstat, narg, resp, sfd, sfres, sizerr, statrc; + int amt, copycnt, filtstat, i, narg, resp, sfd, sfres, sizerr, statrc; /* Make sure the entire data file has arrived. */ wait4data(pp, file); @@ -1270,12 +1267,12 @@ return_sfres: static void wait4data(struct printer *pp, const char *dfile) { + struct stat statdf; const char *cp; - int statres; - u_int sleepreq; size_t dlen, hlen; time_t amtslept, cur_time, prev_mtime; - struct stat statdf; + unsigned int sleepreq; + int statres; /* Skip these checks if the print job is from the local host. */ dlen = strlen(dfile); @@ -1360,10 +1357,11 @@ wait4data(struct printer *pp, const char *dfile) static int execfilter(struct printer *pp, char *f_cmd, char *f_av[], int infd, int outfd) { + char buf[BUFSIZ]; + char *slash; + FILE *errfp; pid_t fpid, wpid; int errfd, retcode, wstatus; - FILE *errfp; - char buf[BUFSIZ], *slash; fpid = dofork(pp, DORETURN); if (fpid != 0) { @@ -1425,7 +1423,7 @@ execfilter(struct printer *pp, char *f_cmd, char *f_av[], int infd, int outfd) */ dup2(infd, STDIN_FILENO); dup2(outfd, STDOUT_FILENO); - errfd = open(tempstderr, O_WRONLY|O_TRUNC, 0664); + errfd = open(tempstderr, O_WRONLY | O_TRUNC, 0664); if (errfd >= 0) dup2(errfd, STDERR_FILENO); closelog(); @@ -1498,7 +1496,7 @@ banner(struct printer *pp, char *name1, char *name2) static char * scnline(int key, char *p, int c) { - register int scnwidth; + int scnwidth; for (scnwidth = WIDTH; --scnwidth;) { key <<= 1; @@ -1512,12 +1510,12 @@ scnline(int key, char *p, int c) static void scan_out(struct printer *pp, int scfd, char *scsp, int dlm) { - register char *strp; - register int nchrs, j; - char outbuf[LINELEN+1], *sp, c, cc; - int d, scnhgt; + char outbuf[LINELEN + 1]; + char *sp, *strp; + int d, j, nchrs, scnhgt; + char c, cc; - for (scnhgt = 0; scnhgt++ < HEIGHT+DROP; ) { + for (scnhgt = 0; scnhgt++ < HEIGHT + DROP; ) { strp = &outbuf[0]; sp = scsp; for (nchrs = 0; ; ) { @@ -1526,9 +1524,10 @@ scan_out(struct printer *pp, int scfd, char *scsp, int dlm) for (j = WIDTH; --j;) *strp++ = BACKGND; else - strp = scnline(scnkey[(int)c][scnhgt-1-d], strp, cc); - if (*sp == dlm || *sp == '\0' || - nchrs++ >= pp->page_width/(WIDTH+1)-1) + strp = scnline(scnkey[(int)c][scnhgt - 1 - d], + strp, cc); + if (*sp == dlm || *sp == '\0' || + nchrs++ >= pp->page_width / (WIDTH + 1) - 1) break; *strp++ = BACKGND; *strp++ = BACKGND; @@ -1544,8 +1543,7 @@ scan_out(struct printer *pp, int scfd, char *scsp, int dlm) static int dropit(int c) { - switch(c) { - + switch (c) { case TRC('_'): case TRC(';'): case TRC(','): @@ -1555,7 +1553,6 @@ dropit(int c) case TRC('q'): case TRC('y'): return (DROP); - default: return (0); } @@ -1568,11 +1565,10 @@ dropit(int c) static void sendmail(struct printer *pp, char *userid, int bombed) { - register int i; - int p[2], s; - register const char *cp; struct stat stb; FILE *fp; + const char *cp; + int i, p[2], s; pipe(p); if ((s = dofork(pp, DORETURN)) == 0) { /* child */ @@ -1583,7 +1579,7 @@ sendmail(struct printer *pp, char *userid, int bombed) cp++; else cp = _PATH_SENDMAIL; - execl(_PATH_SENDMAIL, cp, "-t", (char *)0); + execl(_PATH_SENDMAIL, cp, "-t", NULL); _exit(0); } else if (s > 0) { /* parent */ dup2(p[1], STDOUT_FILENO); @@ -1612,8 +1608,8 @@ sendmail(struct printer *pp, char *userid, int bombed) break; case FILTERERR: cp = "FILTERERR"; - if (stat(tempstderr, &stb) < 0 || stb.st_size == 0 - || (fp = fopen(tempstderr, "r")) == NULL) { + if (stat(tempstderr, &stb) < 0 || stb.st_size == 0 || + (fp = fopen(tempstderr, "r")) == NULL) { printf("\nhad some errors and may not have printed\n"); break; } @@ -1645,9 +1641,9 @@ sendmail(struct printer *pp, char *userid, int bombed) static int dofork(const struct printer *pp, int action) { + struct passwd *pwd; pid_t forkpid; int i, fail; - struct passwd *pwd; forkpid = -1; if (daemon_uname == NULL) { @@ -1726,7 +1722,6 @@ error_ret: static void abortpr(int signo __unused) { - (void) unlink(tempstderr); kill(0, SIGINT); if (of_pid > 0) @@ -1756,12 +1751,13 @@ init(struct printer *pp) void startprinting(const char *printer) { - struct printer myprinter, *pp = &myprinter; + struct printer myprinter; + struct printer *pp = &myprinter; int status; init_printer(pp); status = getprintcap(printer, pp); - switch(status) { + switch (status) { case PCAPERR_OSERR: syslog(LOG_ERR, "can't open printer description file: %m"); exit(1); @@ -1782,8 +1778,8 @@ startprinting(const char *printer) static void openpr(const struct printer *pp) { - int p[2]; char *cp; + int p[2]; if (pp->remote) { openrem(pp); @@ -1794,7 +1790,7 @@ openpr(const struct printer *pp) * local print queues. For remote machines, all 'of=' * filter processing is handled in sendfile(), and that * does not use these global "output filter" variables. - */ + */ ofd = -1; of_pid = 0; return; @@ -1828,8 +1824,7 @@ openpr(const struct printer *pp) cp = pp->filters[LPF_OUTPUT]; else cp++; - execl(pp->filters[LPF_OUTPUT], cp, width, length, - (char *)0); + execl(pp->filters[LPF_OUTPUT], cp, width, length, NULL); syslog(LOG_ERR, "%s: execl(%s): %m", pp->printer, pp->filters[LPF_OUTPUT]); exit(1); @@ -1849,11 +1844,10 @@ openpr(const struct printer *pp) static void opennet(const struct printer *pp) { - register int i; - int resp; - u_long port; - char *ep; void (*savealrm)(int); + char *ep; + unsigned long port; + int i, resp; port = strtoul(pp->lp, &ep, 0); if (*ep != '@' || port > 65535) { @@ -1886,7 +1880,7 @@ opennet(const struct printer *pp) pstatus(pp, "waiting for %s to come up", pp->lp); else - pstatus(pp, + pstatus(pp, "waiting for access to printer on %s", pp->lp); } @@ -1901,7 +1895,7 @@ opennet(const struct printer *pp) static void opentty(const struct printer *pp) { - register int i; + int i; for (i = 1; ; i = i < 32 ? i << 1 : i) { pfd = open(pp->lp, pp->rw ? O_RDWR : O_WRONLY); @@ -1914,7 +1908,7 @@ opentty(const struct printer *pp) exit(1); } if (i == 1) - pstatus(pp, + pstatus(pp, "waiting for %s to become ready (offline?)", pp->printer); sleep(i); @@ -1930,9 +1924,8 @@ opentty(const struct printer *pp) static void openrem(const struct printer *pp) { - register int i; - int resp; void (*savealrm)(int); + int i, resp; for (i = 1; ; i = i < 256 ? i << 1 : i) { resp = -1; @@ -1942,16 +1935,15 @@ openrem(const struct printer *pp) alarm(0); (void)signal(SIGALRM, savealrm); if (pfd >= 0) { - if ((writel(pfd, "\2", pp->remote_queue, "\n", - (char *)0) - == 2 + strlen(pp->remote_queue)) - && (resp = response(pp)) == 0) + if (writel(pfd, "\2", pp->remote_queue, "\n", NULL) == + 2 + strlen(pp->remote_queue) && + (resp = response(pp)) == 0) break; (void) close(pfd); } if (i == 1) { if (resp < 0) - pstatus(pp, "waiting for %s to come up", + pstatus(pp, "waiting for %s to come up", pp->remote_host); else { pstatus(pp, @@ -1973,7 +1965,7 @@ setty(const struct printer *pp) { struct termios ttybuf; - if (ioctl(pfd, TIOCEXCL, (char *)0) < 0) { + if (ioctl(pfd, TIOCEXCL, NULL) < 0) { syslog(LOG_ERR, "%s: ioctl(TIOCEXCL): %m", pp->printer); exit(1); } @@ -2002,22 +1994,23 @@ setty(const struct printer *pp) static void pstatus(const struct printer *pp, const char *msg, ...) { - int fd; - char *buf; va_list ap; - va_start(ap, msg); + char *buf; + int fd; umask(S_IWOTH); - fd = open(pp->status_file, O_WRONLY|O_CREAT|O_EXLOCK, STAT_FILE_MODE); + fd = open(pp->status_file, O_WRONLY | O_CREAT | O_EXLOCK, + STAT_FILE_MODE); if (fd < 0) { syslog(LOG_ERR, "%s: open(%s): %m", pp->printer, pp->status_file); exit(1); } ftruncate(fd, 0); + va_start(ap, msg); vasprintf(&buf, msg, ap); va_end(ap); - writel(fd, buf, "\n", (char *)0); + writel(fd, buf, "\n", NULL); close(fd); free(buf); } From nobody Thu May 28 08:30:37 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gR07L4855z6fLMr for ; Thu, 28 May 2026 08:30:54 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: from mail-qk1-f172.google.com (mail-qk1-f172.google.com [209.85.222.172]) (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 4gR07L28BHz3wKT for ; Thu, 28 May 2026 08:30:54 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qk1-f172.google.com with SMTP id af79cd13be357-911dfc86903so1457117385a.3 for ; Thu, 28 May 2026 01:30:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1779957048; cv=none; d=google.com; s=arc-20240605; b=CfT1JNvLu9/ZpShVS4BojE4D4JJEXJ9y0TvArnA6/MkQ+T+EA5JAxbZDeBTByw+1Ex AM1F9GgkXDGstBUpThlBNm56qiJQKMFjTAZ8+gKZKqeALPiqQAkgBktH9U5gDqXBUw6I sbvrcHPmAMKD4PkNBDlI6Nk3lLIUkPX9U9U0PRH5eWWU2evkPbygc6y5wgnb1iJP8zsG Mu7PzPQWlGzbr7QsqVAfxNaq9wtu0zf+C6LKt7QoPN4iheCrpVzPDlKYoQ4Zqq49FluD WAF2j1VmOxJYfaygf2QB/6FoEFCQ/3J10AKapLA+zs64m2dDVarTg3vppomlyKkMl01x 2NjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=jxnc25DWxedzX3C3HxiLWMk2NG9nozsCcou4T/+pYd4=; fh=SEyFMSPgDVBrIbOEUBl+lPFCv5z4KbXnKRwjZaGhj0c=; b=HV1piCsVtiog3vcbkvvInOPDCl5xpALHM296/PsHQEzDuOCgGeR3KL4mFmQt97Y4jY MnqFu0GLrRj8SpuYGIVSF0KWXH63W8fjOaIIeVAyvWRNcgTJ9KJhCEu2WyShQWWS8Gb3 5f8QiviIJku3BNb/sDbmZilGJ+EqoY1KxozaSgxnqnr3D/fGfmpptk+D2QERTHyLREqB KiZ8pBcUpZxxhcuFuIIVZkMJ8KfGDWxJWncGaK6Dy9rrxgD9r90+pIfhUTDjAgl6/0TC rTNlMfGQvE4KZbUwg/PADC5MnbpO5yt8lApY1jlOKsjZluPBMThk4UlGYueOPt6Bo0W1 u69A==; darn=freebsd.org ARC-Authentication-Results: i=1; mx.google.com; arc=none X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779957048; x=1780561848; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=jxnc25DWxedzX3C3HxiLWMk2NG9nozsCcou4T/+pYd4=; b=WdNE3KZfQdaUOJ3nRUzcFy46BTcU8aKVgBr0+S7kefMNy0+hbnzJe9I5Oq2IH7y38Q xxxIVXPpF0oOM9xg5Jgi45zls1407dW50+kI0/DXhfFmR9VwjezkFyFCT/o9JZetJ5Vo IUUkgSaP/qRWjXcfLM3JZilG17p/M2g4zL6tgdcVdI/LPEOvlZVE05QVF15MjVRXhGJn GJ1gbLdSE5AKzATnP+nfm6zhLov1yxDY+p1F8mFmU6Ogb3rGfyGD8xU9tcvzyOx7Gibs zLgkMe7MN7g9pTMm4BLc3kOORXUu4HBaEdQF+AtkaP3Vsr2sOul3g3N4PdRM7P4Nx7zt w4JA== X-Forwarded-Encrypted: i=1; AFNElJ9a/oT65UrwVOhCrlGzTblnMnyVCmqQyijhtv1MDhC45XiWPypaOgfLslMqKD0Xw8Xmv4nmd+1IdVjKGPx0Wva7Zj3x@freebsd.org X-Gm-Message-State: AOJu0Yypkq1jzvQCZBkK4Su+OoM6q2kvkbL5+1/mMVk9LZMiTw+ApZ3G M/0FgVLWQ3Am3PbxUzwtoSQOp/4rjIo1yd7P/hWlmuqGEHY2KeLrLpLoYMKDdZ/ouu0Hm5KU0j8 DBe/6gx1VrctobEYmV8QzvUKE9P8mHFU= X-Gm-Gg: Acq92OET3dxHe7tQa0IEDNIhHh5Ii0a6d/mxoH+NrmV7AYTssp46CJPCA/Ib7XNwcHF PUhRs0IkVLB1taD361ukQEmB94Cj1VDO6NpHHOgviERZIlHemW3SSA+dCuL1Skv0D+C5Fx9v+uo zk+Z1nFg1UF3ieNIaaLBq+4No9P7wNDyrTW7zU2v7MkFp1iACTYwXCmxSlfWz3g2Rgd7vxu+mDC oSjAcZUXUNhp4mEUP2ijy7cCo/jryfkcw/WaXSVZJbPZTmb67V7WmweICG99KS2EsaO8OXSmnno rcCerOrEYm51BFspTqzH37YG9C+Q7Qno269YnC+kc+KJd9M2LOQ= X-Received: by 2002:a05:620a:458b:b0:914:c38a:4e80 with SMTP id af79cd13be357-914c38a52e6mr3042562785a.41.1779957048332; Thu, 28 May 2026 01:30:48 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 References: <6a16eeef.475db.2283bfa4@gitrepo.freebsd.org> <86eciwx7wg.fsf@ltc.des.dev> In-Reply-To: <86eciwx7wg.fsf@ltc.des.dev> From: Antoine Brodin Date: Thu, 28 May 2026 10:30:37 +0200 X-Gm-Features: AVHnY4Ii94wT8H1pK1oCcIYBJqfisBdreu9frVbchg9CLPnEhD0EizLORvktQS8 Message-ID: Subject: Re: git: bd15d6ef126e - main - libarchive: Force GNU iconv compatibility on FreeBSD To: =?UTF-8?Q?Dag=2DErling_Sm=C3=B8rgrav?= , Baptiste Daroussin , Bryan Drewery Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, Mark Johnston Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4gR07L28BHz3wKT X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated On Thu, May 28, 2026 at 10:20=E2=80=AFAM Dag-Erling Sm=C3=B8rgrav wrote: > Antoine Brodin writes: > > Dag-Erling Sm=C3=B8rgrav writes: > > > commit bd15d6ef126ee4c0eac931117f6bbbf6f9a3fc72 > > > Author: Mark Johnston > > > AuthorDate: 2026-05-20 16:39:40 +0000 > > > Commit: Dag-Erling Sm=C3=B8rgrav > > > CommitDate: 2026-05-27 13:10:57 +0000 > > > > > > libarchive: Force GNU iconv compatibility on FreeBSD > > > > > > When libarchive is compiled with FreeBSD's native iconv instead o= f > > > libiconv, as happens with libarchive in the base system, we need = to > > > configure iconv(3) to handle invalid sequences by returning -1, a= s > > > iconv_strncat_in_locale() assumes GNU iconv semantics. > > > > > > This corresponds to upstream PR 3056. > > > > > > PR: 294577 > > > MFC after: 1 week > > Could this change break some ports? > > Your logs show that LC_COLLATE is set to C. It should be set to > C.UTF-8, or simply not set at all since LANG is already C.UTF-8. I add bapt@ and bdrewery@ This LC_COLLATE comes from https://github.com/freebsd/poudriere/commit/a69f7a01ea7318aafc6d20eff500849= cb98c5c7a Antoine From nobody Thu May 28 09:01:11 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gR0pJ70Pdz6fNk2; Thu, 28 May 2026 09:01:12 +0000 (UTC) (envelope-from des@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gR0pJ64hMz40jy; Thu, 28 May 2026 09:01:12 +0000 (UTC) (envelope-from des@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779958872; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cAxo1edq7+kS8SXssWXj/Gb9O8mLdLL9Y0qPOI/rboY=; b=KbNDx/ONo6k6ApTbgKdJQhCguldYn1HmA9vd64l3hA8oyxmOytAJ/g5k1KsP0s3oiBj8Pb iewdl57jTz5w0AcQpgeJZj6e+3bcoDeIHmNqB/lGv4keUbr1TU/L82zdq8Lr1qwZDuGr63 7GaMiBD4t3CYAvyTlbQY8XwNJF4M9XXk3DH0p5w+urPHWfuLRC5DtBPmLdQMb4PDFzsTww eJ0ahEu3g1ksFf5EEsk44PAIBLFPujpz9MemiYNvRp9hAmqy9JxSEjO159/CIF9fb2gtOV 0YNEuKS6XkmweeXaRwBZyq/bmCc1BrWJZSgVk+nJPANE3ihd/edvFx+jMUV0iA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779958872; a=rsa-sha256; cv=none; b=oMvA84gslcjcmFVN7OIxcHqLYK3vN8E7FZCBClKjRSs8yuqGC34CJssDDmDtHDIfyN5Jtt SkC2FMK2VqpG2zluq7u7sR043Lyh72ufkp9BjIB0fXzwrJ/Hhutcg5pwgZ38kADfHnA2WU cPSNu7nLY1yYYWTi4XBNCnLkPTY7qrSZVlBTfpfZnNYN1fERHqArTkT3BUoLhNhKBc2qbl gce9mHe1AMCp/HaoNjkkr3S9i/MmIBMmieD8bN30EVybyS8EjBnBsJOioCLtppyqYLjyb/ JjLUFejdzgTEyJJRJhxaaw8p8p/cF7fVCtrpSIGeeCcRyEysIj7gxXy6Hdc2ew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779958872; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cAxo1edq7+kS8SXssWXj/Gb9O8mLdLL9Y0qPOI/rboY=; b=FrOOCyKHj7jG1yZqRcBaohc8YBi2sVo0eLB/mrWH3Pa+FZ2nrD8SkJV+VPjcCiCaGXr1Gv SJTiMZqGDol4CjxLwaV3ssj7H6pMJB3bgpPVtKamIYQjGu4ZecA6JVo7JsnKsVeNDoWOja dfHwGTapD2/z9m0ocRR8blOs4bbP2V3pviCcO4lum34AaT3FfoZ12umbp092AoAp9jT9qK eH+YasDrQ7k6Un9b6soQv1R83ZfIO/LdCBZyoSBAobVj6qvB7e4e9XJAyBvzH8Zq7PBiy4 NfdOwUmOT6dheryXY1yvQipNetTj/9eqFaZaRPMf31Le2bCx/p5gwA0kEmFDLQ== Received: from ltc.des.dev (2a01cb0585070b00922e16fffef1acef.ipv6.abo.wanadoo.fr [IPv6:2a01:cb05:8507:b00:922e:16ff:fef1:acef]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: des/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4gR0pJ4CQJz1K2V; Thu, 28 May 2026 09:01:12 +0000 (UTC) (envelope-from des@freebsd.org) Received: by ltc.des.dev (Postfix, from userid 1001) id 142CD74506; Thu, 28 May 2026 11:01:11 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Antoine Brodin Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, Mark Johnston Subject: Re: git: bd15d6ef126e - main - libarchive: Force GNU iconv compatibility on FreeBSD In-Reply-To: <86eciwx7wg.fsf@ltc.des.dev> ("Dag-Erling =?utf-8?Q?Sm=C3=B8r?= =?utf-8?Q?grav=22's?= message of "Thu, 28 May 2026 10:20:15 +0200") References: <6a16eeef.475db.2283bfa4@gitrepo.freebsd.org> <86eciwx7wg.fsf@ltc.des.dev> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Thu, 28 May 2026 11:01:11 +0200 Message-ID: <86a4tjykko.fsf@ltc.des.dev> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Dag-Erling Sm=C3=B8rgrav writes: > Antoine Brodin writes: > > Could this change break some ports? > Your logs show that LC_COLLATE is set to C. It should be set to > C.UTF-8, or simply not set at all since LANG is already C.UTF-8. Hmm, this does not appear to be the correct answer. It looks like the ports tree is messing with the locale: des@crash /usr/ports/devel/py-game% export LANG=3DC.UTF-8 des@crash /usr/ports/devel/py-game% export LC_COLLATE=3DC des@crash /usr/ports/devel/py-game% locale=20=20=20=20=20=20=20=20=20= =20=20=20=20 LANG=3DC.UTF-8 LC_CTYPE=3D"C.UTF-8" LC_COLLATE=3DC LC_TIME=3D"C.UTF-8" LC_NUMERIC=3D"C.UTF-8" LC_MONETARY=3D"C.UTF-8" LC_MESSAGES=3D"C.UTF-8" LC_ALL=3D des@crash /usr/ports/devel/py-game% tar -xf /usr/ports/distfiles/pygame= -2.6.1.tar.gz -C /tmp des@crash /usr/ports/devel/py-game% make BATCH=3D extract=20=20=20=20= =20=20=20 =3D=3D=3D> License LGPL21 accepted by the user =3D=3D=3D> py311-game-2.6.1_5 depends on file: /usr/local/sbin/pkg - = found =3D=3D=3D> Fetching all distfiles required by py311-game-2.6.1_5 for bu= ilding =3D=3D=3D> Extracting for py311-game-2.6.1_5 =3D> SHA256 Checksum OK for pygame-2.6.1.tar.gz. tar: Pathname can't be converted from UTF-8 to current locale tar: Pathname can't be converted from UTF-8 to current locale [...] des@crash /usr/ports/devel/py-game% cat >/tmp/tar=20 #!/bin/sh locale exec /usr/bin/tar "$@" des@crash /usr/ports/devel/py-game% chmod a+rx /tmp/tar des@crash /usr/ports/devel/py-game% make BATCH=3D extract EXTRACT_CMD= =3D/tmp/tar =3D=3D=3D> License LGPL21 accepted by the user =3D=3D=3D> py311-game-2.6.1_5 depends on file: /usr/local/sbin/pkg - = found =3D=3D=3D> Fetching all distfiles required by py311-game-2.6.1_5 for bu= ilding =3D=3D=3D> Extracting for py311-game-2.6.1_5 =3D> SHA256 Checksum OK for pygame-2.6.1.tar.gz. LANG=3DC LC_CTYPE=3D"C" LC_COLLATE=3D"C" LC_TIME=3D"C" LC_NUMERIC=3D"C" LC_MONETARY=3D"C" LC_MESSAGES=3D"C" LC_ALL=3DC tar: Pathname can't be converted from UTF-8 to current locale tar: Pathname can't be converted from UTF-8 to current locale [...] des@crash /usr/ports/devel/py-game% cd ../.. des@crash /usr/ports% grep -w LANG Mk/bsd.port.mk=20 # USE_LOCALE - LANG and LC_ALL are set to the value of this variable in LANG=3D C .export LANG LC_ALL WRK_ENV+=3D LANG=3D${USE_LOCALE} LC_ALL=3D${USE_LOCALE} There we have it. The ports tree should set LANG to C.UTF-8, not C. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@FreeBSD.org From nobody Thu May 28 09:08:57 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gR0zG4KpHz6fP2T; Thu, 28 May 2026 09:08:58 +0000 (UTC) (envelope-from des@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gR0zG3jhsz41WX; Thu, 28 May 2026 09:08:58 +0000 (UTC) (envelope-from des@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779959338; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vQYJkLpJYILPwvRKaYwHMPxozcPSUNsZRweBjUzdiO0=; b=uXVRGntXwrySwc+ZCxwdDuTB2OrpvDUtmtf0yITSRA3cUA7p31wzl2WVNxosBz92cfb6o5 Qekpjq+SXP/uXMqzH3MLFMarzWSxWYxlPZuIoxb/IBBJVbPzD31grak5Uuc36S4tWeC+6C dFLZS7DuruLrph8R0o3SFDWPWr82TitDSReZMN1gm9Ni2lToFafgFEGGPTpRNb/77U4TYq Wi8QJ11kMJweyD5Yj+esEQAjblVqCBC1P+gqvwtnHdBnVNrfja21lzCMAbVneJ+ZWtsGh6 vLWjNgnu8t/Vzf+nJMUeJpPH+Rb0KuKcR2d9CcJ+ODp+hOnjiWFjceyDlLz/Kw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779959338; a=rsa-sha256; cv=none; b=NplM/+Bz1BZSjJSP918A/FYx+oye4MSgi0t2ut3HU3SCCtU1A5GbzlVOXK3iIZY26Y9NSd vMfjk7xajUjhcIHIzpczCQC8as8sORhc+UYNQx+x/JfXxbTKSIg5ktqYDaG0KZlGVBJWmq z+e3RCz4c4TQ6SQSSdBW54+9uPgeTi7+X5z55YgT8BotjMFYZ+ppAeR0p4uBfBVfEKR6Kc JOTXZ14FUCHMx8Tf3bmv1ldjH8dApoRAjCV/+9Wejzjsp9nfpl5rgn6Xu0GqkuotcYSYTg /g97im1jdCHSTxgUXiokrXUY9Cw2cQYyTJGUW7yZN1ma1JsWpg9XohNkNRx9Ew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779959338; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vQYJkLpJYILPwvRKaYwHMPxozcPSUNsZRweBjUzdiO0=; b=Yp1Rb9OiWUmZT2/qPcJNO0MsgABifhhQMh/TBCL2mMtfeHk/8+0mJm9XnAc87GXAbduSsd 2uBd3OBreIvjUJfcELkmc9FP3epxmWyQLu0JFzhBZcrm+hf8NjulCy0k/iVsuUgA7s/8qs YhsMh5MsSamB6uISgDdAwQW+XCpf1JOm3FSXK5dFd+mZCNbChJT2IKzF55x3tkSLS1roCb uiLv9qoV6nSKdA/svzfRzLMPIPJNzrmXsB4h9W0vGYuZrld2DQx/gnYeaFeULW7C2yONhl P5NrayTSUnzC5IN43LfP3wpu/JpvAezTphDjl5x99mz6ueTbfgfSo2EzPY4SHA== Received: from ltc.des.dev (2a01cb0585070b00922e16fffef1acef.ipv6.abo.wanadoo.fr [IPv6:2a01:cb05:8507:b00:922e:16ff:fef1:acef]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: des/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4gR0zG2DN1z1KM3; Thu, 28 May 2026 09:08:58 +0000 (UTC) (envelope-from des@freebsd.org) Received: by ltc.des.dev (Postfix, from userid 1001) id 42D9475102; Thu, 28 May 2026 11:08:57 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Antoine Brodin Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, Mark Johnston Subject: Re: git: bd15d6ef126e - main - libarchive: Force GNU iconv compatibility on FreeBSD In-Reply-To: <86a4tjykko.fsf@ltc.des.dev> ("Dag-Erling =?utf-8?Q?Sm=C3=B8r?= =?utf-8?Q?grav=22's?= message of "Thu, 28 May 2026 11:01:11 +0200") References: <6a16eeef.475db.2283bfa4@gitrepo.freebsd.org> <86eciwx7wg.fsf@ltc.des.dev> <86a4tjykko.fsf@ltc.des.dev> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Thu, 28 May 2026 11:08:57 +0200 Message-ID: <865x47yk7q.fsf@ltc.des.dev> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Dag-Erling Sm=C3=B8rgrav writes: > The ports tree should set LANG to C.UTF-8, not C. I just noticed that it sets both LANG and LC_ALL. This is meaningless since LC_ALL overrides both LANG and every other LC_* variable. Either way, the ports tree should use C.UTF-8, not C. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@FreeBSD.org From nobody Thu May 28 09:39:56 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gR1g03Gscz6fRB7 for ; Thu, 28 May 2026 09:39: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gR1g02gpgz45JR for ; Thu, 28 May 2026 09:39:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779961196; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PQbagodTXZS50JBtEb039261d6SDjiG6A1q7M44T5No=; b=vyqF7ybMfNM8TEC6SjvH16tvItShxtnRg+IW9gwYZo1wblbbLND0NyE9URur3CZdWEhaMf MYXJj4iJ2dRh72LvEbT9DZXeof7LvSPasSOI3Wqz2lM8WX4Cpf2euC5XRkUIlHnxMy1xst GC+ttDXhdLZdl2DR/wXfgjaVpdJ0JL2lATSRwS3hS2fTmKBG+dQ33NZV1XSm3/LbFBfZZG SEj5waQZ2e2aGSpsG1GROzk15y0BsFU63JMQaajtKBJH1LNTvreB36lyilje+yTeZ1reVb y8OejKilkrPrgMsgYz++HKlIA12JlJ6Ru1HQGAL5rXqHiBMek+wdniw0Yc2Kcg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779961196; a=rsa-sha256; cv=none; b=vkz7XQ3GKmGysHdtX4HTWvZV1Amtg0dsUJJmTpVU0ECrLIk3yQFyNKhznS+mrbWNWWW/40 5dzY6uftLOcPLd4xmKZ24i7/d5HVTgkJDd/rkFqgqYyELTBEP16wMBYkHS6xClDVo4/bLy kP40q0W9JevVT92fiv865nLK7ks4pUnvEdrb8iX68uDH8q6hOeKo0g92mDB6Kg+EhYvyfu xGSU28zMn7QNRhf6tC4xw5JF3Whzl2Q+JCWTsTEpWcpXcIZKY7XmL3Z+Z3xnO0ImukpkoM opUGPdX6amBP042vvvkC5T1wPC3Igkcc88LR7OFJyQUrq85Uj/qzBrp2Xuit7w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779961196; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PQbagodTXZS50JBtEb039261d6SDjiG6A1q7M44T5No=; b=ssqjWA6/2Y3y9GuLoBLK5ul4cgjJdrpYsAf7zTWLKC2IaScxrkBO3umslZv1Qp1gG6zsYk BHKuFcN7f7/EB5Y4qK2kmSrQBIhaNZ+kx/Re+pt1eQxYAQ5YcS9ylItVFeM9q1Dd4myrP9 96F1R5f+4y4D1dmNngzIGv3ixclA9VghYRE30KZoQCZUqUyywdPsIy78xK1qlPgw+l3BCY DUMUGcDCN4GTMzYaS7oFrTFK2utyIopurOkUBKdCJFS0OwkSP6zmif1pYopY82RrSWDi6b DK114QP94n2cbWlpoL2UvjiMry7da55H8dVtlD31yio5K2TSuLs2WNZpKFNfug== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gR1g02HDwzhPb for ; Thu, 28 May 2026 09:39:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31eb3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 09:39:56 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: a181c51e5f4d - stable/15 - Add audio group List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: a181c51e5f4d0f5ed0fa175cf5a268be63b3961b Auto-Submitted: auto-generated Date: Thu, 28 May 2026 09:39:56 +0000 Message-Id: <6a180d6c.31eb3.56008317@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=a181c51e5f4d0f5ed0fa175cf5a268be63b3961b commit a181c51e5f4d0f5ed0fa175cf5a268be63b3961b Author: Christos Margiolis AuthorDate: 2026-05-06 16:00:38 +0000 Commit: Christos Margiolis CommitDate: 2026-05-28 09:39:37 +0000 Add audio group To be initially used by virtual_oss(8) loopback devices. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: emaste Pull-Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/26 (cherry picked from commit 6024e3f99a1e3f5e52fd50c26789fc2dc98fd9c1) --- etc/group | 1 + sys/sys/conf.h | 1 + 2 files changed, 2 insertions(+) diff --git a/etc/group b/etc/group index 35df51838ae4..8acec0d1474e 100644 --- a/etc/group +++ b/etc/group @@ -15,6 +15,7 @@ sshd:*:22: smmsp:*:25: mailnull:*:26: guest:*:31: +audio:*:43: video:*:44: realtime:*:47: idletime:*:48: diff --git a/sys/sys/conf.h b/sys/sys/conf.h index a830c9d4c622..5496133ab6d8 100644 --- a/sys/sys/conf.h +++ b/sys/sys/conf.h @@ -155,6 +155,7 @@ typedef int dumper_hdr_t(struct dumperinfo *di, struct kerneldumpheader *kdh); #define GID_OPERATOR 5 #define GID_BIN 7 #define GID_GAMES 13 +#define GID_AUDIO 43 #define GID_VIDEO 44 #define GID_RT_PRIO 47 #define GID_ID_PRIO 48 From nobody Thu May 28 09:39:57 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gR1g14tWfz6fRGv for ; Thu, 28 May 2026 09:39: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gR1g13Jjsz45Fw for ; Thu, 28 May 2026 09:39:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779961197; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MQFsuhPfDB4Dnokswi5smfe/TEU+RjOtM4Ultc0DfTc=; b=cozr4/i6ac4AJI06R/mg6BOtNX9dJSFOTkJdaLBnAirnxxUhZ+VwThwM81qxAKhY3ysdf7 jiaOhlmeXf1wkBBEM9blKE0+EPvNvjnH/+j63s1hmXdW3yC8Cbh98Munji1Xm+6dOASHk3 AVCanZbtXMkw0me/T38j9L+Qp8HMwS9neunJgqJSqQ0E4lkF18zwg+36qiDTEU6/fwdEgW f89VIgmkmj9LjU7bd6K/lGhRCgYFeUuC2qqeXccWarMmrgc+0r+cjogHYlgo6rb3Mx6mGK QVxx9rYkOBz/NXBNPOQrKDqof5SNPCzrBU9ZtVGa43RxKUTo9mOQIr1z+9lmFA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779961197; a=rsa-sha256; cv=none; b=fWjCtThsk0DZRK1mzU5I5RNPEniSj7qhH7MRJkpV6wqz9P5tUIkZX31/OkXsIzJAvsR0BC P9rFqts4BIjJM6d8fR+/rqixcjBFCgd69/ieaV7/URy91d72ARcobt+7LtfTJTvPCco2Jd C1M7Jf8/pGpnbk6fwQh3STIuyDPGbsBYNGeOGvu1L7umHi03H6jMTVoOkpYLXj6egjDwYQ kKokem2gdocst65hBCwX7v0sNnEPm4N4bl+VW1qQLKnTT0ZFrEbwNoYzjN8x6DJosZ4wab 1NFQ7qZbsc2lJx5J9ATYw8zIu5uO0MTE7yptKBVvDMXiP6uQBNIUUn1iwecM+w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779961197; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MQFsuhPfDB4Dnokswi5smfe/TEU+RjOtM4Ultc0DfTc=; b=JlqfI2dE/dNUFmxXw3BeY3OGApRthyW/kjoCOgt5eQfdratz2178FnZav8lnZ6GdKgbNyF 11VpG/InXm9t1FxjAxvUGZAfGzvgRYCRZ6f8ORo7pCflpD4SIbYSt6rslFILGd+nDjYbpU 4e1P/BxXn3u7KI7yZjqbk7QA468EOUJvqFLfD3sUYX1rozXBllXrFRyGloG2/9q3n3hU/h iuXIzSsk2rD513kQGtQmCxF5gPlltDOhdbNHfvl8nHpf4acM1qNkWZGfifSXbsMeiT/KNy f/JiDVsf2+llRInt2IfCw5c6ocn+4G3dq7OGZGNNRLz/R8V2KAM5RNkyQBPe8Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gR1g12hnMzghj for ; Thu, 28 May 2026 09:39:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31eb7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 09:39:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: a667352f6e3e - stable/15 - virtual_oss(8): Create loopback devices with GID_AUDIO List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: a667352f6e3e496cada472f4c2294ff999345b39 Auto-Submitted: auto-generated Date: Thu, 28 May 2026 09:39:57 +0000 Message-Id: <6a180d6d.31eb7.6fdb26b3@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=a667352f6e3e496cada472f4c2294ff999345b39 commit a667352f6e3e496cada472f4c2294ff999345b39 Author: Christos Margiolis AuthorDate: 2026-05-06 16:19:27 +0000 Commit: Christos Margiolis CommitDate: 2026-05-28 09:39:37 +0000 virtual_oss(8): Create loopback devices with GID_AUDIO Make sure the user is part of the audio group to avoid unintended snooping of loopback audio by unprivileged users. While here, retire voss_dsp_perm, since we don't use the same value everywhere now. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: emaste Pull-Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/26 (cherry picked from commit 5f904cb1b05c94453727abb606d6109fe504b10b) --- usr.sbin/virtual_oss/virtual_oss/main.c | 27 +++++++++++++++++++++----- usr.sbin/virtual_oss/virtual_oss/virtual_oss.8 | 4 +++- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/usr.sbin/virtual_oss/virtual_oss/main.c b/usr.sbin/virtual_oss/virtual_oss/main.c index 7e677b6c5dbe..b66d17d940af 100644 --- a/usr.sbin/virtual_oss/virtual_oss/main.c +++ b/usr.sbin/virtual_oss/virtual_oss/main.c @@ -35,6 +35,7 @@ #include #include +#include #include #include #include @@ -1618,7 +1619,6 @@ int voss_is_recording = 1; int voss_has_synchronization; volatile sig_atomic_t voss_exit = 0; -static int voss_dsp_perm = 0666; static int voss_do_background; static int voss_baseclone = 0; static const char *voss_pid_path; @@ -1862,7 +1862,24 @@ dup_profile(vprofile_t *pvp, int *pamp, int pol, int rx_mute, { vprofile_t *ptr; struct cuse_dev *pdev; - int x; + struct group *gr; + gid_t gid; + int x, perm; + + if (!is_client) { + /* + * Loopback devices can be used only by users who part of the + * audio group, to avoid unintended snooping by unprivileged + * users. + */ + if ((gr = getgrnam("audio")) == NULL) + return ("getgrnam() failed"); + gid = gr->gr_gid; + perm = 0660; + } else { + gid = 0; + perm = 0666; + } rx_mute = rx_mute ? 1 : 0; tx_mute = tx_mute ? 1 : 0; @@ -1916,7 +1933,7 @@ dup_profile(vprofile_t *pvp, int *pamp, int pol, int rx_mute, /* create DSP character device */ pdev = cuse_dev_create(&vclient_oss_methods, ptr, NULL, - 0, 0, voss_dsp_perm, ptr->oss_name); + 0, gid, perm, ptr->oss_name); if (pdev == NULL) { free(ptr); return ("Could not create CUSE DSP device"); @@ -1933,7 +1950,7 @@ dup_profile(vprofile_t *pvp, int *pamp, int pol, int rx_mute, /* create WAV device */ if (ptr->wav_name[0] != 0) { pdev = cuse_dev_create(&vclient_wav_methods, ptr, NULL, - 0, 0, voss_dsp_perm, ptr->wav_name); + 0, gid, perm, ptr->wav_name); if (pdev == NULL) { free(ptr); return ("Could not create CUSE WAV device"); @@ -2610,7 +2627,7 @@ main(int argc, char **argv) if (voss_ctl_device[0] != 0) { pdev = cuse_dev_create(&vctl_methods, NULL, NULL, - 0, 0, voss_dsp_perm, voss_ctl_device); + 0, 0, 0666, voss_ctl_device); if (pdev == NULL) errx(EX_USAGE, "Could not create '/dev/%s'", voss_ctl_device); diff --git a/usr.sbin/virtual_oss/virtual_oss/virtual_oss.8 b/usr.sbin/virtual_oss/virtual_oss/virtual_oss.8 index b607f45cd369..b9dc8fd86a3c 100644 --- a/usr.sbin/virtual_oss/virtual_oss/virtual_oss.8 +++ b/usr.sbin/virtual_oss/virtual_oss/virtual_oss.8 @@ -23,7 +23,7 @@ .\" SUCH DAMAGE. .\" .\" -.Dd April 17, 2026 +.Dd May 7, 2026 .Dt VIRTUAL_OSS 8 .Os .Sh NAME @@ -162,6 +162,8 @@ This option should be specified before the -d and -l options. Create an OSS device by given name. .It Fl l Ar name Create a loopback OSS device by given name. +Users have to be part of the audio group to access this device. +This is a security measure to avoid unintended snooping by unprivileged users. .It Fl L Ar name Create a loopback OSS device which acts as a master device. This option is used in conjunction with -f /dev/null . From nobody Thu May 28 09:39:58 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gR1g26mC0z6fRFD for ; Thu, 28 May 2026 09:39: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gR1g23j5mz45Ql for ; Thu, 28 May 2026 09:39:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779961198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Tff871Iun/Mm1QylyGdGs95vS3PQ0kCqTYZU5m8Jels=; b=J74QjWfna2IwOTWMRvQM60wovcklEQtKfTSB8rkxyKxnhrvRC6gBXBvv+w7I0xgqlLInU3 MTT64llyDmKpomD690uqDcjaXhxRacDrkHKfF4EYw5YAC0netW5wYROxVwCQe672BB90vI vjeV4b8+4hq+4/ldXgK2FZ9sn65fSs1dHvhoI0QBfaU0l4iP10tMDmGikNiBjHLHdoylpa XbnVylKCFg34fSaWCxyscqumZhM78BHMRpsJJiicKwVMfS8WT4XNFzxqTPHSXM/+BKN48f IivQk136iuY9HjRbUjra9GKdst6PLvZ3RFAdBQe1rdAk9Xbyax+1A7W3AWO7Lg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779961198; a=rsa-sha256; cv=none; b=gZHlTLdY7HFn0eZiXapuXasl5lKC0tZE3LZ7KX8Hua2/Kjii+kjaPukqcqzu5sFfin7LEL mtcQkf1HBYKO/ZKxBfYe+QjHmy3hbCpmZbZ/2ntueavfBJKwXJ7Aa7d+ZjLstqa1DVwABp tq4SCN/JxE9txePezzUkLI/fFCRx8NTNZlupxCUCXdZ3LoA/OWPH7e3g/dti5OosjAsSZb qJG1qwtbQjPpNy6ZsnOcuT6W4d305NfneKyaoTYLtLSYTPmZnIR2lc+Ys9HOqMdNEwQ3zm pij4BUpmcEvP048bB3X9a/pB3ZL9WSRJLI7EbXKDtPoKwI9vZj3SM5U9+pXyEw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779961198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Tff871Iun/Mm1QylyGdGs95vS3PQ0kCqTYZU5m8Jels=; b=txpj2NF+YE59D1XPvdiozSsU9F+F2iYMnqm83jPEWpXSMDxWJabIC6F+tdJAMhQc+0c2TR ZfpPfJDeBbG55KkRjKuswjaSlfsr/bfYx9Adwexy8yA+nAkGUbwmXMxPIgGwEslDNYid0s lBZf999rc/fl1/Ze+P+PiragrmKYesh0hxYZbab5IF2piqwxGdFx/hU4fU5vKRaXXlLf21 rUU+mHUgLMY2NbWBsm08T/3mJqdMk5x/NNmzBS547OMPepqrcS4pTCnAFZ+su6Rns73adk Spjyqw0LI+/6ZJZpliUSWReXOmu9NN3mqiIEHTymtVs4KAbSYF3sLMTNq2yreg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gR1g23HCQzhMq for ; Thu, 28 May 2026 09:39:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31bb4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 09:39:58 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 6524505fd4f9 - stable/15 - rc: virtual_oss: Create a loopback device in the default configuration List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 6524505fd4f94a636be576d07c23eeadba1a1969 Auto-Submitted: auto-generated Date: Thu, 28 May 2026 09:39:58 +0000 Message-Id: <6a180d6e.31bb4.18e9d9df@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=6524505fd4f94a636be576d07c23eeadba1a1969 commit 6524505fd4f94a636be576d07c23eeadba1a1969 Author: Christos Margiolis AuthorDate: 2026-04-17 10:03:30 +0000 Commit: Christos Margiolis CommitDate: 2026-05-28 09:39:37 +0000 rc: virtual_oss: Create a loopback device in the default configuration The loopback device allows us to record desktop sound by reading from it, or even use it as an input device, for example during a call. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: emaste Pull-Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/16 (cherry picked from commit 8532b4a436364d04d5c1feb7af5ecd4b5df71a9f) --- libexec/rc/rc.d/virtual_oss | 1 + 1 file changed, 1 insertion(+) diff --git a/libexec/rc/rc.d/virtual_oss b/libexec/rc/rc.d/virtual_oss index a25abf256f55..73a486f547a5 100644 --- a/libexec/rc/rc.d/virtual_oss +++ b/libexec/rc/rc.d/virtual_oss @@ -39,6 +39,7 @@ virtual_oss_default_args="\ -i 8 \ -f /dev/dsp${default_unit} \ -d dsp \ + -l dsp.loop \ -t ${virtual_oss_default_control_device}" # Set to NO by default. Set it to "YES" to enable virtual_oss. From nobody Thu May 28 10:45:01 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gR36B5rC1z6fWDm for ; Thu, 28 May 2026 10:45: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gR36B5HZSz3Dpd for ; Thu, 28 May 2026 10:45:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779965106; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C0/Sd9+7U/sVw/famJ6kL1ZeJcpYQXPE3VamsnVUlsg=; b=itVONrjwXpdUuUJfx3n1fxfZhDNyOgbp4WJgbzNvjFgVgCPUBnF5/83uJ6Ztm1pIL+nLWZ LcTLY7Hrkockb9r+25qjZMQ0VfJlkRwYaX1c6fyg4VJ4tX/1fbHsLc+BkbsoCSAZCeiOPl IAFkLRfZh5LY+EbaPMKmJ3c7q9JxkoTfwHkO7RGhMVF3/ep+/akW2gajAPikk+qX+6Is4G fPS7sp+FZkGLMBJ3Y0cmTUTrLmkEpKRSwxcCMN00S7+be9ZcNKgx/rgOCu9fM3glvVnHdE Q8IWdPSI0vqlsmbFxWR537yRMLX5LyIbqwiGGpNlmAIigB3Ve1Mz047XDBRbcA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779965106; a=rsa-sha256; cv=none; b=fS/b32Xh68KGh2Sx4KpjqE8txYYcZFnSzTjTNDXi5DCfqULva9Gpt8oSzbRSOz3syU0bXu RSc7ZchxHD9WSkHvWrAdoeH1Z2b9EU9S/8qlR+L8czQDjZNZnND/VvlxxLEDHmMQBHxMhP 55KshPmFyGV++1WKRefre+1yQr6D/mxio/nxSGzH05QMxrX/a3Ugf5rARnhXAWgs8ugUuM 6uTUj3YoQaNkCIgQyCnHdHYNFEfKp80HuYlky7Xh+242uDcQ2nhgfOjSPcvBsyuZTbJaUi OOSIllsMM1owWOetsdzk2+np43OQy02hxwB7PxmYXETgITWuXwH0nZE3yrI9ZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779965106; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C0/Sd9+7U/sVw/famJ6kL1ZeJcpYQXPE3VamsnVUlsg=; b=uZXcUod0t6fQwUepSZ40gvFpwMqUVEVIVFPcAVxjg3476J5BVGBxl4IeGirmFhr6IWTldr WC/6xaXeYZ3ym1G997Z4+RYTLH/4+I5wUEi5htIJghKGL8JbI/1OynMWIHu7ismEhNQv+W Qz2xIlh0KBQDFKyRgAHzw+0Eykr90BRIcBAuIhMiGAsO6ygfs/EjEftuumm7EFHsCbhZnu 0pOCNxswWhS0HoIIZpMSasb1pJdL0z+2b0z3hHP/0Kd+WsC7QL/9W6srZiPTNEC7LxmPpj PnfCsBKmcAbdXMQE8il5QxR01uHFiqRPquqMR3CQ3awFVv4LhInVM2jAFQ7SzA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gR36B4MDhzk0k for ; Thu, 28 May 2026 10:45:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3ae9b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 10:45:01 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Cochard Subject: git: ff873565bc2c - main - ping: fix test timestamp_origin when tstamprepl is disabled List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olivier X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ff873565bc2c3e47fe1d070305aa851189ee8bcf Auto-Submitted: auto-generated Date: Thu, 28 May 2026 10:45:01 +0000 Message-Id: <6a181cad.3ae9b.32d308de@gitrepo.freebsd.org> The branch main has been updated by olivier: URL: https://cgit.FreeBSD.org/src/commit/?id=ff873565bc2c3e47fe1d070305aa851189ee8bcf commit ff873565bc2c3e47fe1d070305aa851189ee8bcf Author: Olivier Cochard AuthorDate: 2026-05-28 10:40:48 +0000 Commit: Olivier Cochard CommitDate: 2026-05-28 10:40:48 +0000 ping: fix test timestamp_origin when tstamprepl is disabled The timestamp_origin test sends an ICMP Timestamp Request (ping -Mt) and parses the tso/tsr fields out of the reply. When the sysctl net.inet.icmp.tstamprepl is 0, the kernel silently drops the request, ping receives no reply, and the sed extraction yields an empty $tso. The test then fails inside atf_check test -n "$tso" with the unhelpful message Approved by: maxim Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D57287 --- sbin/ping/tests/ping_test.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/sbin/ping/tests/ping_test.sh b/sbin/ping/tests/ping_test.sh index af700615dc8d..ab45ad809a52 100644 --- a/sbin/ping/tests/ping_test.sh +++ b/sbin/ping/tests/ping_test.sh @@ -253,14 +253,22 @@ inject_reply_cleanup() ifconfig `cat tun.txt` destroy } -atf_test_case timestamp_origin +atf_test_case timestamp_origin cleanup timestamp_origin_head() { atf_set "descr" "ICMP Originate Timestamp" + atf_set "require.user" "root" + atf_set "require.config" "allow_sysctl_side_effects" } timestamp_origin_body() { require_ipv4 + # The kernel only replies to ICMP timestamp requests when + # net.inet.icmp.tstamprepl is enabled. Save the current value + # so the cleanup hook can restore it, then enable replies. + sysctl -n net.inet.icmp.tstamprepl > tstamprepl.txt + sysctl net.inet.icmp.tstamprepl=1 + # Run ping timestamp out=$(ping -Mt -c1 127.0.0.1) @@ -286,6 +294,12 @@ timestamp_origin_body() atf_fail "tso ($tso) differs from tsr ($tsr) by $diff seconds" fi } +timestamp_origin_cleanup() +{ + if [ -f tstamprepl.txt ]; then + sysctl net.inet.icmp.tstamprepl=`cat tstamprepl.txt` + fi +} atf_init_test_cases() { From nobody Thu May 28 10:45:56 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gR37B51N7z6fWqM; Thu, 28 May 2026 10:45:58 +0000 (UTC) (envelope-from des@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gR37B17GQz3FWK; Thu, 28 May 2026 10:45:58 +0000 (UTC) (envelope-from des@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779965158; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+i0hD8P8TmCk0U7Z7NjtnmFzHaGJkDalmd29FF0ZM8g=; b=WfkRc4KKBWbWusdkCXUc1bhMDMJDDlsDOUw+GpCeZlQpQoEi6zzQhx90CspU7CaKQWVqrm MRf3/U2ZHEfO+N/5TCNrNqFQA3LksF0Ez0rrlqZyngT3c9yLdVUe+PDCBa+5wqCMRTZwPF 84rblKwbNWU+jPvkzNvM3P9wpT++8YlTqPxsA5MIBA17E+6JnA0fmUj0Gnjo0ExVh5dVC1 erLOGuU3/J1mGruPTIAI0crOUlbQuECHtDNHZoCinKPnYC1Xv6KaUhJRl4AWuQYQRAWvZ6 //Tn/t7fF0XrfVgHPIpx7CNE2a7AyIV8lTmu2A6EFzZ9mKnxmz+9ekvf2CKMKw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779965158; a=rsa-sha256; cv=none; b=lZNFu/EuYNxvWIeKp+mfKUEWJEzp9IcoMV2QS85aT/NwVKs6PS9E7wrsL6gMUKppczzk1u TGFKsUwB6J6YEMlmzFcBtH3aklwg6pc/Drns23OJtuF8Ii4UjgWWS+zKcATNNUUBVcKmhu D47G6wUUmrBOAKzVIBJFeGJXuww6kILHcZosgl6BcIWwUTmalVwMGrsCdVBNTXcxeVofpZ VJu8DLuVq6ba7Xwhwa14B+04RhvkoaO3F9Tw+dHxKKWfDI71Qxd1kQSmaQGOiA0oW/iXY/ k5ZlUAAS9v7oXEgPHvQ2Z4nsIXCxbNt5bbczMuXh2hJ8n28C/vAzTqQHmDm5YA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779965158; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+i0hD8P8TmCk0U7Z7NjtnmFzHaGJkDalmd29FF0ZM8g=; b=BZphffeSGdM4k4u6ljrgxOL/bYO7m7iFs0IksPMh0AaLTTnYHiiYwQQxdfVBdxoWMk/prZ YMu6QBNxRzEcehbBucXyO0f4mEn5D41HTaqy6q0h6obzh24tPeXbwI22uQTxwdhJLPBCBH e2hArIVA6JvN3XjPI/+HMefS0EEmvM/MCbu5Sc5+1FAZGBSrIFydb+mhuAenKE6Q5eDTx8 So36IzRw1ceTWBCnXdltsDwGCZ4txciZ+WwWSx98K/D7sztkzmwR11ZchE7Hgweo+kYwG9 FXW0yPmTeTJmHM9yQXh3Okv1y9p1KJAwQkOyU4NSyY6iULfs9F0BATwCONZ+JA== Received: from ltc.des.dev (unknown [92.183.12.56]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: des/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4gR3796vb0z1MJg; Thu, 28 May 2026 10:45:57 +0000 (UTC) (envelope-from des@freebsd.org) Received: by ltc.des.dev (Postfix, from userid 1001) id E6005749A8; Thu, 28 May 2026 12:45:56 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Antoine Brodin Cc: Baptiste Daroussin , Bryan Drewery , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, Mark Johnston Subject: Re: git: bd15d6ef126e - main - libarchive: Force GNU iconv compatibility on FreeBSD In-Reply-To: (Antoine Brodin's message of "Thu, 28 May 2026 10:30:37 +0200") References: <6a16eeef.475db.2283bfa4@gitrepo.freebsd.org> <86eciwx7wg.fsf@ltc.des.dev> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Thu, 28 May 2026 12:45:56 +0200 Message-ID: <861pevyfq3.fsf@ltc.des.dev> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Antoine Brodin writes: > I add bapt@ and bdrewery@ > This LC_COLLATE comes from > https://github.com/freebsd/poudriere/commit/a69f7a01ea7318aafc6d20eff5008= 49cb98c5c7a The problem is actually here: https://cgit.freebsd.org/ports/commit/Mk/bsd.port.mk?id=3D02f27a83b44d4= 566fd409edc60570ac0734eb63e Here's a compromise solution: https://reviews.freebsd.org/D57295 but ideally the ports tree should use C.UTF-8 throughout, not C. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@FreeBSD.org From nobody Thu May 28 11:21:26 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gR3wC5D9Vz6fYfS for ; Thu, 28 May 2026 11:21: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gR3wC4VGYz3K72 for ; Thu, 28 May 2026 11:21:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779967291; 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=W+zmnVu96IYy3q25eYAONzlACw/eOticwbiq08NKfa4=; b=umcCVS70cnCVtE6nCEkvNBoHPmjfsMTex9EyxqpXOCLMHXZegOuyT2iY1/XejO1wgBYC93 n6NHtiw8u1XW37FlF7Mzv/HHKTMjzIFr93zco/FjO0m1niPLqeG/3k/BTO7KFrfdwTCn8o e0a1oKQW2H3SabNT/uBN0hFO98/1InGJCpWmhWm0Op6qGXazWGdoVhORPs4CpTm8p6IBTn 9d09o6zl1fN6Kf/hXnNQ8D1NQ+R8JOyfHfhfh22crJLC8q/51lRHXg6llfCTY7dmLy904L 8SWjoSq2qgL2mbd05Z+VCs6sEUsKS0KpPyl786iceQ3GBLazbrOQOuvFEFqy9w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779967291; a=rsa-sha256; cv=none; b=JUu2Dnjit5Ye/AzP+TtAR17W8DSpa6wbAdSW3fNz/n73P9dKe/HTURJ96UISspN8yGMXcP zrErf2CswVz/4kALiDYbIW/HWRWAAxdfmG0knEIbwJEtcELyTtnoDMXKSAOONSQECo07P+ 9oar6jvRM2jT4Sy/YhaAR6OGde5yHPZmLvZDy+6G/vRBe20OFHhz5g45rz0gHCvjufDIe7 hzkMO9GuQK6f9R6LtwNaV6RWL65jHfJHWnsNN3WOAD1f9VnFef/8DtErtZHQqVj51rwyO9 Scz6gOJD+8uxLSv/RFEH2D+1ojc0RV46s02ZmwpP0YFtiCKmJKAMayk0Bqv8Sw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779967291; 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=W+zmnVu96IYy3q25eYAONzlACw/eOticwbiq08NKfa4=; b=T1QrZyfwDrYrNWK8seTVVTX1AvHBjtH2YTBqWY/GvBK/mQ472Y3Mmn0FI61y7TFFNMSnH7 To9MRpbk61itxKVArQFc/bBNg6WvIahF7ZFVaxlR7z1uLvr3+pmZElJI51Rx12OBeR+8Xj /MMQCl7Pi7uVB7X9nZHWuCwuSa56xR2A5FUtWZ1flJRLBY1QsoOz24znty86yu/I27KKu7 VvZUwVlQIa3xaet+0jveKzRhNOxil0fzJvXNGfCPDa/PLyDt7pDAnoh3lpAM15MubnDqQU E0TUEjE8gL7UqmJoPHAhpWqfmi+vpkbsm03tWNw8aa6vXgfeMugxcosF46q96w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gR3wC43ddzl6S for ; Thu, 28 May 2026 11:21:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3ed09 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 11:21:26 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Mike Belanger From: Michael Tuexen Subject: git: b29842622dcb - main - if_ffec: correctly trim 2 bytes from the beginning List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b29842622dcb9c9c9515fc04dc5826a8717537b1 Auto-Submitted: auto-generated Date: Thu, 28 May 2026 11:21:26 +0000 Message-Id: <6a182536.3ed09.2c4ed400@gitrepo.freebsd.org> The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=b29842622dcb9c9c9515fc04dc5826a8717537b1 commit b29842622dcb9c9c9515fc04dc5826a8717537b1 Author: Mike Belanger AuthorDate: 2026-05-28 11:09:52 +0000 Commit: Michael Tuexen CommitDate: 2026-05-28 11:09:52 +0000 if_ffec: correctly trim 2 bytes from the beginning PR: 283315 Tested by: tuexen MFC after: 3 days --- sys/dev/ffec/if_ffec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ffec/if_ffec.c b/sys/dev/ffec/if_ffec.c index 17fab283fc81..cf171a854406 100644 --- a/sys/dev/ffec/if_ffec.c +++ b/sys/dev/ffec/if_ffec.c @@ -850,7 +850,7 @@ ffec_rxfinish_onebuf(struct ffec_softc *sc, int len) * biggest header is, instead of the whole 1530ish-byte frame. */ if (sc->fecflags & FECFLAG_RACC) { - m->m_data = mtod(m, uint8_t *) + 2; + m_adj(m, 2); } else { src = mtod(m, uint8_t*); dst = src - ETHER_ALIGN; From nobody Thu May 28 11:37:33 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gR4Gq0RnFz6fZpR for ; Thu, 28 May 2026 11:37: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gR4Gp6w3Zz3MsS for ; Thu, 28 May 2026 11:37:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779968259; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yq02nScmxDSuhSMbOjZ5krv0qUCXYjoG0gkT6WB23l8=; b=ynhRFgB5h6m7zyFb5Yw9DowSCNb/8tqyEfMly+YbughzQv+qAhjOhUvEr4cCU3SwnV1kIN e8azJ6fdUYGhLnd+6KGbScrsKe8PE1BirhU3QsvQjKc1FUEL9cIHASWFjCWno2GcxDtUZc ZDwqbSvwxv7wfS9sPFEaoin3iyARbwb241l8LvyqwlctCelSklyRp/hWtovudjsadCC0DT NB+qYW4zJ6lTHmVQOW6uGwx/B6sEOosxjlKGif5ideHKaYiVLpPJbRx8et7DyzivnwcsWi WO3J0wcQLkH7lQdCr5F50Hrsvf+Y8ReDOnGgyXznZUNK2lkUSDVx6g/kWEdJjg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779968259; a=rsa-sha256; cv=none; b=RFH/WrejRrPIym4YTqTx0SP/WqpI6EaiotZXIkdwmgHFdjR8D/Cr48vK3l8IzRNis4CX7q DpCLNRS7wNjIc+a/dwIzBGWW6B6LxuEuIaIva8bjvWkiq2Rw5Ey1W4zjXql6ZIcPiGXQ6U pjapBBwfKPHDtIwQirn+rdFr/g0Mg7E+FJOHBLlkRVvkzOZz7c1VUpz/NYdcSxJ2vL/X9i K0sRfkDyxq8XE6L49xM5QuLDBa6BxFMiWeFbpYLRKt0dtDBqWiX2Zqgnx0PF2DMxYwTtvq mKpcShhI+Pdq1CJRneX7kmnO9GmjYfPi4mN1fOKC/SaDerSFlxCAy2NG3DSx+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779968259; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yq02nScmxDSuhSMbOjZ5krv0qUCXYjoG0gkT6WB23l8=; b=un/wOBpP8BfFjnPZdApXfwMyqUK+ylNicrAGUaAujflLu/O3ADLZmOUF8qhfKYfP6ZMKt4 sIODcjRz/sad6UGbkbtcqT7+phZFqKNQA+ktOb+ynifXieW7jhnY0w80GUcEC60MFqDt6G RtShE5x2iF6uwzrGmjX0OQQCaqDZJlVtKmAsGt5RvViTV0psagDZnU9eQxBXS03Zm4wjgZ 4TYKum1R+uAZoE5cqkcyOgctoqZtR1HXVHyfX+jj7SRtYyIrbz/2R0d9M7kX1olE3rSsk0 Ev4V+MoDhBJ2wKsBRJf38NId077+nXqYZEIURV9Nm+PzYcLC+DDpZqNmKiLBkA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gR4Gp6Cpjzl0n for ; Thu, 28 May 2026 11:37:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3f9a4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 11:37:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 45aaba521c3b - stable/15 - pf: fix incorrect table decoding in netlink List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 45aaba521c3b7abd39dc9e8f5ed0e9521fee57c3 Auto-Submitted: auto-generated Date: Thu, 28 May 2026 11:37:33 +0000 Message-Id: <6a1828fd.3f9a4.542e9e5d@gitrepo.freebsd.org> The branch stable/15 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=45aaba521c3b7abd39dc9e8f5ed0e9521fee57c3 commit 45aaba521c3b7abd39dc9e8f5ed0e9521fee57c3 Author: Kristof Provost AuthorDate: 2026-05-21 08:13:24 +0000 Commit: Kristof Provost CommitDate: 2026-05-28 11:36:43 +0000 pf: fix incorrect table decoding in netlink We used nla_p_table for pfr_table structures, but this netlink decoder was intended for pfioc_table and decoded an extra field, outside of pfr_table. This allowed userspace to write (slightly) outside of pfr_table. Use a separate nlattr_parser for pfr_table. PR: 295218 Reported by: Robert Morris MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 64327f769cee0c26e1b81e6195a5092498b10403) --- sys/netpfil/pf/pf_nl.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf_nl.c b/sys/netpfil/pf/pf_nl.c index 168c6ac63d90..c09b204bcc66 100644 --- a/sys/netpfil/pf/pf_nl.c +++ b/sys/netpfil/pf/pf_nl.c @@ -2138,7 +2138,14 @@ nlattr_get_pfr_addr(struct nlattr *nla, struct nl_pstate *npt, const void *arg, return (0); } -NL_DECLARE_ATTR_PARSER(nested_table_parser, nla_p_table); +#define _OUT(_field) offsetof(struct pfr_table, _field) +static const struct nlattr_parser nla_p_pfrtable[] = { + { .type = PF_T_ANCHOR, .off = _OUT(pfrt_anchor), .arg = (void *)MAXPATHLEN, .cb = nlattr_get_chara }, + { .type = PF_T_NAME, .off = _OUT(pfrt_name), .arg = (void *)PF_TABLE_NAME_SIZE, .cb = nlattr_get_chara }, + { .type = PF_T_TABLE_FLAGS, .off = _OUT(pfrt_flags), .cb = nlattr_get_uint32 }, +}; +#undef _OUT +NL_DECLARE_ATTR_PARSER(nested_table_parser, nla_p_pfrtable); #define _OUT(_field) offsetof(struct nl_parsed_table_addrs, _field) static const struct nlattr_parser nla_p_table_addr[] = { From nobody Thu May 28 12:27:32 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gR5NV2QZ9z6ffvY for ; Thu, 28 May 2026 12: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gR5NT2gGRz3SHw for ; Thu, 28 May 2026 12: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=1779971257; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qi1QGJHIT2GVuO1E/YHnX8EHj2zkeNPZ1JR6x+FFznA=; b=tkaOBATQlCYE8yK9q95LVcs7uIxWmXKJItIfZzLMHbbPehSxfUnO0iB8F5hIE3S1Gz8DvW noDq8CQQ4Fi8xjjrQzdOpyX/FHTAgxYC46+drs8LmifIVZNYBDvvdBPv7fnzvar4qrd94W Yk1TIaov8JNvKDiPVP9Fzr9Pnr8or2CJr13cB/Ml5BWLbu7trEDRXGBXHVBaWIBc4a3jow p27H+TaPlUmg9Nj6m9hHj/q5CiOrnPHT+tC2aYb+19OJnwDZUyc0UJjUqgRYzXSVMXQxmR K6259oSoPh8HaTOymKdsGfpXnYLwmAt5oCelYvH4Ka8pgiwF5WdbKHBxcUnblQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779971257; a=rsa-sha256; cv=none; b=vg3hkCU4XbcCjsD9jsER4sY4HMrqVLm9zCyPBgbvBfz76bOozTAFFpgoeZqy58SySowCWM TU4l6o3m2+jZis0ulLQlO7G0fcgdM++gYJJ8WcHBUOpMi2A/wdcptYs9xyn2DyMgcxHtXu cSPcAIy5QK46C8FZVlfTIEF4N6SEOGbo3/akAU7L+pzxmXJ9MSwzmUyeodzEGpasaMqTwD Mb/7AWfHqLn8zgqWad2ha8d0/9KwOIApHiS+ukfmhjaFo+7MhFQcf9CntyLPhJxAsXsccI sSuLtvK0Da2xb4E+JLxjx6dia8Nte/T6Vpo/0rAJkUp9yIiKzj5VEzRAkUEy8w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779971257; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qi1QGJHIT2GVuO1E/YHnX8EHj2zkeNPZ1JR6x+FFznA=; b=sMA7RYowsj6osu1YmJf9HUBbZKWLvElpboCMhtAgSVq44ZjYZ0LwmvaMITxDDBgvQNrb0s QtojxVldph2CWGjUjzBxYMeLVWOiphkU0yGVohNPyVMlyJ1rhmsQAL/ZddExAsH+8vE4Ue Y+Ievt1WiwVbwf4c9SsaVJ0MvS56jqEMaVLr7Ygc/cdSXmznO9NuNRhF0IQpBH3uQhSDkd FTHdp8ebeNAgScS5Rlx3Wg8ghRfyXgZu4zwLN7lOrd/nBs14LdyUaQSZg6tEqIKCL8+6uK O6b/dy5xB5pyFffXe1y1WBJmolIuM7z0MS+z4uhNqQsVrmYEHL757Fkz+RQyCA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gR5NT1h11zlsw for ; Thu, 28 May 2026 12:27:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 43cc2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 12:27:32 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 05039fda7ee1 - main - tests: Fix reliability issues in POSIX ACL tests List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 05039fda7ee12f3b857e55a461607b5af7b6c91f Auto-Submitted: auto-generated Date: Thu, 28 May 2026 12:27:32 +0000 Message-Id: <6a1834b4.43cc2.67dfe7ac@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=05039fda7ee12f3b857e55a461607b5af7b6c91f commit 05039fda7ee12f3b857e55a461607b5af7b6c91f Author: Dag-Erling Smørgrav AuthorDate: 2026-05-28 12:26:26 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-28 12:26:26 +0000 tests: Fix reliability issues in POSIX ACL tests The ACL tests use UIDs and GIDs 41 through 49 and expect them to be unassigned. Since GID 43 is now assigned to the audio group, some tests have begun to fail. While here, also fix a benign Perl syntax issue in the test runner. MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57297 --- tests/sys/acl/run | 2 +- tests/sys/acl/tools-posix.test | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/sys/acl/run b/tests/sys/acl/run index f8e9c8d87f71..42dbc7373f7f 100644 --- a/tests/sys/acl/run +++ b/tests/sys/acl/run @@ -105,7 +105,7 @@ if (isatty(fileno(STDOUT))) { } } print $status, "\n"; -exit $failed ? 1 : 0; +exit($failed ? 1 : 0); sub process_test($$$$) { diff --git a/tests/sys/acl/tools-posix.test b/tests/sys/acl/tools-posix.test index 2b2a27d24a0d..aa92911761a6 100644 --- a/tests/sys/acl/tools-posix.test +++ b/tests/sys/acl/tools-posix.test @@ -80,7 +80,7 @@ $ getfacl -qh lll > group::r-x > other::r-x -$ getfacl -q lll +$ getfacl -nq lll > user::rw- > user:42:r-- > group::r-- @@ -89,7 +89,7 @@ $ getfacl -q lll > other::r-- $ setfacl -hm u:44:x,g:45:w lll -$ getfacl -h lll +$ getfacl -hn lll > # file: lll > # owner: root > # group: wheel @@ -111,7 +111,7 @@ $ rm lll # Test removing entries. $ setfacl -x user:42: xxx -$ getfacl xxx +$ getfacl -n xxx > # file: xxx > # owner: root > # group: wheel @@ -369,7 +369,7 @@ $ rm ddd/xxx $ setfacl -dm u::rwx,g::rx,o::rx,mask::rwx ddd $ setfacl -dm g:42:rwx,u:43:r ddd -$ getfacl -dq ddd +$ getfacl -dnq ddd > user::rwx > user:43:r-- > group::r-x @@ -378,7 +378,7 @@ $ getfacl -dq ddd > other::r-x $ touch ddd/xxx -$ getfacl -q ddd/xxx +$ getfacl -nq ddd/xxx > user::rw- > user:43:r-- > group::r-x # effective: r-- @@ -387,7 +387,7 @@ $ getfacl -q ddd/xxx > other::r-- $ mkdir ddd/ddd -$ getfacl -q ddd/ddd +$ getfacl -nq ddd/ddd > user::rwx > user:43:r-- > group::r-x @@ -405,7 +405,7 @@ $ ls -l fff | cut -d' ' -f1 > prw-r--r-- $ setfacl -m u:42:r,g:43:w fff -$ getfacl fff +$ getfacl -n fff > # file: fff > # owner: root > # group: wheel From nobody Thu May 28 12:28:29 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gR5PT2Kqtz6ffy9 for ; Thu, 28 May 2026 12:28: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gR5PT1bxrz3SbX for ; Thu, 28 May 2026 12:28:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779971309; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sm/7/hiG5AdiqpwVtmnCIQa8WXXDn2q7XbvA5Ou9MYQ=; b=rQ6HRe6iUTYKK2qrsBo4o4LVgKDhFrGAzfwMlegCJ6ciM7lv4XU97aD7ui86E/osT5MIn6 CoCLIxGeCoujr2Qplmtb/EeMY5LwTQ4pbKfY3Qkc6lhbwTBiGMLmA4AjM3z3soSWJCug68 UfTc0ogaM6U368OXJlSqd3G/RlHOwmh3LCuGXWVaaPTVjpzZLDCVLEkCGHMEtSrdSSI4UK woPX8V8I/4slCsBg32wFDODdXunmSJaMN0IOPI1FwO7mw4zh8u6mvjI9GUL4Wdffgv5DgL Z8SKwbmtcbN6gTiI+YyRbVwAN2AlogTzuxAMWRfwGpGI44dnwZ1IlVnpbyqUFw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779971309; a=rsa-sha256; cv=none; b=xgJXg2yRBPi+t3BNcGruM9EvjpgJIdq5dgJwWP3LSDIQFsm79ONJikf1enS1xbf6AS7Nqn eoK3aIjdvcdrarqJOxo59GpDiW988y2yhqaH6IInf59ra0kAjrx2RWUaIJ+egpCbqgxCS2 tK+iOOM5Je82n4jU3xU/c7Sv6yj7vchgYyw0G4xHqa5klH1soWOQDBJlN09QB8dvIx833/ o+mgTNWu5WZ2p+/Vs8rhfYlCYTc/sXLP8UwrcY2RufYxJ5nRIJzYmu1sCMyqTuxo0BN3So DQrhpipgEnEq62NMByIpXSmlYwJeYogls2jZOBuuLY3I9oayYDBcMXXNucFy6w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779971309; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sm/7/hiG5AdiqpwVtmnCIQa8WXXDn2q7XbvA5Ou9MYQ=; b=N/Luvm0B3o63ugedboNcPMnCbRFhGbLVsMZ1C1y+M/YkRxxG4CeXHZvSfbQvPpbQVG+atv s5VpOv993MQhLjtX/e0t97pbcv+cTDWAmAbOQzfSEopmF6t8mIfjTn5ISkGKmlBNP2mEDS 1yukQeGeZBms54/s04hhaHrZGPUELPKsCDtLSS4kMS/4DCS+aObSwudzdo+cBM7zoOZls+ ND3vHa4Vihl46JDDGAcuEYJTswU9o0LfporgBIKNmgLKkt40d0ZjHrzUoYHnJdL3GZ8jEz 59aGRORBC2wUxsbfxKIoKKDiklN4BuR9KeifxbQaEh05YacmwLiJP9uvEQ//2A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gR5PT16GCzmlk for ; Thu, 28 May 2026 12:28:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 44699 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 12:28:29 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 39f23af2ba4b - main - certctl: Style nits List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 39f23af2ba4b845eb7f4ec7ae4079a67557eb63d Auto-Submitted: auto-generated Date: Thu, 28 May 2026 12:28:29 +0000 Message-Id: <6a1834ed.44699.6b2c3e1d@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=39f23af2ba4b845eb7f4ec7ae4079a67557eb63d commit 39f23af2ba4b845eb7f4ec7ae4079a67557eb63d Author: Dag-Erling Smørgrav AuthorDate: 2026-05-28 12:28:22 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-28 12:28:22 +0000 certctl: Style nits MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57298 --- usr.sbin/certctl/certctl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/usr.sbin/certctl/certctl.c b/usr.sbin/certctl/certctl.c index 0a07703bf37b..462f6c1730a9 100644 --- a/usr.sbin/certctl/certctl.c +++ b/usr.sbin/certctl/certctl.c @@ -1093,6 +1093,7 @@ int main(int argc, char *argv[]) { const char *command; + unsigned int i; int opt; while ((opt = getopt(argc, argv, "BcD:d:g:lL:M:no:Uv")) != -1) @@ -1155,8 +1156,8 @@ main(int argc, char *argv[]) set_defaults(); - for (unsigned i = 0; commands[i].name != NULL; i++) + for (i = 0; commands[i].name != NULL; i++) if (strcmp(command, commands[i].name) == 0) - exit(!!commands[i].func(argc, argv)); + exit(commands[i].func(argc, argv) == 0 ? 0 : 1); usage(); } From nobody Thu May 28 12:38:33 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gR5d55dqvz6fgVM for ; Thu, 28 May 2026 12:38: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gR5d512slz3TDB for ; Thu, 28 May 2026 12:38:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779971913; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mrnOM+XHG2kgSKZ6k1giOBtgKVRnZg47U2jInl7ZLaM=; b=y3B7BE/1+zbIddzzKjp8xu+Y/f+tIgJgj47khCD8jPGzA/Y6/pOY/wlxV4ZfPOBqPQYpS/ WpHNTp+aUhFkOOx8cjuDjjihwnITp0so5fh3/AOP7sINC+NGViKUYezAMcJ6eAnZKfoY+k XfqEG7p8+ehXm3+f6s94J1ygmo5pdN96Svhhxw4y3Q70ugvvIjYoVUhveDN+i9zlgMbTew JfaKR0f4PVW1wrZK+AKX/XVLMyjTsprKPYEpA6ok2/gVSDiXwCIi/bTNLzbf13SaJrNJho 6uKf17mSG03sGEQavGkmoKFHmdfgmPRoOqBqBFKXQy+0TYq3YZtTakHBxyTKCA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779971913; a=rsa-sha256; cv=none; b=O4Wa2xHDMdEhmjqxuljtrJeMpQ9ewGVDavgok7O8QD1KzpyDEUF95iHShEITxmmvEK9UT9 fs9pBkWqeJ+wfPAeuZn5QCExgB2UiP9c6HWHSH/upqtrh7S+f6NG+ZccHLWWJkonxm7WzH l46jcLOixw0adFQL4Y/bwvga1Vg8XCBhQ0NW9mdKaBVn4jjimxOIpepbtWL6NfOlLq11Jo Y5Sb3smb5cwpEsyCJAkgAI87hUpP3oQjaR1qQvjpqV1X6SduObTQkJx4W5lMzVpEs3IHlV 8X4jcmfnE1t4NLIGQCsnNyMpJ7OL3k69ba5y2rRAcjL8Ptex1RoEflifm9TRjg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779971913; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mrnOM+XHG2kgSKZ6k1giOBtgKVRnZg47U2jInl7ZLaM=; b=kkFy2+ce/+RwAKjDXii+f1ZskHcMKOrmoDqQekOPeApnFDc5ZHpoPBeLJQ2P+0BAUmHjK1 7UbuGiBN0SYmgj4/r5mnNlD7Gwjgd3+IAjmM01PJ4l/8ogWW0vEe9D63AEsKmNSrO8+sAP aoOrQRBq4rRrmXBrS4zYLSn68dr4ZSWH5gOCli2rF28yf53Ojn1IZN2qEMSeQ22+DzkO/y 2dB8aWojljJvEno2F8jd6+7yN6UaYFb8FPBLBHBfRXLtZyqnwIgepxiWqowgtsajAXR2c1 e8MOxluwSpL7eFUa8u1x5B98N0juWB91U3I2TGt5YEnyaDXRtaE72Bq34El8GQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gR5d506Q5zn7P for ; Thu, 28 May 2026 12:38:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 45808 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 12:38:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 7b2702ee25f5 - main - sys: add safe_read(9) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7b2702ee25f5230011fa7f8f650b65b37248fcca Auto-Submitted: auto-generated Date: Thu, 28 May 2026 12:38:33 +0000 Message-Id: <6a183749.45808.5d99f3ce@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=7b2702ee25f5230011fa7f8f650b65b37248fcca commit 7b2702ee25f5230011fa7f8f650b65b37248fcca Author: Konstantin Belousov AuthorDate: 2025-03-29 17:17:01 +0000 Commit: Konstantin Belousov CommitDate: 2026-05-28 12:38:25 +0000 sys: add safe_read(9) The MD function with MI interface to provide a way to read arbitrary (canonical) KVA. amd64 only for now. Reviewed by: markj Tested by: aokblast Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D49566 --- sys/amd64/amd64/machdep.c | 18 ++++++++++++++++++ sys/sys/systm.h | 8 ++++++++ 2 files changed, 26 insertions(+) diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index dbad85096a1d..db2fd5927f7f 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -1852,6 +1852,24 @@ wrmsr_early_safe_end(void) memset_early(gpf_descr, 0, sizeof(*gpf_descr)); } +int +safe_read(vm_offset_t addr, char *valp) +{ + struct uio uio; + struct iovec iov; + + iov.iov_base = valp; + iov.iov_len = 1; + uio.uio_offset = addr; + uio.uio_iov = &iov; + uio.uio_iovcnt = 1; + uio.uio_resid = 1; + uio.uio_segflg = UIO_SYSSPACE; + uio.uio_rw = UIO_READ; + uio.uio_td = NULL; + return (uiomove_mem(UIO_MEM_KMEM, &uio)); +} + #ifdef KDB /* diff --git a/sys/sys/systm.h b/sys/sys/systm.h index 7f655b48ba08..88c25f06e0cb 100644 --- a/sys/sys/systm.h +++ b/sys/sys/systm.h @@ -553,6 +553,14 @@ void intr_prof_stack_use(struct thread *td, struct trapframe *frame); void counted_warning(unsigned *counter, const char *msg); +/* + * Safely read one byte of kernel memory at address addr, placing the + * value into *valp. Returns 0 on success, EFAULT if read was + * impossible, e.g. due to the address not being mapped or not having + * necessary permissions. + */ +int safe_read(vm_offset_t addr, char *valp); + /* * APIs to manage deprecation and obsolescence. */ From nobody Thu May 28 12:38:31 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gR5d93BH6z6fggy for ; Thu, 28 May 2026 12:38: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gR5d91wkDz3Tgb for ; Thu, 28 May 2026 12:38:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779971917; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OX4u897WSAa4OnoeoyxLrihTQR428pSGrQRx5CH1pYw=; b=gcJwfHSALiqTWlYiBtSOO2GJxwzvVkIRLv1pwQLYGI4yj3leacsgUs/4ivg3hi1+X0ohKr dkeQ6ABC8F5HMMYVfofOkYToAxGErpsWkJs+wYuuDPhfgdRq8jV4HR770tHDpexLbOgg3A ItH8YkUiq4PcMcnOZe5YH6GpmwuvNUrIeEBKwwPgz+6gaYYLiWhFM/LxNCwUntaaVycn25 C4Y6eYADuCUrLMXVJNP4/MNsjJYPxll4fCRck51qQCH7KAgzJyv6vdZ5qIDYydlxIO1D6N yleR3cB9KT+HRXwec42ZifUcqN2brrj/uqwM7kUJo5MrJOAnpbrXfbhXzotaDg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779971917; a=rsa-sha256; cv=none; b=VVHOJbvoURrgDNXIuherROi3BcW1ike05cd577kj1JWlRSY9yCMU6EAR2uLbuHItBXhLT7 dKWFu7j+f/Hq+h9WdmzY/Fqsiz9zXsNIGBj7skCttoK2ZmaFLK+fDid7Z2vHiaI3zYX8Hy Z71A887EaMwklbSHeI1lkdpggUXHZmTN7MfBs8CxZuNS244ETBqJaDgPKy9e4aDTsdJf0w X3MZraOYzlamhccdyYXlIfzd4TqWGX0xL6doXs8EPFLktG/dIq8srj4qPddmyDxmkwa5uH Uzq2HbUQZ1KSvEDrGrieDXMxwOhzmlF1ztxkEpBbbJ7CWAUr9XwBvk2L1LMAkg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779971917; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OX4u897WSAa4OnoeoyxLrihTQR428pSGrQRx5CH1pYw=; b=d3qRz2Smvgz5FbywpJlCcyhQ9lE1Njijs6HMPs1kYHQdr8aUb3d8fKF0GZ66ylTX8LczhH IMICgdkPQjaOx7UCohuhIaRusxxDJfvoArTELR45cGwFtEDrd2XzmMj7ctQpMz6xWLd28u BbfYjN11tkY6X+hLbvcDYXo3H47eZK4w2OJdbF6re+z/ZABXTtgoeJDXQBXiPMX/kTdDm9 Avq8e9+zJsGi0rQWi7NS5MpZEDMb8hsAVwL87jqCLe12czDnYqEBfiks3ct9GxRzPYWLP7 jYUe97VVup97M9QFCp//OiYYLEsFEEfJnuOthCsXKvTSzTcetfWC3J96lfx5Kw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gR5d91Wj0zmmV for ; Thu, 28 May 2026 12:38:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4556b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 12:38:31 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 67d61d18bb8d - main - amd64: extract uiomove_mem() from memrw() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 67d61d18bb8debb4ffc51ef2248aa37ed0bfb8f5 Auto-Submitted: auto-generated Date: Thu, 28 May 2026 12:38:31 +0000 Message-Id: <6a183747.4556b.3070f025@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=67d61d18bb8debb4ffc51ef2248aa37ed0bfb8f5 commit 67d61d18bb8debb4ffc51ef2248aa37ed0bfb8f5 Author: Konstantin Belousov AuthorDate: 2026-05-24 11:48:45 +0000 Commit: Konstantin Belousov CommitDate: 2026-05-28 12:38:25 +0000 amd64: extract uiomove_mem() from memrw() Reviewed by: markj Tested by: aokblast Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D49566 --- sys/amd64/amd64/mem.c | 103 +++++------------------------------------- sys/amd64/amd64/uio_machdep.c | 96 +++++++++++++++++++++++++++++++++++++++ sys/amd64/include/md_var.h | 6 +++ 3 files changed, 113 insertions(+), 92 deletions(-) diff --git a/sys/amd64/amd64/mem.c b/sys/amd64/amd64/mem.c index ab1e6cde6cd5..7d1f0f42d01c 100644 --- a/sys/amd64/amd64/mem.c +++ b/sys/amd64/amd64/mem.c @@ -61,10 +61,6 @@ #include #include -#include -#include -#include - #include /* @@ -72,99 +68,22 @@ */ MALLOC_DEFINE(M_MEMDESC, "memdesc", "memory range descriptors"); -/* ARGSUSED */ int memrw(struct cdev *dev, struct uio *uio, int flags) { - struct iovec *iov; - void *p, *vd; - ssize_t orig_resid; - vm_prot_t prot; - u_long v; - u_int c; - int error; - - error = 0; - orig_resid = uio->uio_resid; - while (uio->uio_resid > 0 && error == 0) { - iov = uio->uio_iov; - if (iov->iov_len == 0) { - uio->uio_iov++; - uio->uio_iovcnt--; - if (uio->uio_iovcnt < 0) - panic("memrw"); - continue; - } - v = uio->uio_offset; - c = ulmin(iov->iov_len, PAGE_SIZE - (u_int)(v & PAGE_MASK)); - - switch (dev2unit(dev)) { - case CDEV_MINOR_KMEM: - /* - * Since c is clamped to be less or equal than - * PAGE_SIZE, the uiomove() call does not - * access past the end of the direct map. - */ - if (v >= kva_layout.dmap_low && - v < kva_layout.dmap_high) { - error = uiomove((void *)v, c, uio); - break; - } - - switch (uio->uio_rw) { - case UIO_READ: - prot = VM_PROT_READ; - break; - case UIO_WRITE: - prot = VM_PROT_WRITE; - break; - } + enum uiomove_mem_req req; - if (!kernacc((void *)v, c, prot)) { - error = EFAULT; - break; - } - - /* - * If the extracted address is not accessible - * through the direct map, then we make a - * private (uncached) mapping because we can't - * depend on the existing kernel mapping - * remaining valid until the completion of - * uiomove(). - * - * XXX We cannot provide access to the - * physical page 0 mapped into KVA. - */ - v = pmap_extract(kernel_pmap, v); - if (v == 0) { - error = EFAULT; - break; - } - /* FALLTHROUGH */ - case CDEV_MINOR_MEM: - if (v < dmaplimit) { - vd = PHYS_TO_DMAP(v); - error = uiomove(vd, c, uio); - break; - } - if (v > cpu_getmaxphyaddr()) { - error = EFAULT; - break; - } - p = pmap_mapdev(v, PAGE_SIZE); - error = uiomove(p, c, uio); - pmap_unmapdev(p, PAGE_SIZE); - break; - } + switch (dev2unit(dev)) { + case CDEV_MINOR_KMEM: + req = UIO_MEM_KMEM; + break; + case CDEV_MINOR_MEM: + req = UIO_MEM_MEM; + break; + default: + __unreachable(); } - /* - * Don't return error if any byte was written. Read and write - * can return error only if no i/o was performed. - */ - if (uio->uio_resid != orig_resid) - error = 0; - return (error); + return (uiomove_mem(req, uio)); } /* diff --git a/sys/amd64/amd64/uio_machdep.c b/sys/amd64/amd64/uio_machdep.c index 16915bccf9f5..11e6ad2b1da9 100644 --- a/sys/amd64/amd64/uio_machdep.c +++ b/sys/amd64/amd64/uio_machdep.c @@ -44,9 +44,11 @@ #include #include +#include #include #include +#include /* * Implement uiomove(9) from physical memory using the direct map to @@ -141,3 +143,97 @@ out: td->td_pflags &= ~TDP_DEADLKTREAT; return (error); } + +int +uiomove_mem(enum uiomove_mem_req req, struct uio *uio) +{ + struct iovec *iov; + void *p, *vd; + ssize_t orig_resid; + vm_prot_t prot; + u_long v; + u_int c; + int error; + + error = 0; + orig_resid = uio->uio_resid; + while (uio->uio_resid > 0 && error == 0) { + iov = uio->uio_iov; + if (iov->iov_len == 0) { + uio->uio_iov++; + uio->uio_iovcnt--; + if (uio->uio_iovcnt < 0) + panic("memrw"); + continue; + } + v = uio->uio_offset; + c = ulmin(iov->iov_len, PAGE_SIZE - (u_int)(v & PAGE_MASK)); + + switch (req) { + case UIO_MEM_KMEM: + /* + * Since c is clamped to be less or equal than + * PAGE_SIZE, the uiomove() call does not + * access past the end of the direct map. + */ + if (v >= kva_layout.dmap_low && + v < kva_layout.dmap_high) { + error = uiomove((void *)v, c, uio); + break; + } + + switch (uio->uio_rw) { + case UIO_READ: + prot = VM_PROT_READ; + break; + case UIO_WRITE: + prot = VM_PROT_WRITE; + break; + } + + if (!kernacc((void *)v, c, prot)) { + error = EFAULT; + break; + } + + /* + * If the extracted address is not accessible + * through the direct map, then we make a + * private (uncached) mapping because we can't + * depend on the existing kernel mapping + * remaining valid until the completion of + * uiomove(). + * + * XXX We cannot provide access to the + * physical page 0 mapped into KVA. + */ + v = pmap_extract(kernel_pmap, v); + if (v == 0) { + error = EFAULT; + break; + } + /* FALLTHROUGH */ + case UIO_MEM_MEM: + if (v < dmaplimit) { + vd = PHYS_TO_DMAP(v); + error = uiomove(vd, c, uio); + break; + } + if (v > cpu_getmaxphyaddr()) { + error = EFAULT; + break; + } + p = pmap_mapdev(v, PAGE_SIZE); + error = uiomove(p, c, uio); + pmap_unmapdev(p, PAGE_SIZE); + break; + } + } + /* + * Don't return error if any byte was written. Read and write + * can return error only if no i/o was performed. + */ + if (uio->uio_resid != orig_resid) + error = 0; + return (error); +} diff --git a/sys/amd64/include/md_var.h b/sys/amd64/include/md_var.h index 4b98c5d8c418..0e8fe916490b 100644 --- a/sys/amd64/include/md_var.h +++ b/sys/amd64/include/md_var.h @@ -106,6 +106,12 @@ void wrmsr_early_safe_start(void); void wrmsr_early_safe_end(void); int wrmsr_early_safe(u_int msr, uint64_t data); +enum uiomove_mem_req { + UIO_MEM_KMEM = 101, + UIO_MEM_MEM, +}; +int uiomove_mem(enum uiomove_mem_req req, struct uio *uio); + #endif /* !_MACHINE_MD_VAR_H_ */ #endif /* __i386__ */ From nobody Thu May 28 13:02:17 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gR68Z5z4Wz6fj0Z for ; Thu, 28 May 2026 13:02: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gR68Z5TDNz3Wlg for ; Thu, 28 May 2026 13:02:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779973342; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0qnQ16s+qqvzc0cj7Ni5Kr+Er5JYBm2wUbkuJypCL28=; b=QilGToSA/yDnBmCYCc/IljOZ8v5pEkYYhkWwR5n05hidefnrhddFKqWcCav+PFc71it3ZI r6dPXM+SuS85/TT8Xa/+ytGvVgzVuAfw4SKz8L/24V5+R27+imHg0WdzyLuZFpL/w+D95r 9M3zs93r+y06aSsk+craM6evWgwY0nKR4s+YVnwzjmAd7G7dObgmb0cjc7Vl+Or5hDakUh kKNxmxDAjfQ8/Yjy1imsQGi4z9YudcUEsoy5UL08lFt8zqr81kiRH7gks6zvdOn95eKu6E WNWFZ8eOCSenIh8kFGiSC+rv8Btdazrdew/PyISPITes6E0SrvOpN3jk7GzF/A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779973342; a=rsa-sha256; cv=none; b=onj+epOykqj8AFbnOG/vxKcUQA0m4g9U8TYvNh6lOC70okcxmE/dhcaR7XGu1BWvpov67q b2I9a4zw43FJ4ptUGhb8P7Z3h5gH5LgS/TW6rarkqDlmU5jbHvy9dr8iJ5H29d8TrxLjIJ S2EaLNXk5HxToo+AlLt1kanajMsfx/ioHfZINTyLiOlXTmGHTEdyE5EXhSiEajRmL0UZHT 3jkzzHiyiFlnuV30lG9zf6vX2wsCUrIuLAQV3jcE2pCDBED4TkUu/LkBiTTrDR7KF4x7sU Fk+RtFhyQ+tKcUkFtRxdepAZKUEQtdEnlzjKI33UIceug2AOgJu/Sneqc1Ye4A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779973342; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0qnQ16s+qqvzc0cj7Ni5Kr+Er5JYBm2wUbkuJypCL28=; b=LyG7OcvRy0MRTdsQ9mE2VQVC9l1W4+esohW/I6hRZFjouLxPal/hwvXecgN/r8SOVG9gcK sW4Sl7EOfPVxh2A6BKSHTECCo09LeHfS/RNZuJAbjUXWUO5FNajKzdHgiNDONdk0TetyK4 ukmxwZPjRB5uPejArpQuVzyOoDPl/XH3G2KNLN1AkWTgyV5lmZ1WCq+msSdcwpXm5cL/M3 WjDJICO5hsuZcULSxuhHUMOTpldtIUkpGkgWvVcfbAzAaJmL19FaQGG5yhSSn9UrSgndju 2TJLsNZ82ZV0vOY7ye1UkzRlNbc8lanbDSm09DUqZ0kmJ5M6aoikqI8xJeMgZQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gR68Z51Fzzn6S for ; Thu, 28 May 2026 13:02:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 47551 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 13:02:17 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: fc9dc8482396 - main - snd_uaudio: Lock usbd_transfer_start() in uaudio_mixer_ctl_set() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fc9dc848239652ec1e4135adb4833a5f002cef0f Auto-Submitted: auto-generated Date: Thu, 28 May 2026 13:02:17 +0000 Message-Id: <6a183cd9.47551.25b33885@gitrepo.freebsd.org> The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=fc9dc848239652ec1e4135adb4833a5f002cef0f commit fc9dc848239652ec1e4135adb4833a5f002cef0f Author: Christos Margiolis AuthorDate: 2026-05-28 09:31:52 +0000 Commit: Christos Margiolis CommitDate: 2026-05-28 13:02:01 +0000 snd_uaudio: Lock usbd_transfer_start() in uaudio_mixer_ctl_set() This section would be previously locked by sound(4)'s mixer lock (see e87654db5a09 ("snd_uaudio: Stop using mixer_get_lock()")), but snd_uaudio(4) no longer uses it. This particular code path was missed during testing, because my sound card does not reach it. Fixes: 9a00e0b8ca56 ("snd_uaudio: Do not use snd_mixer->lock as mixer_lock") Reported by: netchild Tested by: netchild Sponsored by: The FreeBSD Foundation MFC after: 6 days --- sys/dev/sound/usb/uaudio.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sys/dev/sound/usb/uaudio.c b/sys/dev/sound/usb/uaudio.c index 27d5009da4fa..eedd52774b70 100644 --- a/sys/dev/sound/usb/uaudio.c +++ b/sys/dev/sound/usb/uaudio.c @@ -5386,8 +5386,8 @@ uaudio_mixer_bsd2value(struct uaudio_mixer_node *mc, int val) } static void -uaudio_mixer_ctl_set(struct uaudio_softc *sc, struct uaudio_mixer_node *mc, - uint8_t chan, int val) +uaudio_mixer_ctl_set(struct uaudio_softc *sc, unsigned index, + struct uaudio_mixer_node *mc, uint8_t chan, int val) { val = uaudio_mixer_bsd2value(mc, val); @@ -5396,7 +5396,9 @@ uaudio_mixer_ctl_set(struct uaudio_softc *sc, struct uaudio_mixer_node *mc, /* start the transfer, if not already started */ + mtx_lock(&sc->sc_child[index].mixer_lock); usbd_transfer_start(sc->sc_mixer_xfer[0]); + mtx_unlock(&sc->sc_child[index].mixer_lock); } static void @@ -5482,7 +5484,7 @@ uaudio_mixer_set(struct uaudio_softc *sc, struct snd_mixer *m, for (mc = sc->sc_mixer_root; mc != NULL; mc = mc->next) { if (mc->ctl == type) { for (chan = 0; chan < mc->nchan; chan++) { - uaudio_mixer_ctl_set(sc, mc, chan, + uaudio_mixer_ctl_set(sc, index, mc, chan, chan == 0 ? left : right); } } @@ -5523,7 +5525,7 @@ uaudio_mixer_setrecsrc(struct uaudio_softc *sc, struct snd_mixer *m, uint32_t sr for (i = mc->minval; (i > 0) && (i <= mc->maxval); i++) { if (temp != (1U << mc->slctrtype[i - 1])) continue; - uaudio_mixer_ctl_set(sc, mc, 0, i); + uaudio_mixer_ctl_set(sc, index, mc, 0, i); break; } } From nobody Thu May 28 13:04:02 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gR6BW0wySz6fjNp for ; Thu, 28 May 2026 13:04: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gR6BW0CF2z3X01 for ; Thu, 28 May 2026 13:04:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779973443; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bOJ7NDZSFij0b8n7uMBCfncsMEgI5DuG1JrN5JVpuoE=; b=AtoNdIVyFw0ikCvdgWI9rOCI16AFp1DP0hRXiFAJi6jnLlenLM3kxLBhkoPl08h/C73lDV 0yLhROnVVU4WpNuQBdJyD+UVFZ7FzFlDCPZb3s5QMZXPoCghl5eSrOO8XCe8i9bubSeQR0 JMFUeudcqcJLnMN//nGjfCFoao8HRoRH4L1uu9JmG4WDps4u//Zv4xNsnc40pxOzz/GsMJ lX+ThsNZfESqqyul43XrmHp292kMTKXBH1Xi1NquBmq1KbxKZhYp4er2WP3gdKR/wgEocS iW7BYKeUBWtp6N/KV+nr3AnF/OSmSYRcV4zqCBz1LVzdnHO8YJujd7yVvphPSA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779973443; a=rsa-sha256; cv=none; b=fRapD2n0LbRpOPdzQJUqkcoBhS3yr5KTHdXA5BiD74r+qRjcna8jv0Vc4YVTjkB10tahS2 B5/e0vSHB8uO04udv5MZ6MKD0Q40Mh2xssljjCfTugYel4EOS0XYNk76ycmkt/VSFl1xAl 7bij2FYoYQmLM9Sp6LXYMjl/m4B+KZE/2/wZy1Q4YZnGhTpJrsJAP3XoEwYVRT28xhlq6O ZF4G2P1jHHQyij3ZA27iZvdNyUi+KFlbJUnvtV0i9/byMhRY1edLcy/00FLnNFjUBKx8/b 7a7/vD073dqKsqAGlTwS2OjH04YiQRhl/qXVsMSbl9gdc0rO+62kC4eER5EzRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779973443; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bOJ7NDZSFij0b8n7uMBCfncsMEgI5DuG1JrN5JVpuoE=; b=lJgYY762ZU5+91JP678Ba9k+fMZqDX/yL94LkCKOYhZIqG+nRvfifXh+FVJv01T5fV2Bzz /wN9PqTbocJLlespE0ilJ2Bw2ZsSYlIvyNC4DkUJvIhYJiiquQsZdfmWoHUlG0urmLoQUQ P+qYVa6TyxRDbBMk87440HUFWUOGLLBwzRGupoW0O1PcknbxwE6ug3htv7NuOaoq8IeeSV N0U1ftot+rtMW14b/gkaYsdrA9ibpcG0hIF/AFmYpzKhqMTc+yctxn1AO/+CHBg7ZIjWV2 KFvTDIKcvT+NxeJvVgUn/ufbg8MT61qKaFq0NB4Ajb/g5z1tolF26mlRepQo6g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gR6BV6w1rznCf for ; Thu, 28 May 2026 13:04:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 45b69 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 13:04:02 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: f9f46294d6af - main - bsdinstall: Use libarchive secure flags for extract List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f9f46294d6af2a937afa74938bd4bb6826cbb921 Auto-Submitted: auto-generated Date: Thu, 28 May 2026 13:04:02 +0000 Message-Id: <6a183d42.45b69.1e442ab1@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=f9f46294d6af2a937afa74938bd4bb6826cbb921 commit f9f46294d6af2a937afa74938bd4bb6826cbb921 Author: Ed Maste AuthorDate: 2026-05-27 13:29:21 +0000 Commit: Ed Maste CommitDate: 2026-05-28 13:03:45 +0000 bsdinstall: Use libarchive secure flags for extract This doesn't really matter, as we trust that the installer tarballs are not malicious, but it doesn't hurt to set these flags. Reported by: Yuxiang Yang, Yizhou Zhao, Ao Wang, Xuewei Feng, Qi Li, and Ke Xu from Tsinghua University using GLM-5.1 from Z.ai Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57274 --- usr.sbin/bsdinstall/distextract/distextract.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.sbin/bsdinstall/distextract/distextract.c b/usr.sbin/bsdinstall/distextract/distextract.c index 32bd9453eb80..35cf19aae33f 100644 --- a/usr.sbin/bsdinstall/distextract/distextract.c +++ b/usr.sbin/bsdinstall/distextract/distextract.c @@ -291,6 +291,8 @@ extract_files(struct bsddialog_fileminibar *file) /* If that went well, perform the extraction */ if (retval == ARCHIVE_OK) retval = archive_read_extract(archive, entry, + ARCHIVE_EXTRACT_SECURE_NODOTDOT | + ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS | ARCHIVE_EXTRACT_TIME | ARCHIVE_EXTRACT_OWNER | ARCHIVE_EXTRACT_PERM | ARCHIVE_EXTRACT_ACL | ARCHIVE_EXTRACT_XATTR | ARCHIVE_EXTRACT_FFLAGS); From nobody Thu May 28 14:07:01 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gR7b96N0Yz6fnQ9 for ; Thu, 28 May 2026 14:07: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gR7b95442z3dFC for ; Thu, 28 May 2026 14:07:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779977221; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JJVEqDVcwkgy+XDSWbmIby0RGLyJQSlaWV5EjT687Ck=; b=s2MeCZ+NKfL9uI0zB+cG35FK9n+kvC9jZWLpAvvBAzGFcS8mERfyl7sB9BTZUE3KEn0GeJ 0+GZSY4e2oej9IAd/RtWaiTT+PfGVIyzkIrXPE76faKMiwbNFdfkaOOSkyMG4mC5yIhDua 4NjsxM1QhrqR8dTJerTCn8SNMlAjSGlBG1ITrRoUbxaA9OkeVdc9c9Eh4+gSqt/9MPyQQO amPcUWgP9DKUgEw8O01Y+smKO8WYyBnJ0EIK91vfdU7uwhgsoSG2ZzYorh98i4LylZ5exB UQ57sMQWf4jTBwddVC1RohCbHaU8tKJRRjJGQX0hab0FMRUiYw/NTjm5qId62A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779977221; a=rsa-sha256; cv=none; b=MH9hOGUpbq+3hwflwimJMkW9OjJH3vNlZDJl8YXk7AvW2p+ZFDvH3DYHF5ebEyByOFu8xU 5yoJHfSWg9MoBYIdnZqUjMXPEniEiAo6z/ROL7ZFGzZBG6dSSVFGwfuYjbt1Rgpkrm/zqY mr5fjZhPuDrnywDcN+MvETQD+rcuDqqLB8sTj54VN5wcQuzNOj7TDMbPTAu60wk7ykovFv TmR/ViS6v6V+thTWyh2Lx/abbapH4JuysQEd97vxnT06qCbHYUpEspgixZLbm2NZPNlFAh /XXCSHLgC1vKOdFNlXBqnxi63lU1jm2EV8hABoSQTx4Yc5OzUpHpGxvC/kPGeA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779977221; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JJVEqDVcwkgy+XDSWbmIby0RGLyJQSlaWV5EjT687Ck=; b=BTTBq82GNqnm4uEVk3vyX5ZZ1M2WJcxcy0qKSbBYcRexpe9BiGVRUan1pxM0JDy01cJmFA Kh3H8o7uDNAk0yQUUPfFK2TkXhb5/v+J96JGPytYZMTvduQYRV7PH7YK9DIYsbLZZhZn85 AGYcZ/egeNUKNATH7o7k12jK51xoEcCL/hWRgl8p6zJqefWox3JsaydC4EFg4gtExtJiCd H8qIJ+q+Q8qZ5YyOaziMbCnNaCZnO+IutsV5HfA3kSpVgqRiG9xoKCAzJntyTUe8jb8iHi 6858yZPx3vaNBMXSCpTUJkkPEivP9n3li4IZJN4Axd7blC+xx60IjSHSYXkgCg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gR7b930Yhzpt7 for ; Thu, 28 May 2026 14:07:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1f89b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 14:07:01 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 803f686938ec - main - rc: virtual_oss: Wait for process to exit List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 803f686938ec2472d54a26bff668e48cc4999558 Auto-Submitted: auto-generated Date: Thu, 28 May 2026 14:07:01 +0000 Message-Id: <6a184c05.1f89b.758265a9@gitrepo.freebsd.org> The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=803f686938ec2472d54a26bff668e48cc4999558 commit 803f686938ec2472d54a26bff668e48cc4999558 Author: Christos Margiolis AuthorDate: 2026-05-21 16:26:46 +0000 Commit: Christos Margiolis CommitDate: 2026-05-28 14:06:06 +0000 rc: virtual_oss: Wait for process to exit Sometimes virtual_oss processes do not exit immediatelly. If we do not wait for the processes to fully exit before returning from virtual_oss_stop(), then the service restart operation might call virtual_oss_start() too early and fail, because it will think the service wasn't stopped and is still running. Reported by: jrm Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: 0mp, jrm Pull-Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/33 --- libexec/rc/rc.d/virtual_oss | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libexec/rc/rc.d/virtual_oss b/libexec/rc/rc.d/virtual_oss index 07f81aeed4bc..dd3bbe41c094 100644 --- a/libexec/rc/rc.d/virtual_oss +++ b/libexec/rc/rc.d/virtual_oss @@ -76,8 +76,10 @@ stop_instance() if [ -z "${instance_args}" ]; then warn "no such config: ${config}" else + pid="$(cat "${pidpath}/${config}.pid")" startmsg -n "Stopping virtual_oss config: ${config}: " - kill "$(cat "${pidpath}/${config}.pid")" + kill "${pid}" + pwait "${pid}" rm -f "${pidpath}/${config}.pid" startmsg "done" fi From nobody Thu May 28 14:07:02 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gR7bC0fm3z6fnMn for ; Thu, 28 May 2026 14:07: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gR7bB48xrz3d2x for ; Thu, 28 May 2026 14:07:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779977222; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hZKFNX4380R4srrXcDVB3gQw0TRnW7Ep2Dh29pfJT6A=; b=FIdEsfMKjGctelRwogJqAX2zJAH5Ak/VjZFD0T+UlbwNBvkk98VrEMhCD4Csef4yv710qZ kLCx8ZhaKC244i9HNNgjm7PBt6qsTKvPo9o1qz/HVzV9XMiCGyDGCXO36+0mQI+5qQ+WaG 36MIqelAIYlXpGaID7COq2oz0l5t9VtMUcrNXCIE/iQ0GSdJpM7LAxKJ0+WVNyjYyxOY1V 3ZekjMFpDNAdHlKpMUeahNeph0UokNXbxMs3DdR2k0YGeebB3BnduRgEdfXaXEYPMconO/ lSVn3QosAkq0BU/yF+S3oNdswC7m0IxNkWG4kUetZSGWFd8UUZLLhle2u78JIA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779977222; a=rsa-sha256; cv=none; b=XKWgRg6XaBe2nCU5CVvRs9t8taF6QsT/WFmgaw36GBVmU02kKx9mWHwi6J8q7wjHBZMTR9 +xOhJmKbazzTFRsy15Q627iK1tZn6bZquOtJHRu2LhT9/LbCE/zf7n7cstZuXKm3VvABK8 aCpmRUEXxpNBkx30CaYcWdRD4KWDYBz6nscNkP8nZg/FrHllrYf9egXQBlMd4NiOAJYVej Iwt2ZG/XwNP+zW55MrHXnMLJ227yotf0QDQkpbbY0vGY9X+y/tiKLzTWED/DMlA5XL10tv gECnTrB/8olAWtWaD4YI4f7vyORn/xNDqVyPrsr16HgIOqUZZn5xfH89F+/i3w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779977222; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hZKFNX4380R4srrXcDVB3gQw0TRnW7Ep2Dh29pfJT6A=; b=AtS3IauLgGzGo9C6hSW/K5LpYh9FAFAIjg2YJngqdFTutSxg26nvw+3xqhXaqkuMej98pU 6j5zUGvWo5RRXtP6NzapWsbHwtu58QERcHs1rEHOdLN2rXBckaei9YPKRwkwE1rditArzO 64DyyG6/Clw371kPiGyMsx6al7OFWMhhz4YqPXsjgqRs7JogOH9Ft7LPMGclhp+MVhnWX1 q7MXqK0zlST5Zo1sHytRTZ9DMghhHwNw8Q20ansgRAkgYKcLxm62QGyEVLm+3tyhVovfsR Y3qomTLI4jTDwo33Bzy8nZUoYzfnWTYIbLKXWSquTCYSstUWG8z1IMTGvFr43A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gR7bB3TfBzqBx for ; Thu, 28 May 2026 14:07:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1e964 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 14:07:02 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: b2677d002edb - main - rc: virtual_oss: Handle absent pidfile properly List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b2677d002edbe9308b1f8cecd1a5fc515d2a5deb Auto-Submitted: auto-generated Date: Thu, 28 May 2026 14:07:02 +0000 Message-Id: <6a184c06.1e964.3e910c9e@gitrepo.freebsd.org> The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=b2677d002edbe9308b1f8cecd1a5fc515d2a5deb commit b2677d002edbe9308b1f8cecd1a5fc515d2a5deb Author: Christos Margiolis AuthorDate: 2026-05-21 16:53:27 +0000 Commit: Christos Margiolis CommitDate: 2026-05-28 14:06:06 +0000 rc: virtual_oss: Handle absent pidfile properly Instead of throwing errors from the programs that use it, print a warning if the file does not exist. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: 0mp, jrm Pull-Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/33 --- libexec/rc/rc.d/virtual_oss | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/libexec/rc/rc.d/virtual_oss b/libexec/rc/rc.d/virtual_oss index dd3bbe41c094..9861545b8bfc 100644 --- a/libexec/rc/rc.d/virtual_oss +++ b/libexec/rc/rc.d/virtual_oss @@ -76,12 +76,17 @@ stop_instance() if [ -z "${instance_args}" ]; then warn "no such config: ${config}" else - pid="$(cat "${pidpath}/${config}.pid")" - startmsg -n "Stopping virtual_oss config: ${config}: " - kill "${pid}" - pwait "${pid}" - rm -f "${pidpath}/${config}.pid" - startmsg "done" + pidfile="${pidpath}/${config}.pid" + if [ ! -f "${pidfile}" ]; then + warn "not running: ${config}" + else + pid="$(cat "${pidfile}")" + startmsg -n "Stopping virtual_oss config: ${config}: " + kill "${pid}" + pwait "${pid}" + rm -f "${pidfile}" + startmsg "done" + fi fi } From nobody Thu May 28 14:07:00 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gR7bF6JBLz6fn09 for ; Thu, 28 May 2026 14:07: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gR7bF409Wz3d3T for ; Thu, 28 May 2026 14:07:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779977225; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=49dmHzPFfrBtQC1OfrZhJ3NCGiJEhH5ZbLM+8d1Ju+c=; b=Z9XpoFzY2L7kYr2de+gOTc0w03skUzwFOd2LsX0DD0z3oIGoXaSqNTZi0nUKX+ZNWqAf/1 u40EQ2sC8KzELrTklEq4ht2coduqv+sxyElB23HNwnqjbKcl23ml/9GsWhkyVssiMU1o6e DR7D/3LbGb5//oZtMi7Uw3mo6TfNb0ukD2+FIK/r8HZXaJjIh+MAjArNL6tvgusMk1M0tK SyDCIxO9nZ8rROrOSA+E4Z824WsPWWLNydYrUhjKTElT2Z+oCkVwFzZfyDzdK27/IJRMx/ f1ZOdD4T6tDNEPonvHQFLq2Ct2Yq0132mN6ef/CWYo3+p8eGaSttatS7HLI6YA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779977225; a=rsa-sha256; cv=none; b=G1rNzaNZRigy19PgPXre6Xp2E18UNBz+lwkngFhhEB0XsQnXMzwUkp+ZFWG0uhyoo/yntR iADYJzqcP61KLyessgvOa8xc0CcQGF85koNlSc1lnJzjiYrZt1O0k2ywJ1wsmpAW/aoA76 bbit4plYm5rUXn/JLC3YJE9G5eihjgTOsqPl3fZNRt13KRya+Fl9zXz8Wk9wvEksolGagr Zz9ja/u0LDzKNBsYKA6nG1JJq3HmILsvw6C4JDNA+9CIFejAf1+Ldv7xC4bQdYzaBj8Zw0 uO4XtL2nQhdaZ7aYx41xek/H7ZKpW58BNwp8D8riFSZW/rWB3cxPSr2FsQFQhQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779977225; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=49dmHzPFfrBtQC1OfrZhJ3NCGiJEhH5ZbLM+8d1Ju+c=; b=befuHOMaB2FvxtnkhpSPJGuJyxWr2xMSP7Z/pmCO67BIv8OF0ceteXwIjke+/hMiN4l23D EMMnJuJW86sA2xmbNm0nWDQ/kUvWQZVXJrHfPPY0tNLl7e23REYe/tYjK2QFGKckX0kxgC n5VreKpIxMPIQmcUjindBLzbPNQKBTOGuzf4UjZqXuN4nFzInvt/fhM62Z/X20Sd0/VBp9 lWLELLsE7RAxl1ngKuiCNyqx/cdWaZrm/JzXi8OwtKPK/24pgtLsCpIwE76A/j0cAeUyK3 XXjpdPTj3eV50jLcreFUr1XXYGRYpSjDsdfg8Y426pN7bqCUjJjVd+Wyo1C6oA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gR7bF31nhzpt9 for ; Thu, 28 May 2026 14:07:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 20c80 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 14:07:00 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: a576e5140ef3 - main - rc: virtual_oss: Define some variables in rc.conf List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a576e5140ef352af6cf227528d1bfc6b964516c8 Auto-Submitted: auto-generated Date: Thu, 28 May 2026 14:07:00 +0000 Message-Id: <6a184c04.20c80.27c0e61a@gitrepo.freebsd.org> The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=a576e5140ef352af6cf227528d1bfc6b964516c8 commit a576e5140ef352af6cf227528d1bfc6b964516c8 Author: Christos Margiolis AuthorDate: 2026-05-21 11:38:22 +0000 Commit: Christos Margiolis CommitDate: 2026-05-28 14:06:06 +0000 rc: virtual_oss: Define some variables in rc.conf They will now be part of /etc/defaults/rc.conf and be accessible by sysrc(8). Fixes: 70e27ecba518 ("virtual_oss: Introduce virtual_oss_default_control_device rc variable") PR: 295560 Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: 0mp, jrm Pull-Reqeust: https://ron-dev.freebsd.org/FreeBSD/src/pulls/33 --- libexec/rc/rc.conf | 6 +++++- libexec/rc/rc.d/virtual_oss | 12 +----------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf index 75420e42cdeb..27e8c8456b6f 100644 --- a/libexec/rc/rc.conf +++ b/libexec/rc/rc.conf @@ -736,7 +736,11 @@ newsyslog_flags="-CN" # Newsyslog flags to create marked files mixer_enable="YES" # Run the sound mixer. opensm_enable="NO" # Opensm(8) for infiniband devices defaults to off nuageinit_enable="NO" # Run nuageinit at startup -virtual_oss_enable="NO" # Run virtual_oss at startup + +virtual_oss_enable="NO" # Run virtual_oss at startup. +virtual_oss_configs="dsp" # List of configurations. +virtual_oss_default_control_device="vdsp.ctl" # Default configuration's + # control device. # rctl(8) requires kernel options RACCT and RCTL rctl_enable="YES" # Load rctl(8) rules on boot diff --git a/libexec/rc/rc.d/virtual_oss b/libexec/rc/rc.d/virtual_oss index 73a486f547a5..07f81aeed4bc 100644 --- a/libexec/rc/rc.d/virtual_oss +++ b/libexec/rc/rc.d/virtual_oss @@ -22,13 +22,9 @@ status_cmd="${name}_status" required_modules="cuse" -configs= pidpath="/var/run/${name}" -default_unit=$(sysctl -n hw.snd.default_unit 2> /dev/null) - -# Default configuration's control device. -: "${virtual_oss_default_control_device:="vdsp.ctl"}" +default_unit=$(sysctl -n hw.snd.default_unit 2> /dev/null) virtual_oss_default_args="\ -S \ -C 2 \ @@ -42,12 +38,6 @@ virtual_oss_default_args="\ -l dsp.loop \ -t ${virtual_oss_default_control_device}" -# Set to NO by default. Set it to "YES" to enable virtual_oss. -: "${virtual_oss_enable:="NO"}" - -# List of configurations to use. Default is "dsp". -: "${virtual_oss_configs:="dsp"}" - # Default (dsp) virtual_oss config. : "${virtual_oss_dsp:="${virtual_oss_default_args}"}" From nobody Thu May 28 14:08:39 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gR7d35tHvz6fmy1 for ; Thu, 28 May 2026 14:08: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gR7d354CDz3fZY for ; Thu, 28 May 2026 14:08:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779977319; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ckyailyrz25DgJt7zFRT3eRT6+RFLOXuBl1L4wubGvQ=; b=EJ4cgfDMaKRqxO56SSAoa1K6zFddMof0F/9HEkybMf3HTRcMNwJ3qNrQOy54VB4veLYt+U kV9rUAxAk+6FZ/RQk+CqlGX1TyCONPDJR5JVe6bZPNG/h8jQPHay84cntdUtwe1j8iQNuQ K+4eMg/sLLhYAoYXmtaMNW5VqL+QS/wR82k9ILZ3qjBa+2dEgPuDg96cxsSe5G5BnLI5Xd Jv7hQj3d0hYizfWYgnTKfP2tf23hQSytu+WiQ/X6a8SIZprl0eojSyit0uP5V8CnhC3yY5 4imacUcqcmiN9yVzrOiQbNgBMBo2EDDlKlCthmwRg0AjoaDwrES/bW5KoBEuAg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779977319; a=rsa-sha256; cv=none; b=XAq/qYn+LHIw+zdbbtYyl5ozDDeZ73j88bdXdmOknPBoqvPPxExsRGJKABY/OAd3y2W9j9 0GbrrsaGRNMkc3jIKQfUCVx1G8YDOcDwN61WFCKq+ivfZ9WxWwDrke0vCjRs91aHN7aiHV 4i0ePcWYqk66rz6RfPe3wlRjecSQ46fXvxYClrMgDQGeoD2THKOYbkfUxnTX5DYdSZv5pY XDrzXUUdyUSIkmH6E6CYMXOAP84WK2nKQVxygAwnRygKWBsTyc2242EbnHc7VBoLkqilAO 2hOuy7Mbw7ECksy9cCk5RgLRWGQLXMm8K7Zy00esNNyoVMXZFIYgoRnfSuUNhw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779977319; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ckyailyrz25DgJt7zFRT3eRT6+RFLOXuBl1L4wubGvQ=; b=wHNEeQLfllI9DqmRkVe973gB8Hxq973q79PBKsyN75jw1l1pvCQvFhUJ0YVLrgRQHfrrPw m77azUmIvJxHiW8VlTiABO6I617onGW0hgIZue5Rm7SlZbHpe0npI0FPMH3ANLb4PleZsW TSJ0fRIfnSmD1PGoi1ESLiA2CJmOf41345oqIrVc1tDn9B/UvdA3AToBnEOAAFN099cqYy diVfaOgE9f0blWoJP77XJLN2ngfA9urZri4RHMRJh9BvVGT97JBf3z+OjLtuLFqyMyS/zP XNLjR725VkYowDLQQwJo1pAHUsLz4DBLvfSIlANCofl5pKLMwatxeMzcscLkBg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gR7d34LdqzqRL for ; Thu, 28 May 2026 14:08:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2041a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 14:08:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 9fb56421425f - main - sound: Centralize and improve hot-swapping List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9fb56421425fa35e56ce294284c08b09852052a5 Auto-Submitted: auto-generated Date: Thu, 28 May 2026 14:08:39 +0000 Message-Id: <6a184c67.2041a.8cbcb0c@gitrepo.freebsd.org> The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=9fb56421425fa35e56ce294284c08b09852052a5 commit 9fb56421425fa35e56ce294284c08b09852052a5 Author: Christos Margiolis AuthorDate: 2026-05-21 12:22:38 +0000 Commit: Christos Margiolis CommitDate: 2026-05-28 14:08:20 +0000 sound: Centralize and improve hot-swapping Introduce pcm_hotswap(), which is responsible for sending devctl SND/CONN notifications. There are two user-visible improvements with this patch: First, in pcm_unregister(), instead of just sending a SND/CONN/NODEV notification when all devices have detached, we also switch to the new default device if the previously default one has detached, but there are more left. Second, in pcm_register(), if the device happens to also be the new default device, we hot-swap to it. Additionally, if hw.snd.default_auto is set to 2, then we will essentially be hot-swapping to the newest attached device. The latter is especially useful for laptops like the Framework 16, which comes with a built-in snd_hda(4) speaker-microphone-only device, and headphones can work with the Framework Audio Expansion Card, which does not extend the snd_hda(4) device, but is in fact a separate snd_uaudio(4) device. To achieve automatic audio redirection between headphones and speakers in this case, there has to be a way to switch between different devices. The way the Audio Expansion Card works is by having snd_uaudio(4) attach to it when the headphones are plugged, and detach when unplugged, so this patch, along with hw.snd.default_auto=2, can pick up those attach events and switch automatically. Combined with the pcm_unregister() update, it becomes possible to switch back and forth between headphones and speakers. While here, be more robust and lock around snd_unit reads. In collaboration with: jrm Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/dev/sound/pcm/sound.c | 47 ++++++++++++++++++++++++++++++++++++----------- 1 file changed, 36 insertions(+), 11 deletions(-) diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c index d98952d7a984..235142eb5209 100644 --- a/sys/dev/sound/pcm/sound.c +++ b/sys/dev/sound/pcm/sound.c @@ -77,11 +77,30 @@ snd_setup_intr(device_t dev, struct resource *res, int flags, driver_intr_t hand return bus_setup_intr(dev, res, flags, NULL, hand, param, cookiep); } +static void +pcm_hotswap(void) +{ + struct snddev_info *d; + char buf[32]; + + bus_topo_assert(); + if (snd_unit >= 0) { + d = devclass_get_softc(pcm_devclass, snd_unit); + if (!PCM_REGISTERED(d)) + return; + snprintf(buf, sizeof(buf), "cdev=dsp%d", snd_unit); + if (d->reccount > 0) + devctl_notify("SND", "CONN", "IN", buf); + if (d->playcount > 0) + devctl_notify("SND", "CONN", "OUT", buf); + } else + devctl_notify("SND", "CONN", "NODEV", NULL); +} + static int sysctl_hw_snd_default_unit(SYSCTL_HANDLER_ARGS) { struct snddev_info *d; - char buf[32]; int error, unit; unit = snd_unit; @@ -95,13 +114,8 @@ sysctl_hw_snd_default_unit(SYSCTL_HANDLER_ARGS) } snd_unit = unit; snd_unit_auto = 0; + pcm_hotswap(); bus_topo_unlock(); - - snprintf(buf, sizeof(buf), "cdev=dsp%d", snd_unit); - if (d->reccount > 0) - devctl_notify("SND", "CONN", "IN", buf); - if (d->playcount > 0) - devctl_notify("SND", "CONN", "OUT", buf); } return (error); } @@ -373,6 +387,7 @@ int pcm_register(device_t dev, char *str) { struct snddev_info *d = device_get_softc(dev); + int err; /* should only be called once */ if (d->flags & SD_F_REGISTERED) @@ -417,6 +432,13 @@ pcm_register(device_t dev, char *str) vchan_initsys(dev); feeder_eq_initsys(dev); + sndstat_register(dev, SNDST_TYPE_PCM, d->status); + + err = dsp_make_dev(dev); + if (err) + return (err); + + bus_topo_lock(); if (snd_unit_auto < 0) snd_unit_auto = (snd_unit < 0) ? 1 : 0; if (snd_unit < 0 || snd_unit_auto > 1) @@ -424,9 +446,11 @@ pcm_register(device_t dev, char *str) else if (snd_unit_auto == 1) snd_unit = pcm_best_unit(snd_unit); - sndstat_register(dev, SNDST_TYPE_PCM, d->status); + if (snd_unit == device_get_unit(dev)) + pcm_hotswap(); + bus_topo_unlock(); - return (dsp_make_dev(dev)); + return (0); } int @@ -469,13 +493,14 @@ pcm_unregister(device_t dev) cv_destroy(&d->cv); mtx_destroy(&d->lock); + bus_topo_lock(); if (snd_unit == device_get_unit(dev)) { snd_unit = pcm_best_unit(-1); if (snd_unit_auto == 0) snd_unit_auto = 1; - if (snd_unit < 0) - devctl_notify("SND", "CONN", "NODEV", NULL); + pcm_hotswap(); } + bus_topo_unlock(); return (0); } From nobody Thu May 28 14:13:08 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gR7kD2kb8z6fnYs for ; Thu, 28 May 2026 14:13: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gR7kD240gz3g3B for ; Thu, 28 May 2026 14:13:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779977588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H1PcU2OAzwEt3Xp0JrRU2eKyQVZMYOfPWJ1Z9nCht64=; b=xttSB1j3nV097y95D3ij9tW1YnWtzs8R+99fpPe8ASbGQxFFCbGJuJqZ/0z9X65q3tFJmj EJpdo7EYDOEr9W7v6qHO9YbOsG2CBNKzoBx/kFwQaoVkjiVZatpnWLULDxKfmDi8wLDcFE fO4uRXNyAKAukw22u95kMkEiuG2V2ofo35ixgwqclgzPR/ho3zjfhu+DqhaiiocohPETSd zzKJlW1xXOWCPT9tuHvvLXc/uU3tJ6/PDK/k+TzuHTUM9EBQMyTEpLr001NYgA3Ks0LXLC E5TS9QvCngNJ6rNj5fjYLCCG1gFCX/JkE4+z12hOOxfz6nMKgjj9zzclj0XzAw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779977588; a=rsa-sha256; cv=none; b=KqJZ/1ZzEjL9vnxSrZwhBO5A8K2PCW341duNSJnP92i0jVJ6CRrHHQz+v5MBII9z3x0kT+ Qi0XLc2lWt8AAn0tuVKEcA+6f/ijeQ/BC7TJznv7ul+FKeuZfHqSw9eWzZ7f8etIJ741UM MBdfCQ54j7aRXr/ccCin4h5rG/F8bth9en0JlXK8wSkthYYCIyYWqm1ps7n9QH0LIZQYJc mDsBW0VWT7ynUJBL8OXXBH+rFnFtAweVRoivLjYWfvIqCjf5UuBQ3TmMPmz4aDPdFXdPi8 J3OX3M/u1qjbv5cmZjBe49K5+YVkCK66PR3v4hh/qwFelxdP3O7/9RLw64yUQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779977588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H1PcU2OAzwEt3Xp0JrRU2eKyQVZMYOfPWJ1Z9nCht64=; b=sxoVnddJBWS1KYNmXu9wzUQXcNaa7VO3Xm48cK9hh5Mmsd2FBkcsMJXDxcKEzyPmAeY5Iw Kk+lk362HpCFXDB+5DcNv/wqmdMRMeNTic70Lz710dyMRet272FLKnobha2joWveMRVfXw a3bwXtFc5mnXewWoApyUbHjaO8uLlxbKarSc/V9XLRJninnAiwi2/2mkZrrcjWcxotG/+b FiWrCKkwo6Vqip2rmtsDrJex+C5I6kKg5o2GZKAFwfl7vB8SgTZH8hWBmCXqs445WZBMoU RA8LkdM1i6StnJfZ+dgLcGGTDvvZuS2ScxcVQAdRqnEtjsDzGc8iw7tcCxbfmA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gR7kD1gttzqXZ for ; Thu, 28 May 2026 14:13:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1f93d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 14:13:08 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 71ec93ff69f0 - stable/15 - padlock: Restore padlock_rng to the amd64 build List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 71ec93ff69f0b724a1c51e9fa772b08a10506112 Auto-Submitted: auto-generated Date: Thu, 28 May 2026 14:13:08 +0000 Message-Id: <6a184d74.1f93d.2824293e@gitrepo.freebsd.org> The branch stable/15 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=71ec93ff69f0b724a1c51e9fa772b08a10506112 commit 71ec93ff69f0b724a1c51e9fa772b08a10506112 Author: Alan Somers AuthorDate: 2026-05-24 00:19:13 +0000 Commit: Alan Somers CommitDate: 2026-05-28 11:41:24 +0000 padlock: Restore padlock_rng to the amd64 build Revert 88a53301e19 and d1ca01059d5 . They removed padlock_rng from the amd64 build under the mistaken belief that this device was available on 32-bit processors only. But it's also available on the 64-bit Via Nano, Nano X2, and some Zhaoxin CPUs. PR: 295517 Fixes: 88a53301e19 ("padlock.4: only install on i386") Fixes: d1ca01059d5 ("padlock(4)/nehemiah: move i386-only entropy") Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D57215 (cherry picked from commit 14b8531c4ccb836d755ce8a4f1b384164b5d9d94) --- share/man/man4/Makefile | 5 +---- sys/amd64/conf/GENERIC | 1 + sys/amd64/conf/MINIMAL | 1 + sys/conf/files.i386 | 1 - sys/conf/files.x86 | 1 + sys/i386/conf/NOTES | 7 ------- sys/modules/Makefile | 4 +--- sys/x86/conf/NOTES | 1 + 8 files changed, 6 insertions(+), 15 deletions(-) diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 600b785c28b1..45b64a6cd489 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -896,6 +896,7 @@ _ntb_hw_intel.4= ntb_hw_intel.4 _ntb_hw_plx.4= ntb_hw_plx.4 _ntb_transport.4=ntb_transport.4 _nvram.4= nvram.4 +_padlock.4= padlock.4 _pchtherm.4= pchtherm.4 _qat.4= qat.4 _qat_c2xxx.4= qat_c2xxx.4 @@ -942,10 +943,6 @@ _vmm.4= vmm.4 .endif .endif -.if ${MACHINE_CPUARCH} == "i386" -_padlock.4= padlock.4 -.endif - .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "aarch64" _hwt.4= hwt.4 .if ${MACHINE_CPUARCH} == "amd64" diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC index 17f70c6c26fd..6f1b4993a849 100644 --- a/sys/amd64/conf/GENERIC +++ b/sys/amd64/conf/GENERIC @@ -310,6 +310,7 @@ device wpi # Intel 3945ABG wireless NICs. device crypto # core crypto support device aesni # AES-NI OpenCrypto module device loop # Network loopback +device padlock_rng # VIA Padlock RNG device rdrand_rng # Intel Bull Mountain RNG device ether # Ethernet support device vlan # 802.1Q VLAN support diff --git a/sys/amd64/conf/MINIMAL b/sys/amd64/conf/MINIMAL index c14d8fa261c5..595ff454f400 100644 --- a/sys/amd64/conf/MINIMAL +++ b/sys/amd64/conf/MINIMAL @@ -115,6 +115,7 @@ device uart # Generic UART driver # Pseudo devices. device loop # Network loopback +device padlock_rng # VIA Padlock RNG device rdrand_rng # Intel Bull Mountain RNG device ether # Ethernet support diff --git a/sys/conf/files.i386 b/sys/conf/files.i386 index e6c2089e2c1e..41c51a7aa9c5 100644 --- a/sys/conf/files.i386 +++ b/sys/conf/files.i386 @@ -33,7 +33,6 @@ dev/hyperv/vmbus/i386/hyperv_machdep.c optional hyperv dev/le/if_le_isa.c optional le isa dev/ofw/ofw_pcib.c optional fdt pci dev/pcf/pcf_isa.c optional pcf -dev/random/nehemiah.c optional padlock_rng !random_loadable dev/sbni/if_sbni.c optional sbni dev/sbni/if_sbni_isa.c optional sbni isa dev/sbni/if_sbni_pci.c optional sbni pci diff --git a/sys/conf/files.x86 b/sys/conf/files.x86 index fabcd5d9ebe5..ebafb6e942f4 100644 --- a/sys/conf/files.x86 +++ b/sys/conf/files.x86 @@ -309,6 +309,7 @@ dev/ntb/ntb_hw/ntb_hw_plx.c optional ntb_hw_plx | ntb_hw dev/ntb/test/ntb_tool.c optional ntb_tool dev/nvram/nvram.c optional nvram isa dev/random/ivy.c optional rdrand_rng !random_loadable +dev/random/nehemiah.c optional padlock_rng !random_loadable dev/random/rdseed.c optional rdrand_rng !random_loadable dev/qat_c2xxx/qat.c optional qat_c2xxx dev/qat_c2xxx/qat_ae.c optional qat_c2xxx diff --git a/sys/i386/conf/NOTES b/sys/i386/conf/NOTES index fbcea76527db..93dc00634cc0 100644 --- a/sys/i386/conf/NOTES +++ b/sys/i386/conf/NOTES @@ -302,13 +302,6 @@ envvar hint.pcf.0.irq="5" # device glxsb # AMD Geode LX Security Block -# -# padlock is a driver for the cryptographic functions and RNG in -# VIA C3, C7, and Eden processors. -# Requires 'device crypto'. -# -device padlock_rng # VIA Padlock RNG - ##################################################################### # ABI Emulation diff --git a/sys/modules/Makefile b/sys/modules/Makefile index a3b0cda92feb..abb2668f4ae2 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -830,6 +830,7 @@ _nfe= nfe _nvram= nvram .if ${MK_CRYPT} != "no" || defined(ALL_MODULES) _padlock= padlock +_padlock_rng= padlock_rng _rdrand_rng= rdrand_rng _rdseed_rng= rdseed_rng .endif @@ -903,9 +904,6 @@ _glxsb= glxsb _pcfclock= pcfclock _pst= pst _sbni= sbni -.if ${MK_CRYPT} != "no" || defined(ALL_MODULES) -_padlock_rng= padlock_rng -.endif .endif .if ${MACHINE_ARCH} == "armv7" diff --git a/sys/x86/conf/NOTES b/sys/x86/conf/NOTES index 501d4159b129..3e8793e9d1ae 100644 --- a/sys/x86/conf/NOTES +++ b/sys/x86/conf/NOTES @@ -541,6 +541,7 @@ envvar hint.pbio.0.port="0x360" device smbios device vpd device tpm +device padlock_rng # VIA Padlock RNG device rdrand_rng # Intel Bull Mountain RNG device aesni # AES-NI OpenCrypto module device ossl # OpenSSL OpenCrypto module From nobody Thu May 28 14:36:59 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gR8Fs1wyTz6fqDp for ; Thu, 28 May 2026 14:37: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gR8Fs066Sz3kgF for ; Thu, 28 May 2026 14:37:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779979025; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4ZG3MhVxD9r5dp2AouwByMWLd1lpLTGPHMD1c4Lam74=; b=tQYQNXpMnVT80aZudqj3betrsbfBGDQgvTg/yoO2WrePbUcVFbmvpaGEZQwkPZ2LTyO1Zv 68t/gsXTsmOPsuSFW+y8Gy5y7NlmmZ3FrpTFfIOudTMDD2x6vJLOug5gBPYHCYWxsoMZA2 wfJBhykAeJaxsTC48ThWVkrhx7JWDmVWMDNd/lIBQq2WQ3a0XV7oLPeVzyJFlIyW3tBYPJ ES9L/bPGm8uZOM0OeUXK9NtxH5JFllOxpRv6z73fYS3povMjw3vBISMfVSOx7OunEfd2xx 8xA9XuJQqkEa0HvPBmddJcpANclYc7l/o3RJIxu1SIUKxr+OdyMEDdgeMOG1/g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779979025; a=rsa-sha256; cv=none; b=dvdyj+N58cnklSERkvuUzIYv5patb3lOPb7LtVVul1vQnY8JnjpUxin4swS7clI9MgGcfc zIVCVOKIyavdOGp9jl0v9IYLvvjLtpYhSwZbx4BLYSPAxz1GnOKOxympinT9N0omuiytDi CHj1+jek0TFWjt8VmbnkxWLmo35D68NhvqHky/0df+Qu/F63knmBxWWZBT58V36TeNyLAr 2JNf6lW8Dodw3GHTnGPY+J9eyDixkgVxw+IUQpkgCM+jP0RrD2P1dKjYRWV/Zgb0+7ohig kX36piefypb6KjX0C3A+WeeybLXN0+19zn+Q77OHQm4g1B7D4R39E8E3LJyibA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779979025; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4ZG3MhVxD9r5dp2AouwByMWLd1lpLTGPHMD1c4Lam74=; b=mcVXD0rBPj3HuMS2ZtF5roIatTHY8gKhkV3v8hR/KTzbHCmq0K9cSB4y6jl1O9834GEy0K 1oLuLzBtvNZlkFfw2jQXmfzZPg52F5eUQeCQg1Y2nCsjJngnSUfW6peqIQoKjcC7SZpdJq +U6CICkPDrHR+p3KNQ888yoQx8OgmxGyd+1cUWVmU70c1haFcAZL16M7PjSoYOdVnxLWy/ SeBKUm1fOTmMXN0OJ1PfUbw/LvY0Pell14F+cHZ6g27B+pkPzDq2MnKUmXqziNVJlhqjrB Lxml+ndML7Z1GWv4qBiXqjM/DmSk+d2rqvAEY0K0Vq/zrs+TnIJw2Ofm1wOrTw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gR8Fr6QB7zqrf for ; Thu, 28 May 2026 14:37:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 22f16 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 14:36:59 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: ShengYi Hung Subject: git: df5e9e3da5b9 - main - usb: Add missing mtx lock and unlock in pushing dma queue List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: aokblast X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: df5e9e3da5b9b3fe63ed4aaaa19b824fd18ae0f2 Auto-Submitted: auto-generated Date: Thu, 28 May 2026 14:36:59 +0000 Message-Id: <6a18530b.22f16.2a0fd314@gitrepo.freebsd.org> The branch main has been updated by aokblast: URL: https://cgit.FreeBSD.org/src/commit/?id=df5e9e3da5b9b3fe63ed4aaaa19b824fd18ae0f2 commit df5e9e3da5b9b3fe63ed4aaaa19b824fd18ae0f2 Author: ShengYi Hung AuthorDate: 2026-05-28 08:42:11 +0000 Commit: ShengYi Hung CommitDate: 2026-05-28 14:36:10 +0000 usb: Add missing mtx lock and unlock in pushing dma queue Accessing usb_xfer_queue requires bus lock, we added this missing lock in here to prevent racing issue. Reviewed by: adrian MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57293 --- sys/dev/usb/usb_transfer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/usb/usb_transfer.c b/sys/dev/usb/usb_transfer.c index 67745cf49397..d41121ed3a06 100644 --- a/sys/dev/usb/usb_transfer.c +++ b/sys/dev/usb/usb_transfer.c @@ -1889,8 +1889,10 @@ usbd_transfer_submit(struct usb_xfer *xfer) */ #if USB_HAVE_BUSDMA if (xfer->flags_int.bdma_enable) { + USB_BUS_LOCK(bus); /* insert the USB transfer last in the BUS-DMA queue */ usb_command_wrapper(&xfer->xroot->dma_q, xfer); + USB_BUS_UNLOCK(bus); return; } #endif From nobody Thu May 28 14:46:09 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gR8SR2gBKz6fqsW for ; Thu, 28 May 2026 14:46:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gR8SQ6MLtz3lJH for ; Thu, 28 May 2026 14:46:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779979574; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TDm2qACsR9Li6caa/gKq9VZyf055xI0KHrGZZNGSbDQ=; b=T+rLMWY//bCEKiwL//kEpk2G+jHlHcujjPqHV/o4vuw28Lfx5PlroXVFOqzSBm409ex8P5 Z+LUT5cOm+2H8nfLE36IeOZt5vT6b2YqgvfWfclzwR0z/w26Q2Bw9gWUV6i/cqnmiTgTaq oaRjOccj+qqv+Drl1QAjfLGrBzNGPw1S/0WMTnzuWPyZi8Ce+6C/HitWUeAWkW17wydpN5 GLff/luz4gRKO7DQj6jawv2jNKO7vgFLpEPmQb8DsQ2mmyL/VxexCUSIqBrkxUiJ685u+H pESFDlAW59BXOc23ZMBDNbN+BVla4FLKxNLymJTZxMOSi/z1wBwTQWGsqYXSjQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779979574; a=rsa-sha256; cv=none; b=ar2jIkl2kX+W8r01BC7WWF0Be8QW17D1OBw6LgTVjSQ9gHy5g6DkkDEUuPR8SwpCxvNaxp 2i7OXPaQkENVt8p2kt97EpGQEEttusIVuvmvcWtAZwQfpzf+22yaxll04FH6b7b8bxfh3p 8BLxlGGRKsigsoOxpoLvIqwAN6B9H0aOviTRw7D45CBp44XnI8WEbguVJ7WvFtWPBbYBPI co6w2c3MTnDmKMouJFikczgjqGyFev0go5zV1hZQ+GIXibIozCujtIlOJQghlEaRPABiqI YrxlLYnm7vbMcH5dc0JbHgdwI1UWjSFN/qMbF8XGhQdm6f/+m1xwcgUDvcE7Iw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779979574; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TDm2qACsR9Li6caa/gKq9VZyf055xI0KHrGZZNGSbDQ=; b=t6A7YFb5pHnXvdqt/BPzXDmE+S9JElaGoDa+GTP/+3eoPnsy9NZ4MYXYfGjk3tzZbd8oNl 5TRCNRvNIj/pbPU8eVzIvtx9iRggmyvvqvLVaDFsOt8m+dEGv5xUAZHdmquH8bTpFMnkGD K18RL1Ew6/+yoIeWyctufRp6k2gWcnyprhpr3H1c9gCuRDdCs2TZH34T3mYlZU/OxXZn0/ 1VXp3fz6MOAeGB1r22PcfPfFZ+jUocn3lihuSA2SewhitdgRpYdacVE2Oz963dWN3mEVUF UAfwDDua0FoVkhmJ0HCk4yRD3Gh4NKytNd0JQNtX6UG9U/nw5rqHp3jMaCrqUg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gR8SQ5y9nzrQ0 for ; Thu, 28 May 2026 14:46:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 24195 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 14:46:09 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 453de99b386d - main - virtual_oss(8): Fix buffer overflow in voss_compressor() call List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 453de99b386d40754a038cc4b804f4c7a3b04624 Auto-Submitted: auto-generated Date: Thu, 28 May 2026 14:46:09 +0000 Message-Id: <6a185531.24195.1452040e@gitrepo.freebsd.org> The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=453de99b386d40754a038cc4b804f4c7a3b04624 commit 453de99b386d40754a038cc4b804f4c7a3b04624 Author: Christos Margiolis AuthorDate: 2026-05-28 13:51:26 +0000 Commit: Christos Margiolis CommitDate: 2026-05-28 14:46:01 +0000 virtual_oss(8): Fix buffer overflow in voss_compressor() call This particular calls swaps the samples and maxchan arguments, which can cause a buffer overflow in p_ch_chain if maxchan exceeds its bounds (VMAX_CHAN). Reported by: Yuxiang Yang, Yizhou Zhao, Ao Wang, Xuewei Feng, Qi Li, and Ke Xu from Tsinghua University using GLM-5.1 from Z.ai Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: emaste --- usr.sbin/virtual_oss/virtual_oss/virtual_oss.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/virtual_oss/virtual_oss/virtual_oss.c b/usr.sbin/virtual_oss/virtual_oss/virtual_oss.c index 1d95c87d57b1..42a748a5e3bd 100644 --- a/usr.sbin/virtual_oss/virtual_oss/virtual_oss.c +++ b/usr.sbin/virtual_oss/virtual_oss/virtual_oss.c @@ -783,8 +783,8 @@ virtual_oss_process(void *arg __unused) /* check if compressor should be applied */ voss_compressor(buffer_temp, pvp->rx_compressor_gain, - &pvp->rx_compressor_param, samples, - samples * src_chans, (1ULL << (pvp->bits - 1)) - 1ULL); + &pvp->rx_compressor_param, samples * src_chans, + src_chans, (1ULL << (pvp->bits - 1)) - 1ULL); TAILQ_FOREACH(pvc, &pvp->head, entry) { From nobody Thu May 28 16:21:27 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRBZJ0JHQz6fyJt for ; Thu, 28 May 2026 16:21:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRBZH6YHvz3wBy for ; Thu, 28 May 2026 16:21:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779985287; 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=AG9TyWg4Vd4c0DGMKp5sShX/sxT3xwaJT9m4zlMqlvw=; b=tA2CjkLwG5elXvm5GPNbUfysfndwsd4/yvQaBRPZvA08zT45Mqavbjp3jShI4pnyfH7Dmb ZfnHyp5/8Oo3GvffK6TAlEc8UonkoK/pw5BQABNg+SxFOeWv9epGRuQt9MSOkGonIec3+R ksolouiH1F4bDHoSujJWHDn/V1k/146Ao/ogutGvzWKifOtl5OycpH9AfjXI2NGamgoWwn QfXOG1RwAYfVqsmuZPTcd+6CxJezW7ugOkB0PY8KNoaTO3kBrnrbBVhjf4eyNR9osyZdaY Run919qLahY/PhTrSCrX8Ddy4ngOxWjoTrlSZlBji/uzxZ6Twj5HcHgaJN6sxg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779985288; a=rsa-sha256; cv=none; b=DfkTyKjdiLy2EMsAkhS74+eEjoUF3Ax/QmORCHXhFneXDUU9HeqSfoLZ25reUMfkrJyoFo fAH/okg97fZYDEBgIq/GUPbaKHD6Wmvs0bAFmkLiExh4DLf7UWO2wBA1t5YxLAehXP9kVD VCr24ppCsExMC2BAUSzGHblgXmsbOz0ALOd5EfgUfTqg020qXlloaEpGfKkwycJEq4cxkm bSjVQyoCGml4It9rjQ84zhljCyoO8aRmWbStvN5f1SygwlVphZjrVhpdIB1ukyDTaVp2ng gC1LWD0VvL8mJIFYMFmzPebQZzhNe2E+3F6STB9ZHV0D4ZHlkUUuzXhiNsvAvA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779985287; 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=AG9TyWg4Vd4c0DGMKp5sShX/sxT3xwaJT9m4zlMqlvw=; b=HeTQHBa6M8E+Sww4+HI7eBbAetH5Gt71aCF3jAR2ENY9yBQ4fbLI6Z01Sas+GxX5vpri/q FAOiO+dU3uW6es3YXywP76z50R0Aj2JxctmRLhDHqULp7JtbzcPHw+XkqWaOoW7NNtKRgb PEIOqDRElr59c3kB7WeROV+yK3Nb0aBe4QrHg5qYt5FZoUJuy9pqO1Zmcq7vFCme3VG51n pVtI9qvbfEZhKVklYcdmLmT0dNwu6tDYGNIHu0+lsnfcBrhv2i4ypPd0p8+OADrcuUVVJd qigYafR+r2vlHoLM23cRAJV7BzHHKv4HtOI42/p9L+Vp6Z2aosJpOGXHqnxp2A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRBZH60ckztKt for ; Thu, 28 May 2026 16:21:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33dfa by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 16:21:27 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Ricardo Branco From: Mitchell Horne Subject: git: 4dfc78e0e3bb - main - crashinfo: Create core.txt.last symlink List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4dfc78e0e3bb096514455e9bb6cf63e46e84db13 Auto-Submitted: auto-generated Date: Thu, 28 May 2026 16:21:27 +0000 Message-Id: <6a186b87.33dfa.4b14b976@gitrepo.freebsd.org> The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=4dfc78e0e3bb096514455e9bb6cf63e46e84db13 commit 4dfc78e0e3bb096514455e9bb6cf63e46e84db13 Author: Ricardo Branco AuthorDate: 2026-05-15 14:58:41 +0000 Commit: Mitchell Horne CommitDate: 2026-05-28 16:20:30 +0000 crashinfo: Create core.txt.last symlink When saving a coredump, savecore(8) maintains .last symlinks for the info and vmcore artifacts, but not for the crashinfo text report. Make crashinfo(8) create the link, pointing at the current core.txt. file. This makes /var/crash/core.txt.last track the same core dump as info.last and vmcore.last. [mhorne: I tweaked the submission, such that the link will be created as soon as the core.txt.X file is generated; not only after a successful report has been written.] Signed-off-by: Ricardo Branco Reviewed by: mhorne MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/2199 --- usr.sbin/crashinfo/crashinfo.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/usr.sbin/crashinfo/crashinfo.sh b/usr.sbin/crashinfo/crashinfo.sh index 68115f09f9d4..87e5565b98e3 100755 --- a/usr.sbin/crashinfo/crashinfo.sh +++ b/usr.sbin/crashinfo/crashinfo.sh @@ -149,11 +149,13 @@ fi VMCORE=$CRASHDIR/vmcore.$DUMPNR INFO=$CRASHDIR/info.$DUMPNR FILE=$CRASHDIR/core.txt.$DUMPNR +LINK=$CRASHDIR/core.txt.last HOSTNAME=`hostname` if $BATCH; then echo "Writing crash summary to $FILE." exec > $FILE 2>&1 + ln -sf $FILE $LINK fi GDB=/usr/local/bin/gdb @@ -204,6 +206,7 @@ machine=$(gdb_command $KERNEL 'printf "%s", machine') if ! $BATCH; then echo "Writing crash summary to $FILE." exec > $FILE 2>&1 + ln -sf $FILE $LINK fi echo "$HOSTNAME dumped core - see $VMCORE" From nobody Thu May 28 16:49:20 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRCBY5QFgz6g18B for ; Thu, 28 May 2026 16:49: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRCBY4w58z401C for ; Thu, 28 May 2026 16:49:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779986965; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Jouan5UC3bf7PHLA2c8IxxQNWPmCemBVG3kYzzLZeZc=; b=jv+MELa0FOw48y39mlzUTVRlii8TFygdPaVcGFzbPnXrc6Lt+P1tE6tQGVtxcLUrFE+3HN ezBxmdUzfwMDLKtbkU/ynTeBuOCFuEctLRjPqL6ak3iYw4qVwSfOLoHfC6wU7GI7HNVnli YtDV3lkMBWQL2Eor00IywTp9obkKKX25jlPGnVz5AQBrahxSwHrdIDLq0o+iimEjbaULlf MUwHCt89CeZ/hPsWuZ7cSWj7GxvQBJoPLVt6ssMe/f6HHdUJg2gac7K4HdFHhsrVlugtzt YyTV81vXfqt1puaAu5fIbOKlp0nG7Kmv+9N+oUeKObUkfv/o+gU+pt2Fo/4Xew== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779986965; a=rsa-sha256; cv=none; b=NR6SxGeWnDcEjEvLACTdkaVYaXoFQACjYS180LngN65zpjSM8kU+389Itrs/gmbmkYpK9G Qwp4hBjIUpSg6bATKovhjBt94Ts2c8zOQAv+gAPpl3PQAyRVRfC1nf7P202qPn1YCRFEFT 6Dcba+Jva/xUj2tJo3tnWcbP+r7Vxn/hIrye4hqGXBHBn+9+HE4+ZE0SdthX5T7+w0fTUz jAGMtshHWC3Y938LU0jmigPd7RiVZWrm8tqhAFpHz4OXrqOG07F8PpsDjocYFJAOkbKpyu wk/TR6YVnV7YSzxK+HG4cGNllPgc3aWJGEXdHHoEaR6evuWgkF81JVRho3ZKqw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779986965; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Jouan5UC3bf7PHLA2c8IxxQNWPmCemBVG3kYzzLZeZc=; b=hGzDpXCiOIb03e63PCAgaH7EmKDPQV+mIA5toW53WDNK0Jr7WmX+9x1JOi1Z4StzsW0Rnz BdC1D/nIqvvzTqxjFD4FrXqyZA0hD3CR5CxxB4z/6fkWwijQ8baD2yJCGG1EjoLO3IX0Yo +5G3gT9Xd+3bsmYFqy19FVgJdvR/S1p+ijx1a1jYr5VdvZIoMdHn9sXxiOSYP2x20u52Dv 5laXrRU6fC8Eu/hybhfbU6je/xRrSVw61+LyNU0jv+GoGoW3v66AVWpOsRgry+vO9kek2U 7VMWuKfYVEBqEiTDwYpMbOEEt8WJRK3+kZRVNq5ZCZJhaA2/8vy+/pGZLdpF6g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRCBY4Sn3zvbp for ; Thu, 28 May 2026 16:49:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39c80 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 16:49:20 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Siva Mahadevan Subject: git: a7df326619ef - main - ptrace_test: expect PT_STEP tests to fail on riscv List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: siva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a7df326619ef9caa2ed00bf2d103dd278e7b32ec Auto-Submitted: auto-generated Date: Thu, 28 May 2026 16:49:20 +0000 Message-Id: <6a187210.39c80.56235993@gitrepo.freebsd.org> The branch main has been updated by siva: URL: https://cgit.FreeBSD.org/src/commit/?id=a7df326619ef9caa2ed00bf2d103dd278e7b32ec commit a7df326619ef9caa2ed00bf2d103dd278e7b32ec Author: Siva Mahadevan AuthorDate: 2026-05-28 16:32:24 +0000 Commit: Siva Mahadevan CommitDate: 2026-05-28 16:32:42 +0000 ptrace_test: expect PT_STEP tests to fail on riscv ptrace_single_step currently returns EOPNOTSUPP on riscv. This temporarily fixes the following CI failures: https://ci.freebsd.org/job/FreeBSD-main-riscv64-test/16606/testReport/sys.kern/ptrace_test/ptrace__PT_STEP_with_signal/ https://ci.freebsd.org/job/FreeBSD-main-riscv64-test/16606/testReport/sys.kern/ptrace_test/ptrace__step_siginfo/ Reviewed by: kib Approved by: emaste (mentor) Differential Revision: https://reviews.freebsd.org/D57288 --- tests/sys/kern/ptrace_test.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/sys/kern/ptrace_test.c b/tests/sys/kern/ptrace_test.c index c1a5d226e990..3a55a6f48033 100644 --- a/tests/sys/kern/ptrace_test.c +++ b/tests/sys/kern/ptrace_test.c @@ -3614,6 +3614,10 @@ ATF_TC_BODY(ptrace__PT_STEP_with_signal, tc) ATF_REQUIRE(pl.pl_flags & PL_FLAG_SI); REQUIRE_EQ(pl.pl_siginfo.si_signo, SIGABRT); +#if defined(__riscv) + atf_tc_expect_fail("PT_STEP not implemented on riscv, see sys/riscv/riscv/ptrace_machdep.c"); +#endif + /* Step the child process inserting SIGUSR1. */ REQUIRE_EQ(ptrace(PT_STEP, fpid, (caddr_t)1, SIGUSR1), 0); @@ -3731,6 +3735,10 @@ ATF_TC_BODY(ptrace__step_siginfo, tc) ATF_REQUIRE(WIFSTOPPED(status)); REQUIRE_EQ(WSTOPSIG(status), SIGSTOP); +#if defined(__riscv) + atf_tc_expect_fail("PT_STEP not implemented on riscv, see sys/riscv/riscv/ptrace_machdep.c"); +#endif + /* Step the child ignoring the SIGSTOP. */ REQUIRE_EQ(ptrace(PT_STEP, fpid, (caddr_t)1, 0), 0); From nobody Thu May 28 17:22:56 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRCxF25jxz6g3YV for ; Thu, 28 May 2026 17:22: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRCxF01sJz42yd for ; Thu, 28 May 2026 17:22:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779988977; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qJIHD9YKRw8/KHybEnOUyB8OPSgccTjNXUIGHDr0SSQ=; b=hG3isge4NZUXUZ9nowKPQ//HHZQ1ZR+2Spcl57S+ppf21ASlQVm3dYkqgzTSo1WT/HnizO QZySMoNDiA3e7abNSPpSeMSgTM2tUZZY73kS5+Ybre+zkn6egnHyi0r3Cd5o3eInXxSgoS h+RMkVOYbyn6IYLbKuA1VLqprLKuH7PTydo4WMv5iielk/gpeWxkfpr/4T4pISAkckiTGU GEWL/dPDZpO3F5yEulachmGywdQnwzpRIHLS+9hd7D+PmII0it4lCkNKIQpy+EmYOgtJj0 hHZQyaVRwBuVE+1+WBs5OAIVrEuYkjVdok7uiv6f5WindCGndnR4pliBUMSyVg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779988977; a=rsa-sha256; cv=none; b=dVs5K3RGYNSNfFiPHOmrBl1Uduxyj+Ta4kiShWLyd2fAaYGfnoeJOTCX9Wi6RUDe5TWR8K 0k/u0H/tMIMXCYYQc+oNoBSyG1ucBWeCOG0uapZ+G2EwgNzi8K5gDB3/6d148U0OqIXAWI ny6JjnZDhMnYKO9vTYxS9J1ju0VRC1IENXmurMEB4aYGwRrGFTyE8c/bM/DK5qos72SQK7 SY2NDOYuQIciht/lIgo8mnZV7Vi3h87wX7jlSOijd9xUnFzj3E1cdKw9lBtp4QHU4UNmU0 Jg08pbzqJcDoHGPTPIEwCF7GClh+ramaGr5sHsAbFs9kjtdiPzLNdfjLvkt06g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779988977; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qJIHD9YKRw8/KHybEnOUyB8OPSgccTjNXUIGHDr0SSQ=; b=ZqosqRLP2t3c1cnC6BHyzcHzJCgC4NnKumsfoGrHR4MH3fC4TXM7+h8Tplx9fJIQHwkM/0 2XbH5ZWJ3DBf7rNqCnx/8qbbfcHQ7aIHQxwATcnW8F3wXWji6n6cLQGgsdm6L5+6F/cndf fkoirdDE1eL4BSdGnnYrFuIvHCarD5ZQODnGD9tnOOuQ++G3ogipWL2qThZIVOC56Nw0yM 9rgC0IbcXxAaXXBLFP1FGj5zphMJSiwHTHWp86WsN2TYhnHWAVsJv0zOW8SXMPfDGiJiDg xgdX7QZ8zJpCb/2aZfIuZ8vhwYIquiVpNHcKW6MivtAJE0AsiS1yOunezXp31g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRCxD5zDFzwQc for ; Thu, 28 May 2026 17:22:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d304 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 17:22:56 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 95fc64cc29fb - main - ctld: More consistent error messages List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 95fc64cc29fb4cddc7cad093cfa32587a623f560 Auto-Submitted: auto-generated Date: Thu, 28 May 2026 17:22:56 +0000 Message-Id: <6a1879f0.3d304.650514e4@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=95fc64cc29fb4cddc7cad093cfa32587a623f560 commit 95fc64cc29fb4cddc7cad093cfa32587a623f560 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-28 17:22:43 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-28 17:22:43 +0000 ctld: More consistent error messages The error messages ctld emits when it finds a port or LUN it did not create were inconsistent with each other as well as with ctld's other error messages. MFC after: 1 week Sponsored by: Klara, Inc. Sponsored by: NetApp, Inc. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D57270 --- usr.sbin/ctld/kernel.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/usr.sbin/ctld/kernel.cc b/usr.sbin/ctld/kernel.cc index 8c5c447f3e80..ef7ef87af090 100644 --- a/usr.sbin/ctld/kernel.cc +++ b/usr.sbin/ctld/kernel.cc @@ -446,8 +446,8 @@ add_iscsi_port(struct kports &kports, struct conf *conf, const struct cctl_port &port, std::string &name) { if (port.cfiscsi_target.empty()) { - log_debugx("CTL port %u \"%s\" wasn't managed by ctld; ", - port.port_id, name.c_str()); + log_debugx("CTL iSCSI port %u \"%s\" is not managed by ctld; " + "ignoring", port.port_id, name.c_str()); if (!kports.has_port(name)) { if (!kports.add_port(name, port.port_id)) { log_warnx("kports::add_port failed"); @@ -498,8 +498,8 @@ add_nvmf_port(struct conf *conf, const struct cctl_port &port, std::string &name) { if (port.nqn.empty() || port.ctld_transport_group_name.empty()) { - log_debugx("CTL port %u \"%s\" wasn't managed by ctld; ", - port.port_id, name.c_str()); + log_debugx("CTL NVMeoF port %u \"%s\" is not managed by ctld; " + "ignoring", port.port_id, name.c_str()); return; } @@ -570,7 +570,7 @@ conf_new_from_kernel(struct kports &kports) for (const auto &lun : devlist.lun_list) { if (lun.ctld_name.empty()) { - log_debugx("CTL lun %ju wasn't managed by ctld; " + log_debugx("CTL lun %ju is not managed by ctld; " "ignoring", (uintmax_t)lun.lun_id); continue; } From nobody Thu May 28 17:27:36 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRD2j3N9hz6g3fZ for ; Thu, 28 May 2026 17: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRD2j2Z9Nz43L3 for ; Thu, 28 May 2026 17: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=1779989261; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H79c7Bl/dQkSQuO95pooluDu4PIkvwjmX5hmx/IuSJE=; b=ZngKYMj7pbkzqBzg+DUmcaFR6lA1NYct8LcZjYcabR00EztQogX0GYHiMjwVts2ZtCtLsI hMgeU1vplBb1ajT0JWAB/8sTbQFUAspPysH3MujteFPkea6M9caTAiMZ/ScKsId8Fjd5Cd z61td8PRNuiIvchDg+4exDMKgE0Bq5e7G2iWcpELkItLarvradFkkH9oCvAwBHOK6Ty7W3 6cdMPQNIQ98zRN93Yv6mXYgnsuto7o1iwqLKH4+ma4Vqy9kyR2GYtIuefffz09ZI/wXyDf QaPUejZWWXSv/ssOAmHm3vwS/v0SFtRSXrND6D4N0TTYBPxEgbdD73qkbf2ZaQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779989261; a=rsa-sha256; cv=none; b=HkEKFgUtWx8ErBMLivLEXX/jvQtoPeg1xCVWJPR0IgIi4QbiF1iRXfhuo3rj9YCzzqe5Nu w9BdAHlZwuSBbHc5/kETQdL4+PBJoVeM2ZKZOS1DLxtCug4JoZp2lNXlBmYQE/OVABZiUs iCfKKd4OUd+eoCpUP1e2Dcg5CKwspYBY12jRyXwZpqWNO6zCEMxioCVvB3k8zoE+um65ZB RSxHoxBWH34+PcSSwhEYGX00zDbEkuSgcKw05SjWDPwowlSK3PBOdzwgRuRlqmX/v+ShyE 1cddxQG7tyOu420Kijq0R1mU12TwA9X9epxZoktre5XNsxbbvAw6TgWAgB4z/g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779989261; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H79c7Bl/dQkSQuO95pooluDu4PIkvwjmX5hmx/IuSJE=; b=eOsUf+p4Igndq5k3bGdwTJwrsp2rKtapAtfmrP+EAmmHKF9Fe1ZaLqW1GeS10u7Mi+MkM4 apYx3O7deqg81TSyd4XTIVr0r0mXkxQg6KpkFfOuMbQxObEAOAhdanOdllNjaOOACj9ITD vuvmdNJNVlZzKcpugzg0nv6+68c6BgFCOyWVc92OmN23d7gUKMHEMM23KVnWIpn5HoVqa/ aewTHx8HF7AwVETAvvwBbZpFIda8Av2tg0X1sBpBvTER8HcVJt1R2gvDV1MhktnuC9sT3X 59SigyGVQAfchbrIJMbmh2kiHTnkkehYPDL+3UHtyzPmTcZovtvH0wUT5yLS4A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRD2j28wtzvrs for ; Thu, 28 May 2026 17:27:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d055 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 17:27:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 0a02a47fd94a - main - x86: for wrmsr_early_safe(), catch all exceptions, not only #GP List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0a02a47fd94a8326e84ac0a6cb857342b59671f8 Auto-Submitted: auto-generated Date: Thu, 28 May 2026 17:27:36 +0000 Message-Id: <6a187b08.3d055.7ff4566f@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=0a02a47fd94a8326e84ac0a6cb857342b59671f8 commit 0a02a47fd94a8326e84ac0a6cb857342b59671f8 Author: Konstantin Belousov AuthorDate: 2026-05-27 08:21:10 +0000 Commit: Konstantin Belousov CommitDate: 2026-05-28 17:26:56 +0000 x86: for wrmsr_early_safe(), catch all exceptions, not only #GP Reviewed by: olce Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57264 --- sys/amd64/amd64/machdep.c | 24 +++++++++++++++--------- sys/amd64/amd64/support.S | 7 +++---- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index db2fd5927f7f..8df4868f5312 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -1827,29 +1827,35 @@ wrmsr_early_safe_start(void) { struct region_descriptor efi_idt; struct gate_descriptor *gpf_descr; + int i; sidt(&wrmsr_early_safe_orig_efi_idt); efi_idt.rd_limit = 32 * sizeof(idt0[0]); efi_idt.rd_base = (uintptr_t)idt0; lidt(&efi_idt); - gpf_descr = &idt0[IDT_GP]; - gpf_descr->gd_looffset = (uintptr_t)wrmsr_early_safe_gp_handler; - gpf_descr->gd_hioffset = (uintptr_t)wrmsr_early_safe_gp_handler >> 16; - gpf_descr->gd_selector = rcs(); - gpf_descr->gd_type = SDT_SYSTGT; - gpf_descr->gd_p = 1; + /* Setup handler for all possible exceptions. */ + for (i = 0; i < 32; i++) { + gpf_descr = &idt0[i]; + gpf_descr->gd_looffset = + (uintptr_t)wrmsr_early_safe_gp_handler; + gpf_descr->gd_hioffset = + (uintptr_t)wrmsr_early_safe_gp_handler >> 16; + gpf_descr->gd_selector = rcs(); + gpf_descr->gd_type = SDT_SYSTGT; + gpf_descr->gd_p = 1; + } } void wrmsr_early_safe_end(void) { - struct gate_descriptor *gpf_descr; + int i; lidt(&wrmsr_early_safe_orig_efi_idt); - gpf_descr = &idt0[IDT_GP]; - memset_early(gpf_descr, 0, sizeof(*gpf_descr)); + for (i = 0; i < 32; i++) + memset_early(&idt0[i], 0, sizeof(idt0[0])); } int diff --git a/sys/amd64/amd64/support.S b/sys/amd64/amd64/support.S index 09d4ef85b087..1d7d05843ba8 100644 --- a/sys/amd64/amd64/support.S +++ b/sys/amd64/amd64/support.S @@ -1566,20 +1566,19 @@ msr_onfault: ret ENTRY(wrmsr_early_safe) + movq %rsp,%r11 movl %edi,%ecx movl %esi,%eax sarq $32,%rsi movl %esi,%edx wrmsr xorl %eax,%eax -wrmsr_early_faulted: ret ENTRY(wrmsr_early_safe_gp_handler) - addq $8,%rsp + movq %r11,%rsp movl $EFAULT,%eax - movq $wrmsr_early_faulted,(%rsp) - iretq + ret /* * void pmap_pti_pcid_invalidate(uint64_t ucr3, uint64_t kcr3); From nobody Thu May 28 19:06:53 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRGFG57Smz6dwSJ for ; Thu, 28 May 2026 19:06: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRGFG3KY8z49tG for ; Thu, 28 May 2026 19:06:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779995218; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TQm3QGl8QagtWXfp0VqLPm6Hj1OP05OXgyH4rAAdwcc=; b=FBbaWmzV3fbcoXQBeJAkqqA7RKj4dvGd2yZmKfYnpMMWd44NcKRxdYFPD/tqntPH5JXYvd VD08KhreCIf8DSIMzveqMBWlo7LuzKWTtod1J2CwbHE0Eq1RzB+TunrI32wd9KpvpakmPW q9PwXkRreOXp+ub85S+HvFdE0tiPGpixT75RtW433N2+MStn2U5X3T6OVt1AUDirJhOShZ MQGcElF9NLOv/WnWXKZO+npoqZ+cHfCaPt3ykEX5g8bxNM6O/RyudyFzb5tGWJONLXJHUf oCxglKTqyokj75IA5VMao7iVvLqdEdD15tujsX9nyAcoVEfDzJXnxuA9VLNczw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779995218; a=rsa-sha256; cv=none; b=WD0xm1iXRpRlpPgCzmZi488fuCguTsOjYgxEkI3bvVqRv9lMYBt0wQxcneK2D3XDaJ2P/O g6vEAV0kUhbB/jqxd7sVFVz3mSthzjHGYjSGqMbyRlCiLTAq2Wv8VLqugf7ieOL9fXlM/K tMWRfkIQ89O/h1Hn6ajeKuRvKJlmkE1tNvgau4pU+LhGrFjQGHtI8K2cCrvdmFIE/tVGWc qL7I5sRmdKVuA6dt5Es/5VaV1kGYrJbOiHievZnGrzk9rJU3aM/qXpqu+gyQMSaNxfYxkI xoSQQIG8YJVSK1zzDA55uSJQIH0gC+AFvX0667KFj3QCGWgOq9YGTE93uBunkw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779995218; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TQm3QGl8QagtWXfp0VqLPm6Hj1OP05OXgyH4rAAdwcc=; b=Xv5EP1Mojhh9KkOWM8EeCgEbz1vVQ8oLN/Zy1U6MB+cd0cFIAIyx4/CZCrrBNMbuLn4SiR d2+ifK72Yl9eoe+pLwwy4xSfJg6nJxIhzBnpmrpQO9nKZ0APoTqlzi3EMGdQ6fpqPVDfuJ GjAi2bioq6hligpYpy/Xvb2ImdO3uIAJXGfp/v3nRYDd2WCmLlVX/iiyO3xJIw1LRQiWET O9m5e7iN7zzcFasySAavgn+CBzaodt15GjT0zqSsO9c0N6EyVQ7a8psi2Y7aZOuN+a1B6X FUT/jQus7LBovXwtXgffqsRcB9hup602rtHShGCaMzt98csJyu7WcNg+A3vn3Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRGFG1st8zyfW for ; Thu, 28 May 2026 19:06:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1fcc9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 19:06:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: a172f9e5b3cf - main - cxgbe(4): Improvements to the slow interrupt handler List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a172f9e5b3cf41882f087f6c5311dc068d9d6b54 Auto-Submitted: auto-generated Date: Thu, 28 May 2026 19:06:53 +0000 Message-Id: <6a18924d.1fcc9.67a666f1@gitrepo.freebsd.org> The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=a172f9e5b3cf41882f087f6c5311dc068d9d6b54 commit a172f9e5b3cf41882f087f6c5311dc068d9d6b54 Author: Navdeep Parhar AuthorDate: 2026-05-28 07:12:20 +0000 Commit: Navdeep Parhar CommitDate: 2026-05-28 19:05:57 +0000 cxgbe(4): Improvements to the slow interrupt handler * Add a flag to indicate that an INT_CAUSE should not be cleared automatically in the generic handler. This is to ensure correct operation of some INT_CAUSEs that are related to each other and must be cleared in a certain order. * Add decode for many more INT_CAUSE registers. MFC after: 1 week Sponsored by: Chelsio Communications --- sys/dev/cxgbe/adapter.h | 1 + sys/dev/cxgbe/common/t4_hw.c | 1835 +++++++++++++++++++++++++++++++++++++----- 2 files changed, 1648 insertions(+), 188 deletions(-) diff --git a/sys/dev/cxgbe/adapter.h b/sys/dev/cxgbe/adapter.h index 24a482b74dfb..8c5cf052b689 100644 --- a/sys/dev/cxgbe/adapter.h +++ b/sys/dev/cxgbe/adapter.h @@ -194,6 +194,7 @@ enum { IHF_CLR_ALL_SET = (1 << 5), /* Clear all set bits */ IHF_CLR_ALL_UNIGNORED = (1 << 6), /* Clear all unignored bits */ IHF_RUN_ALL_ACTIONS = (1 << 7), /* As if all cause are set */ + IHF_CLR_DELAYED = (1 << 9), /* Cleared in a delayed call */ }; #define IS_DETACHING(vi) ((vi)->flags & VI_DETACHING) diff --git a/sys/dev/cxgbe/common/t4_hw.c b/sys/dev/cxgbe/common/t4_hw.c index f4eef54e5c6b..41606201ad39 100644 --- a/sys/dev/cxgbe/common/t4_hw.c +++ b/sys/dev/cxgbe/common/t4_hw.c @@ -4794,6 +4794,27 @@ struct intr_info { const struct intr_action *actions; }; +/* Helper to clear interrupts that have IHF_CLR_DELAYED. */ +static void +clear_int_cause_reg(struct adapter *sc, const struct intr_info *ii, int flags) +{ + u32 cause, ucause; + + cause = ucause = t4_read_reg(sc, ii->cause_reg); + if (cause == 0) + return; + flags |= ii->flags; + if (flags & IHF_IGNORE_IF_DISABLED) + ucause &= t4_read_reg(sc, ii->enable_reg); + if (flags & IHF_CLR_ALL_SET) { + t4_write_reg(sc, ii->cause_reg, cause); + (void)t4_read_reg(sc, ii->cause_reg); + } else if (ucause != 0 && flags & IHF_CLR_ALL_UNIGNORED) { + t4_write_reg(sc, ii->cause_reg, ucause); + (void)t4_read_reg(sc, ii->cause_reg); + } +} + static inline char intr_alert_char(u32 cause, u32 enable, u32 fatal) { @@ -4869,8 +4890,8 @@ t4_handle_intr(struct adapter *sc, const struct intr_info *ii, uint32_t acause, } } - /* clear */ - if (cause != 0) { + /* Clear here unless delayed clear is requested. */ + if (cause != 0 && (flags & IHF_CLR_DELAYED) == 0) { if (flags & IHF_CLR_ALL_SET) { t4_write_reg(sc, ii->cause_reg, cause); (void)t4_read_reg(sc, ii->cause_reg); @@ -5003,22 +5024,63 @@ static bool pcie_intr_handler(struct adapter *adap, int arg, int flags) .details = NULL, .actions = NULL, }; + static const struct intr_details pcie_intr_cause_ext_details[] = { + { F_IPFORMQPERR, "PCIe IP FormQ Buffer PERR" }, + { F_IPFORMQCERR, "PCIe IP FormQ Buffer CERR" }, + { F_TRGT1GRPCERR, "TRGT1 Group FIFOs CERR" }, + { F_IPSOTCERR, "PCIe IP SOT Buffer SRAM CERR" }, + { F_IPRETRYCERR, "PCIe IP Replay Buffer CERR" }, + { F_IPRXDATAGRPCERR, "PCIe IP Rx Data Group SRAMs CERR" }, + { F_IPRXHDRGRPCERR, "PCIe IP Rx Header Group SRAMs CERR" }, + { F_A0ARBRSPORDFIFOPERR, "A0 Arbiter Response Order FIFO Parity Error" }, + { F_HRSPCERR, "Master HMA Channel Response Data SRAM CERR" }, + { F_HREQRDCERR, "Master HMA Channel Read Request SRAM CERR" }, + { F_HREQWRCERR, "Master HMA Channel Write Request SRAM CERR" }, + { F_DRSPCERR, "Master DMA Channel Response Data SRAM CERR" }, + { F_DREQRDCERR, "Master DMA Channel Read Request SRAM CERR" }, + { F_DREQWRCERR, "Master DMA Channel Write Request SRAM CERR" }, + { F_CRSPCERR, "Master CMD Channel Response Data SRAM CERR" }, + { F_ARSPPERR, "Master ARM Channel Response Data SRAM PERR" }, + { F_AREQRDPERR, "Master ARM Channel Read Request SRAM PERR" }, + { F_AREQWRPERR, "Master ARM Channel Write Request SRAM PERR" }, + { F_PIOREQGRPCERR, "PIO Request Group FIFOs CERR" }, + { F_ARSPCERR, "Master ARM Channel Response Data SRAM CERR" }, + { F_AREQRDCERR, "Master ARM Channel Read Request SRAM CERR" }, + { F_AREQWRCERR, "Master ARM Channel Write Request SRAM CERR" }, + { F_MARSPPERR, "INIC MA Ctrl and Data Rsp Perr" }, + { F_INICMAWDATAORDPERR, "INIC Ma Arb Write Ord Data Fifo Perr" }, + { F_EMUPERR, "CFG EMU SRAM PERR" }, + { F_ERRSPPERR, "CFG EMU SRAM CERR" }, + { F_MSTGRPCERR, "Master Data Path and Response Read Queue SRAM CERR" }, + { 0 } + }; struct intr_info pcie_int_cause_ext = { .name = "PCIE_INT_CAUSE_EXT", .cause_reg = A_PCIE_INT_CAUSE_EXT, .enable_reg = A_PCIE_INT_ENABLE_EXT, .fatal = 0, .flags = 0, - .details = NULL, + .details = pcie_intr_cause_ext_details, .actions = NULL, }; + static const struct intr_details pcie_intr_cause_x8_details[] = { + { F_X8TGTGRPPERR, "x8 TGT Group FIFOs parity error" }, + { F_X8IPSOTPERR, "PCIe x8 IP SOT Buffer SRAM PERR" }, + { F_X8IPRETRYPERR, "PCIe x8 IP Replay Buffer PERR" }, + { F_X8IPRXDATAGRPPERR, "PCIe x8 IP Rx Data Group SRAMs PERR" }, + { F_X8IPRXHDRGRPPERR, "PCIe x8 IP Rx Header Group SRAMs PERR" }, + { F_X8IPCORECERR, "x8 IP SOT, Retry, RxData, RxHdr SRAM CERR" }, + { F_X8MSTGRPPERR, "x8 Master Data Path and Response Read Queue SRAM PERR" }, + { F_X8MSTGRPCERR, "x8 Master Data Path and Response Read Queue SRAM CERR" }, + { 0 } + }; struct intr_info pcie_int_cause_x8 = { .name = "PCIE_INT_CAUSE_X8", .cause_reg = A_PCIE_INT_CAUSE_X8, .enable_reg = A_PCIE_INT_ENABLE_X8, .fatal = 0, .flags = 0, - .details = NULL, + .details = pcie_intr_cause_x8_details, .actions = NULL, }; bool fatal = false; @@ -5050,80 +5112,247 @@ static bool tp_intr_handler(struct adapter *adap, int arg, int flags) { F_FLMTXFLSTEMPTY, "TP out of Tx pages" }, { 0 } }; - static const struct intr_info tp_intr_info = { + static const struct intr_details t7_tp_intr_details[] = { + { F_FLMTXFLSTEMPTY, "Offload memory manager Tx free list empty" }, + { F_TPCERR, "TP modules flagged Correctable Error" }, + { F_OTHERPERR, "TP Other modules (Core, TM, FLM, MMGR, DB) Parity Error" }, + { F_TPEING1PERR, "TP-ESide Ingress1 Parity Error" }, + { F_TPEING0PERR, "TP-ESide Ingress0 Parity Error" }, + { F_TPEEGPERR, "TP-ESide Egress Parity Error" }, + { F_TPCPERR, "TP-CSide Parity Error" }, + { 0 } + }; + struct intr_info tp_intr_info = { .name = "TP_INT_CAUSE", .cause_reg = A_TP_INT_CAUSE, .enable_reg = A_TP_INT_ENABLE, .fatal = 0x7fffffff, - .flags = IHF_FATAL_IFF_ENABLED, - .details = tp_intr_details, + .flags = IHF_FATAL_IFF_ENABLED | IHF_CLR_DELAYED, + .details = NULL, .actions = NULL, }; - static const struct intr_info tp_inic_perr_cause = { - .name = "TP_INIC_PERR_CAUSE", - .cause_reg = A_TP_INIC_PERR_CAUSE, - .enable_reg = A_TP_INIC_PERR_ENABLE, + static const struct intr_details tp_cerr_cause_details[] = { + { F_TPCEGDATAFIFO, "TPCSide Egress Data FIFO" }, + { F_TPCLBKDATAFIFO, "TPCSide Loopback Data FIFO" }, + { F_RSSLKPSRAM, "RSS Lookup SRAM" }, + { F_SRQSRAM, "SRQ SRAM" }, + { F_ARPDASRAM, "ARP DA SRAM" }, + { F_ARPSASRAM, "ARP SA SRAM" }, + { F_ARPGRESRAM, "ARP GRE SRAM" }, + { F_ARPIPSECSRAM1, "ARP IPSec SRAM0" }, + { F_ARPIPSECSRAM0, "ARP IPSec SRAM1" }, + { 0 } + }; + static const struct intr_info tp_cerr_cause = { + .name = "TP_CERR_CAUSE", + .cause_reg = A_TP_CERR_CAUSE, + .enable_reg = A_TP_CERR_ENABLE, .fatal = 0xffffffff, .flags = IHF_FATAL_IFF_ENABLED, - .details = NULL, + .details = tp_cerr_cause_details, .actions = NULL, }; + static const struct intr_details tp_c_perr_details[] = { + { F_DMXFIFOOVFL, "Demux FIFO Overflow" }, + { F_URX2TPCDDPINTF, "ULPRX to TPC DDP Interface and FIFO" }, + { F_TPCDISPTOKENFIFO, "TPC Dispatch Token FIFO" }, + { F_TPCDISPCPLFIFO3, "TPC Dispatch CPL FIFO Ch3" }, + { F_TPCDISPCPLFIFO2, "TPC Dispatch CPL FIFO Ch2" }, + { F_TPCDISPCPLFIFO1, "TPC Dispatch CPL FIFO Ch1" }, + { F_TPCDISPCPLFIFO0, "TPC Dispatch CPL FIFO Ch0" }, + { F_URXPLDINTFCRC3, "ULPRX to TPC Payload Interface CRC Error Ch3" }, + { F_URXPLDINTFCRC2, "ULPRX to TPC Payload Interface CRC Error Ch2" }, + { F_URXPLDINTFCRC1, "ULPRX to TPC Payload Interface CRC Error Ch1" }, + { F_URXPLDINTFCRC0, "ULPRX to TPC Payload Interface CRC Error Ch0" }, + { F_DMXDBFIFO, "Demux DB FIFO" }, + { F_DMXDBSRAM, "Demux DB SRAM" }, + { F_DMXCPLFIFO, "Demux CPL FIFO" }, + { F_DMXCPLSRAM, "Demux CPL SRAM" }, + { F_DMXCSUMFIFO, "Demux Checksum FIFO" }, + { F_DMXLENFIFO, "Demux Length FIFO" }, + { F_DMXCHECKFIFO, "Demux Check CRC16 FIFO" }, + { F_DMXWINFIFO, "Demux Winner FIFO" }, + { F_EGTOKENFIFO, "Egress Token FIFO Parity Error" }, + { F_EGDATAFIFO, "Egress FIFO Parity Error" }, + { F_UTX2TPCINTF3, "ULPTX to TPC Interface Parity Error Ch3" }, + { F_UTX2TPCINTF2, "ULPTX to TPC Interface Parity Error Ch2" }, + { F_UTX2TPCINTF1, "ULPTX to TPC Interface Parity Error Ch1" }, + { F_UTX2TPCINTF0, "ULPTX to TPC Interface Parity Error Ch0" }, + { F_LBKTOKENFIFO, "Loopback Token FIFO Parity Error" }, + { F_LBKDATAFIFO, "Loopback FIFO Parity Error" }, + { 0 } + }; static const struct intr_info tp_c_perr_cause = { .name = "TP_C_PERR_CAUSE", .cause_reg = A_TP_C_PERR_CAUSE, .enable_reg = A_TP_C_PERR_ENABLE, .fatal = 0xffffffff, .flags = IHF_FATAL_IFF_ENABLED, - .details = NULL, + .details = tp_c_perr_details, .actions = NULL, }; + static const struct intr_details tp_e_eg_perr_details[] = { + { F_MPSLPBKTOKENFIFO, "MPS Loopback Token FIFO parity error" }, + { F_MPSMACTOKENFIFO, "MPS MAC Token FIFO parity error" }, + { F_DISPIPSECFIFO3, "Ch3 Dispatch IPSec FIFO parity error" }, + { F_DISPTCPFIFO3, "Ch3 Dispatch TCP FIFO parity error" }, + { F_DISPIPFIFO3, "Ch3 Dispatch IP FIFO parity error" }, + { F_DISPETHFIFO3, "Ch3 Dispatch ETH FIFO parity error" }, + { F_DISPGREFIFO3, "Ch3 Dispatch GRE FIFO parity error" }, + { F_DISPCPL5FIFO3, "Ch3 Dispatch CPL5 FIFO parity error" }, + { F_DISPIPSECFIFO2, "Ch2 Dispatch IPSec FIFO parity error" }, + { F_DISPTCPFIFO2, "Ch2 Dispatch TCP FIFO parity error" }, + { F_DISPIPFIFO2, "Ch2 Dispatch IP FIFO parity error" }, + { F_DISPETHFIFO2, "Ch2 Dispatch ETH FIFO parity error" }, + { F_DISPGREFIFO2, "Ch2 Dispatch GRE FIFO parity error" }, + { F_DISPCPL5FIFO2, "Ch2 Dispatch CPL5 FIFO parity error" }, + { F_DISPIPSECFIFO1, "Ch1 Dispatch IPSec FIFO parity error" }, + { F_DISPTCPFIFO1, "Ch1 Dispatch TCP FIFO parity error" }, + { F_DISPIPFIFO1, "Ch1 Dispatch IP FIFO parity error" }, + { F_DISPETHFIFO1, "Ch1 Dispatch ETH FIFO parity error" }, + { F_DISPGREFIFO1, "Ch1 Dispatch GRE FIFO parity error" }, + { F_DISPCPL5FIFO1, "Ch1 Dispatch CPL5 FIFO parity error" }, + { F_DISPIPSECFIFO0, "Ch0 Dispatch IPSec FIFO parity error" }, + { F_DISPTCPFIFO0, "Ch0 Dispatch TCP FIFO parity error" }, + { F_DISPIPFIFO0, "Ch0 Dispatch IP FIFO parity error" }, + { F_DISPETHFIFO0, "Ch0 Dispatch ETH FIFO parity error" }, + { F_DISPGREFIFO0, "Ch0 Dispatch GRE FIFO parity error" }, + { F_DISPCPL5FIFO0, "Ch0 Dispatch CPL5 FIFO parity error" }, + { 0 } + }; static const struct intr_info tp_e_eg_perr_cause = { .name = "TP_E_EG_PERR_CAUSE", .cause_reg = A_TP_E_EG_PERR_CAUSE, .enable_reg = A_TP_E_EG_PERR_ENABLE, .fatal = 0xffffffff, .flags = IHF_FATAL_IFF_ENABLED, - .details = NULL, + .details = tp_e_eg_perr_details, .actions = NULL, }; + static const struct intr_details tp_e_in0_perr_details[] = { + { F_DMXISSFIFO, "Demux ISS FIFO parity error" }, + { F_DMXERRFIFO, "Demux Error FIFO parity error" }, + { F_DMXATTFIFO, "Demux Attributes FIFO parity error" }, + { F_DMXTCPFIFO, "Demux TCP Fields FIFO parity error" }, + { F_DMXMPAFIFO, "Demux MPA FIFO parity error" }, + { F_DMXOPTFIFO, "Demux TCP Options FIFO parity error" }, + { F_INGTOKENFIFO, "Demux Ingress Token FIFO parity error" }, + { F_DMXPLDCHKOVFL1, "Ch1 PLD TxCheck FIFO Overflow" }, + { F_DMXPLDCHKFIFO1, "Ch1 PLD TxCheck FIFO parity error" }, + { F_DMXOPTFIFO1, "Ch1 Options buffer parity error" }, + { F_DMXMPAFIFO1, "Ch1 MPA FIFO parity error" }, + { F_DMXDBFIFO1, "Ch1 DB FIFO parity error" }, + { F_DMXATTFIFO1, "Ch1 Attribute FIFO parity error" }, + { F_DMXISSFIFO1, "Ch1 ISS FIFO parity error" }, + { F_DMXTCPFIFO1, "Ch1 TCP Fields FIFO parity error" }, + { F_DMXERRFIFO1, "Ch1 Error FIFO parity error" }, + { F_MPS2TPINTF1, "Ch1 MPS2TP Interface parity error" }, + { F_DMXPLDCHKOVFL0, "Ch0 PLD TxCheck FIFO Overflow" }, + { F_DMXPLDCHKFIFO0, "Ch0 PLD TxCheck FIFO parity error" }, + { F_DMXOPTFIFO0, "Ch0 Options buffer parity error" }, + { F_DMXMPAFIFO0, "Ch0 MPA FIFO parity error" }, + { F_DMXDBFIFO0, "Ch0 DB FIFO parity error" }, + { F_DMXATTFIFO0, "Ch0 Attribute FIFO parity error" }, + { F_DMXISSFIFO0, "Ch0 ISS FIFO parity error" }, + { F_DMXTCPFIFO0, "Ch0 TCP Fields FIFO parity error" }, + { F_DMXERRFIFO0, "Ch0 Error FIFO parity error" }, + { F_MPS2TPINTF0, "Ch0 MPS2TP Interface parity error" }, + { 0 } + }; static const struct intr_info tp_e_in0_perr_cause = { .name = "TP_E_IN0_PERR_CAUSE", .cause_reg = A_TP_E_IN0_PERR_CAUSE, .enable_reg = A_TP_E_IN0_PERR_ENABLE, .fatal = 0xffffffff, .flags = IHF_FATAL_IFF_ENABLED, - .details = NULL, + .details = tp_e_in0_perr_details, .actions = NULL, }; + static const struct intr_details tp_e_in1_perr_details[] = { + { F_DMXPLDCHKOVFL3, "Ch3 PLD TxCheck FIFO Overflow" }, + { F_DMXPLDCHKFIFO3, "Ch3 PLD TxCheck FIFO parity error" }, + { F_DMXOPTFIFO3, "Ch3 Options buffer parity error" }, + { F_DMXMPAFIFO3, "Ch3 MPA FIFO parity error" }, + { F_DMXDBFIFO3, "Ch3 DB FIFO parity error" }, + { F_DMXATTFIFO3, "Ch3 Attribute FIFO parity error" }, + { F_DMXISSFIFO3, "Ch3 ISS FIFO parity error" }, + { F_DMXTCPFIFO3, "Ch3 TCP Fields FIFO parity error" }, + { F_DMXERRFIFO3, "Ch3 Error FIFO parity error" }, + { F_MPS2TPINTF3, "Ch3 MPS2TP Interface parity error" }, + { F_DMXPLDCHKOVFL2, "Ch2 PLD TxCheck FIFO Overflow" }, + { F_DMXPLDCHKFIFO2, "Ch2 PLD TxCheck FIFO parity error" }, + { F_DMXOPTFIFO2, "Ch2 Options buffer parity error" }, + { F_DMXMPAFIFO2, "Ch2 MPA FIFO parity error" }, + { F_DMXDBFIFO2, "Ch2 DB FIFO parity error" }, + { F_DMXATTFIFO2, "Ch2 Attribute FIFO parity error" }, + { F_DMXISSFIFO2, "Ch2 ISS FIFO parity error" }, + { F_DMXTCPFIFO2, "Ch2 TCP Fields FIFO parity error" }, + { F_DMXERRFIFO2, "Ch2 Error FIFO parity error" }, + { F_MPS2TPINTF2, "Ch2 MPS2TP Interface parity error" }, + { 0 } + }; static const struct intr_info tp_e_in1_perr_cause = { .name = "TP_E_IN1_PERR_CAUSE", .cause_reg = A_TP_E_IN1_PERR_CAUSE, .enable_reg = A_TP_E_IN1_PERR_ENABLE, .fatal = 0xffffffff, .flags = IHF_FATAL_IFF_ENABLED, - .details = NULL, + .details = tp_e_in1_perr_details, .actions = NULL, }; + static const struct intr_details tp_other_perr_details[] = { + { F_DMARBTPERR, "DMARBT MA Rsp Interface parity Error" }, + { F_MMGRCACHEDATASRAM, "TP MMGR Cache Data SRAM" }, + { F_MMGRCACHETAGFIFO, "TP MMGR Cache Tag FIFO" }, + { F_DBL2TLUTPERR, "TP DB Lookup Table" }, + { F_DBTXTIDPERR, "TP DB FIFOs" }, + { F_DBEXTPERR, "TP DB Extended Opcode FIFO" }, + { F_DBOPPERR, "TP DB Opcode FIFO" }, + { F_TMCACHEPERR, "TP TM Cache SRAM" }, + { F_TPPROTOSRAM, "TP Protocol SRAM" }, + { F_HSPSRAM, "HighSpeed SRAM" }, + { F_RATEGRPSRAM, "Rate Group SRAM" }, + { F_TXFBSEQFIFO, "Tx Feedback Sequence Number FIFO" }, + { F_CMDATASRAM, "Cache Data SRAM" }, + { F_CMTAGFIFO, "Cache Tag FIFO" }, + { F_RFCOPFIFO, "RCF Opcode FIFO" }, + { F_DELINVFIFO, "Delete Invalid FIFO" }, + { F_RSSCFGSRAM, "RSS Config or Round-Robin SRAM" }, + { F_RSSKEYSRAM, "RSS Key SRAM" }, + { F_RSSLKPSRAM, "RSS Lookup SRAM" }, + { F_SRQSRAM, "SRQ SRAM" }, + { F_ARPDASRAM, "ARP DA SRAM" }, + { F_ARPSASRAM, "ARP SA SRAM" }, + { F_ARPGRESRAM, "ARP GRE SRAM" }, + { F_ARPIPSECSRAM1, "ARP IPSec SRAM0" }, + { F_ARPIPSECSRAM0, "ARP IPSec SRAM1" }, + { 0 } + }; static const struct intr_info tp_o_perr_cause = { .name = "TP_O_PERR_CAUSE", .cause_reg = A_TP_O_PERR_CAUSE, .enable_reg = A_TP_O_PERR_ENABLE, .fatal = 0xffffffff, .flags = IHF_FATAL_IFF_ENABLED, - .details = NULL, + .details = tp_other_perr_details, .actions = NULL, }; bool fatal; - fatal = t4_handle_intr(adap, &tp_intr_info, 0, flags); if (chip_id(adap) > CHELSIO_T6) { - fatal |= t4_handle_intr(adap, &tp_inic_perr_cause, 0, flags); + tp_intr_info.details = t7_tp_intr_details; + fatal = t4_handle_intr(adap, &tp_intr_info, 0, flags); + fatal |= t4_handle_intr(adap, &tp_cerr_cause, 0, flags); fatal |= t4_handle_intr(adap, &tp_c_perr_cause, 0, flags); fatal |= t4_handle_intr(adap, &tp_e_eg_perr_cause, 0, flags); fatal |= t4_handle_intr(adap, &tp_e_in0_perr_cause, 0, flags); fatal |= t4_handle_intr(adap, &tp_e_in1_perr_cause, 0, flags); fatal |= t4_handle_intr(adap, &tp_o_perr_cause, 0, flags); + } else { + tp_intr_info.details = tp_intr_details; + fatal = t4_handle_intr(adap, &tp_intr_info, 0, flags); } + clear_int_cause_reg(adap, &tp_intr_info, flags); return (fatal); } @@ -5133,16 +5362,86 @@ static bool tp_intr_handler(struct adapter *adap, int arg, int flags) */ static bool sge_intr_handler(struct adapter *adap, int arg, int flags) { + static const struct intr_details sge_int1_details[] = { + { F_PERR_FLM_CREDITFIFO, "SGE FLM credit FIFO parity error" }, + { F_PERR_IMSG_HINT_FIFO, "SGE IMSG hint FIFO parity error" }, + { F_PERR_HEADERSPLIT_FIFO3 | F_PERR_HEADERSPLIT_FIFO2, + "SGE header split FIFO parity error" }, + { F_PERR_PAYLOAD_FIFO3 | F_PERR_PAYLOAD_FIFO2, + "SGE payload FIFO parity error" }, + { F_PERR_PC_RSP, "SGE PC response parity error" }, + { F_PERR_PC_REQ, "SGE PC request parity error" }, + { 0x003c0000, "SGE DBP PC response FIFO parity error" }, + { F_PERR_DMARBT, "SGE DMA RBT parity error" }, + { F_PERR_FLM_DBPFIFO, "SGE FLM DBP FIFO parity error" }, + { F_PERR_FLM_MCREQ_FIFO, "SGE FLM MC request FIFO parity error" }, + { F_PERR_FLM_HINTFIFO, "SGE FLM hint FIFO parity error" }, + { 0x00003c00, "SGE align control FIFO parity error" }, + { 0x000003c0, "SGE EDMA FIFO parity error" }, + { 0x0000003c, "SGE PD FIFO parity error" }, + { F_PERR_ING_CTXT_MIFRSP, "SGE Ingress context MIF response parity error" }, + { F_PERR_EGR_CTXT_MIFRSP, "SGE Egress context MIF response parity error" }, + { 0 } + }; static const struct intr_info sge_int1_info = { .name = "SGE_INT_CAUSE1", .cause_reg = A_SGE_INT_CAUSE1, .enable_reg = A_SGE_INT_ENABLE1, .fatal = 0xffffffff, .flags = IHF_FATAL_IFF_ENABLED, - .details = NULL, + .details = sge_int1_details, .actions = NULL, }; - static const struct intr_info sge_int2_info = { + static const struct intr_details t7_sge_int2_details[] = { + { F_TF_FIFO_PERR, "SGE TF FIFO parity error" }, + { F_PERR_EGR_DBP_TX_COAL, "SGE egress DBP TX coal parity error" }, + { F_PERR_DBP_FL_FIFO, "SGE DBP FL FIFO parity error" }, + { F_DEQ_LL_PERR, "SGE linked list SRAM parity error" }, + { F_ENQ_PERR, "SGE enq tag SRAM parity error" }, + { F_DEQ_OUT_PERR, "SGE tbuf deq output FIFO parity error" }, + { F_BUF_PERR, "SGE tbuf main buffer parity error" }, + { F_PERR_CONM_SRAM, "SGE CONM SRAM parity error" }, + { F_PERR_ISW_IDMA3_FIFO | F_PERR_ISW_IDMA2_FIFO | + F_PERR_ISW_IDMA1_FIFO | F_PERR_ISW_IDMA0_FIFO, + "SGE ISW IDMA FIFO parity error" }, + { F_PERR_ISW_DBP_FIFO, "SGE ISW DBP FIFO parity error" }, + { F_PERR_ISW_GTS_FIFO, "SGE ISW GTS FIFO parity error" }, + { F_PERR_ITP_EVR, "SGE ITP EVR parity error" }, + { F_PERR_FLM_CNTXMEM, "SGE FLM context memory parity error" }, + { F_PERR_FLM_L1CACHE, "SGE FLM L1 cache parity error" }, + { F_SGE_IPP_FIFO_PERR, "SGE IPP FIFO parity error" }, + { F_PERR_DBP_HP_FIFO, "SGE DBP HP FIFO parity error" }, + { F_PERR_DB_FIFO, "SGE doorbell FIFO parity error" }, + { F_PERR_ING_CTXT_CACHE | F_PERR_EGR_CTXT_CACHE, + "SGE context cache parity error" }, + { F_PERR_BASE_SIZE, "SGE base size parity error" }, + { 0 } + }; + static const struct intr_details t6_sge_int2_details[] = { + { F_PERR_DBP_HINT_FL_FIFO, "SGE DBP hint FL FIFO parity error" }, + { F_PERR_EGR_DBP_TX_COAL, "SGE egress DBP TX coal parity error" }, + { F_PERR_DBP_FL_FIFO, "SGE DBP FL FIFO parity error" }, + { F_DEQ_LL_PERR, "SGE tbuf dequeue linked list SRAM parity error" }, + { F_ENQ_PERR, "SGE tbuf enqueue tag SRAM parity error" }, + { F_DEQ_OUT_PERR, "SGE tbuf dequeue output FIFO parity error" }, + { F_BUF_PERR, "SGE tbuf main buffer parity error" }, + { F_PERR_CONM_SRAM, "SGE CONM SRAM parity error" }, + { F_PERR_ISW_IDMA1_FIFO, "SGE ISW IDMA FIFO parity error" }, + { F_PERR_ISW_IDMA0_FIFO, "SGE ISW IDMA FIFO parity error" }, + { F_PERR_ISW_DBP_FIFO, "SGE ISW DBP FIFO parity error" }, + { F_PERR_ISW_GTS_FIFO, "SGE ISW GTS FIFO parity error" }, + { F_PERR_ITP_EVR, "SGE ITP EVR parity error" }, + { F_PERR_FLM_CNTXMEM, "SGE FLM context memory parity error" }, + { F_PERR_FLM_L1CACHE, "SGE FLM L1 cache parity error" }, + { F_PERR_DBP_HINT_FIFO, "SGE DBP hint FIFO parity error" }, + { F_PERR_DBP_HP_FIFO, "SGE DBP high priority FIFO parity error" }, + { F_PERR_DB_FIFO, "SGE DBP merge DB FIFO parity error" }, + { F_PERR_ING_CTXT_CACHE, "SGE ingress context cache parity error" }, + { F_PERR_EGR_CTXT_CACHE, "SGE egress context cache parity error" }, + { F_PERR_BASE_SIZE, "SGE base size parity error" }, + { 0 } + }; + struct intr_info sge_int2_info = { .name = "SGE_INT_CAUSE2", .cause_reg = A_SGE_INT_CAUSE2, .enable_reg = A_SGE_INT_ENABLE2, @@ -5231,16 +5530,105 @@ static bool sge_intr_handler(struct adapter *adap, int arg, int flags) .details = NULL, .actions = NULL, }; + static const struct intr_details sge_int4_details[] = { + { F_ERR_ISHIFT_UR1 | F_ERR_ISHIFT_UR0, "SGE ishift underrun" }, + { F_BAR2_EGRESS_LEN_OR_ADDR_ERR, "SGE BAR2 PL access length or alignment error" }, + { F_ERR_CPL_EXCEED_MAX_IQE_SIZE1 | F_ERR_CPL_EXCEED_MAX_IQE_SIZE0, + "SGE CPL exceeds max IQE size" }, + { F_ERR_WR_LEN_TOO_LARGE3 | F_ERR_WR_LEN_TOO_LARGE2 | + F_ERR_WR_LEN_TOO_LARGE1 | F_ERR_WR_LEN_TOO_LARGE0, + "SGE WR length too large" }, + { F_ERR_LARGE_MINFETCH_WITH_TXCOAL3 | F_ERR_LARGE_MINFETCH_WITH_TXCOAL2 | + F_ERR_LARGE_MINFETCH_WITH_TXCOAL1 | F_ERR_LARGE_MINFETCH_WITH_TXCOAL0, + "SGE invalid MinFetchBurst with TxCoalesce" }, + { F_COAL_WITH_HP_DISABLE_ERR, "SGE coalesce with HP disable error" }, + { F_BAR2_EGRESS_COAL0_ERR, "SGE BAR2 PL access addr offset 0" }, + { F_BAR2_EGRESS_SIZE_ERR, "SGE BAR2 illegal egress QID access" }, + { F_FLM_PC_RSP_ERR, "SGE FLM PC response error" }, + { F_ERR_TH3_MAX_FETCH | F_ERR_TH2_MAX_FETCH | + F_ERR_TH1_MAX_FETCH | F_ERR_TH0_MAX_FETCH, + "SGE max fetch violation" }, + { F_ERR_RX_CPL_PACKET_SIZE1 | F_ERR_RX_CPL_PACKET_SIZE0, + "SGE CPL length mismatch error" }, + { F_ERR_BAD_UPFL_INC_CREDIT3 | F_ERR_BAD_UPFL_INC_CREDIT2 | + F_ERR_BAD_UPFL_INC_CREDIT1 | F_ERR_BAD_UPFL_INC_CREDIT0, + "SGE upfl credit wrap error" }, + { F_ERR_PHYSADDR_LEN0_IDMA1 | F_ERR_PHYSADDR_LEN0_IDMA0, + "SGE CPL_RX_PHYS_ADDR length 0 error" }, + { F_ERR_FLM_INVALID_PKT_DROP1 | F_ERR_FLM_INVALID_PKT_DROP0, + "SGE IDMA packet drop due to invalid FLM context" }, + { F_ERR_UNEXPECTED_TIMER, "SGE unexpected timer error" }, + { 0 } + }; static const struct intr_info sge_int4_info = { .name = "SGE_INT_CAUSE4", .cause_reg = A_SGE_INT_CAUSE4, .enable_reg = A_SGE_INT_ENABLE4, .fatal = 0, .flags = 0, - .details = NULL, + .details = sge_int4_details, .actions = NULL, }; - static const struct intr_info sge_int5_info = { + static const struct intr_details t7_sge_int5_details[] = { + { F_ERR_T_RXCRC, "SGE RxCRC error" }, + { F_PERR_MC_RSPDATA, "SGE MC response data parity error" }, + { F_PERR_PC_RSPDATA, "SGE PC response data parity error" }, + { F_PERR_PD_RDRSPDATA, "SGE PD read response data parity error" }, + { F_PERR_U_RXDATA, "SGE U Rx data parity error" }, + { F_PERR_UD_RXDATA, "SGE UD Rx data parity error" }, + { F_PERR_UP_DATA, "SGE uP data parity error" }, + { F_PERR_CIM2SGE_RXDATA, "SGE CIM2SGE Rx data parity error" }, + { F_PERR_IMSG_PD_FIFO, "SGE IMSG PD FIFO parity error" }, + { F_PERR_ULPTX_FIFO1 | F_PERR_ULPTX_FIFO0, "SGE ULPTX FIFO parity error" }, + { F_PERR_IDMA2IMSG_FIFO3 | F_PERR_IDMA2IMSG_FIFO2 | + F_PERR_IDMA2IMSG_FIFO1 | F_PERR_IDMA2IMSG_FIFO0, + "SGE IDMA2IMSG FIFO parity error" }, + { F_PERR_POINTER_DATA_FIFO3 | F_PERR_POINTER_DATA_FIFO2 | + F_PERR_POINTER_DATA_FIFO1 | F_PERR_POINTER_DATA_FIFO0, + "SGE pointer data FIFO parity error" }, + { F_PERR_POINTER_HDR_FIFO3 | F_PERR_POINTER_HDR_FIFO2 | + F_PERR_POINTER_HDR_FIFO1 | F_PERR_POINTER_HDR_FIFO0, + "SGE pointer header FIFO parity error" }, + { F_PERR_PAYLOAD_FIFO1 | F_PERR_PAYLOAD_FIFO0, + "SGE payload FIFO parity error" }, + { F_PERR_MGT_BAR2_FIFO, "SGE MGT BAR2 FIFO parity error" }, + { F_PERR_HEADERSPLIT_FIFO1 | F_PERR_HEADERSPLIT_FIFO0, + "SGE header split FIFO parity error" }, + { F_PERR_HINT_DELAY_FIFO, "SGE hint delay FIFO parity error" }, + { 0 } + }; + static const struct intr_details t6_sge_int5_details[] = { + { F_ERR_T_RXCRC, "SGE T RxCRC parity error" }, + { F_PERR_MC_RSPDATA, "SGE MC response data parity error" }, + { F_PERR_PC_RSPDATA, "SGE PC response data parity error" }, + { F_PERR_U_RXDATA | F_PERR_UD_RXDATA, "SGE ULP Rx data parity error" }, + { F_PERR_UP_DATA, "SGE uP data parity error" }, + { F_PERR_CIM2SGE_RXDATA, "SGE CIM2SGE Rx data parity error" }, + { F_PERR_HINT_DELAY_FIFO1 | F_PERR_HINT_DELAY_FIFO0, + "SGE hint delay FIFO parity error" }, + { F_PERR_IMSG_PD_FIFO, "SGE IMSG PD FIFO parity error" }, + { F_PERR_ULPTX_FIFO1 | F_PERR_ULPTX_FIFO0, + "SGE ULPTX FIFO parity error" }, + { F_PERR_IDMA2IMSG_FIFO1 | F_PERR_IDMA2IMSG_FIFO0, + "SGE IDMA2IMSG FIFO parity error" }, + { F_PERR_POINTER_DATA_FIFO1 | F_PERR_POINTER_DATA_FIFO0, + "SGE pointer data FIFO parity error" }, + { F_PERR_POINTER_HDR_FIFO1 | F_PERR_POINTER_HDR_FIFO0, + "SGE pointer header FIFO parity error" }, + { F_PERR_PAYLOAD_FIFO1 | F_PERR_PAYLOAD_FIFO0, + "SGE payload FIFO parity error" }, + { F_PERR_EDMA_INPUT_FIFO3 | F_PERR_EDMA_INPUT_FIFO2 | + F_PERR_EDMA_INPUT_FIFO1 | F_PERR_EDMA_INPUT_FIFO0, + "SGE EDMA input FIFO parity error" }, + { F_PERR_MGT_BAR2_FIFO, "SGE MGT BAR2 FIFO parity error" }, + { F_PERR_HEADERSPLIT_FIFO1 | F_PERR_HEADERSPLIT_FIFO0, + "SGE header split FIFO parity error" }, + { F_PERR_CIM_FIFO1 | F_PERR_CIM_FIFO0, "SGE CIM FIFO parity error" }, + { F_PERR_IDMA_SWITCH_OUTPUT_FIFO1 | F_PERR_IDMA_SWITCH_OUTPUT_FIFO0, + "SGE IDMA switch output FIFO parity error" }, + { 0 } + }; + struct intr_info sge_int5_info = { .name = "SGE_INT_CAUSE5", .cause_reg = A_SGE_INT_CAUSE5, .enable_reg = A_SGE_INT_ENABLE5, @@ -5249,31 +5637,94 @@ static bool sge_intr_handler(struct adapter *adap, int arg, int flags) .details = NULL, .actions = NULL, }; + static const struct intr_details sge_int6_details[] = { + /* T7+ */ + { 0xe0000000, "SGE fatal DEQ0 DRDY error" }, + { 0x1c000000, "SGE fatal OUT0 DRDY error" }, + { F_IMSG_DBG3_STUCK | F_IMSG_DBG2_STUCK | + F_IMSG_DBG1_STUCK | F_IMSG_DBG0_STUCK, + "SGE IMSG stuck due to insufficient credits" }, + /* T6 + */ + { F_ERR_DB_SYNC, "SGE doorbell sync failed" }, + { F_ERR_GTS_SYNC, "SGE GTS sync failed" }, + { F_FATAL_LARGE_COAL, "SGE BAR2 payload too large" }, + { F_PL_BAR2_FRM_ERR, "SGE BAR2 framing error" }, + { F_SILENT_DROP_TX_COAL, "SGE silent drop of Tx coal WR" }, + { F_ERR_INV_CTXT4, "SGE context access for invalid queue thread 4" }, + { F_ERR_BAD_DB_PIDX4, "SGE doorbell pidx too large thread 4" }, + { F_ERR_BAD_UPFL_INC_CREDIT4, "SGE upfl credit wrap thread 4" }, + { F_FATAL_TAG_MISMATCH, "SGE doorbell tag mismatch" }, + { F_FATAL_ENQ_CTL_RDY, "SGE enq_ctl_fifo overflow" }, + { F_ERR_PC_RSP_LEN3 | F_ERR_PC_RSP_LEN2 | + F_ERR_PC_RSP_LEN1 | F_ERR_PC_RSP_LEN0, + "SGE PCIe response error for DBP threads" }, + { F_FATAL_ENQ2LL_VLD, "SGE tbuf fatal_enq2ll_vld" }, + { F_FATAL_LL_EMPTY, "SGE tbuf fatal_ll_empty" }, + { F_FATAL_OFF_WDENQ, "SGE tbuf fatal_off_wdenq" }, + { 0x00000018, "SGE tbuf fatal_deq1_drdy" }, + { 0x00000006, "SGE tbuf fatal_out1_drdy" }, + { F_FATAL_DEQ, "SGE tbuf fatal_deq" }, + { 0 } + }; static const struct intr_info sge_int6_info = { .name = "SGE_INT_CAUSE6", .cause_reg = A_SGE_INT_CAUSE6, .enable_reg = A_SGE_INT_ENABLE6, .fatal = 0, .flags = 0, - .details = NULL, + .details = sge_int6_details, .actions = NULL, }; + static const struct intr_details sge_int7_details[] = { + { F_HINT_FIFO_FULL, "SGE hint FIFO full" }, + { F_CERR_HINT_DELAY_FIFO, "SGE hint delay FIFO ECC error" }, + { F_COAL_TIMER_FIFO_PERR, "SGE coalescing timer FIFO parity error" }, + { F_CMP_FIFO_PERR, "SGE CMP FIFO parity error" }, + { F_SGE_IPP_FIFO_CERR, "SGE IPP FIFO ECC error" }, + { F_CERR_ING_CTXT_CACHE | F_CERR_EGR_CTXT_CACHE, + "SGE context cache ECC error" }, + { F_IMSG_CNTX_PERR, "SGE IMSG context parity error" }, + { F_PD_FIFO_PERR, "SGE PD FIFO parity error" }, + { F_IMSG_512_FIFO_PERR, "SGE IMSG 512 FIFO parity error" }, + { F_CPLSW_FIFO_PERR, "SGE CPLSW FIFO parity error" }, + { F_IMSG_FIFO_PERR, "SGE IMSG FIFO parity error" }, + { F_CERR_ITP_EVR, "SGE ITP EVR ECC error" }, + { F_CERR_CONM_SRAM, "SGE CONM SRAM ECC error" }, + { F_CERR_FLM_CNTXMEM, "SGE FLM context memory ECC error" }, + { F_CERR_FUNC_QBASE, "SGE function queue base ECC error" }, + { F_IMSG_CNTX_CERR, "SGE IMSG context ECC error" }, + { F_PD_FIFO_CERR, "SGE PD FIFO ECC error" }, + { F_IMSG_512_FIFO_CERR, "SGE IMSG 512 FIFO ECC error" }, + { F_CPLSW_FIFO_CERR, "SGE CPLSW FIFO ECC error" }, + { F_IMSG_FIFO_CERR, "SGE IMSG FIFO ECC error" }, + { 0x0000001e, "SGE header split FIFO ECC error" }, // Bits 4:1 + { F_CERR_FLM_L1CACHE, "SGE FLM L1 cache ECC error" }, + { 0 } + }; static const struct intr_info sge_int7_info = { .name = "SGE_INT_CAUSE7", .cause_reg = A_SGE_INT_CAUSE7, .enable_reg = A_SGE_INT_ENABLE7, .fatal = 0, .flags = 0, - .details = NULL, + .details = sge_int7_details, .actions = NULL, }; + static const struct intr_details sge_int8_details[] = { + { F_TRACE_RXPERR, "SGE trace packet parity error" }, + { F_U3_RXPERR | F_U2_RXPERR | F_U1_RXPERR | F_U0_RXPERR, + "SGE ULP interface parity error" }, + { F_T3_RXPERR | F_T2_RXPERR | F_T1_RXPERR | F_T0_RXPERR, + "SGE TP interface parity error" }, + { 0 } + }; static const struct intr_info sge_int8_info = { .name = "SGE_INT_CAUSE8", .cause_reg = A_SGE_INT_CAUSE8, .enable_reg = A_SGE_INT_ENABLE8, .fatal = 0, .flags = 0, - .details = NULL, + .details = sge_int8_details, .actions = NULL, }; bool fatal; @@ -5281,8 +5732,14 @@ static bool sge_intr_handler(struct adapter *adap, int arg, int flags) if (chip_id(adap) <= CHELSIO_T5) { sge_int3_info.details = sge_int3_details; + } else if (chip_id(adap) == CHELSIO_T6) { + sge_int3_info.details = t6_sge_int3_details; + sge_int2_info.details = t6_sge_int2_details; + sge_int5_info.details = t6_sge_int5_details; } else { sge_int3_info.details = t6_sge_int3_details; + sge_int2_info.details = t7_sge_int2_details; + sge_int5_info.details = t7_sge_int5_details; } fatal = false; @@ -5316,6 +5773,19 @@ static bool sge_intr_handler(struct adapter *adap, int arg, int flags) */ static bool cim_intr_handler(struct adapter *adap, int arg, int flags) { + static const struct intr_details cim_host_t7_intr_details[] = { + { F_CORE7ACCINT, "CIM slave core 7 access interrupt "}, + { F_CORE6ACCINT, "CIM slave core 6 access interrupt "}, + { F_CORE5ACCINT, "CIM slave core 5 access interrupt "}, + { F_CORE4ACCINT, "CIM slave core 4 access interrupt "}, + { F_CORE3ACCINT, "CIM slave core 3 access interrupt "}, + { F_CORE2ACCINT, "CIM slave core 2 access interrupt "}, + { F_CORE1ACCINT, "CIM slave core 1 access interrupt "}, + { F_TIMER1INT, "CIM TIMER0 interrupt" }, + { F_TIMER0INT, "CIM TIMER0 interrupt" }, + { F_PREFDROPINT, "CIM control register prefetch drop" }, + { 0} + }; static const struct intr_details cim_host_intr_details[] = { /* T6+ */ { F_PCIE2CIMINTFPARERR, "CIM IBQ PCIe interface parity error" }, @@ -5328,8 +5798,8 @@ static bool cim_intr_handler(struct adapter *adap, int arg, int flags) { F_SGE2CIMINTFPARERR, "CIM IBQ SGE interface parity error" }, { F_ULP2CIMINTFPARERR, "CIM IBQ ULP_TX interface parity error" }, { F_TP2CIMINTFPARERR, "CIM IBQ TP interface parity error" }, - { F_OBQSGERX1PARERR, "CIM OBQ SGE1_RX parity error" }, - { F_OBQSGERX0PARERR, "CIM OBQ SGE0_RX parity error" }, + { F_OBQSGERX1PARERR, "CIM OBQ PCIE_RX parity error" }, + { F_OBQSGERX0PARERR, "CIM OBQ SGE_RX parity error" }, /* T4+ */ { F_TIEQOUTPARERRINT, "CIM TIEQ outgoing FIFO parity error" }, @@ -5354,16 +5824,17 @@ static bool cim_intr_handler(struct adapter *adap, int arg, int flags) { F_PREFDROPINT, "CIM control register prefetch drop" }, { 0} }; - static const struct intr_info cim_host_intr_info = { + struct intr_info cim_host_intr_info = { .name = "CIM_HOST_INT_CAUSE", .cause_reg = A_CIM_HOST_INT_CAUSE, .enable_reg = A_CIM_HOST_INT_ENABLE, .fatal = 0x007fffe6, .flags = IHF_FATAL_IFF_ENABLED, - .details = cim_host_intr_details, + .details = NULL, .actions = NULL, }; static const struct intr_details cim_host_upacc_intr_details[] = { + { F_CONWRERRINT, "CIM condition write error "}, { F_EEPROMWRINT, "CIM EEPROM came out of busy state" }, { F_TIMEOUTMAINT, "CIM PIF MA timeout" }, { F_TIMEOUTINT, "CIM PIF timeout" }, @@ -5423,18 +5894,54 @@ static bool cim_intr_handler(struct adapter *adap, int arg, int flags) .details = NULL, .actions = NULL, }; + static const struct intr_details cim_perr_cause_details[] = { + { F_T7_MA_CIM_INTFPERR, "MA2CIM interface parity error" }, + { F_T7_MBHOSTPARERR, "Mailbox Host Read parity error" }, + { F_MAARBINVRSPTAG, "MA Arbiter Invalid Response Tag (Fatal)" }, + { F_MAARBFIFOPARERR, "MA Arbiter FIFO Parity Error" }, + { F_SEMSRAMPARERR, "Semaphore logic SRAM Parity Error" }, + { F_RSACPARERR, "RSA Code SRAM Parity Error" }, + { F_RSADPARERR, "RSA Data SRAM Parity Error" }, + { F_T7_PLCIM_MSTRSPDATAPARERR, "PL2CIM Master response data parity error" }, + { F_T7_PCIE2CIMINTFPARERR, "IBQ PCIE intf parity error" }, + { F_T7_NCSI2CIMINTFPARERR, "IBQ NCSI intf parity error" }, + { F_T7_SGE2CIMINTFPARERR, "IBQ SGE Intf Parity error" }, + { F_T7_ULP2CIMINTFPARERR, "IBQ ULP_TX intf parity error" }, + { F_T7_TP2CIMINTFPARERR, "IBQ TP intf parity error" }, + { F_CORE7PARERR, "Slave Core7 parity error" }, + { F_CORE6PARERR, "Slave Core6 parity error" }, + { F_CORE5PARERR, "Slave Core5 parity error" }, + { F_CORE4PARERR, "Slave Core4 parity error" }, + { F_CORE3PARERR, "Slave Core3 parity error" }, + { F_CORE2PARERR, "Slave Core2 parity error" }, + { F_CORE1PARERR, "Slave Core1 parity error" }, + { F_GFTPARERR, "GFT block Memory parity error" }, + { F_MPSRSPDATAPARERR, "MPS lookup interface Response parity error" }, + { F_ER_RSPDATAPARERR, "Expansion ROM/Flash Interface Response Parity Error" }, + { F_FLOWFIFOPARERR, "SGE FlowID Prefetch FIFO Parity Error" }, + { F_OBQSRAMPARERR, "OBQ SRAM Parity Error" }, + { F_TIEQOUTPARERR, "TIE Queue Outgoing FIFO parity error" }, + { F_TIEQINPARERR, "TIE Queue Incoming FIFO parity error" }, + { F_PIFRSPPARERR, "PIF Response interface FIFO Parity error" }, + { F_PIFREQPARERR, "PIF Request interface FIFO Parity error" }, + { 0 } + }; static const struct intr_info cim_perr_cause = { .name = "CIM_PERR_CAUSE", .cause_reg = A_CIM_PERR_CAUSE, .enable_reg = A_CIM_PERR_ENABLE, .fatal = 0xffffffff, .flags = IHF_FATAL_IFF_ENABLED, - .details = NULL, + .details = cim_perr_cause_details, .actions = NULL, }; u32 val, fw_err; bool fatal; + if (chip_id(adap) >= CHELSIO_T7) + cim_host_intr_info.details = cim_host_t7_intr_details; + else + cim_host_intr_info.details = cim_host_intr_details; /* * When the Firmware detects an internal error which normally wouldn't * raise a Host Interrupt, it forces a CIM Timer0 interrupt in order @@ -5477,62 +5984,237 @@ static bool ulprx_intr_handler(struct adapter *adap, int arg, int flags) { 0x007fffff, "ULPRX parity error" }, { 0 } }; - static const struct intr_info ulprx_intr_info = { + static const struct intr_details t6_ulprx_int_cause_details[] = { + { F_SE_CNT_MISMATCH_1, "SE count mismatch in channel1" }, + { F_SE_CNT_MISMATCH_0, "SE count mismatch in channel 0" }, + { F_CAUSE_CTX_1, "Context access error on channel 1" }, + { F_CAUSE_CTX_0, "Context access error on channel 0" }, + { F_CAUSE_FF, "filp-flop based fifos" }, + { F_CAUSE_APF_1, "Arb prefetch memory, channel 1" }, + { F_CAUSE_APF_0, "Arb prefetch memory, channel 0" }, + { F_CAUSE_AF_1, "Arb fetch memory, channel 1" }, + { F_CAUSE_AF_0, "Arb fetch memory, channel 0" }, + { F_CAUSE_DDPDF_1, "ddp_data_fifo Fifo, channel 1" }, + { F_CAUSE_DDPMF_1, "ddp_msg_fifo Fifo, channel 1" }, + { F_CAUSE_MEMRF_1, "mem_req_fifo_d Fifo, channel 1" }, + { F_CAUSE_PRSDF_1, "prsr_data_fifo Fifo, channel 1" }, + { F_CAUSE_DDPDF_0, "ddp_data_fifo Fifo, channel 0" }, + { F_CAUSE_DDPMF_0, "ddp_msg_fifo Fifo, channel 0" }, + { F_CAUSE_MEMRF_0, "mem_req_fifo_d Fifo, channel 0" }, + { F_CAUSE_PRSDF_0, "prsr_data_fifo Fifo, channel 0" }, + { F_CAUSE_PCMDF_1, "Pcmd Fifo, channel 1" }, + { F_CAUSE_TPTCF_1, "tpt_ctl_fifo Fifo, channel 1" }, + { F_CAUSE_DDPCF_1, "ddp_ctl_fifo Fifo, channel 1" }, + { F_CAUSE_MPARF_1, "mpar_ctl_fifo Fifo, channel 1" }, + { F_CAUSE_MPARC_1, "mpac_ctl_fifo Fifo, channel 1" }, + { F_CAUSE_PCMDF_0, "Pcmd Fifo, channel 0" }, + { F_CAUSE_TPTCF_0, "tpt_ctl_fifo Fifo, channel 0" }, + { F_CAUSE_DDPCF_0, "ddp_ctl_fifo Fifo, channel 0" }, + { F_CAUSE_MPARF_0, "mpar_ctl_fifo Fifo, channel 0" }, + { F_CAUSE_MPARC_0, "mpac_ctl_fifo Fifo, channel 0" }, + { 0 } + }; + static const struct intr_details t7_ulprx_int_cause_details[] = { + { F_CERR_PCMD_FIFO_3, "PCMD FIFO correctable Error3" }, + { F_CERR_PCMD_FIFO_2, "PCMD FIFO correctable Error2" }, + { F_CERR_PCMD_FIFO_1, "PCMD FIFO correctable Error1" }, + { F_CERR_PCMD_FIFO_0, "PCMD FIFO correctable Error0" }, + { F_CERR_DATA_FIFO_3, "DDP Data FIFO correctable Error3" }, + { F_CERR_DATA_FIFO_2, "DDP Data FIFO correctable Error2" }, + { F_CERR_DATA_FIFO_1, "DDP Data FIFO correctable Error1" }, + { F_CERR_DATA_FIFO_0, "DDP Data FIFO correctable Error0" }, + { F_SE_CNT_MISMATCH_3, "SE count mismatch in channel3" }, + { F_SE_CNT_MISMATCH_2, "SE count mismatch in channel2" }, + { F_T7_SE_CNT_MISMATCH_1, "SE count mismatch in channel1" }, + { F_T7_SE_CNT_MISMATCH_0, "SE count mismatch in channel 0" }, + { F_T7_ENABLE_CTX_3, "Context access error on channel 3" }, + { F_T7_ENABLE_CTX_2, "Context access error on channel 2" }, + { F_T7_ENABLE_CTX_1, "Context access error on channel 1" }, + { F_T7_ENABLE_CTX_0, "Context access error on channel 0" }, + { F_T7_ENABLE_ALN_SDC_ERR_3, "SDC error reported by aligner in channel3" }, + { F_T7_ENABLE_ALN_SDC_ERR_2, "SDC error reported by aligner in channel2" }, + { F_T7_ENABLE_ALN_SDC_ERR_1, "SDC error reported by aligner in channel1" }, + { F_T7_ENABLE_ALN_SDC_ERR_0, "SDC error reported by aligner in channel0" }, + { 0 } + }; + struct intr_info ulprx_intr_info = { .name = "ULP_RX_INT_CAUSE", .cause_reg = A_ULP_RX_INT_CAUSE, .enable_reg = A_ULP_RX_INT_ENABLE, .fatal = 0x07ffffff, .flags = IHF_FATAL_IFF_ENABLED, - .details = ulprx_intr_details, + .details = NULL, .actions = NULL, }; + static const struct intr_details ulprx_int_cause_2_details[] = { + { F_ULPRX2MA_INTFPERR, "SDC error reported by ULPRX2MA interface parity checker" }, + { F_ALN_SDC_ERR_1, "SDC error reported by aligner in channel 1" }, + { F_ALN_SDC_ERR_0, "SDC error reported by aligner in channel 0" }, + { F_PF_UNTAGGED_TPT_1, "Parity error from Untagged TPT prefetch fifo channel 1" }, + { F_PF_UNTAGGED_TPT_0, "Parity error from Untagged TPT prefetch fifo channel 0" }, + { F_PF_PBL_1, "Parity error from PBL prefetch fifo channel 1" }, + { F_PF_PBL_0, "Parity error from PBL prefetch fifo channel 0" }, + { F_DDP_HINT_1, "DDP hint fifo Perr in channel 1" }, + { F_DDP_HINT_0, "DDP hint fifo Perr in channel 0" }, + { 0 } + }; static const struct intr_info ulprx_intr2_info = { .name = "ULP_RX_INT_CAUSE_2", .cause_reg = A_ULP_RX_INT_CAUSE_2, .enable_reg = A_ULP_RX_INT_ENABLE_2, .fatal = 0, .flags = 0, - .details = NULL, + .details = ulprx_int_cause_2_details, .actions = NULL, }; + static const struct intr_details ulprx_int_cause_pcmd_details[] = { + { F_CAUSE_PCMD_SFIFO_3, "Small FIFOs, channel 3" }, + { F_CAUSE_PCMD_FIFO_3, "pcmd_ctl_fifo, channel 3" }, + { F_CAUSE_PCMD_DDP_HINT_3, "ddp_hint_ctl_fifo FIFO, channel 3" }, + { F_CAUSE_PCMD_TPT_3, "tpt_ctl_fifo FIFO, channel 3" }, + { F_CAUSE_PCMD_DDP_3, "ddp_ctl_fifo FIFO, channel 3" }, + { F_CAUSE_PCMD_MPAR_3, "mpar_ctl_fifo FIFO, channel 3" }, + { F_CAUSE_PCMD_MPAC_3, "mpac_ctl_fifo FIFO, channel 3" }, + { F_CAUSE_PCMD_SFIFO_2, "Small FIFOs, channel 2" }, + { F_CAUSE_PCMD_FIFO_2, "pcmd_ctl_fifo, channel 2" }, + { F_CAUSE_PCMD_DDP_HINT_2, "ddp_hint_ctl_fifo FIFO, channel 2" }, + { F_CAUSE_PCMD_TPT_2, "tpt_ctl_fifo FIFO, channel 2" }, + { F_CAUSE_PCMD_DDP_2, "ddp_ctl_fifo FIFO, channel 2" }, + { F_CAUSE_PCMD_MPAR_2, "mpar_ctl_fifo FIFO, channel 2" }, + { F_CAUSE_PCMD_MPAC_2, "mpac_ctl_fifo FIFO, channel 2" }, + { F_CAUSE_PCMD_SFIFO_1, "Small FIFOs, channel 1" }, + { F_CAUSE_PCMD_FIFO_1, "pcmd_ctl_fifo, channel 1" }, + { F_CAUSE_PCMD_DDP_HINT_1, "ddp_hint_ctl_fifo FIFO, channel 1" }, + { F_CAUSE_PCMD_TPT_1, "tpt_ctl_fifo FIFO, channel 1" }, + { F_CAUSE_PCMD_DDP_1, "ddp_ctl_fifo FIFO, channel 1" }, + { F_CAUSE_PCMD_MPAR_1, "mpar_ctl_fifo FIFO, channel 1" }, + { F_CAUSE_PCMD_MPAC_1, "mpac_ctl_fifo FIFO, channel 1" }, + { F_CAUSE_PCMD_SFIFO_0, "Small FIFOs, channel 0" }, + { F_CAUSE_PCMD_FIFO_0, "pcmd_ctl_fifo, channel 0" }, + { F_CAUSE_PCMD_DDP_HINT_0, "ddp_hint_ctl_fifo FIFO, channel 0" }, + { F_CAUSE_PCMD_TPT_0, "tpt_ctl_fifo FIFO, channel 0" }, + { F_CAUSE_PCMD_DDP_0, "ddp_ctl_fifo FIFO, channel 0" }, + { F_CAUSE_PCMD_MPAR_0, "mpar_ctl_fifo FIFO, channel 0" }, + { F_CAUSE_PCMD_MPAC_0, "mpac_ctl_fifo FIFO, channel 0" }, + { 0 } + }; static const struct intr_info ulprx_int_cause_pcmd = { .name = "ULP_RX_INT_CAUSE_PCMD", .cause_reg = A_ULP_RX_INT_CAUSE_PCMD, .enable_reg = A_ULP_RX_INT_ENABLE_PCMD, .fatal = 0, .flags = 0, - .details = NULL, + .details = ulprx_int_cause_pcmd_details, .actions = NULL, }; + static const struct intr_details ulprx_int_cause_data_details[] = { + { F_CAUSE_DATA_SNOOP_3, "Snoop FIFO, channel 3" }, + { F_CAUSE_DATA_SFIFO_3, "Small FIFO, channel 3" }, + { F_CAUSE_DATA_FIFO_3, "data_ctl_fifo FIFO, channel 3" }, + { F_CAUSE_DATA_DDP_3, "ddp_ctl_fifo FIFO, channel 3" }, + { F_CAUSE_DATA_CTX_3, "ctx_ctl_fifo FIFO, channel 3" }, + { F_CAUSE_DATA_PARSER_3, "parser_ctl_fifo FIFO, channel 3" }, + { F_CAUSE_DATA_SNOOP_2, "Snoop FIFO, channel 2" }, + { F_CAUSE_DATA_SFIFO_2, "Small FIFO, channel 2" }, + { F_CAUSE_DATA_FIFO_2, "data_ctl_fifo FIFO, channel 2" }, + { F_CAUSE_DATA_DDP_2, "ddp_ctl_fifo FIFO, channel 2" }, + { F_CAUSE_DATA_CTX_2, "ctx_ctl_fifo FIFO, channel 2" }, + { F_CAUSE_DATA_PARSER_2, "parser_ctl_fifo FIFO, channel 2" }, + { F_CAUSE_DATA_SNOOP_1, "Snoop FIFO, channel 1" }, + { F_CAUSE_DATA_SFIFO_1, "Small FIFO, channel 1" }, + { F_CAUSE_DATA_FIFO_1, "data_ctl_fifo FIFO, channel 1" }, + { F_CAUSE_DATA_DDP_1, "ddp_ctl_fifo FIFO, channel 1" }, + { F_CAUSE_DATA_CTX_1, "ctx_ctl_fifo FIFO, channel 1" }, + { F_CAUSE_DATA_PARSER_1, "parser_ctl_fifo FIFO, channel 1" }, + { F_CAUSE_DATA_SNOOP_0, "Snoop FIFO, channel 0" }, + { F_CAUSE_DATA_SFIFO_0, "Small FIFO, channel 0" }, + { F_CAUSE_DATA_FIFO_0, "data_ctl_fifo FIFO, channel 0" }, + { F_CAUSE_DATA_DDP_0, "ddp_ctl_fifo FIFO, channel 0" }, + { F_CAUSE_DATA_CTX_0, "ctx_ctl_fifo FIFO, channel 0" }, + { F_CAUSE_DATA_PARSER_0, "parser_ctl_fifo FIFO, channel 0" }, + { 0 } + }; static const struct intr_info ulprx_int_cause_data = { .name = "ULP_RX_INT_CAUSE_DATA", .cause_reg = A_ULP_RX_INT_CAUSE_DATA, *** 1717 LINES SKIPPED *** From nobody Thu May 28 19:50:10 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRHCC2twJz6f0V3 for ; Thu, 28 May 2026 19:50: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRHCC1sk0z4HCq for ; Thu, 28 May 2026 19:50:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779997815; 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=MG+JJ+R3Ulr831Nh/7wlxunxDxECkntNm9KpAwmPrBo=; b=vc/KRlKIaoad9xgd1Meu3dk7GvmXl44YPVtmsOLsJZBvIf5BYfERsmaPp5jzBcMVdOrHoc Bz/c6soX3KFDHioJPSi0kXCLt1LwvaYYOs1dd+jRipfK8DHelUPxi8Yc2Gl78kaglLzrN9 UsCMWKb9HOGm1P5Gk9vgC3sNjYaMiALFFI6QoCNljE1R6XY02zoQ138PfV3z90soNcCiti Hz7SxuiAHQ48WmdBjjLHRvYdFfCVXM8Lkha0s0BvYsQfgo0BWVYL6T87BtjakF6w9KE+3Y iOxuCb62RjbsmQjP2KkVfrqxAgYYAUpELBdZNEf/uR39F4VemdkOGVa6gYFthw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779997815; a=rsa-sha256; cv=none; b=lTVK8q5MRsxmt1iQE8mPwYWoO7kG1tTNcPJswEzBOCRYrLGl1/SRVAzuIbkn8eXdmQvhNu vCd51ZG7FUARv1hEhd6lr2P5BcLfknA1Zf80AFetWyF8lBp+IW7vXfm7wbraqkRg9Pxd5T vCTcBKRGpba14X77/wU00dNoQOK+9i1ZbGFQCJui6ZPfzvpuoZzD38TDPWPNhfoWVRcXPx lDB2DzcqTGTavnBReRLki7AHRq2K8bkfMdhlKKmqmzntbPpzYUFK5UdxwQ0WSwUGAVFNG/ hnwVvAX+vdE30jkm3dET/VTV0KZ/1o7bnM/mDK1tErHKH6fCQAl5x+Gg2kckYA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779997815; 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=MG+JJ+R3Ulr831Nh/7wlxunxDxECkntNm9KpAwmPrBo=; b=Aa+uFK/WgN/0E/L91ZwyuXea2Rww60/qtWb+ejMmvfusTrdDKhjAlQNYtHaJIeZdZglfT0 CGBq5sxo64Hstz20yaGTSTpM2y+9s6x5EET3fEPRQZbz084NPTnjBjashkUEoy70rOebFA uH0EczLHEKq+gsjyOyrwl7ukSLW4vg7T6pYXG7TGb5I4tRos0pNpSyRcKsXh3jemErPYH2 s7gpQaGKtVi7jhXNAwGGEs7vvZq73/SedoLg0zrMwORZ/uWRW6sFcW5LnouGu6xR7yvC47 qYJ70FGWkvcw9ZwuTpuapqtUQT89WCh5lf/q6Coix51b7HkuFJGJn+7AdgABdQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRHCC1DZwz10sn for ; Thu, 28 May 2026 19:50:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 24675 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 19:50:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: YAO, Xin From: Pouria Mousavizadeh Tehrani Subject: git: 30c85b7cb9fc - main - linuxulator: return EBADF for O_PATH mmap() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pouria X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 30c85b7cb9fc52492f2b3a3ae4e0b16ed717c58a Auto-Submitted: auto-generated Date: Thu, 28 May 2026 19:50:10 +0000 Message-Id: <6a189c72.24675.5cfb4a79@gitrepo.freebsd.org> The branch main has been updated by pouria: URL: https://cgit.FreeBSD.org/src/commit/?id=30c85b7cb9fc52492f2b3a3ae4e0b16ed717c58a commit 30c85b7cb9fc52492f2b3a3ae4e0b16ed717c58a Author: YAO, Xin AuthorDate: 2026-05-07 06:39:16 +0000 Commit: Pouria Mousavizadeh Tehrani CommitDate: 2026-05-28 19:47:04 +0000 linuxulator: return EBADF for O_PATH mmap() This fixes LTP open13, which expects O_PATH mmap() to fail with EBADF, but FreeBSD returned EACCES. Signed-off-by: YAO, Xin PR: 295571 Reviewed by: kib Pull-Request: https://github.com/freebsd/freebsd-src/pull/2233 --- sys/compat/linux/linux_mmap.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/compat/linux/linux_mmap.c b/sys/compat/linux/linux_mmap.c index a8e790a29da4..9fecb6ebb2ad 100644 --- a/sys/compat/linux/linux_mmap.c +++ b/sys/compat/linux/linux_mmap.c @@ -63,6 +63,10 @@ static int linux_mmap_check_fp(struct file *fp, int flags, int prot, int maxprot) { + /* Linux returns EBADF if mmap() is called on an O_PATH file descriptor */ + if (fp->f_ops == &path_fileops) + return (EBADF); + /* Linux mmap() just fails for O_WRONLY files */ if ((fp->f_flag & FREAD) == 0) return (EACCES); From nobody Thu May 28 19:50:16 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRHCF0km2z6f0kN for ; Thu, 28 May 2026 19:50: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRHCD4wzgz4HWd for ; Thu, 28 May 2026 19:50:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779997816; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cyXlzvbAa+VZJbtIZvJLNGUFUP3lzqwgnqWEpkje5dI=; b=Pc2AtVl0wzVNq995Y3C4kPY5QjlZG5GYgIwdIcHmzRYEM46t7s14t445ND9zyqzwko17rh QWXTDfKM2CpFMSOtL5RJfHsC3O4q4CQ3w13epr3jpSYsi2d76jgFwM/q/2UNpB9Z0EB4Lx Rs+/8m2Gjhq8jQ2X9sPAZMwwhs/L9RUroU1Q0LRqyvQRgDdJqVTn7zEgFD89mONNvtHAxh jT+J9O5tqOinIuMGthEOwj9iPvj8eDD4L3qZtnuE9yJy1dprwxuBCV9c276+L5CQ5q8ujq Tvhwyv+meenWOru+dz2PgQr37/XFSDac0ZV1rJavdQgWPHR3m/GNqUPSDDzaCw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779997816; a=rsa-sha256; cv=none; b=AGVg5s73427CBYCbzfuTRDCpZncBiw7mYbCMfW5YApPWwkaNO7fqXteq/36J9Y6kEep2NH wSBUe+ZQMV/faNL5/u/p2KBnabibStxbcQ1ibVhRnN/+NVXcusdfhYlAgpeGN7fAhJV2Hj acev3ATYitKKlAeNUwMIXGIaa7YQAgzjpbAoUdJ3jdsfV9QNaUjgvedzj2CU5hvI2aj0Tc gKAAw0WHGJJ1NSmBa0T0+5S6o0VdaKFxxaAapSiSS9n2qEpxYVG/aM9feJ4PFR5SEU22Be mtQYNH9kKZnET2fJ27vgs/3Hg6M1KfFvRehapT+1Q8BplEUUXQOyaM1EzwzO/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779997816; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cyXlzvbAa+VZJbtIZvJLNGUFUP3lzqwgnqWEpkje5dI=; b=Di/6oFwOWaNnwFaZoWz3eVvpT9yKaCkjWnys06VDXw4dyYSV7BLUy1VicrIRXPz8AEqHK2 d12ymsLvx/MSMhWvP17JQcwNShPm34EvtW/jMk2PAmzXf3YBJv0xypgFNIuRTtB4KjMF5A MKgmzQpVCtKy6xVdf6rwsOqfAJjIDBX1GpV8UdRoo8tp+NWWlWH0O1nRGyq1kWylApDrdb DkNPOHvnEMO/H/1BTDZ7qgscShG192cIUT7lAX7qb3rOpFNSyfdMfAmw7pkIFxLMP9XwqO oQAQpCW7eG54JPvh2qlQeFIPkHnSImPUeeOyhr/nTQH1JUgt3dIgFaCZVWRcZA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRHCD4CJQz10sp for ; Thu, 28 May 2026 19:50:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 23f6c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 19:50:16 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: 774543072db4 - main - LinuxKPI: migrate key data access to functions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 774543072db4949a4177ad4bbdac9fb712bc86f6 Auto-Submitted: auto-generated Date: Thu, 28 May 2026 19:50:16 +0000 Message-Id: <6a189c78.23f6c.2aa49b96@gitrepo.freebsd.org> The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=774543072db4949a4177ad4bbdac9fb712bc86f6 commit 774543072db4949a4177ad4bbdac9fb712bc86f6 Author: Adrian Chadd AuthorDate: 2026-05-28 19:49:31 +0000 Commit: Adrian Chadd CommitDate: 2026-05-28 19:50:12 +0000 LinuxKPI: migrate key data access to functions * Migrate the k->wk_key and k->wk_keylen access to the new crypto methods in net80211 * don't use ic_miclen, use the tx/rx mic len methods * don't use wk_txmic and wk_rxmic, use the tx/rx mic data methods This is in preparation to support GTK/IGTK keys and > 128 bit keys. Reviewed by: bz Differential Revision: https://reviews.freebsd.org/D54485 --- sys/compat/linuxkpi/common/src/linux_80211.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index cade61e8446f..901c59702840 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -1607,12 +1607,13 @@ lkpi_iv_key_set(struct ieee80211vap *vap, const struct ieee80211_key *k) } sta = LSTA_TO_STA(lsta); - keylen = k->wk_keylen; + keylen = ieee80211_crypto_get_key_len(k); lcipher = lkpi_net80211_to_l80211_cipher_suite( - k->wk_cipher->ic_cipher, k->wk_keylen); + k->wk_cipher->ic_cipher, ieee80211_crypto_get_key_len(k)); switch (lcipher) { case WLAN_CIPHER_SUITE_TKIP: - keylen += 2 * k->wk_cipher->ic_miclen; + keylen += ieee80211_crypto_get_key_txmic_len(k); + keylen += ieee80211_crypto_get_key_rxmic_len(k); break; case WLAN_CIPHER_SUITE_CCMP: case WLAN_CIPHER_SUITE_GCMP: @@ -1643,8 +1644,9 @@ lkpi_iv_key_set(struct ieee80211vap *vap, const struct ieee80211_key *k) kc->hw_key_idx = /* set by hw and needs to be passed for TX */; #endif atomic64_set(&kc->tx_pn, k->wk_keytsc); - kc->keylen = k->wk_keylen; - memcpy(kc->key, k->wk_key, k->wk_keylen); + kc->keylen = ieee80211_crypto_get_key_len(k); + memcpy(kc->key, ieee80211_crypto_get_key_data(k), + ieee80211_crypto_get_key_len(k)); if (k->wk_flags & (IEEE80211_KEY_XMIT | IEEE80211_KEY_RECV)) kc->flags |= IEEE80211_KEY_FLAG_PAIRWISE; @@ -1656,8 +1658,12 @@ lkpi_iv_key_set(struct ieee80211vap *vap, const struct ieee80211_key *k) switch (kc->cipher) { case WLAN_CIPHER_SUITE_TKIP: - memcpy(kc->key + NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY, k->wk_txmic, k->wk_cipher->ic_miclen); - memcpy(kc->key + NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY, k->wk_rxmic, k->wk_cipher->ic_miclen); + memcpy(kc->key + NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY, + ieee80211_crypto_get_key_txmic_data(k), + ieee80211_crypto_get_key_txmic_len(k)); + memcpy(kc->key + NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY, + ieee80211_crypto_get_key_rxmic_data(k), + ieee80211_crypto_get_key_rxmic_len(k)); break; case WLAN_CIPHER_SUITE_CCMP: case WLAN_CIPHER_SUITE_GCMP: @@ -5531,10 +5537,10 @@ lkpi_hw_crypto_prepare_tkip(struct ieee80211_key *k, * "enmic" (though we do not do that). */ /* any conditions to not apply this? */ - if (skb_tailroom(skb) < k->wk_cipher->ic_miclen) + if (skb_tailroom(skb) < ieee80211_crypto_get_key_txmic_len(k)) return (ENOBUFS); - p = skb_put(skb, k->wk_cipher->ic_miclen); + p = skb_put(skb, ieee80211_crypto_get_key_txmic_len(k)); if ((kc->flags & IEEE80211_KEY_FLAG_PUT_MIC_SPACE) != 0) goto encrypt; From nobody Thu May 28 20:01:18 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRHS34TdBz6f1W1 for ; Thu, 28 May 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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRHS341zrz4K1x for ; Thu, 28 May 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=1779998483; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A5nHVuqrKnxoUgiX4MeiaVMewzjjrR/vl/hrPZEyU9A=; b=MyECSBMQb2M9xpnSY+Ruw1np0kY+N4J0B2CBuYyuHzronum0IGxp4rQ0il9kONU6u2CrfP 67kiNYDDSWHQgIp/9NO/iJNgcohCWHxelZLxcAjT2TGYlFky3uuxvXaPhyQmV/M5jcRlDQ AYNw191GS9XLfE6BrPlBj25DEkxeIVmPNWu9C/7LMkz4lUVdaGW0T21dFe8AHwdYjXbMCq zxbNMB7Kf4Kudo6V4hOroIydlsaL8Wj5jeUPiwu67+hyptKXFj628a9m/3xQv2DyIt6oSo Bmn+zIpW7m3fwSIhjZvAokLVKkt/B7yS/6f89dyKo88py1ig37Q+yYtiOZIZMA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779998483; a=rsa-sha256; cv=none; b=S3V44Mv7fwPdpajhjyxrSDRVLIjj5KKYCmCHe7NBUxprC4gM5yeQJIlAInI5KQqJQ36joU DfjH/8U5dS5V/4j1j4GawCOwVtYcZ7f4X0FGejW+yG/EhOYk8+ZMezGYDp9L/MTSizke9H F84ZkoAO16gQAeCU7At5/k2SPLvkU58weshMSMBg1dNYPlxTadGJxokPBHI0+WJD9wprGv z2dq0Zh5jvhAw1aZUAF489v8OM2ZigjGI5zCCfP+zl11J6huGMZcD2NIQf4N+xx6jO7Iu8 Ky/evbRZEOZHno6jRIJ5U7GtymdLdDgYuSqnXWXv2x8ieeLzszO+dJZOqH4z/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779998483; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A5nHVuqrKnxoUgiX4MeiaVMewzjjrR/vl/hrPZEyU9A=; b=APX00gnYUYRtN9rnYhSpgKz/65z6MYdgNJb2/CAZofIE9QNQwODFlPS1TvdSRHw4QQBIUt KzGfKxhHAzJQmm76+OWZt3HVTpps7VWXpFooWdO4zBwnfFFonjS/RWAybKQrp3BFHNoGpK oylMzzgXOZEbUPI4hlY5Ky4pGGiSOGTRLMgBjNEYWf/EZQ144K0hXAwPlwlGgYfs+ddszZ XPy4RzguP0JXXd1Usp9YLwXbUdkYNd3/kYRfOVSJrMnWbVgUAu/6QVBF48tYKhc3fdTKJk iq0vcaBuz5+hs2oFcH8XlyBXgBKK+PGWR8Ja5tsderz2eq7xIia43J2fsmDeyw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRHS33ZXwz11h2 for ; Thu, 28 May 2026 20:01:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26ecf by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 20:01:18 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Pouria Mousavizadeh Tehrani Subject: git: 97f7b21dd525 - main - rtnetlink: Fix weight overflow in RTA_MULTIPATH List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pouria X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 97f7b21dd52542421bc883e336e35af078af47fe Auto-Submitted: auto-generated Date: Thu, 28 May 2026 20:01:18 +0000 Message-Id: <6a189f0e.26ecf.5c59f70@gitrepo.freebsd.org> The branch main has been updated by pouria: URL: https://cgit.FreeBSD.org/src/commit/?id=97f7b21dd52542421bc883e336e35af078af47fe commit 97f7b21dd52542421bc883e336e35af078af47fe Author: Pouria Mousavizadeh Tehrani AuthorDate: 2026-05-27 09:58:34 +0000 Commit: Pouria Mousavizadeh Tehrani CommitDate: 2026-05-28 20:00:15 +0000 rtnetlink: Fix weight overflow in RTA_MULTIPATH If the weight value is larger than 8 bits, set it to the maximum. Also, only send RTA_WEIGHT if its value is not the default. This reduces message size and matches the behavior of non-multipath routes. Reviewed by: emaste, markj Differential Revision: https://reviews.freebsd.org/D57266 --- sys/netlink/route/rt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/netlink/route/rt.c b/sys/netlink/route/rt.c index ee17737426ed..17aae399c10a 100644 --- a/sys/netlink/route/rt.c +++ b/sys/netlink/route/rt.c @@ -217,7 +217,7 @@ dump_rc_nhg(struct nl_writer *nw, const struct route_nhop_data *rnd, struct rtms return; rtnh->rtnh_flags = 0; rtnh->rtnh_ifindex = if_getindex(wn[i].nh->nh_ifp); - rtnh->rtnh_hops = wn[i].weight; + rtnh->rtnh_hops = MIN(wn[i].weight, UINT8_MAX); dump_rc_nhop_gw(nw, wn[i].nh); uint32_t rtflags = nhop_get_rtflags(wn[i].nh); if (rtflags != base_rtflags) @@ -242,7 +242,8 @@ dump_rc_nhg(struct nl_writer *nw, const struct route_nhop_data *rnd, struct rtms } nlattr_set_len(nw, off); nlattr_add_u32(nw, NL_RTA_PRIORITY, nhop_metric); - nlattr_add_u32(nw, NL_RTA_WEIGHT, nhop_weight); + if (nhop_weight != RT_DEFAULT_WEIGHT) + nlattr_add_u32(nw, NL_RTA_WEIGHT, nhop_weight); } static void From nobody Thu May 28 20:59:51 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRJlW6HMcz6f5P9 for ; Thu, 28 May 2026 20:59: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRJlW4JMlz3C9S for ; Thu, 28 May 2026 20:59:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780001991; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+GwwuckqTse1Kium0Rvk3bgOybdtWzKpzxuO+00imrw=; b=Qv+sITN+WnUhpdNz9PxJrHNKhyOFDbRly8g7Khfa6CyGjmV/6GFBehURMDUOLRciOtw7E1 LdFsPMbdi8/X0Wpub/UJrOnRyNpW54qpoMWvN5ruD9o+gGPoYN3S1IYcRgACj014ga4u0W /LbHBuHxzGv2bhPf6MIuBuzR3LsrfpM4D/HFmPMllnpvJYUAPv425nb3S2Vj9yXD4NYI4x CNOuLv+GWKW+D68e0Ns8Uc2CYqVhM9G8rQAl/kwAuY8ZEuBXmC6RLZq/+V+iXH8IKzirfp 9cQdBtemLw8cAN+MLGZ4qhTSi8CCvNIEuG82546xDVlqAmmWpXyltdkyCIYZ9A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780001991; a=rsa-sha256; cv=none; b=a/LrpqcS79GuxS7uVGsazDAwnxm4XgSzNWtzKMDFJ9sr6Ayq1CDaWqoHcwCNB4RrIEUGIL yImxwbRT/e+7v0hTC9yTTBi+ca8nUMmP7vTi9g7SaX8S8BUMhSljdcM9cW/8ob3qftr/pq gvpRM6k7olaBprTehZcjwjSRjBi660AAXgjE8FRiS6+Y8kO14LxTVbzXTY95Yq+dngBgd4 qw/vry3NiTWZacWlwGzEOBzYBw8iKpFpH9rsoWCJOpwN96n55OSNxgkUGCrd9w82jxa/vK 2HIpyQHZRZuL2Yvk/INp125IvCbIjaT7QfV79xOIw8m/Bcc6r8dHlR5f9Cvm6g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780001991; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+GwwuckqTse1Kium0Rvk3bgOybdtWzKpzxuO+00imrw=; b=iP70yjbMFpuPSd6YkMagiylRkJIfWagBmClh7Tr5OzDhsDoLS3qBLLixJE2tfDNdR/MGVl +tDdYMBDo1ElEPCKYelyXqL63nSUmZRa0bJNgFQYFW8OF6Wseun1XiUq9enzjR4ZzU9G/X TcxA+B8DDMKCDtZeVm6THPSNoOGQOMwYYuZ2tnMBWlVyFx3qIVOWdRv2HMls7zDYTnASYj 58RrRlsfgFxeNvwVmAknekL9aMhfkmwmqHnxFIewZteOpzjPsLtrCjUNm/7AcDQPepBbVz HFiLBsOSGgjhcxwJJo8twM5iKGW5R9FKT2pjA5FRKgp30Jc95G7cL82kboZTAw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRJlW3Gfdz12lc for ; Thu, 28 May 2026 20:59:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 32ef9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 20:59:51 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 804daf166406 - main - imgact_elf: read program headers if not contained in the first page List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 804daf166406a1b0e22f93b9417b90ed7d3aa1ae Auto-Submitted: auto-generated Date: Thu, 28 May 2026 20:59:51 +0000 Message-Id: <6a18acc7.32ef9.6a0db43@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=804daf166406a1b0e22f93b9417b90ed7d3aa1ae commit 804daf166406a1b0e22f93b9417b90ed7d3aa1ae Author: Konstantin Belousov AuthorDate: 2026-05-28 09:06:33 +0000 Commit: Konstantin Belousov CommitDate: 2026-05-28 20:59:26 +0000 imgact_elf: read program headers if not contained in the first page PR: 295629 Reviewed by: markj Tested by: Alex S Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57294 --- sys/kern/imgact_elf.c | 91 +++++++++++++++++++++++++++++++++++---------------- 1 file changed, 62 insertions(+), 29 deletions(-) diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index 42cdfa08f19b..e3969223c170 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -84,6 +84,8 @@ #define ELF_NOTE_ROUNDSIZE 4 #define OLD_EI_BRAND 8 +#define ELF_OFFPAGE_PHNUM 128 + /* * ELF_ABI_NAME is a string name of the ELF ABI. ELF_ABI_ID is used * to build variable names. @@ -93,7 +95,7 @@ static int __elfN(check_header)(const Elf_Ehdr *hdr); static const Elf_Brandinfo *__elfN(get_brandinfo)(struct image_params *imgp, - const char *interp, int32_t *osrel, uint32_t *fctl0); + const Elf_Phdr *phdr, const char *interp, int32_t *osrel, uint32_t *fctl0); static int __elfN(load_file)(struct thread *td, const char *file, u_long *addr, u_long *entry); static int __elfN(load_section)(const struct image_params *imgp, @@ -103,7 +105,7 @@ static int __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp); static bool __elfN(freebsd_trans_osrel)(const Elf_Note *note, int32_t *osrel); static bool kfreebsd_trans_osrel(const Elf_Note *note, int32_t *osrel); -static bool __elfN(check_note)(struct image_params *imgp, +static bool __elfN(check_note)(struct image_params *imgp, const Elf_Phdr *phdr, const Elf_Brandnote *checknote, int32_t *osrel, bool *has_fctl0, uint32_t *fctl0); static vm_prot_t __elfN(trans_prot)(Elf_Word); @@ -339,8 +341,8 @@ __elfN(brand_inuse)(const Elf_Brandinfo *entry) } static const Elf_Brandinfo * -__elfN(get_brandinfo)(struct image_params *imgp, const char *interp, - int32_t *osrel, uint32_t *fctl0) +__elfN(get_brandinfo)(struct image_params *imgp, const Elf_Phdr *phdr, + const char *interp, int32_t *osrel, uint32_t *fctl0) { const Elf_Ehdr *hdr = (const Elf_Ehdr *)imgp->image_header; const Elf_Brandinfo *bi, *bi_m; @@ -369,8 +371,8 @@ __elfN(get_brandinfo)(struct image_params *imgp, const char *interp, has_fctl0 = false; *fctl0 = 0; *osrel = 0; - ret = __elfN(check_note)(imgp, bi->brand_note, osrel, - &has_fctl0, fctl0); + ret = __elfN(check_note)(imgp, phdr, bi->brand_note, + osrel, &has_fctl0, fctl0); /* Give brand a chance to veto check_note's guess */ if (ret && bi->header_supported) { ret = bi->header_supported(imgp, osrel, @@ -787,12 +789,13 @@ __elfN(load_file)(struct thread *td, const char *file, u_long *addr, struct nameidata nd; struct vattr attr; struct image_params image_params; - } *tempdata; + } *tempdata = NULL; const Elf_Ehdr *hdr = NULL; const Elf_Phdr *phdr = NULL; struct nameidata *nd; struct vattr *attr; struct image_params *imgp; + void *m_phdrs = NULL; u_long rbase; u_long base_addr = 0; int error; @@ -852,16 +855,27 @@ __elfN(load_file)(struct thread *td, const char *file, u_long *addr, goto fail; } - /* Only support headers that fit within first page for now */ - if (!__elfN(phdr_in_zero_page)(hdr)) { + if (!aligned(imgp->image_header + hdr->e_phoff, Elf_Addr)) { error = ENOEXEC; goto fail; } - - phdr = (const Elf_Phdr *)(imgp->image_header + hdr->e_phoff); - if (!aligned(phdr, Elf_Addr)) { - error = ENOEXEC; - goto fail; + if (__elfN(phdr_in_zero_page)(hdr)) { + phdr = (const Elf_Phdr *)(imgp->image_header + hdr->e_phoff); + } else { + if (hdr->e_phnum > ELF_OFFPAGE_PHNUM) { + error = ENOEXEC; + goto fail; + } + VOP_UNLOCK(imgp->vp); + phdr = m_phdrs = malloc(hdr->e_phnum * sizeof(Elf_Phdr), + M_TEMP, M_WAITOK | M_ZERO); + vn_lock(imgp->vp, LK_SHARED | LK_RETRY); + error = vn_rdwr(UIO_READ, imgp->vp, m_phdrs, + hdr->e_phnum * sizeof(Elf_Phdr), hdr->e_phoff, + UIO_SYSSPACE, IO_NODELOCKED, imgp->td->td_ucred, + NOCRED, NULL, imgp->td); + if (error != 0) + goto fail; } error = __elfN(load_sections)(imgp, hdr, phdr, rbase, &base_addr); @@ -883,6 +897,7 @@ fail: VOP_UNSET_TEXT_CHECKED(nd->ni_vp); vput(nd->ni_vp); } + free(m_phdrs, M_TEMP); free(tempdata, M_TEMP); return (error); @@ -1108,6 +1123,7 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp) char *interp; const Elf_Brandinfo *brand_info; struct sysentvec *sv; + void *m_phdrs; u_long addr, baddr, entry, proghdr; u_long maxalign, maxsalign, mapsz, maxv, maxv1, anon_loc; uint32_t fctl0; @@ -1132,16 +1148,6 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp) * detected an ELF file. */ - if (!__elfN(phdr_in_zero_page)(hdr)) { - uprintf("Program headers not in the first page\n"); - return (ENOEXEC); - } - phdr = (const Elf_Phdr *)(imgp->image_header + hdr->e_phoff); - if (!aligned(phdr, Elf_Addr)) { - uprintf("Unaligned program headers\n"); - return (ENOEXEC); - } - n = error = 0; baddr = 0; osrel = 0; @@ -1149,6 +1155,33 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp) entry = proghdr = 0; interp = NULL; free_interp = false; + m_phdrs = NULL; + + if (!aligned(imgp->image_header + hdr->e_phoff, Elf_Addr)) { + uprintf("Unaligned program headers\n"); + return (ENOEXEC); + } + if (hdr->e_phoff + hdr->e_phnum * hdr->e_phentsize < hdr->e_phoff) { + uprintf("PHDRS wrap\n"); + return (ENOEXEC); + } + if (__elfN(phdr_in_zero_page)(hdr)) { + phdr = (const Elf_Phdr *)(imgp->image_header + hdr->e_phoff); + } else if (hdr->e_phnum > ELF_OFFPAGE_PHNUM) { + uprintf("Too many program headers\n"); + return (ENOEXEC); + } else { + VOP_UNLOCK(imgp->vp); + phdr = m_phdrs = malloc(hdr->e_phnum * sizeof(Elf_Phdr), + M_TEMP, M_WAITOK | M_ZERO); + vn_lock(imgp->vp, LK_SHARED | LK_RETRY); + error = vn_rdwr(UIO_READ, imgp->vp, m_phdrs, + hdr->e_phnum * sizeof(Elf_Phdr), hdr->e_phoff, + UIO_SYSSPACE, IO_NODELOCKED, imgp->td->td_ucred, + NOCRED, NULL, imgp->td); + if (error != 0) + goto ret; + } /* * Somewhat arbitrary, limit accepted max alignment for the @@ -1230,7 +1263,7 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp) } } - brand_info = __elfN(get_brandinfo)(imgp, interp, &osrel, &fctl0); + brand_info = __elfN(get_brandinfo)(imgp, phdr, interp, &osrel, &fctl0); if (brand_info == NULL) { uprintf("ELF binary type \"%u\" not known.\n", hdr->e_ident[EI_OSABI]); @@ -1434,6 +1467,7 @@ ret: ASSERT_VOP_LOCKED(imgp->vp, "skipped relock"); if (free_interp) free(interp, M_TEMP); + free(m_phdrs, M_TEMP); return (error); } @@ -2914,17 +2948,16 @@ note_fctl_cb(const Elf_Note *note, void *arg0, bool *res) * as for headers. */ static bool -__elfN(check_note)(struct image_params *imgp, const Elf_Brandnote *brandnote, - int32_t *osrel, bool *has_fctl0, uint32_t *fctl0) +__elfN(check_note)(struct image_params *imgp, const Elf_Phdr *phdr, + const Elf_Brandnote *brandnote, int32_t *osrel, bool *has_fctl0, + uint32_t *fctl0) { - const Elf_Phdr *phdr; const Elf_Ehdr *hdr; struct brandnote_cb_arg b_arg; struct fctl_cb_arg f_arg; int i, j; hdr = (const Elf_Ehdr *)imgp->image_header; - phdr = (const Elf_Phdr *)(imgp->image_header + hdr->e_phoff); b_arg.brandnote = brandnote; b_arg.osrel = osrel; f_arg.has_fctl0 = has_fctl0; From nobody Thu May 28 20:59:50 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRJlc304rz6f5Rn for ; Thu, 28 May 2026 20:59: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRJlb5Cyzz3CDK for ; Thu, 28 May 2026 20:59:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780001995; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gOGL05koK69ebE6RKpEb7tSeL4/EOmipbKwYlRE2hEY=; b=sJdy9KNd+7M1V6jJItUQQ2oTFD8R9f/rV7Cd10DvUTBJeD6PTwQwRSpNWeH3Noh5YoERn+ xuk6Y5XSfvxFRcysQi15/73vYyLKZitxniBRePa3PKPrxmTZBm0dZOEPE4J2I5ygDvIBc3 mvj85z8D+Af8b4f3b4lsUL86CoTpALitdrBFXxkIDEiiBwqHNW5c/3vc1lqkF9KBGN+fmX HrDdlgJS/ucB8z7doWG9pLs4EJMiOnpQ72IinyILdYzdPIfpnRgtX6jS6QSpN2v29XARew hfvqBINGz9eN8CkiiiTwA6KjS6+jZCFI6iQtdWYQUiTr9CFIyHuP2w3hKhZ21g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780001995; a=rsa-sha256; cv=none; b=DpviB0r/IqjM3vNWzOsEP8pBXVdKZR5xe4cSYGH405T8rLBYRGj9C+ILrwK8H59FhIUZvH Ge04MgsQefLPMGa3yg3IhVHYWuLFCfTPFvRBlX1tNQf8WYHvsHAmnZQdjXGp3cVABYdEHA oSm29X9Kpk18v2T3LzghrHIs/6EPgPPb6/DETMVr/b46o+CFNWL5nTrCa4msgOmHUKu4r2 rbsVlpif+yTk4Eme3zoEvL4leYJ9slESI05Lun66JfhYgGeSgPx0aly1UteXxa5IQgK75k B2ro5vAhNkNIHCKFQhaDTjVPkjtBkdUBdgjrlhbI3+xYGy26/O7bDs6YCogmyA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780001995; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gOGL05koK69ebE6RKpEb7tSeL4/EOmipbKwYlRE2hEY=; b=ZO5atG+3iX/3SYNcN4UKfkCJG/AMGWkrMjZT+FeGoXq+tIe9S4DLJodvDGyCrFn0iFkkNL lwAe6Tc9Tn5mpyL5pc2DGEcG76Pdv3B2hNn1okB97wGpMbgA5LUYYtGzSsFsL83x1bMzyO A7cGHqKsraxie2vdhJ91CkQMGdES+sJiu/J/E0nzXTBBMxX3wxjCpByjyN3GHl9dlZVfyd E+0I0jXK3pEzfO0JgjXgmWZy5AyuRHVY64sHXfaEHQ62gV9Ag6UrcQQU5lafDxnUClRxft OXQBr1S4PAWVWaspzbzDW9hs9yUed9wc1vJDMDaU1owUw8So1ooIgdZkPSLXsA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRJlb3Z3pz11q3 for ; Thu, 28 May 2026 20:59:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 34382 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 20:59:50 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 9b729333bb24 - main - image activators: pass the current thread List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9b729333bb2495afb8821044fa42c9ebe0874703 Auto-Submitted: auto-generated Date: Thu, 28 May 2026 20:59:50 +0000 Message-Id: <6a18acc6.34382.2c1b9c0e@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=9b729333bb2495afb8821044fa42c9ebe0874703 commit 9b729333bb2495afb8821044fa42c9ebe0874703 Author: Konstantin Belousov AuthorDate: 2026-05-28 09:06:04 +0000 Commit: Konstantin Belousov CommitDate: 2026-05-28 20:59:25 +0000 image activators: pass the current thread Reviewed by: markj Tested by: Alex S Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57294 --- sys/kern/imgact_elf.c | 36 ++++++++++++++++-------------------- sys/kern/kern_exec.c | 1 + sys/sys/imgact.h | 1 + 3 files changed, 18 insertions(+), 20 deletions(-) diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index af0841c75549..42cdfa08f19b 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -94,7 +94,7 @@ static int __elfN(check_header)(const Elf_Ehdr *hdr); static const Elf_Brandinfo *__elfN(get_brandinfo)(struct image_params *imgp, const char *interp, int32_t *osrel, uint32_t *fctl0); -static int __elfN(load_file)(struct proc *p, const char *file, u_long *addr, +static int __elfN(load_file)(struct thread *td, const char *file, u_long *addr, u_long *entry); static int __elfN(load_section)(const struct image_params *imgp, vm_ooffset_t offset, caddr_t vmaddr, size_t memsz, size_t filsz, @@ -780,8 +780,8 @@ __elfN(load_sections)(const struct image_params *imgp, const Elf_Ehdr *hdr, * the entry point for the loaded file. */ static int -__elfN(load_file)(struct proc *p, const char *file, u_long *addr, - u_long *entry) +__elfN(load_file)(struct thread *td, const char *file, u_long *addr, + u_long *entry) { struct { struct nameidata nd; @@ -802,7 +802,7 @@ __elfN(load_file)(struct proc *p, const char *file, u_long *addr, * XXXJA: This check can go away once we are sufficiently confident * that the checks in namei() are correct. */ - if (IN_CAPABILITY_MODE(curthread)) + if (IN_CAPABILITY_MODE(td)) return (ECAPMODE); #endif @@ -814,7 +814,8 @@ __elfN(load_file)(struct proc *p, const char *file, u_long *addr, /* * Initialize part of the common data */ - imgp->proc = p; + imgp->td = td; + imgp->proc = td->td_proc; imgp->attr = attr; NDINIT(nd, LOOKUP, ISOPEN | FOLLOW | LOCKSHARED | LOCKLEAF, @@ -867,8 +868,8 @@ __elfN(load_file)(struct proc *p, const char *file, u_long *addr, if (error != 0) goto fail; - if (p->p_sysent->sv_protect != NULL) - p->p_sysent->sv_protect(imgp, SVP_INTERP); + if (imgp->proc->p_sysent->sv_protect != NULL) + imgp->proc->p_sysent->sv_protect(imgp, SVP_INTERP); *addr = base_addr; *entry = (unsigned long)hdr->e_entry + rbase; @@ -1008,7 +1009,6 @@ static int __elfN(get_interp)(struct image_params *imgp, const Elf_Phdr *phdr, char **interpp, bool *free_interpp) { - struct thread *td; char *interp; int error, interp_name_len; @@ -1016,8 +1016,6 @@ __elfN(get_interp)(struct image_params *imgp, const Elf_Phdr *phdr, ("%s: p_type %u != PT_INTERP", __func__, phdr->p_type)); ASSERT_VOP_LOCKED(imgp->vp, __func__); - td = curthread; - /* Path to interpreter */ if (phdr->p_filesz < 2 || phdr->p_filesz > MAXPATHLEN) { uprintf("Invalid PT_INTERP\n"); @@ -1045,8 +1043,8 @@ __elfN(get_interp)(struct image_params *imgp, const Elf_Phdr *phdr, error = vn_rdwr(UIO_READ, imgp->vp, interp, interp_name_len, phdr->p_offset, - UIO_SYSSPACE, IO_NODELOCKED, td->td_ucred, - NOCRED, NULL, td); + UIO_SYSSPACE, IO_NODELOCKED, imgp->td->td_ucred, + NOCRED, NULL, imgp->td); if (error != 0) { free(interp, M_TEMP); uprintf("i/o error PT_INTERP %d\n", error); @@ -1079,13 +1077,13 @@ __elfN(load_interp)(struct image_params *imgp, const Elf_Brandinfo *brand_info, if (brand_info->interp_newpath != NULL && (brand_info->interp_path == NULL || strcmp(interp, brand_info->interp_path) == 0)) { - error = __elfN(load_file)(imgp->proc, + error = __elfN(load_file)(imgp->td, brand_info->interp_newpath, addr, entry); if (error == 0) return (0); } - error = __elfN(load_file)(imgp->proc, interp, addr, entry); + error = __elfN(load_file)(imgp->td, interp, addr, entry); if (error == 0) return (0); @@ -1102,7 +1100,6 @@ __elfN(load_interp)(struct image_params *imgp, const Elf_Brandinfo *brand_info, static int __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp) { - struct thread *td; const Elf_Ehdr *hdr; const Elf_Phdr *phdr; Elf_Auxargs *elf_auxargs; @@ -1152,7 +1149,6 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp) entry = proghdr = 0; interp = NULL; free_interp = false; - td = curthread; /* * Somewhat arbitrary, limit accepted max alignment for the @@ -1329,7 +1325,7 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp) map = &vmspace->vm_map; maxv = sv->sv_usrstack; if ((imgp->map_flags & MAP_ASLR_STACK) == 0) - maxv -= lim_max(td, RLIMIT_STACK); + maxv -= lim_max(imgp->td, RLIMIT_STACK); if (error == 0 && mapsz >= maxv - vm_map_min(map)) { uprintf("Excessive mapping size\n"); error = ENOEXEC; @@ -1339,7 +1335,7 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp) KASSERT((map->flags & MAP_ASLR) != 0, ("ET_DYN_ADDR_RAND but !MAP_ASLR")); error = __CONCAT(rnd_, __elfN(base))(map, - vm_map_min(map) + mapsz + lim_max(td, RLIMIT_DATA), + vm_map_min(map) + mapsz + lim_max(imgp->td, RLIMIT_DATA), /* reserve half of the address space to interpreter */ maxv / 2, maxalign, &imgp->et_dyn_addr); } @@ -1362,7 +1358,7 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp) * calculation is that it leaves room for the heap to grow to * its maximum allowed size. */ - addr = round_page((vm_offset_t)vmspace->vm_daddr + lim_max(td, + addr = round_page((vm_offset_t)vmspace->vm_daddr + lim_max(imgp->td, RLIMIT_DATA)); if ((map->flags & MAP_ASLR) != 0) { maxv1 = maxv / 2 + addr / 2; @@ -2809,7 +2805,7 @@ __elfN(parse_notes)(const struct image_params *imgp, const Elf_Note *checknote, } error = vn_rdwr(UIO_READ, imgp->vp, buf, pnote->p_filesz, pnote->p_offset, UIO_SYSSPACE, IO_NODELOCKED, - curthread->td_ucred, NOCRED, NULL, curthread); + imgp->td->td_ucred, NOCRED, NULL, imgp->td); if (error != 0) { uprintf("i/o error PT_NOTE\n"); goto retf; diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 958ec559fd8d..4066682cbcc5 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -448,6 +448,7 @@ do_execve(struct thread *td, struct image_args *args, struct mac *mac_p, */ bzero(imgp, sizeof(*imgp)); imgp->proc = p; + imgp->td = td; imgp->attr = &attr; imgp->args = args; oldcred = p->p_ucred; diff --git a/sys/sys/imgact.h b/sys/sys/imgact.h index c1c94a2eabfd..51cda4406cad 100644 --- a/sys/sys/imgact.h +++ b/sys/sys/imgact.h @@ -57,6 +57,7 @@ struct image_args { struct image_params { struct proc *proc; /* our process */ + struct thread *td; struct label *execlabel; /* optional exec label */ struct vnode *vp; /* pointer to vnode of file to exec */ struct vm_object *object; /* The vm object for this vp */ From nobody Thu May 28 22:16:02 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRLRQ6ZJhz6fR03 for ; Thu, 28 May 2026 22:16: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRLRQ40DQz3LJJ for ; Thu, 28 May 2026 22:16:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780006562; 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=yphWUSdBx4+B9n6o9ssI3hf356hPGgPY3yPtLFCfdEY=; b=S9Xfj6elojJabVpM6U7Gb0Tbp6sXXW5BQNBBEdFZWBR2gjSlizYKVeu+6eN/YYts1zIWZ7 Cjyc19g1r04T9frfHY5+TjpwaHghkX1WQqXf0d0oOmDzZc/lkD81ZJiB/IvQif6JVK0rQh JP42oMMjsiJf+FVtItZ92IKsF0m/6618CaMVCSQFSyNHQk8TF2/C7XryR9I0hvRmo3vIcg Jl0/EgxOa8oc6sOil20mH3n7B2yTE+ssuWMuHWJQ8YdKiXnOd065l6uISL89lb95ftypPZ D2dIGu7MXN0YF+BM3gHprsTMm/KeAhcKDU+OwYr3Ev0Rk68IlhzP2CbE46piew== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780006562; a=rsa-sha256; cv=none; b=mB6f6xwwPXvS0eogxt/tkyeAZm1OJmhFi/RHYzwyipot6BskB8G7sk35Mkt9UrM5lC/Qwn k+OPf1Xo5rCZhrfz4S9ILZ0erHD6h5k1JH9OXbun0ya8+KJDIeOBTqesJCpvxd85gJ1eZR RMdMD7RxgqipbhkMPxVpHFbQXpK53lPYwCyoAl4qKSOi3SwJAmJSmimUzae04CzPHfvN+1 6quCfgHdqAja15CJDWbyXb6JVOn798xTI6WRZhyP7gBs5GYCjA4XIj9tcz6vCe9K9NvFv0 1OOA/UJHj6xen7tJ0xijTaPlQYKVBRsY4cdg90Jgj2o//S+eok9EJbUlMs08VQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780006562; 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=yphWUSdBx4+B9n6o9ssI3hf356hPGgPY3yPtLFCfdEY=; b=WQigBeJ5qnY53hRTn7RLMaq6HhWChvkNiPfxq2vLCZPeg5ov6lsdGNDenP9UBuxueUGWAn 2C4GMkODbvD9VkcdUIwLaWqcnAokJDR54PBvJJLsYNCawYukO49Q64YJ4gJQBQu9DBhi1P FDokXefxhGBjjk3O83XQXoGi+QvgbXkNeVmbP9aR/UjSaTsLhc06001feYgX70sTnc2Q5N L9oqcnjQQaMl3fB6wozIGnN2ZYzc4+ggaZvLCLIxrfoWUWXnxTChUDtikgtu4/wOsj5TMF Ge7ojvX1cr3xyE2wczFbO71EgWHhpcQXGKmULJJa9JF1GfZq855kcL/POG7piw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRLRQ3MGCz14xL for ; Thu, 28 May 2026 22:16:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c17a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 22:16:02 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Alexander Ziaee From: Colin Percival Subject: git: 56fb2f6daa47 - releng/15.1 - intro.7: Reference groups.7 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.1 X-Git-Reftype: branch X-Git-Commit: 56fb2f6daa47022c55458b4dcd11c48fdeed8158 Auto-Submitted: auto-generated Date: Thu, 28 May 2026 22:16:02 +0000 Message-Id: <6a18bea2.3c17a.659801e4@gitrepo.freebsd.org> The branch releng/15.1 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=56fb2f6daa47022c55458b4dcd11c48fdeed8158 commit 56fb2f6daa47022c55458b4dcd11c48fdeed8158 Author: Alexander Ziaee AuthorDate: 2026-04-28 13:56:23 +0000 Commit: Colin Percival CommitDate: 2026-05-28 22:15:15 +0000 intro.7: Reference groups.7 Approved by: re (cperciva) PR: 264966 MFC after: 3 days (cherry picked from commit 0f91468c040eb2129618e5ac251afc2529edb462) (cherry picked from commit ef42bf7126ef3926a0e3d955e118d556825a556e) --- share/man/man7/intro.7 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/share/man/man7/intro.7 b/share/man/man7/intro.7 index 43e48de87bc5..62d56b09d9fc 100644 --- a/share/man/man7/intro.7 +++ b/share/man/man7/intro.7 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 14, 2025 +.Dd April 28, 2026 .Dt INTRO 7 .Os .Sh NAME @@ -60,6 +60,8 @@ user environment .It Xr firewall 7 simple firewalls under .Fx +.It Xr groups 7 +standard user group names .It Xr hier 7 file system hierarchy in .Fx From nobody Thu May 28 22:16:04 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRLRT3Gb1z6fQqq for ; Thu, 28 May 2026 22:16: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRLRT0GlFz3LLl for ; Thu, 28 May 2026 22:16:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780006565; 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=A6+9SonYrxj8JH/1/Zzs4VrYqF4yz/X7AIEm5wCxaiE=; b=oExaqNmmosqCdxfGBafYnHUsVY+j/E0tBtagyX02C/SgQ5Xst70qDkAQzDPClC7sbtgLHY rXBsJf8mn8/IhgJAoaWYr+Nf7r7TUcF70ca+wCIcy9eEfhX8q9KqVrQ3TsJy+C0Z6qgjrd bhwINGzGz2iphrfJe6qn10ksl9pRtBkGSUUym4r0NwAHGt3GtoFVEiqZqfw8SYvRAXjGRP A2veLbjtCBPmmIFRGuPCy03ddYIEClA3iCLNFM6xa94j+eg5uRMhKlIi+5jib+ZkA9RZZb KR/HZDE7pVVLl0x5mNhgkd2Czbg2S+Tjls4OU/Gv9LjqDv2GdIe4mQlx0FHqLA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780006565; a=rsa-sha256; cv=none; b=bgAekOxsgBrilTHtKMa5javV+4P4U7l968VdHSCSL/6nxjFWXhZBYN5NNveZoTDRFShU5J QYP8Bf2kBANrdo+y7WCzNR3oujPDRJTrRqu2T5ci0uj+02BIJ5J9tgiZnCPgxW1H2tAL2B X1a942N8oMftfArG0iRSqwNvQPguOKCeVyuxegfrEpEDkE1zBWbIbjlURZw1wQ06/R3MuF dsgJX+Y8vp++ByIisD53SYad0/WJ2AYZINDkFEaMEc79qBK83eEUHdFsr3dSMW6GGqarKd l6GqUK++bqeejbfF8n23IsF6/e5UZf2NlF3ChjmsP0QntL+VTlVJrcT4eSyNjw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780006565; 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=A6+9SonYrxj8JH/1/Zzs4VrYqF4yz/X7AIEm5wCxaiE=; b=B7uBI7WBZi0JV6zrZ0+uxNKZhEmQMPx+u/6ihEszWs8ivcWQ2ujBnr9JEtgMnOTOZzLwLK KMdwSibJpI/0IFwRyum1BTtp9wCrSL0cFkjvudRYmvtu9uMhbX3j4gNf4mqXDskHBuIxVh eIKeLNFiwql5nRd4i6GTYaGaYbPSL/fQSvSAGdXVNFtZ20pL6J6Dmigx92JSrEachDJSMP TOZ4GeNbBxlBdgoqWLvri313igpvmtqwDIhbBwsFbZLlW8Vif3nXcHUpRlwi1QzOfQkl+S ffXSBmXB3XxIEFSVWfER1Qo5fSHZGwmXSYc559mse0ZyBJqGxBnzAaSlO0QbBw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRLRS6fkNz14xP for ; Thu, 28 May 2026 22:16:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d1ae by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 22:16:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav From: Colin Percival Subject: git: bbb47002f5c9 - releng/15.1 - unbound: Update to 1.24.2 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.1 X-Git-Reftype: branch X-Git-Commit: bbb47002f5c98e19b1557db6b4acd37487f0f441 Auto-Submitted: auto-generated Date: Thu, 28 May 2026 22:16:04 +0000 Message-Id: <6a18bea4.3d1ae.5664575@gitrepo.freebsd.org> The branch releng/15.1 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=bbb47002f5c98e19b1557db6b4acd37487f0f441 commit bbb47002f5c98e19b1557db6b4acd37487f0f441 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-22 20:16:26 +0000 Commit: Colin Percival CommitDate: 2026-05-28 22:15:20 +0000 unbound: Update to 1.24.2 Merge commit 'ec5b94f552d7cb2a9d456c67e9941bcf5e3698bf' This is purely cosmetic as we already had the functional changes. Approved by: re (cperciva) MFC after: 1 week (cherry picked from commit 22fa41b4e81ad91d11e28f1837764730d744d4e4) (cherry picked from commit 1c869f005d760131cf49b965e67d4655c237f945) --- contrib/unbound/config.h.in | 10 +- contrib/unbound/configure | 4673 ++++++++++++++++------------ contrib/unbound/configure.ac | 3 +- contrib/unbound/doc/README | 2 +- contrib/unbound/doc/example.conf | 2 +- contrib/unbound/doc/example.conf.in | 2 +- contrib/unbound/doc/libunbound.3 | 4 +- contrib/unbound/doc/libunbound.3.in | 4 +- contrib/unbound/doc/unbound-anchor.8 | 4 +- contrib/unbound/doc/unbound-anchor.8.in | 4 +- contrib/unbound/doc/unbound-checkconf.8 | 4 +- contrib/unbound/doc/unbound-checkconf.8.in | 4 +- contrib/unbound/doc/unbound-control.8 | 4 +- contrib/unbound/doc/unbound-control.8.in | 4 +- contrib/unbound/doc/unbound-host.1 | 4 +- contrib/unbound/doc/unbound-host.1.in | 4 +- contrib/unbound/doc/unbound.8 | 4 +- contrib/unbound/doc/unbound.8.in | 4 +- contrib/unbound/doc/unbound.conf.5 | 4 +- contrib/unbound/doc/unbound.conf.5.in | 4 +- lib/libunbound/config.h | 16 +- 21 files changed, 2774 insertions(+), 1990 deletions(-) diff --git a/contrib/unbound/config.h.in b/contrib/unbound/config.h.in index a2b3f33c32be..4f89bfb21614 100644 --- a/contrib/unbound/config.h.in +++ b/contrib/unbound/config.h.in @@ -173,11 +173,11 @@ 0 if you don't. */ #undef HAVE_DECL_SSL_CTX_SET_ECDH_AUTO -/* Define to 1 if you have the declaration of `SSL_CTX_set_tmp_ecdh', and to 0 +/* Define to 1 if you have the declaration of 'SSL_CTX_set_tmp_ecdh', and to 0 if you don't. */ #undef HAVE_DECL_SSL_CTX_SET_TMP_ECDH -/* Define to 1 if you have the declaration of `strlcat', and to 0 if you +/* Define to 1 if you have the declaration of 'strlcat', and to 0 if you don't. */ #undef HAVE_DECL_STRLCAT @@ -481,10 +481,10 @@ 'ngtcp2_crypto_quictls_from_ossl_encryption_level' function. */ #undef HAVE_NGTCP2_CRYPTO_QUICTLS_FROM_OSSL_ENCRYPTION_LEVEL -/* Define to 1 if you have the `ngtcp2_crypto_quictls_init' function. */ +/* Define to 1 if you have the 'ngtcp2_crypto_quictls_init' function. */ #undef HAVE_NGTCP2_CRYPTO_QUICTLS_INIT -/* Define to 1 if the system has the type `ngtcp2_encryption_level'. */ +/* Define to 1 if the system has the type 'ngtcp2_encryption_level'. */ #undef HAVE_NGTCP2_ENCRYPTION_LEVEL /* Define to 1 if you have the header file. @@ -655,7 +655,7 @@ function. */ #undef HAVE_SSL_CTX_SET_TLSEXT_TICKET_KEY_EVP_CB -/* Define to 1 if you have the `SSL_get0_alpn_selected' function. */ +/* Define to 1 if you have the 'SSL_get0_alpn_selected' function. */ #undef HAVE_SSL_GET0_ALPN_SELECTED /* Define to 1 if you have the 'SSL_get0_peername' function. */ diff --git a/contrib/unbound/configure b/contrib/unbound/configure index 3093412a492f..717de9beb3e1 100755 --- a/contrib/unbound/configure +++ b/contrib/unbound/configure @@ -1,11 +1,11 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for unbound 1.24.1. +# Generated by GNU Autoconf 2.72 for unbound 1.24.2. # # Report bugs to . # # -# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, +# Copyright (C) 1992-1996, 1998-2017, 2020-2023 Free Software Foundation, # Inc. # # @@ -17,7 +17,6 @@ # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -as_nop=: if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh @@ -26,12 +25,13 @@ then : # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else $as_nop - case `(set -o) 2>/dev/null` in #( +else case e in #( + e) case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; +esac ;; esac fi @@ -103,7 +103,7 @@ IFS=$as_save_IFS ;; esac -# We did not find ourselves, most probably we were run as `sh COMMAND' +# We did not find ourselves, most probably we were run as 'sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 @@ -133,15 +133,14 @@ case $- in # (((( esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. +# out after a failed 'exec'. printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="as_nop=: -if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 + as_bourne_compatible="if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh NULLCMD=: @@ -149,12 +148,13 @@ then : # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST -else \$as_nop - case \`(set -o) 2>/dev/null\` in #( +else case e in #( + e) case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; +esac ;; esac fi " @@ -172,8 +172,9 @@ as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ) then : -else \$as_nop - exitcode=1; echo positional parameters were not saved. +else case e in #( + e) exitcode=1; echo positional parameters were not saved. ;; +esac fi test x\$exitcode = x0 || exit 1 blah=\$(echo \$(echo blah)) @@ -195,14 +196,15 @@ test \$(( 1 + 1 )) = 2 || exit 1 if (eval "$as_required") 2>/dev/null then : as_have_required=yes -else $as_nop - as_have_required=no +else case e in #( + e) as_have_required=no ;; +esac fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null then : -else $as_nop - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +else case e in #( + e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do @@ -235,12 +237,13 @@ IFS=$as_save_IFS if $as_found then : -else $as_nop - if { test -f "$SHELL" || test -f "$SHELL.exe"; } && +else case e in #( + e) if { test -f "$SHELL" || test -f "$SHELL.exe"; } && as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null then : CONFIG_SHELL=$SHELL as_have_required=yes -fi +fi ;; +esac fi @@ -262,7 +265,7 @@ case $- in # (((( esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. +# out after a failed 'exec'. printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi @@ -283,7 +286,8 @@ $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 -fi +fi ;; +esac fi fi SHELL=${CONFIG_SHELL-/bin/sh} @@ -322,14 +326,6 @@ as_fn_exit () as_fn_set_status $1 exit $1 } # as_fn_exit -# as_fn_nop -# --------- -# Do nothing but, unlike ":", preserve the value of $?. -as_fn_nop () -{ - return $? -} -as_nop=as_fn_nop # as_fn_mkdir_p # ------------- @@ -398,11 +394,12 @@ then : { eval $1+=\$2 }' -else $as_nop - as_fn_append () +else case e in #( + e) as_fn_append () { eval $1=\$$1\$2 - } + } ;; +esac fi # as_fn_append # as_fn_arith ARG... @@ -416,21 +413,14 @@ then : { as_val=$(( $* )) }' -else $as_nop - as_fn_arith () +else case e in #( + e) as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` - } + } ;; +esac fi # as_fn_arith -# as_fn_nop -# --------- -# Do nothing but, unlike ":", preserve the value of $?. -as_fn_nop () -{ - return $? -} -as_nop=as_fn_nop # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- @@ -504,6 +494,8 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits /[$]LINENO/= ' <$as_myself | sed ' + t clear + :clear s/[$]LINENO.*/&-/ t lineno b @@ -552,7 +544,6 @@ esac as_echo='printf %s\n' as_echo_n='printf %s' - rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -564,9 +555,9 @@ if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. + # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable. + # In both cases, we have to default to 'cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then @@ -591,10 +582,12 @@ as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" +as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" +as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated # Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g" +as_tr_sh="eval sed '$as_sed_sh'" # deprecated SHELL=${CONFIG_SHELL-/bin/sh} @@ -622,8 +615,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='unbound' PACKAGE_TARNAME='unbound' -PACKAGE_VERSION='1.24.1' -PACKAGE_STRING='unbound 1.24.1' +PACKAGE_VERSION='1.24.2' +PACKAGE_STRING='unbound 1.24.2' PACKAGE_BUGREPORT='unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues' PACKAGE_URL='' @@ -660,6 +653,7 @@ ac_includes_default="\ ac_header_c_list= ac_func_c_list= +enable_year2038=no ac_subst_vars='LTLIBOBJS date version @@ -748,6 +742,7 @@ PTHREAD_LIBS PTHREAD_CXX PTHREAD_CC ax_pthread_config +CPP ASYNCLOOK_ALLOCCHECK_EXTRA_OBJ SLDNS_ALLOCCHECK_EXTRA_OBJ USE_SYSTEMD_FALSE @@ -758,7 +753,6 @@ SYSTEMD_LIBS SYSTEMD_CFLAGS RUNTIME_PATH LIBOBJS -CPP PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG @@ -944,6 +938,7 @@ with_libmnl enable_explicit_port_randomisation enable_linux_ip_local_port_range with_libunbound_only +enable_year2038 ' ac_precious_vars='build_alias host_alias @@ -959,11 +954,11 @@ LT_SYS_LIBRARY_PATH PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR -CPP SYSTEMD_CFLAGS SYSTEMD_LIBS SYSTEMD_DAEMON_CFLAGS SYSTEMD_DAEMON_LIBS +CPP PYTHON_VERSION SOURCE_DATE_EPOCH PROTOBUFC_CFLAGS @@ -1076,7 +1071,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: \`$ac_useropt'" + as_fn_error $? "invalid feature name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1102,7 +1097,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: \`$ac_useropt'" + as_fn_error $? "invalid feature name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1315,7 +1310,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: \`$ac_useropt'" + as_fn_error $? "invalid package name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1331,7 +1326,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: \`$ac_useropt'" + as_fn_error $? "invalid package name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1361,8 +1356,8 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" + -*) as_fn_error $? "unrecognized option: '$ac_option' +Try '$0 --help' for more information" ;; *=*) @@ -1370,7 +1365,7 @@ Try \`$0 --help' for more information" # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + as_fn_error $? "invalid variable name: '$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1420,7 +1415,7 @@ do as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done -# There might be people who depend on the old broken behavior: `$host' +# There might be people who depend on the old broken behavior: '$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias @@ -1488,7 +1483,7 @@ if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_msg="sources are in $srcdir, but 'cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` @@ -1516,7 +1511,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 unbound 1.24.1 to adapt to many kinds of systems. +'configure' configures unbound 1.24.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1530,11 +1525,11 @@ Configuration: --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages + -q, --quiet, --silent do not print 'checking ...' messages --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' + -C, --config-cache alias for '--cache-file=config.cache' -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] + --srcdir=DIR find the sources in DIR [configure dir or '..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX @@ -1542,10 +1537,10 @@ Installation directories: --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. +By default, 'make install' will install all the files in +'$ac_default_prefix/bin', '$ac_default_prefix/lib' etc. You can specify +an installation prefix other than '$ac_default_prefix' using '--prefix', +for instance '--prefix=\$HOME'. For better control, use the options below. @@ -1582,7 +1577,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of unbound 1.24.1:";; + short | recursive ) echo "Configuration of unbound 1.24.2:";; esac cat <<\_ACEOF @@ -1663,6 +1658,7 @@ Optional Features: randomness. Define this only when the target system restricts (e.g. some of SELinux enabled distributions) the use of non-ephemeral ports. + --enable-year2038 support timestamps after 2038 Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1733,12 +1729,12 @@ Some influential environment variables: LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory - YACC The `Yet Another Compiler Compiler' implementation to use. - Defaults to the first program found out of: `bison -y', `byacc', - `yacc'. + YACC The 'Yet Another Compiler Compiler' implementation to use. + Defaults to the first program found out of: 'bison -y', 'byacc', + 'yacc'. YFLAGS The list of arguments that will be passed by default to $YACC. This script will default YFLAGS to the empty string to avoid a - default value of `-d' given by some make applications. + default value of '-d' given by some make applications. LT_SYS_LIBRARY_PATH User-defined run-time library search path. PKG_CONFIG path to pkg-config utility @@ -1746,7 +1742,6 @@ Some influential environment variables: directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path - CPP C preprocessor SYSTEMD_CFLAGS C compiler flags for SYSTEMD, overriding pkg-config SYSTEMD_LIBS @@ -1755,6 +1750,7 @@ Some influential environment variables: C compiler flags for SYSTEMD_DAEMON, overriding pkg-config SYSTEMD_DAEMON_LIBS linker flags for SYSTEMD_DAEMON, overriding pkg-config + CPP C preprocessor PYTHON_VERSION The installed Python version to use, for example '2.3'. This string will be appended to the Python interpreter canonical @@ -1768,7 +1764,7 @@ Some influential environment variables: PROTOBUFC_LIBS linker flags for PROTOBUFC, overriding pkg-config -Use these variables to override the choices made by `configure' or to help +Use these variables to override the choices made by 'configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . @@ -1835,10 +1831,10 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -unbound configure 1.24.1 -generated by GNU Autoconf 2.71 +unbound configure 1.24.2 +generated by GNU Autoconf 2.72 -Copyright (C) 2021 Free Software Foundation, Inc. +Copyright (C) 2023 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1877,11 +1873,12 @@ printf "%s\n" "$ac_try_echo"; } >&5 } && test -s conftest.$ac_objext then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else case e in #( + e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 + ac_retval=1 ;; +esac fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval @@ -1900,8 +1897,8 @@ printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> @@ -1909,10 +1906,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$3=yes" -else $as_nop - eval "$3=no" +else case e in #( + e) eval "$3=no" ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -1952,11 +1951,12 @@ printf "%s\n" "$ac_try_echo"; } >&5 } then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else case e in #( + e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 + ac_retval=1 ;; +esac fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would @@ -1979,15 +1979,15 @@ printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. */ + which can conflict with char $2 (void); below. */ #include #undef $2 @@ -1998,7 +1998,7 @@ else $as_nop #ifdef __cplusplus extern "C" #endif -char $2 (); +char $2 (void); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ @@ -2017,11 +2017,13 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : eval "$3=yes" -else $as_nop - eval "$3=no" +else case e in #( + e) eval "$3=no" ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext + conftest$ac_exeext conftest.$ac_ext ;; +esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -2042,8 +2044,8 @@ printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 -else $as_nop - eval "$3=no" +else case e in #( + e) eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 @@ -2073,12 +2075,14 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : -else $as_nop - eval "$3=yes" +else case e in #( + e) eval "$3=yes" ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -2087,44 +2091,6 @@ printf "%s\n" "$ac_res" >&6; } } # ac_fn_c_check_type -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - } -then : - ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_cpp - # ac_fn_c_try_run LINENO # ---------------------- # Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that @@ -2155,12 +2121,13 @@ printf "%s\n" "$ac_try_echo"; } >&5 test $ac_status = 0; }; } then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: program exited with status $ac_status" >&5 +else case e in #( + e) printf "%s\n" "$as_me: program exited with status $ac_status" >&5 printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=$ac_status + ac_retval=$ac_status ;; +esac fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno @@ -2213,18 +2180,19 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_hi=$ac_mid; break -else $as_nop - as_fn_arith $ac_mid + 1 && ac_lo=$as_val +else case e in #( + e) as_fn_arith $ac_mid + 1 && ac_lo=$as_val if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi - as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val + as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int @@ -2259,20 +2227,23 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_lo=$ac_mid; break -else $as_nop - as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val +else case e in #( + e) as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi - as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val + as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done -else $as_nop - ac_lo= ac_hi= +else case e in #( + e) ac_lo= ac_hi= ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext # Binary search between lo and hi bounds. @@ -2295,8 +2266,9 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_hi=$ac_mid -else $as_nop - as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val +else case e in #( + e) as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done @@ -2344,8 +2316,9 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : echo >>conftest.val; read $3 &5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + } +then : + ac_retval=0 +else case e in #( + e) printf "%s\n" "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 ;; +esac +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + # ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR # ------------------------------------------------------------------ # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR @@ -2370,8 +2382,8 @@ printf %s "checking whether $as_decl_name is declared... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 -else $as_nop - as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` +else case e in #( + e) as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` eval ac_save_FLAGS=\$$6 as_fn_append $6 " $5" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2395,12 +2407,14 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$3=yes" -else $as_nop - eval "$3=no" +else case e in #( + e) eval "$3=no" ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext eval $6=\$ac_save_FLAGS - + ;; +esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -2421,8 +2435,8 @@ printf %s "checking for $2.$3... " >&6; } if eval test \${$4+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int @@ -2438,8 +2452,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$4=yes" -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int @@ -2455,12 +2469,15 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$4=yes" -else $as_nop - eval "$4=no" +else case e in #( + e) eval "$4=no" ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi eval ac_res=\$$4 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -2492,8 +2509,8 @@ 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 unbound $as_me 1.24.1, which was -generated by GNU Autoconf 2.71. Invocation command line was +It was created by unbound $as_me 1.24.2, which was +generated by GNU Autoconf 2.72. Invocation command line was $ $0$ac_configure_args_raw @@ -2739,10 +2756,10 @@ esac printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} *** 9732 LINES SKIPPED *** From nobody Thu May 28 22:16:06 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRLRW5drDz6fR28 for ; Thu, 28 May 2026 22:16: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRLRV67WTz3LGd for ; Thu, 28 May 2026 22:16:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780006566; 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=jOWZn3l8mgILfEO9Ykw8Vb+lf9QqdkVvi36KiabH27Q=; b=rRkYgmECtczXxXx4ue0C3BcXA9lJTjYIVeyyRMsTn2FCsbyB96IMUneN5m7nad3TVt4old neodp/dOT2yLQMgJsgQj0gNQYyV2FpydWyI2JG7RSrXv9pZCeD29xDO3sORpbDzhJrCGcS 8cCwlNzGZEdc6jZgnCwql+gg1d2iGXLCsQvMxz/jYg84aERhVvYQM6dNB+z/+u9bJgOKJT J6Zq9hzXmn43i/+hCueo855kwZacFXOZ2ODGNc2GWk7lxNIvsIWYgdX9dcOgIWdCzcl5+m Mx5w+1TZzvnO9fpy+uhckHcjX/HfxQV7j6/hvP+jGqmyEQlRSZD1CM5ILnjHZw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780006566; a=rsa-sha256; cv=none; b=TajDO/4Ioweyq/RonUhFCAbaSph/plVbASNbHzOXR2adHauTYARrCX/dBhMQ/OVLiJAoBC zMuwr5oBIdU5zwKAupy6e2dDfBJZ/Oc4Fwe6X6NToeGP7LIGPHFs0Fy2Zx4c/LHNbalOxb bkCSJuW/BeLRaPq4U1630ONqvuJev2vEYA6vse5qO66jxAyWz5YlIjFYpdCQyNUoFfho5n PlyeZeIfWpyt50CpYNahMwCK/OP+/XalR4TSRi/ZYWf1XFLD+7dH2FndL/Wbf/ml1XsZ3k /snWH/iLWCJ0DYxAXPzwfG29mf5TVKcaytU3cNQxV4eVBzPt61Rt9p2KtuyQ9w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780006566; 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=jOWZn3l8mgILfEO9Ykw8Vb+lf9QqdkVvi36KiabH27Q=; b=oELeYAFtDW9zHdEiCmnZ7JLf/neFNwXbquFrQHJAVGsgFMl8vyiuzSbJdjk+cy2YTIPSFa /m2lvMB4wPmGLj1QY4XfRMV37IuoS8Ih9L3FZfMiKM1weOw+zBSH5dMBopHe22Xu4/H5qc SG5fE9kbbLGeTnkvflOz0FGp4wPy12MGLk2NkjOQT1DoLLGzJ8og9zzOO0pFYt9NNhhEC8 RjyUoLU0gxSN+kFwRttKYw+zY9+rWQD8U7oovauPamHZ3uwgWGZS4d4+pQ7GSZk7FrHhlu wCsUvsXZSmXPxcLNwsljBTqK2/+AKSwchHVj5tot2ve7n1156w6UsdzWEe6tGg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRLRV5KMPz15BM for ; Thu, 28 May 2026 22:16:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a8e4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 22:16:06 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav From: Colin Percival Subject: git: 1c4ffeaa27e4 - releng/15.1 - unbound: Update to 1.25.0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.1 X-Git-Reftype: branch X-Git-Commit: 1c4ffeaa27e4cd223a643273c91fd935406e2433 Auto-Submitted: auto-generated Date: Thu, 28 May 2026 22:16:06 +0000 Message-Id: <6a18bea6.3a8e4.7c40cd05@gitrepo.freebsd.org> The branch releng/15.1 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=1c4ffeaa27e4cd223a643273c91fd935406e2433 commit 1c4ffeaa27e4cd223a643273c91fd935406e2433 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-23 01:54:22 +0000 Commit: Colin Percival CommitDate: 2026-05-28 22:15:23 +0000 unbound: Update to 1.25.0 Release notes at https://nlnetlabs.nl/news/2026/Apr/29/unbound-1.25.0-released/ Merge commit '4dd0a17edce60370304a45f2c40251e09e193bd6' Approved by: re (cperciva) MFC after: 1 week (cherry picked from commit 5fa84c6ec176d186ddad25d31f8760e50f48157f) (cherry picked from commit 64cdd794b53ee2b00dd312f235087056c0398e34) --- contrib/unbound/README.md | 21 +- contrib/unbound/aclocal.m4 | 857 +- contrib/unbound/acx_nlnetlabs.m4 | 77 +- contrib/unbound/cachedb/cachedb.c | 108 +- contrib/unbound/cachedb/redis.c | 6 + contrib/unbound/compat/arc4random.c | 7 + contrib/unbound/compat/chacha_private.h | 4 +- contrib/unbound/compat/getentropy_linux.c | 20 + contrib/unbound/compat/gmtime_r.c | 5 +- contrib/unbound/config.h.in | 397 +- contrib/unbound/configure | 6522 ++++++--------- contrib/unbound/configure.ac | 123 +- contrib/unbound/contrib/README | 2 + contrib/unbound/contrib/gost12.patch | 325 + contrib/unbound/contrib/ios/install_openssl.sh | 12 +- contrib/unbound/contrib/ios/setenv_ios.sh | 5 + contrib/unbound/contrib/unbound.service.in | 2 +- .../unbound/contrib/unbound_portable.service.in | 2 +- contrib/unbound/daemon/daemon.c | 326 +- contrib/unbound/daemon/daemon.h | 41 + contrib/unbound/daemon/remote.c | 315 +- contrib/unbound/daemon/remote.h | 8 + contrib/unbound/daemon/stats.c | 6 + contrib/unbound/daemon/unbound.c | 51 +- contrib/unbound/daemon/worker.c | 258 +- contrib/unbound/dns64/dns64.c | 23 +- contrib/unbound/dnstap/dtstream.c | 16 +- contrib/unbound/dnstap/dtstream.h | 6 + contrib/unbound/dnstap/unbound-dnstap-socket.c | 28 +- contrib/unbound/doc/Changelog | 484 ++ contrib/unbound/doc/README | 2 +- contrib/unbound/doc/README.DNS64 | 6 +- contrib/unbound/doc/README.man | 11 +- contrib/unbound/doc/example.conf | 75 +- contrib/unbound/doc/example.conf.in | 75 +- contrib/unbound/doc/libunbound.3 | 6 +- contrib/unbound/doc/libunbound.3.in | 6 +- contrib/unbound/doc/unbound-anchor.8 | 21 +- contrib/unbound/doc/unbound-anchor.8.in | 21 +- contrib/unbound/doc/unbound-anchor.rst | 15 +- contrib/unbound/doc/unbound-checkconf.8 | 6 +- contrib/unbound/doc/unbound-checkconf.8.in | 6 +- contrib/unbound/doc/unbound-control.8 | 45 +- contrib/unbound/doc/unbound-control.8.in | 45 +- contrib/unbound/doc/unbound-control.rst | 34 + contrib/unbound/doc/unbound-host.1 | 6 +- contrib/unbound/doc/unbound-host.1.in | 6 +- contrib/unbound/doc/unbound.8 | 8 +- contrib/unbound/doc/unbound.8.in | 8 +- contrib/unbound/doc/unbound.conf.5 | 558 +- contrib/unbound/doc/unbound.conf.5.in | 558 +- contrib/unbound/doc/unbound.conf.rst | 524 +- contrib/unbound/doc/unbound.rst | 2 +- contrib/unbound/edns-subnet/subnetmod.c | 108 +- contrib/unbound/edns-subnet/subnetmod.h | 10 + contrib/unbound/install-sh | 178 +- contrib/unbound/ipsecmod/ipsecmod.c | 2 +- contrib/unbound/iterator/iter_fwd.c | 5 + contrib/unbound/iterator/iter_hints.c | 5 + contrib/unbound/iterator/iter_priv.c | 168 +- contrib/unbound/iterator/iter_scrub.c | 70 +- contrib/unbound/iterator/iter_utils.c | 50 +- contrib/unbound/iterator/iter_utils.h | 1 + contrib/unbound/iterator/iterator.c | 43 +- contrib/unbound/libunbound/unbound.h | 4 + contrib/unbound/ltmain.sh | 1566 ++-- contrib/unbound/pythonmod/interface.i | 1857 ----- contrib/unbound/pythonmod/pythonmod_utils.c | 201 - contrib/unbound/respip/respip.c | 9 +- contrib/unbound/services/authzone.c | 150 +- contrib/unbound/services/cache/dns.c | 110 +- contrib/unbound/services/cache/dns.h | 2 +- contrib/unbound/services/cache/infra.c | 3 +- contrib/unbound/services/cache/rrset.c | 37 +- contrib/unbound/services/listen_dnsport.c | 40 +- contrib/unbound/services/localzone.c | 179 +- contrib/unbound/services/localzone.h | 12 +- contrib/unbound/services/mesh.c | 130 +- contrib/unbound/services/mesh.h | 13 +- contrib/unbound/services/modstack.c | 7 +- contrib/unbound/services/outside_network.c | 65 +- contrib/unbound/services/outside_network.h | 7 + contrib/unbound/services/rpz.c | 1 + contrib/unbound/sldns/rrdef.h | 4 +- contrib/unbound/sldns/wire2str.c | 3 + contrib/unbound/smallapp/unbound-anchor.c | 12 +- contrib/unbound/smallapp/unbound-checkconf.c | 48 +- contrib/unbound/smallapp/unbound-control.c | 15 +- contrib/unbound/smallapp/unbound-host.c | 12 +- contrib/unbound/testcode/checklocks.c | 916 --- contrib/unbound/testcode/do-tests.sh | 76 - contrib/unbound/testcode/doqclient.c | 2764 ------- contrib/unbound/testcode/fake_event.c | 2044 ----- contrib/unbound/testcode/testbound.c | 788 -- contrib/unbound/testcode/unitdname.c | 1314 --- contrib/unbound/testcode/unitinfra.c | 210 - contrib/unbound/testcode/unitldns.c | 284 - contrib/unbound/testcode/unitmain.c | 1401 ---- contrib/unbound/testcode/unitmain.h | 92 - contrib/unbound/testcode/unitneg.c | 545 -- contrib/unbound/testcode/unitverify.c | 706 -- contrib/unbound/testcode/unitzonemd.c | 542 -- contrib/unbound/util/alloc.c | 2 +- contrib/unbound/util/config_file.c | 116 + contrib/unbound/util/config_file.h | 32 + contrib/unbound/util/configlexer.c | 8521 ++++++++++---------- contrib/unbound/util/configlexer.lex | 4 +- contrib/unbound/util/configparser.c | 4650 +++++------ contrib/unbound/util/configparser.h | 184 +- contrib/unbound/util/configparser.y | 53 +- contrib/unbound/util/data/msgencode.c | 58 +- contrib/unbound/util/data/msgencode.h | 4 +- contrib/unbound/util/data/msgparse.c | 12 + contrib/unbound/util/data/msgparse.h | 25 + contrib/unbound/util/data/msgreply.c | 72 +- contrib/unbound/util/data/msgreply.h | 28 +- contrib/unbound/util/data/packed_rrset.c | 36 +- contrib/unbound/util/data/packed_rrset.h | 3 + contrib/unbound/util/fptr_wlist.c | 7 +- contrib/unbound/util/fptr_wlist.h | 8 +- contrib/unbound/util/iana_ports.inc | 9 +- contrib/unbound/util/locks.h | 27 + contrib/unbound/util/log.c | 32 +- contrib/unbound/util/module.h | 19 +- contrib/unbound/util/net_help.c | 54 +- contrib/unbound/util/net_help.h | 12 +- contrib/unbound/util/netevent.c | 27 +- contrib/unbound/util/shm_side/shm_main.c | 219 +- contrib/unbound/util/shm_side/shm_main.h | 15 + contrib/unbound/util/timehist.h | 4 + contrib/unbound/validator/val_neg.c | 14 +- contrib/unbound/validator/val_sigcrypt.c | 12 + contrib/unbound/validator/val_sigcrypt.h | 2 +- contrib/unbound/validator/val_utils.c | 25 + contrib/unbound/validator/val_utils.h | 11 + contrib/unbound/validator/validator.c | 95 +- contrib/unbound/winrc/win_svc.c | 6 +- lib/libunbound/config.h | 403 +- 138 files changed, 16189 insertions(+), 27522 deletions(-) diff --git a/contrib/unbound/README.md b/contrib/unbound/README.md index 3bbd38b3b78b..d805e4d0a3d7 100644 --- a/contrib/unbound/README.md +++ b/contrib/unbound/README.md @@ -4,7 +4,7 @@ [![Packaging status](https://repology.org/badge/tiny-repos/unbound.svg)](https://repology.org/project/unbound/versions) [![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/unbound.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:unbound) [![Documentation Status](https://readthedocs.org/projects/unbound/badge/?version=latest)](https://unbound.readthedocs.io/en/latest/?badge=latest) -[![Mastodon Follow](https://img.shields.io/mastodon/follow/109262826617293067?domain=https%3A%2F%2Ffosstodon.org&style=social)](https://fosstodon.org/@nlnetlabs) +[![Mastodon Follow](https://img.shields.io/mastodon/follow/114692612288811644?domain=social.nlnetlabs.nl&style=social)](https://social.nlnetlabs.nl/@nlnetlabs) Unbound is a validating, recursive, caching DNS resolver. It is designed to be fast and lean and incorporates modern features based on open standards. If you @@ -25,18 +25,21 @@ Unbound can be compiled and installed using: ./configure && make && make install ``` -You can use libevent if you want. libevent is useful when using many (10000) -outgoing ports. By default max 256 ports are opened at the same time and the -builtin alternative is equally capable and a little faster. - +You can use libevent if you want. libevent is useful when using many (e.g., +10000) outgoing ports. Use the `--with-libevent` configure option to compile Unbound with libevent support. +If not, the default builtin alternative opens max 256 ports at the same time +and is equally capable and a little faster. + + ## Unbound configuration -All of Unbound's configuration options are described in the man pages, which -will be installed and are available on the Unbound -[documentation page](https://unbound.docs.nlnetlabs.nl/). +All of Unbound's configuration options are described in the `unbound.conf(5)` +man page, which will be installed and is also available on the Unbound +[documentation page](https://unbound.docs.nlnetlabs.nl/en/latest/manpages/unbound.conf.html) +for the latest version. -An example configuration file is located in +An example configuration file, with minimal documentation, is located in [doc/example.conf](https://github.com/NLnetLabs/unbound/blob/master/doc/example.conf.in). diff --git a/contrib/unbound/aclocal.m4 b/contrib/unbound/aclocal.m4 index 792090e178d6..bf3c57e2fd9f 100644 --- a/contrib/unbound/aclocal.m4 +++ b/contrib/unbound/aclocal.m4 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.17 -*- Autoconf -*- +# generated automatically by aclocal 1.16.2 -*- Autoconf -*- -# Copyright (C) 1996-2024 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,8 +14,7 @@ m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # -# Copyright (C) 1996-2001, 2003-2019, 2021-2024 Free Software -# Foundation, Inc. +# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives @@ -23,13 +22,13 @@ m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl -# Copyright (C) 2024 Free Software Foundation, Inc. +# Copyright (C) 2014 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# the Free Software Foundation; either version 2 of of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, if you @@ -46,7 +45,7 @@ m4_define([_LT_COPYING], [dnl # along with this program. If not, see . ]) -# serial 63 LT_INIT +# serial 58 LT_INIT # LT_PREREQ(VERSION) @@ -74,7 +73,7 @@ esac # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], -[AC_PREREQ([2.64])dnl We use AC_PATH_PROGS_FEATURE_CHECK +[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl @@ -196,7 +195,6 @@ m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl -m4_require([_LT_DECL_FILECMD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl @@ -235,8 +233,8 @@ esac ofile=libtool can_build_shared=yes -# All known linkers require a '.a' archive for static linking (except MSVC and -# ICC, which need '.lib'). +# All known linkers require a '.a' archive for static linking (except MSVC, +# which needs '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld @@ -624,7 +622,7 @@ m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before -# AC_OUTPUT is called), in case it is used in configure for compilation +# AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} @@ -659,9 +657,9 @@ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. -Copyright (C) 2024 Free Software Foundation, Inc. +Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." +gives unlimited permision to copy, distribute and modify it." while test 0 != $[#] do @@ -738,6 +736,7 @@ _LT_CONFIG_SAVE_COMMANDS([ cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. @@ -787,7 +786,7 @@ _LT_EOF # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? - $SED '$q' "$ltmain" >> "$cfgfile" \ + sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || @@ -980,7 +979,6 @@ _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE - # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ @@ -1031,21 +1029,6 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ rm -f conftest.* fi]) - # Feature test to disable chained fixups since it is not - # compatible with '-undefined dynamic_lookup' - AC_CACHE_CHECK([for -no_fixup_chains linker flag], - [lt_cv_support_no_fixup_chains], - [ save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS -Wl,-no_fixup_chains" - AC_LINK_IFELSE( - [AC_LANG_PROGRAM([],[])], - lt_cv_support_no_fixup_chains=yes, - lt_cv_support_no_fixup_chains=no - ) - LDFLAGS=$save_LDFLAGS - ] - ) - AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no @@ -1065,12 +1048,12 @@ int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD - echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD - $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD + echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD + $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF -int main(void) { return 0;} +int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err @@ -1090,37 +1073,23 @@ _LT_EOF _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - darwin*) - case $MACOSX_DEPLOYMENT_TARGET,$host in - 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - *) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' - if test yes = "$lt_cv_support_no_fixup_chains"; then - AS_VAR_APPEND([_lt_dar_allow_undefined], [' $wl-no_fixup_chains']) - fi - ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + 10.[[012]][[,.]]*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi - _lt_dar_needs_single_mod=no - case $host_os in - rhapsody* | darwin1.*) - _lt_dar_needs_single_mod=yes ;; - darwin*) - # When targeting Mac OS X 10.4 (darwin 8) or later, - # -single_module is the default and -multi_module is unsupported. - # The toolchain on macOS 10.14 (darwin 18) and later cannot - # target any OS version that needs -single_module. - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*-darwin[[567]].*|10.[[0-3]],*-darwin[[5-9]].*|10.[[0-3]],*-darwin1[[0-7]].*) - _lt_dar_needs_single_mod=yes ;; - esac - ;; - esac if test yes = "$lt_cv_ld_exported_symbols_list"; then _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else @@ -1163,12 +1132,12 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES], output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - _LT_TAGVAR(module_expsym_cmds, $1)="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" + _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" m4_if([$1], [CXX], -[ if test yes = "$_lt_dar_needs_single_mod" -a yes != "$lt_cv_apple_cc_single_mod"; then +[ if test yes != "$lt_cv_apple_cc_single_mod"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" - _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi ],[]) else @@ -1282,8 +1251,7 @@ _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], -[m4_require([_LT_DECL_SED])dnl -AC_MSG_CHECKING([for sysroot]) +[AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], [Search for dependent libraries within DIR (or the compiler's sysroot @@ -1296,13 +1264,11 @@ lt_sysroot= case $with_sysroot in #( yes) if test yes = "$GCC"; then - # Trim trailing / since we'll always append absolute paths and we want - # to avoid //, if only for less confusing output for the user. - lt_sysroot=`$CC --print-sysroot 2>/dev/null | $SED 's:/\+$::'` + lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) - lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( @@ -1332,7 +1298,7 @@ ia64-*-hpux*) # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - case `$FILECMD conftest.$ac_objext` in + case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; @@ -1349,7 +1315,7 @@ ia64-*-hpux*) echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test yes = "$lt_cv_prog_gnu_ld"; then - case `$FILECMD conftest.$ac_objext` in + case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; @@ -1361,7 +1327,7 @@ ia64-*-hpux*) ;; esac else - case `$FILECMD conftest.$ac_objext` in + case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; @@ -1383,7 +1349,7 @@ mips64*-*linux*) echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then emul=elf - case `$FILECMD conftest.$ac_objext` in + case `/usr/bin/file conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; @@ -1391,7 +1357,7 @@ mips64*-*linux*) emul="${emul}64" ;; esac - case `$FILECMD conftest.$ac_objext` in + case `/usr/bin/file conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; @@ -1399,7 +1365,7 @@ mips64*-*linux*) emul="${emul}ltsmip" ;; esac - case `$FILECMD conftest.$ac_objext` in + case `/usr/bin/file conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; @@ -1410,7 +1376,7 @@ mips64*-*linux*) ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*|x86_64-gnu*) +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when @@ -1419,14 +1385,14 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*|x86_64-gnu*) # not appear in the list. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - case `$FILECMD conftest.o` in + case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; - x86_64-*linux*|x86_64-gnu*) - case `$FILECMD conftest.o` in + x86_64-*linux*) + case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; @@ -1454,7 +1420,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*|x86_64-gnu*) x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; - x86_64-*linux*|x86_64-gnu*) + x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*linux*) @@ -1494,7 +1460,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*|x86_64-gnu*) # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - case `$FILECMD conftest.o` in + case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) @@ -1533,22 +1499,9 @@ need_locks=$enable_libtool_lock m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} +: ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) - -# Use ARFLAGS variable as AR's operation code to sync the variable naming with -# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have -# higher priority because that's what people were doing historically (setting -# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS -# variable obsoleted/removed. - -test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} -lt_ar_flags=$AR_FLAGS -_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) - -# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override -# by AR_FLAGS because that was never working and AR_FLAGS is about to die. -_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], - [Flags to create an archive]) +_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no @@ -1587,7 +1540,7 @@ AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) -AC_REQUIRE([AC_PROG_RANLIB]) +AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) @@ -1598,8 +1551,15 @@ old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then + case $host_os in + bitrig* | openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" + ;; + esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in @@ -1731,14 +1691,14 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; - gnu* | ironclad*) - # Under GNU Hurd and Ironclad, this test is not required because there - # is no limit to the length of command line arguments. + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; - cygwin* | mingw* | windows* | cegcc*) + cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, @@ -1760,7 +1720,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl lt_cv_sys_max_cmd_len=8192; ;; - darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) + bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` @@ -1803,7 +1763,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'` + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi @@ -1920,11 +1880,11 @@ else /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord (void) __attribute__((visibility("default"))); +int fnord () __attribute__((visibility("default"))); #endif -int fnord (void) { return 42; } -int main (void) +int fnord () { return 42; } +int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; @@ -1981,7 +1941,7 @@ else lt_cv_dlopen_self=yes ;; - mingw* | windows* | pw32* | cegcc*) + mingw* | pw32* | cegcc*) lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; @@ -2253,35 +2213,26 @@ m4_defun([_LT_CMD_STRIPLIB], striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) -if test -z "$STRIP"; then - AC_MSG_RESULT([no]) +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT([yes]) else - if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - old_striplib="$STRIP --strip-debug" - striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) - else - case $host_os in - darwin*) - # FIXME - insert some real tests, host_os isn't really good enough +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) - ;; - freebsd*) - if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then - old_striplib="$STRIP --strip-debug" - striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - ;; - *) + else AC_MSG_RESULT([no]) - ;; - esac - fi + fi + ;; + *) + AC_MSG_RESULT([no]) + ;; + esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) @@ -2349,7 +2300,7 @@ if test yes = "$GCC"; then *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in - mingw* | windows* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; + mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` @@ -2407,7 +2358,7 @@ BEGIN {RS = " "; FS = "/|\n";} { # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in - mingw* | windows* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ + mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` @@ -2482,7 +2433,7 @@ aix[[4-9]]*) # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl - # linker flag in LDFLAGS as well, or --enable-aix-soname=svr4 only. + # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the @@ -2576,7 +2527,7 @@ bsdi[[45]]*) # libtool to hard-code these into programs ;; -cygwin* | mingw* | windows* | pw32* | cegcc*) +cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no @@ -2587,29 +2538,15 @@ cygwin* | mingw* | windows* | pw32* | cegcc*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds - # If user builds GCC with multilib enabled, - # it should just install on $(libdir) - # not on $(libdir)/../bin or 32 bits dlls would override 64 bit ones. - if test xyes = x"$multilib"; then - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - $install_prog $dir/$dlname $destdir/$dlname~ - chmod a+x $destdir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib $destdir/$dlname'\'' || exit \$?; - fi' - else - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - fi + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' @@ -2618,30 +2555,30 @@ cygwin* | mingw* | windows* | pw32* | cegcc*) case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' + soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; - mingw* | windows* | cegcc*) + mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' + library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; - *,cl* | *,icl*) - # Native MSVC or ICC + *,cl*) + # Native MSVC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in - mingw* | windows*) + mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' @@ -2654,7 +2591,7 @@ m4_if([$1], [],[ done IFS=$lt_save_ifs # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form @@ -2691,7 +2628,7 @@ m4_if([$1], [],[ ;; *) - # Assume MSVC and ICC wrapper + # Assume MSVC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; @@ -2724,7 +2661,7 @@ dgux*) shlibpath_var=LD_LIBRARY_PATH ;; -freebsd* | dragonfly* | midnightbsd*) +freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then @@ -2748,21 +2685,7 @@ freebsd* | dragonfly* | midnightbsd*) need_version=yes ;; esac - case $host_cpu in - powerpc64) - # On FreeBSD bi-arch platforms, a different variable is used for 32-bit - # binaries. See . - AC_COMPILE_IFELSE( - [AC_LANG_SOURCE( - [[int test_pointer_size[sizeof (void *) - 5]; - ]])], - [shlibpath_var=LD_LIBRARY_PATH], - [shlibpath_var=LD_32_LIBRARY_PATH]) - ;; - *) - shlibpath_var=LD_LIBRARY_PATH - ;; - esac + shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes @@ -2792,9 +2715,8 @@ haiku*) soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/boot/system/non-packaged/develop/lib /boot/system/develop/lib' - sys_lib_dlsearch_path_spec='/boot/home/config/non-packaged/lib /boot/home/config/lib /boot/system/non-packaged/lib /boot/system/lib' - hardcode_into_libs=no + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) @@ -2904,7 +2826,7 @@ linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no - library_names_spec='$libname$release$shared_ext $libname$shared_ext' + library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH @@ -2916,9 +2838,8 @@ linux*android*) hardcode_into_libs=yes dynamic_linker='Android linker' - # -rpath works at least for libraries that are not overridden by - # libraries installed in system locations. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + # Don't embed -rpath directories since the linker doesn't support them. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ;; # This must be glibc/ELF. @@ -2955,7 +2876,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) # Add ABI-specific directories to the system library path. sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" - # Ideally, we could use ldconfig to report *all* directories which are + # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, @@ -2975,18 +2896,6 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) dynamic_linker='GNU/Linux ld.so' ;; -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; - netbsd*) version_type=sunos need_lib_prefix=no @@ -3005,18 +2914,6 @@ netbsd*) hardcode_into_libs=yes ;; -*-mlibc) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='mlibc ld.so' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' @@ -3036,7 +2933,7 @@ newsos6) dynamic_linker='ldqnx.so' ;; -openbsd*) +openbsd* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no @@ -3096,17 +2993,6 @@ rdos*) dynamic_linker=no ;; -serenity*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - dynamic_linker='SerenityOS LibELF' - ;; - *** 65013 LINES SKIPPED *** From nobody Thu May 28 22:16:03 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRLRY0gJnz6fQt5 for ; Thu, 28 May 2026 22:16:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRLRR5Y8dz3LBK for ; Thu, 28 May 2026 22:16:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780006563; 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=xMgw6bOSmZDGo8lkdiDOtxF6qMEW79VMOTGEGxuth+0=; b=FArES1HQ5TGVkmyPva8yvJ/cy1To7D3ku492z1AVz/Up8YKUkQJZsR9FKp4dOTfACl/YDx C6tlyoIZRDkd5ac2HGD7LIrhml/s9ASCDlbAx1OsYX/aJb+vvpoMmqR7qDn2Fvf77hxN+G yE81y8kMiyf2KsdVCVsoPezlEogoxumKflTEdzah3u6frvBOgwih1hx6tnbfZwuqLepfk3 D5BxZE1bEQwInFx6xpU5KYcAD1x/FDKbGiuhX5/ZXDbvKQR2NeN9yBGT3dSYBwwHWlmWVJ vXJZgwUXRMJiOq7fZEYIEO/ClUioGH6LKI91cpWqL2+UZ3ch4f3lwEhrImTg7A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780006563; a=rsa-sha256; cv=none; b=wzirpVeVDxYiSGa9lutAZ7QnXLsxNtaVZngeQlxmPsnxe9NMy6LAVtbQKNmhmLbUNfe6O/ r4V3nUyGsZ0/oDyIkwLeUSTVv0/yDo54ywqRuhQM/XjjP1EgldHu2BMj1VvfLEJUAdj96q 85weQtGAY5rSRMoWeyWR/FbVLl3g2HUDBSGGZA1PPhc1/a+qjvzTiYH3XbF7Ynd8OZ3ppo qJLFxRDLa8zhL6yJyjWsgeM3DX5qUACjhbJU+bzVWBuMjvWstd26V9tSS2boNBfiQm8VBW K4zqqSgT8vvp/oTmt4XgYdgZYkeZzek/Njt8zQWgmSRf0UUXsGcn13aj2OLFkg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780006563; 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=xMgw6bOSmZDGo8lkdiDOtxF6qMEW79VMOTGEGxuth+0=; b=T0cRHCWkdXxCsHQn+0JgG6lbzZDehexjtLX73cdfIhQaKJzWdrWQfcuVlnY9xyp5oU3oOM m9KfojfnBWyD9xM2Tnt6M+rLGb3yPMNG3fFStaOf3/mmUzHuFTjIFIyhwfQ+BKDZHbTB0H x9G+wwBRvUuRnXMBAB0E6HNAoe/yUTP6SmkDDp3g3cO/kAWH/JyyeuFVLtpOtPdSpdEUVL RrRAoSoOxI5xprEcthtGHccRHTz4Z5j6FvNkYxrQ1rJZMmUHy05cFGBi0yDbhTJBRpjCQm Z6/uPUV1JT9CilBv0HPxStElOWEI8ucpLS3EVX6M5+RQgp8uN81IFyg8UboB3w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRLRR52Nxz14xN for ; Thu, 28 May 2026 22:16:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c8aa by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 22:16:03 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav From: Colin Percival Subject: git: 4168e282e55e - releng/15.1 - unbound: Regenerate for 1.24.1 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.1 X-Git-Reftype: branch X-Git-Commit: 4168e282e55e7d9e2c1aeb1405c7a2801837bcf8 Auto-Submitted: auto-generated Date: Thu, 28 May 2026 22:16:03 +0000 Message-Id: <6a18bea3.3c8aa.3dc4fe53@gitrepo.freebsd.org> The branch releng/15.1 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=4168e282e55e7d9e2c1aeb1405c7a2801837bcf8 commit 4168e282e55e7d9e2c1aeb1405c7a2801837bcf8 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-22 20:04:22 +0000 Commit: Colin Percival CommitDate: 2026-05-28 22:15:17 +0000 unbound: Regenerate for 1.24.1 No functional changes intended. Approved by: re (cperciva) Fixes: 8b29c373e6ab ("unbound: Vendor import 1.24.1") (cherry picked from commit 290190b26c09c307a9cd70703fa20ad2b2b600a6) (cherry picked from commit d8a5915d22c894ca59c246394f2582185a2d61f8) --- contrib/unbound/doc/example.conf | 14 +- contrib/unbound/doc/libunbound.3 | 675 ++- contrib/unbound/doc/unbound-anchor.8 | 383 +- contrib/unbound/doc/unbound-checkconf.8 | 121 +- contrib/unbound/doc/unbound-control.8 | 2038 +++++--- contrib/unbound/doc/unbound-host.1 | 242 +- contrib/unbound/doc/unbound.8 | 169 +- contrib/unbound/doc/unbound.conf.5 | 8152 ++++++++++++++++++++----------- lib/libunbound/config.h | 24 +- 9 files changed, 7568 insertions(+), 4250 deletions(-) diff --git a/contrib/unbound/doc/example.conf b/contrib/unbound/doc/example.conf index 3a5188f00477..56bb3247b20e 100644 --- a/contrib/unbound/doc/example.conf +++ b/contrib/unbound/doc/example.conf @@ -1,7 +1,7 @@ # # Example configuration file. # -# See unbound.conf(5) man page, version 1.23.1. +# See unbound.conf(5) man page, version 1.24.1. # # this is a comment. @@ -116,8 +116,8 @@ server: # so-rcvbuf: 0 # buffer size for UDP port 53 outgoing (SO_SNDBUF socket option). - # 0 is system default. Use 4m to handle spikes on very busy servers. - # so-sndbuf: 0 + # 0 is system default. Set larger to handle spikes on very busy servers. + # so-sndbuf: 4m # use SO_REUSEPORT to distribute queries over threads. # at extreme load it could be better to turn it off to distribute even. @@ -163,7 +163,7 @@ server: # msg-cache-slabs: 4 # the number of queries that a thread gets to service. - # num-queries-per-thread: 1024 + # num-queries-per-thread: 2048 # if very busy, 50% queries run to completion, 50% get timeout in msec # jostle-timeout: 200 @@ -196,6 +196,10 @@ server: # Limit on upstream queries for an incoming query and its recursion. # max-global-quota: 200 + # Should the scrubber remove promiscuous NS from positive answers, + # protects against poison attempts. + # iter-scrub-promiscuous: yes + # msec for waiting for an unknown server to reply. Increase if you # are behind a slow satellite link, to eg. 1128. # unknown-server-time-limit: 376 @@ -279,7 +283,7 @@ server: # do-ip6: yes # If running unbound on an IPv6-only host, domains that only have - # IPv4 servers would become unresolveable. If NAT64 is available in + # IPv4 servers would become unresolvable. If NAT64 is available in # the network, unbound can use NAT64 to reach these servers with # the following option. This is NOT needed for enabling DNS64 on a # system that has IPv4 connectivity. diff --git a/contrib/unbound/doc/libunbound.3 b/contrib/unbound/doc/libunbound.3 index 8ef33b0998a2..681c141fcd76 100644 --- a/contrib/unbound/doc/libunbound.3 +++ b/contrib/unbound/doc/libunbound.3 @@ -1,335 +1,306 @@ -.TH "libunbound" "3" "Jul 16, 2025" "NLnet Labs" "unbound 1.23.1" -.\" -.\" libunbound.3 -- unbound library functions manual -.\" -.\" Copyright (c) 2007, NLnet Labs. All rights reserved. -.\" -.\" See LICENSE for the license. -.\" -.\" -.SH "NAME" -.B libunbound, -.B unbound.h, -.B ub_ctx, -.B ub_result, -.B ub_callback_type, -.B ub_ctx_create, -.B ub_ctx_delete, -.B ub_ctx_set_option, -.B ub_ctx_get_option, -.B ub_ctx_config, -.B ub_ctx_set_fwd, -.B ub_ctx_set_stub, -.B ub_ctx_set_tls, -.B ub_ctx_resolvconf, -.B ub_ctx_hosts, -.B ub_ctx_add_ta, -.B ub_ctx_add_ta_autr, -.B ub_ctx_add_ta_file, -.B ub_ctx_trustedkeys, -.B ub_ctx_debugout, -.B ub_ctx_debuglevel, -.B ub_ctx_async, -.B ub_poll, -.B ub_wait, -.B ub_fd, -.B ub_process, -.B ub_resolve, -.B ub_resolve_async, -.B ub_cancel, -.B ub_resolve_free, -.B ub_strerror, -.B ub_ctx_print_local_zones, -.B ub_ctx_zone_add, -.B ub_ctx_zone_remove, -.B ub_ctx_data_add, -.B ub_ctx_data_remove -\- Unbound DNS validating resolver 1.23.1 functions. -.SH "SYNOPSIS" -.B #include -.LP -\fIstruct ub_ctx *\fR -\fBub_ctx_create\fR(\fIvoid\fR); -.LP -\fIvoid\fR -\fBub_ctx_delete\fR(\fIstruct ub_ctx*\fR ctx); -.LP -\fIint\fR -\fBub_ctx_set_option\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR opt, \fIchar*\fR val); -.LP -\fIint\fR -\fBub_ctx_get_option\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR opt, \fIchar**\fR val); -.LP -\fIint\fR -\fBub_ctx_config\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR fname); -.LP -\fIint\fR -\fBub_ctx_set_fwd\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR addr); -.LP -\fIint\fR -\fBub_ctx_set_stub\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR zone, -\fIchar*\fR addr, -.br - \fIint\fR isprime); -.LP -\fIint\fR -\fBub_ctx_set_tls\fR(\fIstruct ub_ctx*\fR ctx, \fIint\fR tls); -.LP -\fIint\fR -\fBub_ctx_resolvconf\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR fname); -.LP -\fIint\fR -\fBub_ctx_hosts\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR fname); -.LP -\fIint\fR -\fBub_ctx_add_ta\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR ta); -.LP -\fIint\fR -\fBub_ctx_add_ta_autr\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR fname); -.LP -\fIint\fR -\fBub_ctx_add_ta_file\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR fname); -.LP -\fIint\fR -\fBub_ctx_trustedkeys\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR fname); -.LP -\fIint\fR -\fBub_ctx_debugout\fR(\fIstruct ub_ctx*\fR ctx, \fIFILE*\fR out); -.LP -\fIint\fR -\fBub_ctx_debuglevel\fR(\fIstruct ub_ctx*\fR ctx, \fIint\fR d); -.LP -\fIint\fR -\fBub_ctx_async\fR(\fIstruct ub_ctx*\fR ctx, \fIint\fR dothread); -.LP -\fIint\fR -\fBub_poll\fR(\fIstruct ub_ctx*\fR ctx); -.LP -\fIint\fR -\fBub_wait\fR(\fIstruct ub_ctx*\fR ctx); -.LP -\fIint\fR -\fBub_fd\fR(\fIstruct ub_ctx*\fR ctx); -.LP -\fIint\fR -\fBub_process\fR(\fIstruct ub_ctx*\fR ctx); -.LP -\fIint\fR -\fBub_resolve\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR name, -.br - \fIint\fR rrtype, \fIint\fR rrclass, \fIstruct ub_result**\fR result); -.LP -\fIint\fR -\fBub_resolve_async\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR name, -.br - \fIint\fR rrtype, \fIint\fR rrclass, \fIvoid*\fR mydata, -.br - \fIub_callback_type\fR callback, \fIint*\fR async_id); -.LP -\fIint\fR -\fBub_cancel\fR(\fIstruct ub_ctx*\fR ctx, \fIint\fR async_id); -.LP -\fIvoid\fR -\fBub_resolve_free\fR(\fIstruct ub_result*\fR result); -.LP -\fIconst char *\fR -\fBub_strerror\fR(\fIint\fR err); -.LP -\fIint\fR -\fBub_ctx_print_local_zones\fR(\fIstruct ub_ctx*\fR ctx); -.LP -\fIint\fR -\fBub_ctx_zone_add\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR zone_name, \fIchar*\fR zone_type); -.LP -\fIint\fR -\fBub_ctx_zone_remove\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR zone_name); -.LP -\fIint\fR -\fBub_ctx_data_add\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR data); -.LP -\fIint\fR -\fBub_ctx_data_remove\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR data); -.SH "DESCRIPTION" -.B Unbound -is an implementation of a DNS resolver, that does caching and -DNSSEC validation. This is the library API, for using the \-lunbound library. -The server daemon is described in \fIunbound\fR(8). -The library works independent from a running unbound server, and -can be used to convert hostnames to ip addresses, and back, -and obtain other information from the DNS. The library performs public\-key -validation of results with DNSSEC. -.P -The library uses a variable of type \fIstruct ub_ctx\fR to keep context -between calls. The user must maintain it, creating it with -.B ub_ctx_create -and deleting it with -.B ub_ctx_delete\fR. -It can be created and deleted at any time. Creating it anew removes any -previous configuration (such as trusted keys) and clears any cached results. -.P -The functions are thread\-safe, and a context can be used in a threaded (as -well as in a non\-threaded) environment. Also resolution (and validation) -can be performed blocking and non\-blocking (also called asynchronous). -The async method returns from the call immediately, so that processing -can go on, while the results become available later. -.P +.\" Man page generated from reStructuredText. +. +. +.nr rst2man-indent-level 0 +. +.de1 rstReportMargin +\\$1 \\n[an-margin] +level \\n[rst2man-indent-level] +level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] +- +\\n[rst2man-indent0] +\\n[rst2man-indent1] +\\n[rst2man-indent2] +.. +.de1 INDENT +.\" .rstReportMargin pre: +. RS \\$1 +. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] +. nr rst2man-indent-level +1 +.\" .rstReportMargin post: +.. +.de UNINDENT +. RE +.\" indent \\n[an-margin] +.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] +.nr rst2man-indent-level -1 +.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] +.in \\n[rst2man-indent\\n[rst2man-indent-level]]u +.. +.TH "LIBUNBOUND" "3" "Oct 22, 2025" "1.24.1" "Unbound" +.SH NAME +libunbound \- Unbound DNS validating resolver 1.24.1 functions. +.SH SYNOPSIS +.sp +\fB#include \fP +.sp +struct ub_ctx * \fBub_ctx_create\fP(void); +.sp +void \fBub_ctx_delete\fP(struct ub_ctx* ctx); +.sp +int \fBub_ctx_set_option\fP(struct ub_ctx* ctx, char* opt, char* val); +.sp +int \fBub_ctx_get_option\fP(struct ub_ctx* ctx, char* opt, char** val); +.sp +int \fBub_ctx_config\fP(struct ub_ctx* ctx, char* fname); +.sp +int \fBub_ctx_set_fwd\fP(struct ub_ctx* ctx, char* addr); +.INDENT 0.0 +.TP +int \fBub_ctx_set_stub\fP(struct ub_ctx* ctx, char* zone, char* addr, +int isprime); +.UNINDENT +.sp +int \fBub_ctx_set_tls\fP(struct ub_ctx* ctx, int tls); +.sp +int \fBub_ctx_resolvconf\fP(struct ub_ctx* ctx, char* fname); +.sp +int \fBub_ctx_hosts\fP(struct ub_ctx* ctx, char* fname); +.sp +int \fBub_ctx_add_ta\fP(struct ub_ctx* ctx, char* ta); +.sp +int \fBub_ctx_add_ta_autr\fP(struct ub_ctx* ctx, char* fname); +.sp +int \fBub_ctx_add_ta_file\fP(struct ub_ctx* ctx, char* fname); +.sp +int \fBub_ctx_trustedkeys\fP(struct ub_ctx* ctx, char* fname); +.sp +int \fBub_ctx_debugout\fP(struct ub_ctx* ctx, FILE* out); +.sp +int \fBub_ctx_debuglevel\fP(struct ub_ctx* ctx, int d); +.sp +int \fBub_ctx_async\fP(struct ub_ctx* ctx, int dothread); +.sp +int \fBub_poll\fP(struct ub_ctx* ctx); +.sp +int \fBub_wait\fP(struct ub_ctx* ctx); +.sp +int \fBub_fd\fP(struct ub_ctx* ctx); +.sp +int \fBub_process\fP(struct ub_ctx* ctx); +.INDENT 0.0 +.TP +int \fBub_resolve\fP(struct ub_ctx* ctx, char* name, +int rrtype, int rrclass, struct ub_result** result); +.TP +int \fBub_resolve_async\fP(struct ub_ctx* ctx, char* name, +int rrtype, int rrclass, void* mydata, +ub_callback_type* callback, int* async_id); +.UNINDENT +.sp +int \fBub_cancel\fP(struct ub_ctx* ctx, int async_id); +.sp +void \fBub_resolve_free\fP(struct ub_result* result); +.sp +const char * \fBub_strerror\fP(int err); +.sp +int \fBub_ctx_print_local_zones\fP(struct ub_ctx* ctx); +.sp +int \fBub_ctx_zone_add\fP(struct ub_ctx* ctx, char* zone_name, char* zone_type); +.sp +int \fBub_ctx_zone_remove\fP(struct ub_ctx* ctx, char* zone_name); +.sp +int \fBub_ctx_data_add\fP(struct ub_ctx* ctx, char* data); +.sp +int \fBub_ctx_data_remove\fP(struct ub_ctx* ctx, char* data); +.SH DESCRIPTION +.sp +Unbound is an implementation of a DNS resolver, that does caching and DNSSEC +validation. +This is the library API, for using the \fB\-lunbound\fP library. +The server daemon is described in \fI\%unbound(8)\fP\&. +The library works independent from a running unbound server, and can be used to +convert hostnames to ip addresses, and back, and obtain other information from +the DNS. +The library performs public\-key validation of results with DNSSEC. +.sp +The library uses a variable of type \fIstruct ub_ctx\fP to keep context between +calls. +The user must maintain it, creating it with \fBub_ctx_create\fP and deleting it +with \fBub_ctx_delete\fP\&. +It can be created and deleted at any time. +Creating it anew removes any previous configuration (such as trusted keys) and +clears any cached results. +.sp +The functions are thread\-safe, and a context can be used in a threaded (as well +as in a non\-threaded) environment. +Also resolution (and validation) can be performed blocking and non\-blocking +(also called asynchronous). +The async method returns from the call immediately, so that processing can go +on, while the results become available later. +.sp The functions are discussed in turn below. -.SH "FUNCTIONS" -.TP +.SH FUNCTIONS +.INDENT 0.0 +.TP .B ub_ctx_create Create a new context, initialised with defaults. -The information from /etc/resolv.conf and /etc/hosts is not utilised -by default. Use -.B ub_ctx_resolvconf -and -.B ub_ctx_hosts -to read them. -Before you call this, use the openssl functions CRYPTO_set_id_callback and -CRYPTO_set_locking_callback to set up asynchronous operation if you use -lib openssl (the application calls these functions once for initialisation). -Openssl 1.0.0 or later uses the CRYPTO_THREADID_set_callback function. +The information from \fB/etc/resolv.conf\fP and \fB/etc/hosts\fP is +not utilised by default. +Use \fBub_ctx_resolvconf\fP and \fBub_ctx_hosts\fP to read them. +Before you call this, use the openssl functions +\fBCRYPTO_set_id_callback\fP and \fBCRYPTO_set_locking_callback\fP to set +up asynchronous operation if you use lib openssl (the application calls +these functions once for initialisation). +Openssl 1.0.0 or later uses the \fBCRYPTO_THREADID_set_callback\fP +function. .TP .B ub_ctx_delete Delete validation context and free associated resources. -Outstanding async queries are killed and callbacks are not called for them. +Outstanding async queries are killed and callbacks are not called for +them. .TP .B ub_ctx_set_option -A power\-user interface that lets you specify one of the options from the -config file format, see \fIunbound.conf\fR(5). Not all options are -relevant. For some specific options, such as adding trust anchors, special -routines exist. Pass the option name with the trailing ':'. +A power\-user interface that lets you specify one of the options from +the config file format, see \fI\%unbound.conf(5)\fP\&. +Not all options are relevant. +For some specific options, such as adding trust anchors, special +routines exist. +Pass the option name with the trailing \fB\(aq:\(aq\fP\&. .TP .B ub_ctx_get_option -A power\-user interface that gets an option value. Some options cannot be -gotten, and others return a newline separated list. Pass the option name -without trailing ':'. The returned value must be free(2)d by the caller. +A power\-user interface that gets an option value. +Some options cannot be gotten, and others return a newline separated +list. +Pass the option name without trailing \fB\(aq:\(aq\fP\&. +The returned value must be free(2)d by the caller. .TP .B ub_ctx_config -A power\-user interface that lets you specify an unbound config file, see -\fIunbound.conf\fR(5), which is read for configuration. Not all options are -relevant. For some specific options, such as adding trust anchors, special -routines exist. This function is thread\-safe only if a single instance of -ub_ctx* exists in the application. If several instances exist the -application has to ensure that ub_ctx_config is not called in parallel by -the different instances. +A power\-user interface that lets you specify an unbound config file, +see \fI\%unbound.conf(5)\fP, which is read for +configuration. +Not all options are relevant. +For some specific options, such as adding trust anchors, special +routines exist. +This function is thread\-safe only if a single instance of \fBub_ctx\fP* +exists in the application. +If several instances exist the application has to ensure that +\fBub_ctx_config\fP is not called in parallel by the different instances. .TP .B ub_ctx_set_fwd -Set machine to forward DNS queries to, the caching resolver to use. -IP4 or IP6 address. Forwards all DNS requests to that machine, which -is expected to run a recursive resolver. If the proxy is not -DNSSEC capable, validation may fail. Can be called several times, in -that case the addresses are used as backup servers. -At this time it is only possible to set configuration before the -first resolve is done. +Set machine to forward DNS queries to, the caching resolver to use. +IP4 or IP6 address. +Forwards all DNS requests to that machine, which is expected to run a +recursive resolver. +If the proxy is not DNSSEC capable, validation may fail. +Can be called several times, in that case the addresses are used as +backup servers. +At this time it is only possible to set configuration before the first +resolve is done. .TP .B ub_ctx_set_stub -Set a stub zone, authoritative dns servers to use for a particular zone. -IP4 or IP6 address. If the address is NULL the stub entry is removed. -Set isprime true if you configure root hints with it. Otherwise similar to -the stub zone item from unbound's config file. Can be called several times, -for different zones, or to add multiple addresses for a particular zone. -At this time it is only possible to set configuration before the -first resolve is done. +Set a stub zone, authoritative dns servers to use for a particular +zone. +IP4 or IP6 address. +If the address is NULL the stub entry is removed. +Set isprime true if you configure root hints with it. +Otherwise similar to the stub zone item from unbound\(aqs config file. +Can be called several times, for different zones, or to add multiple +addresses for a particular zone. +At this time it is only possible to set configuration before the first +resolve is done. .TP .B ub_ctx_set_tls -Enable DNS over TLS (DoT) for machines set with -.B ub_ctx_set_fwd. -At this time it is only possible to set configuration before the -first resolve is done. +Enable DNS over TLS (DoT) for machines set with \fBub_ctx_set_fwd\fP\&. +At this time it is only possible to set configuration before the first +resolve is done. .TP .B ub_ctx_resolvconf -By default the root servers are queried and full resolver mode is used, but -you can use this call to read the list of nameservers to use from the -filename given. -Usually "/etc/resolv.conf". Uses those nameservers as caching proxies. +By default the root servers are queried and full resolver mode is used, +but you can use this call to read the list of nameservers to use from +the filename given. +Usually \fB\(dq/etc/resolv.conf\(dq\fP\&. +Uses those nameservers as caching proxies. If they do not support DNSSEC, validation may fail. Only nameservers are picked up, the searchdomain, ndots and other -settings from \fIresolv.conf\fR(5) are ignored. -If fname NULL is passed, "/etc/resolv.conf" is used (if on Windows, -the system\-wide configured nameserver is picked instead). -At this time it is only possible to set configuration before the -first resolve is done. +settings from \fIresolv.conf(5)\fP are ignored. +If fname NULL is passed, \fB\(dq/etc/resolv.conf\(dq\fP is used (if on +Windows, the system\-wide configured nameserver is picked instead). +At this time it is only possible to set configuration before the first +resolve is done. .TP .B ub_ctx_hosts Read list of hosts from the filename given. -Usually "/etc/hosts". When queried for, these addresses are not marked -DNSSEC secure. If fname NULL is passed, "/etc/hosts" is used -(if on Windows, etc/hosts from WINDIR is picked instead). -At this time it is only possible to set configuration before the -first resolve is done. -.TP -.B -ub_ctx_add_ta +Usually \fB\(dq/etc/hosts\(dq\fP\&. +When queried for, these addresses are not marked DNSSEC secure. +If fname NULL is passed, \fB\(dq/etc/hosts\(dq\fP is used (if on Windows, +\fBetc/hosts\fP from WINDIR is picked instead). +At this time it is only possible to set configuration before the first +resolve is done. +.TP +.B ub_ctx_add_ta Add a trust anchor to the given context. -At this time it is only possible to add trusted keys before the -first resolve is done. +At this time it is only possible to add trusted keys before the first +resolve is done. The format is a string, similar to the zone\-file format, -[domainname] [type] [rdata contents]. Both DS and DNSKEY records are accepted. +\fB[domainname]\fP \fB[type]\fP \fB[rdata contents]\fP\&. +Both DS and DNSKEY records are accepted. .TP .B ub_ctx_add_ta_autr -Add filename with automatically tracked trust anchor to the given context. -Pass name of a file with the managed trust anchor. You can create this -file with \fIunbound\-anchor\fR(8) for the root anchor. You can also -create it with an initial file with one line with a DNSKEY or DS record. +Add filename with automatically tracked trust anchor to the given +context. +Pass name of a file with the managed trust anchor. +You can create this file with +\fI\%unbound\-anchor(8)\fP for the root anchor. +You can also create it with an initial file with one line with a DNSKEY +or DS record. If the file is writable, it is updated when the trust anchor changes. -At this time it is only possible to add trusted keys before the -first resolve is done. +At this time it is only possible to add trusted keys before the first +resolve is done. .TP .B ub_ctx_add_ta_file Add trust anchors to the given context. Pass name of a file with DS and DNSKEY records in zone file format. -At this time it is only possible to add trusted keys before the -first resolve is done. +At this time it is only possible to add trusted keys before the first +resolve is done. .TP .B ub_ctx_trustedkeys Add trust anchors to the given context. -Pass the name of a bind\-style config file with trusted\-keys{}. -At this time it is only possible to add trusted keys before the -first resolve is done. +Pass the name of a bind\-style config file with \fBtrusted\-keys{}\fP\&. +At this time it is only possible to add trusted keys before the first +resolve is done. .TP .B ub_ctx_debugout -Set debug and error log output to the given stream. Pass NULL to disable -output. Default is stderr. File\-names or using syslog can be enabled -using config options, this routine is for using your own stream. +Set debug and error log output to the given stream. +Pass NULL to disable output. +Default is stderr. +File\-names or using syslog can be enabled using config options, this +routine is for using your own stream. .TP .B ub_ctx_debuglevel -Set debug verbosity for the context. Output is directed to stderr. +Set debug verbosity for the context. +Output is directed to stderr. Higher debug level gives more output. .TP .B ub_ctx_async Set a context behaviour for asynchronous action. -if set to true, enables threading and a call to -.B ub_resolve_async +if set to true, enables threading and a call to \fBub_resolve_async\fP creates a thread to handle work in the background. If false, a process is forked to handle work in the background. -Changes to this setting after -.B ub_resolve_async -calls have been made have no effect (delete and re\-create the context -to change). +Changes to this setting after \fBub_resolve_async\fP calls have been made +have no effect (delete and re\-create the context to change). .TP .B ub_poll Poll a context to see if it has any new results. -Do not poll in a loop, instead extract the fd below to poll for readiness, -and then check, or wait using the wait routine. +Do not poll in a loop, instead extract the \fBfd\fP below to poll for +readiness, and then check, or wait using the wait routine. Returns 0 if nothing to read, or nonzero if a result is available. -If nonzero, call -.B ub_process -to do callbacks. +If nonzero, call \fBub_process\fP to do callbacks. .TP .B ub_wait -Wait for a context to finish with results. Calls -.B ub_process -after the wait for you. After the wait, there are no more outstanding -asynchronous queries. +Wait for a context to finish with results. +Calls \fBub_process\fP after the wait for you. +After the wait, there are no more outstanding asynchronous queries. .TP .B ub_fd -Get file descriptor. Wait for it to become readable, at this point -answers are returned from the asynchronous validating resolver. -Then call the \fBub_process\fR to continue processing. +Get file descriptor. +Wait for it to become readable, at this point answers are returned from +the asynchronous validating resolver. +Then call the \fBub_process\fP to continue processing. .TP .B ub_process Call this routine to continue processing results from the validating -resolver (when the fd becomes readable). +resolver (when the \fBfd\fP becomes readable). Will perform necessary callbacks. .TP .B ub_resolve @@ -340,95 +311,111 @@ The result structure is newly allocated with the resulting data. .TP .B ub_resolve_async Perform asynchronous resolution and validation of the target name. -Arguments mean the same as for \fBub_resolve\fR except no -data is returned immediately, instead a callback is called later. -The callback receives a copy of the mydata pointer, that you can use to pass -information to the callback. The callback type is a function pointer to -a function declared as -.IP -void my_callback_function(void* my_arg, int err, -.br - struct ub_result* result); -.IP -The async_id is returned so you can (at your option) decide to track it -and cancel the request if needed. If you pass a NULL pointer the async_id -is not returned. +Arguments mean the same as for \fBub_resolve\fP except no data is +returned immediately, instead a callback is called later. +The callback receives a copy of the mydata pointer, that you can use to +pass information to the callback. +The callback type is a function pointer to a function declared as: +.INDENT 7.0 +.INDENT 3.5 +.sp +.nf +.ft C +void my_callback_function(void* my_arg, int err, + struct ub_result* result); +.ft P +.fi +.UNINDENT +.UNINDENT +.sp +The \fBasync_id\fP is returned so you can (at your option) decide to +track it and cancel the request if needed. +If you pass a NULL pointer the \fBasync_id\fP is not returned. .TP .B ub_cancel -Cancel an async query in progress. This may return an error if the query -does not exist, or the query is already being delivered, in that case you -may still get a callback for the query. +Cancel an async query in progress. +This may return an error if the query does not exist, or the query is +already being delivered, in that case you may still get a callback for +the query. .TP .B ub_resolve_free -Free struct ub_result contents after use. +Free struct \fBub_result\fP contents after use. .TP .B ub_strerror -Convert error value from one of the unbound library functions -to a human readable string. +Convert error value from one of the unbound library functions to a +human readable string. .TP .B ub_ctx_print_local_zones Debug printout the local authority information to debug output. .TP .B ub_ctx_zone_add -Add new zone to local authority info, like local\-zone \fIunbound.conf\fR(5) -statement. +Add new zone to local authority info, like local\-zone +\fI\%unbound.conf(5)\fP statement. .TP .B ub_ctx_zone_remove Delete zone from local authority info. .TP .B ub_ctx_data_add Add resource record data to local authority info, like local\-data -\fIunbound.conf\fR(5) statement. +\fI\%unbound.conf(5)\fP statement. .TP .B ub_ctx_data_remove Delete local authority data from the name given. -.SH "RESULT DATA STRUCTURE" -The result of the DNS resolution and validation is returned as -\fIstruct ub_result\fR. The result structure contains the following entries. -.P +.UNINDENT +.SH RESULT DATA STRUCTURE +.sp +The result of the DNS resolution and validation is returned as \fIstruct +ub_result\fP\&. +The result structure contains the following entries: +.INDENT 0.0 +.INDENT 3.5 +.sp .nf - struct ub_result { - char* qname; /* text string, original question */ - int qtype; /* type code asked for */ - int qclass; /* class code asked for */ - char** data; /* array of rdata items, NULL terminated*/ - int* len; /* array with lengths of rdata items */ - char* canonname; /* canonical name of result */ - int rcode; /* additional error code in case of no data */ - void* answer_packet; /* full network format answer packet */ - int answer_len; /* length of packet in octets */ - int havedata; /* true if there is data */ - int nxdomain; /* true if nodata because name does not exist */ - int secure; /* true if result is secure */ - int bogus; /* true if a security failure happened */ - char* why_bogus; /* string with error if bogus */ - int was_ratelimited; /* true if the query was ratelimited (SERVFAIL) by unbound */ - int ttl; /* number of seconds the result is valid */ - }; +.ft C +struct ub_result { + char* qname; /* text string, original question */ + int qtype; /* type code asked for */ + int qclass; /* class code asked for */ + char** data; /* array of rdata items, NULL terminated*/ + int* len; /* array with lengths of rdata items */ + char* canonname; /* canonical name of result */ + int rcode; /* additional error code in case of no data */ + void* answer_packet; /* full network format answer packet */ + int answer_len; /* length of packet in octets */ + int havedata; /* true if there is data */ + int nxdomain; /* true if nodata because name does not exist */ + int secure; /* true if result is secure */ + int bogus; /* true if a security failure happened */ + char* why_bogus; /* string with error if bogus */ + int was_ratelimited; /* true if the query was ratelimited (SERVFAIL) by unbound */ + int ttl; /* number of seconds the result is valid */ +}; +.ft P .fi -.P -If both secure and bogus are false, security was not enabled for the -domain of the query. Else, they are not both true, one of them is true. -.SH "RETURN VALUES" -Many routines return an error code. The value 0 (zero) denotes no error -happened. Other values can be passed to -.B ub_strerror -to obtain a readable error string. -.B ub_strerror -returns a zero terminated string. -.B ub_ctx_create -returns NULL on an error (a malloc failure). -.B ub_poll -returns true if some information may be available, false otherwise. -.B ub_fd -returns a file descriptor or \-1 on error. -.B ub_ctx_config -and -.B ub_ctx_resolvconf -attempt to leave errno informative on a function return with file read failure. -.SH "SEE ALSO" -\fIunbound.conf\fR(5), -\fIunbound\fR(8). -.SH "AUTHORS" -.B Unbound -developers are mentioned in the CREDITS file in the distribution. +.UNINDENT +.UNINDENT +.sp +If both secure and bogus are false, security was not enabled for the domain of +the query. +Else, they are not both true, one of them is true. +.SH RETURN VALUES +.sp +Many routines return an error code. +The value 0 (zero) denotes no error happened. +Other values can be passed to \fBub_strerror\fP to obtain a readable error +string. +\fBub_strerror\fP returns a zero terminated string. +\fBub_ctx_create\fP returns NULL on an error (a malloc failure). +\fBub_poll\fP returns true if some information may be available, false otherwise. +\fBub_fd\fP returns a file descriptor or \-1 on error. +\fBub_ctx_config\fP and \fBub_ctx_resolvconf\fP attempt to leave errno informative +on a function return with file read failure. +.SH SEE ALSO +.sp +\fI\%unbound.conf(5)\fP, \fI\%unbound(8)\fP\&. +.SH AUTHOR +Unbound developers are mentioned in the CREDITS file in the distribution. +.SH COPYRIGHT +1999-2025, NLnet Labs +.\" Generated by docutils manpage writer. +. diff --git a/contrib/unbound/doc/unbound-anchor.8 b/contrib/unbound/doc/unbound-anchor.8 index 23c1dd4b060f..ba8bd843a67c 100644 --- a/contrib/unbound/doc/unbound-anchor.8 +++ b/contrib/unbound/doc/unbound-anchor.8 @@ -1,189 +1,300 @@ -.TH "unbound-anchor" "8" "Jul 16, 2025" "NLnet Labs" "unbound 1.23.1" -.\" -.\" unbound-anchor.8 -- unbound anchor maintenance utility manual -.\" -.\" Copyright (c) 2008, NLnet Labs. All rights reserved. -.\" -.\" See LICENSE for the license. -.\" -.\" -.SH "NAME" -.B unbound\-anchor -\- Unbound anchor utility. -.SH "SYNOPSIS" -.B unbound\-anchor -.RB [ opts ] -.SH "DESCRIPTION" -.B Unbound\-anchor -performs setup or update of the root trust anchor for DNSSEC validation. -The program fetches the trust anchor with the method from RFC7958 when -regular RFC5011 update fails to bring it up to date. +.\" Man page generated from reStructuredText. +. +. +.nr rst2man-indent-level 0 +. +.de1 rstReportMargin +\\$1 \\n[an-margin] +level \\n[rst2man-indent-level] +level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] +- +\\n[rst2man-indent0] +\\n[rst2man-indent1] +\\n[rst2man-indent2] +.. +.de1 INDENT +.\" .rstReportMargin pre: +. RS \\$1 +. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] +. nr rst2man-indent-level +1 +.\" .rstReportMargin post: +.. +.de UNINDENT +. RE +.\" indent \\n[an-margin] +.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] +.nr rst2man-indent-level -1 +.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] +.in \\n[rst2man-indent\\n[rst2man-indent-level]]u +.. +.TH "UNBOUND-ANCHOR" "8" "Oct 22, 2025" "1.24.1" "Unbound" +.SH NAME +unbound-anchor \- Unbound 1.24.1 anchor utility. +.SH SYNOPSIS +.sp +\fBunbound\-anchor\fP [\fBopts\fP] +.SH DESCRIPTION +.sp +\fBunbound\-anchor\fP performs setup or update of the root trust anchor for DNSSEC +validation. +The program fetches the trust anchor with the method from \fI\%RFC 7958\fP when +regular \fI\%RFC 5011\fP update fails to bring it up to date. It can be run (as root) from the commandline, or run as part of startup -scripts. Before you start the \fIunbound\fR(8) DNS server. -.P +scripts. +Before you start the \fI\%unbound(8)\fP DNS server. +.sp Suggested usage: -.P +.INDENT 0.0 +.INDENT 3.5 +.sp .nf - # in the init scripts. - # provide or update the root anchor (if necessary) - unbound-anchor \-a "/var/unbound/root.key" - # Please note usage of this root anchor is at your own risk - # and under the terms of our LICENSE (see source). - # - # start validating resolver - # the unbound.conf contains: - # auto-trust-anchor-file: "/var/unbound/root.key" - unbound \-c unbound.conf +.ft C +# in the init scripts. +# provide or update the root anchor (if necessary) +unbound\-anchor \-a \(dq/var/unbound/root.key\(dq +# Please note usage of this root anchor is at your own risk +# and under the terms of our LICENSE (see source). +# +# start validating resolver +# the unbound.conf contains: +# auto\-trust\-anchor\-file: \(dq/var/unbound/root.key\(dq +unbound \-c unbound.conf +.ft P .fi -.P -This tool provides builtin default contents for the root anchor and root -update certificate files. -.P +.UNINDENT +.UNINDENT +.sp +This tool provides builtin default contents for the root anchor and root update +certificate files. +.sp It tests if the root anchor file works, and if not, and an update is possible, attempts to update the root anchor using the root update certificate. -It performs a https fetch of root-anchors.xml and checks the results (RFC7958), -if all checks are successful, it updates the root anchor file. Otherwise -the root anchor file is unchanged. It performs RFC5011 tracking if the -DNSSEC information available via the DNS makes that possible. -.P -It does not perform an update if the certificate is expired, if the network -is down or other errors occur. -.P +It performs a https fetch of +\fI\%root\-anchors.xml\fP +and checks the results (\fI\%RFC 7958\fP); if all checks are successful, it updates +the root anchor file. +Otherwise the root anchor file is unchanged. +It performs \fI\%RFC 5011\fP tracking if the DNSSEC information available via the +DNS makes that possible. +.sp +It does not perform an update if the certificate is expired, if the network is +down or other errors occur. +.sp The available options are: +.INDENT 0.0 .TP -.B \-a \fIfile *** 11843 LINES SKIPPED *** From nobody Thu May 28 22:16:07 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRLRX4sPPz6fQl9 for ; Thu, 28 May 2026 22:16: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRLRX0vGKz3LDm for ; Thu, 28 May 2026 22:16:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780006568; 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=qpasOQJDbXx7ba9qZzexeWRhdC6d1u06Mqa7oYcjPmA=; b=UAwUdp4wiNKJteNODkhKbYgqubLltZQoHRpqdx0EvHMKEQUpu/ikavqAVd+cFGEr7yhel9 AS0e33DZwvdl7Xv/ItNNrAih/T6VdYfl1uVag+8aXZU6TCJM8s/PYmAFm+GVkzEzY1wDKZ FvHN++sNLrsV5JxL5+RMOWE71nFwoamys0QLItU/kLWzw8E9xYq5EhNIPMh2Py1R/f6GxX CSYQBC0leJ7ZrGs4goah1bGYz+6ZrAoYBwl/EDtgpkRkj9KwIT1yRiURM/LtXKAQeb+ctL Y92DTsoMAC875bqVoKL204UIQvan3bbG8pcjWwuqO9bL0+0CCk033mdZ7VMpKA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780006568; a=rsa-sha256; cv=none; b=PY6RWqGUm7uiylq7Qnq/rsUprKO+Jm166eQFhgNShpUy36ZhG5pToizGNaxCJ/6YEG0drA iePlDfEcJ9bjOCzZji0dk3MakqCFNuAajZlvubSEPSuWGh4uJ2lLmTKsz4CBIXTFGHSWTx kj/3jkrntPQxt5ZnerRuyntBlVS+xwvT/4/O4G/+ip+r8Zb1LZV4T/qms1/p7KFekOA23B OlThHzpGkauQOdvuuMlnA/k72s9EPoSjsVjC5Ups/D/PPxliWljXx8DvJzQQnzGK4rGFJr RhCJfSfvbDQ2pj8Dj6IsvPMjNl6e2dj+XJ8Ef636ZgUy1M+0LnUg+RcBAnwVrQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780006568; 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=qpasOQJDbXx7ba9qZzexeWRhdC6d1u06Mqa7oYcjPmA=; b=n9nMC6zcAHcaMS3VpSuGmLN3DNrTUIg+byT5ywPPq3NRVkt5tD8XXCKsscfZPSC0TeU7pg WLL9qsBiiOcB8A2H0UVRVAMubl+cdtQ4UrWyBL+9QFDzIGtiz9oMllahr96zSS0bXmhjZH hNtQGX9rlNY0xJnsegZAH8cDkOyGcsiu+QDKcRSdlYNPREe8YYTIEQGRna3Mf1DPqDliV0 1UMApPj9PRSqhH3OH2bMKVTs54i5K66NhzGdIBUhwSsXIUkJ6VLB+eiKRlUcA9ietVCW4T BHZhzrz9Qh1eQ1oaZnLpeKFsFP0rdMoupURFEKLQ20Xt1dAnfSUE+fT53ErWuQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRLRX08mJz14xT for ; Thu, 28 May 2026 22:16:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3b3c9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 22:16:07 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav From: Colin Percival Subject: git: 1b6c85cfac36 - releng/15.1 - unbound: Update to 1.25.1 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.1 X-Git-Reftype: branch X-Git-Commit: 1b6c85cfac36259f28b5e1461b8450600726a3e2 Auto-Submitted: auto-generated Date: Thu, 28 May 2026 22:16:07 +0000 Message-Id: <6a18bea7.3b3c9.2a732590@gitrepo.freebsd.org> The branch releng/15.1 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=1b6c85cfac36259f28b5e1461b8450600726a3e2 commit 1b6c85cfac36259f28b5e1461b8450600726a3e2 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-23 01:57:43 +0000 Commit: Colin Percival CommitDate: 2026-05-28 22:15:27 +0000 unbound: Update to 1.25.1 Release notes at https://nlnetlabs.nl/news/2026/May/20/unbound-1.25.1-released/ Merge commit '22e58f330a151944c24e010d23ec3881df6681b6' Approved by: re (cperciva) Security: CVE-2026-33278 Security: CVE-2026-42944 Security: CVE-2026-42959 Security: CVE-2026-32792 Security: CVE-2026-40622 Security: CVE-2026-41292 Security: CVE-2026-42534 Security: CVE-2026-42923 Security: CVE-2026-42960 Security: CVE-2026-44390 Security: CVE-2026-44608 MFC after: 1 week (cherry picked from commit 50caa0ea0c16499c40e785b5aa37053b180b2830) (cherry picked from commit d2a10ff4cb84d7656146b1dea74dcff55a0e1413) --- contrib/unbound/aclocal.m4 | 857 +++++++----- contrib/unbound/configure | 1929 +++++++++++++++++++--------- contrib/unbound/configure.ac | 5 +- contrib/unbound/dnscrypt/dnscrypt.c | 2 +- contrib/unbound/doc/Changelog | 30 + contrib/unbound/doc/README | 2 +- contrib/unbound/doc/example.conf | 2 +- contrib/unbound/doc/example.conf.in | 2 +- contrib/unbound/doc/libunbound.3 | 4 +- contrib/unbound/doc/libunbound.3.in | 4 +- contrib/unbound/doc/unbound-anchor.8 | 4 +- contrib/unbound/doc/unbound-anchor.8.in | 4 +- contrib/unbound/doc/unbound-checkconf.8 | 4 +- contrib/unbound/doc/unbound-checkconf.8.in | 4 +- contrib/unbound/doc/unbound-control.8 | 4 +- contrib/unbound/doc/unbound-control.8.in | 4 +- contrib/unbound/doc/unbound-host.1 | 4 +- contrib/unbound/doc/unbound-host.1.in | 4 +- contrib/unbound/doc/unbound.8 | 4 +- contrib/unbound/doc/unbound.8.in | 4 +- contrib/unbound/doc/unbound.conf.5 | 4 +- contrib/unbound/doc/unbound.conf.5.in | 4 +- contrib/unbound/install-sh | 178 ++- contrib/unbound/iterator/iter_scrub.c | 8 +- contrib/unbound/ltmain.sh | 1566 +++++++++++++--------- contrib/unbound/services/cache/dns.c | 8 +- contrib/unbound/services/cache/rrset.c | 10 + contrib/unbound/services/mesh.c | 14 +- contrib/unbound/services/mesh.h | 6 + contrib/unbound/services/rpz.c | 10 +- contrib/unbound/util/configparser.c | 896 ++++++------- contrib/unbound/util/configparser.h | 4 +- contrib/unbound/util/data/msgencode.c | 38 +- contrib/unbound/util/data/msgencode.h | 4 +- contrib/unbound/util/data/msgparse.c | 19 +- contrib/unbound/validator/val_neg.c | 28 +- contrib/unbound/validator/val_nsec3.c | 76 +- contrib/unbound/validator/val_nsec3.h | 6 + contrib/unbound/validator/val_utils.c | 4 +- lib/libunbound/config.h | 6 +- 40 files changed, 3619 insertions(+), 2147 deletions(-) diff --git a/contrib/unbound/aclocal.m4 b/contrib/unbound/aclocal.m4 index bf3c57e2fd9f..375ee7a86df3 100644 --- a/contrib/unbound/aclocal.m4 +++ b/contrib/unbound/aclocal.m4 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.16.2 -*- Autoconf -*- +# generated automatically by aclocal 1.18.1 -*- Autoconf -*- -# Copyright (C) 1996-2020 Free Software Foundation, Inc. +# Copyright (C) 1996-2025 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,7 +14,8 @@ m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # -# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. +# Copyright (C) 1996-2001, 2003-2019, 2021-2024 Free Software +# Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives @@ -22,13 +23,13 @@ m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl -# Copyright (C) 2014 Free Software Foundation, Inc. +# Copyright (C) 2024 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of of the License, or +# the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, if you @@ -45,7 +46,7 @@ m4_define([_LT_COPYING], [dnl # along with this program. If not, see . ]) -# serial 58 LT_INIT +# serial 63 LT_INIT # LT_PREREQ(VERSION) @@ -73,7 +74,7 @@ esac # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], -[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK +[AC_PREREQ([2.64])dnl We use AC_PATH_PROGS_FEATURE_CHECK AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl @@ -195,6 +196,7 @@ m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl +m4_require([_LT_DECL_FILECMD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl @@ -233,8 +235,8 @@ esac ofile=libtool can_build_shared=yes -# All known linkers require a '.a' archive for static linking (except MSVC, -# which needs '.lib'). +# All known linkers require a '.a' archive for static linking (except MSVC and +# ICC, which need '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld @@ -622,7 +624,7 @@ m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before -# AC_OUTPUT is called), incase it is used in configure for compilation +# AC_OUTPUT is called), in case it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} @@ -657,9 +659,9 @@ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. -Copyright (C) 2011 Free Software Foundation, Inc. +Copyright (C) 2024 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation -gives unlimited permision to copy, distribute and modify it." +gives unlimited permission to copy, distribute and modify it." while test 0 != $[#] do @@ -736,7 +738,6 @@ _LT_CONFIG_SAVE_COMMANDS([ cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. @@ -786,7 +787,7 @@ _LT_EOF # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" \ + $SED '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || @@ -979,6 +980,7 @@ _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE + # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ @@ -1029,6 +1031,21 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ rm -f conftest.* fi]) + # Feature test to disable chained fixups since it is not + # compatible with '-undefined dynamic_lookup' + AC_CACHE_CHECK([for -no_fixup_chains linker flag], + [lt_cv_support_no_fixup_chains], + [ save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -Wl,-no_fixup_chains" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM([],[])], + lt_cv_support_no_fixup_chains=yes, + lt_cv_support_no_fixup_chains=no + ) + LDFLAGS=$save_LDFLAGS + ] + ) + AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no @@ -1048,12 +1065,12 @@ int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD - echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD - $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD + echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD + $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF -int main() { return 0;} +int main(void) { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err @@ -1073,23 +1090,37 @@ _LT_EOF _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - 10.[[012]][[,.]]*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + darwin*) + case $MACOSX_DEPLOYMENT_TARGET,$host in + 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; + *) + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' + if test yes = "$lt_cv_support_no_fixup_chains"; then + AS_VAR_APPEND([_lt_dar_allow_undefined], [' $wl-no_fixup_chains']) + fi + ;; esac ;; esac if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi + _lt_dar_needs_single_mod=no + case $host_os in + rhapsody* | darwin1.*) + _lt_dar_needs_single_mod=yes ;; + darwin*) + # When targeting Mac OS X 10.4 (darwin 8) or later, + # -single_module is the default and -multi_module is unsupported. + # The toolchain on macOS 10.14 (darwin 18) and later cannot + # target any OS version that needs -single_module. + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*-darwin[[567]].*|10.[[0-3]],*-darwin[[5-9]].*|10.[[0-3]],*-darwin1[[0-7]].*) + _lt_dar_needs_single_mod=yes ;; + esac + ;; + esac if test yes = "$lt_cv_ld_exported_symbols_list"; then _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else @@ -1132,12 +1163,12 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES], output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" + _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" + _LT_TAGVAR(module_expsym_cmds, $1)="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" m4_if([$1], [CXX], -[ if test yes != "$lt_cv_apple_cc_single_mod"; then +[ if test yes = "$_lt_dar_needs_single_mod" -a yes != "$lt_cv_apple_cc_single_mod"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" + _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi ],[]) else @@ -1251,7 +1282,8 @@ _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], -[AC_MSG_CHECKING([for sysroot]) +[m4_require([_LT_DECL_SED])dnl +AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], [Search for dependent libraries within DIR (or the compiler's sysroot @@ -1264,11 +1296,13 @@ lt_sysroot= case $with_sysroot in #( yes) if test yes = "$GCC"; then - lt_sysroot=`$CC --print-sysroot 2>/dev/null` + # Trim trailing / since we'll always append absolute paths and we want + # to avoid //, if only for less confusing output for the user. + lt_sysroot=`$CC --print-sysroot 2>/dev/null | $SED 's:/\+$::'` fi ;; #( /*) - lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` ;; #( no|'') ;; #( @@ -1298,7 +1332,7 @@ ia64-*-hpux*) # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; @@ -1315,7 +1349,7 @@ ia64-*-hpux*) echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test yes = "$lt_cv_prog_gnu_ld"; then - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; @@ -1327,7 +1361,7 @@ ia64-*-hpux*) ;; esac else - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; @@ -1349,7 +1383,7 @@ mips64*-*linux*) echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then emul=elf - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; @@ -1357,7 +1391,7 @@ mips64*-*linux*) emul="${emul}64" ;; esac - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; @@ -1365,7 +1399,7 @@ mips64*-*linux*) emul="${emul}ltsmip" ;; esac - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; @@ -1376,7 +1410,7 @@ mips64*-*linux*) ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) +s390*-*linux*|s390*-*tpf*|sparc*-*linux*|x86_64-gnu*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when @@ -1385,14 +1419,14 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # not appear in the list. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in + case `$FILECMD conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; - x86_64-*linux*) - case `/usr/bin/file conftest.o` in + x86_64-*linux*|x86_64-gnu*) + case `$FILECMD conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; @@ -1420,7 +1454,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; - x86_64-*linux*) + x86_64-*linux*|x86_64-gnu*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*linux*) @@ -1460,7 +1494,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in + case `$FILECMD conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) @@ -1499,9 +1533,22 @@ need_locks=$enable_libtool_lock m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} -: ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) -_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) + +# Use ARFLAGS variable as AR's operation code to sync the variable naming with +# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have +# higher priority because that's what people were doing historically (setting +# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS +# variable obsoleted/removed. + +test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} +lt_ar_flags=$AR_FLAGS +_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) + +# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override +# by AR_FLAGS because that was never working and AR_FLAGS is about to die. +_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], + [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no @@ -1540,7 +1587,7 @@ AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) -AC_CHECK_TOOL(RANLIB, ranlib, :) +AC_REQUIRE([AC_PROG_RANLIB]) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) @@ -1551,15 +1598,8 @@ old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then - case $host_os in - bitrig* | openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" - ;; - esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in @@ -1691,14 +1731,14 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. + gnu* | ironclad*) + # Under GNU Hurd and Ironclad, this test is not required because there + # is no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; - cygwin* | mingw* | cegcc*) + cygwin* | mingw* | windows* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, @@ -1720,7 +1760,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl lt_cv_sys_max_cmd_len=8192; ;; - bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) + darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` @@ -1763,7 +1803,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` + lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi @@ -1880,11 +1920,11 @@ else /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); +int fnord (void) __attribute__((visibility("default"))); #endif -int fnord () { return 42; } -int main () +int fnord (void) { return 42; } +int main (void) { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; @@ -1941,7 +1981,7 @@ else lt_cv_dlopen_self=yes ;; - mingw* | pw32* | cegcc*) + mingw* | windows* | pw32* | cegcc*) lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; @@ -2213,26 +2253,35 @@ m4_defun([_LT_CMD_STRIPLIB], striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) +if test -z "$STRIP"; then + AC_MSG_RESULT([no]) else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP"; then + if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + old_striplib="$STRIP --strip-debug" + striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT([yes]) + else + case $host_os in + darwin*) + # FIXME - insert some real tests, host_os isn't really good enough striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) - else + ;; + freebsd*) + if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then + old_striplib="$STRIP --strip-debug" + striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi + ;; + *) AC_MSG_RESULT([no]) - fi - ;; - *) - AC_MSG_RESULT([no]) - ;; - esac + ;; + esac + fi fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) @@ -2300,7 +2349,7 @@ if test yes = "$GCC"; then *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in - mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; + mingw* | windows* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` @@ -2358,7 +2407,7 @@ BEGIN {RS = " "; FS = "/|\n";} { # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in - mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ + mingw* | windows* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` @@ -2433,7 +2482,7 @@ aix[[4-9]]*) # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl - # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. + # linker flag in LDFLAGS as well, or --enable-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the @@ -2527,7 +2576,7 @@ bsdi[[45]]*) # libtool to hard-code these into programs ;; -cygwin* | mingw* | pw32* | cegcc*) +cygwin* | mingw* | windows* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no @@ -2538,15 +2587,29 @@ cygwin* | mingw* | pw32* | cegcc*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' + # If user builds GCC with multilib enabled, + # it should just install on $(libdir) + # not on $(libdir)/../bin or 32 bits dlls would override 64 bit ones. + if test xyes = x"$multilib"; then + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + $install_prog $dir/$dlname $destdir/$dlname~ + chmod a+x $destdir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib $destdir/$dlname'\'' || exit \$?; + fi' + else + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + fi postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' @@ -2555,30 +2618,30 @@ cygwin* | mingw* | pw32* | cegcc*) case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' + soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; - mingw* | cegcc*) + mingw* | windows* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' + library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; - *,cl*) - # Native MSVC + *,cl* | *,icl*) + # Native MSVC or ICC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in - mingw*) + mingw* | windows*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' @@ -2591,7 +2654,7 @@ m4_if([$1], [],[ done IFS=$lt_save_ifs # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form @@ -2628,7 +2691,7 @@ m4_if([$1], [],[ ;; *) - # Assume MSVC wrapper + # Assume MSVC and ICC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; @@ -2661,7 +2724,7 @@ dgux*) shlibpath_var=LD_LIBRARY_PATH ;; -freebsd* | dragonfly*) +freebsd* | dragonfly* | midnightbsd*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then @@ -2685,7 +2748,21 @@ freebsd* | dragonfly*) need_version=yes ;; esac - shlibpath_var=LD_LIBRARY_PATH + case $host_cpu in + powerpc64) + # On FreeBSD bi-arch platforms, a different variable is used for 32-bit + # binaries. See . + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[int test_pointer_size[sizeof (void *) - 5]; + ]])], + [shlibpath_var=LD_LIBRARY_PATH], + [shlibpath_var=LD_32_LIBRARY_PATH]) + ;; + *) + shlibpath_var=LD_LIBRARY_PATH + ;; + esac case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes @@ -2715,8 +2792,9 @@ haiku*) soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes + sys_lib_search_path_spec='/boot/system/non-packaged/develop/lib /boot/system/develop/lib' + sys_lib_dlsearch_path_spec='/boot/home/config/non-packaged/lib /boot/home/config/lib /boot/system/non-packaged/lib /boot/system/lib' + hardcode_into_libs=no ;; hpux9* | hpux10* | hpux11*) @@ -2826,7 +2904,7 @@ linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no - library_names_spec='$libname$release$shared_ext' + library_names_spec='$libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH @@ -2838,8 +2916,9 @@ linux*android*) hardcode_into_libs=yes dynamic_linker='Android linker' - # Don't embed -rpath directories since the linker doesn't support them. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + # -rpath works at least for libraries that are not overridden by + # libraries installed in system locations. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' ;; # This must be glibc/ELF. @@ -2876,7 +2955,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) # Add ABI-specific directories to the system library path. sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" - # Ideally, we could use ldconfig to report *all* directores which are + # Ideally, we could use ldconfig to report *all* directories which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, @@ -2896,6 +2975,18 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) dynamic_linker='GNU/Linux ld.so' ;; +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + netbsd*) version_type=sunos need_lib_prefix=no @@ -2914,6 +3005,18 @@ netbsd*) hardcode_into_libs=yes ;; +*-mlibc) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + dynamic_linker='mlibc ld.so' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' @@ -2933,7 +3036,7 @@ newsos6) dynamic_linker='ldqnx.so' ;; -openbsd* | bitrig*) +openbsd*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no @@ -2993,6 +3096,17 @@ rdos*) dynamic_linker=no ;; +serenity*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + dynamic_linker='SerenityOS LibELF' + ;; + solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no @@ -3090,6 +3204,21 @@ uts4*) shlibpath_var=LD_LIBRARY_PATH ;; +emscripten*) + version_type=none + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext' + soname_spec='$libname$release$shared_ext' + finish_cmds= + dynamic_linker="Emscripten linker" + _LT_COMPILER_PIC($1)='-fPIC' + _LT_TAGVAR(archive_cmds, $1)='$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib -s EXPORTED_FUNCTIONS=@$output_objdir/$soname.expsym' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(no_undefined_flag, $1)= + ;; + *) dynamic_linker=no ;; @@ -3265,7 +3394,7 @@ if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in - *-*-mingw*) + *-*-mingw* | *-*-windows*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) @@ -3374,7 +3503,7 @@ case $reload_flag in esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in - cygwin* | mingw* | pw32* | cegcc*) + cygwin* | mingw* | windows* | pw32* | cegcc*) if test yes != "$GCC"; then reload_cmds=false fi @@ -3446,7 +3575,6 @@ lt_cv_deplibs_check_method='unknown' # 'none' -- dependencies not supported. # 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # that responds to the $file_magic_cmd with a given extended regex. # If you have 'file' or equivalent on your system and you're not sure @@ -3463,7 +3591,7 @@ beos*) bsdi[[45]]*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_cmd='$FILECMD -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; @@ -3473,7 +3601,7 @@ cygwin*) lt_cv_file_magic_cmd='func_win32_libid' ;; -mingw* | pw32*) +mingw* | windows* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. @@ -3482,7 +3610,7 @@ mingw* | pw32*) lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. - lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64|pe-aarch64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; @@ -3497,14 +3625,14 @@ darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; -freebsd* | dragonfly*) +freebsd* | dragonfly* | midnightbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_cmd=$FILECMD lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac @@ -3518,7 +3646,7 @@ haiku*) ;; hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_cmd=$FILECMD case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' @@ -3555,7 +3683,11 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; -netbsd*) +*-mlibc) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else @@ -3565,7 +3697,7 @@ netbsd*) newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_cmd=$FILECMD lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; @@ -3573,7 +3705,7 @@ newos6*) lt_cv_deplibs_check_method=pass_all ;; *** 12241 LINES SKIPPED *** From nobody Thu May 28 22:16:09 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRLRY56qTz6fQlB for ; Thu, 28 May 2026 22:16:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRLRY27lZz3LMV for ; Thu, 28 May 2026 22:16:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780006569; 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=vPUdPRw7aKSFw7xz5kzUfjmy09zH+lC9c6FYhRL0rJk=; b=L8sptIrftLezvxm7S5EIFRTEAdSDfVNhlXw+PzY92Uw+8GFswDf2zWVaCdM2xsaxIQJ7BE RtVrygDo/Q0DkTT3O5x9ENYyYKmQJvPBUjpOkoIPpy+v3/uBXT+2Yh+D4fxJFKVNOSx0DI 2F/5Sb4Qq+hZFS0PtQha2k+tSpwJkNs8GBoukMBXMzfdxOReILqz/PAzAfllIFlvYDeJ49 ZNgIFwR3GOlUmPxNff0pD376OOq+Of8U2h0DAlL5L+BkYrI1PF0mm9k0QTVIgWWW7FxfKZ pkGiEBehwzqGLIrD7G9UvF+RJVLHR1qJToMzg18XcFFYq48g48A+i45HJQP3CQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780006569; a=rsa-sha256; cv=none; b=iA9njOH7CCX6iv0dMK5fa3arPIjAqgHR5v4xut9ODEqoq+/KYcmDnHLETVLGQODzPA+fFr l1xK6sYtNYAEFuxxS6CiGypKblyBFenN953NPbEFewfdkA+Rpht5eBPU5cSmlHo+HbChsQ Q6WfDEr7tqPmA7I6im7C+J0EMeKR3XIHyaHa61RVi0qR6566DwIXH28y1kzK7TbqTzyyD4 ug2iCnKvMHTVX63r4fHjC5l1fBAb3AQx2Uzi4Z3Cxm/MPSHJXtEvM6sWIHOHln0secOndT 0Z9xJFCR4ja9SXS3IQz309fPqF076cQCax2CdWYpx4X+fV8U1diYk0Yw+nL3/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780006569; 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=vPUdPRw7aKSFw7xz5kzUfjmy09zH+lC9c6FYhRL0rJk=; b=jp0TOBGrbzcINwuSzQukP4Srx92Kj2YKT8uUK7XUCFq8y+jZL1vMD4isTxsMlCDzgrhIxw UI5kxKr4flKcd4lFMPXimPJQquNW8OHYY6kJCfx1tC6VGaOVgWt3vfVxbfYmNj19nqVkIJ tlbAfpmpvDMlfkeo5g/M3u4ZWUKWbzbpkmz2I3JYN4l1nJ3/4fRZa/xKhjmffIwQ2Hb/9R zZbIlCjtxNj4QmAjGurhgtRLPrVpIVL0XwgkqlDhutT0wxQpi07wc7DsJSGnuAnsD9KjNj u7XNB5mCiMiKMYC7Ejf9DRV44gRs537Mo23MXOFzpNO9dXLV6xjDQbZA9TRfww== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRLRY0y4Jz14xV for ; Thu, 28 May 2026 22:16:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c3f7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 22:16:09 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Pat Maddox From: Colin Percival Subject: git: d51d91b07f5b - releng/15.1 - syslogd: fix memory leak in casper_ttymsg() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.1 X-Git-Reftype: branch X-Git-Commit: d51d91b07f5bd1066652eb3d09fc5db07790824b Auto-Submitted: auto-generated Date: Thu, 28 May 2026 22:16:09 +0000 Message-Id: <6a18bea9.3c3f7.3ddb45bd@gitrepo.freebsd.org> The branch releng/15.1 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=d51d91b07f5bd1066652eb3d09fc5db07790824b commit d51d91b07f5bd1066652eb3d09fc5db07790824b Author: Pat Maddox AuthorDate: 2026-05-22 21:45:30 +0000 Commit: Colin Percival CommitDate: 2026-05-28 22:15:34 +0000 syslogd: fix memory leak in casper_ttymsg() nvlist_take_string_array(9) takes ownership of the array and its strings. casper_ttymsg() freed neither, leaking memory on every F_CONSOLE and F_TTY message. On long-running systems with high error-rate syslog traffic routed to /dev/console, syslogd.casper grew to hundreds of MB. Use nvlist_get_string_array(9) to borrow the array instead. Update casper_wallmsg() similarly. Approved by: re (cperciva) Approved by: src (des) Closes: https://github.com/freebsd/freebsd-src/pull/2222 Fixes: 61a29eca550b ("syslogd: Log messages using libcasper") MFC after: 3 days MFC to: stable/15 PR: 295488 Reported by: Pat Maddox Reviewed by: markj Tested by: dch (cherry picked from commit c783d7181d6a71cb2453f06e40c08c892510c2f2) (cherry picked from commit be03b0fb2241260ec94db431cf4f2954161f227e) --- usr.sbin/syslogd/syslogd_cap_log.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/usr.sbin/syslogd/syslogd_cap_log.c b/usr.sbin/syslogd/syslogd_cap_log.c index 0156cc6f6b6c..5e2034abd9eb 100644 --- a/usr.sbin/syslogd/syslogd_cap_log.c +++ b/usr.sbin/syslogd/syslogd_cap_log.c @@ -128,19 +128,19 @@ cap_ttymsg(cap_channel_t *chan, struct iovec *iov, int iovcnt, int casper_ttymsg(nvlist_t *nvlin, nvlist_t *nvlout) { - char **nvlstrs; + const char * const *nvlstrs; struct iovec *iov; size_t iovcnt; int tmout; const char *line; - nvlstrs = nvlist_take_string_array(nvlin, "iov_strs", &iovcnt); + nvlstrs = nvlist_get_string_array(nvlin, "iov_strs", &iovcnt); assert(iovcnt <= TTYMSG_IOV_MAX); iov = calloc(iovcnt, sizeof(*iov)); if (iov == NULL) err(EXIT_FAILURE, "calloc"); for (size_t i = 0; i < iovcnt; ++i) { - iov[i].iov_base = nvlstrs[i]; + iov[i].iov_base = __DECONST(char *, nvlstrs[i]); iov[i].iov_len = strlen(nvlstrs[i]); } line = nvlist_get_string(nvlin, "line"); @@ -187,25 +187,23 @@ int casper_wallmsg(nvlist_t *nvlin) { const struct filed *f; - char **nvlstrs; + const char * const *nvlstrs; struct iovec *iov; size_t sz; f = nvlist_get_binary(nvlin, "filed", &sz); assert(sz == sizeof(*f)); - nvlstrs = nvlist_take_string_array(nvlin, "iov_strs", &sz); + nvlstrs = nvlist_get_string_array(nvlin, "iov_strs", &sz); assert(sz <= TTYMSG_IOV_MAX); iov = calloc(sz, sizeof(*iov)); if (iov == NULL) err(EXIT_FAILURE, "calloc"); for (size_t i = 0; i < sz; ++i) { - iov[i].iov_base = nvlstrs[i]; + iov[i].iov_base = __DECONST(char *, nvlstrs[i]); iov[i].iov_len = strlen(nvlstrs[i]); } wallmsg(f, iov, sz); - for (size_t i = 0; i < sz; ++i) - free(iov[i].iov_base); free(iov); return (0); } From nobody Thu May 28 22:16:11 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRLRb5qStz6fR2D for ; Thu, 28 May 2026 22:16: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRLRb31tNz3LZv for ; Thu, 28 May 2026 22:16:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780006571; 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=HyFBYfXPYYqP0lvB6hBB5kYPIE/dC0sR2/A+T7ZoW48=; b=pP9u2kg2opf7EfgtowSkuoknwg2ptwemyba35wbLDhzNnbx+JR4+TOQRL1doKupUUb/Apc n4Ah4+95nu1p4NQkhM9pZIpHbS4ae/s9K/mLqrxCBxGMUKrzRYVn0T9I4R9bmvAzwGD599 b9W1e/QJEuVBW301OSw/mGilF9weMWBtkvlP38dbNHwqavZvfMQKXMhS/Nkd2CSQsnoXKV dO+yjcEuX3gDHDCuYdMeAY2iC3rj8JFRxJ+ie0314gmQW2QqNoycUr9xIYH1YFy60on//g B2LiGU5MOlBxgpjjkKeE28248YuJ1bSozDMdgZ3yLcp+UY7n4wZ888G3lWtUjg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780006571; a=rsa-sha256; cv=none; b=nLvb0645Li0K+yAyazkxFGpfbTYFuM+xTtBjA+eB2VQ9LMtZlCFrJloK/F9sJsPR9kJ6J7 EZJ621Nz3YIzU7ZAo03boTZLh1p1mYcAOM25s6e5uhOZDSQ1PYQeivcgQtT3KN8W/EvMoS AmLUBpHafWhXwbWykOgLk0Y7GuY3I3YcM0QEDXZIg56Dwcm/nf7hZjwgskmLSj8bUxkCVJ Tm2YEphYDf6lTzGqSuLx3O+hk24CcqruljaFVg8M2i2wana87Da1PF+gueJqCieCEjaXU3 tBzh3W824IOX2K/5rA3xb+yDr/QnFiptUv2i9mEltY1nMrRo/u6XvJagHHGXLw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780006571; 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=HyFBYfXPYYqP0lvB6hBB5kYPIE/dC0sR2/A+T7ZoW48=; b=kaTb8fox3+HWfuYTVZYzYhCp72d0u4jTMVbeEXZ92E8drQDgePXduGNVNsWVrFGRdKUO8f lQLJXnoyJG1jGXdcc7hfl3/+l9aw0tSw0AyYFwOW9peiHB08jN1hl8bXPHgH9K/59Zsogd 3AfvOCr61jvhUTTNUHKOPSJx9NXgw8Doq+ZKZiX4NW3MUa1KIksjL1+uqQUoGR4M6jBHm/ okfbkGtibFv8JCTHCSnkM1J+MW9AOAYZ/Ny9Jie5SS4id1whbFJlo+RjC861opTEQ+Pv0F nzGi83UKADmHtQeYGmymvT0CVPoPclUjbxOqiI3bINBmSOlIVnel2/D3I8KCdA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRLRb2ZFdz14lF for ; Thu, 28 May 2026 22:16:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3ca6c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 22:16:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Jose Luis Duran From: Colin Percival Subject: git: 54b4041a7220 - releng/15.1 - mtree: usr: Add missing pkg/triggers entry List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.1 X-Git-Reftype: branch X-Git-Commit: 54b4041a72205d85f6b02c7b3acab7a6af6b380e Auto-Submitted: auto-generated Date: Thu, 28 May 2026 22:16:11 +0000 Message-Id: <6a18beab.3ca6c.2090f92@gitrepo.freebsd.org> The branch releng/15.1 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=54b4041a72205d85f6b02c7b3acab7a6af6b380e commit 54b4041a72205d85f6b02c7b3acab7a6af6b380e Author: Jose Luis Duran AuthorDate: 2026-01-14 14:28:35 +0000 Commit: Colin Percival CommitDate: 2026-05-28 22:15:43 +0000 mtree: usr: Add missing pkg/triggers entry Approved by: re (cperciva) Reviewed by: ivy Fixes: ea5e50c2985b ("packages: Add a mandoc package") Differential Revision: https://reviews.freebsd.org/D54682 (cherry picked from commit b8480379adcefaff0553aed1df67b249a0b194c8) (cherry picked from commit 7669a182c232fcb9e1e4b627df2f306e7b0d23ea) --- etc/mtree/BSD.usr.dist | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/etc/mtree/BSD.usr.dist b/etc/mtree/BSD.usr.dist index f0e7941258ae..0597690f49bf 100644 --- a/etc/mtree/BSD.usr.dist +++ b/etc/mtree/BSD.usr.dist @@ -833,6 +833,10 @@ .. .. .. + pkg + triggers + .. + .. security .. sendmail From nobody Thu May 28 22:16:10 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRLRZ5rKCz6fQlJ for ; Thu, 28 May 2026 22:16: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRLRZ2BHYz3LVb for ; Thu, 28 May 2026 22:16:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780006570; 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=bXLC7+HrhgmY1OmXlZ6IEzZuI8WV+66je7pKataX+OA=; b=wRyjhbUqVbAz0LrnSnhnKA72IxtFMtTAutZ+ePd7ihFhXCsj3TW44llCr82Q60BQ03oV7W 8U6ytlZtfyol9xhol6Wx9rf6/xMgsV8wyFO3Deu432j+uiJjl+Xew0w/jgk//ONGXH8OqE oLumAT1BF5VdRXFNpM6ILmXei4GQECX7zDRidXEPXw5LuPBLjrz3Gn6z9aOccaWc2zkhPi ofDqDSTDLu5DxSCxPiLFH6CRdj+N25GQus7ES6qi65VKRVDTuKa879KyoU22IH5J6vrP1n R/3/ipmjW0Ogz+Dp3eoSq2/5Hw0PtpSce/JDzDQ5s41+MBun1hSTj2AVzyVmRQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780006570; a=rsa-sha256; cv=none; b=Hc2MYdocTUrZBwlKJYiE1iUauCZWmPe9EQ1OupYs9QiBRl9gt0xdHDQ/snz716SvvfMx+7 zgiM+NUZ02tdAN0chRmaVQyKP9Jwg0nP0l8GECCZwa7AZstXqhNqWvHFmxboBXPB9uuq0X YQzSt3pVBLXQ8yFz+UGWtQNjnEmO76NKaQbzEA6bVA6Ht+C3tmx05R5rmjoAiazjNP2wPq Djn/teeSbX6pEoVjCMJiJv5IhY/Ul24cGkHKq8EqF8LgF+ggyxgOusnLxCKbsVNJ6BFc6T JL0cqINiFmnSCppwrmpOpFC/giZAZrSb1KMa7CGULAq0uEcW9PU4QwlEWjQjsw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780006570; 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=bXLC7+HrhgmY1OmXlZ6IEzZuI8WV+66je7pKataX+OA=; b=RmBW970g0PK/vfvsYzY64puDsbpZGj/Lk0XZMLAeKrqiV6TG26ioJ/WtXfHXlMKAYDm8Pj rQ1IbFeffWaNMeHWmcg1xQWn9iaK546tLwIYHI7EFN1BZsgWXPY5ZeeoehvHZXN+vsuMpN Rl/YKYMQmOlZgvlEgQPf0ZyaYoxFmueKy6eOhRFzNCY1KFLsqpLfnr44hd9Q56QXV9p9Nn jY9KKzsdugmtUdHT18O/7UbQhNNd9rUY83kA8CUrBGvfQgykHveDsSOFvUcw3yrERTmWF1 +OoSgIRDPf8ueu09gq4InpC6zO15Ii0gtMvUnn+vcbqGndHiWytVbE/AdjGVwA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRLRZ1mKsz150Y for ; Thu, 28 May 2026 22:16:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c2a9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 22:16:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Mark Johnston From: Colin Percival Subject: git: 5efac4a9049a - releng/15.1 - amd64/vmm: Fix ppt_unmap_mmio() after commit 36b855f18925 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.1 X-Git-Reftype: branch X-Git-Commit: 5efac4a9049a2a3a26e56cae19ab6acb1240d6dc Auto-Submitted: auto-generated Date: Thu, 28 May 2026 22:16:10 +0000 Message-Id: <6a18beaa.3c2a9.71c365b1@gitrepo.freebsd.org> The branch releng/15.1 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=5efac4a9049a2a3a26e56cae19ab6acb1240d6dc commit 5efac4a9049a2a3a26e56cae19ab6acb1240d6dc Author: Mark Johnston AuthorDate: 2026-05-22 22:18:05 +0000 Commit: Colin Percival CommitDate: 2026-05-28 22:15:39 +0000 amd64/vmm: Fix ppt_unmap_mmio() after commit 36b855f18925 Approved by: re (cperciva) Fixes: 36b855f18925 ("amd64/vmm: Lock global PCI passthrough structures") MFC after: 3 days Reported by: bz (cherry picked from commit b133353310920aa823b1b5f83a308d0762f3bba3) (cherry picked from commit deea28af8dced91b7aa50dadc28ec47ca3f1d478) --- sys/amd64/vmm/io/ppt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/amd64/vmm/io/ppt.c b/sys/amd64/vmm/io/ppt.c index b522e18e3b24..162f26796b33 100644 --- a/sys/amd64/vmm/io/ppt.c +++ b/sys/amd64/vmm/io/ppt.c @@ -577,7 +577,7 @@ ppt_unmap_mmio(struct vm *vm, int bus, int slot, int func, } out: PPT_UNLOCK(); - return (ENOENT); + return (error); } static int From nobody Thu May 28 22:16:01 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRLRb67njz6fR09 for ; Thu, 28 May 2026 22:16: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRLRb5Rzgz3LN2 for ; Thu, 28 May 2026 22:16:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780006571; 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=+pWF0sx+9MVL0OZEn0Z83UOfpoUdtyhOnJtgWjm705w=; b=sS7mRQ2VtIk91FkRkuhUZSdd2e7fdnbBy4Nc9gX6OLzWKUCaD/bsEe0hodwabJItXeewtw tRBHGJeYvGUMYdcpj4eABaHQzxUjPZSG7lLAf5PrsWoorDhDVW4Jbdx1jgmHtzAwX2Wt7u LPTLxAkp6cMZmpJchmWbAwkfwI9VAEqiGwuATJ1uh5ppbnxdqjB+KakkTA1PhQiyqAGF++ 7donZOQshUOWNDmTVL8tZZiuWhAu1fWGjJ393w3JPImuvXBFts7LROb54a5wOZDhUoyN1v 7SedpVTuZpob+3VUBIy0vushsA3rbgA1mNeSFHylA0EFGh477UENDyz5XuLV+w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780006571; a=rsa-sha256; cv=none; b=fh0iRbxsOIlFLpxYGkCQ2YaZX3Pr1EGoEldo/aFXIoJxgQfBUTyDoHkpDZYJVsZqpCkDKr qgFAkWP90q5TxrEG6RgQtHDmptw3uO5cI9VPbFlRBYWFzC0aeQGH7LktfRg4g3TtFsbYWQ rE3OPAzBpbkTqPP7Z3l+2BHSnYy2kz8+iMixeH7YL193R1gCzAGrQR1e2LFsAIC65USQb/ udJRSvWS/+4HX9qxQCAFe/RZHA+3fFbmflJ0xEUpMb0krMsQK03pKQDZjk8bYvk8olCFyM uiSOHsCgev86LcwVRU69a1tfy4TqvXiKKJiVy+A4eaN/MSBhj05CT2C6i7uWcA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780006571; 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=+pWF0sx+9MVL0OZEn0Z83UOfpoUdtyhOnJtgWjm705w=; b=cQkpqIM2Ya5wfUDZy18OdSXBK2a+xLOZHuUARwDsdB4HypTBxGg2h98KKyZvyckGDSqBCO SipHbGbPWfM4Y8bPMQBQcgoJUo3B4t7g0gLHLMy/p6kc18W02m0zILrqkNNLN7cCesNIvT 18Su4hzO4SENRnv9x6pKoTCKgsFi7rZGAaHCgEfjar3Aokil/JFor0cwXZaRajv0H3nzGV zF5dJbe4e6ZGCGI0DUfYVPcl2/XRFgDfLZLIwu+V2j1OYm+1xqkqf45XBCsg0Rybmw2Vlz OlbvJUFUI7G4MqB1btLLvlaMrOmQaRr6OYIMhQjsTsGp2QxT1UUACMFO+JK1Ig== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRLRb4tCTz14rL for ; Thu, 28 May 2026 22:16:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3cbe3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 22:16:01 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Artem Bunichev From: Colin Percival Subject: git: 0ac3db880552 - releng/15.1 - groups.7: New manual page of standard group names List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.1 X-Git-Reftype: branch X-Git-Commit: 0ac3db8805525ea47d0b6a485378d2d88df95edc Auto-Submitted: auto-generated Date: Thu, 28 May 2026 22:16:01 +0000 Message-Id: <6a18bea1.3cbe3.1abfa4e1@gitrepo.freebsd.org> The branch releng/15.1 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=0ac3db8805525ea47d0b6a485378d2d88df95edc commit 0ac3db8805525ea47d0b6a485378d2d88df95edc Author: Artem Bunichev AuthorDate: 2026-04-28 13:48:52 +0000 Commit: Colin Percival CommitDate: 2026-05-28 22:15:13 +0000 groups.7: New manual page of standard group names Import groups(7) from NetBSD, with tweaks for our system. The group list is sorted by GID. All the group names from /usr/src/etc/group are described, except "uucp". The FILES section was added on top of the original manual page. Approved by: re (cperciva) PR: 264966 Relnotes: yes MFC after: 3 days Obtained from: NetBSD Reviewed by: des, ziaee Differential Revision: https://reviews.freebsd.org/D54114 (cherry picked from commit e09104dfb76a36b65a64bd315bd1520941c4beed) (cherry picked from commit 2c4190609c78c532e0a667eba1ffb4b5c98ea532) --- share/man/man5/group.5 | 3 +- share/man/man5/passwd.5 | 3 +- share/man/man7/Makefile | 2 + share/man/man7/groups.7 | 345 +++++++++++++++++++++++++++++++++++++++++++++ usr.bin/id/groups.1 | 5 +- usr.bin/id/id.1 | 5 +- usr.bin/newgrp/newgrp.1 | 5 +- usr.sbin/adduser/adduser.8 | 3 +- usr.sbin/chkgrp/chkgrp.8 | 5 +- usr.sbin/chown/chgrp.1 | 3 +- usr.sbin/chown/chown.8 | 3 +- usr.sbin/pw/pw.8 | 3 +- 12 files changed, 371 insertions(+), 14 deletions(-) diff --git a/share/man/man5/group.5 b/share/man/man5/group.5 index 8f7c59c59d52..ba26a7114ac0 100644 --- a/share/man/man5/group.5 +++ b/share/man/man5/group.5 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 29, 2025 +.Dd April 19, 2026 .Dt GROUP 5 .Os .Sh NAME @@ -152,6 +152,7 @@ may still have this limit. .Xr initgroups 3 , .Xr nsswitch.conf 5 , .Xr passwd 5 , +.Xr groups 7 , .Xr chkgrp 8 , .Xr pw 8 , .Xr yp 8 diff --git a/share/man/man5/passwd.5 b/share/man/man5/passwd.5 index b1d9e362492c..56dbabfe901e 100644 --- a/share/man/man5/passwd.5 +++ b/share/man/man5/passwd.5 @@ -28,7 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 16, 2023 +.Dd April 19, 2026 .Dt PASSWD 5 .Os .Sh NAME @@ -425,6 +425,7 @@ BEGIN { FS = ":"} .Xr login.conf 5 , .Xr netgroup 5 , .Xr nsswitch.conf 5 , +.Xr groups 7 , .Xr adduser 8 , .Xr nologin 8 , .Xr pw 8 , diff --git a/share/man/man7/Makefile b/share/man/man7/Makefile index 6a426cc29b15..6fd32da900e1 100644 --- a/share/man/man7/Makefile +++ b/share/man/man7/Makefile @@ -14,6 +14,7 @@ MAN= arch.7 \ development.7 \ environ.7 \ firewall.7 \ + groups.7 \ growfs.7 \ hier.7 \ hostname.7 \ @@ -50,6 +51,7 @@ MLINKS+= c.7 c11.7 MLINKS+= c.7 c17.7 MLINKS+= c.7 c23.7 MLINKS+= c.7 c2y.7 +MLINKS+= groups.7 wheel.7 .if ${MK_INET} != "no" MAN+= networking.7 diff --git a/share/man/man7/groups.7 b/share/man/man7/groups.7 new file mode 100644 index 000000000000..822717d68983 --- /dev/null +++ b/share/man/man7/groups.7 @@ -0,0 +1,345 @@ +.\" $NetBSD: groups.7,v 1.8 2020/04/02 20:57:20 roy Exp $ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2020 The NetBSD Foundation, Inc. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION OR CONTRIBUTORS +.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\" POSSIBILITY OF SUCH DAMAGE. +.\" +.Dd April 19, 2026 +.Dt GROUPS 7 +.Os +.Sh NAME +.Nm groups +.Nd standard group names +.Sh DESCRIPTION +A standard +.Fx +installation has the following user group names: +.Bl -tag -width "realtime" +.It Em wheel +Users authorized to elevate themselves to the super-user privileges of +the root user, meaning uid\~0. +Normally the +.Em wheel +group has gid\~0. +.Pp +Users who are not in the group +.Em wheel +are never allowed by +.Xr su 1 +to gain root privileges. +.It Em daemon +Used by the set-group-id programs +.Xr lpr 1 +and +.Xr rwho 1 . +.It Em kmem +Used by the set-group-id programs (like +.Xr ktrdump 8 ) +that need to access kernel memory +.Po Pa /dev/mem +and +.Pa /dev/kmem +are in the group +.Em kmem +.Pc . +See +.Xr mem 4 . +.It Em sys +Historic group. +Unused in modern +.Fx . +.It Em tty +Used by the set-group-id programs +.Xr wall 1 +and +.Xr write 1 +to allow users to send messages to another tty even if they don't own +it (static tty device nodes +.Pa /dev/pts/* +are all in the group +.Em tty ) . +See +.Xr tty 4 . +.It Em operator +Users authorized to take backups of disk devices and shut down the +machine. +.Pp +The disk device nodes +(such as +.Pa /dev/ada0 ) +are in the group +.Em operator +and group-readable so users in the group can read from disk devices, +for example with +.Xr dump 8 . +The tape device nodes +(such as +.Pa /dev/sa0 ) +are in the group +.Em operator +and are both group-readable and group-writable so users in the group +can write to tape devices. +.Pp +The +.Xr shutdown 8 +program is executable only by root and members of the +.Em operator +group. +.It Em mail +Used by mail agents (like +.Xr dma 8 ) . +.Pp +By default, root mail +.Pq Pa /var/mail/root +is in the +.Em mail +group. +.It Em bin +Historic group. +Unused in modern +.Fx . +.It Em news +Historic group. +Unused in modern +.Fx . +.It Em man +Historic group; used to be used for managing manual pages (see +.Xr man 1 ) . +.It Em games +Used by various set-group-id games to maintain high-scores files +and other common files in +.Pa /var/games . +The members of this group are also allowed to access +.Pa /dev/input/event* +device nodes (see +.Xr hgame 4 ) . +See also +.Xr intro 6 . +.It Em ftp +Used to be used by +.Xr sysinstall 8 +(which is now replaced with +.Xr bsdinstall 8 ) +for setting up anonymous FTP. +Unused in modern +.Fx . +.It Em staff +Staff users, in contrast to guest users (see +.Em guest +group). +Not used by +.Fx ; +available for the administrator's interpretation. +See +.Xr security 7 +for some recommendations on managing accounts in +.Em staff +group. +.It Em sshd +Primary group for the +.Em sshd +pseudo-user used by the +.Xr sshd 8 +secure shell daemon. +.It Em smmsp +Primary group for user +.Em smmsp , +which is used by +.Xr sendmail 8 +if no non-root users were configured for running it. +.Pp +The name of the group means "SendMail Message Submission Program". +.It Em mailnull +Used by electronic mail transport agent +.Xr sendmail 8 +as group for its default user +.Em mailnull . +.It Em guest +Guest users, in contrast to staff users (see +.Em staff +group). +Not used by +.Fx ; +available for the administrator's interpretation. +.It Em video +Used for access to +.Pa /dev/drm/* +devices, which are used for GPU hardware acceleration. +See +.Xr drm 7 . +.It Em realtime +Used by +.Xr mac_priotiry 4 +to allow members of this group to run threads and processes with +realtime scheduling priority. +See also +.Xr rtprio 1 . +.It Em idletime +Used by +.Xr mac_priority 4 +to allow members of this group to run processes with idle scheduling +priority. +See also +.Xr idprio 1 . +.It Em bind +Used to be used as primary group for the +.Em bind +pseudo-user used by +.Xr named 8 +Internet domain name server, which has been removed from the base system in +.Fx 10.0 . +.It Em unbound +Primary group for the +.Em unbound +pseudo-user used by the +.Xr local-unbound 8 +recursive DNS resolver. +.It Em proxy +Primary group for the +.Em proxy +pseudo-user used by the +.Xr ftp-proxy 8 +proxy daemon with packet filters such as +.Xr pf 4 . +.It Em authpf +Used by the set-group-id program +.Xr authpf 8 +to configure authenticated gateways. +.It Em _pflogd +Primary group for the +.Em _pflogd +pseudo-user used by the +.Xr pflogd 8 +log daemon with the +.Xr pf 4 +packet filter. +.It Em _dhcp +Primary group for the +.Em _dhcp +pseudo-user used by the +.Xr dhclient 8 +DHCP Client. +.It Em dialer +Users authorized to make outgoing modem calls (see +.Xr cu 1 +and +.Pa /dev/cuauN +devices). +.It Em network +Historic group. +Unused in modern +.Fx . +.It Em audit +Primary group for the +.Em auditdistd +pseudo-user used by +.Xr auditd 8 +and +.Xr auditdistd 8 +audit daemons. +.It Em www +Historic group for accessing World Wide Web. +Unused in modern +.Fx . +.It Em u2f +Used for users who need to access +.Pa /dev/u2f/* +devices (see +.Xr u2f 4 ) . +.It Em ntpd +Primary group for the +.Em ntpd +pseudo-user used by the +.Xr ntpd 8 +network time protocol daemon. +.It Em _ypldap +Primary group for the +.Em _ypldap +pseudo-user used by +.Xr ypldap 8 +daemon. +.It Em hast +Primary group for the +.Em hast +pseudo-user used by +Highly Available Storage daemon +.Xr hastd 8 . +.It Em tests +Primary group for the +.Em tests +pseudo-user used by +automatic tests that request to run unprivileged. +See +.Xr tests 7 . +.It Em nogroup +Pseudo-group (fake group). +It differs from group +.Em nobody +in way that +.Em nogroup +doesn't have a dedicated user for it. +For instance, this group is used for users +.Em tty +and +.Em kmem . +.It Em nobody +Primary group for the traditional +.Em nobody +pseudo-user. +Modern practice is to assign to each different daemon its own separate +pseudo-user account and group so that if one daemon is compromised it +does not compromise all the other daemons. +.Pp +See also group +.Em nogroup . +.El +.Sh FILES +.Bl -tag -width "/usr/src/etc/group" -compact +.It Pa /etc/group +Main group permissions file. +.It Pa /usr/src/etc/group +Group permissions file for the base system. +.It Pa /usr/ports/GIDs +A list of GIDs (group IDs) reserved for ports (see +.Xr ports 7 ) . +.El +.Pp +See +.Xr group 5 +for the format of abovementioned files. +.Sh SEE ALSO +.Xr chgrp 1 , +.Xr groups 1 , +.Xr id 1 , +.Xr newgrp 1 , +.Xr group 5 , +.Xr pw 8 +.Sh HISTORY +The +.Nm +manual page appeared in +.Nx 10.0 +and +.Fx 15.1 . diff --git a/usr.bin/id/groups.1 b/usr.bin/id/groups.1 index 1a6b4f769b05..38e7f05d6c7b 100644 --- a/usr.bin/id/groups.1 +++ b/usr.bin/id/groups.1 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 6, 1993 +.Dd April 19, 2026 .Dt GROUPS 1 .Os .Sh NAME @@ -59,4 +59,5 @@ $ groups root wheel operator .Ed .Sh SEE ALSO -.Xr id 1 +.Xr id 1 , +.Xr groups 7 diff --git a/usr.bin/id/id.1 b/usr.bin/id/id.1 index 62c941f84798..e92daee39cb0 100644 --- a/usr.bin/id/id.1 +++ b/usr.bin/id/id.1 @@ -28,7 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 23, 2025 +.Dd April 19, 2026 .Dt ID 1 .Os .Sh NAME @@ -180,7 +180,8 @@ bob pts/5 Dec 4 19:51 .Ed .Sh SEE ALSO .Xr groups 1 , -.Xr who 1 +.Xr who 1 , +.Xr groups 7 .Sh STANDARDS The .Nm diff --git a/usr.bin/newgrp/newgrp.1 b/usr.bin/newgrp/newgrp.1 index 032aeb72616d..4c134708b147 100644 --- a/usr.bin/newgrp/newgrp.1 +++ b/usr.bin/newgrp/newgrp.1 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd February 6, 2025 +.Dd April 19, 2026 .Dt NEWGRP 1 .Os .Sh NAME @@ -91,7 +91,8 @@ As a non-root user, switch to the group: .Xr umask 1 , .Xr group 5 , .Xr passwd 5 , -.Xr environ 7 +.Xr environ 7 , +.Xr groups 7 .Sh STANDARDS The .Nm diff --git a/usr.sbin/adduser/adduser.8 b/usr.sbin/adduser/adduser.8 index eacc12a8f3ce..651e0ac91809 100644 --- a/usr.sbin/adduser/adduser.8 +++ b/usr.sbin/adduser/adduser.8 @@ -27,7 +27,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 1, 2024 +.Dd April 19, 2026 .Dt ADDUSER 8 .Os .Sh NAME @@ -445,6 +445,7 @@ logfile for .Xr login.conf 5 , .Xr passwd 5 , .Xr shells 5 , +.Xr groups 7 , .Xr pw 8 , .Xr pwd_mkdb 8 , .Xr rmuser 8 , diff --git a/usr.sbin/chkgrp/chkgrp.8 b/usr.sbin/chkgrp/chkgrp.8 index 3837e5fe6803..95dc272fb2db 100644 --- a/usr.sbin/chkgrp/chkgrp.8 +++ b/usr.sbin/chkgrp/chkgrp.8 @@ -24,7 +24,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd May 26, 2005 +.Dd April 19, 2026 .Dt CHKGRP 8 .Os .Sh NAME @@ -73,7 +73,8 @@ will print an error message containing the name of the file being scanned and the line number on which the error was found. .Sh SEE ALSO .Xr getgrent 3 , -.Xr group 5 +.Xr group 5 , +.Xr groups 7 .Sh HISTORY The .Nm diff --git a/usr.sbin/chown/chgrp.1 b/usr.sbin/chown/chgrp.1 index f05c81e4bae7..95ca2b3bfd27 100644 --- a/usr.sbin/chown/chgrp.1 +++ b/usr.sbin/chown/chgrp.1 @@ -28,7 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd January 7, 2017 +.Dd April 19, 2026 .Dt CHGRP 1 .Os .Sh NAME @@ -148,6 +148,7 @@ options are non-standard and their use in scripts is not recommended. .Xr fts 3 , .Xr group 5 , .Xr passwd 5 , +.Xr groups 7 , .Xr symlink 7 , .Xr chown 8 .Sh STANDARDS diff --git a/usr.sbin/chown/chown.8 b/usr.sbin/chown/chown.8 index 9f4cfafb6852..6c62f3267882 100644 --- a/usr.sbin/chown/chown.8 +++ b/usr.sbin/chown/chown.8 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 24, 2022 +.Dd April 19, 2026 .Dt CHOWN 8 .Os .Sh NAME @@ -166,6 +166,7 @@ options are non-standard and their use in scripts is not recommended. .Xr find 1 , .Xr chown 2 , .Xr fts 3 , +.Xr groups 7 , .Xr symlink 7 .Sh STANDARDS The diff --git a/usr.sbin/pw/pw.8 b/usr.sbin/pw/pw.8 index 91d746e90c02..1498f76fd9c5 100644 --- a/usr.sbin/pw/pw.8 +++ b/usr.sbin/pw/pw.8 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd February 11, 2026 +.Dd April 19, 2026 .Dt PW 8 .Os .Sh NAME @@ -1104,6 +1104,7 @@ No base home directory configured. .Xr login.conf 5 , .Xr passwd 5 , .Xr pw.conf 5 , +.Xr groups 7 , .Xr pwd_mkdb 8 , .Xr vipw 8 , .Xr zfs 8 From nobody Thu May 28 22:16:12 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRLRd0MBfz6fR2K for ; Thu, 28 May 2026 22:16:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRLRc3zvGz3LSH for ; Thu, 28 May 2026 22:16:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780006572; 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=IRORl1NeGaOmA+poBuK8wBs4X6qczC6Gl0cGHcJtdro=; b=liiQkqJcO7skacjqXh02QJk7m+l/VCbduGTx14g12IMZsqg4xKxWgk+4p3o1EuyqVdjtSr tuAsAASJcNtYI6uRls2Ti4wq8eiQi3uICN+k9dOLsy9krrxGECl3MLuS+JsPUjHf49jRzK iCqK3Lh1TterJjXllNl2xHMiYFNsXT9Wo6+piEcHQwgXSytB1GcyQw2WJk8SxGCl3GOEoM VRsxWxzQ4Zuo3DT5nWknjsdLklcquwi4XUb5hnoFsJN4m86oWmaQnS+DBqoHLEj2rrgUX2 IQc+2RMBHBGYQ+oBRvReEfRi1JuzVsweS1EUxe12urRlbT4UPMhcMgDpp9ixbg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780006572; a=rsa-sha256; cv=none; b=xq/l7JWeB6EIKb7aAlTLlSPg0Sjc8liJT5oy2SjyjocePpo3IXRgDDTNtGNlZqlmEK5uSf jhH3hXiPXMU+6gGD/tYcpoNjZAksQ0KP6R9/+gfvBAcSi+T+98iPpppo2x+Q8J7ERGTgiH aiLn1ld46OpiHALnr1W+GLK2m10U5m5orrucUxjRpNInamNihHH7i3bey0IVt+NbmQnDDr dCR93Q0GFGBzqaUJMgraZkyb9NWvOwbzydAWfwF7XjAG0tESWYYusxqT0NHzf1LWc9qaok p1OmqAslwuikBD9aKl3mrzvC3LvIZTh+x5Q31nzS81eraehNDhRkxdzIEBED/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780006572; 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=IRORl1NeGaOmA+poBuK8wBs4X6qczC6Gl0cGHcJtdro=; b=yHp4iOK5/7+qWDwEk13WZISh+Q8wxTZNBUkZxVQjdzsU+p1hrUFY17jYtcvudb38k9Eh+M OcvRLz/P/txKSwe2RW11EYvBABAQxyhdP0mKd98KLp5cgZEhsGESrONBCcBkMTVPzIWoT1 UCbO7Ocygl/xW819J90UmKFUz9RpFT81cZFpY5a12fhgsokphDPsvxTs30APE0IPTRrco7 b2r84W0ZivUWVU3G7J/N08pxGwr/z8HpkacWxtSVh0SlAQWljzVcqz9PZFKmxUuKwzrROF 3k/r0GT6uSTnC/TrLtJsS71ZJEm33l+xebhYQuzIkXc2e10zcCRoeWWMtMqatw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRLRc3PpWz150Z for ; Thu, 28 May 2026 22:16:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c2ae by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 22:16:12 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Alan Somers From: Colin Percival Subject: git: 191573ce0bfd - releng/15.1 - padlock: Restore padlock_rng to the amd64 build List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.1 X-Git-Reftype: branch X-Git-Commit: 191573ce0bfd44189ef6f34f22108e59da1cc65a Auto-Submitted: auto-generated Date: Thu, 28 May 2026 22:16:12 +0000 Message-Id: <6a18beac.3c2ae.521ad578@gitrepo.freebsd.org> The branch releng/15.1 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=191573ce0bfd44189ef6f34f22108e59da1cc65a commit 191573ce0bfd44189ef6f34f22108e59da1cc65a Author: Alan Somers AuthorDate: 2026-05-24 00:19:13 +0000 Commit: Colin Percival CommitDate: 2026-05-28 22:15:46 +0000 padlock: Restore padlock_rng to the amd64 build Revert 88a53301e19 and d1ca01059d5 . They removed padlock_rng from the amd64 build under the mistaken belief that this device was available on 32-bit processors only. But it's also available on the 64-bit Via Nano, Nano X2, and some Zhaoxin CPUs. Approved by: re (cperciva) PR: 295517 Fixes: 88a53301e19 ("padlock.4: only install on i386") Fixes: d1ca01059d5 ("padlock(4)/nehemiah: move i386-only entropy") Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D57215 (cherry picked from commit 14b8531c4ccb836d755ce8a4f1b384164b5d9d94) (cherry picked from commit 71ec93ff69f0b724a1c51e9fa772b08a10506112) --- share/man/man4/Makefile | 5 +---- sys/amd64/conf/GENERIC | 1 + sys/amd64/conf/MINIMAL | 1 + sys/conf/files.i386 | 1 - sys/conf/files.x86 | 1 + sys/i386/conf/NOTES | 7 ------- sys/modules/Makefile | 4 +--- sys/x86/conf/NOTES | 1 + 8 files changed, 6 insertions(+), 15 deletions(-) diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 23057e016f7d..c6889c49c355 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -895,6 +895,7 @@ _ntb_hw_intel.4= ntb_hw_intel.4 _ntb_hw_plx.4= ntb_hw_plx.4 _ntb_transport.4=ntb_transport.4 _nvram.4= nvram.4 +_padlock.4= padlock.4 _pchtherm.4= pchtherm.4 _qat.4= qat.4 _qat_c2xxx.4= qat_c2xxx.4 @@ -941,10 +942,6 @@ _vmm.4= vmm.4 .endif .endif -.if ${MACHINE_CPUARCH} == "i386" -_padlock.4= padlock.4 -.endif - .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "aarch64" _hwt.4= hwt.4 .if ${MACHINE_CPUARCH} == "amd64" diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC index 17f70c6c26fd..6f1b4993a849 100644 --- a/sys/amd64/conf/GENERIC +++ b/sys/amd64/conf/GENERIC @@ -310,6 +310,7 @@ device wpi # Intel 3945ABG wireless NICs. device crypto # core crypto support device aesni # AES-NI OpenCrypto module device loop # Network loopback +device padlock_rng # VIA Padlock RNG device rdrand_rng # Intel Bull Mountain RNG device ether # Ethernet support device vlan # 802.1Q VLAN support diff --git a/sys/amd64/conf/MINIMAL b/sys/amd64/conf/MINIMAL index c14d8fa261c5..595ff454f400 100644 --- a/sys/amd64/conf/MINIMAL +++ b/sys/amd64/conf/MINIMAL @@ -115,6 +115,7 @@ device uart # Generic UART driver # Pseudo devices. device loop # Network loopback +device padlock_rng # VIA Padlock RNG device rdrand_rng # Intel Bull Mountain RNG device ether # Ethernet support diff --git a/sys/conf/files.i386 b/sys/conf/files.i386 index e6c2089e2c1e..41c51a7aa9c5 100644 --- a/sys/conf/files.i386 +++ b/sys/conf/files.i386 @@ -33,7 +33,6 @@ dev/hyperv/vmbus/i386/hyperv_machdep.c optional hyperv dev/le/if_le_isa.c optional le isa dev/ofw/ofw_pcib.c optional fdt pci dev/pcf/pcf_isa.c optional pcf -dev/random/nehemiah.c optional padlock_rng !random_loadable dev/sbni/if_sbni.c optional sbni dev/sbni/if_sbni_isa.c optional sbni isa dev/sbni/if_sbni_pci.c optional sbni pci diff --git a/sys/conf/files.x86 b/sys/conf/files.x86 index fabcd5d9ebe5..ebafb6e942f4 100644 --- a/sys/conf/files.x86 +++ b/sys/conf/files.x86 @@ -309,6 +309,7 @@ dev/ntb/ntb_hw/ntb_hw_plx.c optional ntb_hw_plx | ntb_hw dev/ntb/test/ntb_tool.c optional ntb_tool dev/nvram/nvram.c optional nvram isa dev/random/ivy.c optional rdrand_rng !random_loadable +dev/random/nehemiah.c optional padlock_rng !random_loadable dev/random/rdseed.c optional rdrand_rng !random_loadable dev/qat_c2xxx/qat.c optional qat_c2xxx dev/qat_c2xxx/qat_ae.c optional qat_c2xxx diff --git a/sys/i386/conf/NOTES b/sys/i386/conf/NOTES index fbcea76527db..93dc00634cc0 100644 --- a/sys/i386/conf/NOTES +++ b/sys/i386/conf/NOTES @@ -302,13 +302,6 @@ envvar hint.pcf.0.irq="5" # device glxsb # AMD Geode LX Security Block -# -# padlock is a driver for the cryptographic functions and RNG in -# VIA C3, C7, and Eden processors. -# Requires 'device crypto'. -# -device padlock_rng # VIA Padlock RNG - ##################################################################### # ABI Emulation diff --git a/sys/modules/Makefile b/sys/modules/Makefile index a3b0cda92feb..abb2668f4ae2 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -830,6 +830,7 @@ _nfe= nfe _nvram= nvram .if ${MK_CRYPT} != "no" || defined(ALL_MODULES) _padlock= padlock +_padlock_rng= padlock_rng _rdrand_rng= rdrand_rng _rdseed_rng= rdseed_rng .endif @@ -903,9 +904,6 @@ _glxsb= glxsb _pcfclock= pcfclock _pst= pst _sbni= sbni -.if ${MK_CRYPT} != "no" || defined(ALL_MODULES) -_padlock_rng= padlock_rng -.endif .endif .if ${MACHINE_ARCH} == "armv7" diff --git a/sys/x86/conf/NOTES b/sys/x86/conf/NOTES index 501d4159b129..3e8793e9d1ae 100644 --- a/sys/x86/conf/NOTES +++ b/sys/x86/conf/NOTES @@ -541,6 +541,7 @@ envvar hint.pbio.0.port="0x360" device smbios device vpd device tpm +device padlock_rng # VIA Padlock RNG device rdrand_rng # Intel Bull Mountain RNG device aesni # AES-NI OpenCrypto module device ossl # OpenSSL OpenCrypto module From nobody Fri May 29 00:00:03 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRNlY23tcz6fZ1R for ; Fri, 29 May 2026 00:00:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRNlY0Jcfz3XRN for ; Fri, 29 May 2026 00:00:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780012809; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2Sv+XQeFHkRYOkRMIy7pqtTmte2exLmXz1/qDISOyQ0=; b=qoyE+MqcWKIBGQXHc8MAeCbbqn6SZ/BuLs5k6DjmUT0JqKYaNWpgigeliKMOy5spzII9zS IxaSOWKTCX8WZWQi9xxcSNP6OVB4eIPlh/BDUEoMI0vB3bfnX+MmLzfTV957R1MztXzfiD LIIUYc+ddjCioVl4/dRtYRaX4Wi8avOOvJfs9FBqxBv/i4phSkuuoMo42CnhXj6TO0Kkqa /WXpF7nTwpBf3H5VHA3KY2tboa8+l6SyunqVsapTgH7dtioebK8wU1Q31L7nmGBUXCKv/P yI5OC4x83OcWiUwHFLmpKejrC4rdiHGxSRquzC9YVJQOf/2pIfXM7UuTtBBAeQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780012809; a=rsa-sha256; cv=none; b=NFaFyal5fqnqmI2qUOePudkaLGPcVbWUr6jPLASMKjxosjI5y1kbls/3PzGctgrQaCrIvd R6wWJtYVKFgWgDuojZNC8o7FplVZPMdJ70dIw3m2wwU3Z7e3Uwp93wK/ng69L6Cx5vorke ZdC/1Js4dL3xBVbQ9z+NpHzdakEPHED1zNrwZn+wRFgqJ9FGdIt8TY/bnoKX74oCUvo8X5 77AqiCEbCrUHuQq/t5/x+2JBi5mf0OftTf95vUPigiB+bswAYLw9t55WkGvVTGVIPCQ5CX HWcbYTYvLtEVaXC7sADl63oFH1u3SnAVp92UqfialxyFpc6uwKVh2W6WSOlsYw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780012809; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2Sv+XQeFHkRYOkRMIy7pqtTmte2exLmXz1/qDISOyQ0=; b=xP2/G9qN5Pon0JXY9lHCH/+p60Ld1T923EFvQpoPwqkxoyW5BTTUfD5I2jCiXUZB0KaLrQ 2xq8JilbYbnk9RFt/gocLRPsMOe6lABubcurlma5FpTf8f+hQxbVXOVw1iZVOIkXxyFt5l 9YuSBpCQ6RlCSEs9XmYhcv2U+I7V9mOGaZkAHEnayzA+tELGinETEfTTanRxMjxBrCOOq4 ajXbt91ma67PLROhwtcgDsvb3V/5+iqoQ9JyBVI4g3C1lGeRgal3ICcKUMFxUnI0lxmTTg N7hgEOtQxyYIAZxftFDsTEkodMAht7ndmEoPs6/sixYk5ujzB49Sx8hXTRmyiQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRNlX6f2hz177y for ; Fri, 29 May 2026 00:00:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 47084 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 00:00:03 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: f841f71deade - releng/15.1 - 15.1: Update to RC2 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.1 X-Git-Reftype: branch X-Git-Commit: f841f71deaded8a869ba228d3e011630570d59f7 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 00:00:03 +0000 Message-Id: <6a18d703.47084.eb51852@gitrepo.freebsd.org> The branch releng/15.1 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=f841f71deaded8a869ba228d3e011630570d59f7 commit f841f71deaded8a869ba228d3e011630570d59f7 Author: Colin Percival AuthorDate: 2026-05-29 00:00:00 +0000 Commit: Colin Percival CommitDate: 2026-05-29 00:00:00 +0000 15.1: Update to RC2 Approved by: re (implicit) Sponsored by: OpenSats Initiative --- sys/conf/newvers.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 2fd1f6f341bc..8d43d168aace 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -51,7 +51,7 @@ TYPE="FreeBSD" REVISION="15.1" -BRANCH="RC1" +BRANCH="RC2" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From nobody Fri May 29 02:10:32 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRRf54h9Gz6fkf6 for ; Fri, 29 May 2026 02:10: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRRf52MKyz3gX3 for ; Fri, 29 May 2026 02:10:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780020637; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WyaDcyGjZs1MzVAIAENNnUI82fQXCWfEvZ3pWS+zxsY=; b=QRucje0EJcFw4saaCkPlOAMAfuxgZ6pOeMTMkOoa1sIS+bLtkfgbSsvQjweNpbjVxwiBts 0pXyJeoavl3zoxd8OlgYY6ke1D3CizsVJTu3i8ufBzvNB3UNUUhqijDttKsiXTanL9y9wH LP9HpcLvbMQSc790FX5JyFxoSdk0gu8DBv8seiOeqAT+Mvtxjw2+cBHczAYY4VJDv+Itb8 Xy/ipx7nOKhIcZ+C/0QCKSpK5c1MqY8cDaCqoxjBhjzf7G5SSbDba+itREQAw7KYz5d1MY CBZh4bSAE2yNDNettT063enpUmR5qfwBdmWy9hSASTJSUEo581bZEQ1bLz6mqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780020637; a=rsa-sha256; cv=none; b=M4UqkFD7QsDCxaZT3td537gCmjbtVOkvKyVdLnrUXQbpbSbtjMkNr9CJ1QdwnJan8BnmuG 8A74nP+9nnx11fynSPIUEHdhABgpyordVnSBftGutnqXGY47M22gXaszFGrxcnUaWRx0A3 OeTlOyGqTqHfUDJHj13QPJBr8UhvnK2+bvPKJhRC9ozji5eJURNagfzn439QwEgPaaoo/t psiISoqqhKJNu+fm8T8yrWN+Dj8owXeCIGyXmoWt3kAilo3b9HZrtclsx4RGtofWIy+H6b C/qoi0+YxK9aYbly/hmxBDsyvPZabeqBqzISoQHyUsGVwBceYilgdskQ1Txw+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780020637; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WyaDcyGjZs1MzVAIAENNnUI82fQXCWfEvZ3pWS+zxsY=; b=vv17kgtZ0kHsts0Nr9grGLD1SJ1dQit8xfOS7t5BTn335MQRbo9YYm0Xshx3F+0TheBvRU wVKLU213orBQ2AeYVRhq0xlOdc3EBCKInAnkPAMd05bfaTIh7E3fVhTIjW7Eq885pf1sLj Kpn3gfJ8GOkvWgkwshgdje6U3tAhKySr5NVZI9/IoCwnpWnQWvC9RClPMsRkvhnYX9quTF NzCesKmWhrqnG4166nQJ+uyjloDEY7w4vqiN9glH1QkL2sTClx+h4HSfiI93yFsCwDh84z j+F2lTBoeGXwgYUVcjGmVoGQ9bFJsa6DXn6WgvDHnYhPmd9aFU05s54nPlSoXg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRRf51lWcz1Bd3 for ; Fri, 29 May 2026 02:10:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 248cf by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 02:10:32 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 283959bbe086 - main - bsdinstall: script: Fix scripted DISTRIBUTIONS List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 283959bbe0863917c4fc3200a92d1055a4c89bdc Auto-Submitted: auto-generated Date: Fri, 29 May 2026 02:10:32 +0000 Message-Id: <6a18f598.248cf.32d03e2a@gitrepo.freebsd.org> The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=283959bbe0863917c4fc3200a92d1055a4c89bdc commit 283959bbe0863917c4fc3200a92d1055a4c89bdc Author: Jose Luis Duran AuthorDate: 2026-05-29 02:09:49 +0000 Commit: Jose Luis Duran CommitDate: 2026-05-29 02:09:49 +0000 bsdinstall: script: Fix scripted DISTRIBUTIONS Restore exporting DISTRIBUTIONS to make it available to other scripts. Reviewed by: imp, asomers Fixes: dc14ae4217a0 ("bsdinstall: do pkgbase installations with the "script" command") MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D57319 --- usr.sbin/bsdinstall/scripts/script | 1 + 1 file changed, 1 insertion(+) diff --git a/usr.sbin/bsdinstall/scripts/script b/usr.sbin/bsdinstall/scripts/script index 93d07c7899c3..4c792d80df6a 100755 --- a/usr.sbin/bsdinstall/scripts/script +++ b/usr.sbin/bsdinstall/scripts/script @@ -50,6 +50,7 @@ f_include $BSDCFG_SHARE/variable.subr ############################################################ GLOBALS : ${TMPDIR:="/tmp"} +: ${DISTRIBUTIONS=""}; export DISTRIBUTIONS # # Strings that should be moved to an i18n file and loaded with f_include_lang() From nobody Fri May 29 08:02:44 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRbSN2TqDz6g8hL for ; Fri, 29 May 2026 08:02:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRbSN1Zfhz3F9m for ; Fri, 29 May 2026 08:02:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780041764; 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=C7LfmktbCcBaDLxTfCO2SrmPji+9YCM4+hibWHikFss=; b=dX446koPf/ALPdwBVlVcbwWjZTebot3PakYDNzhlxzS8ZECO/OcpbQKHXQrrhkwqRKILUi F9NCCR7bFANyh5lBJC6O0yXNT8kZjURUJarhSliKM+C58ZUpulTxmStvaMznhLLFFUv+Zf GEJb2jlqrstWKVHV1ZEFCSQ6U2dqnF+fS3niuU4LBIbzZl5AVWbgpfItYpx7EID6CXiZly JHGh/xLm4CHjH2lm69JVTi8AOxpk3beAyA3AAOF58pUwC5JGgPO3jdnn95LMEyG9JwSguY me32wFAI6IGS/1S/+qRgUs79fqZo93zSCm1McfA/auU2/rzpTL9dfLvs3lZUuQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780041764; a=rsa-sha256; cv=none; b=bmbCTP+LjzzIxm8JSd6d5D/hV6zUENMM1TefKgjKoYenAbU+maSfR9wkXL7CvW86zU9xjE 4GOtv54wHA83a0MylZj2PssEoLn1En7rlCE3F8xVSbTUMl/hZaWQDp/nFLWUh0WZ6krzam YKBtco8Da4w31Q60vRGcUMZquzIB2zFtihcNEOo5DMnUnT6noH3zV5zQD0mTDhFrRfqile u9j3wSZNsMkTLB/6UyUD0S0ZgH0zwTQDz6bsIcu1oqGAB5O6vx3+kNNN11iHCQp216H45P 5E/bAVILUEAq+13CDx5WsX2KmqeyhgzaFg6lNeDbywpiiyhgQ9695C7hqJV1Iw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780041764; 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=C7LfmktbCcBaDLxTfCO2SrmPji+9YCM4+hibWHikFss=; b=wBacHseZEDdz4syQI9vtUw09ZhcH5pACEVb1BzkZvTBTlp11hs8t3YfUBIYbRocs6jqYLb 7qLm6F34Vqvwms+g1K+aq3jAmDZWycZfGCr5ZGummpEc+Nyyuw7pKWYGqK3ycPpKW3IB7N hD+ouhVSYYxjmkjdYdvF5XsbaNY5uxq2XHDKizX5e7oP/97aEft9B7Ig6NjY+k4bgAmqNs AHutysBiBwZHodHZ4p6PWARSKItUtkqjBtSM0Sy6MApJX69nKvQZJpajY5XfRRq4T7E3Jw pu+lkdlESD3v57NNlsCXJLGbx+Udb9pRrivf3u6P5YsljVkNasJoS1e3Y0DvVQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRbSN13CMz8TN for ; Fri, 29 May 2026 08:02:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 222c1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 08:02:44 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Vyacheslav Terehov From: Andrey V. Elsukov Subject: git: 33cafd3fadd0 - stable/15 - ipfw: fix parsing error in nat config port_range List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ae X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 33cafd3fadd07ea49b18559a4fe397951c6a844f Auto-Submitted: auto-generated Date: Fri, 29 May 2026 08:02:44 +0000 Message-Id: <6a194824.222c1.adb86ef@gitrepo.freebsd.org> The branch stable/15 has been updated by ae: URL: https://cgit.FreeBSD.org/src/commit/?id=33cafd3fadd07ea49b18559a4fe397951c6a844f commit 33cafd3fadd07ea49b18559a4fe397951c6a844f Author: Vyacheslav Terehov AuthorDate: 2026-05-21 07:15:22 +0000 Commit: Andrey V. Elsukov CommitDate: 2026-05-29 08:01:00 +0000 ipfw: fix parsing error in nat config port_range Also fix the corresponding tests. PR: 263240 Differential Revision: https://reviews.freebsd.org/D57010 (cherry picked from commit 6eba055fcf5b0bbfbebcac59f5982d13815001b0) --- sbin/ipfw/ipfw.8 | 3 ++- sbin/ipfw/nat.c | 29 ++++++++++++++++------------- tests/sys/netpfil/common/nat.sh | 26 ++++++++++++++------------ 3 files changed, 32 insertions(+), 26 deletions(-) diff --git a/sbin/ipfw/ipfw.8 b/sbin/ipfw/ipfw.8 index b72341c685e7..2d683286ed4e 100644 --- a/sbin/ipfw/ipfw.8 +++ b/sbin/ipfw/ipfw.8 @@ -1,5 +1,5 @@ .\" -.Dd March 1, 2026 +.Dd May 21, 2026 .Dt IPFW 8 .Os .Sh NAME @@ -3521,6 +3521,7 @@ Obey transparent proxy rules only, packet aliasing is not performed. Skip instance in case of global state lookup (see below). .It Cm port_range Ar lower-upper Set the aliasing ports between the ranges given. +Ports must be in the range 1024-65535. Upper port has to be greater than lower. .It Cm udp_eim When enabled, UDP packets use endpoint-independent mapping (EIM) from RFC 4787 diff --git a/sbin/ipfw/nat.c b/sbin/ipfw/nat.c index db74abaab233..a5691200943c 100644 --- a/sbin/ipfw/nat.c +++ b/sbin/ipfw/nat.c @@ -757,25 +757,28 @@ nat_show_cfg(struct nat44_cfg_nat *n, void *arg __unused) } static int -nat_port_alias_parse(char *str, u_short *lpout, u_short *hpout) { +nat_port_alias_parse(char *str, u_short *lpout, u_short *hpout) +{ long lp, hp; - char *ptr; + char *ptr, *substr; + + substr = strsep(&str, "-"); + if (substr == NULL || str == NULL) + return (0); + /* Lower port parsing */ - lp = (long) strtol(str, &ptr, 10); - if (lp < 1024 || lp > 65535) - return 0; - if (!ptr || *ptr != '-') - return 0; + lp = (long) strtol(substr, &ptr, 0); + if (*ptr != '\0' || lp < 1024 || lp > 65535) + return (0); + /* Upper port parsing */ - hp = (long) strtol(ptr, &ptr, 10); - if (hp < 1024 || hp > 65535) - return 0; - if (ptr) - return 0; + hp = (long) strtol(str, &ptr, 0); + if (*ptr != '\0' || hp < 1024 || hp > 65535) + return (0); *lpout = (u_short) lp; *hpout = (u_short) hp; - return 1; + return (1); } void diff --git a/tests/sys/netpfil/common/nat.sh b/tests/sys/netpfil/common/nat.sh index 023b0742ec6b..2b828dc03fdc 100644 --- a/tests/sys/netpfil/common/nat.sh +++ b/tests/sys/netpfil/common/nat.sh @@ -26,6 +26,8 @@ # # +set -e + . $(atf_get_srcdir)/utils.subr . $(atf_get_srcdir)/runner.subr @@ -178,13 +180,13 @@ common_cgn() { atf_check -s exit:2 -o ignore jexec client1 ping -t 1 -c 1 198.51.100.2 atf_check -s exit:2 -o ignore jexec client2 ping -t 1 -c 1 198.51.100.2 - if [[ $portalias ]]; then + if [ ${portalias} = "true" ]; then firewall_config nat $firewall \ "ipfw" \ - "ipfw -q nat 123 config if ${epair_host_nat}b unreg_cgn port_alias 2000-2999" \ - "ipfw -q nat 456 config if ${epair_host_nat}b unreg_cgn port_alias 3000-3999" \ - "ipfw -q add 1000 nat 123 all from any to 198.51.100.2 2000-2999 in via ${epair_host_nat}b" \ - "ipfw -q add 2000 nat 456 all from any to 198.51.100.2 3000-3999 in via ${epair_host_nat}b" \ + "ipfw -q nat 123 config if ${epair_host_nat}b unreg_cgn port_range 2000-2999" \ + "ipfw -q nat 456 config if ${epair_host_nat}b unreg_cgn port_range 3000-3999" \ + "ipfw -q add 1000 nat 123 all from any to 198.51.100.0/24 2000-2999 in via ${epair_host_nat}b" \ + "ipfw -q add 2000 nat 456 all from any to 198.51.100.0/24 3000-3999 in via ${epair_host_nat}b" \ "ipfw -q add 3000 nat 123 all from 100.64.0.2 to any out via ${epair_host_nat}b" \ "ipfw -q add 4000 nat 456 all from 100.64.1.2 to any out via ${epair_host_nat}b" else @@ -194,16 +196,16 @@ common_cgn() { "ipfw -q add 1000 nat 123 all from any to any" fi - # ping is successful now - atf_check -s exit:0 -o ignore jexec client1 ping -t 1 -c 1 198.51.100.2 - atf_check -s exit:0 -o ignore jexec client2 ping -t 1 -c 1 198.51.100.2 - # if portalias, test a tcp server/client with nc - if [[ $portalias ]]; then + if [ ${portalias} = "true" ]; then for inst in 1 2; do - daemon nc -p 198.51.100.2 7 - atf_check -s exit:0 -o ignore jexec client$inst sh -c "echo | nc -N 198.51.100.2 7" + daemon nc -l 198.51.100.2 7 + atf_check -s exit:0 -o ignore -e ignore jexec client$inst nc -z 198.51.100.2 7 done + else + # ping is successful now + atf_check -s exit:0 -o ignore jexec client1 ping -t 1 -c 1 198.51.100.2 + atf_check -s exit:0 -o ignore jexec client2 ping -t 1 -c 1 198.51.100.2 fi } From nobody Fri May 29 08:04:11 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRbV43jl8z6g96c for ; Fri, 29 May 2026 08:04: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRbV40nz2z3FbM for ; Fri, 29 May 2026 08:04:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780041852; 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=YVkQ34Z2gJIK4wcg7gxXdxMYwvJiGNF5Q0H56uSCvwg=; b=VW7kVI0H/CmOYX72Zd/YeH6392F4d92nkZMuxLkd04VXPGNddE4QgqX2hSIs7Cgcvr4sef wm3jK6MiKuFafWD/yIX1sRoIQ2QTVJ/SjbSKVXHJ2QbNRVggcBPskezLiqJrdy7rqfy8Zt JGUZtV0iisRiVMtWrttluVNl+Wc+pMCdG2YRXMCSID2S7puLYNAPbtUOhVMmPrjGZQperB B0CTdwp+HuysgEX5XawgoE7yF83BI2j14aKGocQRrx2XDGnEY1h3DBUn7fT5eZxZyQ8p7i 06jvYkhTc/ksCh7B3/rD0AQxFmNXoIC9W+xMGWauYaJ7Jc/niKhk+VhxT48Hrw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780041852; a=rsa-sha256; cv=none; b=asm2T3GCY+JQQcmHx/QtfoEWzkc7rRfosM8FWsB7R6mkptW/Q8xbtvGprGlquXsoRSrmyV Y6oImSB2h5TzPCdjJ0REO8O2jXwRlLgkI1K/E8XsPe+Xb/47dv8WSrG9xpVH4HNDKR+gbU ymJLF3I7HPhH2/28+9mZdagMnVlk9cqnLDIDEv7LkW/x2W3A4+2MXDv9Y5W2/hd+EzvJmQ xGvpPJbOeUykirwKLuHoELQFAgh789pZZtUtoY2wH5rC89tGhvmChG9jOvoLT0LIy+1nnC hzH27UdEfTNl0e9+ybw7ccEAT+U9RW1zdtrexCcIZBYJ9nax4y8qWSvJLh+hSw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780041852; 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=YVkQ34Z2gJIK4wcg7gxXdxMYwvJiGNF5Q0H56uSCvwg=; b=ETj6Y6hEOMlwnY97p+fhcVsW6bs29nfAxZqtBlurYu9HvuYfo7NuWeE61pm1k/bZ1ZqeHX Y7Q83MTtXKBmWOHxSEUU8ChgWSlKthN/mK3QCZDAwyZlgtPavy+acyKx20w3DzT+n7PnID fILCzggvVkh4PDmRhHGLaNIiuegm1SAnDIrxygMHe/YhtrIjNevmXD6ooLlADPi9ZWbegN PH8nQKuYZNRrnJcKotvMAZVWFhExhktfzhV9yoGTQH8GyQGiTTimT0oyupSidn0ltCbt7C BfxqyBC4uArQjarIu8SlXeSFXvX5dXEZAG1yAXY4BGe1AGyOGA8zXgV28/8jNg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRbV370Wqz8WD for ; Fri, 29 May 2026 08:04:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2300b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 08:04:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Vyacheslav Terehov From: Andrey V. Elsukov Subject: git: d2e63a095193 - stable/14 - ipfw: fix parsing error in nat config port_range List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ae X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d2e63a09519364f9a9e328666302b28d7ee95c47 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 08:04:11 +0000 Message-Id: <6a19487b.2300b.58d147e0@gitrepo.freebsd.org> The branch stable/14 has been updated by ae: URL: https://cgit.FreeBSD.org/src/commit/?id=d2e63a09519364f9a9e328666302b28d7ee95c47 commit d2e63a09519364f9a9e328666302b28d7ee95c47 Author: Vyacheslav Terehov AuthorDate: 2026-05-21 07:15:22 +0000 Commit: Andrey V. Elsukov CommitDate: 2026-05-29 08:02:49 +0000 ipfw: fix parsing error in nat config port_range Also fix the corresponding tests. PR: 263240 Differential Revision: https://reviews.freebsd.org/D57010 (cherry picked from commit 6eba055fcf5b0bbfbebcac59f5982d13815001b0) --- sbin/ipfw/ipfw.8 | 3 ++- sbin/ipfw/nat.c | 29 ++++++++++++++++------------- tests/sys/netpfil/common/nat.sh | 26 ++++++++++++++------------ 3 files changed, 32 insertions(+), 26 deletions(-) diff --git a/sbin/ipfw/ipfw.8 b/sbin/ipfw/ipfw.8 index e9f05a7dba76..b4da6b24669e 100644 --- a/sbin/ipfw/ipfw.8 +++ b/sbin/ipfw/ipfw.8 @@ -1,5 +1,5 @@ .\" -.Dd December 29, 2025 +.Dd May 21, 2026 .Dt IPFW 8 .Os .Sh NAME @@ -3376,6 +3376,7 @@ Obey transparent proxy rules only, packet aliasing is not performed. Skip instance in case of global state lookup (see below). .It Cm port_range Ar lower-upper Set the aliasing ports between the ranges given. +Ports must be in the range 1024-65535. Upper port has to be greater than lower. .El .Pp diff --git a/sbin/ipfw/nat.c b/sbin/ipfw/nat.c index a96da30c9f8b..903ea6995544 100644 --- a/sbin/ipfw/nat.c +++ b/sbin/ipfw/nat.c @@ -753,25 +753,28 @@ nat_show_cfg(struct nat44_cfg_nat *n, void *arg __unused) } static int -nat_port_alias_parse(char *str, u_short *lpout, u_short *hpout) { +nat_port_alias_parse(char *str, u_short *lpout, u_short *hpout) +{ long lp, hp; - char *ptr; + char *ptr, *substr; + + substr = strsep(&str, "-"); + if (substr == NULL || str == NULL) + return (0); + /* Lower port parsing */ - lp = (long) strtol(str, &ptr, 10); - if (lp < 1024 || lp > 65535) - return 0; - if (!ptr || *ptr != '-') - return 0; + lp = (long) strtol(substr, &ptr, 0); + if (*ptr != '\0' || lp < 1024 || lp > 65535) + return (0); + /* Upper port parsing */ - hp = (long) strtol(ptr, &ptr, 10); - if (hp < 1024 || hp > 65535) - return 0; - if (ptr) - return 0; + hp = (long) strtol(str, &ptr, 0); + if (*ptr != '\0' || hp < 1024 || hp > 65535) + return (0); *lpout = (u_short) lp; *hpout = (u_short) hp; - return 1; + return (1); } void diff --git a/tests/sys/netpfil/common/nat.sh b/tests/sys/netpfil/common/nat.sh index 023b0742ec6b..2b828dc03fdc 100644 --- a/tests/sys/netpfil/common/nat.sh +++ b/tests/sys/netpfil/common/nat.sh @@ -26,6 +26,8 @@ # # +set -e + . $(atf_get_srcdir)/utils.subr . $(atf_get_srcdir)/runner.subr @@ -178,13 +180,13 @@ common_cgn() { atf_check -s exit:2 -o ignore jexec client1 ping -t 1 -c 1 198.51.100.2 atf_check -s exit:2 -o ignore jexec client2 ping -t 1 -c 1 198.51.100.2 - if [[ $portalias ]]; then + if [ ${portalias} = "true" ]; then firewall_config nat $firewall \ "ipfw" \ - "ipfw -q nat 123 config if ${epair_host_nat}b unreg_cgn port_alias 2000-2999" \ - "ipfw -q nat 456 config if ${epair_host_nat}b unreg_cgn port_alias 3000-3999" \ - "ipfw -q add 1000 nat 123 all from any to 198.51.100.2 2000-2999 in via ${epair_host_nat}b" \ - "ipfw -q add 2000 nat 456 all from any to 198.51.100.2 3000-3999 in via ${epair_host_nat}b" \ + "ipfw -q nat 123 config if ${epair_host_nat}b unreg_cgn port_range 2000-2999" \ + "ipfw -q nat 456 config if ${epair_host_nat}b unreg_cgn port_range 3000-3999" \ + "ipfw -q add 1000 nat 123 all from any to 198.51.100.0/24 2000-2999 in via ${epair_host_nat}b" \ + "ipfw -q add 2000 nat 456 all from any to 198.51.100.0/24 3000-3999 in via ${epair_host_nat}b" \ "ipfw -q add 3000 nat 123 all from 100.64.0.2 to any out via ${epair_host_nat}b" \ "ipfw -q add 4000 nat 456 all from 100.64.1.2 to any out via ${epair_host_nat}b" else @@ -194,16 +196,16 @@ common_cgn() { "ipfw -q add 1000 nat 123 all from any to any" fi - # ping is successful now - atf_check -s exit:0 -o ignore jexec client1 ping -t 1 -c 1 198.51.100.2 - atf_check -s exit:0 -o ignore jexec client2 ping -t 1 -c 1 198.51.100.2 - # if portalias, test a tcp server/client with nc - if [[ $portalias ]]; then + if [ ${portalias} = "true" ]; then for inst in 1 2; do - daemon nc -p 198.51.100.2 7 - atf_check -s exit:0 -o ignore jexec client$inst sh -c "echo | nc -N 198.51.100.2 7" + daemon nc -l 198.51.100.2 7 + atf_check -s exit:0 -o ignore -e ignore jexec client$inst nc -z 198.51.100.2 7 done + else + # ping is successful now + atf_check -s exit:0 -o ignore jexec client1 ping -t 1 -c 1 198.51.100.2 + atf_check -s exit:0 -o ignore jexec client2 ping -t 1 -c 1 198.51.100.2 fi } From nobody Fri May 29 10:13:23 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRfM74Hrdz6gJ4s for ; Fri, 29 May 2026 10:13: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRfM73c37z3RFX for ; Fri, 29 May 2026 10:13:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780049603; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d6mOvMMCDEuDP1GgQoe/MPafx12UhM70EZNeTG2dlyg=; b=VLAKJCT2NBXRPnl/LijpBMmIrr9c8Sk7g4XFYH/A0oaM31tbCsY338xqhk4QdAyVoqfGA4 nDDhq+LT8A1RRdlFl+d+CBvBz1RY+aSTmLkqpg5SDS3sFBbKZ5y1lV4f2+xEFv8qU8GeCj K3aeLvAHQbWbamLXvp5LlATAivoEyDyBVst3zE2hNn/PgbnN245sAvL/toYjIh/tZ28TRl J43UIyUe9Eoi+aQ1x8ZNGrYR6zKFPaUWTSBlbe3EyfkxZUZI6pCV0i/fwihRu6xBt7vZ36 A9NbGhWJmm/ONsIwuQfBMRKiTf4Tb4Dzo+38X7KVmJGDqCfCoIiynJoGSgazyw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780049603; a=rsa-sha256; cv=none; b=pxkRA1WA0ApJenC08VKr1hYydGRkxI4WVMoBn4IgApznALRa8gjg9rX/QWyS94ibNmBrLY YfInuddRuQeobFQ5HuZOuVmU674oScgLQqSQHB90s/bCt9mkFZ7TRuyd9yQxH/EuIHYfBR H1EeQTKg15HbgmLu1M8isRiujFcxDwYCeBlx/+SDGo2o3Y+Foinn+kRq7aAUrL1kH/1ojK 0yJtb1ZF5JNEuSqGSBpIUYxyZtHx/iaH9jjtTccM9BKfIoGxQTkjFAgoKW4u7SUa4XtdSF lKVjbOgngZt795MhHJN6AJbkcpf/2ZSsykehyfOnTQxBnQyEPlNkCSS0JX/gwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780049603; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d6mOvMMCDEuDP1GgQoe/MPafx12UhM70EZNeTG2dlyg=; b=E6GbLb+i0mwGu23msdDesSyhE0sl4ddqe/+t42HEjP4s9djvLVLZGlKdAabeM/484lTfZl FArAMprBl0u+xNVm9JuR8XPou15lj+/63ecreFM3ma9UQiZJJicjHAS+lF4McP5MIPOJYz gLnR8mQA2uqRbDC4pFpK9aMm8u1CPrsUlqpHy68a9enh8Anmxku1/fuDqYRcfgwwEih77U 91CYdlRhz2Xiq3LAfKTi1DeTv3s3nmJAQT17/jpMTxf9gdJ3fP6hHTA3VSplNghW4b0RzL goJWdVVWuwufL6yRepjXu6+15mBcfOjFFf7gu37r3xtglbRM1HQaNz2qWlhkqw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRfM73Bw3zD56 for ; Fri, 29 May 2026 10:13:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39225 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 10:13:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 6272ef2f058b - stable/15 - sound: Remove SV_ABI_LINUX ifdef List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 6272ef2f058b2884c7c1868a235cc7921f037f05 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 10:13:23 +0000 Message-Id: <6a1966c3.39225.60721129@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=6272ef2f058b2884c7c1868a235cc7921f037f05 commit 6272ef2f058b2884c7c1868a235cc7921f037f05 Author: Christos Margiolis AuthorDate: 2026-05-22 10:57:59 +0000 Commit: Christos Margiolis CommitDate: 2026-05-29 10:12:07 +0000 sound: Remove SV_ABI_LINUX ifdef This ifdef does not do anything, SV_ABI_LINUX is a flag. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: ivy, brooks Pull-Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/37 (cherry picked from commit 3a3b0545913625360e38b30dba10c74dae71bbcc) --- sys/dev/sound/pcm/dsp.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index 52bf2d66114a..6d76877e90ba 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -54,12 +54,10 @@ struct dsp_cdevpriv { struct pcm_channel *wrch; }; -#ifdef SV_ABI_LINUX static int dsp_mmap_allow_prot_exec = 0; SYSCTL_INT(_hw_snd, OID_AUTO, compat_linux_mmap, CTLFLAG_RWTUN, &dsp_mmap_allow_prot_exec, 0, "linux mmap compatibility (-1=force-disable 0=auto)"); -#endif static int dsp_basename_clone = 1; SYSCTL_INT(_hw_snd, OID_AUTO, basename_clone, CTLFLAG_RWTUN, @@ -1924,16 +1922,12 @@ dsp_mmap_single(struct cdev *i_dev, vm_ooffset_t *offset, struct pcm_channel *wrch, *rdch, *c; int err; -#ifdef SV_ABI_LINUX /* * https://lists.freebsd.org/pipermail/freebsd-emulation/2007-June/003698.html */ if ((nprot & PROT_EXEC) && (dsp_mmap_allow_prot_exec < 0 || (dsp_mmap_allow_prot_exec == 0 && SV_CURPROC_ABI() != SV_ABI_LINUX))) -#else - if (nprot & PROT_EXEC) -#endif return (EINVAL); /* From nobody Fri May 29 10:13:24 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRfM86RKRz6gHsm for ; Fri, 29 May 2026 10:13: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRfM848yGz3RYV for ; Fri, 29 May 2026 10:13:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780049604; 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=yaO23F+WE35SlZeFXwsS82GCacuxHNCy2NzpZjA5HZo=; b=FhAMfcn5FX/ZN54Z5n7md5HKK3hMPg3iOpa16Bg2wwaGdtv141c6hAIQmLsXzRuyjdg7Ok LJjV9B+UWgTkpyZnO7RwkNvZ0ud9lZ76Jdnnv3R9joeL3E7IRdLu+MS8ZfHai9BSApoTev gafHTaM6SHWFaEBzCafxQUebqwpNd0GzU8nzB43hYjMrxVmvTV947vIyb85E62vYjRALzu FtjYGboCd3pz255cPi8U1z6z/09bWbokAeTJk9yCeNn7PFikC4QWksg6a8p08+rd5xZbns lKACcnAAvpRdAX/GjeiQjpBLhPrcDQGPEcw0InmrpmGVz7Tfjv7ZFF92NFV2ag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780049604; a=rsa-sha256; cv=none; b=XhPBIU18+C9XYd3IyNxUQihzI4B6Km2VeZO+tTF1V7Y75Cakt5BEH05gYuiTcQAhY4JVwS GeUH+ZSDvd/FE5GuOTJFTEaf2wbzoLiwCmaZ29AXFKhy6xJItWZY1NjKOc0S9XL3VTxThV X8wDH1dDjHS5a45WCIqyjd7O69xt2DvGF284y38Bu4Pnq7LRuE1Bk4087eQIqY/l0xpLj0 ZwjqHuD9QVex+czek22Lsw0t6syrBsRyZRpi/kNBSrWiwvKXulM3Cuks8FlP32+mndC2UV v0JqmbNwydMeZg3t3mJkqhuKZ2M3FzKZT3cGSCv3ZD7pxySY4un9U+BAiQZzpw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780049604; 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=yaO23F+WE35SlZeFXwsS82GCacuxHNCy2NzpZjA5HZo=; b=b7L3ImTZGECVjOi92VmZxbC0H60uuaOWz0Fl4uahcR8r3QJTy5BxwSw9/95DaP09H4mn8M Djjid22y8jqN5kA6kzSppSJhwWepU+oto/ULIkX2KNQs5bv5Hso7uK11OExJyfSNdL4OiZ Dgq0JoBct7arXFOf0aUCFS2hSbW3la+n6sL6u7UbjGy5s0BK+ljd+WOPICpNEXNLK3Z9Go tk7vHS4NyGk5oi/i7yaM56/Vf9kGnUIxwFMMnIPHT0Oep8nMeiuOonbf23BfvslluQE1N2 yHTEjNWGyFqJoitdUPyx2Ok3QzQLVv1KEle+GPEyLWiNchNYIZ2+F4eEFB4uQg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRfM83h4xzCNn for ; Fri, 29 May 2026 10:13:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38d62 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 10:13:24 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Joseph Mingrone From: Christos Margiolis Subject: git: 4a192f8beb01 - stable/15 - sbin/devd/snd.conf: Add missing -n options to sysrc calls List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 4a192f8beb01b87a3fbea237123ac535008b1782 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 10:13:24 +0000 Message-Id: <6a1966c4.38d62.43eb34c5@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=4a192f8beb01b87a3fbea237123ac535008b1782 commit 4a192f8beb01b87a3fbea237123ac535008b1782 Author: Joseph Mingrone AuthorDate: 2026-05-21 19:43:05 +0000 Commit: Christos Margiolis CommitDate: 2026-05-29 10:13:05 +0000 sbin/devd/snd.conf: Add missing -n options to sysrc calls Reviewed by: christos Fixes: 70e27ecba518 (virtual_oss: Introduce virtual_oss_default_control_device rc variable) Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/36 (cherry picked from commit bc2055b94576078453b372f537ef40bc4e3c18e4) --- sbin/devd/snd.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sbin/devd/snd.conf b/sbin/devd/snd.conf index e2dc6d94a299..3fc1cb9f0b0e 100644 --- a/sbin/devd/snd.conf +++ b/sbin/devd/snd.conf @@ -8,7 +8,7 @@ notify 0 { # Other audio servers or device switching commands can be used here # instead of virtual_oss(8). action "/usr/sbin/virtual_oss_cmd \ - /dev/$(sysrc virtual_oss_default_control_device) -R /dev/$cdev"; + /dev/$(sysrc -n virtual_oss_default_control_device) -R /dev/$cdev"; }; notify 0 { @@ -19,7 +19,7 @@ notify 0 { # See comment above. action "/usr/sbin/virtual_oss_cmd \ - /dev/$(sysrc virtual_oss_default_control_device) -P /dev/$cdev"; + /dev/$(sysrc -n virtual_oss_default_control_device) -P /dev/$cdev"; }; notify 0 { @@ -30,5 +30,5 @@ notify 0 { # No connected devices. Disable both recording and playback to avoid # repeated virtual_oss error messages. action "/usr/sbin/virtual_oss_cmd \ - /dev/$(sysrc virtual_oss_default_control_device) -f /dev/null"; + /dev/$(sysrc -n virtual_oss_default_control_device) -f /dev/null"; }; From nobody Fri May 29 12:23:12 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRjDw6BQzz6dyL2 for ; Fri, 29 May 2026 12:23: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRjDw5XrWz3c46 for ; Fri, 29 May 2026 12:23:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780057392; 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=BrXrXhpza19J0z7LK/NfI2SsYThE+VSq9ZKAbvKn0jg=; b=TBT5OPAWI8bJsHIaKjPlsY82lYpdI7HXw8yJcPo2hA1jnoBud7H/P2R0NLLv7nY94KzyRH OeK3scDtbtAJJfwqGUxAY1zOJNGcdP8jjBOj+0xPNQ8RIXMYxvn1ZEbxOLF9/WQ0w80+zR 34CoWA7kAEFXgV3zLk05W8luPHq1V3ME8AyDzFl8krQSoESnz3DfV68ii/MpzXGJH2lem8 guRKH4s2DFE90Rj2P1LxAwjFwo4RLZCJvqaJn8wdEfe51zWLwCcrv5a3xQMB3lHybusquD ndzQQ3+CcgJ6QB2IHq+m+RyK2JEdewI/E6O8OsQYOTtzdW92tWZcSdmxAcPJmA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780057392; a=rsa-sha256; cv=none; b=FrMmHKPRKWzArgXmOKTa2j9bJIeBsXaQEEiYS2ecdhgxrgEUJFV9v1pZy7/uCraGi7SqKV zf2WW9KoD7XParBgdxuE9JSo5AUu81d+1UI80c6X6CeFK4R8OkkRc3TdVX36fol8cZRS74 60FFIR21p1JlOW5X0ckYZry8boGNO+WfdJbXnfVHkVZbDnl+uSr8u+Fs2n3LNpMLaKP+Wf zh8JaztAxPfVIFZqKNFd8jR1DDEHEV4UaQaXP78dbLnoKJO3hmCSM+753DrBRi7Ds3dX+U A2zzDO+w3KjNRIn4g6IqgGHNUS9jC0PXmFTaUe9vYWSz98n7a43XCQkkl79H0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780057392; 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=BrXrXhpza19J0z7LK/NfI2SsYThE+VSq9ZKAbvKn0jg=; b=BdU/jWm8Jpm+eA9bG3JrftschRJrql0esJhl+j1Wj8y1R5Lu4qjcFejHFPkviL/VxY27NE 2UviTwsdlAaTbobBb9yeqIfpmYhECcuJ/a4CEUOGkjTQ8veeGXhV1JIaB2r+UB5U33kYSq HUsBOYjiCGOk5JjFaL/CsBxdP3P7J5q2COMDo91TvXXD7CVLnr/7PO32n4Eau9WdURvesh ahShp/z3rQjuVNlBEvjCNN2NKtcACknfw9R1L3TDiR/44pc1J0czpN9cLGDMrn+y+YNfFH 23ik4Ma97lT8SUGLCW05EN8TnRrWgm3/X++uZNAFaWvjaq46cz33573aa9hDSw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRjDw52k3zZ9f for ; Fri, 29 May 2026 12:23:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4546b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 12:23:12 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Alex Richardson From: Dimitry Andric Subject: git: ec6249ff56d8 - stable/14 - libfetch: Fix -Wunterminated-string-initialization List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: ec6249ff56d85f35ee2e2e72130fad3f17a9bb53 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 12:23:12 +0000 Message-Id: <6a198530.4546b.6fe7485c@gitrepo.freebsd.org> The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=ec6249ff56d85f35ee2e2e72130fad3f17a9bb53 commit ec6249ff56d85f35ee2e2e72130fad3f17a9bb53 Author: Alex Richardson AuthorDate: 2025-12-16 18:08:51 +0000 Commit: Dimitry Andric CommitDate: 2026-05-29 12:23:01 +0000 libfetch: Fix -Wunterminated-string-initialization This defaults to an error in clang HEAD, use a char-by-char initializer instead. Reviewed by: emaste, jhb MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52532 (cherry picked from commit 79f578531f21aa57307cbffd858a8a89e562aa5c) --- lib/libfetch/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libfetch/common.c b/lib/libfetch/common.c index 5115933b8e41..a57b278e40e1 100644 --- a/lib/libfetch/common.c +++ b/lib/libfetch/common.c @@ -136,7 +136,7 @@ static struct fetcherr socks5_errlist[] = { }; /* End-of-Line */ -static const char ENDL[2] = "\r\n"; +static const char ENDL[2] = { '\r', '\n' }; /*** Error-reporting functions ***********************************************/ From nobody Fri May 29 12:23:13 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRjDy0lY5z6dy89 for ; Fri, 29 May 2026 12:23: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRjDx6N2Fz3cWr for ; Fri, 29 May 2026 12:23:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780057393; 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=9jrEwMYscfiTjC0xrrMpYMVuF99Ri0b8asw/Z05rcfw=; b=rmD4HNZq4WFuFLH6c35XeDe2zh0k1oe5H7RjzaunPI22Lbg+XEsNo6q6p/zAKX9UkoVQBT 4oQXCj0i7GJqqQLSR1T0sRs/KIx8kJhPxOrctec1nZZ0hKUXr3K4bXhtpt4RkqlOyDMfFA pAPh58lEBLXbjrnl8m/6ph9x8DrD3EvdprT3QyVBcjOUhq49OKG5pWlLyO6K/6ER4cNGDa XfzoGrUWl91i4En+j8WoFMFU0lprbkXIi0zuw94lvEmPV4K4jYDOvyquW/o6bkJSeaZP/y St+26g4B1tquvF5H8FpfS/FyXwTRcWUnIK5JLOcFckHvvtXIK2TxUG3Xd7nCKg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780057393; a=rsa-sha256; cv=none; b=gR5TbFXSIq295fwbpXsQGYrBEfl+X7vRefBz/+2jZ1sPFxzTX8tvBA41znLxVsabZtW2XE b3WCJAFrbOBLBMWlXn3xA/aYSweAO8bA9qSMwy/EEWiX2HyBXwAI+TILY8dxmFcZUB/7Ol qoslHmcj6Pfft0MH15ePn4zSdLdxzyHq+jG7QUJyLx0rH6FAfCn280RUAHHNX7Pu68Yb1Y eVmyIO5GETH18OJvKMnqt0vGuNYwHQujb+28dyWIs8f/FCBeBFc6KDARrA/vc277lt7RX4 5YgtGmK9zqFnxnizlSWMAf1AqxO6RDSu2zfZNOiK8AZvtoYQDtdJ1yTTUY3iTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780057393; 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=9jrEwMYscfiTjC0xrrMpYMVuF99Ri0b8asw/Z05rcfw=; b=tBctcaxd7fqTsiIUtT+dvuVj42fRXNd0CSL2XhgJm25zI9XI1AojIs4r8Vc+jPuYgmwa5T HJMWvFHbPfAMh4FouwyKKbbUOyqCZPF4PwemTBFuTZ9skc65qSgZuG4UsAxd6MplFiHSdL kHudTUKcrpqCJKIwIL0SsJEw+yYVTVl+pupjKLkXYawHcq1gByns/cqk2i71dWKI0K9keW CDHima7wlMlSUWK7vvq7xU7+iPDjxlZzMsDMYg7nNeal62c7lOnORmUVCWcy4x2M0cxU/V 2+MImSoaMGd3KwseGcFw/dANeKm2V1ICNw7BNbLJoIZ+Xek8eYqadICrsnkO0A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRjDx5t2QzZ1W for ; Fri, 29 May 2026 12:23:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 45a30 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 12:23:13 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Alex Richardson From: Dimitry Andric Subject: git: 311576c11ca6 - stable/14 - bsd.sys.mk: suppress some clang warnings for C++ for >= 19 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 311576c11ca6e38b71325fd8c17324393030a0cc Auto-Submitted: auto-generated Date: Fri, 29 May 2026 12:23:13 +0000 Message-Id: <6a198531.45a30.524d339a@gitrepo.freebsd.org> The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=311576c11ca6e38b71325fd8c17324393030a0cc commit 311576c11ca6e38b71325fd8c17324393030a0cc Author: Alex Richardson AuthorDate: 2026-05-26 19:37:06 +0000 Commit: Dimitry Andric CommitDate: 2026-05-29 12:23:01 +0000 bsd.sys.mk: suppress some clang warnings for C++ for >= 19 I just tried building with system clang on one of my Linux systems which happens to be version 19, and these warning suppressions are needed for that version too: same errors as in the original commit. Reviewed by: imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56874 (cherry picked from commit 004b5935a6e643033526cab623c6005b69ab11aa) --- share/mk/bsd.sys.mk | 2 -- 1 file changed, 2 deletions(-) diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index 157f9a7c3158..02b99788ecb8 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -91,8 +91,6 @@ CWARNFLAGS.clang+= -Wno-error=unused-but-set-parameter .if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 190000 # Similar to gcc >= 8.1 -Wno-error=cast-function-type below CWARNFLAGS.clang+= -Wno-error=cast-function-type-mismatch -.endif -.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 210000 CXXWARNFLAGS.clang+= -Wno-c++20-extensions CXXWARNFLAGS.clang+= -Wno-c++23-lambda-attributes CXXWARNFLAGS.clang+= -Wno-nullability-completeness From nobody Fri May 29 12:23:11 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRjF129zFz6dyHW for ; Fri, 29 May 2026 12:23:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRjF06vtNz3cLs for ; Fri, 29 May 2026 12:23:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780057397; 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=FtDLgEgohXxbgaz+FJvJJ3ux1/jUe5jM7C6wpcg08Jk=; b=bMUs9MWVQv5zwlUQtBxZKogg80QyvvPSmH6BLRMuoEAxE/1/E7fAVLU1wSGygZx2C5dvSF hARfCyqdRvloDzYYWgZirA+XUYQj7zdBlDdsp1qrdxcsNSSEcwG3Om4wdSDDQ+P2Y1gmnn vOCfQ7KnJ+w2Y/bU9y2P2dy0/Mom8S/6K1ifIgSFopOYvv6ZgA72E16OOwjkQb3xAq/INA rafOvB++aPK1MyFyRmlFrMlJ0ZHlIitNhxI1AHVbxEtAPTcXpix4bYrVUPyT58d7/vW+2J V3kZJKJDgroUN0DoyuzdkP4ULZIbpoOOkSI2CmeAJeAwf/LQcxwZWXlNjMzTgw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780057397; a=rsa-sha256; cv=none; b=WfZob3Z0xrQdiOI4qy2Q1MEyEg+qxOQ8uBpno5WPMzmWzHpKlQUao4iBCGnMObDl8lP9Gs ope7SL1dMaTq2yy6H/7kq52VBWmJMjM5Mus3M9qexyerwc5yDfTKr/4MhhHdCfUmZ8d5Al Nbf9L63xtaF9j7pmT8xwG1WqtWEDHw0oiB1cwnm7mNbMglgqsQVAZReeIume1CBFzz9Alx 7KyVLdWFWuuAimqkCw92/reNP55nCTEBVTxvFAntqGYY92zpIjpYevGOK5goMrxV0n2f9A bAq8D0fHC128X3SS/RQjsV02vfPzWaYEQtSGqNfbr8pCZM39xcAmtA9i5clK6g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780057397; 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=FtDLgEgohXxbgaz+FJvJJ3ux1/jUe5jM7C6wpcg08Jk=; b=Mgz2cW1WKrOCkkIMKQ5lkASmp7KObDeUGxff7+/eEC1KD4jG/5bJllmgT7ZbBq4xIhT03Z C8drxruURBn8apIxsI4O9LU5YHWNXm+M389uXWwlhgCRFMQCW9bZKQbdgCun0PzBPOrlfx HOoRY1KxBNTLMFPpWF0rLFzSyxH2bwVSyxGWK0PjKz2M0waVat+SATZDh4xx27QdvZw4ph cEqkuwfzTSR+S5Rgx5uKHg22WzzqPD0ws/xflujvDWf8LRmlyTu+i/8HJPzqPGYUjWOxHn sFRC1544wVm69BwkkXUsBuk0m+L3I13610UOfSuVdviemXEmoCKrktgJGkkWpw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRjF06SVwzZ9g for ; Fri, 29 May 2026 12:23:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 45674 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 12:23:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Alex Richardson From: Dimitry Andric Subject: git: 3289a84491ca - stable/14 - libthr: fix -Wunterminated-string-initialization List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 3289a84491ca707e6f5b0bd11004441f40dddcbd Auto-Submitted: auto-generated Date: Fri, 29 May 2026 12:23:11 +0000 Message-Id: <6a19852f.45674.1ffe6528@gitrepo.freebsd.org> The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=3289a84491ca707e6f5b0bd11004441f40dddcbd commit 3289a84491ca707e6f5b0bd11004441f40dddcbd Author: Alex Richardson AuthorDate: 2025-12-16 18:04:18 +0000 Commit: Dimitry Andric CommitDate: 2026-05-29 12:21:29 +0000 libthr: fix -Wunterminated-string-initialization Reviewed by: jhb, emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52528 (cherry picked from commit 4cfc7de13f110563463c15be99690c6fe7b8676a) --- lib/libthr/thread/thr_printf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/libthr/thread/thr_printf.c b/lib/libthr/thread/thr_printf.c index e1edffe5acb2..b7cb6ce81bda 100644 --- a/lib/libthr/thread/thr_printf.c +++ b/lib/libthr/thread/thr_printf.c @@ -61,7 +61,7 @@ _thread_printf(int fd, const char *fmt, ...) void _thread_vprintf(int fd, const char *fmt, va_list ap) { - static const char digits[16] = "0123456789abcdef"; + static const char digits[16] __nonstring = "0123456789abcdef"; char buf[20]; char *s; unsigned long r, u; @@ -147,4 +147,3 @@ pstr(int fd, const char *s) __sys_write(fd, s, strlen(s)); } - From nobody Fri May 29 13:06:04 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRkBN6vSZz6f1rs for ; Fri, 29 May 2026 13:06: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRkBN513xz3hm3 for ; Fri, 29 May 2026 13:06:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780059964; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X1vvz02igSCm7plPELW/3iPtAIuC5X87Sar/pn6OPfI=; b=DTB2vn6QfBIBAMrx1SLlNngN3RVDTH6yHl23+fjRA9c6EF6NXY0ZlbJaOpevfIPXHG3LU/ 74XrS1H24guwdKQ43dgLlUsZBsUCTrC7l7TcCbY6lCNocfBU+W3dSUPA4kDkjxcsfhrdNw hj8so4A3g5JO165+vZS0d41+L36hS6EdUjZbanOx4zPrSJer1SAAWJOHpvFI6MjgIHXC8c 4IE8mIpfG24WamSq9x3eCwMGMm1qit+M0PeQAyq4W8FxylUjARKiEr7WxAUff1pT+zzbr4 19W/OOFqb99Rkuo5aL2cJRt9ldyBLBA5oqaElWb2TMKZq3Ryaz4og3IzkD3gyQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780059964; a=rsa-sha256; cv=none; b=lyArFF4o61zcuwUVKV+AYO3V5LtpXGlxsJF1T//WucmygZUd7CFQFvME2YB1poeMBFcfsp NqrCC43n6S1dyBblKdFEvDSpEYH21mNbfFO2lfB8Hmv8SoZWE8kto9sAmB2XZ20ePcOyY2 mzfpEJsqKiHBrz4fYA8dCVghIUxYaOyB3tC4ql2rbVYu7g4qvPkORVI+x6IrF+4+V1zs1D 2OHSeieJsvsLMj7xuWosrG2oJTDu43PTvaW0gVZGKrOayto5r34zZpLkDeBWjmKiC+GXM6 bFTTg5dSXk5oNhCg6z/BCJyTRC0OjheTQOcqHD5hFgq1DINTlsN6X9EAhMhkkw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780059964; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X1vvz02igSCm7plPELW/3iPtAIuC5X87Sar/pn6OPfI=; b=nbi5RpjONEDS+4m8P5fiZJxxaagBBnCjP8himF+MiZR2xlUbEVUOeRUSoQO7+n2bENr3cz 7r+g23RBLWxxf00/2Rg1PRQ2j3gpobQgcgbfNPXgDGdYk3TQIFBLWizlv97b65V+8vfmgq Zm66h9k/ADhwq6sPYpTCil9HvZHGBwBhgWzmsNgryLKbQZjwQ/Eiig02a+URIOnnBpe0aa qYY73EajUoGerDmLgReaDB0ViTpVEbSQzrZEki6S4Go1aQFp4UYiuEaR8ikqfo4NFaf9Q1 xUoIgc/11X2tqPFIE1rKt7LFJHkGU9XluJ9DbMgbU7EVIZfmG0hw4csspZi3eg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRkBN3zQGzZxT for ; Fri, 29 May 2026 13:06:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 18959 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 13:06:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Gallatin Subject: git: 3118f1b99f23 - main - bnxt: Fix build / load error for bnxt(4) in kernels without PCI_IOV List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gallatin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3118f1b99f23431235c202d9aadbe3d183bcc259 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 13:06:04 +0000 Message-Id: <6a198f3c.18959.5a9a2104@gitrepo.freebsd.org> The branch main has been updated by gallatin: URL: https://cgit.FreeBSD.org/src/commit/?id=3118f1b99f23431235c202d9aadbe3d183bcc259 commit 3118f1b99f23431235c202d9aadbe3d183bcc259 Author: Andrew Gallatin AuthorDate: 2026-05-29 12:52:44 +0000 Commit: Andrew Gallatin CommitDate: 2026-05-29 13:05:25 +0000 bnxt: Fix build / load error for bnxt(4) in kernels without PCI_IOV This change removes the hard-forcing of PCI_IOV and adds shims to allow the driver to compile and work when the kernel is missing PCI_IOV support. Fixes: 7c450d1127c7 Reviewed by: sumit.saxena_broadcom.com Differential Revision: https://reviews.freebsd.org/D57300 Sponsored by: Netflix --- sys/dev/bnxt/bnxt_en/bnxt_sriov.c | 39 +++++++++++++++++++++++++++++++++++++++ sys/dev/bnxt/bnxt_en/bnxt_sriov.h | 4 ---- sys/dev/bnxt/bnxt_en/if_bnxt.c | 2 -- 3 files changed, 39 insertions(+), 6 deletions(-) diff --git a/sys/dev/bnxt/bnxt_en/bnxt_sriov.c b/sys/dev/bnxt/bnxt_en/bnxt_sriov.c index 270c18165fb7..071feffbadfd 100644 --- a/sys/dev/bnxt/bnxt_en/bnxt_sriov.c +++ b/sys/dev/bnxt/bnxt_en/bnxt_sriov.c @@ -7,6 +7,8 @@ #include "bnxt_hwrm.h" #include "bnxt_sriov.h" +#ifdef PCI_IOV + static int bnxt_set_vf_admin_mac(struct bnxt_softc *softc, struct bnxt_vf_info *vf, const uint8_t *mac) @@ -973,6 +975,43 @@ void bnxt_sriov_attach(struct bnxt_softc *softc) device_printf(dev, "Failed to initialize SR-IOV (error=%d)\n", rc); } +#else + +void +bnxt_sriov_attach(struct bnxt_softc *softc __unused) +{ +} + +int +bnxt_cfg_hw_sriov(struct bnxt_softc *softc __unused, + uint16_t *num_vfs __unused, bool reset __unused) +{ + return (0); +} + +int +bnxt_approve_mac(struct bnxt_softc *sc __unused) +{ + return (0); +} + +void +bnxt_hwrm_exec_fwd_req(struct bnxt_softc *softc __unused) +{ +} + +bool +bnxt_promisc_ok(struct bnxt_softc *softc __unused) +{ + return (true); +} + +void +bnxt_update_vf_mac(struct bnxt_softc *sc __unused) +{ +} +#endif + void bnxt_reenable_sriov(struct bnxt_softc *bp) { if (BNXT_PF(bp)) { diff --git a/sys/dev/bnxt/bnxt_en/bnxt_sriov.h b/sys/dev/bnxt/bnxt_en/bnxt_sriov.h index 176f54af0aa8..24ea11f29b83 100644 --- a/sys/dev/bnxt/bnxt_en/bnxt_sriov.h +++ b/sys/dev/bnxt/bnxt_en/bnxt_sriov.h @@ -8,10 +8,6 @@ #include "opt_global.h" #include "bnxt.h" -#ifndef PCI_IOV -#define PCI_IOV 1 -#endif - /* macro definations */ #define BNXT_MAX_VFS 4 diff --git a/sys/dev/bnxt/bnxt_en/if_bnxt.c b/sys/dev/bnxt/bnxt_en/if_bnxt.c index 6618016f3932..6d82302615e1 100644 --- a/sys/dev/bnxt/bnxt_en/if_bnxt.c +++ b/sys/dev/bnxt/bnxt_en/if_bnxt.c @@ -2875,11 +2875,9 @@ bnxt_attach_post(if_ctx_t ctx) bnxt_dcb_init(softc); bnxt_rdma_aux_device_init(softc); -#if PCI_IOV /* SR-IOV attach */ if (BNXT_PF(softc) && BNXT_CHIP_P5_PLUS(softc)) bnxt_sriov_attach(softc); -#endif failed: return rc; From nobody Fri May 29 13:17:43 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRkS21gQlz6f2q3 for ; Fri, 29 May 2026 13:17: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRkRw6Yzhz3kMZ for ; Fri, 29 May 2026 13:17:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780060668; 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=As5bQwtT5RKsSs76JnRYknvoYDNJdruwRDHqYcyVqzY=; b=hTi3g87jwO6SbLmq+7sy9OstfucNRxp0GgfksqGruM/eKyaXsOyk5GCG3T22hVn1GoanCA bsmDJtDu5nE/yHJgE19CBq/GQa3M7tu3dLnPk0BxPAWefpPiTQmLHNUdoz0YqR/8ZiAJDe eAwCr5V+mvZL2zV0hsDp7HGhhn4/ftPYf4pOji+rLQjEUZGFvK2A0vvPd6Mamopl0ibZeQ IBGvlrgnPnd5D9rHd0GZnqLK/zbZzGnwvkp/mSL13b22XdLdy+A7JWMnYn92GfE2K5Au6O mrWfR754hmEoOeAOKFdW5+7L86WS2mlOGJXb6ca3LmpHtBTWhMZE4aNVCCaPdQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780060668; a=rsa-sha256; cv=none; b=RfkKT+R2/C7/HZMkhECFmX1GOT/pm1u2ej9nMhT5LRcmHBeOEq3ewxIRuD103eCD6uTmIq 4hMwuwtmx8D3DtaIapc7xzlPtxXkIfx5mpaI5gEk3lIvAMUaJ/kAgCWQlO4lWdRrWfjH7C 55ns7XGQPuEEba2K+7kAfa7zISyUyytChIKOfOU7ifG1nmVoB6S32U3oFsu+2HQur6hw5n X9N4DSJ3OXtXPfYU22nS3aiU3YPLM6Kwjw9lrZN+ApU8nLBxmDzguiOEQnxn6ytstmY/6F 9Sgk31q3IxCi5CvCF+Ay1PVOzo9PK/KZfR2JRkOrmd9vojLUuNc+p8WwUNL8Yg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780060668; 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=As5bQwtT5RKsSs76JnRYknvoYDNJdruwRDHqYcyVqzY=; b=JeW0Sh3uvJ72eberuw90NnledBjW/YIOMIpAwTMMxII0pOv+ZNqUkC+g9SvYNrA8LVUqNn ZTjK5wN0w/z2X1XqUBkaQ0HTzK8Y3teu497eAXkvHoGAKG+lALBf0AmH7P6EXxE6+iXvXi FfqchD5xkv7hObKfab0J9fA5EQu8wKphsRVzgMY/Q8y39eUFqB9g633Lfz261oPGYxEFwl omG6F2zZryE0+n1pmXkNvLgLvv/HqQoBFN1R//5o67LUpPdpdL6AQGW4jJT+fXYucsmCCX Oh3jJI/A/gg994nnsBPM+ygvnBLhyHVgP2LU0epKWdXQFMLvR9l+tFayk9FDHA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRkRw61fjzb1V for ; Fri, 29 May 2026 13:17:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1aa3c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 13:17:43 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Alex Richardson From: Dimitry Andric Subject: git: ef66e137d949 - stable/14 - rtld: silence clang's unterminated-string-initialization warning List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: ef66e137d949bd708b31f4efe4e504b1a178dbaa Auto-Submitted: auto-generated Date: Fri, 29 May 2026 13:17:43 +0000 Message-Id: <6a1991f7.1aa3c.479a1cba@gitrepo.freebsd.org> The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=ef66e137d949bd708b31f4efe4e504b1a178dbaa commit ef66e137d949bd708b31f4efe4e504b1a178dbaa Author: Alex Richardson AuthorDate: 2025-12-16 18:09:10 +0000 Commit: Dimitry Andric CommitDate: 2026-05-29 13:16:56 +0000 rtld: silence clang's unterminated-string-initialization warning Since the initializer is used in other places where we can't just replace it with a char-by-char initializer, this adds a macro for the nonstring attribute (match the linuxkpi definition). Reviewed by: emaste, jhb MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52535 (cherry picked from commit 86f325711c07b723b85c031d581d0a5c1a0964f3) --- lib/libsysdecode/utrace.c | 3 ++- libexec/rtld-elf/rtld.c | 3 ++- libexec/rtld-elf/rtld_utrace.h | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/libsysdecode/utrace.c b/lib/libsysdecode/utrace.c index a03cc66cac03..1e689d000849 100644 --- a/lib/libsysdecode/utrace.c +++ b/lib/libsysdecode/utrace.c @@ -170,7 +170,8 @@ sysdecode_utrace(FILE *fp, void *p, size_t len) struct utrace_malloc um; struct utrace_malloc32 *pm; #endif - static const char rtld_utrace_sig[RTLD_UTRACE_SIG_SZ] = RTLD_UTRACE_SIG; + static const char rtld_utrace_sig[RTLD_UTRACE_SIG_SZ] __nonstring = + RTLD_UTRACE_SIG; if (len == sizeof(struct utrace_rtld) && bcmp(p, rtld_utrace_sig, sizeof(rtld_utrace_sig)) == 0) diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index 7e12aa3d9c7f..44f895339a32 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -336,7 +336,8 @@ ld_utrace_log(int event, void *handle, void *mapbase, size_t mapsize, int refcnt, const char *name) { struct utrace_rtld ut; - static const char rtld_utrace_sig[RTLD_UTRACE_SIG_SZ] = RTLD_UTRACE_SIG; + static const char rtld_utrace_sig[RTLD_UTRACE_SIG_SZ] __nonstring = + RTLD_UTRACE_SIG; memset(&ut, 0, sizeof(ut)); /* clear holes */ memcpy(ut.sig, rtld_utrace_sig, sizeof(ut.sig)); diff --git a/libexec/rtld-elf/rtld_utrace.h b/libexec/rtld-elf/rtld_utrace.h index c14a62ddcb0b..dee807cc0098 100644 --- a/libexec/rtld-elf/rtld_utrace.h +++ b/libexec/rtld-elf/rtld_utrace.h @@ -49,7 +49,7 @@ #define RTLD_UTRACE_SIG "RTLD" struct utrace_rtld { - char sig[RTLD_UTRACE_SIG_SZ]; + char sig[RTLD_UTRACE_SIG_SZ] __nonstring; int event; void *handle; void *mapbase; /* Used for 'parent' and 'init/fini' */ From nobody Fri May 29 14:30:48 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRm4973mvz6f71G; Fri, 29 May 2026 14:30:49 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRm496PXyz3wFx; Fri, 29 May 2026 14:30:49 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780065049; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HzpTa50fkAnmm7Y0nShZKwGZcbTlnGr5KqPwsQ1NwgM=; b=tTlrb1F+v1pL+cnApE7BMdrTUkvp1I3Y7CmqeL0BhXFIn5O8+Fcds3gbsIGeBLVW+inHy1 ZD73ocb1WsjYUVODrY1nxwPPQnCm1C8xXyi+TpPGEKy53Y/2VxvPjzWVv1fojfFXAJijcP Mcow9aHN+0k4tblULuvRulCUYXB7WCUrCNx/iCkpccJQB8hHT8fBp/6fkrLWDxyWw73Dth wA27UKuVClT78HCU5G/ZGBbKYRYEfYXe1p+k/RewYsmx/gGTNrxLzK+GND72wFQYJv/MI4 X7fMaOdsuIoTEl4MXHjosIMX1oYZvrm4kKd9xArw/O/Vn8qWLdPT3xSjp6mnhQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780065049; a=rsa-sha256; cv=none; b=DSszjp01WdxRbgibyln71sGsvrszhLR0WBxTiuYqjDSAC9Zb4LIO5e2pLunKgNBe9vMZB1 gIfDL+EzHGgTPSEd1WdSsqEH5kmGWR1NGdO7r7TqzIDuY+cCugjZfQtt7Vqo1w+BWiPBlY o7TrK5VaC0RXU/KmtYkVvvf0csQqkyTd1+m+ePwsY/hGlz7YOFxOZVh2krwo0W/x5eEEnn mViBfzMb7XDrrP9Q/R1pKgB+3r3gvLZNFfnsNqxYxY822PdDR5nxRGjacy5RQHvjcitAF5 oJzBVagRN4GN/uo+70sPqpxXoEZ/MA0v9FXqnfeairMdRqz45SRSBGpIw02ETA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780065049; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HzpTa50fkAnmm7Y0nShZKwGZcbTlnGr5KqPwsQ1NwgM=; b=V2k/AYTri0czOw9w3aNR4T//BKSYnR2XIFh2Pk4ZP168wiP0dHfkaaT6nOnMndl9jXNB9O H89Fi5+ct4oORLjH3qNvJn6bXO8KV30F2DsCl4bhvLg6wgiaySrbGR8767d058NegcIPbL hlnO9cVF2e91D8zzZHr+SHssUGeNoPsMcNirUYz5TBtpTE96p/QMHE8PR2n0KVFMHuZUkH XZNLt3OEI1TKVlvyYIHVR5fxPGdIJCCr1oMHrZXN6S/bNktZPUQrA5TDbFyHNbXeykq1R4 KKALonKY28Q2NIltTlPkBBXkrH9/reqdLFVMq14+SkcBPQCIezV4JO3sJn1o2g== Received: from [IPV6:2601:5c0:4202:5670:34ab:c755:3b3:4faa] (unknown [IPv6:2601:5c0:4202:5670:34ab:c755:3b3:4faa]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4gRm494JmmzlSH; Fri, 29 May 2026 14:30:49 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: Date: Fri, 29 May 2026 10:30:48 -0400 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 804daf166406 - main - imgact_elf: read program headers if not contained in the first page Content-Language: en-US To: Konstantin Belousov , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <6a18acc7.32ef9.6a0db43@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: <6a18acc7.32ef9.6a0db43@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 5/28/26 16:59, Konstantin Belousov wrote: > The branch main has been updated by kib: > > URL: https://cgit.FreeBSD.org/src/commit/?id=804daf166406a1b0e22f93b9417b90ed7d3aa1ae > > commit 804daf166406a1b0e22f93b9417b90ed7d3aa1ae > Author: Konstantin Belousov > AuthorDate: 2026-05-28 09:06:33 +0000 > Commit: Konstantin Belousov > CommitDate: 2026-05-28 20:59:26 +0000 > > imgact_elf: read program headers if not contained in the first page > > PR: 295629 > Reviewed by: markj > Tested by: Alex S > Sponsored by: The FreeBSD Foundation > MFC after: 1 week > Differential revision: https://reviews.freebsd.org/D57294 Oh well, I wish I had seen this earlier. I already had a version of this downstream in CheriBSD as we have a CHERI-specific case of many phdrs. I had a sysctl/tunable to control how many pages of phdrs were allowed which defaulted to something like 4 pages worth but could be more easily adjusted than the hardcoded constant here. I will see if I can upstream the sysctl at least. -- John Baldwin From nobody Fri May 29 14:39:56 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRmGy1yqVz6f7bF; Fri, 29 May 2026 14:40:10 +0000 (UTC) (envelope-from kib@freebsd.org) 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 4gRmGx5ngCz3x80; Fri, 29 May 2026 14:40:09 +0000 (UTC) (envelope-from kib@freebsd.org) 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 64TEdu47060538; Fri, 29 May 2026 17:39:59 +0300 (EEST) (envelope-from kib@freebsd.org) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 64TEdu47060538 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 64TEdu4V060537; Fri, 29 May 2026 17:39:56 +0300 (EEST) (envelope-from kib@freebsd.org) X-Authentication-Warning: tom.home: kostik set sender to kib@freebsd.org using -f Date: Fri, 29 May 2026 17:39:56 +0300 From: Konstantin Belousov To: John Baldwin Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 804daf166406 - main - imgact_elf: read program headers if not contained in the first page Message-ID: References: <6a18acc7.32ef9.6a0db43@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=4.0.2 X-Spam-Checker-Version: SpamAssassin 4.0.2 (2025-08-27) on tom.home X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Queue-Id: 4gRmGx5ngCz3x80 X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated On Fri, May 29, 2026 at 10:30:48AM -0400, John Baldwin wrote: > On 5/28/26 16:59, Konstantin Belousov wrote: > > The branch main has been updated by kib: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=804daf166406a1b0e22f93b9417b90ed7d3aa1ae > > > > commit 804daf166406a1b0e22f93b9417b90ed7d3aa1ae > > Author: Konstantin Belousov > > AuthorDate: 2026-05-28 09:06:33 +0000 > > Commit: Konstantin Belousov > > CommitDate: 2026-05-28 20:59:26 +0000 > > > > imgact_elf: read program headers if not contained in the first page > > PR: 295629 > > Reviewed by: markj > > Tested by: Alex S > > Sponsored by: The FreeBSD Foundation > > MFC after: 1 week > > Differential revision: https://reviews.freebsd.org/D57294 > > Oh well, I wish I had seen this earlier. I already had a version of this downstream in > CheriBSD as we have a CHERI-specific case of many phdrs. I had a sysctl/tunable to control > how many pages of phdrs were allowed which defaulted to something like 4 pages worth but > could be more easily adjusted than the hardcoded constant here. I will see if I can upstream > the sysctl at least. A sysctl should be a no-brainer, I can add it. I did not see much value in it being tunable, the current 128 value should be enough for everything? From nobody Fri May 29 14:52:22 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRmYB2L6Sz6ff4V; Fri, 29 May 2026 14:52:30 +0000 (UTC) (envelope-from kib@freebsd.org) 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 4gRmY93Z94z41Cg; Fri, 29 May 2026 14:52:29 +0000 (UTC) (envelope-from kib@freebsd.org) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=freebsd.org (policy=none); spf=softfail (mx1.freebsd.org: 2001:470:d5e7:1::1 is neither permitted nor denied by domain of kib@freebsd.org) smtp.mailfrom=kib@freebsd.org 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 64TEqMoU061420; Fri, 29 May 2026 17:52:25 +0300 (EEST) (envelope-from kib@freebsd.org) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 64TEqMoU061420 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 64TEqMeE061419; Fri, 29 May 2026 17:52:22 +0300 (EEST) (envelope-from kib@freebsd.org) X-Authentication-Warning: tom.home: kostik set sender to kib@freebsd.org using -f Date: Fri, 29 May 2026 17:52:22 +0300 From: Konstantin Belousov To: John Baldwin Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 804daf166406 - main - imgact_elf: read program headers if not contained in the first page Message-ID: References: <6a18acc7.32ef9.6a0db43@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=4.0.2 X-Spam-Checker-Version: SpamAssassin 4.0.2 (2025-08-27) on tom.home X-Spamd-Result: default: False [-2.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.98)[-0.975]; MIME_GOOD(-0.10)[text/plain]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : No valid SPF, No valid DKIM,none]; ARC_NA(0.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; MIME_TRACE(0.00)[0:+]; FREEFALL_USER(0.00)[kib]; TO_DN_SOME(0.00)[]; HAS_XAW(0.00)[]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; MISSING_XM_UA(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all:c]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_THREE(0.00)[4] X-Spamd-Bar: -- X-Rspamd-Queue-Id: 4gRmY93Z94z41Cg On Fri, May 29, 2026 at 05:40:02PM +0300, Konstantin Belousov wrote: > On Fri, May 29, 2026 at 10:30:48AM -0400, John Baldwin wrote: > > On 5/28/26 16:59, Konstantin Belousov wrote: > > > The branch main has been updated by kib: > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=804daf166406a1b0e22f93b9417b90ed7d3aa1ae > > > > > > commit 804daf166406a1b0e22f93b9417b90ed7d3aa1ae > > > Author: Konstantin Belousov > > > AuthorDate: 2026-05-28 09:06:33 +0000 > > > Commit: Konstantin Belousov > > > CommitDate: 2026-05-28 20:59:26 +0000 > > > > > > imgact_elf: read program headers if not contained in the first page > > > PR: 295629 > > > Reviewed by: markj > > > Tested by: Alex S > > > Sponsored by: The FreeBSD Foundation > > > MFC after: 1 week > > > Differential revision: https://reviews.freebsd.org/D57294 > > > > Oh well, I wish I had seen this earlier. I already had a version of this downstream in > > CheriBSD as we have a CHERI-specific case of many phdrs. I had a sysctl/tunable to control > > how many pages of phdrs were allowed which defaulted to something like 4 pages worth but > > could be more easily adjusted than the hardcoded constant here. I will see if I can upstream > > the sysctl at least. > > A sysctl should be a no-brainer, I can add it. I did not see much value > in it being tunable, the current 128 value should be enough for everything? D57328 From nobody Fri May 29 15:20:30 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRn9V5NDLz6fhLx for ; Fri, 29 May 2026 15:20: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRn9V3r5fz43bb for ; Fri, 29 May 2026 15:20:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780068030; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QegnKNEgCVV0XAb7gT+YSOMneUj9kmqU1QENOgQpSPU=; b=UlofnFXQYHUti/iQzTIuURtjKMS6JtDsrrtj9b8i0b9eZ4reWgQHUl0O5dmh4wf+rt3Mw8 Bn1YJAo62zACSYuxW69bNwa8EWKmhjqYDTPXX4hxdGqMgNaPgMU03Dl4XTI1lZyGgeHn1T ZEF9rRKk4V8IKJMdnGUtU1x4Cb7zOuj8wd/WMODl9fOm54XrkZejrphYHUwpOVFS0+fmQ9 ECrc5/WV2XKhjeFyAHlwrUitNABBZqGE0xg5CPxplOD1OUpln3W8y7TDkBd0NdiPmnDxED GJp2LfXHRqLSV5NErApzew/w9jI8dRsEoa5OPZX23zVHqzFHr+u1n79j1kQjyA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780068030; a=rsa-sha256; cv=none; b=gyfyRAcNAgRtr4Ekjd/ueoBI9oWoBw8GcRAnH0QsYqIXsEY53qQduPHdeAk6oL+EXonu77 Lz18IzHYtE2SJ4tsNrnhAf3REJ+Yt7EQhBc+fW93oY2Gr2SDqMNJkejSW7R0uhVDpBJu71 oHo0UGzSLeMbOQfBjpgNh9orOTmdp71q9jyuNjenXXCxO0lAOssQLG46aebioGgx3/UaRA TtZ5z/FvaCbNV/2qQGcFLOfgHXiekEj2XjY4YZA+w7hcJJGQ/pdj6korWwrwxMCv7z+tC0 VBbgyxXewt+yepHHPr4zticVU51ETIbH2zozZ3TV01Y7KPKXBu2wlPgcfc6Keg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780068030; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QegnKNEgCVV0XAb7gT+YSOMneUj9kmqU1QENOgQpSPU=; b=Tcznuztnl9NF+oyj9MlgGacamvu/vKJBYmLFX2Ru0g3lBEEe05MHGdoggQ0FtqFjd8N4uT W9M9zQpGKfW3YRdIo/CnuNqeaZcVUJucovrTtCbMvK4PZ4XdJCUNKbFVvbfHOlGndPy1cI +W/B/lOMyonQP7AiYagvlORUIQmh2TF1LGuMlxW016c+qJnwFIGDd7xGmVydRCGsSiW/we 2nQlq4zaD/wWBQ4LgcUFfQYYoSNfYJ02RP2oxxOGr+YFy9Px0v5mo32ftcThmAY3gvBu9h WNs2Psj8MyYFhiO70Z8/LA9omhCpKwNkf9Uf9tTzX7PEdExuaFPrhpir068Rag== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRn9V30bvzf4W for ; Fri, 29 May 2026 15:20:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26fec by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 15:20:30 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: ShengYi Hung Subject: git: 560f38cec2f7 - stable/15 - kern_time: Honor the precise option when counting diff List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: aokblast X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 560f38cec2f7a2f80f745a190e28f5f027b4cd18 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 15:20:30 +0000 Message-Id: <6a19aebe.26fec.7b891c98@gitrepo.freebsd.org> The branch stable/15 has been updated by aokblast: URL: https://cgit.FreeBSD.org/src/commit/?id=560f38cec2f7a2f80f745a190e28f5f027b4cd18 commit 560f38cec2f7a2f80f745a190e28f5f027b4cd18 Author: ShengYi Hung AuthorDate: 2026-03-12 09:16:24 +0000 Commit: ShengYi Hung CommitDate: 2026-05-29 15:19:48 +0000 kern_time: Honor the precise option when counting diff When preecise option is used, the true elapsed time should also use the precise timer. This fixes the test case sleep_for.signals.pass.cpp in libcxx. Reviewed by: kib, imp Approved by: lwhsu (mentor) MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55824 (cherry picked from commit 728ae49a6b81edb3eec5ab70a63bb83db8f5dce5) --- sys/kern/kern_time.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/kern/kern_time.c b/sys/kern/kern_time.c index 5b7485c25cd7..2cbb88a15b24 100644 --- a/sys/kern/kern_time.c +++ b/sys/kern/kern_time.c @@ -601,7 +601,9 @@ kern_clock_nanosleep(struct thread *td, clockid_t clock_id, int flags, } while (error == 0 && is_abs_real && td->td_rtcgen == 0); td->td_rtcgen = 0; if (error != EWOULDBLOCK) { - if (TIMESEL(&sbtt, tmp)) + if (precise) + sbtt = sbinuptime(); + else if (TIMESEL(&sbtt, tmp)) sbtt += tc_tick_sbt; if (sbtt >= sbt) return (0); From nobody Fri May 29 15:20:31 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRn9W4mJYz6fhRM for ; Fri, 29 May 2026 15:20:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRn9W3lh4z43nZ for ; Fri, 29 May 2026 15:20:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780068031; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qPQP6fAUsO7p6gSd4TemjR1t3JwGNYftK5TzbchXzg0=; b=LdgLYtKMSLlabFfm3ADoTZ8LVK3lrsHKDCbSfEWWB8DooAL5LkFcAlzGGarozBjCoVB5Fu qiu4sBG+UlDvDccCR6tm48zvYJZifz0Tcj3dlbKADVYdoB66VfeiOxkO3JjutfMi0pQ+qM 7kIXlqBVEK87ZtIvrglLU379YXCMlrhqxgh87f2CeeJclpReQXQJXkPAx+EkQ1OJLcLCb4 5RJ6YGz2BRD3jrF8BvalEDgW0HNipQjmIQUO28pw79Jey3vAIix9cH81L60w2QdmAaf3ur L37Em61h7zuF4ubTzxttyxCOwWzDKTsoCONRKO341AcMchxjpx8hS+HT14ICjQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780068031; a=rsa-sha256; cv=none; b=klWSMiMjfLzlSaufwxbM2c9sgdEBkI9D9a1Jpjdki+ytFPjGqDa0TA+/+gN3+tbj2DkVj1 2I1HAShuCC2zJbPRTnaBUtSZdTDKlTzS5oTQ0HPIbYFbMEVTyrvzsZ4MNCbu9f/hL7i2xG wr8f1tkNZFZKF2yimuTXRL4JG+fYsRU+u+75b8O9z227iqw737Wv9H/TKXhwPCsRq+eQZ5 KTNgS3Lfov3QaZRTBOxDS8oFgF0d8vodrKkfdd/gozzqcjxodhH8njYsAL4te4ucETddDL kX0iM2v7I5/OAq47s8mWiZtT+tXQK3CW6kQWhpZSQ0XNf3NYNerb3R290TqoOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780068031; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qPQP6fAUsO7p6gSd4TemjR1t3JwGNYftK5TzbchXzg0=; b=rCo7qAtoSgdTLPMZLK5omTosNbGG6zsMd4BPNuES9Mdyn0bcz0stknksjw/Xg8K7MgGPVS 51P6YVt5ZvnaYzuFCvIoOA04rSNFygCvSrV04s35rUmKxOv84KXYJrdKT8JMAfPQXub2zn 6vIQt+Jr3j5Jlf3n0BA5kwbSPS1SeFM2VrqDHc+6hDAJE3aSBpY/Jhh30v6oSNQFBIvBDF zbaNSjx4oe2VYmG9PInnyrDXHyWUj2daXBE2MAdYOXLVwqewvF5uBcwI62zqtrSMgTRjQ/ HyHlzGtHI0+yUv2wS8PTNtn3sht8ETWmHKJqCESmwoaoaFHvOoeP1H+KTZL08w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRn9W3LyLzfJj for ; Fri, 29 May 2026 15:20:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27ddf by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 15:20:31 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: ShengYi Hung Subject: git: e9c2f7f1a4f6 - stable/15 - libc: Fix dtor order in __cxa_thread_atexit List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: aokblast X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: e9c2f7f1a4f65403686e0195172efcbc51a0a11b Auto-Submitted: auto-generated Date: Fri, 29 May 2026 15:20:31 +0000 Message-Id: <6a19aebf.27ddf.1abd59f4@gitrepo.freebsd.org> The branch stable/15 has been updated by aokblast: URL: https://cgit.FreeBSD.org/src/commit/?id=e9c2f7f1a4f65403686e0195172efcbc51a0a11b commit e9c2f7f1a4f65403686e0195172efcbc51a0a11b Author: ShengYi Hung AuthorDate: 2026-03-12 13:40:34 +0000 Commit: ShengYi Hung CommitDate: 2026-05-29 15:19:48 +0000 libc: Fix dtor order in __cxa_thread_atexit The thread_local variable may creates another thread_local variable inside its dtor. This new object is immediately be registered in __cxa_thread_atexit() and need to be freed before processing another variable. This fixes the libcxx test thread_local_destruction_order.pass.cpp. Reported by: kib Approved by: lwhsu (mentor) MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55826 (cherry picked from commit 9d26b82826d9962d5085bc5d9df7f8a762c57602) --- lib/libc/stdlib/cxa_thread_atexit_impl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libc/stdlib/cxa_thread_atexit_impl.c b/lib/libc/stdlib/cxa_thread_atexit_impl.c index 3123bd12dca8..3d742d90fb44 100644 --- a/lib/libc/stdlib/cxa_thread_atexit_impl.c +++ b/lib/libc/stdlib/cxa_thread_atexit_impl.c @@ -119,9 +119,9 @@ walk_cb_nocall(struct cxa_thread_dtor *dtor __unused) static void cxa_thread_walk(void (*cb)(struct cxa_thread_dtor *)) { - struct cxa_thread_dtor *dtor, *tdtor; + struct cxa_thread_dtor *dtor; - LIST_FOREACH_SAFE(dtor, &dtors, entry, tdtor) { + while ((dtor = LIST_FIRST(&dtors)) != NULL) { LIST_REMOVE(dtor, entry); cb(dtor); free(dtor); From nobody Fri May 29 15:20:32 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRn9Y0sPFz6fhTt for ; Fri, 29 May 2026 15:20: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRn9X4hGsz43sn for ; Fri, 29 May 2026 15:20:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780068032; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CdHT07UW/LVZ17yAG1mVc1h3qdQH9g0eo2ECir1GZhM=; b=VMRv+ZpxRohVJ/rNIJnXDgwDkfV5NXXT1IuHc+03/24zmfSHON/P9Fl0jQQHzZOSZjBcNi F+wiZ/yGPkGbYG4NaGjlyht2QeWpyx4bPj8nlaIX35UjMn2/jtR8JywTvYN9TZnyfNsrgL ZjrM6JOi5x4/l9U5gnR3jE5JdXYjk/7zcsSGwOvwmCTi/4gQUk/6OR4Vq9z9FXMrkUjFw8 ZZZG8Gu3cVy8MfzIbsPSvZgpFCLdo+Iwms4BJDo1kuZAV6vlUMoih/80jNMsHJ9neeMNjF rmivwxcojYFTbYQKW2TO4VIQ1w0pFZrajWxeKWVUT0mMwmn22jtXbOr7A/+f4A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780068032; a=rsa-sha256; cv=none; b=SSThpjL9qJgu66XC00OL/TFDBtoUeVWpK/hoQwlQbuMfMb7EVuBS7kCuGUSwshiE51+0Qh nb539av0c4FOyGAuW8WYtWjL5EclUtf/clYICqQTf4ym81R+06d4qWzGv2mbu89xhMcO5W nwLwyK17H9PidmoYfQ1gD/Zw2g9slLV4an/IF8bOoaK6jTIrhSFfWiWTxmiKUGOl4JXrwL VRvmk/M/OBbhNqeeIV4umlI62NbwbSLlSFXnHZaPlN1OA7xCvy7PN4yh3HL2zazoCgCG97 zmcoxzkx3zA8s6vg4v792BjHxQGDAhvp+P8cv1AbQGGpQfFlz/3BfnQ7Y8zqYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780068032; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CdHT07UW/LVZ17yAG1mVc1h3qdQH9g0eo2ECir1GZhM=; b=uehyYY19XO0BxpC4gh52D3OjA+a36FWV8zt5/iXPo8Zh+pNWHnGOONxPIL0PlFGvUMmdtj kpcy4WuV4cWfap+NXsumBPxzN4R5xpHjbxlQ09AJ1zLaNNYc/bQpyYWE/Q3954W7janP2R wl5YT3MdZ3gmvR04lx28X4jw8lxhrjvaYlk+vfbf4HGiSMUr5m4y8xsjNA8Rkr4thVG4px xiZDoX77w394RaEvZTc92Ecq1ZnAe27iL0/M61slgL6kMD5SPPJddgCC0M4QWxQ2BNbP1R +hMpBWyBGLd5d3RvRga9FG3+aDpieiYmPOJfV0VYTxqF2wjl5ClE8+OT50jRtQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRn9X47XnzfX2 for ; Fri, 29 May 2026 15:20:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30f9c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 15:20:32 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: ShengYi Hung Subject: git: 2aff8c5e4ebf - stable/15 - libc: Fix cxa_thread_atexit{,nothr} test. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: aokblast X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 2aff8c5e4ebfef2d0146c22c179a18274ecd5dd2 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 15:20:32 +0000 Message-Id: <6a19aec0.30f9c.664d8354@gitrepo.freebsd.org> The branch stable/15 has been updated by aokblast: URL: https://cgit.FreeBSD.org/src/commit/?id=2aff8c5e4ebfef2d0146c22c179a18274ecd5dd2 commit 2aff8c5e4ebfef2d0146c22c179a18274ecd5dd2 Author: ShengYi Hung AuthorDate: 2026-03-17 14:53:08 +0000 Commit: ShengYi Hung CommitDate: 2026-05-29 15:19:48 +0000 libc: Fix cxa_thread_atexit{,nothr} test. After patch 9d26b82, we don't provide recursive call protection anymore. Therefore, to pass the test, we adjust the testcase by protecting on caller and the testcase is to make sure the dtors is properly handled. Reported by: siva Reviewed by: kib Approved by: markj (mentor) Fixes: 9d26b82826d9 ("libc: Fix dtor order in __cxa_thread_atexit") MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55893 (cherry picked from commit c25976f0a9a3a102ce47b45c19b2c93e8069433b) --- lib/libc/tests/stdlib/cxa_thread_atexit_nothr_test.cc | 11 ++++++++--- lib/libc/tests/stdlib/cxa_thread_atexit_test.cc | 10 ++++++++-- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/lib/libc/tests/stdlib/cxa_thread_atexit_nothr_test.cc b/lib/libc/tests/stdlib/cxa_thread_atexit_nothr_test.cc index 0b3b9497a6bd..d70c6b1b88dc 100644 --- a/lib/libc/tests/stdlib/cxa_thread_atexit_nothr_test.cc +++ b/lib/libc/tests/stdlib/cxa_thread_atexit_nothr_test.cc @@ -30,7 +30,10 @@ #include #include +#define AGAIN_CALL_LIMIT 20 + static FILE *output = NULL; +static int again_counter = 0; struct Foo { Foo() { ATF_REQUIRE(fprintf(output, "Created\n") > 0); } @@ -79,14 +82,16 @@ extern "C" int __cxa_thread_atexit(void (*)(void *), void *, void *); static void again(void *arg) { - - __cxa_thread_atexit(again, arg, &output); + if (again_counter < AGAIN_CALL_LIMIT) { + again_counter++; + __cxa_thread_atexit(again, arg, &output); + } } ATF_TEST_CASE_WITHOUT_HEAD(cxx__thread_inf_dtors); ATF_TEST_CASE_BODY(cxx__thread_inf_dtors) { - + skip("Skip since we only have main thread"); again(NULL); } diff --git a/lib/libc/tests/stdlib/cxa_thread_atexit_test.cc b/lib/libc/tests/stdlib/cxa_thread_atexit_test.cc index 628a70b510d1..6a5587698d37 100644 --- a/lib/libc/tests/stdlib/cxa_thread_atexit_test.cc +++ b/lib/libc/tests/stdlib/cxa_thread_atexit_test.cc @@ -30,7 +30,10 @@ #include #include +#define AGAIN_CALL_LIMIT 20 + static FILE *output = NULL; +static int again_counter = 0; struct Foo { Foo() { ATF_REQUIRE(fprintf(output, "Created\n") > 0); } @@ -52,8 +55,10 @@ extern "C" int __cxa_thread_atexit(void (*)(void *), void *, void *); static void again(void *arg) { - - __cxa_thread_atexit(again, arg, &output); + if (again_counter < AGAIN_CALL_LIMIT) { + ++again_counter; + __cxa_thread_atexit(again, arg, &output); + } } struct Baz { @@ -164,6 +169,7 @@ ATF_TEST_CASE_BODY(cxx__thread_inf_dtors) std::thread t([]() { e.use(); }); t.join(); + ATF_REQUIRE_EQ(again_counter, AGAIN_CALL_LIMIT); } ATF_INIT_TEST_CASES(tcs) From nobody Fri May 29 15:20:33 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRn9Z0Zjrz6fhM6 for ; Fri, 29 May 2026 15:20: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRn9Y5lWWz441B for ; Fri, 29 May 2026 15:20:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780068033; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m1jia2upFspc4XMDakpW3cBe1CenTOr3W8/rHXBtr9Q=; b=XC7OcFCrCHcMSRiOI5ODBT7b2qgDT7k7FVzkUCB1I60e7D3Uen7OXg2uyKX5vX8Co6LZ4Q MJCFRhS/j4E5zjvDkXLX3GDpuVvuapggic4ztIZ9QhB791+PuLiXcQgViarL2fUQ/xkhJS l65P9Bylko83UEH/GYw2oA5DpJoo69gjrIfTxGJe1myBmHQ0GajmiHkWwwdKidXV6I1tT5 2Daz2Y9bOMb+SHugr0N9dD8hNu6tQ96UTnjrAWPH0amleJf0g7Y5jl5s8NuuSWNyBj+BBI iOvuHsCW5mmhIGMvoG68GujEH+yHvWQiA9oHS2dVGphVXSFwVf433IOCgDxgyQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780068033; a=rsa-sha256; cv=none; b=vuzyW3QxB9SFcdraqPfK/GEWO8t8PCL19gJdlLTCJvpsYyZa9LxX+N6W254WcIW3gWXecJ mjJb3UdIz2qyUsaP+1GaB8PjZRx1R4ZoZd7BJUwGlbwDYzKSwNOgRlCHwZE0cVo8uC3NKw L6YftjusYvvKV9iSGVEPaPZrq3ELoX81NXZzgARvPAQRYr5ZZxrL9qI8T3G80uS6aAgIBp cIPpmYzZM88TgaEMpeTA/JgviXlM81fshrlajt2DeJMqCDEN06kA+ZYq2EUOqNV3WmYCxc Q4JZ0joBtjjsCapJWCukblWw98ZXgAX+3ieVzJMcMmVatgSncXktHtbWN6UPiA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780068033; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m1jia2upFspc4XMDakpW3cBe1CenTOr3W8/rHXBtr9Q=; b=IenxYDDMZVNuLgctUh0SxC0PNlFH4d4+8mGwMfc8u5CGDsGHKVpPqBBRLLL7uDWRcQsHSL ajIHXoIzDkkvy1D+svtwy9LxEPwI0DydRP/l8maDu0ThPIambJea4YR+Y6gBt3pd/XK5uE i1hFQluD25LKPuRO4FfqiddNeBERY3GTKCo1JbFz+6CpzFCXKPIzS+SoD7izfvDrozjEa1 XPbqKnQWg7Nq9UbtKrdeb9dv4XlG6hG9dNJiGk8BUu761yz7szegDXyk7yfgZ2SjIQuwmV xB53GtSTfK6uPWqA+ukcqgW5mvX3YLTWj+IrPasd0hhe/8kZ5TVTLXkHzftYyQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRn9Y506Lzdmb for ; Fri, 29 May 2026 15:20:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 312a1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 15:20:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: ShengYi Hung Subject: git: 4cea78573c32 - stable/15 - vmm: Add missing AVX instructions for AVX512 in cpuid stdext List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: aokblast X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 4cea78573c320e5da1d0051c3e93ff5b14bee512 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 15:20:33 +0000 Message-Id: <6a19aec1.312a1.4a4ad5f7@gitrepo.freebsd.org> The branch stable/15 has been updated by aokblast: URL: https://cgit.FreeBSD.org/src/commit/?id=4cea78573c320e5da1d0051c3e93ff5b14bee512 commit 4cea78573c320e5da1d0051c3e93ff5b14bee512 Author: ShengYi Hung AuthorDate: 2026-03-22 02:26:56 +0000 Commit: ShengYi Hung CommitDate: 2026-05-29 15:19:48 +0000 vmm: Add missing AVX instructions for AVX512 in cpuid stdext Reported by: Tom Reviewed by: markj Tested by: Tom MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56021 (cherry picked from commit e6eba5076929d0b193c9c94b2658c7e8f5da0669) --- sys/amd64/vmm/x86.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/sys/amd64/vmm/x86.c b/sys/amd64/vmm/x86.c index 6794110f067a..4ac008499999 100644 --- a/sys/amd64/vmm/x86.c +++ b/sys/amd64/vmm/x86.c @@ -446,10 +446,19 @@ x86_emulate_cpuid(struct vcpu *vcpu, uint64_t *rax, uint64_t *rbx, CPUID_STDEXT_AVX512ER | CPUID_STDEXT_AVX512CD | CPUID_STDEXT_SHA | CPUID_STDEXT_AVX512BW | - CPUID_STDEXT_AVX512VL; + CPUID_STDEXT_AVX512VL | + CPUID_STDEXT_AVX512IFMA; regs[2] &= CPUID_STDEXT2_VAES | - CPUID_STDEXT2_VPCLMULQDQ; - regs[3] &= CPUID_STDEXT3_MD_CLEAR; + CPUID_STDEXT2_VPCLMULQDQ | + CPUID_STDEXT2_AVX512VBMI | + CPUID_STDEXT2_AVX512VBMI2 | + CPUID_STDEXT2_AVX512VNNI | + CPUID_STDEXT2_AVX512BITALG | + CPUID_STDEXT2_AVX512VPOPCNTDQ; + regs[3] &= CPUID_STDEXT3_MD_CLEAR | + CPUID_STDEXT3_AVX5124VNNIW | + CPUID_STDEXT3_AVX5124FMAPS | + CPUID_STDEXT3_AVX512VP2INTERSECT; /* Advertise RDPID if it is enabled. */ error = vm_get_capability(vcpu, VM_CAP_RDPID, From nobody Fri May 29 15:20:29 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRn9b2YY5z6fh9D for ; Fri, 29 May 2026 15:20: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRn9Z6YVRz4462 for ; Fri, 29 May 2026 15:20:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780068034; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8GPDurYXOtuK224wNDkp/k32gZG2BAsTt4D+jgTZtUA=; b=J5MYzYcDZiR+cWg0pFhmqLuJb8wfJCxZJzSd7sh0uynzbjy4FwB49XZmR7N56i3EZ2mnHy i7KUugpaYhqpoxfIopMiLKWQkcknOPxs3D1KUu3BAsi2tSgKZOk51jKiAvkGF/ju/fET8t DWe8i+syAUMbGg3xtJVdSkqge82LSB3QPSd6yhukMNZM7VRi6i+jATnViBfU1iH1pOzI5u voJebECy750gcPKHsq42Vj54vUwBPNhY0isC5EzIwj1Nqrqy+DTolHszTQMj66NM65VNrX rmLzz9kMPcVSqZTNIFyz4HZJ7zaJNdjBLf9EmrfpOj9VlBGqx/D1/C2izhzTkQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780068034; a=rsa-sha256; cv=none; b=xzpInkkc+bz77+FZx5YAIzyeLZzTdJhT0Hmtw+KQAkgfXXykI4y7/Dl1sP4AqG6nyLiej3 TSop93A/e2JX+kr/JjTUPHWMjdqoyRLOm7SsmyknauWCtBPLXthvVaV4A6mOTOyKqsm4Jx aLQd/NMNS58E+aYw0VRGyawWsOGKg2KfCbchi9tGXXJthea8EbDkqgybYkP0ZWqe5dAfdd 7EL3ndd2pTq6LaNZq4Kbej3j6oRo5R/yCW5ecmMizpFOBDVo/31HGJkbGMedPUf+DMsbPc z6voPTvnjfXeYGj+t3Fu9WFXKk3bAFiJU8FBSEROiZtOYdoGt5uim9ymXW4t2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780068034; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8GPDurYXOtuK224wNDkp/k32gZG2BAsTt4D+jgTZtUA=; b=a8dAWKnrQvZQt13piVKx8WdZXU4QVH2vkPrSb9CCgPFAP7jEJK5ZJABnb0z6BKiaNTaV2j dZNwuerUiwJbhL+7oS22YHnHSRMrPKwyKe/r3zRORlLiMPwUpGB03zCuIALyh6JD6FdmHu l2ambEngWzeNXEFZR9AeWCEk45KPFwQzGa0RflHvLGx1uGNu4wCpm14ZnfCiDLZkQ7p8MW PLs2M3YNiaFdh/xokdRxtc8cdTdwIjSJlqxpRLnqyCBK/dFWpjkV/kTSmXVhlikoNrSKio 3sYKi0K6hYD63GmsaFXAke9e8TVqKgEIfq9FfOlHHcweE98fXpoTokuPl4IIbw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRn9Z3YQrzfLZ for ; Fri, 29 May 2026 15:20:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26ec0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 15:20:29 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: ShengYi Hung Subject: git: 8318794559cb - stable/15 - ichwd: Add manual for i6300esb watchdog List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: aokblast X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 8318794559cbf2332e69c56fae7308a874f39a53 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 15:20:29 +0000 Message-Id: <6a19aebd.26ec0.5f4d0133@gitrepo.freebsd.org> The branch stable/15 has been updated by aokblast: URL: https://cgit.FreeBSD.org/src/commit/?id=8318794559cbf2332e69c56fae7308a874f39a53 commit 8318794559cbf2332e69c56fae7308a874f39a53 Author: ShengYi Hung AuthorDate: 2026-01-03 06:12:26 +0000 Commit: ShengYi Hung CommitDate: 2026-05-29 15:19:47 +0000 ichwd: Add manual for i6300esb watchdog Reviewed by: ziaee, mhorne Approved by: lwhsu (mentor) MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54466 (cherry picked from commit 546d925cb44f1da7efee76bfebb42df8fdbc83a8) --- share/man/man4/ichwd.4 | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/share/man/man4/ichwd.4 b/share/man/man4/ichwd.4 index cc6924f7f866..25de73778d36 100644 --- a/share/man/man4/ichwd.4 +++ b/share/man/man4/ichwd.4 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 20, 2008 +.Dd January 3, 2026 .Dt ICHWD 4 .Os .Sh NAME @@ -55,6 +55,16 @@ The ICH WDT counts down in ticks of approximately 0.6 seconds; the exact value depends on hardware quality and environmental factors. Supported watchdog intervals range from 2 to 63 ticks. .Pp +In QEMU, there is a dedicated watchdog implementation for x86 +systems based on the Intel 6300ESB controller hub. +Support for this watchdog is provided by this kernel module. +.Pp +Optionally, set the +.Va hw.i6300esbwd.x.locked=1 +.Xr sysctl 8 +to prevent users from disabling the watchdog timeout check +after it has been enabled. +.Pp Note that on some ICH-based systems, the WDT may be present but disabled, either in hardware or by the BIOS. The From nobody Fri May 29 15:20:34 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRn9b3nG9z6fhPD for ; Fri, 29 May 2026 15:20: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRn9b0tp8z43qs for ; Fri, 29 May 2026 15:20:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780068035; 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=eGlgmtfGUEe4bmZD7+VATgzZSNjJtnXP+objNETAIsQ=; b=RAGRTfkPlQzjSI3PBbzdX5l+IHrFVRN50MRh5JTFgWd3C1S0rC9IHDbkGPWitGMuZKMdfg 8Qmf/k1XyDX31b777drV1jUV0mr+pW3ZylxMduPWAWJKc8nPs3P6nth7qHNQOm0RrqOjBe PUw8ja5V6JsYxxFG5cqs9MpxscJrcfnJFzHNvaqxpFriaik02JVGqHewYUEkbuC7lq9uc0 Lx1Pv2Pw0YoNyivej+eRAxW1qdxNlpchBXpuMZ5uLUcdaJ6Ge1fAnVuU60zgZ9jiRwikvs 2hiyZhI9Zw/Z7xeePbqBnUXVszG9msjqOa9Zdu5MEtGtY2FvbAvLep9pUHi0QQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780068035; a=rsa-sha256; cv=none; b=bgAzoQEO8WMjVrdqDItT0Jqb5+hEFod9t5m9n0pgVPeNJmcYn4IkPnhdGA7MKbViYA16dd XdOZJFP6z9GUNjgRMafAI4ZkO7o+fPza8QTxtn5KwbjVWadzhGP/QOQYZlDhEC5LS5sO6c DIsnqnon87BPZeZHz4omqDP1URO+MtXU5BDYEhlVYE+XZgwG1qO8fGvlEhVCCi/OwU1Yuy xqyhLSv6fXJ5b+6tSP/KvRTcYtDpPi5nTAKI4p1woqRbxkgGvy30Vb6cwLDWWhidwqCldx vGqHnGenW8tWU96JoodnNElGCsCX0L5AsDw7YIsoShM1O4n2WukrIto69oZyog== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780068035; 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=eGlgmtfGUEe4bmZD7+VATgzZSNjJtnXP+objNETAIsQ=; b=ms+vucMYjuOaj2DOSSchnhH/HXVTwdZBln0XrgBKWvS+zOu9D7NHA2Yey2jXY2Jjx6IGfL QhnH6jdL7bKUiZiAZ7tXrJfT5CHf5F+7/OEK5te5ogzemQ7IUwEOkjYjvmb6QqbUcwHrZh qfVuIsQc0pVw5QH+VbnLfQt7eHbnY/s6DFka5devZ7TNf4jSY9vqrgO/jqKOgCQY2i+4wS m2DCPjAeE5/ZEdct6etouipsQ0EmhQNBur7eJ1GCE/RlVT3fqSJ379BW2rowIli6SOqZmb uhntZtUbDN/lpm5j3PqhRdt8/gfdxXNz920VLBWE9JGVzLo2yaEkVMNa6QtjSA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRn9Z5kflzfJm for ; Fri, 29 May 2026 15:20:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3006e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 15:20:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Shunchao Hu From: ShengYi Hung Subject: git: 4669f572f7f9 - stable/15 - compat/linprocfs: Fix auxv sbuf leak List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: aokblast X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 4669f572f7f9156d9d48ccab1a1309ec6d23a13a Auto-Submitted: auto-generated Date: Fri, 29 May 2026 15:20:34 +0000 Message-Id: <6a19aec2.3006e.16c71a7c@gitrepo.freebsd.org> The branch stable/15 has been updated by aokblast: URL: https://cgit.FreeBSD.org/src/commit/?id=4669f572f7f9156d9d48ccab1a1309ec6d23a13a commit 4669f572f7f9156d9d48ccab1a1309ec6d23a13a Author: Shunchao Hu AuthorDate: 2026-04-04 10:27:53 +0000 Commit: ShengYi Hung CommitDate: 2026-05-29 15:19:48 +0000 compat/linprocfs: Fix auxv sbuf leak linprocfs_doauxv() allocates an automatic sbuf before validating whether the requested read can be satisfied. When the computed auxv read length exceeds IOSIZE_MAX, or when the buffer length is too big, the function returns early without releasing the sbuf. Route these early exits through a shared cleanup path so the sbuf is always deleted after sbuf_new_auto() succeeds. Signed-off-by: Shunchao Hu Reviewed by: des, spmzt, zlei, aokblast MFC after: 2 weeks Pull Request: https://github.com/freebsd/freebsd-src/pull/2118 (cherry picked from commit 16aa49f6d1bbe70cd3e851139eb63d566de49b12) --- sys/compat/linprocfs/linprocfs.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c index 7ac48786c77b..941b76788dc1 100644 --- a/sys/compat/linprocfs/linprocfs.c +++ b/sys/compat/linprocfs/linprocfs.c @@ -2026,23 +2026,26 @@ linprocfs_doauxv(PFS_FILL_ARGS) if (asb == NULL) return (ENOMEM); error = proc_getauxv(td, p, asb); - if (error == 0) - error = sbuf_finish(asb); + if (error != 0) + goto out; + error = sbuf_finish(asb); + if (error != 0) + goto out; resid = sbuf_len(asb) - uio->uio_offset; if (resid > uio->uio_resid) buflen = uio->uio_resid; else buflen = resid; - if (buflen > IOSIZE_MAX) - return (EINVAL); + if (buflen > IOSIZE_MAX) { + error = EINVAL; + goto out; + } if (buflen > maxphys) buflen = maxphys; - if (resid <= 0) - return (0); - - if (error == 0) + if (resid > 0) error = uiomove(sbuf_data(asb) + uio->uio_offset, buflen, uio); +out: sbuf_delete(asb); return (error); } From nobody Fri May 29 15:20:35 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRn9c6xJxz6fh9H for ; Fri, 29 May 2026 15:20: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRn9c26Scz4440 for ; Fri, 29 May 2026 15:20:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780068036; 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=g9EwJ3gTQ9PLnfprncJe5bF2WFpuS2qL/g8YRdd59hI=; b=sSfzGS84F0sD1B9hEWW6FzREGLExcLVBlu6xJIlw2JIqcK2pY933ZB69geSyxku0wLqdEa 878dunbbhO6g/qQdXXm9aC1i3URzry/ANI6FJ/gqZbZaOC5CfM3HW5cgohvWlUHa6JHwo/ 11Bi1fBO6+9xSk3JsEYF7FtHf0c5op0jA5d0wu8TosptCo47Kz6Ojfi9z/lLTByOVD5fJk hRNTa7vZ/VS7J0Zgr4J3op/jyQeaRWDsYOg0anWuszaGN487/L7JpVLXg30RgA1sOtO57Z AmHyluWNIiQhkaQsYaU4sFJBXgBvJJmRqR4KMHTZ2srpfkZZMWdpvFnbZOYRRw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780068036; a=rsa-sha256; cv=none; b=OKJ8pT7GFkVf9Y/uKvXM9nJZ9zqDHE+9AXT8cXkbdkjBIlVIn6r85IaAA2U4t0ZFnN8dJv rA8fUNc9Iemm1SrTKMWcbRq2NXqs1oLv+aNq5F8fx8DMeSeNWK9ULmWg9R2YrhyQfkwNwH sDFXTJNinVHsYdpeMXlQrRvy9tkwE4RoZIqylIGoqPKHQl1Z5TDTjMxnseluD/iHmCOFeD aR6tRh5bw9jxD8wC+e7psp936Utz2iwR1FoOHl8iaqxnfd8OWbGRA14zHS1i9Dy5KydhZD 045lrEbjhcPhN05aKJX4HOojDXXx/JClg+q1vcwrum+vgh82zOAoGKyRw5/Ymw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780068036; 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=g9EwJ3gTQ9PLnfprncJe5bF2WFpuS2qL/g8YRdd59hI=; b=ybILCFWhWMfliOXrDOEXo0C2mRufafZf4z0sOKVKTjPk5GUE7vjr875SbhKX9jypcetWfL chlGXXOGqidtS2TAZQESvfARSK8d/vxVnbXBzV4U0jB5AgOPFjT/UT7J+M1aVUpKFrp+pA iZHlP/KcM9Bp7a3vw3sYkq3uQivEAXIvFsRFuOkMkPftT41C2zPmxryGQ7mtQz34pgyNqY st9sZsytjlVw1QQMXWgz9tOBzyFMKNkzJoyuRoSud7eJrI2W52ejyjuAQHA4sAZD3ek6SL lwDriJWygTEoRLUjbBJ0sARd1ZOKWJmkbguDVkhjPDuI3yuK2kae+yH8mCiCgg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRn9c0CV9zf4Z for ; Fri, 29 May 2026 15:20:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30073 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 15:20:35 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Shunchao Hu From: ShengYi Hung Subject: git: 117bd8510e44 - stable/15 - compat/linprocfs: Update /proc/partitions output List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: aokblast X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 117bd8510e44b3b85e790159ad9a184d5cdbaa62 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 15:20:35 +0000 Message-Id: <6a19aec3.30073.6bb8dda3@gitrepo.freebsd.org> The branch stable/15 has been updated by aokblast: URL: https://cgit.FreeBSD.org/src/commit/?id=117bd8510e44b3b85e790159ad9a184d5cdbaa62 commit 117bd8510e44b3b85e790159ad9a184d5cdbaa62 Author: Shunchao Hu AuthorDate: 2026-04-07 13:07:31 +0000 Commit: ShengYi Hung CommitDate: 2026-05-29 15:19:48 +0000 compat/linprocfs: Update /proc/partitions output Linux /proc/partitions reports the major/minor pair, the device size in 1K blocks, and the device name. linprocfs still printed obsolete statistics columns and reported the size in bytes. Update linprocfs_dopartitions() to emit the Linux-style header and report provider sizes in 1K blocks. Signed-off-by: Shunchao Hu Reviewed by: des MFC after: 2 weeks Pull Request: https://github.com/freebsd/freebsd-src/pull/2126 Closes: https://github.com/freebsd/freebsd-src/pull/2126 (cherry picked from commit 5f5cc3c67ae8a4d9a27e750bef98a9ce1a6b2cf5) --- sys/compat/linprocfs/linprocfs.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c index 941b76788dc1..786a486b9143 100644 --- a/sys/compat/linprocfs/linprocfs.c +++ b/sys/compat/linprocfs/linprocfs.c @@ -659,8 +659,7 @@ linprocfs_dopartitions(PFS_FILL_ARGS) int major, minor; g_topology_lock(); - sbuf_printf(sb, "major minor #blocks name rio rmerge rsect " - "ruse wio wmerge wsect wuse running use aveq\n"); + sbuf_printf(sb, "major minor #blocks name\n\n"); LIST_FOREACH(cp, &g_classes, class) { if (strcmp(cp->name, "DISK") == 0 || @@ -672,13 +671,10 @@ linprocfs_dopartitions(PFS_FILL_ARGS) major = 0; minor = 0; } - sbuf_printf(sb, "%d %d %lld %s " - "%d %d %d %d %d " - "%d %d %d %d %d %d\n", - major, minor, - (long long)pp->mediasize, pp->name, - 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0); + sbuf_printf(sb, "%4d %7d %10lld %s\n", + major, minor, + B2K((long long)pp->mediasize), + pp->name); } } } From nobody Fri May 29 15:20:36 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRn9d6RBgz6fhGd for ; Fri, 29 May 2026 15:20: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRn9d0Qq0z43rD for ; Fri, 29 May 2026 15:20:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780068037; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G/CqPBncvH0tNJtNP7j4xx9cic2a1ToIjHN4DKRvzYA=; b=JCdokLJORes1GjAPB6Za2ia7hVDKLSVBg+GXnQe5Ybj4te4nxtVXV7n9KX9TbuZSgZ4hjN 8nUTeYDjJP94WOHCGtc8di9CIAZ+bLa4MIYGXqJkzzUXzoLWVlHxYVCPdQ4AUAFcJfz9pc kqWFH+z/Bf99n4gfol9+aI77X+AS0ljUXQcnAEoq5P72jV8dHzU4pDn00HvZ8KmKVAGntb ViXa0KxInDgCJzoOFhjbMk7S7A4AY/uBzALXZq0vP9yhHfpykKBkN5agqVsa7kiLhjAKKf 5fyFfKDtLdW5lw2yvPVrr1o8jjy6FBXv1wfrH5IAO/01ryyakbsARWvYgsZimw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780068037; a=rsa-sha256; cv=none; b=FfqX//00QbwGQw8Pt4vX1wYX19uh4VK3Bf36rcL6Fp/1m6fpz4Df25hq0gVi72uw7snfBC oZrIGwXkf4wht4T9xOCJ/LQPAnZ0KSHATifnja9Z7+xz5P5jARRBAhBqzzwiB5KPRGDmhJ BuylG15yCFwlECmOpepihZxIdySWit1eGx7onr0osgES1Y6g/2vWl6Gr7R2J65ATw0eqsI HHwVLQGN3i7dksWaHhHON6/02LIfXZzHZoXuv8kD2fBvmw7sSD4hJvuJo/vRhyaeatGuTn Fbc47VemNsWhmvsCpkUIxPW72p/JaDpXrisPYktp4KCOKP85RwAY6Rnb2ENiPA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780068037; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G/CqPBncvH0tNJtNP7j4xx9cic2a1ToIjHN4DKRvzYA=; b=MdEVoThCcLKYzBIBDeu+v0aQbyYM9KLOYenfxLnKqd80KJuY+ug+y0fo/Vc4qUQmFYC8gV aARmG/AIjKw4pkq0aViDcxWGLS7LrTsXbwOeMmYT90o16qLkCe6eOCB26+XFBInRmcwMWM dlX5kyan837A3g87wsBxipq33FSXwFcsj8z+qDqPTl6t6i/73qPPGHp7+G2TmUELd1n0AA t4sQMom8joP9S+t6KSX5ONPVIffHRR7zXlN7D4qY8rkZwiwIuAD3mKzjoD2dCgWogchpjN UVFto/g47Yvsa/BZVSIoqBV8mFfMwZgqBP0eygtAHXNm7Z7bi8remK/0wQz49w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRn9c73jczfLb for ; Fri, 29 May 2026 15:20:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31542 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 15:20:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: ShengYi Hung Subject: git: 68cbf46ef02f - stable/15 - ath{10,11,12}k: Add missing header in Makefile List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: aokblast X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 68cbf46ef02ffdb2184612f1bf70a7c41859d273 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 15:20:36 +0000 Message-Id: <6a19aec4.31542.28fc0234@gitrepo.freebsd.org> The branch stable/15 has been updated by aokblast: URL: https://cgit.FreeBSD.org/src/commit/?id=68cbf46ef02ffdb2184612f1bf70a7c41859d273 commit 68cbf46ef02ffdb2184612f1bf70a7c41859d273 Author: ShengYi Hung AuthorDate: 2026-04-28 14:27:21 +0000 Commit: ShengYi Hung CommitDate: 2026-05-29 15:19:48 +0000 ath{10,11,12}k: Add missing header in Makefile Reviewed by: bz MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56693 (cherry picked from commit efc0ced5c46f3332bf1847f2889659e7f5412852) --- sys/modules/ath10k/Makefile | 2 ++ sys/modules/ath11k/Makefile | 2 ++ sys/modules/ath12k/Makefile | 2 ++ 3 files changed, 6 insertions(+) diff --git a/sys/modules/ath10k/Makefile b/sys/modules/ath10k/Makefile index b28df768c3d5..becf42a6a79a 100644 --- a/sys/modules/ath10k/Makefile +++ b/sys/modules/ath10k/Makefile @@ -1,3 +1,5 @@ +.include + DEVATH10KDIR= ${SRCTOP}/sys/contrib/dev/athk/ath10k .PATH: ${DEVATH10KDIR} diff --git a/sys/modules/ath11k/Makefile b/sys/modules/ath11k/Makefile index a2f0064c2ae9..eaf196af5b55 100644 --- a/sys/modules/ath11k/Makefile +++ b/sys/modules/ath11k/Makefile @@ -1,3 +1,5 @@ +.include + DEVATH11KDIR= ${SRCTOP}/sys/contrib/dev/athk/ath11k .PATH: ${DEVATH11KDIR} diff --git a/sys/modules/ath12k/Makefile b/sys/modules/ath12k/Makefile index ecca0bc3b409..071bb88a8b37 100644 --- a/sys/modules/ath12k/Makefile +++ b/sys/modules/ath12k/Makefile @@ -1,3 +1,5 @@ +.include + DEVATH12KDIR= ${SRCTOP}/sys/contrib/dev/athk/ath12k .PATH: ${DEVATH12KDIR} From nobody Fri May 29 15:20:39 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRn9g3qKdz6fh9M for ; Fri, 29 May 2026 15:20: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRn9g1jyrz444j for ; Fri, 29 May 2026 15:20:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780068039; 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=RP+0nrcfMBhIoURLpN3TL+SQ6UX8PpjMO/TluU5MmwA=; b=HQji9f4IP8VMw3scixSaqfASB4oFi+eyeWlXtGgv5LCB58IarLbC7WY+RoEHjlRi05c4sV VA50haatBBuS3aH8LK9P2ooZI8zvpVXXar2/XpiMRvG8I1jMuFdk7th+KsdvhsV+luRAIL opcfqAg+3g6K+ulzNDXmzwSkkBmTU8oKM1jMYjIkZnrijPh/h7evVwrc1AYcen0TM9Jz+f lzd/9YNG+PlR8v9YZKR1yFW1DdvRTqxpcRSSYgNKKXbcsQuka6nG33bLdB+oevkFJC4kH4 OuOlVWTMyAGzVPSFD7W6PqYnLFJMQGe5SLIyL44zDCt8k9Xa/odHgPLHCL9h2Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780068039; a=rsa-sha256; cv=none; b=rRe/nyTCp5FjsB3XDo2Dea3JmlN1Kb0D/NcUfRFChu6uDij5pmiF8tG2DGzfOl7ANX5vpW k4VT/L/HWg5M+IhOXVc93lmMnSqTetJb79tpPq96SzSzXzSPRxjJIwOcq+ksZj98wFBUMd YJ54e6hthFQsa57UBgRtVCNfmIw0FgtlJf5snFCZf9UQxGJl02HxuEzo2NEBvhSL3oeLbp bCZK51pONeWG1c2v5YZcDH1OBtLfBMwJarAvCjHUrPPkTca3vdMFtKJ3Gw1yYLPrEXCgdG 2sYcrkNS9Zoh0dxliIVgLu0g0Pl+Hw6x1+K2vYC4ffye6hqz0FXMFTTswj044g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780068039; 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=RP+0nrcfMBhIoURLpN3TL+SQ6UX8PpjMO/TluU5MmwA=; b=rcpS+uC4jjFiP4FlreD4x9AUOH47JIrr2Odq2lN/IfP82Dhn2b6RGWUXcLitJZxTKzXTTL oO1PvdVQhcbbIsWSWBxj8ctzhXbWi1icbhti99VZ0zuDyefZF6uWR/7bAnKdWSYIZje/39 nFeP2W4J/Rxf5sV8DUEB508gN3sk+dL19oPVhbfDFqrN+/VzbW2g8JT0OUU8LhPq2xPV9G E7ugjWFw6D/0flIA+iu3RG/sF2j+GwleIPrOlw59NOAgkhEWM+tvR9PBvaiYgzid3Le9lW LL9aMQwtaY0eH4BUCTjqn/XAErWQDIn0KlhdBrch26E8rx0wpV8xinGxuJqeyw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRn9g1DT3zdkN for ; Fri, 29 May 2026 15:20:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26ec4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 15:20:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Gisle Nes From: ShengYi Hung Subject: git: ff5d0d7db769 - stable/15 - pci: use uint32_t for eecp List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: aokblast X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: ff5d0d7db769b7a32921ac650c0bae24afa333f7 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 15:20:39 +0000 Message-Id: <6a19aec7.26ec4.220104a7@gitrepo.freebsd.org> The branch stable/15 has been updated by aokblast: URL: https://cgit.FreeBSD.org/src/commit/?id=ff5d0d7db769b7a32921ac650c0bae24afa333f7 commit ff5d0d7db769b7a32921ac650c0bae24afa333f7 Author: Gisle Nes AuthorDate: 2026-04-07 16:48:15 +0000 Commit: ShengYi Hung CommitDate: 2026-05-29 15:19:49 +0000 pci: use uint32_t for eecp eecp holds the extended capability offset. If that offset is larger than 0xff, storing it in uint8_t truncates it, which can make the early EHCI/XHCI capability walk read the wrong location and loop during boot. Seen on AMD device 1022:151e, where HCCPARAMS1 = 0x0118ffc5 and the first xHCI extended capability offset is 0x460. Widen eecp to uint32_t in xhci_early_takeover(), matching xhci_pci_take_controller(). Signed-off-by: Gisle Nes Reviewed by: zlei, aokblast MFC after: 3 days Pull Request: https://github.com/freebsd/freebsd-src/pull/2127 Closes: https://github.com/freebsd/freebsd-src/pull/2127 (cherry picked from commit 555ffd9022de0c497881bafc413e3e1d05af10d4) --- sys/dev/pci/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index 9a1dbc5f66ed..9e4b64f03171 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -3756,7 +3756,7 @@ xhci_early_takeover(device_t self) struct resource *res; uint32_t cparams; uint32_t eec; - uint8_t eecp; + uint32_t eecp; uint8_t bios_sem; uint8_t offs; int rid; From nobody Fri May 29 15:20:38 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRn9f2ZW5z6fhKb for ; Fri, 29 May 2026 15:20: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRn9f0rkQz43yf for ; Fri, 29 May 2026 15:20:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780068038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lenfHeGcuZSkAgNEtMWHh+NIRh8xYzqWO1c1zkJBDZM=; b=SDvbKgMIPhZ503+60lfIYHcTWyJFso22WzlfPy390FG1Dk819uBvK3g79qcNwh+uqpDGJO cbkLLUuidxZiixEK3OnedC2LVw9ID/Ef8PJTIHjUJ5mNk5NCV6TRfR2zIIhrnifeW3CRjw krUnYSnpCyNh3ohsc7VPyDya8bRuB+DVOKff4/4DIB0J9B/w6eZBipcPqHCI0pMPRJk5f8 8nVi+MuSSxq4AGhn8ixPDil+UcsNKeWuB4dkFRmtcEU4nktHifr8gj9ExL0AFXwGT+KE4m rBN6L70jxhIaDhYoFat0/XXW+57PR/wR6ixsATbChVnq6L5Noq942aw4Pff4jg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780068038; a=rsa-sha256; cv=none; b=W4u/9GtvBbVfmZVd06T43ciJPkDrquZ/UxekJk3zlBcQPB2hJmSBiLN4uvR8Dd2FEztOr9 g0x7oZwrek1S5HZOlYxv6KPfFV6GiUa5egjZg+qqCJjWS+NyVHsGWy1vfYVj/xUD52OYVS yTLq0+QVh0gIdBoKPb6VRUTGcFlXfOzXDRcFVgTSNJu7T+MMof/r9uNmN20ylOofd9b9Nk MDRwskrNGVC53lgYhYIBoWDOUP69i5XnQOCz/jIL7yqqVRpGaPIWNRDKMYPzX3CUQDYFNE P/zpXWu3ZU8FnGp44kONuTl9O6eDMmg8TB8sEeiKCtsgBnq1AlcFA17wVzPjQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780068038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lenfHeGcuZSkAgNEtMWHh+NIRh8xYzqWO1c1zkJBDZM=; b=nO754ae+ZiqNY9gKBST64YY9Pe9eKEuxWfmSMVYKQIb8kta05rGFHmwA30z+gnoBcICcoj tY3Xl553Yd9ZLwzSW/p+52QaQkZd1Ni6JlsfEluhfP2ORl4MCTnsM/IF8jzWd7UT3KqUxc MBX0lDh+0wU/oLnY7OcRmQRWSZA+WiGt0SiFZG3VyGd/I+d4/WjFD2av1oynLPgPNhSEff /ndh5ID03sqQyCNAvIt4m36Pe/5GsDeDBtwxIztm8ykpzzTSdXMXxG0FtaiT8GUo6xwaI5 7lZzgAT20jhX1N0PhpCFkgWzBHtwLoGQr+pHPKUEl+2i756eDsAoRC4xlchirg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRn9f0K85zfGW for ; Fri, 29 May 2026 15:20:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30f1b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 15:20:38 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: ShengYi Hung Subject: git: fe39b778c5c5 - stable/15 - libusb: fix incorrect status type when completion on cancel the events List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: aokblast X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: fe39b778c5c59fe0fbf52470afbdad843b94cdba Auto-Submitted: auto-generated Date: Fri, 29 May 2026 15:20:38 +0000 Message-Id: <6a19aec6.30f1b.36807c53@gitrepo.freebsd.org> The branch stable/15 has been updated by aokblast: URL: https://cgit.FreeBSD.org/src/commit/?id=fe39b778c5c59fe0fbf52470afbdad843b94cdba commit fe39b778c5c59fe0fbf52470afbdad843b94cdba Author: ShengYi Hung AuthorDate: 2025-08-05 09:41:17 +0000 Commit: ShengYi Hung CommitDate: 2026-05-29 15:19:49 +0000 libusb: fix incorrect status type when completion on cancel the events Reviewed by: lwhsu, markj MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51736 (cherry picked from commit 06271366982eb6fe59502fcdf95a1a22e0671d5f) --- lib/libusb/libusb10.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libusb/libusb10.c b/lib/libusb/libusb10.c index b3af017ab980..56c9caedab16 100644 --- a/lib/libusb/libusb10.c +++ b/lib/libusb/libusb10.c @@ -1769,14 +1769,14 @@ libusb10_cancel_all_transfer_locked(struct libusb20_device *pdev, struct libusb_ if (sxfer == NULL) continue; /* complete pending transfer */ - libusb10_complete_transfer(xfer, sxfer, LIBUSB_TRANSFER_ERROR); + libusb10_complete_transfer(xfer, sxfer, LIBUSB_TRANSFER_CANCELLED); } while ((sxfer = TAILQ_FIRST(&dev->tr_head))) { TAILQ_REMOVE(&dev->tr_head, sxfer, entry); /* complete pending transfer */ - libusb10_complete_transfer(NULL, sxfer, LIBUSB_TRANSFER_ERROR); + libusb10_complete_transfer(NULL, sxfer, LIBUSB_TRANSFER_CANCELLED); } } From nobody Fri May 29 15:20:40 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRn9h5Zc3z6fhMT for ; Fri, 29 May 2026 15:20: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRn9h3744z4407 for ; Fri, 29 May 2026 15:20:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780068040; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ccc+DiW6Trga8fiaWeU2HsVlAuRp+wbXP3RAwYyq7j8=; b=LCXm2jWXEchB435Mw7ivqRitihMPb9XRPejQAXPPpQOc8JEYGK+ibGbbHNTn/1RWEdh1rr /j078CdcAPdaBUxSigc2fL51SqmafymX2W5COIco3VnAKo4icFnheD042n6tS179zS9q9r A9GtF92h2pQRCkGTRjjN6hHFuiKg0Vh04kjMbYTT7D2I4mNS5RWwv4RdFAGMF93IuGx6SL b/3NM+OzCbYW5SaFKZpVxkXv5LU29o8jDRVWtzGNGdTWXIkO37damQ4hINS22/QpvYi8r9 6xYlOMXG0OTaIYdhH4dGWpRmWqn3EEvCIIYPJg4QNYNFahq2st1/2IHhslo1yQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780068040; a=rsa-sha256; cv=none; b=WUkPLSLlCIF5FGLC0svJudDcToMAPBn7ms78AG2ja9RfgKmKSOXbZBYRgowOgVSzeGtR3q FWQH+DFaH46YX6DB6FPbCFyGe+IXmIPlsZxYuKUflhlr44qAE88sGvN+Dhc90sGGyPCkHE RolhouhZeWnt7TgUkLtRqzUY/bVDSjCAUsHN6EWYBhZvNIxKwwTCVPNZyCJkfWbTSsh/St kFYCVa7Zk/5xawCvAg3pDHVcwpcm4jhlKi04HNzJ9N1IsZ+Ai3AZ+/t1VoZnWVd8c/oHyK jBxXblmHBpVpnv4CpmgweH111PO4yi04jUQvIPbgHKJMOW6skvr5Nh0QJ2YJFw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780068040; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ccc+DiW6Trga8fiaWeU2HsVlAuRp+wbXP3RAwYyq7j8=; b=qk5xJbvOwmzBGPB8P+d7lQtMNVQ3KobjZhA0Bp9qy07eMpC+8P5pryTChIOrqyWUCZn1tg xlD9ODthPdYKuv3MYHbNbwBzEthuEYbsmmcqGGoEwbXm2AF6IQL5Dl2OB7gxBuipas0eQw +1khHym1C0fRBu/T3OVFTAARDobX4wGpxB4BOkqHE+EM34zGXt+Fouy/gHIiEQv6sR1rC/ pFFgap7kEVpuFHW6wZddOTYfqTdciTENxnblk3glmN6YUbp9G3A163hCFRMOVllcWkYsMF Q9YcPlSSa5VgAUshsD/xMeb8Ta5VTnW+CUrpAm8d5BvAj3S3rL4bl4PaMD4Uwg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRn9h23tPzdkQ for ; Fri, 29 May 2026 15:20:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30fa0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 15:20:40 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: ShengYi Hung Subject: git: 83cddc84693a - stable/15 - sound: Fix lock order reversal in dsp_poll() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: aokblast X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 83cddc84693af1fb7f1ba6ee1213f2b9694eee3c Auto-Submitted: auto-generated Date: Fri, 29 May 2026 15:20:40 +0000 Message-Id: <6a19aec8.30fa0.506fdd3a@gitrepo.freebsd.org> The branch stable/15 has been updated by aokblast: URL: https://cgit.FreeBSD.org/src/commit/?id=83cddc84693af1fb7f1ba6ee1213f2b9694eee3c commit 83cddc84693af1fb7f1ba6ee1213f2b9694eee3c Author: ShengYi Hung AuthorDate: 2026-05-15 08:43:47 +0000 Commit: ShengYi Hung CommitDate: 2026-05-29 15:19:49 +0000 sound: Fix lock order reversal in dsp_poll() chn_poll() may hold both rdch and wrch channel locks while calling chn_trigger(rdch). chn_trigger() switches the lock order from "channel -> dsp dev" to "dsp dev -> channel" by temporarily dropping the channel lock before acquiring the dsp lock. However, only rdch was unlocked during the transition while wrch remained locked. Since wrch is also a channel lock and witness had already established the lock order requirement: dsp dev -> channel witness reports a lock order reversal when pcm_lock() is acquired while wrch is still held. Avoid holding rdch and wrch simultaneously during chn_trigger() lock-order switching by only keeping the channel locks when needed. The issue can be reliably reproduced by starting pipewire, pipewire-pulse, and pavucontrol. Reviewed by: christos MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57009 (cherry picked from commit 776584319fb4d66cdb1c2f91bed154dfe6a74e5e) --- sys/dev/sound/pcm/dsp.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index 6d76877e90ba..82c960fc3b40 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -1877,24 +1877,25 @@ dsp_poll(struct cdev *i_dev, int events, struct thread *td) ret = 0; - dsp_lock_chans(priv, FREAD | FWRITE); wrch = priv->wrch; rdch = priv->rdch; if (wrch != NULL && !(wrch->flags & CHN_F_DEAD)) { + CHN_LOCK(wrch); e = (events & (POLLOUT | POLLWRNORM)); if (e) ret |= chn_poll(wrch, e, td); + CHN_UNLOCK(wrch); } if (rdch != NULL && !(rdch->flags & CHN_F_DEAD)) { + CHN_LOCK(rdch); e = (events & (POLLIN | POLLRDNORM)); if (e) ret |= chn_poll(rdch, e, td); + CHN_UNLOCK(rdch); } - dsp_unlock_chans(priv, FREAD | FWRITE); - PCM_GIANT_LEAVE(d); return (ret); From nobody Fri May 29 15:27:04 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRnK41l8vz6fhwj for ; Fri, 29 May 2026 15:27:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRnK414t3z47Wv for ; Fri, 29 May 2026 15:27:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780068424; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5CcBMgdzOzrn+SPhx7dQQSGliQRZudMgosaGBFSUnpM=; b=a4U4C9nsbHLSgstAHP4vHVO/9J4uC6ZCX/xUA43EtTAEWEaKyjSh0o2WcoZVTe2oZS1rQZ 5dZZJjHn6XG3FwS76JU4iltsazCKNgS7YX71Odf6PvegEqkZEOIWHfDlUnmSPktw4DeE/W C+XRcP7G0dZjP/ui5Bxl9xQLjyN2eZkHxZ08o55NvNxijcoZiuHvOhkdbdD/LTBiBYkxUr BS/ZjNq/NgPp1Ii9r9WeuyVUvMl18zz6DQgxpKzSTz99bj3OMRQGgMbRf8zD+0Q1VO4ruJ HBOrYf1LaU22HrDNaVYeXUbGrU1lFp9JXtBXkkAzYNDP+3jea9Xsg7n+vRoApA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780068424; a=rsa-sha256; cv=none; b=mhgcG0o2kSslrc6ZHpW9CD8mXUnKPYAZBC3I1f6zKn85kQi5V2yIwIXIm5rKxmQuKYEz82 gLlfeXwNeGiDC/PF+ZQv7kEybuCA5FkkyOOlPHOlYqcopv4YQ50gLVNXZ43IAcG4ePVBE4 r/X3VfX4c085SAMjpFpoJPmPALNRjyM9E1Kq1cWUlnKiEGXU/ue07yUEBluTIOP8IUeG5K kFYJwE9PRTEWf8sthIGRbIOObvkDlQ9FUfRxgn+UxxqUrnaiHPypC78xqP0tyNnNwTW2Rq a9xz3BZSnYRaeDQqYij4TGvmsgjAd4wSqdal/BXugV92TIrRadmAXhb35a7bsQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780068424; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5CcBMgdzOzrn+SPhx7dQQSGliQRZudMgosaGBFSUnpM=; b=nii5QwQyG1MC0Bku4K9jNZC2WW2t7Qcizdwz+vgzk4KdcMwnstDEGClXrf44yz3U0ZDWrM 1IDbOPFuzAsiA/zLePnM4v/ILrBPvqiuxvZzEAuwS14bMcuiePzFAAxYi/uWGk2KFvktWh 4Hp7BUn5SfUjesNWe8lAeVM21dGn/Ugd8cLLj3lsGxBLsYl/MxeqixHlgTsXmgiOm97ocG 5VtmjR3NlTagJ1J+qyNoLbhXm/r6SgZS4myR4SOtFO6SV81qLNS32yayEts+5HduopVw91 Zu8qWKaNXhZpSYPu1DT0d/fG6CViTx/uCJ5lPZUf6+MfFirPR7rDveWYqUh+Lw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRnK40c4rzdqG for ; Fri, 29 May 2026 15:27:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26ecc by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 15:27:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: ShengYi Hung Subject: git: aefac9f392a4 - stable/14 - ichwd: Add manual for i6300esb watchdog List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: aokblast X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: aefac9f392a48489feb71a33be61296c1cd06f31 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 15:27:04 +0000 Message-Id: <6a19b048.26ecc.10e5c76f@gitrepo.freebsd.org> The branch stable/14 has been updated by aokblast: URL: https://cgit.FreeBSD.org/src/commit/?id=aefac9f392a48489feb71a33be61296c1cd06f31 commit aefac9f392a48489feb71a33be61296c1cd06f31 Author: ShengYi Hung AuthorDate: 2026-01-03 06:12:26 +0000 Commit: ShengYi Hung CommitDate: 2026-05-29 15:25:28 +0000 ichwd: Add manual for i6300esb watchdog Reviewed by: ziaee, mhorne Approved by: lwhsu (mentor) MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54466 (cherry picked from commit 546d925cb44f1da7efee76bfebb42df8fdbc83a8) --- share/man/man4/ichwd.4 | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/share/man/man4/ichwd.4 b/share/man/man4/ichwd.4 index cc6924f7f866..25de73778d36 100644 --- a/share/man/man4/ichwd.4 +++ b/share/man/man4/ichwd.4 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 20, 2008 +.Dd January 3, 2026 .Dt ICHWD 4 .Os .Sh NAME @@ -55,6 +55,16 @@ The ICH WDT counts down in ticks of approximately 0.6 seconds; the exact value depends on hardware quality and environmental factors. Supported watchdog intervals range from 2 to 63 ticks. .Pp +In QEMU, there is a dedicated watchdog implementation for x86 +systems based on the Intel 6300ESB controller hub. +Support for this watchdog is provided by this kernel module. +.Pp +Optionally, set the +.Va hw.i6300esbwd.x.locked=1 +.Xr sysctl 8 +to prevent users from disabling the watchdog timeout check +after it has been enabled. +.Pp Note that on some ICH-based systems, the WDT may be present but disabled, either in hardware or by the BIOS. The From nobody Fri May 29 15:27:05 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRnK543jnz6fj0C for ; Fri, 29 May 2026 15:27: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRnK51Zbrz47Yk for ; Fri, 29 May 2026 15:27:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780068425; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D1cgcy9Xf9xijSKaCmg2DlMWBZHJTF5p4ZUMR0mPpJU=; b=Ep0BD09e2CknoSP4xEUqF2jxWFtRpHZ8ao4MPrLbUeAffgL8BOAP1ufyp+3q6XggiVNWMG I6kZix0ow/syqpuYhOQKdLKGMz95HZFKO2aNNMpciZh/r1LdYvl1oKlSUSfQCkjy8CuHYd LdjLuCyerujTevbjZbE8ax26OF4eRPlZ4l4MpQl4glhISnZBAsEvAeJ81gF3ch7sPDQ4G0 DUwaFSK06bn3PxuyIy/BcqkHjjeZSNOPjb8rT9XyN4j1G3kzeTDFv1NBqcX1sDb1Vmym4d DAuTZ92i+AOfQe/Ue7R9lJtDevNa/ZkaWnUK+WmXw/ZLQhVcH/uVsJE9zs2nNQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780068425; a=rsa-sha256; cv=none; b=oMiBqrw99sjVvb0K2uZGMRoESyZeDFfO8gF2XWiHFvrVjUptB5Y9w5zR9sHGANk2hyqsx3 5BoHNVloSDg7YhXn0vdk7qKonf1hbSawoBKq13VMnaJD96WBV2xn576ErspHvxukyDKCJV a4j+Be+BRxjwuDKNUMg4FcdC2n4xfm5Yl6vrmxDU1OIgIq//5RH/uMaPsLnPdX9nHf22kb q2FafgEY9mtNB8pNpjwywvsbO8DRPqlnjp+CBTtJHt7es/RJP2CUq8FrQNORnWJBiyIIWF MVJIwxb0ns7QT7/Fk1jHLJ4XpbrbZpXgmNYzTeQprbxzDAmZJ5eF+dqDt5IAEw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780068425; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D1cgcy9Xf9xijSKaCmg2DlMWBZHJTF5p4ZUMR0mPpJU=; b=T2WOqqvD7Ky8vH3GKePhNZt/L8ta/jxZVDZtOuZZvE0HZMO6e2sJ4zDxRoc8eCAAZZEf9y QeBdlyH35RPuj66pur3Qy3TcoLAnVegTQE1v2Qmn56JzLEh6X0CWcqOO1BcrbM90bS+BlE 8OOG/5DSuPY0MIj5ypcEmd7lTpG6/SWRul4Er9XNkVSziDfJD2dmyP8CjfZQYldg8fL2OS gYnw3ZlYEVXahKazqKbE2JoYzEmzSEiPr2agPgyXR1o5RXFYnAKca4XMvAXbccUIDKYJnw 1pjoX3NtPBqsi6qBqS31ewNhCx+GoOM/0BCGiFNyVhZRsxxIrZ+GvkEjyHd5uA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRnK515Tlzfnq for ; Fri, 29 May 2026 15:27:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26ff2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 15:27:05 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: ShengYi Hung Subject: git: 3886f1b488e4 - stable/14 - kern_time: Honor the precise option when counting diff List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: aokblast X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3886f1b488e47eba98e1523f85cb570694e97385 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 15:27:05 +0000 Message-Id: <6a19b049.26ff2.7d4b8435@gitrepo.freebsd.org> The branch stable/14 has been updated by aokblast: URL: https://cgit.FreeBSD.org/src/commit/?id=3886f1b488e47eba98e1523f85cb570694e97385 commit 3886f1b488e47eba98e1523f85cb570694e97385 Author: ShengYi Hung AuthorDate: 2026-03-12 09:16:24 +0000 Commit: ShengYi Hung CommitDate: 2026-05-29 15:25:36 +0000 kern_time: Honor the precise option when counting diff When preecise option is used, the true elapsed time should also use the precise timer. This fixes the test case sleep_for.signals.pass.cpp in libcxx. Reviewed by: kib, imp Approved by: lwhsu (mentor) MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55824 (cherry picked from commit 728ae49a6b81edb3eec5ab70a63bb83db8f5dce5) --- sys/kern/kern_time.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/kern/kern_time.c b/sys/kern/kern_time.c index 64eef90fc740..0e3062d2a394 100644 --- a/sys/kern/kern_time.c +++ b/sys/kern/kern_time.c @@ -564,7 +564,9 @@ kern_clock_nanosleep(struct thread *td, clockid_t clock_id, int flags, } while (error == 0 && is_abs_real && td->td_rtcgen == 0); td->td_rtcgen = 0; if (error != EWOULDBLOCK) { - if (TIMESEL(&sbtt, tmp)) + if (precise) + sbtt = sbinuptime(); + else if (TIMESEL(&sbtt, tmp)) sbtt += tc_tick_sbt; if (sbtt >= sbt) return (0); From nobody Fri May 29 15:27:06 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRnK64cPDz6fhX8 for ; Fri, 29 May 2026 15:27: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRnK62LnPz47hd for ; Fri, 29 May 2026 15:27:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780068426; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/ugDo7H/LyIoVN6N0X0iLbzA1an3TTbDVMhJvVkzT/I=; b=fgtFfSgT7n9cTHikHCVSvFlnPKF4ibCRf99oMNoqYjk5fkUXw7a5upfqETXpEytatvJqKM sz0pNbQ3c8KJw1TJGfWTe5PncwFebhbxxs3JRS8PX27SyVbEmmptSwxe64AfB2shksiTho rEoUc1JS8bHoQJGy0NtgJ8DQTsV+AxMcuqwcYTcM3LXWxaBFg8Ndo9ApUaPapm93dPjM1o ODnlyFPBykkiuop6sVQRdV3U9NBtkwwIeR7yMKGWfAl/KjaOShvVQKzjp+ZuqKfbwiEawQ UYrVMlyDfmX1pCqwRZkzxrUs9A4sfJxp00y1y+Gqq8kwhBen0LyvV3diUyPGAA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780068426; a=rsa-sha256; cv=none; b=qhBWvjDLKQ5b9taJA+7pkxJzLLM/m6622cm8ookuQUnEianUPY8ArScKU/GEhkcPMRmcwX FP7ar3uKPuFH05qA6C2C/GAciK4fWPP7701Dyvx7GHKzExGy+VabmRODPglqHlr4TPAqGN nkfdnisypZXapKeJqNGFeMgc5Ba18NVUajupQhzkw1PcG6mrGycdEtuJRkNC0Di3Ph7XOG 2ft0joVn9e25PpLoJq0JBHcaE6YejgoE/c9NmFjQx4hMb9m8ey9y9eabVHWQ+qyeRYsHCJ tOGloWiSfUdHYc09JMC+Q3FGSdkbduwGqVhlB70fV9+BRk3B/M2cTQRzDOsqaQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780068426; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/ugDo7H/LyIoVN6N0X0iLbzA1an3TTbDVMhJvVkzT/I=; b=cNvRWiyVOfZ2zXhdWPbI6XADMHGla0q95aINC4oZZqwrPabEOfusqVp5c5XQzmkQH/VNbZ K8T2mPC7Nz8rcyV0ZExInv2yPELMUVSMGFB9qBYzvIKmLDweo8wrJwx06su9TmWGAcHVwG OaEArZt7EA9RuRmn/fKdY48jLthOkhYUlnxukzkom/eNj87X7UA6LA4CXbuqrROpH49oX1 IX+WbznlFcjtKkvjCGRIbSv/9NyI2Wh9HzHRGdmQvhc6c+GAllJtDghqYOiiEVFeXHSNyA 2OmrCHYhulkzIWksluotGR//n9Nx7WtiUqwAqMviNm3WNETmXP/h4qBNayAiSg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRnK61w4lzfq0 for ; Fri, 29 May 2026 15:27:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 308b7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 15:27:06 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: ShengYi Hung Subject: git: 9d200dc7103a - stable/14 - libc: Fix dtor order in __cxa_thread_atexit List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: aokblast X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9d200dc7103a6ca2112ab0ea47edc28b2141e14e Auto-Submitted: auto-generated Date: Fri, 29 May 2026 15:27:06 +0000 Message-Id: <6a19b04a.308b7.766e2cf8@gitrepo.freebsd.org> The branch stable/14 has been updated by aokblast: URL: https://cgit.FreeBSD.org/src/commit/?id=9d200dc7103a6ca2112ab0ea47edc28b2141e14e commit 9d200dc7103a6ca2112ab0ea47edc28b2141e14e Author: ShengYi Hung AuthorDate: 2026-03-12 13:40:34 +0000 Commit: ShengYi Hung CommitDate: 2026-05-29 15:25:42 +0000 libc: Fix dtor order in __cxa_thread_atexit The thread_local variable may creates another thread_local variable inside its dtor. This new object is immediately be registered in __cxa_thread_atexit() and need to be freed before processing another variable. This fixes the libcxx test thread_local_destruction_order.pass.cpp. Reported by: kib Approved by: lwhsu (mentor) MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55826 (cherry picked from commit 9d26b82826d9962d5085bc5d9df7f8a762c57602) --- lib/libc/stdlib/cxa_thread_atexit_impl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libc/stdlib/cxa_thread_atexit_impl.c b/lib/libc/stdlib/cxa_thread_atexit_impl.c index 3123bd12dca8..3d742d90fb44 100644 --- a/lib/libc/stdlib/cxa_thread_atexit_impl.c +++ b/lib/libc/stdlib/cxa_thread_atexit_impl.c @@ -119,9 +119,9 @@ walk_cb_nocall(struct cxa_thread_dtor *dtor __unused) static void cxa_thread_walk(void (*cb)(struct cxa_thread_dtor *)) { - struct cxa_thread_dtor *dtor, *tdtor; + struct cxa_thread_dtor *dtor; - LIST_FOREACH_SAFE(dtor, &dtors, entry, tdtor) { + while ((dtor = LIST_FIRST(&dtors)) != NULL) { LIST_REMOVE(dtor, entry); cb(dtor); free(dtor); From nobody Fri May 29 15:27:07 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRnK74n9tz6fhvR for ; Fri, 29 May 2026 15:27: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRnK739Gkz47RP for ; Fri, 29 May 2026 15:27:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780068427; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2svsVra9N24Y/hq6wq0SRJmJc+zemtA+6bY2OD/nMyk=; b=nTrbxvvmUIcx6dPJ2KgazTzPtPlqklh+1scoQJdkr+baFIQYEjyHLL6faCoJfxid3Epgf7 5RkV+75F7oVnIloAA9bnqoJlmNcC8szAplUmZ1dI7sKaLg3YrmiuU9ZlK7a3lMbJreJGJo 2toxGuNY1Qx4SyPgaEHHQkcS++RpezueScx9Y+bsKmEumWxmeopnLY4NjL3JpPCAcQL8Sb 61SDanyveCXUWafdIcjdjxktHZKjJ+40qhnB85VYwKaRDzDm95C5JuZLf1JLdas0pBnvdH lj7T8QWX4NshNhxpuCpcUt8+qm+7C8SsJLwWozAqr4T2+8ii9605ocDQbKgDFQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780068427; a=rsa-sha256; cv=none; b=DLO/F1eEbbVJdJdm+rTjKdOojs+qLTJXV3GpvW3UoLamKnDplhVnCtns9oXCVdVX78ffaA OGMzKQ8x9ndjB8WJorJOk5bXok78bgm2gQjLQiQ50m1dkC8BBn5u3lsqcYIlx2WuxLAYH0 9JDD1f9JCJsKbl1ZdRg5dOmZxSnt4/B+Iqy5IkZ/aOOr6Kz/VlNI0YaTVeTXvPha4B3EFN A+hdOXw+cy31C4wVhUqQ0YaRED0NNZXTBMYKoC6Vweqol4a8QcXuiMveersNaNJetLVXvZ brdidDZ38Ki2oXjr91fpoNSRUgWpA4lXYHEzNfAqoyyuxQq9ajFk92QWxyTZtA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780068427; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2svsVra9N24Y/hq6wq0SRJmJc+zemtA+6bY2OD/nMyk=; b=SYllIiN+Q40qWo6G7bywfGf/yukiOkqzDzwtgZNxatLj/HK5xio2t+IwexqO95FKbaNOr9 UbMPgko47hFrzSwSAIg5Y4osu2DsL/TAUye71lKQCu4o0d/E+7htvqBpugbKAdOteSPjJA vcp+s1If9EPkZQZ7+HM3eJlrEBkqkdfFlpLd2SLDFDrgbsXKxIZL/PmElIdtRS2y/6X/f4 /xABSCescnO4l6341H+CYdhjfXNM1r/CCPNmnvYySHJWFE5OvUvaGLuyl3p1xgGK8RibAa CrlU5EP8MI2YVn/iWSjPV2jhkNC9qASYaP3ny64XjZGJRiGh6GRLd5bcWUVEvw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRnK72j3Bzfdh for ; Fri, 29 May 2026 15:27:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31646 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 15:27:07 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: ShengYi Hung Subject: git: 661c4b1b949b - stable/14 - libc: Fix cxa_thread_atexit{,nothr} test. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: aokblast X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 661c4b1b949bef3a77a4f773d4d6977314d83533 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 15:27:07 +0000 Message-Id: <6a19b04b.31646.682c5f77@gitrepo.freebsd.org> The branch stable/14 has been updated by aokblast: URL: https://cgit.FreeBSD.org/src/commit/?id=661c4b1b949bef3a77a4f773d4d6977314d83533 commit 661c4b1b949bef3a77a4f773d4d6977314d83533 Author: ShengYi Hung AuthorDate: 2026-03-17 14:53:08 +0000 Commit: ShengYi Hung CommitDate: 2026-05-29 15:25:49 +0000 libc: Fix cxa_thread_atexit{,nothr} test. After patch 9d26b82, we don't provide recursive call protection anymore. Therefore, to pass the test, we adjust the testcase by protecting on caller and the testcase is to make sure the dtors is properly handled. Reported by: siva Reviewed by: kib Approved by: markj (mentor) Fixes: 9d26b82826d9 ("libc: Fix dtor order in __cxa_thread_atexit") MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55893 (cherry picked from commit c25976f0a9a3a102ce47b45c19b2c93e8069433b) --- lib/libc/tests/stdlib/cxa_thread_atexit_nothr_test.cc | 11 ++++++++--- lib/libc/tests/stdlib/cxa_thread_atexit_test.cc | 10 ++++++++-- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/lib/libc/tests/stdlib/cxa_thread_atexit_nothr_test.cc b/lib/libc/tests/stdlib/cxa_thread_atexit_nothr_test.cc index 0b3b9497a6bd..d70c6b1b88dc 100644 --- a/lib/libc/tests/stdlib/cxa_thread_atexit_nothr_test.cc +++ b/lib/libc/tests/stdlib/cxa_thread_atexit_nothr_test.cc @@ -30,7 +30,10 @@ #include #include +#define AGAIN_CALL_LIMIT 20 + static FILE *output = NULL; +static int again_counter = 0; struct Foo { Foo() { ATF_REQUIRE(fprintf(output, "Created\n") > 0); } @@ -79,14 +82,16 @@ extern "C" int __cxa_thread_atexit(void (*)(void *), void *, void *); static void again(void *arg) { - - __cxa_thread_atexit(again, arg, &output); + if (again_counter < AGAIN_CALL_LIMIT) { + again_counter++; + __cxa_thread_atexit(again, arg, &output); + } } ATF_TEST_CASE_WITHOUT_HEAD(cxx__thread_inf_dtors); ATF_TEST_CASE_BODY(cxx__thread_inf_dtors) { - + skip("Skip since we only have main thread"); again(NULL); } diff --git a/lib/libc/tests/stdlib/cxa_thread_atexit_test.cc b/lib/libc/tests/stdlib/cxa_thread_atexit_test.cc index 628a70b510d1..6a5587698d37 100644 --- a/lib/libc/tests/stdlib/cxa_thread_atexit_test.cc +++ b/lib/libc/tests/stdlib/cxa_thread_atexit_test.cc @@ -30,7 +30,10 @@ #include #include +#define AGAIN_CALL_LIMIT 20 + static FILE *output = NULL; +static int again_counter = 0; struct Foo { Foo() { ATF_REQUIRE(fprintf(output, "Created\n") > 0); } @@ -52,8 +55,10 @@ extern "C" int __cxa_thread_atexit(void (*)(void *), void *, void *); static void again(void *arg) { - - __cxa_thread_atexit(again, arg, &output); + if (again_counter < AGAIN_CALL_LIMIT) { + ++again_counter; + __cxa_thread_atexit(again, arg, &output); + } } struct Baz { @@ -164,6 +169,7 @@ ATF_TEST_CASE_BODY(cxx__thread_inf_dtors) std::thread t([]() { e.use(); }); t.join(); + ATF_REQUIRE_EQ(again_counter, AGAIN_CALL_LIMIT); } ATF_INIT_TEST_CASES(tcs) From nobody Fri May 29 15:27:08 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRnK86Bp8z6fhqG for ; Fri, 29 May 2026 15:27: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRnK83xhxz47Ts for ; Fri, 29 May 2026 15:27:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780068428; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j+9gba/s3FCaEW7F0W3thySXMNW1HJ113HtpnGLuUfA=; b=FOAad14wOOv6o9Ye2HTjhPoe3vIlAIhON12EWAzKfvEG3GRJrg6m9WzT2mt3Qbyjkirif3 yhTJBFIGHN+ApgABLd93H9oqaWp+KYLQOeEcGU4wHX8a3LMZxz3AF65UmoBjPtgmQMt1OR Y5KZvwzWmf3Z1SdEIXBWmSWUQddafe96xVrLY3YjTY+Rx6oTya6dNsyU92JlKwQflsn329 9g3pAgonCOjRImWbA7uTb7IM2a8OQJIUQztWTfbcpYBA2cqnk3kmq6JIpR/3LXnZ3Raltx GMddFVNFwR5ZssgK5y5U/sQnVsI840kwVp88c7KyGmj0L1um+LrBxj0vx4/k4g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780068428; a=rsa-sha256; cv=none; b=L9JdvvShO27uHcyw6wPe1WBxwTiqhvygbco5MINmDTh8zhz75EsDtK2dncC4a3MUgj9eYx 4R0nAwoXzQcspBmpssBAjorn2kbZUj01Pwo6t2mAfCzo9DtjsNPBkhwWEcA7j1NXnRoOku hmbiLDn/Lv5CotOW0uEPEtT8G/SHR2Sfafpk+hUoH1vdT1kLhjhBjIZXXY2aGheCZLZlsK 4umndmMugJGn20pzFVHtPy+eUpitf4UeFfc0TFhfqELQjODDVNW8n3BYHr7A6W4g6rg2IZ 589TecbnjkNCHgkzTb6RLjq7w12OZuI3aOJG+3M9+9TiZoj+b4TYZuPEZKHRyQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780068428; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j+9gba/s3FCaEW7F0W3thySXMNW1HJ113HtpnGLuUfA=; b=bcV+jKbd1lTgCPTOfLJ4imvZiHdSnpB4YBFmhS5huL9GAUdm6jYJl4F2xJD0LK0DREyoyz aE62PwLSbRFth0V0rI/WaCf1EhoTJzOPRHy7GHyt60VCvfjmFRgDyNyzMqKK3HJlmDEdzu iVBMI8d9p7oULRTJZPVDdMfzHi0JdJteponMDDfopAUC2vzMbsUt52etLnlQVqHUL7iyJQ jhDSlDJIPBYH3TaOdmGIvDmPEsbbh0IJrYPZshY7efsl1I2TCyqDsi5CacmXhTCjzJUwFf nENC8B+1H6WaS+KrRuEWwjT3UDyTZtSvdxSLl/Hd8jVOcz0fb912Qbsgqt2QzQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRnK83Wg9zflL for ; Fri, 29 May 2026 15:27:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31013 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 15:27:08 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: ShengYi Hung Subject: git: 187aa5183eac - stable/14 - vmm: Add missing AVX instructions for AVX512 in cpuid stdext List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: aokblast X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 187aa5183eacfa8dbfba7fc168aa80145223408d Auto-Submitted: auto-generated Date: Fri, 29 May 2026 15:27:08 +0000 Message-Id: <6a19b04c.31013.3df7e013@gitrepo.freebsd.org> The branch stable/14 has been updated by aokblast: URL: https://cgit.FreeBSD.org/src/commit/?id=187aa5183eacfa8dbfba7fc168aa80145223408d commit 187aa5183eacfa8dbfba7fc168aa80145223408d Author: ShengYi Hung AuthorDate: 2026-03-22 02:26:56 +0000 Commit: ShengYi Hung CommitDate: 2026-05-29 15:25:55 +0000 vmm: Add missing AVX instructions for AVX512 in cpuid stdext Reported by: Tom Reviewed by: markj Tested by: Tom MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56021 (cherry picked from commit e6eba5076929d0b193c9c94b2658c7e8f5da0669) --- sys/amd64/vmm/x86.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/sys/amd64/vmm/x86.c b/sys/amd64/vmm/x86.c index 00ac3c207b6f..92133196d747 100644 --- a/sys/amd64/vmm/x86.c +++ b/sys/amd64/vmm/x86.c @@ -447,10 +447,19 @@ x86_emulate_cpuid(struct vcpu *vcpu, uint64_t *rax, uint64_t *rbx, CPUID_STDEXT_AVX512ER | CPUID_STDEXT_AVX512CD | CPUID_STDEXT_SHA | CPUID_STDEXT_AVX512BW | - CPUID_STDEXT_AVX512VL; + CPUID_STDEXT_AVX512VL | + CPUID_STDEXT_AVX512IFMA; regs[2] &= CPUID_STDEXT2_VAES | - CPUID_STDEXT2_VPCLMULQDQ; - regs[3] &= CPUID_STDEXT3_MD_CLEAR; + CPUID_STDEXT2_VPCLMULQDQ | + CPUID_STDEXT2_AVX512VBMI | + CPUID_STDEXT2_AVX512VBMI2 | + CPUID_STDEXT2_AVX512VNNI | + CPUID_STDEXT2_AVX512BITALG | + CPUID_STDEXT2_AVX512VPOPCNTDQ; + regs[3] &= CPUID_STDEXT3_MD_CLEAR | + CPUID_STDEXT3_AVX5124VNNIW | + CPUID_STDEXT3_AVX5124FMAPS | + CPUID_STDEXT3_AVX512VP2INTERSECT; /* Advertise RDPID if it is enabled. */ error = vm_get_capability(vcpu, VM_CAP_RDPID, From nobody Fri May 29 15:27:02 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRnK85wXkz6fhkF for ; Fri, 29 May 2026 15:27: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRnK80kmTz47j0 for ; Fri, 29 May 2026 15:27:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780068428; 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=l5oP6HCrPAeEIlc5gngiEf3eutbBTwcMo1PqZK8QC5Q=; b=WiuX05mUmKL+ea8wHb1HjoF+ua69yo0Hc/EcOyLzOHRL7pnFO9bhTeEfwYRpxE1ofrsVRK mPXu4qAGSmN7w67BDjCzF3j0yG4hWr7a/r86lTfaIRY5Zyzw0hRvGluX0sqFAYMzPJ2VAK fiKS2LVnBfqsCB6DEPg5DpjJ50sQPrNjbXecv+fm9bNDlEfiTNMhPjUNqmmV5eArwLEHYk cX1RRF+Jg4K19FTLFsh7QuW2yWW1b3CcBA9SwtUp08QivgOfcN+e7tLZ3TULgRvnYHn7AK b5h/kzs8+qoNz4EpZQGG4DTcCxa/kI6N5aX4UUWsFNLVj+X//ttMsN3XU55B2g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780068428; a=rsa-sha256; cv=none; b=e2eCnDMOayefBrxP8qxQtQ1YRlzoXECkwTgtonybiqiAW41eFLmuUZ9v6Xtjq0gXs2f1Gl kBJ51MN/97FMTtUxeOUXpA02ylaI3kD4EtdPObxLRf/aXSRS19kAY9S5IZGpv6u8H8pboZ ARS+zHbRTXhp3MBObw+F58Low5j7slaJIFvlAMxQ/7pk7ToFO7XIXlHYQdLs3Izl6e5OI0 aOJaYkstepeZkvaNxv5vn2+mL/a7WZsEcxg1Ey9LdXEpOh76OTPEbbnyw8SMrGRgYLquJZ kf2I88d51ZF+EPAlRWXJSh8GO7kQs2+IVcUIu9Rtudb1HElmVraNo6CiRHp1aw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780068428; 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=l5oP6HCrPAeEIlc5gngiEf3eutbBTwcMo1PqZK8QC5Q=; b=bRz4C/CL9/rk5jWRVzArqiP3t070gowmrJ700osM0ft0vFjOFv86UcbPgpJOQfvvU2SmmZ 1LSSdU9DzOt3xJPW43sH2Iqn18pra6gbn0Kjk8zs1bonc7Fk5i8TX2kr9H/LRYrMRwtc7S 9POdngBg7LpVbpy1HTpoaQIU2rzWmBCmZ8/rMw5GHKJADoNQSxR0LGAq2mhQheCwmaGtMV h7rhJMB8QRmWMxI9NjJCq2AfIznMUg0F5yTd4vR5myJQqVwh5CWvLK9nLFokQt2dDpPqBA LmpZu3rURzl+Eai9b8anYZR0qy8/Eh4BSsTtTkfsbTd0h0gNpyhAtaRwXiyoRQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRnK76v72zfMB for ; Fri, 29 May 2026 15:27:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30e45 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 15:27:02 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Gisle Nes From: ShengYi Hung Subject: git: abd66d6418b6 - stable/14 - pci: use uint32_t for eecp List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: aokblast X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: abd66d6418b60e17bcf3a822a1800d0a5dc2bcd4 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 15:27:02 +0000 Message-Id: <6a19b046.30e45.78f4d929@gitrepo.freebsd.org> The branch stable/14 has been updated by aokblast: URL: https://cgit.FreeBSD.org/src/commit/?id=abd66d6418b60e17bcf3a822a1800d0a5dc2bcd4 commit abd66d6418b60e17bcf3a822a1800d0a5dc2bcd4 Author: Gisle Nes AuthorDate: 2026-04-07 16:48:15 +0000 Commit: ShengYi Hung CommitDate: 2026-05-29 15:25:00 +0000 pci: use uint32_t for eecp eecp holds the extended capability offset. If that offset is larger than 0xff, storing it in uint8_t truncates it, which can make the early EHCI/XHCI capability walk read the wrong location and loop during boot. Seen on AMD device 1022:151e, where HCCPARAMS1 = 0x0118ffc5 and the first xHCI extended capability offset is 0x460. Widen eecp to uint32_t in xhci_early_takeover(), matching xhci_pci_take_controller(). Signed-off-by: Gisle Nes Reviewed by: zlei, aokblast MFC after: 3 days Pull Request: https://github.com/freebsd/freebsd-src/pull/2127 Closes: https://github.com/freebsd/freebsd-src/pull/2127 (cherry picked from commit 555ffd9022de0c497881bafc413e3e1d05af10d4) --- sys/dev/pci/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index 0a1ea29180dd..58fdbe1703f1 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -3727,7 +3727,7 @@ xhci_early_takeover(device_t self) struct resource *res; uint32_t cparams; uint32_t eec; - uint8_t eecp; + uint32_t eecp; uint8_t bios_sem; uint8_t offs; int rid; From nobody Fri May 29 15:27:09 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRnK96p9Cz6fhvV for ; Fri, 29 May 2026 15:27: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRnK94Npgz47jG for ; Fri, 29 May 2026 15:27:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780068429; 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=mKsdvr+F8rOXverI9eIU++oN8VS0dJWgcT/sWgHPYs0=; b=Gi02WPJCauB9rBI1uVJZyJjAk8NVrn+B7RL2+JMqoI3efQJyAHckn1abacmtSOOuuej3lO QuA4Spt4MIUxua0kSjDJamF8gh+EXDEForVW/C3qmAMh1W37yVZpYaxHUA9Bw1SGp8zRvc xrUmrabWWaehCbsnndCt5JHbNNwGvW9L1jbed5VlyRYoEFWTv9ipRNnU0ABFzLr2dLUYhK YH9eKbhzXy3r1p0NusOo6YcHXp1QhNEJekHE7RL6NYIdU15BY0W9XmvQUWrNJgtT1IuRne /W1cFHoFXTtXw/ozqNgO0hiMF5cHarkCSIsLdkAp+BvhPsJhsv2UV2K+0wPcJw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780068429; a=rsa-sha256; cv=none; b=BYWSsW6tJCT7bJhSnUbUPrm788DXZJ+Z84AJPeEKrSzPh60RWYsSQxLqYENr0Dnbx00e5O Au0dSKA8anrLfAFegDCvMjSsOPRo/A1W4suiCJT05+nal+KKxE+oSfMLTONf8eFbA16Qnz OW8OMDGGZkPAZoQE353hW8ACPBRq+KF4who5jTQrwlbZM7x5RDmS22KJIlTqbQgc8WD9EY 5enrNRPyGrEve80RFaOBQW93eRJOMLo+mjAPnPXzmXKkmzCMRXMwArtiP/zkuYHRwfHJ2w TrXv+nVxOOYYkfiVImzSw/jq6Nf2pd2/Un1drvA7My3tXfiKkYtsFrpGDd/7dQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780068429; 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=mKsdvr+F8rOXverI9eIU++oN8VS0dJWgcT/sWgHPYs0=; b=b7EzZtKzlc+ZKEpbf4LV3f2DWdaITtyu+RmYJnHI/pO7I41tgV4KX9cqz2R5pS0hi1KGBt Af2yW7L5gKnmna20Bw6KeCH420rcd36cqP5aLBB1mBOoxj+B6ALyDSkTvHVIPFX0zaLv9/ pUOO2SC8FZ1d/NBeEygs9QISTX9FyYVtnuVKE5L7A7ceF9sCZ9GxQD0p8tWpQf2Bs3rCZQ AjZQhDc6eOmoDnNpyUvEH5JthiiBEM554tKylpE+OTwMu5h4N9fB6Ro35aNEhjFOsZLZMG hya/ItrT7uRETWiTs+g/8QMH9k0uePfrtSJom6NXVKq1X2WQpuSzZboZ9JUZ1A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRnK93xdgzfhy for ; Fri, 29 May 2026 15:27:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26ff6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 15:27:09 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Shunchao Hu From: ShengYi Hung Subject: git: 1ea682ec2f9e - stable/14 - compat/linprocfs: Fix auxv sbuf leak List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: aokblast X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1ea682ec2f9eead529f67205060b025b6f92cad2 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 15:27:09 +0000 Message-Id: <6a19b04d.26ff6.11ff214c@gitrepo.freebsd.org> The branch stable/14 has been updated by aokblast: URL: https://cgit.FreeBSD.org/src/commit/?id=1ea682ec2f9eead529f67205060b025b6f92cad2 commit 1ea682ec2f9eead529f67205060b025b6f92cad2 Author: Shunchao Hu AuthorDate: 2026-04-04 10:27:53 +0000 Commit: ShengYi Hung CommitDate: 2026-05-29 15:26:08 +0000 compat/linprocfs: Fix auxv sbuf leak linprocfs_doauxv() allocates an automatic sbuf before validating whether the requested read can be satisfied. When the computed auxv read length exceeds IOSIZE_MAX, or when the buffer length is too big, the function returns early without releasing the sbuf. Route these early exits through a shared cleanup path so the sbuf is always deleted after sbuf_new_auto() succeeds. Signed-off-by: Shunchao Hu Reviewed by: des, spmzt, zlei, aokblast MFC after: 2 weeks Pull Request: https://github.com/freebsd/freebsd-src/pull/2118 (cherry picked from commit 16aa49f6d1bbe70cd3e851139eb63d566de49b12) --- sys/compat/linprocfs/linprocfs.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c index 023134a9ba14..f0a7d7fd0b17 100644 --- a/sys/compat/linprocfs/linprocfs.c +++ b/sys/compat/linprocfs/linprocfs.c @@ -2028,23 +2028,26 @@ linprocfs_doauxv(PFS_FILL_ARGS) if (asb == NULL) return (ENOMEM); error = proc_getauxv(td, p, asb); - if (error == 0) - error = sbuf_finish(asb); + if (error != 0) + goto out; + error = sbuf_finish(asb); + if (error != 0) + goto out; resid = sbuf_len(asb) - uio->uio_offset; if (resid > uio->uio_resid) buflen = uio->uio_resid; else buflen = resid; - if (buflen > IOSIZE_MAX) - return (EINVAL); + if (buflen > IOSIZE_MAX) { + error = EINVAL; + goto out; + } if (buflen > maxphys) buflen = maxphys; - if (resid <= 0) - return (0); - - if (error == 0) + if (resid > 0) error = uiomove(sbuf_data(asb) + uio->uio_offset, buflen, uio); +out: sbuf_delete(asb); return (error); } From nobody Fri May 29 15:27:10 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRnKC0hsPz6fj2S for ; Fri, 29 May 2026 15:27: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRnKB5jLqz47r5 for ; Fri, 29 May 2026 15:27:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780068430; 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=Pw4bDqGWaIAd2+FuCN66eqmmZLvGtP4MDAJptfJcKUA=; b=GUBzW2lAHOGWIVvfwZzenXeypa7jAZYqi7z4USllcY95Swjgbwx/NXp/xuQHyhDECKQ1Dl e5dGbn5Oq/mlxfp/Z525ksFYN5HG1HLeCyA85svgLYGWZ56xlN99Zo+jeYJODZgIuE6P1v I4Is2GmN72+LA8Hzkj1KEz3an3UD+7Z3ylS6+Bho8sYXU1LpZjh+YTF5uL9ZhAzDoBBFhc mfhNMo97VucEy0/eaHmRnAJnbn6iZHbWZt390BZD9wy73dDqGsUu00HJQ3dxGUuuefL9cb SoRuLI/mdYcpbE5R0K6SmtSeeiNdqN8CwmreBVcuGP/uNWUQmFfRBPSbeZq41w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780068430; a=rsa-sha256; cv=none; b=MXPnSnGHGEhNWm+UA6+z5GWnX3FF1P0LSt0dQSk+SBlbpElsCNugBgz+MX5u3wbMbi4C6r zWZr/XjNhAzm9+9USStpQcuN0GjLTA/usxtLV+nDWpZfE/g4aP9i78L44iEkgJ1PGLssHL x13uRQO+vEc08ePjRbW/WUjvZFXuHO+F7F5E9KcLZKXM1mZ06bffxOnb2jqYWibx6Gxb6D ZofWivLD6ZNkJC+a2xU06LPmXAamTKxUiG/+lqnLdr9Ac17qF1gJ5iajOwf2tSRMBHPcJl w790C5b8urLoJHK5BCZAVDBNnq/3aKcCbeBY+aop2vRPaq7uQwznQ2soLBBdVw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780068430; 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=Pw4bDqGWaIAd2+FuCN66eqmmZLvGtP4MDAJptfJcKUA=; b=xLtbNADC1Cth70/jl/XVaUBtstScjHmhy1K4HvLJAgoAzM1FAakBA//cHboNBvSCEnzh/4 Uypi55L+1plCRPijuDLTeYdla2BL7vt3girwNTU1Iz5H6e9plU65w7MUNU3mBt3R/tN/O2 tZObV8u+tLmqt5DdbAel2/oQ6NCRPeLitvfJcMhLRS8UoiEjLA353XwSP3MnnnIhu7xmx3 uUzD9y7iAlMwvPC4cyz1fdckZlnvllKeVVsk/vGh4q9V3cFOjakqOFzhhBcL1SxSnik06h 7EM2AEJQb/n25YnXBesmk7tmfsKJinOk/S+DA+lttuht7IqrrHiq7lBCUb2wYw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRnKB4nhrzfnt for ; Fri, 29 May 2026 15:27:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 271e0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 15:27:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Shunchao Hu From: ShengYi Hung Subject: git: b457adfeb63f - stable/14 - compat/linprocfs: Update /proc/partitions output List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: aokblast X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b457adfeb63ff7cd6a3525a1370e7c3adc87df43 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 15:27:10 +0000 Message-Id: <6a19b04e.271e0.f604308@gitrepo.freebsd.org> The branch stable/14 has been updated by aokblast: URL: https://cgit.FreeBSD.org/src/commit/?id=b457adfeb63ff7cd6a3525a1370e7c3adc87df43 commit b457adfeb63ff7cd6a3525a1370e7c3adc87df43 Author: Shunchao Hu AuthorDate: 2026-04-07 13:07:31 +0000 Commit: ShengYi Hung CommitDate: 2026-05-29 15:26:14 +0000 compat/linprocfs: Update /proc/partitions output Linux /proc/partitions reports the major/minor pair, the device size in 1K blocks, and the device name. linprocfs still printed obsolete statistics columns and reported the size in bytes. Update linprocfs_dopartitions() to emit the Linux-style header and report provider sizes in 1K blocks. Signed-off-by: Shunchao Hu Reviewed by: des MFC after: 2 weeks Pull Request: https://github.com/freebsd/freebsd-src/pull/2126 Closes: https://github.com/freebsd/freebsd-src/pull/2126 (cherry picked from commit 5f5cc3c67ae8a4d9a27e750bef98a9ce1a6b2cf5) --- sys/compat/linprocfs/linprocfs.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c index f0a7d7fd0b17..1171e2c98342 100644 --- a/sys/compat/linprocfs/linprocfs.c +++ b/sys/compat/linprocfs/linprocfs.c @@ -661,8 +661,7 @@ linprocfs_dopartitions(PFS_FILL_ARGS) int major, minor; g_topology_lock(); - sbuf_printf(sb, "major minor #blocks name rio rmerge rsect " - "ruse wio wmerge wsect wuse running use aveq\n"); + sbuf_printf(sb, "major minor #blocks name\n\n"); LIST_FOREACH(cp, &g_classes, class) { if (strcmp(cp->name, "DISK") == 0 || @@ -674,13 +673,10 @@ linprocfs_dopartitions(PFS_FILL_ARGS) major = 0; minor = 0; } - sbuf_printf(sb, "%d %d %lld %s " - "%d %d %d %d %d " - "%d %d %d %d %d %d\n", - major, minor, - (long long)pp->mediasize, pp->name, - 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0); + sbuf_printf(sb, "%4d %7d %10lld %s\n", + major, minor, + B2K((long long)pp->mediasize), + pp->name); } } } From nobody Fri May 29 15:27:11 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRnKD11SMz6fhx6 for ; Fri, 29 May 2026 15:27: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRnKC630mz47lc for ; Fri, 29 May 2026 15:27:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780068431; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oT9Qr3Odw2ukBTB9ZDnGWynkeyW+rktY5sYzd8k/Zcc=; b=sWTpd7OSrXTBHMAifXTPWnicpsPBjySgsDOFnzGUWU5QKg8/kVN3DIC3od7IpgNofEphqg 2zRcQVGSd6Seacg+eRyYlDHamx6rhXaXu2tosUgey9viJ781HRSmb5ghPc5YynOkcf+Z/e 77wkN6mNENXv3ZcxogjHF3jazzlkyZ9gr702+j+7AC7PbdUOuGTNW0pwR7POsali53pI+f aW7n0RvWlvudBvsY6ydjkvuUXM4/jlljQNwAxRQQAqJgx7uU1f3mvjLbD1im5z3xYKgfwN ZCSmnQJJAC7jb1EfFqNwVNKfoy4fNa28BPI5XKHqfDKbylhxXfvBW77IIKuoIA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780068431; a=rsa-sha256; cv=none; b=Dmq28Jj7j60kgYfLLm9YomOPF8VX0AHeJRDOr/txi/ZtNjPorF+kaozuLMKwbMUzZ/tJIZ Dt8B4JiEvwf1ySDhjvEnLFAj1cuJT3c2iCL0W2+9TWqVJlI642JTHH5409faoEyf/k1MSw jM7cLoEuF+k74tbKTaWAh0XTbH3Fs/SfImztiYFkkTuxGGfyFJgwzVNaR4pocwrtcsB3Dj jsnqPdl4ac7mdNb+F76cndOPr3vsDFmtGUUidDadAaVe2lzRWt1+k6ATOmfGx4DaqTd4lt HjxxkkdDJzo9tbvn96+gtwkRRgakSikU0ETSKKO7ynxbf3etv4rI+H5746qREA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780068431; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oT9Qr3Odw2ukBTB9ZDnGWynkeyW+rktY5sYzd8k/Zcc=; b=NzE5F69xcoGo5Tmf9VscSn1cf6jFrL5C/SnAQhHFDEZxvOjpqyv7KfIDPe3sG4GHLBWbFR kuCZjtUw1k+LKujGl1mYaILv7MUlCrmBtjOZO7e+0I/FzGV/yZWpmrV2ARYsioQD0Hn/Qy Jxtf3C/OWnSbnmDF5k+sdAixlXeW2Oi94gyqrNBIdbO8PmQjgAMsXOseJH26J+CjFKWDn3 c2cHe1TT6r0gc5uRgwpvNfYpYt5oQirBrWgiDLsYdpZK6h+zzzl67N8k+LcnWHy1XDoKye WLnBDdpHjSZ7MqYg1ILQ7C3C0ibIQc61C8iNsyFjaefDtb4bpDhXnRxTEB0Njg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRnKC5cyFzfq1 for ; Fri, 29 May 2026 15:27:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30f26 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 15:27:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: ShengYi Hung Subject: git: 93935ced73c7 - stable/14 - libusb: fix incorrect status type when completion on cancel the events List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: aokblast X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 93935ced73c702bb85711601c957db70e81bd287 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 15:27:11 +0000 Message-Id: <6a19b04f.30f26.59a5c74b@gitrepo.freebsd.org> The branch stable/14 has been updated by aokblast: URL: https://cgit.FreeBSD.org/src/commit/?id=93935ced73c702bb85711601c957db70e81bd287 commit 93935ced73c702bb85711601c957db70e81bd287 Author: ShengYi Hung AuthorDate: 2025-08-05 09:41:17 +0000 Commit: ShengYi Hung CommitDate: 2026-05-29 15:26:31 +0000 libusb: fix incorrect status type when completion on cancel the events Reviewed by: lwhsu, markj MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51736 (cherry picked from commit 06271366982eb6fe59502fcdf95a1a22e0671d5f) --- lib/libusb/libusb10.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libusb/libusb10.c b/lib/libusb/libusb10.c index 2d55a2852c67..d90fd7f63a5a 100644 --- a/lib/libusb/libusb10.c +++ b/lib/libusb/libusb10.c @@ -1680,14 +1680,14 @@ libusb10_cancel_all_transfer_locked(struct libusb20_device *pdev, struct libusb_ if (sxfer == NULL) continue; /* complete pending transfer */ - libusb10_complete_transfer(xfer, sxfer, LIBUSB_TRANSFER_ERROR); + libusb10_complete_transfer(xfer, sxfer, LIBUSB_TRANSFER_CANCELLED); } while ((sxfer = TAILQ_FIRST(&dev->tr_head))) { TAILQ_REMOVE(&dev->tr_head, sxfer, entry); /* complete pending transfer */ - libusb10_complete_transfer(NULL, sxfer, LIBUSB_TRANSFER_ERROR); + libusb10_complete_transfer(NULL, sxfer, LIBUSB_TRANSFER_CANCELLED); } } From nobody Fri May 29 15:27:12 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRnKF3r4yz6fj50 for ; Fri, 29 May 2026 15:27:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRnKF0Kwwz47ts for ; Fri, 29 May 2026 15:27:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780068433; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gU0Zuv4/+Hu1TJP3DUMpHzY/6DD6Uj/ihVLsTu0y9NU=; b=TzpXEWck5WGpnfcdxlwyb2J3k0fK31lCF9EWVStoWg44pwaEREj7AopD64hKwH+3T5Bbda v01yg3p1EFnKPUfR0Pzao4Mq7nEmNqZUd4F/D/Fb3nkkIE8/n/zLeVSqfnV1zS0Ndt7VKj QJAhCIpM7SXW4qUdbC8dMRS+u3vd2q1HboJBiXHNif1fpgWQi9dBksg8UsvoEYnF5RhpOh yhc4PRuPUfRIVOw2VpUQ3aMtd0ZyI2ckShyf/GhfqOHJlaOyuzwxCv8eYJWPaVzx+9ON3Y adKN/tyOcbFtfhBCDCsbr+PL+M4L/wq/Oh4bSE307+3Tb4EqVoxjUGkFM/BCAQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780068433; a=rsa-sha256; cv=none; b=Jpj7lxYNUZmx2gqmd9hGw3Ju0CfYBUU6TkX5PKqmtEOWzWWES2/vDknLZtPuGf8f7Jy2ql Fewwrgss459+29fuYjaB3FvD0uFucbL/0nFd9EQgUeE0EsZuvtYrwmFlArvYQ2CKA50R0W ibhcOw5Geb/UOytCkLBoK437pY1lqjAPsbHsEXTVg4uRWJz9N0wHKPLFV0UT1+7ESxzVbn k5Z2wRECFTD/HcahxIGPWe5TvK2c7UYXTYcWks/1PktNAV75KUlYBpG/De/x8s+1OLR8Ui y6T8fbzDD12A6efY6wwptUSt7lAsi8sQ4KRosfP35KMlGoWDWzZOBu3LNIb6bQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780068433; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gU0Zuv4/+Hu1TJP3DUMpHzY/6DD6Uj/ihVLsTu0y9NU=; b=ADrelwyvx5BSJwjOxt3JwABFrHnzcfwaxx65FLhjanN6ob4i7DtnczOcEBWDeYu4RaQ3OC v/eLkBbYzC+gMr8BwgksfEj6/3Pw2rmgdgQ9SWwNMZZX6JSebEWniy/M7JvrJI1smiRjzn w2ukUF6L5jeQw+nMCK36MqAspvmaXL69k/hXvL1MM3nJH5T+cB1qu+pV69ZiyOTe/8w4aa 7L9IdZdr0B/qcKxxn8H86IOBNg9woJig2vRAKEhdVxwPJKdbetBMaXV4BxehB2hkWCjmEz xpajn6ECdX4xDqxiytWPjJ8I1uSs1Rc+6ODjf8RbJpIcVTDNfYKQuPTbq2b/qA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRnKD6T4wzfnw for ; Fri, 29 May 2026 15:27:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3118a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 15:27:12 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: ShengYi Hung Subject: git: f27c7705c6a3 - stable/14 - sound: Fix lock order reversal in dsp_poll() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: aokblast X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f27c7705c6a37a3c2fbb4bae32bb1e2cc88b86d0 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 15:27:12 +0000 Message-Id: <6a19b050.3118a.5abde7bb@gitrepo.freebsd.org> The branch stable/14 has been updated by aokblast: URL: https://cgit.FreeBSD.org/src/commit/?id=f27c7705c6a37a3c2fbb4bae32bb1e2cc88b86d0 commit f27c7705c6a37a3c2fbb4bae32bb1e2cc88b86d0 Author: ShengYi Hung AuthorDate: 2026-05-15 08:43:47 +0000 Commit: ShengYi Hung CommitDate: 2026-05-29 15:26:38 +0000 sound: Fix lock order reversal in dsp_poll() chn_poll() may hold both rdch and wrch channel locks while calling chn_trigger(rdch). chn_trigger() switches the lock order from "channel -> dsp dev" to "dsp dev -> channel" by temporarily dropping the channel lock before acquiring the dsp lock. However, only rdch was unlocked during the transition while wrch remained locked. Since wrch is also a channel lock and witness had already established the lock order requirement: dsp dev -> channel witness reports a lock order reversal when pcm_lock() is acquired while wrch is still held. Avoid holding rdch and wrch simultaneously during chn_trigger() lock-order switching by only keeping the channel locks when needed. The issue can be reliably reproduced by starting pipewire, pipewire-pulse, and pavucontrol. Reviewed by: christos MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57009 (cherry picked from commit 776584319fb4d66cdb1c2f91bed154dfe6a74e5e) --- sys/dev/sound/pcm/dsp.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index fe5576baf017..1856a348ac12 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -1908,24 +1908,25 @@ dsp_poll(struct cdev *i_dev, int events, struct thread *td) ret = 0; - dsp_lock_chans(priv, FREAD | FWRITE); wrch = priv->wrch; rdch = priv->rdch; if (wrch != NULL && !(wrch->flags & CHN_F_DEAD)) { + CHN_LOCK(wrch); e = (events & (POLLOUT | POLLWRNORM)); if (e) ret |= chn_poll(wrch, e, td); + CHN_UNLOCK(wrch); } if (rdch != NULL && !(rdch->flags & CHN_F_DEAD)) { + CHN_LOCK(rdch); e = (events & (POLLIN | POLLRDNORM)); if (e) ret |= chn_poll(rdch, e, td); + CHN_UNLOCK(rdch); } - dsp_unlock_chans(priv, FREAD | FWRITE); - PCM_GIANT_LEAVE(d); return (ret); From nobody Fri May 29 16:01:26 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRp4l0ZtVz6flDb for ; Fri, 29 May 2026 16:01: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRp4k575Kz3Gss for ; Fri, 29 May 2026 16: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=1780070486; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o+875Bvb4vZn5aG2lYgEBAfdoV3e2f9XGY8LV6wRqfc=; b=IrPE4feeHSD2DZgBWEaeoSW8NqCUA6eh+hKcj9oW+N2iNEit/lzo6SbJOWY0V7ccHSvkDb ScO0w0akS5Iir5KNCrpL50mL4l5UQ80BVOg798Z4SaTkQEOjV9rtpfTam4PGKHlyHIOEl6 Tkl+4LkqcZ3xEViiJDUgU+H1iPUS+GAXexkXPSk+2ciwkhbVg2Lu/w2+3NHI8S+uZwcipL azIhVR15DPo5mOtowYc3VyrJdZW4ZqUxDfMbXFS0CmlntLUOJ4TzTG9Amc6v32yP7RChYu Lsa5lawziTdRKH5YZfPEV9oYXO1lKvz10BI4+bz5arp4m3kUFUXSzBy8v/87PQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780070486; a=rsa-sha256; cv=none; b=GF2coefEVg0rrpvm+VullTQKiSYa64nG9HkeuyDgjcKBgFLdzKNRnXrCP73iqLx6PDlKcW wLm/dBAOawxF0GtQQbcawDNMVw6Paf/AOJwgcEO1eXXEoTtWcbfjpsC38Yb58jKjQR0HiI KlSPEFJJqh/86qp8Urpbzn7MHxv2ncNxesUm0d9ij6HAYnE1Qt0vRy0CPmRENZ8csU4ejT piPUyBttsXipeFolMOqKlX11a18xbL3lIb6Q3EQ8jhumudXTINvO99D4Vhqi0admj3KVOL c3kBc4pJCPCC2oc+86gJn4DdomXHxeLh1lCLRvvz2/4cXMEjLv6AZi+125ML7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070486; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o+875Bvb4vZn5aG2lYgEBAfdoV3e2f9XGY8LV6wRqfc=; b=KCSBvb7FjZBpg15frTnVNH1PZxSIaVnW1D1SRrNhgMwvY0ct8mKIcSUSFiRhCGmPVuRm99 xFf86XzOqqTfudWnJAJikJVwLjmIPmtPO9BbSpAnFbD/fbg/K42RrB72iR3svqyVTTpjAX kOJnrMNQYjCDNZASJVdJqxRb9H+HT6wg0rknbalu8KnLsUG3J297MnDZtkln43Ji81ZZ6P tQn/ymNnK9M/roKr2Xq7k4Qc+RNkU0YvA80hmFcp/wwH/L3XtSEXlOselSNqLdOX06o3GG qXahIf6JSF4iasAEiKYeXAWpp3+wljtxQYahK5Vpumhc0DTpA6gLz1eLrzMY+Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRp4k4QPSzgc3 for ; Fri, 29 May 2026 16:01:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35e14 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 16:01:26 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 3e17f37c2cd2 - main - MAC/do: Update copyright List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3e17f37c2cd2064c5db3fb63fad57f40e4e334fa Auto-Submitted: auto-generated Date: Fri, 29 May 2026 16:01:26 +0000 Message-Id: <6a19b856.35e14.9688c1d@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=3e17f37c2cd2064c5db3fb63fad57f40e4e334fa commit 3e17f37c2cd2064c5db3fb63fad57f40e4e334fa Author: Olivier Certner AuthorDate: 2026-05-20 11:41:07 +0000 Commit: Olivier Certner CommitDate: 2026-05-29 15:13:07 +0000 MAC/do: Update copyright Add Kushagra to account for the commit adding the "executable paths" feature. Reviewed by: bapt MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38 --- sys/security/mac_do/mac_do.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/security/mac_do/mac_do.c b/sys/security/mac_do/mac_do.c index b63fc2a5bbc8..5c184273595a 100644 --- a/sys/security/mac_do/mac_do.c +++ b/sys/security/mac_do/mac_do.c @@ -3,6 +3,7 @@ * * Copyright(c) 2024 Baptiste Daroussin * Copyright (c) 2024 The FreeBSD Foundation + * Copyright (c) 2025 Kushagra Srivastava * * Portions of this software were developed by Olivier Certner * at Kumacom SARL under sponsorship from the FreeBSD From nobody Fri May 29 16:01:27 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRp4m1NXQz6fl4w for ; Fri, 29 May 2026 16: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRp4l5V3wz3GyC for ; Fri, 29 May 2026 16: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=1780070487; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aE4Ee4YClW8PgSXT+LpA1zHRiJCM7d2rcjkXt/ySXqc=; b=mYGbazNDoY8JzEUDBM9Holvem643OaZDq8LTgQsbp+nK+0qwfCVnTHJyLCdmVlix9zYrf+ y929rfrE3/1bsQxWY+R/FPg4wkt+nUaGcaNRntXoHwVxN5x0g61lG07r0GF9ULnIA6QPkm 6SY5Kp2NPM0Cx+lkdzrz+aXtyxnETGHhO5WUN8Roa1JX+dTDPDW4gRZwQ6hqe8tArv1G9X B0MGO45l2m/MW1iol3tqq0rm9XuBPioa6/6Wiy+WdpDmH36Inkc0GXlUWBXhtCphFvL2wJ 97/ltp6lGeis8QeL40FmEcCJOUvld+CJTe7xTybVAxAJjPRZaQaO22a/ggTM+w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780070487; a=rsa-sha256; cv=none; b=CZtg3OubK1Md/B8N5Iqj4oj0gwk1SV8ElYrYTI1p4C7Cu1Fw95D/ZFPVaKN9tHBaNeWGvg rAX3fDXimWIZq/HPWESoyr0MQptbSAMtYBwnYPGpCh7P/T7ljFJI+XMwzVuCOL9UeFaAec yRdNaK/7E0MfhjkatsRE2jU1zpIHtbr+5jzEDt9vUwYXvbwhO4KIdJOLCiT9nwOHMEYIrr OnUyBVhJQaVWNLN0EQxStpP67UAmaClV7vDyIpRuohFduMjqsvxPFSOOWanLEjgpK25dop M5ysrMJ66qHwlw1KmLiwoOcQ6YfC92GltKF07Y75xBqq28iesm538xhoPGPvcg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070487; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aE4Ee4YClW8PgSXT+LpA1zHRiJCM7d2rcjkXt/ySXqc=; b=hc2loMhnAKNtw8+qb2HvHAm+VZ144RXrSMsjlS05yZPlg8VubJ98YOySZm7EjXaEEZ9fsE gbS0uBT4ZLfubPTchZh9lIs4/aMTNH9HZLSz74JAeVRi8q5J7xlOT6GBfjsObO/y3RM9kt kiqHLvO3fYl/2Ij9NZWOSVzr958+Fkfpgef5kOaEOz/tfDzSeUkhxasOvjivH53Fm/9ZSv bMOL/rXymiDmjI0oera2BbomMBRn/ghzSXAEI7Gbn++Xa27pTFlrKQsfTu+i5lsL+LaU9C SoHcqQE8NOn46XPFy4gg53to9k18949fHyf9lurUtaKFgBNK7ARAsCaiJaJsiQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRp4l55BTzgrd for ; Fri, 29 May 2026 16:01:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 34039 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 16:01:27 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: f93cd891aefd - main - MAC/do: Make it style(9) compliant again List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f93cd891aefd839da869dcdb450d00050d5e701e Auto-Submitted: auto-generated Date: Fri, 29 May 2026 16:01:27 +0000 Message-Id: <6a19b857.34039.3f229724@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=f93cd891aefd839da869dcdb450d00050d5e701e commit f93cd891aefd839da869dcdb450d00050d5e701e Author: Olivier Certner AuthorDate: 2026-03-23 11:45:17 +0000 Commit: Olivier Certner CommitDate: 2026-05-29 15:14:14 +0000 MAC/do: Make it style(9) compliant again Fix too long lines, declarations not at head of block, improper indentation and superfluous whitespace coming from the previous commit introducing the configurable executable paths feature. While here, fix some older improper comment formatting. Reviewed by: bapt Fixes: 6c3def74e2de ("MAC/do: Support multiple users and groups as single rule's targets") Fixes: 9818224174c4 ("MAC/do: Executable paths feature (GSoC 2025's final state)") MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38 --- sys/security/mac_do/mac_do.c | 166 +++++++++++++++++++++++++------------------ 1 file changed, 96 insertions(+), 70 deletions(-) diff --git a/sys/security/mac_do/mac_do.c b/sys/security/mac_do/mac_do.c index 5c184273595a..c889b218cad3 100644 --- a/sys/security/mac_do/mac_do.c +++ b/sys/security/mac_do/mac_do.c @@ -127,11 +127,15 @@ typedef uint16_t flags_t; #define MDF_MAY_REJ_SUPP (1u << 11) /* (t,gid) Some explicit ID (not MDF_CURRENT) has MDF_SUPP_MUST. */ #define MDF_EXPLICIT_SUPP_MUST (1u << 12) -/* (t,gid) Whether any target clause is about primary groups. Used during - * parsing only. */ +/* + * (t,gid) Whether any target clause is about primary groups. Used during + * parsing only. + */ #define MDF_HAS_PRIMARY_CLAUSE (1u << 13) -/* (t,gid) Whether any target clause is about supplementary groups. Used during - * parsing only. */ +/* + * (t,gid) Whether any target clause is about supplementary groups. Used during + * parsing only. + */ #define MDF_HAS_SUPP_CLAUSE (1u << 14) #define MDF_TYPE_GID_MASK (MDF_ANY_SUPP | MDF_MAY_REJ_SUPP | \ MDF_EXPLICIT_SUPP_MUST | MDF_HAS_PRIMARY_CLAUSE | MDF_HAS_SUPP_CLAUSE) @@ -236,7 +240,7 @@ check_type_and_id_flags(const id_type_t type, const flags_t flags) } break; default: - __assert_unreachable(); + __assert_unreachable(); } return; @@ -359,7 +363,8 @@ init_exec_paths(struct exec_paths *const exec_paths) static struct conf * alloc_conf(void) { - struct conf *const conf = malloc(sizeof(*conf), M_MAC_DO, M_WAITOK | M_ZERO); + struct conf *const conf = malloc(sizeof(*conf), M_MAC_DO, M_WAITOK | + M_ZERO); init_rules(&conf->rules); init_exec_paths(&conf->exec_paths); @@ -463,7 +468,8 @@ static void make_parse_error(struct parse_error **const parse_error, const size_t pos, const char *const fmt, ...) { - struct parse_error *const err = malloc(sizeof(*err), M_MAC_DO, M_WAITOK); + struct parse_error *const err = malloc(sizeof(*err), M_MAC_DO, + M_WAITOK); va_list ap; err->pos = pos; @@ -1079,7 +1085,7 @@ out: static int parse_exec_paths(const char *const string, struct exec_paths *const exec_paths, - struct parse_error **const parse_error) + struct parse_error **const parse_error) { const size_t len = strlen(string); char *copy, *p, *path; @@ -1089,8 +1095,8 @@ parse_exec_paths(const char *const string, struct exec_paths *const exec_paths, if (len >= EXEC_PATHS_MAXLEN) { make_parse_error(parse_error, 0, - "Exec path specification string is too long (%zu, max %u)", - len, EXEC_PATHS_MAXLEN - 1); + "Exec path specification string is too long (%zu, max %u)", + len, EXEC_PATHS_MAXLEN - 1); return (ENAMETOOLONG); } @@ -1103,26 +1109,30 @@ parse_exec_paths(const char *const string, struct exec_paths *const exec_paths, p = copy; while ((path = strsep_noblanks(&p, ":")) != NULL) { + size_t path_len; + if (*path == '\0') continue; if (exec_paths->exec_path_count >= MAX_EXEC_PATHS) { make_parse_error(parse_error, path - copy, - "Too many exec paths specified (max %d)", MAX_EXEC_PATHS); + "Too many exec paths specified (max %d)", + MAX_EXEC_PATHS); error = EINVAL; goto out; } - const size_t path_len = strlen(path); + path_len = strlen(path); if (path_len >= PATH_MAX) { make_parse_error(parse_error, path - copy, - "Exec paths too long (%zu, max %u)", - path_len, PATH_MAX - 1); + "Exec paths too long (%zu, max %u)", + path_len, PATH_MAX - 1); error = ENAMETOOLONG; goto out; } - strlcpy(exec_paths->exec_paths[exec_paths->exec_path_count], path, PATH_MAX); + strlcpy(exec_paths->exec_paths[exec_paths->exec_path_count], + path, PATH_MAX); exec_paths->exec_path_count++; } @@ -1287,7 +1297,8 @@ set_default_conf(struct prison *const pr) { struct conf *const conf = alloc_conf(); - strlcpy(conf->exec_paths.exec_paths_str, "/usr/bin/mdo", EXEC_PATHS_MAXLEN); + strlcpy(conf->exec_paths.exec_paths_str, "/usr/bin/mdo", + EXEC_PATHS_MAXLEN); strlcpy(conf->exec_paths.exec_paths[0], "/usr/bin/mdo", PATH_MAX); conf->exec_paths.exec_path_count = 1; @@ -1310,19 +1321,20 @@ clone_rules(struct rules *dst, struct rules *const src) STAILQ_INIT(&dst->head); STAILQ_FOREACH(src_rule, &src->head, r_entries) { - dst_rule = malloc(sizeof(*dst_rule), M_MAC_DO, M_WAITOK | M_ZERO); + dst_rule = malloc(sizeof(*dst_rule), M_MAC_DO, M_WAITOK | + M_ZERO); bcopy(src_rule, dst_rule, sizeof(*dst_rule)); if (src_rule->uids_nb > 0) { - dst_rule->uids = malloc(sizeof(*dst_rule->uids) * src_rule->uids_nb, - M_MAC_DO, M_WAITOK); + dst_rule->uids = malloc(sizeof(*dst_rule->uids) * + src_rule->uids_nb, M_MAC_DO, M_WAITOK); bcopy(src_rule->uids, dst_rule->uids, sizeof(*dst_rule->uids) * src_rule->uids_nb); } if (src_rule->gids_nb > 0) { - dst_rule->gids = malloc(sizeof(*dst_rule->gids) * src_rule->gids_nb, - M_MAC_DO, M_WAITOK); + dst_rule->gids = malloc(sizeof(*dst_rule->gids) * + src_rule->gids_nb, M_MAC_DO, M_WAITOK); bcopy(src_rule->gids, dst_rule->gids, sizeof(*dst_rule->gids) * src_rule->gids_nb); } @@ -1336,18 +1348,17 @@ clone_exec_paths(struct exec_paths *dst, struct exec_paths *const src) { bzero(dst, sizeof(*dst)); dst->exec_path_count = src->exec_path_count; - for (int i = 0; i < src->exec_path_count; i++) { + for (int i = 0; i < src->exec_path_count; i++) strlcpy(dst->exec_paths[i], src->exec_paths[i], - sizeof(dst->exec_paths[i])); - } + sizeof(dst->exec_paths[i])); strlcpy(dst->exec_paths_str, src->exec_paths_str, - sizeof(dst->exec_paths_str)); + sizeof(dst->exec_paths_str)); } -static int -parse_and_set_conf(struct prison *pr, const char *rules_string, - const char *exec_paths_string, struct parse_error **parse_error) +static int +parse_and_set_conf(struct prison *pr, const char *rules_string, + const char *exec_paths_string, struct parse_error **parse_error) { struct prison *ppr = NULL; struct conf *applicable_conf = NULL; @@ -1358,7 +1369,7 @@ parse_and_set_conf(struct prison *pr, const char *rules_string, *parse_error = NULL; need_applicable_conf = (rules_string == NULL || rules_string[0] == '\0' || - exec_paths_string == NULL || exec_paths_string[0] == '\0'); + exec_paths_string == NULL || exec_paths_string[0] == '\0'); if (need_applicable_conf) { applicable_conf = find_conf(pr, &ppr); @@ -1377,11 +1388,13 @@ parse_and_set_conf(struct prison *pr, const char *rules_string, clone_rules(&conf->rules, &applicable_conf->rules); if (exec_paths_string != NULL && exec_paths_string[0] != '\0') { - error = parse_exec_paths(exec_paths_string, &conf->exec_paths, parse_error); + error = parse_exec_paths(exec_paths_string, &conf->exec_paths, + parse_error); if (error != 0) goto out; } else if (applicable_conf != NULL) - clone_exec_paths(&conf->exec_paths, &applicable_conf->exec_paths); + clone_exec_paths(&conf->exec_paths, + &applicable_conf->exec_paths); set_conf(pr, conf); @@ -1468,12 +1481,12 @@ out: } SYSCTL_PROC(_security_mac_do, OID_AUTO, exec_paths, - CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_PRISON | CTLFLAG_MPSAFE, - 0, 0, mac_do_sysctl_exec_paths, "A", - "Colon-separated list of allowed executables"); + CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_PRISON | CTLFLAG_MPSAFE, + 0, 0, mac_do_sysctl_exec_paths, "A", + "Colon-separated list of allowed executables"); -SYSCTL_JAIL_PARAM_STRING(_mac_do, exec_paths, CTLFLAG_RW, EXEC_PATHS_MAXLEN, - "Jail MAC/do executable paths"); +SYSCTL_JAIL_PARAM_STRING(_mac_do, exec_paths, CTLFLAG_RW, EXEC_PATHS_MAXLEN, + "Jail MAC/do executable paths"); static int mac_do_jail_create(void *obj, void *data) @@ -1510,7 +1523,8 @@ mac_do_jail_get(void *obj, void *data) if (error != 0 && error != ENOENT) goto done; - error = vfs_setopts(opts, "mac.do.exec_paths", exec_paths->exec_paths_str); + error = vfs_setopts(opts, "mac.do.exec_paths", + exec_paths->exec_paths_str); if (error != 0 && error != ENOENT) goto done; @@ -1531,7 +1545,6 @@ _Static_assert(-1 != JAIL_SYS_DISABLE && -1 != JAIL_SYS_NEW && * We perform only cheap checks here, i.e., we do not really parse the rules * specification string, if any. */ - static int mac_do_jail_check(void *obj, void *data) { @@ -1558,14 +1571,17 @@ mac_do_jail_check(void *obj, void *data) * jail_set() calls vfs_getopts() itself later (they becoming * inconsistent wouldn't cause any security problem). */ - error = vfs_getopt(opts, "mac.do.rules", (void **)&rules_string, &rules_len); + + error = vfs_getopt(opts, "mac.do.rules", (void **)&rules_string, + &rules_len); if (error == ENOENT) rules_string = NULL; else { if (error != 0) return (error); if (rules_len == 0 || rules_string[rules_len - 1] != '\0') { - vfs_opterror(opts, "'mac.do.rules' not a proper string"); + vfs_opterror(opts, + "'mac.do.rules' not a proper string"); return (EINVAL); } if (rules_len > MAC_RULE_STRING_LEN) { @@ -1575,14 +1591,17 @@ mac_do_jail_check(void *obj, void *data) } /* Handle 'exec_paths' input */ - error = vfs_getopt(opts, "mac.do.exec_paths", (void **)&exec_paths_string, &exec_paths_len); + error = vfs_getopt(opts, "mac.do.exec_paths", + (void **)&exec_paths_string, &exec_paths_len); if (error == ENOENT) exec_paths_string = NULL; else { if (error != 0) return (error); - if (exec_paths_len == 0 || exec_paths_string[exec_paths_len - 1] != '\0') { - vfs_opterror(opts, "'mac.do.exec_paths' not a proper string"); + if (exec_paths_len == 0 || + exec_paths_string[exec_paths_len - 1] != '\0') { + vfs_opterror(opts, + "'mac.do.exec_paths' not a proper string"); return (EINVAL); } if (exec_paths_len > EXEC_PATHS_MAXLEN) { @@ -1592,12 +1611,13 @@ mac_do_jail_check(void *obj, void *data) } /* - * Be liberal, considering that an empty rule or exec paths specification - * is equivalent to no specification. - * This affects the JAIL_SYS_DISABLE and JAIL_SYS_INHERIT sanity checks below. + * Be liberal, considering that an empty rule or exec paths + * specification is equivalent to no specification. This affects the + * JAIL_SYS_DISABLE and JAIL_SYS_INHERIT sanity checks below. */ - has_rules = rules_string && rules_string[0] != '\0'; - has_exec_paths = exec_paths_string && exec_paths_string[0] != '\0'; + has_rules = rules_string != NULL && rules_string[0] != '\0'; + has_exec_paths = exec_paths_string != NULL && + exec_paths_string[0] != '\0'; /* Infer 'jsys' if needed */ if (jsys == -1) { @@ -1612,18 +1632,23 @@ mac_do_jail_check(void *obj, void *data) case JAIL_SYS_DISABLE: case JAIL_SYS_INHERIT: if (has_rules) { - vfs_opterror(opts, "'mac.do.rules' specified but should not be when mac.do is disabled or inherited"); + vfs_opterror(opts, + "'mac.do.rules' specified but should not be when " + "'mac.do' is 'disabled' or 'inherited'"); return (EINVAL); } if (has_exec_paths) { - vfs_opterror(opts, "'mac.do.exec_paths' specified but should not be when mac.do is disabled or inherited"); + vfs_opterror(opts, + "'mac.do.exec_paths' specified but should not be " + "when 'mac.do' is 'disabled' or 'inherited'"); return (EINVAL); } break; case JAIL_SYS_NEW: if (!has_rules && !has_exec_paths) { - vfs_opterror(opts, "mac.do set to 'new' but neither rules nor exec_paths specified"); + vfs_opterror(opts, "'mac.do' set to 'new' but neither " + "rules nor executable paths specified"); return (EINVAL); } /* Allow: rules only, exec_paths only (though exec_paths only is discouraged), or both */ @@ -1661,8 +1686,9 @@ mac_do_jail_set(void *obj, void *data) exec_paths_string = vfs_getopts(opts, "mac.do.exec_paths", &error); MPASS(error == 0 || error == ENOENT); - has_rules = (rules_string != NULL && rules_string[0] != '\0'); - has_exec_paths = (exec_paths_string != NULL && exec_paths_string[0] != '\0'); + has_rules = rules_string != NULL && rules_string[0] != '\0'; + has_exec_paths = exec_paths_string != NULL && + exec_paths_string[0] != '\0'; if (jsys == -1) { if (has_rules || has_exec_paths) @@ -1683,14 +1709,15 @@ mac_do_jail_set(void *obj, void *data) case JAIL_SYS_NEW: error = parse_and_set_conf(pr, - has_rules ? rules_string : NULL, - has_exec_paths ? exec_paths_string : NULL, - &parse_error); + has_rules ? rules_string : NULL, + has_exec_paths ? exec_paths_string : NULL, + &parse_error); if (error != 0) { if (parse_error != NULL) { - vfs_opterror(opts, "MAC/do: Parse error at index %zu: %s\n", - parse_error->pos, parse_error->msg); + vfs_opterror(opts, + "MAC/do: Parse error at index %zu: %s\n", + parse_error->pos, parse_error->msg); free_parse_error(parse_error); } @@ -1737,8 +1764,8 @@ struct mac_do_data_header { * indicates this header is uninitialized. */ int priv; - /* Rules to apply. */ - struct conf *conf; + /* The configuration that applies. */ + struct conf *conf; }; /* @@ -2233,7 +2260,11 @@ static int check_proc(void) { char *path, *to_free; - int error = EPERM; + struct conf *conf; + struct exec_paths *exec_paths; + struct prison *td_pr; + struct prison *pr; + int error; /* * Only grant privileges if requested by the right executable. @@ -2256,22 +2287,17 @@ check_proc(void) if (vn_fullpath_jail(curproc->p_textvp, &path, &to_free) != 0) return (EPERM); - struct conf *conf; - struct exec_paths *exec_paths; - struct prison *td_pr = curproc->p_ucred->cr_prison; - struct prison *pr; + error = EPERM; + td_pr = curproc->p_ucred->cr_prison; conf = find_conf(td_pr, &pr); exec_paths = &conf->exec_paths; - if (exec_paths->exec_path_count > 0) { - for (int i = 0; i < exec_paths->exec_path_count; i++) { + if (exec_paths->exec_path_count > 0) + for (int i = 0; i < exec_paths->exec_path_count; i++) if (strcmp(exec_paths->exec_paths[i], path) == 0) { error = 0; break; } - } - - } prison_unlock(pr); From nobody Fri May 29 16:01:28 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRp4n12wlz6fl51 for ; Fri, 29 May 2026 16: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRp4m6fVWz3HMW for ; Fri, 29 May 2026 16: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=1780070488; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GHuNrB9IED8E69C7dO7dDnJGbN0Zved4vz95VVp+uZg=; b=IITYbqFSkXEkAXa3/OmgG9MWJ6BUG9Op69GEyyI54T2eva9NKsXBZCzBWDeguSWvUWhvV1 FRvNs5CnPC5SuhymIw2irVhiJbm/TSNB7oYnHdWytex2wnhnHLre32pxBZixWG/N9JSW9n HMXsC2c7uZNTugrrMY5IY7/E1POgFpxC7LZ04uz0kh/oeXRcpmh89tU2Ib1R82awA/+3tN xgaKi1OaExsZVP7He7Ns8zo9YS2YwLjwtjKa0TTJcjID+bITPws5D9/N7tInhkv5PUJtXo cHKPLJai/b1L1ZL56A4j9BAhpYa791lhq/7pa02wkcLR9014HhWZPZm3f7ndcA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780070489; a=rsa-sha256; cv=none; b=TWa+aNUKOY+KGyJEAmVz8nQ8OMUhrKtcGWQpso26FwmekWOQqNL7eXRNQnB7ndo26aHcy3 f/PC2OAz4gM83L9Ke8x8EwPXkMzrO8O0XDhfiaff7HBrMFVSpZuR+uo92fYIn+ZgwscdmW zdR+Svzu9jnFJ9GKgZULDhL8z7+CQPxY2bcq1TBIrgEwytxv6T3ZvwFyBMhGA71HfoIJkK M1Z1/0Dhw74+zC0c+1+wgPj96mYE+jFRYp9GfVQFSWgJqUen1x9p26KejOWKAvX78GpLrL 2HvQD21Dd8bLt7kAscAK1/8Wvefb4cL+g0mre82u2cFQUnXaWbxYV79SPSUbmw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070488; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GHuNrB9IED8E69C7dO7dDnJGbN0Zved4vz95VVp+uZg=; b=o62nyLdaZU9DNkxcHyGopvmQ2RvYR69Z/4OgKy6HTt0bkgrM76VIj+B+eCpAH85dIyn7NU ntDQ1fPytNuFvD3Y3KfwsqnnfOYxvTWfZA82lBAkLE4J1tEPCei0zu7CLiPRUCMIcL7xU8 S5QO9/Y6oHcfHBXweTOaF6J1zht5bPeWWxygvalMvJsIed7Jnoo1hJaY/H7rxHOOFnQa6K TCmzMwSlPomcMch9VorXTWEfrEQwb7kz5c918ydgFlpLFgooBUjH6Ob50aNGYa+c37e1T9 PVnfadiUPyHR7T94n/1lW8CPLNHVs8aNC1d6hcjvSSXlrTRlGeyVXKr0Uky28g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRp4m5swBzgQp for ; Fri, 29 May 2026 16:01:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35df2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 16:01:28 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 782533882441 - main - MAC/do: Fix recently-introduced comments List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7825338824415153fe29bec30c1d5c1e5fcb638b Auto-Submitted: auto-generated Date: Fri, 29 May 2026 16:01:28 +0000 Message-Id: <6a19b858.35df2.54cb400e@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=7825338824415153fe29bec30c1d5c1e5fcb638b commit 7825338824415153fe29bec30c1d5c1e5fcb638b Author: Olivier Certner AuthorDate: 2026-03-23 13:13:22 +0000 Commit: Olivier Certner CommitDate: 2026-05-29 15:15:23 +0000 MAC/do: Fix recently-introduced comments Reviewed by: bapt Fixes: 9818224174c4 ("MAC/do: Executable paths feature (GSoC 2025's final state)") MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38 --- sys/security/mac_do/mac_do.c | 39 +++++++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/sys/security/mac_do/mac_do.c b/sys/security/mac_do/mac_do.c index c889b218cad3..2258c358ce92 100644 --- a/sys/security/mac_do/mac_do.c +++ b/sys/security/mac_do/mac_do.c @@ -344,7 +344,7 @@ toast_rules(struct rules *const rules) } } -/* Assuming storage is zeroed already */ +/* Assumes storage has been zeroed. */ static void init_rules(struct rules *const rules) { @@ -1148,12 +1148,13 @@ out: } /* - * Find conf applicable to the passed prison. + * Find configuration applicable to the passed prison. * - * Returns the applicable conf (and never NULL). 'pr' must be unlocked. - * 'aprp' is set to the (ancestor) prison holding these, and it must be unlocked - * once the caller is done accessing the conf. '*aprp' is equal to 'pr' if and - * only if the current jail has its own set of conf. + * Returns the applicable configuration (and never NULL). 'pr' must be + * unlocked. 'aprp' is set to the (ancestor) prison holding these, and it must + * be unlocked once the caller is done accessing the configuration. '*aprp' is + * equal to 'pr' if and only if the current jail has its own specific + * configuration. */ static struct conf * find_conf(struct prison *const pr, struct prison **const aprp) @@ -1272,6 +1273,9 @@ remove_conf(struct prison *const pr) drop_conf(old_conf); } +/* + * Assign an already-built configuration to a jail. + */ static void set_conf(struct prison *const pr, struct conf *const conf) { @@ -1290,7 +1294,7 @@ set_conf(struct prison *const pr, struct conf *const conf) } /* - * Assigns default conf to a jail. + * Assigns the default configuration to a jail. */ static void set_default_conf(struct prison *const pr) @@ -1553,9 +1557,12 @@ mac_do_jail_check(void *obj, void *data) int error, jsys, rules_len = 0, exec_paths_len = 0; bool has_rules, has_exec_paths; - /* Mark unspecified */ error = vfs_copyopt(opts, "mac.do", &jsys, sizeof(jsys)); if (error == ENOENT) + /* + * Mark unspecified. Will fill it up below depending on the + * other options. + */ jsys = -1; else { if (error != 0) @@ -1566,12 +1573,13 @@ mac_do_jail_check(void *obj, void *data) } /* - * We use vfs_getopt() here instead of vfs_getopts() to get the length. + * We use vfs_getopt() below instead of vfs_getopts() to get the length. * We perform the additional checks done by the latter here, even if * jail_set() calls vfs_getopts() itself later (they becoming * inconsistent wouldn't cause any security problem). */ + /* Rules. */ error = vfs_getopt(opts, "mac.do.rules", (void **)&rules_string, &rules_len); if (error == ENOENT) @@ -1590,7 +1598,7 @@ mac_do_jail_check(void *obj, void *data) } } - /* Handle 'exec_paths' input */ + /* Executable paths. */ error = vfs_getopt(opts, "mac.do.exec_paths", (void **)&exec_paths_string, &exec_paths_len); if (error == ENOENT) @@ -1611,7 +1619,7 @@ mac_do_jail_check(void *obj, void *data) } /* - * Be liberal, considering that an empty rule or exec paths + * Be liberal, considering that an empty rule or execution paths * specification is equivalent to no specification. This affects the * JAIL_SYS_DISABLE and JAIL_SYS_INHERIT sanity checks below. */ @@ -1619,15 +1627,19 @@ mac_do_jail_check(void *obj, void *data) has_exec_paths = exec_paths_string != NULL && exec_paths_string[0] != '\0'; - /* Infer 'jsys' if needed */ + /* If not specified, infer 'jsys' from passed options. */ if (jsys == -1) { + /* + * Default in absence of "mac.do.rules" and "mac.do.exec_paths" + * is to disable (and, in particular, not inherit). + */ if (has_rules || has_exec_paths) jsys = JAIL_SYS_NEW; else jsys = JAIL_SYS_DISABLE; } - /* Final checks based on resolved 'jsys' */ + /* Final checks based on resolved 'jsys'. */ switch (jsys) { case JAIL_SYS_DISABLE: case JAIL_SYS_INHERIT: @@ -1651,7 +1663,6 @@ mac_do_jail_check(void *obj, void *data) "rules nor executable paths specified"); return (EINVAL); } - /* Allow: rules only, exec_paths only (though exec_paths only is discouraged), or both */ break; default: From nobody Fri May 29 16:01:29 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRp4p5yLXz6flMZ for ; Fri, 29 May 2026 16:01:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRp4p0rLbz3H1s for ; Fri, 29 May 2026 16: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=1780070490; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CDjs0osB7HaWYWLgKCY/Wa309nnPvr/MmelH3wXKFdE=; b=vi1AAJ6491S+7nSc5FbgFKj0XBW8/MG7fH8+QBQ1Ft2dMw5Oe7NDmuwSOlRO5iBT3+kmHX e6zb3TyFRirLnS6CzJzUX2gaySKrvWlVrDkv5XjfKW+9KcboWVx6BY8UmhhS6udfRlH5W5 1qeBoVeH0deZYelv2/2fKp5i9AieWZiMWPtNTqfceXie++Yr4NOL/Hy10IdMJrAjEtklqY 0zMODEEBo8PZ5MUltQXVz+b0IeCeaJGgrlLLVKQIX0xhcTAKSvFjMV2bDHJB54l/vzY2Nf xxQBwml6clkx8od/BHezT+E6MYI1B5sbCX1AzJ4lmXWWzMRl6jVdy29MSjS57g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780070490; a=rsa-sha256; cv=none; b=Hl2kLIbg9Q6pN7/i+fTWb2YL9rYqsGWbYUuWucjvsx2HyC040rBGitkLyIKWGT7JTuD5gi R7nbQvalmTGVD8O1p0wsRBRKLJcx224Ku5I9C36yPY/OKKZS7WuD1AR7gly+Yi8j/6fLnZ KH2Ak2Uh4M27lEfeuqsyfiOQdvTi9Nhtn8TH3oftiDfU+2Y6TC6N+8rJSjAA/Wb5qRDNrx S94tTm4yJXMn5fG7PHBEL1Tf6remAtE7tO5E6xe7EGnaozXA+QIsP06I82KNKcET0F9l13 49mE9hgUDI/Bb4oHAWIWsXjoo8veYBTnGFfUhMNucGixCqRcJeUdaVeev6fwzg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070490; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CDjs0osB7HaWYWLgKCY/Wa309nnPvr/MmelH3wXKFdE=; b=X0lUMG/Xc8BIEXAuQK8jrmcIFxEVUlwNLEUCGlGHfaSK0+1LN7f2Xz8WsPmCU9MS2NWpp+ ANUGm1E0dRrxO3rfpMCltUEPYLdNfIXO9SmsdTi1Sf3P0r2kq9wZFUUIjw3W88Ehv2xhKw 6c5MC99dIMnOvqpCYv4L27i7/J/hBtGzAz7vcBCmHTydmVW0N83ynzpx2mmNetoova6IaY npzKOJjeDN2p/mnY5UXYdjTmM/kYCdxgJ6RwtAzmxX4X+h8cTJpTK+L+uNA27y2BFIllWu 8KMnpbuyACh4/aNluNC+qGIG1sMzVG06Ox4kFse19zQ7PsHWsIrDIhNdIHgUcA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRp4n6jlJzgCG for ; Fri, 29 May 2026 16:01:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35d20 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 16:01:29 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 22a0912bb1dc - main - MAC/do: Expand "conf" to "configuration" in a panic message on INVARIANTS List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 22a0912bb1dc71f18d2e33ec9915a54a8324a3ff Auto-Submitted: auto-generated Date: Fri, 29 May 2026 16:01:29 +0000 Message-Id: <6a19b859.35d20.36ae3bec@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=22a0912bb1dc71f18d2e33ec9915a54a8324a3ff commit 22a0912bb1dc71f18d2e33ec9915a54a8324a3ff Author: Olivier Certner AuthorDate: 2026-03-23 14:42:07 +0000 Commit: Olivier Certner CommitDate: 2026-05-29 15:20:35 +0000 MAC/do: Expand "conf" to "configuration" in a panic message on INVARIANTS No functional change. Reviewed by: bapt Fixes: 9818224174c4 ("MAC/do: Executable paths feature (GSoC 2025's final state)") MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38 --- sys/security/mac_do/mac_do.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/security/mac_do/mac_do.c b/sys/security/mac_do/mac_do.c index 2258c358ce92..9da7aaa257d5 100644 --- a/sys/security/mac_do/mac_do.c +++ b/sys/security/mac_do/mac_do.c @@ -1201,8 +1201,8 @@ check_conf_use_count(const struct conf *const conf, u_int expected) const u_int use_count = refcount_load(&conf->use_count); if (use_count != expected) - panic("MAC/do: Conf at %p: Use count is %u, expected %u", - conf, use_count, expected); + panic("MAC/do: Configuration at %p: Use count is %u, " + "expected %u", conf, use_count, expected); } #else #define check_conf_use_count(...) From nobody Fri May 29 16:01:32 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRp4r4d4qz6flDp for ; Fri, 29 May 2026 16:01:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRp4r1nQXz3GtF for ; Fri, 29 May 2026 16:01:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070492; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j2IQAxe9s+nWBf4WUwMUur9dvTwcPnlGeQVqhHU5UXc=; b=Om0k6ArOezhUcE2ZMZUrg9eMtx6h2rXope9xofh3oyMG+KALt4rJh6fKZJ/x2BMIkP4B+x ocV70Pn7XU3cxBqaESX1bsHGEzyg2H0DOTcB0rU5mRBh4Ca2wUCvBux/TVHO0mW8+oDWAT lUugsxwA6rY184nP4RGhoJzaJWCsJpEBpLj5OjOtBSawjNB1tOLxNAOi2YawVspFmKKsu8 Hpv5POeXsTNHSGtQDpehYuGcmCuscsgxdqbblrSLmeVxkqEZrsQbD7KxjSe02hfdp5gnwf 6zODRZ4jYrSjRoDhox+irq2pMU0ipX6DEJmmfVqXtlojNleSPoHD7KwhuDjC1w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780070492; a=rsa-sha256; cv=none; b=oATcDfQRDwCTVahjiU24t6xM+A6eZGQX9PdUU7XUEyuYvLXWDqVLMsp66mvLpTM+b1pGhg hyT/wGpcpY0sNh+SFzMZLsvEfVEAXgtupcj2YtwkHvScOYxAsHZ/bChEJ8pD5xzmKzZVbU 8Vv0b4u9ALV+KyxKacWIlQalyrJ/ehuFtud4V62u/UzcrjkK9B6AgcdxzbXC+9unZ1Vc6d ZDLVPEOMkzG+U5Idqz0GhLJkKNul5+J+/l3wERRrksFfn55TqGDxHU/7KLuEg02CVYf4uF 0gX8KQZoG35iSZfq31VEam5/5m3AWhXnYPaa93A3rs8+xlGObolnlp8crI2kOA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070492; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j2IQAxe9s+nWBf4WUwMUur9dvTwcPnlGeQVqhHU5UXc=; b=jyemNoyZs9YAYqeOd9HjiOwQVmlRhUsriKJkltyKh6gemeHQRqE8PCQY87+0t991/pvwKp +phn5aHCTnjHdqtvhNh5zc98Hg95HOSmPEl/d7aQGwV7b85pM/bGciBm+xHdRT2W7EPj96 GsmhQnOgVqxCihBXMK4ink1hq3X/rx+5xS4NCqNtlvQJoNZCWMYIbl5VbKwUS2HjW3kZcH FHFqGtgJbc6xN4GPYTqlgSYXbCRqOilEJwl3ywyS94qzZRFvXwzO5mCPyuDBge9voBSsDe kuHYnEendwZjwaLC7ZYyUQRM7R+XVQju/oUSgRfVxb0ZouGIl8SBtCDmp1uAow== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRp4r182yzgcX for ; Fri, 29 May 2026 16:01:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35df6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 16:01:32 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 0aef1c059fae - main - MAC/do: Document and assert when parse error objects must be built List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0aef1c059fae86a7f62b444dc3352eb0d5bdaa31 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 16:01:32 +0000 Message-Id: <6a19b85c.35df6.481edbe9@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=0aef1c059fae86a7f62b444dc3352eb0d5bdaa31 commit 0aef1c059fae86a7f62b444dc3352eb0d5bdaa31 Author: Olivier Certner AuthorDate: 2026-05-19 19:38:41 +0000 Commit: Olivier Certner CommitDate: 2026-05-29 15:21:16 +0000 MAC/do: Document and assert when parse error objects must be built The invariant is that parse_*() functions must create a parse error object and return it through their 'parse_error' argument if and only if they return an error code (non-zero). Add assertions checking this invariant in various places, and in particular in the new parse_exec_paths(), to be future proof. Change the contract of parse_and_set_conf() so that the caller is required to pass a NULL '*parse_error'. Remove useless resetting of '*parse_error' to NULL. While here, remove a test that is always true thanks to this invariant and that was recently introduced with the "executable paths" feature. No functional change intended. Reviewed by: bapt MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38 --- sys/security/mac_do/mac_do.c | 82 +++++++++++++++++++++++++++----------------- 1 file changed, 50 insertions(+), 32 deletions(-) diff --git a/sys/security/mac_do/mac_do.c b/sys/security/mac_do/mac_do.c index 5aacce1b4d09..dc5d3d29d988 100644 --- a/sys/security/mac_do/mac_do.c +++ b/sys/security/mac_do/mac_do.c @@ -71,6 +71,11 @@ static const char *id_type_to_str[] = { #define PARSE_ERROR_SIZE 256 +/* + * All functions having a parse error parameter must return through it a parse + * error object if and only if they return an error value (non-zero); else, NULL + * must be returned through it. + */ struct parse_error { size_t pos; char msg[PARSE_ERROR_SIZE]; @@ -776,6 +781,7 @@ parse_target_clause(char *to, struct rule *const rule, check_type_and_finish: check_type_and_type_flags(type, *tflags); finish: + MPASS(error == 0 && *parse_error == NULL); return (0); einval: /* We must have built a parse error on error. */ @@ -853,7 +859,7 @@ pour_list_into_rule(const id_type_t type, struct id_list *const list, make_parse_error(parse_error, 0, "Incompatible flags or duplicate " "GID %u.", id); - return (EINVAL); + goto einval; } check_type_and_id_flags(type, array[ref_idx].flags); @@ -867,7 +873,7 @@ pour_list_into_rule(const id_type_t type, struct id_list *const list, */ make_parse_error(parse_error, 0, "Duplicate UID %u.", id); - return (EINVAL); + goto einval; default: __assert_unreachable(); @@ -876,7 +882,12 @@ pour_list_into_rule(const id_type_t type, struct id_list *const list, *nb = ref_idx + 1; } + MPASS(*parse_error == NULL); return (0); + +einval: + MPASS(*parse_error != NULL); + return (EINVAL); } /* @@ -1002,6 +1013,7 @@ parse_single_rule(char *rule, struct rules *const rules, } STAILQ_INSERT_TAIL(&rules->head, new, r_entries); + MPASS(error == 0 && *parse_error == NULL); return (0); einval: @@ -1019,13 +1031,13 @@ einval: /* * Parse rules specification and produce rule structures out of it. * - * Returns 0 on success, with '*rulesp' made to point to a 'struct rule' - * representing the rules. On error, the returned value is non-zero and - * '*rulesp' is unchanged. If 'string' has length greater or equal to - * MAC_RULE_STRING_LEN, ENAMETOOLONG is returned. If it is not in the expected - * format, EINVAL is returned. If an error is returned, '*parse_error' is set - * to point to a 'struct parse_error' giving an error message for the problem, - * else '*parse_error' is set to NULL. + * Must be called with '*parse_error' set to NULL. Returns 0 on success, with + * '*rulesp' made to point to a 'struct rule' representing the rules. On error, + * the returned value is non-zero and '*rulesp' is unchanged. If 'string' has + * length greater or equal to MAC_RULE_STRING_LEN, ENAMETOOLONG is returned. If + * it is not in the expected format, EINVAL is returned. If an error is + * returned, '*parse_error' is set to point to a 'struct parse_error' giving an + * error message for the problem. * * Expected format: A >-colon-separated list of rules of the form * ">" (for backwards compatibility, a semi-colon ":" is accepted @@ -1050,8 +1062,6 @@ parse_rules(const char *const string, struct rules *const rules, char *copy, *p, *rule; int error = 0; - *parse_error = NULL; - if (len >= MAC_RULE_STRING_LEN) { make_parse_error(parse_error, 0, "Rule specification string is too long (%zu, max %zu)", @@ -1074,15 +1084,22 @@ parse_rules(const char *const string, struct rules *const rules, if (error != 0) { (*parse_error)->pos += rule - copy; toast_rules(rules); - goto out; + goto error; } } + MPASS(error == 0 && *parse_error == NULL); out: free(copy, M_MAC_DO); return (error); +error: + MPASS(error != 0 && *parse_error != NULL); + goto out; } +/* + * Similar constraints as parse_rules() (which see). + */ static int parse_exec_paths(const char *const string, struct exec_paths *const exec_paths, struct parse_error **const parse_error) @@ -1091,8 +1108,6 @@ parse_exec_paths(const char *const string, struct exec_paths *const exec_paths, char *copy, *p, *path; int error = 0; - *parse_error = NULL; - if (len >= EXEC_PATHS_MAXLEN) { make_parse_error(parse_error, 0, "Exec path specification string is too long (%zu, max %u)", @@ -1119,7 +1134,7 @@ parse_exec_paths(const char *const string, struct exec_paths *const exec_paths, "Too many exec paths specified (max %d)", MAX_EXEC_PATHS); error = EINVAL; - goto out; + goto error; } path_len = strlen(path); @@ -1128,7 +1143,7 @@ parse_exec_paths(const char *const string, struct exec_paths *const exec_paths, "Exec paths too long (%zu, max %u)", path_len, PATH_MAX - 1); error = ENAMETOOLONG; - goto out; + goto error; } strlcpy(exec_paths->exec_paths[exec_paths->exec_path_count], @@ -1139,12 +1154,16 @@ parse_exec_paths(const char *const string, struct exec_paths *const exec_paths, if (exec_paths->exec_path_count == 0) { make_parse_error(parse_error, 0, "No valid exec paths found"); error = EINVAL; - goto out; + goto error; } + MPASS(error == 0 && *parse_error == NULL); out: free(copy, M_MAC_DO); return (error); +error: + MPASS(error != 0 && *parse_error != NULL); + goto out; } /* @@ -1360,6 +1379,7 @@ clone_exec_paths(struct exec_paths *dst, struct exec_paths *const src) sizeof(dst->exec_paths_str)); } +/* Must be called with '*parse_error' set to NULL. */ static int parse_and_set_conf(struct prison *pr, const char *rules_string, const char *exec_paths_string, struct parse_error **parse_error) @@ -1370,8 +1390,6 @@ parse_and_set_conf(struct prison *pr, const char *rules_string, int error = 0; bool need_applicable_conf; - *parse_error = NULL; - need_applicable_conf = (rules_string == NULL || rules_string[0] == '\0' || exec_paths_string == NULL || exec_paths_string[0] == '\0'); @@ -1386,7 +1404,7 @@ parse_and_set_conf(struct prison *pr, const char *rules_string, if (rules_string != NULL && rules_string[0] != '\0') { error = parse_rules(rules_string, &conf->rules, parse_error); if (error != 0) - goto out; + goto error; } else if (applicable_conf != NULL) clone_rules(&conf->rules, &applicable_conf->rules); @@ -1395,20 +1413,22 @@ parse_and_set_conf(struct prison *pr, const char *rules_string, error = parse_exec_paths(exec_paths_string, &conf->exec_paths, parse_error); if (error != 0) - goto out; + goto error; } else if (applicable_conf != NULL) clone_exec_paths(&conf->exec_paths, &applicable_conf->exec_paths); set_conf(pr, conf); + MPASS(error == 0 && *parse_error == NULL); out: if (applicable_conf != NULL) drop_conf(applicable_conf); - if (error != 0) - drop_conf(conf); - return (error); +error: + MPASS(error != 0 && *parse_error != NULL); + drop_conf(conf); + goto out; } static int @@ -1418,7 +1438,7 @@ mac_do_sysctl_rules(SYSCTL_HANDLER_ARGS) struct prison *const td_pr = req->td->td_ucred->cr_prison; struct prison *pr; struct conf *conf; - struct parse_error *parse_error; + struct parse_error *parse_error = NULL; int error; conf = find_conf(td_pr, &pr); @@ -1460,7 +1480,7 @@ mac_do_sysctl_exec_paths(SYSCTL_HANDLER_ARGS) struct prison *const td_pr = req->td->td_ucred->cr_prison; struct prison *pr; struct conf *conf; - struct parse_error *parse_error; + struct parse_error *parse_error = NULL; int error; conf = find_conf(td_pr, &pr); @@ -1725,12 +1745,10 @@ mac_do_jail_set(void *obj, void *data) &parse_error); if (error != 0) { - if (parse_error != NULL) { - vfs_opterror(opts, - "MAC/do: Parse error at index %zu: %s\n", - parse_error->pos, parse_error->msg); - free_parse_error(parse_error); - } + vfs_opterror(opts, + "MAC/do: Parse error at index %zu: %s\n", + parse_error->pos, parse_error->msg); + free_parse_error(parse_error); return (error); } From nobody Fri May 29 16:01:31 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRp4q3tgzz6flTs for ; Fri, 29 May 2026 16:01:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRp4q0w6wz3H29 for ; Fri, 29 May 2026 16:01:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070491; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ToBB8BgKXryuBNu+SkvLV63Euw6lXIAKvsC6u5hv8PM=; b=YRBCqyQthSjhLhukSRGZrDhLSyeUZsy6Ik/7So1LZUxct4Kvpgs6e8gsbwdUm2pTg/MDdr Ygk1LkL/nSbDpCLIpqwHVpmesavTGjFRqVFvAp3v0ieLjA7bAGGAgYgb5jvyuMjfE7ENWI LjRNGZ2XOloPiP1EG884ISIxVMufHIhCz3VqjxXJW+UA+wjjyv5qSHlLGDlVcgZ0ElzJMH v4o7KLBKhBklbEMUNLzQkXhF1flhLc/qB7lTjy0a6Sz0Cs1HnHb3gFeV6xFAaYBRiF6E1L ar4N7osNFemGPef6dhihHrFpTcPW2yQH8mvz5dWpJlhJ6I+Z3ve3VEMd/dDXDg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780070491; a=rsa-sha256; cv=none; b=qk9PtOBrAT3faoC1MkKCvdarq+ycdKpHstR2INept67KFSlgaZZUvu4wfk1sQRdkb7UPlm rSqYVP4cu2d8rehbrYvjdpKf+bCS9Vo1zf+xvOpbhsdHSX4YIj/hbjc6tl30sLPkDoTyZZ ieJYeWwt93AMQVrgvfnn1QU0aDYggaVhU71OQBcMzPyQ2AHu4gLiW0I9rniR+ksUi4SuIp vB+J/TYeHuxI3AD9j4VKdlPSQHbZY30/wV0eKerPTdnyMu1TdLZopoF8lMRSVxetDyA/hu 21znLj35whAq4f5kAdkrA7m/S2NhrSELp6Lst3pKoxT/8lprfGcx+tE0Pha58w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070491; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ToBB8BgKXryuBNu+SkvLV63Euw6lXIAKvsC6u5hv8PM=; b=i0P2ig4YOrn8MTaGYbNFebPd26/E6/QNPxCKpSdyNWxo3asTW8wdE1owEPrx3m/Ko6b/8j Wqc84wpeXwUFSiOq8PrHpldrs8bwGm8EOx8Uyxq9sdW9JPtMJuM5gQpclzcQHusUGlSOGi Jk9hsc/9+dVB0vfepYMxCv8eQYtW8KJDDASdE/hLLOPw2TbYBLZjupAB/UUNehHc/Ct61P 4mME27GiZapf4vehk5qj2/rCOm0t4vEJ5ONAeCu26pBH7zEAO3pczPQjc0faz1RtK4MI2p nVsjuMne3hyTi6LA8feWx7E8m6RN/braXeMQU3afEIlhAukS3FT8X1+2BeVMng== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRp4q0LFQzgcW for ; Fri, 29 May 2026 16:01:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35f90 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 16:01:31 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: d554b89f4096 - main - MAC/do: check_proc(): Remove a superfluous 'if' List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d554b89f4096589d00abef584552eff0481418db Auto-Submitted: auto-generated Date: Fri, 29 May 2026 16:01:31 +0000 Message-Id: <6a19b85b.35f90.2a7d1a60@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=d554b89f4096589d00abef584552eff0481418db commit d554b89f4096589d00abef584552eff0481418db Author: Olivier Certner AuthorDate: 2026-04-28 13:44:53 +0000 Commit: Olivier Certner CommitDate: 2026-05-29 15:21:10 +0000 MAC/do: check_proc(): Remove a superfluous 'if' No functional change (intended). Reviewed by: bapt MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38 --- sys/security/mac_do/mac_do.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/sys/security/mac_do/mac_do.c b/sys/security/mac_do/mac_do.c index 9da7aaa257d5..5aacce1b4d09 100644 --- a/sys/security/mac_do/mac_do.c +++ b/sys/security/mac_do/mac_do.c @@ -2303,12 +2303,11 @@ check_proc(void) conf = find_conf(td_pr, &pr); exec_paths = &conf->exec_paths; - if (exec_paths->exec_path_count > 0) - for (int i = 0; i < exec_paths->exec_path_count; i++) - if (strcmp(exec_paths->exec_paths[i], path) == 0) { - error = 0; - break; - } + for (int i = 0; i < exec_paths->exec_path_count; i++) + if (strcmp(exec_paths->exec_paths[i], path) == 0) { + error = 0; + break; + } prison_unlock(pr); From nobody Fri May 29 16:01:25 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRp4q3YLyz6flTr for ; Fri, 29 May 2026 16:01:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRp4p6QQ4z3GyY for ; Fri, 29 May 2026 16: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=1780070490; 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=LwlLyTAJzU+RscZ/1yX1cmBqpKE4Uz+ZelX0Cbh1hKc=; b=PR9Qq9zgsPtuf6DcniQaNpJw0+EeZ6H2fITelsGmKgesLBpdnJkIuax4Vv5GPDdrO3nEzC aXLkhbQRPymVhronRKEawgGMf1sFS0bMbHp7TkVAcZ2z/qWgSnu62N978vvkojOc4E/36T 41sSXnTZMydYZ7GWGwiCF+8fizuISHt8b95xQhGjLr0uyFoIZRu5MEerxvkRe64yIDTA4R Aq5VTa4+NdCkhm9JSAgb/GvXq5wkK4hfdLDmMByqc//pX6OCViu9Fw78bto/nKMfB5RSsO j/5pblTx4wCKFE2oEgs7CIgTPfKxnAkyF4gH7rgWQOgo6W9rbo5chJtD2jq6Rg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780070490; a=rsa-sha256; cv=none; b=Kut9SMgVnc2ijKR/JIcbS00trTGksu+DKYM0nBLjT3sWbTrD1/6bIviMmyNduzheTBdkfF UDwQrpRMTx1Po+YO/a4Nt6xRQhk2qHXzdX2BBdhxfdSh2/BJg9RAgLkQG6eQ2XaFuq/wt5 E36HPnM7qaZOP+sGlsjXs9DUcb8za8KwDPyo1oriVrXawAV/sH2sl/SE+US/kcSMlwkUeB PFTvHbz20LPv96TeNCSlgVncd99hi+JgrWx9IGYiEQNKU9pyRcTNT0AYOx5ZbQOEBMNEM+ nC0MCfR2YTmMAculnZXl6EUlF0JRkIzzFrZzd/Z785UNFNt7IysWzvvds3mpgg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070490; 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=LwlLyTAJzU+RscZ/1yX1cmBqpKE4Uz+ZelX0Cbh1hKc=; b=r0BgApfkCPB3TGJq0csAPWbGmLvgKVp9zG7z+L9ax5iXa+YV+g4qO7Xb0xPyj88kiruFVa FCG6rkaPblbip7pBwID1G++vt80qPccD7FXoss4PdfVts+/FjRFAvTeuS70f97qzBrroar 85dyCJd7G3ZOY5WfO2PvGPjLJn7/GFs14GzvaDRasRjC9LMtpR79GcJlpKMBfn5JCN977Z HxVANfMYovbnjIyDFQaUyx1hpTMeBkcsqVjM6A8heM6EGVRjNDPs7dFqIv9i6HB8AfJiVr T2LizmfUdymDs5cXKVS8jth6hoRKb8ZHMrkauLDH/TdOKYJeL3O8w6TM0nzB/Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRp4p5HFfzg98 for ; Fri, 29 May 2026 16:01:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 32eea by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 16:01:25 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Kushagra Srivastava From: Olivier Certner Subject: git: 9818224174c4 - main - MAC/do: Executable paths feature (GSoC 2025's final state) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9818224174c41a434028446fb6fa5516a6291755 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 16:01:25 +0000 Message-Id: <6a19b855.32eea.4f007537@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=9818224174c41a434028446fb6fa5516a6291755 commit 9818224174c41a434028446fb6fa5516a6291755 Author: Kushagra Srivastava AuthorDate: 2025-08-14 14:41:57 +0000 Commit: Olivier Certner CommitDate: 2026-05-29 15:02:44 +0000 MAC/do: Executable paths feature (GSoC 2025's final state) By design, mac_do(4) only authorizes credentials change requests if they are issued by a process spawned from '/usr/bin/mdo'. The executable paths feature introduces some flexibility by allowing to change that path, thus allowing another executable to make requests, and to use multiple such paths (up to 8 in the current implementation). Its purpose is to enable thin jails scenarios where mdo(1) may not be at its canonical path ('/usr/bin/mdo') and to allow experimenting with other userland programs leveraging setcred(2). Configuration of executable paths is per-jail and intentionally works completely similarly with rules. It is accessible from within a jail through the 'security.mac.do.exec_paths' sysctl knob and from outside a jail through the 'mac.do.exec_paths' jail parameter. This commit groups the verbatim changes of the following commits that Kushagra Srivastava, our GSoC 2025 student, created in his GitHub repository (https://github.com/thesynthax/freebsd-src), branch 'task/exec-paths-refactor': mac_do(4): Complete refactor of allowed executable paths feature mac_do(4): Fixed changing security.mac.do.* knobs in inheritance mode mac_do(4): Debugging rules and exec_paths leak on destroy mac_do(4): Deep copy rules mac_do(4): Fixed leak mac_do(4): fixed various bugs, structs inlined, leaks remain mac_do(4): MAC/do working in jail, leaks decreased mac_do(4): MAC/do fixed, works in host and jails, leaks removed mac_do(4): style Frozen log for these commits: https://github.com/OlCe2/freebsd-src/compare/main...14fdc49fb29265fac5d0daf95a13d0dce325c951. The corresponding pull request is at: https://github.com/OlCe2/freebsd-src/pull/2. The GSoC's final state of this code still has a number of problems that are fixed in subsequent commits. It is however committed separately to clearly delineate Kushagra's work. Reviewed by: olce (amendments to come, see above) MFC after: 1 month Relnotes: yes Sponsored by: Google LLC (GSoC 2025) Sponsored by: The FreeBSD Foundation (review, commit) Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38 --- sys/security/mac_do/mac_do.c | 581 +++++++++++++++++++++++++++++++------------ 1 file changed, 422 insertions(+), 159 deletions(-) diff --git a/sys/security/mac_do/mac_do.c b/sys/security/mac_do/mac_do.c index ba49da22ce67..b63fc2a5bbc8 100644 --- a/sys/security/mac_do/mac_do.c +++ b/sys/security/mac_do/mac_do.c @@ -46,6 +46,9 @@ SYSCTL_INT(_security_mac_do, OID_AUTO, print_parse_error, CTLFLAG_RWTUN, static MALLOC_DEFINE(M_MAC_DO, "mac_do", "mac_do(4) security module"); +#define EXEC_PATHS_MAXLEN 2048 +#define MAX_EXEC_PATHS 8 + #define MAC_RULE_STRING_LEN 1024 static unsigned osd_jail_slot; @@ -167,6 +170,17 @@ STAILQ_HEAD(rulehead, rule); struct rules { char string[MAC_RULE_STRING_LEN]; struct rulehead head; +}; + +struct exec_paths { + char exec_paths_str[EXEC_PATHS_MAXLEN]; + char exec_paths[MAX_EXEC_PATHS][PATH_MAX]; + int exec_path_count; +}; + +struct conf { + struct rules rules; + struct exec_paths exec_paths; volatile u_int use_count __aligned(CACHE_LINE_SIZE); }; @@ -323,19 +337,34 @@ toast_rules(struct rules *const rules) free(rule->gids, M_MAC_DO); free(rule, M_MAC_DO); } - free(rules, M_MAC_DO); } -static struct rules * -alloc_rules(void) +/* Assuming storage is zeroed already */ +static void +init_rules(struct rules *const rules) { - struct rules *const rules = malloc(sizeof(*rules), M_MAC_DO, M_WAITOK); - _Static_assert(MAC_RULE_STRING_LEN > 0, "MAC_RULE_STRING_LEN <= 0!"); - rules->string[0] = 0; STAILQ_INIT(&rules->head); - rules->use_count = 0; - return (rules); +} + +static void +init_exec_paths(struct exec_paths *const exec_paths) +{ + _Static_assert(EXEC_PATHS_MAXLEN > 0, "EXEC_PATHS_MAXLEN <= 0!"); + bzero(exec_paths, sizeof(*exec_paths)); + exec_paths->exec_paths_str[0] = 0; +} + +static struct conf * +alloc_conf(void) +{ + struct conf *const conf = malloc(sizeof(*conf), M_MAC_DO, M_WAITOK | M_ZERO); + + init_rules(&conf->rules); + init_exec_paths(&conf->exec_paths); + conf->use_count = 0; + + return (conf); } static bool @@ -1007,12 +1036,11 @@ einval: * - "gid=1010>gid=1011,gid=1012,gid=1013" */ static int -parse_rules(const char *const string, struct rules **const rulesp, +parse_rules(const char *const string, struct rules *const rules, struct parse_error **const parse_error) { const size_t len = strlen(string); char *copy, *p, *rule; - struct rules *rules; int error = 0; *parse_error = NULL; @@ -1024,7 +1052,6 @@ parse_rules(const char *const string, struct rules **const rulesp, return (ENAMETOOLONG); } - rules = alloc_rules(); bcopy(string, rules->string, len + 1); MPASS(rules->string[len] == '\0'); /* Catch some races. */ @@ -1044,31 +1071,90 @@ parse_rules(const char *const string, struct rules **const rulesp, } } - *rulesp = rules; +out: + free(copy, M_MAC_DO); + return (error); +} + +static int +parse_exec_paths(const char *const string, struct exec_paths *const exec_paths, + struct parse_error **const parse_error) +{ + const size_t len = strlen(string); + char *copy, *p, *path; + int error = 0; + + *parse_error = NULL; + + if (len >= EXEC_PATHS_MAXLEN) { + make_parse_error(parse_error, 0, + "Exec path specification string is too long (%zu, max %u)", + len, EXEC_PATHS_MAXLEN - 1); + return (ENAMETOOLONG); + } + + bcopy(string, exec_paths->exec_paths_str, len + 1); + MPASS(exec_paths->exec_paths_str[len] == '\0'); + + copy = malloc(len + 1, M_MAC_DO, M_WAITOK); + bcopy(string, copy, len + 1); + MPASS(copy[len] == '\0'); + + p = copy; + while ((path = strsep_noblanks(&p, ":")) != NULL) { + if (*path == '\0') + continue; + + if (exec_paths->exec_path_count >= MAX_EXEC_PATHS) { + make_parse_error(parse_error, path - copy, + "Too many exec paths specified (max %d)", MAX_EXEC_PATHS); + error = EINVAL; + goto out; + } + + const size_t path_len = strlen(path); + if (path_len >= PATH_MAX) { + make_parse_error(parse_error, path - copy, + "Exec paths too long (%zu, max %u)", + path_len, PATH_MAX - 1); + error = ENAMETOOLONG; + goto out; + } + + strlcpy(exec_paths->exec_paths[exec_paths->exec_path_count], path, PATH_MAX); + exec_paths->exec_path_count++; + } + + if (exec_paths->exec_path_count == 0) { + make_parse_error(parse_error, 0, "No valid exec paths found"); + error = EINVAL; + goto out; + } + out: free(copy, M_MAC_DO); return (error); } /* - * Find rules applicable to the passed prison. + * Find conf applicable to the passed prison. * - * Returns the applicable rules (and never NULL). 'pr' must be unlocked. + * Returns the applicable conf (and never NULL). 'pr' must be unlocked. * 'aprp' is set to the (ancestor) prison holding these, and it must be unlocked - * once the caller is done accessing the rules. '*aprp' is equal to 'pr' if and - * only if the current jail has its own set of rules. + * once the caller is done accessing the conf. '*aprp' is equal to 'pr' if and + * only if the current jail has its own set of conf. */ -static struct rules * -find_rules(struct prison *const pr, struct prison **const aprp) +static struct conf * +find_conf(struct prison *const pr, struct prison **const aprp) { struct prison *cpr, *ppr; - struct rules *rules; + struct conf *conf; cpr = pr; for (;;) { prison_lock(cpr); - rules = osd_jail_get(cpr, osd_jail_slot); - if (rules != NULL) + conf = osd_jail_get(cpr, osd_jail_slot); + if (conf != NULL) break; prison_unlock(cpr); @@ -1078,34 +1164,36 @@ find_rules(struct prison *const pr, struct prison **const aprp) } *aprp = cpr; - return (rules); + return (conf); } static void -hold_rules(struct rules *const rules) +hold_conf(struct conf *const conf) { - refcount_acquire(&rules->use_count); + refcount_acquire(&conf->use_count); } static void -drop_rules(struct rules *const rules) +drop_conf(struct conf *const conf) { - if (refcount_release(&rules->use_count)) - toast_rules(rules); + if (refcount_release(&conf->use_count)) { + toast_rules(&conf->rules); + free(conf, M_MAC_DO); + } } #ifdef INVARIANTS static void -check_rules_use_count(const struct rules *const rules, u_int expected) +check_conf_use_count(const struct conf *const conf, u_int expected) { - const u_int use_count = refcount_load(&rules->use_count); + const u_int use_count = refcount_load(&conf->use_count); if (use_count != expected) - panic("MAC/do: Rules at %p: Use count is %u, expected %u", - rules, use_count, expected); + panic("MAC/do: Conf at %p: Use count is %u, expected %u", + conf, use_count, expected); } #else -#define check_rules_use_count(...) +#define check_conf_use_count(...) #endif /* INVARIANTS */ /* @@ -1117,7 +1205,7 @@ check_rules_use_count(const struct rules *const rules, u_int expected) static void dealloc_jail_osd(void *const value) { - struct rules *const rules = value; + struct conf *const conf = value; /* * If called because the "holding" jail goes down, no one should be @@ -1133,8 +1221,8 @@ dealloc_jail_osd(void *const value) * we ensure that all thread's slots are freed first in mac_do_destroy() * to be able to check that only one reference remains. */ - check_rules_use_count(rules, 1); - toast_rules(rules); + check_conf_use_count(conf, 1); + drop_conf(conf); } /* @@ -1146,9 +1234,9 @@ dealloc_jail_osd(void *const value) * Destroys the 'osd_jail_slot' slot of the passed jail. */ static void -remove_rules(struct prison *const pr) +remove_conf(struct prison *const pr) { - struct rules *old_rules; + struct conf *old_conf; int error __unused; prison_lock(pr); @@ -1158,7 +1246,7 @@ remove_rules(struct prison *const pr) * decrement their use count, and possibly free them, outside of the * prison lock. */ - old_rules = osd_jail_get(pr, osd_jail_slot); + old_conf = osd_jail_get(pr, osd_jail_slot); error = osd_jail_set(pr, osd_jail_slot, NULL); /* osd_set() never allocates memory when 'value' is NULL, nor fails. */ MPASS(error == 0); @@ -1169,40 +1257,40 @@ remove_rules(struct prison *const pr) osd_jail_del(pr, osd_jail_slot); prison_unlock(pr); - if (old_rules != NULL) - drop_rules(old_rules); + if (old_conf != NULL) + drop_conf(old_conf); } -/* - * Assign already built rules to a jail. - */ static void -set_rules(struct prison *const pr, struct rules *const rules) +set_conf(struct prison *const pr, struct conf *const conf) { - struct rules *old_rules; + struct conf *old_conf; void **rsv; - check_rules_use_count(rules, 0); - hold_rules(rules); + hold_conf(conf); rsv = osd_reserve(osd_jail_slot); prison_lock(pr); - old_rules = osd_jail_get(pr, osd_jail_slot); - osd_jail_set_reserved(pr, osd_jail_slot, rsv, rules); + old_conf = osd_jail_get(pr, osd_jail_slot); + osd_jail_set_reserved(pr, osd_jail_slot, rsv, conf); prison_unlock(pr); - if (old_rules != NULL) - drop_rules(old_rules); + if (old_conf != NULL) + drop_conf(old_conf); } /* - * Assigns empty rules to a jail. + * Assigns default conf to a jail. */ static void -set_empty_rules(struct prison *const pr) +set_default_conf(struct prison *const pr) { - struct rules *const rules = alloc_rules(); + struct conf *const conf = alloc_conf(); + + strlcpy(conf->exec_paths.exec_paths_str, "/usr/bin/mdo", EXEC_PATHS_MAXLEN); + strlcpy(conf->exec_paths.exec_paths[0], "/usr/bin/mdo", PATH_MAX); + conf->exec_paths.exec_path_count = 1; - set_rules(pr, rules); + set_conf(pr, conf); } /* @@ -1210,18 +1298,99 @@ set_empty_rules(struct prison *const pr) * * Returns the same error code as parse_rules() (which see). */ -static int -parse_and_set_rules(struct prison *const pr, const char *rules_string, - struct parse_error **const parse_error) + +static void +clone_rules(struct rules *dst, struct rules *const src) { - struct rules *rules; - int error; + struct rule *src_rule, *dst_rule; + + bzero(dst, sizeof(*dst)); + strlcpy(dst->string, src->string, sizeof(dst->string)); + STAILQ_INIT(&dst->head); + + STAILQ_FOREACH(src_rule, &src->head, r_entries) { + dst_rule = malloc(sizeof(*dst_rule), M_MAC_DO, M_WAITOK | M_ZERO); + bcopy(src_rule, dst_rule, sizeof(*dst_rule)); + + if (src_rule->uids_nb > 0) { + dst_rule->uids = malloc(sizeof(*dst_rule->uids) * src_rule->uids_nb, + M_MAC_DO, M_WAITOK); + bcopy(src_rule->uids, dst_rule->uids, + sizeof(*dst_rule->uids) * src_rule->uids_nb); + } + + if (src_rule->gids_nb > 0) { + dst_rule->gids = malloc(sizeof(*dst_rule->gids) * src_rule->gids_nb, + M_MAC_DO, M_WAITOK); + bcopy(src_rule->gids, dst_rule->gids, + sizeof(*dst_rule->gids) * src_rule->gids_nb); + } - error = parse_rules(rules_string, &rules, parse_error); + STAILQ_INSERT_TAIL(&dst->head, dst_rule, r_entries); + } +} + +static void +clone_exec_paths(struct exec_paths *dst, struct exec_paths *const src) +{ + bzero(dst, sizeof(*dst)); + dst->exec_path_count = src->exec_path_count; + for (int i = 0; i < src->exec_path_count; i++) { + strlcpy(dst->exec_paths[i], src->exec_paths[i], + sizeof(dst->exec_paths[i])); + } + + strlcpy(dst->exec_paths_str, src->exec_paths_str, + sizeof(dst->exec_paths_str)); +} + +static int +parse_and_set_conf(struct prison *pr, const char *rules_string, + const char *exec_paths_string, struct parse_error **parse_error) +{ + struct prison *ppr = NULL; + struct conf *applicable_conf = NULL; + struct conf *conf; + int error = 0; + bool need_applicable_conf; + + *parse_error = NULL; + + need_applicable_conf = (rules_string == NULL || rules_string[0] == '\0' || + exec_paths_string == NULL || exec_paths_string[0] == '\0'); + + if (need_applicable_conf) { + applicable_conf = find_conf(pr, &ppr); + hold_conf(applicable_conf); + prison_unlock(ppr); + } + + conf = alloc_conf(); + + if (rules_string != NULL && rules_string[0] != '\0') { + error = parse_rules(rules_string, &conf->rules, parse_error); + if (error != 0) + goto out; + } + else if (applicable_conf != NULL) + clone_rules(&conf->rules, &applicable_conf->rules); + + if (exec_paths_string != NULL && exec_paths_string[0] != '\0') { + error = parse_exec_paths(exec_paths_string, &conf->exec_paths, parse_error); + if (error != 0) + goto out; + } else if (applicable_conf != NULL) + clone_exec_paths(&conf->exec_paths, &applicable_conf->exec_paths); + + set_conf(pr, conf); + +out: + if (applicable_conf != NULL) + drop_conf(applicable_conf); if (error != 0) - return (error); - set_rules(pr, rules); - return (0); + drop_conf(conf); + + return (error); } static int @@ -1230,12 +1399,12 @@ mac_do_sysctl_rules(SYSCTL_HANDLER_ARGS) char *const buf = malloc(MAC_RULE_STRING_LEN, M_MAC_DO, M_WAITOK); struct prison *const td_pr = req->td->td_ucred->cr_prison; struct prison *pr; - struct rules *rules; + struct conf *conf; struct parse_error *parse_error; int error; - rules = find_rules(td_pr, &pr); - strlcpy(buf, rules->string, MAC_RULE_STRING_LEN); + conf = find_conf(td_pr, &pr); + strlcpy(buf, conf->rules.string, MAC_RULE_STRING_LEN); prison_unlock(pr); error = sysctl_handle_string(oidp, buf, MAC_RULE_STRING_LEN, req); @@ -1243,13 +1412,14 @@ mac_do_sysctl_rules(SYSCTL_HANDLER_ARGS) goto out; /* Set our prison's rules, not that of the jail we inherited from. */ - error = parse_and_set_rules(td_pr, buf, &parse_error); + error = parse_and_set_conf(td_pr, buf, NULL, &parse_error); if (error != 0) { if (print_parse_error) printf("MAC/do: Parse error at index %zu: %s\n", parse_error->pos, parse_error->msg); free_parse_error(parse_error); } + out: free(buf, M_MAC_DO); return (error); @@ -1265,13 +1435,52 @@ SYSCTL_JAIL_PARAM_SYS_SUBNODE(mac, do, CTLFLAG_RW, "Jail MAC/do parameters"); SYSCTL_JAIL_PARAM_STRING(_mac_do, rules, CTLFLAG_RW, MAC_RULE_STRING_LEN, "Jail MAC/do rules"); +static int +mac_do_sysctl_exec_paths(SYSCTL_HANDLER_ARGS) +{ + char *const buf = malloc(EXEC_PATHS_MAXLEN, M_MAC_DO, M_WAITOK); + struct prison *const td_pr = req->td->td_ucred->cr_prison; + struct prison *pr; + struct conf *conf; + struct parse_error *parse_error; + int error; + + conf = find_conf(td_pr, &pr); + strlcpy(buf, conf->exec_paths.exec_paths_str, EXEC_PATHS_MAXLEN); + prison_unlock(pr); + + error = sysctl_handle_string(oidp, buf, EXEC_PATHS_MAXLEN, req); + if (error != 0 || req->newptr == NULL) + goto out; + + error = parse_and_set_conf(td_pr, NULL, buf, &parse_error); + if (error != 0) { + if (print_parse_error) + printf("MAC/do: Parse error at index %zu: %s\n", + parse_error->pos, parse_error->msg); + free_parse_error(parse_error); + } + +out: + free(buf, M_MAC_DO); + return (error); +} + +SYSCTL_PROC(_security_mac_do, OID_AUTO, exec_paths, + CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_PRISON | CTLFLAG_MPSAFE, + 0, 0, mac_do_sysctl_exec_paths, "A", + "Colon-separated list of allowed executables"); + +SYSCTL_JAIL_PARAM_STRING(_mac_do, exec_paths, CTLFLAG_RW, EXEC_PATHS_MAXLEN, + "Jail MAC/do executable paths"); static int -mac_do_jail_create(void *obj, void *data __unused) +mac_do_jail_create(void *obj, void *data) { struct prison *const pr = obj; - set_empty_rules(pr); + set_default_conf(pr); + return (0); } @@ -1280,10 +1489,14 @@ mac_do_jail_get(void *obj, void *data) { struct prison *ppr, *const pr = obj; struct vfsoptlist *const opts = data; + struct conf *conf; struct rules *rules; + struct exec_paths *exec_paths; int jsys, error; - rules = find_rules(pr, &ppr); + conf = find_conf(pr, &ppr); + rules = &conf->rules; + exec_paths = &conf->exec_paths; jsys = pr == ppr ? (STAILQ_EMPTY(&rules->head) ? JAIL_SYS_DISABLE : JAIL_SYS_NEW) : @@ -1296,6 +1509,10 @@ mac_do_jail_get(void *obj, void *data) if (error != 0 && error != ENOENT) goto done; + error = vfs_setopts(opts, "mac.do.exec_paths", exec_paths->exec_paths_str); + if (error != 0 && error != ENOENT) + goto done; + error = 0; done: prison_unlock(ppr); @@ -1313,13 +1530,16 @@ _Static_assert(-1 != JAIL_SYS_DISABLE && -1 != JAIL_SYS_NEW && * We perform only cheap checks here, i.e., we do not really parse the rules * specification string, if any. */ + static int mac_do_jail_check(void *obj, void *data) { struct vfsoptlist *opts = data; - char *rules_string; - int error, jsys, size; + char *rules_string, *exec_paths_string; + int error, jsys, rules_len = 0, exec_paths_len = 0; + bool has_rules, has_exec_paths; + /* Mark unspecified */ error = vfs_copyopt(opts, "mac.do", &jsys, sizeof(jsys)); if (error == ENOENT) jsys = -1; @@ -1337,60 +1557,82 @@ mac_do_jail_check(void *obj, void *data) * jail_set() calls vfs_getopts() itself later (they becoming * inconsistent wouldn't cause any security problem). */ - error = vfs_getopt(opts, "mac.do.rules", (void**)&rules_string, &size); - if (error == ENOENT) { - /* - * Default (in absence of "mac.do.rules") is to disable (and, in - * particular, not inherit). - */ - if (jsys == -1) - jsys = JAIL_SYS_DISABLE; - - if (jsys == JAIL_SYS_NEW) { - vfs_opterror(opts, "'mac.do.rules' must be specified " - "given 'mac.do''s value"); + error = vfs_getopt(opts, "mac.do.rules", (void **)&rules_string, &rules_len); + if (error == ENOENT) + rules_string = NULL; + else { + if (error != 0) + return (error); + if (rules_len == 0 || rules_string[rules_len - 1] != '\0') { + vfs_opterror(opts, "'mac.do.rules' not a proper string"); return (EINVAL); } + if (rules_len > MAC_RULE_STRING_LEN) { + vfs_opterror(opts, "'mac.do.rules' too long"); + return (ENAMETOOLONG); + } + } - /* Absence of "mac.do.rules" at this point is OK. */ - error = 0; - } else { + /* Handle 'exec_paths' input */ + error = vfs_getopt(opts, "mac.do.exec_paths", (void **)&exec_paths_string, &exec_paths_len); + if (error == ENOENT) + exec_paths_string = NULL; + else { if (error != 0) return (error); - - /* Not a proper string. */ - if (size == 0 || rules_string[size - 1] != '\0') { - vfs_opterror(opts, "'mac.do.rules' not a proper string"); + if (exec_paths_len == 0 || exec_paths_string[exec_paths_len - 1] != '\0') { + vfs_opterror(opts, "'mac.do.exec_paths' not a proper string"); return (EINVAL); } - - if (size > MAC_RULE_STRING_LEN) { - vfs_opterror(opts, "'mdo.rules' too long"); + if (exec_paths_len > EXEC_PATHS_MAXLEN) { + vfs_opterror(opts, "'mac.do.exec_paths' too long"); return (ENAMETOOLONG); } + } - if (jsys == -1) - /* Default (if "mac.do.rules" is present). */ - jsys = rules_string[0] == '\0' ? JAIL_SYS_DISABLE : - JAIL_SYS_NEW; + /* + * Be liberal, considering that an empty rule or exec paths specification + * is equivalent to no specification. + * This affects the JAIL_SYS_DISABLE and JAIL_SYS_INHERIT sanity checks below. + */ + has_rules = rules_string && rules_string[0] != '\0'; + has_exec_paths = exec_paths_string && exec_paths_string[0] != '\0'; - /* - * Be liberal and accept JAIL_SYS_DISABLE and JAIL_SYS_INHERIT - * with an explicit empty rules specification. - */ - switch (jsys) { - case JAIL_SYS_DISABLE: - case JAIL_SYS_INHERIT: - if (rules_string[0] != '\0') { - vfs_opterror(opts, "'mac.do.rules' specified " - "but should not given 'mac.do''s value"); - return (EINVAL); - } - break; + /* Infer 'jsys' if needed */ + if (jsys == -1) { + if (has_rules || has_exec_paths) + jsys = JAIL_SYS_NEW; + else + jsys = JAIL_SYS_DISABLE; + } + + /* Final checks based on resolved 'jsys' */ + switch (jsys) { + case JAIL_SYS_DISABLE: + case JAIL_SYS_INHERIT: + if (has_rules) { + vfs_opterror(opts, "'mac.do.rules' specified but should not be when mac.do is disabled or inherited"); + return (EINVAL); + } + if (has_exec_paths) { + vfs_opterror(opts, "'mac.do.exec_paths' specified but should not be when mac.do is disabled or inherited"); + return (EINVAL); } + break; + + case JAIL_SYS_NEW: + if (!has_rules && !has_exec_paths) { + vfs_opterror(opts, "mac.do set to 'new' but neither rules nor exec_paths specified"); + return (EINVAL); + } + /* Allow: rules only, exec_paths only (though exec_paths only is discouraged), or both */ + break; + + default: + __assert_unreachable(); } - return (error); + return (0); } static int @@ -1398,9 +1640,10 @@ mac_do_jail_set(void *obj, void *data) { struct prison *pr = obj; struct vfsoptlist *opts = data; - char *rules_string; - struct parse_error *parse_error; + char *rules_string, *exec_paths_string; + struct parse_error *parse_error = NULL; int error, jsys; + bool has_rules, has_exec_paths; /* * The invariants checks used below correspond to what has already been @@ -1414,49 +1657,50 @@ mac_do_jail_set(void *obj, void *data) rules_string = vfs_getopts(opts, "mac.do.rules", &error); MPASS(error == 0 || error == ENOENT); - if (error == 0) { - MPASS(strlen(rules_string) < MAC_RULE_STRING_LEN); - if (jsys == -1) - /* Default (if "mac.do.rules" is present). */ - jsys = rules_string[0] == '\0' ? JAIL_SYS_DISABLE : - JAIL_SYS_NEW; + exec_paths_string = vfs_getopts(opts, "mac.do.exec_paths", &error); + MPASS(error == 0 || error == ENOENT); + + has_rules = (rules_string != NULL && rules_string[0] != '\0'); + has_exec_paths = (exec_paths_string != NULL && exec_paths_string[0] != '\0'); + + if (jsys == -1) { + if (has_rules || has_exec_paths) + jsys = JAIL_SYS_NEW; else - MPASS(jsys == JAIL_SYS_NEW || - ((jsys == JAIL_SYS_DISABLE || - jsys == JAIL_SYS_INHERIT) && - rules_string[0] == '\0')); - } else { - MPASS(jsys != JAIL_SYS_NEW); - if (jsys == -1) - /* - * Default (in absence of "mac.do.rules") is to disable - * (and, in particular, not inherit). - */ jsys = JAIL_SYS_DISABLE; - /* If disabled, we'll store an empty rule specification. */ - if (jsys == JAIL_SYS_DISABLE) - rules_string = ""; } switch (jsys) { case JAIL_SYS_INHERIT: - remove_rules(pr); - error = 0; - break; + remove_conf(pr); + return (0); + case JAIL_SYS_DISABLE: + rules_string = ""; + has_rules = true; + /* FALLTHROUGH */ + case JAIL_SYS_NEW: - error = parse_and_set_rules(pr, rules_string, &parse_error); + error = parse_and_set_conf(pr, + has_rules ? rules_string : NULL, + has_exec_paths ? exec_paths_string : NULL, + &parse_error); + if (error != 0) { - vfs_opterror(opts, - "MAC/do: Parse error at index %zu: %s\n", - parse_error->pos, parse_error->msg); - free_parse_error(parse_error); + if (parse_error != NULL) { + vfs_opterror(opts, "MAC/do: Parse error at index %zu: %s\n", + parse_error->pos, parse_error->msg); + free_parse_error(parse_error); + } + + return (error); } - break; + + return (0); + default: __assert_unreachable(); } - return (error); } /* @@ -1493,7 +1737,7 @@ struct mac_do_data_header { */ int priv; /* Rules to apply. */ - struct rules *rules; + struct conf *conf; }; /* @@ -1536,7 +1780,7 @@ clear_data(void *const data) struct mac_do_data_header *const hdr = data; if (hdr != NULL) { - drop_rules(hdr->rules); + drop_conf(hdr->conf); /* We don't deallocate so as to save time on next access. */ hdr->priv = 0; } @@ -1558,7 +1802,7 @@ is_data_reusable(const void *const data, const size_t size) static void set_data_header(void *const data, const size_t size, const int priv, - struct rules *const rules) + struct conf *const conf) { struct mac_do_data_header *const hdr = data; @@ -1567,7 +1811,7 @@ set_data_header(void *const data, const size_t size, const int priv, MPASS(size <= hdr->allocated_size); hdr->size = size; hdr->priv = priv; - hdr->rules = rules; + hdr->conf = conf; } /* The proc lock (and any other non-sleepable lock) must not be held. */ @@ -1933,7 +2177,7 @@ static int mac_do_priv_grant(struct ucred *cred, int priv) { struct mac_do_setcred_data *const data = fetch_data(); - const struct rules *rules; + struct rules *rules; const struct ucred *new_cred; const struct rule *rule; u_int setcred_flags; @@ -1950,7 +2194,7 @@ mac_do_priv_grant(struct ucred *cred, int priv) /* No. */ return (EPERM); - rules = data->hdr.rules; + rules = &data->hdr.conf->rules; new_cred = data->new_cred; KASSERT(new_cred != NULL, ("priv_check*() called before mac_cred_check_setcred()")); @@ -1988,7 +2232,7 @@ static int check_proc(void) { char *path, *to_free; - int error; + int error = EPERM; /* * Only grant privileges if requested by the right executable. @@ -2010,7 +2254,26 @@ check_proc(void) */ if (vn_fullpath_jail(curproc->p_textvp, &path, &to_free) != 0) return (EPERM); - error = strcmp(path, "/usr/bin/mdo") == 0 ? 0 : EPERM; + + struct conf *conf; + struct exec_paths *exec_paths; + struct prison *td_pr = curproc->p_ucred->cr_prison; + struct prison *pr; + conf = find_conf(td_pr, &pr); + exec_paths = &conf->exec_paths; + + if (exec_paths->exec_path_count > 0) { + for (int i = 0; i < exec_paths->exec_path_count; i++) { + if (strcmp(exec_paths->exec_paths[i], path) == 0) { + error = 0; + break; + } + } + + } + + prison_unlock(pr); + free(to_free, M_TEMP); return (error); } @@ -2018,9 +2281,9 @@ check_proc(void) static void mac_do_setcred_enter(void) { - struct rules *rules; struct prison *pr; struct mac_do_setcred_data * data; + struct conf *conf; int error; /* @@ -2042,8 +2305,8 @@ mac_do_setcred_enter(void) /* * Find the currently applicable rules. */ - rules = find_rules(curproc->p_ucred->cr_prison, &pr); - hold_rules(rules); + conf = find_conf(curproc->p_ucred->cr_prison, &pr); + hold_conf(conf); prison_unlock(pr); /* @@ -2052,7 +2315,7 @@ mac_do_setcred_enter(void) data = fetch_data(); if (!is_data_reusable(data, sizeof(*data))) data = alloc_data(data, sizeof(*data)); - set_data_header(data, sizeof(*data), PRIV_CRED_SETCRED, rules); + set_data_header(data, sizeof(*data), PRIV_CRED_SETCRED, conf); /* Not really necessary, but helps to catch programming errors. */ data->new_cred = NULL; data->setcred_flags = 0; *** 13 LINES SKIPPED *** From nobody Fri May 29 16:01:33 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRp4s6D0Gz6flRw for ; Fri, 29 May 2026 16:01:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRp4s2NZXz3GtL for ; Fri, 29 May 2026 16:01:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070493; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3EPuKbd7wBR5Y/Kzwv3OrSfpO6Saa3GjndvocnAtWiY=; b=ao9vP+Dtao1QTVLFWEOR/X6M7BxuZazdHU8bCZ1wV0qKjbjk9pIRmEZcHzVyLexnnchVOC xF9d37a+d24R33SQXL2BQ0mjwzKYtFDK5Mtwh6+f4B8dJN6Uxdd+MxrY6ZzCW0LbYIAd+B WKFt5V+mkaQ8Oe43C6hDotdzOEIY8HRhW+rfIlnSXxO9df+qyrlm42IyiIue7RMELaBIKd Os1xyajqabSHXMkYypzHivkvkyUlC9mxXdTvhR51d5g6jE7elH3VNp6/4ts3dVr/9eKTvF 4d5imnN5hRNn3JYCDa6WWflWksQbflF6TtDkyRkGxiAeJcTf2jWrHvSeK9d+SQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780070493; a=rsa-sha256; cv=none; b=SOZXPwzScGflwBlv81ijQBM7iGI/brLgu0YPnQZu7E/GQc7IH6uQ8JU2KVd6zSo5JtetGS cSlSVKTNWaIorDcU9Ywo8shZPfHDX10JdsvM4ube4W+4djuSWnm0Bv2SskC+2i6pV9AVC/ t41djtZY18C2QqxS3mw3E3dyZSmdv5P73u1GxZ2IgrXwZzCPEeAuRVotVxlBz6Db9famB3 dfkSuPaOa6UIeh5ycwhmBFITj0Gbg8kIf5eKPxUgSy3f7p7zUoSAZKYLwt+0bT04jxLpUp 76ZGM55Fc7jxslynoVh0Mzr7M1DgLYOlClMwnh97MkCFp8jEwUnUR9TadCBmcg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070493; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3EPuKbd7wBR5Y/Kzwv3OrSfpO6Saa3GjndvocnAtWiY=; b=m8AiOaD0YOgSnXU7pogoVSHZS9FvDeQ+p+CJpDq/zMzWyxcKcpHu12lJ+JzFPU3z9HLftg tLgx6kwbgWQzdiwbOwXY+9Wn0rcn3R8w8J47UWy896ziuiFYwcHn7P2+o1yeHWgwJPsPIi fIq3BWopWFMazOjx8bmiEper/nyFwgB8BjeYaIba5fmqcMbwjs8PDhu7iN3YYP3AvSGB64 FlR0yqDcfYHFd+fDaS3Az6hIczxQm0+gXrpqXMsAxZ6hgEqFpZEHLP3BbE2GNiUEIufSdG EWwcDukBqld8Kx94ySMDzLPVTmeOiHkhwSg7Y3gk/TZlTNMwvS5Gc01ST04c0w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRp4s1wyFzg6V for ; Fri, 29 May 2026 16:01:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36016 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 16:01:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 3a4433425e63 - main - MAC/do: Executable paths: Accept an empty string List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3a4433425e63f88e70078a354bd404d7ea6ca3ce Auto-Submitted: auto-generated Date: Fri, 29 May 2026 16:01:33 +0000 Message-Id: <6a19b85d.36016.2de3173d@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=3a4433425e63f88e70078a354bd404d7ea6ca3ce commit 3a4433425e63f88e70078a354bd404d7ea6ca3ce Author: Olivier Certner AuthorDate: 2026-04-28 13:37:50 +0000 Commit: Olivier Certner CommitDate: 2026-05-29 15:21:22 +0000 MAC/do: Executable paths: Accept an empty string This effectively allows to disable mac_do(4) by setting the executable paths to an empty string, realizing a symmetry with rules to be leveraged in subsequent commits. Reviewed by: bapt Fixes: 9818224174c4 ("MAC/do: Executable paths feature (GSoC 2025's final state)") MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38 --- sys/security/mac_do/mac_do.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sys/security/mac_do/mac_do.c b/sys/security/mac_do/mac_do.c index dc5d3d29d988..dd349c3f1a67 100644 --- a/sys/security/mac_do/mac_do.c +++ b/sys/security/mac_do/mac_do.c @@ -1151,12 +1151,6 @@ parse_exec_paths(const char *const string, struct exec_paths *const exec_paths, exec_paths->exec_path_count++; } - if (exec_paths->exec_path_count == 0) { - make_parse_error(parse_error, 0, "No valid exec paths found"); - error = EINVAL; - goto error; - } - MPASS(error == 0 && *parse_error == NULL); out: free(copy, M_MAC_DO); From nobody Fri May 29 16:01:34 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRp4v146cz6flRx for ; Fri, 29 May 2026 16:01:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRp4t3Rgwz3H2x for ; Fri, 29 May 2026 16:01:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070494; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vvGuqvhQOmgquyoN8sy6S9GI2Qou2at+bAWm7WGE2Cs=; b=aG2WpqLFhN2DnBwEK3Td0Dy3I2H4MZBINnsW3YAKs2adocEvegg4UzL3zCGCcrR3EiOygC 8lLnIyMtqfKw2YLvDbcTRvDyHF5M5e/BbgFUVzRKMucQtWJH6U+gP8pYtObWzU+R4y/QmY QW+Xy+r2SwMsoyVeBhVj+62a+lyD/AGG9veXOOfCTTAXMZclG6sAkN9KdJbVM1r0HdiDJT BL0WTmg/DhO6J57MD0VexIA4il4U8Hb2xx79WI6gtt5zD8/kS/AfpYHXWOEEhbwQ2OwdJB M9gZdTGIR8T+mJafgVQBipvffQSn7gRJANMHAjMSFW0ekyxSv+ZP3DS6SpVvDQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780070494; a=rsa-sha256; cv=none; b=qGlxfp5GNfGpPHy9xPVgV3ldXrL0/sFmRhfzVYQDkHBKJ+9ppLsqZDFagv6fkLljglKde9 jddA6z8GZOLvagQolrhA0qu5mlFjqeJVN9eaNEk46LtSdBraRb6S2KL9sYEJFqdTjCLrQb wmCqGAc5WnuUsO8qv0Dmv24d9v/e/i2WWcbJi1MyMNckBhD+m5CSfg1iiJ+GneE63bNL3A ms5uHG4PHsY/orST0XIpz4j3Q+w5WD4IUgMCwIQ56QSUMvVoJ8MZyr9aFjjb5wKJOJY+nd +3N7TCRNc4no2ZE39urHMNJP4rkHvPry09picc3bKuDIt365m3nOrWOpc9/jzg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070494; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vvGuqvhQOmgquyoN8sy6S9GI2Qou2at+bAWm7WGE2Cs=; b=HBi8kqqatpiRFrJkvRNbEYOxFwAxWXgBAJ4qVfLGDtnTMbylCwQhKLnZZd7o5GfgJrPlVn scnAGWzV5mI25unEyH794Fpa6F90fjBoh6p/CIqdJZaMojmKc0/9Th2ZWMtmTYUnLGg+MI pAfcExEgI/JChgCT4WqCeBbZ5/MXSSAMM4K4U3a0zGECLnDP0OVNZ7/IiILSK9Sln/+zJ0 1OjmBMMMcL0NJAiLt0DPdUubyK98nfqDJipd4O0w5CAnRwFAdpcAzizeCjvmTcPj+0megh KaROE6wls2wxtW3iS0mWE7uhwBTMxKR3D68FiShRmDaMIlt/8ontb1wDGck0kg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRp4t2khvzgrh for ; Fri, 29 May 2026 16:01:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35d24 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 16:01:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 28ebab7c3730 - main - MAC/do: Rename size constants/variables to clear confusion with string lengths List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 28ebab7c3730105f06f982950e9aee4130469906 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 16:01:34 +0000 Message-Id: <6a19b85e.35d24.665c0b23@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=28ebab7c3730105f06f982950e9aee4130469906 commit 28ebab7c3730105f06f982950e9aee4130469906 Author: Olivier Certner AuthorDate: 2026-03-23 16:13:37 +0000 Commit: Olivier Certner CommitDate: 2026-05-29 15:21:44 +0000 MAC/do: Rename size constants/variables to clear confusion with string lengths These constants represent buffer sizes in bytes, not string lengths. While here, move MAX in EXEC_PATHS_MAXLEN at start, like the other constants. While here, fix the prefix of the old MAC_RULE_STRING_LEN accordingly. No functional change. Reviewed by: bapt Fixes: 8aac90f18aef ("mac_do: add a new MAC/do policy and mdo(1) utility") Fixes: 9818224174c4 ("MAC/do: Executable paths feature (GSoC 2025's final state)") MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38 --- sys/security/mac_do/mac_do.c | 68 ++++++++++++++++++++++---------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/sys/security/mac_do/mac_do.c b/sys/security/mac_do/mac_do.c index dd349c3f1a67..ab6c21b38063 100644 --- a/sys/security/mac_do/mac_do.c +++ b/sys/security/mac_do/mac_do.c @@ -47,10 +47,10 @@ SYSCTL_INT(_security_mac_do, OID_AUTO, print_parse_error, CTLFLAG_RWTUN, static MALLOC_DEFINE(M_MAC_DO, "mac_do", "mac_do(4) security module"); -#define EXEC_PATHS_MAXLEN 2048 -#define MAX_EXEC_PATHS 8 +#define MAX_EXEC_PATHS_SIZE 2048 +#define MAX_EXEC_PATHS 8 -#define MAC_RULE_STRING_LEN 1024 +#define MAX_RULE_STRING_SIZE 1024 static unsigned osd_jail_slot; static unsigned osd_thread_slot; @@ -157,7 +157,7 @@ struct id_spec { /* * This limits the number of target clauses per type to 65535. With the current - * value of MAC_RULE_STRING_LEN (1024), this is way more than enough anyway. + * value of MAX_RULE_STRING_SIZE (1024), this is way more than enough anyway. */ typedef uint16_t id_nb_t; /* We only have a few IT_* types. */ @@ -178,12 +178,12 @@ struct rule { STAILQ_HEAD(rulehead, rule); struct rules { - char string[MAC_RULE_STRING_LEN]; + char string[MAX_RULE_STRING_SIZE]; struct rulehead head; }; struct exec_paths { - char exec_paths_str[EXEC_PATHS_MAXLEN]; + char exec_paths_str[MAX_EXEC_PATHS_SIZE]; char exec_paths[MAX_EXEC_PATHS][PATH_MAX]; int exec_path_count; }; @@ -353,14 +353,14 @@ toast_rules(struct rules *const rules) static void init_rules(struct rules *const rules) { - _Static_assert(MAC_RULE_STRING_LEN > 0, "MAC_RULE_STRING_LEN <= 0!"); + _Static_assert(MAX_RULE_STRING_SIZE > 0, "MAX_RULE_STRING_SIZE <= 0!"); STAILQ_INIT(&rules->head); } static void init_exec_paths(struct exec_paths *const exec_paths) { - _Static_assert(EXEC_PATHS_MAXLEN > 0, "EXEC_PATHS_MAXLEN <= 0!"); + _Static_assert(MAX_EXEC_PATHS_SIZE > 0, "MAX_EXEC_PATHS_SIZE <= 0!"); bzero(exec_paths, sizeof(*exec_paths)); exec_paths->exec_paths_str[0] = 0; } @@ -1034,7 +1034,7 @@ einval: * Must be called with '*parse_error' set to NULL. Returns 0 on success, with * '*rulesp' made to point to a 'struct rule' representing the rules. On error, * the returned value is non-zero and '*rulesp' is unchanged. If 'string' has - * length greater or equal to MAC_RULE_STRING_LEN, ENAMETOOLONG is returned. If + * length greater or equal to MAX_RULE_STRING_SIZE, ENAMETOOLONG is returned. If * it is not in the expected format, EINVAL is returned. If an error is * returned, '*parse_error' is set to point to a 'struct parse_error' giving an * error message for the problem. @@ -1062,10 +1062,10 @@ parse_rules(const char *const string, struct rules *const rules, char *copy, *p, *rule; int error = 0; - if (len >= MAC_RULE_STRING_LEN) { + if (len >= MAX_RULE_STRING_SIZE) { make_parse_error(parse_error, 0, "Rule specification string is too long (%zu, max %zu)", - len, MAC_RULE_STRING_LEN - 1); + len, MAX_RULE_STRING_SIZE - 1); return (ENAMETOOLONG); } @@ -1108,10 +1108,10 @@ parse_exec_paths(const char *const string, struct exec_paths *const exec_paths, char *copy, *p, *path; int error = 0; - if (len >= EXEC_PATHS_MAXLEN) { + if (len >= MAX_EXEC_PATHS_SIZE) { make_parse_error(parse_error, 0, "Exec path specification string is too long (%zu, max %u)", - len, EXEC_PATHS_MAXLEN - 1); + len, MAX_EXEC_PATHS_SIZE - 1); return (ENAMETOOLONG); } @@ -1315,7 +1315,7 @@ set_default_conf(struct prison *const pr) struct conf *const conf = alloc_conf(); strlcpy(conf->exec_paths.exec_paths_str, "/usr/bin/mdo", - EXEC_PATHS_MAXLEN); + MAX_EXEC_PATHS_SIZE); strlcpy(conf->exec_paths.exec_paths[0], "/usr/bin/mdo", PATH_MAX); conf->exec_paths.exec_path_count = 1; @@ -1428,7 +1428,7 @@ error: static int mac_do_sysctl_rules(SYSCTL_HANDLER_ARGS) { - char *const buf = malloc(MAC_RULE_STRING_LEN, M_MAC_DO, M_WAITOK); + char *const buf = malloc(MAX_RULE_STRING_SIZE, M_MAC_DO, M_WAITOK); struct prison *const td_pr = req->td->td_ucred->cr_prison; struct prison *pr; struct conf *conf; @@ -1436,10 +1436,10 @@ mac_do_sysctl_rules(SYSCTL_HANDLER_ARGS) int error; conf = find_conf(td_pr, &pr); - strlcpy(buf, conf->rules.string, MAC_RULE_STRING_LEN); + strlcpy(buf, conf->rules.string, MAX_RULE_STRING_SIZE); prison_unlock(pr); - error = sysctl_handle_string(oidp, buf, MAC_RULE_STRING_LEN, req); + error = sysctl_handle_string(oidp, buf, MAX_RULE_STRING_SIZE, req); if (error != 0 || req->newptr == NULL) goto out; @@ -1464,13 +1464,13 @@ SYSCTL_PROC(_security_mac_do, OID_AUTO, rules, SYSCTL_JAIL_PARAM_SYS_SUBNODE(mac, do, CTLFLAG_RW, "Jail MAC/do parameters"); -SYSCTL_JAIL_PARAM_STRING(_mac_do, rules, CTLFLAG_RW, MAC_RULE_STRING_LEN, +SYSCTL_JAIL_PARAM_STRING(_mac_do, rules, CTLFLAG_RW, MAX_RULE_STRING_SIZE, "Jail MAC/do rules"); static int mac_do_sysctl_exec_paths(SYSCTL_HANDLER_ARGS) { - char *const buf = malloc(EXEC_PATHS_MAXLEN, M_MAC_DO, M_WAITOK); + char *const buf = malloc(MAX_EXEC_PATHS_SIZE, M_MAC_DO, M_WAITOK); struct prison *const td_pr = req->td->td_ucred->cr_prison; struct prison *pr; struct conf *conf; @@ -1478,10 +1478,10 @@ mac_do_sysctl_exec_paths(SYSCTL_HANDLER_ARGS) int error; conf = find_conf(td_pr, &pr); - strlcpy(buf, conf->exec_paths.exec_paths_str, EXEC_PATHS_MAXLEN); + strlcpy(buf, conf->exec_paths.exec_paths_str, MAX_EXEC_PATHS_SIZE); prison_unlock(pr); - error = sysctl_handle_string(oidp, buf, EXEC_PATHS_MAXLEN, req); + error = sysctl_handle_string(oidp, buf, MAX_EXEC_PATHS_SIZE, req); if (error != 0 || req->newptr == NULL) goto out; @@ -1503,7 +1503,7 @@ SYSCTL_PROC(_security_mac_do, OID_AUTO, exec_paths, 0, 0, mac_do_sysctl_exec_paths, "A", "Colon-separated list of allowed executables"); -SYSCTL_JAIL_PARAM_STRING(_mac_do, exec_paths, CTLFLAG_RW, EXEC_PATHS_MAXLEN, +SYSCTL_JAIL_PARAM_STRING(_mac_do, exec_paths, CTLFLAG_RW, MAX_EXEC_PATHS_SIZE, "Jail MAC/do executable paths"); static int @@ -1568,7 +1568,7 @@ mac_do_jail_check(void *obj, void *data) { struct vfsoptlist *opts = data; char *rules_string, *exec_paths_string; - int error, jsys, rules_len = 0, exec_paths_len = 0; + int error, jsys, rules_size = 0, exec_paths_size = 0; bool has_rules, has_exec_paths; error = vfs_copyopt(opts, "mac.do", &jsys, sizeof(jsys)); @@ -1587,26 +1587,26 @@ mac_do_jail_check(void *obj, void *data) } /* - * We use vfs_getopt() below instead of vfs_getopts() to get the length. - * We perform the additional checks done by the latter here, even if - * jail_set() calls vfs_getopts() itself later (they becoming - * inconsistent wouldn't cause any security problem). + * We use vfs_getopt() below instead of vfs_getopts() to get the + * string's buffer size. We perform the additional checks done by the + * latter here, even if jail_set() calls vfs_getopts() itself later + * (they becoming inconsistent wouldn't cause any security problem). */ /* Rules. */ error = vfs_getopt(opts, "mac.do.rules", (void **)&rules_string, - &rules_len); + &rules_size); if (error == ENOENT) rules_string = NULL; else { if (error != 0) return (error); - if (rules_len == 0 || rules_string[rules_len - 1] != '\0') { + if (rules_size == 0 || rules_string[rules_size - 1] != '\0') { vfs_opterror(opts, "'mac.do.rules' not a proper string"); return (EINVAL); } - if (rules_len > MAC_RULE_STRING_LEN) { + if (rules_size > MAX_RULE_STRING_SIZE) { vfs_opterror(opts, "'mac.do.rules' too long"); return (ENAMETOOLONG); } @@ -1614,19 +1614,19 @@ mac_do_jail_check(void *obj, void *data) /* Executable paths. */ error = vfs_getopt(opts, "mac.do.exec_paths", - (void **)&exec_paths_string, &exec_paths_len); + (void **)&exec_paths_string, &exec_paths_size); if (error == ENOENT) exec_paths_string = NULL; else { if (error != 0) return (error); - if (exec_paths_len == 0 || - exec_paths_string[exec_paths_len - 1] != '\0') { + if (exec_paths_size == 0 || + exec_paths_string[exec_paths_size - 1] != '\0') { vfs_opterror(opts, "'mac.do.exec_paths' not a proper string"); return (EINVAL); } - if (exec_paths_len > EXEC_PATHS_MAXLEN) { + if (exec_paths_size > MAX_EXEC_PATHS_SIZE) { vfs_opterror(opts, "'mac.do.exec_paths' too long"); return (ENAMETOOLONG); } From nobody Fri May 29 16:01:35 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRp4w0jvZz6flPR for ; Fri, 29 May 2026 16:01:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRp4v43Kkz3H71 for ; Fri, 29 May 2026 16:01:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070495; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BdzfrOuC0h1KEOGJx75uOjhe2ykcdvnInCq1Jjj1KKs=; b=dLXEg44+p31nMzPR40NIcXM+wH682tKBbue9xpNajju+FijF0h3GmtneWNgm71bTiNqVia TYXLWWi5GDMtoCXeuJvEOL4FlXtnTUjvblLyMKMC5nM9AlX/0xgB6N8hY1KjkjuPcPzLoe 6D4RHmbbMdTV4cwhKKl4mEd+/QTE5lQEyoJ01h4CjY+ivvq2XOHnm1GZP2wmIbhrVie+VS +wgeRDMk74w6b08bbB9rnAbNfkXyHnMliR5B/ktTqukHSE9W1sqgeKiS+/QPUzeG0uCizq gZLtbCrWRUNguva9A7wcvxenZs5QjUvXKqTs/+eTpocq2RDUeXgKOmAMaY3yUQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780070495; a=rsa-sha256; cv=none; b=DANhVy2n5ULe9DWbAXL2vJ2biFc+zNkKoavfI6oZePcOIpfjVaYxJSv/01QYPfbpD0y0BY DkAJZvGPsvPc3mY1im2cReJPoL15yiWFwgspjgSupHpR1eliN9W2rQ/7qXo2QIpn4DJRa7 2aCd9topIX4kyIky8EJMhFEG0zLfdBaWkMYZG/tFNrFCKfK7Ii4Gec/oQMQhrqMADZsBDd AJLbJIM8CMCjInJZP8aoauu8YRP68mMwdan7tGaD796T92TbGvGPHCox7zjkrF/91c2xiC teIkq/gk3G8hBdg3dhYRI0xAvJU5G3EkYrAC4Odz0Y+g31H8EoPMthRCX79w5g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070495; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BdzfrOuC0h1KEOGJx75uOjhe2ykcdvnInCq1Jjj1KKs=; b=aZG2X6ljh9u+UEhDpFtzqH+js/V1USL3crmLGv/6fmznaoz9a+PH7gHRss8kODvyWFRxXD wepUMRkisPfWQegBr09R5lA8PvSyaFurwZhXqA5HQfvAZ7OntXWLcoW+MJ/vTeXCUNCXhw G4bqvJHZpAo4f0ex2sRb4qaGelsgPgbLX7mGqzbW3JJEGLi9JqVkJQf2s75njQZBPuWtzg 5FLo3IxLLHRWQIiQKqKb1PPCPm/7Xeh9pHXfpPcOUL76yuVto8jJ5uGJF8LY4q/Gv0iBeu 0qHlzb+DTeoLaMkfJb0Y6ezE+I+yydwoh/L5ebsTc8b4q0SJo2KVR9ZUoVojKA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRp4v3c7Xzgrj for ; Fri, 29 May 2026 16:01:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 346b4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 16:01:35 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: cf942ac9e967 - main - MAC/do: find_conf(): Turn an MPASS() into a KASSERT() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cf942ac9e967055286a7076bf76e9a62e1d22d8f Auto-Submitted: auto-generated Date: Fri, 29 May 2026 16:01:35 +0000 Message-Id: <6a19b85f.346b4.2d2a568@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=cf942ac9e967055286a7076bf76e9a62e1d22d8f commit cf942ac9e967055286a7076bf76e9a62e1d22d8f Author: Olivier Certner AuthorDate: 2026-04-27 12:16:46 +0000 Commit: Olivier Certner CommitDate: 2026-05-29 15:21:55 +0000 MAC/do: find_conf(): Turn an MPASS() into a KASSERT() Turn the pre-existing comment into an assertion message, with an update following the introduction of the "executable paths" feature. Explain in a comment why this situation cannot happen. Without INVARIANTS, such a situation would cause an immediate panic() (NULL is dereferenced in the next iteration of the loop), so leave the check under INVARIANTS only. Reviewed by: bapt MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38 --- sys/security/mac_do/mac_do.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sys/security/mac_do/mac_do.c b/sys/security/mac_do/mac_do.c index ab6c21b38063..3d0ce2b49baa 100644 --- a/sys/security/mac_do/mac_do.c +++ b/sys/security/mac_do/mac_do.c @@ -1184,7 +1184,15 @@ find_conf(struct prison *const pr, struct prison **const aprp) prison_unlock(cpr); ppr = cpr->pr_parent; - MPASS(ppr != NULL); /* prison0 always has rules. */ + /* + * 'prison0' normally always have a mac_do(4) configuration + * because we installed one on module load/activation and + * nothing can destroy it as 'prison0' is not a regular jail and + * the 'mac.do' parameter cannot be set to 'inherit' on it, + * which is the only way to clear an existing configuration. + */ + KASSERT(ppr != NULL, + ("MAC/do: 'prison0' must always have a configuration.")); cpr = ppr; } From nobody Fri May 29 16:01:36 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRp4x1f9kz6flPd for ; Fri, 29 May 2026 16:01: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRp4w573sz3HRX for ; Fri, 29 May 2026 16:01:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070496; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QjUCqDLr2bG6q3GqBtkL4/0s6O8RtdT7aDxuryyPqIc=; b=ATJY23Gc/biYO6eiDFcmskKxdoRLQtwZz5PhEZpKSlbmM/lmgH1cWEaNNVYktA7kdhcqko cS7/4XrILm3Hq3xsjI7NP/XHucYqJU9EmFB7jf4hMf/DhCa0Cb6IAuM1JVt7+IjSU8sFCV z0sqz/bc4iJlQxZA07t6qyCa189+GzRjAlo6if3fStFct/r0Olz7bezYUQDE0h+rqKPr05 PYoltxFgxFwyk5zt70r+E9X2/7i65fUqhhe47jxUwkCWpQpf0P0FLYy435TkhsgXn4fSYl R54J82Q2BwxskhkhsuDfmhm7tM0vho+d/s9nzGGYyGmAmCBIW6CKZhJLx17kdQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780070496; a=rsa-sha256; cv=none; b=ZWDUkahA7yhYyRpQl9IWrDD7AMSLth99DSkNc8pJOBSTCHufP/QUHbFGkjV7WkN84JOBCF 6TJENl/DyUt1BVOjx6aaoR0DPpHf0sgcVVw80coyEjmUwqeGPodISOE0IzkRLumJNVzIMs tZtdTsP7ub5J+tNYUb37w+RARvU8cpiqCxeJn9Z3WrI9YJ+21IPM4zf6V8FecoCOWxTaY3 7EwuQ3ukNSM90whSlRR+w4zh0a5d6p4SwwrN9u+5DEWvKcx4U2uP0OTxfdobqsBlvrqrt5 v51oneLTLIp/mComP0TSZNkordr7tuXD2/osFUUkO3wkYOfTP/twelKA7ap8kA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070496; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QjUCqDLr2bG6q3GqBtkL4/0s6O8RtdT7aDxuryyPqIc=; b=wUk93CZ3me2NW4VpYE0PVUJ/UCPzIi8uE4M5mQ9SxB4rzp/MsMvAacvQpLf2R/VUAj1Aik yXDhmJEPrdFxUKYoAsZALpduX3a0lTmuHIhQva34TGZ9zEN7wuzhVc7mUrlgsIps26Qmhv CFJldPgoV2rmJAL7Cb7qEG7GkFWK4GJgIo0rJJhXUz8XLVDYQGKuV8Lqz565wSRlcnflsg /PFyb6VuvjkgkloKibmkkZ2kANWZ7+tn7G+ju8qIKIkQ2UXCxLLPcHWoMVaomnxd/DyVy/ 0uYpW/5SV09y+bFQELhNBAEXdPoDGdPqz2CYeLfWFdAp0sSwfHqt25bk2QERFw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRp4w4Yt5zgQv for ; Fri, 29 May 2026 16:01:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 367a2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 16:01:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: cd1ac0440935 - main - MAC/do: Move hold_conf() and drop_conf() earlier List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cd1ac04409359ec1357e23752f20b22f5055ddfa Auto-Submitted: auto-generated Date: Fri, 29 May 2026 16:01:36 +0000 Message-Id: <6a19b860.367a2.539585dc@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=cd1ac04409359ec1357e23752f20b22f5055ddfa commit cd1ac04409359ec1357e23752f20b22f5055ddfa Author: Olivier Certner AuthorDate: 2026-04-27 12:55:05 +0000 Commit: Olivier Certner CommitDate: 2026-05-29 15:22:01 +0000 MAC/do: Move hold_conf() and drop_conf() earlier This is in preparation for using hold_conf() in find_conf(). Reviewed by: bapt MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38 --- sys/security/mac_do/mac_do.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/sys/security/mac_do/mac_do.c b/sys/security/mac_do/mac_do.c index 3d0ce2b49baa..cb351cef15ce 100644 --- a/sys/security/mac_do/mac_do.c +++ b/sys/security/mac_do/mac_do.c @@ -1160,6 +1160,21 @@ error: goto out; } +static void +hold_conf(struct conf *const conf) +{ + refcount_acquire(&conf->use_count); +} + +static void +drop_conf(struct conf *const conf) +{ + if (refcount_release(&conf->use_count)) { + toast_rules(&conf->rules); + free(conf, M_MAC_DO); + } +} + /* * Find configuration applicable to the passed prison. * @@ -1200,21 +1215,6 @@ find_conf(struct prison *const pr, struct prison **const aprp) return (conf); } -static void -hold_conf(struct conf *const conf) -{ - refcount_acquire(&conf->use_count); -} - -static void -drop_conf(struct conf *const conf) -{ - if (refcount_release(&conf->use_count)) { - toast_rules(&conf->rules); - free(conf, M_MAC_DO); - } -} - #ifdef INVARIANTS static void check_conf_use_count(const struct conf *const conf, u_int expected) From nobody Fri May 29 16:01:37 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRp4y2xC9z6flF5 for ; Fri, 29 May 2026 16:01: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRp4x5zfJz3HPg for ; Fri, 29 May 2026 16:01:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070497; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bKqAWvH+FBHFg8Q7AkA35xHLXEKaDPr0cMRnKk9DbWw=; b=YdoexmHeSGfJ6RJh+grxN00kYEeOB9r9mmme26b80/z69wvTxWijGvgaZB9SS1LaHgijqz efasnaQLY17gq6Om5j5N9nxlbx8h0rEViJhn+MmbkC0OZxor3OTAGwJkZMHqHwiC7Dsw5/ mHj0W6aiPLb7Zqak8fyGfvrXSFuFjuZLlBEtBzlk2d7R2gqgp0anl60stuQ2B2U/+o1znM 3aZiY6u/gw2q1MqVzI7aYGe4ziPVXDheQtbopqiPBAiwjD72C4Ik3xjS2qNTmGL2hscyEb qHDQ0o5mjfc3KG7VV0/htl5OHOP5eHYvEYr5VhMvj6/9pqypYtOLD/TF2lAnEA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780070497; a=rsa-sha256; cv=none; b=BlFn1KE6n6YyUsH4ixAGebW8pVvllXHTAdxGtIp40CrWLVh3v7DKqRkQOAFZJWpEIsOgLt C1AcjC5w8zgIynbZCPZd7N5dRYzacsss8eGUjye2jMEBziFxKQs7rN9OuEv9HWw4X4Iky3 sqLF4VhSXK6S1jrMQgIiEvAjqqu4Z00u4Xd4poktiQK3l5hnT3fQ8u4uQi3P3ZINStwXCS kW0JMYW5ivh1f1dSYLOpjH/I4z1XEIMensN8bDbk+YtWyPiaLGQuOrj/7cvb4xeTh/ia4V EGBJoN3vC9jeSQwoC3vMTr+MDWJ8iyz/vqbQ1+PdgSZujAr4l7L7qxZG0Qlgeg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070497; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bKqAWvH+FBHFg8Q7AkA35xHLXEKaDPr0cMRnKk9DbWw=; b=FvPebxKrj5Y/9NnmbGaao+PZx3SUrlAy3Wry4TVBYc6FXD79j+ZfBHpaqJyRdqCOi3jx/y /mGJ6rXeTBky9geKbrRCOfUOrvE+93cOm2BMycefR4cHZipjKk3FvmIJp5Z2jQT4behEKU XTcqTO5QHv/vyYa0l0Q5bwtzzdKSgiU3SVS8gbLjE+kQ4AymTh1YJ9uUnJELpYAkdug2l8 /rGqnJcX4Kp7ff3nDD6gusYY/sXXwS1Bbj5FyO3sRlgNVDTYMUrRHFm2AptIGGcoDjS4/J tduQcj7k33JwSEY1IylMWxgcbKjbR0h38pEEnUR1CSqaNbs+tj1y2wD9TbbLqw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRp4x5NrFzgQw for ; Fri, 29 May 2026 16:01:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36524 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 16:01:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 4e4cf18b85cc - main - MAC/do: find_conf(): Return configuration with a true reference List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4e4cf18b85cc51f41bcae20114f9c0e7b69f76e0 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 16:01:37 +0000 Message-Id: <6a19b861.36524.14a4bcac@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=4e4cf18b85cc51f41bcae20114f9c0e7b69f76e0 commit 4e4cf18b85cc51f41bcae20114f9c0e7b69f76e0 Author: Olivier Certner AuthorDate: 2026-04-27 14:39:15 +0000 Commit: Olivier Certner CommitDate: 2026-05-29 15:22:09 +0000 MAC/do: find_conf(): Return configuration with a true reference In addition to the applicable configuration, find_conf() was returning a pointer to the actual jail holding the configuration object, with that jail's mutex locked in order to ensure liveness of the returned configuration (if we wouldn't, a concurrent thread modifying the jail's configuration could destroy this configuration object underneath us). But: 1. Ensuring configuration stability by owning the holding jail's mutex requires callers to either keep that mutex locked for a longer period of time than just accessing the corresponding 'struct prison' (in general, bad for concurrency with other operations involving jails) or to perform an additional dance to acquire a real reference in case the jail's mutex, for some reason (in general, LORs or acquiring a sleepable lock) must be dropped before use. 2. Most code does not actually need to know which jail holds the applicable configuration but for unlocking the jail's mutex. Having to deal with the jail holding the configuration can cause confusion about which jail (the current one, or the one holding the configuration) must be used (and actually did in the very initial version of MAC/do, which had a serious flaw as a consequence). So, do not keep a lock on the holding jail. Instead, ensure configuration stability by always acquiring a true reference from the start and passing it to the caller. Those callers not doing the dance mentioned above now need to free it when finished (but this need replaces the one to unlock the prison). Additionally, only return the holding jail if explicitly requested by the caller. mac_do_jail_get() is currently the only caller that needs it, in order to be able to reliably report if the configuration is inherited. Reviewed by: bapt MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38 --- sys/security/mac_do/mac_do.c | 83 +++++++++++++++++++++----------------------- 1 file changed, 40 insertions(+), 43 deletions(-) diff --git a/sys/security/mac_do/mac_do.c b/sys/security/mac_do/mac_do.c index cb351cef15ce..a2259ed777ae 100644 --- a/sys/security/mac_do/mac_do.c +++ b/sys/security/mac_do/mac_do.c @@ -1178,14 +1178,19 @@ drop_conf(struct conf *const conf) /* * Find configuration applicable to the passed prison. * - * Returns the applicable configuration (and never NULL). 'pr' must be - * unlocked. 'aprp' is set to the (ancestor) prison holding these, and it must - * be unlocked once the caller is done accessing the configuration. '*aprp' is - * equal to 'pr' if and only if the current jail has its own specific - * configuration. + * Returns the applicable configuration (which always exists), with an + * additional reference that must be freed by the caller. 'pr' must not be + * locked. + * + * The applicable configuration is that of the closest ancestor prison + * (including itself) of the passed prison that actually has a 'struct conf' + * associated to it. + * + * If 'hpr' is not NULL, it is used to return a pointer to the (unlocked) prison + * holding the applicable configuration. */ static struct conf * -find_conf(struct prison *const pr, struct prison **const aprp) +find_conf(struct prison *const pr, struct prison **const hpr) { struct prison *cpr, *ppr; struct conf *conf; @@ -1211,7 +1216,11 @@ find_conf(struct prison *const pr, struct prison **const aprp) cpr = ppr; } - *aprp = cpr; + hold_conf(conf); + prison_unlock(cpr); + + if (hpr != NULL) + *hpr = cpr; return (conf); } @@ -1386,7 +1395,6 @@ static int parse_and_set_conf(struct prison *pr, const char *rules_string, const char *exec_paths_string, struct parse_error **parse_error) { - struct prison *ppr = NULL; struct conf *applicable_conf = NULL; struct conf *conf; int error = 0; @@ -1395,11 +1403,8 @@ parse_and_set_conf(struct prison *pr, const char *rules_string, need_applicable_conf = (rules_string == NULL || rules_string[0] == '\0' || exec_paths_string == NULL || exec_paths_string[0] == '\0'); - if (need_applicable_conf) { - applicable_conf = find_conf(pr, &ppr); - hold_conf(applicable_conf); - prison_unlock(ppr); - } + if (need_applicable_conf) + applicable_conf = find_conf(pr, NULL); conf = alloc_conf(); @@ -1437,22 +1442,20 @@ static int mac_do_sysctl_rules(SYSCTL_HANDLER_ARGS) { char *const buf = malloc(MAX_RULE_STRING_SIZE, M_MAC_DO, M_WAITOK); - struct prison *const td_pr = req->td->td_ucred->cr_prison; - struct prison *pr; + struct prison *const pr = req->td->td_ucred->cr_prison; struct conf *conf; struct parse_error *parse_error = NULL; int error; - conf = find_conf(td_pr, &pr); + conf = find_conf(pr, NULL); strlcpy(buf, conf->rules.string, MAX_RULE_STRING_SIZE); - prison_unlock(pr); error = sysctl_handle_string(oidp, buf, MAX_RULE_STRING_SIZE, req); if (error != 0 || req->newptr == NULL) goto out; /* Set our prison's rules, not that of the jail we inherited from. */ - error = parse_and_set_conf(td_pr, buf, NULL, &parse_error); + error = parse_and_set_conf(pr, buf, NULL, &parse_error); if (error != 0) { if (print_parse_error) printf("MAC/do: Parse error at index %zu: %s\n", @@ -1461,6 +1464,7 @@ mac_do_sysctl_rules(SYSCTL_HANDLER_ARGS) } out: + drop_conf(conf); free(buf, M_MAC_DO); return (error); } @@ -1479,21 +1483,19 @@ static int mac_do_sysctl_exec_paths(SYSCTL_HANDLER_ARGS) { char *const buf = malloc(MAX_EXEC_PATHS_SIZE, M_MAC_DO, M_WAITOK); - struct prison *const td_pr = req->td->td_ucred->cr_prison; - struct prison *pr; + struct prison *const pr = req->td->td_ucred->cr_prison; struct conf *conf; struct parse_error *parse_error = NULL; int error; - conf = find_conf(td_pr, &pr); + conf = find_conf(pr, NULL); strlcpy(buf, conf->exec_paths.exec_paths_str, MAX_EXEC_PATHS_SIZE); - prison_unlock(pr); error = sysctl_handle_string(oidp, buf, MAX_EXEC_PATHS_SIZE, req); if (error != 0 || req->newptr == NULL) goto out; - error = parse_and_set_conf(td_pr, NULL, buf, &parse_error); + error = parse_and_set_conf(pr, NULL, buf, &parse_error); if (error != 0) { if (print_parse_error) printf("MAC/do: Parse error at index %zu: %s\n", @@ -1502,6 +1504,7 @@ mac_do_sysctl_exec_paths(SYSCTL_HANDLER_ARGS) } out: + drop_conf(conf); free(buf, M_MAC_DO); return (error); } @@ -1527,20 +1530,19 @@ mac_do_jail_create(void *obj, void *data) static int mac_do_jail_get(void *obj, void *data) { - struct prison *ppr, *const pr = obj; + struct prison *const pr = obj; struct vfsoptlist *const opts = data; - struct conf *conf; - struct rules *rules; - struct exec_paths *exec_paths; + struct prison *hpr_out; + struct conf *const applicable_conf = find_conf(pr, &hpr_out); + const struct prison *const hpr = hpr_out; + const struct rules *const rules = &applicable_conf->rules; + const struct exec_paths *const exec_paths = &applicable_conf->exec_paths; int jsys, error; - conf = find_conf(pr, &ppr); - rules = &conf->rules; - exec_paths = &conf->exec_paths; - - jsys = pr == ppr ? + jsys = hpr == pr ? (STAILQ_EMPTY(&rules->head) ? JAIL_SYS_DISABLE : JAIL_SYS_NEW) : JAIL_SYS_INHERIT; + error = vfs_setopt(opts, "mac.do", &jsys, sizeof(jsys)); if (error != 0 && error != ENOENT) goto done; @@ -1556,7 +1558,7 @@ mac_do_jail_get(void *obj, void *data) error = 0; done: - prison_unlock(ppr); + drop_conf(applicable_conf); return (error); } @@ -2290,11 +2292,10 @@ mac_do_priv_grant(struct ucred *cred, int priv) static int check_proc(void) { + struct prison *const pr = curproc->p_ucred->cr_prison; char *path, *to_free; struct conf *conf; struct exec_paths *exec_paths; - struct prison *td_pr; - struct prison *pr; int error; /* @@ -2319,8 +2320,7 @@ check_proc(void) return (EPERM); error = EPERM; - td_pr = curproc->p_ucred->cr_prison; - conf = find_conf(td_pr, &pr); + conf = find_conf(pr, NULL); exec_paths = &conf->exec_paths; for (int i = 0; i < exec_paths->exec_path_count; i++) @@ -2329,8 +2329,7 @@ check_proc(void) break; } - prison_unlock(pr); - + drop_conf(conf); free(to_free, M_TEMP); return (error); } @@ -2338,7 +2337,7 @@ check_proc(void) static void mac_do_setcred_enter(void) { - struct prison *pr; + struct prison *const pr = curproc->p_ucred->cr_prison; struct mac_do_setcred_data * data; struct conf *conf; int error; @@ -2362,9 +2361,7 @@ mac_do_setcred_enter(void) /* * Find the currently applicable rules. */ - conf = find_conf(curproc->p_ucred->cr_prison, &pr); - hold_conf(conf); - prison_unlock(pr); + conf = find_conf(pr, NULL); /* * Setup thread data to be used by other hooks. From nobody Fri May 29 16:01:39 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRp503pKTz6flPm for ; Fri, 29 May 2026 16:01: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRp500QBWz3Hb8 for ; Fri, 29 May 2026 16:01:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070500; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CKKRAzQlnHhjfS4JhY5p7i6tAGnj+C0vppgH5Ig6zXc=; b=yFMm81EdIyz/468JSpusLNi2pFTvVyM73O6vp2d0D1OD6wgkH4Y9X1G50wpaERRuNUDWW4 O49zjS8n6WqOTy/JkE/RLwjICnRyDj463qQD63g+6o17UFloUq7vxa+3NmDFWvQVGwjoXz a3cc23CyaOeHeNV5wdizJK9tXB0jg2IFwXDG3Xay7VyPrsI+cdmYfYuzU6FKXzLJhxRohZ EkctDPrXwgT1Pm8z+8UTGjruVrNQhJjsIEb2mVBYvz2T8AlcvOJohZm0SvkiqL1cYs1Em6 GlHu3Uct0cTsKDebdQqM961r3LR7q6UuZWaDdOE2559E08EA3OwS8H4Nzp+cWw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780070500; a=rsa-sha256; cv=none; b=aR69ntAS3wkb0BiY3XEUFwziU/xm8IKyfyhBCgzghUjaHuiNK4iJ7Ke9w3hzcke1hIIvBE 3zXWb1CWzITU9UPQQNlCe3yKiOCfo6o/H4AjD2DmrpoG0n4kDv2YaqfwR1OfQYwuwQ10kU aG+Kz5xqz3aRSPFGdm54YRSqEzs/AJbxmgfsQ+EhgG1JReCN+8rskln/fIu/I4jg9EUrMr L/S23DB8j9KuEVtkfmZhagtT3Ekrb9qfGzg17ap4Epmthf8IXObC1a4BYBjfYxxUB6H54l 0il2rHJyWQWJXMogUEpo5ztHetKCGARWJLhgNrYMVzXBQbIFLXlqtqZynRbJGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070500; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CKKRAzQlnHhjfS4JhY5p7i6tAGnj+C0vppgH5Ig6zXc=; b=OHmjaHOSO+AZJNvsoDAK4wf6yDvvLeRu3tv95Pnr3Pc++ebYqpLIXSDnG3HHzg3GojxsPp K+e/SpQsnMaHwWia0nfOjf7sjmLOEM0UsiGBM23x8aoimf3iuo93gCfvzx/7JIgYnLUgpu xig03O6GF3L4fIACmbdEQ3ZbfIZvv2H9lksgfZ8/IOuXKt0Obn4hzloC/TkCo3e183LE9C 2PYOW+c/GWTe53xvPC1LthlpwbqxNvbbpW48LxDf8RPaVdDe8/WK0covy7AW8IrA22TjCd MHc2nvaIWTJrKOGiNt+rtJ14tRKLK5KtLAHi4MVej7Fk4VpAoKZZ+7VTDsQf7w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRp4z74p6zgQy for ; Fri, 29 May 2026 16:01:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3601e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 16:01:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 68cc6aa2e93a - main - MAC/do: Constify clone_rules() and clone_exec_paths()'s source argument List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 68cc6aa2e93a2a2969eb40b5588452eeb1805fa6 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 16:01:39 +0000 Message-Id: <6a19b863.3601e.6c6fad73@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=68cc6aa2e93a2a2969eb40b5588452eeb1805fa6 commit 68cc6aa2e93a2a2969eb40b5588452eeb1805fa6 Author: Olivier Certner AuthorDate: 2026-04-27 16:24:01 +0000 Commit: Olivier Certner CommitDate: 2026-05-29 15:22:32 +0000 MAC/do: Constify clone_rules() and clone_exec_paths()'s source argument Defensive programming. Reviewed by: bapt MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38 --- sys/security/mac_do/mac_do.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/security/mac_do/mac_do.c b/sys/security/mac_do/mac_do.c index 58abf1a8f608..7a08cdd5425f 100644 --- a/sys/security/mac_do/mac_do.c +++ b/sys/security/mac_do/mac_do.c @@ -1350,7 +1350,7 @@ set_default_conf(struct prison *const pr) */ static void -clone_rules(struct rules *dst, struct rules *const src) +clone_rules(struct rules *const dst, const struct rules *const src) { struct rule *src_rule, *dst_rule; @@ -1382,7 +1382,8 @@ clone_rules(struct rules *dst, struct rules *const src) } static void -clone_exec_paths(struct exec_paths *dst, struct exec_paths *const src) +clone_exec_paths(struct exec_paths *const dst, + const struct exec_paths *const src) { bzero(dst, sizeof(*dst)); dst->exec_path_count = src->exec_path_count; From nobody Fri May 29 16:01:38 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRp4z1ldyz6flPj for ; Fri, 29 May 2026 16:01: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRp4y74tjz3HZw for ; Fri, 29 May 2026 16:01:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070499; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kFcb9ZEc3mjBdzo3YHx2YQvrAIosGUc0ssCmoUOw6AM=; b=OxHE42WmOJZuFeMsa9VEOvMK/1MvLFO6MjVS4gTv9z1sNdF1GOjykaOkSt5nQ1z6JwrPff 8eXbDzyq3P/VwURLcr4vQlgzNRK+53I50EegKpaKQyPqFky2o+eODmbU3hKHjl8hqOWfux FFm93ZLNBHV+CtAxKQ7oJ2Vv1T7pdsSAi1y0WFJxLL1BTtwAFtV+LzgJzJeQsfwJ/HVH5a mjp8TTA15wAKr5AuGZ+HODZtrm0B++beHg24BrCvlf7OKQDHG05XrM6o8VvvZiayh8EGTg HDpiFMquat4lTkng98Km52E2G6t/6VbqgCPklEVjAEKUCpjWrwsU5un5jpNsoQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780070499; a=rsa-sha256; cv=none; b=sJSv6kATViCdhmzFmGa97JR2YxTmLPJGewLPR7wMS/3tAyyPLT+SBNbbUu8EOmO7E1oQNt ByjW7qhHPJCwkh9scJ3Ojcgg8E+Dz32fBCbDHQAYeY6M93Ht+Wu8X85XgeiOXzInJMdxYi ksxktrdHhuMUmFqFUJW16BhwPYbtALB7OpxfHFIIdpSXwWVKVyWZdkgIL+ECWdMFYhKgXv wphso9zrQNsJqjvA1+QdZ6LERYjZDfxrcvFzQMhX2KJtEW3R3jqyuyJ7Hk/dOxGSdemxi8 tAryjgcOTVvebUpfWERGK5cHMVWWxnezfDJRF+S2Zu5LPOAkoJhIAJBYhv4F5A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070499; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kFcb9ZEc3mjBdzo3YHx2YQvrAIosGUc0ssCmoUOw6AM=; b=L9ifCrUl2LHkpKHW1cpPYCHSh9Qy3ehXsTa2tA6pwej8bmth75pP043VxMYqXIuf4bGgmi ObWQppAALitlDJnfTNJwj5SHEOPmMAmsBp6Fn1oZgcCsXBR2oCbAVqKyU8PrDv3S9FtczB rCjccAngx9f6HKMR7yfxWzDJVXm0A5XJ4/r6d7s/AdsL0A8My9eYFFS7tT/SOYJboMEA1P eofzJ6xbRCXcXnMmGZ50SGWFVlyMK0WVnGqRtgnZmsXk5fov+xlay0ApxLkgmZ94nJ7/91 yOBCfAHuQUVlBOZBfjnJn1c3sp1OIfpqOUMd92C9PsgBaecmKUJOr2S+arBzGg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRp4y6Dtfzg9C for ; Fri, 29 May 2026 16:01:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3601a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 16:01:38 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: a7a9e6cc64aa - main - MAC/do: Fix releasing a nonexistent reference on configuration parsing error List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a7a9e6cc64aa90a899aad9ea1395bfc77bb26f48 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 16:01:38 +0000 Message-Id: <6a19b862.3601a.7ce95a22@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=a7a9e6cc64aa90a899aad9ea1395bfc77bb26f48 commit a7a9e6cc64aa90a899aad9ea1395bfc77bb26f48 Author: Olivier Certner AuthorDate: 2026-04-28 08:42:01 +0000 Commit: Olivier Certner CommitDate: 2026-05-29 15:22:21 +0000 MAC/do: Fix releasing a nonexistent reference on configuration parsing error On parsing error, parse_and_set_conf(), introduced with the recent "executable paths" feature, has been calling drop_conf() on the being-built configuration. However, that configuration structure is allocated through alloc_conf(), which does not grab a reference. Calling drop_conf() on it, which releases a reference, is thus erroneous, and causes the underlying counter to saturate, translating into a memory leak. To fix this bug, make alloc_conf() grab a reference on the newly-created 'struct conf', and rename it to new_conf() to be more in line with what it does. Keep set_conf() as is, i.e., grabbing an additional reference on behalf of the jail that is going to hold the configuration. Consequently, make sure that callers of alloc_conf() unconditionally drop the reference acquired by the latter before returning (i.e., even if set_conf() has been called). While here, since hold_conf() is always used to obtain additional references on a configuration (new_conf() does not use it, instead directly setting the use count), add an assertion that it is never used on a configuration that has no references at all (which indicates that the configuration has been destroyed). These changes generally simplify the lifecycle of configurations, reducing the probability of re-introducing reference mismatches (at the expense of slightly more reference counting operations, but performance does not matter here). Reviewed by: bapt Fixes: 9818224174c4 ("MAC/do: Executable paths feature (GSoC 2025's final state)") MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38 --- sys/security/mac_do/mac_do.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/sys/security/mac_do/mac_do.c b/sys/security/mac_do/mac_do.c index a2259ed777ae..58abf1a8f608 100644 --- a/sys/security/mac_do/mac_do.c +++ b/sys/security/mac_do/mac_do.c @@ -366,14 +366,14 @@ init_exec_paths(struct exec_paths *const exec_paths) } static struct conf * -alloc_conf(void) +new_conf(void) { struct conf *const conf = malloc(sizeof(*conf), M_MAC_DO, M_WAITOK | M_ZERO); init_rules(&conf->rules); init_exec_paths(&conf->exec_paths); - conf->use_count = 0; + refcount_init(&conf->use_count, 1); return (conf); } @@ -1163,7 +1163,10 @@ error: static void hold_conf(struct conf *const conf) { - refcount_acquire(&conf->use_count); + int old_count __diagused = refcount_acquire(&conf->use_count); + + KASSERT(old_count != 0, + ("MAC/do: Trying to resurrect a destroyed configuration.")); } static void @@ -1329,7 +1332,7 @@ set_conf(struct prison *const pr, struct conf *const conf) static void set_default_conf(struct prison *const pr) { - struct conf *const conf = alloc_conf(); + struct conf *const conf = new_conf(); strlcpy(conf->exec_paths.exec_paths_str, "/usr/bin/mdo", MAX_EXEC_PATHS_SIZE); @@ -1337,6 +1340,7 @@ set_default_conf(struct prison *const pr) conf->exec_paths.exec_path_count = 1; set_conf(pr, conf); + drop_conf(conf); } /* @@ -1406,7 +1410,7 @@ parse_and_set_conf(struct prison *pr, const char *rules_string, if (need_applicable_conf) applicable_conf = find_conf(pr, NULL); - conf = alloc_conf(); + conf = new_conf(); if (rules_string != NULL && rules_string[0] != '\0') { error = parse_rules(rules_string, &conf->rules, parse_error); @@ -1429,12 +1433,12 @@ parse_and_set_conf(struct prison *pr, const char *rules_string, MPASS(error == 0 && *parse_error == NULL); out: + drop_conf(conf); if (applicable_conf != NULL) drop_conf(applicable_conf); return (error); error: MPASS(error != 0 && *parse_error != NULL); - drop_conf(conf); goto out; } From nobody Fri May 29 16:01:41 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRp515n3kz6flPv for ; Fri, 29 May 2026 16:01: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRp510s2rz3HSF for ; Fri, 29 May 2026 16:01:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070501; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qs2ktg24z9KFQOsT8rCIrDXJthUBb9JjXDV+BlkyOLg=; b=eRZF9Auuv6qF9GNEMQMS3hy+uWtvRIlbpW2lXIbCctIvyzJHmouLLTMKeXxAZcgcz+8GGJ Dzk50e1mNjW6t4KGYFfNCr5nSBKg92tYEGhIsI1YUj07ghJx6JxDw71EWfmJZUqI8OdOml A0S/HO2Ygh/VEV7Kh+6HJDO7JNUN7mtYkIgDL767ri2m2wTvUdNTrp3A2wcvjDwMoDzT6J XUTU5P7miHfGucp3hQHPIjEkGwa0Csn6Ed6teQE9BGstsAx7Ybci2bSxs/ZPPkpQDOKhwr 9k2fF6j0+1Rcx7C5dIllqNSn95JjIB2hXgQztYs5hcRrtXeobAIWSkgWEIEcgA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780070501; a=rsa-sha256; cv=none; b=MCz0fnrc2D+8rmKLL3P5g0gNqtXMM4c/minzbzARNHdtf4BOXyptYedfUmSKvqAgaJRjOb hmMvBErq06awxA3QFgm+0F8vwKHXUYHbAVVhmIKu52M6DScxKk18Cj1EgWhtOf97StKwsx iVRRgoHK3NVJDpYS6mIqtQA8VRFeRp7lay62tyAUXK6RQnIenLUyeiS9ERZ7ezs47bFWm3 2GBrEfXbDX2o+cNEcukAPZET5zu2ZLoFa9y/EBG5KKPJRmOxaRGrGzWo+Is9BcvtPxRGQb sEghhbG8uGjwmqhiOgE4oGxodqX4rzKAMafyHqDsWyJGwdg0LaasYpo6UFIV8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070501; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qs2ktg24z9KFQOsT8rCIrDXJthUBb9JjXDV+BlkyOLg=; b=wVxU5nE1zVUR97kgN3myOC26JzaT0WffQvhthSbYD8YWGsKPHKtCsGHcrALbnMwDJRTjqq ctXWFBxkZSZPaaS5zphICGNc2Ls3e2+0LXjRDrMS9JnoK3VBWciMLtO8bvp56zI+O4/6/a mBfABs+A6hij0AJ7w/xDtDTtZMltZ7x3tY4S+SzLyA03LnzBZLMpDHS1Z1xIDbQamqLHpx CHMWjniX31mkpkFxRD4j60WGYWji8Un+UwesZSEpebYDlx8bk5AJHI5HIBS6tR+pASGrto ZB4vKgUAKpDsHJQDA4ON/UDWr0H3JVXHeO7GFKs26KC3uu/gOZP61mn5tyh0pg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRp510Q03zg6Z for ; Fri, 29 May 2026 16:01:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36528 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 16:01:41 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 4e27cc086b3f - main - MAC/do: Move static assertions on constants close to their definitions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4e27cc086b3f9e029160da8830abacb06a2f9e39 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 16:01:41 +0000 Message-Id: <6a19b865.36528.531ce00e@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=4e27cc086b3f9e029160da8830abacb06a2f9e39 commit 4e27cc086b3f9e029160da8830abacb06a2f9e39 Author: Olivier Certner AuthorDate: 2026-05-20 09:38:37 +0000 Commit: Olivier Certner CommitDate: 2026-05-29 15:22:43 +0000 MAC/do: Move static assertions on constants close to their definitions And document more clearly their purpose. Reviewed by: bapt MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38 --- sys/security/mac_do/mac_do.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sys/security/mac_do/mac_do.c b/sys/security/mac_do/mac_do.c index 7a08cdd5425f..1d9b756bc0fc 100644 --- a/sys/security/mac_do/mac_do.c +++ b/sys/security/mac_do/mac_do.c @@ -47,10 +47,14 @@ SYSCTL_INT(_security_mac_do, OID_AUTO, print_parse_error, CTLFLAG_RWTUN, static MALLOC_DEFINE(M_MAC_DO, "mac_do", "mac_do(4) security module"); +#define MAX_RULE_STRING_SIZE 1024 +_Static_assert(MAX_RULE_STRING_SIZE > 0, + "MAX_RULE_STRING_SIZE: No space for the NUL terminator!"); + #define MAX_EXEC_PATHS_SIZE 2048 #define MAX_EXEC_PATHS 8 - -#define MAX_RULE_STRING_SIZE 1024 +_Static_assert(MAX_EXEC_PATHS_SIZE > 0, + "MAX_EXEC_PATHS_SIZE: No space for the NUL terminator!"); static unsigned osd_jail_slot; static unsigned osd_thread_slot; @@ -353,14 +357,12 @@ toast_rules(struct rules *const rules) static void init_rules(struct rules *const rules) { - _Static_assert(MAX_RULE_STRING_SIZE > 0, "MAX_RULE_STRING_SIZE <= 0!"); STAILQ_INIT(&rules->head); } static void init_exec_paths(struct exec_paths *const exec_paths) { - _Static_assert(MAX_EXEC_PATHS_SIZE > 0, "MAX_EXEC_PATHS_SIZE <= 0!"); bzero(exec_paths, sizeof(*exec_paths)); exec_paths->exec_paths_str[0] = 0; } From nobody Fri May 29 16:01:43 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRp5373rfz6flNH for ; Fri, 29 May 2026 16:01: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRp532wN1z3HWH for ; Fri, 29 May 2026 16:01:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070503; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d1fRAtUftT22uAmxat0XUe+AqZAgw8TyJa8vQ1BsKYg=; b=kXRBykQCdDr/KRA+DcV5AilIPB3hgBxDWqq5WqexkoNBCXniQWuvzk6j6+EKxKd+Cbb+8s YviTPmDjuL32vhWcwY5N7ZUuDi0Trcu+Sh1oBRtiPgURw6SFSnn39mkTh0pc/2bK5n+D3g F9gLU1Uw7LzdeK5D5GpWCH1Jz7DG4Tqw24shMdIE2aOZ9KHPSxLaVx51s7wGXk2+XX6Mm8 Ipe6KFpUuwd3DHhz3Efe4jOg7unLK6qjDg5q4rWEMZTpyFZCVyWkRJhnYQQveZYXrRugjF mY3+UnhVi8CCmBLuaEmAWIR9rkJ4x0rU6S/lEOBBfiTRBtCY+ROO3hUe/+SCNA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780070503; a=rsa-sha256; cv=none; b=m8G/ygmn1mH5ySTt1fPMvPIuTtVTzkHDk4yFqt9JJRbmcFLyfvnfyYDPoi6NmYq+Bl+HmX 5jkILjKLKVzmVs61xyafvJEuz3OOggxWJdJDEl7R674XkOYYiPN5bVCE/6kl0YN/jv6uwP CYTM7I9tx8gu7m5njnrPEPZRChiJy/vLwfFiliu7aM7jkRw2Ya+9KACyHc1UCAWG0EMfg0 zx0XbFekDLUZungQ4lZqdcY5zS9wB/uZWkbZLY0jqH+vR+r0cPa760J2yF1FLRX70P6Nh0 oJA+rKVXYBon03tBUinSuaM1J8VHCtfCwICj/RWOSFXzmfjntlvSEAP3Y83sCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070503; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d1fRAtUftT22uAmxat0XUe+AqZAgw8TyJa8vQ1BsKYg=; b=YdnXZlr1adxLt9XEvGdbsUgVC81v/Ixm6+Sy3UutSc0JC1xZUCfUgfUB4S8gA1/3ifpUS3 Da3Aga5oxTQKRZ9XkMp7KmpAE9wVm5ueKeuyB3TbeOosZIDQvhpizRFNNQSwvsngRuhykU pBZwcAsC5vtw71zXCF/pEJswoyPfC1hjwAQJIaTWpYB8ZNKixwQEGlVRjAeu4L3pGW8NHQ E/xuBAsBzk75IZeXwBgNvkCz5gTbxnp2dPz2MMQdnkiB6oS4J2IlUxgyrBZ9IE4Ou+ud4H wxtq/WCe4pSKu7AYatfjnEfTTsJmBRYxhtGESjtvreYeTjSWgC4KAsLisB7RXQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRp531zwdzgcg for ; Fri, 29 May 2026 16:01:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36088 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 16:01:43 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: ce59a4181593 - main - MAC/do: clone_rules(): Readability improvements, constification List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ce59a4181593f59028d3a26f2b63dcf2c8041d79 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 16:01:43 +0000 Message-Id: <6a19b867.36088.150fa440@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=ce59a4181593f59028d3a26f2b63dcf2c8041d79 commit ce59a4181593f59028d3a26f2b63dcf2c8041d79 Author: Olivier Certner AuthorDate: 2026-05-20 10:33:41 +0000 Commit: Olivier Certner CommitDate: 2026-05-29 15:23:04 +0000 MAC/do: clone_rules(): Readability improvements, constification Constify in order to let the compiler check that source and destination arguments are passed in the proper order in the different calls. No functional change (intended). Reviewed by: bapt MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38 --- sys/security/mac_do/mac_do.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/sys/security/mac_do/mac_do.c b/sys/security/mac_do/mac_do.c index fa20beadbaad..b24daaf093c0 100644 --- a/sys/security/mac_do/mac_do.c +++ b/sys/security/mac_do/mac_do.c @@ -1370,27 +1370,29 @@ set_default_conf(struct prison *const pr) static void clone_rules(struct rules *const dst, const struct rules *const src) { - struct rule *src_rule, *dst_rule; + const struct rule *src_rule; strlcpy(dst->string, src->string, sizeof(dst->string)); STAILQ_FOREACH(src_rule, &src->head, r_entries) { - dst_rule = malloc(sizeof(*dst_rule), M_MAC_DO, M_WAITOK | - M_ZERO); + struct rule *const dst_rule = malloc(sizeof(*dst_rule), + M_MAC_DO, M_WAITOK); bcopy(src_rule, dst_rule, sizeof(*dst_rule)); if (src_rule->uids_nb > 0) { - dst_rule->uids = malloc(sizeof(*dst_rule->uids) * - src_rule->uids_nb, M_MAC_DO, M_WAITOK); - bcopy(src_rule->uids, dst_rule->uids, - sizeof(*dst_rule->uids) * src_rule->uids_nb); + const size_t uids_size = sizeof(*dst_rule->uids) * + src_rule->uids_nb; + + dst_rule->uids = malloc(uids_size, M_MAC_DO, M_WAITOK); + bcopy(src_rule->uids, dst_rule->uids, uids_size); } if (src_rule->gids_nb > 0) { - dst_rule->gids = malloc(sizeof(*dst_rule->gids) * - src_rule->gids_nb, M_MAC_DO, M_WAITOK); - bcopy(src_rule->gids, dst_rule->gids, - sizeof(*dst_rule->gids) * src_rule->gids_nb); + const size_t gids_size = sizeof(*dst_rule->gids) * + src_rule->gids_nb; + + dst_rule->gids = malloc(gids_size, M_MAC_DO, M_WAITOK); + bcopy(src_rule->gids, dst_rule->gids, gids_size); } STAILQ_INSERT_TAIL(&dst->head, dst_rule, r_entries); From nobody Fri May 29 16:01:42 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRp523qMpz6flSJ for ; Fri, 29 May 2026 16:01: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRp522K4rz3HbT for ; Fri, 29 May 2026 16:01:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070502; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tkqa2enoSH3eChTmWAMsobUyghtmBWAfY94eJohBqf4=; b=xGk3EDY52sccMdsL7y/06kDhXSWbk99Gx0QKe+WeMNqT1NRQr6PcAEmFtO1vnqHPPdb7HF y/jCCWYKP1MAng2EQHqyv15vbdyIsIm6/Q9FhIoa1JRM4w/DvdDqcEyQHu/9gfxKhLNONd lMKjbYCTRrTzDXQ+DtlDWtmHM/iuJ/Oj/jt+GoNZbatIdMyWwpXLOXv3hN7USgn2PjvjqB Cc1LGG+gYIup5HiK8v2crUoOIeh7f2QA0LpPkjdG/8C3K8+kK8jxMCnZcGco0I3AavhyAI 5jbhyopHxeDQkBVaZ9GefsKE91diaU0OCQwzI2shDgIyZ7nYBpVHmyBJUzVLvg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780070502; a=rsa-sha256; cv=none; b=P+LIn6ao9QlKVyg8vnVL32/CWoaDJfabDJZDQgOIDOnmaIoZkSDe8SB7alKI7UNpUvs8Ht RIzMSoz9gsKWCOKf9NIpNi5Hkd956qYNZsv05klv7VgIa5+cGJsD7O7DvAJfZMpVgv+5Yj ZYpad7TJmMjCRA85KxFMIRjz1w+jsc9gWny660dnHQa7dBvZMc6ecqoxYyavp5ykIUMpyP VHU7Un/1FxHMoFu7jL4OwCayOBkfV+XaBPln77l/8dLG4cf3mlQcZ2yOanoMv/Fovz+H6r iVLQkAgjnjY0ccRhqvgw1BZ5J/iQlHtvJVQUELAM/3/P22wfQOtSAlPIU+bhNQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070502; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tkqa2enoSH3eChTmWAMsobUyghtmBWAfY94eJohBqf4=; b=j4kSMM1IaoQ99TV507SbJzaSi4oIVE7QXMmdt46zSow1p8qE2GsY7C9K+pX4px3kZ3wBP5 jz854+PCNc9fnp52n9zShZ0Q68ObmPZrcd66fLrjSTAH+ZyJOkewD/DnkR97uPRYSw7N5Z Q5PCZOFgx39VMu9b0XGbcamDBWV6uDecv7T5Qw0BxNzyPIZe9y0Um1+rAAewOQkJQ1LmtU TkIM5M3A29kWWddz333QZdszZp/3QkB5mJDrgbwUcrVmdVOeaoO27mHfKpTV1MRx6Ja9Hm CPICuXWFy/WCdiHyOUz5ctkwbnPo4bh/je1BcbNnuNrKl1r/fU7/Ze022EzaMQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRp521Cnfzg9G for ; Fri, 29 May 2026 16:01:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35dfa by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 16:01:42 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 11b567e94ad2 - main - MAC/do: Remove superfluous configuration initialization List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 11b567e94ad2a1b4baf768d77c6f1fb2018cfe83 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 16:01:42 +0000 Message-Id: <6a19b866.35dfa.21209291@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=11b567e94ad2a1b4baf768d77c6f1fb2018cfe83 commit 11b567e94ad2a1b4baf768d77c6f1fb2018cfe83 Author: Olivier Certner AuthorDate: 2026-05-20 09:29:51 +0000 Commit: Olivier Certner CommitDate: 2026-05-29 15:22:49 +0000 MAC/do: Remove superfluous configuration initialization Configuration objects would be initialized (zeroed, and some STAILQ_INIT() called) multiple times. Make sure they are so only once, and add assertions to check that this is actually the case for functions that expect it. Reviewed by: bapt MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38 --- sys/security/mac_do/mac_do.c | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/sys/security/mac_do/mac_do.c b/sys/security/mac_do/mac_do.c index 1d9b756bc0fc..fa20beadbaad 100644 --- a/sys/security/mac_do/mac_do.c +++ b/sys/security/mac_do/mac_do.c @@ -33,6 +33,23 @@ #include +#ifdef INVARIANTS +/* + * Should typically be moved to libkern (and perhaps libc) at some point, and be + * optimized if to be used outside of INVARIANTS. + */ +static bool +is_zeroed(const void *const buf, const size_t size) +{ + const char *const p = buf; + + for (size_t i = 0; i < size; ++i) + if (p[i] != 0) + return (false); + return (true); +} +#endif + static SYSCTL_NODE(_security_mac, OID_AUTO, do, CTLFLAG_RW|CTLFLAG_MPSAFE, 0, "mac_do policy controls"); @@ -353,25 +370,24 @@ toast_rules(struct rules *const rules) } } -/* Assumes storage has been zeroed. */ -static void +static inline void init_rules(struct rules *const rules) { + MPASS(is_zeroed(rules, sizeof(*rules))); STAILQ_INIT(&rules->head); } -static void +static inline void init_exec_paths(struct exec_paths *const exec_paths) { - bzero(exec_paths, sizeof(*exec_paths)); - exec_paths->exec_paths_str[0] = 0; + MPASS(is_zeroed(exec_paths, sizeof(*exec_paths))); } static struct conf * new_conf(void) { - struct conf *const conf = malloc(sizeof(*conf), M_MAC_DO, M_WAITOK | - M_ZERO); + struct conf *const conf = malloc(sizeof(*conf), M_MAC_DO, + M_WAITOK | M_ZERO); init_rules(&conf->rules); init_exec_paths(&conf->exec_paths); @@ -1356,9 +1372,7 @@ clone_rules(struct rules *const dst, const struct rules *const src) { struct rule *src_rule, *dst_rule; - bzero(dst, sizeof(*dst)); strlcpy(dst->string, src->string, sizeof(dst->string)); - STAILQ_INIT(&dst->head); STAILQ_FOREACH(src_rule, &src->head, r_entries) { dst_rule = malloc(sizeof(*dst_rule), M_MAC_DO, M_WAITOK | @@ -1387,7 +1401,7 @@ static void clone_exec_paths(struct exec_paths *const dst, const struct exec_paths *const src) { - bzero(dst, sizeof(*dst)); + MPASS(is_zeroed(dst, sizeof(*dst))); dst->exec_path_count = src->exec_path_count; for (int i = 0; i < src->exec_path_count; i++) strlcpy(dst->exec_paths[i], src->exec_paths[i], From nobody Fri May 29 16:01:44 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRp54734Kz6flQ6 for ; Fri, 29 May 2026 16:01: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRp543FkSz3HWc for ; Fri, 29 May 2026 16:01:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070504; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kfkahbPsEfE/xnqQowDJ9iXbFoMf8DhA5G6qr3r5yZU=; b=AMn4hvCqUkU5pOr/S1AIWw/JBIuYMyhpP7W1hNcAVeqnE0zJ0deIossmJ2avxVsY33nSrv wsVdy0XMCq1Xvg5/NzIKKgwYFMim09BrHHGt4ZxR1BlKyq6+OKm7HBwN/8A7wDbPYQNn4q AkzgjTE7t+o7wIvbKkdrcvSGGT/b/Jxi4JlLtlnzYCGMRbICV2YGem6PKjZDGDK5oBSCSN laO+kOQMe3boNQXNnnycNRyiKGK1z/6HNbh8maEsQAV74gEH7YD2lyEJqdb7dU95zE3KdV Mrnt3rv9vx3sPtk55HuxLdOI3muW+4gxlu7pZpU9M3b4+meFUv7bGyWGZXBfcw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780070504; a=rsa-sha256; cv=none; b=hRyPiz3wMlgOliy04n3NJMnyBW3c68NEHDjnRdH0fImfE5l7YglOXikbRKMcQ0s72G7/a+ EkpCKekGyy0FlW1YLNGGcOEIOYQuYTPEgIByZaWLgEZXE2QeKzTOUz9dASEFn3JdWwvC5N ncHWjqS80Sb1XbJqwBVm1RutxRnYbrPFBgHED/bVu4TdhDsiFoQL5zPZjijNety83dENMi c+xUxrRrZcfTFuaawZyGkt7fBswbasR5TcphOzxTXU4vbeE+nbmNsv95hkzFZ/06AXc+6P WqiTHeTpn/p3vrkT0k47F5DadJaQis4CevxElh0aE5yfMBUwfri4uC7SnGdJAQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070504; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kfkahbPsEfE/xnqQowDJ9iXbFoMf8DhA5G6qr3r5yZU=; b=JfAKvDCisYPAFJdTntOdznGpH+fOD1TkNwT0njTuucuj+u7Rm69UqnHLVtd5PAkDN2KNW+ BPiYH/qP8dw14kW4O4UUDzRY2ACVof5xC9u3QIqfb2wkOZnDCMyrq0o5/0ixQZrj1areyj NQNrBJj7odng62jv4ZESP6rvIckW10K6hsddvGxZ++WgwfoV5IBflF+5KXo+ZntN8CUisu yZAAUelcCrzY1XtyshpOr4RNbm0O51pCbvY0+fiE97LYjPVsCxFZ4dwaa8PK0QVhOhRMvI IiP3Bi4YW9Zk1Ml/mKdZg7bMttC9yoTNbQuSYiacT9zbDMx2fU4GvTkwP19QZg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRp542pS0zgrl for ; Fri, 29 May 2026 16:01:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 342b9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 16:01:44 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: d254322f6fa4 - main - MAC/do: parse_and_set_conf(): Obey empty parameters; Add doc List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d254322f6fa46010bb94d658ff13c06ad438ee77 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 16:01:44 +0000 Message-Id: <6a19b868.342b9.21db378@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=d254322f6fa46010bb94d658ff13c06ad438ee77 commit d254322f6fa46010bb94d658ff13c06ad438ee77 Author: Olivier Certner AuthorDate: 2026-04-27 16:12:08 +0000 Commit: Olivier Certner CommitDate: 2026-05-29 15:23:10 +0000 MAC/do: parse_and_set_conf(): Obey empty parameters; Add doc parse_and_set_conf() is meant to be used in all situations when there is a need to set or modify some jail's MAC/do configuration. This entails passing the information of whether some parameter was explicitly specified. For example, an administrator setting/modifying jail parameters may not specify executable paths but only rules, in which case the executable paths value is copied from the currently-applicable configuration. The sysctl(8) knobs case always leverages this feature, since setting a knob changes one parameter at a time. Currently, a NULL or empty string argument is treated as a non-specified parameter. This causes a bug where disabling MAC/do in a jail does not actually work because, to this end, parse_and_set_conf() is passed an empty string which it then interprets as a request to copy the currently applicable configuration's value, which may well not be empty. Fix this problem by only treating NULL as a marker for a non-specified parameter, in accordance with the original design for this function. While here, write some documentation to explain the interface. While here, remove the original herald comment for parse_and_set_rules(), which was inadvertently pushed apart from the replacing parse_and_set_conf(). Reviewed by: bapt Fixes: 9818224174c4 ("MAC/do: Executable paths feature (GSoC 2025's final state)") MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38 --- sys/security/mac_do/mac_do.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/sys/security/mac_do/mac_do.c b/sys/security/mac_do/mac_do.c index b24daaf093c0..3ae5aba4bb8a 100644 --- a/sys/security/mac_do/mac_do.c +++ b/sys/security/mac_do/mac_do.c @@ -1361,12 +1361,6 @@ set_default_conf(struct prison *const pr) drop_conf(conf); } -/* - * Parse a rules specification and assign them to a jail. - * - * Returns the same error code as parse_rules() (which see). - */ - static void clone_rules(struct rules *const dst, const struct rules *const src) { @@ -1413,7 +1407,17 @@ clone_exec_paths(struct exec_paths *const dst, sizeof(dst->exec_paths_str)); } -/* Must be called with '*parse_error' set to NULL. */ +/* + * Sets/modifies the MAC/do configuration for a jail. + * + * Must be called with '*parse_error' set to NULL. + * + * Supports explicitly setting all parameters or only some of them, in which + * case the implicit ones are copied from the currently applicable configuration + * (that of the closest ancestor jail that has one). + * + * An unspecified parameter must be passed as NULL. + */ static int parse_and_set_conf(struct prison *pr, const char *rules_string, const char *exec_paths_string, struct parse_error **parse_error) @@ -1421,17 +1425,13 @@ parse_and_set_conf(struct prison *pr, const char *rules_string, struct conf *applicable_conf = NULL; struct conf *conf; int error = 0; - bool need_applicable_conf; - - need_applicable_conf = (rules_string == NULL || rules_string[0] == '\0' || - exec_paths_string == NULL || exec_paths_string[0] == '\0'); - if (need_applicable_conf) + if (rules_string == NULL || exec_paths_string == NULL) applicable_conf = find_conf(pr, NULL); conf = new_conf(); - if (rules_string != NULL && rules_string[0] != '\0') { + if (rules_string != NULL) { error = parse_rules(rules_string, &conf->rules, parse_error); if (error != 0) goto error; @@ -1439,7 +1439,7 @@ parse_and_set_conf(struct prison *pr, const char *rules_string, else if (applicable_conf != NULL) clone_rules(&conf->rules, &applicable_conf->rules); - if (exec_paths_string != NULL && exec_paths_string[0] != '\0') { + if (exec_paths_string != NULL) { error = parse_exec_paths(exec_paths_string, &conf->exec_paths, parse_error); if (error != 0) From nobody Fri May 29 16:01:46 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRp566l6vz6flVc for ; Fri, 29 May 2026 16:01: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRp564mPPz3HZD for ; Fri, 29 May 2026 16:01:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070506; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0Djgo440Q2g8Xh5TtiTQzXeTNxjx1G/c0R4ebGLFxuM=; b=nIKzS3BXTqcOj07IQMj90YzM29gs2+j7qEmfyYUk9hSeMelpwjfWKPuXwWxA1YD089a64x rSgadvgKuIlHAlMJJHPTN8nqGxWgdqBktFR0dBJeffzV3ObdL6Dq66GYYFPsZFHJ3waM4k pcP12j8/rnSVB2g+uF3raGdZqvknqnrl50gK9as7P/HBP9YrhGYrenPpxUIvr+vEY00sL1 gofL38RNOKidDUjlcXcCN0V0/43qxITvkTTTPLri3vn3wWBFcc9u9R1nDildw80q4IvbnG j3Y/xAKtLWyePqeSblOHi7QpBwkrWhGB0Jqv0RA2rHVRsgnZptn8fbnyH2RmGA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780070506; a=rsa-sha256; cv=none; b=srxdga0vN435P8SF3Or5Ed0wjavXd/OlMc2Rui7BJ9aRJqc+SKRkdij0WYykK5ybTFAx6p ruUDA2cb5HdwRJygKl98EREboKZWnyk4TFQwymNGuNOUpSp4x2hDnp0wJs2yRKE0zxS2Mr 34gpzdtKtqoWkLYls7xtpLS8zwEhsq6bL1G0Qrwd4EHIwYhCVydc46M4b5sXzpaPYBO9zg MaimuugERKzpasj2wQDlFcbPj1vvcQjhoqE0G8mlfd1Etp6gXuzIgJfcVx4ocbQ82rvrmw UaaaqJHBQI/0D6AP3wOOPotBcUEq76P5nvfPq9T1w+osQmMlDM35DHstdMdLlQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070506; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0Djgo440Q2g8Xh5TtiTQzXeTNxjx1G/c0R4ebGLFxuM=; b=llg1Vns6ZRlX4b3qDZkW3RpBngL1RxY8Oi/qYfobcgkxofT9mhk+kgvL4HJIpOzOA4Q2tS ktLlpC2c92bfw74YUskmetUCEmu0xKvO1jVcuX0j6utEsCroeppX2lrdLNwEpRs6YNX0fa oi68zfwoW1GWXfko7Wbtsp6c2fnbcDU7aj2+Q/vYRUhmpJQN6WDhLsIQk+FCPOThXcGlri 8Tc7sCO+UYoQwUxHLsgQrOkHP0LBBjOXWLUqflW7pdKx1URQcIX3//6BRKe4kAW4LrX/Ym LF767oXPHU8wcBf/a5yaRCYMv6aEYji0lNU3HfSkrDss3fVzke/N+DlY1RHkSw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRp564Cwdzg9J for ; Fri, 29 May 2026 16:01:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35dfe by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 16:01:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: dbf8f0895ad8 - main - MAC/do: Fix obsolete wording in a comment ("ascendant" => "ancestor") List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dbf8f0895ad86fea10adbd678873f8af0bd7558c Auto-Submitted: auto-generated Date: Fri, 29 May 2026 16:01:46 +0000 Message-Id: <6a19b86a.35dfe.4a06e523@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=dbf8f0895ad86fea10adbd678873f8af0bd7558c commit dbf8f0895ad86fea10adbd678873f8af0bd7558c Author: Olivier Certner AuthorDate: 2026-04-28 09:58:31 +0000 Commit: Olivier Certner CommitDate: 2026-05-29 15:25:52 +0000 MAC/do: Fix obsolete wording in a comment ("ascendant" => "ancestor") Reviewed by: bapt MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38 --- sys/security/mac_do/mac_do.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/security/mac_do/mac_do.c b/sys/security/mac_do/mac_do.c index 3da2f4ed5c80..03569fab87d6 100644 --- a/sys/security/mac_do/mac_do.c +++ b/sys/security/mac_do/mac_do.c @@ -1292,7 +1292,7 @@ dealloc_jail_osd(void *const value) * Remove the rules specifically associated to a prison. * * In practice, this means that the rules become inherited (from the closest - * ascendant that has some). + * ancestor that has some). * * Destroys the 'osd_jail_slot' slot of the passed jail. */ From nobody Fri May 29 16:01:45 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRp556rrhz6flXX for ; Fri, 29 May 2026 16:01: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRp554Qvwz3HYr for ; Fri, 29 May 2026 16:01:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070505; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0UINIjlkD8JlLp6RmMKmS62BsmmSrlfDLGFXGRxTvFY=; b=nXPzD0TPzAmj3Xfsdq//2A3eNLmg6AjFRCUerQ2TegBVg0Ds2i4/1jCsCoC7zj8HKr+qHU iH+izboOW+2CUe1vT0Vq57SexT39R/3aWb0SN4TyGnmUb1LLT7WKrnh9RIJ4bmQMqi9BHp QLT3FGyoISkNh/293OOVbQ40zRDN9CoipMigOPeQ7htovnDOvDsstCT5/ASJngxzr+G2ic 9Du5KNd0d/fzaGXxon1ST6VP7wm7vhqJ7h2dd1QDVY4x22QPjhHSVdZjDOtSkD3+Ze+1sO fw80UDjttX96GUPaegS5MMQjzvYv/XqKNbv1NYpIyPmcMJvDuN73J+C/TjSbvA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780070505; a=rsa-sha256; cv=none; b=w/mzHp6lpNFpYKGz8DUgQo+2//4ohr3qLATy/a+lRpJSHC1ivv3nfc41RUelBWeO2Lmd+x 40aC7pBqTIBIPdaJ8qp9qw21bvLtkiSHzk3sz1zjgWHodwPIUXlIFvq2zURjaN4VIF6VZN 5k1nxcetvxvQ7QiPMhVWi/rGEiXI0JmwJsunVkhtZQTiKNpaTJ8EM+ATGOYZldwWtPFWrI H9b01lkw+fzP+ZiG9BRkSlYq7W55XRVel8/1hI6lZiMDNgye64B+sLuSSogXboCBwjL8Z0 1A3wn/9cx6W6VIBDxK0dSYkHGvT6qv0ZLrJYb0PKGqt8udOsZD2Km4Lk83n+cA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070505; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0UINIjlkD8JlLp6RmMKmS62BsmmSrlfDLGFXGRxTvFY=; b=yDe5dY65wV6CUu2my8sE8t6e5PwallverhO4bt3TViKQe5fVcsNetDGNgup3xONdRojwsX +McHHW55dmoWcb0509fBEa/xSwkQjMB8XwSgRhMxjQp/fvqoepH3hDsiSLnziC52jzeBGV aNTTtYDcV+eEOZkHf1lhZ0a2GWzZn3rSBihcEMHj0Ro4IU6qxQPMzCJ+lk8Eb4PZfqkU5I GF9hQpf5sRa6ph7VNKldg5+BHis6ceUvW9183HVaaWSP/TsiWIYmGcLJf8VjbW/1QQp7Cx jEIwxPHsA1lrgOFde6xiaDs/ZhwulIag/p0L3T7NKV++VUbM8wQwGZgGviAFAA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRp553dV9zgrm for ; Fri, 29 May 2026 16:01:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 344fc by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 16:01:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 73215eba8b91 - main - MAC/do: parse_and_set_conf(): Require the model configuration List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 73215eba8b91fab37c1ad380fca04f082f3f92fd Auto-Submitted: auto-generated Date: Fri, 29 May 2026 16:01:45 +0000 Message-Id: <6a19b869.344fc.51914074@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=73215eba8b91fab37c1ad380fca04f082f3f92fd commit 73215eba8b91fab37c1ad380fca04f082f3f92fd Author: Olivier Certner AuthorDate: 2026-04-28 09:55:29 +0000 Commit: Olivier Certner CommitDate: 2026-05-29 15:25:09 +0000 MAC/do: parse_and_set_conf(): Require the model configuration This change is a prerequisite for the next change in caller mac_do_jail_set(), which for semantic correctness needs to rely on a stable model configuration. The two other callers already call find_conf() to retrieve the applicable configuration, so for these a second call to find_conf() can be saved. However, this does not fix (actually, makes slightly worse) an atomicity problem when multiple threads concurrently change some jail's configuration (or the configuration inherited by a jail), which has existed since the introduction of executable paths due to being able to change only rules or executable paths independently (and the possibility of not specifying them and having them copied from the currently applicable configuration). Before tackling it in later commits, we first focus on fixing the semantics of configuration changes in the very next patches. Reviewed by: bapt MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38 --- sys/security/mac_do/mac_do.c | 66 +++++++++++++++++++++++++------------------- 1 file changed, 38 insertions(+), 28 deletions(-) diff --git a/sys/security/mac_do/mac_do.c b/sys/security/mac_do/mac_do.c index 3ae5aba4bb8a..3da2f4ed5c80 100644 --- a/sys/security/mac_do/mac_do.c +++ b/sys/security/mac_do/mac_do.c @@ -1412,49 +1412,46 @@ clone_exec_paths(struct exec_paths *const dst, * * Must be called with '*parse_error' set to NULL. * - * Supports explicitly setting all parameters or only some of them, in which - * case the implicit ones are copied from the currently applicable configuration - * (that of the closest ancestor jail that has one). - * - * An unspecified parameter must be passed as NULL. + * Supports explicitly setting all parameters or only some of them. An + * unspecified parameter must be passed as NULL. The values of unspecified + * parameters are copied from those of the passed model configuration (which is + * expected to be the currently applicable configuration, i.e., that of the + * closest ancestor jail that has one). */ static int -parse_and_set_conf(struct prison *pr, const char *rules_string, - const char *exec_paths_string, struct parse_error **parse_error) +parse_and_set_conf(struct prison *const pr, const char *const rules_string, + const char *const exec_paths_string, const struct conf *const model_conf, + struct parse_error **const parse_error) { - struct conf *applicable_conf = NULL; - struct conf *conf; + struct conf *const conf = new_conf(); int error = 0; - if (rules_string == NULL || exec_paths_string == NULL) - applicable_conf = find_conf(pr, NULL); - - conf = new_conf(); + KASSERT(model_conf != NULL || + (rules_string != NULL && exec_paths_string != NULL), + ("MAC/do: %s: Model configuration needed!", __func__)); if (rules_string != NULL) { error = parse_rules(rules_string, &conf->rules, parse_error); if (error != 0) goto error; } - else if (applicable_conf != NULL) - clone_rules(&conf->rules, &applicable_conf->rules); + else + clone_rules(&conf->rules, &model_conf->rules); if (exec_paths_string != NULL) { error = parse_exec_paths(exec_paths_string, &conf->exec_paths, parse_error); if (error != 0) goto error; - } else if (applicable_conf != NULL) + } else clone_exec_paths(&conf->exec_paths, - &applicable_conf->exec_paths); + &model_conf->exec_paths); set_conf(pr, conf); MPASS(error == 0 && *parse_error == NULL); out: drop_conf(conf); - if (applicable_conf != NULL) - drop_conf(applicable_conf); return (error); error: MPASS(error != 0 && *parse_error != NULL); @@ -1477,8 +1474,7 @@ mac_do_sysctl_rules(SYSCTL_HANDLER_ARGS) if (error != 0 || req->newptr == NULL) goto out; - /* Set our prison's rules, not that of the jail we inherited from. */ - error = parse_and_set_conf(pr, buf, NULL, &parse_error); + error = parse_and_set_conf(pr, buf, NULL, conf, &parse_error); if (error != 0) { if (print_parse_error) printf("MAC/do: Parse error at index %zu: %s\n", @@ -1518,7 +1514,7 @@ mac_do_sysctl_exec_paths(SYSCTL_HANDLER_ARGS) if (error != 0 || req->newptr == NULL) goto out; - error = parse_and_set_conf(pr, NULL, buf, &parse_error); + error = parse_and_set_conf(pr, NULL, buf, conf, &parse_error); if (error != 0) { if (print_parse_error) printf("MAC/do: Parse error at index %zu: %s\n", @@ -1726,6 +1722,7 @@ mac_do_jail_set(void *obj, void *data) struct vfsoptlist *opts = data; char *rules_string, *exec_paths_string; struct parse_error *parse_error = NULL; + struct conf *model_conf; int error, jsys; bool has_rules, has_exec_paths; @@ -1755,20 +1752,32 @@ mac_do_jail_set(void *obj, void *data) jsys = JAIL_SYS_DISABLE; } - switch (jsys) { - case JAIL_SYS_INHERIT: + if (jsys == JAIL_SYS_INHERIT) { + MPASS(!has_rules && !has_exec_paths); remove_conf(pr); return (0); + } + + model_conf = NULL; + switch (jsys) { case JAIL_SYS_DISABLE: rules_string = ""; has_rules = true; /* FALLTHROUGH */ case JAIL_SYS_NEW: + /* + * If 'pr' has a configuration, we want to use it as the model + * (i.e., only change what has been explicitly specified). + * Else, we want as default values those that are inherited. + */ + model_conf = !has_rules || !has_exec_paths ? + find_conf(pr, NULL) : NULL; error = parse_and_set_conf(pr, has_rules ? rules_string : NULL, has_exec_paths ? exec_paths_string : NULL, + model_conf, &parse_error); if (error != 0) { @@ -1776,15 +1785,16 @@ mac_do_jail_set(void *obj, void *data) "MAC/do: Parse error at index %zu: %s\n", parse_error->pos, parse_error->msg); free_parse_error(parse_error); - - return (error); } - - return (0); + break; default: __assert_unreachable(); } + + if (model_conf != NULL) + drop_conf(model_conf); + return (error); } /* From nobody Fri May 29 16:01:47 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRp5843pWz6flbB for ; Fri, 29 May 2026 16:01: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRp575cQnz3HhW for ; Fri, 29 May 2026 16:01:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070507; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dHtdIP1HshnJN7Q7r3mkYVYOOychWcL6RwYNQXNNmjE=; b=xNN4o9112CHGTmntFEEdWKaFWRFLkCXKV6Iu1j6ibRbRv0xKQFZwerzw1RAsEmwoV6Q3XH WyF3VWUVcDKZCQXxROUV87qZ55PJkF6ejy3vufX+o4whYfxsOQtc1lL47bM3dxuMTfsB6O f9znZ45nx7JXkh+kMF7EFzD3nao1GdFw+9OTWzO0yIdztR0lrvzp+X7q7gGEM69PlqoaLX w5sZtjotEq8JRTiv8MOch8zL6gTulT1WV8WEiqCa30wMnwI/F0EF4E7luY/twZGlL27JAo 0yDWNbqZCZ5hs713A4FNXQCDPH3LzvEmlS1jH074JCsF+X/EQHBI17ppXGFZ9A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780070507; a=rsa-sha256; cv=none; b=qnCNnsHtnmONT5HSNLX+kzcdKS3xAjd1Z0X98JwxsivtadyjM9NBOGI1LzE7XdOyPviHNl jTfqn8USWKObrg7NYUry4Ul89+9Yahc9PQoGxbVi/vLJwHhUdzmggSX1IeJCMgUbtzDM4O cENP2fTuJZLAX3dO5FWPH8URsSG2AdthQaoiBn97eUm+/apKN6y+ZrRFeUl9mU/zo4Nxaq nw/Wl87BFzROGGnmpm6kYAA+4AFuI3bWjMPooMGGtnrKiu2w0nd7nyecvpoGrAHOxhW6H0 Y36hzAv5XXnLR8HDbaxTB16cQCyk3SVBNnxVhvVSYYtnAipiJwL5NyGRnUERDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070507; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dHtdIP1HshnJN7Q7r3mkYVYOOychWcL6RwYNQXNNmjE=; b=TpN3kNTm8CmeB8rkPDenWQ4BKLQRyNFyZJ6tdHG8tGGoaflZBaEPA0aWa7IGxNaHXDiRFb Ad1TsCnVMwB8lp/F0W9TyLbRMyHJs4m19OVWJc2aJ3++apt8t2kwXAYMt+qrxRbO6lRgi7 n19bYC++XmdXTfYnZZEcTh1uIBo3Vxj/uDr3bQn8vFh4+Zx8nljBWR3tsLbwZlv/nGgU3H H17utQz4Eak9a/Evq0k7x81XtdYnqkJ1prwjOQUf5HkkQZ/bdbpNidK/2Vg2v+ffQKKk91 Xy1dVqpNgvtpnJIhESNO8l51Rkz6uFCV5C2gNyx14U97ahmg8eB8/EOeKneMpA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRp5750kfzgn1 for ; Fri, 29 May 2026 16:01:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33f53 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 16:01:47 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 37bc08d5fe99 - main - MAC/do: Constify is_null_or_empty() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 37bc08d5fe9933f41574bf477080d729daf19928 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 16:01:47 +0000 Message-Id: <6a19b86b.33f53.7429bed9@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=37bc08d5fe9933f41574bf477080d729daf19928 commit 37bc08d5fe9933f41574bf477080d729daf19928 Author: Olivier Certner AuthorDate: 2026-05-20 11:12:38 +0000 Commit: Olivier Certner CommitDate: 2026-05-29 15:26:48 +0000 MAC/do: Constify is_null_or_empty() Reviewed by: bapt MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38 --- sys/security/mac_do/mac_do.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/security/mac_do/mac_do.c b/sys/security/mac_do/mac_do.c index 03569fab87d6..493dcaf66f89 100644 --- a/sys/security/mac_do/mac_do.c +++ b/sys/security/mac_do/mac_do.c @@ -397,7 +397,7 @@ new_conf(void) } static bool -is_null_or_empty(const char *s) +is_null_or_empty(const char *const s) { return (s == NULL || s[0] == '\0'); } From nobody Fri May 29 16:01:48 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRp591hxNz6fl7x for ; Fri, 29 May 2026 16:01: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRp585zqjz3Hhh for ; Fri, 29 May 2026 16:01:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070508; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PqviM8v3AcrhTZ1hLo02YCe/YV7AeKwOTakhPitDD1Y=; b=juy9Ebl+m48K2evFt3BzbrLFILDzKDZW6Tv/pnafCmH9cp78y64Yle//cVVcNpCS4L68or ee4zQKbNsvRkWxr2C2fB7QFj6h+dh4dxR32Hwt8gbgiK3WTE2yw47lqCdDIp6g/EVfIQad r7fb+fXYvSPqh8X/GavGzm5kkipeN6PkFTU+vvjj44vFRSb6hXg/xTRgcdtNe4tdxEsP0z EkkXxek0Rvs7G4eSN2M16pVTOcFQVWWvkGd5DDu9cql8Cy/c7G1N59m2i0a8dVw6w1jXGY dZVwCg3BsVzEatVqdZUY7ZBsZMjuGh53xCk3XB7bTlERzFExDTBJgWYqVHSOQw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780070508; a=rsa-sha256; cv=none; b=UUN1uBNk2AY7IYHxsUmI/XE8gwmHVxZjQCsv+Ttkbie18AYjKG331MUJhwGsjgmrE8ifeN j2eU2W4ppGrFbdw6Cz5CnVHPg1Bbe+1qHQgETlfv1oJvqS0jQiDDjCo1AefxVEbtvZQZBd SHBdmFo0aJA//7D7TgW7Wo3N0F9w9ZH7p229B2/6aH/K/6H5yyF+vSjz5MuZd6Sh55XN38 5foRWa9W8u0jAPQ5pcj5tmYPF6LK3AIIGrZhgpZjc/Kj/TsyoeIdyB7xR/gJP6kEytJ4QC FzReDFnJY5GRSbQZfm9mWsYIYHygPnCGAM85UuVXI9oiscXhKGRToKnK+5g5yA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070508; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PqviM8v3AcrhTZ1hLo02YCe/YV7AeKwOTakhPitDD1Y=; b=BYJFpaY7Al6cFUSYvULZCiqPpJeM2U5F21w7iwjMYCF4YfBrVxqADQ38zozO196dDOx5PJ Md8On8qeLUn381asrWhyK+ovMnOqFqFdTl5qKFktMgli/jP8Y/NMxqHSMSqwYYXhX1p5r8 x5WjRsxSEA7cpFLZV/onrPXmfEuclKKUWlOSfbLkqQm7q4ExemHUfdyrhidVLG6+SwCNiq tFxMgPhUrdNkx65jESbmskHW0I3U6tm3eMT61IbrbQOXUbP4LETD1K005JdBi25eaLl5mb gmX2TIUD8LFHtj0UrKNz2HxdpAOl9ICV0CpOHds2YhoWyNPYir1oew9eOodFyA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRp585SDZzgR2 for ; Fri, 29 May 2026 16:01:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3652c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 16:01:48 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 7929f364ef51 - main - MAC/do: Fix the recent logic to set jail parameters, make it more tolerant List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7929f364ef5135f712e061d291d1c2c0fb48abde Auto-Submitted: auto-generated Date: Fri, 29 May 2026 16:01:48 +0000 Message-Id: <6a19b86c.3652c.80b6732@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=7929f364ef5135f712e061d291d1c2c0fb48abde commit 7929f364ef5135f712e061d291d1c2c0fb48abde Author: Olivier Certner AuthorDate: 2026-04-28 12:40:19 +0000 Commit: Olivier Certner CommitDate: 2026-05-29 15:27:30 +0000 MAC/do: Fix the recent logic to set jail parameters, make it more tolerant The logic introduced in the initial commit for the "executable paths" feature did not match the specification we discussed in that specifying an empty value (for rules or executable paths) on "mac.do" being "new" would be treated as an absence of value and trigger a copy from the currently applicable configuration, instead of being an override that deactivates mac_do(4) in the jail. Fix that by distinguishing both cases. More generally, a non-explicitly specified parameter is set to the same value it has in the currently applicable configuration (that of the closest ancestor jail that has one; 'prison0' (the host) always has one), with an exception in the disable case. On disable (explicit: "mac.do" to "disable", implicit: no parameters passed, or at least one is empty), now accept parameters with a non-empty value as long as at least one of them is empty (which alone is enough to disable mac_do(4)). If no parameters are passed, both are copied from the currently applicable configuration; if none of them is empty, then the rules are emptied to effectively disable mac_do(4) (see the inline comment as to why this was chosen). On explicit enable ("mac.do" to "enable"), allow not specifying any of the rules and executable paths, in which case both are copied from the currently applicable configuration (consistently with what is done when only one is missing). Note that, as mentioned above, not specifying any of them by default still resolves to disabling mac_do(4) (i.e., on no explicit "mac.do" parameter). On (explicit) inheritance, allow specifying non-empty parameters, provided they match the values we are going to inherit. This enables re-applying jail parameters' reported values verbatim to the current jail (idempotence) or, e.g., to some sibling jail. (While here, make some existing code easier to read by leveraging is_null_or_empty().) Reviewed by: bapt Fixes: 9818224174c4 ("MAC/do: Executable paths feature (GSoC 2025's final state)") MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38 --- sys/security/mac_do/mac_do.c | 201 ++++++++++++++++++++++++++++++------------- 1 file changed, 140 insertions(+), 61 deletions(-) diff --git a/sys/security/mac_do/mac_do.c b/sys/security/mac_do/mac_do.c index 493dcaf66f89..7890af9bcfec 100644 --- a/sys/security/mac_do/mac_do.c +++ b/sys/security/mac_do/mac_do.c @@ -326,6 +326,18 @@ unexpected_flags: #define check_type_and_type_flags(...) #endif /* INVARIANTS */ +static bool +has_rules(const struct rules *const rules) +{ + return (rules->string[0] != '\0'); +} + +static bool +has_exec_paths(const struct exec_paths *const exec_paths) +{ + return (exec_paths->exec_paths_str[0] != '\0'); +} + /* * Returns EALREADY if both flags have some overlap, or EINVAL if flags are * incompatible, else 0 with flags successfully merged into 'dest'. @@ -1598,7 +1610,7 @@ mac_do_jail_check(void *obj, void *data) struct vfsoptlist *opts = data; char *rules_string, *exec_paths_string; int error, jsys, rules_size = 0, exec_paths_size = 0; - bool has_rules, has_exec_paths; + bool absent_or_empty_rules, absent_or_empty_exec_paths; error = vfs_copyopt(opts, "mac.do", &jsys, sizeof(jsys)); if (error == ENOENT) @@ -1661,22 +1673,17 @@ mac_do_jail_check(void *obj, void *data) } } - /* - * Be liberal, considering that an empty rule or execution paths - * specification is equivalent to no specification. This affects the - * JAIL_SYS_DISABLE and JAIL_SYS_INHERIT sanity checks below. - */ - has_rules = rules_string != NULL && rules_string[0] != '\0'; - has_exec_paths = exec_paths_string != NULL && - exec_paths_string[0] != '\0'; + absent_or_empty_rules = is_null_or_empty(rules_string); + absent_or_empty_exec_paths = is_null_or_empty(exec_paths_string); /* If not specified, infer 'jsys' from passed options. */ if (jsys == -1) { /* * Default in absence of "mac.do.rules" and "mac.do.exec_paths" - * is to disable (and, in particular, not inherit). + * is to disable. We never implicitly inherit, as that changes + * reasoning about configurations. */ - if (has_rules || has_exec_paths) + if (!absent_or_empty_rules || !absent_or_empty_exec_paths) jsys = JAIL_SYS_NEW; else jsys = JAIL_SYS_DISABLE; @@ -1685,31 +1692,38 @@ mac_do_jail_check(void *obj, void *data) /* Final checks based on resolved 'jsys'. */ switch (jsys) { case JAIL_SYS_DISABLE: - case JAIL_SYS_INHERIT: - if (has_rules) { - vfs_opterror(opts, - "'mac.do.rules' specified but should not be when " - "'mac.do' is 'disabled' or 'inherited'"); - return (EINVAL); - } - if (has_exec_paths) { + /* + * Tolerate specified but empty rules or execution paths + * (instead of not being specified). Also, tolerate that one of + * them is not empty (but not both). Indeed, as soon as one is + * empty, mac_do(4) is effectively disabled. This allows the + * administrator to still specify a value for one of them, which + * is then used for new sub-jails that do not inherit and for + * which no value for the parameter is explicitly specified + * (because then the value passed here is copied). + */ + if (!absent_or_empty_rules && !absent_or_empty_exec_paths) { vfs_opterror(opts, - "'mac.do.exec_paths' specified but should not be " - "when 'mac.do' is 'disabled' or 'inherited'"); + "One of 'mac.do.rules' and 'mac_do.exec_paths' " + "should not be specified or should be empty when " + "'mac.do' is 'disabled'"); return (EINVAL); } break; - case JAIL_SYS_NEW: - if (!has_rules && !has_exec_paths) { - vfs_opterror(opts, "'mac.do' set to 'new' but neither " - "rules nor executable paths specified"); - return (EINVAL); - } + case JAIL_SYS_INHERIT: + /* + * Canonically, no parameters should be specified in this case. + * However, we tolerate empty ones, and also non-empty ones + * provided they match the inherited values, so that we can + * report the *resolved* value of current parameters via + * mac_do_jail_get() and have them re-applicable to this jail in + * a similar situation. Testing that inherited values are the + * same as passed ones is more expensive than a single test and + * requires some atomicity, which is why we do not perform that + * here but only in mac_do_jail_set(). + */ break; - - default: - __assert_unreachable(); } return (0); @@ -1718,13 +1732,13 @@ mac_do_jail_check(void *obj, void *data) static int mac_do_jail_set(void *obj, void *data) { - struct prison *pr = obj; - struct vfsoptlist *opts = data; + struct prison *const pr = obj; + struct vfsoptlist *const opts = data; char *rules_string, *exec_paths_string; struct parse_error *parse_error = NULL; struct conf *model_conf; int error, jsys; - bool has_rules, has_exec_paths; + bool absent_or_empty_rules, absent_or_empty_exec_paths; /* * The invariants checks used below correspond to what has already been @@ -1741,59 +1755,124 @@ mac_do_jail_set(void *obj, void *data) exec_paths_string = vfs_getopts(opts, "mac.do.exec_paths", &error); MPASS(error == 0 || error == ENOENT); - has_rules = rules_string != NULL && rules_string[0] != '\0'; - has_exec_paths = exec_paths_string != NULL && - exec_paths_string[0] != '\0'; + absent_or_empty_rules = is_null_or_empty(rules_string); + absent_or_empty_exec_paths = is_null_or_empty(exec_paths_string); if (jsys == -1) { - if (has_rules || has_exec_paths) + if (!absent_or_empty_rules || !absent_or_empty_exec_paths) jsys = JAIL_SYS_NEW; else jsys = JAIL_SYS_DISABLE; } if (jsys == JAIL_SYS_INHERIT) { - MPASS(!has_rules && !has_exec_paths); - remove_conf(pr); - return (0); + error = 0; + + if (!absent_or_empty_rules || !absent_or_empty_exec_paths) { + /* + * Some values specified. Check that they match the + * ones we are going to inherit. + */ + model_conf = find_conf(pr->pr_parent, NULL); + if (strcmp(model_conf->rules.string, rules_string) + != 0) { + error = EINVAL; + vfs_opterror(opts, + "'mac.do' is 'inherited' but 'mac.do.rules'" + " was specified with a different value " + "than the one to be inherited (\"%s\")", + model_conf->rules.string); + } + if (strcmp(model_conf->exec_paths.exec_paths_str, + exec_paths_string) != 0) { + error = EINVAL; + vfs_opterror(opts, + "'mac.do' is 'inherited' but " + "'mac.do.exec_paths' was specified with a " + "different value than the one to be " + "inherited (\"%s\")", + model_conf->exec_paths.exec_paths_str); + } + drop_conf(model_conf); + } + + if (error == 0) + /* + * There's no TOCTOU problem here as the removal of the + * current jail's configuration commutes with changing + * the inherited configuration we checked against. + */ + remove_conf(pr); + + return (error); } model_conf = NULL; switch (jsys) { case JAIL_SYS_DISABLE: - rules_string = ""; - has_rules = true; - /* FALLTHROUGH */ - - case JAIL_SYS_NEW: /* - * If 'pr' has a configuration, we want to use it as the model - * (i.e., only change what has been explicitly specified). - * Else, we want as default values those that are inherited. + * mac_do(4) is disabled iff one of the parameter's string is + * empty. The parse_and_set_conf() call below treats passing + * NULL for a parameter as a flag to copy its value from the + * relevant ancestor jail's configuration, so we have to watch + * for the final result having an empty parameter if no + * parameter has been explicitly passed as empty. Thanks to + * mac_do_jail_check(), we know that at least one parameter is + * absent or empty (see the comment for the corresponding case + * there). */ - model_conf = !has_rules || !has_exec_paths ? - find_conf(pr, NULL) : NULL; - error = parse_and_set_conf(pr, - has_rules ? rules_string : NULL, - has_exec_paths ? exec_paths_string : NULL, - model_conf, - &parse_error); - - if (error != 0) { - vfs_opterror(opts, - "MAC/do: Parse error at index %zu: %s\n", - parse_error->pos, parse_error->msg); - free_parse_error(parse_error); + MPASS(absent_or_empty_rules || absent_or_empty_exec_paths); + if (!absent_or_empty_rules) + exec_paths_string = ""; + else if (!absent_or_empty_exec_paths) + rules_string = ""; + else { + /* + * Both are either empty or absent. If at least one is + * absent, we retrieve the applicable configuration as + * it will serve as a template (provides default + * values). + */ + if (rules_string == NULL || exec_paths_string == NULL) + model_conf = find_conf(pr, NULL); + /* If both are absent, we have to examine if, in the + * currently applicable configuration, one of the + * parameters, which we are going to copy, is + * effectively empty. If both of those are non-empty, + * we keep the executable paths and empty the rules, + * since we expect that this is more convenient to + * administrators that may want to enable mac_do(4) + * later by just setting new rules. + */ + if (rules_string == NULL && exec_paths_string == NULL && + has_rules(&model_conf->rules) && + has_exec_paths(&model_conf->exec_paths)) + rules_string = ""; } break; + case JAIL_SYS_NEW: + /* See the comment before the call to find_conf() above. */ + if (rules_string == NULL || exec_paths_string == NULL) + model_conf = find_conf(pr, NULL); + break; + default: __assert_unreachable(); } + error = parse_and_set_conf(pr, rules_string, exec_paths_string, + model_conf, &parse_error); if (model_conf != NULL) drop_conf(model_conf); + if (error != 0) { + vfs_opterror(opts, + "MAC/do: Parse error at index %zu: %s\n", + parse_error->pos, parse_error->msg); + free_parse_error(parse_error); + } + return (error); } From nobody Fri May 29 16:01:49 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRp5B3G4yz6flbM for ; Fri, 29 May 2026 16:01: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRp596pxSz3Hhr for ; Fri, 29 May 2026 16:01:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070510; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Kf13hkR21h3J+YjRxSmS1FGfLWu695wGrh7XOKzKYdk=; b=NV2gDY/FgjzLtrK6rsIS4Vk/rtL7ebfAdwG0pTgh9ifJIo/19SDX6hDy1LWk1AT+Fqm7TV ZjuOt8rHdCDfdeWpOcvgStfX20xeCTfH0X+6NCLfwRW85nsPWezrQzh6gKvwjVunIh0JUW +jzNATuZuAUcNjVucxeALR3qoFXc/x6hbfI/ETFRflKGVXbRFveIss6fi2yoAZDYxpk9H/ 8msiacr5+9MEn6ioEEA1Oq+bBSN9czdnw6pw1+AajiqRuKnrBN/9tweMnOva6dNMF/wcNS fnV0CXwiXiLZErwc3++JWYfzl8kMdpFr4X6cSTL6efRhiA7nyoW70hr/kjd6tA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780070510; a=rsa-sha256; cv=none; b=se+xEnMl9zqShYF7aU2CcMigE7sPQ123WCx8p8m92lOIiPHBBI9wihmDGBr17cnbwE6j4+ Q/83A/HlMSWcCC04OTsalYmeoniczgqfc8fOw3TfV6Uay66seJPEk44HmvHeYxo5yuphQx 2ji05hRukZ8lOK2gDVBfMT+0U1Gbu9/duMql5HgCohSN83v7vwTO9QDa69ctlQCBLlpxF2 BDlTtbU6yIVDA5zl9sQdnmsHh2UkSuxRACLnXXO5QnLJao1Ea7HB7n7GdUlxaj093KB64K HuT00Kd3Vnvy2wLjtrvL6dGM84ILOgSb9C4sS5i8k3HFrFzvzaDC1kQTee8Vgw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070510; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Kf13hkR21h3J+YjRxSmS1FGfLWu695wGrh7XOKzKYdk=; b=kg/TQdnS7JAwnLPMnhhf76OPUVO0ignYUbwidBYAO8J6upcdl+swY7IYmW4iaV5SdxkCxD 0dKJtAPh0PTlmeeZVAK0gaSOQVLlv+XPkdr1zInOD+SXA911Yx8L5Yks7mfWr00oqjdRY0 3uKaiflsc53wj6cY1FYM2c1kGksP8XW1T0ZhNn54wBDqZ0c9FcTlhVYZ8sMLu5ExekFzy5 XBFnrUL9oSSTIWIoXq0fnlAa8fZMPuoc3xzsZc0hWlSS2UNtrwMNDnIQfkqTFWglzlMYNz n+d8Pgm0kPFAu3gTu2oD/7pEu/40XH4lPpQcygtYa+uGvngUAIEuEb+TjGzhPQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRp596MLDzg6g for ; Fri, 29 May 2026 16:01:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 338f5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 16:01:49 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 51cc5840b66c - main - MAC/do: Configuration: Fix default values: Remove jail creation method List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 51cc5840b66c9565e1740c1198a0e684d81e3734 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 16:01:49 +0000 Message-Id: <6a19b86d.338f5.e63f434@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=51cc5840b66c9565e1740c1198a0e684d81e3734 commit 51cc5840b66c9565e1740c1198a0e684d81e3734 Author: Olivier Certner AuthorDate: 2026-04-28 13:10:14 +0000 Commit: Olivier Certner CommitDate: 2026-05-29 15:27:57 +0000 MAC/do: Configuration: Fix default values: Remove jail creation method mac_do_jail_create() would create a default configuration on the just-created jail, erroneously causing mac_do_jail_set() to then retrieve it and use it as a model when determining the default values for not-specified parameters, instead of using the configuration applicable to the parent jail. Setting a default configuration in mac_do_jail_create() had been done as a kind of defensive measure to prevent a created jail not to have a configuration (effectively making it inherit from an ancestor jail, which is a security hazard except if explicitly requested). However, this measure was never really effective (osd_jail_call(PR_METHOD_CREATE) in kern_jail_set() calls the PR_PETHOD_CREATE methods in an unspecified order, and stops at the first error), so we are forced to rely in any case on the fact that an error in a PR_METHOD_CREATE or PR_METHOD_SET method leads to stopping the jail creation process (which is the case today; see kern_jail_set()). Reviewed by: bapt Fixes: 9818224174c4 ("MAC/do: Executable paths feature (GSoC 2025's final state)") MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38 --- sys/security/mac_do/mac_do.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/sys/security/mac_do/mac_do.c b/sys/security/mac_do/mac_do.c index 7890af9bcfec..fb7eb00cd6d5 100644 --- a/sys/security/mac_do/mac_do.c +++ b/sys/security/mac_do/mac_do.c @@ -1548,16 +1548,6 @@ SYSCTL_PROC(_security_mac_do, OID_AUTO, exec_paths, SYSCTL_JAIL_PARAM_STRING(_mac_do, exec_paths, CTLFLAG_RW, MAX_EXEC_PATHS_SIZE, "Jail MAC/do executable paths"); -static int -mac_do_jail_create(void *obj, void *data) -{ - struct prison *const pr = obj; - - set_default_conf(pr); - - return (0); -} - static int mac_do_jail_get(void *obj, void *data) { @@ -1879,12 +1869,14 @@ mac_do_jail_set(void *obj, void *data) /* * OSD jail methods. * - * There is no PR_METHOD_REMOVE, as OSD storage is destroyed by the common jail - * code (see prison_cleanup()), which triggers a run of our dealloc_jail_osd() - * destructor. + * There is no PR_METHOD_REMOVE method, as OSD storage is destroyed by the + * common jail code (see prison_cleanup()), which triggers a run of our + * dealloc_jail_osd() destructor. There is neither a PR_METHOD_CREATE as + * PR_METHOD_SET is called just after (or the created jail destroyed if some + * PR_METHOD_CREATE fails), and our mac_do_jail_set() will ensure a jail is + * properly configured. */ static const osd_method_t osd_methods[PR_MAXMETHOD] = { - [PR_METHOD_CREATE] = mac_do_jail_create, [PR_METHOD_GET] = mac_do_jail_get, [PR_METHOD_CHECK] = mac_do_jail_check, [PR_METHOD_SET] = mac_do_jail_set, From nobody Fri May 29 16:01:51 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRp5C6DLFz6flQd for ; Fri, 29 May 2026 16:01: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRp5C0tF4z3Hnq for ; Fri, 29 May 2026 16:01:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070511; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UPyxB1+DmC7XwYkDne/fdr1i3coui/Tvg3uKtfNN/gk=; b=l6zvZnZ/U9YTSCUGbo5zeMbn+58/Q2O2DWCLK+MsR58VE+prLRQpnidjGuXPEpMDFe/xmv eEoFyZMmmELMVZFcryOZG/qovqiculYHdiCyQHi30TTYmAK3HSzVrRCeKz/8lem9C3UFM/ AgaI4zJAJEDNRUSNjGmbC+SV19C3lPRnX3HgqWEGr/71vn5YjY7gLv1LjlhGjOvgHOecdc usnFTcZ9oL+JER3db8C/rC5+ea5RNhObf46OzG5PIDmIcHDFf3aqkmrhGJbnZCCaS5K44W iMCXh9FP4XXi3+8SpBfFV3GvODMQrwiovPw9Ztb+lyn37CfEIyoFb2YA6TGVkw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780070511; a=rsa-sha256; cv=none; b=NAxKNN/yP7c/LVkzxUqRre/NC2jfpdu5+izXnp0RjrWpoZ0uCIQagUyiMGMynvsZ3Yg0Vq peNXo2EjgSXUNbiDhZ9j5ySNuUO6H2Bl73/m5U9fpfV7QjE6rixdC0es3RtRVXZWo/uP+F 9504AJnCWgMHIklxRJGuKL9nExdPb2M0/D/LJnZyrNNzTdAzm/5USWKi0J51ihuCL/WTrr wn2BXfl1pdaZOM7BZc4eG2NNGLqsIq963YrwCvTe+Az7FLraGLj+YViEU174qso8159Z6L /AcfZMaue6hhldgTpMwedN/EsWBMgwl9s1oOlTHKTeL3sUK1ctaTl6vPrDT+2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070511; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UPyxB1+DmC7XwYkDne/fdr1i3coui/Tvg3uKtfNN/gk=; b=mFeyjLxv4JUEzFra3FKoEBr9zNRyLqcKDsBXMX6E//QRXtslr3ADRuEb7glRWKN2aL6xxn HHW5av49lA2hrIu6xPpZrE43al8IlX/88RLl74C5WZoaqyQvj7i1EEqnqGTioEuTo1iDdS XUacQ4hhVgPs7MANKHsJUxGR+BP4PTkJWWAWe66EpRGbWUI+0H4Xrhec0G1LV6lwedQoiO /rpAltUccWB9gQykibj82WAjryhLNQ2G3J7G4ylFI4LodlN0tppZPguor9zIkhSOe6nESe 342xThR29jUq3E6RPWw6EUbuJedzUX0bBgc1aNAungHahnNkyTmwmoWQLBi3KQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRp5C0DGnzgcl for ; Fri, 29 May 2026 16:01:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36109 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 16:01:51 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 888a84ceeded - main - MAC/do: Fix reporting of "mac.do" post-"executable paths" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 888a84ceeded9ef69903e352827cdef58163027e Auto-Submitted: auto-generated Date: Fri, 29 May 2026 16:01:51 +0000 Message-Id: <6a19b86f.36109.119d6c7b@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=888a84ceeded9ef69903e352827cdef58163027e commit 888a84ceeded9ef69903e352827cdef58163027e Author: Olivier Certner AuthorDate: 2026-04-28 13:17:18 +0000 Commit: Olivier Certner CommitDate: 2026-05-29 15:28:29 +0000 MAC/do: Fix reporting of "mac.do" post-"executable paths" In mac_do_jail_get(), computation of 'jsys' had not been updated to take into account executable paths. Reviewed by: bapt Fixes: 9818224174c4 ("MAC/do: Executable paths feature (GSoC 2025's final state)") MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38 --- sys/security/mac_do/mac_do.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/security/mac_do/mac_do.c b/sys/security/mac_do/mac_do.c index fb7eb00cd6d5..8ed1f18a8df6 100644 --- a/sys/security/mac_do/mac_do.c +++ b/sys/security/mac_do/mac_do.c @@ -1560,9 +1560,8 @@ mac_do_jail_get(void *obj, void *data) const struct exec_paths *const exec_paths = &applicable_conf->exec_paths; int jsys, error; - jsys = hpr == pr ? - (STAILQ_EMPTY(&rules->head) ? JAIL_SYS_DISABLE : JAIL_SYS_NEW) : - JAIL_SYS_INHERIT; + jsys = hpr == pr ? (has_rules(rules) && has_exec_paths(exec_paths) ? + JAIL_SYS_NEW : JAIL_SYS_DISABLE) : JAIL_SYS_INHERIT; error = vfs_setopt(opts, "mac.do", &jsys, sizeof(jsys)); if (error != 0 && error != ENOENT) From nobody Fri May 29 16:01:52 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRp5D4N4Zz6flW4 for ; Fri, 29 May 2026 16:01: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRp5D1dC3z3HlW for ; Fri, 29 May 2026 16:01:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070512; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GykyDB2BRReoslKHTdQAHJMqTpFkvN248TAqpZ+J4p8=; b=xuMvGG6gNXUmFqf4kCjHQ5wzzczAJuu8HZQKpyE0mK4qPbMa8b7uX1KbU0pRFS8k0m/AgZ QDk29VPtqCi7laR1+d0SW+kZktRuzIDIgTVguVWQKz6HAvXqxycoPrOo85yVlLQh9NmHb8 r0yPEmtDV/LqWrzms2LDhLdDrySqOQxHOYTGYY9rqzpsiA9IH4pkTi7rpMJWNYzaW2ISoE IY319RZVqE7LE1Xtl1ise274q/ZBJrmVIlPVWrj/ZoicJbrirOKBTb1JG3+BeeJGWcTQnB CoUnzjBpL7F8IA7zX0pRgKvqtnL+wvxCwBzSy6JsiYBuAPraRQMElLbhdO8Vkg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780070512; a=rsa-sha256; cv=none; b=qxTv7suKvYI9Hl8vqlBWkQPcsZt4c3zIO6eV6TkFpxNyGqGpvYiNWIhjonD+FMEFgmSXrO dzqmv3DCgRiGT5jdTNIQMhkom/yzd9yA+CKz76lcJKXXIQyBNNqT/jceipZIjZkIGQz9Wt hQWYQ8xCx6JTltrnEcM6fviNHcE4ibXF7tXo9V/YS+Fz0I+2CpNI930uZh3S9sbx2R4wU/ UGBQU3i4b45IOh+yr39LVxu+17ceLWXlB+7bE9y0kqjG9ZyvLkHcDuuRI4w4VTnvU4oi2/ buWm8J3OFoZ974/uTsijjVv7j66HKmuBEH3KkAxT/LzBnqcVsoelPEm8bQo02w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070512; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GykyDB2BRReoslKHTdQAHJMqTpFkvN248TAqpZ+J4p8=; b=dN3Q6iU6EiIqA3hk/JjCix6P8MZ0yj8JfeTDm/ZdwS80tQXXjBGB7ouT6ui0XQ60Ooqm0t 4dnkdw2gB8u2n+fjEeWUKV2YgXugySP6JJ+X2qbMkFPic5B+H91KXCcZnCzwdGTlvU1T60 vBo1JUxwVFZXLvZ4EyDYHm4FM5A+oBa22rCiDc3kU5iKZp/2aNk+olCRoZtdsL5yVhHSp/ BwN+C5j4uRSQHo3mw6DDEp1Vv4DAtD8nbyu1kRnRZ+OYFq5l8M9+60w4hej6F/XWcQoZlg CXUpCW+wa2hMBCjqhjGfvWnKndI0E+zqG7ItK5iIKD0uYmDcY3JBVOUmBPqCOg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRp5D12MWzgpT for ; Fri, 29 May 2026 16:01:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3610d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 16:01:52 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 01e2b0ce1820 - main - MAC/do: Visually separate some file sections List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 01e2b0ce1820adf475e372ec72371dffca17a7af Auto-Submitted: auto-generated Date: Fri, 29 May 2026 16:01:52 +0000 Message-Id: <6a19b870.3610d.21601de4@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=01e2b0ce1820adf475e372ec72371dffca17a7af commit 01e2b0ce1820adf475e372ec72371dffca17a7af Author: Olivier Certner AuthorDate: 2026-04-28 13:39:09 +0000 Commit: Olivier Certner CommitDate: 2026-05-29 15:29:02 +0000 MAC/do: Visually separate some file sections With additional empty lines. No functional change (intended). Reviewed by: bapt MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38 --- sys/security/mac_do/mac_do.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/security/mac_do/mac_do.c b/sys/security/mac_do/mac_do.c index 8ed1f18a8df6..4feff477b18a 100644 --- a/sys/security/mac_do/mac_do.c +++ b/sys/security/mac_do/mac_do.c @@ -33,6 +33,7 @@ #include + #ifdef INVARIANTS /* * Should typically be moved to libkern (and perhaps libc) at some point, and be @@ -226,6 +227,7 @@ struct id_elem { STAILQ_HEAD(id_list, id_elem); + #ifdef INVARIANTS static void check_type(const id_type_t type) From nobody Fri May 29 16:01:53 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRp5F5ThGz6flNg for ; Fri, 29 May 2026 16:01: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRp5F2jWhz3HrY for ; Fri, 29 May 2026 16:01:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070513; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zP/sch5TsaMpErHW3pzU41eq36eSYbzLGpmXQcPe0Yc=; b=q2UiR0flBRSejtxOLAGetdEOwNXXa+4ba9QXemntw4KApKmIA9LcX5VIlgX7q9IQS0siTx mFNEqN8cAfwrlYe3+0TnWI3LupYYK/fDTTKnGDGHiXgiAY1O3zoRv/ea7ZriP7FglpM34j wX0PznJJ507H3R0wLAtAwZJ4BAJj3v0B80k/Bn6Sa3QbVXO6Frlk7Y5cW78HgFknUsqvDy A3zZCL6tHVGjJaH2wWAatYTK3rBUrQisaEmR72XyY+gLDH0RHc3eA3Cfv+WOuaNgTXQ30n XbD4UgGMcDNZQDTnSd7G6uGvHcRu1kQXsGerzdBFwbAvzGQLFEvrHVuO4qCDZg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780070513; a=rsa-sha256; cv=none; b=uD6zt0et9n71iGLLJAfmeKUJjfvLYbaMo+X7ri74VLKoW2QvBXGG83AdI3wvqKjz0jG/5M Etu9c9atuTD6Cn7pgLN5TN2xJuDOMzmWHXHHfR6vV4u/RipDLqpEVU+9UCszXkX0+q1rxK j5IWPViccwHJxg2rr9udrYXUUAaaOQ1e7Mn0b6DrDj8ckkTiYT4Jr7UsYsh4/Ig0oRDrnY YftWF7MbX5Twg8MdnzZ9//5v0Otjgc7CjjZXdL31sjYTGtE4AmWPENy6d25aH6hlr6rvg/ Io19+CB0XB/I/eLiCf4k3PzI+BLTKqwzZOMzC62ApflZUidvHSk4CJmMhEgA/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070513; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zP/sch5TsaMpErHW3pzU41eq36eSYbzLGpmXQcPe0Yc=; b=DL6zgR/V6yXimVBL5zyuQgRhAHH/FmOxFWcyZUQH+Y5RRmu5SQwak161/dEDoDuGJ2QZAN axTIZX4BKDDjjyOlQ8AZdGXOTuftwMVvs86Ecplcj2F3dAlbUdc07s9yf8SjlAh8wd9fni n4wmnIezFR2QLklWdivc8Fuv9u+5KRBAM5dHXN3pBe5tx4JOXvJEF0j9+pcguMXVYbOzav n1qSQ+iYSF/Q66X1kvP4oxq0eJ0thzVNELt3kycDnQerPA418fqfXMHL+N2f261P763/LH 7oqE5dgmCj7gDbtEMyQ0zb7jhE9fUVA4lay4M+22Wdtmpu3BhBfVMRXJz1JcPw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRp5F1qBYzg6n for ; Fri, 29 May 2026 16:01:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 32eef by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 16:01:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 31ef4ee2e357 - main - MAC/do: Allocate only one default configuration List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 31ef4ee2e3570b8f438b9b3fb09b3d87c87419ff Auto-Submitted: auto-generated Date: Fri, 29 May 2026 16:01:53 +0000 Message-Id: <6a19b871.32eef.6cccea60@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=31ef4ee2e3570b8f438b9b3fb09b3d87c87419ff commit 31ef4ee2e3570b8f438b9b3fb09b3d87c87419ff Author: Olivier Certner AuthorDate: 2026-04-29 13:12:10 +0000 Commit: Olivier Certner CommitDate: 2026-05-29 15:32:44 +0000 MAC/do: Allocate only one default configuration When mac_do(4) is loaded, all jails get the same default configuration (disabled, with only one allowed executable path: '/usr/bin/mdo'). Share it between all jails instead of creating a separate copy for each. Reviewed by: bapt Fixes: 9818224174c4 ("MAC/do: Executable paths feature (GSoC 2025's final state)") MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38 --- sys/security/mac_do/mac_do.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/sys/security/mac_do/mac_do.c b/sys/security/mac_do/mac_do.c index 4feff477b18a..125054d15423 100644 --- a/sys/security/mac_do/mac_do.c +++ b/sys/security/mac_do/mac_do.c @@ -1358,21 +1358,19 @@ set_conf(struct prison *const pr, struct conf *const conf) drop_conf(old_conf); } -/* - * Assigns the default configuration to a jail. - */ -static void -set_default_conf(struct prison *const pr) +static struct conf * +new_default_conf(void) { - struct conf *const conf = new_conf(); + const char *const mdo_path = "/usr/bin/mdo"; + struct conf *conf = new_conf(); - strlcpy(conf->exec_paths.exec_paths_str, "/usr/bin/mdo", + strlcpy(conf->exec_paths.exec_paths_str, mdo_path, MAX_EXEC_PATHS_SIZE); - strlcpy(conf->exec_paths.exec_paths[0], "/usr/bin/mdo", PATH_MAX); + strlcpy(conf->exec_paths.exec_paths[0], mdo_path, + PATH_MAX); conf->exec_paths.exec_path_count = 1; - set_conf(pr, conf); - drop_conf(conf); + return (conf); } static void @@ -2521,14 +2519,16 @@ mac_do_setcred_exit(void) static void mac_do_init(struct mac_policy_conf *mpc) { + struct conf *const default_conf = new_default_conf(); struct prison *pr; osd_jail_slot = osd_jail_register(dealloc_jail_osd, osd_methods); - set_default_conf(&prison0); + set_conf(&prison0, default_conf); sx_slock(&allprison_lock); TAILQ_FOREACH(pr, &allprison, pr_list) - set_default_conf(pr); + set_conf(pr, default_conf); sx_sunlock(&allprison_lock); + drop_conf(default_conf); osd_thread_slot = osd_thread_register(dealloc_thread_osd); } From nobody Fri May 29 16:01:54 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRp5G661nz6flNk for ; Fri, 29 May 2026 16:01:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRp5G3CLnz3Hpf for ; Fri, 29 May 2026 16:01:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070514; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ys50pLuQT+xKGkoHlKEr/0djjte9GEuo7DORh7nCsc4=; b=Vve/7JGkduvqy+zNeSEFPjJ3ogi2ECnAVz/DnsJxO+eFOp/iq5nN9x/Hg+aDVAnpUyBmez z3Xi1xNELWIYqqt5Q0BaG2Y1UUw8k94/9BwEjBsISQHzj1GNw+tZOF6YHYo4XS8uIPxBX6 4N7s5n4oIm2PLyOQaVO3+Et0y+QTp1d7E3WI9oobReJuBxgfJEhWq88/XdXsWStZQvKx04 3xanDqlbCYqpqIgxGQsO1hcsW5oKmDv9PDLtNfrkQs1bN3MQ1T8unjM9+6x4Z+UkjW80wi oF+gD4OjrRwffBkWdzvcszmpIzAaoNPmHiM8gPfsMSFWXpcw/ZmYjLuVDvo5ZQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780070514; a=rsa-sha256; cv=none; b=T7bW2F06Mc/NMv8AIakaMcoUcgb527yZ/FOXWYg1Gr7bJdEhbWEWv+ptRmUtWIufe49DZ7 rWiYACipUQnbwFY0+ZY7N/t0DdsTyRytjywCQuiUl8VfTCQIHD830AERrzt7UEE7FTsMVz 3zZXz+C5DoOftg5FwcT9yl82rwlSFuP59rRIjZ6WkdVDuh25F1o3/aCixvQJ8jb/eAuL8w rM95BsqipZnn8wwC+tbXHV5AZLYL7MAi9DVxEIBdMK7M06cd8hHETh5aCHkTJDKB9tCPwq 2f04rYX3ifMUFgzTXfqpwOKPnV53UJDer5VEcrnxB256bOd8nlL3B6Y1GH2JLA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070514; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ys50pLuQT+xKGkoHlKEr/0djjte9GEuo7DORh7nCsc4=; b=L0lPZTvBwd8mDDrMmjphqPCHLRfFp7wQnDgo3HQgXX3dVL5ovOkDwbf+tEa+aSYVG5O3WO 8JyzAY/tQdQf9gdlv1SohYMewCI3IaZXkJF858d7mDhfoyb67wXgiV8h7MGv+TgV50FJKf nuVzCTwzqVCKS+5Q6o0itcXsFB3/Cw0+jQWRuQLcC2J+zY2JquyvZL216ySUNeQftfqeYq HXRT3QH6Jum8ofhH/a0ukgagFc7jWVwOx2NajsGrTGjUHa+7y4xB42M4p9iwo30NKZYwJq 1IQbSYufpnJ5VqbDOtquZkJKQ+VK9CP7HUzjkvKo7XZJrsLgFmmm8IiQixOKug== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRp5G2fPDzgCY for ; Fri, 29 May 2026 16:01:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36802 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 16:01:54 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 5bedb5e44757 - main - MAC/do: Comment to explain the main invariant for configurations List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5bedb5e44757ba83dba9d618f5b951416cf44345 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 16:01:54 +0000 Message-Id: <6a19b872.36802.4ec96f57@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=5bedb5e44757ba83dba9d618f5b951416cf44345 commit 5bedb5e44757ba83dba9d618f5b951416cf44345 Author: Olivier Certner AuthorDate: 2026-04-29 17:11:34 +0000 Commit: Olivier Certner CommitDate: 2026-05-29 15:33:24 +0000 MAC/do: Comment to explain the main invariant for configurations Once visible, configuration structures must *never* change. Spell that out in a comment to help future readers/contributors understand the design. Reviewed by: bapt MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38 --- sys/security/mac_do/mac_do.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/security/mac_do/mac_do.c b/sys/security/mac_do/mac_do.c index 125054d15423..4e7a65ae2cae 100644 --- a/sys/security/mac_do/mac_do.c +++ b/sys/security/mac_do/mac_do.c @@ -210,6 +210,11 @@ struct exec_paths { int exec_path_count; }; +/* + * Once in use, i.e., being pointed to by a jail, a configuration structure MUST + * NEVER CHANGE (except for the 'use_count' field). This invariant is + * fundamental to correctness! + */ struct conf { struct rules rules; struct exec_paths exec_paths; From nobody Fri May 29 16:01:55 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRp5H6Pl3z6flWM for ; Fri, 29 May 2026 16:01:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRp5H4NT2z3Hwt for ; Fri, 29 May 2026 16:01:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070515; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SOkpJ5aV+tGfIhxOoS9Yw9Z3HFKnnxeoqxMYWh5UtVE=; b=SWbT3uWLd9eMSmS/jQhfL4ihpLz5XJXS2I9CW4EszvUKWMN17QRU3szPVluCoIyb6m6FGN ru4if33lQYifdmMEnzW8jcTuczeGglpT7mbEiJVv1/KHzaWOsHKhIKyuSqtTd1qqfZ4Jn5 /geFctogO/ErD8JU7qWiywhn2feHHAUHDloLaINRSZG3D0HYNAi7FvPhnlpdeIPzOmp5pb lEcjFSSJ61tYTxfmajTxW/0X6hDGP+3oMYqaZDTV3SVJtiTvoF0fQJZ2P/mrLcXasfmoAo 4DmjV7SZ7QTfBRe0cFH1P1TozLlI/AG6H1XliE9tdG1obDNVxE03TMHVlefSwg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780070515; a=rsa-sha256; cv=none; b=bDgBdr/8tjR4+XP/R38kNVypMeui6XWQJMdkTk7ZlhFPYJFHSqEI706J1UIO6TVHjiXudy MtBWZYM3bOYcEths8barjhJ9CIbdhAjX9bkwjGKv4lyu6Tf3F0qbU4oqYSXRLcY3jsVN65 TUsukx06ZPDXmOzyjCzB058e6NYBx352Imbpz1Oxf0SCDB/UtJnAyMwwlrgjqxLhcPwQ+Q LBQypxH7VXroHsxc/Y7zapvRpPdKOChqbGz+raTsRUReA/8lE2ergEpyavUonaVo2vKKQN hV7uDvvWaESQR7cYtH/d1iqiGHEDKgGduFIMmFY+knCY8Cx3uGmvxfVPkQFeUw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070515; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SOkpJ5aV+tGfIhxOoS9Yw9Z3HFKnnxeoqxMYWh5UtVE=; b=NM9Q6MPLd06iprS/xTzIFXpM99d3/wFMSEfrAGqAIeJVIgEMd8Sxo8gIdbKjScM0pDKHUQ bKehTFKlkVn1do8d3ghwnPy+/ASoSo2W9U6Yn8fg4ii1SkVVrLWtt43ur9yhONXc/nhu+s uuCpC18VikSV/T5LJCbplYcW00p/WrF/qT8D3Ft92fIOY7qdJVYwj1M8/BUY+0Ay1JdrUE ciJKG2G87SDluLdYeA9EuLGie5mfLhBgerY2m//90da9LvOI/PI0h8YxlmAxGFbRD54rlb 8lmvpU/vjkgn1TkRuV2TQ19HRyGpnFL47McGXcvK19uzKHAnRJlrqqclTign6A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRp5H3TJXzgCc for ; Fri, 29 May 2026 16:01:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3403d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 16:01:55 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 5b194a4ae319 - main - MAC/do: Sequential consistency for configuration retrieval List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5b194a4ae3190a9954544058dfc0790fd9a16172 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 16:01:55 +0000 Message-Id: <6a19b873.3403d.51353838@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=5b194a4ae3190a9954544058dfc0790fd9a16172 commit 5b194a4ae3190a9954544058dfc0790fd9a16172 Author: Olivier Certner AuthorDate: 2026-04-29 17:14:13 +0000 Commit: Olivier Certner CommitDate: 2026-05-29 15:34:04 +0000 MAC/do: Sequential consistency for configuration retrieval Since the inception of mac_do(4), find_conf(), used to retrieve the applicable configuration, has been weakly consistent with respect to concurrent modifications to configuration inheritance that influence its result (and it has been sequentially consistent with respect to other configuration modifications, which the initial executable paths feature and introduction of implicit parameters broke and which will be fixed in a subsequent commit). Indeed, find_conf() climbs the jail tree to find an applicable configuration, which is not an atomic operation. It examines the current jail's configuration pointer for each browsed jail, which does not prevent concurrent modifications of the configuration pointer for jails below or above it. Modifications above the current jail are not a problem, since if climbing needs to continue (i.e., the current jail inherits), these modifications will be seen if performed before that check (and may or may not be seen if performed after that check). However, modifications below the current jail impair sequential consistency, because they could be done before other modifications at the current jail or higher up, and the latter could still be picked up by the rest of the climb, effectively ignoring that the former should have blocked the climb earlier, making them look as if they had happened after for the climbing thread. As a concrete example of this situation, let's examine a scenario where some jail A is the parent of some jail B, and B inherits its configuration from A. An administrator may want to relax the rules only for jail A but not B. To this end, he first copies the current rules on B over to A and then relaxes the rules on A. He can intuitively and reasonably expect that changing B's rules first will prevent A's relaxed rules to leak to threads in B. Unfortunately, that is not the case: As explained in the previous paragraph, there can be a time window where threads from B can still pick up A's new configuration just after it has been installed. This arguably makes changing inheritance in mac_do(4) in a fully secure fashion almost impossible. If preserving fine-grained locking of prisons, we could prevent this problem by having find_conf(), once it has climbed to a non-NULL pointer (actual, non-inherited configuration), do another climb to check that it can reach the same configuration on the same jail again. If the new climb gives another pointer or jail, it could make it the new candidate and do a climb check again until the situation stabilizes. A climb check detects whether changes in jails below that of the candidate configuration object happened, catching in particular such changes that happened before changes to the candidate object. However, that process alone would still be subject to ABA problems, and we would additionally need to tag each prison with some modification timestamp (global, or local but necessitating allocating memory during the check) to fix them. In the end, we considered this direction to be unnecessarily complex, given that configuration changes are to be rare events and most uses will just be configuration determination. Consequently, switch protecting jail configurations with a single read-mostly lock. While here, adapt set_conf() to accept NULL as the new configuration object, and have remove_conf() call it, which removes duplicated code. While here, add a comment explaining why we do not need to take any more locks when climbing the jail tree. Reviewed by: bapt MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38 --- sys/security/mac_do/mac_do.c | 112 ++++++++++++++++++++++++------------------- 1 file changed, 64 insertions(+), 48 deletions(-) diff --git a/sys/security/mac_do/mac_do.c b/sys/security/mac_do/mac_do.c index 4e7a65ae2cae..3775466326f4 100644 --- a/sys/security/mac_do/mac_do.c +++ b/sys/security/mac_do/mac_do.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -74,6 +75,8 @@ _Static_assert(MAX_RULE_STRING_SIZE > 0, _Static_assert(MAX_EXEC_PATHS_SIZE > 0, "MAX_EXEC_PATHS_SIZE: No space for the NUL terminator!"); +struct rmlock mac_do_rml; + static unsigned osd_jail_slot; static unsigned osd_thread_slot; @@ -1228,28 +1231,46 @@ drop_conf(struct conf *const conf) * * If 'hpr' is not NULL, it is used to return a pointer to the (unlocked) prison * holding the applicable configuration. + * + * The find_conf_unlocked() variant needs 'mac_do_rml' to be (read- or write-) + * locked. The find_conf() variant will take a read lock for the duration of + * the search. + * + * The configuration returned by this function is sequentially consistent with + * other concurrent reads and configuration modifications, even in the presence + * of concurrent changes of configurations higher up in the jail tree (whether + * they "change" the value of some parameters, install a new configuration where + * there wasn't any, breaking inheritance from higher up, or remove an existing + * one, establishing inheritance from higher up). */ static struct conf * find_conf(struct prison *const pr, struct prison **const hpr) { - struct prison *cpr, *ppr; + struct prison *cpr, *ppr; /* Current and parent. */ struct conf *conf; + struct rm_priotracker rmpt; + rm_rlock(&mac_do_rml, &rmpt); + /* + * We do not need to take any locks here to climb the prison tree as + * either the start prison ('pr') is that of the current thread (and our + * ancestors are necessarily stable), or it is a prison passed by the jail + * machinery to an OSD method, in which case the prison tree lock is + * already being held. + */ cpr = pr; for (;;) { - prison_lock(cpr); - conf = osd_jail_get(cpr, osd_jail_slot); + conf = osd_jail_get_unlocked(cpr, osd_jail_slot); if (conf != NULL) break; - prison_unlock(cpr); ppr = cpr->pr_parent; /* - * 'prison0' normally always have a mac_do(4) configuration - * because we installed one on module load/activation and - * nothing can destroy it as 'prison0' is not a regular jail and - * the 'mac.do' parameter cannot be set to 'inherit' on it, - * which is the only way to clear an existing configuration. + * 'prison0' always has a mac_do(4) configuration because we + * installed one on module load/activation and nothing can + * destroy it as 'prison0' is not a regular jail and the + * 'mac.do' parameter cannot be set to 'inherit' on it, which is + * the only way to clear an existing configuration. */ KASSERT(ppr != NULL, ("MAC/do: 'prison0' must always have a configuration.")); @@ -1257,10 +1278,11 @@ find_conf(struct prison *const pr, struct prison **const hpr) } hold_conf(conf); - prison_unlock(cpr); + rm_runlock(&mac_do_rml, &rmpt); if (hpr != NULL) *hpr = cpr; + return (conf); } @@ -1308,59 +1330,50 @@ dealloc_jail_osd(void *const value) } /* - * Remove the rules specifically associated to a prison. - * - * In practice, this means that the rules become inherited (from the closest - * ancestor that has some). + * Assign an already-built configuration to a jail. * - * Destroys the 'osd_jail_slot' slot of the passed jail. + * Takes care of write-locking 'mac_do_rm', which should be unlocked on entry + * and will be unlocked on exit. */ static void -remove_conf(struct prison *const pr) +set_conf(struct prison *const pr, struct conf *const conf) { + void **const rsv = conf != NULL ? osd_reserve(osd_jail_slot) : NULL; struct conf *old_conf; - int error __unused; + int error __diagused; - prison_lock(pr); - /* - * We burden ourselves with extracting rules first instead of just - * letting osd_jail_del() call dealloc_jail_osd() as we want to - * decrement their use count, and possibly free them, outside of the - * prison lock. - */ - old_conf = osd_jail_get(pr, osd_jail_slot); - error = osd_jail_set(pr, osd_jail_slot, NULL); - /* osd_set() never allocates memory when 'value' is NULL, nor fails. */ - MPASS(error == 0); - /* - * This completely frees the OSD slot, but doesn't call the destructor - * since we've just put NULL in the slot. - */ - osd_jail_del(pr, osd_jail_slot); - prison_unlock(pr); + if (conf != NULL) + hold_conf(conf); + + rm_wlock(&mac_do_rml); + old_conf = osd_jail_get_unlocked(pr, osd_jail_slot); + error = osd_jail_set_reserved(pr, osd_jail_slot, rsv, conf); + KASSERT(error == 0, ("MAC/do: osd_jail_set_reserved() failed " + "with 'conf' = %p and 'rsv' = %p", conf, rsv)); + if (conf == NULL) + /* + * This completely frees the OSD slot, but doesn't call the + * destructor since we've just put NULL into the slot. + */ + osd_jail_del(pr, osd_jail_slot); + rm_wunlock(&mac_do_rml); if (old_conf != NULL) drop_conf(old_conf); } /* - * Assign an already-built configuration to a jail. + * Remove the rules specifically associated to a prison. + * + * In practice, this means that the rules become inherited (from the closest + * ancestor that has some). + * + * Destroys the 'osd_jail_slot' slot of the passed jail. */ static void -set_conf(struct prison *const pr, struct conf *const conf) +remove_conf(struct prison *const pr) { - struct conf *old_conf; - void **rsv; - - hold_conf(conf); - rsv = osd_reserve(osd_jail_slot); - - prison_lock(pr); - old_conf = osd_jail_get(pr, osd_jail_slot); - osd_jail_set_reserved(pr, osd_jail_slot, rsv, conf); - prison_unlock(pr); - if (old_conf != NULL) - drop_conf(old_conf); + set_conf(pr, NULL); } static struct conf * @@ -2527,6 +2540,8 @@ mac_do_init(struct mac_policy_conf *mpc) struct conf *const default_conf = new_default_conf(); struct prison *pr; + rm_init(&mac_do_rml, "mac_do(4)"); + osd_jail_slot = osd_jail_register(dealloc_jail_osd, osd_methods); set_conf(&prison0, default_conf); sx_slock(&allprison_lock); @@ -2547,6 +2562,7 @@ mac_do_destroy(struct mac_policy_conf *mpc) */ osd_thread_deregister(osd_thread_slot); osd_jail_deregister(osd_jail_slot); + rm_destroy(&mac_do_rml); } static struct mac_policy_ops do_ops = { From nobody Fri May 29 16:01:56 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRp5K23Qnz6flWP for ; Fri, 29 May 2026 16:01: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRp5J4l41z3HvW for ; Fri, 29 May 2026 16:01:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070516; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GbNuzTqwyTCC0cVWzUkf68J0UDfnxk9u8tQCpDAhcac=; b=ZBa/fJKqiHbtB81xddd3V3aC8ejmqoSNb9eoVJxbc6LM/61Y+SbrPfaHBGMhvFMqJfKfEa aEHihpgJIR1LCjwvMkEWUGKmIpG5aAiSTiDvF7Now/R6nqyEN9WEIjLhHbgXjLPS54zjSS r1hi4yvQrpfJumI56a0FY/hNcobKxN2cf/7Mx4nmS4MWWdkouSzBCneB4o7oGQCJ+9P8oO WMEZTMjWJgXTzcB6LlfVPgvi35KIQW9HurKzFPw8oX/i6GjfDpJzcTWcgSu3zaDVwisr95 8uGoyYDjMMAmG51Pd3H08tONVaZeoyUTvGKm6s0Fnb9vSTLKZ4+VEPhid6h+sA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780070516; a=rsa-sha256; cv=none; b=NB9eSayImmuDs1uCL8dyizRghH7QPrsnmlM4NgxNFPzlGze0SK8xMEJX4Mt9yB+IN6AZQu 9RidTi/77CGR6JAJfQVknxgYRMq3f3Se1+O1wckInq+vuFl4FcLy6nx4V0couyzkrbGsnY ptbVnCvjwgO0/sLcKlV3lqaPs01v8Q/lX8QkNgERMwIHTTQTy45fjeFNwaBCk6mtf3682u gulcOcSXqmFWpxS3g48+CUGcq+zoPipqBqTAxHxW/eZDy8aeRRoJEjzXJ6hQ6MZgJxisKI zzu6K+nyT27oGxK7wBzi9tNR8ucySdj5gnCOKrVkJyaevEztEvna70bxioaDHw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070516; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GbNuzTqwyTCC0cVWzUkf68J0UDfnxk9u8tQCpDAhcac=; b=VsCXN31YAQBLlumKi11x2ZG14U9TIDVvACDmQL4srSvwdy/IwiLEQajxKtMGQFitwz8ptE gIMLUIRX0K6ZF0FLE6Qmu557Dd8HRHeWTe0m7hivtdZ5R8/9DtNP39OfySQyXUT5r1/Nzv PxC52OeCnj4FYeWxVorJyNxVhOtBhP5sCBfjwV9zTHcBoBtbeLD5AwZeoPAqvMiyubAE0T DjXS59+Yhr9kqfIqDgYA1UeIDeZN2pRx5NdzPfVND0Bypx7fhU7PTYPdnsvTdg0aY72IHM brh8EWDK4OqMLQJQ/FplgfcDT84kPESyOQxp3cV5gw/NoWMbc4bs22T9TcVpnA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRp5J4HfgzgpX for ; Fri, 29 May 2026 16:01:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 367a6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 16:01:56 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 0db7f110cb81 - main - MAC/do: Support for atomically modifying configurations List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0db7f110cb810b7aa6d29df221edf9091d66b58a Auto-Submitted: auto-generated Date: Fri, 29 May 2026 16:01:56 +0000 Message-Id: <6a19b874.367a6.3a018215@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=0db7f110cb810b7aa6d29df221edf9091d66b58a commit 0db7f110cb810b7aa6d29df221edf9091d66b58a Author: Olivier Certner AuthorDate: 2026-04-29 16:28:44 +0000 Commit: Olivier Certner CommitDate: 2026-05-29 15:35:19 +0000 MAC/do: Support for atomically modifying configurations As mentioned in previous commits "MAC/do: parse_and_set_conf(): Require the model configuration" and "MAC/do: Sequential consistency for configuration retrieval", the introduction of the "executable path" feature, more fundamentally, the fact that there is now more than one per-jail parameter and that parameters can be independently modified or copied, causes an atomicity problem in case of concurrent accesses to of a jail's applicable configuration. Partially modifying a configuration is indeed akin to a read-modify-write operation, where the read is either to the current or an inherited configuration. More precisely, once pointed to by a jail, a configuration object is immutable, and changing the jail's configuration means making the jail point to another configuration object. To change a jail's configuration, a new configuration object is thus built, and if only some parameters have been explicitly specified, those that have not been are set by copying the corresponding values from an existing configuration object (in case of partial modification of the existing configuration, from the original configuration object that is going to be replaced; in case of breakage of inheritance or at jail creation, from the applicable configuration object, which is on an ancestor jail). This process is not immune to concurrent modifications because nothing prevents changes of configurations between reading existing values and setting the new configuration. Thus, some other thread could change the value of a parameter after a copy of it has been made into the new object but before that copy is actually installed, which effectively will erase the other thread's modification. To avoid this, we introduce support for serializing configuration changes on a given jail. To this end, we move the jail climbing process from find_conf() into find_conf_locked(), and make the former call the latter in a read-locked section. Similarly, we isolate setting a configuration in the new set_conf_locked() function, and make set_conf() call it inside a write-locked section. The new *_unlocked() variants make it possible to prevent any configuration access between determining and reading an applicable configuration, computing from it a new configuration object and finally setting it, by holding a write lock over the whole process (there is a trade-off here, as read-mostly locks cannot be upgraded), effectively making it atomic and realizing full sequential consistency of configuration changes. Also, the 'mac_do_rm' global read-mostly lock is made sleepable so that it can be write-locked over sysctl_handle*() functions or memory allocations (eases implementation, at the expense of a potential loss of concurrency which is most probably irrelevant). No functional change (intended) at this point. Reviewed by: bapt Fixes: 9818224174c4 ("MAC/do: Executable paths feature (GSoC 2025's final state)") MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38 --- sys/security/mac_do/mac_do.c | 64 +++++++++++++++++++++++++++++++++----------- 1 file changed, 49 insertions(+), 15 deletions(-) diff --git a/sys/security/mac_do/mac_do.c b/sys/security/mac_do/mac_do.c index 3775466326f4..8065ff4a0e47 100644 --- a/sys/security/mac_do/mac_do.c +++ b/sys/security/mac_do/mac_do.c @@ -1244,13 +1244,12 @@ drop_conf(struct conf *const conf) * one, establishing inheritance from higher up). */ static struct conf * -find_conf(struct prison *const pr, struct prison **const hpr) +find_conf_locked(struct prison *const pr, struct prison **const hpr) { struct prison *cpr, *ppr; /* Current and parent. */ struct conf *conf; - struct rm_priotracker rmpt; - rm_rlock(&mac_do_rml, &rmpt); + rm_assert(&mac_do_rml, RA_LOCKED); /* * We do not need to take any locks here to climb the prison tree as * either the start prison ('pr') is that of the current thread (and our @@ -1278,11 +1277,20 @@ find_conf(struct prison *const pr, struct prison **const hpr) } hold_conf(conf); - rm_runlock(&mac_do_rml, &rmpt); - if (hpr != NULL) *hpr = cpr; + return (conf); +} + +static struct conf * +find_conf(struct prison *const pr, struct prison **const hpr) +{ + struct conf *conf; + struct rm_priotracker rmpt; + rm_rlock(&mac_do_rml, &rmpt); + conf = find_conf_locked(pr, hpr); + rm_runlock(&mac_do_rml, &rmpt); return (conf); } @@ -1330,22 +1338,29 @@ dealloc_jail_osd(void *const value) } /* - * Assign an already-built configuration to a jail. + * Sets a mac_do(4) configuration on a jail. * - * Takes care of write-locking 'mac_do_rm', which should be unlocked on entry - * and will be unlocked on exit. + * 'conf' is the new conf to set (can be NULL), and an additional reference will + * be taken on it to represent the jail holding it (if not NULL). 'rsv' must + * have been allocated through osd_reserve() (if 'conf' is not NULL; else can + * be NULL). + * + * The previous configuration on the jail (or NULL) is returned (with an + * associated reference if not NULL). */ -static void -set_conf(struct prison *const pr, struct conf *const conf) +static struct conf * +set_conf_locked(struct prison *const pr, struct conf *const conf, + void **const rsv) { - void **const rsv = conf != NULL ? osd_reserve(osd_jail_slot) : NULL; struct conf *old_conf; int error __diagused; + KASSERT(conf == NULL || rsv != NULL, + ("MAC/do: OSD reserve needed to avoid allocating memory")); + rm_assert(&mac_do_rml, RA_WLOCKED); + if (conf != NULL) hold_conf(conf); - - rm_wlock(&mac_do_rml); old_conf = osd_jail_get_unlocked(pr, osd_jail_slot); error = osd_jail_set_reserved(pr, osd_jail_slot, rsv, conf); KASSERT(error == 0, ("MAC/do: osd_jail_set_reserved() failed " @@ -1356,8 +1371,27 @@ set_conf(struct prison *const pr, struct conf *const conf) * destructor since we've just put NULL into the slot. */ osd_jail_del(pr, osd_jail_slot); - rm_wunlock(&mac_do_rml); + return (old_conf); +} +/* + * Immediately replace the jail's configuration. + * + * To be used only if the configuration to set does not depend in any way on the + * currently applicable configuration. + * + * Takes care of write-locking 'mac_do_rml', which should be unlocked on entry + * and will be unlocked on exit. + */ +static void +set_conf(struct prison *const pr, struct conf *const conf) +{ + void **const rsv = conf != NULL ? osd_reserve(osd_jail_slot) : NULL; + struct conf *old_conf; + + rm_wlock(&mac_do_rml); + old_conf = set_conf_locked(pr, conf, rsv); + rm_wunlock(&mac_do_rml); if (old_conf != NULL) drop_conf(old_conf); } @@ -2540,7 +2574,7 @@ mac_do_init(struct mac_policy_conf *mpc) struct conf *const default_conf = new_default_conf(); struct prison *pr; - rm_init(&mac_do_rml, "mac_do(4)"); + rm_init_flags(&mac_do_rml, "mac_do(4)", RM_SLEEPABLE); osd_jail_slot = osd_jail_register(dealloc_jail_osd, osd_methods); set_conf(&prison0, default_conf); From nobody Fri May 29 16:01:57 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRp5L0JcWz6flbt for ; Fri, 29 May 2026 16:01: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRp5K5hKdz3J4p for ; Fri, 29 May 2026 16:01:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070517; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VT0r9zqvYaJ2EWnSSjgnZmOYcH1OrfSQoBQ64mV7jpY=; b=xgYa4QVOmae+mkT7WJkoP/+0X2Dn++yX8SDII1iSixutxsG5ct1sBWHfDaCh53o/JPCtj4 d9JLrAfg8ZXaooA8C6pBQvRtma/3prnqiacNoosEgliGqd/IJ9+b+r/QMtFceerw9n+zkj yiWJpq5NXTICQ5SmaZX1vMc6HdtUABRP5BVU9XyCwuRoTpBAMmAp4hBjCF4YuVaeoII8mr APlLpMPNHce5JtgYdPbgW6DrProHYyyLe66xI1/wh/PxitoX6dZbaN8WvIvm+zrO5oEaZF FlxRNVHkKabP/Iets9bv3nT6cFOZqtDQgf/IlKQowP4Gh09rd7zz1+wXIp08GA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780070517; a=rsa-sha256; cv=none; b=jnuNZz2BjZkwfBvCy+M4yjF8PwxGbbDkr4fzN1xMf7awB2fYzop+9nnLjmc3q7mcO5tZ9g TP0qYcZBUnsIauCUy3yIALQ+9bd+t7GkkI3+SgS7aXtFyATJcAatNv9StHRZkPg7pXlgRr 6E5RZ3Pxeq40MJpxme+JrA1Si1NLgos9Z63J9aUstuT7Ch0n/VTTWHCxczKMFv8tubxPbM PDNSq89piuUJ5CP6n6NsnIZpMWQ15HaMrf9V6r/rriqwvC0jVfbj+tAdDGH4hE7OQmpuvq rzHWk2alvG4ZbaoJBWSoDIN+cLqni4F/s7b/H/Nnu8BDtTELqvQfgF++HBhnYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070517; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VT0r9zqvYaJ2EWnSSjgnZmOYcH1OrfSQoBQ64mV7jpY=; b=kdW90R14E8CxwQiyKA7zZAZLj8oFIl/z9PlNCQsJ7Ufz39DNxH2kGzgf9RfyO/t8ZuTtDO sWUfT3ENrUCIwIj29l+2piqnLpxClNx0FyXxJXeQ+VT939rXN36N82ea+3Tu/NlCKoL4a6 J5uPN/5RePayYCzNi4s6UmGu85hR+iAZbqz+sEIka+8gZmQ7dP9ESt4mxyjzazqg0b8+Xq eL7jr4ObED4E+q/rH3EoRIiYePtfSXpRTAmcDNciR2mJc7w5cpZgffygj96qr61aKyzfAy qDD1xLfwWib7vuRwmibf6cYQc/c1XxEeX5yUVCP9TvtQBCJuUUPQE2i8GQJilA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRp5K56j0zgcp for ; Fri, 29 May 2026 16:01:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36111 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 16:01:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 4c98f7a0025e - main - MAC/do: Serialize installing/modifying some jail's configuration List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4c98f7a0025eea550ecf6f93f818cd03c6ac0fd5 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 16:01:57 +0000 Message-Id: <6a19b875.36111.367fa35d@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=4c98f7a0025eea550ecf6f93f818cd03c6ac0fd5 commit 4c98f7a0025eea550ecf6f93f818cd03c6ac0fd5 Author: Olivier Certner AuthorDate: 2026-04-29 18:32:56 +0000 Commit: Olivier Certner CommitDate: 2026-05-29 15:36:29 +0000 MAC/do: Serialize installing/modifying some jail's configuration See the immediately preceding commit for explanations on what this is fixing. When setting 'mac.do' to 'inherit' on a jail with 'mac.do.rules' and 'mac.do.exec_paths' also specified in the same call, ensure that the check that these passed parameters are the same as those to be inherited is atomic with respect to enabling the inheritance (i.e., removing the jail's 'struct conf' object). (See previous commit "MAC/do: Fix the recent logic to set jail parameters, make it more tolerant" as for why this check exists.) Because we currently only modify a single configuration object per transaction, we introduce the parse_and_commit_conf() wrapper around parse_and_set_conf() to remove duplicated code that would ensue from calling the latter directly, namely, releasing the 'mac_do_rwl' lock and freeing the old configuration object (if any). Taking the 'mac_do_rwl' lock for writing as a way to freeze all accesses to mac_do(4) configurations was deemed too thin an operation to be worth wrapping. Reviewed by: bapt (older version) Fixes: 9818224174c4 ("MAC/do: Executable paths feature (GSoC 2025's final state)") MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38 --- sys/security/mac_do/mac_do.c | 99 ++++++++++++++++++++++++++++++++++---------- 1 file changed, 76 insertions(+), 23 deletions(-) diff --git a/sys/security/mac_do/mac_do.c b/sys/security/mac_do/mac_do.c index 8065ff4a0e47..c30ece0a0794 100644 --- a/sys/security/mac_do/mac_do.c +++ b/sys/security/mac_do/mac_do.c @@ -1404,10 +1404,10 @@ set_conf(struct prison *const pr, struct conf *const conf) * * Destroys the 'osd_jail_slot' slot of the passed jail. */ -static void -remove_conf(struct prison *const pr) +static struct conf * +remove_conf_locked(struct prison *const pr) { - set_conf(pr, NULL); + return (set_conf_locked(pr, NULL, NULL)); } static struct conf * @@ -1481,11 +1481,15 @@ clone_exec_paths(struct exec_paths *const dst, * parameters are copied from those of the passed model configuration (which is * expected to be the currently applicable configuration, i.e., that of the * closest ancestor jail that has one). + * + * 'mac_do_rml' needs to be write-locked (and stays so). 'old_conf' serves to + * return, on no error, the old configuration with a reference (which must be + * eventually freed). */ static int parse_and_set_conf(struct prison *const pr, const char *const rules_string, const char *const exec_paths_string, const struct conf *const model_conf, - struct parse_error **const parse_error) + struct conf **const old_conf, struct parse_error **const parse_error) { struct conf *const conf = new_conf(); int error = 0; @@ -1511,7 +1515,8 @@ parse_and_set_conf(struct prison *const pr, const char *const rules_string, clone_exec_paths(&conf->exec_paths, &model_conf->exec_paths); - set_conf(pr, conf); + MPASS(error == 0); + *old_conf = set_conf_locked(pr, conf, osd_reserve(osd_jail_slot)); MPASS(error == 0 && *parse_error == NULL); out: @@ -1522,6 +1527,30 @@ error: goto out; } +/* + * Calls parse_and_set_conf() and closes the current configuration transaction. + * + * Closes the transaction by unlocking 'mac_do_rml' and releasing the old + * configuration returned by parse_and_set_conf(). + */ +static int +parse_and_commit_conf(struct prison *const pr, const char *const rules_string, + const char *const exec_paths_string, const struct conf *const model_conf, + struct parse_error **const parse_error) +{ + struct conf *old_conf; + int error; + + error = parse_and_set_conf(pr, rules_string, exec_paths_string, + model_conf, &old_conf, parse_error); + rm_wunlock(&mac_do_rml); + + if (error == 0 && old_conf != NULL) + drop_conf(old_conf); + return (error); +} + + static int mac_do_sysctl_rules(SYSCTL_HANDLER_ARGS) { @@ -1531,14 +1560,23 @@ mac_do_sysctl_rules(SYSCTL_HANDLER_ARGS) struct parse_error *parse_error = NULL; int error; - conf = find_conf(pr, NULL); + if (req->newptr != NULL) { + rm_wlock(&mac_do_rml); + conf = find_conf_locked(pr, NULL); + } else + conf = find_conf(pr, NULL); strlcpy(buf, conf->rules.string, MAX_RULE_STRING_SIZE); error = sysctl_handle_string(oidp, buf, MAX_RULE_STRING_SIZE, req); - if (error != 0 || req->newptr == NULL) + if (req->newptr == NULL) + goto out; + if (error != 0) { + rm_wunlock(&mac_do_rml); goto out; + } - error = parse_and_set_conf(pr, buf, NULL, conf, &parse_error); + /* Unlocks 'mac_do_rml'. */ + error = parse_and_commit_conf(pr, buf, NULL, conf, &parse_error); if (error != 0) { if (print_parse_error) printf("MAC/do: Parse error at index %zu: %s\n", @@ -1571,14 +1609,23 @@ mac_do_sysctl_exec_paths(SYSCTL_HANDLER_ARGS) struct parse_error *parse_error = NULL; int error; - conf = find_conf(pr, NULL); + if (req->newptr != NULL) { + rm_wlock(&mac_do_rml); + conf = find_conf_locked(pr, NULL); + } else + conf = find_conf(pr, NULL); strlcpy(buf, conf->exec_paths.exec_paths_str, MAX_EXEC_PATHS_SIZE); error = sysctl_handle_string(oidp, buf, MAX_EXEC_PATHS_SIZE, req); - if (error != 0 || req->newptr == NULL) + if (req->newptr == NULL) goto out; + if (error != 0) { + rm_wunlock(&mac_do_rml); + goto out; + } - error = parse_and_set_conf(pr, NULL, buf, conf, &parse_error); + /* Unlocks 'mac_do_rml'. */ + error = parse_and_commit_conf(pr, NULL, buf, conf, &parse_error); if (error != 0) { if (print_parse_error) printf("MAC/do: Parse error at index %zu: %s\n", @@ -1807,14 +1854,17 @@ mac_do_jail_set(void *obj, void *data) } if (jsys == JAIL_SYS_INHERIT) { + struct conf *old_conf = NULL; + error = 0; + rm_wlock(&mac_do_rml); if (!absent_or_empty_rules || !absent_or_empty_exec_paths) { /* * Some values specified. Check that they match the * ones we are going to inherit. */ - model_conf = find_conf(pr->pr_parent, NULL); + model_conf = find_conf_locked(pr->pr_parent, NULL); if (strcmp(model_conf->rules.string, rules_string) != 0) { error = EINVAL; @@ -1838,23 +1888,25 @@ mac_do_jail_set(void *obj, void *data) } if (error == 0) - /* - * There's no TOCTOU problem here as the removal of the - * current jail's configuration commutes with changing - * the inherited configuration we checked against. - */ - remove_conf(pr); + old_conf = remove_conf_locked(pr); + + rm_wunlock(&mac_do_rml); + + if (old_conf != NULL) + drop_conf(old_conf); return (error); } model_conf = NULL; + /* Freeze configuration accesses. */ + rm_wlock(&mac_do_rml); switch (jsys) { case JAIL_SYS_DISABLE: /* * mac_do(4) is disabled iff one of the parameter's string is - * empty. The parse_and_set_conf() call below treats passing + * empty. The parse_and_commit_conf() call below treats passing * NULL for a parameter as a flag to copy its value from the * relevant ancestor jail's configuration, so we have to watch * for the final result having an empty parameter if no @@ -1876,7 +1928,7 @@ mac_do_jail_set(void *obj, void *data) * values). */ if (rules_string == NULL || exec_paths_string == NULL) - model_conf = find_conf(pr, NULL); + model_conf = find_conf_locked(pr, NULL); /* If both are absent, we have to examine if, in the * currently applicable configuration, one of the * parameters, which we are going to copy, is @@ -1894,16 +1946,17 @@ mac_do_jail_set(void *obj, void *data) break; case JAIL_SYS_NEW: - /* See the comment before the call to find_conf() above. */ + /* See the comment before the same test above. */ if (rules_string == NULL || exec_paths_string == NULL) - model_conf = find_conf(pr, NULL); + model_conf = find_conf_locked(pr, NULL); break; default: __assert_unreachable(); } - error = parse_and_set_conf(pr, rules_string, exec_paths_string, + /* Unlocks 'mac_do_rml'. */ + error = parse_and_commit_conf(pr, rules_string, exec_paths_string, model_conf, &parse_error); if (model_conf != NULL) drop_conf(model_conf); From nobody Fri May 29 16:01:58 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRp5M3886z6flh4 for ; Fri, 29 May 2026 16:01: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRp5L6SX7z3J5C for ; Fri, 29 May 2026 16:01:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070518; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vwQTyXCrb6lUOSci4Cq1MT1iZvK6jrrKQf5TJz8+P1A=; b=ZKyFWsaL6clTEx3+EqeFy/qNRbF7UteG8uaWn4UsIBppVCnqqL4m8rFULAggGAu+2dwAa8 wOHOFf4J6anTgkekeolIa8/9UMwIFt7J8TqTTsRTbZtpAlwPY0M1fyk/biRhoFNLsYtTVK h1HiYvniPRmV2V3Ae8ZMNY0UksDHnM64AxiiZ6mibNYojU1dRKsG9LvomaplqhjMyXBRjR U7VRDIWsn88tyMUomyqObPf9txj0o9i2VBQEmHuHpsGOqhKWwyKJb5PRV9hz9FF2eIHwUu cF6qxsBJ4py6g7CO/wdyIldoUkGl/ildBAuRBWsbD3xjDI2/kJmYaXV/wsPF5g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780070518; a=rsa-sha256; cv=none; b=UEgW3sJxprNch8eHHTM0cECqCBicNDM3c70mnN0f6JtNwByqv5B6d7Z14jpLidzbzIAxx+ icslLCohpKNH2m7Gy1DZooS5VY191gi9h7l79oXLyu0o9YHFTGdLAWLmVOPQI0+yz7fT8G jy8o2asByPG4OjgkR+BhVrtL1LKTBhpaGMwcj/5CNIf48iAY24o+ZbTEik4Iy/16DwasLC uYH5MYXEJvt7BFb9HQIphFO36+A2BmSn9h/+ZwuXtP3suRU71JdSxH2vV0/tzLW5PiSwOO TPkPuJLF6lOemhD8A4E5vx/UXU/TIRdhFXkALud1PyagPj3Mzh9uLn3efLKLKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070518; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vwQTyXCrb6lUOSci4Cq1MT1iZvK6jrrKQf5TJz8+P1A=; b=AY1LizFNMoCseCIz16AOPkDUU+qGizhUNYWI64oA2xVvq5boRRDIoFSZYs+w3s5oizWkDi i+hKD4zK45/XqfGEDrIh/97dS7az9TyFaDl/PMcygNxJu26XZWD7LRch2RcPbXh2o9xsxT Bt/2NGf/5ouYRuCZgvG5Kue2KVwq9PK71sLzce0OTV3cSiRIiw5AyZpBRknwkDlhVElw8K pRmZFpWbeheuH+T68sZTPHH/GSea6UjxJ6lNGPAXkwjL6wKb9uzyQ8Ccwo2Ithj9zcoBfH x2UD89jvHCr9r4uVjkQPe+w0B+NHeEQPV1t0sSkKYx5Lup2iwIv/MsOI/MCXng== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRp5L5wmyzgn6 for ; Fri, 29 May 2026 16:01:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36115 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 16:01:58 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 1fa1e3f3950f - main - MAC/do: Do not skip blanks when parsing executable paths List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1fa1e3f3950fc0593ab73ea075c24c9bfbe8afd6 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 16:01:58 +0000 Message-Id: <6a19b876.36115.530a6f75@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=1fa1e3f3950fc0593ab73ea075c24c9bfbe8afd6 commit 1fa1e3f3950fc0593ab73ea075c24c9bfbe8afd6 Author: Olivier Certner AuthorDate: 2026-05-07 15:32:28 +0000 Commit: Olivier Certner CommitDate: 2026-05-29 15:37:14 +0000 MAC/do: Do not skip blanks when parsing executable paths The kind of tolerance we apply to parsing rules, whose format we have defined, cannot be applied to paths since blank characters are allowed there. There is still the limitation that no escape character is currently supported, and so it is not possible to configure a path having a ':' character. Reviewed by: bapt Fixes: 9818224174c4 ("MAC/do: Executable paths feature (GSoC 2025's final state)") MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38 --- sys/security/mac_do/mac_do.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/security/mac_do/mac_do.c b/sys/security/mac_do/mac_do.c index c30ece0a0794..9e9f57be6c3c 100644 --- a/sys/security/mac_do/mac_do.c +++ b/sys/security/mac_do/mac_do.c @@ -1163,7 +1163,7 @@ parse_exec_paths(const char *const string, struct exec_paths *const exec_paths, MPASS(copy[len] == '\0'); p = copy; - while ((path = strsep_noblanks(&p, ":")) != NULL) { + while ((path = strsep(&p, ":")) != NULL) { size_t path_len; if (*path == '\0') From nobody Fri May 29 16:01:59 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRp5N3gg8z6fl2D for ; Fri, 29 May 2026 16:02: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRp5N0FqKz3Hxb for ; Fri, 29 May 2026 16:02:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070520; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KfReVBlPKmDiEJ56e7tVu6uT9iyJz3eJm/iXjc66PCk=; b=S5VfxVLGGRa+yss8evSQyucJ5bbphMocEA0GTw4BhM/fDBxyOO6Cc4s9xwTfxT/PPSKG6j /AzYuXgzq7EjwAspaQTb1E9dnQVhVLaVi4YVD1ecbF15pf/kxvpzGJ0fkhv0VOQ6egOevn 8UZdwVbV4jBR+qwJCIzU6orKRRHT+7hjOVkxQ3x6vVU7gFDtHQ0V/VJlhIKW9eOGPhzSrn 0vcHoHQ/qLoS4ZzYc/g44ELRzmdWNVLSWL318KfZa+zNapy9zpd8+rVAelX4xberyFbUCI vpgIkyxBCDLjewETY0U7D4j0CBxzhaQ9Dkb8nWxVBjGST3XrSdvmf2bAaRRI5Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780070520; a=rsa-sha256; cv=none; b=OEIea6NAs+ux8+afoKurXwjueoserc0hjZzmoRole+RNZRqmkGxIrWFWZaZGWmkNpZCPpA JFkTzBO1xnQy+uHkiveugsVZIZ7VhjWEn/UdfgIr7Dxzd9gn52tqdIOEJ09+dreKF6lclu AY1hZqwbJ8oCDC5vCi0IOsB1C/jrtyGOOsHoTLoDvTABkIOrGjVuFCnpc5ZO8+NL/ybRr2 qbwIR6CblIKD7pDGkEI+jjEeC3CNxMp2cVpJoIovssLANvUR8LdJPrwJ6NUI2QgqrSnY5d /H5cMjKhP+jHSYkGstGSt85xW5eSPEAKCr5jkCdIbFN03VOIYhqMQiC/GXBXUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070520; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KfReVBlPKmDiEJ56e7tVu6uT9iyJz3eJm/iXjc66PCk=; b=qCiVCYKAXGvWhoOz7BmH+jaRC/dEZu+EhxfnsTRY4cq4MAoqAzr0W4Z5tt9jyesybmDu7B 1AypTBBCOWueRobwihAz1YWpPonQ9Nb5eRBRhoufVstCAGSkfNmkwcUw45m77AyqIsxAMx hbUn5Uu0wl811HD3TgrihsVqEnfK0ILNNvwFEcT6DZgJibGhbdYX5PhttJqwr57+LrrzFN I/TIDgXKPtQFg6nifMZWucxttOwfyBBv1MiCvnd4jxGEAOinR9VP/RCeFskMqn2W3K4kX/ F+IukPCu84TtehbEs+2AMS4LByl9ZR+BjlxQgnWYvNwcRi9ty9o0yGeCmP1Q4A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRp5M6gcYzgCj for ; Fri, 29 May 2026 16:01:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 342bd by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 16:01:59 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: fcb0018634c7 - main - MAC/do: Update copyright List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fcb0018634c77fe32ed99bca00f856af18ed240b Auto-Submitted: auto-generated Date: Fri, 29 May 2026 16:01:59 +0000 Message-Id: <6a19b877.342bd.46eb6dba@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=fcb0018634c77fe32ed99bca00f856af18ed240b commit fcb0018634c77fe32ed99bca00f856af18ed240b Author: Olivier Certner AuthorDate: 2026-05-20 11:46:45 +0000 Commit: Olivier Certner CommitDate: 2026-05-29 15:39:20 +0000 MAC/do: Update copyright Update years for the Foundation. While here, remove the initial '/*-' which has been useless for a long time. While here, add a missing space on bapt@'s copyright line (approved by him). Reviewed by: bapt MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38 --- sys/security/mac_do/mac_do.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/security/mac_do/mac_do.c b/sys/security/mac_do/mac_do.c index 9e9f57be6c3c..93f2084d1c93 100644 --- a/sys/security/mac_do/mac_do.c +++ b/sys/security/mac_do/mac_do.c @@ -1,8 +1,8 @@ -/*- +/* * SPDX-License-Identifier: BSD-2-Clause * - * Copyright(c) 2024 Baptiste Daroussin - * Copyright (c) 2024 The FreeBSD Foundation + * Copyright (c) 2024 Baptiste Daroussin + * Copyright (c) 2024, 2026, The FreeBSD Foundation * Copyright (c) 2025 Kushagra Srivastava * * Portions of this software were developed by Olivier Certner From nobody Fri May 29 16:02:01 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRp5P4H54z6flYR for ; Fri, 29 May 2026 16:02: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRp5P1kNpz3Hxp for ; Fri, 29 May 2026 16:02:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070521; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ee+TxMNh/RBtxX/OMXiJNOSpkmaV1Ihk0RkGoF1KUf4=; b=JV7HP1a9JiiftL8Q+IGq8hYdxmfK/kKtBGcR8VHOBAYvn6BY190e/bLeLH9pRMrlHzGAnL WeNDja/7ow2jnsE6mkehfa/STMj4K2/tawAu3mnvQFbN5bqQDCw4RrPE8yvuOIHfiodmlE FhyWCt6jYrXrIg4ipV7gS4V3JnppXWFyL7alDRYQGpITQPgIR0XszR7zq+rMP6LGrFJS+x EkMiwznZl9gtf5ETbR7R7tO5KBiDE6X6CrOp5SyO8u4HQ8s1CzOHCkY2vOky3uYeK6+g+Z PY5PX7Kd2hZLcplVnTblD21FvzoEAUSB9Uag29ATVldepkGhaHhSPj+mXYV0oA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780070521; a=rsa-sha256; cv=none; b=NKCwu6rjBwZY9DEIjnnKZyGvjxk28nFmomPSCMCjOiuGEkL9K3OcqbvTMb3ujtLayLr7Nv 21Pp+W5D20LQcDRZyXUpdKUxixrQEt4EcrwqesN99DDhxeKjD4h6fbfGNQ38Yo3xC1celv WQCq9dvN6B2KmNpOZ99cUpTnz2PLjEnU/lvTAhMhel5Ofi1ISGg0aKFQHKu79/g2ABjUrz Q4qlvQofczY+Eyuup8gdyZujKRNXixPHXvp8BvlF93Zbh6qfNhUJjSOXxcwRt/rcIHXMyB 7DP9L4IAWh35mLY0chCf6yiFyH5Dg02oA8cG0Y92AvBLXaTFVGb9eImZvOzgLA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070521; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ee+TxMNh/RBtxX/OMXiJNOSpkmaV1Ihk0RkGoF1KUf4=; b=tg9/8BFsWwzohYy4Yi/bhg3suzTU4r2YjPA/knqaSyo+fi5SlYcdJSsxK2g3Fg30HmgaHS A3D/jkbDjj7F9CadxnSIfYLrrxPAO5CBj5Uo6lErY7o1MPRvr9rG7JAzXZirunupOwq9GO ouagFjvWnCWY1p5RY4yfcHURhYPjrVa2hv+UNQKoo8SXtsGcHXRDFVALN/snZ4UKVEY6M3 LMdIsABxrFYBonb6AWvI6QF04czYyjpgEnfOt0lQhqS9qvOyklZzAttvYo+41YW85V478l 9Ot9otRJRxeUpO344GQGtZsi2fUFq9LKVCdgxNi/PS/ssCBopWrKMa5AHKVWSg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRp5P0WX2zgCk for ; Fri, 29 May 2026 16:02:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 34041 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 16:02:01 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 39818654ae87 - main - mac_do.4: Document executable paths, default jail values and consistency List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 39818654ae879788807d3a87c2d75cc700cc7113 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 16:02:01 +0000 Message-Id: <6a19b879.34041.444d4be8@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=39818654ae879788807d3a87c2d75cc700cc7113 commit 39818654ae879788807d3a87c2d75cc700cc7113 Author: Olivier Certner AuthorDate: 2026-05-20 16:23:33 +0000 Commit: Olivier Certner CommitDate: 2026-05-29 15:40:25 +0000 mac_do.4: Document executable paths, default jail values and consistency While here, fix the bug of mentioning 'enable' as a possible value for the 'mac.do' jail parameter whereas it is 'new' instead. Reviewed by: bapt MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38 --- share/man/man4/mac_do.4 | 189 ++++++++++++++++++++++++++++++++++++------------ 1 file changed, 143 insertions(+), 46 deletions(-) diff --git a/share/man/man4/mac_do.4 b/share/man/man4/mac_do.4 index 8c08e072be88..7f05d5f88bf8 100644 --- a/share/man/man4/mac_do.4 +++ b/share/man/man4/mac_do.4 @@ -1,8 +1,8 @@ .\"- .\" SPDX-License-Identifier: BSD-2-Clause .\" -.\" Copyright (c) 2024 Baptiste Daroussin -.\" Copyright (c) 2024 The FreeBSD Foundation +.\" Copyright (c) 2024, Baptiste Daroussin +.\" Copyright (c) 2024, 2026, The FreeBSD Foundation .\" .\" Portions of this documentation were written by Olivier Certner .\" at Kumacom SARL under sponsorship from the FreeBSD @@ -42,13 +42,23 @@ policy module allows unprivileged users to change process credentials according to rules configured by the administrator. It supports per-jail configuration. .Pp -Currently, the +The .Nm -policy module only produces effects to processes spawned from the +policy module only produces effects on processes spawned from specific +executables from a configurable whitelist. +By default, this whitelist only contains the .Pa /usr/bin/mdo executable, please see .Xr mdo 1 for more details on this program. +.Pp +Section +.Sx CREDENTIALS RULES +specifies the format of credentials transition rules, and section +.Sx CONFIGURATION +explains how to configure +.Nm , +including rules and authorized executables. .Sh CREDENTIALS RULES Rules specify which transitions of process credentials .Nm @@ -267,84 +277,170 @@ then converted to unsigned ones as specified in the C standard for the and .Vt gid_t types, which are both 32-bit unsigned integers. -.Sh RUNTIME CONFIGURATION -The following +.Sh CONFIGURATION +Each parameter of +.Nm +has a corresponding +.Xr sysctl 8 +knob. +.Nm +supports per-jail values for most parameters. +.Ss Sysctl Knobs +The .Xr sysctl 8 -knobs are available: +knobs presented by +.Nm +are of two types: Global ones, which influence all uses of the module, and +per-jail ones, which allow to retrieve or change the setting applicable to +a jail +.Pq or the host +from within. +They are tagged accordingly in the list below. +.Pp +The indicated default values for per-jail parameters applies to the host. +Those applying to jails are described in the +.Sx Jail Parameters +subsection below. +.Pp +The following knobs are available: .Bl -tag -width indent .It Va security.mac.do.enabled Enable the .Nm policy. -(Default: 1). -.It Va security.mac.do.rules -The list of credential rules, whose syntax is described in the -.Sx CREDENTIALS RULES -section above. -This list is specific to each jail. -Please see the -.Sx JAIL SUPPORT -section below for more details on the interaction of -.Nm -with jails. +.Pq Global. Default: 1. .It Va security.mac.do.print_parse_error Logs a message on trying to set incorrect rules via the .Va security.mac.do.rules .Xr sysctl 8 knob. +.Pq Global. Default: 1. +.It Va security.mac.do.rules +The list of credentials transition rules, whose syntax is described in the +.Sx CREDENTIALS RULES +section above. +An empty string effectively disables the policy. +.Pq Per-jail. Default: Empty. +.It Va security.mac.do.exec_paths +The list of absolute paths +.Pq relative to the current jail's root +to authorized executables, separated by colons +.Pq Ql ":" . +Only processes launched from these executables are considered by the +.Nm +policy. +An empty string effectively disables the policy. +.Po +Per-jail. Default: +.Ql "/usr/bin/mdo" . +.Pc .El -.Sh JAIL SUPPORT +.Ss Jail Parameters +Most parameters of .Nm -supports per-jail configuration of rules. +are per-jail +.Po +see the +.Sx "Sysctl Knobs" +subsection above +.Pc . +Those that are per-jail have corresponding jail parameters that can be used to +set their initial values on jail creation or modify their values in a running +jail from outside the jail. .Pp -By default, at creation, a new jail has no credentials rules, effectively -disabling +By default, as it is for the host, a new jail has .Nm -for its processes. +disabled for its processes, as if the +.Va mac.do +parameter below was explicitly set to +.Ql disable . .Pp -The following jail parameters are defined: +Each unspecified parameter other than +.Va mac.do +defaults to a copy of its value in the currently applicable configuration for +a running jail, or from the parent jail on jail creation. +.Pp +The following jail parameters are available: .Bl -tag -width indent .It Va mac.do Possible values are: +.Pp .Bl -tag -width "'disable'" -compact .It Ql new .Nm -will enforce specific credential rules in the jail. -The -.Va mac.do.rules -jail parameter must also be set in this case. +will use a specific configuration for the jail. +This case degrades to +.Ql disable +if one of the other jail parameters end up empty after applying the default +values rule +.Pq see the preamble . .It Ql disable Disables .Nm in the jail. -Strictly equivalent to jail creation's default behavior and to setting the rules -to an empty string. +This is achieved by ensuring that at least one of the +.Va mac.do.rules +and +.Va mac.do.exec_paths +jail parameters are empty. +If none of them ends up empty after applying the default values rule +.Pq see the preamble , +.Va mac.do.rules +is forced to an empty value. +An explicit +.Ql disable +is incompatible with explicit non-empty values for all other jail parameters and +will trigger an error. .It Ql inherit -The jail's credentials rules are inherited from the jail's parent +The other per-jail parameters are inherited from those applicable to the jail's +parent .Pq which may themselves have been inherited . -Modified rules propagate to all children jails configured for inheritance. +Configuration modifications immediately propagate to all descendant jails +configured for inheritance +.Po +as long as there is no intervening jail having its own specific configuration +.Pc . .El +.Pp +The default value depends on the absence or presence and value of the other jail +parameters. +As soon as one of the latter is present and not empty, the default value is +.Ql new , +else it is +.Ql disable . +Inheritance is never established implicitly, it must be explicitly requested. .It Va mac.do.rules The credentials rules for the jail. -It is always equal to the value that can be retrieved by the +See the description of the corresponding .Xr sysctl 8 knob .Va security.mac.do.rules -described in section -.Sx RUNTIME CONFIGURATION . -If set, and the jail parameter -.Va mac.do -is not so explicitly, the value of the latter will default to -.Ql disable -if empty, else to -.Ql new . +in subsection +.Sx "Sysctl Knobs" +above. +See also the preamble for the default values rule. +.It Va mac.do.exec_paths +The authorized executables. +See the description of the corresponding +.Xr sysctl 8 +knob +.Va security.mac.do.exec_paths +in subsection +.Sx "Sysctl Knobs" +above. +See also the preamble for the default values rule. .El +.Ss Consistency +Values read or set from jail parameters are always consistent with their +corresponding +.Xr sysctl 8 +knobs, effectively operating on the same internal +.Dq variable . .Pp -Each jail must have -.Xr mdo 1 -installed at path -.Pa /usr/bin/mdo , -as this path is currently not configurable. +All accesses to some parameter or some jail configuration as a whole, whether +a read or a modification, are sequentially consistent. +In other words, they appear to be atomic, and all threads see them happening in +the same order. .Sh EXAMPLES Here are several examples of single rules matching processes having a real user ID of 10001: @@ -405,6 +501,7 @@ current supplementary groups must be kept. .Sh AUTHORS .An Olivier Certner Aq Mt olce@FreeBSD.org .An Baptiste Daroussin Aq Mt bapt@FreeBSD.org +.An Kushagra Srivastava Aq Mt kushagra1403@gmail.com .Sh BUGS Currently, .Nm From nobody Fri May 29 16:02:02 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRp5Q6BB2z6flkR for ; Fri, 29 May 2026 16:02: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRp5Q1mwqz3Hxy for ; Fri, 29 May 2026 16:02:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070522; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rnlfH4NVtE9/AROPNZ36h4h3JqUoeUMIHAX7XHBzJ/w=; b=aU10AHZ3MU9DUiWKozhrYbU7QTBh3k5Rnsprg3Sbs/GSijAhVwxzER3gucYD2t4fRd19Pn bhPSGHLMx9jJlH/5kgyG3rG0eNFAe2ZHvdTqTybytIjQE0yoCeH91XM5PV9vezXQpPoQMt ORoK2MRyHpFZLs4udzoWexveAuXz6ZgpbEXabwElYBUANXbb/JvrzIWXL9A3rDt9511gK9 NRLFnDUVfQdyy0x5/vULabhSV9UVhXIronDMncJ4KzT648IEjsV6ukMv1C5YYJ8cdW0dEs a75makeRdr+AqnAho+NfSf/07xeWLXBBbuJ1i98Gn0yXGOfo5gCTm0XpqoaBaQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780070522; a=rsa-sha256; cv=none; b=DdMwwwIrH4V1ydIwaMoBvzP8842j7dny2GD8/cgWzF3zTaEtgTids0r+R6K4GPfrsmloUB 9mMODc9fvx4iCUeoOoNb3SFGzXj6cuVivYUMSctzTrU2XI1MVto09SlCd7iLkuDvHklHtz 0Ye8SiKAVUsqypEWB1Zna60APz0czyxG4W9AGZqbJz5SwvZwZsV4Fxv94ZbYpO7hh7OEx+ LX9pRa8v+QEz8cFqAZsC1WDyuqV55XhOPkBT1F4ZZMa138abJlTxnmmtPkyfpXL022rLD1 YyPR2crNT/gHF3vtd5WTAmioZdDl2/Y+yUiIpxs+k0p9k/enEy1TBhCWYV3Fcw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070522; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rnlfH4NVtE9/AROPNZ36h4h3JqUoeUMIHAX7XHBzJ/w=; b=m562M0py1r3McPFaw8CA1ZYiXfnYapmS9sG5ipKJJYUz57DZuhAMvsI8e81PX1xuMWn0Ug fUgUXLfbs8DVc/1vek9gJ/nthm2+hzl4OotxvZvhKJBzy8WeC2tgMrfLrbVQzsAuUL7svI qsIsgb+MxXe8miVYSyMk2R41Gbrn+55R2y+Afm2IiSsvCYA6zQ6WRGA66/lDikrzXhHnLk quR+PMUTCWwMnuhoYAbUk87bjalJUghGn9PqP6MZ4dmCervYuCcww6oAfvh8fxTkaGmsiU /M5urpBnGn3vULoHxJMBPdS7OZjuQUR1LCB/Xr3a9P1xWBJ7UXVdA1etPpYwZQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRp5Q1HvYzgn9 for ; Fri, 29 May 2026 16:02:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3608c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 16:02:02 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 79a987aba154 - main - MAC/do: Tests: Remove shebang lines List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 79a987aba154aca5965e4746ec5f867be8f22997 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 16:02:02 +0000 Message-Id: <6a19b87a.3608c.182f3071@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=79a987aba154aca5965e4746ec5f867be8f22997 commit 79a987aba154aca5965e4746ec5f867be8f22997 Author: Olivier Certner AuthorDate: 2026-05-22 16:47:04 +0000 Commit: Olivier Certner CommitDate: 2026-05-29 15:41:02 +0000 MAC/do: Tests: Remove shebang lines They are automatically added by . Reviewed by: bapt MFC after: 3 days Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38 --- tests/sys/mac/do/invalid_configs.sh | 2 -- tests/sys/mac/do/valid_configs.sh | 2 -- 2 files changed, 4 deletions(-) diff --git a/tests/sys/mac/do/invalid_configs.sh b/tests/sys/mac/do/invalid_configs.sh index f24309cb2f3b..9758a0239082 100644 --- a/tests/sys/mac/do/invalid_configs.sh +++ b/tests/sys/mac/do/invalid_configs.sh @@ -1,5 +1,3 @@ -#!/usr/bin/env atf-sh -# # Copyright (c) 2026, The FreeBSD Foundation # # This software was developed by Olivier Certner at diff --git a/tests/sys/mac/do/valid_configs.sh b/tests/sys/mac/do/valid_configs.sh index bd5b53b5d5d8..be4e59ce54ca 100644 --- a/tests/sys/mac/do/valid_configs.sh +++ b/tests/sys/mac/do/valid_configs.sh @@ -1,5 +1,3 @@ -#!/usr/bin/env atf-sh -# # Copyright (c) 2026, The FreeBSD Foundation # # This software was developed by Olivier Certner at From nobody Fri May 29 16:02:03 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRp5R4T1qz6flTW for ; Fri, 29 May 2026 16:02: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRp5R27Mbz3J1m for ; Fri, 29 May 2026 16:02:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070523; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GRgP82W6tkIsK35gfG6f4wLsv5w2RLbfalFsJRVDTCI=; b=ShnxOUf0JnMFO2A9mWSgsL4HdacZRQypQhMgz5tkbbFDN6aUgMzfEPxEKGrl+y1o96sUZ5 5rkDWw2tUB7OYaFY+evCHkPuegvVl5IdSm7tj0L3et4aaA3nJAVw5CdBv9wtuwGGXhGmdl FXU3vzYesIhHRyu/gUkMnUh2sC6uD+BGHlaLxUXblKQDL4bbgUNjTdM6GFfZK0JK/D6Dw1 IwRLU5oiaedUROBpXZLvJonQ5Z4/tliYvhTS0F0W2isNDDg7eySkJwF1YmhT5H3Zhmzw6Q LuVa7cmFzCC5bBxtMmZ1DOVexmITY3Nz3e9Z36xEm3KeI78onkfSVyLjeA/neA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780070523; a=rsa-sha256; cv=none; b=yIXr7bl1WfcvhlF/L0tfe4DLwNhdNv3pgauh3DGX4hqZgzq4V5vnXNzopCOlk7OyfHOk+O GJjDQvAOpiO4wWwQqJ96sso51kx5rdPBacU5w1Sku6uh6cdLg/tUOLs6qsMAkFQ49pzhW1 AcuxFrPgij2kOnR5WJFrnit/qICZmB3mtypBCyq8xRohBefO9VSOTDiyglLPuKjEeK9E12 beQ/coS12ca57DE9NEmyIpg8rYHijc1qyWG4A+PplHgafk3c+QXLL4bG3KQV7cC1bDcP1H zEPSnjkRGFF1X1dO7FtqbIV0C3MtORXbbGS0ovmLwujLtafi2502BNsyueiaCw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070523; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GRgP82W6tkIsK35gfG6f4wLsv5w2RLbfalFsJRVDTCI=; b=g5A4mBoxI/67Moa1Aa2bak7aM2cB7O1/jRNAcH8WWoVoDrirD4PxxqaHGsG3XcafP8S6DV xs0AWu7Pyss6/A+mH0Ymdkjw1lK8Wh9yKmH41eg8kVlpjLPYNfvwIJXRROTYQA7oEVqSWf 9q4bN08qYLwv4quN3bpT5el25Qw6Mso8jLJFoCzx8yz6o5ZgOReNvSIrqRuU0xKgWEPXPF 1hJCHa04EVJdk/m7tz4/DzO2jdpH7uFNKJSb68tDR+npsQigfSU2ICDpxC5syy3Ml9udTX zFaS/A/Op/dfE6mKu3iwnxMQ64A8y0lHtjbL6J3ciC7vsaoClmFIZOZGRIt2Zw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRp5R1g1Yzgpb for ; Fri, 29 May 2026 16:02:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35f10 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 16:02:03 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: b0c948fe92ac - main - MAC/do: Tests: Fix copyrights List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b0c948fe92acc8bd295cc53584e25c082c749cd1 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 16:02:03 +0000 Message-Id: <6a19b87b.35f10.7c808221@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=b0c948fe92acc8bd295cc53584e25c082c749cd1 commit b0c948fe92acc8bd295cc53584e25c082c749cd1 Author: Olivier Certner AuthorDate: 2026-05-26 17:06:55 +0000 Commit: Olivier Certner CommitDate: 2026-05-29 15:41:17 +0000 MAC/do: Tests: Fix copyrights No comma needed after a single year. Add SPDX. Reviewed by: bapt MFC after: 3 days Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38 --- tests/sys/mac/do/common.sh | 3 ++- tests/sys/mac/do/invalid_configs.sh | 4 +++- tests/sys/mac/do/valid_configs.sh | 4 +++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/sys/mac/do/common.sh b/tests/sys/mac/do/common.sh index 88529adcc1f3..444a74b4c2ab 100644 --- a/tests/sys/mac/do/common.sh +++ b/tests/sys/mac/do/common.sh @@ -1,5 +1,6 @@ +# Copyright (c) 2026 The FreeBSD Foundation # -# Copyright (c) 2026, The FreeBSD Foundation +# SPDX-License-Identifier: BSD-2-Clause # # This software was developed by Olivier Certner at # Kumacom SARL under sponsorship from the FreeBSD Foundation. diff --git a/tests/sys/mac/do/invalid_configs.sh b/tests/sys/mac/do/invalid_configs.sh index 9758a0239082..848e2b5c9579 100644 --- a/tests/sys/mac/do/invalid_configs.sh +++ b/tests/sys/mac/do/invalid_configs.sh @@ -1,4 +1,6 @@ -# Copyright (c) 2026, The FreeBSD Foundation +# Copyright (c) 2026 The FreeBSD Foundation +# +# SPDX-License-Identifier: BSD-2-Clause # # This software was developed by Olivier Certner at # Kumacom SARL under sponsorship from the FreeBSD Foundation. diff --git a/tests/sys/mac/do/valid_configs.sh b/tests/sys/mac/do/valid_configs.sh index be4e59ce54ca..44cfd62acc6e 100644 --- a/tests/sys/mac/do/valid_configs.sh +++ b/tests/sys/mac/do/valid_configs.sh @@ -1,4 +1,6 @@ -# Copyright (c) 2026, The FreeBSD Foundation +# Copyright (c) 2026 The FreeBSD Foundation +# +# SPDX-License-Identifier: BSD-2-Clause # # This software was developed by Olivier Certner at # Kumacom SARL under sponsorship from the FreeBSD Foundation. From nobody Fri May 29 16:02:04 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRp5S4J2cz6flhG for ; Fri, 29 May 2026 16:02: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRp5S3C9nz3J6K for ; Fri, 29 May 2026 16:02:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070524; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sm9RHuX5iyoCaNUtjATTlFwjqWlu/0SkmhaArfeXpsU=; b=blzQ1DAeU0uNzJ1mVxCJ6KO/vhDessbEA+ddmkCBxmY3SHBpdBDMCBVBtOy0SFlQ4M7xDQ wKvQqOBTMhLRkd4rpkoEc493gtD034ZJnew0MHiiEg9lRMvE6svmxhFfOT503itm22hvZb RHO0H0FzbH+nJV7U0TVfrJ8t9AYO3ZK5B78jTwbstDFE+Isq9CVZDqlZD118JPb4ZNn4CK DUHJs6beScoMgmj1L/Vl4sF2Us0soHxXKdWdKCaMU1mSAyPfSEYN41hosd+ec72a4PjtyU hU37h2SUiVoD6S6fMHdWanc+HJVQFvzKMxMq3UjRvarzQJJdBLhsANQziFycSw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780070524; a=rsa-sha256; cv=none; b=SFZ/YmgSlBr/1ZVt41OkIiJSi3uS6Xfu5yjTUhK5fop0XMM3OsjjU7QJClsUUmFWOnANwI 9pI53KZ46WavSrW0NpbVmEqyBN5TgQCuF4dk3l6dF3YREg6cgDgfo2n85NuhLcIcDMTK0t 3uxi3ulr7NYY7flQhtIGXAVm8VXc1XXb+PU5e3uHDmwRiFmjEKVQJOLgS4Ozkywyb4FdDi SLPJywnG5hs0cJyykK1eUvxtUv4A+g9a6IMiM+0eS+YtA196H+O1z25tbTibNGVhvuOkBb skJkSalysoCIV3+jq95tcZDc8MD11GHn62NQB+xgWRLISQpTCzsDrLW4xo2uTA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070524; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sm9RHuX5iyoCaNUtjATTlFwjqWlu/0SkmhaArfeXpsU=; b=EtwTDeppA9Ofl2PRmj8omlIIViFolB6cH3qdOxijGrcMKHjGFGWx7rOOEs509Nn3jQ5BZF kAz1USp1wFlYMhFjqaWbGkFw29ga+NnPM+iycNX0we9A0DZlJIcEZiuwm8Z+k8MG5k+PgX vZvf4XkfMygIko4G/sNMMy4jZvCy6G+jq5z6TRcfhwRHkvnR7knek0IDIEjkL8DMYoxxh4 9gEppjgLCvN0VIVOwlo8j+suaxJSDagS2+7mg9j1pnEUlkBhj5hJASs1lCGFRqxIf4aDTc XIbF7cLnU6AdJzF2vfoXFhnTtbXc1B05F5dfdM9zeJQ25A7+ucP/1MfL03El6g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRp5S2SVSzgpc for ; Fri, 29 May 2026 16:02:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 367aa by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 16:02:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 6159187329b5 - main - MAC/do: Tests: Declare required programs closer to use List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6159187329b56a9b550db193796ae4d76c1a306c Auto-Submitted: auto-generated Date: Fri, 29 May 2026 16:02:04 +0000 Message-Id: <6a19b87c.367aa.11d54015@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=6159187329b56a9b550db193796ae4d76c1a306c commit 6159187329b56a9b550db193796ae4d76c1a306c Author: Olivier Certner AuthorDate: 2026-05-22 14:19:57 +0000 Commit: Olivier Certner CommitDate: 2026-05-29 15:41:24 +0000 MAC/do: Tests: Declare required programs closer to use Reviewed by: bapt MFC after: 3 days Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38 --- tests/sys/mac/do/Makefile | 1 - tests/sys/mac/do/common.sh | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/sys/mac/do/Makefile b/tests/sys/mac/do/Makefile index 980067ea56e6..bfca40efdc8d 100644 --- a/tests/sys/mac/do/Makefile +++ b/tests/sys/mac/do/Makefile @@ -9,6 +9,5 @@ ${PACKAGE}FILES+= common.sh TEST_METADATA+= execenv="jail" TEST_METADATA+= required_kmods="mac_do" TEST_METADATA+= required_user="root" -TEST_METADATA+= required_programs="sysctl" .include diff --git a/tests/sys/mac/do/common.sh b/tests/sys/mac/do/common.sh index 444a74b4c2ab..6c4b138bdac0 100644 --- a/tests/sys/mac/do/common.sh +++ b/tests/sys/mac/do/common.sh @@ -69,5 +69,7 @@ sysctl_set_and_check_fails_rules() sysctl_set_and_check_rules_common sysctl_set_and_check_fails "$value" } +atf_require_prog sysctl + # Do not pollute kernel logs with parse errors sysctl $PPE_KNOB=0 >/dev/null 2>&1 From nobody Fri May 29 16:02:05 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRp5V22q8z6flcM for ; Fri, 29 May 2026 16:02: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRp5T3lYtz3J6T for ; Fri, 29 May 2026 16:02:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070525; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M0QkOkV8NR7gBFPC9u8+GVfaTI8J5du3TtJh+LwBdzA=; b=RrtySqvbK3wi8UJ3L99a8Fk3pUt1G/EOkJy/0S8B+UtwB6R6bClGY4HwaRaUSdgTUuHTgk SRQ9ipeNb4ifnUB/4q/Fj2RxpPiTPOd3kFF6uXjNZZUvn+729PVaQWgqxkhKYjEdImckcr Yqij9u29az29f6QOwBnEHXOP3Q1JBpAtkS6DC4Z8lO9uNqEZOUrdO/TT/ocaIIHAdG4aNo ZsbX1ScCa6oig7Z1D0IpIwHu2HZJony9ResA7XoJdgZ3ISogm9R7Jw56mzKHNwL2m44kXo AjH0y1XuhMi7gk42knirKDzCBQNWAJiE4fdy01yZ2cLP0AtrGO+kywHfrddTvQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780070525; a=rsa-sha256; cv=none; b=uug5HQy3EpOjmdtJsMl2ZD4bra/FGGqt3RiIN0ZKdxFxR+JTCBlZNrT8OEKChJEtAhEtuG +w/e7AVh2876wRFFoJggqvRFognL0EZ37lq2OStQzq+u8lAK1V7c/cpBS4oZVoIfJcFtN+ A1KViGyIpNLAxXOrdlmoAHq9aSw68IHynJzZRNyIijX7RuY6snwSTSXP+6x7Ej2mjmgOv4 AR0u3LF7RwWDI58EQaLqlpE6ti1Cubz9HUxss8J/vcN5PE6y+nrqJjWXy5WZjFe2+1NHoB zTqtffZxcY263F362gH+HDUsCT5GDEQWoIlpDoFSF5LPDtf4UERh5ILNxe09eQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070525; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M0QkOkV8NR7gBFPC9u8+GVfaTI8J5du3TtJh+LwBdzA=; b=hIM+W2CP8wpMUm9tv25hF2ue8Ru5Mepm796VupqOTrzvDVs9nfCMnLXPcxOoQ1NEOSlozd 5ttGK7k1uWgj0vAIsxXsRC6xr2A75AhKHjY/dBxVTRYvSGasZRDmneSaThc0T1olc6OZqA RYIhVgfUFjreK/KRpLzWm7ZTbUAklK7SxKFJohiITu3uWEOzNTzXhmZIPXk90nZ06dc5CY Xafp43hsrANht3yl0S4j6woGBxxarHOwoIwkSFGlIB9iW2W60W+gL7KuahA0KEdPJDKhUa diIHzlGzKXizt/iVLes0cdiA/IImUQU4jCXfvjk3yMn4oWi+iNvA4GVkhuKuYw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRp5T3DCjzgR8 for ; Fri, 29 May 2026 16:02:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35f14 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 16:02:05 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 33daea3f862d - main - MAC/do: Tests: Quote the source directory List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 33daea3f862d7fe996602756805a92a600356f94 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 16:02:05 +0000 Message-Id: <6a19b87d.35f14.27512d18@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=33daea3f862d7fe996602756805a92a600356f94 commit 33daea3f862d7fe996602756805a92a600356f94 Author: Olivier Certner AuthorDate: 2026-05-22 14:21:39 +0000 Commit: Olivier Certner CommitDate: 2026-05-29 15:41:29 +0000 MAC/do: Tests: Quote the source directory In a standard test suite installation, this is not necessary, but be bullet-proof to custom ones, however improbable. Reviewed by: bapt MFC after: 3 days Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38 --- tests/sys/mac/do/invalid_configs.sh | 2 +- tests/sys/mac/do/valid_configs.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/sys/mac/do/invalid_configs.sh b/tests/sys/mac/do/invalid_configs.sh index 848e2b5c9579..d1a9eb8c1e96 100644 --- a/tests/sys/mac/do/invalid_configs.sh +++ b/tests/sys/mac/do/invalid_configs.sh @@ -75,7 +75,7 @@ rules_wrong_separator_body() atf_init_test_cases() { - . $(atf_get_srcdir)/common.sh + . "$(atf_get_srcdir)"/common.sh atf_add_test_case rule_no_target_part atf_add_test_case rule_no_match_part diff --git a/tests/sys/mac/do/valid_configs.sh b/tests/sys/mac/do/valid_configs.sh index 44cfd62acc6e..fc1c9a370854 100644 --- a/tests/sys/mac/do/valid_configs.sh +++ b/tests/sys/mac/do/valid_configs.sh @@ -120,7 +120,7 @@ gid= 1001 >gid =5" atf_init_test_cases() { - . $(atf_get_srcdir)/common.sh + . "$(atf_get_srcdir)"/common.sh atf_add_test_case rule_uid_to_any atf_add_test_case rule_uid_to_uid From nobody Fri May 29 16:02:07 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRp5X1FK7z6flcS for ; Fri, 29 May 2026 16:02: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRp5W5ZNwz3J8x for ; Fri, 29 May 2026 16:02:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070527; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CVIeqI1x4ZAH1FSggkZr+6aECNHCfG4DH9LuKuBrvls=; b=Axz0KO4wOJwb7G9ge6f7DHzk88112Nk5LDutPud2siMyYTwO9MxE3dRro35g4rPhF/8URx TMZ4TxcO+sepD4XVX+0tnRLWl7YmfaPaOD/Uue8DLy4TBiukXecye2PZfTgmuYdqN0i1Ie 1LazHIUSSIjiivH+hjvJdsNLSxI2Dk9aUgdseEc1k+V0LTlJzDq41aoqxoew5C3QHBPULx kUvD9HTkaMxji1hJQbXj+3rt+yEU0YneIkc/1A0ClcxzFHDRjxOZbY8tdxDNVxPnGJaBtL 5Pj88BYTljnE3O2xW2dEl0Rf8JbMe+NGFqcI1qo+na+LPvC1bYs9MO1+9XbwiA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780070527; a=rsa-sha256; cv=none; b=jo3aR1HC69VqfeEjXV2I7ACUcapadhZdGLauhtn4TQ0KfNnj4t24FxlJ2kkfRS4aFBGnHN tqbpRH8/siiXjvIeSKbkZ2OPzNJ6CMvOkKtxJi7MOiZ7BELe6UBB10+O/FhKdzUNIPT+Bk 2IVXvyTaO1/fczKbl+S/vsKFh5lDb15JZFO7JErkn3xgYOCdReOr8VvQSapv9yY3GvOjgv ZuykFzbC5wU1mQ+cFYoicYSpwAC/xyYzoWSptOTH1hhBsrwdCIIiwdz0v+hx551UA04vhM 4YtcD6rF1E/H+06Ny5ayN7H8sNCSEpLbS2EIN8PrAdq7q7KZTrGWNDNEWds7kQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070527; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CVIeqI1x4ZAH1FSggkZr+6aECNHCfG4DH9LuKuBrvls=; b=a6tkD8E3FJRBahoXBHOmmfRcsWxbKOgQgrHcjMYTCHmrwHG8osFdFbpRLVB6CndxPTX1sV BUkr9ZbwBtELN7jhVJ6mz2Qxth9N+0JF7c2qMTYp+o0Lfp0cT3lt0Inqm95q3EyL1S8PED Hty0W9K9EXfJBMMWaZxj/1rzFlPjYTWao1msyt9O5OU1PK48110aiWTGLgEGSo7oYTimnT r6R5F1VuPnI3o2vkDtX4BtGr2FgHCHT5w9lEXm2sDSr9GwCrzz9CLKkzSKfPuLgaq0Apne 2bn4OVfVObHw2w5DNQxMdmkR02kI5pgWMrhgLEZrvWWfkxijaDTo/XTQPhrpFQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRp5W4n6Fzgph for ; Fri, 29 May 2026 16:02:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 367ae by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 16:02:07 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 851499046d25 - main - MAC/do: Add consistency tests List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 851499046d25fbe5841a55fb7bfcc879522f59a8 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 16:02:07 +0000 Message-Id: <6a19b87f.367ae.8e17660@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=851499046d25fbe5841a55fb7bfcc879522f59a8 commit 851499046d25fbe5841a55fb7bfcc879522f59a8 Author: Olivier Certner AuthorDate: 2026-05-22 14:33:18 +0000 Commit: Olivier Certner CommitDate: 2026-05-29 15:41:51 +0000 MAC/do: Add consistency tests Test that: 1. Concurrent changes to different parameters on the same jail are independent/atomic. 2. Inheritance works. 3. Relaxing only parent jail rules does not leak to a subjail thanks to sequential consistency. 4. Sysctl knobs and jail parameters stay consistent. Some of these tests may be extended in the future with several layers of jails (there is only a single subjail currently). Reviewed by: bapt MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38 --- tests/sys/mac/do/Makefile | 2 +- tests/sys/mac/do/consistency.sh | 211 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 212 insertions(+), 1 deletion(-) diff --git a/tests/sys/mac/do/Makefile b/tests/sys/mac/do/Makefile index bfca40efdc8d..0c40f65b65f6 100644 --- a/tests/sys/mac/do/Makefile +++ b/tests/sys/mac/do/Makefile @@ -2,7 +2,7 @@ PACKAGE= tests TESTSDIR= ${TESTSBASE}/sys/mac/do -ATF_TESTS_SH+= valid_configs invalid_configs +ATF_TESTS_SH+= valid_configs invalid_configs consistency ${PACKAGE}FILES+= common.sh diff --git a/tests/sys/mac/do/consistency.sh b/tests/sys/mac/do/consistency.sh new file mode 100644 index 000000000000..6a64917edb6d --- /dev/null +++ b/tests/sys/mac/do/consistency.sh @@ -0,0 +1,211 @@ +# Copyright (c) 2026 The FreeBSD Foundation +# +# SPDX-License-Identifier: BSD-2-Clause +# +# This software was developed by Olivier Certner at +# Kumacom SARL under sponsorship from the FreeBSD Foundation. + +SJ_JID_FILE=sj.jid + +atf_test_case concurrent_rules_exec_paths_changes +concurrent_rules_exec_paths_changes_head() +{ + atf_set descr "Consistency of rules and exec paths changes on same jail" +} +concurrent_rules_exec_paths_changes_body() +{ + local rules exec_paths rules_es exec_paths_es + + for I in $(jot - 1 1000); do + sysctl_set_and_check_rules "uid=$I>uid=1001" + done & + rules=$! + + for I in $(jot - 1 1000); do + sysctl_set_and_check_exec_paths /nowhere/nonexistent$I + done & + exec_paths=$! + + wait $rules + rules_es=$? + + wait $exec_paths + exec_paths_es=$? + + # atf_check called in the asynchronous AND-OR lists above causes exit of the + # subshells and also a write to the ATF result file. These writes are + # concurrent and may cause the result file to be malformed. Consequently, + # it is important that, once execution becomes sequential again, atf_fail() is + # called again (and not just exit()). + if [ $rules_es -ne 0 ] || [ $exec_paths_es -ne 0 ]; then + atf_fail "Rules exit status: $rules_es, \ +exec paths exit status: $exec_paths_es" + fi +} + +atf_test_case inheritance cleanup +inheritance_head() +{ + atf_set descr "Simple inheritance test (values propagated to child jail)" +} +inheritance_body() +{ + local sj rules exec_paths + + # For the sake of not running the test under Kyua + mac_do_ensure_disabled + + sj=$(launch_subjail) + echo $sj > "${SJ_JID_FILE}" + + jail -m jid=$sj ${ROOT_JAIL_PARAM}=inherit + JEXEC="jexec $sj" + mac_do_check_disabled + JEXEC= + + rules="uid=1001>uid=0" + sysctl_set_and_check_rules $rules + JEXEC="jexec $sj" + sysctl_check_rules $rules + JEXEC= + + rules="gid=1001>uid=0" + sysctl_set_and_check_rules $rules + JEXEC="jexec $sj" + sysctl_check_rules $rules + JEXEC= + + # Not really necessary, just to keep mac_do(4) disabled + sysctl_set_and_check_rules "" + + exec_paths="/nowhere/nonexistent" + sysctl_set_and_check_exec_paths $exec_paths + JEXEC="jexec $sj" + sysctl_check_exec_paths $exec_paths + JEXEC= + + exec_paths="$MDO" + sysctl_set_and_check_exec_paths $exec_paths + JEXEC="jexec $sj" + sysctl_check_exec_paths $exec_paths + JEXEC= +} +inheritance_cleanup() +{ + # We clean up our subjail manually just for the sake of launching this test + # with atf-sh. Kyua is informed that these tests should run in a jail, and + # kills it automatically after the test, which kills all subjails. It is + # annoying that atf-sh does not offer a more practical way to pass + # information from the body to the cleanup part than a file. + jail -r $(cat "${SJ_JID_FILE}") + rm -f "${SJ_JID_FILE}" +} + +atf_test_case inheritance_relax_parent_jail cleanup +inheritance_relax_parent_jail_head() +{ + atf_set descr \ + "Test sequential consistency in a \"relax parent rules\" scenario" +} +inheritance_relax_parent_jail_body() +{ + local sj rules exec_paths subproc + + sj=$(launch_subjail) + echo $sj > "${SJ_JID_FILE}" + + jail -m jid=$sj ${ROOT_JAIL_PARAM}=inherit + rules="uid=1001>uid=0" + sysctl_set_and_check_rules $rules + # Additional inheritance sanity check + JEXEC="jexec $sj" + sysctl_check_rules $rules + JEXEC= + exec_paths="$MDO" + sysctl_set_and_check_exec_paths $exec_paths + # Additional inheritance sanity check + JEXEC="jexec $sj" + sysctl_check_exec_paths $exec_paths + JEXEC= + + # Launch a process that tries to become 'root' from user 1002, and verify + # that this always fails. + { for I in $(jot - 1 1000); do + jexec $sj "$MDO" -u 1002 -g 1002 -G 1002 "$MDO" -i true 2>/dev/null && + exit 1 + done; true; } & + subproc=$! + + # Decouple the subjail from the parent jail, copying its parameters + jail -m jid=$sj ${ROOT_JAIL_PARAM}=new + # Allow user 1002 to become 'root' on the parent jail + sysctl_set_and_check_rules "$rules;uid=1002>uid=0" + JEXEC="jexec $sj" + # Additional sanity check (that rules of the subjail are now independent) + [ "$(sysctl_rules)" == $rules ] || atf_fail "Rules not copied" + [ "$(sysctl_exec_paths)" == $exec_paths ] || + atf_fail "Exec paths not copied" + JEXEC= + + wait $subproc || atf_fail "A transition wrongly succeeded in the subjail!" +} +inheritance_relax_parent_jail_cleanup() +{ + # See inheritance_cleanup() for explanations + jail -r $(cat "${SJ_JID_FILE}") + rm -f "${SJ_JID_FILE}" +} + +atf_test_case same_knob_and_jail_parameter cleanup +same_knob_and_jail_parameter_head() +{ + atf_set descr \ + "Corresponding sysctl knobs and jail parameters have same value" +} +same_knob_and_jail_parameter_body() +{ + local sj rules exec_paths subproc + + sj=$(launch_subjail) + echo $sj > "${SJ_JID_FILE}" + + # Set sysctl knobs, observe parameters + rules="uid=19999>uid=21700" + exec_paths="/improbable/path/he" + JEXEC="jexec $sj" + sysctl_set_and_check_rules $rules + sysctl_set_and_check_exec_paths $exec_paths + JEXEC= + atf_check -o inline:"$rules\n" jls -j $sj ${RULES_JAIL_PARAM} + atf_check -o inline:"${exec_paths}\n" jls -j $sj ${EXEC_PATHS_JAIL_PARAM} + + # Set parameters, observe knobs + rules="uid=128000>uid=-1" + exec_paths="/hello/i_ve/changed" + jail -m jid=$sj ${RULES_JAIL_PARAM}=$rules \ + ${EXEC_PATHS_JAIL_PARAM}=${exec_paths} + JEXEC="jexec $sj" + sysctl_check_rules $rules + sysctl_check_exec_paths $exec_paths + JEXEC= +} +same_knob_and_jail_parameter_cleanup() +{ + # See inheritance_cleanup() for explanations + jail -r $(cat "${SJ_JID_FILE}") + rm -f "${SJ_JID_FILE}" +} + + +atf_init_test_cases() +{ + . $(atf_get_srcdir)/common.sh + atf_require_prog jot + # Needs an absolute path for mdo(1), to set it in exec_paths + atf_require_prog "$MDO" + + atf_add_test_case concurrent_rules_exec_paths_changes + atf_add_test_case inheritance + atf_add_test_case inheritance_relax_parent_jail + atf_add_test_case same_knob_and_jail_parameter +} From nobody Fri May 29 16:02:06 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRp5W09jlz6flTc for ; Fri, 29 May 2026 16:02: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRp5V4kfRz3J6Z for ; Fri, 29 May 2026 16:02:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070526; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RRRUCey/UphbgZXAGxbqIV12gyYE6BvzqX48OeJ8jGw=; b=KYi4ZHSoQ6xFJy4sWR8aH5QWAkndQ70EWtglIyMINPK01m6/RIQaMwaXaXtpPAYHCB7Q2B fZFv2ZXYJDyOqh/VrHqwUrtSCHhnVQw9sOVp8bpoUvi9zZ+Z6InWi2PgfKukVotzjn1aCW nmH/KoBN7cWwmain6qR50kTzbnX1xhinUu498HfwSKbSSrsVDdH0Ki52kePQ+BOY2xZ26a YKFB6OspgmNJZCPKUTcI4V2muWpCWIg2W8FyJYaMgbecUxtRjHSklBPTxNsek864GJvylj S/Y2tDf7iquS4jsx3DcQYE6iCbJTgrQYyf++jgWNXkiAOU+P/oBZSYzxMX7MhA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780070526; a=rsa-sha256; cv=none; b=KXcwOMwps8VqLDxtRForaAsMYv8xCfs5lxOLx5uG3z+tu57sjCgyZfjmg0cPA8bEdaJ6zn 3VaSlYmexMZ9nCpOX6wHasHMi3rIvhei/FlVxJ91t2om3BPFxyHjjvEoYsNTynOR36qV+U L0ABnWMwRgTe6SppQYvwvkC6nOfHnIC3DXzZV/UJNRJCRVkR82mpUu8KdxeBnBhypNO+se qXSHZZKE9L4sQSfanGVwUUQpjq6+bnu48dDHqMWqej40/nYMp5guA/zPOp6+73vZyFBpnw XXjL73whuZDwQfwK4kaYQPMcq2hb8F6vXgGbiaHofZuqtT6kpAUn65wBaGCVZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070526; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RRRUCey/UphbgZXAGxbqIV12gyYE6BvzqX48OeJ8jGw=; b=YuA6kzT5yoorgsOwTG79i0XIqkvgrf2xruKuqtgpZjs2W/VX1L6YoAcCOS7LbUCPAm9lcz LEEuQlzfKLSEYVl4/OR5iJIkDqMNWZBFgK2xcXdyUgH74+/dma7qszt7kj+RnX0Is6NbZd Kze+ACZiQr3aB3JBP1YKhSl9KApJxG709gIoZxY853/Ojs65t7DhapowAlx63UHxFVC/9N u9aX9rN+sQr7C0xEZCI10Ybzqt6KWK93jSfJFmu2b1FVjeg6M1MmQmHs9dPeyKJsCwIZTO 3opRR1RXTSqXpSkHPA8ZOA6pIzGLW3BQsIEP5whbd+u8IjMIILE1Yb97KbEWkA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRp5V43VbzgR9 for ; Fri, 29 May 2026 16:02:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33f57 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 16:02:06 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: a95ff5ef7d1f - main - MAC/do: Tests: Add support for exec paths, jail parameters, subjails List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a95ff5ef7d1ffcb701913028253a4700cd9a1459 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 16:02:06 +0000 Message-Id: <6a19b87e.33f57.5e693405@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=a95ff5ef7d1ffcb701913028253a4700cd9a1459 commit a95ff5ef7d1ffcb701913028253a4700cd9a1459 Author: Olivier Certner AuthorDate: 2026-05-22 14:23:31 +0000 Commit: Olivier Certner CommitDate: 2026-05-29 15:41:36 +0000 MAC/do: Tests: Add support for exec paths, jail parameters, subjails And also allow configuration of the mdo(1) executable path. This commit only contains new or modified infrastructure. No functional change intended at this point. Reviewed by: bapt MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38 --- tests/sys/mac/do/common.sh | 119 +++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 110 insertions(+), 9 deletions(-) diff --git a/tests/sys/mac/do/common.sh b/tests/sys/mac/do/common.sh index 6c4b138bdac0..4f0e838bbf5f 100644 --- a/tests/sys/mac/do/common.sh +++ b/tests/sys/mac/do/common.sh @@ -10,11 +10,79 @@ rules_parameter() echo "$1".rules } +exec_paths_parameter() +{ + echo "$1".exec_paths +} + +: ${MDO:=/usr/bin/mdo} + +ROOT_KNOB=security.mac.do +RULES_KNOB=$(rules_parameter ${ROOT_KNOB}) +EXEC_PATHS_KNOB=$(exec_paths_parameter ${ROOT_KNOB}) +PPE_KNOB=${ROOT_KNOB}.print_parse_error + +ROOT_JAIL_PARAM=mac.do +RULES_JAIL_PARAM=$(rules_parameter ${ROOT_JAIL_PARAM}) +EXEC_PATHS_JAIL_PARAM=$(exec_paths_parameter ${ROOT_JAIL_PARAM}) + +# To be overridden to execute commands in a sub-jail +JEXEC= + +# Exit status: 0 iff disabled +mac_do_disabled() +{ + [ -z "$($JEXEC sysctl -n ${RULES_KNOB})" ] || + [ -z "$($JEXEC sysctl -n ${EXEC_PATHS_KNOB})" ] +} + +mac_do_check_disabled() +{ + mac_do_disabled || atf_fail "mac_do(4) expected disabled but is not." +} + +mac_do_ensure_disabled() +{ + mac_do_disabled || $JEXEC sysctl ${RULES_KNOB}="" +} + +sysctl_rules() +{ + $JEXEC sysctl -n ${RULES_KNOB} +} + +sysctl_exec_paths() +{ + $JEXEC sysctl -n ${EXEC_PATHS_KNOB} +} + +# $1 = sysctl func, $2 = expected value +sysctl_check() +{ + local func value + + func=$1 + value=$2 + atf_check [ "$($func)" = "$value" ] +} + +# $1 = value +sysctl_check_rules() +{ + local value -CONF_ROOT_KNOB=security.mac.do -RULES_KNOB=$(rules_parameter ${CONF_ROOT_KNOB}) -PPE_KNOB=${CONF_ROOT_KNOB}.print_parse_error + value=$1 + sysctl_check sysctl_rules $value +} +# $1 = value +sysctl_check_exec_paths() +{ + local value + + value=$1 + sysctl_check sysctl_exec_paths $value +} # $1 = knob name, $2 = value sysctl_set_and_check() @@ -23,8 +91,8 @@ sysctl_set_and_check() knob=$1 value=$2 - atf_check -o ignore sysctl "$knob"="$value" - atf_check -o inline:"$value\n" sysctl -n "$knob" + atf_check -o ignore $JEXEC sysctl "$knob"="$value" + atf_check -o inline:"$value\n" $JEXEC sysctl -n "$knob" } # $1 = knob name, $2 = value @@ -35,8 +103,8 @@ sysctl_set_and_check_fails() knob=$1 value=$2 orig_value=$(sysctl -n "$knob") - atf_check -s not-exit:0 -o ignore -e ignore sysctl "$knob"="$value" - atf_check -o inline:"${orig_value}\n" sysctl -n "$knob" + atf_check -s not-exit:0 -o ignore -e ignore $JEXEC sysctl "$knob"="$value" + atf_check -o inline:"${orig_value}\n" $JEXEC sysctl -n "$knob" } # $1 = sysctl function, $2 = value @@ -46,9 +114,9 @@ sysctl_set_and_check_rules_common() func=$1 value=$2 - "$func" ${RULES_KNOB} "$value" - # Same spec but using the older in-rule separator (':') + # Use older in-rule separator (':') first to have final value as specified "$func" ${RULES_KNOB} "$(echo "$value" | sed 's%>%:%')" + "$func" ${RULES_KNOB} "$value" } # $1 = value @@ -69,7 +137,40 @@ sysctl_set_and_check_fails_rules() sysctl_set_and_check_rules_common sysctl_set_and_check_fails "$value" } +# $1 = sysctl function, $2 = value +sysctl_set_and_check_exec_paths_common() +{ + local func value + + func=$1 + value=$2 + # Use older in-rule separator (':') first to have final value as specified + "$func" ${EXEC_PATHS_KNOB} "$(echo "$value" | sed 's%>%:%')" + "$func" ${EXEC_PATHS_KNOB} "$value" +} + +# $1 = value +sysctl_set_and_check_exec_paths() +{ + local value + + value=$1 + sysctl_set_and_check_exec_paths_common sysctl_set_and_check "$value" +} + +# Create a persistent subjail. Echoes its JID. +launch_subjail() +{ + ( + set -o pipefail + $JEXEC jail -c -J /dev/stdout persist=true | + sed -nE 's%^.*jid=([0-9]+).*$%\1%p' + ) || atf_fail "Cannot create a subjail (check children limits?)" +} + atf_require_prog sysctl +atf_require_prog jail +atf_require_prog sed # Do not pollute kernel logs with parse errors sysctl $PPE_KNOB=0 >/dev/null 2>&1 From nobody Fri May 29 16:06:28 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRpBf0YjFz6flmf for ; Fri, 29 May 2026 16:06: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRpBd4z4tz3SL6 for ; Fri, 29 May 2026 16:06:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070793; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yP6uRoBXITeMoCEFJnCd4fQYhSNmcwO7IA7AZ6i3rZo=; b=f/pO/cc+azduK/wVFuenXtgGBbiGBZL7YNiIF9E2Ho0oPD8STp6TCvOCufXGV7EwUQbsiy 2GktYcTlSTarwOc+5nyjv0KqHCOR8yJt46gBV4THhxBMDwf80Ulr4iKgV9P3O/afgvKlLw f+FG1MYFuu4H12OQa5+G2XSx2nIqtSQYKgSOAjLpg2CbGwanWkSju0p4iaP9jM59rCmz5I iWWwBVmLGOgbYASTITex1Iwqhp8tU4p5+khTflWMYqk/V8TkYY3T9ogiHVhRW57nR2E8XB zeNbzD5DlaH8YNr7PDGqlGGY2FBXcPeN0fexajZlv/9W5B/JFn+QLkZLZXyZOw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780070793; a=rsa-sha256; cv=none; b=USMw+nj1AN/f2wspfenBort+LNDnrobycamFipdWSJnd2aIr1xgKkXGGtBI/IJCbKxNElD hEi7NZcwxoH9EX9eU0p6AIS09rfz5FFNblrwZzDREpJtW9iXDiNRuN3Kn4CCTVC2WXQEnm 48jcre+wCUpI7WOk+hdys5Pm1gb5/ioqR+foBQ9ZWyV82NvVRgCNAgOpAwCYhuV2AngAGE jTY/3vRgz+8eVwSfAlhlmZaNGHgcM08ZKKVYh1HjoUQ567He8tpzBp59kohumcSd7wD5KF 7hSGBIBegxY83jsS0tJdIVwHGE1I52t5OvueetdCjXwvue2ANxK+DetiW3eTUA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070793; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yP6uRoBXITeMoCEFJnCd4fQYhSNmcwO7IA7AZ6i3rZo=; b=S0GrMU2n1YifY087R9zxHpJcPmL30t/iZlIodQ6OK0qlu3aPJhSFhQqyPWeMVi7Z3j+CcO uUNFhxwnF2uEqxl8PYlYqSHHPMzDiUKgc7MKXTDQDlePEDU5lVuwi7aEFrtDRJlUPdUPe2 lJCJLnUeoFviUYEefZjuwpQI10EKNZlSB0KhCKUlzz3lX4qvkAnRRtX0Pm/p/VLBZce5Es A/dQVzBPCd91FgJjM25vJCvLCOFoCsOs9zRfG34q1VM7seSH7y/5gvN2WWf0nyAZcSY4ld OP8fc9pyoHFwZwAY/FNuy2T5tOqeekwh+Y0TvoePIYqn4U+yv5hrUC+pbWeCog== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRpBd48pTzgd2 for ; Fri, 29 May 2026 16:06:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 32e7a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 16:06:28 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: f6911b941f14 - main - sys: Renumber MTE SEGV codes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f6911b941f142aef47479d7ec631724bff138f5c Auto-Submitted: auto-generated Date: Fri, 29 May 2026 16:06:28 +0000 Message-Id: <6a19b984.32e7a.3d09316d@gitrepo.freebsd.org> The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=f6911b941f142aef47479d7ec631724bff138f5c commit f6911b941f142aef47479d7ec631724bff138f5c Author: Andrew Turner AuthorDate: 2026-05-29 15:22:29 +0000 Commit: Andrew Turner CommitDate: 2026-05-29 16:06:14 +0000 sys: Renumber MTE SEGV codes Some third party software expects these to not conflict. As the MTE support isn't fully in the tree, and these values aren't in a release we can renumber them without any backwards compatibility issues. Sponsored by: Arm Ltd --- sys/sys/signal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/sys/signal.h b/sys/sys/signal.h index 863b981c2b7a..792087f735a1 100644 --- a/sys/sys/signal.h +++ b/sys/sys/signal.h @@ -307,8 +307,8 @@ struct __siginfo32 { #define SEGV_ACCERR 2 /* Invalid permissions for mapped */ /* object. */ #define SEGV_PKUERR 100 /* x86: PKU violation */ -#define SEGV_MTEAERR 100 /* arm64: Asynchronous Arm MTE error */ -#define SEGV_MTESERR 101 /* arm64: Synchronous Arm MTE error */ +#define SEGV_MTEAERR 200 /* arm64: Asynchronous Arm MTE error */ +#define SEGV_MTESERR 201 /* arm64: Synchronous Arm MTE error */ /* codes for SIGFPE */ #define FPE_INTOVF 1 /* Integer overflow. */ From nobody Fri May 29 16:09:04 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRpFY512sz6fm5p for ; Fri, 29 May 2026 16:09: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRpFX5D3gz3XFS for ; Fri, 29 May 2026 16:09:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070944; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VNezKw+gEK3tcdD+n0A2OSycklKq/WRi2i7FrBIi8UQ=; b=IimWrBM2g1nQVc4Zij4GJEaASfzqW9NqzaTxv9qjsa4MQzwx0ig5ujoJBJhrrAFzDnkKJS NWt8HXzWymsb1iKKswYpHjFCvVrB8Z8c5+4m1NOyZujwKJFJF6MdZvOHV1zxN744qZ6MYB qMGs8NqcC8MDQqJxokF+1DymNsigUHv/1lbzhifPp7kOLdykLrqFRgpKgatE3UR8z1OWBZ I73dDtbKvZ6BXg/vagoLxF+IvjK4QjBK6WkNwFCYUNb43hYvTmbfrpTlXxKaE+FL5pvAWS TxKAgK5iYNzAkSGplbpFNn5BqMHHl7HSQMR1/CQkARaL2n/2+T1pzwaB3uTOyw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780070944; a=rsa-sha256; cv=none; b=Ph1E7SuumAgy08aFwQ9/VmpBD8nyFqiustB0zD3gZ3oCFzWkjQdssXnNu4ixAxG8tZjQdf NF1hqsKTA0MJ6gNmsguQ0/4pO8bDkGFAKOvverOIBpi1X7pvibX6zQATuNeCywpSPGxTHc 8VG4POn/EzxgIAN07UfHI5WunD2pWqblNsJQ0zTfEmph/EFE0yrwkKrAI0Az4MA6Ur0nxU SzirNlY8511nXh72YkhRk+lGo4hG2tl6/Zmxqxk/A5aaOr6fsRfgfZTIlUh2BtUZZ2qPF3 vgmJwc6/z3kB5MZvKLC2jrtIm0KSM8moF8G5mpd389r9X9kOWti0wDsawhcGHA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780070944; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VNezKw+gEK3tcdD+n0A2OSycklKq/WRi2i7FrBIi8UQ=; b=A9rz+OpYOiGxevh+v1hn93Q2LXeayzoo72X/CmK7qKCiVEzHzH+D9hdvKeRArXbsRPXjNk cI17EyboSGapkmXpJJFAFhQW/SMn9z5ZgMW9da6BuPng688EkZn70nTwu135dy5FvT2gVQ zlxKb4RN1I5SvuW/D9R8C+btk5W+bUfeg7pKhU4ivX0t0fdPyTqATMCW4B3S6Zki/ilMz9 BdwzWbM8S7iyvr1TC6igOeXm1eeDrjiiHIaQR+C0SiKMO5LsmZR1lzayKNWdGLgBG01pJd Z1KHLvicotC6FEU6n3a7I2wphT1+zGjC6thDfTVmy1LBshSfB/ky3bk9BGc2JA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRpFX4kmHzgRL for ; Fri, 29 May 2026 16:09:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36806 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 16:09:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: ShengYi Hung Subject: git: 1a5ab1dcf4b4 - stable/14 - Revert "kern_time: Honor the precise option when counting diff" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: aokblast X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1a5ab1dcf4b4e6ddce97c179f888947ad983f8db Auto-Submitted: auto-generated Date: Fri, 29 May 2026 16:09:04 +0000 Message-Id: <6a19ba20.36806.5bdefbfe@gitrepo.freebsd.org> The branch stable/14 has been updated by aokblast: URL: https://cgit.FreeBSD.org/src/commit/?id=1a5ab1dcf4b4e6ddce97c179f888947ad983f8db commit 1a5ab1dcf4b4e6ddce97c179f888947ad983f8db Author: ShengYi Hung AuthorDate: 2026-05-29 16:02:55 +0000 Commit: ShengYi Hung CommitDate: 2026-05-29 16:04:56 +0000 Revert "kern_time: Honor the precise option when counting diff" This will not work because this kernel version does not support a precise option. We handle the clock uniformly in all cases. This reverts commit 3886f1b488e47eba98e1523f85cb570694e97385. --- sys/kern/kern_time.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/kern/kern_time.c b/sys/kern/kern_time.c index 0e3062d2a394..64eef90fc740 100644 --- a/sys/kern/kern_time.c +++ b/sys/kern/kern_time.c @@ -564,9 +564,7 @@ kern_clock_nanosleep(struct thread *td, clockid_t clock_id, int flags, } while (error == 0 && is_abs_real && td->td_rtcgen == 0); td->td_rtcgen = 0; if (error != EWOULDBLOCK) { - if (precise) - sbtt = sbinuptime(); - else if (TIMESEL(&sbtt, tmp)) + if (TIMESEL(&sbtt, tmp)) sbtt += tc_tick_sbt; if (sbtt >= sbt) return (0); From nobody Fri May 29 16:15:53 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRpPV5LDkz6fmXK for ; Fri, 29 May 2026 16:15: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRpPP245mz3ZXJ for ; Fri, 29 May 2026 16:15:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780071353; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lZQSe+EBm5Sv+sIpePpm4OHfYBTtoLf9AJ1/MhznQUk=; b=M5sbaZglWletSKvQmPCE6Q/U/uknHYfDidOFPEMVLhjx23sn+t+TgDEDARInsTfXpRvsz1 FrXwcVz8ShTI5MNFhYOW6r3GErrFkQ196i2zmMLBfiqSpkAPbV1lup0xkdjTrTU8rl8HkY UHLQXUCXGBU6PHo9Gz+YCetOpdnes+2DGsb0OWDTBWA25zzWYwUvHw6aKQ72M/W99njaT+ A2bPxv+iOl3v3JhwR4X3yvLi+KuE03If3hr71RCg5UYWLrq5t4VQiCrjEmiXRC1RQCLD+r zrnN22fP73GzQufbjfUfnR/i6JtQtia12nj/ajb078GY8rtaGbDljJQlYIx8DA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780071353; a=rsa-sha256; cv=none; b=W3R9Z77jT8tdrwloZLnQEq0esbQMfXv40Oj3YVzkFFJVPpZCS9YxsOwdjKcfrCfn8oUOhg NGstq3AIHCpj2WxdqrbGLqTk/gRFTP2AuckCpQqF5ojuyFaWF84RV2N/dARCfgQhP9Kp3D BKT5bOzswNl9r9oCtyhYIFRjHnGD21Zpuh80TRuB8SqQELnUEsSCrRBXa/JREcMF/gOyEt 7MVgs/Gq1KMR6qDO2FZvS8HZKVfoti0VRgE2nIhteD3h5RTw57u/ODnBb+OyleT+ZiVpcs aDPR1FPJeKOEu5xyIoMYzxz27psWlP1ZCJYoEg2noad2aAaxLWWUu47T3Z3b6A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780071353; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lZQSe+EBm5Sv+sIpePpm4OHfYBTtoLf9AJ1/MhznQUk=; b=CHbMsXmUjFuZ5BAQS/K8+M7cs2tS0HdFvReue/pBzP68sEHfZ+wTArDQ6JKEpe6j3uOVQt NRGRs7dISMG/z6q2IGilKXN0ZH3c8a6ZYz1i8g0gYbcelpWXbvtE0u4kIe7UBXGzd6/mTt Gy4+YP/XFkXpkcwCv5purwtu8CyHJJw6W8EZxRf0XMKaA2TvaRlODDdxznCyx0aiBkFPm0 VljjPu26tyqdgfcESOgzBXc0In8xnpQlYxUmCGtPWfidI/BGp9AaTFnOgTAclU9AJE0Wr9 njfOttATMJhVUkECJOgXRpRti8QnHKDdF/qlBiMFsAYLi92aVlZmEFLeMZAjKA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRpPP1NHLzgdq for ; Fri, 29 May 2026 16:15:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 367da by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 16:15:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Stefa=?utf-8?Q?n E=C3=9Fer?= Subject: git: aa029088ec13 - main - tools/test/stress2/misc: Add msdosfs tests (currently failing) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: se X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aa029088ec130d71b406c4118346fbd933940826 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 16:15:53 +0000 Message-Id: <6a19bbb9.367da.25daf623@gitrepo.freebsd.org> The branch main has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=aa029088ec130d71b406c4118346fbd933940826 commit aa029088ec130d71b406c4118346fbd933940826 Author: Stefan Eßer AuthorDate: 2026-05-29 15:52:05 +0000 Commit: Stefan Eßer CommitDate: 2026-05-29 16:15:33 +0000 tools/test/stress2/misc: Add msdosfs tests (currently failing) Test msdos22.sh creates 1000 files with long random names consisting of only ASCII characters. The mount is performed without -L option, therefore no use of iconv to convert between character sets. Test msdos23.sh mixes some non-ASCII characters into the file names. The file system is therefore mounted with -L C.UTF-8 to include tests of the conversions between UTF-8 and UTF-16. Test msdos24.sh adds emojis to the names to test the (not yet committed) support of UTF-16 surrogate pairs in filenames. All 3 tests succeed with a small number of files (e.g., 10), but fail most of the time when testing with 1000 files. The tests have been added to all.exclude since they are expected to fail. They shall be enabled as regression tests, when the msdosfs code has been fixed. --- tools/test/stress2/misc/all.exclude | 3 ++ tools/test/stress2/misc/msdos22.sh | 79 ++++++++++++++++++++++++++++++++++++ tools/test/stress2/misc/msdos23.sh | 79 ++++++++++++++++++++++++++++++++++++ tools/test/stress2/misc/msdos24.sh | 80 +++++++++++++++++++++++++++++++++++++ 4 files changed, 241 insertions(+) diff --git a/tools/test/stress2/misc/all.exclude b/tools/test/stress2/misc/all.exclude index 9ec5bffde0f6..7109555c5508 100644 --- a/tools/test/stress2/misc/all.exclude +++ b/tools/test/stress2/misc/all.exclude @@ -39,6 +39,9 @@ mount7.sh https://people.freebsd.org/~pho/stress/log/log0549.txt 20240912 mlockall2.sh Unrecoverable OOM killing seen 20190203 mlockall6.sh https://people.freebsd.org/~pho/stress/log/log0430.txt 20230403 mlockall7.sh Needs further investigation 20210123 +msdos22.sh Waiting for fix 20260529 +msdos23.sh Waiting for fix 20260529 +msdos24.sh Waiting for fix 20260529 msetdomain.sh May change policy for random threads to domainset_fixed 20210104 newfs4.sh watchdog fired. newbuf (still seen 20240729) 20190225 nfs10.sh Double fault 20151013 diff --git a/tools/test/stress2/misc/msdos22.sh b/tools/test/stress2/misc/msdos22.sh new file mode 100755 index 000000000000..158a52a7aa7b --- /dev/null +++ b/tools/test/stress2/misc/msdos22.sh @@ -0,0 +1,79 @@ +#!/bin/sh + +# Test file operations using long random file names consisting only of ASCII characters + +MDUNIT=10 +FS=/mnt +LOCALE=C.UTF-8 +FILES=1000 + +export LANG=$LOCALE + +randomfilename () { + name="f" + count=$(jot -r 1 10 3) + for r in $(jot -r $count 7 0); do + r=$(( r + 0 )) + c='_' + if [ $r -gt 0 ]; then + for i in $(jot $r); do + name="$name$i" + done + fi + count=$(( count - 1 )) + if [ "$count" -gt 0 ]; then + name="$name$c" + fi + done + echo "$name" +} + +( + set -e + + mdconfig -u $MDUNIT -t malloc -s 512m + newfs_msdos -c 8 -F 32 /dev/md$MDUNIT > /dev/null 2>&1 + mkdir -p $FS + mount_msdosfs /dev/md$MDUNIT $FS + + mkdir -p $FS/test + cd $FS/test + + for i in $(jot $FILES); do + newfile=$(randomfilename) + case $testfiles in + *"$newfile"*) continue;; + esac + testfiles="$(randomfilename) +$testfiles" + done + + for f in $testfiles; do + echo "$f" > $f + done + for f in $(echo "$testfiles" | sort -R); do + cp $f $f.tmp + done + for f in $(echo "$testfiles" | sort -R); do + mv $f.tmp $f + done + for f in $(echo "$testfiles" | sort -R); do + rm $f + done +) + +failed=$? + +cd + +[ "$failed" -ne 0 ] && ls $FS/test + +umount /dev/md$MDUNIT + +#[ "$failed" -ne 0 ] && hd /dev/md$MDUNIT > /tmp/msdos22.dump + +fsck_msdosfs -y /dev/md$MDUNIT + +mdconfig -d -u $MDUNIT 2>/dev/null + +exit $failed diff --git a/tools/test/stress2/misc/msdos23.sh b/tools/test/stress2/misc/msdos23.sh new file mode 100755 index 000000000000..18982c34f68b --- /dev/null +++ b/tools/test/stress2/misc/msdos23.sh @@ -0,0 +1,79 @@ +#!/bin/sh + +# Test file operations using random file names containing non-ASCII characters + +MDUNIT=10 +FS=/mnt +LOCALE=C.UTF-8 +FILES=1000 + +export LANG=$LOCALE + +randomfilename () { + name="f" + count=$(jot -r 1 10 3) + for r in $(jot -r $count 7 0); do + r=$(( r + 0 )) + c='·' + if [ $r -gt 0 ]; then + for i in $(jot $r); do + name="$name$i" + done + fi + count=$(( count - 1 )) + if [ "$count" -gt 0 ]; then + name="$name$c" + fi + done + echo "$name" +} + +( + set -e + + mdconfig -u $MDUNIT -t malloc -s 512m + newfs_msdos -c 8 -F 32 /dev/md$MDUNIT > /dev/null 2>&1 + mkdir -p $FS + mount_msdosfs -L $LOCALE /dev/md$MDUNIT $FS + + mkdir -p $FS/test + cd $FS/test + + for i in $(jot $FILES); do + newfile=$(randomfilename) + case $testfiles in + *"$newfile"*) continue;; + esac + testfiles="$(randomfilename) +$testfiles" + done + + for f in $testfiles; do + echo "$f" > $f + done + for f in $(echo "$testfiles" | sort -R); do + cp $f $f.tmp + done + for f in $(echo "$testfiles" | sort -R); do + mv $f.tmp $f + done + for f in $(echo "$testfiles" | sort -R); do + rm $f + done +) + +failed=$? + +cd + +[ "$failed" -ne 0 ] && ls $FS/test + +umount /dev/md$MDUNIT + +#[ "$failed" -ne 0 ] && hd /dev/md$MDUNIT > /tmp/msdos23.dump + +fsck_msdosfs -y /dev/md$MDUNIT + +mdconfig -d -u $MDUNIT 2>/dev/null + +exit $failed diff --git a/tools/test/stress2/misc/msdos24.sh b/tools/test/stress2/misc/msdos24.sh new file mode 100755 index 000000000000..195c4ba8d9b9 --- /dev/null +++ b/tools/test/stress2/misc/msdos24.sh @@ -0,0 +1,80 @@ +#!/bin/sh + +# Test file operations using long random file names containing UTF-16 surrogate pairs + +MDUNIT=10 +FS=/mnt +LOCALE=C.UTF-8 +FILES=1000 + +export LANG=$LOCALE + +randomfilename () { + name="f" + count=$(jot -r 1 10 3) + for r in $(jot -r $count 7 0); do + r=$(( r + 0 )) + emoji="\0360\0237\0230\020$r" + c=$(echo -e $emoji) + if [ $r -gt 0 ]; then + for i in $(jot $r); do + name="$name$i" + done + fi + count=$(( count - 1 )) + if [ "$count" -gt 0 ]; then + name="$name$c" + fi + done + echo "$name" +} + +( + set -e + + mdconfig -u $MDUNIT -t malloc -s 512m + newfs_msdos -c 8 -F 32 /dev/md$MDUNIT > /dev/null 2>&1 + mkdir -p $FS + mount_msdosfs -L $LOCALE /dev/md$MDUNIT $FS + + mkdir -p $FS/test + cd $FS/test + + for i in $(jot $FILES); do + newfile=$(randomfilename) + case $testfiles in + *"$newfile"*) continue;; + esac + testfiles="$(randomfilename) +$testfiles" + done + + for f in $testfiles; do + echo "$f" > $f + done + for f in $(echo "$testfiles" | sort -R); do + cp $f $f.tmp + done + for f in $(echo "$testfiles" | sort -R); do + mv $f.tmp $f + done + for f in $(echo "$testfiles" | sort -R); do + rm $f + done +) + +failed=$? + +cd + +[ "$failed" -ne 0 ] && ls $FS/test + +umount /dev/md$MDUNIT + +#[ "$failed" -ne 0 ] && hd /dev/md$MDUNIT > /tmp/msdos24.dump + +fsck_msdosfs -y /dev/md$MDUNIT + +mdconfig -d -u $MDUNIT 2>/dev/null + +exit $failed From nobody Fri May 29 17:00:25 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRqNt68k9z6fqHN for ; Fri, 29 May 2026 17: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRqNt5YRhz3fSb for ; Fri, 29 May 2026 17: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=1780074030; 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=7gq34NYJTm0ObEoCxAEaUl36dUfoI0LnYMcgLkPWUw8=; b=UyheD1jTaPaCGDvHdBIcKxEeo6rFwD+RSOZaN0Id20Hop3U7M6v8QMaIKz0AQQ+kHWMjlW UccRm8KBZXhwSsoSrtmWtgryOzoanNcP/SS6GOr95Mp+6w2jnf2+BS0B9b4PwbMYjgnMgB G7BwHSNAiiPam9Nd4lrSeZPDA+hVJ4vOoayvpz2G0kF9F44CsDGN0Yi0rVQiLqzYDMXvEi XZNZ4xNv9dgssokaKFETvOvsE3LkWTaxyxI6VNVwJP6eiRouCnxpaF4UycwhEO2gBjbx9q XXYcTFIHdiurRXRgJoNwvWWEPrxVlP8FZBmcMclO7+e1l1LbZZMYZkLWgkfZhQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780074030; a=rsa-sha256; cv=none; b=ruX+OyuY7EgUzWxojTWJvvuVOxT6fdcNYf/UDWJuM52sAWZgmYHr3fTljdWcsqkHcsLzuJ keqqg5JROI2hDlEVmwlBDuu/xTYDSQ72uBhTwY+HJOv2/JMAtkOy0pXFz+hQ/g8TVdFzn5 Kn1YUolvgFHl3QV72b+N3zO4RQtfQS2HEN5M/4XrNQfLsRqw0r8dxeXrwfhX7lte6XK4u9 Y/HSTdPhncCk89jbF/ZCpadfzV7+jbOMW12CbmQ5koIqfAXyKGMAj19jtHBCUAXiZgWTTj AGiYXMKGcpfkJv9H1cpzYw+bqfiOsxIGLWfe/0Gq43oEFHWpYmyqnPhGulbqmw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780074030; 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=7gq34NYJTm0ObEoCxAEaUl36dUfoI0LnYMcgLkPWUw8=; b=nZuNvAw6EpqW/sPLaztHXdtjhNTlgOH3cgW6Rt47Bj2Cn+pa/aRkWQGfYry3rPE31FVQEP OQxRwOL/mKSeeNX8jMS1SjuxnDLCLQkk+jEb0N2rXQlH5yf90IqyzhKC8ow28OJIlzEPFB JbZU6x8chkweykzhFRcCDvc/FiW8BAaC0wWObVhu6f0dOYXKqH1JJex5MyBHsn6Q+xB3B/ +reFR4SzxEr4o8dZYaYRVTJ5jS9m2SveYBV88VQmrs4nkrF1XZWDT3Q1m8NDtHtFT+tQ33 TvsrLk+x8o9shb6ZlVe/GtkEEHeMMqOch3tAXBgfF5f8ax8zinyHCBaeoiIT0w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRqNt4klGzhgY for ; Fri, 29 May 2026 17:00:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3b0b1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 17:00:25 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Sulev-Madis Silber From: Adrian Chadd Subject: git: ee41a882054c - main - spi: switch to switch List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ee41a882054c0761853971f8742607b3eae06784 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 17:00:25 +0000 Message-Id: <6a19c629.3b0b1.63ab913@gitrepo.freebsd.org> The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=ee41a882054c0761853971f8742607b3eae06784 commit ee41a882054c0761853971f8742607b3eae06784 Author: Sulev-Madis Silber AuthorDate: 2026-05-29 16:58:50 +0000 Commit: Adrian Chadd CommitDate: 2026-05-29 16:58:50 +0000 spi: switch to switch use recommended switch with default case to catch invalid values Reviewed by: kevans, adrian Differential Revision: https://reviews.freebsd.org/D54759 --- usr.sbin/spi/spi.c | 35 +++++++++++++++-------------------- 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/usr.sbin/spi/spi.c b/usr.sbin/spi/spi.c index 1ced2371e3d0..bbbc3d322b00 100644 --- a/usr.sbin/spi/spi.c +++ b/usr.sbin/spi/spi.c @@ -30,6 +30,7 @@ #include #include +#include #include #include #include @@ -364,30 +365,24 @@ main(int argc, char *argv[], char *envp[] __unused) /* do data transfer */ - if (stream) { - while (!err && !feof(stdin)) { - if (fdir == DIR_READ) { - err = perform_read(hdev, &opt); - } - else if (fdir == DIR_WRITE) { - err = perform_write(hdev, &opt); - } - else if (fdir == DIR_READWRITE) { - err = perform_readwrite(hdev, &opt); - } - } - } - else { - if (fdir == DIR_READ) { + assert(fdir != DIR_NONE); + do { + switch (fdir) { + case DIR_READ: err = perform_read(hdev, &opt); - } - else if (fdir == DIR_WRITE) { + break; + case DIR_WRITE: err = perform_write(hdev, &opt); - } - else if (fdir == DIR_READWRITE) { + break; + case DIR_READWRITE: err = perform_readwrite(hdev, &opt); + break; + default: + fprintf(stderr, "Invalid state (%d)\n", fdir); + err = EINVAL; + break; } - } + } while (stream && !err && !feof(stdin)); the_end: From nobody Fri May 29 17:45:18 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRrNZ64Sjz6fstN for ; Fri, 29 May 2026 17:45: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRrNZ4KDhz3jlc for ; Fri, 29 May 2026 17:45:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780076718; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O4wFSCGKBeMfSHMIEvVBWpmRowXOWubmSm9oMbpEMzs=; b=cmmBZSHhGCddYUeeI+F7/+ydg+eBjFJOzYOx0/jRtKKVHZ3ELwxGOxalISu7VW1kzMNhB3 1CWbyykOCu2TepxPOa4hdt/MCApRX2o+ulnoUb+f/EB3Vn/AvQY2l+HHHCiJuaaD9A4DTZ UKWym0fq3egfA0BcjEFCKT2hoU5NXSxcNMjei+/k/LIRHeqAvAQbTifu+wlKrpya+H5TaI oivw1T6qOj8v93aQ5MYybvyz3yQFZ1HDbCiaW4nWZ44VXj++o2muVDK/yxRls4wMX7Dh08 ckXcPaLudriA6bRLFbXJ4zpu5bPG1UvWyYbZHzTAZms//d6Jj/zDLRSWJwnDqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780076718; a=rsa-sha256; cv=none; b=iEo2oNArriDTWri4A1Jl+4XS8Makh9zThcCFdnpX29YMtfu3sahkietJvyAqoVIdWMBaRf htv8FvxSSKxzow0V6ZTg0RCh2EHd1CaFTasS9QzhAK9e3cnSKqSCvMYsxPqVlrlGYnk97B XLpbXYCbyD5a7q9tGORaU/wopUfjNx6nkJ6tKr9yT0yEbJHnwSuOixHD9mU4dwV4JLHHu9 oOhlGwgGsFjRO9rJZ5fOMDM6uueMFjzVvC9QJ/aaI2GlISF2B43pTDtQg2D1aILreoH8JB V95cyqcWphiteKIg8fubpO/HD0Qdh3f0Yx0zCh+sBZi/zwKAtT2Wf6hJn65OGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780076718; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O4wFSCGKBeMfSHMIEvVBWpmRowXOWubmSm9oMbpEMzs=; b=yVfTlAzbMjxEc8N2qaFLVOnqbH0GvBielqbEfNdZnu/we49o+DFW9lLwpdUCcslHtxUHxr BfXwB49bkskGgFEhJJhDlbdx+CfKhkKWAJAULa/k3MioTuIFbA1He+ISqTJ5Qj8dnvcw9J uLN709I4/ON4hLVy6AHe8jRFWHhlJ75geNY8rJr7kX/W2Dggqoyr0N43Mt6f581fpsOXOE IAgYlBIeH2YD6u45cVWeK526a6Ks4yYp6N6D/gMUBSvzD2D1tpGHN2czx9YU8XwKnnSVeA RnzBJSnYDlmwYCQen5hS40an14jD+bTlhJKdxfFs44pL6m/fxIM3tRL8C+AgbA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRrNZ3rzbzk0R for ; Fri, 29 May 2026 17:45:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3fbb7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 17:45:18 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: b2b95249ae0e - main - fts: Check link count before using it List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b2b95249ae0e24a6e24ad4286da56f1aff7a6db0 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 17:45:18 +0000 Message-Id: <6a19d0ae.3fbb7.5b206217@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=b2b95249ae0e24a6e24ad4286da56f1aff7a6db0 commit b2b95249ae0e24a6e24ad4286da56f1aff7a6db0 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-29 17:45:06 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-29 17:45:06 +0000 fts: Check link count before using it * Check the range of the link count before trying to use it. * Rewrite the comment explaining what the link count is used for. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D57324 --- lib/libc/gen/fts.c | 44 +++++++++++++++++++++++++++++++++++++++----- 1 file changed, 39 insertions(+), 5 deletions(-) diff --git a/lib/libc/gen/fts.c b/lib/libc/gen/fts.c index 4aa386d777cd..e8063ecb646e 100644 --- a/lib/libc/gen/fts.c +++ b/lib/libc/gen/fts.c @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include @@ -114,6 +115,19 @@ static const char *ufslike_filesystems[] = { 0 }; +/* + * POSIX provides nlink_t but unfortunately not NLINK_MAX. + */ +#define NLINK_MAX \ + _Generic((nlink_t)0, \ + int16_t: INT16_MAX, \ + uint16_t: UINT16_MAX, \ + int32_t: INT32_MAX, \ + uint32_t: UINT32_MAX, \ + int64_t: INT64_MAX, \ + uint64_t: UINT64_MAX, \ + default: 0) + static FTS * __fts_open(FTS *sp, char * const *argv) { @@ -736,7 +750,7 @@ fts_build(FTS *sp, int type) int cderrno, descend, oflag, saved_errno, nostat, doadjust, readdir_errno; long level; - long nlinks; /* has to be signed because -1 is a magic value */ + int64_t nlinks; /* has to be signed because -1 is a magic value */ size_t dnamlen, len, maxlen, nitems; /* Set current node pointer. */ @@ -759,16 +773,36 @@ fts_build(FTS *sp, int type) } /* - * Nlinks is the number of possible entries of type directory in the - * directory if we're cheating on stat calls, 0 if we're not doing - * any stat calls at all, -1 if we're doing stats on everything. + * In the FTS_PHYSICAL | FTS_NOSTAT case, we want to avoid calling + * fstat() unnecessarily, but we still need to call it for + * subdirectories. The current directory's link count provides an + * upper bound on the number of subdirectories we may encounter + * (including . and .. in the FTS_SEEDOT case). We initialize + * nlinks to the current directory's link count, then decrement it + * every time we encounter a directory, so when we hit zero we can + * save some time by not calling fstat() on subsequent entries. + * + * If FTS_NOSTAT is not set, or the link count is less than two + * (which should not be possible) or equal to NLINK_MAX (which + * suggests that the actual value could be higher), or the current + * filesystem is not known to provide reliable link counts, we + * initialize nlinks to -1 and fstat() everything. + * + * In the rare case where we don't need to stat anything, even + * subdirectories, we initialize nlinks to 0 regardless of the + * actual link count. + * + * Note that we ignore the FTS_NOSTAT flag in the FTS_LOGICAL + * case, although we could choose to only stat symbolic links. + * Implementing this is left as an exercise for the reader. */ if (type == BNAMES) { nlinks = 0; /* Be quiet about nostat, GCC. */ nostat = 0; } else if (ISSET(FTS_NOSTAT) && ISSET(FTS_PHYSICAL)) { - if (fts_ufslinks(sp, cur)) + if (cur->fts_nlink >= 2 && cur->fts_nlink < NLINK_MAX && + cur->fts_nlink <= INT64_MAX && fts_ufslinks(sp, cur)) nlinks = cur->fts_nlink - (ISSET(FTS_SEEDOT) ? 0 : 2); else nlinks = -1; From nobody Fri May 29 17:45:19 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRrNb6NTFz6fstS for ; Fri, 29 May 2026 17:45:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRrNb5Mjvz3jqK for ; Fri, 29 May 2026 17:45:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780076719; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IZcqTjIR4r5IsGvS0d/OgYiI+gbd8dt+Vs6aDN2bELc=; b=c5pseZc+5/JsCYW847ScXGAB94aprXjhPtoUPsBzGFr7puoG/2vgY2JhAgXL8Re+5Dw0V6 UGwvcWRUT/2GErx3ar18vChUvhuI893TA8mpWqpfH52kuImmf4AWcDrzqDj0txExcnfTIM yYvaKzLKPdi7m49AazSuih2g8AkTfavV4e6fs2vRymEcPEJ75ojnPKHEBlSxVdzMEYjwj7 tsDjcKXXs7Ljftpn16I1DFgfnC73Vt17wCzNM5fsZrqMbW3bfWIjhUFLap2c/LL1pt9RqQ XXDzakomKp4AgJjpvPqavK1qmaEUDVN7V0HCpQg//ROvG5WfBcZ3NpPVHrgmcw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780076719; a=rsa-sha256; cv=none; b=Pmgo3N/1c4FqXJADci/AijsUK/0c7ryp5K6bKZHgmKhuvbOLFbdjOZjGobN21l5svvKqtO POij4zcZMNznrmiwMIxa7IHxmdR/2zlpVqp8JCLSzDWVr71Q+7o+ehs2Pd4VkOQnWxaP28 jYCYa58W2ZLEfY7klpJi5uI3u4WIPL07SCI7yng/dNdUmrFL5j3w8MoOzyyi/+2yxhftHz 6dk2af5c5rSTfFq1csQTgl2apr9RAfRwoA2S0xhBKfEAunMMp/RQsSDu47QQkyzierxqkL CODN1jVAQyeHXWCXBkjqDMCSyWmEVKhMe71gNfq/02mHsqHlaQoQT8tU5pmtdA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780076719; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IZcqTjIR4r5IsGvS0d/OgYiI+gbd8dt+Vs6aDN2bELc=; b=l0Y244OMhXXzHAV63xXzyc4bzCktsoBGrcxSGqVyArNcUyuKcBos+6sYUOP92krHUFkU9s PJ7TckfOcbbf4Bkx4/fe0FgDDeXJBR+Gn3sFd5fqRLF4Y33BwG7jeRfDmRLY357jE1OoWY 1FribztDL8a8LXT/EPV03QyNKK+EOf+D27vS9TgaeKgYsEr8fxMK6Su4fi1iiYgmL11ZaP GCBpft67xZFcYfQ73c0ZvJPBBwF/PXpefB5Yzf55MAI364xgcQJ0TlFUN3HiKqLz3Uvp6z OId0001P0gSV6gyTcJRrQVR+vSeAqPlcwQf44xoY8DBE2CmugddOAxkeGW7mbg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRrNb4dZkzjjx for ; Fri, 29 May 2026 17:45:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3efa6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 17:45:19 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: dce6aff90b13 - main - fts: Improve the description of FTS_NOSTAT List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dce6aff90b13f30fcb4c1fa263868607ccda8041 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 17:45:19 +0000 Message-Id: <6a19d0af.3efa6.6a09da6a@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=dce6aff90b13f30fcb4c1fa263868607ccda8041 commit dce6aff90b13f30fcb4c1fa263868607ccda8041 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-29 17:45:10 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-29 17:45:10 +0000 fts: Improve the description of FTS_NOSTAT Note that we still need to stat directories and the roots. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D57325 --- lib/libc/gen/fts.3 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/libc/gen/fts.3 b/lib/libc/gen/fts.3 index 199603b5f3c7..b6dbfffe8079 100644 --- a/lib/libc/gen/fts.3 +++ b/lib/libc/gen/fts.3 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 21, 2026 +.Dd May 29, 2026 .Dt FTS 3 .Os .Sh NAME @@ -497,6 +497,13 @@ field to and leave the contents of the .Fa statp field undefined. +The roots and any directories encountered during traversal +.Po +.Dv FTS_D , +.Dv FTS_DC , +.Dv FTS_DP +.Pc +are still fully populated. .It Dv FTS_NOSTAT_TYPE This option is similar to .Dv FTS_NOSTAT , From nobody Fri May 29 17:45:17 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRrNf6dBcz6ft0B for ; Fri, 29 May 2026 17:45: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRrNf5Jsrz3kTv for ; Fri, 29 May 2026 17:45:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780076722; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p5sxPwyzNce3nNf6GfoJRVQEAsdLm8r+nVyAcMt7JU0=; b=X7zlEZCiqbEVhcuLgjiGIn/LV/u0jU+XbmvI/TVu7tUGbGSRV/35jhH5P9s59ApHplrffq RfJ6QDnBx/LDCBKnyM8NsklPXk5feuzcuf3Ts0xhweBHytIsSEYy2iQ9eapY6YeUAVE54D y94quzNucMz6GFC1JAx0TR8r3vk+IRW0qPBhOkppb/pphmBg8EDRiJdm8Wc0elp94czk7M nqAB+OAzxu4CuVlw+rcT1l6k0ChRWo+vQn/xN1RlsdtuhwQMX5xETjZ+d9KNLrMiQCUtB3 REfG45tcRKu9uuTkKznKfOIAriqpDitHx1fphnSSXgYqtUhkuUKzOPsQ8MOaKg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780076722; a=rsa-sha256; cv=none; b=HmqX4VRrIFeTFZv6aX80Ev9bWJDmJCPxo9EPY1cz1uwyfMK7vZMZc928ZZKJWffDYb5stc KVjRMgVF+B0KVeVOT2xqCgQCM0f+RqvhOX8z0t0DDzomjpXEk85JZmGqswMcYECMv3nqDF guvlWCgBMF0JvmL/7p4t+FFOo8xU/5Un9RTfF0fnCMcJVu2EfkpGRzUqlWfXO8Kr4Zx+J2 SdpbCMe3bgi4SlN3ZeFjrO58UnnsZiEI7agYU7uKjXgukMegoIsQgevUTKLvtCA+VoSfh4 egMCSvFEi2EIwUuQxxOWtQUJbLFwT9JacyrwK2JPdgtI0NGBaGqPn0/t3SyJWw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780076722; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p5sxPwyzNce3nNf6GfoJRVQEAsdLm8r+nVyAcMt7JU0=; b=K+KUHnlqTMdW6ND0MPgBR60Yql9ZhQmWEHNHNqNmXJdediVQjnhfjKsEdDkgqiG2Ka+s5M p8k3703oq550lnLGZtUwVG5S/rr5/tewiDyrNVwnIuhHH/U46MQ7RhUzDgqeZGsuODaYXn GUPpKbebMxFRCB1OiDvP4RH8B3rjyI5/N5PecOlz+RbTUMOVCV9ncURJJ0kJmK5FwrmD6f VS/JHP0CFzag2jhSwf9UMF8yyTZlLFuQDLrO2N5pHBPOFnWI6CPB/nkmHX2gmilKZwb8p5 8w1Af4MRmcjJR7SNNI6JsMRN7AfsHJCCbb4FyS8USeIJLcWQcNzPYSBaWuuF3Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRrNf4l30zkFL for ; Fri, 29 May 2026 17:45:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3f4d4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 17:45:17 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 7ec549870f2a - main - fts: Add some depth to the options test List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7ec549870f2adeb0e896885220d4af6b47c4c9ba Auto-Submitted: auto-generated Date: Fri, 29 May 2026 17:45:17 +0000 Message-Id: <6a19d0ad.3f4d4.40283f93@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=7ec549870f2adeb0e896885220d4af6b47c4c9ba commit 7ec549870f2adeb0e896885220d4af6b47c4c9ba Author: Dag-Erling Smørgrav AuthorDate: 2026-05-29 17:45:01 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-29 17:45:01 +0000 fts: Add some depth to the options test MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D57323 --- lib/libc/tests/gen/fts_options_test.c | 74 +++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/lib/libc/tests/gen/fts_options_test.c b/lib/libc/tests/gen/fts_options_test.c index fc3015138a49..863c0809d16e 100644 --- a/lib/libc/tests/gen/fts_options_test.c +++ b/lib/libc/tests/gen/fts_options_test.c @@ -36,6 +36,8 @@ fts_options_prepare(const struct atf_tc *tc) ATF_REQUIRE_EQ(0, mkdir("dir", 0755)); ATF_REQUIRE_EQ(0, close(creat("file", 0644))); ATF_REQUIRE_EQ(0, close(creat("dir/file", 0644))); + ATF_REQUIRE_EQ(0, mkdir("dir/sd", 0750)); + ATF_REQUIRE_EQ(0, mkdir("dir/sd/sd", 0700)); ATF_REQUIRE_EQ(0, symlink("..", "dir/up")); ATF_REQUIRE_EQ(0, symlink("dir", "dirl")); ATF_REQUIRE_EQ(0, symlink("file", "filel")); @@ -57,6 +59,10 @@ ATF_TC_BODY(fts_options_logical, tc) { FTS_DL, "dead", "dead" }, { FTS_D, "dir", "dir" }, { FTS_F, "file", "dir/file" }, + { FTS_D, "sd", "dir/sd" }, + { FTS_D, "sd", "dir/sd/sd" }, + { FTS_DP, "sd", "dir/sd/sd" }, + { FTS_DP, "sd", "dir/sd" }, { FTS_D, "up", "dir/up" }, { FTS_DL, "dead", "dir/up/dead" }, { FTS_DC, "dir", "dir/up/dir" }, @@ -67,6 +73,10 @@ ATF_TC_BODY(fts_options_logical, tc) { FTS_DP, "dir", "dir" }, { FTS_D, "dirl", "dirl" }, { FTS_F, "file", "dirl/file" }, + { FTS_D, "sd", "dirl/sd" }, + { FTS_D, "sd", "dirl/sd/sd" }, + { FTS_DP, "sd", "dirl/sd/sd" }, + { FTS_DP, "sd", "dirl/sd" }, { FTS_D, "up", "dirl/up" }, { FTS_DL, "dead", "dirl/up/dead" }, { FTS_DC, "dir", "dirl/up/dir" }, @@ -108,6 +118,10 @@ ATF_TC_BODY(fts_options_logical_nostat, tc) { FTS_DL, "dead", "dead" }, { FTS_D, "dir", "dir" }, { FTS_NSOK, "file", "dir/file" }, + { FTS_D, "sd", "dir/sd" }, + { FTS_D, "sd", "dir/sd/sd" }, + { FTS_DP, "sd", "dir/sd/sd" }, + { FTS_DP, "sd", "dir/sd" }, { FTS_D, "up", "dir/up" }, { FTS_DL, "dead", "dir/up/dead" }, { FTS_DC, "dir", "dir/up/dir" }, @@ -118,6 +132,10 @@ ATF_TC_BODY(fts_options_logical_nostat, tc) { FTS_DP, "dir", "dir" }, { FTS_D, "dirl", "dirl" }, { FTS_NSOK, "file", "dirl/file" }, + { FTS_D, "sd", "dirl/sd" }, + { FTS_D, "sd", "dirl/sd/sd" }, + { FTS_DP, "sd", "dirl/sd/sd" }, + { FTS_DP, "sd", "dirl/sd" }, { FTS_D, "up", "dirl/up" }, { FTS_DL, "dead", "dirl/up/dead" }, { FTS_DC, "dir", "dirl/up/dir" }, @@ -151,6 +169,14 @@ ATF_TC_BODY(fts_options_logical_seedot, tc) { FTS_DOT, ".", "dir/." }, { FTS_DOT, "..", "dir/.." }, { FTS_F, "file", "dir/file" }, + { FTS_D, "sd", "dir/sd" }, + { FTS_DOT, ".", "dir/sd/." }, + { FTS_DOT, "..", "dir/sd/.." }, + { FTS_D, "sd", "dir/sd/sd" }, + { FTS_DOT, ".", "dir/sd/sd/." }, + { FTS_DOT, "..", "dir/sd/sd/.." }, + { FTS_DP, "sd", "dir/sd/sd" }, + { FTS_DP, "sd", "dir/sd" }, { FTS_D, "up", "dir/up" }, { FTS_DOT, ".", "dir/up/." }, { FTS_DOT, "..", "dir/up/.." }, @@ -165,6 +191,14 @@ ATF_TC_BODY(fts_options_logical_seedot, tc) { FTS_DOT, ".", "dirl/." }, { FTS_DOT, "..", "dirl/.." }, { FTS_F, "file", "dirl/file" }, + { FTS_D, "sd", "dirl/sd" }, + { FTS_DOT, ".", "dirl/sd/." }, + { FTS_DOT, "..", "dirl/sd/.." }, + { FTS_D, "sd", "dirl/sd/sd" }, + { FTS_DOT, ".", "dirl/sd/sd/." }, + { FTS_DOT, "..", "dirl/sd/sd/.." }, + { FTS_DP, "sd", "dirl/sd/sd" }, + { FTS_DP, "sd", "dirl/sd" }, { FTS_D, "up", "dirl/up" }, { FTS_DOT, ".", "dirl/up/." }, { FTS_DOT, "..", "dirl/up/.." }, @@ -198,6 +232,10 @@ ATF_TC_BODY(fts_options_physical, tc) { FTS_SL, "dead", "dead" }, { FTS_D, "dir", "dir" }, { FTS_F, "file", "file" }, + { FTS_D, "sd", "sd" }, + { FTS_D, "sd", "sd" }, + { FTS_DP, "sd", "sd" }, + { FTS_DP, "sd", "sd" }, { FTS_SL, "up", "up" }, { FTS_DP, "dir", "dir" }, { FTS_SL, "dirl", "dirl" }, @@ -224,6 +262,10 @@ ATF_TC_BODY(fts_options_physical_nochdir, tc) { FTS_SL, "dead", "dead" }, { FTS_D, "dir", "dir" }, { FTS_F, "file", "dir/file" }, + { FTS_D, "sd", "dir/sd" }, + { FTS_D, "sd", "dir/sd/sd" }, + { FTS_DP, "sd", "dir/sd/sd" }, + { FTS_DP, "sd", "dir/sd" }, { FTS_SL, "up", "dir/up" }, { FTS_DP, "dir", "dir" }, { FTS_SL, "dirl", "dirl" }, @@ -250,10 +292,18 @@ ATF_TC_BODY(fts_options_physical_comfollow, tc) { FTS_DL, "dead", "dead" }, { FTS_D, "dir", "dir" }, { FTS_F, "file", "file" }, + { FTS_D, "sd", "sd" }, + { FTS_D, "sd", "sd" }, + { FTS_DP, "sd", "sd" }, + { FTS_DP, "sd", "sd" }, { FTS_SL, "up", "up" }, { FTS_DP, "dir", "dir" }, { FTS_D, "dirl", "dirl" }, { FTS_F, "file", "file" }, + { FTS_D, "sd", "sd" }, + { FTS_D, "sd", "sd" }, + { FTS_DP, "sd", "sd" }, + { FTS_DP, "sd", "sd" }, { FTS_SL, "up", "up" }, { FTS_DP, "dirl", "dirl" }, { FTS_F, "file", "file" }, @@ -279,10 +329,18 @@ ATF_TC_BODY(fts_options_physical_comfollowdir, tc) { FTS_DL, "dead", "dead" }, { FTS_D, "dir", "dir" }, { FTS_F, "file", "file" }, + { FTS_D, "sd", "sd" }, + { FTS_D, "sd", "sd" }, + { FTS_DP, "sd", "sd" }, + { FTS_DP, "sd", "sd" }, { FTS_SL, "up", "up" }, { FTS_DP, "dir", "dir" }, { FTS_D, "dirl", "dirl" }, { FTS_F, "file", "file" }, + { FTS_D, "sd", "sd" }, + { FTS_D, "sd", "sd" }, + { FTS_DP, "sd", "sd" }, + { FTS_DP, "sd", "sd" }, { FTS_SL, "up", "up" }, { FTS_DP, "dirl", "dirl" }, { FTS_F, "file", "file" }, @@ -308,6 +366,10 @@ ATF_TC_BODY(fts_options_physical_nostat, tc) { FTS_SL, "dead", "dead" }, { FTS_D, "dir", "dir" }, { FTS_NSOK, "file", "file" }, + { FTS_D, "sd", "sd" }, + { FTS_D, "sd", "sd" }, + { FTS_DP, "sd", "sd" }, + { FTS_DP, "sd", "sd" }, { FTS_NSOK, "up", "up" }, { FTS_DP, "dir", "dir" }, { FTS_SL, "dirl", "dirl" }, @@ -334,6 +396,10 @@ ATF_TC_BODY(fts_options_physical_nostat_type, tc) { FTS_SL, "dead", "dead" }, { FTS_D, "dir", "dir" }, { FTS_F, "file", "file" }, + { FTS_D, "sd", "sd" }, + { FTS_D, "sd", "sd" }, + { FTS_DP, "sd", "sd" }, + { FTS_DP, "sd", "sd" }, { FTS_SL, "up", "up" }, { FTS_DP, "dir", "dir" }, { FTS_SL, "dirl", "dirl" }, @@ -362,6 +428,14 @@ ATF_TC_BODY(fts_options_physical_seedot, tc) { FTS_DOT, ".", "." }, { FTS_DOT, "..", ".." }, { FTS_F, "file", "file" }, + { FTS_D, "sd", "sd" }, + { FTS_DOT, ".", "." }, + { FTS_DOT, "..", ".." }, + { FTS_D, "sd", "sd" }, + { FTS_DOT, ".", "." }, + { FTS_DOT, "..", ".." }, + { FTS_DP, "sd", "sd" }, + { FTS_DP, "sd", "sd" }, { FTS_SL, "up", "up" }, { FTS_DP, "dir", "dir" }, { FTS_SL, "dirl", "dirl" }, From nobody Fri May 29 19:11:40 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRtJL1QfDz6fybH for ; Fri, 29 May 2026 19:11: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRtJL0yxhz3sNj for ; Fri, 29 May 2026 19:11:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780081906; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E00/wWucdJ9vSR6yVa0vzjyO19qyNEGdJCrQPiSDbMg=; b=FMJNkX8WkUlbwMVgsyoeFtGP+RsF4sApHQkbmEOslgWc9Vp3U/RqD7k8ZRa7Dv+hdnEfOG 6BW3uaPQaYha2pT/WY/gYb9HpFLyTqHzguCTxFdWGRfedwyigUmPEsEXb/qqayEoDfl6V5 nGYt7B/mOxU5YC8Z4u7rFmGc8Gpa0H9j8v2PjjMM6GKTUsOlJnMLZQb5hxybZ9h7y2ahuy UGiajHYXB+eLsTlkcEGq/fXukC9RLUqvTaBH34BniPxolMVEdr/InI4TmbgiV8RNqFodvl yz+CI+TH1Zw7qbVGWIYhCXGtRZ5Zdkyl2Uv6Ij3f/guEqhcKKOpv598Og1vhgA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780081906; a=rsa-sha256; cv=none; b=Q8SjmczJsneqAJCbneQVpcI39iuOfqQ+xhJtFhXhjfYym4eYbe3BQdWT7VSmsiXlJdri2S ypLOH94WcrUroA1oYRIvPl3oF9cq0F4ZxdyWrGO+vQSqGXdCJAIns17Nkbm5jt0z79KjZ9 B+971yUe/o6IBl1IdJuhG1HPbqCYmKMFA3I9dNZYxgM+yjNdTS3jcxnzUHYo/CKizKzYxR V8bHnQ8aQQpA6SHd5C6a4uswzomp1hrdRqM1BhK4+Zg5jlDhl6nnbOyFtrDGGop7/sgNXN wJt3kiWE0WUYrBPXUJOY18pE6CaKorUqi1IBx59K1c6ZEHha/o4RHtFJjwpycw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780081906; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E00/wWucdJ9vSR6yVa0vzjyO19qyNEGdJCrQPiSDbMg=; b=ue28cJ+7kkIABD/Cp5INQgLK9oKNgvzi8ewbsMD9OtAJKq0GW1oZ5pF23YVFK6LO1rlPGK B+JYp/xabI9gkcc/m6MwvWBbQwtb1upGKJ/c1NwxmW7Qyfu1lSeZcskSbWfhUzFZ2EPtc8 FEM0Nq66KSU4AvQDpYbLUAxsjZ6SUTdCQgT4dwmShQ82qZXfERkfzRt1FpcdFmPYG84776 K6Vw0DJCoc0lyeBi4oq7GzgN5UMH0A4Tsxmj/Y7epSqChJd02h23HXWnyh2xn6Fq+XT/MF 4cEmKdR4DtVOcjDLgIAVE8mM3lWFfmhGYMFnrciSdYv+N53UENTqJf+r0EY7qg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRtJL07Wrzm1j for ; Fri, 29 May 2026 19:11:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 227b7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 19:11:40 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: defd9b86ef99 - stable/15 - sigqueue: In capability mode, only allow signalling self List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: defd9b86ef995ce70363eae9b323d616bda865be Auto-Submitted: auto-generated Date: Fri, 29 May 2026 19:11:40 +0000 Message-Id: <6a19e4ec.227b7.39e774ed@gitrepo.freebsd.org> The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=defd9b86ef995ce70363eae9b323d616bda865be commit defd9b86ef995ce70363eae9b323d616bda865be Author: Ed Maste AuthorDate: 2026-05-26 13:24:36 +0000 Commit: Ed Maste CommitDate: 2026-05-29 19:11:28 +0000 sigqueue: In capability mode, only allow signalling self This is copied from the check in kern_kill. Reviewed by: markj, oshogbo Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57244 (cherry picked from commit b9d16b7fd2fa6bc4b3e8364804cbdc1b76ebe8a5) --- sys/kern/kern_sig.c | 10 ++++++++++ tests/sys/capsicum/capmode.cc | 12 +++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 9be7c82ee98b..e48997ed966a 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -2038,6 +2038,16 @@ kern_sigqueue(struct thread *td, pid_t pid, int signumf, union sigval *value) if (pid <= 0) return (EINVAL); + /* + * A process in capability mode can send signals only to itself. + */ + if (pid != td->td_proc->p_pid) { + if (CAP_TRACING(td)) + ktrcapfail(CAPFAIL_SIGNAL, &signum); + if (IN_CAPABILITY_MODE(td)) + return (ECAPMODE); + } + if ((signumf & __SIGQUEUE_TID) == 0) { if ((p = pfind_any(pid)) == NULL) return (ESRCH); diff --git a/tests/sys/capsicum/capmode.cc b/tests/sys/capsicum/capmode.cc index 5ff025290211..d2eb1e8633a8 100644 --- a/tests/sys/capsicum/capmode.cc +++ b/tests/sys/capsicum/capmode.cc @@ -746,8 +746,8 @@ FORK_TEST(Capmode, NewThread) { close(thread_pipe[1]); } -static volatile sig_atomic_t had_signal = 0; -static void handle_signal(int) { had_signal = 1; } +static volatile sig_atomic_t signal_cnt = 0; +static void handle_signal(int) { signal_cnt++; } FORK_TEST(Capmode, SelfKill) { pid_t me = getpid(); @@ -765,7 +765,13 @@ FORK_TEST(Capmode, SelfKill) { // Can only kill(2) to own pid. EXPECT_CAPMODE(kill(child, SIGUSR1)); EXPECT_OK(kill(me, SIGUSR1)); - EXPECT_EQ(1, had_signal); + EXPECT_EQ(1, signal_cnt); + + union sigval sv; + sv.sival_int = 0x1234; + EXPECT_CAPMODE(sigqueue(child, SIGUSR1, sv)); + EXPECT_OK(sigqueue(me, SIGUSR1, sv)); + EXPECT_EQ(2, signal_cnt); signal(SIGUSR1, original); } From nobody Fri May 29 19:12:58 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRtKq4ZxBz6fysB for ; Fri, 29 May 2026 19:13: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRtKq45jhz3sY2 for ; Fri, 29 May 2026 19:13:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780081983; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1wO/zpmCOv6GBrswedqeIcS3uZ4889aeJcwh4/3rzUM=; b=LtSmiF9I1gK8xCp+xHBU/2ELCYIXzI0k39M9UBZhPHe+m3ltjO6pk0RO/TxUlrFuIuO6Jb /PFvtqTvGf5te4pYcqf3LdwMEmT7pJVooOANiQQRJEVXlxmKy0jwahevQ/F3HqIvRNg7wa c23/Jhr3fTVsFejsbK/JSiSRpwvQMDoY207ata8Ryv4uYI+wcQpnLZVa8XCFEx66cg4PTu kiCYPhXHwnj8cdAW80c/Rbz48jALxf2EuZ7od+MVxNYf0iBUtJNR+EgOaloaF2jRlHmwHo Ks0sp+yFQr27L1oL0LGZmVfFmkaZnft/Z48I1848DkXvidw3MeIHNJQRowOG9A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780081983; a=rsa-sha256; cv=none; b=BbEOD31lM2/HhhbJgeuJePznYIzSbdY+9WT7h5DyZfiSxDaWSll56bcw/OK21m/2+5zyFt D9t8259pdFd5iCDxA3KP8iuMIbLSP3XK6i/cH1uC7ny77NE9xdSx49qB89jV7pIWIlkYEn bN0a2V8c4krOHwm7+qsK/ZSxzSL4MJNH9wt3r+IKr2ldR4o1JAl20PXYQhcKltq9jMTZkb fmIO6LkS1dlC+vfNlW2TplsEofP1o7lNYtRMPQByCbVKKtxDVh/5i+Z1FLUYTjEJR7gtgQ MFqmXo7RVP2zLhBmXhOr86XkjUrwIGFQ4cCZHn4EUfnPhjQtf7PYvom4855A7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780081983; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1wO/zpmCOv6GBrswedqeIcS3uZ4889aeJcwh4/3rzUM=; b=qxkWg6NcCgyFULXXurfBUo2/1nVsyRntZBkEOWv/o4T1AE2DQdUOc43R5hQ4Ho6LzsXL8T 9ts3DSoGEADGaQZH7dRKyunpBPpVjCSqeGZxmzhAPBbYb9GFyaWbxFlPmg0su3ukIZm3g8 uX/g/EbCeqZoI543XLeUgsDpOWK9x3+PNYAINd/qXOwhjf2soJg4WYqe3k5I0Okf+HrI8o wj5nZDKAOY3j+Sqat5mQ/KsJYDT4aEZKTgFe+OJaOHVTg1kR8doW+fe4XtDrahSlLVNZLE +g2Y284uAKNFAISC90YA8H6uA8DEUxRzedts2NvU+bg10kwfz+acLADmMvYpwA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRtKq3JhFzmXw for ; Fri, 29 May 2026 19:13:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 22b87 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 19:12:58 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: d11ff01b3aec - stable/14 - sigqueue: In capability mode, only allow signalling self List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: d11ff01b3aec336128e6babbff7a421fbce82015 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 19:12:58 +0000 Message-Id: <6a19e53a.22b87.5077d08c@gitrepo.freebsd.org> The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=d11ff01b3aec336128e6babbff7a421fbce82015 commit d11ff01b3aec336128e6babbff7a421fbce82015 Author: Ed Maste AuthorDate: 2026-05-26 13:24:36 +0000 Commit: Ed Maste CommitDate: 2026-05-29 19:12:46 +0000 sigqueue: In capability mode, only allow signalling self This is copied from the check in kern_kill. Reviewed by: markj, oshogbo Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57244 (cherry picked from commit b9d16b7fd2fa6bc4b3e8364804cbdc1b76ebe8a5) (cherry picked from commit defd9b86ef995ce70363eae9b323d616bda865be) --- contrib/capsicum-test/capmode.cc | 12 +++++++++--- sys/kern/kern_sig.c | 10 ++++++++++ 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/contrib/capsicum-test/capmode.cc b/contrib/capsicum-test/capmode.cc index f32d9e038744..12921bb53c72 100644 --- a/contrib/capsicum-test/capmode.cc +++ b/contrib/capsicum-test/capmode.cc @@ -747,8 +747,8 @@ FORK_TEST(Capmode, NewThread) { close(thread_pipe[1]); } -static volatile sig_atomic_t had_signal = 0; -static void handle_signal(int) { had_signal = 1; } +static volatile sig_atomic_t signal_cnt = 0; +static void handle_signal(int) { signal_cnt++; } FORK_TEST(Capmode, SelfKill) { pid_t me = getpid(); @@ -766,7 +766,13 @@ FORK_TEST(Capmode, SelfKill) { // Can only kill(2) to own pid. EXPECT_CAPMODE(kill(child, SIGUSR1)); EXPECT_OK(kill(me, SIGUSR1)); - EXPECT_EQ(1, had_signal); + EXPECT_EQ(1, signal_cnt); + + union sigval sv; + sv.sival_int = 0x1234; + EXPECT_CAPMODE(sigqueue(child, SIGUSR1, sv)); + EXPECT_OK(sigqueue(me, SIGUSR1, sv)); + EXPECT_EQ(2, signal_cnt); signal(SIGUSR1, original); } diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 91361d680809..7f399586f639 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -2047,6 +2047,16 @@ kern_sigqueue(struct thread *td, pid_t pid, int signumf, union sigval *value) if (pid <= 0) return (EINVAL); + /* + * A process in capability mode can send signals only to itself. + */ + if (pid != td->td_proc->p_pid) { + if (CAP_TRACING(td)) + ktrcapfail(CAPFAIL_SIGNAL, &signum); + if (IN_CAPABILITY_MODE(td)) + return (ECAPMODE); + } + if ((signumf & __SIGQUEUE_TID) == 0) { if ((p = pfind_any(pid)) == NULL) return (ESRCH); From nobody Fri May 29 20:57:42 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRwfb0mrtz6g5mW for ; Fri, 29 May 2026 20:57:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRwfZ6W1yz445w for ; Fri, 29 May 2026 20:57:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780088262; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xBObN6Hha1nQJ1wnb+tMLpEDty+UCAaRn5dTlbMQhFw=; b=pUxhQqQRuQuMwLMIoPok7Vosd+TDR81KrblqeFph9KWRiJwtyJwMoBOtIBJHZdzqZNjAkt 7EZSxQwdqw0DmedfGan76ehj+/9Se4JuK8oMJ9+oKoUlgRJN0o5aI2ir8fqDMwHGbmbu8m k3kzeVvRnV3mudyglUKJj0D2bu2ya4UJOq+9jU2lmNWo9gmwU5Rz+EWevChUDv9UPqc6ns UkbKZvVa3ZooQuUoggsBPmTl7ab8rSP/TTNBf5Fto/BuElFFLZONBJyb5LkvQA9eKhIT/+ Mixt0aUx6hoNzraooeEzyU3CcupS1EILxwC5ZP7CKg2Zo2XjQpvGqcyL7YeEaA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780088262; a=rsa-sha256; cv=none; b=QFRKcDS7BnI+Y/0wNEOCti39xws/Qyuf3p/JfIGQ5FaF1sMrpRm0qcLaq6ipqDmImzV4i7 4FHb+8U82nwpPam5Kstp5pS26C/SvbcSAxj0Pa+Lze2RVSF5pgQqUsmLfE8SyFjKRpbmko VgrDthPH1PJsnwfszEfk4s3Q48zQObNCNB3AHWwmv7XIP1ZMSm4psSl+BOsa0u8To6/UvQ 7qWy1NO5PqNlOX3wbAqRyXFhq1UGdlsfXsAY3p6053vPG+wZi56Ysth1OEWiXx4CVNk1fH QezBj4+n0vxLga2+tl3iFHT6ssC/bhdSgCQeIskYthcu05ZBWlDqdN8eah3uwg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780088262; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xBObN6Hha1nQJ1wnb+tMLpEDty+UCAaRn5dTlbMQhFw=; b=v3d/VOYSwJUUQI7JaW0bvc0EhIb2FM2EWRMXUPhvNuzVmzAsW2m7TIFJ1OnnrB7pfJJjJy x9fLOv9qMsx4Y/eQY+6HZO1u0/GQdeD6YZUpn4D2Bk5nKPd4WXZJoFE+bKrvBIiRcrYMHq rPBrln//aaFlU08A2MG3pgw5Xnp7JSeJ3nEw8QStLjoPYW4utWlzV/NFbbCDuwHeY+O3Bi WEZ5sBDd93/QX8lD1MOAyaeGXMyUm+bZbkXbG7Ev+YnkES4fEumi7BwFQkSoyXPo6SK/OU 3eVh4hh1mGOQuEfSAPxTBghy7MYyXxRIQabISWzTPFHioWyMDrhhxQjAcvU1rg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRwfZ5rFCzpw5 for ; Fri, 29 May 2026 20:57:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 346e6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 20:57:42 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 81e894d5f3b4 - stable/14 - epoch: Don't idle CPUs when there's pending epoch work List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 81e894d5f3b4809979113cfdb4d8da047e833bd7 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 20:57:42 +0000 Message-Id: <6a19fdc6.346e6.7af651e0@gitrepo.freebsd.org> The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=81e894d5f3b4809979113cfdb4d8da047e833bd7 commit 81e894d5f3b4809979113cfdb4d8da047e833bd7 Author: Mark Johnston AuthorDate: 2026-04-21 14:28:31 +0000 Commit: Mark Johnston CommitDate: 2026-05-29 19:44:43 +0000 epoch: Don't idle CPUs when there's pending epoch work The epoch(9) subsystem implements per-CPU queues of object destructors which get invoked once it is safe to do so. These queues are polled via hardclock(). When a CPU is about to go idle, we reduce the hardclock frequency to 1Hz by default, to avoid unneeded wakeups. This means that if there is any garbage in these destructor queues, it won't be cleared for at least 1s (and possibly longer) even if it would otherwise be safe to do so. epoch_drain_callbacks() is used in some places to provide a barrier, ensuring that all garbage present in the destructor queues is cleaned up before returning. It's implemented by adding a fake destructor in the queues and blocking until it gets run on all CPUs. The above-described phenomenon means that it can take a long time for these calls to return, even (especially) when some CPUs are idle. This causes long delays when destroying VNET jails, for instance, as epoch_drain_callbacks() is invoked each time a network interface is destroyed. Work around this problem by not disabling the hardclock timer if there is garbage present in the destructor queues. The implementation of epoch_drain_callbacks() has other problems, but this small change on its own gives a good improvement, especially when running networking regression tests. Moreover, we should aim to invoke destructors in a timely manner, so the change is generally beneficial. Reviewed by: glebius MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D56508 (cherry picked from commit dce56594991464c276f340ce963d0f5461566c78) --- sys/kern/kern_clocksource.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/kern_clocksource.c b/sys/kern/kern_clocksource.c index 6bf3bbd83245..637610654648 100644 --- a/sys/kern/kern_clocksource.c +++ b/sys/kern/kern_clocksource.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -235,7 +236,7 @@ getnextcpuevent(struct pcpu_state *state, int idle) /* Handle hardclock() events, skipping some if CPU is idle. */ event = state->nexthard; - if (idle) { + if (idle && DPCPU_GET(epoch_cb_count) == 0) { if (tc_min_ticktock_freq > 1 #ifdef SMP && curcpu == CPU_FIRST() From nobody Fri May 29 20:57:41 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRwff6nhwz6g5qL for ; Fri, 29 May 2026 20:57: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRwff5YGhz44Sv for ; Fri, 29 May 2026 20:57:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780088266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n/kSZAM/W3C0wk8a6tSqVcxAkOpSaL2qNbI/P/nNmnE=; b=V50BjyUnT+kpTmYfu2RZhoJjEDeGvUoBWK7Db/kFjyiELPYKkKocl1S43NdxLCjZkaK6CY qGPZ5q+gHU0f1rEN1GpiXKJb+Fl0gaJHnBtoQXE23jk9zY5FfT3Jz2G12fHSHdGOwkFFAn DYglXdq1gO4lW2a8HX1T4IifLf1ykSVW/aBxNdWUXNIPeuNUCme1byc17gBlzTtbxhdr6G mOS1nAvz025wKFCPtwIPwrfuditY64011bIVEnchdLFNo2AtKRQHhVvfN2w2ks1VJqJ2o/ ZtNZQW5bEfLFkC0WKKNQRcK/QDKkTt7RbxeBBuhaMlwlOiQfGKNC5+LEE3Sfcg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780088266; a=rsa-sha256; cv=none; b=oVMcRHRisAE5f7mNj1/3TMY4Z8IQXrGlx9MNBmcCYdhWQGcer1d5H8VvTGAT2nl1Z/FZKW 76FvMHWJXXQcPXC8BGdPUCQvA4CH6ydhsVoHPyMT1gvEJY86pMT6OXgXgAL5TLLzqa7q6C FliLtYi4qwaPFK8yyc+CQt3mIN81mofcqC6ag7dH0hCAYKmGzX2VmNgscSBLJpujtBy+CK nwP5Sh24dzVR7OMjW3Pvjx6nT1Lb0KGxW/odPvKGszxGpOcYsG29C+MMI/FN4X3CmeKws0 QzjQx740sSliV1Mk4D9Lc7Nh5H3+B6Vr8suHRfSYyGx0ED8MWDeBrRN8del20w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780088266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n/kSZAM/W3C0wk8a6tSqVcxAkOpSaL2qNbI/P/nNmnE=; b=CHp05Q36WrN2mljLJ/uOhJyIBVbEnK//YiTEpv1L+9/eUCSFWeJ1p2fh49YaeIdEKa3UFG 38Yaccuwp9GdFZUK+c/FVETf10L0M0AGZWMOtdZRuUBLeBP2GWAsS/vLPnzgNGvV14scFz +j+8SfBNiprnijRZAgfc95F4RVY658DcHCoTVrl2qJh2REWyOTDjkpBcxi44S9/ad+7TyG phFKCLRB29E1WjuI0yV9suV/y0zOC3RHytesHormBlPTlF0xNCNvJpOalxy3DpqekRS9+w c1NQ74Lw+2y3/xFGVwFTI3RYVxo7AVyxd1LA+eR2gVktsZsIbegNbIge7tdBHw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRwff51YGzqPf for ; Fri, 29 May 2026 20:57:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3460f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 20:57:41 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 4a875b186e8d - stable/14 - eventhandler: Fix a race when pruning eventhandlers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 4a875b186e8d53e38f79a9e4c0e9ed8949e38ed7 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 20:57:41 +0000 Message-Id: <6a19fdc5.3460f.f44f774@gitrepo.freebsd.org> The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4a875b186e8d53e38f79a9e4c0e9ed8949e38ed7 commit 4a875b186e8d53e38f79a9e4c0e9ed8949e38ed7 Author: Mark Johnston AuthorDate: 2026-05-06 11:48:05 +0000 Commit: Mark Johnston CommitDate: 2026-05-29 19:44:43 +0000 eventhandler: Fix a race when pruning eventhandlers By default, eventhandler_deregister() blocks until it reaches some point where no threads are invoking the event. At this point, it knows that 1) no threads are currently executing the handler, 2) some thread has freed the eventhandler structure by virtue of having called eventhandler_prune_list(), so it is safe to return. Suppose a thread is trying to deregister an event handler. A different thread prunes it, and wakes up the first thread. Before the first thread runs, a third thread grabs the event handler lock, and starts executing handlers. The first thread observes el_runcount > 0, and goes back to sleep. The third thread sees no event handlers to prune, and doesn't wake up the first thread, which sleeps forever. This change fixes the race and tries to make eventhandler_invoke() more efficient: keep a count of the number of dead list entries and only prune the list if there is at least one dead entry. Also, in eventhandler_deregister(), we only need to sleep if some dead entries are present, rather than sleeping whenever some thread is running handlers. Reviewed by: kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D56767 (cherry picked from commit 735b16d490aee158beb54c415b716475a0d19cda) --- sys/kern/subr_eventhandler.c | 18 ++++++++++++++---- sys/sys/eventhandler.h | 4 ++-- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/sys/kern/subr_eventhandler.c b/sys/kern/subr_eventhandler.c index 5a5365d0be6e..ccbb07b826b8 100644 --- a/sys/kern/subr_eventhandler.c +++ b/sys/kern/subr_eventhandler.c @@ -199,7 +199,10 @@ _eventhandler_deregister(struct eventhandler_list *list, eventhandler_tag tag, } else { CTR3(KTR_EVH, "%s: marking item %p from \"%s\" as dead", __func__, ep, list->el_name); + KASSERT(ep->ee_priority != EHE_DEAD_PRIORITY, + ("%s: handler for %s is dead", __func__, list->el_name)); ep->ee_priority = EHE_DEAD_PRIORITY; + list->el_deadcount++; } } else { /* remove entire list */ @@ -214,11 +217,15 @@ _eventhandler_deregister(struct eventhandler_list *list, eventhandler_tag tag, } else { CTR2(KTR_EVH, "%s: marking all items from \"%s\" as dead", __func__, list->el_name); - TAILQ_FOREACH(ep, &list->el_entries, ee_link) + TAILQ_FOREACH(ep, &list->el_entries, ee_link) { + KASSERT(ep->ee_priority != EHE_DEAD_PRIORITY, + ("%s: handler for %s is dead", __func__, list->el_name)); ep->ee_priority = EHE_DEAD_PRIORITY; + list->el_deadcount++; + } } } - while (wait && list->el_runcount > 0) + while (wait && list->el_deadcount > 0) mtx_sleep(list, &list->el_lock, 0, "evhrm", 0); EHL_UNLOCK(list); } @@ -293,8 +300,11 @@ eventhandler_prune_list(struct eventhandler_list *list) pruned++; } } - if (pruned > 0) - wakeup(list); + KASSERT(pruned == list->el_deadcount, + ("%s: pruned %u entries from \"%s\" but expected %u", + __func__, pruned, list->el_name, list->el_deadcount)); + list->el_deadcount = 0; + wakeup(list); } /* diff --git a/sys/sys/eventhandler.h b/sys/sys/eventhandler.h index 47024ecf87a9..be1b04606320 100644 --- a/sys/sys/eventhandler.h +++ b/sys/sys/eventhandler.h @@ -45,7 +45,7 @@ struct eventhandler_entry_vimage { struct eventhandler_list { char *el_name; - int el_flags; /* Unused. */ + u_int el_deadcount; u_int el_runcount; struct mtx el_lock; TAILQ_ENTRY(eventhandler_list) el_link; @@ -81,7 +81,7 @@ struct eventhandler_list { KASSERT((list)->el_runcount > 0, \ ("eventhandler_invoke: runcount underflow")); \ (list)->el_runcount--; \ - if ((list)->el_runcount == 0) \ + if ((list)->el_runcount == 0 && (list)->el_deadcount != 0) \ eventhandler_prune_list(list); \ EHL_UNLOCK((list)); \ } while (0) From nobody Fri May 29 21:40:28 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRxc13v1Kz6g8J4 for ; Fri, 29 May 2026 21:40: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRxc13KhFz49tg for ; Fri, 29 May 2026 21:40:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780090833; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Lo1byTM9GNSPL7OAqFTUwlr04Moipvt1wRSBnF8GYNw=; b=abE90IuCPRJuLU0TJsUnYvtCjM83pgxDS4jpmTAMVilM8UtZE8z2UKpDTHRw+yGpSWx0Ut nsM8vP4aD6/Hn4T7X6tpJJjHXO4CLyKc85wZiINz+ztvH7fjHwvciArBP9jrS4NPPz8BjV 22VWrLZiEjkeXMHG5/Z3pY3o5q4MQSYwpL7Td6qNUNXyL+uugspR5t+7cj8AVi7PkEeOmW Xm6fWYYXs4jz0DCIXgM7dnyInDBAzlYIm8PFbjSTytJJNb/XWoM/Kt9tsAdcDnF3O6vrB0 3crBBt4ktVcFx2vm7GCXhIiXkfofNWItXAwJpd+cDQWBxSYXgXZeo2HHZQ51Yw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780090833; a=rsa-sha256; cv=none; b=KMcD7a/TGV4zEDU2HQW4lE8QIDy+v2/wMhwkJ+ht75wPYlJjm0xCwkIoQD39j45uy5k45Q 6zQ3lPPdjdNCnu9de6djh+lGa6T3TkDQcQAk22M7H8t9zE3FD/Sem5AwvBw/YC7qpMzZhj /eUvK+2lDz8iFc+Cd7qzgfbjxWtYCYZ/BVfcTlgwAi100SblEgARrDW9Ad5QuNpU+f+qD4 wYBPsy1Tp+rWSZFSUsxhUkdfwz+JBQaZie/hak0j22PLou/97Sg5QwSEahrz26qV8Hz5oA h7W4Vzo0fevjQPN/iVclXcramw9sPMhCmbkGUa5FcyDcOaiO0fC6FEYb3H2yVQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780090833; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Lo1byTM9GNSPL7OAqFTUwlr04Moipvt1wRSBnF8GYNw=; b=uQ7WCIw6Ryx+Yx83fhmtkDRYTywEOrlt1oznl43AVmwNQLylp5BIUs6DBuRllMdz4qorUz fIsm3/UPWgLd1f3XQjNl6ikOM2W+Vg8GN5IKQqalzY8a8RoISUeaH7gVnImHu0ikqYOspH ordRmKmtZWSW5LSzhPcFvjezhYbGPYUKVexbpRMeNNhU543JP6r98gX+ec4AnuQw5/Wyvm R3ww8LcQ+KjE0wANeImMtIwog6ZskARvOaHxcKL0UKd4vpL68hArTExdaWZUUmS4Mr/SX2 iYDrTBT687JtRpypIIdJOaVBjntUZbuO59CTj9HE+ICk+peVglD2evpqzMEqyQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRxc1230gzqvd for ; Fri, 29 May 2026 21:40:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a9b8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 21:40:28 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: c5ad71c31160 - stable/14 - eventhandler: Fix the NODEBUG build List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: c5ad71c31160114752f5a4c1524349772105f6d0 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 21:40:28 +0000 Message-Id: <6a1a07cc.3a9b8.226c4d15@gitrepo.freebsd.org> The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c5ad71c31160114752f5a4c1524349772105f6d0 commit c5ad71c31160114752f5a4c1524349772105f6d0 Author: Mark Johnston AuthorDate: 2026-05-06 14:39:52 +0000 Commit: Mark Johnston CommitDate: 2026-05-29 21:40:22 +0000 eventhandler: Fix the NODEBUG build Reported by: Michael Butler Fixes: 735b16d490ae ("eventhandler: Fix a race when pruning eventhandlers") (cherry picked from commit 3d8928114c4fec6cefbb1cd566ef8d1b3d2999e2) --- sys/kern/subr_eventhandler.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/kern/subr_eventhandler.c b/sys/kern/subr_eventhandler.c index ccbb07b826b8..6e34f61475b4 100644 --- a/sys/kern/subr_eventhandler.c +++ b/sys/kern/subr_eventhandler.c @@ -289,10 +289,12 @@ void eventhandler_prune_list(struct eventhandler_list *list) { struct eventhandler_entry *ep, *en; - int pruned = 0; + int pruned __diagused; CTR2(KTR_EVH, "%s: pruning list \"%s\"", __func__, list->el_name); EHL_LOCK_ASSERT(list, MA_OWNED); + + pruned = 0; TAILQ_FOREACH_SAFE(ep, &list->el_entries, ee_link, en) { if (ep->ee_priority == EHE_DEAD_PRIORITY) { TAILQ_REMOVE(&list->el_entries, ep, ee_link); From nobody Fri May 29 22:06:21 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRy9t47r9z6g9q0 for ; Fri, 29 May 2026 22:06: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRy9t3QGBz4Fkq for ; Fri, 29 May 2026 22:06:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780092386; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S+md/eE/AKTK1RQ9K2SdwZe+iZrFyNl2O8LT5sZ5lWw=; b=wWTaV6iyU7lEdAa+0dAY6SNteWynGIwsrkQiEKNpHlU/lxIuO2Lfkj1aQi5rPSmtJA5DMW z1mJpegok8qkH1rsM0z/vaGtYgnlEUqGqF/HhnRpcmYq3+1DpP8dkDVcv3p9TEBFPxgqFw xESkAutGe2jScnwA301mJIzLExLiT0rDqtJ9+Y/Bhup2iw+LpcXO4T/ADDyZzPUZOxVzgS 6NaPypM5GKrO0POF4vmLYhNkU3elxVrvixy0hBJ6mXKnD+NrYhVQ7Ob4pWNVEaezxbBAX/ fqs8Xw7UkyVxgMnmZkrnW51Oaas8abjnKD29esWf4L4gFc7I71FMy8KgcrJLQw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780092386; a=rsa-sha256; cv=none; b=fQdvdq2OrlVVwKYEioEJ3pTuKnVExUHaaBCxgjbABODfwRS0qLO2Xble2S1DaWxpA7P9pe yiXhejsISHnYwasYZWHQyK0WkcYFlnz/OqrAshFMVgvwMLtgwR8cyF8fYkMkHU7ejMwudW YMc8RLFInCwA5P9/M1WrB4RC+z1QXVqzFIiikB73UDE9e5sex+a/Z7wB8lgNaLITt6JH2j qCXCzuh4iJtv+c28WNgQoFtkUxeiiJpA45o7UviY2EKuGkFwftRDFJNHBOiW1atmSN7S0E IS1isxaxDgxZfTlKXCal2YfT8FPXqQmu7LB+pd9cV/1LZ/TeAp63FNkYLmTFOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780092386; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S+md/eE/AKTK1RQ9K2SdwZe+iZrFyNl2O8LT5sZ5lWw=; b=NaQdQVUwWAmwo8mbvFcWahFZ+F9ZPHTRnYp/K1YN2WOxSKriFCaVweswZADZYFO7hl2kZc 52iV9hkeUcQ1PcB2Gz2tN0i4+lSdQUXLSgDkTW9c6OxWH4lvNYcsHotLkyOUovtmNBxn8C 6MdkkPCUf2tb8LVuP0eYbEy3dJHtBLK1NsqMpqrv+oAx63JJKWia//siJVeF4rWymFZgES thzFbL51QvBM3y4uUnyJvk+ghQEUEHkjlKPNy17cYgpCTVngAwJq7mtMpBz5O4b8E2/21K Sgxd4dXqphNt8AJsRt/qLTq4WyfH93vZ5KoSisyO1jBhjUbUCYvs2pi8CTiF9Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRy9t31knzs36 for ; Fri, 29 May 2026 22:06:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c55d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 22:06:21 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Warner Losh Subject: git: 365bd0e19b88 - internal/admin - Idle commit bit retire List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/internal/admin X-Git-Reftype: branch X-Git-Commit: 365bd0e19b883ffd8d0d636ba7f573ef7458443e Auto-Submitted: auto-generated Date: Fri, 29 May 2026 22:06:21 +0000 Message-Id: <6a1a0ddd.3c55d.67f9fab7@gitrepo.freebsd.org> The branch internal/admin has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=365bd0e19b883ffd8d0d636ba7f573ef7458443e commit 365bd0e19b883ffd8d0d636ba7f573ef7458443e Author: Warner Losh AuthorDate: 2026-05-29 22:00:26 +0000 Commit: Warner Losh CommitDate: 2026-05-29 22:05:23 +0000 Idle commit bit retire Retire the following idle commit bits: 2022-09-13 afedorov Aleksandr Fedorov 2022-10-04 luporl Leandro Lupori 2022-12-05 wma Wojciech Macek The FreeBSD project would like thank you all for your contributions to the project. When you're ready to resume contributing, please contact srcmgr@ so we can reconnect. Approved by: srcmgr --- access | 3 --- 1 file changed, 3 deletions(-) diff --git a/access b/access index fbcc5ba59979..227b797f2f74 100644 --- a/access +++ b/access @@ -18,7 +18,6 @@ 0mp adrian ae -afedorov akiyano alc alfredo @@ -108,7 +107,6 @@ kib kp ks lstewart -luporl lwhsu manu marius @@ -178,7 +176,6 @@ vangyzen vexeduxr vmaffione whu -wma wosch wulf yuripv From nobody Fri May 29 22:07:05 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRyBf1459z6g9qb for ; Fri, 29 May 2026 22:07: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRyBf0SB0z4G49 for ; Fri, 29 May 2026 22:07:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780092426; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HcLJEo+81pWcB8I0DJVVBrsx2LBk5FLNzN4chGtOg/Q=; b=lJpHxCGlOBrtfBmxdsEoG3uNosNVPmb0vIHe4VbAPboljrQ4tt8/IRUueboVzI6VN8pJ4I wmc3w5qJcb3Efd460HUPG0bYqAKp5Iu+YJbgPBAhpnAhlgiEVTT9p+MYdTSShn1Mdm2EjP YrjcwGEj7GrmHA7ZEkcQhAfcVYNuk1v+l8ukdTPmCyXc6W/Bc9H0MJf2JVNTBfrMOU8tQ+ 93fT2i/HdqAMNcwU6hBKWK4J32izPkrcWQ1/E+fmjtEb13cCT3kvO4LR+RehOfimowS8un womU44N3NuUfquhTzsico0t7eGMkGUNRjIDYZCXB9VPonE06JBs9gMkv/N3+3g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780092426; a=rsa-sha256; cv=none; b=YPSfJP0VQE9qNDnpH/Yt8+NqYGQ+Y70gXal6cM/SNItZ3DfAvG3bqmx0w3145EsiPqbMGL TkbyLgabnRK1mkYFutDdMfUfMdJnq0z+z+QLtUXK6BlgRkcv/N3bQc/kyYjy+Yn0ai6M3n a0fz0BzD/+tIH1zAEiY4gj/65Bto4JieEA+4zVshaw/DDmr5pAuCptnvyeZu0XrDNTQ4e7 Ta2f2r8waHekjpWAbmqgw/kQtOpddXZh93b8SsxuD5+duWns6Gj9/V3t8OiH8TI/Lq+1TH uR0c9rdgEGnKATDgoaeQI0WKlJvrZ/QrxsiJhHQw3lIrKk4li+R+YmpMZKkabA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780092426; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HcLJEo+81pWcB8I0DJVVBrsx2LBk5FLNzN4chGtOg/Q=; b=EeGduz2g5hv1JiksJxq1NxGVfeiRhweExQtWQR1Xe9wYC30nBi9oWMyoSfJa5oTX2AU3VW l4Cavng3DnOhwW0t3FclPZ7QiPLEuBAhRLSoT+5YVvqiog0mMKemfR26IPrvXUu9EFCPo3 aDLyjNY6vuNx0A+y2fN8WCOzKwmt+uHAhn/TKAnRpUUydY54x8wZRiQ7rJoDFWRaCW1eim lGL9hpzN7nRvfk/BtXJXXtgeRn/Wjs9fn4qNB2kO1ZMG3M3+zxXCPMZAH7ycuDjcPtpJYJ RHvgapRA1fpiyvYh+eDw/bFucBgn205soyQYoMJ86autmJO9VUzftgfldMiOjA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRyBf01KNzrww for ; Fri, 29 May 2026 22:07:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d024 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 22:07:05 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: b5dce0ae4f78 - main - login_class: Fix kqueues, pipebuf resource types List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b5dce0ae4f78251f56ffcb6c6a58b9e6c20380e0 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 22:07:05 +0000 Message-Id: <6a1a0e09.3d024.b2b496d@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=b5dce0ae4f78251f56ffcb6c6a58b9e6c20380e0 commit b5dce0ae4f78251f56ffcb6c6a58b9e6c20380e0 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-29 22:06:44 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-29 22:06:44 +0000 login_class: Fix kqueues, pipebuf resource types * kqueues is a count but is listed as a size * pipebuf is a size but is listed as a count PR: 295623 MFC after: 1 week Fixes: a4c04958f526 ("libutil: support RLIMIT_PIPEBUF") Fixes: 85a0ddfd0b26 ("Add a resource limit for the total...") Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D57333 --- lib/libutil/login_class.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libutil/login_class.c b/lib/libutil/login_class.c index 90e4e01f7c3b..8a465e2eb24e 100644 --- a/lib/libutil/login_class.c +++ b/lib/libutil/login_class.c @@ -63,9 +63,9 @@ static struct login_res { { "vmemoryuse", login_getcapsize, RLIMIT_VMEM }, { "pseudoterminals", login_getcapnum, RLIMIT_NPTS }, { "swapuse", login_getcapsize, RLIMIT_SWAP }, - { "kqueues", login_getcapsize, RLIMIT_KQUEUES }, + { "kqueues", login_getcapnum, RLIMIT_KQUEUES }, { "umtxp", login_getcapnum, RLIMIT_UMTXP }, - { "pipebuf", login_getcapnum, RLIMIT_PIPEBUF }, + { "pipebuf", login_getcapsize, RLIMIT_PIPEBUF }, { "vms", login_getcapnum, RLIMIT_VMM }, { NULL, 0, 0 } }; From nobody Fri May 29 22:08:20 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRyD46Ppmz6g9dK for ; Fri, 29 May 2026 22:08: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRyD45T3Cz4GXS for ; Fri, 29 May 2026 22:08:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780092500; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CqN7EBpeB1K7urwXBDtmQMAJYD4xmiXgFIxCQxhvvxk=; b=Vg7j0Rm+2Y9cXnA/SF9tGKEAnb/vGIogdv4sLPaMb/kWyogm//K3AtBglvLRaWtWMgENgY lW3vIKdkoeZwz2QPuLrcTz5iAmZIe29bIY9grONeuQnKfAxxqQtkgsFDPFElrOnMLTBsRJ aKLh0ytMu+Ex6uJ7tpn/QsBohlvIg2QhlnsmQCCISn9u1XAnQts0uSvyUkn3pmBVVXeecp 6JKVZy3AQweg1HKR/etzw0tziiOOB0tB6VJf15knJJGjXPvEszJcUV3I+zrWsuYp/GbYEe cdwBd1jEe7OnRHaI/hyx+R4HlQr/wF4/RdhRRiYgWqSBX/iMzx2ZCZ4ucro1Bw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780092500; a=rsa-sha256; cv=none; b=C9VzD/ZQG6q6vukIrL2iQ7mspHksVHALtWN/H1Svmqvpv9w9h1b6Gg3PvE2t5Bayk62gcv K6Avx754Boomgisur98wxnl+rBc9F2Y2BOr3cTRRlOMjNfIXzLpCk4AKu4+cWkhgaYMGcb cwOvl4ukgXJ5UqiK8JhG8Uuc/XQ//0YZVUVRFCZ8/ndY5o3zXXgfy41bf0Cs2TgoTY23dQ RxclxhldK2YtXdMza9PizypN2pWkN3OxOFc2VM6bMgmTv9f0muxQ5iCQHYqxcekeKOdYQP BebLl223ztV8A77Bhs6Ij4r0S+jXVfJBwH99CImfKlvepSXuifRcmbC9SAeKnA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780092500; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CqN7EBpeB1K7urwXBDtmQMAJYD4xmiXgFIxCQxhvvxk=; b=JE71l55RT4jWbGUrej3CBWWPVn6S9VgkDFOUzOy4orKqLJ5lxOtr4g9FlhfId5o4NLJoxv ZGsy+BNcmfs05bVF8gn3ESqmFQSilDwCn7sG2oL44X/J9UHuz0vTSG27DtBIf9DJ57ly0E n/pzGFFW5s8iQaLRcar6ZnKdvB+1F8s0yM3M7T1T7LshCa/0Z1CsrZLh0WTCG+TpotMY+P PyTqSSHXOn3rQjeeRvvFQtaI1YTgWteHZog+KZHHvG4a/SlY2BQBJj0aWifcuStoSmCRFT qjqQ6T9ntxJMH4AGfuVL/oJl/xRpv7rm3R88tdiHBSWZVrRVSa+dWw4rLLTFww== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRyD44r6MzsCb for ; Fri, 29 May 2026 22:08:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c8c7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 22:08:20 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: e97ce8cae292 - stable/15 - tests/if_carp: Run all tests with execenv=jail List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: e97ce8cae292ecd7130af82aaad1ea0581c7c4fc Auto-Submitted: auto-generated Date: Fri, 29 May 2026 22:08:20 +0000 Message-Id: <6a1a0e54.3c8c7.2b87b180@gitrepo.freebsd.org> The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e97ce8cae292ecd7130af82aaad1ea0581c7c4fc commit e97ce8cae292ecd7130af82aaad1ea0581c7c4fc Author: Mark Johnston AuthorDate: 2026-05-19 14:28:34 +0000 Commit: Mark Johnston CommitDate: 2026-05-29 19:46:47 +0000 tests/if_carp: Run all tests with execenv=jail Otherwise failures can occur when running tests in parallel since some tests reuse jail names. MFC after: 1 week (cherry picked from commit eeffed5aa0d9a67adb21bf188515cb374340e9cb) --- tests/sys/netinet/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/sys/netinet/Makefile b/tests/sys/netinet/Makefile index c7626104451b..cdb31b4be23c 100644 --- a/tests/sys/netinet/Makefile +++ b/tests/sys/netinet/Makefile @@ -38,6 +38,8 @@ LIBADD.udp_bindings= pthread # Some of the arp tests look for log messages in the dmesg buffer, so run them # serially to avoid problems with interleaved output. TEST_METADATA.arp+= is_exclusive="true" +TEST_METADATA.carp+= execenv="jail" \ + execenv_jail_params="vnet allow.raw_sockets" TEST_METADATA.divert+= required_programs="python" \ execenv="jail" \ execenv_jail_params="vnet allow.raw_sockets" From nobody Fri May 29 22:08:21 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRyD60Gdvz6gB6L for ; Fri, 29 May 2026 22:08: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRyD56R1gz4GKF for ; Fri, 29 May 2026 22:08:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780092501; h=from:from:reply-to:subject:subject: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/2p35mMOMiSSvgvbRDoScdraHLzj1wkSjTlFAVDN0U=; b=Ochuls/qI/4/WMEMDAZTOc39JH8UNHZTgk4K24cJhgeX8/I9GpUNZztlwHLq6u9Ayxcmum MjssRrXecArZr3uGoKzmjBlSBVg/SuEyC5enSlWuSGL9LbgeLbEOyUNOagaccoRdJjdeGt HAzK0iASgOnwXBiy38PqBPC7pCvPO23NXlOGVs9a2JaUfOzLbxLVWmWJ/bHwbxGNO2a9PK zvoZkIHyFT4U0SiJGn/jLVaOr1f0H3wXw1Za5UoCR0Otk7gQP4qRnM/ZTVwQ3x2cIWR3MZ o/h43U1ufckJN7dEd/mnS2Dod46xubBVU3yMfcwRQg6hKDpY9e8J+Jx7Hzeaig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780092501; a=rsa-sha256; cv=none; b=IZrCButD4QV7GOJF7qWa3ek0h7NaLgm3zrpyadiPccU50/WrJmDyIp5T+f09yDttnwd20b 7dx3b9u1whVnXTsrg/dbLfvFIO4l26kwq4psJu2I8s+DUTC1vlMj/27BligeXMj/8ZwNAi NsFk5i8Q/v1Qtw8ZcFLPQunNaIJ65fK15RZQTkkSZQw2FQeFtTdNBw/kmjkMRiYMe6PY4g e49d/MRJ+leb7NHYrDkfaqf1FNEBQDxu93rj/sEXRk3jeYsjOlJt9ah2QsOznmjhRiItgC yq8YrUPTCjIqkEZSTQabzXIfxnIgwN0+RgS85ovhuWBOekafGT7wa12B2U0Llg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780092501; h=from:from:reply-to:subject:subject: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/2p35mMOMiSSvgvbRDoScdraHLzj1wkSjTlFAVDN0U=; b=VfZrsb4fQIhS1Ua8+bI8+CdCc7zAa7u+IlSzVZLRI2RDhPtHheUcZUxXjvcYDR2TRQX673 3G2TDLYfjoqzy3vBIGFu/tSS0OXz3anxeZSTI/FbASkPPQO4GkCQlJO3yexeK/zm5na9Dw 5s4xA8YOMpTylo93IxAapjNZlnq98gr+COVD5vTjAeRuz5Un/xTA32SuFUdh9wrEjcZerm 4NvKa81eeAtXI474BjwZ9wfP+DscXV1GPM0hKO2G/lXVib7zvykW2cYvdFgL0Dr1SJxZAD Ltda67VjvnlLuDOZGalxYaWyXDeoGq7dSIYB8Xm6bOPFeOmul9QTfBMZyDeYmQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRyD55gTtzsCc for ; Fri, 29 May 2026 22:08:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c8cb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 22:08:21 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 25bb939c7871 - stable/15 - kinst/arm64: Fix return values from kinst_invop() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 25bb939c78714a456e59e2357b427a44ec85bee1 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 22:08:21 +0000 Message-Id: <6a1a0e55.3c8cb.51df35fa@gitrepo.freebsd.org> The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=25bb939c78714a456e59e2357b427a44ec85bee1 commit 25bb939c78714a456e59e2357b427a44ec85bee1 Author: Mark Johnston AuthorDate: 2026-05-20 14:49:28 +0000 Commit: Mark Johnston CommitDate: 2026-05-29 19:46:47 +0000 kinst/arm64: Fix return values from kinst_invop() After commit 853cd8723494 it became invalid for kinst_invop() to return 0: dtrace_invop_start() would convert this to a sentinel value indicating that it did not consume the breakpoint, and so we'd just call kdb_trap() to handle it. Change kinst_invop() to return NOP_INSTR after handling a matching breakpoint. NOP_INSTR is handled by advancing the ELR, so we have to compensate by subtracting INSTR_SIZE before returning. Reviewed by: christos MFC after: 1 week Fixes: 853cd8723494 ("arm64: Clean up usage of the dtrace invop handler") Differential Revision: https://reviews.freebsd.org/D56987 (cherry picked from commit d6f0e671d0797b56011880f84d12ce5fb20bf099) --- sys/cddl/dev/kinst/aarch64/kinst_isa.c | 38 ++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/sys/cddl/dev/kinst/aarch64/kinst_isa.c b/sys/cddl/dev/kinst/aarch64/kinst_isa.c index 20ca26219a55..1ccfe20b8dcb 100644 --- a/sys/cddl/dev/kinst/aarch64/kinst_isa.c +++ b/sys/cddl/dev/kinst/aarch64/kinst_isa.c @@ -18,7 +18,7 @@ DPCPU_DEFINE_STATIC(struct kinst_cpu_state, kinst_state); -static int +static void kinst_emulate(struct trapframe *frame, const struct kinst_probe *kp) { kinst_patchval_t instr = kp->kp_savedval; @@ -132,17 +132,13 @@ kinst_emulate(struct trapframe *frame, const struct kinst_probe *kp) else frame->tf_elr += INSN_SIZE; } - - return (0); } static int kinst_jump_next_instr(struct trapframe *frame, const struct kinst_probe *kp) { - frame->tf_elr = (register_t)((const uint8_t *)kp->kp_patchpoint + - INSN_SIZE); - - return (0); + frame->tf_elr = (register_t)(uintptr_t)kp->kp_patchpoint; + return (NOP_INSTR); } static void @@ -215,21 +211,27 @@ kinst_invop(uintptr_t addr, struct trapframe *frame, uintptr_t scratch) dtrace_probe(kp->kp_id, 0, 0, 0, 0, 0); cpu->cpu_dtrace_caller = 0; - if (kp->kp_md.emulate) - return (kinst_emulate(frame, kp)); + if (kp->kp_md.emulate) { + kinst_emulate(frame, kp); + } else { + ks->state = KINST_PROBE_FIRED; + ks->kp = kp; - ks->state = KINST_PROBE_FIRED; - ks->kp = kp; + /* + * Cache the current SPSR and clear interrupts for the duration + * of the double breakpoint. + */ + ks->status = frame->tf_spsr; + frame->tf_spsr |= PSR_I; + frame->tf_elr = (register_t)kp->kp_tramp; + } /* - * Cache the current SPSR and clear interrupts for the duration - * of the double breakpoint. + * NOP_INSTR is handled in dtrace_invop_start() by advancing the ELR, so + * compensate by subtracting INSTR_SIZE before returning. */ - ks->status = frame->tf_spsr; - frame->tf_spsr |= PSR_I; - frame->tf_elr = (register_t)kp->kp_tramp; - - return (0); + frame->tf_elr -= INSN_SIZE; + return (NOP_INSTR); } void From nobody Fri May 29 22:08:22 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRyD71t9Lz6g9t2 for ; Fri, 29 May 2026 22:08: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRyD66f7Pz4GXY for ; Fri, 29 May 2026 22:08:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780092503; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8txWUtuH2lPM5LARM9Us4aN/zFRBZyBzC8LG0o9i/Hc=; b=ZvCI0Ekeleq9pdpVNR6MykKmlrU5zl/nR/nctTyAnfDzQLdPV5vQu/HS8xZbw5oD3fu6nc mcl863LhRf5XxeIlLTBHTGd9fFHZB0/dAP2l1h1w6jTxmsZ16EW5+2xMVad0bEvG0pEneH 4FcTJdeGFdLvbWLiJsr3lQpApKS+9GlOyEd/BSq2B/j//cEEc+CO773hu0Npm1bN+KWRvc 8bpENG+gQ0jghf6dVJA8hge7rrwQVUhJ4i6noyuqWwpR6DlallE11wYPJ/dsXxwoP44no1 MNPurDQHvtFbE9XqFcQsffT6zpNcjPdUdEfMcZAXmA5OVtX33BkjBYNTmvgcJg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780092502; a=rsa-sha256; cv=none; b=H/yhmSS3af3TlwwyuA7UO8WuuEBV6FGQa3NJ+da0xfN5TtttxotHuE8csGPGk0Te5JQu88 Pii7JnVnkqk3tz9e8jAJcw12YF1mglJWuU6t76rxCcN4AAkR2eEyG58nVBYrFQxRnFEflO qLt7XMRWWU95jJ+RQg+IB0gcsqRpiKTm5uhxfd7z8xaiXN123zsqn9D2/F+cVG5qWKmLpR dD6UAM/d9SMyZ9bpJ8K3/pN1vuHJ2i9QxzfOoja7JH3YpmWj4hFELzT2HM0BdiChM7A32o VpBp32iV4noLEcvE24hsCwokrLYTdA84tmXU5bIQI/VJskXoXegd0scX0zChCA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780092502; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8txWUtuH2lPM5LARM9Us4aN/zFRBZyBzC8LG0o9i/Hc=; b=xcQoXhKRCGoPhQNwIr16HAwMTZrQOldZ/iZ+FDduc2BiZSvKnNCLjce5KQwXGrCfxzeV13 1GASI9TUa00W9YsbV9c2gCMN7G6TYXGu0Fcidu3E9I2Aw7piv93bPEelSayQHwAj/kqYnV RLxqptcSn6zzaS0Wqq/NAJg0hLlTmJkDX2dGRiHt83IuBxwBqEgRde4p0vuvDo22CT9LhI x5nhPgrwQIwNsycrSeg9Ad0GIWD1/MQr4DLH7GLJSmKRGGoFTttX3Ts4Mc0+VI5/VKb+Ge tYIcEE4UsZOJFSLB5aEWrEFK7HyQKoRGlrU3T51xiD/1/RBYk/7/Rs4lYVPWMg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRyD66FdLzs37 for ; Fri, 29 May 2026 22:08:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a970 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 22:08:22 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: cb62bc13b2a5 - stable/15 - kinst/arm64: Handle an additional PC-relative instruction List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: cb62bc13b2a5b85ddfc9df539689744a16a082e1 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 22:08:22 +0000 Message-Id: <6a1a0e56.3a970.3894ce90@gitrepo.freebsd.org> The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=cb62bc13b2a5b85ddfc9df539689744a16a082e1 commit cb62bc13b2a5b85ddfc9df539689744a16a082e1 Author: Mark Johnston AuthorDate: 2026-05-20 14:49:41 +0000 Commit: Mark Johnston CommitDate: 2026-05-29 19:46:47 +0000 kinst/arm64: Handle an additional PC-relative instruction "ldr , " loads a value from a literal memory address into a register. It's PC-relative and so cannot be directly implemented using the trampoline mechanism. Unfortunately, on arm64 it can't easily be emulated either since the return-to-EL1 handler does not restore callee-saved registers, so like adr/adrp, we simply don't handle it. These instructions are fairly rare in an arm64 kernel. While here, refactor the code so that all instruction decoding is done in one place: introduce an enum type which characterizes the instruction type, add a helper to map instructions to enum values, and store the corresponding enum value in the probe description. Reviewed by: christos MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56988 (cherry picked from commit e6be6dedeea1e6d2e5206e1e7422e2d556a6da0c) --- sys/cddl/dev/kinst/aarch64/kinst_isa.c | 121 +++++++++++++++------------------ sys/cddl/dev/kinst/aarch64/kinst_isa.h | 15 +++- 2 files changed, 69 insertions(+), 67 deletions(-) diff --git a/sys/cddl/dev/kinst/aarch64/kinst_isa.c b/sys/cddl/dev/kinst/aarch64/kinst_isa.c index 1ccfe20b8dcb..d9a8fd0276f2 100644 --- a/sys/cddl/dev/kinst/aarch64/kinst_isa.c +++ b/sys/cddl/dev/kinst/aarch64/kinst_isa.c @@ -18,6 +18,30 @@ DPCPU_DEFINE_STATIC(struct kinst_cpu_state, kinst_state); +static enum kinst_instr +kinst_instr_type(kinst_patchval_t instr) +{ + if (((instr >> 22) & 0xff) == 0b00100001) + return (KINST_INSTR_LDX); + else if (((instr >> 22) & 0xff) == 0b00100000) + return (KINST_INSTR_STX); + if (((instr >> 24) & 0x1f) == 0b10000) + return (KINST_INSTR_ADR); + else if (((instr >> 26) & 0x3f) == 0b000101) + return (KINST_INSTR_B); + else if (((instr >> 24) & 0xff) == 0b01010100) + return (KINST_INSTR_BCOND); + else if (((instr >> 26) & 0x3f) == 0b100101) + return (KINST_INSTR_BL); + else if (((instr >> 25) & 0x3f) == 0b011010) + return (KINST_INSTR_CBZ); + else if (((instr >> 25) & 0x3f) == 0b011011) + return (KINST_INSTR_TBZ); + else if (((instr >> 24) & 0xbf) == 0b11000) + return (KINST_INSTR_LDR_LITERAL); + return (KINST_INSTR_COMMON); +} + static void kinst_emulate(struct trapframe *frame, const struct kinst_probe *kp) { @@ -26,8 +50,8 @@ kinst_emulate(struct trapframe *frame, const struct kinst_probe *kp) uint8_t cond, reg, bitpos; bool res; - if (((instr >> 24) & 0x1f) == 0b10000) { - /* adr/adrp */ + switch (kp->kp_md.kp_type) { + case KINST_INSTR_ADR: reg = instr & 0x1f; imm = (instr >> 29) & 0x3; imm |= ((instr >> 5) & 0x0007ffff) << 2; @@ -44,14 +68,14 @@ kinst_emulate(struct trapframe *frame, const struct kinst_probe *kp) frame->tf_x[reg] = (frame->tf_elr & ~0xfff) + imm; } frame->tf_elr += INSN_SIZE; - } else if (((instr >> 26) & 0x3f) == 0b000101) { - /* b */ + break; + case KINST_INSTR_B: imm = instr & 0x03ffffff; if (imm & 0x0000000002000000) imm |= 0xfffffffffe000000; frame->tf_elr += imm << 2; - } else if (((instr >> 24) & 0xff) == 0b01010100) { - /* b.cond */ + break; + case KINST_INSTR_BCOND: imm = (instr >> 5) & 0x0007ffff; if (imm & 0x0000000000040000) imm |= 0xfffffffffffc0000; @@ -92,15 +116,15 @@ kinst_emulate(struct trapframe *frame, const struct kinst_probe *kp) frame->tf_elr += imm << 2; else frame->tf_elr += INSN_SIZE; - } else if (((instr >> 26) & 0x3f) == 0b100101) { - /* bl */ + break; + case KINST_INSTR_BL: imm = instr & 0x03ffffff; if (imm & 0x0000000002000000) imm |= 0xfffffffffe000000; frame->tf_lr = frame->tf_elr + INSN_SIZE; frame->tf_elr += imm << 2; - } else if (((instr >> 25) & 0x3f) == 0b011010) { - /* cbnz/cbz */ + break; + case KINST_INSTR_CBZ: cond = (instr >> 24) & 0x1; reg = instr & 0x1f; imm = (instr >> 5) & 0x0007ffff; @@ -114,8 +138,8 @@ kinst_emulate(struct trapframe *frame, const struct kinst_probe *kp) frame->tf_elr += imm << 2; else frame->tf_elr += INSN_SIZE; - } else if (((instr >> 25) & 0x3f) == 0b011011) { - /* tbnz/tbz */ + break; + case KINST_INSTR_TBZ: cond = (instr >> 24) & 0x1; reg = instr & 0x1f; bitpos = (instr >> 19) & 0x1f; @@ -131,6 +155,9 @@ kinst_emulate(struct trapframe *frame, const struct kinst_probe *kp) frame->tf_elr += imm << 2; else frame->tf_elr += INSN_SIZE; + break; + default: + __assert_unreachable(); } } @@ -211,7 +238,7 @@ kinst_invop(uintptr_t addr, struct trapframe *frame, uintptr_t scratch) dtrace_probe(kp->kp_id, 0, 0, 0, 0, 0); cpu->cpu_dtrace_caller = 0; - if (kp->kp_md.emulate) { + if (kp->kp_md.kp_type != KINST_INSTR_COMMON) { kinst_emulate(frame, kp); } else { ks->state = KINST_PROBE_FIRED; @@ -245,50 +272,6 @@ kinst_patch_tracepoint(struct kinst_probe *kp, kinst_patchval_t val) cpu_icache_sync_range(kp->kp_patchpoint, INSN_SIZE); } -static void -kinst_instr_dissect(struct kinst_probe *kp) -{ - struct kinst_probe_md *kpmd; - kinst_patchval_t instr = kp->kp_savedval; - - kpmd = &kp->kp_md; - kpmd->emulate = false; - - if (((instr >> 24) & 0x1f) == 0b10000) - kpmd->emulate = true; /* adr/adrp */ - else if (((instr >> 26) & 0x3f) == 0b000101) - kpmd->emulate = true; /* b */ - else if (((instr >> 24) & 0xff) == 0b01010100) - kpmd->emulate = true; /* b.cond */ - else if (((instr >> 26) & 0x3f) == 0b100101) - kpmd->emulate = true; /* bl */ - else if (((instr >> 25) & 0x3f) == 0b011010) - kpmd->emulate = true; /* cbnz/cbz */ - else if (((instr >> 25) & 0x3f) == 0b011011) - kpmd->emulate = true; /* tbnz/tbz */ - - if (!kpmd->emulate) - kinst_trampoline_populate(kp); -} - -static bool -kinst_instr_ldx(kinst_patchval_t instr) -{ - if (((instr >> 22) & 0xff) == 0b00100001) - return (true); - - return (false); -} - -static bool -kinst_instr_stx(kinst_patchval_t instr) -{ - if (((instr >> 22) & 0xff) == 0b00100000) - return (true); - - return (false); -} - int kinst_make_probe(linker_file_t lf, int symindx, linker_symval_t *symval, void *opaque) @@ -359,6 +342,8 @@ kinst_make_probe(linker_file_t lf, int symindx, linker_symval_t *symval, ldxstx_block = false; for (n = 0; instr < limit; instr++) { + enum kinst_instr type; + off = (int)((uint8_t *)instr - (uint8_t *)symval->value); /* @@ -366,9 +351,10 @@ kinst_make_probe(linker_file_t lf, int symindx, linker_symval_t *symval, * breakpoint is placed in a LDX/STX block, we violate the * operation and the loop might fail. */ - if (kinst_instr_ldx(*instr)) + type = kinst_instr_type(*instr); + if (type == KINST_INSTR_LDX) ldxstx_block = true; - else if (kinst_instr_stx(*instr)) { + else if (type == KINST_INSTR_STX) { ldxstx_block = false; continue; } @@ -376,13 +362,14 @@ kinst_make_probe(linker_file_t lf, int symindx, linker_symval_t *symval, continue; /* - * XXX: Skip ADR and ADRP instructions. The arm64 exception - * handler has a micro-optimization where it doesn't restore - * callee-saved registers when returning from exceptions in - * EL1. This results in a panic when the kinst emulation code - * modifies one of those registers. + * XXX: The arm64 exception handler has a micro-optimization + * where it doesn't restore callee-saved registers when + * returning from exceptions in EL1. As a result, instruction + * emulation doesn't work if a (callee-saved) register is + * modified. Hence, exclude the position-dependent ADR/ADRP and + * LDR instructions. */ - if (((*instr >> 24) & 0x1f) == 0b10000) + if (type == KINST_INSTR_ADR || type == KINST_INSTR_LDR_LITERAL) continue; if (pd->kpd_off != -1 && off != pd->kpd_off) @@ -408,12 +395,14 @@ kinst_make_probe(linker_file_t lf, int symindx, linker_symval_t *symval, kp->kp_patchpoint = instr; kp->kp_savedval = *instr; kp->kp_patchval = KINST_PATCHVAL; + kp->kp_md.kp_type = type; if ((kp->kp_tramp = kinst_trampoline_alloc(M_WAITOK)) == NULL) { KINST_LOG("cannot allocate trampoline for %p", instr); return (ENOMEM); } + if (kp->kp_md.kp_type == KINST_INSTR_COMMON) + kinst_trampoline_populate(kp); - kinst_instr_dissect(kp); kinst_probe_create(kp, lf); } if (ldxstx_block) diff --git a/sys/cddl/dev/kinst/aarch64/kinst_isa.h b/sys/cddl/dev/kinst/aarch64/kinst_isa.h index 7e1fd8d123e9..39cf6d49290a 100644 --- a/sys/cddl/dev/kinst/aarch64/kinst_isa.h +++ b/sys/cddl/dev/kinst/aarch64/kinst_isa.h @@ -19,8 +19,21 @@ typedef uint32_t kinst_patchval_t; +enum kinst_instr { + KINST_INSTR_ADR, /* adr/adrp */ + KINST_INSTR_B, + KINST_INSTR_BCOND, + KINST_INSTR_BL, + KINST_INSTR_CBZ, /* cbz/cbnz */ + KINST_INSTR_TBZ, /* tbnz/tbz */ + KINST_INSTR_LDR_LITERAL, + KINST_INSTR_LDX, + KINST_INSTR_STX, + KINST_INSTR_COMMON, +}; + struct kinst_probe_md { - bool emulate; /* emulate in sw */ + enum kinst_instr kp_type; }; #endif /* _KINST_ISA_H_ */ From nobody Fri May 29 22:08:23 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRyD83PlZz6gB3p for ; Fri, 29 May 2026 22:08: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRyD80LzGz4GVN for ; Fri, 29 May 2026 22:08:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780092504; 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=6XNU9Mjoh3+PV7x3v5+SD6tbUBIYTQJGeUTBp5wbEEE=; b=ndLaUpjeFQBTI+yF/JPS/pK3ugH9wS6Sj98l2fLqmwcF6uB22b+TvlWjrGNM7KV3At1/1E PhGQfBhgssYQ+ChNTsuHigwG2+nLAGCV+Y/Es+ISB4SpDpd1TBAvGFOmgW1qlrga1C1GMg 708bQFzbSYXmdUI86dlQkACI4m61JtShsopNwl6rgr5b+22HK70wbDjUHAW0u3CnGCokYF 5n5a0cRAOsxsFajBiF3QkdBIgw9JPnq2+UIn3uE3DGOOto8FKXxHdQn4ZYXJF9QTxL05KW 7jOW4CrQH75WhZENyJTpIe4mS2lh67bhOdCTZczTTPYxvl+j7IhSu9AAmB8PdQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780092504; a=rsa-sha256; cv=none; b=ins6hpwYxyZU+I/Vqm/65L1gzVVCGSolhCvrRwEym5hFbUw6fhtIGcUce2e5O7iTAf8Eaq eMChRmT7Ab+PJotRq6osk1Lx36TQdIQa4pVWGmjOIh+ejKvVy+9LHl6ClIUWiIyT5lJUQI 6WYqBLt7aKr4Z8ZVnGOb+3ty+88FZsmo1riH6Q1UOGdfw8SFoTyNgFF3pdNN/9tjX8vx9V uvfPhsD204BbAFQfpd75ZyQPwy/nAsKXY5v+h70CWY5LkLOdBTdmn1Qoe31lXBsG0CRQx/ sOJwlcb3mitbuUJQQ3kTxo/CYMM6B7lOJ56ibaA3din7CMZmg/K/u93la9Ox0g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780092504; 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=6XNU9Mjoh3+PV7x3v5+SD6tbUBIYTQJGeUTBp5wbEEE=; b=bUgYkt/U9BGuwEyr0P45fyijHH++/pqM2bdViFdbZR0WrRD+BzlvPKSsSMul+asLt5JiQm AEKEbt+xGtQdQzNoIOXxup+Y6PO7Jv3vTszyqXAROybQMEUJ2rlPPuGyoRkulrr8bIjZRd CG294eSPw2gKOU/VkOSlIbmadQCnlg5ISpcc55XIpRc/bYOmbNbTYikrQckxmZ9MAx66j2 KsOBlbrVVS0hVOJwFqr5ncyzhN0ULZZHaKMHN+5pkdllowwJSHok3ESZKjbrTJIgQG/Lx2 HW2kWPqp15UZFJ5MWKj6gxD299N/t+0JOU6rYmexn0tjnnDWX8MdEDRLgO+vtg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRyD7744Yzs39 for ; Fri, 29 May 2026 22:08:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d028 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 22:08:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Zishun Yi From: Mark Johnston Subject: git: 048458a434a1 - stable/15 - amd64/vmparam: Fix KASAN shadow map size in comment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 048458a434a13e587d873039f931489f9b9e60aa Auto-Submitted: auto-generated Date: Fri, 29 May 2026 22:08:23 +0000 Message-Id: <6a1a0e57.3d028.77a06f05@gitrepo.freebsd.org> The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=048458a434a13e587d873039f931489f9b9e60aa commit 048458a434a13e587d873039f931489f9b9e60aa Author: Zishun Yi AuthorDate: 2026-05-20 14:34:08 +0000 Commit: Mark Johnston CommitDate: 2026-05-29 19:46:48 +0000 amd64/vmparam: Fix KASAN shadow map size in comment The address range 0xfffff78000000000 - 0xfffff7bfffffffff spans exactly 256GB (0x4000000000 bytes), not 512GB. For a 2TB kernel map, based on the KASAN 1:8 shadow map ratio, the required shadow map size is indeed 256GB. The current comment incorrectly states 512GB, which can be misleading and cause confusion. Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D57129 (cherry picked from commit b36fd09a834be586fbc1630294e17554e1f76175) --- sys/amd64/include/vmparam.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/amd64/include/vmparam.h b/sys/amd64/include/vmparam.h index d2ac3c6648b2..763b89da9e12 100644 --- a/sys/amd64/include/vmparam.h +++ b/sys/amd64/include/vmparam.h @@ -171,7 +171,7 @@ * 0xffff808000000000 - 0xffff847fffffffff large map (can be tuned up) * 0xffff848000000000 - 0xfffff77fffffffff unused (large map extends there) * 0xfffff60000000000 - 0xfffff7ffffffffff 2TB KMSAN origin map, optional - * 0xfffff78000000000 - 0xfffff7bfffffffff 512GB KASAN shadow map, optional + * 0xfffff78000000000 - 0xfffff7bfffffffff 256GB KASAN shadow map, optional * 0xfffff80000000000 - 0xfffffbffffffffff 4TB direct map * 0xfffffc0000000000 - 0xfffffdffffffffff 2TB KMSAN shadow map, optional * 0xfffffe0000000000 - 0xffffffffffffffff 2TB kernel map @@ -185,7 +185,7 @@ * 0xff41000000000000 - 0xffff7fffffffffff unused * 0xffff800000000000 - 0xfffff5ffffffffff unused (start of kernel pml4 entry) * 0xfffff60000000000 - 0xfffff7ffffffffff 2TB KMSAN origin map, optional - * 0xfffff78000000000 - 0xfffff7bfffffffff 512GB KASAN shadow map, optional + * 0xfffff78000000000 - 0xfffff7bfffffffff 256GB KASAN shadow map, optional * 0xfffff80000000000 - 0xfffffbffffffffff 4TB unused * 0xfffffc0000000000 - 0xfffffdffffffffff 2TB KMSAN shadow map, optional * 0xfffffe0000000000 - 0xffffffffffffffff 2TB kernel map From nobody Fri May 29 22:08:25 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRyD94cBSz6g9yD for ; Fri, 29 May 2026 22:08:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRyD91Pnfz4GVc for ; Fri, 29 May 2026 22:08:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780092505; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0KPNp5baLsY74A8lnNNI/AUp5mM6JyesRiUT8bPUNuQ=; b=AJKyqgA+1iB4ziWG5qPFv2MWhAe+a3XwBd0EsfHQBkMfUEniyVpgLKVreCPRzar8B4CvL3 oVxv5UF3VuUfBbH1rQMoVF+NHFnIY7zZbf+SZasgW/y2P99ly+bMgaOjwONzWDuLkgVhTF aBqlTcD5P9sFNbL1IuRTE6b2Ov3U+8Ecs9rmGDaUPjJTUVW6cbKRRuscoPM9+1brFuhsP7 ksRYQA9j/HnJywIPpqatsFtCzjdyCPlVTHgsXSzXHuvi2owL2hnPotkKE9obpjcyv+q1n9 Gx0Iyq0kcDq4YywY6sZBPDtFNt9cCSpWCVWamqwjDu0AvFgbuAdsmWj6xyHDuQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780092505; a=rsa-sha256; cv=none; b=SCLuGfyLfZXk49QN2PbqiO+xehI1/nv9le+97ZERTJ/NYNo1+xoZSa8JuYUvHVlSsfPQWr CCTz0K5I3YK+d/j14GWU3JwdMh20dC0NzrLa73DF2Bqg3UZEfG9FHzaZqonssk8owUxW9/ 3yb+QUr9jFBcQRJEZ9SiOjNW30iM7HM6M+1llDGNjzOfKwMho46jWNg663BAFJhc/98Yz1 aF7CwyoO6LOpix33JKRXy8f18h6LHRFKoczKj+h98mYXnHTVtbMyzB/FYzUlMxTdZAMip3 TMBbZA68sW1JfhXlVfu60HLDUMQW33Donre/3T8bxWU4j38VEmfjMBkAdC/axg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780092505; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0KPNp5baLsY74A8lnNNI/AUp5mM6JyesRiUT8bPUNuQ=; b=WzNb60S9BcfcVXOpjJ5ULX6XL3AySMC6SwdC5frbbkd5TWxCWLcLxgAlC9jnilubwhxcsL EJP80NdmjB2/9tb3A7j46Xx7GgOUWK/3B6AxlYScTqQe9SSVZ+CMJ+2tHPb8w5tLdSQUof p+D8RY2pVAJE2IEu7kAUzfJbzri79OQ9KMXsP6QNYWdaFgDTnqk98ed2uZQ5mvBNto1UM4 Os20RgbSWE5cQbcsgvnVyZtthF/uyUPpboRmkRVoi0nOdA799dLdQQPqOu5dcSaPml1Kx7 RSlQOmLFvsv/Q0gla+MsVscAxnJETe7L0oPnyPlKrFWhBatKOlDtxAwu749dZg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRyD90mXHzs7Z for ; Fri, 29 May 2026 22:08:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3ac53 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 22:08:25 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 795416bc233d - stable/15 - tcp: Remove a no-op eventhandler List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 795416bc233d5e0f1259fa3d61a85cbc7ce4d8f4 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 22:08:25 +0000 Message-Id: <6a1a0e59.3ac53.310e5c4e@gitrepo.freebsd.org> The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=795416bc233d5e0f1259fa3d61a85cbc7ce4d8f4 commit 795416bc233d5e0f1259fa3d61a85cbc7ce4d8f4 Author: Mark Johnston AuthorDate: 2026-05-22 14:51:15 +0000 Commit: Mark Johnston CommitDate: 2026-05-29 19:46:48 +0000 tcp: Remove a no-op eventhandler It has done nothing since commit bc7d18ae7224. No functional change intended. Reviewed by: tuexen MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D57101 (cherry picked from commit bc041630fae2ea89bf041bf5d13df220aae4b2bf) --- sys/netinet/tcp_subr.c | 8 -------- sys/netinet/tcp_var.h | 1 - 2 files changed, 9 deletions(-) diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 371158ea4190..d8e58fe3eff1 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -1520,8 +1520,6 @@ tcp_init(void *arg __unused) #endif /* INET6 */ ISN_LOCK_INIT(); - EVENTHANDLER_REGISTER(shutdown_pre_sync, tcp_fini, NULL, - SHUTDOWN_PRI_DEFAULT); EVENTHANDLER_REGISTER(vm_lowmem, tcp_drain, NULL, LOWMEM_PRI_DEFAULT); EVENTHANDLER_REGISTER(mbuf_lowmem, tcp_drain, NULL, LOWMEM_PRI_DEFAULT); @@ -1627,12 +1625,6 @@ tcp_destroy(void *unused __unused) VNET_SYSUNINIT(tcp, SI_SUB_PROTO_DOMAIN, SI_ORDER_FOURTH, tcp_destroy, NULL); #endif -void -tcp_fini(void *xtp) -{ - -} - /* * Fill in the IP and TCP headers for an outgoing packet, given the tcpcb. * tcp_template used to store this data in mbufs, but we now recopy it out diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index cdc1a3deb86a..dd431f2cc99a 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -1400,7 +1400,6 @@ struct tcpcb * void tcp_discardcb(struct tcpcb *); void tcp_twstart(struct tcpcb *); int tcp_ctloutput(struct socket *, struct sockopt *); -void tcp_fini(void *); char *tcp_log_addrs(struct in_conninfo *, struct tcphdr *, const void *, const void *); char *tcp_log_vain(struct in_conninfo *, struct tcphdr *, const void *, From nobody Fri May 29 22:08:26 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRyDC09WHz6gB3s for ; Fri, 29 May 2026 22:08: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRyDB1mwyz4GbZ for ; Fri, 29 May 2026 22:08:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780092506; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0WZSuTQHXf0RIdNXA/w8tXjP040rYkDxqDS7ZP9ok4g=; b=XixOfiUe7VlpDwLDNCah9szAoaCY1W4TU2PTNvuEKyIUIWb9WgTRdtjc/DN+eaab/WzQdo o8D/WRQmpTmlMMHK+P2fPgwU5+MfZxgGnXmNotZ0xIUUUxGJFBwQ9aJIM7geXkauVvz+wC k9qnoBCGpAUaiW4AgkZCQrpYp2CLFufKiiZPENiu80CMEbzidDL74I3cqc7p6tJDXUS5A8 TB6vKSGGIBgyJiii/zmbcNbSa1GK7MFU3Dbn/ryxYRBnx5uprNqpvt0ohug9EyUyfbGxMh NmAOh2Ns7rfszOv46RyEdYqeW8A6d7qnUe96nnr9IeOM11faPeMr3fEsNr9CmQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780092506; a=rsa-sha256; cv=none; b=C6f/iSXUH0BCTAtRbZvhm+t7Ht+KT2nPB4xjTg8UsQrHDxEsU2Ci1Qi0Kc1/74qmWXdv1/ K2Po+PA0VKFWpI6FAiDD2JDlV4LB4idTIOotDzDyxEWcxi3rNgcbCOj/B9lz5oZv0BeIJo NcY2G+xGVvOF5N3XRt+rPfBhpO5HZrZEQfVYHvUEcimNQXrLUNtfReLf5M0H/zgyX7mWzG J1yV0J+kfEbEIjVhbXwjRUEcTedJYe5ZcDK2+ESxMWAQ/nsKFYcgwddfGntHQbVzNvpDh3 rpEf4rpB7PTQxXC55ZnUKZ11SYdgQABgG2tpo18Z06wOoz9ianZuUZxS8gkfTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780092506; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0WZSuTQHXf0RIdNXA/w8tXjP040rYkDxqDS7ZP9ok4g=; b=cPeZwVdbl9gCyagFMRmQUOLGvveeJIAAOxCSCJaIj77ZgrvDCTNGWtpqNLctBwxUtxl7Wu m+w+GGsZID1LPtRaTCD2ddPjUNF56QGIOalaFsG8up5BaTywT2zL3rofClFPzqmbp2QZSH ne5DLW/mrDrNKrPqFb4Gi/xqD4lI28D1P7OqB6LNTXCpwn4bEEuelTNCACdq7NSoO4QGnO 3j+lLKGRJWlm2e+B6VfndyPavBfQbmsrYveMM5u3bmiPUxfSr7QCE3WR765lJ9VOEIvqBh xlmh+tKmcNe7++UMq2/Fvu3eMam/8KXWvS8PJyPaHHgMv97yVeUciO1WoIaySA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRyDB1N0Xzrhf for ; Fri, 29 May 2026 22:08:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3b6ce by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 22:08:26 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 7f8d45bb5f66 - stable/15 - linux: Fix some problems with header pollution List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 7f8d45bb5f665320d55d99f27c810d78c5b0b1a6 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 22:08:26 +0000 Message-Id: <6a1a0e5a.3b6ce.20f782cd@gitrepo.freebsd.org> The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=7f8d45bb5f665320d55d99f27c810d78c5b0b1a6 commit 7f8d45bb5f665320d55d99f27c810d78c5b0b1a6 Author: Mark Johnston AuthorDate: 2026-05-15 00:39:25 +0000 Commit: Mark Johnston CommitDate: 2026-05-29 19:46:48 +0000 linux: Fix some problems with header pollution - Avoid including sys/proc.h in linux_vdso_gtod.c. It's not needed, but the implicit inclusion of sys/param.h via sys/ucred.h->bsm/audit.h was bringing in some required definitions. - Include a couple of required headers: sys/time.h (for struct bintime), and limits.h (for INT_MAX). - Move some helpers from linux.h, which depend on sys/param.h for NODEV, to the one CU where they're actually used. No functional change intended. Reviewed by: imp, kib, emaste MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D56982 (cherry picked from commit b99954433d42d978b257e846dbfe568e9af7b140) --- sys/amd64/linux/linux_vdso_gtod.c | 4 ++- sys/amd64/linux32/linux32_vdso_gtod.c | 4 ++- sys/arm64/linux/linux_vdso_gtod.c | 4 ++- sys/compat/linux/linux.h | 50 ----------------------------------- sys/compat/linux/linux_stats.c | 46 ++++++++++++++++++++++++++++++++ sys/i386/linux/linux_vdso_gtod.c | 4 ++- 6 files changed, 58 insertions(+), 54 deletions(-) diff --git a/sys/amd64/linux/linux_vdso_gtod.c b/sys/amd64/linux/linux_vdso_gtod.c index abe42d51a3ac..12c5c96dcead 100644 --- a/sys/amd64/linux/linux_vdso_gtod.c +++ b/sys/amd64/linux/linux_vdso_gtod.c @@ -27,12 +27,14 @@ #include #include -#include #include #include +#include #define _KERNEL #include #undef _KERNEL + +#include #include #include diff --git a/sys/amd64/linux32/linux32_vdso_gtod.c b/sys/amd64/linux32/linux32_vdso_gtod.c index f32db30057d0..ff4b372ea3bc 100644 --- a/sys/amd64/linux32/linux32_vdso_gtod.c +++ b/sys/amd64/linux32/linux32_vdso_gtod.c @@ -27,12 +27,14 @@ #include #include -#include #include #include +#include #define _KERNEL #include #undef _KERNEL + +#include #include #include diff --git a/sys/arm64/linux/linux_vdso_gtod.c b/sys/arm64/linux/linux_vdso_gtod.c index 203c76b6e3a9..55f039b74593 100644 --- a/sys/arm64/linux/linux_vdso_gtod.c +++ b/sys/arm64/linux/linux_vdso_gtod.c @@ -28,12 +28,14 @@ #include #include -#include #include #include +#include #define _KERNEL #include #undef _KERNEL + +#include #include #include diff --git a/sys/compat/linux/linux.h b/sys/compat/linux/linux.h index 6d276b8a69f4..90a71144c7c7 100644 --- a/sys/compat/linux/linux.h +++ b/sys/compat/linux/linux.h @@ -28,58 +28,8 @@ #ifndef _LINUX_MI_H_ #define _LINUX_MI_H_ -/* - * Machine independent set of types for the Linux types. - */ typedef uint32_t l_dev_t; -/* - * Linux dev_t conversion routines. - * - * As of version 2.6.0 of the Linux kernel, dev_t is a 32-bit quantity - * with 12 bits set asaid for the major number and 20 for the minor number. - * The in-kernel dev_t encoded as MMMmmmmm, where M is a hex digit of the - * major number and m is a hex digit of the minor number. - * The user-space dev_t encoded as mmmM MMmm, where M and m is the major - * and minor numbers accordingly. This is downward compatible with legacy - * systems where dev_t is 16 bits wide, encoded as MMmm. - * In glibc dev_t is a 64-bit quantity, with 32-bit major and minor numbers, - * encoded as MMMM Mmmm mmmM MMmm. This is downward compatible with the Linux - * kernel and with legacy systems where dev_t is 16 bits wide. - * - * In the FreeBSD dev_t is a 64-bit quantity. The major and minor numbers - * are encoded as MMMmmmMm, therefore conversion of the device numbers between - * Linux user-space and FreeBSD kernel required. - */ -static __inline l_dev_t -linux_encode_dev(int _major, int _minor) -{ - - return ((_minor & 0xff) | ((_major & 0xfff) << 8) | - (((_minor & ~0xff) << 12) & 0xfff00000)); -} - -static __inline l_dev_t -linux_new_encode_dev(dev_t _dev) -{ - - return (_dev == NODEV ? 0 : linux_encode_dev(major(_dev), minor(_dev))); -} - -static __inline int -linux_encode_major(dev_t _dev) -{ - - return (_dev == NODEV ? 0 : major(_dev) & 0xfff); -} - -static __inline int -linux_encode_minor(dev_t _dev) -{ - - return (_dev == NODEV ? 0 : minor(_dev) & 0xfffff); -} - static __inline int linux_decode_major(l_dev_t _dev) { diff --git a/sys/compat/linux/linux_stats.c b/sys/compat/linux/linux_stats.c index 6f96a219003b..5ac9394f3601 100644 --- a/sys/compat/linux/linux_stats.c +++ b/sys/compat/linux/linux_stats.c @@ -58,6 +58,52 @@ #include #include +/* + * Linux dev_t conversion routines. + * + * As of version 2.6.0 of the Linux kernel, dev_t is a 32-bit quantity + * with 12 bits set asaid for the major number and 20 for the minor number. + * The in-kernel dev_t encoded as MMMmmmmm, where M is a hex digit of the + * major number and m is a hex digit of the minor number. + * The user-space dev_t encoded as mmmM MMmm, where M and m is the major + * and minor numbers accordingly. This is downward compatible with legacy + * systems where dev_t is 16 bits wide, encoded as MMmm. + * In glibc dev_t is a 64-bit quantity, with 32-bit major and minor numbers, + * encoded as MMMM Mmmm mmmM MMmm. This is downward compatible with the Linux + * kernel and with legacy systems where dev_t is 16 bits wide. + * + * In the FreeBSD dev_t is a 64-bit quantity. The major and minor numbers + * are encoded as MMMmmmMm, therefore conversion of the device numbers between + * Linux user-space and FreeBSD kernel required. + */ +static l_dev_t +linux_encode_dev(int _major, int _minor) +{ + + return ((_minor & 0xff) | ((_major & 0xfff) << 8) | + (((_minor & ~0xff) << 12) & 0xfff00000)); +} + +static l_dev_t +linux_new_encode_dev(dev_t _dev) +{ + + return (_dev == NODEV ? 0 : linux_encode_dev(major(_dev), minor(_dev))); +} + +static int +linux_encode_major(dev_t _dev) +{ + + return (_dev == NODEV ? 0 : major(_dev) & 0xfff); +} + +static int +linux_encode_minor(dev_t _dev) +{ + + return (_dev == NODEV ? 0 : minor(_dev) & 0xfffff); +} static int linux_kern_fstat(struct thread *td, int fd, struct stat *sbp) diff --git a/sys/i386/linux/linux_vdso_gtod.c b/sys/i386/linux/linux_vdso_gtod.c index 00367d82139e..336f8d4c290d 100644 --- a/sys/i386/linux/linux_vdso_gtod.c +++ b/sys/i386/linux/linux_vdso_gtod.c @@ -27,12 +27,14 @@ #include #include -#include #include #include +#include #define _KERNEL #include #undef _KERNEL + +#include #include #include From nobody Fri May 29 22:18:55 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRySN41QVz6gBkJ for ; Fri, 29 May 2026 22:19: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRySN2BTHz4JV0 for ; Fri, 29 May 2026 22:19:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780093140; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iuUQllQ5VuvlW8KtWK+RmjUoh7E4eQdLaoovIOXJVYc=; b=rRlE1Ws4jQpQB5TRMJiRVP6YZsZbyEPf6cXCqRM8cK00S4etQ/GNNZA8KOgw9Q0wAteshl 6uhGCAq8Z5WX+effE3LD4TCEtMt+hBBFCh2Y2JdIACp6566NJEnEyWLYFJLvf6BvtpImHP I3vmGMvW8hneD6Xy/jC5cZnwbiNzqUnh+7ErUeqCGlio4QIcq92d8XIttWwgA+uFxzsjQf d4jFU5ELWBuc3o0qiLT5kMqMjW1MYSFz19Gw9LfLkpbpo2uoauuqDN1fdDCJR6JA/nG2Yw DxtKK1W/NghtgaijyIJn0kAE+DgrakyZfQ98gGXCV1zFrLcO4y9wMNkvpURyTQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780093140; a=rsa-sha256; cv=none; b=uafKtAzeG4k0FNmHeMLA7Xh1w89gNfYKbziNvdfW8VQpiiSQECQwt9G9jghEYPHWjCN5Xs l5bkudB2KByXA1qOvjXeQMhKXoI3Duej3pqXqcdYoaV9ePdorBBqz4xkwtRvhFFwDGb1Vm JsG8bKCRFB7NCxkPGrCnYwk7+t8bTJJkri9w7TkrarLUfwE78rkXz4y5eKViirxhgptzVk uaqGSIoI6wDkNg/fXMyc71pbR8iAvcdRPlxLgbEd8cO0rFVOTNgP1+ed5+ZLEPDcAIxLYn MMNEX5Nuwkz1ewPf5eUT+tZ8HabgXae86mLzQrbb3OHl8sJBZW/uwE77xcBTUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780093140; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iuUQllQ5VuvlW8KtWK+RmjUoh7E4eQdLaoovIOXJVYc=; b=tDXcgqQ1VUscgYt5D04hgD/Om2gTI3IgXUnQ7wAOfGZejgSTMYaFy5NbWWfIODXfxx+dw6 gmUdc/ZeSD98cE1uerMobHgTyS3J51DMFip5ZYU1/HEfnxxCN/hR6uISx0lP49126zwa4d u5ItpQgCIPyhqI2NMA9UgrvmZ756jsXbJsYZxaKVCaGGzUXLmAVpDe0n9pZHpFkizmS7Kq tDRp+G7CSFYlrcWWyuhNbip5vXNLD/Sz36En78rWllZ9l8uohFzjud7yCSx4BoCLRd3/XA 43ZbP/1xu7EFT7erR9jtB5fQmSC+CzcfQ5nrI7hhmjdwLBZweSWOPwFT9LnXVw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRySN1V0MzsSH for ; Fri, 29 May 2026 22:19:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3b5de by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 22:18:55 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 32a7ba251acb - main - route: Fix `flush` w/o specified address family List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 32a7ba251acbfb442665eed40fb4f48c8f2bd710 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 22:18:55 +0000 Message-Id: <6a1a10cf.3b5de.2223573f@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=32a7ba251acbfb442665eed40fb4f48c8f2bd710 commit 32a7ba251acbfb442665eed40fb4f48c8f2bd710 Author: Ed Maste AuthorDate: 2026-05-29 16:44:09 +0000 Commit: Ed Maste CommitDate: 2026-05-29 22:18:20 +0000 route: Fix `flush` w/o specified address family PR: 291867 Reported by: gavin Reviewed by: pouria, melifaro Sponsored by: The FreeBSD Foundation Fixes: c597432e2297 ("route(8): convert to netlink") Differential Revision: https://reviews.freebsd.org/D57336 --- sbin/route/route_netlink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sbin/route/route_netlink.c b/sbin/route/route_netlink.c index 051662688047..0d4420767082 100644 --- a/sbin/route/route_netlink.c +++ b/sbin/route/route_netlink.c @@ -950,7 +950,8 @@ flushroutes_fib_nl(int fib, int af) struct snl_msg_info attrs = {}; print_nlmsg(&h, hdr, &attrs); } - if (r.rta_table != (uint32_t)fib || r.rtm_family != af) + if (r.rta_table != (uint32_t)fib || + (af != AF_UNSPEC && r.rtm_family != af)) continue; if ((r.rta_rtflags & RTF_GATEWAY) == 0) continue; From nobody Fri May 29 22:25:50 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRycN0tF8z6gC0b for ; Fri, 29 May 2026 22:25:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRycM65Tfz4Lcc for ; Fri, 29 May 2026 22:25:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780093555; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WZI9nbniJdrZa4+C4WmpiVC/A4oYCjSwW+p7PaGhsPE=; b=fee46WAuhVz+thWWHMf6B6oaRTMrxUFL28rcDp1xlZzzwWynPSvy3JwugLBTebA4NIcVZy iq6D1GIOEEawCHm6q8HiWcRMNXGEKuVFKa1lEnTHNiV1TARAfkAcSC13GmUeHgCk/8tC5I LAR2sNtMFgPqWbcUq63gnDvy2rKAaLhy0eFqeHQw7G+wdr9hOJhQkgRzwBjgM0W799YyrD RE8oZEW8X5Ul6w7I/VFvz1nYCMsaB6yIGGdbR6tp9Jip2WIBu8ku1lnAwIbaBp2BA19z9O /GX3zHUFj4VJFefcXFYBe3CLhMDQvWNCe6xcR4+wr7/heV+V+vhuiVdfGscF+A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780093555; a=rsa-sha256; cv=none; b=vAbK52XchIhz2SjT1TkBUBhm/KRDVFadAjUjLf8If8Y2BTAYqvuqv4Bc82VKAVp8K55Z6X fbCbNL7oIYNKgFZfzkEMBtBXYQA+1VRLrpxonZBP8/48XGOtK/WoIBW1EAurmts7EdMLbM dD/SK/audsbQ41TasMlMssgcPKnVeYBLrJ1DjqIUkIJAXqup1pWA6Ox7OEugCj+Y6QIeNM cTb24gKC5lZB1lWBf6DgOIrD5Vbm07ZZpZi+GNTqE47V0IZ0Axwa24wNn95QTrb7dc5Po4 AqWNJy/vunQrIeNP9zKff6X9xnS7Bl/y5ZqkWfFCdzriox5vheSPsm/BmtnemQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780093555; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WZI9nbniJdrZa4+C4WmpiVC/A4oYCjSwW+p7PaGhsPE=; b=vrvVb5rT87TX97GnKSEZDNcOEnbSiO/dTJqLtQiOlKW2KviMVCTG41wS/bDpI0PayCEW2+ Bb2CW7sh2K4oDibmkk6n0IUzWQSC9q8GXHp1pT16/UKI5A1BC6jnNsoypKFYcg+eZMFRjs Af0K0G+IA+vcYQr7RKec4w/IVWjBjFaXhyk6ZjfGotrQgddLodAdDitM8OVVWsnBDW4zFK +MIRw/mphMKlpOGHz3wo6zfQ7kpKLz4aF3Vhzz6FpJ/FvE3EVoQrZfSd74iL0oqX6Iq2fa EHM79oSqInxDRHfd/CZuD4I/FRvl37WMvtVnGhlgx/IwyrM9G3Fro4lMRQ8sxg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRycM5HcqzsDY for ; Fri, 29 May 2026 22:25:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3f100 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 22:25:50 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 692b0ef1506b - main - syscalls.master: Allow clock_nanosleep in capability mode List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 692b0ef1506ba51b72d0a2707cbf8879a6e01d78 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 22:25:50 +0000 Message-Id: <6a1a126e.3f100.48138132@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=692b0ef1506ba51b72d0a2707cbf8879a6e01d78 commit 692b0ef1506ba51b72d0a2707cbf8879a6e01d78 Author: Ed Maste AuthorDate: 2026-05-29 20:26:06 +0000 Commit: Ed Maste CommitDate: 2026-05-29 22:25:42 +0000 syscalls.master: Allow clock_nanosleep in capability mode It is akin to nanosleep(2) and does not access global namespaces. It should be permitted in capability mode. Reviewed by: vangyzen Fixes: 3f8455b0905a ("Add clock_nanosleep()") Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57343 --- sys/kern/syscalls.master | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index b3e1d4be9fee..1032f6cd1bf0 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -1430,7 +1430,7 @@ _Out_ _Contains_timet_ struct ffclock_estimate *cest ); } -244 AUE_NULL STD { +244 AUE_NULL STD|CAPENABLED { int clock_nanosleep( clockid_t clock_id, int flags, From nobody Fri May 29 22:57:12 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRzJT3rHnz6gDZH for ; Fri, 29 May 2026 22:57:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRzJS5tmNz4NCD for ; Fri, 29 May 2026 22:57:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095432; 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=ZPmwa1lJWmoiEzslgFO+WpHzls7xRZQRh8QqukZwOJY=; b=i8VPmeryC71gOq+Sm6XsTvrn9NUDO+iK3WBKzcOOMzuuW5cnnxz4v0yVpKqKwrcCcq8kWh mDo9VLmYAwWgE+LRAfGqXl3xUj29OG+hECpt2QsD0qbCpPgZjbGnvwQ9qyv2fzZ0n5N1+s hOHUnOQFHkp1x2iEv9C+wTZgVp8fI1SSM+zWN408bXZyrtbDvuyeLWuMpD2B0fqc000xqo X3OtzsLrqNXLUVkX3S9SHUTONhHYLQNeg2Exl3Fpe+CfDfrG5jD5RkImDxUwg2/qVmiPpM fjp/NMDWQmDk6/m5d587qgvVpelqFo2aU/bo4H9eLxBlVdHTPnL/GVN++dCFjQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780095432; a=rsa-sha256; cv=none; b=mV2d2I/uuWh3I+DfLq7YsrPCDJMMiZ3bylkoC8/eUMI8zTWxG1mcnPNe6aavKPNA/orSTJ QkYpPm03BdYElqbH08wEWFwg89t7aRTTYakqC0BXIlAC1dgEEDi5NC8P0z4eD6q9yN/ss4 QHI70ErBr/hCdPT87SrXfE9yhZDETs9o/eHWG0eGPmr2g8Wq4hnKQaV0gY2h8V9i0o8fXS vI7OnufH8BKkU2wdWn4Hoz6YlwQmOUr9Kgjd0Fz/o2V05AcLj1HKsOE9EO6z7gyPVP5EQv 0e6K9OSTt10fiXwsdwA+viOBZ6BUnSfhbnXR0n16C6J6Z6J8/jDq6cGC1DCvfA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095432; 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=ZPmwa1lJWmoiEzslgFO+WpHzls7xRZQRh8QqukZwOJY=; b=rUESHfyRkGFCZaRi7aTwflU8yjWGF8v2ZmF4cNazBnIwrGgv/h3O4azQmcvirLEuj/w3tb v46uiSj76oOJlKP3Ch9p/PE2PnWpe9cXCkzgY/s1gVm0kta+f3BdjUD2mfPYnb/TS94dbR LFvBFVS0PtPZqpauTgV5RGxTJq75viFC8g4+yV7bAoyN6LXeI0FbvCRF0Aj36mcNUhDWus BuoLemAl++14HRMjrqVS6NxIyrYOevpF1HJbExbmwqC5UPwhl8nXPANHTWhJl45TxxBUWx 7TZHVdf84N+CtujAN8Mqkzh7YEsQyQ8IqUDDk2VBZiiZtiN5ldDEgP+ReMZqnw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRzJS4wpLzt0c for ; Fri, 29 May 2026 22:57:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 403d8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 22:57:12 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Lexi Winter From: Dimitry Andric Subject: git: 8e1a9532ce19 - stable/14 - boot1.chrp: Improve comment for the SLOF hack List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 8e1a9532ce19e14a63e15242e8558ee6d0458278 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 22:57:12 +0000 Message-Id: <6a1a19c8.403d8.1658c56c@gitrepo.freebsd.org> The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=8e1a9532ce19e14a63e15242e8558ee6d0458278 commit 8e1a9532ce19e14a63e15242e8558ee6d0458278 Author: Lexi Winter AuthorDate: 2026-04-17 16:56:33 +0000 Commit: Dimitry Andric CommitDate: 2026-05-29 22:56:56 +0000 boot1.chrp: Improve comment for the SLOF hack Since this original comment was written, the actual issue in SLOF was diagnosed and documented in commit 424089a0fc, which fixed it for loader(8). Update the comment in boot1 to be more informative to future readers. MFC after: 3 days Reviewed by: jhibbits, adrian Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D56470 (cherry picked from commit eb0279550d52962241b4178101cd7f7d732eb682) (cherry picked from commit 66f55b90b6bcbbf3c26b2da7f56d17052e39018f) --- stand/powerpc/boot1.chrp/boot1.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/stand/powerpc/boot1.chrp/boot1.c b/stand/powerpc/boot1.chrp/boot1.c index cdacb05c31ce..43a28f4f3116 100644 --- a/stand/powerpc/boot1.chrp/boot1.c +++ b/stand/powerpc/boot1.chrp/boot1.c @@ -100,14 +100,11 @@ ofwh_t bootdevh; ofwh_t stdinh, stdouth; /* - * Note about the entry point: + * Our entrypoint. * - * For some odd reason, the first page of the load appears to have trouble - * when entering in LE. The first five instructions decode weirdly. - * I suspect it is some cache weirdness between the ELF headers and .text. - * - * Ensure we have a gap between the start of .text and the entry as a - * workaround. + * A bug in the SLOF shipped with some versions of QEMU causes the first + * 32 bytes of .text to be wrongly byte-swapped when loading LE programs. + * As a workaround, we add some padding at the start of the text section. */ __asm(" \n\ .data \n\ @@ -116,7 +113,7 @@ stack: \n\ .space 16384 \n\ \n\ .text \n\ - /* SLOF cache hack */ \n\ + /* SLOF workaround */ \n\ .space 4096 \n\ .globl _start \n\ _start: \n\ From nobody Fri May 29 22:57:13 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRzJV1Kwqz6gDNn for ; Fri, 29 May 2026 22:57: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRzJT6F31z4Myd for ; Fri, 29 May 2026 22:57:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095433; 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=f/Xvj07fgyTQdjZA0Hfcu09cath13OGmL8t7mbK/e6I=; b=HOP+Rbd5w4W7bhub5Ouqt1dYie6psMl9fCL36KggKlO++9A9RZuxLFMOFp8aRQKI+prZTz de5bdvuPrQsrii3AvuiKf6AiQ+3OEZCkvkBT2uJz6bHrB/3WIZ8T5kFA5BSArMz8mkZEgt YoKtWakqViL05N2ZGPoxmWsdqQVXl00LK9HWDt1URmGoMsppzebvsVJH9vZqH16IwgM37m Bvow6PPheTfbYsoakCXXxm26Dt3FiuZ+0k8NDo8CqTD5gjEgEfat400MZ7zEREWxelKUZ/ CihYQGMZy6skJwVZ9PRi9r6M/ZbQ0mwJh+e2/2TBVDS5Vu353hVWsY04tldTfQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780095433; a=rsa-sha256; cv=none; b=ulhg+t+kQmEaQ6G83vp3Oh6TV5R/eQRjNANi8LaV1b55tB+K/gZy5Oh2Nc7Ju2IoFP9Yun nDppcqqP+jUfgY7w0EK62Opa96BLGyHG4+eUwqA4m+7UVVfktPw0fQ6j4Tx0xrCzi5qxG2 6nLTO7f3a9shzUKSPtlEoI7pkb69fxaZmHYJ4f4u+G8swCSvrzBS8in6hEA9EzopTXfK5G 0fSKpbcxYWkkixCLK/Y8z74iMy+1SHTrD3+YhhZQm6nSnjKDmkT+RokMQkQJaqPO6/RUNB DxJoXSWbhkgua3OoxcWCljlDpJyMTWhYiS/kkIczgwTaY65OL4zBp0+mSgdeYA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095433; 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=f/Xvj07fgyTQdjZA0Hfcu09cath13OGmL8t7mbK/e6I=; b=bPpZP7hsLv/bYDi4Cce2/IW29ZJ3MRLBNNw06d56bMOCd0MMfhcHg1x+u0VNASltHxjrbw h/2lZmb2TOqvIi55viztvqEd4i6fcrm8X6/8OEpe3sSYG4rULvoNqfI36kqt9mVV44ZUTs 0O2gvFJI+qS/jBO9f149OAzS55ZBBeLlYLy72LwJmY8b1zaH46Y/OAd2yB9SiCBUgyFVgn 8cEBJImx3G0WVXWYEajXcyDXzl01hW03ltSZNEvR1WFsv+6x+C8iB34Kr5/4tnvni/MmYb Sj4ztDPqVoKC3bFXMN6fLusaztd9fJjO2m4c7Q0WXZfvOEGiY7V4E4eeU4qVkg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRzJT5cJpztTp for ; Fri, 29 May 2026 22:57:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 41be4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 22:57:13 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Lexi Winter From: Dimitry Andric Subject: git: f39ba250d67a - stable/14 - boot1.chrp: Specify --image-base List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: f39ba250d67ad50aa1dcd28ac5f275b668461b29 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 22:57:13 +0000 Message-Id: <6a1a19c9.41be4.26b3de8e@gitrepo.freebsd.org> The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=f39ba250d67ad50aa1dcd28ac5f275b668461b29 commit f39ba250d67ad50aa1dcd28ac5f275b668461b29 Author: Lexi Winter AuthorDate: 2026-04-18 20:07:40 +0000 Commit: Dimitry Andric CommitDate: 2026-05-29 22:56:56 +0000 boot1.chrp: Specify --image-base This is required for LLVM 22's ld.lld to avoid a build error: ld.lld: error: section '.text' address (0x38000) is smaller than image base (0x10000000); specify --image-base ld.lld: error: section '.rodata' address (0x3b308) is smaller than image base (0x10000000); specify --image-base ld.lld: error: section '.data' address (0x3b610) is smaller than image base (0x10000000); specify --image-base ld.lld: error: section '.bss' address (0x3f618) is smaller than image base (0x10000000); specify --image-base Use 0x38000 for the image base, which is the address of the lowest (and only) LOAD segment in the file. Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D56459 (cherry picked from commit aa0bc7cca153f67f8becec8a8fb259ff5fd30fd0) (cherry picked from commit ee58056e1e42de9230a159412827da97ae7f03bc) --- stand/powerpc/boot1.chrp/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stand/powerpc/boot1.chrp/Makefile b/stand/powerpc/boot1.chrp/Makefile index 94c150e22ead..49838a684904 100644 --- a/stand/powerpc/boot1.chrp/Makefile +++ b/stand/powerpc/boot1.chrp/Makefile @@ -22,7 +22,7 @@ CFLAGS+=-I${LDRSRC} # boot1.elf defined in the HFS template, but sometimes boot1.elf is written # directly to the PReP partition. # -LDFLAGS=-nostdlib -static -Wl,-N -Wl,-Ttext=0x38000 +LDFLAGS=-nostdlib -static -Wl,-N -Wl,-Ttext=0x38000 -Wl,--image-base=0x38000 .PATH: ${SYSDIR}/libkern ${SRCTOP}/lib/libc/powerpc/gen ${.CURDIR} From nobody Fri May 29 22:57:11 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRzJf3hhkz6gDNp for ; Fri, 29 May 2026 22:57: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRzJf0HBjz4NDj for ; Fri, 29 May 2026 22:57:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095442; 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=uE8KCCb/kWSVaqcrlGKBR/NWfHXZMmm+sMU/9zu6MXs=; b=MAFXMqImJxue9WdeJvKTI4KwTzgpEh4j/Nb3wJ5c97yw4hJ6VDKQe8nbbYsbySVPjFf6Aj xb/iG3EbHEda6+qaeplqxjRNfL7iskNPOvXivyFC4/rdXPD3EfBpMO7aOAn4TVtQcZjp+P ETcUk2TAQG23Ldv3vho0LSFwOeWrPvD37PovsBZswsN8aGI/9X3wnhw3CLQZKAB2NO+w73 h2+YHMJjPmQiYqKjk+2T5MoKMLFvi9EJs145fBGxcdd58WBQimp1tc4YKTyi+qoFg31bV+ Y89Oq5A7AmbzRwg1oJyFx0ZDtK4g2ZU5gbxto1SMqpmfVIIINwFOkmTd0/fH5g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780095442; a=rsa-sha256; cv=none; b=i32ZjI0svUXZ96kXv4VJy89hTU1KckncZb7mE0PefvzFV0VEo+i9tGy+961BO5WUIoMYQH Aewv5lSq/dx0AL5lanOT+SuzUpeRwhSRKAYutEzAQEp4B77sKAKAoW4Y8o9WRBte3bnnLn GPhhGEPJW6Rn5a/H3IhKgHQ9aljxVU06mFxcJGxWYckOx+NOxE4meBRhxYZiaMaynXnRMN X4zDL4q2BxmIjJmoWi3afWhqFgzYeQgC+ovoptjTOSe4+sw3G6R3YFQ6vIosssmGFvofUV kQhCMuUzdQc3ZOPZu8XDW67I7CxzfG1pk0nxfzdwrZccJdxq+wO/7SrB3lWCCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095442; 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=uE8KCCb/kWSVaqcrlGKBR/NWfHXZMmm+sMU/9zu6MXs=; b=M1gfmYh6HIG5aE/4FxbzbT5a4tzLhwqoXTBASNXaoOj1V5s+MgEY9ePBC4ZNt9EPxCx8kY mGDDsYoM88TYFrAINvg8lJaRGlYpm+VmNF1Vl2HieHscGz2iDT+iQ0cl22hnoQ1fMyu6P9 mdo/7lQ8P1R/7l8fYVxs0UVc2jUD3qtMzYYBQVf+U2b4yLo90Th9C+q/V4f6/Kfe+eUpJC Qpz8hVtafZ6f269p935BTWGpgmE4GU5NjiDIE7y/vLHhDg2JiwiyDiCEC0sDMD5q4oefFz h55YGpNL3IsdS4rzNEjhugtoQhnH+F7cchFtDAYecuWAxUJpWW01kEv48QGB+A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRzJX6RVbztQl for ; Fri, 29 May 2026 22:57:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 41874 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 22:57:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Warner Losh From: Dimitry Andric Subject: git: 5d2b9a17b9c6 - stable/14 - loader: Fix powerpc64le by working around slof bug in qemu/slof List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 5d2b9a17b9c6885179f7b32c2e82e182268f9517 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 22:57:11 +0000 Message-Id: <6a1a19c7.41874.5f5d40ca@gitrepo.freebsd.org> The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=5d2b9a17b9c6885179f7b32c2e82e182268f9517 commit 5d2b9a17b9c6885179f7b32c2e82e182268f9517 Author: Warner Losh AuthorDate: 2025-12-28 05:27:03 +0000 Commit: Dimitry Andric CommitDate: 2026-05-29 22:56:56 +0000 loader: Fix powerpc64le by working around slof bug in qemu/slof Fix powerpc 64 little endian booting by adding some padding. Due to https://gitlab.com/slof/slof/-/blob/master/lib/libelf/elf32.c?ref_type=heads#L114 https://gitlab.com/slof/slof/-/blob/master/lib/libelf/elf32.c?ref_type=heads#L150 using <= instead of <, slof used to loop over the phdrs. It overruns by 1 and so on little endian it swizzles the first 32 bytes of .text. Work around this by adding 32 bytes of padding after the headers. We should fix this in slof, but it's in the just released QEMU 10.2, so we have to pad things here for now. Now powerpc64le + qemu works. MFC After: 3 days (maybe EN too) Reviewed by: adrian, jhibbits Sponsored by: Netflix (cherry picked from commit 424089a0fc82ee9db8659b8c1099bbbde8999473) (cherry picked from commit 0b2011f50cd31ce384445ed04a554c0cf5e5300f) --- stand/powerpc/ofw/ppc-common.ldscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stand/powerpc/ofw/ppc-common.ldscript b/stand/powerpc/ofw/ppc-common.ldscript index e12dee74824a..edd37eba8fca 100644 --- a/stand/powerpc/ofw/ppc-common.ldscript +++ b/stand/powerpc/ofw/ppc-common.ldscript @@ -9,7 +9,7 @@ PHDRS SECTIONS { /* Read-only sections, merged into text segment: */ - . = 0x02c00000 + SIZEOF_HEADERS; + . = 0x02c00000 + SIZEOF_HEADERS + 32; .interp : { *(.interp) } :text .hash : { *(.hash) } .dynsym : { *(.dynsym) } From nobody Fri May 29 23:00:57 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRzNn6DHwz6gDhN for ; Fri, 29 May 2026 23:00: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRzNn5TSxz4PQk for ; Fri, 29 May 2026 23:00:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095657; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GX2v8avU3IJ2G1GnwP96OLP7PyA5RAfEjhyHPWJ7Na8=; b=lJ/+fnExHo0FeKNMZVvnuW8iG4X8TnqZJUv+JuJ55NRVMtYLNf6gNF3qjPCYqMB5Zh2JqI pDek7cU/h1XrjEunk7ntlwCfVLQtikFlV2pe+SF2dDk6l+SKKSYtI31s/FghfWv9u5m37S 4gHM1Mf3Q6MyHvtjUwjR+cvDBQOokCTXLHZgyWm+SUyDcRXjtvepmbvlPcEexlzWvdCTLw dF72qij2JhSkaFv+/dXE0Uqgu+aWp9MZyyhz+4P/QWhX+tAzTAc9VICqQFjNR74Qw8q3F9 /FifB77hv6ErDwxfLLKjIE5avWnQCyfP+k2q2jknkawA/MAfk4z5bCGlGN5YCg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780095657; a=rsa-sha256; cv=none; b=hWu7AUzH4OtzqmmTagzA0nGQtXsEhmALBs2QDzEvCMLpKtTECu4Z8hdoe6vLQFKuGspOom nmcZlLu4G1o5T+ZkXHYQtaMDLjn3s2RAiD0lGbvzCbfNF4ZHtTed77wWGE9YMRi0jCqasY ZKZdPFRx76JRbeIDBdtqt9WjGpB2jYND6l9QAHeKXziXw2/fOiQkIyfpcoshgUhEtwfVsE jjTVWmWePi7+KYmVvfp56ObUofHQgx+/86y33tgXFMmcsd7qm0c2Xrpa2XkYPZJJJGPXtW D6J2vNUg1UNE85Qq0KS7W7gOGrdRKihmikUkyFX9W0QuG3pLrTIVZXxtNHklaw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095657; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GX2v8avU3IJ2G1GnwP96OLP7PyA5RAfEjhyHPWJ7Na8=; b=h8UaMneSGqzgK3fqeVVmDj+lAb/P8rHKv92Ih2/a0ntlBxmEogSy+/PI1NfPN73nFvVq+6 Q8hadyBNcXAjgqT7RoMXyQi8D8hM7ArbU3z8xC9kKxoZBh2DdCtZ41Ju/YAgjPsOKS3sXW p6SR1neAKu788zwR+TGOMZXQv8u3HfQOOjfkeCcnXWYFtirXvqI7KFatU2o45XkalRl/y6 kKrF2dUYec5spS2SuN2oj6Z0jbgarKPVkmKwHXRUnLduQphpNQwdJbFL+VKpJtGjOXMAtJ iFQiO1Q5LJ7O7ochjL1KsGRjy6VduR2AYSwQB7i+qjfio9MvKqGC4rsfXONSWg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRzNn4y9sztXH for ; Fri, 29 May 2026 23:00:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 42b02 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 23:00:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 1923e6c70dfd - stable/15 - Revert "libcxx-compat: install headers that were reintroduced by reverts" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 1923e6c70dfd5605299c393124ec38a5e84937de Auto-Submitted: auto-generated Date: Fri, 29 May 2026 23:00:57 +0000 Message-Id: <6a1a1aa9.42b02.ac4e5a7@gitrepo.freebsd.org> The branch stable/15 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=1923e6c70dfd5605299c393124ec38a5e84937de commit 1923e6c70dfd5605299c393124ec38a5e84937de Author: Dimitry Andric AuthorDate: 2025-12-06 20:24:14 +0000 Commit: Dimitry Andric CommitDate: 2026-05-29 22:57:28 +0000 Revert "libcxx-compat: install headers that were reintroduced by reverts" This reverts commit 8ad38d5eb3985ef778a7d36093878b0b373ccedf, in preparation for merging llvm 21. PR: 292067 MFC after: 1 month (cherry picked from commit d6d48190ec6a62a20ef603011f215015c1d999fb) --- lib/libc++/Makefile | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/libc++/Makefile b/lib/libc++/Makefile index 9c12f419f6f1..a5e45c4ca54f 100644 --- a/lib/libc++/Makefile +++ b/lib/libc++/Makefile @@ -1268,8 +1268,6 @@ TTR_HEADERS+= is_fundamental.h TTR_HEADERS+= is_implicitly_default_constructible.h TTR_HEADERS+= is_integral.h TTR_HEADERS+= is_literal_type.h -TTR_HEADERS+= is_member_function_pointer.h -TTR_HEADERS+= is_member_object_pointer.h TTR_HEADERS+= is_member_pointer.h TTR_HEADERS+= is_nothrow_assignable.h TTR_HEADERS+= is_nothrow_constructible.h @@ -1286,7 +1284,6 @@ TTR_HEADERS+= is_reference_wrapper.h TTR_HEADERS+= is_referenceable.h TTR_HEADERS+= is_same.h TTR_HEADERS+= is_scalar.h -TTR_HEADERS+= is_scoped_enum.h TTR_HEADERS+= is_signed.h TTR_HEADERS+= is_signed_integer.h TTR_HEADERS+= is_specialization.h From nobody Fri May 29 23:00:58 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRzNq0fK8z6gDhR for ; Fri, 29 May 2026 23:00: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRzNp5sG7z4PCS for ; Fri, 29 May 2026 23:00:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095658; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5rGg8tAABlZFryDeOq41WQp7UnnCjfF6c0UXK/C+tn0=; b=gREM2iDPwn0pRvs9nxk2z9T76nMHelRb7tvo2/OL61SqDRMz2yrz6fx3wBmMdlitxrgEiq aWp3OQvtoeqFN91CgOtxspPJHIzddmTOB+d5tny0Z2OrD4oChkxiYGqHioeWE1SAlMM12B Ym06DVcqM3E3Ks0/RbFDCfG/+Z6EfCu5SJls5lrbuefsMati2lRqIBAlzRzKvKQnwiBRpV C9226uVKnMmUawXkaXHk21jUqZk72WR/2PMVdoenddy00Kluo2pfz8UQTF7Pq0xH4nUr54 +cA7wE95T0zGLsYDWJSt0kZkDy2XN+5Njl4GGQHvHPoOoGlloNnfBl63MuYZTg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780095658; a=rsa-sha256; cv=none; b=qQJJIVoJyzzfqwNiT9OjTYIztnBsyNkFvPuvSReTVDQYz6GMHd6VzyrfCcD2c0DHRDzGKt 7PF5tYFaVZIg06oevW4IM5Gs8+Q4jkS0P8N2+aTHlkctdsXUyW/BTfm1s2WfUqxymSVe3m F3vfAxj0Cu4VlzVhZf4SoNiSvotosdFqjAn6mZrpoI9e26r7PnZNNY8kvjiNynNRTscuhu U78XYKoQSnynAjtR4RlLCmQRG/EnlZhQ9gzaOsoDLLkYcIztCl4vd+rJ95uJu3BdB9GoEE w/mErHhqJaz0ocum1SnUK48aCDNxWIRrhTpY05okWZdlLSOIIK+IteoXgBxihg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095658; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5rGg8tAABlZFryDeOq41WQp7UnnCjfF6c0UXK/C+tn0=; b=euUH+jbRIzGK06qxwWTXSZkVMKueyUuhkhF43ZV7c8dCEEH827DqWu8H4MLXlYNlWcOgkK Uae13MboMA0gY6sMSxbIap+POJYmVLGRlqjuNTSleKBZh0sUuHuVHmQbJMSjGT+aaaETv9 vAoZX1kXOoGSb2gphrecZFw5gmWdslT7lRJYvDdAVgfilwHbPHnRl6kKQ07sOZkwQMiJZg oG/5jD28L31GOjt85eMFQKard5KaUa24JzHybpa3oV7VLakOrgfIu3VzyjzhTq4e4Biir6 Grbb4Iid0mljaMCBYl5DIEP01GuQnm4UequckwmZ8pZsFWfaCeabuW5gXUP45A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRzNp5QMTztFh for ; Fri, 29 May 2026 23:00:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 422a7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 23:00:58 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: e18613ce2166 - stable/15 - Revert "libcxx-compat: don't remove headers that were reintroduced by reverts" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: e18613ce216636c6659b76aca3f3e75e3c2c2932 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 23:00:58 +0000 Message-Id: <6a1a1aaa.422a7.7cbb63fc@gitrepo.freebsd.org> The branch stable/15 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=e18613ce216636c6659b76aca3f3e75e3c2c2932 commit e18613ce216636c6659b76aca3f3e75e3c2c2932 Author: Dimitry Andric AuthorDate: 2025-12-06 20:24:14 +0000 Commit: Dimitry Andric CommitDate: 2026-05-29 22:57:28 +0000 Revert "libcxx-compat: don't remove headers that were reintroduced by reverts" This reverts commit 2b3703a4f4519e202c3bdf12e7e13d9b5fdbc3f3, in preparation for merging llvm 21. PR: 292067 MFC after: 1 month (cherry picked from commit 3f6219840dbea7712554982a3c9f852c1c9664f4) --- ObsoleteFiles.inc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index c97115393e5d..8e4199465af7 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -1061,6 +1061,8 @@ OLD_FILES+=usr/include/c++/v1/__type_traits/apply_cv.h OLD_FILES+=usr/include/c++/v1/__type_traits/is_copy_assignable.h OLD_FILES+=usr/include/c++/v1/__type_traits/is_copy_constructible.h OLD_FILES+=usr/include/c++/v1/__type_traits/is_default_constructible.h +OLD_FILES+=usr/include/c++/v1/__type_traits/is_member_function_pointer.h +OLD_FILES+=usr/include/c++/v1/__type_traits/is_member_object_pointer.h OLD_FILES+=usr/include/c++/v1/__type_traits/is_move_assignable.h OLD_FILES+=usr/include/c++/v1/__type_traits/is_move_constructible.h OLD_FILES+=usr/include/c++/v1/__type_traits/is_nothrow_copy_assignable.h @@ -1068,6 +1070,7 @@ OLD_FILES+=usr/include/c++/v1/__type_traits/is_nothrow_copy_constructible.h OLD_FILES+=usr/include/c++/v1/__type_traits/is_nothrow_default_constructible.h OLD_FILES+=usr/include/c++/v1/__type_traits/is_nothrow_move_assignable.h OLD_FILES+=usr/include/c++/v1/__type_traits/is_nothrow_move_constructible.h +OLD_FILES+=usr/include/c++/v1/__type_traits/is_scoped_enum.h OLD_FILES+=usr/include/c++/v1/__type_traits/is_trivially_copy_assignable.h OLD_FILES+=usr/include/c++/v1/__type_traits/is_trivially_copy_constructible.h OLD_FILES+=usr/include/c++/v1/__type_traits/is_trivially_default_constructible.h From nobody Fri May 29 23:00:59 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRzNr2jdCz6gDkK for ; Fri, 29 May 2026 23:01: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRzNr0XPHz4PLT for ; Fri, 29 May 2026 23:01:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095660; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1gv3uCQiIJ9g6F2ETL4LvLtN2zSnLeaEgP5rOWDN6Lg=; b=iUzMf4ABy77+2IPVa0onNGPSCr/ID7b5+Gzql8e5EJfU9KelGMHCq1AiH3UQHqfKEb4Jla BQH8n9TI6SMBkFlipzxG+mv4iRPB0YEpEdlAAp0TJidicSfSg+EJYgs6c2o1L3k/zZVDvl S7CccGa1EOjMemX42btrccwuZL6sHUqb9T1ynOzZO9B6cFluOYXg4gMCdM4mmqWnog41l/ Bo77jp6usGWf+muu/yUXb/llhtvSdBLvqid2Qt8InQtOZw+L529yU16O9MeDIMb56h1wKT fNNMhBlvYkAt4HdIxULizS+ji1zKIzWNlcVSz7KjkApl+XMeUxTppS5Je7Tcrw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780095660; a=rsa-sha256; cv=none; b=NgX+PRSK9rd/BiOSzL7QEIOfh66ftvT3vVCY998C5xFWaisscKhpLzYeyS/xnxVq5dQeQN sV5lvtgz15pUWIDf3nQIf3ZwdOwXkYpXkK7JZwx5+gVxDpM2bobQDrr0zQvQc1XxGNqs0s rseTbMQIc31ZEOd0Kh3v607FZE0z9Mvek9FxEMnVtMa1pxltug0ysd/MMvZrwJpF5g8uyd Bh7+hEoyO/KDXay5re1G4Zd8w+gLR4pDTvKVKVK4J+e6CvLheOH9gTKgMusCgu1rDglYA1 W3Jjftna3/l8EmP5d547+1vOH2O5dv0g+AL/GmKPXfFLBZo65jC997945KLtcg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095660; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1gv3uCQiIJ9g6F2ETL4LvLtN2zSnLeaEgP5rOWDN6Lg=; b=vbr6Np+WQAdelBxtladq2xEEMAhKj19q+nJHFnhecdsYF+xUJfh97qFqL4997jcDu0SMPA zzNOq3PSoItgt7XZQF111w9voSW0lwHGxnGc4+Pvq3VLtsfIlWtfphI2OvF93d/RJWh/O5 0R+c5n4bwT3rrWpiE1yxmFxSn4ZsHtIkYvXBGEKDf75fqQq2cUh1h3F8Fk5RfODrA6ZHhn oqXRcYBgyAaejGLFyRh/eaB3nDJxjlvDhwE4AcM6PnHaO3l6PdX6FMdQZqtOE8/8+fMehI akHssgLGYoB2ExGNCrnRLqlZUSr7tHARgzvo+FSZAQBTGiVApLpIcmJlRyLv8w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRzNq5r4jztCc for ; Fri, 29 May 2026 23:00:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4042b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 23:00:59 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 78f59ae2f017 - stable/15 - Revert "libcxx-compat: revert llvmorg-19-init-4003-g55357160d0e1:" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 78f59ae2f0171ac918884fcf80b431f71bbf1001 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 23:00:59 +0000 Message-Id: <6a1a1aab.4042b.30d824a1@gitrepo.freebsd.org> The branch stable/15 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=78f59ae2f0171ac918884fcf80b431f71bbf1001 commit 78f59ae2f0171ac918884fcf80b431f71bbf1001 Author: Dimitry Andric AuthorDate: 2025-12-06 20:24:15 +0000 Commit: Dimitry Andric CommitDate: 2026-05-29 22:57:28 +0000 Revert "libcxx-compat: revert llvmorg-19-init-4003-g55357160d0e1:" This reverts commit fd17362f6225085e60eabed8af7421838100b457, in preparation for merging llvm 21. PR: 292067 MFC after: 1 month (cherry picked from commit a24406d2e0e8eee8db03ed8d1ae7fb482cf912ab) --- .../llvm-project/libcxx/include/__type_traits/remove_cv.h | 11 +++-------- .../libcxx/include/__type_traits/remove_cvref.h | 15 ++++++++++----- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h b/contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h index c4bf612794bd..8e1c04336432 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h @@ -19,22 +19,17 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if __has_builtin(__remove_cv) && !defined(_LIBCPP_COMPILER_GCC) template struct remove_cv { using type _LIBCPP_NODEBUG = __remove_cv(_Tp); }; +#if defined(_LIBCPP_COMPILER_GCC) template -using __remove_cv_t = __remove_cv(_Tp); +using __remove_cv_t = typename remove_cv<_Tp>::type; #else template -struct _LIBCPP_TEMPLATE_VIS remove_cv { - typedef __remove_volatile_t<__remove_const_t<_Tp> > type; -}; - -template -using __remove_cv_t = __remove_volatile_t<__remove_const_t<_Tp> >; +using __remove_cv_t = __remove_cv(_Tp); #endif // __has_builtin(__remove_cv) #if _LIBCPP_STD_VER >= 14 diff --git a/contrib/llvm-project/libcxx/include/__type_traits/remove_cvref.h b/contrib/llvm-project/libcxx/include/__type_traits/remove_cvref.h index e8e8745ab096..55f894dbd1d8 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/remove_cvref.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/remove_cvref.h @@ -20,21 +20,26 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if __has_builtin(__remove_cvref) && !defined(_LIBCPP_COMPILER_GCC) +#if defined(_LIBCPP_COMPILER_GCC) template -using __remove_cvref_t _LIBCPP_NODEBUG = __remove_cvref(_Tp); +struct __remove_cvref_gcc { + using type = __remove_cvref(_Tp); +}; + +template +using __remove_cvref_t _LIBCPP_NODEBUG = typename __remove_cvref_gcc<_Tp>::type; #else template -using __remove_cvref_t _LIBCPP_NODEBUG = __remove_cv_t<__libcpp_remove_reference_t<_Tp> >; +using __remove_cvref_t _LIBCPP_NODEBUG = __remove_cvref(_Tp); #endif // __has_builtin(__remove_cvref) template -struct __is_same_uncvref : _IsSame<__remove_cvref_t<_Tp>, __remove_cvref_t<_Up> > {}; +using __is_same_uncvref = _IsSame<__remove_cvref_t<_Tp>, __remove_cvref_t<_Up> >; #if _LIBCPP_STD_VER >= 20 template struct remove_cvref { - using type _LIBCPP_NODEBUG = __remove_cvref_t<_Tp>; + using type _LIBCPP_NODEBUG = __remove_cvref(_Tp); }; template From nobody Fri May 29 23:01:00 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRzNs2VJbz6gDdl for ; Fri, 29 May 2026 23:01: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRzNr6mrfz4PCh for ; Fri, 29 May 2026 23:01:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095661; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OpoUQuMfZ+J5534zj9TuGlLgUyx8VDVxZT4jtjdZPDQ=; b=VcjpDC4JfoYCr/MisorLREGySimbunxf2yLVtSz+uPL8PFLDESV1M73zz139+wNV7csMfW 2l3pZWKDQue5cdzW8EDcujT1o+hhUaozA3xNqPxlJ3i1O2Qs2CA61bsRGssWnRqZM0txj/ 99CU5kOdwqlsGfqRUGKwxz6Cfz/MxyNRUVo0yTg0A/baR6o6RJsTd/MlBUrBaaA7FprWyA TdcPWqjrRAzjiFpfJT4XxJwRNeqvXaVxwUJnckM6l57izPXk+HMh/kqHWbaGcgrj+48i0r nyxZDZX6M3a0CgAPjZ9/CxWsF3c5n6EKlUEAyWALgABDvXZY8Kd4R+vKjmXxCg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780095661; a=rsa-sha256; cv=none; b=qAB1xhOFsY85J+BSARGSD9kljMHmI47eHOgsx1IlfmjjDqDsPsB4w+mO6lbqasBMm0Xmw9 hjbTWClCWKB2D7pgegFeygrX7DDWsbfuEwbk7+PeEoPc0935QPeECPaOs+QG8gLBeg2p0c yqpUDBABXSsgLq1hLonjOmRx/JcFGngSzTcRAQZ+e27Zs/Jm209601q7ObujzP0iEs0j1r A0weBO5R3naXHXQhKFhKDQAeq9jkrv5Pj6mDMt1zlV8DX5BLwITBbEGgZ08Kl0G2SsNzye Go87aBLMAV8L79GG79np8KCgPvVom3O8jeW6SLPn+Sz6FYuWB+lLhcbM9SFxIQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095661; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OpoUQuMfZ+J5534zj9TuGlLgUyx8VDVxZT4jtjdZPDQ=; b=AR7bd2LJWclSaxqIQOY/7tYPVjcrePQHptIhc4Sn2kvp3mQ69omCjksF/70E9RU3sVozf3 Ypv6jJmUNj7uie0xHVkLmgeu4p+5NAIU0Xn2hCYlo/yxIM+TSip7ZDNusWtbZbR004EeCV T+YKLIQLS6G8eeypRA135BjaMcuQoKlPnj0OFaNeA5nzgSZ40FwEwc2MlTqT3xeh/S8bma hiRWfEWdd1yUTLj99haCeQoCR42paeZiyI61m7AddNA2l+hHXjczvLzl/nZg54pj56zWgM wPLSD38/YyQt/uockthysvh+z5pdQRKO+uZqPnABXFKLfAdm54kiyA8plqq9ng== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRzNr6CqcztRh for ; Fri, 29 May 2026 23:01:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 42753 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 23:01:00 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 67b0fd370bdb - stable/15 - Revert "libcxx-compat: revert llvmorg-19-init-4504-g937a5396cf3e:" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 67b0fd370bdb67a819e5980db91f49a111b7c1be Auto-Submitted: auto-generated Date: Fri, 29 May 2026 23:01:00 +0000 Message-Id: <6a1a1aac.42753.2c4884d4@gitrepo.freebsd.org> The branch stable/15 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=67b0fd370bdb67a819e5980db91f49a111b7c1be commit 67b0fd370bdb67a819e5980db91f49a111b7c1be Author: Dimitry Andric AuthorDate: 2025-12-06 20:24:15 +0000 Commit: Dimitry Andric CommitDate: 2026-05-29 22:57:28 +0000 Revert "libcxx-compat: revert llvmorg-19-init-4504-g937a5396cf3e:" This reverts commit a7455c47801ea1e4c4eed10cab2072375f6f92a2, in preparation for merging llvm 21, in preparation for merging llvm 21. PR: 292067 MFC after: 1 month (cherry picked from commit 3ca6facafc4c96fa9d6027b6f3b50b7c3e3a5dbf) --- contrib/llvm-project/libcxx/include/__type_traits/is_convertible.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_convertible.h b/contrib/llvm-project/libcxx/include/__type_traits/is_convertible.h index b378a20cedeb..baa6df94714f 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_convertible.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_convertible.h @@ -11,12 +11,6 @@ #include <__config> #include <__type_traits/integral_constant.h> -#include <__type_traits/is_array.h> -#include <__type_traits/is_function.h> -#include <__type_traits/is_void.h> -#include <__type_traits/remove_reference.h> -#include <__utility/declval.h> -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header From nobody Fri May 29 23:01:01 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRzNt4g0Cz6gDrH for ; Fri, 29 May 2026 23:01: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRzNt1G4vz4PR8 for ; Fri, 29 May 2026 23:01:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095662; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tqLNDURBpdmt5rRJizz2eQYNaVey8yjDhv/HM+nXMAw=; b=RsaoUxloBRfNxlV+/kctEsk7F9F0l/5r4oiukrK2M49AuD93SEG6yZ7kWD6A9OtFEO3LRP W0CcJyyVuLqBu6cs+mOH5qK/oUpcYjD0FTZH2kg+7HqtqoF9WOaLnV0l6pifwFTHctaZMR KPIEolfDSmYaxr/3iC2YUkggOZQfZt2h6wLITnjW+SkEVPs/zzyRjfEc4oWmLDOxHmGkst 92ULzED/EtIOhoNBxh2rkkVL94N2ysIUvqVoU3X1ysLJpPDlUQCN2Eo8zxXnphAMtxAdCl BfkwbkrVtf3mS5JjKFqMs5sNl0OYOB9uAcuoyy/Aky7XvnNUHFlVBFUeloXyGA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780095662; a=rsa-sha256; cv=none; b=KC0jN90axjc/ZV0xpJR1P0RccR17A7stcxnRHJcIT5/ZHhLZhTbu3uAEpm2KEHqOa3llz2 rCXFPZJqQrtuoFxhKrGDztLguKeaz2bA3taKkmI4IT5mgrFZ9RX7dyGtpLL9HHqCfAK6sK bZE49+NtT+ylcUlWlPl2QLTh1DUN3bBBd1TPXR7pCe3T0fd5r+4EVAsZljjntU31QWUL8M IwhXpcfgSCfm+86ItjKRbIH9OJawLkmMQs7YRgFDb6DsCJGsrCtwZRRz3Z76hjBU8rcY78 Q5yHaoCofjIquxOchJSnaVEm2X56UFr6Yn1E3+2GtjcDT19Lq3K1cX/OWOPgLw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095662; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tqLNDURBpdmt5rRJizz2eQYNaVey8yjDhv/HM+nXMAw=; b=fOVJ8B45a7Y8rJy96odXu+FVglIi4OzpU35zHiVQOwEMzheYQ258YueHSUGr40eR6s9lJb 4GG58vN0juYl/ZwJiCmWNdFLuqUHlPKozOOxmqKoAKoH5HBT7j4+UhvGVR0a6bgFEECzBy pHvrTHJgcnE+THSPU0E7On8Ucd+aBr5zYiP64aF3uV0/vgX66LHwIqOGjEAPNuecnwEzpB a5+Czxv/8TFxN5wartGlj2YaIgttbSw+f9JdCkfI4Zxl+rkwIwDjoJOhTExWc8JECxQTWp bME99GD3xoOZXGlEJ5WIOewQ6yi2MEb/yfk7nduVJ/xjtd3Dw1mwQ/HCusaAmA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRzNs72LHzskj for ; Fri, 29 May 2026 23:01:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4241a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 23:01:01 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: b247a3c78f11 - stable/15 - Revert "libcxx-compat: revert llvmorg-19-init-5639-ga10aa4485e83:" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: b247a3c78f115a47b3f8978e48a0df6c1798e48b Auto-Submitted: auto-generated Date: Fri, 29 May 2026 23:01:01 +0000 Message-Id: <6a1a1aad.4241a.6c99a00@gitrepo.freebsd.org> The branch stable/15 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=b247a3c78f115a47b3f8978e48a0df6c1798e48b commit b247a3c78f115a47b3f8978e48a0df6c1798e48b Author: Dimitry Andric AuthorDate: 2025-12-06 20:24:15 +0000 Commit: Dimitry Andric CommitDate: 2026-05-29 22:57:28 +0000 Revert "libcxx-compat: revert llvmorg-19-init-5639-ga10aa4485e83:" This reverts commit 267fa9ab814c23ca97b8b7e1740f4da51485ac72, in preparation for merging llvm 21. PR: 292067 MFC after: 1 month (cherry picked from commit 3ac42330b1da72d68cc6d7c3f65e24a882ccfd47) --- .../libcxx/include/__type_traits/remove_reference.h | 14 +++++++------- contrib/llvm-project/libcxx/include/cwchar | 4 ++++ contrib/llvm-project/libcxx/include/execution | 4 ++++ 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/contrib/llvm-project/libcxx/include/__type_traits/remove_reference.h b/contrib/llvm-project/libcxx/include/__type_traits/remove_reference.h index fd66417bd84f..ba67891758ad 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/remove_reference.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/remove_reference.h @@ -10,7 +10,6 @@ #define _LIBCPP___TYPE_TRAITS_REMOVE_REFERENCE_H #include <__config> -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -26,15 +25,16 @@ struct remove_reference { template using __libcpp_remove_reference_t = __remove_reference_t(_Tp); -#else -// clang-format off -template struct _LIBCPP_TEMPLATE_VIS remove_reference {typedef _LIBCPP_NODEBUG _Tp type;}; -template struct _LIBCPP_TEMPLATE_VIS remove_reference<_Tp&> {typedef _LIBCPP_NODEBUG _Tp type;}; -template struct _LIBCPP_TEMPLATE_VIS remove_reference<_Tp&&> {typedef _LIBCPP_NODEBUG _Tp type;}; -// clang-format on +#elif __has_builtin(__remove_reference) +template +struct remove_reference { + using type _LIBCPP_NODEBUG = __remove_reference(_Tp); +}; template using __libcpp_remove_reference_t = typename remove_reference<_Tp>::type; +#else +# error "remove_reference not implemented!" #endif // __has_builtin(__remove_reference_t) #if _LIBCPP_STD_VER >= 14 diff --git a/contrib/llvm-project/libcxx/include/cwchar b/contrib/llvm-project/libcxx/include/cwchar index 7abcc3440947..dd16eaeaa07f 100644 --- a/contrib/llvm-project/libcxx/include/cwchar +++ b/contrib/llvm-project/libcxx/include/cwchar @@ -258,4 +258,8 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp* __constexpr_wmemchr(_Tp _LIBCPP_END_NAMESPACE_STD +#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include +#endif + #endif // _LIBCPP_CWCHAR diff --git a/contrib/llvm-project/libcxx/include/execution b/contrib/llvm-project/libcxx/include/execution index 822ffa1fd3eb..94d434b2e460 100644 --- a/contrib/llvm-project/libcxx/include/execution +++ b/contrib/llvm-project/libcxx/include/execution @@ -142,4 +142,8 @@ _LIBCPP_END_NAMESPACE_STD #endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17 +#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include +#endif + #endif // _LIBCPP_EXECUTION From nobody Fri May 29 23:00:56 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRzNt20tfz6gDhY for ; Fri, 29 May 2026 23:01: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRzNs69CYz4PNm for ; Fri, 29 May 2026 23:01:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095661; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eUa8f2BWI7IdLgRJF1s3ojCkgNg4LqLCCL3klQuo/MM=; b=FbA00U7tOK4zxGL/azocjDZqxStgmcKgWHToP8TMrx4d/sQIu2Jxu7JUKaVil+IgbWcVZq PVLWtzBXEamXpK/VhR7Ubbuv8jreYR+hssuYMpzPKp0hooZHfHZzhcaPGLpvgUrmuov+Sj Iz+1hRiFHg/NnagSjs4VKjFftIC+cmrDBfR1MXFdkcHj8rxnAut3L32Ul41cbU3FU5ifkK yW57wdDpZW4LCnTIS9ia6utHHiadoUCWyFvewkLhM1xenRp4IstR0S7RhIlsAwWeuXKXwB c8DlU3xcUl2BK7ryHHYg19e3FbOWPwwX4JjRFggy1VcTXBTvDcdTF+jOiZSPrQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780095661; a=rsa-sha256; cv=none; b=LrdQgFmrnn2mzFqa8wUQUwI/y88rpfFKgsThKKc8PBgQhILTpJm7pVLhHnevE4IoaZqm8h d2pKH6ZN4vh+3+c66saTxPRUK0KJqQC+8LbzpR3pR9vfkJYk+0UUnCASKrqnebv6mqJex4 r6BcbMJ7q6TQE3qXuZOPjyagOEMe4YMe4jdCqLrxsDyicR8TF52brjHjRoA3rOuN83xej2 srOG9o0c4NKoFwlaPEwOsXH2FrnRZGFkMmBwBkZS2qaFCmJLu3qYzwGUrqZw0mLHAcUq1v tR/VYcHYQwN9ZRzbpp7sGSO8QtKAbWTD5wIuu0EQn2O+zjE+yD9+nghTQetvEA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095661; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eUa8f2BWI7IdLgRJF1s3ojCkgNg4LqLCCL3klQuo/MM=; b=vJJNj52vkl2u4pf+tqZtUdKA6iAGSjVTZdG0jUFX9ZFYorvN6ih464Hu4UC4acyZmhNxgF kDnHFH9CU//t1JBIf8uFaYd/xzRYpCRTdUp2S8JqSDZNYXenL6hx0F/epdWditR0pn5vnO cDYSNQlA85L/kWgZfyWMt0UQVnblsAgHzwEn3JgKWc64zBRJTVLQsCMML8Fj7Kdll7Hg2P 32RMzqScTvdlpzo5NoHxYB4q07nl1Mqj8V4ii+HZ2ji8zBb1eH/R4Ac+y8osia81RwyGYk pQtTU1tcy1yOA76LTVWttSYJvQ/XO+1qo4gLTgi3Wlt1iovAEm93ultzHcrQxA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRzNs5SgWzsr0 for ; Fri, 29 May 2026 23:01:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 403fd by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 23:00:56 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 99d7fedab646 - stable/15 - Revert "libcxx-compat: update libcxx.imp for headers that were reintroduced by reverts" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 99d7fedab6468db78134ed171d3071057c9817ed Auto-Submitted: auto-generated Date: Fri, 29 May 2026 23:00:56 +0000 Message-Id: <6a1a1aa8.403fd.22465fe6@gitrepo.freebsd.org> The branch stable/15 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=99d7fedab6468db78134ed171d3071057c9817ed commit 99d7fedab6468db78134ed171d3071057c9817ed Author: Dimitry Andric AuthorDate: 2025-12-06 20:24:14 +0000 Commit: Dimitry Andric CommitDate: 2026-05-29 22:57:28 +0000 Revert "libcxx-compat: update libcxx.imp for headers that were reintroduced by reverts" This reverts commit caf0ccccc304e3e7938c9722f1deb0a362fd70d5, in preparation for merging llvm 21. PR: 292067 MFC after: 1 month (cherry picked from commit 5945da0bc9ac42f531b1079a246eb8ce4f0d63db) --- lib/libc++/libcxx.imp | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/libc++/libcxx.imp b/lib/libc++/libcxx.imp index 73c9d62df329..214c12cd40ed 100644 --- a/lib/libc++/libcxx.imp +++ b/lib/libc++/libcxx.imp @@ -774,8 +774,6 @@ { include: [ "<__type_traits/is_implicitly_default_constructible.h>", "private", "", "public" ] }, { include: [ "<__type_traits/is_integral.h>", "private", "", "public" ] }, { include: [ "<__type_traits/is_literal_type.h>", "private", "", "public" ] }, - { include: [ "<__type_traits/is_member_function_pointer.h>", "private", "", "public" ] }, - { include: [ "<__type_traits/is_member_object_pointer.h>", "private", "", "public" ] }, { include: [ "<__type_traits/is_member_pointer.h>", "private", "", "public" ] }, { include: [ "<__type_traits/is_nothrow_assignable.h>", "private", "", "public" ] }, { include: [ "<__type_traits/is_nothrow_constructible.h>", "private", "", "public" ] }, @@ -792,7 +790,6 @@ { include: [ "<__type_traits/is_referenceable.h>", "private", "", "public" ] }, { include: [ "<__type_traits/is_same.h>", "private", "", "public" ] }, { include: [ "<__type_traits/is_scalar.h>", "private", "", "public" ] }, - { include: [ "<__type_traits/is_scoped_enum.h>", "private", "", "public" ] }, { include: [ "<__type_traits/is_signed.h>", "private", "", "public" ] }, { include: [ "<__type_traits/is_signed_integer.h>", "private", "", "public" ] }, { include: [ "<__type_traits/is_specialization.h>", "private", "", "public" ] }, From nobody Fri May 29 23:01:03 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRzNv42yDz6gDpZ for ; Fri, 29 May 2026 23:01: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRzNv12MTz4PJQ for ; Fri, 29 May 2026 23:01:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095663; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xpa9Fj0wY3CCcwb+x3McTjLM1OtseWRCd3A819s34mc=; b=sRmenBDg52/ZPwHICypX8ja7bNI1NbheTXqZfJjsQ+vyF5pat4VPw43Mg0IYa8z9XNqIt/ zFnp9rQ0cJ9FoGAwTZmWZqoLpm3eINl/D5eoHxYX8Q/xb2+fFpDLs4wH2Pt0lkP15SU8vQ aV/KyJIGBLTi1zh3hw31yhKHu0Boxc0XjMZJXa+onAfXQ8s7CgiHCHJ+IuNxdQ4UBKdPmp ObSqGXhKhnZTkI1Uw1y8k9mihR32mU0VI0kGdJSXa2Wg+BaJChXdQaJJa7jKUyqIF+pw87 YjBx9kp16TCP2WNCbgim2QsQm8w7uqy/AqhyQ2xE1vv3wDE8trEw4F9DTwVxRQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780095663; a=rsa-sha256; cv=none; b=ewzKE51D4ObRrbyijG+fxwFSY5RH0f1VJdtjqu3xPIMsddewS0ByHP/fXmmyIgBuyg2coc vaD4TR++CPxZenCfFKOnEp/GsMQ8fLQFd8YvOyoN+Tj7QOvA08gnpHc+a1J9L665xpd1jT J31QtWL67xU+s8hkLBbrYJxiNc3RT3mkhZZEuQK6JaKLaA/XlHX44n4ygT9GO2Hn8rP6gp AsP8E4b0ya7cJd1l6v3tzBAAItkRin10YexPPum2+0qkPhmTfi9rVRwrUkO6QQcWRgAeBe mNR5zaW0+GKhXF8AYPNGyQ1EYDaO734HLEoGGVk0G/fUi4M6dBhhjdRbi0gWAA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095663; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xpa9Fj0wY3CCcwb+x3McTjLM1OtseWRCd3A819s34mc=; b=HDqSTqpcfH0SFu4zrtrwewzZwidN2S76fEqLFfYcT3nyG39nC6Z+8hyNhp2CZzeSA24kTY 8qYzRXpQkLjeKE4UisoPJYdxtgyoA84f2xdLzs8BMp7H/196seUnA70QM7LEfKNP0BjLrr SECjm0p71mdcgS/NNhp1AaInLAcN6rosE1jMLt1e9P6Jeb1U4mBRJSUyRbpru21oPThpOv NgWMbiHpB67/rXDKeZEJReE5mluWyUL8K1od9gV/pAY++Yn8QJRBwCISq1WcML2+E5GQbX SxLpwsRpwoys4x6HeO5XdRLuGt+ASyLfTcL9U+y/O7N7Dr2vo/ir7pVZ7N2Uzw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRzNv0MhwztCg for ; Fri, 29 May 2026 23:01:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 42397 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 23:01:03 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: f17eb2277e6e - stable/15 - Revert "libcxx-compat: revert llvmorg-19-init-8667-g472b612ccbed:" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: f17eb2277e6e3ee1cd91bbb9a2810c260a3de838 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 23:01:03 +0000 Message-Id: <6a1a1aaf.42397.5a3072f2@gitrepo.freebsd.org> The branch stable/15 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=f17eb2277e6e3ee1cd91bbb9a2810c260a3de838 commit f17eb2277e6e3ee1cd91bbb9a2810c260a3de838 Author: Dimitry Andric AuthorDate: 2025-12-06 20:24:15 +0000 Commit: Dimitry Andric CommitDate: 2026-05-29 22:57:28 +0000 Revert "libcxx-compat: revert llvmorg-19-init-8667-g472b612ccbed:" This reverts commit f7570f1eb0dc056dfce9d7500157538c670edaf6, in preparation for merging llvm 21. PR: 292067 MFC after: 1 month (cherry picked from commit a843ea3f246f3f137722db556aa07710e6a84b71) --- contrib/llvm-project/libcxx/include/__format/format_arg.h | 1 + contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/contrib/llvm-project/libcxx/include/__format/format_arg.h b/contrib/llvm-project/libcxx/include/__format/format_arg.h index 4924e5fb3253..aa02f81dc40e 100644 --- a/contrib/llvm-project/libcxx/include/__format/format_arg.h +++ b/contrib/llvm-project/libcxx/include/__format/format_arg.h @@ -19,6 +19,7 @@ #include <__fwd/format.h> #include <__memory/addressof.h> #include <__type_traits/conditional.h> +#include <__type_traits/remove_const.h> #include <__utility/forward.h> #include <__utility/move.h> #include <__utility/unreachable.h> diff --git a/contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h b/contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h index 8e1c04336432..2c4e9e419a1b 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h @@ -10,8 +10,6 @@ #define _LIBCPP___TYPE_TRAITS_REMOVE_CV_H #include <__config> -#include <__type_traits/remove_const.h> -#include <__type_traits/remove_volatile.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header From nobody Fri May 29 23:01:04 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRzNw55W1z6gDLy for ; Fri, 29 May 2026 23:01: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRzNw1hbnz4PMR for ; Fri, 29 May 2026 23:01:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095664; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cPxXLBVHXwNz43KfcHt0Z/0AjUVs4WlRgUHvZAu9NpI=; b=wv5YZQX3NcGKosPOA/VyKzxtEsbtpxuFxOVn7zh78c4LKNaIGQtXvsEGCqiCQ5UwQzqRw/ qaHDQbocZPOoi4QrDkbcOUzAUf8nOrTNAe4FdpoigHYj2F7fp6JvJhKSfc3+FQNBqk/AhA trWj2CRfcHyEoMJ3BKZCcZwSThIugHp1NxWi9LiVo4U1AD8V/FYKQSo8zUGGp9jexnHisc 18LdkeSazjTQcT24Q48w1Pg9nGvJunOE2eDrLmIOCOskybNWMNX7JxwVVur9ioXHWpdji3 /OqVUIrtgq5B5OYE2yQYtLYVXrJEehnoIiEUl9pwlIr2a6iOHMcb7hzZpeYR9g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780095664; a=rsa-sha256; cv=none; b=q6wqn7FrgWAH3x4ZH0XBT1Hc1iynqH8C/iazTDdzztH2PpgwRwKlKpsNDtZHB0EDdgKkBU dNg/TMIeF8sebw2rQ/Au/SQY9FXyrOQO9/hS13eYJOprQQ0ADlJN1oR17BAQivzA0jwb1Z QCzVNfdXstAuBrOhlxemkRY4FVgHKOSyA+cY2U+icxgXrZ9spRKIC50P3m5405NEBrh4Ev 4RfsV0PvoZBNikr8uVB0d7jcN9G3+Ie7cfagfJc5tljWpkb2Xlacm2AbW0YEwlHyLoVwXH 22QhbeLorNdiB2qgCItFzlfo3/XiLCUVUAQqbvJ+0x4/EUywCMNDDF3V6dNs3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095664; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cPxXLBVHXwNz43KfcHt0Z/0AjUVs4WlRgUHvZAu9NpI=; b=jY62zKI1jKtoknAmbFRoJBjbY2zf69g53HOgVEiFBx9QIurpucRPx3t1WAJGZymfSZvFZ1 wiWlMbGftyhM1iF+AeZudkVcfpaZHxASB/bUj8K87YqU62hv+NIrkCM0szcISBmXQx5lMR pqT9B8xnZw4kJ5nIKgi5pZ3uYNWe/EYythPrXEW5GfWgiwf3s2olvVHKOUctH/5vXP1wgd lf28ocAhwvo/T4PlVWle+YLDCRnZguPjl+m5tiqDWKUkM1nTBTR2o/U/EmwgEaxqllj2NF u0M17fuQUAsTbLb/X4LbZyAhiZ87w/Xp/Q4ZZ2y7omlyP8IZsCj9ULWIiAh4qw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRzNw1F06ztRq for ; Fri, 29 May 2026 23:01:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 42c01 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 23:01:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 738e74943c49 - stable/15 - Revert "libcxx-compat: revert llvmorg-19-init-17473-g69fecaa1a455:" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 738e74943c49cfc577df105ea069d47c3b8fc0e6 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 23:01:04 +0000 Message-Id: <6a1a1ab0.42c01.2e21a277@gitrepo.freebsd.org> The branch stable/15 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=738e74943c49cfc577df105ea069d47c3b8fc0e6 commit 738e74943c49cfc577df105ea069d47c3b8fc0e6 Author: Dimitry Andric AuthorDate: 2025-12-06 20:24:15 +0000 Commit: Dimitry Andric CommitDate: 2026-05-29 22:57:28 +0000 Revert "libcxx-compat: revert llvmorg-19-init-17473-g69fecaa1a455:" This reverts commit cab3680acf8e6ea40c686d4f26db4429e26a5331, in preparation for merging llvm 21. PR: 292067 MFC after: 1 month (cherry picked from commit 501871ebf9d725ab1c6fb2c4da9bac77f60b37a7) --- contrib/llvm-project/libcxx/include/__config | 58 ++++++-------------- .../libcxx/include/__tuple/tuple_element.h | 26 --------- .../libcxx/include/__type_traits/is_function.h | 14 +---- .../__type_traits/is_member_function_pointer.h | 31 ----------- .../__type_traits/is_member_object_pointer.h | 15 ------ .../include/__type_traits/is_member_pointer.h | 16 ------ .../__type_traits/is_nothrow_constructible.h | 61 ---------------------- .../libcxx/include/__type_traits/is_object.h | 25 +-------- .../libcxx/include/__type_traits/is_reference.h | 29 ++++------ .../libcxx/include/__type_traits/is_scoped_enum.h | 22 -------- 10 files changed, 31 insertions(+), 266 deletions(-) diff --git a/contrib/llvm-project/libcxx/include/__config b/contrib/llvm-project/libcxx/include/__config index 8c83cb9abad0..5d93f42d179c 100644 --- a/contrib/llvm-project/libcxx/include/__config +++ b/contrib/llvm-project/libcxx/include/__config @@ -162,16 +162,6 @@ _LIBCPP_HARDENING_MODE_DEBUG # define _LIBCPP_CXX03_LANG # endif -// TODO: Remove once we switch to GCC 14 -# ifndef __has_extension -# define __has_extension(__x) 0 -# endif - -// TODO: Remove once we switch to GCC 14 -# ifndef __has_feature -# define __has_feature(__x) 0 -# endif - # ifndef __has_constexpr_builtin # define __has_constexpr_builtin(x) 0 # endif @@ -348,44 +338,30 @@ typedef __char32_t char32_t; # define _LIBCPP_PREFERRED_ALIGNOF(_Tp) __alignof(_Tp) -# if defined(_LIBCPP_COMPILER_CLANG_BASED) - // Objective-C++ features (opt-in) -# if __has_feature(objc_arc) -# define _LIBCPP_HAS_OBJC_ARC -# endif - -# if __has_feature(objc_arc_weak) -# define _LIBCPP_HAS_OBJC_ARC_WEAK -# endif - -# if __has_extension(blocks) -# define _LIBCPP_HAS_EXTENSION_BLOCKS -# endif - -# if defined(_LIBCPP_HAS_EXTENSION_BLOCKS) && defined(__APPLE__) -# define _LIBCPP_HAS_BLOCKS_RUNTIME -# endif - -# if !__has_feature(address_sanitizer) -# define _LIBCPP_HAS_NO_ASAN -# endif - -# define _LIBCPP_ALWAYS_INLINE __attribute__((__always_inline__)) +# if __has_feature(objc_arc) +# define _LIBCPP_HAS_OBJC_ARC +# endif -# define _LIBCPP_DISABLE_EXTENSION_WARNING __extension__ +# if __has_feature(objc_arc_weak) +# define _LIBCPP_HAS_OBJC_ARC_WEAK +# endif -# elif defined(_LIBCPP_COMPILER_GCC) +# if __has_extension(blocks) +# define _LIBCPP_HAS_EXTENSION_BLOCKS +# endif -# if !defined(__SANITIZE_ADDRESS__) -# define _LIBCPP_HAS_NO_ASAN -# endif +# if defined(_LIBCPP_HAS_EXTENSION_BLOCKS) && defined(__APPLE__) +# define _LIBCPP_HAS_BLOCKS_RUNTIME +# endif -# define _LIBCPP_ALWAYS_INLINE __attribute__((__always_inline__)) +# if !__has_feature(address_sanitizer) +# define _LIBCPP_HAS_NO_ASAN +# endif -# define _LIBCPP_DISABLE_EXTENSION_WARNING __extension__ +# define _LIBCPP_ALWAYS_INLINE __attribute__((__always_inline__)) -# endif // _LIBCPP_COMPILER_[CLANG|GCC] +# define _LIBCPP_DISABLE_EXTENSION_WARNING __extension__ # if defined(_LIBCPP_OBJECT_FORMAT_COFF) diff --git a/contrib/llvm-project/libcxx/include/__tuple/tuple_element.h b/contrib/llvm-project/libcxx/include/__tuple/tuple_element.h index 55b3b47619f6..9127c47dc8f1 100644 --- a/contrib/llvm-project/libcxx/include/__tuple/tuple_element.h +++ b/contrib/llvm-project/libcxx/include/__tuple/tuple_element.h @@ -40,32 +40,6 @@ struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, const volatile _Tp> { #ifndef _LIBCPP_CXX03_LANG -# if !__has_builtin(__type_pack_element) - -namespace __indexer_detail { - -template -struct __indexed { - using type _LIBCPP_NODEBUG = _Tp; -}; - -template -struct __indexer; - -template -struct __indexer<__tuple_types<_Types...>, __tuple_indices<_Idx...>> : __indexed<_Idx, _Types>... {}; - -template -__indexed<_Idx, _Tp> __at_index(__indexed<_Idx, _Tp> const&); - -} // namespace __indexer_detail - -template -using __type_pack_element _LIBCPP_NODEBUG = typename decltype(__indexer_detail::__at_index<_Idx>( - __indexer_detail::__indexer< __tuple_types<_Types...>, - typename __make_tuple_indices::type >{}))::type; -# endif - template struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, __tuple_types<_Types...> > { static_assert(_Ip < sizeof...(_Types), "tuple_element index out of range"); diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_function.h b/contrib/llvm-project/libcxx/include/__type_traits/is_function.h index f09f19adf4aa..98fedd0ad96d 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_function.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_function.h @@ -11,8 +11,6 @@ #include <__config> #include <__type_traits/integral_constant.h> -#include <__type_traits/is_const.h> -#include <__type_traits/is_reference.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -20,22 +18,12 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if __has_builtin(__is_function) - template struct _LIBCPP_TEMPLATE_VIS is_function : integral_constant {}; -#else - -template -struct _LIBCPP_TEMPLATE_VIS is_function - : public integral_constant::value || is_const::value)> {}; - -#endif // __has_builtin(__is_function) - #if _LIBCPP_STD_VER >= 17 template -inline constexpr bool is_function_v = is_function<_Tp>::value; +inline constexpr bool is_function_v = __is_function(_Tp); #endif _LIBCPP_END_NAMESPACE_STD diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_member_function_pointer.h b/contrib/llvm-project/libcxx/include/__type_traits/is_member_function_pointer.h index 11c8a00c9975..037d5ca04ab0 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_member_function_pointer.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_member_function_pointer.h @@ -11,9 +11,6 @@ #include <__config> #include <__type_traits/integral_constant.h> -#include <__type_traits/is_function.h> -#include <__type_traits/remove_cv.h> -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -21,21 +18,6 @@ _LIBCPP_BEGIN_NAMESPACE_STD -template -struct __libcpp_is_member_pointer { - enum { __is_member = false, __is_func = false, __is_obj = false }; -}; -template -struct __libcpp_is_member_pointer<_Tp _Up::*> { - enum { - __is_member = true, - __is_func = is_function<_Tp>::value, - __is_obj = !__is_func, - }; -}; - -#if __has_builtin(__is_member_function_pointer) - template struct _LIBCPP_TEMPLATE_VIS is_member_function_pointer : _BoolConstant<__is_member_function_pointer(_Tp)> {}; @@ -44,19 +26,6 @@ template inline constexpr bool is_member_function_pointer_v = __is_member_function_pointer(_Tp); # endif -#else // __has_builtin(__is_member_function_pointer) - -template -struct _LIBCPP_TEMPLATE_VIS is_member_function_pointer - : public _BoolConstant<__libcpp_is_member_pointer<__remove_cv_t<_Tp> >::__is_func> {}; - -# if _LIBCPP_STD_VER >= 17 -template -inline constexpr bool is_member_function_pointer_v = is_member_function_pointer<_Tp>::value; -# endif - -#endif // __has_builtin(__is_member_function_pointer) - _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP___TYPE_TRAITS_IS_MEMBER_FUNCTION_POINTER_H diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_member_object_pointer.h b/contrib/llvm-project/libcxx/include/__type_traits/is_member_object_pointer.h index 9141f9da530f..555794bfe038 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_member_object_pointer.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_member_object_pointer.h @@ -18,8 +18,6 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if __has_builtin(__is_member_object_pointer) - template struct _LIBCPP_TEMPLATE_VIS is_member_object_pointer : _BoolConstant<__is_member_object_pointer(_Tp)> {}; @@ -28,19 +26,6 @@ template inline constexpr bool is_member_object_pointer_v = __is_member_object_pointer(_Tp); # endif -#else // __has_builtin(__is_member_object_pointer) - -template -struct _LIBCPP_TEMPLATE_VIS is_member_object_pointer - : public _BoolConstant<__libcpp_is_member_pointer<__remove_cv_t<_Tp> >::__is_obj> {}; - -# if _LIBCPP_STD_VER >= 17 -template -inline constexpr bool is_member_object_pointer_v = is_member_object_pointer<_Tp>::value; -# endif - -#endif // __has_builtin(__is_member_object_pointer) - _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP___TYPE_TRAITS_IS_MEMBER_FUNCTION_POINTER_H diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_member_pointer.h b/contrib/llvm-project/libcxx/include/__type_traits/is_member_pointer.h index 4ca01d1c2fc8..149634fde758 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_member_pointer.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_member_pointer.h @@ -11,7 +11,6 @@ #include <__config> #include <__type_traits/integral_constant.h> -#include <__type_traits/is_member_function_pointer.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -19,8 +18,6 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if __has_builtin(__is_member_pointer) - template struct _LIBCPP_TEMPLATE_VIS is_member_pointer : _BoolConstant<__is_member_pointer(_Tp)> {}; @@ -29,19 +26,6 @@ template inline constexpr bool is_member_pointer_v = __is_member_pointer(_Tp); # endif -#else // __has_builtin(__is_member_pointer) - -template -struct _LIBCPP_TEMPLATE_VIS is_member_pointer - : public _BoolConstant<__libcpp_is_member_pointer<__remove_cv_t<_Tp> >::__is_member> {}; - -# if _LIBCPP_STD_VER >= 17 -template -inline constexpr bool is_member_pointer_v = is_member_pointer<_Tp>::value; -# endif - -#endif // __has_builtin(__is_member_pointer) - _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP___TYPE_TRAITS_IS_MEMBER_POINTER_H diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_nothrow_constructible.h b/contrib/llvm-project/libcxx/include/__type_traits/is_nothrow_constructible.h index 2f7ed8487e76..58d2b2475140 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_nothrow_constructible.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_nothrow_constructible.h @@ -13,10 +13,6 @@ #include <__type_traits/add_lvalue_reference.h> #include <__type_traits/add_rvalue_reference.h> #include <__type_traits/integral_constant.h> -#include <__type_traits/is_constructible.h> -#include <__type_traits/is_reference.h> -#include <__utility/declval.h> -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -24,85 +20,28 @@ _LIBCPP_BEGIN_NAMESPACE_STD -// GCC is disabled due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106611 -#if __has_builtin(__is_nothrow_constructible) && !defined(_LIBCPP_COMPILER_GCC) - template < class _Tp, class... _Args> struct _LIBCPP_TEMPLATE_VIS is_nothrow_constructible : public integral_constant {}; -#else - -template -struct __libcpp_is_nothrow_constructible; - -template -struct __libcpp_is_nothrow_constructible - : public integral_constant()...))> {}; - -template -void __implicit_conversion_to(_Tp) noexcept {} - -template -struct __libcpp_is_nothrow_constructible - : public integral_constant(std::declval<_Arg>()))> {}; - -template -struct __libcpp_is_nothrow_constructible : public false_type { -}; - -template -struct _LIBCPP_TEMPLATE_VIS is_nothrow_constructible - : __libcpp_is_nothrow_constructible::value, - is_reference<_Tp>::value, - _Tp, - _Args...> {}; - -template -struct _LIBCPP_TEMPLATE_VIS is_nothrow_constructible<_Tp[_Ns]> - : __libcpp_is_nothrow_constructible::value, is_reference<_Tp>::value, _Tp> {}; - -#endif // __has_builtin(__is_nothrow_constructible) #if _LIBCPP_STD_VER >= 17 template inline constexpr bool is_nothrow_constructible_v = is_nothrow_constructible<_Tp, _Args...>::value; #endif -// TODO: remove this implementation once https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106611 is fixed -#ifdef _LIBCPP_COMPILER_GCC - -template -struct _LIBCPP_TEMPLATE_VIS is_nothrow_copy_constructible - : public is_nothrow_constructible<_Tp, __add_lvalue_reference_t > {}; - -#else // _LIBCPP_COMPILER_GCC - template struct _LIBCPP_TEMPLATE_VIS is_nothrow_copy_constructible : public integral_constant< bool, __is_nothrow_constructible(_Tp, __add_lvalue_reference_t)> {}; -#endif // _LIBCPP_COMPILER_GCC - #if _LIBCPP_STD_VER >= 17 template inline constexpr bool is_nothrow_copy_constructible_v = is_nothrow_copy_constructible<_Tp>::value; #endif -// TODO: remove this implementation once https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106611 is fixed -#ifndef _LIBCPP_COMPILER_GCC - template struct _LIBCPP_TEMPLATE_VIS is_nothrow_move_constructible : public integral_constant)> {}; -#else // _LIBCPP_COMPILER_GCC - -template -struct _LIBCPP_TEMPLATE_VIS is_nothrow_move_constructible - : public is_nothrow_constructible<_Tp, __add_rvalue_reference_t<_Tp> > {}; - -#endif // _LIBCPP_COMPILER_GCC - #if _LIBCPP_STD_VER >= 17 template inline constexpr bool is_nothrow_move_constructible_v = is_nothrow_move_constructible<_Tp>::value; diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_object.h b/contrib/llvm-project/libcxx/include/__type_traits/is_object.h index 5ac1d854a695..ec04508402ce 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_object.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_object.h @@ -11,10 +11,6 @@ #include <__config> #include <__type_traits/integral_constant.h> -#include <__type_traits/is_array.h> -#include <__type_traits/is_class.h> -#include <__type_traits/is_scalar.h> -#include <__type_traits/is_union.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -22,30 +18,13 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if __has_builtin(__is_object) - template struct _LIBCPP_TEMPLATE_VIS is_object : _BoolConstant<__is_object(_Tp)> {}; -# if _LIBCPP_STD_VER >= 17 +#if _LIBCPP_STD_VER >= 17 template inline constexpr bool is_object_v = __is_object(_Tp); -# endif - -#else // __has_builtin(__is_object) - -template -struct _LIBCPP_TEMPLATE_VIS is_object - : public integral_constant::value || is_array<_Tp>::value || is_union<_Tp>::value || - is_class<_Tp>::value > {}; - -# if _LIBCPP_STD_VER >= 17 -template -inline constexpr bool is_object_v = is_object<_Tp>::value; -# endif - -#endif // __has_builtin(__is_object) +#endif _LIBCPP_END_NAMESPACE_STD diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_reference.h b/contrib/llvm-project/libcxx/include/__type_traits/is_reference.h index 42853d479039..cc157a438e49 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_reference.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_reference.h @@ -18,27 +18,30 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if __has_builtin(__is_lvalue_reference) && __has_builtin(__is_rvalue_reference) && __has_builtin(__is_reference) +template +struct _LIBCPP_TEMPLATE_VIS is_reference : _BoolConstant<__is_reference(_Tp)> {}; +#if _LIBCPP_STD_VER >= 17 template -struct _LIBCPP_TEMPLATE_VIS is_lvalue_reference : _BoolConstant<__is_lvalue_reference(_Tp)> {}; +inline constexpr bool is_reference_v = __is_reference(_Tp); +#endif + +#if __has_builtin(__is_lvalue_reference) && __has_builtin(__is_rvalue_reference) template -struct _LIBCPP_TEMPLATE_VIS is_rvalue_reference : _BoolConstant<__is_rvalue_reference(_Tp)> {}; +struct _LIBCPP_TEMPLATE_VIS is_lvalue_reference : _BoolConstant<__is_lvalue_reference(_Tp)> {}; template -struct _LIBCPP_TEMPLATE_VIS is_reference : _BoolConstant<__is_reference(_Tp)> {}; +struct _LIBCPP_TEMPLATE_VIS is_rvalue_reference : _BoolConstant<__is_rvalue_reference(_Tp)> {}; # if _LIBCPP_STD_VER >= 17 template -inline constexpr bool is_reference_v = __is_reference(_Tp); -template inline constexpr bool is_lvalue_reference_v = __is_lvalue_reference(_Tp); template inline constexpr bool is_rvalue_reference_v = __is_rvalue_reference(_Tp); # endif -#else // __has_builtin(__is_lvalue_reference) && etc... +#else // __has_builtin(__is_lvalue_reference) template struct _LIBCPP_TEMPLATE_VIS is_lvalue_reference : public false_type {}; @@ -50,17 +53,7 @@ struct _LIBCPP_TEMPLATE_VIS is_rvalue_reference : public false_type {}; template struct _LIBCPP_TEMPLATE_VIS is_rvalue_reference<_Tp&&> : public true_type {}; -template -struct _LIBCPP_TEMPLATE_VIS is_reference : public false_type {}; -template -struct _LIBCPP_TEMPLATE_VIS is_reference<_Tp&> : public true_type {}; -template -struct _LIBCPP_TEMPLATE_VIS is_reference<_Tp&&> : public true_type {}; - # if _LIBCPP_STD_VER >= 17 -template -inline constexpr bool is_reference_v = is_reference<_Tp>::value; - template inline constexpr bool is_lvalue_reference_v = is_lvalue_reference<_Tp>::value; @@ -68,7 +61,7 @@ template inline constexpr bool is_rvalue_reference_v = is_rvalue_reference<_Tp>::value; # endif -#endif // __has_builtin(__is_lvalue_reference) && etc... +#endif // __has_builtin(__is_lvalue_reference) _LIBCPP_END_NAMESPACE_STD diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_scoped_enum.h b/contrib/llvm-project/libcxx/include/__type_traits/is_scoped_enum.h index 1db88e13356e..cb3e25cf5733 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_scoped_enum.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_scoped_enum.h @@ -11,9 +11,6 @@ #include <__config> #include <__type_traits/integral_constant.h> -#include <__type_traits/is_convertible.h> -#include <__type_traits/is_enum.h> -#include <__type_traits/underlying_type.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -23,31 +20,12 @@ _LIBCPP_BEGIN_NAMESPACE_STD #if _LIBCPP_STD_VER >= 23 -// TODO: GCC and Clang both have this builtin. Remove the false case once we've updated to GCC 14. -# if __has_builtin(__is_scoped_enum) - template struct _LIBCPP_TEMPLATE_VIS is_scoped_enum : bool_constant<__is_scoped_enum(_Tp)> {}; template inline constexpr bool is_scoped_enum_v = __is_scoped_enum(_Tp); -# else - -template > -struct __is_scoped_enum_helper : false_type {}; - -template -struct __is_scoped_enum_helper<_Tp, true> : public bool_constant > > {}; - -template -struct _LIBCPP_TEMPLATE_VIS is_scoped_enum : public __is_scoped_enum_helper<_Tp> {}; - -template -inline constexpr bool is_scoped_enum_v = is_scoped_enum<_Tp>::value; - -# endif // __has_builtin(__is_scoped_enum) - #endif // _LIBCPP_STD_VER >= 23 _LIBCPP_END_NAMESPACE_STD From nobody Fri May 29 23:01:05 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRzNx5HJWz6gDxJ for ; Fri, 29 May 2026 23:01: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRzNx2Gs3z4PRm for ; Fri, 29 May 2026 23:01:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095665; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9wQaHWRQ+DRdrqaEGm5cSPFZ0EYn9kLOrrBs9Wwt4gg=; b=QzMhaHyVT3rr+HeMwUwxN8i7r3Rr+a/zL7pp86jyiORsaoDMj5aMFRC0voHI5PPuDJrsty rpjQOBP+IJmrvI7XJ6B4jFfPclbHHEOf/6hNs3ikGtpezRS/+hivdOiVBkmOwmdcuKHjH0 2cMtmWpMRMVLeCbqO01r8ktk1NQ797j5VX26woF91f5DoEIRr5HhxYCcz0kZXf8YmRYT0t gDHyeyJ/Pj4aB8FFOfmUjU1CpfsjGngs9MPMU81UJhieghHosmJO5m4lUqc12k5o/Gta1e khe3jXGjls6QB+acGKNDXa8TpkQXbG00YyIJRbmgbJtJdNjlKKETfXmZkRNRgQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780095665; a=rsa-sha256; cv=none; b=tc1pFGWeb+NgtXJSMNcLY0D3pFOQYc0YUl4CWqPTxOYBIj11SrlApTM9ozyDymrphKHEFB BOTfRh79SRUBo6JURg34uuXdcW3fUcDHwep7w5pRf7YzDSIHqselbteaT6TObZJfWo9uc8 6wBJ/KuylklDSEh9aZUEsPtfvXQ+7Y9YZ9DLvhP0ldD8PuJW0KhmWvq/bh0rGsRN61coiy MSIZD4JVPCNEo0xURzLIosUXT4rAI670Y4HCullPe6n1+1WNIcXKiX3NVN9pLrJQgvHk4j nQPlX+ZHhJYbUsVkL8cwNrmyIAKkcxYj25fcH+euB2oFqROlX5dD9xGrWKS8Ag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095665; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9wQaHWRQ+DRdrqaEGm5cSPFZ0EYn9kLOrrBs9Wwt4gg=; b=nqAoZOvESoo8Ea1eki6clsKyeIKiQEh6nA1Z/VsG7PtEZUC8+xqtdwVZQbB/D0r607wqyS fczUvumTpvmgReFiYmFNSoOCVWemOBfXr0ctWXidsuDOAkewHHk1TSc6EKdelc61m5Jks1 kY7u69X3Dn5mfBbPWod1CEwr59N1ZOtU1xW7YwsBvkBqu96oIdXY4R4bwPXfJlpMzNY0ZE df44uyXQw3hlcx/9GDi09OmTM0GYxl4IOmb+Ca3dJ0FfZ/nQbl2KoWr8mQUmtox6jZDkdF jFitMnzsSrwh8Hte++tODjzBx7ODpFLaY70R7jRDAOm7DeKlgjcW2aA6I+MU2Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRzNx1ltsztXL for ; Fri, 29 May 2026 23:01:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 42c05 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 23:01:05 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: e4b6f3f7bf91 - stable/15 - Revert "libcxx-compat: revert llvmorg-19-init-17727-g0eebb48fcfbc:" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: e4b6f3f7bf91502b84560bd4ac97db9ae33f0a42 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 23:01:05 +0000 Message-Id: <6a1a1ab1.42c05.44d9cf18@gitrepo.freebsd.org> The branch stable/15 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=e4b6f3f7bf91502b84560bd4ac97db9ae33f0a42 commit e4b6f3f7bf91502b84560bd4ac97db9ae33f0a42 Author: Dimitry Andric AuthorDate: 2025-12-06 20:24:15 +0000 Commit: Dimitry Andric CommitDate: 2026-05-29 22:57:28 +0000 Revert "libcxx-compat: revert llvmorg-19-init-17727-g0eebb48fcfbc:" This reverts commit f12b6acbe1ea1c425c0e21d80097115e4ad33017, in preparation for merging llvm 21. PR: 292067 MFC after: 1 month (cherry picked from commit 1f9c1cd08dba0c46c1e1cea43b3bbea23af4fbaa) --- .../libcxx/include/__type_traits/invoke.h | 3 +-- .../__type_traits/is_member_function_pointer.h | 31 ---------------------- .../__type_traits/is_member_object_pointer.h | 31 ---------------------- .../include/__type_traits/is_member_pointer.h | 12 +++++++++ .../llvm-project/libcxx/include/module.modulemap | 2 -- contrib/llvm-project/libcxx/include/type_traits | 2 -- 6 files changed, 13 insertions(+), 68 deletions(-) diff --git a/contrib/llvm-project/libcxx/include/__type_traits/invoke.h b/contrib/llvm-project/libcxx/include/__type_traits/invoke.h index a0281f5b2006..71db32ae6a3c 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/invoke.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/invoke.h @@ -17,8 +17,7 @@ #include <__type_traits/integral_constant.h> #include <__type_traits/is_base_of.h> #include <__type_traits/is_core_convertible.h> -#include <__type_traits/is_member_function_pointer.h> -#include <__type_traits/is_member_object_pointer.h> +#include <__type_traits/is_member_pointer.h> #include <__type_traits/is_reference_wrapper.h> #include <__type_traits/is_same.h> #include <__type_traits/is_void.h> diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_member_function_pointer.h b/contrib/llvm-project/libcxx/include/__type_traits/is_member_function_pointer.h deleted file mode 100644 index 037d5ca04ab0..000000000000 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_member_function_pointer.h +++ /dev/null @@ -1,31 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef _LIBCPP___TYPE_TRAITS_IS_MEMBER_FUNCTION_POINTER_H -#define _LIBCPP___TYPE_TRAITS_IS_MEMBER_FUNCTION_POINTER_H - -#include <__config> -#include <__type_traits/integral_constant.h> - -#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) -# pragma GCC system_header -#endif - -_LIBCPP_BEGIN_NAMESPACE_STD - -template -struct _LIBCPP_TEMPLATE_VIS is_member_function_pointer : _BoolConstant<__is_member_function_pointer(_Tp)> {}; - -# if _LIBCPP_STD_VER >= 17 -template -inline constexpr bool is_member_function_pointer_v = __is_member_function_pointer(_Tp); -# endif - -_LIBCPP_END_NAMESPACE_STD - -#endif // _LIBCPP___TYPE_TRAITS_IS_MEMBER_FUNCTION_POINTER_H diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_member_object_pointer.h b/contrib/llvm-project/libcxx/include/__type_traits/is_member_object_pointer.h deleted file mode 100644 index 555794bfe038..000000000000 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_member_object_pointer.h +++ /dev/null @@ -1,31 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef _LIBCPP___TYPE_TRAITS_IS_MEMBER_OBJECT_POINTER_H -#define _LIBCPP___TYPE_TRAITS_IS_MEMBER_OBJECT_POINTER_H - -#include <__config> -#include <__type_traits/integral_constant.h> - -#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) -# pragma GCC system_header -#endif - -_LIBCPP_BEGIN_NAMESPACE_STD - -template -struct _LIBCPP_TEMPLATE_VIS is_member_object_pointer : _BoolConstant<__is_member_object_pointer(_Tp)> {}; - -# if _LIBCPP_STD_VER >= 17 -template -inline constexpr bool is_member_object_pointer_v = __is_member_object_pointer(_Tp); -# endif - -_LIBCPP_END_NAMESPACE_STD - -#endif // _LIBCPP___TYPE_TRAITS_IS_MEMBER_FUNCTION_POINTER_H diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_member_pointer.h b/contrib/llvm-project/libcxx/include/__type_traits/is_member_pointer.h index 149634fde758..cc125e318cf9 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_member_pointer.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_member_pointer.h @@ -21,9 +21,21 @@ _LIBCPP_BEGIN_NAMESPACE_STD template struct _LIBCPP_TEMPLATE_VIS is_member_pointer : _BoolConstant<__is_member_pointer(_Tp)> {}; +template +struct _LIBCPP_TEMPLATE_VIS is_member_object_pointer : _BoolConstant<__is_member_object_pointer(_Tp)> {}; + +template +struct _LIBCPP_TEMPLATE_VIS is_member_function_pointer : _BoolConstant<__is_member_function_pointer(_Tp)> {}; + # if _LIBCPP_STD_VER >= 17 template inline constexpr bool is_member_pointer_v = __is_member_pointer(_Tp); + +template +inline constexpr bool is_member_object_pointer_v = __is_member_object_pointer(_Tp); + +template +inline constexpr bool is_member_function_pointer_v = __is_member_function_pointer(_Tp); # endif _LIBCPP_END_NAMESPACE_STD diff --git a/contrib/llvm-project/libcxx/include/module.modulemap b/contrib/llvm-project/libcxx/include/module.modulemap index 8e0ba6eebac4..d76659664f75 100644 --- a/contrib/llvm-project/libcxx/include/module.modulemap +++ b/contrib/llvm-project/libcxx/include/module.modulemap @@ -1976,8 +1976,6 @@ module std_private_type_traits_is_implicitly_default_constructible [system } module std_private_type_traits_is_integral [system] { header "__type_traits/is_integral.h" } module std_private_type_traits_is_literal_type [system] { header "__type_traits/is_literal_type.h" } -module std_private_type_traits_is_member_function_pointer [system] { header "__type_traits/is_member_function_pointer.h" } -module std_private_type_traits_is_member_object_pointer [system] { header "__type_traits/is_member_object_pointer.h" } module std_private_type_traits_is_member_pointer [system] { header "__type_traits/is_member_pointer.h" } module std_private_type_traits_is_nothrow_assignable [system] { header "__type_traits/is_nothrow_assignable.h" } module std_private_type_traits_is_nothrow_constructible [system] { diff --git a/contrib/llvm-project/libcxx/include/type_traits b/contrib/llvm-project/libcxx/include/type_traits index 08badb6aa06e..ffa137338b6a 100644 --- a/contrib/llvm-project/libcxx/include/type_traits +++ b/contrib/llvm-project/libcxx/include/type_traits @@ -453,8 +453,6 @@ namespace std #include <__type_traits/is_fundamental.h> #include <__type_traits/is_integral.h> #include <__type_traits/is_literal_type.h> -#include <__type_traits/is_member_function_pointer.h> -#include <__type_traits/is_member_object_pointer.h> #include <__type_traits/is_member_pointer.h> #include <__type_traits/is_nothrow_assignable.h> #include <__type_traits/is_nothrow_constructible.h> From nobody Fri May 29 23:01:06 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRzNy6Tv4z6gDrS for ; Fri, 29 May 2026 23:01: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRzNy33jNz4Pjt for ; Fri, 29 May 2026 23:01:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095666; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sAE5nshCqN6LluzLv8sD66Vw/0VFQfQSXzoMKmOgNRk=; b=kVp7ejWfGB/Gs3PFd9kD6OhxubW0k8O9dv6IgUFd5x+jicDn9QJN3uarZ9fZ7TkD/fuUKE YZlDlva9n/IpM55Vif61WOGgLAEkM8rD+mCY3ZDJb0tLPwHIfSuuH+5iyEXU5TsgfmkDlf uLrYTHyUbZCbZF3lhIEZI5i/247KBW2NVYdraFdeXLg+hn/nlIlkZl4FyqwTWk5C6E4nIJ QszfjanDUzxVqgaJocIX8QVMf301ybxrTm9wMpbZY7w9AabXDv/34/jYpAS6L4AmVDaC+q cyH7+T39b2tTUc36cbx2GrB3qawd65iAcfgKShZvwHL/oWyM2Pbjj99kWR/QuQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780095666; a=rsa-sha256; cv=none; b=Lo6y/7EfcWRLvmPUsxxMrm8vrb8KaG35NzTxZWkJuS5MfY1lgmmg5mg0xzcnNi8PkiCSII GY3iu0MuerALPIDA/S2PcjnJkJijc/5YKUsCwFYe0iIv00duagqDixArkjT15s1zG1/tU5 FTw0g/IzNMz0QzWfrjIAC7bZMxhzWTLpCcjZ/lZ53bqEqcd6JJpjnSmdVr3LnqHiI6gGhO QfV0UuXlnOi7b4u7odJY/uYl7dDIUw9/6uduwXFwLKeNFXkSubxxvUXitlXB1sBscr4p3A 5Lutg3BXFZ1FtGbFSia41Ie9n0q/Y/0g5MK+YJ1GDLHzHQ1+b/zDlOpd53hsPw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095666; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sAE5nshCqN6LluzLv8sD66Vw/0VFQfQSXzoMKmOgNRk=; b=uWaYu1/1RtPG/r4YQn767QbTd0e0oOubaLERMqwukZB4BAZRHKMhwRBBPAu8egkiSIV3LU tJzL96UPV8nhcF95Bb8BUeWqMvw2VCsizfNNKWrlFLqqBkmg6C2hK36TlAki4jQIp5Sbut j/WtUgAqfUTyUr7nlAM1xbQYAes2jrzgk1ZB+0h+x8Fog1qpOoPgZOdU5HeHklOGadnpjH +BTy/mNid0nUSAYtPR7O4QN6qyRtHre3z6gccxuVsHrv9c3wbQf5xVRyzWjhNoJq947v3j GCN+iJKiSNGiN1fFpza8gGdwiGcJ3c7WYHL6/LrPxqM1slvCdvw1a/LxlEuVUw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRzNy2d5gztRr for ; Fri, 29 May 2026 23:01:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4192e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 23:01:06 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: ef16f2c6dcfe - stable/15 - Revert "libcxx-compat: revert llvmorg-19-init-17728-g30cc12cd818d:" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: ef16f2c6dcfe68ff30efe31a497cfd90d8cad715 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 23:01:06 +0000 Message-Id: <6a1a1ab2.4192e.ecac110@gitrepo.freebsd.org> The branch stable/15 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=ef16f2c6dcfe68ff30efe31a497cfd90d8cad715 commit ef16f2c6dcfe68ff30efe31a497cfd90d8cad715 Author: Dimitry Andric AuthorDate: 2025-12-06 20:24:15 +0000 Commit: Dimitry Andric CommitDate: 2026-05-29 22:57:29 +0000 Revert "libcxx-compat: revert llvmorg-19-init-17728-g30cc12cd818d:" This reverts commit 198b947ebc6834eade6acc52c5441a38693b8822, in preparation for merging llvm 21. PR: 292067 MFC after: 1 month (cherry picked from commit f8152c67d4272e155460e4b3057b41924df8af1c) --- .../libcxx/include/__type_traits/is_fundamental.h | 2 +- .../libcxx/include/__type_traits/is_null_pointer.h | 12 +++--------- .../llvm-project/libcxx/include/__type_traits/is_scalar.h | 2 +- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_fundamental.h b/contrib/llvm-project/libcxx/include/__type_traits/is_fundamental.h index 57206e0d9deb..55f8e41f75f4 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_fundamental.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_fundamental.h @@ -34,7 +34,7 @@ inline constexpr bool is_fundamental_v = __is_fundamental(_Tp); template struct _LIBCPP_TEMPLATE_VIS is_fundamental - : public integral_constant::value || __is_nullptr_t<_Tp>::value || is_arithmetic<_Tp>::value> {}; + : public integral_constant::value || __is_null_pointer_v<_Tp> || is_arithmetic<_Tp>::value> {}; # if _LIBCPP_STD_VER >= 17 template diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_null_pointer.h b/contrib/llvm-project/libcxx/include/__type_traits/is_null_pointer.h index c666f5f24759..9f5697e23268 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_null_pointer.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_null_pointer.h @@ -11,7 +11,6 @@ #include <__config> #include <__type_traits/integral_constant.h> -#include <__type_traits/remove_cv.h> #include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) @@ -21,20 +20,15 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -struct __is_nullptr_t_impl : public false_type {}; -template <> -struct __is_nullptr_t_impl : public true_type {}; - -template -struct _LIBCPP_TEMPLATE_VIS __is_nullptr_t : public __is_nullptr_t_impl<__remove_cv_t<_Tp> > {}; +inline const bool __is_null_pointer_v = __is_same(__remove_cv(_Tp), nullptr_t); #if _LIBCPP_STD_VER >= 14 template -struct _LIBCPP_TEMPLATE_VIS is_null_pointer : public __is_nullptr_t_impl<__remove_cv_t<_Tp> > {}; +struct _LIBCPP_TEMPLATE_VIS is_null_pointer : integral_constant> {}; # if _LIBCPP_STD_VER >= 17 template -inline constexpr bool is_null_pointer_v = is_null_pointer<_Tp>::value; +inline constexpr bool is_null_pointer_v = __is_null_pointer_v<_Tp>; # endif #endif // _LIBCPP_STD_VER >= 14 diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_scalar.h b/contrib/llvm-project/libcxx/include/__type_traits/is_scalar.h index 15f1c71554f2..455200de4720 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_scalar.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_scalar.h @@ -49,7 +49,7 @@ struct _LIBCPP_TEMPLATE_VIS is_scalar bool, is_arithmetic<_Tp>::value || is_member_pointer<_Tp>::value || is_pointer<_Tp>::value || - __is_nullptr_t<_Tp>::value || + __is_null_pointer_v<_Tp> || __is_block<_Tp>::value || is_enum<_Tp>::value> {}; // clang-format on From nobody Fri May 29 23:01:08 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRzP06gLvz6gDkj for ; Fri, 29 May 2026 23:01: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRzP04v4jz4Phg for ; Fri, 29 May 2026 23:01:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ihgKTugkycgei/NmFem4BwcZP51NGVHH5CcuPeGdBdU=; b=LQcAARwuiVHe8EYijvlCGM6lH4W5QewCHg8FvVeDOwi+851EEyjBT1Gx8lmLYVOF+EPnRE 9WoUWMVoz+ka8oHP3v9PZq3XuMmaUjeZBWQrI96XoIeBOmw7qBthWH9l8hU9Mvn40E+QxT zQZ8atqiIWk1/uvXAJyCP2zRsAENpa1hPByMhwkLpDTgRrD7ZV0GJeRpCketse3xwm8pdT p/7fslR28J0uD1v/lrmASuz07h7sVs/AtY2HYdeShf68m3Zy5eiH+ySOHqhHoMuUcYZFq4 puI1dAPGOB02n2HU9HBIA8Tt1eVeUhbcRc+H28J1kR1Qf6LaGt4fRUgWiJkyJw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780095668; a=rsa-sha256; cv=none; b=vrdT9HLkJlvrWvnx4OCiVmaqKFDm9NfS/dY7HUTrIu42sy8j2Gnv5e0NoYyPIUcMU4JmtG pwabJ9q7d0Xb6U0eZG4lQ3vAvu4kdDb6G3U45skxx8Ep0HoUxOxWsYF8UiJ5JJK0nMT74I TAEbytf+HiS+GbGgeJO1Kq3i6OzZ53FLoT2HhI3BWN1lKxvPKuS09684JDLBCAp+n2NfzJ Na4d80YBGyQQmbe2tk5WoqbKGsQ5vDYfGp1B7NQxnx5vyVUmTNeWWtuTgikhniZUaMQFNX pZwJDVnY6QdpZ7jVkc+gv0xTK5gbWNry01vSUxImMKV4GCPZYL9Ktsl8jeM0Qw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ihgKTugkycgei/NmFem4BwcZP51NGVHH5CcuPeGdBdU=; b=mmHOulmUOhL2sCDwW/E1iGL9cz+T7DDTM6kUpA+TXt+ziI87dXQtZ7ifhNsfOipvEG70lS Ry5s0BFN4etf/ey0gSWar5BzgUkNf1WJnX4AfH8US//tocm/X4wVQ7OKXLQuFTzm2QuBSn yJ5rP6ifwJVCCYYgsrxkkOOHFsgJXEsNhvuKYprnEK6lyoM+2T27wOCzbqzqrsZH1k+LIA K8H9q+r/QSajMy8PUJqVBRpH/Eu8dda2j0LxmlbBa/XnjqL1ykcd0uJqJAqvRA92hd8p0E qdAkrlzaNSLu8p3Bfwws3FXT8udDFU2kXnNyJ+ckYrOFMkSCFFfv7bxm3PeakQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRzP04KsvztR4 for ; Fri, 29 May 2026 23:01:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 41426 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 23:01:08 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: f5fe24ba5805 - stable/15 - Revert "libcxx-compat: revert llvmorg-19-init-18062-g4dfa75c663e5:" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: f5fe24ba58054e425688458ad641364338dd9393 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 23:01:08 +0000 Message-Id: <6a1a1ab4.41426.3150c969@gitrepo.freebsd.org> The branch stable/15 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=f5fe24ba58054e425688458ad641364338dd9393 commit f5fe24ba58054e425688458ad641364338dd9393 Author: Dimitry Andric AuthorDate: 2025-12-06 20:24:16 +0000 Commit: Dimitry Andric CommitDate: 2026-05-29 22:57:29 +0000 Revert "libcxx-compat: revert llvmorg-19-init-18062-g4dfa75c663e5:" This reverts commit 6933315cf57fc3f505431bff7a0075df471d7453, in preparation for merging llvm 21. PR: 292067 MFC after: 1 month (cherry picked from commit f3b0cac70b80116e691ad1e6daa5110186233206) --- .../libcxx/include/__type_traits/is_enum.h | 10 +++++++ .../libcxx/include/__type_traits/is_scoped_enum.h | 33 ---------------------- .../llvm-project/libcxx/include/module.modulemap | 1 - contrib/llvm-project/libcxx/include/type_traits | 4 --- 4 files changed, 10 insertions(+), 38 deletions(-) diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_enum.h b/contrib/llvm-project/libcxx/include/__type_traits/is_enum.h index 77ca3ea10874..2fab6db2c8d5 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_enum.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_enum.h @@ -26,6 +26,16 @@ template inline constexpr bool is_enum_v = __is_enum(_Tp); #endif +#if _LIBCPP_STD_VER >= 23 + +template +struct _LIBCPP_TEMPLATE_VIS is_scoped_enum : bool_constant<__is_scoped_enum(_Tp)> {}; + +template +inline constexpr bool is_scoped_enum_v = __is_scoped_enum(_Tp); + +#endif // _LIBCPP_STD_VER >= 23 + _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP___TYPE_TRAITS_IS_ENUM_H diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_scoped_enum.h b/contrib/llvm-project/libcxx/include/__type_traits/is_scoped_enum.h deleted file mode 100644 index cb3e25cf5733..000000000000 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_scoped_enum.h +++ /dev/null @@ -1,33 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef _LIBCPP___TYPE_TRAITS_IS_SCOPED_ENUM_H -#define _LIBCPP___TYPE_TRAITS_IS_SCOPED_ENUM_H - -#include <__config> -#include <__type_traits/integral_constant.h> - -#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) -# pragma GCC system_header -#endif - -_LIBCPP_BEGIN_NAMESPACE_STD - -#if _LIBCPP_STD_VER >= 23 - -template -struct _LIBCPP_TEMPLATE_VIS is_scoped_enum : bool_constant<__is_scoped_enum(_Tp)> {}; - -template -inline constexpr bool is_scoped_enum_v = __is_scoped_enum(_Tp); - -#endif // _LIBCPP_STD_VER >= 23 - -_LIBCPP_END_NAMESPACE_STD - -#endif // _LIBCPP___TYPE_TRAITS_IS_SCOPED_ENUM_H diff --git a/contrib/llvm-project/libcxx/include/module.modulemap b/contrib/llvm-project/libcxx/include/module.modulemap index d76659664f75..13d0dce34d97 100644 --- a/contrib/llvm-project/libcxx/include/module.modulemap +++ b/contrib/llvm-project/libcxx/include/module.modulemap @@ -2013,7 +2013,6 @@ module std_private_type_traits_is_scalar [system header "__type_traits/is_scalar.h" export std_private_type_traits_is_null_pointer } -module std_private_type_traits_is_scoped_enum [system] { header "__type_traits/is_scoped_enum.h" } module std_private_type_traits_is_signed [system] { header "__type_traits/is_signed.h" } module std_private_type_traits_is_signed_integer [system] { header "__type_traits/is_signed_integer.h" } module std_private_type_traits_is_specialization [system] { header "__type_traits/is_specialization.h" } diff --git a/contrib/llvm-project/libcxx/include/type_traits b/contrib/llvm-project/libcxx/include/type_traits index ffa137338b6a..7f231cd09df5 100644 --- a/contrib/llvm-project/libcxx/include/type_traits +++ b/contrib/llvm-project/libcxx/include/type_traits @@ -514,10 +514,6 @@ namespace std # include <__type_traits/unwrap_ref.h> #endif -#if _LIBCPP_STD_VER >= 23 -# include <__type_traits/is_scoped_enum.h> -#endif - #include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) From nobody Fri May 29 23:01:07 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRzNz6Lgsz6gDdx for ; Fri, 29 May 2026 23:01: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRzNz44QSz4PGV for ; Fri, 29 May 2026 23:01:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095667; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y5Z8fOzpzpNTRPbCzs3+9z6ahuhuqx+zETgbksTmNL0=; b=DcpZvzm9cgXowYfBbxAxjXuxmAxmAU8LLyNiJM59RlKvvqIx8/qyGGpDtyM43m4ZowxVZj ViFsA9y5hil5griryC7nmYvtfY8hxG0a4hnfX05fiMKfs46KPeTOygzxsp74xoEwkrZT3o Orvsi+eu35+kfKjQeG13iReTyLeendSwC76Jk1B46+bZ2+gfTixtOkZBd6oy5dnxsG6KaB t/2lT8bP6Tqzpje67DM69jFuYk6cAdMQ4i7RPiSKNsvZp+66i6HvxzNr0TbXgjZ+ReuJqq wRd2KqxRBomLOJ8rPjFkjx8CCa60MlW1I5JM9DCYUBkgIB17ljNIgVB4H8wPFA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780095667; a=rsa-sha256; cv=none; b=rw2Iso/266bopdaTMsh6d+89UgjEs3AVTyABuyzP4iQZ8ZCW70zl5VXqL4tupsEUHqbIn2 z5fVqrJMp1Htq0Lzh0hPTHQPOQ6Tz5gotoLEHV3sVSS1kDK9BLTIJrKwsc8VSkmQYavOGE 96iBun+PQVnlr8JpmPRIV1GFawc32yTn6xg6DFZ7u5bSKaVC8CgCxHQ26DkpRH1ZsKQC8O MuaxtLwJYdSh/+EOeFothiOpKsg/cJuc9ScQfK/LoZbWqfVl/bJzIV5OuygLCg3/Du+h+h oaPWUbLYEN4i5Ww4brp8QaSqld6pWeWD1BW3ItdG7uj2vskpcjQsRnwQdbVvBg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095667; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y5Z8fOzpzpNTRPbCzs3+9z6ahuhuqx+zETgbksTmNL0=; b=OHX9Y8o48xjo/RGXCygdqO5BT9B9AYIcN3JqinK7hNV7OLWTSNjnD7Y5b0VM+2bvlVMwyv TRk1a+qU4T42Ke1Lk3AJPuaDhsevm92MeKgr1MazDees5tVxI+H4f/P8rxnq4WToEjFE6a RdYOUpcd1nUMw85M4OYi6rBeR8fYYq+yIRl9zEFkgL0McRfh0bvW15P6z84DSmLXzb1O9V qJsi3tSsKTFnGCVRa/ilZm/ICNI5476NKyV56qEyRCjmjn+v+h6Pj5dx2PoaE6LqvAGMeH fsQr0jsh/lY26RInpe6hbvljHikcYeioWi9L4rPbFHjl+bemursliwvB8LcYrg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRzNz3TS2ztFl for ; Fri, 29 May 2026 23:01:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 42754 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 23:01:07 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 4c339767d627 - stable/15 - Revert "libcxx-compat: revert llvmorg-19-init-17853-g578c6191eff7:" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 4c339767d6273154dcfd7a39bccf8d871be411ca Auto-Submitted: auto-generated Date: Fri, 29 May 2026 23:01:07 +0000 Message-Id: <6a1a1ab3.42754.32a8498a@gitrepo.freebsd.org> The branch stable/15 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=4c339767d6273154dcfd7a39bccf8d871be411ca commit 4c339767d6273154dcfd7a39bccf8d871be411ca Author: Dimitry Andric AuthorDate: 2025-12-06 20:24:15 +0000 Commit: Dimitry Andric CommitDate: 2026-05-29 22:57:29 +0000 Revert "libcxx-compat: revert llvmorg-19-init-17853-g578c6191eff7:" This reverts commit 2facc097b9b28a81b925c924f27f09b40f29fd4d, in preparation for merging llvm 21. PR: 292067 MFC after: 1 month (cherry picked from commit 3b0a0e64bd9f0a65f0dd62dc157597e6d9ecc933) --- .../libcxx/include/__type_traits/is_void.h | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_void.h b/contrib/llvm-project/libcxx/include/__type_traits/is_void.h index 4c27060530c8..46316b0d3a53 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_void.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_void.h @@ -11,8 +11,6 @@ #include <__config> #include <__type_traits/integral_constant.h> -#include <__type_traits/is_same.h> -#include <__type_traits/remove_cv.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -20,28 +18,14 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if __has_builtin(__is_void) - template -struct _LIBCPP_TEMPLATE_VIS is_void : _BoolConstant<__is_void(_Tp)> {}; +struct _LIBCPP_TEMPLATE_VIS is_void : _BoolConstant<__is_same(__remove_cv(_Tp), void)> {}; # if _LIBCPP_STD_VER >= 17 template -inline constexpr bool is_void_v = __is_void(_Tp); +inline constexpr bool is_void_v = __is_same(__remove_cv(_Tp), void); # endif -#else - -template -struct _LIBCPP_TEMPLATE_VIS is_void : public is_same<__remove_cv_t<_Tp>, void> {}; - -# if _LIBCPP_STD_VER >= 17 -template -inline constexpr bool is_void_v = is_void<_Tp>::value; -# endif - -#endif // __has_builtin(__is_void) - _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP___TYPE_TRAITS_IS_VOID_H From nobody Fri May 29 23:01:09 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRzP21yNTz6gDxR for ; Fri, 29 May 2026 23:01: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRzP15Z3cz4PfC for ; Fri, 29 May 2026 23:01:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095669; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pO5U0+0CZy1IN30nlJ6vjUgAIV1GT3oovoY75COno3Y=; b=kfXGMpPSNGrrhp4dIMfqefnLXsbQH28Lyhio0E7v8jHc46XeS/WOApg10YXbLWLEU5BxEL j4V0q+K6hY8xl5K3PgbjS4D9zdT7jZV8ldETMxROHyw/PmPfocNlrO3p6EgiCy2ob3Iacm gT0/L6ND4mjVDu2RAUSakiU0tHI+Wtiyk65F35qDBltZVE+ODGEw+xJeurzgG4/qCTgitj oC6gaSn2dygDkQWsdxWCuytkFNjsyDxVG9MH/e9S0vr/I3np5avjglonr0Upotn/K46VrK 6lrIlKI5f8T/iAhbaEJOdJfFrezRNczNzo9E21y+ww/eS3r9opquTsSttpa39g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780095669; a=rsa-sha256; cv=none; b=XFG2lPiGG4aeCF82d3LUbv8ed7VWj3/x8cN278IdHgKTbBfJMP+BPobkHeReOkui+Ery8J LFOdb0XEJ6tTL9d541wdFhR67qpnzdWCH4Jm8koIqna2Kben54TA9RLfCg8Upv6vNTfbKv b7FK5LRjzOibxVhI4oO5WmAIshMmbGTY3E3Uhqj2AFM/0UxTQO2u73RoMW49HxjI31GcdN haK5EJQ4qRfi/kvcdYTxszkFritu9wL1zPob+rj/Lj3sR7chJIV6sPxvt53ZkGdNjZhMpd 48PV62uZpREriRSiggQ/gL5WtThFOvVrJqjfVPFdlSwO+IlH753BU7r6mQj16A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095669; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pO5U0+0CZy1IN30nlJ6vjUgAIV1GT3oovoY75COno3Y=; b=DJqNTnEhzq/PPS44LzvNkgJyCljHOlzJ+g6pO1719lcN4O0MEa9+Ha7h9l9jjgU0kXdIu4 j1HkMaUMCMotuFg48eiDCi3vo0HFXepVaaaexwjLvywGRWwsAsG6+S+xEWyf/+5yR722R2 cZtqnQqlwzTYioToWj6K+0m54Qn0VbcjN6lqcP9LpVYzFnwojNXnUkG+4seX2xzuRMjC8N CVZUThtO5olksXXigR0KtKKEQm5/FNW3piUwz/j8u9ZdrEO/wtnNo33CI7pCmdzDEQcCQ+ E5o1+5JIwv/3I6ptZZw17TVI9pQygoJ9L1blwNhI58UYc4GYUyB4CsY+V/rvvg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRzP153cYzskr for ; Fri, 29 May 2026 23:01:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 42baf by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 23:01:09 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: cfbe04310e25 - stable/15 - Revert "libcxx-compat: revert llvmorg-19-init-18063-g561246e90282:" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: cfbe04310e254890c471f97f03dc7c3c5e9af01c Auto-Submitted: auto-generated Date: Fri, 29 May 2026 23:01:09 +0000 Message-Id: <6a1a1ab5.42baf.730ab411@gitrepo.freebsd.org> The branch stable/15 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=cfbe04310e254890c471f97f03dc7c3c5e9af01c commit cfbe04310e254890c471f97f03dc7c3c5e9af01c Author: Dimitry Andric AuthorDate: 2025-12-06 20:24:16 +0000 Commit: Dimitry Andric CommitDate: 2026-05-29 22:57:29 +0000 Revert "libcxx-compat: revert llvmorg-19-init-18063-g561246e90282:" This reverts commit 1d99ada3215dbc28665fe051f9ccf028a2a02ce8, in preparation for merging llvm 21. PR: 292067 MFC after: 1 month (cherry picked from commit 6243d755fb82e62d2a3a2e031801e0443150454a) --- contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h b/contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h index 2c4e9e419a1b..50e9f3e8aa78 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h @@ -28,7 +28,7 @@ using __remove_cv_t = typename remove_cv<_Tp>::type; #else template using __remove_cv_t = __remove_cv(_Tp); -#endif // __has_builtin(__remove_cv) +#endif #if _LIBCPP_STD_VER >= 14 template From nobody Fri May 29 23:01:38 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRzPb0LFMz6gDs4 for ; Fri, 29 May 2026 23:01: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRzPZ4NQVz4QTt for ; Fri, 29 May 2026 23:01:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095698; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RL6hYqiUSP6hHF+R18S+rgqdtM/6DBhlxfqeEKZw+VU=; b=kCEBMv+RagtzjPTv0fmIysYQ9V6BnjThX8Nc3jU68bOGoEpS9RYWZFzDtFISqRioeQodjT uAQ2O1RaEy/QMN8DusCyvI8fgIVKajsoujQZhN5xUXEVytrZqmLkKYdBp0O2psSdEuPshJ PCIR/pKoMdbTFCrqKEesOSJgLoPhSqS3ppAoTgUmsdhbMQadFGqwOCn00NCM3I52P9udQD 4/URNCDsPCWGEcs0NObAojCIW2RR9VAjYLtxOkNE9GRNafq2ZpUoAZ/NlIHScuxfcd46pN sPS6UpX7ePPb5Ojc/b1wSOb/lEzMLE0OwHd8pDOlE45QtyrHVpB9vCj6Y4M6dA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780095698; a=rsa-sha256; cv=none; b=veDenwsHsTnjcKuKeI4gpMuBgo9B53kYfI+4SLRG/vMifxyu2a6ETMKvoQuts2I8/Fx1Ik afvqOCJ6oIDI5q9ZCJH7yDX/aniJmKb+pE8Tv/vp+2+eJhzkdgUFr/Kmo84UnnZBX5iDJA VmS6zI5Qe2CfBK+Kcr1D1v5HHi+fq9idnck9eDgBAoYokIG4UEj7xX2Soke6GUml5iUoVi 27reN/KRZhAp2T8MAdfQ5mw6J4a6Kq6y7cQ8Yu/juyxr4/RVv3AYNdJvnwbMkGPHRadnM0 uAP3/Ijtrpy1Sku8I8EQn3ROYz+UlkHzoXWSb3y8Tn1hXfD9ioe3WVzYQlqiew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095698; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RL6hYqiUSP6hHF+R18S+rgqdtM/6DBhlxfqeEKZw+VU=; b=s14jXxLQV91DEeTLogMh0eGjLQAhRudhPwaiGU1uzh9a6yIWdbJk+2+JuxvGH2+hhuiXw7 e5wJxDgvXqjsxPw9UbdAlMIt3TOIaKbyPcfUvdZXLRc2rPVQHY19nc6JIx2KPgcU1WYySH OORzouSRK91jbgmkHjdm3KgWzdpWbk5i7K2FLTWO2oL0IEZpxWwfOERp3IMxbtHTRt8Pjt EcvQW2loi9xldaLm6OPNfFFPMH9kWmkcnsRkDM5MC1fCgteqhYp+Jf2xTmwBtpmzajs3Cv MwJ4Nu4Fn3R3miV7JphXZs5kw/5eKpX0dF5d26fiuMGLp5wBWWL2lzACFQV1RQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRzPZ3rrBztFt for ; Fri, 29 May 2026 23:01:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 421b7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 23:01:38 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: c76ec2942795 - stable/15 - Adjust llvm-project main llvmorg-21-init-19288-gface93e724f4, part 1 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: c76ec29427955975909939e41052e19d000cf008 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 23:01:38 +0000 Message-Id: <6a1a1ad2.421b7.2c193d58@gitrepo.freebsd.org> The branch stable/15 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=c76ec29427955975909939e41052e19d000cf008 commit c76ec29427955975909939e41052e19d000cf008 Author: Dimitry Andric AuthorDate: 2025-12-07 19:01:02 +0000 Commit: Dimitry Andric CommitDate: 2026-05-29 22:57:30 +0000 Adjust llvm-project main llvmorg-21-init-19288-gface93e724f4, part 1 This adjusts the llvmorg-21-init-19288-gface93e724f4 import: add partial third-party/ top-level directory. PR: 292067 MFC after: 1 month (cherry picked from commit 3f16c588d1d8c46d7025f95003602807d9c1ddb9) --- .../third-party/siphash/include/siphash/SipHash.h | 160 +++++++++++++++++++++ 1 file changed, 160 insertions(+) diff --git a/contrib/llvm-project/third-party/siphash/include/siphash/SipHash.h b/contrib/llvm-project/third-party/siphash/include/siphash/SipHash.h new file mode 100644 index 000000000000..ca4fe45e4fdd --- /dev/null +++ b/contrib/llvm-project/third-party/siphash/include/siphash/SipHash.h @@ -0,0 +1,160 @@ +//===--- SipHash.h - An implementation of SipHash -------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// +// This is a header-only implementation of SipHash. It lacks library +// dependencies so it can be used from LLVM and compiler-rt. +// +//===----------------------------------------------------------------------===// + +#include +#include + +// Lightly adapted from the SipHash reference C implementation: +// https://github.com/veorq/SipHash +// by Jean-Philippe Aumasson and Daniel J. Bernstein + +#define ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b)))) + +#define U32TO8_LE(p, v) \ + (p)[0] = (uint8_t)((v)); \ + (p)[1] = (uint8_t)((v) >> 8); \ + (p)[2] = (uint8_t)((v) >> 16); \ + (p)[3] = (uint8_t)((v) >> 24); + +#define U64TO8_LE(p, v) \ + U32TO8_LE((p), (uint32_t)((v))); \ + U32TO8_LE((p) + 4, (uint32_t)((v) >> 32)); + +#define U8TO64_LE(p) \ + (((uint64_t)((p)[0])) | ((uint64_t)((p)[1]) << 8) | \ + ((uint64_t)((p)[2]) << 16) | ((uint64_t)((p)[3]) << 24) | \ + ((uint64_t)((p)[4]) << 32) | ((uint64_t)((p)[5]) << 40) | \ + ((uint64_t)((p)[6]) << 48) | ((uint64_t)((p)[7]) << 56)) + +#define SIPROUND \ + do { \ + v0 += v1; \ + v1 = ROTL(v1, 13); \ + v1 ^= v0; \ + v0 = ROTL(v0, 32); \ + v2 += v3; \ + v3 = ROTL(v3, 16); \ + v3 ^= v2; \ + v0 += v3; \ + v3 = ROTL(v3, 21); \ + v3 ^= v0; \ + v2 += v1; \ + v1 = ROTL(v1, 17); \ + v1 ^= v2; \ + v2 = ROTL(v2, 32); \ + } while (0) + +namespace { + +/// Computes a SipHash value +/// +/// \param in: pointer to input data (read-only) +/// \param inlen: input data length in bytes (any size_t value) +/// \param k: reference to the key data 16-byte array (read-only) +/// \returns output data, must be 8 or 16 bytes +/// +template +void siphash(const unsigned char *in, uint64_t inlen, + const unsigned char (&k)[16], unsigned char (&out)[outlen]) { + + const unsigned char *ni = (const unsigned char *)in; + const unsigned char *kk = (const unsigned char *)k; + + static_assert(outlen == 8 || outlen == 16, "result should be 8 or 16 bytes"); + + uint64_t v0 = UINT64_C(0x736f6d6570736575); + uint64_t v1 = UINT64_C(0x646f72616e646f6d); + uint64_t v2 = UINT64_C(0x6c7967656e657261); + uint64_t v3 = UINT64_C(0x7465646279746573); + uint64_t k0 = U8TO64_LE(kk); + uint64_t k1 = U8TO64_LE(kk + 8); + uint64_t m; + int i; + const unsigned char *end = ni + inlen - (inlen % sizeof(uint64_t)); + const int left = inlen & 7; + uint64_t b = ((uint64_t)inlen) << 56; + v3 ^= k1; + v2 ^= k0; + v1 ^= k1; + v0 ^= k0; + + if (outlen == 16) + v1 ^= 0xee; + + for (; ni != end; ni += 8) { + m = U8TO64_LE(ni); + v3 ^= m; + + for (i = 0; i < cROUNDS; ++i) + SIPROUND; + + v0 ^= m; + } + + switch (left) { + case 7: + b |= ((uint64_t)ni[6]) << 48; + [[fallthrough]]; + case 6: + b |= ((uint64_t)ni[5]) << 40; + [[fallthrough]]; + case 5: + b |= ((uint64_t)ni[4]) << 32; + [[fallthrough]]; + case 4: + b |= ((uint64_t)ni[3]) << 24; + [[fallthrough]]; + case 3: + b |= ((uint64_t)ni[2]) << 16; + [[fallthrough]]; + case 2: + b |= ((uint64_t)ni[1]) << 8; + [[fallthrough]]; + case 1: + b |= ((uint64_t)ni[0]); + break; + case 0: + break; + } + + v3 ^= b; + + for (i = 0; i < cROUNDS; ++i) + SIPROUND; + + v0 ^= b; + + if (outlen == 16) + v2 ^= 0xee; + else + v2 ^= 0xff; + + for (i = 0; i < dROUNDS; ++i) + SIPROUND; + + b = v0 ^ v1 ^ v2 ^ v3; + U64TO8_LE(out, b); + + if (outlen == 8) + return; + + v1 ^= 0xdd; + + for (i = 0; i < dROUNDS; ++i) + SIPROUND; + + b = v0 ^ v1 ^ v2 ^ v3; + U64TO8_LE(out + 8, b); +} + +} // end anonymous namespace From nobody Fri May 29 23:01:12 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRzPY4pDNz6gDxb for ; Fri, 29 May 2026 23:01: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRzPY3V1hz4QdH for ; Fri, 29 May 2026 23:01:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095697; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eMN0GPUbn6HP+ILH+E5HLuZxNrJhjzGuj9aV4ECjap0=; b=HHpmHRGCUsZk04N/XFoxZ5t/0InbaS9brvrPH9kI00rC+K+KQEYWlnq4jXgYaDa4QO8RvR sB39f8ti3HfTEeXmefsc9AIQq41V5uEtslLLbD/ytN25LKcceBvkmB1wrHDt8OULVkeYsk +oaSJKA0G6fMp6IbHqatNwmxv9M492fUqUJbS0866VOKExlVEn9DMaCJ19r+/pIdpEUnru 7k3jUX5hmfMyUcSWPejblghbZTUtBkTx2Pw3NUyIYWnF9z6QHQVRn0jtO6aulJhAukczGU BN3ac0bzKQSwUEUlNI+wqE8c4eqEMc7jrKgDQr1D1+h9QVllszuXBlWy+JHxCQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780095697; a=rsa-sha256; cv=none; b=G6a7CtbjzrI1byQhBcOda+JmXHAbP0kkHmjAvSiDfAj7nzi18M+d/JXq/KA3ZaxxkjtTNM 9pckl/MQ2IUsH8yzsl3rAwVmT4VCPS2QxlC2Ki9dyWCHQ2Y2YmJzHfhjDW02IHcuTu+edf 23Xi55TkXKgIda1oniiU/e5wMdnyK3GA1E9rDCrl2gXPz6GxD90BDJX160KF4F+dj6BYYE GTED60X+kDvdA8mWEmp+PQbL53nbcaca7MGOk5FN9LjUcj9a25DNcoXqMAMGll77DX0cTa CGwvRRf3Jmblm+CwUvAuuhiS0kd6wQ9j1JeEe9kYweTfheTyAPuthq95OogB0w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095697; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eMN0GPUbn6HP+ILH+E5HLuZxNrJhjzGuj9aV4ECjap0=; b=LhyV/5D86SVHB2R/P3pMFM2DJzdbARrXMwdNhBJW7Z3z8XzFcRMAZfb1eW2H7+tSXAAjWp Hlx6HxR+M0MfTVSgkTb+WeJwjnhFdQh9Ui7KkfXBXvBjo7QudwS+OBjO1U3UQkaTh2uor1 v8oJha8asRyKg5gQNKrLhIp2otlke5vq7XcIllyYrcYt1qEiBifY4ngnPzyLZQrWLkl5aK sYQXFCMZiqSwsBl2if96QcU5uxKh1f3sYQa3Ei7UR+OurV95LW83By88cqdXs+TrjHmZiH WVxO6+WQcU73SxzrFEEwhjA3TlNE4UF20sYaMBh+X8Hp6fjgW5/nkV1gQZUazQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRzPY311Dzsl0 for ; Fri, 29 May 2026 23:01:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4157b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 23:01:12 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 0008bdb8bd28 - stable/15 - Merge llvm-project main llvmorg-21-init-19288-gface93e724f4 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 0008bdb8bd28d1c15670084ca63015b551a33f76 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 23:01:12 +0000 Message-Id: <6a1a1ab8.4157b.5017fe25@gitrepo.freebsd.org> The branch stable/15 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=0008bdb8bd28d1c15670084ca63015b551a33f76 commit 0008bdb8bd28d1c15670084ca63015b551a33f76 Author: Dimitry Andric AuthorDate: 2025-12-07 15:15:22 +0000 Commit: Dimitry Andric CommitDate: 2026-05-29 22:57:30 +0000 Merge llvm-project main llvmorg-21-init-19288-gface93e724f4 This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project main llvmorg-21-init-19288-gface93e724f4, the last commit before the upstream release/21.x branch was created. PR: 292067 MFC after: 1 month (cherry picked from commit 700637cbb5e582861067a11aaca4d053546871d2) --- .../clang/include/clang-c/CXSourceLocation.h | 10 + .../llvm-project/clang/include/clang-c/CXString.h | 4 + .../clang/include/clang-c/FatalErrorHandler.h | 5 +- contrib/llvm-project/clang/include/clang-c/Index.h | 413 +- .../llvm-project/clang/include/clang-c/Platform.h | 2 +- .../clang/include/clang/APINotes/APINotesManager.h | 9 + .../clang/include/clang/APINotes/APINotesReader.h | 7 + .../clang/include/clang/APINotes/APINotesWriter.h | 8 + .../clang/include/clang/APINotes/Types.h | 93 +- .../clang/include/clang/ARCMigrate/ARCMT.h | 130 - .../clang/include/clang/ARCMigrate/ARCMTActions.h | 76 - .../clang/include/clang/ARCMigrate/FileRemapper.h | 84 - .../llvm-project/clang/include/clang/AST/APValue.h | 132 +- .../clang/include/clang/AST/ASTConcept.h | 18 +- .../clang/include/clang/AST/ASTContext.h | 487 +- .../clang/include/clang/AST/ASTDiagnostic.h | 3 + .../clang/include/clang/AST/ASTImporter.h | 19 +- .../include/clang/AST/ASTImporterLookupTable.h | 2 +- .../clang/include/clang/AST/ASTLambda.h | 7 + .../clang/include/clang/AST/ASTNodeTraverser.h | 79 +- .../include/clang/AST/ASTStructuralEquivalence.h | 31 +- .../clang/include/clang/AST/AbstractBasicReader.h | 9 +- .../clang/include/clang/AST/AbstractBasicWriter.h | 4 +- .../llvm-project/clang/include/clang/AST/Attr.h | 59 +- .../clang/include/clang/AST/AttrIterator.h | 28 +- .../clang/include/clang/AST/Availability.h | 4 + .../clang/AST/CXXRecordDeclDefinitionBits.def | 4 + .../clang/include/clang/AST/CanonicalType.h | 14 +- .../clang/include/clang/AST/CommentCommands.td | 10 +- .../clang/include/clang/AST/CommentSema.h | 2 +- .../clang/include/clang/AST/ComputeDependence.h | 9 +- .../llvm-project/clang/include/clang/AST/Decl.h | 444 +- .../clang/include/clang/AST/DeclBase.h | 73 +- .../llvm-project/clang/include/clang/AST/DeclCXX.h | 211 +- .../clang/include/clang/AST/DeclContextInternals.h | 21 +- .../clang/include/clang/AST/DeclFriend.h | 48 +- .../clang/include/clang/AST/DeclGroup.h | 8 +- .../llvm-project/clang/include/clang/AST/DeclID.h | 72 +- .../clang/include/clang/AST/DeclObjC.h | 12 +- .../clang/include/clang/AST/DeclOpenACC.h | 155 + .../clang/include/clang/AST/DeclOpenMP.h | 26 +- .../clang/include/clang/AST/DeclTemplate.h | 268 +- .../clang/include/clang/AST/DeclVisitor.h | 1 + .../clang/include/clang/AST/DeclarationName.h | 46 +- .../clang/include/clang/AST/DependenceFlags.h | 5 + .../include/clang/AST/DynamicRecursiveASTVisitor.h | 304 + .../llvm-project/clang/include/clang/AST/Expr.h | 652 +- .../llvm-project/clang/include/clang/AST/ExprCXX.h | 459 +- .../clang/include/clang/AST/ExprConcepts.h | 33 +- .../clang/include/clang/AST/ExprObjC.h | 31 +- .../clang/include/clang/AST/ExprOpenMP.h | 4 +- .../clang/include/clang/AST/ExternalASTMerger.h | 9 +- .../clang/include/clang/AST/ExternalASTSource.h | 38 +- .../clang/include/clang/AST/FormatString.h | 3 +- .../clang/include/clang/AST/GlobalDecl.h | 21 +- .../clang/include/clang/AST/JSONNodeDumper.h | 5 + .../llvm-project/clang/include/clang/AST/Mangle.h | 73 +- .../clang/include/clang/AST/NestedNameSpecifier.h | 44 +- .../include/clang/AST/NonTrivialTypeVisitor.h | 2 + .../llvm-project/clang/include/clang/AST/ODRHash.h | 11 +- .../clang/include/clang/AST/OpenACCClause.h | 717 +- .../clang/include/clang/AST/OpenMPClause.h | 1050 +- .../clang/include/clang/AST/OperationKinds.def | 8 +- .../clang/include/clang/AST/PrettyPrinter.h | 24 +- .../clang/include/clang/AST/PropertiesBase.td | 63 +- .../clang/include/clang/AST/RecordLayout.h | 7 +- .../clang/include/clang/AST/RecursiveASTVisitor.h | 204 +- .../clang/include/clang/AST/Redeclarable.h | 31 +- .../clang/include/clang/AST/SYCLKernelInfo.h | 46 + .../llvm-project/clang/include/clang/AST/Stmt.h | 335 +- .../llvm-project/clang/include/clang/AST/StmtCXX.h | 10 +- .../clang/include/clang/AST/StmtDataCollectors.td | 1 - .../clang/include/clang/AST/StmtObjC.h | 10 +- .../clang/include/clang/AST/StmtOpenACC.h | 645 +- .../clang/include/clang/AST/StmtOpenMP.h | 184 +- .../clang/include/clang/AST/StmtSYCL.h | 94 + .../clang/include/clang/AST/StmtVisitor.h | 1 + .../include/clang/AST/TemplateArgumentVisitor.h | 3 +- .../clang/include/clang/AST/TemplateBase.h | 46 +- .../clang/include/clang/AST/TemplateName.h | 220 +- .../clang/include/clang/AST/TextNodeDumper.h | 21 + .../llvm-project/clang/include/clang/AST/Type.h | 1050 +- .../llvm-project/clang/include/clang/AST/TypeLoc.h | 101 +- .../clang/include/clang/AST/TypeProperties.td | 191 +- .../clang/include/clang/AST/UnresolvedSet.h | 5 +- .../include/clang/ASTMatchers/ASTMatchFinder.h | 2 +- .../clang/include/clang/ASTMatchers/ASTMatchers.h | 249 +- .../clang/ASTMatchers/ASTMatchersInternal.h | 105 +- .../include/clang/ASTMatchers/ASTMatchersMacros.h | 14 +- .../include/clang/ASTMatchers/LowLevelHelpers.h | 37 + .../clang/Analysis/Analyses/ExprMutationAnalyzer.h | 24 +- .../clang/Analysis/Analyses/LifetimeSafety.h | 30 + .../include/clang/Analysis/Analyses/ThreadSafety.h | 62 +- .../clang/Analysis/Analyses/ThreadSafetyCommon.h | 30 +- .../clang/Analysis/Analyses/ThreadSafetyTIL.h | 20 +- .../clang/Analysis/Analyses/ThreadSafetyTraverse.h | 14 +- .../clang/Analysis/Analyses/UninitializedValues.h | 16 +- .../clang/Analysis/Analyses/UnsafeBufferUsage.h | 22 + .../Analysis/Analyses/UnsafeBufferUsageGadgets.def | 13 +- .../include/clang/Analysis/AnalysisDeclContext.h | 2 +- .../clang/include/clang/Analysis/AnyCall.h | 4 +- .../clang/include/clang/Analysis/CFG.h | 17 +- .../clang/include/clang/Analysis/CallGraph.h | 15 +- .../include/clang/Analysis/FlowSensitive/ASTOps.h | 38 +- .../clang/Analysis/FlowSensitive/AdornedCFG.h | 27 +- .../FlowSensitive/CachedConstAccessorsLattice.h | 218 + .../Analysis/FlowSensitive/DataflowAnalysis.h | 18 +- .../clang/Analysis/FlowSensitive/MapLattice.h | 2 +- .../Models/UncheckedOptionalAccessModel.h | 35 +- .../clang/Analysis/FlowSensitive/NoopLattice.h | 11 + .../FlowSensitive/SmartPointerAccessorCaching.h | 173 + .../clang/include/clang/Analysis/ProgramPoint.h | 28 +- .../include/clang/Analysis/Support/FixitUtil.h | 70 + .../clang/include/clang/Basic/AArch64ACLETypes.def | 259 + .../include/clang/Basic/AArch64SVEACLETypes.def | 140 - .../clang/include/clang/Basic/AMDGPUTypes.def | 14 +- .../clang/include/clang/Basic/AddressSpaces.h | 4 + .../include/clang/Basic/AllDiagnosticKinds.inc | 33 + .../llvm-project/clang/include/clang/Basic/Attr.td | 904 +- .../clang/include/clang/Basic/AttrDocs.td | 1464 +- .../include/clang/Basic/AttributeCommonInfo.h | 77 +- .../clang/include/clang/Basic/AttributeScopeInfo.h | 48 + .../clang/include/clang/Basic/Attributes.h | 9 + .../clang/include/clang/Basic/BuiltinHeaders.def | 2 + .../clang/include/clang/Basic/BuiltinTemplates.td | 64 + .../clang/include/clang/Basic/Builtins.h | 246 +- .../clang/include/clang/Basic/Builtins.td | 483 +- .../clang/include/clang/Basic/BuiltinsAArch64.def | 43 +- .../clang/include/clang/Basic/BuiltinsAMDGPU.def | 223 +- .../clang/include/clang/Basic/BuiltinsARM.def | 29 +- .../clang/include/clang/Basic/BuiltinsBase.td | 42 +- .../clang/include/clang/Basic/BuiltinsDirectX.td | 15 + .../clang/include/clang/Basic/BuiltinsHexagon.def | 161 - .../clang/include/clang/Basic/BuiltinsHexagon.td | 2146 ++ .../include/clang/Basic/BuiltinsHexagonDep.def | 1925 -- .../include/clang/Basic/BuiltinsLoongArch.def | 28 - .../include/clang/Basic/BuiltinsLoongArchLASX.def | 2 +- .../include/clang/Basic/BuiltinsLoongArchLSX.def | 2 +- .../clang/include/clang/Basic/BuiltinsNEON.def | 22 - .../clang/include/clang/Basic/BuiltinsNVPTX.def | 1099 - .../clang/include/clang/Basic/BuiltinsNVPTX.td | 1132 + .../clang/include/clang/Basic/BuiltinsPPC.def | 190 +- .../clang/include/clang/Basic/BuiltinsRISCV.td | 11 + .../include/clang/Basic/BuiltinsRISCVVector.def | 22 - .../clang/include/clang/Basic/BuiltinsRISCVXCV.td | 41 + .../clang/include/clang/Basic/BuiltinsSME.def | 21 - .../clang/include/clang/Basic/BuiltinsSPIRVBase.td | 15 + .../clang/include/clang/Basic/BuiltinsSPIRVCL.td | 15 + .../include/clang/Basic/BuiltinsSPIRVCommon.td | 23 + .../clang/include/clang/Basic/BuiltinsSPIRVVK.td | 13 + .../clang/include/clang/Basic/BuiltinsSVE.def | 22 - .../clang/include/clang/Basic/BuiltinsSystemZ.def | 44 +- .../include/clang/Basic/BuiltinsWebAssembly.def | 58 +- .../clang/include/clang/Basic/BuiltinsX86.def | 2118 -- .../clang/include/clang/Basic/BuiltinsX86.td | 5385 ++++ .../clang/include/clang/Basic/BuiltinsX86Base.td | 32 + .../clang/include/clang/Basic/BuiltinsX86_64.def | 160 - .../clang/include/clang/Basic/BuiltinsX86_64.td | 482 + .../include/clang/Basic/CFProtectionOptions.def | 15 + .../include/clang/Basic/CFProtectionOptions.h | 38 + .../clang/include/clang/Basic/CodeGenOptions.def | 649 +- .../clang/include/clang/Basic/CodeGenOptions.h | 115 +- .../llvm-project/clang/include/clang/Basic/Cuda.h | 106 +- .../clang/include/clang/Basic/DarwinSDKInfo.h | 6 +- .../clang/include/clang/Basic/DebugOptions.def | 140 +- .../clang/include/clang/Basic/DeclNodes.td | 4 + .../clang/include/clang/Basic/Diagnostic.h | 440 +- .../clang/include/clang/Basic/Diagnostic.td | 67 + .../clang/include/clang/Basic/DiagnosticAST.h | 15 +- .../include/clang/Basic/DiagnosticASTKinds.td | 139 +- .../clang/include/clang/Basic/DiagnosticAnalysis.h | 15 +- .../include/clang/Basic/DiagnosticCategories.h | 7 +- .../clang/include/clang/Basic/DiagnosticComment.h | 15 +- .../include/clang/Basic/DiagnosticCommentKinds.td | 9 +- .../include/clang/Basic/DiagnosticCommonKinds.td | 42 +- .../clang/include/clang/Basic/DiagnosticCrossTU.h | 15 +- .../clang/include/clang/Basic/DiagnosticDriver.h | 15 +- .../include/clang/Basic/DiagnosticDriverKinds.td | 81 +- .../clang/include/clang/Basic/DiagnosticFrontend.h | 15 +- .../include/clang/Basic/DiagnosticFrontendKinds.td | 38 +- .../clang/include/clang/Basic/DiagnosticGroups.td | 253 +- .../clang/include/clang/Basic/DiagnosticIDs.h | 194 +- .../include/clang/Basic/DiagnosticInstallAPI.h | 15 +- .../clang/include/clang/Basic/DiagnosticLex.h | 15 +- .../include/clang/Basic/DiagnosticLexKinds.td | 65 +- .../clang/include/clang/Basic/DiagnosticOptions.h | 6 +- .../clang/include/clang/Basic/DiagnosticParse.h | 15 +- .../include/clang/Basic/DiagnosticParseKinds.td | 148 +- .../include/clang/Basic/DiagnosticRefactoring.h | 15 +- .../clang/Basic/DiagnosticRefactoringKinds.td | 4 +- .../clang/include/clang/Basic/DiagnosticSema.h | 15 +- .../include/clang/Basic/DiagnosticSemaKinds.td | 1795 +- .../include/clang/Basic/DiagnosticSerialization.h | 15 +- .../clang/Basic/DiagnosticSerializationKinds.td | 101 +- .../clang/include/clang/Basic/FPOptions.def | 42 +- .../clang/include/clang/Basic/Features.def | 69 +- .../clang/include/clang/Basic/FileEntry.h | 19 +- .../clang/include/clang/Basic/FileManager.h | 59 +- .../include/clang/Basic/FileSystemStatCache.h | 8 +- .../include/clang/Basic/HLSLIntangibleTypes.def | 33 + .../clang/include/clang/Basic/HeaderInclude.h | 13 +- .../clang/include/clang/Basic/IdentifierTable.h | 50 +- .../clang/include/clang/Basic/JsonSupport.h | 2 +- .../clang/include/clang/Basic/LangOptions.def | 797 +- .../clang/include/clang/Basic/LangOptions.h | 201 +- .../clang/include/clang/Basic/LangStandard.h | 1 - .../clang/include/clang/Basic/LangStandards.def | 25 +- .../clang/include/clang/Basic/MacroBuilder.h | 8 +- .../clang/include/clang/Basic/Module.h | 90 +- .../clang/include/clang/Basic/NoSanitizeList.h | 2 + .../clang/include/clang/Basic/ObjCRuntime.h | 2 +- .../clang/include/clang/Basic/OffloadArch.h | 145 + .../clang/include/clang/Basic/OpenACCClauses.def | 18 + .../clang/include/clang/Basic/OpenACCKinds.h | 333 +- .../clang/include/clang/Basic/OpenMPKinds.def | 27 + .../clang/include/clang/Basic/OpenMPKinds.h | 44 + .../clang/include/clang/Basic/PPCTypes.def | 1 + .../clang/include/clang/Basic/ParsedAttrInfo.h | 15 + .../clang/include/clang/Basic/PartialDiagnostic.h | 5 +- .../clang/include/clang/Basic/PlistSupport.h | 11 +- .../clang/include/clang/Basic/PointerAuthOptions.h | 45 + .../clang/include/clang/Basic/ProfileList.h | 9 +- .../include/clang/Basic/SanitizerSpecialCaseList.h | 14 +- .../clang/include/clang/Basic/Sanitizers.def | 9 +- .../clang/include/clang/Basic/Sanitizers.h | 32 + .../include/clang/Basic/SimpleTypoCorrection.h | 48 + .../clang/include/clang/Basic/SourceLocation.h | 6 +- .../clang/include/clang/Basic/SourceManager.h | 47 +- .../clang/include/clang/Basic/Specifiers.h | 71 +- .../llvm-project/clang/include/clang/Basic/Stack.h | 5 +- .../include/clang/Basic/StackExhaustionHandler.h | 45 + .../clang/include/clang/Basic/StmtNodes.td | 22 +- .../clang/include/clang/Basic/SyncScope.h | 38 +- .../clang/include/clang/Basic/TargetBuiltins.h | 189 +- .../clang/include/clang/Basic/TargetCXXABI.def | 12 +- .../clang/include/clang/Basic/TargetInfo.h | 138 +- .../clang/include/clang/Basic/TargetOSMacros.def | 3 + .../clang/include/clang/Basic/TargetOptions.h | 3 - .../clang/include/clang/Basic/TokenKinds.def | 32 +- .../clang/include/clang/Basic/TypeNodes.td | 2 + .../clang/include/clang/Basic/UnsignedOrNone.h | 53 + .../clang/include/clang/Basic/arm_fp16.td | 20 +- .../clang/include/clang/Basic/arm_immcheck_incl.td | 45 + .../clang/include/clang/Basic/arm_mve.td | 20 +- .../clang/include/clang/Basic/arm_mve_defs.td | 5 +- .../clang/include/clang/Basic/arm_neon.td | 941 +- .../clang/include/clang/Basic/arm_neon_incl.td | 20 +- .../clang/include/clang/Basic/arm_sme.td | 280 +- .../clang/include/clang/Basic/arm_sve.td | 689 +- .../clang/include/clang/Basic/arm_sve_sme_incl.td | 44 +- .../include/clang/Basic/riscv_andes_vector.td | 179 + .../include/clang/Basic/riscv_sifive_vector.td | 10 +- .../clang/include/clang/Basic/riscv_vector.td | 743 +- .../include/clang/Basic/riscv_vector_common.td | 176 +- .../clang/include/clang/CIR/ABIArgInfo.h | 92 + .../clang/include/clang/CIR/CIRGenerator.h | 95 + .../clang/include/clang/CIR/CIRToCIRPasses.h | 40 + .../clang/CIR/Dialect/Builder/CIRBaseBuilder.h | 509 + .../clang/CIR/Dialect/IR/CIRAttrConstraints.td | 48 + .../clang/include/clang/CIR/Dialect/IR/CIRAttrs.h | 47 + .../clang/include/clang/CIR/Dialect/IR/CIRAttrs.td | 519 + .../include/clang/CIR/Dialect/IR/CIRDataLayout.h | 41 + .../include/clang/CIR/Dialect/IR/CIRDialect.h | 36 + .../include/clang/CIR/Dialect/IR/CIRDialect.td | 27 +- .../clang/include/clang/CIR/Dialect/IR/CIROps.td | 2947 +- .../include/clang/CIR/Dialect/IR/CIROpsEnums.h | 118 + .../clang/CIR/Dialect/IR/CIRTypeConstraints.td | 296 + .../clang/include/clang/CIR/Dialect/IR/CIRTypes.h | 53 + .../clang/include/clang/CIR/Dialect/IR/CIRTypes.td | 641 + .../include/clang/CIR/Dialect/IR/CIRTypesDetails.h | 118 + .../CIR/Dialect/OpenACC/CIROpenACCTypeInterfaces.h | 35 + .../Dialect/OpenACC/RegisterOpenACCExtensions.h | 22 + .../clang/include/clang/CIR/Dialect/Passes.h | 43 + .../clang/include/clang/CIR/Dialect/Passes.td | 86 + .../clang/CIR/FrontendAction/CIRGenAction.h | 92 + .../clang/CIR/Interfaces/CIRLoopOpInterface.h | 34 + .../clang/CIR/Interfaces/CIRLoopOpInterface.td | 99 + .../include/clang/CIR/Interfaces/CIROpInterfaces.h | 29 + .../clang/CIR/Interfaces/CIROpInterfaces.td | 167 + .../clang/CIR/Interfaces/CIRTypeInterfaces.h | 22 + .../clang/CIR/Interfaces/CIRTypeInterfaces.td | 123 + .../clang/include/clang/CIR/LowerToLLVM.h | 35 + .../clang/include/clang/CIR/LoweringHelpers.h | 54 + .../clang/include/clang/CIR/MissingFeatures.h | 291 + .../llvm-project/clang/include/clang/CIR/Passes.h | 31 + .../clang/include/clang/CIR/TypeEvaluationKind.h | 21 + .../clang/include/clang/CodeGen/BackendUtil.h | 74 +- .../clang/include/clang/CodeGen/CGFunctionInfo.h | 66 +- .../clang/include/clang/CodeGen/CodeGenABITypes.h | 24 +- ...Operations.h => ObjectFilePCHContainerWriter.h} | 10 +- .../clang/include/clang/Driver/Action.h | 29 +- .../clang/Driver}/CommonArgs.h | 79 +- .../clang/include/clang/Driver/Compilation.h | 10 +- .../clang/include/clang/Driver/Distro.h | 8 +- .../clang/include/clang/Driver/Driver.h | 95 +- .../llvm-project/clang/include/clang/Driver/Job.h | 6 +- .../clang/include/clang/Driver/Multilib.h | 61 +- .../clang/include/clang/Driver/OffloadBundler.h | 37 +- .../clang/include/clang/Driver/Options.td | 1272 +- .../clang/include/clang/Driver/SanitizerArgs.h | 13 +- .../clang/include/clang/Driver/ToolChain.h | 55 +- .../clang/include/clang/Driver/Types.def | 15 +- .../clang/include/clang/Driver/XRayArgs.h | 2 + .../clang/include/clang/ExtractAPI/API.h | 55 +- .../clang/ExtractAPI/DeclarationFragments.h | 4 +- .../include/clang/ExtractAPI/ExtractAPIVisitor.h | 73 +- .../clang/include/clang/Format/Format.h | 644 +- .../clang/include/clang/Frontend/ASTConsumers.h | 5 + .../clang/include/clang/Frontend/ASTUnit.h | 53 +- .../include/clang/Frontend/CommandLineSourceLoc.h | 11 +- .../include/clang/Frontend/CompilerInstance.h | 139 +- .../include/clang/Frontend/CompilerInvocation.h | 18 +- .../include/clang/Frontend/DiagnosticRenderer.h | 7 +- .../clang/include/clang/Frontend/FrontendAction.h | 8 +- .../clang/include/clang/Frontend/FrontendActions.h | 1 + .../clang/include/clang/Frontend/FrontendOptions.h | 108 +- .../clang/Frontend/FrontendPluginRegistry.h | 5 + .../include/clang/Frontend/LogDiagnosticPrinter.h | 3 +- .../include/clang/Frontend/MultiplexConsumer.h | 3 +- .../clang/include/clang/Frontend/SARIFDiagnostic.h | 2 +- .../clang/Frontend/SARIFDiagnosticPrinter.h | 4 +- .../clang/Frontend/SerializedDiagnosticPrinter.h | 2 +- .../clang/include/clang/Frontend/TextDiagnostic.h | 2 +- .../include/clang/Frontend/TextDiagnosticPrinter.h | 4 +- .../clang/Frontend/VerifyDiagnosticConsumer.h | 22 +- .../clang/include/clang/Index/DeclOccurrence.h | 3 +- .../clang/include/clang/Index/USRGeneration.h | 8 +- .../clang/include/clang/InstallAPI/DylibVerifier.h | 24 +- .../clang/include/clang/Interpreter/Interpreter.h | 76 +- .../clang/Interpreter/PartialTranslationUnit.h | 3 + .../include/clang/Interpreter/RemoteJITUtils.h | 38 + .../clang/include/clang/Interpreter/Value.h | 1 + .../clang/Lex/DependencyDirectivesScanner.h | 14 + .../clang/include/clang/Lex/DirectoryLookup.h | 16 +- .../clang/Lex/HLSLRootSignatureTokenKinds.def | 246 + .../clang/include/clang/Lex/HeaderSearch.h | 98 +- .../clang/include/clang/Lex/HeaderSearchOptions.h | 24 +- .../clang/include/clang/Lex/LexHLSLRootSignature.h | 100 + .../llvm-project/clang/include/clang/Lex/Lexer.h | 38 +- .../clang/include/clang/Lex/LiteralSupport.h | 4 +- .../clang/include/clang/Lex/ModuleLoader.h | 3 +- .../clang/include/clang/Lex/ModuleMap.h | 90 +- .../clang/include/clang/Lex/ModuleMapFile.h | 171 + .../clang/include/clang/Lex/PPCallbacks.h | 1 + .../clang/include/clang/Lex/PreprocessingRecord.h | 4 +- .../clang/include/clang/Lex/Preprocessor.h | 224 +- .../clang/include/clang/Lex/PreprocessorOptions.h | 13 - .../llvm-project/clang/include/clang/Lex/Token.h | 21 +- .../clang/include/clang/Lex/TokenLexer.h | 10 +- .../clang/include/clang/Parse/LoopHint.h | 2 +- .../include/clang/Parse/ParseHLSLRootSignature.h | 240 + .../clang/include/clang/Parse/Parser.h | 11377 +++++-- .../include/clang/Parse/RAIIObjectsForParser.h | 8 +- .../clang/include/clang/Rewrite/Core/DeltaTree.h | 50 - .../clang/include/clang/Rewrite/Core/HTMLRewrite.h | 11 +- .../clang/include/clang/Rewrite/Core/RewriteRope.h | 223 - .../clang/include/clang/Rewrite/Core/Rewriter.h | 19 +- .../include/clang/Sema/AnalysisBasedWarnings.h | 14 +- .../include/clang/Sema/CodeCompleteConsumer.h | 7 +- .../clang/include/clang/Sema/DeclSpec.h | 13 +- .../clang/Sema/EnterExpressionEvaluationContext.h | 16 + .../clang/include/clang/Sema/ExternalSemaSource.h | 2 +- .../include/clang/Sema/HLSLExternalSemaSource.h | 17 +- .../clang/include/clang/Sema/HeuristicResolver.h | 109 + .../clang/include/clang/Sema/Initialization.h | 12 +- .../llvm-project/clang/include/clang/Sema/Lookup.h | 258 +- .../clang/Sema/MultiplexExternalSemaSource.h | 13 +- .../clang/include/clang/Sema/Overload.h | 317 +- .../clang/include/clang/Sema/ParsedAttr.h | 274 +- .../clang/include/clang/Sema/ParsedTemplate.h | 8 +- .../include/clang/Sema/RISCVIntrinsicManager.h | 2 +- .../clang/include/clang/Sema/Redeclaration.h | 2 +- .../llvm-project/clang/include/clang/Sema/Scope.h | 28 +- .../clang/include/clang/Sema/ScopeInfo.h | 17 +- .../llvm-project/clang/include/clang/Sema/Sema.h | 2558 +- .../clang/include/clang/Sema/SemaAMDGPU.h | 12 +- .../clang/include/clang/Sema/SemaARM.h | 39 +- .../clang/include/clang/Sema/SemaAVR.h | 2 +- .../clang/include/clang/Sema/SemaBPF.h | 4 +- .../clang/include/clang/Sema/SemaBase.h | 5 + .../clang/include/clang/Sema/SemaCUDA.h | 24 +- .../clang/include/clang/Sema/SemaCodeCompletion.h | 16 +- .../clang/include/clang/Sema/SemaConcept.h | 261 +- .../clang/include/clang/Sema/SemaDirectX.h | 28 + .../clang/include/clang/Sema/SemaHLSL.h | 187 +- .../clang/include/clang/Sema/SemaHexagon.h | 2 +- .../clang/include/clang/Sema/SemaInternal.h | 20 +- .../clang/include/clang/Sema/SemaLambda.h | 2 +- .../clang/include/clang/Sema/SemaLoongArch.h | 5 +- .../clang/include/clang/Sema/SemaM68k.h | 2 +- .../clang/include/clang/Sema/SemaMIPS.h | 5 +- .../clang/include/clang/Sema/SemaMSP430.h | 2 +- .../clang/include/clang/Sema/SemaNVPTX.h | 5 +- .../clang/include/clang/Sema/SemaObjC.h | 53 +- .../clang/include/clang/Sema/SemaOpenACC.h | 680 +- .../clang/include/clang/Sema/SemaOpenCL.h | 2 +- .../clang/include/clang/Sema/SemaOpenMP.h | 157 +- .../clang/include/clang/Sema/SemaPPC.h | 5 +- .../clang/include/clang/Sema/SemaPseudoObject.h | 6 +- .../clang/include/clang/Sema/SemaRISCV.h | 17 +- .../clang/include/clang/Sema/SemaSPIRV.h | 29 + .../clang/include/clang/Sema/SemaSYCL.h | 6 +- .../clang/include/clang/Sema/SemaSwift.h | 4 +- .../clang/include/clang/Sema/SemaSystemZ.h | 2 +- .../clang/include/clang/Sema/SemaWasm.h | 10 +- .../clang/include/clang/Sema/SemaX86.h | 5 +- .../clang/include/clang/Sema/Template.h | 47 +- .../clang/include/clang/Sema/TemplateDeduction.h | 11 +- .../include/clang/Serialization/ASTBitCodes.h | 86 +- .../Serialization/ASTDeserializationListener.h | 73 +- .../clang/include/clang/Serialization/ASTReader.h | 349 +- .../include/clang/Serialization/ASTRecordReader.h | 22 +- .../include/clang/Serialization/ASTRecordWriter.h | 48 +- .../clang/include/clang/Serialization/ASTWriter.h | 211 +- .../clang/Serialization/ContinuousRangeMap.h | 4 +- .../include/clang/Serialization/ModuleCache.h | 64 + .../clang/include/clang/Serialization/ModuleFile.h | 24 +- .../include/clang/Serialization/ModuleManager.h | 12 +- .../Serialization/ObjectFilePCHContainerReader.h | 25 + .../clang/Serialization/SourceLocationEncoding.h | 120 +- .../include/clang/Serialization/TypeBitCodes.def | 2 + .../clang/StaticAnalyzer/Checkers/Checkers.td | 350 +- .../clang/StaticAnalyzer/Checkers/SValExplainer.h | 17 +- .../clang/StaticAnalyzer/Core/AnalyzerOptions.def | 100 +- .../clang/StaticAnalyzer/Core/AnalyzerOptions.h | 51 +- .../StaticAnalyzer/Core/BugReporter/BugReporter.h | 47 +- .../Core/BugReporter/BugReporterVisitors.h | 85 + .../StaticAnalyzer/Core/BugReporter/BugType.h | 49 +- .../include/clang/StaticAnalyzer/Core/Checker.h | 112 +- .../clang/StaticAnalyzer/Core/CheckerManager.h | 116 +- .../StaticAnalyzer/Core/PathDiagnosticConsumers.h | 3 +- .../StaticAnalyzer/Core/PathSensitive/APSIntPtr.h | 64 + .../Core/PathSensitive/AnalysisManager.h | 7 +- .../Core/PathSensitive/BasicValueFactory.h | 60 +- .../Core/PathSensitive/CallDescription.h | 8 +- .../StaticAnalyzer/Core/PathSensitive/CallEvent.h | 9 +- .../Core/PathSensitive/CheckerContext.h | 17 +- .../Core/PathSensitive/CheckerHelpers.h | 6 +- .../StaticAnalyzer/Core/PathSensitive/CoreEngine.h | 52 +- .../Core/PathSensitive/DynamicExtent.h | 2 +- .../Core/PathSensitive/EntryPointStats.h | 162 + .../Core/PathSensitive/ExplodedGraph.h | 68 +- .../StaticAnalyzer/Core/PathSensitive/ExprEngine.h | 65 +- .../Core/PathSensitive/FunctionSummary.h | 4 - .../Core/PathSensitive/LoopWidening.h | 3 +- .../StaticAnalyzer/Core/PathSensitive/MemRegion.h | 48 +- .../Core/PathSensitive/ProgramState.h | 57 +- .../Core/PathSensitive/SMTConstraintManager.h | 29 +- .../StaticAnalyzer/Core/PathSensitive/SMTConv.h | 33 +- .../Core/PathSensitive/SValBuilder.h | 58 +- .../StaticAnalyzer/Core/PathSensitive/SVals.h | 63 +- .../StaticAnalyzer/Core/PathSensitive/Store.h | 40 +- .../StaticAnalyzer/Core/PathSensitive/SymExpr.h | 37 +- .../Core/PathSensitive/SymbolManager.h | 301 +- .../StaticAnalyzer/Frontend/AnalysisConsumer.h | 3 +- .../clang/include/clang/Support/Compiler.h | 64 + .../include/clang/Support/RISCVVIntrinsicUtils.h | 36 +- .../clang/include/clang/Testing/CommandLineArgs.h | 17 +- .../clang/include/clang/Testing/TestClangConfig.h | 115 +- .../clang/include/clang/Testing/TestLanguage.def | 47 + .../Tooling/CompilationDatabasePluginRegistry.h | 6 + .../DependencyScanningFilesystem.h | 53 + .../DependencyScanning/DependencyScanningService.h | 35 +- .../DependencyScanning/DependencyScanningTool.h | 61 +- .../DependencyScanning/DependencyScanningWorker.h | 64 +- .../DependencyScanning/InProcessModuleCache.h | 37 + .../DependencyScanning/ModuleDepCollector.h | 128 +- .../clang/Tooling/Inclusions/IncludeStyle.h | 6 +- .../clang/Tooling/Inclusions/StandardLibrary.h | 1 + .../clang/Tooling/Refactoring/ASTSelection.h | 2 +- .../clang/Tooling/ToolExecutorPluginRegistry.h | 6 + .../clang/include/clang/Tooling/Tooling.h | 10 +- .../clang/Tooling/Transformer/Transformer.h | 13 +- .../llvm-project/clang/include/module.modulemap | 35 +- .../clang/lib/APINotes/APINotesFormat.h | 24 +- .../clang/lib/APINotes/APINotesManager.cpp | 13 +- .../clang/lib/APINotes/APINotesReader.cpp | 194 +- .../clang/lib/APINotes/APINotesTypes.cpp | 16 + .../clang/lib/APINotes/APINotesWriter.cpp | 158 +- .../clang/lib/APINotes/APINotesYAMLCompiler.cpp | 134 +- .../llvm-project/clang/lib/ARCMigrate/ARCMT.cpp | 616 - .../clang/lib/ARCMigrate/ARCMTActions.cpp | 59 - .../clang/lib/ARCMigrate/FileRemapper.cpp | 274 - .../llvm-project/clang/lib/ARCMigrate/Internals.h | 180 - .../llvm-project/clang/lib/ARCMigrate/ObjCMT.cpp | 2261 -- .../clang/lib/ARCMigrate/PlistReporter.cpp | 124 - .../clang/lib/ARCMigrate/TransAPIUses.cpp | 107 - .../clang/lib/ARCMigrate/TransARCAssign.cpp | 77 - .../clang/lib/ARCMigrate/TransAutoreleasePool.cpp | 435 - .../lib/ARCMigrate/TransBlockObjCVariable.cpp | 146 - .../ARCMigrate/TransEmptyStatementsAndDealloc.cpp | 249 - .../clang/lib/ARCMigrate/TransGCAttrs.cpp | 350 - .../clang/lib/ARCMigrate/TransGCCalls.cpp | 76 - .../clang/lib/ARCMigrate/TransProperties.cpp | 379 - .../clang/lib/ARCMigrate/TransProtectedScope.cpp | 203 - .../lib/ARCMigrate/TransRetainReleaseDealloc.cpp | 459 - .../clang/lib/ARCMigrate/TransUnbridgedCasts.cpp | 466 - .../lib/ARCMigrate/TransUnusedInitDelegate.cpp | 77 - .../lib/ARCMigrate/TransZeroOutPropsInDealloc.cpp | 224 - .../clang/lib/ARCMigrate/TransformActions.cpp | 700 - .../clang/lib/ARCMigrate/Transforms.cpp | 594 - .../llvm-project/clang/lib/ARCMigrate/Transforms.h | 224 - contrib/llvm-project/clang/lib/AST/APValue.cpp | 25 +- contrib/llvm-project/clang/lib/AST/ASTConcept.cpp | 80 +- contrib/llvm-project/clang/lib/AST/ASTContext.cpp | 2516 +- .../llvm-project/clang/lib/AST/ASTDiagnostic.cpp | 156 +- contrib/llvm-project/clang/lib/AST/ASTDumper.cpp | 1 - contrib/llvm-project/clang/lib/AST/ASTImporter.cpp | 883 +- .../clang/lib/AST/ASTImporterLookupTable.cpp | 20 +- .../clang/lib/AST/ASTStructuralEquivalence.cpp | 337 +- contrib/llvm-project/clang/lib/AST/AttrImpl.cpp | 10 + .../llvm-project/clang/lib/AST/Availability.cpp | 103 +- .../clang/lib/AST/ByteCode/BitcastBuffer.cpp | 169 + .../clang/lib/AST/ByteCode/BitcastBuffer.h | 120 + .../clang/lib/AST/{Interp => ByteCode}/Boolean.h | 29 +- .../clang/lib/AST/ByteCode/ByteCodeEmitter.cpp | 260 + .../lib/AST/{Interp => ByteCode}/ByteCodeEmitter.h | 11 +- .../lib/AST/{Interp => ByteCode}/Compiler.cpp | 3224 +- .../clang/lib/AST/{Interp => ByteCode}/Compiler.h | 202 +- .../clang/lib/AST/ByteCode/Context.cpp | 588 + .../clang/lib/AST/{Interp => ByteCode}/Context.h | 39 +- .../lib/AST/{Interp => ByteCode}/Descriptor.cpp | 254 +- .../lib/AST/{Interp => ByteCode}/Descriptor.h | 62 +- .../clang/lib/AST/{Interp => ByteCode}/Disasm.cpp | 267 +- .../AST/{Interp => ByteCode}/DynamicAllocator.cpp | 28 +- .../AST/{Interp => ByteCode}/DynamicAllocator.h | 31 +- .../lib/AST/{Interp => ByteCode}/EvalEmitter.cpp | 105 +- .../lib/AST/{Interp => ByteCode}/EvalEmitter.h | 27 +- .../AST/{Interp => ByteCode}/EvaluationResult.cpp | 32 +- .../AST/{Interp => ByteCode}/EvaluationResult.h | 6 +- .../clang/lib/AST/ByteCode/FixedPoint.h | 198 + .../lib/AST/{Interp => ByteCode}/Floating.cpp | 0 .../llvm-project/clang/lib/AST/ByteCode/Floating.h | 308 + .../clang/lib/AST/{Interp => ByteCode}/Frame.h | 2 +- .../lib/AST/{Interp => ByteCode}/Function.cpp | 48 +- .../clang/lib/AST/{Interp => ByteCode}/Function.h | 122 +- .../clang/lib/AST/ByteCode/FunctionPointer.cpp | 36 + .../clang/lib/AST/ByteCode/FunctionPointer.h | 55 + .../clang/lib/AST/{Interp => ByteCode}/Integral.h | 77 +- .../lib/AST/{Interp => ByteCode}/IntegralAP.h | 258 +- .../llvm-project/clang/lib/AST/ByteCode/Interp.cpp | 2185 ++ .../clang/lib/AST/{Interp => ByteCode}/Interp.h | 2095 +- .../lib/AST/{Interp => ByteCode}/InterpBlock.cpp | 28 +- .../lib/AST/{Interp => ByteCode}/InterpBlock.h | 23 +- .../clang/lib/AST/ByteCode/InterpBuiltin.cpp | 2973 ++ .../lib/AST/ByteCode/InterpBuiltinBitCast.cpp | 502 + .../clang/lib/AST/ByteCode/InterpBuiltinBitCast.h | 43 + .../lib/AST/{Interp => ByteCode}/InterpFrame.cpp | 192 +- .../lib/AST/{Interp => ByteCode}/InterpFrame.h | 22 +- .../lib/AST/{Interp => ByteCode}/InterpShared.cpp | 2 +- .../lib/AST/{Interp => ByteCode}/InterpShared.h | 3 +- .../lib/AST/{Interp => ByteCode}/InterpStack.cpp | 45 +- .../lib/AST/{Interp => ByteCode}/InterpStack.h | 11 +- .../lib/AST/{Interp => ByteCode}/InterpState.cpp | 53 +- .../lib/AST/{Interp => ByteCode}/InterpState.h | 81 +- .../lib/AST/{Interp => ByteCode}/MemberPointer.cpp | 43 +- .../lib/AST/{Interp => ByteCode}/MemberPointer.h | 17 +- .../clang/lib/AST/{Interp => ByteCode}/Opcode.h | 0 .../clang/lib/AST/{Interp => ByteCode}/Opcodes.td | 205 +- .../clang/lib/AST/{Interp => ByteCode}/Pointer.cpp | 414 +- .../clang/lib/AST/{Interp => ByteCode}/Pointer.h | 252 +- .../lib/AST/{Interp => ByteCode}/PrimType.cpp | 2 +- .../clang/lib/AST/{Interp => ByteCode}/PrimType.h | 102 +- .../lib/AST/{Interp => ByteCode}/Primitives.h | 0 .../clang/lib/AST/{Interp => ByteCode}/Program.cpp | 169 +- .../clang/lib/AST/{Interp => ByteCode}/Program.h | 83 +- .../clang/lib/AST/{Interp => ByteCode}/Record.cpp | 9 +- .../clang/lib/AST/{Interp => ByteCode}/Record.h | 7 +- .../clang/lib/AST/{Interp => ByteCode}/Source.cpp | 4 +- .../clang/lib/AST/{Interp => ByteCode}/Source.h | 17 +- .../clang/lib/AST/{Interp => ByteCode}/State.cpp | 17 +- .../clang/lib/AST/{Interp => ByteCode}/State.h | 8 +- .../llvm-project/clang/lib/AST/CXXInheritance.cpp | 95 +- contrib/llvm-project/clang/lib/AST/Comment.cpp | 9 +- .../clang/lib/AST/CommentCommandTraits.cpp | 1 - .../llvm-project/clang/lib/AST/CommentLexer.cpp | 73 +- .../llvm-project/clang/lib/AST/CommentParser.cpp | 30 +- contrib/llvm-project/clang/lib/AST/CommentSema.cpp | 166 +- .../clang/lib/AST/ComputeDependence.cpp | 27 +- .../llvm-project/clang/lib/AST/DataCollection.cpp | 1 - contrib/llvm-project/clang/lib/AST/Decl.cpp | 606 +- contrib/llvm-project/clang/lib/AST/DeclBase.cpp | 120 +- contrib/llvm-project/clang/lib/AST/DeclCXX.cpp | 336 +- contrib/llvm-project/clang/lib/AST/DeclFriend.cpp | 20 +- contrib/llvm-project/clang/lib/AST/DeclGroup.cpp | 3 +- contrib/llvm-project/clang/lib/AST/DeclObjC.cpp | 13 +- contrib/llvm-project/clang/lib/AST/DeclOpenACC.cpp | 68 + contrib/llvm-project/clang/lib/AST/DeclOpenMP.cpp | 2 +- contrib/llvm-project/clang/lib/AST/DeclPrinter.cpp | 100 +- .../llvm-project/clang/lib/AST/DeclTemplate.cpp | 414 +- .../llvm-project/clang/lib/AST/DeclarationName.cpp | 2 - .../clang/lib/AST/DynamicRecursiveASTVisitor.cpp | 373 + contrib/llvm-project/clang/lib/AST/Expr.cpp | 482 +- contrib/llvm-project/clang/lib/AST/ExprCXX.cpp | 214 +- .../clang/lib/AST/ExprClassification.cpp | 41 +- .../llvm-project/clang/lib/AST/ExprConcepts.cpp | 13 +- .../llvm-project/clang/lib/AST/ExprConstShared.h | 10 +- .../llvm-project/clang/lib/AST/ExprConstant.cpp | 1834 +- contrib/llvm-project/clang/lib/AST/ExprObjC.cpp | 9 +- .../clang/lib/AST/ExternalASTMerger.cpp | 34 +- .../clang/lib/AST/ExternalASTSource.cpp | 23 +- .../llvm-project/clang/lib/AST/FormatString.cpp | 148 +- contrib/llvm-project/clang/lib/AST/InheritViz.cpp | 3 +- .../clang/lib/AST/Interp/ByteCodeEmitter.cpp | 346 - .../llvm-project/clang/lib/AST/Interp/Context.cpp | 309 - .../llvm-project/clang/lib/AST/Interp/Floating.h | 218 - .../clang/lib/AST/Interp/FunctionPointer.h | 95 - .../llvm-project/clang/lib/AST/Interp/Interp.cpp | 962 - .../clang/lib/AST/Interp/InterpBuiltin.cpp | 1593 - .../llvm-project/clang/lib/AST/ItaniumCXXABI.cpp | 9 +- .../llvm-project/clang/lib/AST/ItaniumMangle.cpp | 584 +- .../llvm-project/clang/lib/AST/JSONNodeDumper.cpp | 30 +- contrib/llvm-project/clang/lib/AST/Linkage.h | 2 +- contrib/llvm-project/clang/lib/AST/Mangle.cpp | 69 +- .../llvm-project/clang/lib/AST/MicrosoftMangle.cpp | 511 +- contrib/llvm-project/clang/lib/AST/NSAPI.cpp | 6 +- .../clang/lib/AST/NestedNameSpecifier.cpp | 162 +- .../llvm-project/clang/lib/AST/ODRDiagsEmitter.cpp | 6 +- contrib/llvm-project/clang/lib/AST/ODRHash.cpp | 79 +- contrib/llvm-project/clang/lib/AST/OSLog.cpp | 1 - .../llvm-project/clang/lib/AST/OpenACCClause.cpp | 501 +- .../llvm-project/clang/lib/AST/OpenMPClause.cpp | 354 +- contrib/llvm-project/clang/lib/AST/ParentMap.cpp | 34 +- .../clang/lib/AST/ParentMapContext.cpp | 58 +- .../clang/lib/AST/PrintfFormatString.cpp | 6 +- .../llvm-project/clang/lib/AST/QualTypeNames.cpp | 38 +- contrib/llvm-project/clang/lib/AST/Randstruct.cpp | 12 +- .../llvm-project/clang/lib/AST/RawCommentList.cpp | 17 +- .../clang/lib/AST/RecordLayoutBuilder.cpp | 240 +- contrib/llvm-project/clang/lib/AST/Stmt.cpp | 162 +- contrib/llvm-project/clang/lib/AST/StmtCXX.cpp | 5 +- .../llvm-project/clang/lib/AST/StmtIterator.cpp | 1 - contrib/llvm-project/clang/lib/AST/StmtOpenACC.cpp | 325 +- contrib/llvm-project/clang/lib/AST/StmtOpenMP.cpp | 80 +- contrib/llvm-project/clang/lib/AST/StmtPrinter.cpp | 223 +- contrib/llvm-project/clang/lib/AST/StmtProfile.cpp | 310 +- contrib/llvm-project/clang/lib/AST/StmtViz.cpp | 5 +- .../llvm-project/clang/lib/AST/TemplateBase.cpp | 69 +- .../llvm-project/clang/lib/AST/TemplateName.cpp | 274 +- .../llvm-project/clang/lib/AST/TextNodeDumper.cpp | 350 +- contrib/llvm-project/clang/lib/AST/Type.cpp | 1379 +- contrib/llvm-project/clang/lib/AST/TypeLoc.cpp | 60 +- contrib/llvm-project/clang/lib/AST/TypePrinter.cpp | 293 +- contrib/llvm-project/clang/lib/AST/VTTBuilder.cpp | 1 - .../llvm-project/clang/lib/AST/VTableBuilder.cpp | 32 +- .../clang/lib/ASTMatchers/ASTMatchFinder.cpp | 29 +- .../clang/lib/ASTMatchers/ASTMatchersInternal.cpp | 71 +- .../clang/lib/ASTMatchers/Dynamic/Marshallers.h | 2 +- .../clang/lib/ASTMatchers/Dynamic/Parser.cpp | 1 - .../clang/lib/ASTMatchers/Dynamic/Registry.cpp | 9 +- .../clang/lib/ASTMatchers/Dynamic/VariantValue.cpp | 1 - .../clang/lib/ASTMatchers/GtestMatchers.cpp | 5 - .../clang/lib/ASTMatchers/LowLevelHelpers.cpp | 106 + .../clang/lib/Analysis/AnalysisDeclContext.cpp | 6 +- .../llvm-project/clang/lib/Analysis/BodyFarm.cpp | 4 +- contrib/llvm-project/clang/lib/Analysis/CFG.cpp | 377 +- .../clang/lib/Analysis/CFGReachabilityAnalysis.cpp | 1 - .../llvm-project/clang/lib/Analysis/CFGStmtMap.cpp | 4 +- .../llvm-project/clang/lib/Analysis/CallGraph.cpp | 9 +- .../clang/lib/Analysis/CalledOnceCheck.cpp | 10 +- .../clang/lib/Analysis/CloneDetection.cpp | 1 - .../clang/lib/Analysis/CocoaConventions.cpp | 1 - .../llvm-project/clang/lib/Analysis/Consumed.cpp | 16 +- .../clang/lib/Analysis/ExprMutationAnalyzer.cpp | 273 +- .../llvm-project/clang/lib/Analysis/FixitUtil.cpp | 236 + .../clang/lib/Analysis/FlowSensitive/ASTOps.cpp | 60 +- .../lib/Analysis/FlowSensitive/AdornedCFG.cpp | 15 +- .../clang/lib/Analysis/FlowSensitive/Arena.cpp | 4 +- .../lib/Analysis/FlowSensitive/CNFFormula.cpp | 7 +- .../FlowSensitive/DataflowAnalysisContext.cpp | 9 +- .../Analysis/FlowSensitive/DataflowEnvironment.cpp | 33 +- .../clang/lib/Analysis/FlowSensitive/Formula.cpp | 3 +- .../lib/Analysis/FlowSensitive/HTMLLogger.cpp | 3 +- .../FlowSensitive/Models/ChromiumCheckModel.cpp | 8 +- .../Models/UncheckedOptionalAccessModel.cpp | 311 +- .../Analysis/FlowSensitive/SimplifyConstraints.cpp | 23 +- .../FlowSensitive/SmartPointerAccessorCaching.cpp | 199 + .../clang/lib/Analysis/FlowSensitive/Transfer.cpp | 21 +- .../FlowSensitive/TypeErasedDataflowAnalysis.cpp | 25 +- .../clang/lib/Analysis/FlowSensitive/Value.cpp | 2 - .../clang/lib/Analysis/IntervalPartition.cpp | 18 +- .../llvm-project/clang/lib/Analysis/IssueHash.cpp | 4 - .../clang/lib/Analysis/LifetimeSafety.cpp | 762 + .../clang/lib/Analysis/LiveVariables.cpp | 62 +- .../clang/lib/Analysis/PathDiagnostic.cpp | 19 +- .../clang/lib/Analysis/ProgramPoint.cpp | 127 +- .../clang/lib/Analysis/ReachableCode.cpp | 20 +- .../clang/lib/Analysis/RetainSummaryManager.cpp | 3 +- .../clang/lib/Analysis/ThreadSafety.cpp | 470 +- .../clang/lib/Analysis/ThreadSafetyCommon.cpp | 101 +- .../clang/lib/Analysis/ThreadSafetyTIL.cpp | 1 - .../clang/lib/Analysis/UninitializedValues.cpp | 57 +- .../clang/lib/Analysis/UnsafeBufferUsage.cpp | 2352 +- .../CheckerDependencyHandling.cpp | 1 - .../CheckerOptionHandling.cpp | 1 - .../llvm-project/clang/lib/Basic/Attributes.cpp | 224 +- contrib/llvm-project/clang/lib/Basic/Builtins.cpp | 180 +- .../clang/lib/Basic/CodeGenOptions.cpp | 51 +- contrib/llvm-project/clang/lib/Basic/Cuda.cpp | 120 +- .../llvm-project/clang/lib/Basic/DarwinSDKInfo.cpp | 26 +- .../llvm-project/clang/lib/Basic/Diagnostic.cpp | 593 +- .../llvm-project/clang/lib/Basic/DiagnosticIDs.cpp | 549 +- .../clang/lib/Basic/ExpressionTraits.cpp | 1 - contrib/llvm-project/clang/lib/Basic/FileEntry.cpp | 1 - .../llvm-project/clang/lib/Basic/FileManager.cpp | 77 +- .../clang/lib/Basic/FileSystemStatCache.cpp | 15 +- .../clang/lib/Basic/IdentifierTable.cpp | 134 +- .../llvm-project/clang/lib/Basic/LangOptions.cpp | 32 +- .../llvm-project/clang/lib/Basic/LangStandards.cpp | 7 +- contrib/llvm-project/clang/lib/Basic/Module.cpp | 60 +- .../clang/lib/Basic/NoSanitizeList.cpp | 25 +- .../llvm-project/clang/lib/Basic/OffloadArch.cpp | 131 + .../llvm-project/clang/lib/Basic/OpenMPKinds.cpp | 78 +- .../clang/lib/Basic/OperatorPrecedence.cpp | 1 - .../llvm-project/clang/lib/Basic/ProfileList.cpp | 30 +- .../clang/lib/Basic/SanitizerSpecialCaseList.cpp | 26 +- .../llvm-project/clang/lib/Basic/Sanitizers.cpp | 83 +- contrib/llvm-project/clang/lib/Basic/Sarif.cpp | 5 +- .../clang/lib/Basic/SimpleTypoCorrection.cpp | 63 + .../clang/lib/Basic/SourceLocation.cpp | 6 +- .../llvm-project/clang/lib/Basic/SourceManager.cpp | 215 +- contrib/llvm-project/clang/lib/Basic/Stack.cpp | 40 +- .../clang/lib/Basic/StackExhaustionHandler.cpp | 35 + .../llvm-project/clang/lib/Basic/TargetDefines.h | 39 + contrib/llvm-project/clang/lib/Basic/TargetID.cpp | 19 +- .../llvm-project/clang/lib/Basic/TargetInfo.cpp | 39 +- contrib/llvm-project/clang/lib/Basic/Targets.cpp | 78 +- contrib/llvm-project/clang/lib/Basic/Targets.h | 27 +- .../clang/lib/Basic/Targets/AArch64.cpp | 477 +- .../llvm-project/clang/lib/Basic/Targets/AArch64.h | 101 +- .../clang/lib/Basic/Targets/AMDGPU.cpp | 94 +- .../llvm-project/clang/lib/Basic/Targets/AMDGPU.h | 55 +- .../llvm-project/clang/lib/Basic/Targets/ARC.cpp | 1 - contrib/llvm-project/clang/lib/Basic/Targets/ARC.h | 6 +- .../llvm-project/clang/lib/Basic/Targets/ARM.cpp | 155 +- contrib/llvm-project/clang/lib/Basic/Targets/ARM.h | 27 +- .../llvm-project/clang/lib/Basic/Targets/AVR.cpp | 69 + contrib/llvm-project/clang/lib/Basic/Targets/AVR.h | 14 +- .../llvm-project/clang/lib/Basic/Targets/BPF.cpp | 30 +- contrib/llvm-project/clang/lib/Basic/Targets/BPF.h | 10 +- .../llvm-project/clang/lib/Basic/Targets/CSKY.cpp | 4 - .../llvm-project/clang/lib/Basic/Targets/CSKY.h | 4 +- .../clang/lib/Basic/Targets/DirectX.cpp | 20 + .../llvm-project/clang/lib/Basic/Targets/DirectX.h | 24 +- .../clang/lib/Basic/Targets/Hexagon.cpp | 54 +- .../llvm-project/clang/lib/Basic/Targets/Hexagon.h | 2 +- .../llvm-project/clang/lib/Basic/Targets/Lanai.h | 4 +- .../llvm-project/clang/lib/Basic/Targets/Le64.cpp | 30 - .../llvm-project/clang/lib/Basic/Targets/Le64.h | 64 - .../clang/lib/Basic/Targets/LoongArch.cpp | 243 +- .../clang/lib/Basic/Targets/LoongArch.h | 25 +- .../llvm-project/clang/lib/Basic/Targets/M68k.cpp | 8 +- .../llvm-project/clang/lib/Basic/Targets/M68k.h | 2 +- .../llvm-project/clang/lib/Basic/Targets/MSP430.h | 4 +- .../llvm-project/clang/lib/Basic/Targets/Mips.cpp | 101 +- .../llvm-project/clang/lib/Basic/Targets/Mips.h | 45 +- .../llvm-project/clang/lib/Basic/Targets/NVPTX.cpp | 67 +- .../llvm-project/clang/lib/Basic/Targets/NVPTX.h | 27 +- .../clang/lib/Basic/Targets/OSTargets.cpp | 51 +- .../clang/lib/Basic/Targets/OSTargets.h | 105 +- .../llvm-project/clang/lib/Basic/Targets/PNaCl.cpp | 6 +- .../llvm-project/clang/lib/Basic/Targets/PNaCl.h | 4 +- .../llvm-project/clang/lib/Basic/Targets/PPC.cpp | 356 +- contrib/llvm-project/clang/lib/Basic/Targets/PPC.h | 27 +- .../llvm-project/clang/lib/Basic/Targets/RISCV.cpp | 276 +- .../llvm-project/clang/lib/Basic/Targets/RISCV.h | 45 +- .../llvm-project/clang/lib/Basic/Targets/SPIR.cpp | 56 +- .../llvm-project/clang/lib/Basic/Targets/SPIR.h | 131 +- .../llvm-project/clang/lib/Basic/Targets/Sparc.h | 10 +- .../clang/lib/Basic/Targets/SystemZ.cpp | 46 +- .../llvm-project/clang/lib/Basic/Targets/SystemZ.h | 75 +- contrib/llvm-project/clang/lib/Basic/Targets/TCE.h | 14 +- .../llvm-project/clang/lib/Basic/Targets/VE.cpp | 21 +- contrib/llvm-project/clang/lib/Basic/Targets/VE.h | 2 +- .../clang/lib/Basic/Targets/WebAssembly.cpp | 116 +- .../clang/lib/Basic/Targets/WebAssembly.h | 80 +- .../llvm-project/clang/lib/Basic/Targets/X86.cpp | 181 +- contrib/llvm-project/clang/lib/Basic/Targets/X86.h | 108 +- .../llvm-project/clang/lib/Basic/Targets/XCore.cpp | 25 +- .../llvm-project/clang/lib/Basic/Targets/XCore.h | 4 +- .../clang/lib/Basic/Targets/Xtensa.cpp | 34 + .../llvm-project/clang/lib/Basic/Targets/Xtensa.h | 111 + .../llvm-project/clang/lib/Basic/TypeTraits.cpp | 1 - contrib/llvm-project/clang/lib/Basic/Warnings.cpp | 20 +- .../llvm-project/clang/lib/CIR/CodeGen/ABIInfo.h | 30 + .../llvm-project/clang/lib/CIR/CodeGen/Address.h | 108 + .../clang/lib/CIR/CodeGen/CIRGenBuilder.cpp | 79 + .../clang/lib/CIR/CodeGen/CIRGenBuilder.h | 447 + .../clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp | 263 + .../clang/lib/CIR/CodeGen/CIRGenCXX.cpp | 40 + .../clang/lib/CIR/CodeGen/CIRGenCXXABI.cpp | 63 + .../clang/lib/CIR/CodeGen/CIRGenCXXABI.h | 109 + .../clang/lib/CIR/CodeGen/CIRGenCXXExpr.cpp | 382 + .../clang/lib/CIR/CodeGen/CIRGenCall.cpp | 774 + .../clang/lib/CIR/CodeGen/CIRGenCall.h | 196 + .../clang/lib/CIR/CodeGen/CIRGenClass.cpp | 510 + .../clang/lib/CIR/CodeGen/CIRGenConstantEmitter.h | 139 + .../clang/lib/CIR/CodeGen/CIRGenDecl.cpp | 650 + .../clang/lib/CIR/CodeGen/CIRGenDeclOpenACC.cpp | 34 + .../clang/lib/CIR/CodeGen/CIRGenExpr.cpp | 1821 ++ .../clang/lib/CIR/CodeGen/CIRGenExprAggregate.cpp | 400 + .../clang/lib/CIR/CodeGen/CIRGenExprComplex.cpp | 428 + .../clang/lib/CIR/CodeGen/CIRGenExprConstant.cpp | 833 + .../clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp | 2154 ++ .../clang/lib/CIR/CodeGen/CIRGenFunction.cpp | 808 + .../clang/lib/CIR/CodeGen/CIRGenFunction.h | 1304 + .../clang/lib/CIR/CodeGen/CIRGenFunctionInfo.h | 151 + .../clang/lib/CIR/CodeGen/CIRGenItaniumCXXABI.cpp | 258 + .../clang/lib/CIR/CodeGen/CIRGenModule.cpp | 1972 ++ .../clang/lib/CIR/CodeGen/CIRGenModule.h | 423 + .../clang/lib/CIR/CodeGen/CIRGenOpenACC.cpp | 131 + .../clang/lib/CIR/CodeGen/CIRGenOpenACCClause.cpp | 1036 + .../clang/lib/CIR/CodeGen/CIRGenRecordLayout.h | 206 + .../lib/CIR/CodeGen/CIRGenRecordLayoutBuilder.cpp | 812 + .../clang/lib/CIR/CodeGen/CIRGenStmt.cpp | 919 + .../clang/lib/CIR/CodeGen/CIRGenStmtOpenACC.cpp | 311 + .../lib/CIR/CodeGen/CIRGenStmtOpenACCLoop.cpp | 140 + .../clang/lib/CIR/CodeGen/CIRGenTypeCache.h | 83 + .../clang/lib/CIR/CodeGen/CIRGenTypes.cpp | 648 + .../clang/lib/CIR/CodeGen/CIRGenTypes.h | 204 + .../clang/lib/CIR/CodeGen/CIRGenValue.h | 379 + .../clang/lib/CIR/CodeGen/CIRGenerator.cpp | 160 + .../clang/lib/CIR/CodeGen/TargetInfo.cpp | 72 + .../clang/lib/CIR/CodeGen/TargetInfo.h | 95 + .../clang/lib/CIR/Dialect/IR/CIRAttrs.cpp | 373 + .../clang/lib/CIR/Dialect/IR/CIRDataLayout.cpp | 22 + .../clang/lib/CIR/Dialect/IR/CIRDialect.cpp | 2129 +- .../clang/lib/CIR/Dialect/IR/CIRMemorySlot.cpp | 137 + .../clang/lib/CIR/Dialect/IR/CIRTypes.cpp | 779 + .../Dialect/OpenACC/CIROpenACCTypeInterfaces.cpp | 65 + .../Dialect/OpenACC/RegisterOpenACCExtensions.cpp | 27 + .../lib/CIR/Dialect/Transforms/CIRCanonicalize.cpp | 159 + .../lib/CIR/Dialect/Transforms/CIRSimplify.cpp | 330 + .../lib/CIR/Dialect/Transforms/FlattenCFG.cpp | 569 + .../lib/CIR/Dialect/Transforms/HoistAllocas.cpp | 84 + .../lib/CIR/Dialect/Transforms/LoweringPrepare.cpp | 40 + .../clang/lib/CIR/Dialect/Transforms/PassDetail.h | 29 + .../clang/lib/CIR/FrontendAction/CIRGenAction.cpp | 212 + .../lib/CIR/Interfaces/CIRLoopOpInterface.cpp | 63 + .../clang/lib/CIR/Interfaces/CIROpInterfaces.cpp | 37 + .../lib/CIR/Interfaces/CIRTypeInterfaces.cpp} | 13 +- .../clang/lib/CIR/Lowering/CIRPasses.cpp | 50 + .../lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp | 2716 ++ .../lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.h | 599 + .../CIR/Lowering/DirectToLLVM/LowerToLLVMIR.cpp | 68 + .../clang/lib/CIR/Lowering/LoweringHelpers.cpp | 184 + contrib/llvm-project/clang/lib/CodeGen/ABIInfo.cpp | 22 +- contrib/llvm-project/clang/lib/CodeGen/ABIInfo.h | 11 +- .../llvm-project/clang/lib/CodeGen/ABIInfoImpl.cpp | 34 +- .../llvm-project/clang/lib/CodeGen/ABIInfoImpl.h | 17 - contrib/llvm-project/clang/lib/CodeGen/Address.h | 5 +- .../clang/lib/CodeGen/BackendConsumer.h | 36 +- .../llvm-project/clang/lib/CodeGen/BackendUtil.cpp | 352 +- .../llvm-project/clang/lib/CodeGen/CGAtomic.cpp | 81 +- .../llvm-project/clang/lib/CodeGen/CGBlocks.cpp | 149 +- contrib/llvm-project/clang/lib/CodeGen/CGBlocks.h | 1 + contrib/llvm-project/clang/lib/CodeGen/CGBuilder.h | 34 +- .../llvm-project/clang/lib/CodeGen/CGBuiltin.cpp | 18298 +---------- contrib/llvm-project/clang/lib/CodeGen/CGBuiltin.h | 105 + .../llvm-project/clang/lib/CodeGen/CGCUDANV.cpp | 158 +- .../clang/lib/CodeGen/CGCUDARuntime.cpp | 6 +- .../llvm-project/clang/lib/CodeGen/CGCUDARuntime.h | 8 +- contrib/llvm-project/clang/lib/CodeGen/CGCXX.cpp | 2 - .../llvm-project/clang/lib/CodeGen/CGCXXABI.cpp | 14 +- contrib/llvm-project/clang/lib/CodeGen/CGCXXABI.h | 12 +- contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp | 1083 +- contrib/llvm-project/clang/lib/CodeGen/CGCall.h | 31 +- contrib/llvm-project/clang/lib/CodeGen/CGClass.cpp | 140 +- .../llvm-project/clang/lib/CodeGen/CGCleanup.cpp | 59 +- contrib/llvm-project/clang/lib/CodeGen/CGCleanup.h | 8 + .../llvm-project/clang/lib/CodeGen/CGCoroutine.cpp | 33 +- .../llvm-project/clang/lib/CodeGen/CGDebugInfo.cpp | 611 +- .../llvm-project/clang/lib/CodeGen/CGDebugInfo.h | 76 +- contrib/llvm-project/clang/lib/CodeGen/CGDecl.cpp | 296 +- .../llvm-project/clang/lib/CodeGen/CGDeclCXX.cpp | 110 +- .../llvm-project/clang/lib/CodeGen/CGException.cpp | 32 +- contrib/llvm-project/clang/lib/CodeGen/CGExpr.cpp | 1581 +- .../llvm-project/clang/lib/CodeGen/CGExprAgg.cpp | 256 +- .../llvm-project/clang/lib/CodeGen/CGExprCXX.cpp | 244 +- .../clang/lib/CodeGen/CGExprComplex.cpp | 100 +- .../clang/lib/CodeGen/CGExprConstant.cpp | 174 +- .../clang/lib/CodeGen/CGExprScalar.cpp | 662 +- .../clang/lib/CodeGen/CGGPUBuiltin.cpp | 30 - .../clang/lib/CodeGen/CGHLSLBuiltins.cpp | 834 + .../clang/lib/CodeGen/CGHLSLRuntime.cpp | 692 +- .../llvm-project/clang/lib/CodeGen/CGHLSLRuntime.h | 98 +- .../llvm-project/clang/lib/CodeGen/CGLoopInfo.cpp | 140 +- .../llvm-project/clang/lib/CodeGen/CGLoopInfo.h | 43 +- .../clang/lib/CodeGen/CGNonTrivialStruct.cpp | 26 +- contrib/llvm-project/clang/lib/CodeGen/CGObjC.cpp | 84 +- .../llvm-project/clang/lib/CodeGen/CGObjCGNU.cpp | 229 +- .../llvm-project/clang/lib/CodeGen/CGObjCMac.cpp | 2479 +- .../clang/lib/CodeGen/CGObjCRuntime.cpp | 29 +- .../llvm-project/clang/lib/CodeGen/CGObjCRuntime.h | 129 +- .../clang/lib/CodeGen/CGOpenCLRuntime.cpp | 23 +- .../clang/lib/CodeGen/CGOpenMPRuntime.cpp | 1343 +- .../clang/lib/CodeGen/CGOpenMPRuntime.h | 42 +- .../clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp | 93 +- .../clang/lib/CodeGen/CGOpenMPRuntimeGPU.h | 7 +- .../clang/lib/CodeGen/CGPointerAuth.cpp | 154 +- .../clang/lib/CodeGen/CGRecordLayoutBuilder.cpp | 100 +- contrib/llvm-project/clang/lib/CodeGen/CGStmt.cpp | 356 +- .../clang/lib/CodeGen/CGStmtOpenMP.cpp | 743 +- contrib/llvm-project/clang/lib/CodeGen/CGVTT.cpp | 5 +- .../llvm-project/clang/lib/CodeGen/CGVTables.cpp | 47 +- contrib/llvm-project/clang/lib/CodeGen/CGVTables.h | 10 +- .../clang/lib/CodeGen/CodeGenABITypes.cpp | 27 +- .../clang/lib/CodeGen/CodeGenAction.cpp | 149 +- .../clang/lib/CodeGen/CodeGenFunction.cpp | 404 +- .../clang/lib/CodeGen/CodeGenFunction.h | 1075 +- .../clang/lib/CodeGen/CodeGenModule.cpp | 779 +- .../llvm-project/clang/lib/CodeGen/CodeGenModule.h | 171 +- .../llvm-project/clang/lib/CodeGen/CodeGenPGO.cpp | 125 +- .../llvm-project/clang/lib/CodeGen/CodeGenPGO.h | 17 +- .../llvm-project/clang/lib/CodeGen/CodeGenSYCL.cpp | 72 + .../llvm-project/clang/lib/CodeGen/CodeGenTBAA.cpp | 146 +- .../llvm-project/clang/lib/CodeGen/CodeGenTBAA.h | 7 + .../clang/lib/CodeGen/CodeGenTypes.cpp | 147 +- .../llvm-project/clang/lib/CodeGen/CodeGenTypes.h | 9 +- .../clang/lib/CodeGen/ConstantInitBuilder.cpp | 16 +- .../clang/lib/CodeGen/CoverageMappingGen.cpp | 311 +- .../clang/lib/CodeGen/CoverageMappingGen.h | 5 +- .../llvm-project/clang/lib/CodeGen/EHScopeStack.h | 9 +- .../clang/lib/CodeGen/HLSLBufferLayoutBuilder.cpp | 274 + .../clang/lib/CodeGen/HLSLBufferLayoutBuilder.h | 47 + .../clang/lib/CodeGen/ItaniumCXXABI.cpp | 232 +- .../clang/lib/CodeGen/LinkInModulesPass.cpp | 4 - .../clang/lib/CodeGen/MacroPPCallbacks.cpp | 2 +- .../clang/lib/CodeGen/MicrosoftCXXABI.cpp | 134 +- .../clang/lib/CodeGen/ModuleBuilder.cpp | 6 +- ...ations.cpp => ObjectFilePCHContainerWriter.cpp} | 68 +- .../clang/lib/CodeGen/SanitizerHandler.h | 50 + .../clang/lib/CodeGen/SanitizerMetadata.cpp | 42 +- .../clang/lib/CodeGen/SwiftCallingConv.cpp | 19 +- .../clang/lib/CodeGen/TargetBuiltins/AMDGPU.cpp | 1301 + .../clang/lib/CodeGen/TargetBuiltins/ARM.cpp | 8137 +++++ .../clang/lib/CodeGen/TargetBuiltins/DirectX.cpp | 42 + .../clang/lib/CodeGen/TargetBuiltins/Hexagon.cpp | 263 + .../clang/lib/CodeGen/TargetBuiltins/NVPTX.cpp | 1182 + .../clang/lib/CodeGen/TargetBuiltins/PPC.cpp | 1354 + .../clang/lib/CodeGen/TargetBuiltins/RISCV.cpp | 430 + .../clang/lib/CodeGen/TargetBuiltins/SPIR.cpp | 144 + .../clang/lib/CodeGen/TargetBuiltins/SystemZ.cpp | 438 + .../lib/CodeGen/TargetBuiltins/WebAssembly.cpp | 625 + .../clang/lib/CodeGen/TargetBuiltins/X86.cpp | 3284 ++ .../llvm-project/clang/lib/CodeGen/TargetInfo.cpp | 70 +- .../llvm-project/clang/lib/CodeGen/TargetInfo.h | 63 +- .../clang/lib/CodeGen/Targets/AArch64.cpp | 579 +- .../clang/lib/CodeGen/Targets/AMDGPU.cpp | 191 +- .../llvm-project/clang/lib/CodeGen/Targets/ARC.cpp | 11 +- .../llvm-project/clang/lib/CodeGen/Targets/ARM.cpp | 118 +- .../llvm-project/clang/lib/CodeGen/Targets/AVR.cpp | 4 +- .../llvm-project/clang/lib/CodeGen/Targets/BPF.cpp | 12 +- .../clang/lib/CodeGen/Targets/CSKY.cpp | 8 +- .../clang/lib/CodeGen/Targets/DirectX.cpp | 98 + .../clang/lib/CodeGen/Targets/Hexagon.cpp | 36 +- .../clang/lib/CodeGen/Targets/Lanai.cpp | 14 +- .../clang/lib/CodeGen/Targets/LoongArch.cpp | 22 +- .../clang/lib/CodeGen/Targets/MSP430.cpp | 1 + .../clang/lib/CodeGen/Targets/Mips.cpp | 32 +- .../clang/lib/CodeGen/Targets/NVPTX.cpp | 114 +- .../clang/lib/CodeGen/Targets/PNaCl.cpp | 12 +- .../llvm-project/clang/lib/CodeGen/Targets/PPC.cpp | 45 +- .../clang/lib/CodeGen/Targets/RISCV.cpp | 390 +- .../clang/lib/CodeGen/Targets/SPIR.cpp | 387 +- .../clang/lib/CodeGen/Targets/Sparc.cpp | 7 +- *** 2279105 LINES SKIPPED *** From nobody Fri May 29 23:01:39 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRzPc303Xz6gDn8 for ; Fri, 29 May 2026 23:01: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRzPb536Zz4QFp for ; Fri, 29 May 2026 23:01:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095699; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WALxAJNHZWefGFwB/oUmNggv9FjxUYQo6G1ZL6qITg0=; b=IEjVg/xVeaY5TnhVrVTdefGQhfu/guQKB4kjmtd9+jA0EAr4AgdHICL2AmJqNPLvxvKIXj SEUv6vklwQgNVgB5BWd7Yeth/YfFnuHVegNliiH3t5+9KLnja5z1w7KCaS0OIThXuZ9BQJ j67JYy366FOGpTjCyr9j4D8KUeF/K9icUCU9KkZ4bcGWOdAe/pz2N//dRUJ5QKzjxBve2P +Zq4a8FsavZi39LkQm1SVZVdf4yTg3rYZOrsDJ4dSF4JiT96vMbT9RGCateQIUpFlJCdo4 Eew4jjY4NzrgZyIqoe0MuMnXfXIdbE0N09fpr0Yw7eRMra0a97I2oqcXsvvETg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780095699; a=rsa-sha256; cv=none; b=AM7k7yDo235KZ9CD0m5iHkV1ppJuzhWGFiVYhUFKreJ8Qc0Q7qttGHjySnXGO0OSIvf/Eh yo9q+bZ9zS8MTFFpvy7c8fzF8C88NQKY/SO9WxgTouHCE97Zb8XTtOAUR6PwKJYihKvU/Y mDt8xyLNRGuQvNmsAk0KpU3JZLNglEzZjLOrKHGH0VLDIMlAUSXiwk2f1PH5kKLI3gFc3d cAdVu9Ybjv2ZMNRxXhg19Qx0BL7sgSNUwIsYirUuJwvKbFRQhS3lFoyIao75RII3r3xlO/ 7ip4mkxxxe5TgKSg840K/IY4PAtkOU1TWPmBprI5DdWKtNSH1G6hNTtgqAUCfQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095699; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WALxAJNHZWefGFwB/oUmNggv9FjxUYQo6G1ZL6qITg0=; b=ynI7Oe3Rf2ypKD7hv6YxgDOKmgvBjePELY3aFeXTi6lfjWKO62S0H7LMkg5pWBLczQDR/Y nqBW4PiWNFhP8aH9phhgkVdnO9Ejumm1oEo64ci78WJXvvNyrdIgB0Ma564gDYRtNo75D9 lwzI5YaJQTITzWZ4xJWzoCZ3tvlvQs1ra0gWG/f5mRIgQlQ0RNhnW3HlME2akWG5v8o09N eZcEflD0bCzyVVSsGqo5S/Wted8R4X6rO1K801FB54I+h1jLXFQGwffOpOJExBGQCfhyEm Ge3QlfDZSAiKimrVvg5e/Dl2oXugtmWszyNbd1MqOqwwG7J4i7+WWfwDwWtzaQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRzPb4TbSztZq for ; Fri, 29 May 2026 23:01:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 415d8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 23:01:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 85298a854720 - stable/15 - Adjust llvm-project main llvmorg-21-init-19288-gface93e724f4, part 2 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 85298a854720b7e712d4500b8d6ca340f6c39dd8 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 23:01:39 +0000 Message-Id: <6a1a1ad3.415d8.30619bae@gitrepo.freebsd.org> The branch stable/15 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=85298a854720b7e712d4500b8d6ca340f6c39dd8 commit 85298a854720b7e712d4500b8d6ca340f6c39dd8 Author: Dimitry Andric AuthorDate: 2025-12-09 13:44:39 +0000 Commit: Dimitry Andric CommitDate: 2026-05-29 22:57:30 +0000 Adjust llvm-project main llvmorg-21-init-19288-gface93e724f4, part 2 This adjusts the llvmorg-21-init-19288-gface93e724f4 import: add partial libc/ top-level directory. PR: 292067 MFC after: 1 month (cherry picked from commit 8f6978f83cc64a2e644d9bdf380a6996d3acdc4b) --- contrib/llvm-project/libc/shared/fp_bits.h | 23 + contrib/llvm-project/libc/shared/libc_common.h | 26 + contrib/llvm-project/libc/shared/math.h | 23 + contrib/llvm-project/libc/shared/math/expf.h | 23 + contrib/llvm-project/libc/shared/math/expf16.h | 29 ++ contrib/llvm-project/libc/shared/math/frexpf.h | 24 + contrib/llvm-project/libc/shared/math/frexpf128.h | 29 ++ contrib/llvm-project/libc/shared/math/frexpf16.h | 29 ++ contrib/llvm-project/libc/shared/math/ldexpf.h | 23 + contrib/llvm-project/libc/shared/math/ldexpf128.h | 29 ++ contrib/llvm-project/libc/shared/math/ldexpf16.h | 31 ++ contrib/llvm-project/libc/shared/rpc.h | 603 ++++++++++++++++++++++ contrib/llvm-project/libc/shared/rpc_opcodes.h | 53 ++ contrib/llvm-project/libc/shared/rpc_server.h | 23 + contrib/llvm-project/libc/shared/rpc_util.h | 276 ++++++++++ contrib/llvm-project/libc/shared/str_to_float.h | 28 + contrib/llvm-project/libc/shared/str_to_integer.h | 25 + 17 files changed, 1297 insertions(+) diff --git a/contrib/llvm-project/libc/shared/fp_bits.h b/contrib/llvm-project/libc/shared/fp_bits.h new file mode 100644 index 000000000000..e6bb1e17b80c --- /dev/null +++ b/contrib/llvm-project/libc/shared/fp_bits.h @@ -0,0 +1,23 @@ +//===-- Floating point number utils -----------------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_LIBC_SHARED_FP_BITS_H +#define LLVM_LIBC_SHARED_FP_BITS_H + +#include "libc_common.h" +#include "src/__support/FPUtil/FPBits.h" + +namespace LIBC_NAMESPACE_DECL { +namespace shared { + +using fputil::FPBits; + +} // namespace shared +} // namespace LIBC_NAMESPACE_DECL + +#endif // LLVM_LIBC_SHARED_FP_BITS_H diff --git a/contrib/llvm-project/libc/shared/libc_common.h b/contrib/llvm-project/libc/shared/libc_common.h new file mode 100644 index 000000000000..c4560bbb0276 --- /dev/null +++ b/contrib/llvm-project/libc/shared/libc_common.h @@ -0,0 +1,26 @@ +//===-- Common defines for sharing LLVM libc with LLVM projects -*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_LIBC_SHARED_LIBC_COMMON_H +#define LLVM_LIBC_SHARED_LIBC_COMMON_H + +// Use system errno. +#ifdef LIBC_ERRNO_MODE +#if LIBC_ERRNO_MODE != LIBC_ERRNO_MODE_SYSTEM_INLINE +#error \ + "LIBC_ERRNO_MODE was set to something different from LIBC_ERRNO_MODE_SYSTEM_INLINE." +#endif // LIBC_ERRNO_MODE != LIBC_ERRNO_MODE_SYSTEM_INLINE +#else +#define LIBC_ERRNO_MODE LIBC_ERRNO_MODE_SYSTEM_INLINE +#endif // LIBC_ERRNO_MODE + +#ifndef LIBC_NAMESPACE +#define LIBC_NAMESPACE __llvm_libc +#endif // LIBC_NAMESPACE + +#endif // LLVM_LIBC_SHARED_LIBC_COMMON_H diff --git a/contrib/llvm-project/libc/shared/math.h b/contrib/llvm-project/libc/shared/math.h new file mode 100644 index 000000000000..b2f1a03e0940 --- /dev/null +++ b/contrib/llvm-project/libc/shared/math.h @@ -0,0 +1,23 @@ +//===-- Floating point math functions ---------------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_LIBC_SHARED_MATH_H +#define LLVM_LIBC_SHARED_MATH_H + +#include "libc_common.h" + +#include "math/expf.h" +#include "math/expf16.h" +#include "math/frexpf.h" +#include "math/frexpf128.h" +#include "math/frexpf16.h" +#include "math/ldexpf.h" +#include "math/ldexpf128.h" +#include "math/ldexpf16.h" + +#endif // LLVM_LIBC_SHARED_MATH_H diff --git a/contrib/llvm-project/libc/shared/math/expf.h b/contrib/llvm-project/libc/shared/math/expf.h new file mode 100644 index 000000000000..a4e8b0751bb4 --- /dev/null +++ b/contrib/llvm-project/libc/shared/math/expf.h @@ -0,0 +1,23 @@ +//===-- Shared expf function ------------------------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_LIBC_SHARED_MATH_EXPF_H +#define LLVM_LIBC_SHARED_MATH_EXPF_H + +#include "shared/libc_common.h" +#include "src/__support/math/expf.h" + +namespace LIBC_NAMESPACE_DECL { +namespace shared { + +using math::expf; + +} // namespace shared +} // namespace LIBC_NAMESPACE_DECL + +#endif // LLVM_LIBC_SHARED_MATH_EXPF_H diff --git a/contrib/llvm-project/libc/shared/math/expf16.h b/contrib/llvm-project/libc/shared/math/expf16.h new file mode 100644 index 000000000000..a6a3e89e680d --- /dev/null +++ b/contrib/llvm-project/libc/shared/math/expf16.h @@ -0,0 +1,29 @@ +//===-- Shared expf16 function ----------------------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_LIBC_SHARED_MATH_EXPF16_H +#define LLVM_LIBC_SHARED_MATH_EXPF16_H + +#include "include/llvm-libc-macros/float16-macros.h" +#include "shared/libc_common.h" + +#ifdef LIBC_TYPES_HAS_FLOAT16 + +#include "src/__support/math/expf16.h" + +namespace LIBC_NAMESPACE_DECL { +namespace shared { + +using math::expf16; + +} // namespace shared +} // namespace LIBC_NAMESPACE_DECL + +#endif // LIBC_TYPES_HAS_FLOAT16 + +#endif // LLVM_LIBC_SHARED_MATH_EXPF16_H diff --git a/contrib/llvm-project/libc/shared/math/frexpf.h b/contrib/llvm-project/libc/shared/math/frexpf.h new file mode 100644 index 000000000000..35f23a70eb25 --- /dev/null +++ b/contrib/llvm-project/libc/shared/math/frexpf.h @@ -0,0 +1,24 @@ +//===-- Shared frexpf function ------------------------------------*- C++ +//-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_LIBC_SHARED_MATH_FREXPF_H +#define LLVM_LIBC_SHARED_MATH_FREXPF_H + +#include "shared/libc_common.h" +#include "src/__support/math/frexpf.h" + +namespace LIBC_NAMESPACE_DECL { +namespace shared { + +using math::frexpf; + +} // namespace shared +} // namespace LIBC_NAMESPACE_DECL + +#endif // LLVM_LIBC_SHARED_MATH_FREXPF_H diff --git a/contrib/llvm-project/libc/shared/math/frexpf128.h b/contrib/llvm-project/libc/shared/math/frexpf128.h new file mode 100644 index 000000000000..6b922bd73129 --- /dev/null +++ b/contrib/llvm-project/libc/shared/math/frexpf128.h @@ -0,0 +1,29 @@ +//===-- Shared frexpf128 function -------------------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_LIBC_SHARED_MATH_FREXPF128_H +#define LLVM_LIBC_SHARED_MATH_FREXPF128_H + +#include "include/llvm-libc-types/float128.h" + +#ifdef LIBC_TYPES_HAS_FLOAT128 + +#include "shared/libc_common.h" +#include "src/__support/math/frexpf128.h" + +namespace LIBC_NAMESPACE_DECL { +namespace shared { + +using math::frexpf128; + +} // namespace shared +} // namespace LIBC_NAMESPACE_DECL + +#endif // LIBC_TYPES_HAS_FLOAT128 + +#endif // LLVM_LIBC_SHARED_MATH_FREXPF128_H diff --git a/contrib/llvm-project/libc/shared/math/frexpf16.h b/contrib/llvm-project/libc/shared/math/frexpf16.h new file mode 100644 index 000000000000..24b2883a6f91 --- /dev/null +++ b/contrib/llvm-project/libc/shared/math/frexpf16.h @@ -0,0 +1,29 @@ +//===-- Shared frexpf16 function --------------------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_LIBC_SHARED_MATH_FREXPF16_H +#define LLVM_LIBC_SHARED_MATH_FREXPF16_H + +#include "include/llvm-libc-macros/float16-macros.h" +#include "shared/libc_common.h" + +#ifdef LIBC_TYPES_HAS_FLOAT16 + +#include "src/__support/math/frexpf16.h" + +namespace LIBC_NAMESPACE_DECL { +namespace shared { + +using math::frexpf16; + +} // namespace shared +} // namespace LIBC_NAMESPACE_DECL + +#endif // LIBC_TYPES_HAS_FLOAT16 + +#endif // LLVM_LIBC_SHARED_MATH_FREXPF16_H diff --git a/contrib/llvm-project/libc/shared/math/ldexpf.h b/contrib/llvm-project/libc/shared/math/ldexpf.h new file mode 100644 index 000000000000..497933c47321 --- /dev/null +++ b/contrib/llvm-project/libc/shared/math/ldexpf.h @@ -0,0 +1,23 @@ +//===-- Shared ldexpf function ----------------------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_LIBC_SHARED_MATH_LDEXPF_H +#define LLVM_LIBC_SHARED_MATH_LDEXPF_H + +#include "shared/libc_common.h" +#include "src/__support/math/ldexpf.h" + +namespace LIBC_NAMESPACE_DECL { +namespace shared { + +using math::ldexpf; + +} // namespace shared +} // namespace LIBC_NAMESPACE_DECL + +#endif // LLVM_LIBC_SHARED_MATH_LDEXPF_H diff --git a/contrib/llvm-project/libc/shared/math/ldexpf128.h b/contrib/llvm-project/libc/shared/math/ldexpf128.h new file mode 100644 index 000000000000..d4066beb809c --- /dev/null +++ b/contrib/llvm-project/libc/shared/math/ldexpf128.h @@ -0,0 +1,29 @@ +//===-- Shared ldexpf128 function -------------------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_LIBC_SHARED_MATH_LDEXPF128_H +#define LLVM_LIBC_SHARED_MATH_LDEXPF128_H + +#include "include/llvm-libc-types/float128.h" + +#ifdef LIBC_TYPES_HAS_FLOAT128 + +#include "shared/libc_common.h" +#include "src/__support/math/ldexpf128.h" + +namespace LIBC_NAMESPACE_DECL { +namespace shared { + +using math::ldexpf128; + +} // namespace shared +} // namespace LIBC_NAMESPACE_DECL + +#endif // LIBC_TYPES_HAS_FLOAT128 + +#endif // LLVM_LIBC_SHARED_MATH_LDEXPF128_H diff --git a/contrib/llvm-project/libc/shared/math/ldexpf16.h b/contrib/llvm-project/libc/shared/math/ldexpf16.h new file mode 100644 index 000000000000..4c98c4c78d46 --- /dev/null +++ b/contrib/llvm-project/libc/shared/math/ldexpf16.h @@ -0,0 +1,31 @@ +//===-- Shared ldexpf16 function --------------------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_LIBC_SHARED_MATH_LDEXPF16_H +#define LLVM_LIBC_SHARED_MATH_LDEXPF16_H + +#include "include/llvm-libc-macros/float16-macros.h" + +#ifdef LIBC_TYPES_HAS_FLOAT16 + +#include "shared/libc_common.h" +#include "src/__support/math/ldexpf16.h" + +namespace LIBC_NAMESPACE_DECL { + +namespace shared { + +using math::ldexpf16; + +} // namespace shared + +} // namespace LIBC_NAMESPACE_DECL + +#endif // LIBC_TYPES_HAS_FLOAT16 + +#endif // LLVM_LIBC_SHARED_MATH_LDEXPF16_H diff --git a/contrib/llvm-project/libc/shared/rpc.h b/contrib/llvm-project/libc/shared/rpc.h new file mode 100644 index 000000000000..7295efd4eee3 --- /dev/null +++ b/contrib/llvm-project/libc/shared/rpc.h @@ -0,0 +1,603 @@ +//===-- Shared memory RPC client / server interface -------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// +// This file implements a remote procedure call mechanism to communicate between +// heterogeneous devices that can share an address space atomically. We provide +// a client and a server to facilitate the remote call. The client makes request +// to the server using a shared communication channel. We use separate atomic +// signals to indicate which side, the client or the server is in ownership of +// the buffer. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_LIBC_SHARED_RPC_H +#define LLVM_LIBC_SHARED_RPC_H + +#include "rpc_util.h" + +namespace rpc { + +/// Use scoped atomic variants if they are available for the target. +#if !__has_builtin(__scoped_atomic_load_n) +#define __scoped_atomic_load_n(src, ord, scp) __atomic_load_n(src, ord) +#define __scoped_atomic_store_n(dst, src, ord, scp) \ + __atomic_store_n(dst, src, ord) +#define __scoped_atomic_fetch_or(src, val, ord, scp) \ + __atomic_fetch_or(src, val, ord) +#define __scoped_atomic_fetch_and(src, val, ord, scp) \ + __atomic_fetch_and(src, val, ord) +#endif +#if !__has_builtin(__scoped_atomic_thread_fence) +#define __scoped_atomic_thread_fence(ord, scp) __atomic_thread_fence(ord) +#endif + +/// Generic codes that can be used whem implementing the server. +enum Status { + RPC_SUCCESS = 0x0, + RPC_ERROR = 0x1000, + RPC_UNHANDLED_OPCODE = 0x1001, +}; + +/// A fixed size channel used to communicate between the RPC client and server. +struct Buffer { + uint64_t data[8]; +}; +static_assert(sizeof(Buffer) == 64, "Buffer size mismatch"); + +/// The information associated with a packet. This indicates which operations to +/// perform and which threads are active in the slots. +struct Header { + uint64_t mask; + uint32_t opcode; +}; + +/// The maximum number of parallel ports that the RPC interface can support. +constexpr static uint64_t MAX_PORT_COUNT = 4096; + +/// A common process used to synchronize communication between a client and a +/// server. The process contains a read-only inbox and a write-only outbox used +/// for signaling ownership of the shared buffer between both sides. We assign +/// ownership of the buffer to the client if the inbox and outbox bits match, +/// otherwise it is owned by the server. +/// +/// This process is designed to allow the client and the server to exchange data +/// using a fixed size packet in a mostly arbitrary order using the 'send' and +/// 'recv' operations. The following restrictions to this scheme apply: +/// - The client will always start with a 'send' operation. +/// - The server will always start with a 'recv' operation. +/// - Every 'send' or 'recv' call is mirrored by the other process. +template struct Process { + RPC_ATTRS Process() = default; + RPC_ATTRS Process(const Process &) = delete; + RPC_ATTRS Process &operator=(const Process &) = delete; + RPC_ATTRS Process(Process &&) = default; + RPC_ATTRS Process &operator=(Process &&) = default; + RPC_ATTRS ~Process() = default; + + const uint32_t port_count = 0; + const uint32_t *const inbox = nullptr; + uint32_t *const outbox = nullptr; + Header *const header = nullptr; + Buffer *const packet = nullptr; + + static constexpr uint64_t NUM_BITS_IN_WORD = sizeof(uint32_t) * 8; + uint32_t lock[MAX_PORT_COUNT / NUM_BITS_IN_WORD] = {0}; + + RPC_ATTRS Process(uint32_t port_count, void *buffer) + : port_count(port_count), inbox(reinterpret_cast( + advance(buffer, inbox_offset(port_count)))), + outbox(reinterpret_cast( + advance(buffer, outbox_offset(port_count)))), + header(reinterpret_cast
( + advance(buffer, header_offset(port_count)))), + packet(reinterpret_cast( + advance(buffer, buffer_offset(port_count)))) {} + + /// Allocate a memory buffer sufficient to store the following equivalent + /// representation in memory. + /// + /// struct Equivalent { + /// Atomic primary[port_count]; + /// Atomic secondary[port_count]; + /// Header header[port_count]; + /// Buffer packet[port_count][lane_size]; + /// }; + RPC_ATTRS static constexpr uint64_t allocation_size(uint32_t port_count, + uint32_t lane_size) { + return buffer_offset(port_count) + buffer_bytes(port_count, lane_size); + } + + /// Retrieve the inbox state from memory shared between processes. + RPC_ATTRS uint32_t load_inbox(uint64_t lane_mask, uint32_t index) const { + return rpc::broadcast_value( + lane_mask, __scoped_atomic_load_n(&inbox[index], __ATOMIC_RELAXED, + __MEMORY_SCOPE_SYSTEM)); + } + + /// Retrieve the outbox state from memory shared between processes. + RPC_ATTRS uint32_t load_outbox(uint64_t lane_mask, uint32_t index) const { + return rpc::broadcast_value( + lane_mask, __scoped_atomic_load_n(&outbox[index], __ATOMIC_RELAXED, + __MEMORY_SCOPE_SYSTEM)); + } + + /// Signal to the other process that this one is finished with the buffer. + /// Equivalent to loading outbox followed by store of the inverted value + /// The outbox is write only by this warp and tracking the value locally is + /// cheaper than calling load_outbox to get the value to store. + RPC_ATTRS uint32_t invert_outbox(uint32_t index, uint32_t current_outbox) { + uint32_t inverted_outbox = !current_outbox; + __scoped_atomic_thread_fence(__ATOMIC_RELEASE, __MEMORY_SCOPE_SYSTEM); + __scoped_atomic_store_n(&outbox[index], inverted_outbox, __ATOMIC_RELAXED, + __MEMORY_SCOPE_SYSTEM); + return inverted_outbox; + } + + // Given the current outbox and inbox values, wait until the inbox changes + // to indicate that this thread owns the buffer element. + RPC_ATTRS void wait_for_ownership(uint64_t lane_mask, uint32_t index, + uint32_t outbox, uint32_t in) { + while (buffer_unavailable(in, outbox)) { + sleep_briefly(); + in = load_inbox(lane_mask, index); + } + __scoped_atomic_thread_fence(__ATOMIC_ACQUIRE, __MEMORY_SCOPE_SYSTEM); + } + + /// The packet is a linearly allocated array of buffers used to communicate + /// with the other process. This function returns the appropriate slot in this + /// array such that the process can operate on an entire warp or wavefront. + RPC_ATTRS Buffer *get_packet(uint32_t index, uint32_t lane_size) { + return &packet[index * lane_size]; + } + + /// Determines if this process needs to wait for ownership of the buffer. We + /// invert the condition on one of the processes to indicate that if one + /// process owns the buffer then the other does not. + RPC_ATTRS static bool buffer_unavailable(uint32_t in, uint32_t out) { + bool cond = in != out; + return Invert ? !cond : cond; + } + + /// Attempt to claim the lock at index. Return true on lock taken. + /// lane_mask is a bitmap of the threads in the warp that would hold the + /// single lock on success, e.g. the result of rpc::get_lane_mask() + /// The lock is held when the n-th bit of the lock bitfield is set. + RPC_ATTRS bool try_lock(uint64_t lane_mask, uint32_t index) { + // On amdgpu, test and set to the nth lock bit and a sync_lane would suffice + // On volta, need to handle differences between the threads running and + // the threads that were detected in the previous call to get_lane_mask() + // + // All threads in lane_mask try to claim the lock. At most one can succeed. + // There may be threads active which are not in lane mask which must not + // succeed in taking the lock, as otherwise it will leak. This is handled + // by making threads which are not in lane_mask or with 0, a no-op. + uint32_t id = rpc::get_lane_id(); + bool id_in_lane_mask = lane_mask & (1ul << id); + + // All threads in the warp call fetch_or. Possibly at the same time. + bool before = set_nth(lock, index, id_in_lane_mask); + uint64_t packed = rpc::ballot(lane_mask, before); + + // If every bit set in lane_mask is also set in packed, every single thread + // in the warp failed to get the lock. Ballot returns unset for threads not + // in the lane mask. + // + // Cases, per thread: + // mask==0 -> unspecified before, discarded by ballot -> 0 + // mask==1 and before==0 (success), set zero by ballot -> 0 + // mask==1 and before==1 (failure), set one by ballot -> 1 + // + // mask != packed implies at least one of the threads got the lock + // atomic semantics of fetch_or mean at most one of the threads for the lock + + // If holding the lock then the caller can load values knowing said loads + // won't move past the lock. No such guarantee is needed if the lock acquire + // failed. This conditional branch is expected to fold in the caller after + // inlining the current function. + bool holding_lock = lane_mask != packed; + if (holding_lock) + __scoped_atomic_thread_fence(__ATOMIC_ACQUIRE, __MEMORY_SCOPE_DEVICE); + return holding_lock; + } + + /// Unlock the lock at index. We need a lane sync to keep this function + /// convergent, otherwise the compiler will sink the store and deadlock. + RPC_ATTRS void unlock(uint64_t lane_mask, uint32_t index) { + // Do not move any writes past the unlock. + __scoped_atomic_thread_fence(__ATOMIC_RELEASE, __MEMORY_SCOPE_DEVICE); + + // Use exactly one thread to clear the nth bit in the lock array Must + // restrict to a single thread to avoid one thread dropping the lock, then + // an unrelated warp claiming the lock, then a second thread in this warp + // dropping the lock again. + clear_nth(lock, index, rpc::is_first_lane(lane_mask)); + rpc::sync_lane(lane_mask); + } + + /// Number of bytes to allocate for an inbox or outbox. + RPC_ATTRS static constexpr uint64_t mailbox_bytes(uint32_t port_count) { + return port_count * sizeof(uint32_t); + } + + /// Number of bytes to allocate for the buffer containing the packets. + RPC_ATTRS static constexpr uint64_t buffer_bytes(uint32_t port_count, + uint32_t lane_size) { + return port_count * lane_size * sizeof(Buffer); + } + + /// Offset of the inbox in memory. This is the same as the outbox if inverted. + RPC_ATTRS static constexpr uint64_t inbox_offset(uint32_t port_count) { + return Invert ? mailbox_bytes(port_count) : 0; + } + + /// Offset of the outbox in memory. This is the same as the inbox if inverted. + RPC_ATTRS static constexpr uint64_t outbox_offset(uint32_t port_count) { + return Invert ? 0 : mailbox_bytes(port_count); + } + + /// Offset of the buffer containing the packets after the inbox and outbox. + RPC_ATTRS static constexpr uint64_t header_offset(uint32_t port_count) { + return align_up(2 * mailbox_bytes(port_count), alignof(Header)); + } + + /// Offset of the buffer containing the packets after the inbox and outbox. + RPC_ATTRS static constexpr uint64_t buffer_offset(uint32_t port_count) { + return align_up(header_offset(port_count) + port_count * sizeof(Header), + alignof(Buffer)); + } + + /// Conditionally set the n-th bit in the atomic bitfield. + RPC_ATTRS static constexpr uint32_t set_nth(uint32_t *bits, uint32_t index, + bool cond) { + uint32_t slot = index / NUM_BITS_IN_WORD; + uint32_t bit = index % NUM_BITS_IN_WORD; + return __scoped_atomic_fetch_or(&bits[slot], + static_cast(cond) << bit, + __ATOMIC_RELAXED, __MEMORY_SCOPE_DEVICE) & + (1u << bit); + } + + /// Conditionally clear the n-th bit in the atomic bitfield. + RPC_ATTRS static constexpr uint32_t clear_nth(uint32_t *bits, uint32_t index, + bool cond) { + uint32_t slot = index / NUM_BITS_IN_WORD; + uint32_t bit = index % NUM_BITS_IN_WORD; + return __scoped_atomic_fetch_and(&bits[slot], + ~0u ^ (static_cast(cond) << bit), + __ATOMIC_RELAXED, __MEMORY_SCOPE_DEVICE) & + (1u << bit); + } +}; + +/// Invokes a function across every active buffer across the total lane size. +template +RPC_ATTRS static void invoke_rpc(F &&fn, uint32_t lane_size, uint64_t lane_mask, + Buffer *slot) { + if constexpr (is_process_gpu()) { + fn(&slot[rpc::get_lane_id()], rpc::get_lane_id()); + } else { + for (uint32_t i = 0; i < lane_size; i += rpc::get_num_lanes()) + if (lane_mask & (1ul << i)) + fn(&slot[i], i); + } +} + +/// The port provides the interface to communicate between the multiple +/// processes. A port is conceptually an index into the memory provided by the +/// underlying process that is guarded by a lock bit. +template struct Port { + RPC_ATTRS Port(Process &process, uint64_t lane_mask, uint32_t lane_size, + uint32_t index, uint32_t out) + : process(process), lane_mask(lane_mask), lane_size(lane_size), + index(index), out(out), receive(false), owns_buffer(true) {} + RPC_ATTRS ~Port() = default; + +private: + RPC_ATTRS Port(const Port &) = delete; + RPC_ATTRS Port &operator=(const Port &) = delete; + RPC_ATTRS Port(Port &&) = default; + RPC_ATTRS Port &operator=(Port &&) = default; + + friend struct Client; + friend struct Server; + friend class rpc::optional>; + +public: + template RPC_ATTRS void recv(U use); + template RPC_ATTRS void send(F fill); + template RPC_ATTRS void send_and_recv(F fill, U use); + template RPC_ATTRS void recv_and_send(W work); + RPC_ATTRS void send_n(const void *const *src, uint64_t *size); + RPC_ATTRS void send_n(const void *src, uint64_t size); + template + RPC_ATTRS void recv_n(void **dst, uint64_t *size, A &&alloc); + + RPC_ATTRS uint32_t get_opcode() const { return process.header[index].opcode; } + + RPC_ATTRS uint32_t get_index() const { return index; } + + RPC_ATTRS void close() { + // Wait for all lanes to finish using the port. + rpc::sync_lane(lane_mask); + + // The server is passive, if it own the buffer when it closes we need to + // give ownership back to the client. + if (owns_buffer && T) + out = process.invert_outbox(index, out); + process.unlock(lane_mask, index); + } + +private: + Process &process; + uint64_t lane_mask; + uint32_t lane_size; + uint32_t index; + uint32_t out; + bool receive; + bool owns_buffer; +}; + +/// The RPC client used to make requests to the server. +struct Client { + RPC_ATTRS Client() = default; + RPC_ATTRS Client(const Client &) = delete; + RPC_ATTRS Client &operator=(const Client &) = delete; + RPC_ATTRS ~Client() = default; + + RPC_ATTRS Client(uint32_t port_count, void *buffer) + : process(port_count, buffer) {} + + using Port = rpc::Port; + template RPC_ATTRS Port open(); + +private: + Process process; +}; + +/// The RPC server used to respond to the client. +struct Server { + RPC_ATTRS Server() = default; + RPC_ATTRS Server(const Server &) = delete; + RPC_ATTRS Server &operator=(const Server &) = delete; + RPC_ATTRS ~Server() = default; + + RPC_ATTRS Server(uint32_t port_count, void *buffer) + : process(port_count, buffer) {} + + using Port = rpc::Port; + RPC_ATTRS rpc::optional try_open(uint32_t lane_size, + uint32_t start = 0); + RPC_ATTRS Port open(uint32_t lane_size); + + RPC_ATTRS static constexpr uint64_t allocation_size(uint32_t lane_size, + uint32_t port_count) { + return Process::allocation_size(port_count, lane_size); + } + +private: + Process process; +}; + +/// Applies \p fill to the shared buffer and initiates a send operation. +template template RPC_ATTRS void Port::send(F fill) { + uint32_t in = owns_buffer ? out ^ T : process.load_inbox(lane_mask, index); + + // We need to wait until we own the buffer before sending. + process.wait_for_ownership(lane_mask, index, out, in); + + // Apply the \p fill function to initialize the buffer and release the memory. + invoke_rpc(fill, lane_size, process.header[index].mask, + process.get_packet(index, lane_size)); + out = process.invert_outbox(index, out); + owns_buffer = false; + receive = false; +} + +/// Applies \p use to the shared buffer and acknowledges the send. +template template RPC_ATTRS void Port::recv(U use) { + // We only exchange ownership of the buffer during a receive if we are waiting + // for a previous receive to finish. + if (receive) { + out = process.invert_outbox(index, out); + owns_buffer = false; + } + + uint32_t in = owns_buffer ? out ^ T : process.load_inbox(lane_mask, index); + + // We need to wait until we own the buffer before receiving. + process.wait_for_ownership(lane_mask, index, out, in); + + // Apply the \p use function to read the memory out of the buffer. + invoke_rpc(use, lane_size, process.header[index].mask, + process.get_packet(index, lane_size)); + receive = true; + owns_buffer = true; +} + +/// Combines a send and receive into a single function. +template +template +RPC_ATTRS void Port::send_and_recv(F fill, U use) { + send(fill); + recv(use); +} + +/// Combines a receive and send operation into a single function. The \p work +/// function modifies the buffer in-place and the send is only used to initiate +/// the copy back. +template +template +RPC_ATTRS void Port::recv_and_send(W work) { + recv(work); + send([](Buffer *, uint32_t) { /* no-op */ }); +} + +/// Helper routine to simplify the interface when sending from the GPU using +/// thread private pointers to the underlying value. +template +RPC_ATTRS void Port::send_n(const void *src, uint64_t size) { + const void **src_ptr = &src; + uint64_t *size_ptr = &size; + send_n(src_ptr, size_ptr); +} + +/// Sends an arbitrarily sized data buffer \p src across the shared channel in +/// multiples of the packet length. +template +RPC_ATTRS void Port::send_n(const void *const *src, uint64_t *size) { + uint64_t num_sends = 0; + send([&](Buffer *buffer, uint32_t id) { + reinterpret_cast(buffer->data)[0] = lane_value(size, id); + num_sends = is_process_gpu() ? lane_value(size, id) + : rpc::max(lane_value(size, id), num_sends); + uint64_t len = + lane_value(size, id) > sizeof(Buffer::data) - sizeof(uint64_t) + ? sizeof(Buffer::data) - sizeof(uint64_t) + : lane_value(size, id); + rpc_memcpy(&buffer->data[1], lane_value(src, id), len); + }); + uint64_t idx = sizeof(Buffer::data) - sizeof(uint64_t); + uint64_t mask = process.header[index].mask; + while (rpc::ballot(mask, idx < num_sends)) { + send([=](Buffer *buffer, uint32_t id) { + uint64_t len = lane_value(size, id) - idx > sizeof(Buffer::data) + ? sizeof(Buffer::data) + : lane_value(size, id) - idx; + if (idx < lane_value(size, id)) + rpc_memcpy(buffer->data, advance(lane_value(src, id), idx), len); + }); + idx += sizeof(Buffer::data); + } +} + +/// Receives an arbitrarily sized data buffer across the shared channel in +/// multiples of the packet length. The \p alloc function is called with the +/// size of the data so that we can initialize the size of the \p dst buffer. +template +template +RPC_ATTRS void Port::recv_n(void **dst, uint64_t *size, A &&alloc) { + uint64_t num_recvs = 0; + recv([&](Buffer *buffer, uint32_t id) { + lane_value(size, id) = reinterpret_cast(buffer->data)[0]; + lane_value(dst, id) = + reinterpret_cast(alloc(lane_value(size, id))); + num_recvs = is_process_gpu() ? lane_value(size, id) + : rpc::max(lane_value(size, id), num_recvs); + uint64_t len = + lane_value(size, id) > sizeof(Buffer::data) - sizeof(uint64_t) + ? sizeof(Buffer::data) - sizeof(uint64_t) + : lane_value(size, id); + rpc_memcpy(lane_value(dst, id), &buffer->data[1], len); + }); + uint64_t idx = sizeof(Buffer::data) - sizeof(uint64_t); + uint64_t mask = process.header[index].mask; + while (rpc::ballot(mask, idx < num_recvs)) { + recv([=](Buffer *buffer, uint32_t id) { + uint64_t len = lane_value(size, id) - idx > sizeof(Buffer::data) + ? sizeof(Buffer::data) + : lane_value(size, id) - idx; + if (idx < lane_value(size, id)) + rpc_memcpy(advance(lane_value(dst, id), idx), buffer->data, len); + }); + idx += sizeof(Buffer::data); + } +} + +/// Continually attempts to open a port to use as the client. The client can +/// only open a port if we find an index that is in a valid sending state. That +/// is, there are send operations pending that haven't been serviced on this +/// port. Each port instance uses an associated \p opcode to tell the server +/// what to do. The Client interface provides the appropriate lane size to the +/// port using the platform's returned value. +template RPC_ATTRS Client::Port Client::open() { + // Repeatedly perform a naive linear scan for a port that can be opened to + // send data. + for (uint32_t index = 0;; ++index) { + // Start from the beginning if we run out of ports to check. + if (index >= process.port_count) + index = 0; + + // Attempt to acquire the lock on this index. + uint64_t lane_mask = rpc::get_lane_mask(); + if (!process.try_lock(lane_mask, index)) + continue; + + uint32_t in = process.load_inbox(lane_mask, index); + uint32_t out = process.load_outbox(lane_mask, index); + + // Once we acquire the index we need to check if we are in a valid sending + // state. + if (process.buffer_unavailable(in, out)) { + process.unlock(lane_mask, index); + continue; + } + + if (rpc::is_first_lane(lane_mask)) { + process.header[index].opcode = opcode; + process.header[index].mask = lane_mask; + } + rpc::sync_lane(lane_mask); + return Port(process, lane_mask, rpc::get_num_lanes(), index, out); + } +} + +/// Attempts to open a port to use as the server. The server can only open a +/// port if it has a pending receive operation +RPC_ATTRS rpc::optional +Server::try_open(uint32_t lane_size, uint32_t start) { + // Perform a naive linear scan for a port that has a pending request. + for (uint32_t index = start; index < process.port_count; ++index) { + uint64_t lane_mask = rpc::get_lane_mask(); + uint32_t in = process.load_inbox(lane_mask, index); + uint32_t out = process.load_outbox(lane_mask, index); + + // The server is passive, if there is no work pending don't bother + // opening a port. + if (process.buffer_unavailable(in, out)) + continue; + + // Attempt to acquire the lock on this index. + if (!process.try_lock(lane_mask, index)) + continue; + + in = process.load_inbox(lane_mask, index); + out = process.load_outbox(lane_mask, index); + + if (process.buffer_unavailable(in, out)) { + process.unlock(lane_mask, index); + continue; + } + + return Port(process, lane_mask, lane_size, index, out); + } + return rpc::nullopt; +} + +RPC_ATTRS Server::Port Server::open(uint32_t lane_size) { + for (;;) { + if (rpc::optional p = try_open(lane_size)) + return rpc::move(p.value()); + sleep_briefly(); + } *** 451 LINES SKIPPED *** From nobody Fri May 29 23:01:40 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRzPh2yGGz6gF18 for ; Fri, 29 May 2026 23:01: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRzPg6Gt3z3Bvc for ; Fri, 29 May 2026 23:01:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095703; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tWWvBc4tVMkBYJGTvC9ucKb7eSaEgQ2BbctJ2RFEj9Y=; b=L/OUgmyIKipCJibDsJ9PbTWVTEjNVZw/fAaG2Ea5d64vhkNJ5PCyyOje+OBxsNxQYzGyAe vtyRMlhd8Nba6ORqLkV0KzpFZtdrXN47iqG+yEQsuzDXDOHviq95zw+4M2/BcQ+ak62Wjp xSmRvUNc46uylWvAhxeLKFkUC11IM5u0b+jtGG0pOvk0vpk/LoIL2lA02ggnRAQOk9wqlC 94b9PNRT2T5zt/KNJwtjpTG4eVG4Ar4IZ+bn+xGmSutskwaCA7ysvnveY+YpXNYzkeXGwU j4UEP96oI0dCVMB1sUYc+Mq6ntrALR5UmePUpWoJFeoPAvHB2jpCNMR3ctIkag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780095703; a=rsa-sha256; cv=none; b=IaK1EFh2Pqbsr1jrNwZdnpRddFGerJ0wZrwxPYHPQzX9NgF2Oxqc22+OM+UrwomnhS0Fzz Db7E9YUItY9JFcv3q2WZ8sucmKu8fpi2mV90RvreZNNhe/DnXJVKmI+xcVcDoz9ht1JYi/ MkvFe3WC3UTRNJVs/ca0tKHQ3lkD4UQkS7HAM3In3L3g2r4E69T9nXZXWwIAzOO3+V/JrY P26lQw5FIW4ay/ecgU42WU8SLtD1r3BR6PVOLdI10C9Ya/UvrIM0sk91RzqanxItnaxZfT Q3bqjJ9Ai6c1Ov7C1Mtf+n9NIid2zYIDM2mr84/NaTfV0+PkmoUkPBkyuh/YiQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095703; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tWWvBc4tVMkBYJGTvC9ucKb7eSaEgQ2BbctJ2RFEj9Y=; b=VTRiMj3oaI6dBGkyvLTulN8PD/ZPYgZiHwye2jeIYxL2dj7wkKvjlkuN48fZFJd3nx4P/n +XmPTmVIw3jHKUyNR8tiqL2aLUCVKGELC3F3yZS1B5eZqmo+OUXRRgVg+3F8FWwOcovalr 5eimrpwrwEqcdALU4xTFl8Jco4Ht689RdlIN9GW7N3vbMGiHgc1pdHRhyg6KxCas9P9YWI ji3Ai7O7kkbM2599AR9F4vxFmQ+tSkI0XNx/dDKm5SMR5NSCrwzXAVLnogPJADqffUf9aS qywva5bBRwAN9kuqSibCSEKecIeB07McliW5vd+4t2byuvgONdTpmYVJTHcrDQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRzPg5nnmztZr for ; Fri, 29 May 2026 23:01:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4132f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 23:01:40 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 4575fcccafed - stable/15 - Adjust llvm-project main llvmorg-21-init-19288-gface93e724f4, part 3 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 4575fcccafed03e93f306ddd287229c4568e7280 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 23:01:40 +0000 Message-Id: <6a1a1ad4.4132f.21f693d9@gitrepo.freebsd.org> The branch stable/15 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=4575fcccafed03e93f306ddd287229c4568e7280 commit 4575fcccafed03e93f306ddd287229c4568e7280 Author: Dimitry Andric AuthorDate: 2025-12-09 14:04:07 +0000 Commit: Dimitry Andric CommitDate: 2026-05-29 22:57:30 +0000 Adjust llvm-project main llvmorg-21-init-19288-gface93e724f4, part 3 This adjusts the llvmorg-21-init-19288-gface93e724f4 import: add more items to the libc/ top-level directory. PR: 292067 MFC after: 1 month (cherry picked from commit bb722a7d0f1642bff6487f943ad0427799a6e5bf) --- contrib/llvm-project/libc/hdr/errno_macros.h | 28 + contrib/llvm-project/libc/hdr/fcntl_macros.h | 22 + contrib/llvm-project/libc/hdr/fcntl_overlay.h | 47 + contrib/llvm-project/libc/hdr/fenv_macros.h | 61 + contrib/llvm-project/libc/hdr/float_macros.h | 22 + contrib/llvm-project/libc/hdr/func/aligned_alloc.h | 22 + contrib/llvm-project/libc/hdr/func/free.h | 22 + contrib/llvm-project/libc/hdr/func/malloc.h | 24 + contrib/llvm-project/libc/hdr/func/realloc.h | 24 + contrib/llvm-project/libc/hdr/limits_macros.h | 22 + contrib/llvm-project/libc/hdr/link_macros.h | 22 + contrib/llvm-project/libc/hdr/locale_macros.h | 22 + .../llvm-project/libc/hdr/math_function_macros.h | 27 + contrib/llvm-project/libc/hdr/math_macros.h | 48 + contrib/llvm-project/libc/hdr/offsetof_macros.h | 23 + contrib/llvm-project/libc/hdr/sched_macros.h | 22 + contrib/llvm-project/libc/hdr/signal_macros.h | 22 + contrib/llvm-project/libc/hdr/stdio_macros.h | 23 + contrib/llvm-project/libc/hdr/stdio_overlay.h | 69 + contrib/llvm-project/libc/hdr/stdlib_macros.h | 22 + contrib/llvm-project/libc/hdr/stdlib_overlay.h | 46 + contrib/llvm-project/libc/hdr/sys_auxv_macros.h | 22 + contrib/llvm-project/libc/hdr/sys_epoll_macros.h | 22 + contrib/llvm-project/libc/hdr/sys_ioctl_macros.h | 22 + contrib/llvm-project/libc/hdr/sys_stat_macros.h | 22 + contrib/llvm-project/libc/hdr/time_macros.h | 28 + contrib/llvm-project/libc/hdr/types/ACTION.h | 22 + contrib/llvm-project/libc/hdr/types/ENTRY.h | 22 + contrib/llvm-project/libc/hdr/types/FILE.h | 22 + .../llvm-project/libc/hdr/types/atexithandler_t.h | 22 + contrib/llvm-project/libc/hdr/types/char32_t.h | 22 + contrib/llvm-project/libc/hdr/types/char8_t.h | 14 + contrib/llvm-project/libc/hdr/types/clock_t.h | 22 + contrib/llvm-project/libc/hdr/types/clockid_t.h | 23 + .../libc/hdr/types/cookie_io_functions_t.h | 22 + contrib/llvm-project/libc/hdr/types/cpu_set_t.h | 22 + contrib/llvm-project/libc/hdr/types/div_t.h | 22 + contrib/llvm-project/libc/hdr/types/fenv_t.h | 22 + contrib/llvm-project/libc/hdr/types/fexcept_t.h | 22 + contrib/llvm-project/libc/hdr/types/jmp_buf.h | 22 + contrib/llvm-project/libc/hdr/types/ldiv_t.h | 22 + contrib/llvm-project/libc/hdr/types/lldiv_t.h | 22 + contrib/llvm-project/libc/hdr/types/locale_t.h | 22 + contrib/llvm-project/libc/hdr/types/mbstate_t.h | 22 + contrib/llvm-project/libc/hdr/types/mode_t.h | 22 + contrib/llvm-project/libc/hdr/types/nfds_t.h | 23 + contrib/llvm-project/libc/hdr/types/off_t.h | 22 + contrib/llvm-project/libc/hdr/types/pid_t.h | 22 + contrib/llvm-project/libc/hdr/types/sigset_t.h | 21 + contrib/llvm-project/libc/hdr/types/size_t.h | 23 + contrib/llvm-project/libc/hdr/types/socklen_t.h | 21 + contrib/llvm-project/libc/hdr/types/ssize_t.h | 21 + contrib/llvm-project/libc/hdr/types/stack_t.h | 23 + .../libc/hdr/types/struct_dl_phdr_info.h | 21 + .../libc/hdr/types/struct_epoll_event.h | 21 + .../libc/hdr/types/struct_f_owner_ex.h | 21 + contrib/llvm-project/libc/hdr/types/struct_flock.h | 21 + .../llvm-project/libc/hdr/types/struct_flock64.h | 21 + contrib/llvm-project/libc/hdr/types/struct_iovec.h | 21 + .../llvm-project/libc/hdr/types/struct_itimerval.h | 21 + .../llvm-project/libc/hdr/types/struct_msghdr.h | 21 + .../llvm-project/libc/hdr/types/struct_pollfd.h | 23 + .../llvm-project/libc/hdr/types/struct_sigaction.h | 21 + .../llvm-project/libc/hdr/types/struct_sockaddr.h | 21 + .../llvm-project/libc/hdr/types/struct_timespec.h | 21 + .../llvm-project/libc/hdr/types/struct_timeval.h | 21 + contrib/llvm-project/libc/hdr/types/struct_tm.h | 21 + contrib/llvm-project/libc/hdr/types/suseconds_t.h | 22 + contrib/llvm-project/libc/hdr/types/time_t.h | 22 + contrib/llvm-project/libc/hdr/types/uid_t.h | 22 + contrib/llvm-project/libc/hdr/types/wchar_t.h | 23 + contrib/llvm-project/libc/hdr/types/wint_t.h | 23 + contrib/llvm-project/libc/hdr/uchar_overlay.h | 69 + contrib/llvm-project/libc/hdr/unistd_macros.h | 22 + contrib/llvm-project/libc/hdr/unistd_overlay.h | 69 + contrib/llvm-project/libc/hdr/wchar_macros.h | 22 + contrib/llvm-project/libc/hdr/wchar_overlay.h | 69 + .../llvm-project/libc/include/__llvm-libc-common.h | 98 + .../libc/include/llvm-libc-macros/EFIAPI-macros.h | 18 + .../libc/include/llvm-libc-macros/assert-macros.h | 14 + .../llvm-libc-macros/baremetal/time-macros.h | 26 + .../libc/include/llvm-libc-macros/complex-macros.h | 24 + .../include/llvm-libc-macros/containerof-macro.h | 20 + .../libc/include/llvm-libc-macros/dlfcn-macros.h | 23 + .../libc/include/llvm-libc-macros/elf-macros.h | 18 + .../libc/include/llvm-libc-macros/endian-macros.h | 50 + .../include/llvm-libc-macros/error-number-macros.h | 8 + .../libc/include/llvm-libc-macros/fcntl-macros.h | 8 + .../include/llvm-libc-macros/features-macros.h | 12 + .../libc/include/llvm-libc-macros/fenv-macros.h | 28 + .../include/llvm-libc-macros/file-seek-macros.h | 16 + .../libc/include/llvm-libc-macros/float-macros.h | 178 + .../libc/include/llvm-libc-macros/float16-macros.h | 27 + .../llvm-libc-macros/generic-error-number-macros.h | 48 + .../include/llvm-libc-macros/gpu/signal-macros.h | 28 + .../include/llvm-libc-macros/gpu/time-macros.h | 17 + .../include/llvm-libc-macros/inttypes-macros.h | 420 + .../libc/include/llvm-libc-macros/limits-macros.h | 246 + .../libc/include/llvm-libc-macros/link-macros.h | 20 + .../llvm-libc-macros/linux/error-number-macros.h | 32 + .../include/llvm-libc-macros/linux/fcntl-macros.h | 105 + .../include/llvm-libc-macros/linux/poll-macros.h | 65 + .../include/llvm-libc-macros/linux/sched-macros.h | 37 + .../include/llvm-libc-macros/linux/signal-macros.h | 101 + .../llvm-libc-macros/linux/sys-epoll-macros.h | 40 + .../llvm-libc-macros/linux/sys-ioctl-macros.h | 20 + .../llvm-libc-macros/linux/sys-random-macros.h | 17 + .../llvm-libc-macros/linux/sys-resource-macros.h | 31 + .../llvm-libc-macros/linux/sys-socket-macros.h | 28 + .../llvm-libc-macros/linux/sys-stat-macros.h | 48 + .../llvm-libc-macros/linux/sys-time-macros.h | 53 + .../llvm-libc-macros/linux/sys-wait-macros.h | 27 + .../llvm-libc-macros/linux/termios-macros.h | 167 + .../include/llvm-libc-macros/linux/time-macros.h | 26 + .../include/llvm-libc-macros/linux/unistd-macros.h | 57 + .../libc/include/llvm-libc-macros/locale-macros.h | 32 + .../libc/include/llvm-libc-macros/malloc-macros.h | 17 + .../llvm-libc-macros/math-function-macros.h | 37 + .../libc/include/llvm-libc-macros/math-macros.h | 53 + .../libc/include/llvm-libc-macros/null-macro.h | 15 + .../libc/include/llvm-libc-macros/offsetof-macro.h | 15 + .../libc/include/llvm-libc-macros/poll-macros.h | 16 + .../libc/include/llvm-libc-macros/pthread-macros.h | 65 + .../libc/include/llvm-libc-macros/sched-macros.h | 16 + .../libc/include/llvm-libc-macros/signal-macros.h | 18 + .../libc/include/llvm-libc-macros/stdbit-macros.h | 316 + .../include/llvm-libc-macros/stdckdint-macros.h | 27 + .../libc/include/llvm-libc-macros/stdfix-macros.h | 367 + .../libc/include/llvm-libc-macros/stdint-macros.h | 878 + .../libc/include/llvm-libc-macros/stdio-macros.h | 58 + .../libc/include/llvm-libc-macros/stdlib-macros.h | 27 + .../include/llvm-libc-macros/sys-auxv-macros.h | 43 + .../include/llvm-libc-macros/sys-epoll-macros.h | 16 + .../include/llvm-libc-macros/sys-ioctl-macros.h | 16 + .../include/llvm-libc-macros/sys-mman-macros.h | 48 + .../include/llvm-libc-macros/sys-queue-macros.h | 262 + .../include/llvm-libc-macros/sys-random-macros.h | 16 + .../include/llvm-libc-macros/sys-resource-macros.h | 16 + .../include/llvm-libc-macros/sys-select-macros.h | 35 + .../include/llvm-libc-macros/sys-socket-macros.h | 16 + .../include/llvm-libc-macros/sys-stat-macros.h | 16 + .../include/llvm-libc-macros/sys-time-macros.h | 16 + .../include/llvm-libc-macros/sys-wait-macros.h | 16 + .../include/llvm-libc-macros/sysexits-macros.h | 29 + .../libc/include/llvm-libc-macros/termios-macros.h | 16 + .../libc/include/llvm-libc-macros/time-macros.h | 21 + .../libc/include/llvm-libc-macros/unistd-macros.h | 12 + .../libc/include/llvm-libc-macros/wchar-macros.h | 18 + .../llvm-libc-macros/windows/time-macros-ext.h | 17 + .../libc/include/llvm-libc-types/ACTION.h | 14 + .../libc/include/llvm-libc-types/DIR.h | 14 + .../include/llvm-libc-types/EFI_ALLOCATE_TYPE.h | 19 + .../include/llvm-libc-types/EFI_BOOT_SERVICES.h | 250 + .../libc/include/llvm-libc-types/EFI_CAPSULE.h | 26 + .../llvm-libc-types/EFI_CONFIGURATION_TABLE.h | 19 + .../llvm-libc-types/EFI_DEVICE_PATH_PROTOCOL.h | 23 + .../libc/include/llvm-libc-types/EFI_EVENT.h | 21 + .../libc/include/llvm-libc-types/EFI_GUID.h | 21 + .../libc/include/llvm-libc-types/EFI_HANDLE.h | 14 + .../include/llvm-libc-types/EFI_INTERFACE_TYPE.h | 16 + .../llvm-libc-types/EFI_LOCATE_SEARCH_TYPE.h | 18 + .../llvm-libc-types/EFI_MEMORY_DESCRIPTOR.h | 43 + .../libc/include/llvm-libc-types/EFI_MEMORY_TYPE.h | 32 + .../EFI_OPEN_PROTOCOL_INFORMATION_ENTRY.h | 22 + .../include/llvm-libc-types/EFI_PHYSICAL_ADDRESS.h | 16 + .../include/llvm-libc-types/EFI_RUNTIME_SERVICES.h | 137 + .../EFI_SIMPLE_TEXT_INPUT_PROTOCOL.h | 39 + .../EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.h | 64 + .../libc/include/llvm-libc-types/EFI_STATUS.h | 60 + .../include/llvm-libc-types/EFI_SYSTEM_TABLE.h | 65 + .../include/llvm-libc-types/EFI_TABLE_HEADER.h | 22 + .../libc/include/llvm-libc-types/EFI_TIME.h | 37 + .../libc/include/llvm-libc-types/EFI_TIMER_DELAY.h | 18 + .../libc/include/llvm-libc-types/EFI_TPL.h | 21 + .../include/llvm-libc-types/EFI_VIRTUAL_ADDRESS.h | 16 + .../libc/include/llvm-libc-types/ENTRY.h | 17 + .../libc/include/llvm-libc-types/FILE.h | 14 + .../libc/include/llvm-libc-types/VISIT.h | 14 + .../include/llvm-libc-types/__atexithandler_t.h | 14 + .../include/llvm-libc-types/__atfork_callback_t.h | 14 + .../include/llvm-libc-types/__call_once_func_t.h | 14 + .../llvm-libc-types/__dl_iterate_phdr_callback_t.h | 19 + .../libc/include/llvm-libc-types/__exec_argv_t.h | 14 + .../libc/include/llvm-libc-types/__exec_envp_t.h | 14 + .../libc/include/llvm-libc-types/__futex_word.h | 20 + .../libc/include/llvm-libc-types/__getoptargv_t.h | 14 + .../libc/include/llvm-libc-types/__mutex_type.h | 29 + .../llvm-libc-types/__pthread_once_func_t.h | 14 + .../include/llvm-libc-types/__pthread_start_t.h | 14 + .../include/llvm-libc-types/__pthread_tss_dtor_t.h | 14 + .../include/llvm-libc-types/__qsortcompare_t.h | 14 + .../include/llvm-libc-types/__qsortrcompare_t.h | 14 + .../include/llvm-libc-types/__search_compare_t.h | 14 + .../libc/include/llvm-libc-types/__thread_type.h | 16 + .../libc/include/llvm-libc-types/blkcnt_t.h | 14 + .../libc/include/llvm-libc-types/blksize_t.h | 14 + .../libc/include/llvm-libc-types/cc_t.h | 14 + .../libc/include/llvm-libc-types/cfloat128.h | 44 + .../libc/include/llvm-libc-types/cfloat16.h | 21 + .../libc/include/llvm-libc-types/char16_t.h | 17 + .../libc/include/llvm-libc-types/char32_t.h | 17 + .../libc/include/llvm-libc-types/char8_t.h | 16 + .../libc/include/llvm-libc-types/clock_t.h | 14 + .../libc/include/llvm-libc-types/clockid_t.h | 14 + .../libc/include/llvm-libc-types/cnd_t.h | 20 + .../llvm-libc-types/cookie_io_functions_t.h | 28 + .../libc/include/llvm-libc-types/cpu_set_t.h | 21 + .../libc/include/llvm-libc-types/dev_t.h | 14 + .../libc/include/llvm-libc-types/div_t.h | 17 + .../libc/include/llvm-libc-types/double_t.h | 24 + .../libc/include/llvm-libc-types/fd_set.h | 18 + .../libc/include/llvm-libc-types/fenv_t.h | 36 + .../libc/include/llvm-libc-types/fexcept_t.h | 18 + .../libc/include/llvm-libc-types/float128.h | 36 + .../libc/include/llvm-libc-types/float_t.h | 24 + .../libc/include/llvm-libc-types/fsblkcnt_t.h | 14 + .../libc/include/llvm-libc-types/fsfilcnt_t.h | 14 + .../libc/include/llvm-libc-types/gid_t.h | 14 + .../libc/include/llvm-libc-types/imaxdiv_t.h | 17 + .../libc/include/llvm-libc-types/ino_t.h | 14 + .../libc/include/llvm-libc-types/jmp_buf.h | 84 + .../libc/include/llvm-libc-types/ldiv_t.h | 17 + .../libc/include/llvm-libc-types/lldiv_t.h | 17 + .../libc/include/llvm-libc-types/locale_t.h | 22 + .../libc/include/llvm-libc-types/mbstate_t.h | 20 + .../libc/include/llvm-libc-types/mode_t.h | 14 + .../libc/include/llvm-libc-types/mtx_t.h | 16 + .../libc/include/llvm-libc-types/nfds_t.h | 14 + .../libc/include/llvm-libc-types/nlink_t.h | 14 + .../libc/include/llvm-libc-types/off64_t.h | 14 + .../libc/include/llvm-libc-types/off_t.h | 14 + .../libc/include/llvm-libc-types/once_flag.h | 20 + .../libc/include/llvm-libc-types/pid_t.h | 14 + .../llvm-libc-types/posix_spawn_file_actions_t.h | 17 + .../include/llvm-libc-types/posix_spawnattr_t.h | 16 + .../libc/include/llvm-libc-types/pthread_attr_t.h | 21 + .../include/llvm-libc-types/pthread_condattr_t.h | 18 + .../libc/include/llvm-libc-types/pthread_key_t.h | 14 + .../libc/include/llvm-libc-types/pthread_mutex_t.h | 16 + .../include/llvm-libc-types/pthread_mutexattr_t.h | 16 + .../libc/include/llvm-libc-types/pthread_once_t.h | 20 + .../include/llvm-libc-types/pthread_rwlock_t.h | 26 + .../include/llvm-libc-types/pthread_rwlockattr_t.h | 16 + .../include/llvm-libc-types/pthread_spinlock_t.h | 17 + .../libc/include/llvm-libc-types/pthread_t.h | 16 + .../libc/include/llvm-libc-types/rlim_t.h | 14 + .../libc/include/llvm-libc-types/sa_family_t.h | 19 + .../libc/include/llvm-libc-types/sig_atomic_t.h | 14 + .../libc/include/llvm-libc-types/sighandler_t.h | 17 + .../libc/include/llvm-libc-types/siginfo_t.h | 109 + .../libc/include/llvm-libc-types/sigset_t.h | 20 + .../libc/include/llvm-libc-types/size_t.h | 14 + .../libc/include/llvm-libc-types/socklen_t.h | 18 + .../libc/include/llvm-libc-types/speed_t.h | 14 + .../libc/include/llvm-libc-types/ssize_t.h | 14 + .../libc/include/llvm-libc-types/stack_t.h | 22 + .../libc/include/llvm-libc-types/stdfix-types.h | 25 + .../libc/include/llvm-libc-types/struct_dirent.h | 29 + .../include/llvm-libc-types/struct_dl_phdr_info.h | 30 + .../include/llvm-libc-types/struct_epoll_data.h | 21 + .../include/llvm-libc-types/struct_epoll_event.h | 23 + .../include/llvm-libc-types/struct_f_owner_ex.h | 25 + .../libc/include/llvm-libc-types/struct_flock.h | 25 + .../libc/include/llvm-libc-types/struct_flock64.h | 25 + .../include/llvm-libc-types/struct_hsearch_data.h | 17 + .../libc/include/llvm-libc-types/struct_iovec.h | 19 + .../include/llvm-libc-types/struct_itimerval.h | 19 + .../libc/include/llvm-libc-types/struct_lconv.h | 39 + .../libc/include/llvm-libc-types/struct_msghdr.h | 26 + .../libc/include/llvm-libc-types/struct_pollfd.h | 18 + .../libc/include/llvm-libc-types/struct_rlimit.h | 19 + .../libc/include/llvm-libc-types/struct_rusage.h | 37 + .../include/llvm-libc-types/struct_sched_param.h | 21 + .../include/llvm-libc-types/struct_sigaction.h | 28 + .../libc/include/llvm-libc-types/struct_sockaddr.h | 21 + .../include/llvm-libc-types/struct_sockaddr_un.h | 22 + .../libc/include/llvm-libc-types/struct_stat.h | 39 + .../libc/include/llvm-libc-types/struct_statvfs.h | 29 + .../libc/include/llvm-libc-types/struct_termios.h | 32 + .../libc/include/llvm-libc-types/struct_timespec.h | 20 + .../libc/include/llvm-libc-types/struct_timeval.h | 20 + .../libc/include/llvm-libc-types/struct_tm.h | 25 + .../libc/include/llvm-libc-types/struct_utsname.h | 34 + .../libc/include/llvm-libc-types/suseconds_t.h | 19 + .../libc/include/llvm-libc-types/tcflag_t.h | 14 + .../include/llvm-libc-types/test_rpc_opcodes_t.h | 21 + .../libc/include/llvm-libc-types/thrd_start_t.h | 14 + .../libc/include/llvm-libc-types/thrd_t.h | 16 + .../libc/include/llvm-libc-types/time_t.h | 18 + .../libc/include/llvm-libc-types/time_t_32.h | 14 + .../libc/include/llvm-libc-types/time_t_64.h | 14 + .../libc/include/llvm-libc-types/tss_dtor_t.h | 14 + .../libc/include/llvm-libc-types/tss_t.h | 14 + .../libc/include/llvm-libc-types/uid_t.h | 14 + .../libc/include/llvm-libc-types/union_sigval.h | 17 + .../libc/include/llvm-libc-types/wchar_t.h | 19 + .../libc/include/llvm-libc-types/wint_t.h | 14 + contrib/llvm-project/libc/include/sys/queue.h | 14 + .../llvm-project/libc/src/__support/CPP/README.md | 13 + .../libc/src/__support/CPP/algorithm.h | 49 + .../llvm-project/libc/src/__support/CPP/array.h | 80 + .../llvm-project/libc/src/__support/CPP/atomic.h | 430 + contrib/llvm-project/libc/src/__support/CPP/bit.h | 298 + .../llvm-project/libc/src/__support/CPP/bitset.h | 94 + .../llvm-project/libc/src/__support/CPP/cstddef.h | 74 + .../llvm-project/libc/src/__support/CPP/expected.h | 60 + .../libc/src/__support/CPP/functional.h | 71 + .../llvm-project/libc/src/__support/CPP/iterator.h | 99 + .../llvm-project/libc/src/__support/CPP/limits.h | 92 + .../llvm-project/libc/src/__support/CPP/mutex.h | 51 + .../llvm-project/libc/src/__support/CPP/new.cpp | 44 + contrib/llvm-project/libc/src/__support/CPP/new.h | 130 + .../llvm-project/libc/src/__support/CPP/optional.h | 139 + contrib/llvm-project/libc/src/__support/CPP/span.h | 131 + .../llvm-project/libc/src/__support/CPP/string.h | 234 + .../libc/src/__support/CPP/string_view.h | 222 + .../libc/src/__support/CPP/stringstream.h | 96 + .../libc/src/__support/CPP/type_traits.h | 70 + .../CPP/type_traits/add_lvalue_reference.h | 33 + .../src/__support/CPP/type_traits/add_pointer.h | 30 + .../CPP/type_traits/add_rvalue_reference.h | 32 + .../__support/CPP/type_traits/aligned_storage.h | 30 + .../src/__support/CPP/type_traits/always_false.h | 32 + .../src/__support/CPP/type_traits/bool_constant.h | 23 + .../src/__support/CPP/type_traits/conditional.h | 28 + .../libc/src/__support/CPP/type_traits/decay.h | 40 + .../libc/src/__support/CPP/type_traits/enable_if.h | 26 + .../src/__support/CPP/type_traits/false_type.h | 23 + .../has_unique_object_representations.h | 30 + .../__support/CPP/type_traits/integral_constant.h | 26 + .../libc/src/__support/CPP/type_traits/invoke.h | 67 + .../src/__support/CPP/type_traits/invoke_result.h | 29 + .../src/__support/CPP/type_traits/is_arithmetic.h | 30 + .../libc/src/__support/CPP/type_traits/is_array.h | 31 + .../src/__support/CPP/type_traits/is_base_of.h | 47 + .../libc/src/__support/CPP/type_traits/is_class.h | 32 + .../src/__support/CPP/type_traits/is_complex.h | 53 + .../libc/src/__support/CPP/type_traits/is_const.h | 28 + .../CPP/type_traits/is_constant_evaluated.h | 24 + .../src/__support/CPP/type_traits/is_convertible.h | 48 + .../__support/CPP/type_traits/is_copy_assignable.h | 32 + .../CPP/type_traits/is_copy_constructible.h | 31 + .../__support/CPP/type_traits/is_destructible.h | 68 + .../libc/src/__support/CPP/type_traits/is_enum.h | 26 + .../src/__support/CPP/type_traits/is_fixed_point.h | 49 + .../__support/CPP/type_traits/is_floating_point.h | 49 + .../src/__support/CPP/type_traits/is_function.h | 35 + .../src/__support/CPP/type_traits/is_integral.h | 43 + .../CPP/type_traits/is_lvalue_reference.h | 35 + .../__support/CPP/type_traits/is_member_pointer.h | 33 + .../__support/CPP/type_traits/is_move_assignable.h | 33 + .../CPP/type_traits/is_move_constructible.h | 31 + .../__support/CPP/type_traits/is_null_pointer.h | 29 + .../libc/src/__support/CPP/type_traits/is_object.h | 33 + .../src/__support/CPP/type_traits/is_pointer.h | 31 + .../src/__support/CPP/type_traits/is_reference.h | 34 + .../CPP/type_traits/is_rvalue_reference.h | 35 + .../libc/src/__support/CPP/type_traits/is_same.h | 28 + .../libc/src/__support/CPP/type_traits/is_scalar.h | 35 + .../libc/src/__support/CPP/type_traits/is_signed.h | 54 + .../CPP/type_traits/is_trivially_constructible.h | 25 + .../CPP/type_traits/is_trivially_copyable.h | 29 + .../CPP/type_traits/is_trivially_destructible.h | 37 + .../libc/src/__support/CPP/type_traits/is_union.h | 26 + .../src/__support/CPP/type_traits/is_unsigned.h | 56 + .../libc/src/__support/CPP/type_traits/is_void.h | 27 + .../src/__support/CPP/type_traits/make_signed.h | 41 + .../src/__support/CPP/type_traits/make_unsigned.h | 46 + .../__support/CPP/type_traits/remove_all_extents.h | 41 + .../libc/src/__support/CPP/type_traits/remove_cv.h | 28 + .../src/__support/CPP/type_traits/remove_cvref.h | 27 + .../src/__support/CPP/type_traits/remove_extent.h | 28 + .../__support/CPP/type_traits/remove_reference.h | 27 + .../libc/src/__support/CPP/type_traits/true_type.h | 23 + .../src/__support/CPP/type_traits/type_identity.h | 24 + .../libc/src/__support/CPP/type_traits/void_t.h | 29 + .../llvm-project/libc/src/__support/CPP/utility.h | 18 + .../libc/src/__support/CPP/utility/declval.h | 27 + .../libc/src/__support/CPP/utility/forward.h | 35 + .../libc/src/__support/CPP/utility/in_place.h | 39 + .../src/__support/CPP/utility/integer_sequence.h | 40 + .../libc/src/__support/CPP/utility/move.h | 27 + .../libc/src/__support/FPUtil/BasicOperations.h | 396 + .../FPUtil/DivisionAndRemainderOperations.h | 121 + .../libc/src/__support/FPUtil/FEnvImpl.h | 114 + .../llvm-project/libc/src/__support/FPUtil/FMA.h | 52 + .../libc/src/__support/FPUtil/FPBits.h | 857 + .../llvm-project/libc/src/__support/FPUtil/Hypot.h | 268 + .../src/__support/FPUtil/ManipulationFunctions.h | 279 + .../__support/FPUtil/NearestIntegerOperations.h | 411 + .../libc/src/__support/FPUtil/NormalFloat.h | 273 + .../libc/src/__support/FPUtil/PolyEval.h | 54 + .../libc/src/__support/FPUtil/aarch64/FEnvImpl.h | 285 + .../__support/FPUtil/aarch64/fenv_darwin_impl.h | 297 + .../src/__support/FPUtil/aarch64/nearest_integer.h | 38 + .../libc/src/__support/FPUtil/aarch64/sqrt.h | 45 + .../libc/src/__support/FPUtil/arm/FEnvImpl.h | 266 + .../libc/src/__support/FPUtil/arm/sqrt.h | 45 + .../libc/src/__support/FPUtil/bfloat16.h | 65 + .../llvm-project/libc/src/__support/FPUtil/cast.h | 76 + .../libc/src/__support/FPUtil/double_double.h | 211 + .../libc/src/__support/FPUtil/dyadic_float.h | 714 + .../libc/src/__support/FPUtil/except_value_utils.h | 145 + .../libc/src/__support/FPUtil/fpbits_str.h | 76 + .../libc/src/__support/FPUtil/generic/FMA.h | 288 + .../libc/src/__support/FPUtil/generic/FMod.h | 296 + .../libc/src/__support/FPUtil/generic/README.md | 28 + .../libc/src/__support/FPUtil/generic/add_sub.h | 209 + .../libc/src/__support/FPUtil/generic/div.h | 126 + .../libc/src/__support/FPUtil/generic/mul.h | 105 + .../libc/src/__support/FPUtil/generic/sqrt.h | 171 + .../FPUtil/generic/sqrt_80_bit_long_double.h | 141 + .../libc/src/__support/FPUtil/multiply_add.h | 74 + .../libc/src/__support/FPUtil/nearest_integer.h | 79 + .../libc/src/__support/FPUtil/riscv/FEnvImpl.h | 181 + .../libc/src/__support/FPUtil/riscv/sqrt.h | 45 + .../libc/src/__support/FPUtil/rounding_mode.h | 81 + .../llvm-project/libc/src/__support/FPUtil/sqrt.h | 65 + .../libc/src/__support/FPUtil/triple_double.h | 26 + .../libc/src/__support/FPUtil/x86_64/FEnvImpl.h | 651 + .../__support/FPUtil/x86_64/NextAfterLongDouble.h | 125 + .../__support/FPUtil/x86_64/NextUpDownLongDouble.h | 63 + .../src/__support/FPUtil/x86_64/nearest_integer.h | 46 + .../libc/src/__support/FPUtil/x86_64/sqrt.h | 54 + .../llvm-project/libc/src/__support/File/dir.cpp | 65 + contrib/llvm-project/libc/src/__support/File/dir.h | 79 + .../llvm-project/libc/src/__support/File/file.cpp | 477 + .../llvm-project/libc/src/__support/File/file.h | 324 + .../libc/src/__support/File/linux/dir.cpp | 60 + .../libc/src/__support/File/linux/file.cpp | 185 + .../libc/src/__support/File/linux/file.h | 37 + .../libc/src/__support/File/linux/lseekImpl.h | 51 + .../libc/src/__support/File/linux/stderr.cpp | 25 + .../libc/src/__support/File/linux/stdin.cpp | 26 + .../libc/src/__support/File/linux/stdout.cpp | 26 + .../libc/src/__support/GPU/allocator.cpp | 605 + .../libc/src/__support/GPU/allocator.h | 26 + .../llvm-project/libc/src/__support/GPU/utils.h | 138 + .../libc/src/__support/HashTable/bitmask.h | 93 + .../__support/HashTable/generic/bitmask_impl.inc | 124 + .../libc/src/__support/HashTable/randomness.h | 61 + .../src/__support/HashTable/sse2/bitmask_impl.inc | 52 + .../libc/src/__support/HashTable/table.h | 356 + .../libc/src/__support/OSUtil/baremetal/exit.cpp | 21 + .../libc/src/__support/OSUtil/baremetal/io.cpp | 70 + .../libc/src/__support/OSUtil/baremetal/io.h | 25 + .../src/__support/OSUtil/darwin/aarch64/syscall.h | 113 + .../libc/src/__support/OSUtil/darwin/io.h | 26 + .../libc/src/__support/OSUtil/darwin/syscall.h | 33 + .../llvm-project/libc/src/__support/OSUtil/exit.h | 22 + .../llvm-project/libc/src/__support/OSUtil/fcntl.h | 27 + .../libc/src/__support/OSUtil/fuchsia/io.h | 34 + .../libc/src/__support/OSUtil/gpu/exit.cpp | 33 + .../libc/src/__support/OSUtil/gpu/io.cpp | 24 + .../libc/src/__support/OSUtil/gpu/io.h | 22 + .../llvm-project/libc/src/__support/OSUtil/io.h | 31 + .../src/__support/OSUtil/linux/aarch64/syscall.h | 111 + .../libc/src/__support/OSUtil/linux/aarch64/vdso.h | 37 + .../libc/src/__support/OSUtil/linux/arm/syscall.h | 129 + .../libc/src/__support/OSUtil/linux/arm/vdso.h | 37 + .../libc/src/__support/OSUtil/linux/exit.cpp | 31 + .../libc/src/__support/OSUtil/linux/fcntl.cpp | 142 + .../libc/src/__support/OSUtil/linux/getrandom.h | 35 + .../libc/src/__support/OSUtil/linux/i386/syscall.h | 88 + .../libc/src/__support/OSUtil/linux/i386/vdso.h | 0 .../libc/src/__support/OSUtil/linux/io.h | 27 + .../src/__support/OSUtil/linux/riscv/syscall.h | 111 + .../libc/src/__support/OSUtil/linux/riscv/vdso.h | 43 + .../libc/src/__support/OSUtil/linux/syscall.h | 39 + .../libc/src/__support/OSUtil/linux/vdso.cpp | 239 + .../libc/src/__support/OSUtil/linux/vdso.h | 81 + .../libc/src/__support/OSUtil/linux/vdso_sym.h | 70 + .../src/__support/OSUtil/linux/x86_64/syscall.h | 99 + .../libc/src/__support/OSUtil/linux/x86_64/vdso.h | 43 + .../libc/src/__support/OSUtil/syscall.h | 18 + .../libc/src/__support/OSUtil/uefi/error.h | 104 + .../libc/src/__support/OSUtil/uefi/exit.cpp | 24 + .../libc/src/__support/OSUtil/uefi/io.cpp | 41 + .../libc/src/__support/OSUtil/uefi/io.h | 25 + .../libc/src/__support/OSUtil/windows/exit.cpp | 23 + .../libc/src/__support/OSUtil/windows/io.cpp | 25 + .../libc/src/__support/OSUtil/windows/io.h | 21 + .../libc/src/__support/RPC/rpc_client.cpp | 22 + .../libc/src/__support/RPC/rpc_client.h | 37 + .../libc/src/__support/RPC/rpc_server.h | 551 + .../src/__support/StringUtil/error_to_string.cpp | 85 + .../src/__support/StringUtil/error_to_string.h | 27 + .../libc/src/__support/StringUtil/message_mapper.h | 104 + .../src/__support/StringUtil/platform_errors.h | 18 + .../src/__support/StringUtil/platform_signals.h | 18 + .../src/__support/StringUtil/signal_to_string.cpp | 81 + .../src/__support/StringUtil/signal_to_string.h | 25 + .../StringUtil/tables/linux_extension_errors.h | 130 + .../StringUtil/tables/linux_extension_signals.h | 34 + .../StringUtil/tables/linux_platform_errors.h | 27 + .../StringUtil/tables/linux_platform_signals.h | 24 + .../StringUtil/tables/minimal_platform_errors.h | 23 + .../StringUtil/tables/minimal_platform_signals.h | 21 + .../src/__support/StringUtil/tables/posix_errors.h | 178 + .../__support/StringUtil/tables/posix_signals.h | 47 + .../src/__support/StringUtil/tables/signal_table.h | 42 + .../src/__support/StringUtil/tables/stdc_errors.h | 34 + .../src/__support/StringUtil/tables/stdc_signals.h | 30 + contrib/llvm-project/libc/src/__support/arg_list.h | 140 + contrib/llvm-project/libc/src/__support/big_int.h | 1391 + contrib/llvm-project/libc/src/__support/block.h | 482 + .../llvm-project/libc/src/__support/blockstore.h | 262 + contrib/llvm-project/libc/src/__support/c_string.h | 37 + .../llvm-project/libc/src/__support/char_vector.h | 81 + contrib/llvm-project/libc/src/__support/common.h | 92 + .../libc/src/__support/complex_basic_ops.h | 36 + .../llvm-project/libc/src/__support/complex_type.h | 73 + .../llvm-project/libc/src/__support/ctype_utils.h | 584 + .../libc/src/__support/detailed_powers_of_ten.h | 740 + .../libc/src/__support/endian_internal.h | 146 + contrib/llvm-project/libc/src/__support/error_or.h | 40 + .../libc/src/__support/fixed_point/fx_bits.h | 232 + .../libc/src/__support/fixed_point/fx_rep.h | 303 + .../libc/src/__support/fixed_point/sqrt.h | 269 + .../llvm-project/libc/src/__support/fixedvector.h | 127 + .../libc/src/__support/float_to_string.h | 837 + .../llvm-project/libc/src/__support/freelist.cpp | 42 + contrib/llvm-project/libc/src/__support/freelist.h | 89 + .../libc/src/__support/freelist_heap.cpp | 19 + .../libc/src/__support/freelist_heap.h | 209 + .../llvm-project/libc/src/__support/freestore.h | 114 + .../llvm-project/libc/src/__support/freetrie.cpp | 64 + contrib/llvm-project/libc/src/__support/freetrie.h | 237 + contrib/llvm-project/libc/src/__support/hash.h | 164 + .../libc/src/__support/high_precision_decimal.h | 442 + .../libc/src/__support/integer_literals.h | 180 + .../libc/src/__support/integer_operations.h | 33 + .../libc/src/__support/integer_to_string.h | 498 + .../libc/src/__support/intrusive_list.h | 66 + .../llvm-project/libc/src/__support/libc_assert.h | 88 + .../llvm-project/libc/src/__support/libc_errno.h | 108 + .../libc/src/__support/macros/README.md | 1 + .../libc/src/__support/macros/attributes.h | 51 + .../libc/src/__support/macros/config.h | 46 + .../libc/src/__support/macros/null_check.h | 37 + .../libc/src/__support/macros/optimization.h | 76 + .../libc/src/__support/macros/properties/README.md | 2 + .../__support/macros/properties/architectures.h | 64 + .../src/__support/macros/properties/compiler.h | 43 + .../__support/macros/properties/complex_types.h | 30 + .../src/__support/macros/properties/cpu_features.h | 108 + .../libc/src/__support/macros/properties/os.h | 32 + .../libc/src/__support/macros/properties/types.h | 72 + .../libc/src/__support/macros/sanitizer.h | 59 + .../libc/src/__support/math/exp_float_constants.h | 145 + .../llvm-project/libc/src/__support/math/expf.h | 116 + .../llvm-project/libc/src/__support/math/expf16.h | 141 + .../libc/src/__support/math/expf16_utils.h | 89 + .../llvm-project/libc/src/__support/math/frexpf.h | 28 + .../libc/src/__support/math/frexpf128.h | 34 + .../libc/src/__support/math/frexpf16.h | 34 + .../llvm-project/libc/src/__support/math/ldexpf.h | 28 + .../libc/src/__support/math/ldexpf128.h | 34 + .../libc/src/__support/math/ldexpf16.h | 34 + .../llvm-project/libc/src/__support/math_extras.h | 160 + .../llvm-project/libc/src/__support/memory_size.h | 92 + .../llvm-project/libc/src/__support/number_pair.h | 26 + .../libc/src/__support/ryu_constants.h | 4404 + .../libc/src/__support/ryu_long_double_constants.h | 120478 ++++++++++++++++++ contrib/llvm-project/libc/src/__support/sign.h | 45 + .../llvm-project/libc/src/__support/str_to_float.h | 1275 + .../libc/src/__support/str_to_integer.h | 168 + .../libc/src/__support/str_to_num_result.h | 48 + .../libc/src/__support/threads/CndVar.h | 55 + .../libc/src/__support/threads/callonce.h | 41 + .../libc/src/__support/threads/fork_callbacks.cpp | 95 + .../libc/src/__support/threads/fork_callbacks.h | 26 + .../libc/src/__support/threads/gpu/mutex.h | 32 + .../libc/src/__support/threads/identifier.h | 50 + .../libc/src/__support/threads/linux/CndVar.cpp | 106 + .../libc/src/__support/threads/linux/callonce.cpp | 40 + .../libc/src/__support/threads/linux/callonce.h | 32 + .../libc/src/__support/threads/linux/futex_utils.h | 88 + .../libc/src/__support/threads/linux/futex_word.h | 30 + .../libc/src/__support/threads/linux/mutex.h | 90 + .../libc/src/__support/threads/linux/raw_mutex.h | 129 + .../libc/src/__support/threads/linux/rwlock.h | 558 + .../libc/src/__support/threads/linux/thread.cpp | 521 + .../libc/src/__support/threads/mutex.h | 46 + .../libc/src/__support/threads/mutex_common.h | 26 + .../libc/src/__support/threads/sleep.h | 37 + .../libc/src/__support/threads/spin_lock.h | 65 + .../libc/src/__support/threads/thread.cpp | 191 + .../libc/src/__support/threads/thread.h | 257 + .../libc/src/__support/time/clock_gettime.h | 22 + .../libc/src/__support/time/gpu/clock_gettime.cpp | 33 + .../libc/src/__support/time/gpu/time_utils.cpp | 22 + .../libc/src/__support/time/gpu/time_utils.h | 45 + .../libc/src/__support/time/linux/abs_timeout.h | 50 + .../src/__support/time/linux/clock_conversion.h | 43 + .../src/__support/time/linux/clock_gettime.cpp | 62 + .../libc/src/__support/time/linux/monotonicity.h | 44 + .../llvm-project/libc/src/__support/time/units.h | 39 + .../src/__support/time/windows/clock_gettime.cpp | 134 + .../__support/time/windows/performance_counter.h | 35 + contrib/llvm-project/libc/src/__support/uint128.h | 23 + .../src/__support/wchar/character_converter.cpp | 174 + .../libc/src/__support/wchar/character_converter.h | 47 + .../libc/src/__support/wchar/mbrtowc.cpp | 52 + .../libc/src/__support/wchar/mbrtowc.h | 29 + .../libc/src/__support/wchar/mbstate.h | 37 + .../libc/src/__support/wchar/string_converter.h | 110 + .../libc/src/__support/wchar/wcrtomb.cpp | 50 + .../libc/src/__support/wchar/wcrtomb.h | 26 + .../libc/src/__support/wcs_to_integer.h | 155 + .../llvm-project/libc/src/__support/wctype_utils.h | 606 + 611 files changed, 170014 insertions(+) diff --git a/contrib/llvm-project/libc/hdr/errno_macros.h b/contrib/llvm-project/libc/hdr/errno_macros.h new file mode 100644 index 000000000000..27ea49977d8c --- /dev/null +++ b/contrib/llvm-project/libc/hdr/errno_macros.h @@ -0,0 +1,28 @@ +//===-- Definition of macros from errno.h ---------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_LIBC_HDR_ERRNO_MACROS_H +#define LLVM_LIBC_HDR_ERRNO_MACROS_H + +#ifdef LIBC_FULL_BUILD + +#ifdef __linux__ +#include + +#include "include/llvm-libc-macros/error-number-macros.h" +#else // __linux__ +#include "include/llvm-libc-macros/generic-error-number-macros.h" +#endif + +#else // Overlay mode + +#include + +#endif // LLVM_LIBC_FULL_BUILD + +#endif // LLVM_LIBC_HDR_ERRNO_MACROS_H diff --git a/contrib/llvm-project/libc/hdr/fcntl_macros.h b/contrib/llvm-project/libc/hdr/fcntl_macros.h new file mode 100644 index 000000000000..3a1ddeb0a2da --- /dev/null +++ b/contrib/llvm-project/libc/hdr/fcntl_macros.h @@ -0,0 +1,22 @@ +//===-- Definition of macros from fcntl/fcntl.h ---------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_LIBC_HDR_FCNTL_MACROS_H +#define LLVM_LIBC_HDR_FCNTL_MACROS_H + +#ifdef LIBC_FULL_BUILD + +#include "include/llvm-libc-macros/fcntl-macros.h" + +#else // Overlay mode + +#include "hdr/fcntl_overlay.h" + +#endif // LLVM_LIBC_FULL_BUILD + +#endif // LLVM_LIBC_HDR_FCNTL_MACROS_H diff --git a/contrib/llvm-project/libc/hdr/fcntl_overlay.h b/contrib/llvm-project/libc/hdr/fcntl_overlay.h new file mode 100644 index 000000000000..17ae78b3d0ec --- /dev/null +++ b/contrib/llvm-project/libc/hdr/fcntl_overlay.h @@ -0,0 +1,47 @@ +//===-- Including fcntl.h in overlay mode ---------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_LIBC_HDR_FCNTL_OVERLAY_H +#define LLVM_LIBC_HDR_FCNTL_OVERLAY_H + +#ifdef LIBC_FULL_BUILD +#error "This header should only be included in overlay mode" +#endif + +// Overlay mode + +// glibc header might provide extern inline definitions for few +// functions, causing external alias errors. They are guarded by +// `__USE_FORTIFY_LEVEL`, which will be temporarily disabled +// with `_FORTIFY_SOURCE`. + +#ifdef _FORTIFY_SOURCE +#define LIBC_OLD_FORTIFY_SOURCE _FORTIFY_SOURCE +#undef _FORTIFY_SOURCE +#endif + +#ifdef __USE_FORTIFY_LEVEL +#define LIBC_OLD_USE_FORTIFY_LEVEL __USE_FORTIFY_LEVEL +#undef __USE_FORTIFY_LEVEL +#define __USE_FORTIFY_LEVEL 0 +#endif + +#include + +#ifdef LIBC_OLD_FORTIFY_SOURCE +#define _FORTIFY_SOURCE LIBC_OLD_FORTIFY_SOURCE +#undef LIBC_OLD_FORTIFY_SOURCE +#endif + +#ifdef LIBC_OLD_USE_FORTIFY_LEVEL +#undef __USE_FORTIFY_LEVEL +#define __USE_FORTIFY_LEVEL LIBC_OLD_USE_FORTIFY_LEVEL +#undef LIBC_OLD_USE_FORTIFY_LEVEL +#endif + +#endif // LLVM_LIBC_HDR_FCNTL_OVERLAY_H diff --git a/contrib/llvm-project/libc/hdr/fenv_macros.h b/contrib/llvm-project/libc/hdr/fenv_macros.h new file mode 100644 index 000000000000..3f0bd89a6ea3 --- /dev/null +++ b/contrib/llvm-project/libc/hdr/fenv_macros.h @@ -0,0 +1,61 @@ +//===-- Definition of macros from fenv.h ----------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_LIBC_HDR_FENV_MACROS_H +#define LLVM_LIBC_HDR_FENV_MACROS_H + +#ifdef LIBC_FULL_BUILD + +#include "include/llvm-libc-macros/fenv-macros.h" + +#else // Overlay mode + +#include + +// In some environment, FE_ALL_EXCEPT is set to 0 and the remaining exceptions +// FE_* are missing. +#ifndef FE_DIVBYZERO +#define FE_DIVBYZERO 0 +#endif // FE_DIVBYZERO + +#ifndef FE_INEXACT +#define FE_INEXACT 0 +#endif // FE_INEXACT + +#ifndef FE_INVALID +#define FE_INVALID 0 +#endif // FE_INVALID + +#ifndef FE_OVERFLOW +#define FE_OVERFLOW 0 +#endif // FE_OVERFLOW + +#ifndef FE_UNDERFLOW +#define FE_UNDERFLOW 0 +#endif // FE_UNDERFLOW + +// Rounding mode macros might be missing. +#ifndef FE_DOWNWARD +#define FE_DOWNWARD 0x400 +#endif // FE_DOWNWARD + +#ifndef FE_TONEAREST +#define FE_TONEAREST 0 +#endif // FE_TONEAREST + +#ifndef FE_TOWARDZERO +#define FE_TOWARDZERO 0xC00 +#endif // FE_TOWARDZERO + +#ifndef FE_UPWARD +#define FE_UPWARD 0x800 +#endif // FE_UPWARD + +#endif // LLVM_LIBC_FULL_BUILD + +#endif // LLVM_LIBC_HDR_FENV_MACROS_H diff --git a/contrib/llvm-project/libc/hdr/float_macros.h b/contrib/llvm-project/libc/hdr/float_macros.h new file mode 100644 index 000000000000..a0ef5e29b986 --- /dev/null +++ b/contrib/llvm-project/libc/hdr/float_macros.h @@ -0,0 +1,22 @@ +//===-- Definition of macros from math.h ----------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_LIBC_HDR_FLOAT_MACROS_H +#define LLVM_LIBC_HDR_FLOAT_MACROS_H + +#ifdef LIBC_FULL_BUILD + +#include "include/llvm-libc-macros/float-macros.h" + +#else // Overlay mode + +#include + +#endif // LLVM_LIBC_FULL_BUILD + +#endif // LLVM_LIBC_HDR_FLOAT_MACROS_H diff --git a/contrib/llvm-project/libc/hdr/func/aligned_alloc.h b/contrib/llvm-project/libc/hdr/func/aligned_alloc.h new file mode 100644 index 000000000000..b3436dfee1f2 --- /dev/null +++ b/contrib/llvm-project/libc/hdr/func/aligned_alloc.h @@ -0,0 +1,22 @@ +//===-- Definition of the aligned_alloc.h proxy ---------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_LIBC_HDR_FUNC_ALIGNED_ALLOC_H +#define LLVM_LIBC_HDR_FUNC_ALIGNED_ALLOC_H + +#ifdef LIBC_FULL_BUILD +#include "hdr/types/size_t.h" +extern "C" void *aligned_alloc(size_t, size_t); + +#else // Overlay mode + +#include "hdr/stdlib_overlay.h" + +#endif + +#endif diff --git a/contrib/llvm-project/libc/hdr/func/free.h b/contrib/llvm-project/libc/hdr/func/free.h new file mode 100644 index 000000000000..316556b21e3b --- /dev/null +++ b/contrib/llvm-project/libc/hdr/func/free.h @@ -0,0 +1,22 @@ +//===-- Definition of the free.h proxy ------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_LIBC_HDR_FUNC_FREE_H +#define LLVM_LIBC_HDR_FUNC_FREE_H + +#ifdef LIBC_FULL_BUILD + +extern "C" void free(void *) noexcept; + +#else // Overlay mode + +#include "hdr/stdlib_overlay.h" + +#endif + +#endif diff --git a/contrib/llvm-project/libc/hdr/func/malloc.h b/contrib/llvm-project/libc/hdr/func/malloc.h new file mode 100644 index 000000000000..8281021f7996 --- /dev/null +++ b/contrib/llvm-project/libc/hdr/func/malloc.h @@ -0,0 +1,24 @@ +//===-- Definition of the malloc.h proxy ----------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_LIBC_HDR_FUNC_MALLOC_H +#define LLVM_LIBC_HDR_FUNC_MALLOC_H + +#ifdef LIBC_FULL_BUILD + +#include "hdr/types/size_t.h" + +extern "C" void *malloc(size_t) noexcept; + +#else // Overlay mode + +#include "hdr/stdlib_overlay.h" + +#endif + +#endif diff --git a/contrib/llvm-project/libc/hdr/func/realloc.h b/contrib/llvm-project/libc/hdr/func/realloc.h new file mode 100644 index 000000000000..ecb29541fe34 --- /dev/null +++ b/contrib/llvm-project/libc/hdr/func/realloc.h @@ -0,0 +1,24 @@ +//===-- Definition of the realloc.h proxy ---------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_LIBC_HDR_FUNC_REALLOC_H +#define LLVM_LIBC_HDR_FUNC_REALLOC_H + +#ifdef LIBC_FULL_BUILD + +#include "hdr/types/size_t.h" + +extern "C" void *realloc(void *ptr, size_t new_size) noexcept; + +#else // Overlay mode + +#include "hdr/stdlib_overlay.h" + +#endif + +#endif diff --git a/contrib/llvm-project/libc/hdr/limits_macros.h b/contrib/llvm-project/libc/hdr/limits_macros.h new file mode 100644 index 000000000000..2dc13b0cca60 --- /dev/null +++ b/contrib/llvm-project/libc/hdr/limits_macros.h @@ -0,0 +1,22 @@ +//===-- Definition of macros from limits.h --------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_LIBC_HDR_LIMITS_MACROS_H +#define LLVM_LIBC_HDR_LIMITS_MACROS_H + +#ifdef LIBC_FULL_BUILD + +#include "include/llvm-libc-macros/limits-macros.h" + +#else // Overlay mode + +#include + +#endif // LLVM_LIBC_FULL_BUILD + +#endif // LLVM_LIBC_HDR_LIMITS_MACROS_H *** 173323 LINES SKIPPED *** From nobody Fri May 29 23:01:44 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRzPj3XcKz6gDsB for ; Fri, 29 May 2026 23:01: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRzPj1SPpz3C3p for ; Fri, 29 May 2026 23:01:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095705; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=82ehtD3KQG5qTMnvJA8CnVqDNp+18ru5QbNvgC+Bp58=; b=sMmze+V3TEez0/6jhF9Y0sCdh+Dg1diMOPcExWf27e6wVwf4p3Qc3K3MQqEuH96gepJKGA B4aV5QpauPI2KGkXXNtJal9JrlJs/tFurGPY56PNtsS6xgYnOunJpGsEwHgCvRWejv/vlP gq28XkIFsNkpZ0epwT14gM+nrzfByvvX/3bhDiTieg6v9fmrdYi0KqIxU4ZQ0XtC6KRPIt 8pfi8K8bKw/wZVYlDCJeqJs4xG9CR55xC5ndieLO74Q/8zMoubV9YeJlhdcdAGQ8WBaiHr bHPZPjxjVbZsjpXnMtelwAV4jIH5m0Lbc5cMIKbAwAcbnaidsI1pVb4tOh0usQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780095705; a=rsa-sha256; cv=none; b=ZkfZR/Udhl2fEXTgzrS5T6kB6YokAurIeRomPiyfNaBGTwo+W58TRxT+oqHtYveLls6jpB PKdJph1p+w/bH2NQHGm8nSMUGaGQaRol7lnHoc6KWzjlzs4XTQ14r1prQn9q0me2JJeFlT Zdz4kygxPEhQFXhjVPv6yLczPku3DeGcLRPI8jWL9cIjJNSLW3ByY5sWdp5PQlrHQ+R+az 0iqFbFVAq7u8FIVGdhAB54OkDkpu9vk8Qu+J20xN0bJf9kjxXGlb871hcxApMXURCEL5OX AhRmLobDzJXq/YwxZpEVZ1wuTR8aIwJ2na2s0vbJxfYPS7XlrrDdNiklkjqJbQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095705; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=82ehtD3KQG5qTMnvJA8CnVqDNp+18ru5QbNvgC+Bp58=; b=wbe0Iyk3BqXeDLuGohlS9XAeBeQaLlv/FqMTpmSv/eeIM2GCVjxNbTHSnUDTkKeZP5shU/ KGEQHptK+Fby7eZSQfAGBCGKoKDj0EoJ0p2zsSxyIF0HwzvNn8PcXzCHrSE1Uj6ARBT9GI a7XP1ym36r2H/0JSn0VLwpqYIZq08FF1WpSwqtFEa7qGpAkEgKHreraXBvQe76ffPzoMJa 6rZIAAtSVeiAZiGmAMqLHW5XGnLnHbYBa90VjXxb1t3m2XvJm0sk291yPmEnlRORVos/xV WtolXdyNhd1d4r2qBZopizGWyGlSFvH/fiDT+0tHOAJRoeQrg31Ds3tmU4pKHA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRzPj0xJbztXZ for ; Fri, 29 May 2026 23:01:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4067e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 23:01:44 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: fe97aeb6c4fb - stable/15 - Fixups after llvm-project main llvmorg-21-init-19288-gface93e724f4 merge List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: fe97aeb6c4fb57f9cd3ae834e66d85bcb36b91ee Auto-Submitted: auto-generated Date: Fri, 29 May 2026 23:01:44 +0000 Message-Id: <6a1a1ad8.4067e.1a547b4@gitrepo.freebsd.org> The branch stable/15 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=fe97aeb6c4fb57f9cd3ae834e66d85bcb36b91ee commit fe97aeb6c4fb57f9cd3ae834e66d85bcb36b91ee Author: Dimitry Andric AuthorDate: 2025-12-09 09:38:16 +0000 Commit: Dimitry Andric CommitDate: 2026-05-29 22:57:30 +0000 Fixups after llvm-project main llvmorg-21-init-19288-gface93e724f4 merge Fix various configuration fails, update generated headers, Makefiles, etc. PR: 292067 MFC after: 1 month (cherry picked from commit 770cf0a5f02dc8983a89c6568d741fbc25baa999) --- ObsoleteFiles.inc | 418 ++++ .../llvm-project/libcxx/include/__cxx03/__config | 3 +- .../Clang/ClangExpressionParser.cpp | 2 + etc/mtree/BSD.debug.dist | 2 +- etc/mtree/BSD.include.dist | 78 + etc/mtree/BSD.usr.dist | 2 +- lib/clang/clang.build.mk | 1 - lib/clang/headers/Makefile | 44 +- lib/clang/include/Plugins/Plugins.def | 2 +- lib/clang/include/VCSVersion.inc | 6 +- lib/clang/include/clang/Basic/Version.inc | 13 +- lib/clang/include/clang/Config/config.h | 1 - lib/clang/include/lld/Common/Version.inc | 2 +- lib/clang/include/lldb/API/SBLanguages.h | 4 + lib/clang/include/lldb/Host/Config.h | 6 +- lib/clang/include/lldb/Version/Version.inc | 10 +- lib/clang/include/llvm/Config/Targets.h | 118 + lib/clang/include/llvm/Config/config.h | 69 +- lib/clang/include/llvm/Config/llvm-config.h | 128 +- lib/clang/include/llvm/Support/VCSRevision.h | 2 +- lib/clang/libclang/Makefile | 243 +- lib/clang/liblldb/LLDBWrapLua.cpp | 2388 +++++++++++++++---- lib/clang/liblldb/Makefile | 71 +- lib/clang/libllvm/Makefile | 251 +- lib/clang/libllvmminimal/Makefile | 12 +- lib/libc++/Makefile | 940 +++++++- lib/libc++/__assertion_handler | 24 +- lib/libc++/__config_site | 34 +- lib/libc++/libcxx.imp | 110 +- lib/libc++/module.modulemap | 2465 ++++++++++++++++++++ lib/libclang_rt/compiler-rt-vars.mk | 2 +- tools/build/mk/OptionalObsoleteFiles.inc | 874 +++---- usr.bin/clang/clang-tblgen/Makefile | 1 + usr.bin/clang/lld/Makefile | 2 + usr.bin/clang/lldb-server/Makefile | 1 - usr.bin/clang/llvm-min-tblgen/Makefile | 5 +- usr.bin/clang/llvm-tblgen/Makefile | 22 +- 37 files changed, 7067 insertions(+), 1289 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 8e4199465af7..5d505bf1bd52 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,424 @@ # xargs -n1 | sort | uniq -d; # done +# 20260425: new clang import which bumps version from 19 to 21 +OLD_FILES+=usr/lib/clang/19/include/__clang_cuda_builtin_vars.h +OLD_FILES+=usr/lib/clang/19/include/__clang_cuda_cmath.h +OLD_FILES+=usr/lib/clang/19/include/__clang_cuda_complex_builtins.h +OLD_FILES+=usr/lib/clang/19/include/__clang_cuda_device_functions.h +OLD_FILES+=usr/lib/clang/19/include/__clang_cuda_intrinsics.h +OLD_FILES+=usr/lib/clang/19/include/__clang_cuda_libdevice_declares.h +OLD_FILES+=usr/lib/clang/19/include/__clang_cuda_math.h +OLD_FILES+=usr/lib/clang/19/include/__clang_cuda_math_forward_declares.h +OLD_FILES+=usr/lib/clang/19/include/__clang_cuda_runtime_wrapper.h +OLD_FILES+=usr/lib/clang/19/include/__clang_cuda_texture_intrinsics.h +OLD_FILES+=usr/lib/clang/19/include/__clang_hip_cmath.h +OLD_FILES+=usr/lib/clang/19/include/__clang_hip_libdevice_declares.h +OLD_FILES+=usr/lib/clang/19/include/__clang_hip_math.h +OLD_FILES+=usr/lib/clang/19/include/__clang_hip_runtime_wrapper.h +OLD_FILES+=usr/lib/clang/19/include/__clang_hip_stdlib.h +OLD_FILES+=usr/lib/clang/19/include/__stdarg___gnuc_va_list.h +OLD_FILES+=usr/lib/clang/19/include/__stdarg___va_copy.h +OLD_FILES+=usr/lib/clang/19/include/__stdarg_header_macro.h +OLD_FILES+=usr/lib/clang/19/include/__stdarg_va_arg.h +OLD_FILES+=usr/lib/clang/19/include/__stdarg_va_copy.h +OLD_FILES+=usr/lib/clang/19/include/__stdarg_va_list.h +OLD_FILES+=usr/lib/clang/19/include/__stddef_header_macro.h +OLD_FILES+=usr/lib/clang/19/include/__stddef_max_align_t.h +OLD_FILES+=usr/lib/clang/19/include/__stddef_null.h +OLD_FILES+=usr/lib/clang/19/include/__stddef_nullptr_t.h +OLD_FILES+=usr/lib/clang/19/include/__stddef_offsetof.h +OLD_FILES+=usr/lib/clang/19/include/__stddef_ptrdiff_t.h +OLD_FILES+=usr/lib/clang/19/include/__stddef_rsize_t.h +OLD_FILES+=usr/lib/clang/19/include/__stddef_size_t.h +OLD_FILES+=usr/lib/clang/19/include/__stddef_unreachable.h +OLD_FILES+=usr/lib/clang/19/include/__stddef_wchar_t.h +OLD_FILES+=usr/lib/clang/19/include/__stddef_wint_t.h +OLD_FILES+=usr/lib/clang/19/include/__wmmintrin_aes.h +OLD_FILES+=usr/lib/clang/19/include/__wmmintrin_pclmul.h +OLD_FILES+=usr/lib/clang/19/include/adcintrin.h +OLD_FILES+=usr/lib/clang/19/include/adxintrin.h +OLD_FILES+=usr/lib/clang/19/include/altivec.h +OLD_FILES+=usr/lib/clang/19/include/ammintrin.h +OLD_FILES+=usr/lib/clang/19/include/amxcomplexintrin.h +OLD_FILES+=usr/lib/clang/19/include/amxfp16intrin.h +OLD_FILES+=usr/lib/clang/19/include/amxintrin.h +OLD_FILES+=usr/lib/clang/19/include/arm64intr.h +OLD_FILES+=usr/lib/clang/19/include/arm_acle.h +OLD_FILES+=usr/lib/clang/19/include/arm_bf16.h +OLD_FILES+=usr/lib/clang/19/include/arm_cde.h +OLD_FILES+=usr/lib/clang/19/include/arm_cmse.h +OLD_FILES+=usr/lib/clang/19/include/arm_fp16.h +OLD_FILES+=usr/lib/clang/19/include/arm_mve.h +OLD_FILES+=usr/lib/clang/19/include/arm_neon.h +OLD_FILES+=usr/lib/clang/19/include/arm_neon_sve_bridge.h +OLD_FILES+=usr/lib/clang/19/include/arm_sme.h +OLD_FILES+=usr/lib/clang/19/include/arm_sve.h +OLD_FILES+=usr/lib/clang/19/include/arm_vector_types.h +OLD_FILES+=usr/lib/clang/19/include/armintr.h +OLD_FILES+=usr/lib/clang/19/include/avx2intrin.h +OLD_FILES+=usr/lib/clang/19/include/avx512bf16intrin.h +OLD_FILES+=usr/lib/clang/19/include/avx512bitalgintrin.h +OLD_FILES+=usr/lib/clang/19/include/avx512bwintrin.h +OLD_FILES+=usr/lib/clang/19/include/avx512cdintrin.h +OLD_FILES+=usr/lib/clang/19/include/avx512dqintrin.h +OLD_FILES+=usr/lib/clang/19/include/avx512fintrin.h +OLD_FILES+=usr/lib/clang/19/include/avx512fp16intrin.h +OLD_FILES+=usr/lib/clang/19/include/avx512ifmaintrin.h +OLD_FILES+=usr/lib/clang/19/include/avx512ifmavlintrin.h +OLD_FILES+=usr/lib/clang/19/include/avx512vbmi2intrin.h +OLD_FILES+=usr/lib/clang/19/include/avx512vbmiintrin.h +OLD_FILES+=usr/lib/clang/19/include/avx512vbmivlintrin.h +OLD_FILES+=usr/lib/clang/19/include/avx512vlbf16intrin.h +OLD_FILES+=usr/lib/clang/19/include/avx512vlbitalgintrin.h +OLD_FILES+=usr/lib/clang/19/include/avx512vlbwintrin.h +OLD_FILES+=usr/lib/clang/19/include/avx512vlcdintrin.h +OLD_FILES+=usr/lib/clang/19/include/avx512vldqintrin.h +OLD_FILES+=usr/lib/clang/19/include/avx512vlfp16intrin.h +OLD_FILES+=usr/lib/clang/19/include/avx512vlintrin.h +OLD_FILES+=usr/lib/clang/19/include/avx512vlvbmi2intrin.h +OLD_FILES+=usr/lib/clang/19/include/avx512vlvnniintrin.h +OLD_FILES+=usr/lib/clang/19/include/avx512vlvp2intersectintrin.h +OLD_FILES+=usr/lib/clang/19/include/avx512vnniintrin.h +OLD_FILES+=usr/lib/clang/19/include/avx512vp2intersectintrin.h +OLD_FILES+=usr/lib/clang/19/include/avx512vpopcntdqintrin.h +OLD_FILES+=usr/lib/clang/19/include/avx512vpopcntdqvlintrin.h +OLD_FILES+=usr/lib/clang/19/include/avxifmaintrin.h +OLD_FILES+=usr/lib/clang/19/include/avxintrin.h +OLD_FILES+=usr/lib/clang/19/include/avxneconvertintrin.h +OLD_FILES+=usr/lib/clang/19/include/avxvnniint16intrin.h +OLD_FILES+=usr/lib/clang/19/include/avxvnniint8intrin.h +OLD_FILES+=usr/lib/clang/19/include/avxvnniintrin.h +OLD_FILES+=usr/lib/clang/19/include/bmi2intrin.h +OLD_FILES+=usr/lib/clang/19/include/bmiintrin.h +OLD_FILES+=usr/lib/clang/19/include/builtins.h +OLD_FILES+=usr/lib/clang/19/include/cet.h +OLD_FILES+=usr/lib/clang/19/include/cetintrin.h +OLD_FILES+=usr/lib/clang/19/include/cldemoteintrin.h +OLD_FILES+=usr/lib/clang/19/include/clflushoptintrin.h +OLD_FILES+=usr/lib/clang/19/include/clwbintrin.h +OLD_FILES+=usr/lib/clang/19/include/clzerointrin.h +OLD_FILES+=usr/lib/clang/19/include/cmpccxaddintrin.h +OLD_FILES+=usr/lib/clang/19/include/cpuid.h +OLD_FILES+=usr/lib/clang/19/include/crc32intrin.h +OLD_FILES+=usr/lib/clang/19/include/cuda_wrappers/algorithm +OLD_FILES+=usr/lib/clang/19/include/cuda_wrappers/bits/basic_string.h +OLD_FILES+=usr/lib/clang/19/include/cuda_wrappers/bits/basic_string.tcc +OLD_FILES+=usr/lib/clang/19/include/cuda_wrappers/bits/shared_ptr_base.h +OLD_DIRS+=usr/lib/clang/19/include/cuda_wrappers/bits +OLD_FILES+=usr/lib/clang/19/include/cuda_wrappers/cmath +OLD_FILES+=usr/lib/clang/19/include/cuda_wrappers/complex +OLD_FILES+=usr/lib/clang/19/include/cuda_wrappers/new +OLD_DIRS+=usr/lib/clang/19/include/cuda_wrappers +OLD_FILES+=usr/lib/clang/19/include/emmintrin.h +OLD_FILES+=usr/lib/clang/19/include/enqcmdintrin.h +OLD_FILES+=usr/lib/clang/19/include/f16cintrin.h +OLD_FILES+=usr/lib/clang/19/include/float.h +OLD_FILES+=usr/lib/clang/19/include/fma4intrin.h +OLD_FILES+=usr/lib/clang/19/include/fmaintrin.h +OLD_FILES+=usr/lib/clang/19/include/fuzzer/FuzzedDataProvider.h +OLD_DIRS+=usr/lib/clang/19/include/fuzzer +OLD_FILES+=usr/lib/clang/19/include/fxsrintrin.h +OLD_FILES+=usr/lib/clang/19/include/gfniintrin.h +OLD_FILES+=usr/lib/clang/19/include/hexagon_circ_brev_intrinsics.h +OLD_FILES+=usr/lib/clang/19/include/hexagon_protos.h +OLD_FILES+=usr/lib/clang/19/include/hexagon_types.h +OLD_FILES+=usr/lib/clang/19/include/hlsl/hlsl_basic_types.h +OLD_FILES+=usr/lib/clang/19/include/hlsl/hlsl_intrinsics.h +OLD_DIRS+=usr/lib/clang/19/include/hlsl +OLD_FILES+=usr/lib/clang/19/include/hlsl.h +OLD_FILES+=usr/lib/clang/19/include/hresetintrin.h +OLD_FILES+=usr/lib/clang/19/include/htmintrin.h +OLD_FILES+=usr/lib/clang/19/include/htmxlintrin.h +OLD_FILES+=usr/lib/clang/19/include/hvx_hexagon_protos.h +OLD_FILES+=usr/lib/clang/19/include/ia32intrin.h +OLD_FILES+=usr/lib/clang/19/include/immintrin.h +OLD_FILES+=usr/lib/clang/19/include/intrin.h +OLD_FILES+=usr/lib/clang/19/include/intrin0.h +OLD_FILES+=usr/lib/clang/19/include/inttypes.h +OLD_FILES+=usr/lib/clang/19/include/invpcidintrin.h +OLD_FILES+=usr/lib/clang/19/include/iso646.h +OLD_FILES+=usr/lib/clang/19/include/keylockerintrin.h +OLD_FILES+=usr/lib/clang/19/include/larchintrin.h +OLD_FILES+=usr/lib/clang/19/include/lasxintrin.h +OLD_FILES+=usr/lib/clang/19/include/limits.h +OLD_FILES+=usr/lib/clang/19/include/lsxintrin.h +OLD_FILES+=usr/lib/clang/19/include/lwpintrin.h +OLD_FILES+=usr/lib/clang/19/include/lzcntintrin.h +OLD_FILES+=usr/lib/clang/19/include/mm3dnow.h +OLD_FILES+=usr/lib/clang/19/include/mm_malloc.h +OLD_FILES+=usr/lib/clang/19/include/mmintrin.h +OLD_FILES+=usr/lib/clang/19/include/module.modulemap +OLD_FILES+=usr/lib/clang/19/include/movdirintrin.h +OLD_FILES+=usr/lib/clang/19/include/msa.h +OLD_FILES+=usr/lib/clang/19/include/mwaitxintrin.h +OLD_FILES+=usr/lib/clang/19/include/nmmintrin.h +OLD_FILES+=usr/lib/clang/19/include/omp-tools.h +OLD_FILES+=usr/lib/clang/19/include/omp.h +OLD_FILES+=usr/lib/clang/19/include/ompt.h +OLD_FILES+=usr/lib/clang/19/include/opencl-c-base.h +OLD_FILES+=usr/lib/clang/19/include/opencl-c.h +OLD_FILES+=usr/lib/clang/19/include/openmp_wrappers/__clang_openmp_device_functions.h +OLD_FILES+=usr/lib/clang/19/include/openmp_wrappers/cmath +OLD_FILES+=usr/lib/clang/19/include/openmp_wrappers/complex +OLD_FILES+=usr/lib/clang/19/include/openmp_wrappers/complex.h +OLD_FILES+=usr/lib/clang/19/include/openmp_wrappers/complex_cmath.h +OLD_FILES+=usr/lib/clang/19/include/openmp_wrappers/math.h +OLD_FILES+=usr/lib/clang/19/include/openmp_wrappers/new +OLD_DIRS+=usr/lib/clang/19/include/openmp_wrappers +OLD_FILES+=usr/lib/clang/19/include/orc_rt/c_api.h +OLD_DIRS+=usr/lib/clang/19/include/orc_rt +OLD_FILES+=usr/lib/clang/19/include/pconfigintrin.h +OLD_FILES+=usr/lib/clang/19/include/pkuintrin.h +OLD_FILES+=usr/lib/clang/19/include/pmmintrin.h +OLD_FILES+=usr/lib/clang/19/include/popcntintrin.h +OLD_FILES+=usr/lib/clang/19/include/ppc_wrappers/bmi2intrin.h +OLD_FILES+=usr/lib/clang/19/include/ppc_wrappers/bmiintrin.h +OLD_FILES+=usr/lib/clang/19/include/ppc_wrappers/emmintrin.h +OLD_FILES+=usr/lib/clang/19/include/ppc_wrappers/immintrin.h +OLD_FILES+=usr/lib/clang/19/include/ppc_wrappers/mm_malloc.h +OLD_FILES+=usr/lib/clang/19/include/ppc_wrappers/mmintrin.h +OLD_FILES+=usr/lib/clang/19/include/ppc_wrappers/nmmintrin.h +OLD_FILES+=usr/lib/clang/19/include/ppc_wrappers/pmmintrin.h +OLD_FILES+=usr/lib/clang/19/include/ppc_wrappers/smmintrin.h +OLD_FILES+=usr/lib/clang/19/include/ppc_wrappers/tmmintrin.h +OLD_FILES+=usr/lib/clang/19/include/ppc_wrappers/x86gprintrin.h +OLD_FILES+=usr/lib/clang/19/include/ppc_wrappers/x86intrin.h +OLD_FILES+=usr/lib/clang/19/include/ppc_wrappers/xmmintrin.h +OLD_DIRS+=usr/lib/clang/19/include/ppc_wrappers +OLD_FILES+=usr/lib/clang/19/include/prfchiintrin.h +OLD_FILES+=usr/lib/clang/19/include/prfchwintrin.h +OLD_FILES+=usr/lib/clang/19/include/profile/InstrProfData.inc +OLD_FILES+=usr/lib/clang/19/include/profile/MemProfData.inc +OLD_DIRS+=usr/lib/clang/19/include/profile +OLD_FILES+=usr/lib/clang/19/include/ptrauth.h +OLD_FILES+=usr/lib/clang/19/include/ptwriteintrin.h +OLD_FILES+=usr/lib/clang/19/include/raointintrin.h +OLD_FILES+=usr/lib/clang/19/include/rdpruintrin.h +OLD_FILES+=usr/lib/clang/19/include/rdseedintrin.h +OLD_FILES+=usr/lib/clang/19/include/riscv_bitmanip.h +OLD_FILES+=usr/lib/clang/19/include/riscv_crypto.h +OLD_FILES+=usr/lib/clang/19/include/riscv_ntlh.h +OLD_FILES+=usr/lib/clang/19/include/riscv_vector.h +OLD_FILES+=usr/lib/clang/19/include/rtmintrin.h +OLD_FILES+=usr/lib/clang/19/include/s390intrin.h +OLD_FILES+=usr/lib/clang/19/include/sanitizer/allocator_interface.h +OLD_FILES+=usr/lib/clang/19/include/sanitizer/asan_interface.h +OLD_FILES+=usr/lib/clang/19/include/sanitizer/common_interface_defs.h +OLD_FILES+=usr/lib/clang/19/include/sanitizer/coverage_interface.h +OLD_FILES+=usr/lib/clang/19/include/sanitizer/dfsan_interface.h +OLD_FILES+=usr/lib/clang/19/include/sanitizer/hwasan_interface.h +OLD_FILES+=usr/lib/clang/19/include/sanitizer/linux_syscall_hooks.h +OLD_FILES+=usr/lib/clang/19/include/sanitizer/lsan_interface.h +OLD_FILES+=usr/lib/clang/19/include/sanitizer/memprof_interface.h +OLD_FILES+=usr/lib/clang/19/include/sanitizer/msan_interface.h +OLD_FILES+=usr/lib/clang/19/include/sanitizer/netbsd_syscall_hooks.h +OLD_FILES+=usr/lib/clang/19/include/sanitizer/scudo_interface.h +OLD_FILES+=usr/lib/clang/19/include/sanitizer/tsan_interface.h +OLD_FILES+=usr/lib/clang/19/include/sanitizer/tsan_interface_atomic.h +OLD_FILES+=usr/lib/clang/19/include/sanitizer/ubsan_interface.h +OLD_DIRS+=usr/lib/clang/19/include/sanitizer +OLD_FILES+=usr/lib/clang/19/include/serializeintrin.h +OLD_FILES+=usr/lib/clang/19/include/sgxintrin.h +OLD_FILES+=usr/lib/clang/19/include/sha512intrin.h +OLD_FILES+=usr/lib/clang/19/include/shaintrin.h +OLD_FILES+=usr/lib/clang/19/include/sifive_vector.h +OLD_FILES+=usr/lib/clang/19/include/sm3intrin.h +OLD_FILES+=usr/lib/clang/19/include/sm4intrin.h +OLD_FILES+=usr/lib/clang/19/include/smmintrin.h +OLD_FILES+=usr/lib/clang/19/include/stdalign.h +OLD_FILES+=usr/lib/clang/19/include/stdarg.h +OLD_FILES+=usr/lib/clang/19/include/stdatomic.h +OLD_FILES+=usr/lib/clang/19/include/stdbool.h +OLD_FILES+=usr/lib/clang/19/include/stdckdint.h +OLD_FILES+=usr/lib/clang/19/include/stddef.h +OLD_FILES+=usr/lib/clang/19/include/stdint.h +OLD_FILES+=usr/lib/clang/19/include/stdnoreturn.h +OLD_FILES+=usr/lib/clang/19/include/tbmintrin.h +OLD_FILES+=usr/lib/clang/19/include/tgmath.h +OLD_FILES+=usr/lib/clang/19/include/tmmintrin.h +OLD_FILES+=usr/lib/clang/19/include/tsxldtrkintrin.h +OLD_FILES+=usr/lib/clang/19/include/uintrintrin.h +OLD_FILES+=usr/lib/clang/19/include/unwind.h +OLD_FILES+=usr/lib/clang/19/include/usermsrintrin.h +OLD_FILES+=usr/lib/clang/19/include/vadefs.h +OLD_FILES+=usr/lib/clang/19/include/vaesintrin.h +OLD_FILES+=usr/lib/clang/19/include/varargs.h +OLD_FILES+=usr/lib/clang/19/include/vecintrin.h +OLD_FILES+=usr/lib/clang/19/include/velintrin.h +OLD_FILES+=usr/lib/clang/19/include/velintrin_approx.h +OLD_FILES+=usr/lib/clang/19/include/velintrin_gen.h +OLD_FILES+=usr/lib/clang/19/include/vpclmulqdqintrin.h +OLD_FILES+=usr/lib/clang/19/include/waitpkgintrin.h +OLD_FILES+=usr/lib/clang/19/include/wasm_simd128.h +OLD_FILES+=usr/lib/clang/19/include/wbnoinvdintrin.h +OLD_FILES+=usr/lib/clang/19/include/wmmintrin.h +OLD_FILES+=usr/lib/clang/19/include/x86gprintrin.h +OLD_FILES+=usr/lib/clang/19/include/x86intrin.h +OLD_FILES+=usr/lib/clang/19/include/xmmintrin.h +OLD_FILES+=usr/lib/clang/19/include/xopintrin.h +OLD_FILES+=usr/lib/clang/19/include/xray/xray_interface.h +OLD_FILES+=usr/lib/clang/19/include/xray/xray_log_interface.h +OLD_FILES+=usr/lib/clang/19/include/xray/xray_records.h +OLD_DIRS+=usr/lib/clang/19/include/xray +OLD_FILES+=usr/lib/clang/19/include/xsavecintrin.h +OLD_FILES+=usr/lib/clang/19/include/xsaveintrin.h +OLD_FILES+=usr/lib/clang/19/include/xsaveoptintrin.h +OLD_FILES+=usr/lib/clang/19/include/xsavesintrin.h +OLD_FILES+=usr/lib/clang/19/include/xtestintrin.h +OLD_FILES+=usr/lib/clang/19/include/yvals_core.h +OLD_DIRS+=usr/lib/clang/19/include +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.asan-aarch64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.asan-aarch64.so +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.asan-arm.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.asan-arm.so +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.asan-armhf.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.asan-armhf.so +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.asan-i386.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.asan-i386.so +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.asan-powerpc64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.asan-powerpc64.so +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.asan-powerpc64le.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.asan-powerpc64le.so +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.asan-preinit-aarch64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.asan-preinit-arm.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.asan-preinit-armhf.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.asan-preinit-i386.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.asan-preinit-powerpc64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.asan-preinit-powerpc64le.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.asan-preinit-riscv64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.asan-preinit-x86_64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.asan-riscv64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.asan-riscv64.so +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.asan-x86_64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.asan-x86_64.so +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.asan_cxx-aarch64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.asan_cxx-arm.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.asan_cxx-armhf.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.asan_cxx-i386.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.asan_cxx-powerpc64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.asan_cxx-powerpc64le.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.asan_cxx-riscv64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.asan_cxx-x86_64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.asan_static-aarch64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.asan_static-i386.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.asan_static-powerpc64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.asan_static-powerpc64le.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.asan_static-x86_64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.cfi-aarch64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.cfi-arm.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.cfi-armhf.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.cfi-i386.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.cfi-x86_64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.cfi_diag-aarch64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.cfi_diag-arm.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.cfi_diag-armhf.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.cfi_diag-i386.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.cfi_diag-x86_64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.dd-aarch64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.dd-x86_64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.fuzzer-aarch64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.fuzzer-x86_64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.fuzzer_interceptors-aarch64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.fuzzer_interceptors-x86_64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.fuzzer_no_main-aarch64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.fuzzer_no_main-x86_64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.msan-aarch64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.msan-powerpc64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.msan-powerpc64le.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.msan-x86_64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.msan_cxx-aarch64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.msan_cxx-powerpc64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.msan_cxx-powerpc64le.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.msan_cxx-x86_64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.profile-aarch64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.profile-arm.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.profile-armhf.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.profile-i386.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.profile-powerpc.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.profile-powerpc64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.profile-powerpc64le.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.profile-riscv64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.profile-x86_64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.safestack-aarch64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.safestack-i386.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.safestack-x86_64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.stats-aarch64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.stats-arm.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.stats-armhf.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.stats-i386.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.stats-powerpc64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.stats-powerpc64le.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.stats-riscv64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.stats-x86_64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.stats_client-aarch64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.stats_client-arm.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.stats_client-armhf.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.stats_client-i386.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.stats_client-powerpc64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.stats_client-powerpc64le.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.stats_client-riscv64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.stats_client-x86_64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.tsan-aarch64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.tsan-powerpc64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.tsan-powerpc64le.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.tsan-x86_64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.tsan_cxx-aarch64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.tsan_cxx-powerpc64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.tsan_cxx-powerpc64le.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.tsan_cxx-x86_64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.ubsan_minimal-aarch64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.ubsan_minimal-arm.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.ubsan_minimal-armhf.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.ubsan_minimal-i386.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.ubsan_minimal-powerpc64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.ubsan_minimal-powerpc64le.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.ubsan_minimal-riscv64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.ubsan_minimal-x86_64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.ubsan_standalone-aarch64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.ubsan_standalone-arm.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.ubsan_standalone-armhf.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.ubsan_standalone-i386.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.ubsan_standalone-powerpc64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.ubsan_standalone-powerpc64le.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.ubsan_standalone-riscv64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.ubsan_standalone-x86_64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.ubsan_standalone_cxx-aarch64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.ubsan_standalone_cxx-arm.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.ubsan_standalone_cxx-armhf.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.ubsan_standalone_cxx-i386.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.ubsan_standalone_cxx-powerpc64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.ubsan_standalone_cxx-powerpc64le.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.ubsan_standalone_cxx-riscv64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.ubsan_standalone_cxx-x86_64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.xray-aarch64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.xray-arm.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.xray-armhf.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.xray-basic-aarch64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.xray-basic-arm.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.xray-basic-armhf.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.xray-basic-powerpc64le.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.xray-basic-x86_64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.xray-fdr-aarch64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.xray-fdr-arm.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.xray-fdr-armhf.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.xray-fdr-powerpc64le.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.xray-fdr-x86_64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.xray-powerpc64le.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.xray-profiling-aarch64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.xray-profiling-arm.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.xray-profiling-armhf.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.xray-profiling-powerpc64le.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.xray-profiling-x86_64.a +OLD_FILES+=usr/lib/clang/19/lib/freebsd/libclang_rt.xray-x86_64.a +OLD_DIRS+=usr/lib/clang/19/lib/freebsd +OLD_DIRS+=usr/lib/clang/19/lib +OLD_FILES+=usr/lib/clang/19/share/asan_ignorelist.txt +OLD_FILES+=usr/lib/clang/19/share/cfi_ignorelist.txt +OLD_FILES+=usr/lib/clang/19/share/msan_ignorelist.txt +OLD_DIRS+=usr/lib/clang/19/share +OLD_DIRS+=usr/lib/clang/19 + # 20260503: Kill off MANSUBDIRs OLD_DIRS+=usr/share/man/man4/amd64 OLD_FILES+=usr/share/man/man8/amd64/apm.8.gz diff --git a/contrib/llvm-project/libcxx/include/__cxx03/__config b/contrib/llvm-project/libcxx/include/__cxx03/__config index ef47327d9635..535c2f26d01c 100644 --- a/contrib/llvm-project/libcxx/include/__cxx03/__config +++ b/contrib/llvm-project/libcxx/include/__cxx03/__config @@ -404,7 +404,8 @@ typedef __char32_t char32_t; # define _LIBCPP_TEMPLATE_VIS # endif -# if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS) && __has_attribute(__type_visibility__) +# if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS) && __has_attribute(__type_visibility__) && \ + _LIBCPP_CLANG_VER >= 1500 // FreeBSD customization # define _LIBCPP_TYPE_VISIBILITY_DEFAULT __attribute__((__type_visibility__("default"))) # else # define _LIBCPP_TYPE_VISIBILITY_DEFAULT diff --git a/contrib/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp b/contrib/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp index 3995bc002cfe..3fab768b7cc2 100644 --- a/contrib/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp +++ b/contrib/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp @@ -94,7 +94,9 @@ #include "lldb/Utility/StringList.h" #include "Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.h" +#ifdef LLDB_ENABLE_ALL #include "Plugins/Platform/MacOSX/PlatformDarwin.h" +#endif // LLDB_ENABLE_ALL #include "lldb/Utility/XcodeSDK.h" #include diff --git a/etc/mtree/BSD.debug.dist b/etc/mtree/BSD.debug.dist index 0b4ee248702b..820b6eb2b13f 100644 --- a/etc/mtree/BSD.debug.dist +++ b/etc/mtree/BSD.debug.dist @@ -30,7 +30,7 @@ .. lib clang - 19 + 21 lib freebsd .. diff --git a/etc/mtree/BSD.include.dist b/etc/mtree/BSD.include.dist index 97f2194a3fa1..ce37d803c2a9 100644 --- a/etc/mtree/BSD.include.dist +++ b/etc/mtree/BSD.include.dist @@ -19,6 +19,8 @@ __algorithm .. __atomic + support + .. .. __bit .. @@ -36,6 +38,70 @@ .. __coroutine .. + __cstddef + .. + __cxx03 + __algorithm + .. + __atomic + .. + __bit + .. + __chrono + .. + __condition_variable + .. + __configuration + .. + __debug_utils + .. + __exception + .. + __functional + .. + __fwd + .. + __ios + .. + __iterator + .. + __locale_dir + locale_base_api + .. + .. + __math + .. + __memory + .. + __mutex + .. + __numeric + .. + __ostream + .. + __random + .. + __string + .. + __system_error + .. + __thread + support + .. + .. + __tuple + .. + __type_traits + .. + __utility + .. + __variant + .. + experimental + .. + ext + .. + .. __debug_utils .. __exception @@ -44,6 +110,10 @@ .. __filesystem .. + __flat_map + .. + __flat_set + .. __format .. __functional @@ -57,6 +127,10 @@ __locale_dir locale_base_api .. + support + no_locale + .. + .. .. __math .. @@ -68,6 +142,8 @@ .. __mutex .. + __new + .. __numeric .. __ostream @@ -100,6 +176,8 @@ .. __variant .. + __vector + .. experimental __simd .. diff --git a/etc/mtree/BSD.usr.dist b/etc/mtree/BSD.usr.dist index 0597690f49bf..9fe260569276 100644 --- a/etc/mtree/BSD.usr.dist +++ b/etc/mtree/BSD.usr.dist @@ -40,7 +40,7 @@ .. lib clang - 19 + 21 include cuda_wrappers bits diff --git a/lib/clang/clang.build.mk b/lib/clang/clang.build.mk index 6949e391a1fa..571a35f5a0ec 100644 --- a/lib/clang/clang.build.mk +++ b/lib/clang/clang.build.mk @@ -8,7 +8,6 @@ CFLAGS+= -I${CLANG_SRCS}/include .if ${MK_CLANG_FULL} != "no" -CFLAGS+= -DCLANG_ENABLE_ARCMT CFLAGS+= -DCLANG_ENABLE_STATIC_ANALYZER .endif diff --git a/lib/clang/headers/Makefile b/lib/clang/headers/Makefile index 6e9a4b6d3020..b37ebdd9db41 100644 --- a/lib/clang/headers/Makefile +++ b/lib/clang/headers/Makefile @@ -4,7 +4,7 @@ .PATH: ${CLANG_SRCS}/lib/Headers INCSGROUPS+= INCS -INCSDIR= ${LIBDIR}/clang/19/include +INCSDIR= ${LIBDIR}/clang/21/include INCS+= __clang_cuda_builtin_vars.h INCS+= __clang_cuda_cmath.h INCS+= __clang_cuda_complex_builtins.h @@ -20,6 +20,7 @@ INCS+= __clang_hip_libdevice_declares.h INCS+= __clang_hip_math.h INCS+= __clang_hip_runtime_wrapper.h INCS+= __clang_hip_stdlib.h +INCS+= __clang_spirv_builtins.h INCS+= __stdarg___gnuc_va_list.h INCS+= __stdarg___va_copy.h INCS+= __stdarg_header_macro.h @@ -42,15 +43,40 @@ INCS+= __wmmintrin_pclmul.h INCS+= adcintrin.h INCS+= adxintrin.h INCS+= altivec.h +INCS+= amdgpuintrin.h INCS+= ammintrin.h +INCS+= amxavx512intrin.h +INCS+= amxbf16transposeintrin.h INCS+= amxcomplexintrin.h +INCS+= amxcomplextransposeintrin.h INCS+= amxfp16intrin.h +INCS+= amxfp16transposeintrin.h +INCS+= amxfp8intrin.h INCS+= amxintrin.h +INCS+= amxmovrsintrin.h +INCS+= amxmovrstransposeintrin.h +INCS+= amxtf32intrin.h +INCS+= amxtf32transposeintrin.h +INCS+= amxtransposeintrin.h +INCS+= andes_vector.h INCS+= arm64intr.h INCS+= arm_acle.h INCS+= arm_cmse.h INCS+= arm_neon_sve_bridge.h INCS+= armintr.h +INCS+= avx10_2_512bf16intrin.h +INCS+= avx10_2_512convertintrin.h +INCS+= avx10_2_512minmaxintrin.h +INCS+= avx10_2_512niintrin.h +INCS+= avx10_2_512satcvtdsintrin.h +INCS+= avx10_2_512satcvtintrin.h +INCS+= avx10_2bf16intrin.h +INCS+= avx10_2convertintrin.h +INCS+= avx10_2copyintrin.h +INCS+= avx10_2minmaxintrin.h +INCS+= avx10_2niintrin.h +INCS+= avx10_2satcvtdsintrin.h +INCS+= avx10_2satcvtintrin.h INCS+= avx2intrin.h INCS+= avx512bf16intrin.h INCS+= avx512bitalgintrin.h @@ -103,6 +129,7 @@ INCS+= fma4intrin.h INCS+= fmaintrin.h INCS+= fxsrintrin.h INCS+= gfniintrin.h +INCS+= gpuintrin.h INCS+= hexagon_circ_brev_intrinsics.h INCS+= hexagon_protos.h INCS+= hexagon_types.h @@ -125,9 +152,13 @@ INCS+= mm_malloc.h INCS+= mmintrin.h INCS+= module.modulemap INCS+= movdirintrin.h +INCS+= movrs_avx10_2_512intrin.h +INCS+= movrs_avx10_2intrin.h +INCS+= movrsintrin.h INCS+= msa.h INCS+= mwaitxintrin.h INCS+= nmmintrin.h +INCS+= nvptxintrin.h INCS+= opencl-c-base.h INCS+= opencl-c.h INCS+= pconfigintrin.h @@ -142,6 +173,7 @@ INCS+= raointintrin.h INCS+= rdpruintrin.h INCS+= rdseedintrin.h INCS+= riscv_bitmanip.h +INCS+= riscv_corev_alu.h INCS+= riscv_crypto.h INCS+= riscv_ntlh.h INCS+= rtmintrin.h @@ -152,9 +184,11 @@ INCS+= sha512intrin.h INCS+= shaintrin.h INCS+= sifive_vector.h INCS+= sm3intrin.h +INCS+= sm4evexintrin.h INCS+= sm4intrin.h INCS+= smmintrin.h INCS+= stdckdint.h +INCS+= stdcountof.h INCS+= tbmintrin.h INCS+= tmmintrin.h INCS+= tsxldtrkintrin.h @@ -214,12 +248,18 @@ INCSGROUPS+= CUDB CUDBDIR= ${INCSDIR}/cuda_wrappers/bits CUDB+= cuda_wrappers/bits/basic_string.h CUDB+= cuda_wrappers/bits/basic_string.tcc +CUDB+= cuda_wrappers/bits/c++config.h CUDB+= cuda_wrappers/bits/shared_ptr_base.h INCSGROUPS+= HLSL HLSLDIR= ${INCSDIR}/hlsl +HLSL+= hlsl/hlsl_alias_intrinsics.h HLSL+= hlsl/hlsl_basic_types.h +HLSL+= hlsl/hlsl_compat_overloads.h +HLSL+= hlsl/hlsl_detail.h +HLSL+= hlsl/hlsl_intrinsic_helpers.h HLSL+= hlsl/hlsl_intrinsics.h +HLSL+= hlsl/hlsl_spirv.h INCSGROUPS+= OMP OMPDIR= ${INCSDIR}/openmp_wrappers @@ -230,6 +270,8 @@ OMP+= openmp_wrappers/complex.h OMP+= openmp_wrappers/complex_cmath.h OMP+= openmp_wrappers/math.h OMP+= openmp_wrappers/new +OMP+= openmp_wrappers/stdlib.h +OMP+= openmp_wrappers/time.h INCSGROUPS+= PPC PPCDIR= ${INCSDIR}/ppc_wrappers diff --git a/lib/clang/include/Plugins/Plugins.def b/lib/clang/include/Plugins/Plugins.def index 272e1f3aa5ee..39908bf20b85 100644 --- a/lib/clang/include/Plugins/Plugins.def +++ b/lib/clang/include/Plugins/Plugins.def @@ -72,8 +72,8 @@ LLDB_SCRIPT_PLUGIN(ScriptInterpreterLua) LLDB_PLUGIN(SymbolFileBreakpad) LLDB_PLUGIN(SymbolFileDWARF) LLDB_PLUGIN(SymbolFileSymtab) -LLDB_PLUGIN(SymbolLocatorDefault) LLDB_PLUGIN(SymbolLocatorDebuginfod) +LLDB_PLUGIN(SymbolLocatorDefault) LLDB_PLUGIN(SymbolVendorELF) LLDB_PLUGIN(TypeSystemClang) LLDB_PLUGIN(UnwindAssemblyInstEmulation) diff --git a/lib/clang/include/VCSVersion.inc b/lib/clang/include/VCSVersion.inc index a18ba351aaab..6d19824e75e7 100644 --- a/lib/clang/include/VCSVersion.inc +++ b/lib/clang/include/VCSVersion.inc @@ -1,8 +1,8 @@ -#define LLVM_REVISION "llvmorg-19.1.7-0-gcd708029e0b2" +#define LLVM_REVISION "llvmorg-21-init-19288-gface93e724f4" #define LLVM_REPOSITORY "https://github.com/llvm/llvm-project.git" -#define CLANG_REVISION "llvmorg-19.1.7-0-gcd708029e0b2" +#define CLANG_REVISION "llvmorg-21-init-19288-gface93e724f4" #define CLANG_REPOSITORY "https://github.com/llvm/llvm-project.git" -#define LLDB_REVISION "llvmorg-19.1.7-0-gcd708029e0b2" +#define LLDB_REVISION "llvmorg-21-init-19288-gface93e724f4" #define LLDB_REPOSITORY "https://github.com/llvm/llvm-project.git" diff --git a/lib/clang/include/clang/Basic/Version.inc b/lib/clang/include/clang/Basic/Version.inc index 92e55f9316cf..2f9b09d2f59c 100644 --- a/lib/clang/include/clang/Basic/Version.inc +++ b/lib/clang/include/clang/Basic/Version.inc @@ -1,8 +1,9 @@ -#define CLANG_VERSION 19.1.7 -#define CLANG_VERSION_STRING "19.1.7" -#define CLANG_VERSION_MAJOR 19 -#define CLANG_VERSION_MAJOR_STRING "19" -#define CLANG_VERSION_MINOR 1 -#define CLANG_VERSION_PATCHLEVEL 7 +#define CLANG_VERSION 21.0.0git +#define CLANG_VERSION_STRING "21.0.0git" +#define CLANG_VERSION_MAJOR 21 +#define CLANG_VERSION_MAJOR_STRING "21" +#define CLANG_VERSION_MINOR 0 +#define CLANG_VERSION_PATCHLEVEL 0 +#define MAX_CLANG_ABI_COMPAT_VERSION 21 #define CLANG_VENDOR "FreeBSD " diff --git a/lib/clang/include/clang/Config/config.h b/lib/clang/include/clang/Config/config.h index 4895c820620c..64ee8fd0d3e7 100644 --- a/lib/clang/include/clang/Config/config.h +++ b/lib/clang/include/clang/Config/config.h @@ -76,7 +76,6 @@ #define PPC_LINUX_DEFAULT_IEEELONGDOUBLE 0 /* Enable each functionality of modules */ -/* #undef CLANG_ENABLE_ARCMT */ /* #undef CLANG_ENABLE_OBJC_REWRITER */ /* #undef CLANG_ENABLE_STATIC_ANALYZER */ diff --git a/lib/clang/include/lld/Common/Version.inc b/lib/clang/include/lld/Common/Version.inc index 0643da4abbf4..bbd7b451ae9f 100644 --- a/lib/clang/include/lld/Common/Version.inc +++ b/lib/clang/include/lld/Common/Version.inc @@ -1,4 +1,4 @@ // Local identifier in __FreeBSD_version style #define LLD_FREEBSD_VERSION 1500001 -#define LLD_VERSION_STRING "19.1.7 (FreeBSD llvmorg-19.1.7-0-gcd708029e0b2-" __XSTRING(LLD_FREEBSD_VERSION) ")" +#define LLD_VERSION_STRING "21.0.0 (FreeBSD llvmorg-21-init-19288-gface93e724f4-" __XSTRING(LLD_FREEBSD_VERSION) ")" diff --git a/lib/clang/include/lldb/API/SBLanguages.h b/lib/clang/include/lldb/API/SBLanguages.h index 115dd4145b42..9f1a921ae456 100644 --- a/lib/clang/include/lldb/API/SBLanguages.h +++ b/lib/clang/include/lldb/API/SBLanguages.h @@ -9,6 +9,8 @@ #ifndef LLDB_API_SBLANGUAGE_H #define LLDB_API_SBLANGUAGE_H +#include + namespace lldb { /// Used by \ref SBExpressionOptions. /// These enumerations use the same language enumerations as the DWARF @@ -94,6 +96,8 @@ enum SBSourceLanguageName : uint16_t { eLanguageNameMove = 0x0027, /// Hylo. eLanguageNameHylo = 0x0028, + /// Metal. + eLanguageNameMetal = 0x002c, }; } // namespace lldb diff --git a/lib/clang/include/lldb/Host/Config.h b/lib/clang/include/lldb/Host/Config.h index 20783dd62c39..4d573ec41acd 100644 --- a/lib/clang/include/lldb/Host/Config.h +++ b/lib/clang/include/lldb/Host/Config.h @@ -23,9 +23,7 @@ #define HAVE_NR_PROCESS_VM_READV 0 -#ifndef HAVE_LIBCOMPRESSION -/* #undef HAVE_LIBCOMPRESSION */ -#endif +#define HAVE_LIBCOMPRESSION 0 #define LLDB_ENABLE_POSIX 1 @@ -33,6 +31,8 @@ #define LLDB_ENABLE_LZMA 1 +#define LLVM_ENABLE_CURL 0 + #define LLDB_ENABLE_CURSES 1 #define CURSES_HAVE_NCURSES_CURSES_H 0 diff --git a/lib/clang/include/lldb/Version/Version.inc b/lib/clang/include/lldb/Version/Version.inc index 02d44970ff54..189498011837 100644 --- a/lib/clang/include/lldb/Version/Version.inc +++ b/lib/clang/include/lldb/Version/Version.inc @@ -1,6 +1,6 @@ -#define LLDB_VERSION 19.1.7 -#define LLDB_VERSION_STRING "19.1.7" -#define LLDB_VERSION_MAJOR 19 -#define LLDB_VERSION_MINOR 1 -#define LLDB_VERSION_PATCH 7 +#define LLDB_VERSION 21.0.0git +#define LLDB_VERSION_STRING "21.0.0git" +#define LLDB_VERSION_MAJOR 21 +#define LLDB_VERSION_MINOR 0 +#define LLDB_VERSION_PATCH 0 /* #undef LLDB_FULL_VERSION_STRING */ diff --git a/lib/clang/include/llvm/Config/Targets.h b/lib/clang/include/llvm/Config/Targets.h new file mode 100644 index 000000000000..ce9bffebe10f --- /dev/null +++ b/lib/clang/include/llvm/Config/Targets.h @@ -0,0 +1,118 @@ +/*===------- llvm/Config/Targets.h - LLVM target checks -----------*- C -*-===*/ +/* */ +/* Part of the LLVM Project, under the Apache License v2.0 with LLVM */ +/* Exceptions. */ +/* See https://llvm.org/LICENSE.txt for license information. */ +/* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */ +/* */ +/*===----------------------------------------------------------------------===*/ + +/* This file enables clients to know whether specific targets are enabled. */ + +#ifndef LLVM_CONFIG_TARGETS_H +#define LLVM_CONFIG_TARGETS_H + +/* Define if the AArch64 target is built in */ +#ifdef LLVM_TARGET_ENABLE_AARCH64 +#define LLVM_HAS_AARCH64_TARGET 1 +#else +#define LLVM_HAS_AARCH64_TARGET 0 +#endif + +/* Define if the AMDGPU target is built in */ +#define LLVM_HAS_AMDGPU_TARGET 0 + +/* Define if the ARC target is built in */ +#define LLVM_HAS_ARC_TARGET 0 + +/* Define if the ARM target is built in */ +#ifdef LLVM_TARGET_ENABLE_ARM +#define LLVM_HAS_ARM_TARGET 1 +#else +#define LLVM_HAS_ARM_TARGET 0 +#endif + +/* Define if the AVR target is built in */ +#define LLVM_HAS_AVR_TARGET 0 + +/* Define if the BPF target is built in */ *** 11513 LINES SKIPPED *** From nobody Fri May 29 23:01:46 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRzPl30lZz6gDsF for ; Fri, 29 May 2026 23:01:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRzPk66BGz3BnK for ; Fri, 29 May 2026 23:01:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095706; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LVPj4uQ6v1RlGKoGefOwZueOyRGACJVj7+zaBDoNnuU=; b=uYmX3KZiJyWeiw1QGuRU+I9CciuI5X02Mlij9t5QgxXBk7xSwpB38c8XFK1fnVrpHCFIcY kUUdq8wIkTO0PBDpkpdCVUmIsgsgGZQgv9oIwcHMh+K4n7xMUMViLvPSpN0NraQ0nRUCxs NHW9QcKysN9wOE+r/INGZQJ3A9vtk4pXsOJP8EIh9uptlhZJDzbhdtXgWl1iJGm3VCz4uB 1iMrRlOyLEYgD0zmDqekAzdgowee/1GUyxoZOsgi8DzEgeZDtrzc0WjT0ldNB7lfuptxca yK20GLf93RJAZpo/gQOiUJUiQG94o63xHg8Kw5qdvrP8FiL8gh/ogg0CPAgpGQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780095706; a=rsa-sha256; cv=none; b=Dppi1t+p39FVXZtB4ZLqBbusF76xhwJDcQQn5XMk/PzWJ33OcxGlrMumkOKasju355TgB6 ZLOf8kXJQzzw5Ye09AV5oteUCXP3wULk4n6AbpTRLXrDU7mI7M3AHBlXFBdb9QcK9khPGO rE4M6Q1Pf21NZFJDoIJXDMe0OhXwZteAd7SoPSQ25oUyx+FE27lxEp3t6D/MoTYrWybbsV FZAe6r8Uq3CMuuyOT72Ac125oFX22Suqe3mNSsDnm5ccAvcKH8NR1vncjfL/f8j6DF0gTh sgjDHaeYP2TAY1MEGu2MmRp/D5cucKCdySJ/iZtn7DLTdNm/gaPdxsF6lGhxlg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095706; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LVPj4uQ6v1RlGKoGefOwZueOyRGACJVj7+zaBDoNnuU=; b=blediTrwWtW3TeiAbJGUt0sdiyJ5gokKG7EdhGoap4CcbXEjoE/CzUCeDq1yXb0+dStI3o zqdVbtzXDb00AV6KUjZq7r8Fh1Mc5TZW8y3bfrsd/TjTLlEI3tk9biqp6KrcyYCu4xNUKE Jhd2AH9i6wADy9Bv3QUyiC2oxUg0oNw2QPvvTM7p/r4AiwEHZOaQI2dNNlj3w05eqTkXX0 Pu35Abv8p00XC5e/cbaa5nqCt+Ap4JjjBq9Ho+3OxRpWxBDUdZbfD3PpWd/AlFgTsgYJHz lveHT3P6gPVWIaMfTWfbQjniPX13aPRRlKS2qU2MXJnR6P7+4OyRybT4TQJETw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRzPk5g5pztXd for ; Fri, 29 May 2026 23:01:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4275b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 23:01:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: cf7d88e89f1d - stable/15 - Merge llvm-project release/21.x llvmorg-21.1.7-0-gcd708029e0b2 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: cf7d88e89f1dcc1b66c3e8f327e16122d42d6a6c Auto-Submitted: auto-generated Date: Fri, 29 May 2026 23:01:46 +0000 Message-Id: <6a1a1ada.4275b.2caa2886@gitrepo.freebsd.org> The branch stable/15 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=cf7d88e89f1dcc1b66c3e8f327e16122d42d6a6c commit cf7d88e89f1dcc1b66c3e8f327e16122d42d6a6c Author: Dimitry Andric AuthorDate: 2025-12-27 23:23:22 +0000 Commit: Dimitry Andric CommitDate: 2026-05-29 22:57:31 +0000 Merge llvm-project release/21.x llvmorg-21.1.7-0-gcd708029e0b2 This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project release/21.x llvmorg-21.1.7-0-gcd708029e0b2, a.k.a. 21.1.7 release. PR: 292067 MFC after: 1 month (cherry picked from commit e64bea71c21eb42e97aa615188ba91f6cce0d36d) --- ObsoleteFiles.inc | 25 + contrib/llvm-project/FREEBSD-Xlist | 304 ++++++- contrib/llvm-project/clang/include/clang-c/Index.h | 15 + .../llvm-project/clang/include/clang/AST/APValue.h | 2 +- .../clang/include/clang/AST/ASTContext.h | 3 +- .../clang/include/clang/Basic/AttrDocs.td | 6 +- .../include/clang/Basic/DiagnosticASTKinds.td | 8 + .../clang/include/clang/Basic/DiagnosticGroups.td | 1 + .../clang/Basic/DiagnosticSerializationKinds.td | 4 + .../clang/include/clang/Basic/Features.def | 9 +- .../clang/include/clang/Basic/LangOptions.def | 4 + .../clang/include/clang/Basic/PointerAuthOptions.h | 16 + .../clang/include/clang/Basic/riscv_vector.td | 935 ++------------------ .../clang/include/clang/Driver/Options.td | 23 +- .../clang/include/clang/Format/Format.h | 14 +- .../llvm-project/clang/include/clang/Lex/Lexer.h | 3 - .../include/clang/Lex/NoTrivialPPDirectiveTracer.h | 310 +++++++ .../clang/include/clang/Lex/Preprocessor.h | 12 + .../llvm-project/clang/include/clang/Lex/Token.h | 17 +- .../clang/include/clang/Sema/Overload.h | 11 +- .../llvm-project/clang/include/clang/Sema/Sema.h | 2 +- contrib/llvm-project/clang/lib/AST/ASTContext.cpp | 5 +- .../clang/lib/AST/ASTStructuralEquivalence.cpp | 72 +- contrib/llvm-project/clang/lib/AST/DeclCXX.cpp | 7 + .../llvm-project/clang/lib/AST/ExprConstant.cpp | 41 +- contrib/llvm-project/clang/lib/AST/Type.cpp | 20 + .../clang/lib/Analysis/ThreadSafety.cpp | 2 +- contrib/llvm-project/clang/lib/Basic/Targets.cpp | 3 + .../clang/lib/Basic/Targets/LoongArch.cpp | 2 + .../llvm-project/clang/lib/Basic/Targets/Mips.h | 6 +- .../clang/lib/Basic/Targets/OSTargets.h | 4 + contrib/llvm-project/clang/lib/Basic/Targets/X86.h | 2 + contrib/llvm-project/clang/lib/CodeGen/Address.h | 5 + .../llvm-project/clang/lib/CodeGen/CGBlocks.cpp | 99 ++- contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp | 26 +- contrib/llvm-project/clang/lib/CodeGen/CGCall.h | 6 + .../llvm-project/clang/lib/CodeGen/CGCoroutine.cpp | 14 +- .../llvm-project/clang/lib/CodeGen/CGDebugInfo.cpp | 7 +- contrib/llvm-project/clang/lib/CodeGen/CGExpr.cpp | 9 +- .../llvm-project/clang/lib/CodeGen/CGExprCXX.cpp | 3 +- .../clang/lib/CodeGen/CGExprConstant.cpp | 7 +- contrib/llvm-project/clang/lib/CodeGen/CGStmt.cpp | 11 +- .../clang/lib/CodeGen/CodeGenFunction.h | 5 +- .../llvm-project/clang/lib/CodeGen/EHScopeStack.h | 2 +- .../clang/lib/CodeGen/TargetBuiltins/RISCV.cpp | 949 ++++++++++++++++++++- .../llvm-project/clang/lib/CodeGen/TargetInfo.cpp | 2 + .../clang/lib/CodeGen/Targets/Sparc.cpp | 125 ++- .../llvm-project/clang/lib/Driver/ToolChain.cpp | 29 +- .../clang/lib/Driver/ToolChains/Arch/AArch64.cpp | 15 + .../clang/lib/Driver/ToolChains/Arch/AArch64.h | 1 + .../clang/lib/Driver/ToolChains/Arch/Sparc.cpp | 31 +- .../clang/lib/Driver/ToolChains/Arch/Sparc.h | 3 +- .../clang/lib/Driver/ToolChains/BareMetal.cpp | 24 +- .../clang/lib/Driver/ToolChains/Clang.cpp | 11 - .../clang/lib/Driver/ToolChains/CommonArgs.cpp | 36 +- .../clang/lib/Driver/ToolChains/Darwin.cpp | 38 +- .../clang/lib/Driver/ToolChains/Flang.cpp | 1 + .../clang/lib/Driver/ToolChains/MinGW.cpp | 11 +- .../clang/lib/Driver/ToolChains/OpenBSD.cpp | 2 +- .../clang/lib/Format/ContinuationIndenter.cpp | 13 +- contrib/llvm-project/clang/lib/Format/Format.cpp | 96 ++- .../llvm-project/clang/lib/Format/FormatToken.cpp | 3 +- .../llvm-project/clang/lib/Format/FormatToken.h | 2 +- .../clang/lib/Format/FormatTokenLexer.cpp | 13 +- .../lib/Format/IntegerLiteralSeparatorFixer.cpp | 11 +- .../clang/lib/Format/TokenAnnotator.cpp | 78 +- .../clang/lib/Format/UnwrappedLineParser.cpp | 25 +- .../clang/lib/Frontend/CompilerInvocation.cpp | 16 +- .../clang/lib/Frontend/InitPreprocessor.cpp | 3 + .../clang/lib/Headers/avx10_2_512niintrin.h | 12 +- .../clang/lib/Headers/avx10_2bf16intrin.h | 36 +- .../clang/lib/Headers/avx10_2niintrin.h | 24 +- .../llvm-project/clang/lib/Headers/opencl-c-base.h | 11 +- contrib/llvm-project/clang/lib/Headers/ptrauth.h | 4 +- contrib/llvm-project/clang/lib/Lex/Lexer.cpp | 9 - .../llvm-project/clang/lib/Lex/LiteralSupport.cpp | 2 +- .../llvm-project/clang/lib/Lex/Preprocessor.cpp | 40 +- contrib/llvm-project/clang/lib/Parse/ParseExpr.cpp | 3 +- contrib/llvm-project/clang/lib/Parse/Parser.cpp | 8 +- .../clang/lib/Sema/AnalysisBasedWarnings.cpp | 7 +- .../llvm-project/clang/lib/Sema/SemaChecking.cpp | 9 +- .../llvm-project/clang/lib/Sema/SemaConcept.cpp | 4 - contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp | 9 + .../llvm-project/clang/lib/Sema/SemaDeclAttr.cpp | 13 +- contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp | 8 +- .../llvm-project/clang/lib/Sema/SemaExprCXX.cpp | 2 + contrib/llvm-project/clang/lib/Sema/SemaModule.cpp | 6 +- .../llvm-project/clang/lib/Sema/SemaOverload.cpp | 14 +- contrib/llvm-project/clang/lib/Sema/SemaStmt.cpp | 6 +- .../llvm-project/clang/lib/Sema/SemaTemplate.cpp | 2 - .../clang/lib/Sema/SemaTemplateDeduction.cpp | 21 +- .../clang/lib/Sema/SemaTemplateInstantiateDecl.cpp | 2 +- .../llvm-project/clang/lib/Sema/SemaTypeTraits.cpp | 5 +- .../clang/lib/Serialization/ASTReader.cpp | 4 + .../clang/lib/Serialization/ASTWriter.cpp | 3 +- .../clang/lib/Serialization/ModuleCache.cpp | 4 +- .../lib/StaticAnalyzer/Checkers/AssumeModeling.cpp | 1 - .../clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp | 3 +- .../lib/StaticAnalyzer/Core/ExprEngineCXX.cpp | 35 +- .../compiler-rt/lib/builtins/aarch64/lse.S | 4 +- .../compiler-rt/lib/builtins/aarch64/sme-abi.S | 4 +- .../compiler-rt/lib/builtins/assembly.h | 18 +- .../compiler-rt/lib/builtins/cpu_model/aarch64.c | 8 +- .../aarch64/fmv/{freebsd.inc => elf_aux_info.inc} | 0 .../lse_atomics/{freebsd.inc => elf_aux_info.inc} | 0 .../compiler-rt/lib/builtins/crtbegin.c | 46 +- .../lib/hwasan/hwasan_interceptors_vfork.S | 2 +- .../compiler-rt/lib/hwasan/hwasan_setjmp_aarch64.S | 2 +- .../lib/hwasan/hwasan_tag_mismatch_aarch64.S | 2 +- .../sanitizer_common_interceptors_ioctl.inc | 4 + ...nitizer_common_interceptors_vfork_aarch64.inc.S | 2 +- .../sanitizer_common/sanitizer_linux_libcdep.cpp | 1 + .../lib/sanitizer_common/sanitizer_platform.h | 15 + .../sanitizer_platform_limits_freebsd.cpp | 22 - .../sanitizer_platform_limits_freebsd.h | 16 - .../sanitizer_platform_limits_netbsd.cpp | 3 +- .../sanitizer_platform_limits_posix.cpp | 8 +- .../sanitizer_platform_limits_posix.h | 34 +- .../compiler-rt/lib/tsan/rtl/tsan_rtl_aarch64.S | 2 +- .../llvm-project/libcxx/include/__algorithm/sort.h | 3 + contrib/llvm-project/libcxx/include/__assert | 4 +- .../llvm-project/libcxx/include/__bit/bit_log2.h | 2 + contrib/llvm-project/libcxx/include/__config | 109 ++- .../libcxx/include/__configuration/abi.h | 12 + .../llvm-project/libcxx/include/__cxx03/__config | 4 + .../libcxx/include/__functional/hash.h | 14 +- .../libcxx/include/__log_hardening_failure | 42 + .../libcxx/include/__memory/array_cookie.h | 84 +- .../libcxx/include/__memory/compressed_pair.h | 54 +- .../libcxx/include/__ranges/join_view.h | 9 +- .../libcxx/include/__type_traits/invoke.h | 10 +- .../libcxx/include/__type_traits/is_unqualified.h | 25 + contrib/llvm-project/libcxx/include/ext/hash_map | 4 +- contrib/llvm-project/libcxx/include/ext/hash_set | 4 +- contrib/llvm-project/libcxx/include/fstream | 35 +- contrib/llvm-project/libcxx/include/map | 4 +- .../libcxx/include/module.modulemap.in | 4 + contrib/llvm-project/libcxx/include/string | 14 +- contrib/llvm-project/libcxx/src/algorithm.cpp | 3 + .../src/experimental/log_hardening_failure.cpp | 31 + .../vendor/llvm/default_assertion_handler.in | 35 +- contrib/llvm-project/libunwind/src/Unwind-seh.cpp | 3 +- .../llvm-project/libunwind/src/UnwindCursor.hpp | 3 +- .../libunwind/src/UnwindRegistersRestore.S | 7 +- contrib/llvm-project/lld/COFF/Chunks.cpp | 2 +- contrib/llvm-project/lld/COFF/Config.h | 14 +- contrib/llvm-project/lld/COFF/DLL.cpp | 94 +- contrib/llvm-project/lld/COFF/Driver.cpp | 68 +- contrib/llvm-project/lld/COFF/Driver.h | 1 + contrib/llvm-project/lld/COFF/DriverUtils.cpp | 2 +- contrib/llvm-project/lld/COFF/InputFiles.cpp | 30 +- contrib/llvm-project/lld/COFF/LTO.cpp | 11 +- contrib/llvm-project/lld/COFF/Options.td | 11 + contrib/llvm-project/lld/COFF/PDB.cpp | 9 +- contrib/llvm-project/lld/COFF/SymbolTable.cpp | 38 + contrib/llvm-project/lld/COFF/SymbolTable.h | 3 + contrib/llvm-project/lld/COFF/Writer.cpp | 2 +- contrib/llvm-project/lld/ELF/Arch/Hexagon.cpp | 47 + contrib/llvm-project/lld/ELF/Arch/LoongArch.cpp | 158 +++- contrib/llvm-project/lld/ELF/InputFiles.cpp | 59 +- contrib/llvm-project/lld/ELF/LinkerScript.cpp | 20 +- contrib/llvm-project/lld/ELF/Relocations.cpp | 55 +- contrib/llvm-project/lld/ELF/Thunks.cpp | 72 +- contrib/llvm-project/lld/docs/DTLTO.rst | 37 +- contrib/llvm-project/lld/docs/ReleaseNotes.rst | 3 + .../lldb/Target/InstrumentationRuntimeStopInfo.h | 3 + .../lldb/include/lldb/Target/StackFrameList.h | 12 + .../llvm-project/lldb/include/lldb/Target/Thread.h | 5 + .../ExpressionParser/Clang/ClangASTImporter.cpp | 10 + .../Language/CPlusPlus/CPlusPlusLanguage.cpp | 50 +- .../source/Plugins/Language/CPlusPlus/LibCxx.cpp | 67 +- .../source/Plugins/Language/CPlusPlus/LibCxx.h | 17 +- .../Plugins/Language/CPlusPlus/LibCxxList.cpp | 24 +- .../Plugins/Language/CPlusPlus/LibCxxMap.cpp | 29 +- .../Language/CPlusPlus/LibCxxUnorderedMap.cpp | 59 +- .../Plugins/Language/CPlusPlus/LibCxxVector.cpp | 12 +- .../FreeBSD/NativeRegisterContextFreeBSD_arm64.cpp | 3 +- .../source/Plugins/Process/Utility/AuxVector.cpp | 1 + .../source/Plugins/Process/Utility/AuxVector.h | 1 + .../Utility/RegisterFlagsDetector_arm64.cpp | 53 +- .../Process/Utility/RegisterFlagsDetector_arm64.h | 25 +- .../elf-core/RegisterContextPOSIXCore_arm64.cpp | 13 +- .../SymbolFile/DWARF/DWARFASTParserClang.cpp | 12 + .../Target/InstrumentationRuntimeStopInfo.cpp | 42 + .../llvm-project/lldb/source/Target/Process.cpp | 8 + .../lldb/source/Target/StackFrameList.cpp | 2 + .../lldb/source/Target/TargetProperties.td | 4 +- .../lldb/source/ValueObject/DILEval.cpp | 2 +- .../llvm/include/llvm/Analysis/IVDescriptors.h | 3 + .../llvm/include/llvm/BinaryFormat/ELF.h | 28 +- .../llvm/include/llvm/CodeGen/MachineBasicBlock.h | 9 +- .../llvm/include/llvm/CodeGen/MachineOperand.h | 3 + .../llvm/include/llvm/CodeGen/TargetInstrInfo.h | 11 + .../llvm/IR/GenericFloatingPointPredicateUtils.h | 24 +- .../llvm/include/llvm/IR/RuntimeLibcalls.td | 2 +- .../llvm-project/llvm/include/llvm/MC/MCContext.h | 4 + .../llvm/MC/MCDisassembler/MCDisassembler.h | 12 + .../llvm/include/llvm/MC/MCParser/MCAsmParser.h | 3 + .../llvm-project/llvm/include/llvm/MC/MCSection.h | 25 +- .../llvm/include/llvm/Object/ELFObjectFile.h | 1 + .../llvm/lib/Analysis/IVDescriptors.cpp | 26 +- contrib/llvm-project/llvm/lib/Analysis/Loads.cpp | 5 +- .../llvm/lib/Analysis/ScalarEvolution.cpp | 9 +- .../llvm/lib/CodeGen/BranchFolding.cpp | 5 + .../llvm/lib/CodeGen/CodeGenPrepare.cpp | 4 + .../llvm/lib/CodeGen/MachineCopyPropagation.cpp | 10 - .../llvm/lib/CodeGen/MachineOperand.cpp | 13 + .../llvm/lib/CodeGen/MachinePipeliner.cpp | 29 +- .../llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp | 2 + .../llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 19 +- .../CodeGen/SelectionDAG/LegalizeFloatTypes.cpp | 8 + .../llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h | 1 + .../llvm/lib/CodeGen/TailDuplicator.cpp | 23 +- .../llvm/lib/CodeGen/TargetLoweringBase.cpp | 36 +- contrib/llvm-project/llvm/lib/IR/Verifier.cpp | 15 +- contrib/llvm-project/llvm/lib/MC/MCContext.cpp | 49 +- contrib/llvm-project/llvm/lib/MC/MCExpr.cpp | 3 + contrib/llvm-project/llvm/lib/MC/MCFragment.cpp | 4 + .../llvm-project/llvm/lib/MC/MCObjectStreamer.cpp | 7 + .../llvm/lib/MC/MCParser/AsmParser.cpp | 65 +- .../llvm/lib/MC/MCParser/COFFAsmParser.cpp | 66 +- .../llvm/lib/MC/MCParser/COFFMasmParser.cpp | 17 +- .../llvm/lib/MC/MCParser/DarwinAsmParser.cpp | 44 +- .../llvm/lib/MC/MCParser/ELFAsmParser.cpp | 34 +- .../llvm/lib/MC/MCParser/MCAsmParser.cpp | 9 + .../llvm/lib/MC/MCParser/MCAsmParserExtension.cpp | 4 +- .../llvm/lib/MC/MCParser/MasmParser.cpp | 32 +- .../llvm/lib/MC/MCParser/WasmAsmParser.cpp | 15 +- contrib/llvm-project/llvm/lib/MC/MCSection.cpp | 6 +- .../llvm/lib/ObjCopy/COFF/COFFObject.cpp | 2 + .../llvm/lib/ObjCopy/COFF/COFFObject.h | 2 + .../llvm/lib/ObjCopy/COFF/COFFReader.cpp | 2 +- .../llvm/lib/ObjCopy/COFF/COFFWriter.cpp | 75 ++ .../llvm/lib/ObjCopy/COFF/COFFWriter.h | 1 + .../llvm-project/llvm/lib/Object/ELFObjectFile.cpp | 32 +- .../llvm/lib/Support/BLAKE3/blake3_dispatch.c | 2 +- .../llvm/lib/Support/BLAKE3/blake3_impl.h | 2 +- .../llvm/lib/Support/BLAKE3/blake3_neon.c | 9 +- .../llvm/lib/Support/BLAKE3/llvm_blake3_prefix.h | 2 + .../llvm-project/llvm/lib/Support/MemoryBuffer.cpp | 10 +- .../llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp | 28 +- .../lib/Target/AArch64/AArch64BranchTargets.cpp | 46 +- .../llvm/lib/Target/AArch64/AArch64Features.td | 4 +- .../llvm/lib/Target/AArch64/AArch64InstrInfo.td | 2 +- .../Target/AArch64/AArch64TargetTransformInfo.cpp | 25 +- .../Target/AArch64/AArch64TargetTransformInfo.h | 8 +- .../llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp | 10 +- .../llvm/lib/Target/ARM/ARMISelLowering.cpp | 11 + .../llvm/lib/Target/AVR/AVRISelLowering.cpp | 7 +- .../llvm-project/llvm/lib/Target/BPF/BTFDebug.cpp | 131 ++- .../Hexagon/Disassembler/HexagonDisassembler.cpp | 128 ++- .../llvm/lib/Target/Hexagon/HexagonGenInsert.cpp | 8 +- .../lib/Target/Hexagon/HexagonISelDAGToDAG.cpp | 9 + .../lib/Target/Hexagon/HexagonISelLoweringHVX.cpp | 4 + .../llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp | 1 + .../Hexagon/MCTargetDesc/HexagonInstPrinter.cpp | 34 +- .../Hexagon/MCTargetDesc/HexagonMCTargetDesc.cpp | 19 +- .../lib/Target/LoongArch/LoongArchAsmPrinter.cpp | 2 +- .../Target/LoongArch/LoongArchFrameLowering.cpp | 7 +- .../lib/Target/LoongArch/LoongArchISelLowering.cpp | 230 ++--- .../lib/Target/LoongArch/LoongArchInstrInfo.cpp | 45 +- .../llvm/lib/Target/LoongArch/LoongArchInstrInfo.h | 3 + .../Target/LoongArch/LoongArchMergeBaseOffset.cpp | 4 + .../LoongArch/MCTargetDesc/LoongArchBaseInfo.cpp | 10 +- .../lib/Target/Mips/AsmParser/MipsAsmParser.cpp | 2 +- .../llvm/lib/Target/Mips/MipsAsmPrinter.cpp | 8 +- .../llvm/lib/Target/Mips/MipsExpandPseudo.cpp | 217 ++++- .../llvm/lib/Target/Mips/MipsISelLowering.cpp | 29 - .../llvm/lib/Target/Mips/MipsISelLowering.h | 1 - .../llvm/lib/Target/Mips/MipsInstrInfo.td | 16 +- .../llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp | 12 +- .../lib/Target/NVPTX/NVPTXTargetTransformInfo.h | 5 + .../llvm/lib/Target/PowerPC/PPCISelLowering.cpp | 39 +- .../llvm/lib/Target/PowerPC/PPCInstrInfo.td | 3 +- .../llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp | 17 +- .../Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp | 42 +- .../RISCV/MCTargetDesc/RISCVMCCodeEmitter.cpp | 29 +- .../llvm/lib/Target/RISCV/RISCVCallingConv.td | 4 + .../llvm/lib/Target/RISCV/RISCVFrameLowering.cpp | 38 +- .../llvm/lib/Target/RISCV/RISCVFrameLowering.h | 3 +- .../llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp | 18 +- .../llvm/lib/Target/RISCV/RISCVISelLowering.cpp | 89 +- .../llvm/lib/Target/RISCV/RISCVInstrInfoXqci.td | 9 +- .../llvm/lib/Target/RISCV/RISCVInstrInfoZvk.td | 4 +- .../llvm/lib/Target/RISCV/RISCVMoveMerger.cpp | 16 +- .../llvm/lib/Target/RISCV/RISCVRegisterInfo.cpp | 11 +- .../lib/Target/RISCV/RISCVTargetTransformInfo.cpp | 1 + .../llvm/lib/Target/RISCV/RISCVVectorPeephole.cpp | 9 + .../llvm/lib/Target/Sparc/DelaySlotFiller.cpp | 4 +- .../llvm/lib/Target/Sparc/SparcISelLowering.cpp | 18 +- .../llvm/lib/Target/Sparc/SparcISelLowering.h | 5 + .../llvm/lib/Target/Sparc/SparcInstrUAOSA.td | 12 + .../Target/SystemZ/SystemZTargetTransformInfo.cpp | 14 - .../Target/SystemZ/SystemZTargetTransformInfo.h | 3 - .../WebAssembly/WebAssemblyExplicitLocals.cpp | 12 +- .../llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp | 28 +- .../llvm/lib/Target/X86/X86CallingConv.cpp | 31 + .../llvm/lib/Target/X86/X86CallingConv.td | 5 + .../llvm/lib/Target/X86/X86ISelLowering.cpp | 53 +- .../llvm/lib/Target/X86/X86ISelLoweringCall.cpp | 15 +- .../llvm/lib/Target/X86/X86InstrInfo.cpp | 22 +- .../llvm/lib/Target/Xtensa/XtensaISelLowering.cpp | 16 +- .../llvm/lib/Transforms/Coroutines/Coroutines.cpp | 3 + .../lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp | 12 +- .../Instrumentation/SanitizerCoverage.cpp | 13 +- .../lib/Transforms/Scalar/DeadStoreElimination.cpp | 1 + .../llvm/lib/Transforms/Scalar/LoopSimplifyCFG.cpp | 21 + .../llvm/lib/Transforms/Scalar/SROA.cpp | 15 +- .../lib/Transforms/Utils/BreakCriticalEdges.cpp | 11 +- .../llvm/lib/Transforms/Utils/LoopUtils.cpp | 10 +- .../Transforms/Utils/ScalarEvolutionExpander.cpp | 11 +- .../Vectorize/LoopVectorizationPlanner.h | 12 +- .../lib/Transforms/Vectorize/LoopVectorize.cpp | 18 +- .../lib/Transforms/Vectorize/SLPVectorizer.cpp | 11 +- .../lib/Transforms/Vectorize/VPlanAnalysis.cpp | 1 + .../lib/Transforms/Vectorize/VPlanConstruction.cpp | 160 ++++ .../llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp | 8 +- .../lib/Transforms/Vectorize/VPlanTransforms.cpp | 8 +- .../lib/Transforms/Vectorize/VPlanTransforms.h | 6 + .../lib/Transforms/Vectorize/VectorCombine.cpp | 39 +- .../llvm/tools/llvm-mc/Disassembler.cpp | 6 +- .../llvm/tools/llvm-objdump/llvm-objdump.cpp | 188 ++-- .../llvm/tools/llvm-readobj/ELFDumper.cpp | 114 ++- contrib/llvm-project/openmp/runtime/src/kmp.h | 23 +- .../openmp/runtime/src/kmp_affinity.cpp | 24 +- .../llvm-project/openmp/runtime/src/kmp_affinity.h | 6 +- .../llvm-project/openmp/runtime/src/kmp_alloc.cpp | 30 +- .../llvm-project/openmp/runtime/src/kmp_dispatch.h | 4 +- .../llvm-project/openmp/runtime/src/kmp_global.cpp | 4 +- .../openmp/runtime/src/kmp_settings.cpp | 20 +- lib/clang/include/VCSVersion.inc | 6 +- lib/clang/include/clang/Basic/Version.inc | 8 +- lib/clang/include/lld/Common/Version.inc | 2 +- lib/clang/include/lldb/Version/Version.inc | 8 +- lib/clang/include/llvm/Config/config.h | 4 +- lib/clang/include/llvm/Config/llvm-config.h | 6 +- lib/clang/include/llvm/Support/VCSRevision.h | 2 +- lib/libc++/Makefile | 2 + lib/libc++/__assertion_handler | 35 +- lib/libc++/libcxx.imp | 1 + lib/libc++/module.modulemap | 4 + lib/libclang_rt/asan/Makefile | 2 + lib/libclang_rt/asan_cxx/Makefile | 3 - lib/libclang_rt/asan_dynamic/Makefile | 2 + lib/libclang_rt/cfi/Makefile | 1 + lib/libclang_rt/cfi_diag/Makefile | 2 + lib/libclang_rt/dd/Makefile | 1 + lib/libclang_rt/include/Makefile | 1 + lib/libclang_rt/msan/Makefile | 2 + lib/libclang_rt/msan_cxx/Makefile | 3 - lib/libclang_rt/safestack/Makefile | 1 + lib/libclang_rt/stats/Makefile | 1 + lib/libclang_rt/tsan/Makefile | 2 + lib/libclang_rt/tsan_cxx/Makefile | 7 - lib/libclang_rt/ubsan_standalone/Makefile | 2 + lib/libomp/kmp_config.h | 2 +- lib/libomp/omp.h | 45 +- tools/build/mk/OptionalObsoleteFiles.inc | 1 + 358 files changed, 6380 insertions(+), 2844 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 5d505bf1bd52..9945872c268c 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -469,6 +469,31 @@ OLD_FILES+=usr/lib/clang/19/share/msan_ignorelist.txt OLD_DIRS+=usr/lib/clang/19/share OLD_DIRS+=usr/lib/clang/19 +# 20260425: new libc++ import which bumps version from 19 to 21 +OLD_FILES+=usr/include/c++/v1/__algorithm/fold.h +OLD_FILES+=usr/include/c++/v1/__atomic/atomic_base.h +OLD_FILES+=usr/include/c++/v1/__atomic/cxx_atomic_impl.h +OLD_FILES+=usr/include/c++/v1/__locale_dir/locale_base_api/bsd_locale_defaults.h +OLD_FILES+=usr/include/c++/v1/__locale_dir/locale_base_api/locale_guard.h +OLD_FILES+=usr/include/c++/v1/__memory/builtin_new_allocator.h +OLD_FILES+=usr/include/c++/v1/__memory/voidify.h +OLD_FILES+=usr/include/c++/v1/__std_clang_module +OLD_FILES+=usr/include/c++/v1/__type_traits/add_const.h +OLD_FILES+=usr/include/c++/v1/__type_traits/add_cv.h +OLD_FILES+=usr/include/c++/v1/__type_traits/add_lvalue_reference.h +OLD_FILES+=usr/include/c++/v1/__type_traits/add_rvalue_reference.h +OLD_FILES+=usr/include/c++/v1/__type_traits/add_volatile.h +OLD_FILES+=usr/include/c++/v1/__type_traits/is_member_function_pointer.h +OLD_FILES+=usr/include/c++/v1/__type_traits/is_member_object_pointer.h +OLD_FILES+=usr/include/c++/v1/__type_traits/is_nothrow_convertible.h +OLD_FILES+=usr/include/c++/v1/__type_traits/is_scoped_enum.h +OLD_FILES+=usr/include/c++/v1/__type_traits/is_signed_integer.h +OLD_FILES+=usr/include/c++/v1/__type_traits/is_unsigned_integer.h +OLD_FILES+=usr/include/c++/v1/__type_traits/noexcept_move_assign_container.h +OLD_FILES+=usr/include/c++/v1/experimental/__config +OLD_FILES+=usr/include/c++/v1/locale.h +OLD_FILES+=usr/include/c++/v1/stdint.h + # 20260503: Kill off MANSUBDIRs OLD_DIRS+=usr/share/man/man4/amd64 OLD_FILES+=usr/share/man/man8/amd64/apm.8.gz diff --git a/contrib/llvm-project/FREEBSD-Xlist b/contrib/llvm-project/FREEBSD-Xlist index 43fa40070f5d..400687d9958e 100644 --- a/contrib/llvm-project/FREEBSD-Xlist +++ b/contrib/llvm-project/FREEBSD-Xlist @@ -1,5 +1,6 @@ .ci/ .clang-format +.clang-format-ignore .clang-tidy .git-blame-ignore-revs .gitattributes @@ -15,11 +16,12 @@ bolt/ clang/.clang-format clang/.clang-tidy clang/.gitignore +clang/AreaTeamMembers.txt clang/CMakeLists.txt -clang/CodeOwners.rst clang/INSTALL.txt +clang/Maintainers.rst clang/NOTES.txt -clang/README.txt +clang/README.md clang/bindings/ clang/cmake/ clang/docs/ @@ -29,9 +31,12 @@ clang/include/clang/AST/CMakeLists.txt clang/include/clang/Basic/CMakeLists.txt clang/include/clang/Basic/Target/ clang/include/clang/Basic/Version.inc.in +clang/include/clang/CIR/.clang-tidy clang/include/clang/CIR/CMakeLists.txt clang/include/clang/CIR/Dialect/CMakeLists.txt clang/include/clang/CIR/Dialect/IR/CMakeLists.txt +clang/include/clang/CIR/FrontendAction/.clang-tidy +clang/include/clang/CIR/Interfaces/CMakeLists.txt clang/include/clang/CMakeLists.txt clang/include/clang/Config/ clang/include/clang/Driver/CMakeLists.txt @@ -42,7 +47,6 @@ clang/include/clang/Serialization/CMakeLists.txt clang/include/clang/StaticAnalyzer/Checkers/CMakeLists.txt clang/include/clang/Tooling/Syntax/CMakeLists.txt clang/lib/APINotes/CMakeLists.txt -clang/lib/ARCMigrate/CMakeLists.txt clang/lib/AST/CMakeLists.txt clang/lib/ASTMatchers/CMakeLists.txt clang/lib/ASTMatchers/Dynamic/CMakeLists.txt @@ -54,9 +58,18 @@ clang/lib/Analysis/plugins/CheckerDependencyHandling/CMakeLists.txt clang/lib/Analysis/plugins/CheckerOptionHandling/CMakeLists.txt clang/lib/Analysis/plugins/SampleAnalyzer/CMakeLists.txt clang/lib/Basic/CMakeLists.txt +clang/lib/CIR/.clang-tidy clang/lib/CIR/CMakeLists.txt +clang/lib/CIR/CodeGen/CMakeLists.txt clang/lib/CIR/Dialect/CMakeLists.txt clang/lib/CIR/Dialect/IR/CMakeLists.txt +clang/lib/CIR/Dialect/OpenACC/CMakeLists.txt +clang/lib/CIR/Dialect/Transforms/CMakeLists.txt +clang/lib/CIR/FrontendAction/.clang-tidy +clang/lib/CIR/FrontendAction/CMakeLists.txt +clang/lib/CIR/Interfaces/CMakeLists.txt +clang/lib/CIR/Lowering/CMakeLists.txt +clang/lib/CIR/Lowering/DirectToLLVM/CMakeLists.txt clang/lib/CMakeLists.txt clang/lib/CodeGen/CMakeLists.txt clang/lib/CodeGen/README.txt @@ -99,11 +112,11 @@ clang/lib/Tooling/Transformer/CMakeLists.txt clang/runtime/ clang/test/ clang/tools/CMakeLists.txt -clang/tools/amdgpu-arch/ clang/tools/apinotes-test/ -clang/tools/arcmt-test/ -clang/tools/c-arcmt-test/ clang/tools/c-index-test/ +clang/tools/cir-lsp-server/ +clang/tools/cir-opt/ +clang/tools/cir-translate/ clang/tools/clang-check/ clang/tools/clang-diff/ clang/tools/clang-extdef-mapping/ @@ -118,7 +131,6 @@ clang/tools/clang-format/clang-format.py clang/tools/clang-format/fuzzer/ clang/tools/clang-format/git-clang-format clang/tools/clang-format/git-clang-format.bat -clang/tools/clang-format-vs/ clang/tools/clang-fuzzer/ clang/tools/clang-import-test/ clang/tools/clang-installapi/ @@ -127,17 +139,17 @@ clang/tools/clang-nvlink-wrapper/ clang/tools/clang-offload-bundler/ clang/tools/clang-offload-packager/ clang/tools/clang-refactor/ -clang/tools/clang-rename/ clang/tools/clang-repl/ clang/tools/clang-scan-deps/CMakeLists.txt clang/tools/clang-shlib/ +clang/tools/clang-sycl-linker/ clang/tools/diag-build/ clang/tools/diagtool/ clang/tools/driver/CMakeLists.txt clang/tools/driver/Info.plist.in clang/tools/include-mapping/ clang/tools/libclang/ -clang/tools/nvptx-arch/ +clang/tools/offload-arch/ clang/tools/scan-build/ clang/tools/scan-build-py/ clang/tools/scan-view/ @@ -160,21 +172,22 @@ clang/utils/bundle_resources.py clang/utils/check_cfc/ clang/utils/clangdiag.py clang/utils/convert_arm_neon.py -clang/utils/creduce-clang-crash.py clang/utils/find-unused-diagnostics.sh clang/utils/hmaptool/ clang/utils/make-ast-dump-check.sh clang/utils/modfuzz.py clang/utils/module-deps-to-rsp.py clang/utils/perf-training/ +clang/utils/reduce-clang-crash.py clang/utils/token-delta.py clang/utils/valgrind/ clang/www/ clang-tools-extra/ cmake/ +compiler-rt/.clang-tidy compiler-rt/.gitignore compiler-rt/CMakeLists.txt -compiler-rt/CODE_OWNERS.TXT +compiler-rt/Maintainers.md compiler-rt/cmake/ compiler-rt/docs/ compiler-rt/include/CMakeLists.txt @@ -233,7 +246,6 @@ compiler-rt/lib/sanitizer_common/scripts/ compiler-rt/lib/sanitizer_common/symbolizer/CMakeLists.txt compiler-rt/lib/sanitizer_common/tests/ compiler-rt/lib/scudo/standalone/CMakeLists.txt -compiler-rt/lib/scudo/standalone/benchmarks/ compiler-rt/lib/scudo/standalone/fuzz/CMakeLists.txt compiler-rt/lib/scudo/standalone/tests/ compiler-rt/lib/scudo/standalone/tools/ @@ -248,6 +260,9 @@ compiler-rt/lib/tsan/go/build.bat compiler-rt/lib/tsan/go/buildgo.sh compiler-rt/lib/tsan/rtl/CMakeLists.txt compiler-rt/lib/tsan/tests/ +compiler-rt/lib/tysan/CMakeLists.txt +compiler-rt/lib/tysan/lit.cfg +compiler-rt/lib/tysan/lit.site.cfg.in compiler-rt/lib/ubsan/CMakeLists.txt compiler-rt/lib/ubsan_minimal/CMakeLists.txt compiler-rt/lib/xray/CMakeLists.txt @@ -259,16 +274,229 @@ compiler-rt/utils/ compiler-rt/www/ cross-project-tests/ flang/ -libc/ +flang-rt/ +libc/.clang-tidy +libc/.gitignore +libc/AOR_v20.02/ +libc/CMakeLists.txt +libc/LICENSE.TXT +libc/Maintainers.rst +libc/README.txt +libc/benchmarks/ +libc/cmake/ +libc/config/ +libc/docs/ +libc/examples/ +libc/fuzzing/ +libc/hdr/CMakeLists.txt +libc/hdr/func/CMakeLists.txt +libc/hdr/types/CMakeLists.txt +libc/include/CMakeLists.txt +libc/include/Uefi.yaml +libc/include/arpa/ +libc/include/assert.h.def +libc/include/assert.yaml +libc/include/complex.h.def +libc/include/complex.yaml +libc/include/ctype.yaml +libc/include/dirent.h.def +libc/include/dirent.yaml +libc/include/dlfcn.h.def +libc/include/dlfcn.yaml +libc/include/elf.h.def +libc/include/elf.yaml +libc/include/endian.h.def +libc/include/endian.yaml +libc/include/errno.h.def +libc/include/errno.yaml +libc/include/fcntl.h.def +libc/include/fcntl.yaml +libc/include/features.h.def +libc/include/features.yaml +libc/include/fenv.yaml +libc/include/float.h.def +libc/include/float.yaml +libc/include/inttypes.h.def +libc/include/inttypes.yaml +libc/include/limits.h.def +libc/include/limits.yaml +libc/include/link.yaml +libc/include/llvm-libc-macros/CMakeLists.txt +libc/include/llvm-libc-macros/baremetal/CMakeLists.txt +libc/include/llvm-libc-macros/gpu/CMakeLists.txt +libc/include/llvm-libc-macros/linux/CMakeLists.txt +libc/include/llvm-libc-macros/windows/CMakeLists.txt +libc/include/llvm-libc-types/CMakeLists.txt +libc/include/locale.h.def +libc/include/locale.yaml +libc/include/malloc.yaml +libc/include/math.h.def +libc/include/math.yaml +libc/include/poll.h.def +libc/include/poll.yaml +libc/include/pthread.h.def +libc/include/pthread.yaml +libc/include/sched.h.def +libc/include/sched.yaml +libc/include/search.h.def +libc/include/search.yaml +libc/include/setjmp.h.def +libc/include/setjmp.yaml +libc/include/signal.h.def +libc/include/signal.yaml +libc/include/spawn.h.def +libc/include/spawn.yaml +libc/include/stdbit.h.def +libc/include/stdbit.yaml +libc/include/stdckdint.h.def +libc/include/stdckdint.yaml +libc/include/stdfix.h.def +libc/include/stdfix.yaml +libc/include/stdint.h.def +libc/include/stdint.yaml +libc/include/stdio.h.def +libc/include/stdio.yaml +libc/include/stdlib-malloc.yaml +libc/include/stdlib.h.def +libc/include/stdlib.yaml +libc/include/string.h.def +libc/include/string.yaml +libc/include/strings.h.def +libc/include/strings.yaml +libc/include/sys/auxv.h.def +libc/include/sys/auxv.yaml +libc/include/sys/epoll.h.def +libc/include/sys/epoll.yaml +libc/include/sys/ioctl.h.def +libc/include/sys/ioctl.yaml +libc/include/sys/mman.h.def +libc/include/sys/mman.yaml +libc/include/sys/prctl.h.def +libc/include/sys/prctl.yaml +libc/include/sys/random.h.def +libc/include/sys/random.yaml +libc/include/sys/resource.h.def +libc/include/sys/resource.yaml +libc/include/sys/select.h.def +libc/include/sys/select.yaml +libc/include/sys/sendfile.h.def +libc/include/sys/sendfile.yaml +libc/include/sys/socket.h.def +libc/include/sys/socket.yaml +libc/include/sys/stat.h.def +libc/include/sys/stat.yaml +libc/include/sys/statvfs.h.def +libc/include/sys/statvfs.yaml +libc/include/sys/syscall.h.def +libc/include/sys/syscall.yaml +libc/include/sys/time.h.def +libc/include/sys/time.yaml +libc/include/sys/types.h.def +libc/include/sys/types.yaml +libc/include/sys/uio.h.def +libc/include/sys/uio.yaml +libc/include/sys/utsname.h.def +libc/include/sys/utsname.yaml +libc/include/sys/wait.h.def +libc/include/sys/wait.yaml +libc/include/sysexits.h.def +libc/include/sysexits.yaml +libc/include/termios.h.def +libc/include/termios.yaml +libc/include/threads.h.def +libc/include/threads.yaml +libc/include/time.h.def +libc/include/time.yaml +libc/include/uchar.h.def +libc/include/uchar.yaml +libc/include/unistd.h.def +libc/include/unistd.yaml +libc/include/wchar.h.def +libc/include/wchar.yaml +libc/lib/ +libc/src/.clang-tidy +libc/src/CMakeLists.txt +libc/src/__support/CMakeLists.txt +libc/src/__support/CPP/.clang-tidy +libc/src/__support/CPP/CMakeLists.txt +libc/src/__support/FPUtil/CMakeLists.txt +libc/src/__support/FPUtil/generic/CMakeLists.txt +libc/src/__support/File/CMakeLists.txt +libc/src/__support/File/linux/CMakeLists.txt +libc/src/__support/GPU/CMakeLists.txt +libc/src/__support/HashTable/CMakeLists.txt +libc/src/__support/OSUtil/CMakeLists.txt +libc/src/__support/OSUtil/baremetal/CMakeLists.txt +libc/src/__support/OSUtil/darwin/CMakeLists.txt +libc/src/__support/OSUtil/darwin/aarch64/CMakeLists.txt +libc/src/__support/OSUtil/gpu/CMakeLists.txt +libc/src/__support/OSUtil/linux/CMakeLists.txt +libc/src/__support/OSUtil/linux/aarch64/CMakeLists.txt +libc/src/__support/OSUtil/linux/arm/CMakeLists.txt +libc/src/__support/OSUtil/linux/i386/CMakeLists.txt +libc/src/__support/OSUtil/linux/riscv/CMakeLists.txt +libc/src/__support/OSUtil/linux/x86_64/CMakeLists.txt +libc/src/__support/OSUtil/uefi/CMakeLists.txt +libc/src/__support/OSUtil/windows/CMakeLists.txt +libc/src/__support/RPC/CMakeLists.txt +libc/src/__support/StringUtil/CMakeLists.txt +libc/src/__support/StringUtil/tables/CMakeLists.txt +libc/src/__support/fixed_point/CMakeLists.txt +libc/src/__support/macros/CMakeLists.txt +libc/src/__support/macros/properties/CMakeLists.txt +libc/src/__support/math/CMakeLists.txt +libc/src/__support/threads/CMakeLists.txt +libc/src/__support/threads/gpu/CMakeLists.txt +libc/src/__support/threads/linux/CMakeLists.txt +libc/src/__support/time/CMakeLists.txt +libc/src/__support/time/gpu/CMakeLists.txt +libc/src/__support/time/linux/CMakeLists.txt +libc/src/__support/time/windows/CMakeLists.txt +libc/src/__support/wchar/CMakeLists.txt +libc/src/arpa/ +libc/src/assert/ +libc/src/compiler/ +libc/src/complex/ +libc/src/ctype/ +libc/src/dirent/ +libc/src/dlfcn/ +libc/src/errno/ +libc/src/fcntl/ +libc/src/fenv/ +libc/src/inttypes/ +libc/src/link/ +libc/src/locale/ +libc/src/math/ +libc/src/poll/ +libc/src/pthread/ +libc/src/sched/ +libc/src/search/ +libc/src/setjmp/ +libc/src/signal/ +libc/src/spawn/ +libc/src/stdbit/ +libc/src/stdckdint/ +libc/src/stdfix/ +libc/src/stdio/ +libc/src/stdlib/ +libc/src/string/ +libc/src/strings/ +libc/src/sys/ +libc/src/termios/ +libc/src/threads/ +libc/src/time/ +libc/src/unistd/ +libc/src/wchar/ +libc/startup/ +libc/test/ +libc/utils/ libclc/ libcxx/.clang-format libcxx/.clang-tidy libcxx/.gitignore libcxx/CMakeLists.txt +libcxx/Maintainers.md libcxx/TODO.TXT -libcxx/appveyor-reqs-install.cmd -libcxx/appveyor.yml -libcxx/benchmarks/ libcxx/cmake/ libcxx/docs/ libcxx/include/CMakeLists.txt @@ -278,6 +506,7 @@ libcxx/lib/ libcxx/modules/CMakeLists.txt libcxx/modules/CMakeLists.txt.in libcxx/modules/README.md +libcxx/src/.clang-tidy libcxx/src/CMakeLists.txt libcxx/src/support/win32/ libcxx/test/ @@ -290,11 +519,14 @@ libunwind/docs/ libunwind/include/CMakeLists.txt libunwind/src/CMakeLists.txt libunwind/test/ +lld/.clang-tidy +lld/.gitignore lld/CMakeLists.txt lld/COFF/CMakeLists.txt lld/Common/CMakeLists.txt lld/ELF/CMakeLists.txt lld/MachO/CMakeLists.txt +lld/Maintainers.md lld/MinGW/ lld/cmake/ lld/docs/CMakeLists.txt @@ -307,7 +539,7 @@ lldb/.clang-format lldb/.clang-tidy lldb/.gitignore lldb/CMakeLists.txt -lldb/CodeOwners.rst +lldb/Maintainers.md lldb/bindings/CMakeLists.txt lldb/bindings/lua/CMakeLists.txt lldb/bindings/python/CMakeLists.txt @@ -315,6 +547,8 @@ lldb/bindings/python/get-python-config.py lldb/cmake/ lldb/docs/.htaccess lldb/docs/CMakeLists.txt +lldb/docs/_lldb/ +lldb/docs/_templates/ lldb/docs/conf.py lldb/docs/doxygen-mainpage.dox lldb/docs/doxygen.cfg.in @@ -344,11 +578,13 @@ lldb/source/Host/macosx/ lldb/source/Host/windows/ lldb/source/Initialization/CMakeLists.txt lldb/source/Interpreter/CMakeLists.txt +lldb/source/Interpreter/Interfaces/CMakeLists.txt lldb/source/Plugins/ABI/AArch64/CMakeLists.txt lldb/source/Plugins/ABI/ARC/CMakeLists.txt lldb/source/Plugins/ABI/ARM/CMakeLists.txt lldb/source/Plugins/ABI/CMakeLists.txt lldb/source/Plugins/ABI/Hexagon/CMakeLists.txt +lldb/source/Plugins/ABI/LoongArch/CMakeLists.txt lldb/source/Plugins/ABI/MSP430/CMakeLists.txt lldb/source/Plugins/ABI/Mips/CMakeLists.txt lldb/source/Plugins/ABI/PowerPC/CMakeLists.txt @@ -418,9 +654,11 @@ lldb/source/Plugins/ObjectFile/Minidump/CMakeLists.txt lldb/source/Plugins/ObjectFile/PDB/CMakeLists.txt lldb/source/Plugins/ObjectFile/PECOFF/ lldb/source/Plugins/ObjectFile/Placeholder/CMakeLists.txt +lldb/source/Plugins/ObjectFile/XCOFF/CMakeLists.txt lldb/source/Plugins/ObjectFile/wasm/CMakeLists.txt lldb/source/Plugins/OperatingSystem/CMakeLists.txt lldb/source/Plugins/OperatingSystem/Python/CMakeLists.txt +lldb/source/Plugins/Platform/AIX/CMakeLists.txt lldb/source/Plugins/Platform/Android/ lldb/source/Plugins/Platform/CMakeLists.txt lldb/source/Plugins/Platform/FreeBSD/CMakeLists.txt @@ -432,6 +670,7 @@ lldb/source/Plugins/Platform/POSIX/CMakeLists.txt lldb/source/Plugins/Platform/QemuUser/CMakeLists.txt lldb/source/Plugins/Platform/Windows/ lldb/source/Plugins/Platform/gdb-server/CMakeLists.txt +lldb/source/Plugins/Process/AIX/CMakeLists.txt lldb/source/Plugins/Process/CMakeLists.txt lldb/source/Plugins/Process/FreeBSD/CMakeLists.txt lldb/source/Plugins/Process/FreeBSDKernel/CMakeLists.txt @@ -446,6 +685,8 @@ lldb/source/Plugins/Process/gdb-remote/CMakeLists.txt lldb/source/Plugins/Process/mach-core/ lldb/source/Plugins/Process/minidump/CMakeLists.txt lldb/source/Plugins/Process/scripted/CMakeLists.txt +lldb/source/Plugins/Protocol/CMakeLists.txt +lldb/source/Plugins/Protocol/MCP/CMakeLists.txt lldb/source/Plugins/REPL/CMakeLists.txt lldb/source/Plugins/REPL/Clang/CMakeLists.txt lldb/source/Plugins/RegisterTypeBuilder/CMakeLists.txt @@ -488,6 +729,7 @@ lldb/source/Plugins/UnwindAssembly/x86/CMakeLists.txt lldb/source/Symbol/CMakeLists.txt lldb/source/Target/CMakeLists.txt lldb/source/Utility/CMakeLists.txt +lldb/source/ValueObject/CMakeLists.txt lldb/source/Version/CMakeLists.txt lldb/test/ lldb/tools/CMakeLists.txt @@ -503,22 +745,20 @@ lldb/tools/lldb-fuzzer/ lldb/tools/lldb-instr/CMakeLists.txt lldb/tools/lldb-server/CMakeLists.txt lldb/tools/lldb-test/ -lldb/tools/lldb-vscode lldb/unittests/ lldb/use_lldb_suite_root.py lldb/utils/CMakeLists.txt lldb/utils/TableGen/CMakeLists.txt lldb/utils/lit-cpuid/ lldb/utils/lldb-dotest/ -lldb/utils/lldb-repro/ lldb/utils/lui/ llvm/.clang-format llvm/.clang-tidy llvm/.gitattributes llvm/.gitignore llvm/CMakeLists.txt -llvm/CODE_OWNERS.TXT llvm/CREDITS.TXT +llvm/Maintainers.md llvm/README.txt llvm/RELEASE_TESTERS.TXT llvm/benchmarks/ @@ -547,6 +787,7 @@ llvm/lib/Bitcode/Reader/CMakeLists.txt llvm/lib/Bitcode/Writer/CMakeLists.txt llvm/lib/Bitstream/CMakeLists.txt llvm/lib/Bitstream/Reader/CMakeLists.txt +llvm/lib/CGData/CMakeLists.txt llvm/lib/CMakeLists.txt llvm/lib/CodeGen/AsmPrinter/CMakeLists.txt llvm/lib/CodeGen/CMakeLists.txt @@ -554,8 +795,8 @@ llvm/lib/CodeGen/GlobalISel/CMakeLists.txt llvm/lib/CodeGen/MIRParser/CMakeLists.txt llvm/lib/CodeGen/README.txt llvm/lib/CodeGen/SelectionDAG/CMakeLists.txt -llvm/lib/CodeGenData/CMakeLists.txt llvm/lib/CodeGenTypes/CMakeLists.txt +llvm/lib/DWARFCFIChecker/CMakeLists.txt llvm/lib/DWARFLinker/CMakeLists.txt llvm/lib/DWARFLinker/Classic/CMakeLists.txt llvm/lib/DWARFLinker/Parallel/CMakeLists.txt @@ -564,6 +805,7 @@ llvm/lib/DebugInfo/BTF/CMakeLists.txt llvm/lib/DebugInfo/CMakeLists.txt llvm/lib/DebugInfo/CodeView/CMakeLists.txt llvm/lib/DebugInfo/DWARF/CMakeLists.txt +llvm/lib/DebugInfo/DWARF/LowLevel/CMakeLists.txt llvm/lib/DebugInfo/GSYM/CMakeLists.txt llvm/lib/DebugInfo/LogicalView/CMakeLists.txt llvm/lib/DebugInfo/MSF/CMakeLists.txt @@ -586,7 +828,9 @@ llvm/lib/ExecutionEngine/PerfJITEvents/CMakeLists.txt llvm/lib/ExecutionEngine/RuntimeDyld/CMakeLists.txt llvm/lib/Extensions/ llvm/lib/FileCheck/CMakeLists.txt +llvm/lib/Frontend/Atomic/CMakeLists.txt llvm/lib/Frontend/CMakeLists.txt +llvm/lib/Frontend/Directive/CMakeLists.txt llvm/lib/Frontend/Driver/CMakeLists.txt llvm/lib/Frontend/HLSL/CMakeLists.txt llvm/lib/Frontend/Offloading/CMakeLists.txt @@ -625,7 +869,6 @@ llvm/lib/Target/AArch64/Disassembler/CMakeLists.txt llvm/lib/Target/AArch64/MCTargetDesc/CMakeLists.txt llvm/lib/Target/AArch64/TargetInfo/CMakeLists.txt llvm/lib/Target/AArch64/Utils/CMakeLists.txt -llvm/lib/Target/AArch64/peephole-sxtw.mir llvm/lib/Target/AMDGPU/AsmParser/CMakeLists.txt llvm/lib/Target/AMDGPU/CMakeLists.txt llvm/lib/Target/AMDGPU/Disassembler/CMakeLists.txt @@ -762,6 +1005,7 @@ llvm/lib/Target/Xtensa/Disassembler/CMakeLists.txt llvm/lib/Target/Xtensa/MCTargetDesc/CMakeLists.txt llvm/lib/Target/Xtensa/TargetInfo/CMakeLists.txt llvm/lib/TargetParser/CMakeLists.txt +llvm/lib/Telemetry/CMakeLists.txt llvm/lib/Testing/Annotations/CMakeLists.txt llvm/lib/Testing/CMakeLists.txt llvm/lib/Testing/Support/CMakeLists.txt @@ -805,8 +1049,10 @@ llvm/tools/llvm-bcanalyzer/CMakeLists.txt llvm/tools/llvm-c-test/ llvm/tools/llvm-cat/ llvm/tools/llvm-cfi-verify/ +llvm/tools/llvm-cgdata/ llvm/tools/llvm-config/ llvm/tools/llvm-cov/CMakeLists.txt +llvm/tools/llvm-ctxprof-util/ llvm/tools/llvm-cvtres/ llvm/tools/llvm-cxxdump/CMakeLists.txt llvm/tools/llvm-cxxfilt/CMakeLists.txt @@ -826,6 +1072,7 @@ llvm/tools/llvm-dwarfutil/CMakeLists.txt llvm/tools/llvm-dwp/CMakeLists.txt llvm/tools/llvm-exegesis/ llvm/tools/llvm-extract/CMakeLists.txt +llvm/tools/llvm-gpu-loader/ *** 17222 LINES SKIPPED *** From nobody Fri May 29 23:01:47 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRzPm1r9gz6gF3h for ; Fri, 29 May 2026 23:01: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRzPm07qMz3BnS for ; Fri, 29 May 2026 23:01:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095708; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hcP+CvDbGGibbQFnG8o+OuM9BOs2Sh8wV/LRDHVo4wg=; b=yXRhcF1gLfchJjatiyDMdY8i+MeMOyDMJ0Qbxm/dWH6AzHBjaEe4a+GmxNzc1AsOZkK2HG E7o3QfymFIbXCDuyPSej0rVqGvK4yqE0GbtcvxL8iKlLftohGAYWIn+HfV4HnbHTFZMjqL pSoqJfzmvhxSlFKQAlxvLu4Pm50vnHLthrXwlEj5WSXi0JPFMZmbJys5iH/IfGSkjs9I97 Iu1SW53Vh9AiDixHlmQmfh8E3dpYR91s8Ut/4lz4I3Cw+jyD3RGvqavNHmsihNH+Nm4c39 IjmRfLweOkW5U4GZIILymHymD83fx4FbpL15oX3Qr6PaUuVAP5FCIuTmpeT9JA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780095708; a=rsa-sha256; cv=none; b=vzWkcIfl6Ha4rgJeVzUOL03/tZF2nF26rIPlSj6VNauGC6XB4Fhiu6LAReOtmLgdKnNoNE +tat+e2I8p/hhUL9y+mOvy2Ag61F2IZUN+dA7ed0RxJtmpJlPJmF+7RfLSUNSUjcORyk04 rusTYCiXCbOq45+KYi7c5qIM1M7CayjeFE61YJW/tegCSsqgBE0qw5M4/cDTHR39cBi2E8 LJn39wIHGJ1OchulRfUiV1/N6JDjmz3GV32mmyxUOrnZnJZSIwBHFgcUcn0A3xidGb8lG4 3PxxKcVI1ti/KJVuzl+tsO1AfNdz82xkbmNiV44dNTY47nv46VTU5uc1xu5JYw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095708; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hcP+CvDbGGibbQFnG8o+OuM9BOs2Sh8wV/LRDHVo4wg=; b=mxNbiiIBdQzTqAJxaxYkhDxCZvtEibEM629TB+DKTaBOKJ9GppnRHgmieDSTXiYJ7GIWtu xKAsGgsHVUk4E7pPmZsO9HIvS1Ij4c9jHSqFWky7/k3iTqqDqhD8fcu1V8riwQqlG9T+R4 rMCLj9D+tha0dbKCQZymViktKM5eq1otzy3i9Dbm/rbcg+zX8iqF/Bu5j+KJOs/JztronB f7M48U2XkS26Eji5WN7Yt3CfOY09mAVh176FKgr2Ksaj2uWsQVT7VhFqSmRCqSQIj8hb2z /Y1d/ol0jpfqgCNvNTj+GaeX7jeMfBtB6SAt9s9pQtiqbXOzqPR2+yiqta005Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRzPl6cDnztS3 for ; Fri, 29 May 2026 23:01:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4275f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 23:01:47 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: d08fb64ae215 - stable/15 - Partially revert libc++ commit aa7f377c965c, restoring stdint.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: d08fb64ae2157d3bc65777589728e880e6409d72 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 23:01:47 +0000 Message-Id: <6a1a1adb.4275f.61ddd9f6@gitrepo.freebsd.org> The branch stable/15 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=d08fb64ae2157d3bc65777589728e880e6409d72 commit d08fb64ae2157d3bc65777589728e880e6409d72 Author: Dimitry Andric AuthorDate: 2025-12-30 19:49:35 +0000 Commit: Dimitry Andric CommitDate: 2026-05-29 22:57:31 +0000 Partially revert libc++ commit aa7f377c965c, restoring stdint.h This partially reverts upstream libc++ commit aa7f377c965c: [libc++] Remove libc++'s own stdint.h and locale.h (#107436) These headers are not doing anything beyond the system or compiler provided equivalent headers, so there's no real reason to keep them around. Reducing the number of C headers we provide in libc++ simplifies our header layering and reduces the potential for confusion when headers are layered incorrectly. The problem is that libc++'s own `stdint.h` _does_ do something: it defines `__STDC_LIMIT_MACROS` and `__STDC_CONSTANT_MACROS` before including the system `stdint.h`, causing the latter to expose macros like `SIZE_MAX`, `UINT64_C`, and others. If the `__STDC_LIMIT_MACROS` and `__STDC_CONSTANT_MACROS` macros are not exposed, C++ programs compiled for standards before C++11 can fail with errors due to those macros not being available. PR: 292067 MFC after: 1 month (cherry picked from commit 00bee6fcd77f7812e967f85d1cacbc349ff312b3) --- ObsoleteFiles.inc | 1 - contrib/llvm-project/libcxx/include/cstdint | 8 ++ contrib/llvm-project/libcxx/include/stdint.h | 127 +++++++++++++++++++++++++++ lib/libc++/Makefile | 1 + lib/libc++/module.modulemap | 4 + 5 files changed, 140 insertions(+), 1 deletion(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 9945872c268c..df1a8f07050f 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -492,7 +492,6 @@ OLD_FILES+=usr/include/c++/v1/__type_traits/is_unsigned_integer.h OLD_FILES+=usr/include/c++/v1/__type_traits/noexcept_move_assign_container.h OLD_FILES+=usr/include/c++/v1/experimental/__config OLD_FILES+=usr/include/c++/v1/locale.h -OLD_FILES+=usr/include/c++/v1/stdint.h # 20260503: Kill off MANSUBDIRs OLD_DIRS+=usr/share/man/man4/amd64 diff --git a/contrib/llvm-project/libcxx/include/cstdint b/contrib/llvm-project/libcxx/include/cstdint index 11839eeb071e..7ae82f656fc9 100644 --- a/contrib/llvm-project/libcxx/include/cstdint +++ b/contrib/llvm-project/libcxx/include/cstdint @@ -149,6 +149,14 @@ Types: # include # endif +# ifndef _LIBCPP_STDINT_H +# error tried including but didn't find libc++'s header. \ + This usually means that your header search paths are not configured properly. \ + The header search paths should contain the C++ Standard Library headers before \ + any C Standard Library, and you are probably using compiler flags that make that \ + not be the case. +# endif + # if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header # endif diff --git a/contrib/llvm-project/libcxx/include/stdint.h b/contrib/llvm-project/libcxx/include/stdint.h new file mode 100644 index 000000000000..35e5b8cbdad2 --- /dev/null +++ b/contrib/llvm-project/libcxx/include/stdint.h @@ -0,0 +1,127 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCPP_STDINT_H +// AIX system headers need stdint.h to be re-enterable while _STD_TYPES_T +// is defined until an inclusion of it without _STD_TYPES_T occurs, in which +// case the header guard macro is defined. +#if !defined(_AIX) || !defined(_STD_TYPES_T) +# define _LIBCPP_STDINT_H +#endif // _STD_TYPES_T + +/* + stdint.h synopsis + +Macros: + + INT8_MIN + INT16_MIN + INT32_MIN + INT64_MIN + + INT8_MAX + INT16_MAX + INT32_MAX + INT64_MAX + + UINT8_MAX + UINT16_MAX + UINT32_MAX + UINT64_MAX + + INT_LEAST8_MIN + INT_LEAST16_MIN + INT_LEAST32_MIN + INT_LEAST64_MIN + + INT_LEAST8_MAX + INT_LEAST16_MAX + INT_LEAST32_MAX + INT_LEAST64_MAX + + UINT_LEAST8_MAX + UINT_LEAST16_MAX + UINT_LEAST32_MAX + UINT_LEAST64_MAX + + INT_FAST8_MIN + INT_FAST16_MIN + INT_FAST32_MIN + INT_FAST64_MIN + + INT_FAST8_MAX + INT_FAST16_MAX + INT_FAST32_MAX + INT_FAST64_MAX + + UINT_FAST8_MAX + UINT_FAST16_MAX + UINT_FAST32_MAX + UINT_FAST64_MAX + + INTPTR_MIN + INTPTR_MAX + UINTPTR_MAX + + INTMAX_MIN + INTMAX_MAX + + UINTMAX_MAX + + PTRDIFF_MIN + PTRDIFF_MAX + + SIG_ATOMIC_MIN + SIG_ATOMIC_MAX + + SIZE_MAX + + WCHAR_MIN + WCHAR_MAX + + WINT_MIN + WINT_MAX + + INT8_C(value) + INT16_C(value) + INT32_C(value) + INT64_C(value) + + UINT8_C(value) + UINT16_C(value) + UINT32_C(value) + UINT64_C(value) + + INTMAX_C(value) + UINTMAX_C(value) + +*/ + +#include <__config> + +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +# pragma GCC system_header +#endif + +/* C99 stdlib (e.g. glibc < 2.18) does not provide macros needed + for C++11 unless __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS + are defined +*/ +#if defined(__cplusplus) && !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS +#endif +#if defined(__cplusplus) && !defined(__STDC_CONSTANT_MACROS) +# define __STDC_CONSTANT_MACROS +#endif + +#if __has_include_next() +# include_next +#endif + +#endif // _LIBCPP_STDINT_H diff --git a/lib/libc++/Makefile b/lib/libc++/Makefile index 4e487f0e8457..03b04afee7cc 100644 --- a/lib/libc++/Makefile +++ b/lib/libc++/Makefile @@ -232,6 +232,7 @@ STD_HEADERS+= stdatomic.h STD_HEADERS+= stdbool.h STD_HEADERS+= stddef.h STD_HEADERS+= stdexcept +STD_HEADERS+= stdint.h STD_HEADERS+= stdio.h STD_HEADERS+= stdlib.h STD_HEADERS+= stop_token diff --git a/lib/libc++/module.modulemap b/lib/libc++/module.modulemap index a6e6059ab60e..90d61bf5f44a 100644 --- a/lib/libc++/module.modulemap +++ b/lib/libc++/module.modulemap @@ -2433,6 +2433,10 @@ module std_stddef_h [system] { // supports being included multiple times with different pre-defined macros textual header "stddef.h" } +module std_stdint_h [system] { + // supports being included multiple times with different pre-defined macros + textual header "stdint.h" +} module std_stdio_h [system] { // supports being included multiple times with different pre-defined macros textual header "stdio.h" From nobody Fri May 29 23:01:49 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRzPn5m2rz6gF3l for ; Fri, 29 May 2026 23:01: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRzPn0tV6z3Bnf for ; Fri, 29 May 2026 23:01:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095709; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dAFMz7XjHWUNt+LNtywaXRBWZJmHDcwbind0WV8VCdc=; b=pG9BZWoLPzBgH9Bi/m3zkgMerdGlab0mwQtt0KchdqGPukFA46K89zhjQEyI1rG92s2LTv fcTZecVpeuJ7s/3g1rbQkYHgghuHQduQBCZC5sSZJYv1+1MjLr9DAWSEivuHw0Gm0zAV1i 9jvhWTNYK5CGOOiowmjmqx/6i8zSpJ2drjQJhJ61DswLFHUOkJYdA5qmLxknTm3rTuZvA3 VX8WKbegIenj03mEO5HUQCM3761OADbgexmP08xdAaHCcynlhhD/3bih7DA95c+3JBl4rX pbJxDP1UOH+C4pxvi8/RN2DYGob+/7FKxDKhmMjpc7BYiU88AQNkxe89grkK6g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780095709; a=rsa-sha256; cv=none; b=eAJdx4PeYjNkl1Gpg17ibqAj5R6XDcP+FI5dmh+4SXajnDM1+BDZijlJSsMg9U2zQooPOL 6WexikQ8HCebUZx8qf/X0jfA7Jhlmm2M49vJAc83/S943qiN3iGhcua4XcloEAppnnLVqt LKKHJbj+tT6QyeTaeR4ZhR3HBPgIy2/S09G35+8Fb7r49uRu3KcctQCkc5l54qM6bYgUeI 07P05+o0saIsqi7BCjuMRXJDWr9j2EYvZYcl6Z+PS3eTqkRv9NEF9gRG+3YghcENe3Fo5G qv++AsUt2rtkgF2KJRU3wLjGD5DLW4iBd2chPPJPMzF6Zhgr4ZICYX3PsVOdYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095709; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dAFMz7XjHWUNt+LNtywaXRBWZJmHDcwbind0WV8VCdc=; b=XZbTkUCXDfcw+UJ9J5BF2725WzfZrbUte++Yd8pFYALxXmBKI5MngTb1J+JP+ei8NZh7y9 zbZwxYv2DHWFd2FJEPg/0qXvsvB9rCThAvkwWMVHXzJoo8/5ZOiFUuJthf1uDzPVgZbsCo RyuFQZDZLrW8cYn+HiF53vudK9JmgFtsK5bWjoAjjaNcxn8GigJV8y7+RuG8KSi07eGeJy O4oqnf4yJKMOCKq+OfpmdvhniIIC8HEDeQCgX1KBRICpHW1sga+QKMYrOTYO+s7dx0XJ8q vXMQdB1a8c2i/VEYzqDa2PV6c28VPLrneMIPocPvt5GnWpddgfBOtId0QYanZg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRzPn0L82ztXh for ; Fri, 29 May 2026 23:01:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 418d2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 23:01:49 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: c1db7ad65d70 - stable/15 - libcxx-compat: revert llvmorg-21-init-19251-g0c3a2faa8505: List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: c1db7ad65d704e4ae81bbfe7bdaf049120d324a2 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 23:01:49 +0000 Message-Id: <6a1a1add.418d2.45939a0b@gitrepo.freebsd.org> The branch stable/15 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=c1db7ad65d704e4ae81bbfe7bdaf049120d324a2 commit c1db7ad65d704e4ae81bbfe7bdaf049120d324a2 Author: Dimitry Andric AuthorDate: 2026-01-02 18:40:05 +0000 Commit: Dimitry Andric CommitDate: 2026-05-29 22:57:31 +0000 libcxx-compat: revert llvmorg-21-init-19251-g0c3a2faa8505: [libc++] Simplify the implementation of __libcpp_{,de}allocate (#147989) GCC 15 also supports `__buitin_operator_{new,delete}` now, so the `#else` cases are dead code. This patch inlines the calls to the wrapper functions and simplifies some surrounding code. This is part of making libc++ 21 build with GCC 14. PR: 292067 MFC after: 1 month (cherry picked from commit ad1f6ee5d7230a63c216cd9ad3b89d5b7d1c4a3a) --- .../llvm-project/libcxx/include/__new/allocate.h | 71 ++++++++++++++++------ 1 file changed, 51 insertions(+), 20 deletions(-) diff --git a/contrib/llvm-project/libcxx/include/__new/allocate.h b/contrib/llvm-project/libcxx/include/__new/allocate.h index 9bfe19aedb79..738fa62af4d6 100644 --- a/contrib/llvm-project/libcxx/include/__new/allocate.h +++ b/contrib/llvm-project/libcxx/include/__new/allocate.h @@ -31,16 +31,37 @@ _LIBCPP_CONSTEXPR inline _LIBCPP_HIDE_FROM_ABI bool __is_overaligned_for_new(siz #endif } +template +_LIBCPP_HIDE_FROM_ABI void* __libcpp_operator_new(_Args... __args) { +#if __has_builtin(__builtin_operator_new) && __has_builtin(__builtin_operator_delete) + return __builtin_operator_new(__args...); +#else + return ::operator new(__args...); +#endif +} + +template +_LIBCPP_HIDE_FROM_ABI void __libcpp_operator_delete(_Args... __args) _NOEXCEPT { +#if __has_builtin(__builtin_operator_new) && __has_builtin(__builtin_operator_delete) + __builtin_operator_delete(__args...); +#else + ::operator delete(__args...); +#endif +} + template inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_NO_CFI _Tp* -__libcpp_allocate(__element_count __n, [[__maybe_unused__]] size_t __align = _LIBCPP_ALIGNOF(_Tp)) { +__libcpp_allocate(__element_count __n, size_t __align = _LIBCPP_ALIGNOF(_Tp)) { size_t __size = static_cast(__n) * sizeof(_Tp); #if _LIBCPP_HAS_ALIGNED_ALLOCATION - if (__is_overaligned_for_new(__align)) - return static_cast<_Tp*>(__builtin_operator_new(__size, static_cast(__align))); + if (__is_overaligned_for_new(__align)) { + const align_val_t __align_val = static_cast(__align); + return static_cast<_Tp*>(std::__libcpp_operator_new(__size, __align_val)); + } #endif - return static_cast<_Tp*>(__builtin_operator_new(__size)); + (void)__align; + return static_cast<_Tp*>(std::__libcpp_operator_new(__size)); } #if _LIBCPP_HAS_SIZED_DEALLOCATION @@ -50,29 +71,39 @@ __libcpp_allocate(__element_count __n, [[__maybe_unused__]] size_t __align = _LI #endif template -inline _LIBCPP_HIDE_FROM_ABI void -__libcpp_deallocate(__type_identity_t<_Tp>* __ptr, - __element_count __n, - [[__maybe_unused__]] size_t __align = _LIBCPP_ALIGNOF(_Tp)) _NOEXCEPT { - [[__maybe_unused__]] size_t __size = static_cast(__n) * sizeof(_Tp); -#if _LIBCPP_HAS_ALIGNED_ALLOCATION - if (__is_overaligned_for_new(__align)) - return __builtin_operator_delete( - __ptr _LIBCPP_ONLY_IF_SIZED_DEALLOCATION(, __size), static_cast(__align)); +inline _LIBCPP_HIDE_FROM_ABI void __libcpp_deallocate( + __type_identity_t<_Tp>* __ptr, __element_count __n, size_t __align = _LIBCPP_ALIGNOF(_Tp)) _NOEXCEPT { + size_t __size = static_cast(__n) * sizeof(_Tp); + (void)__size; +#if !_LIBCPP_HAS_ALIGNED_ALLOCATION + (void)__align; + return std::__libcpp_operator_delete(__ptr _LIBCPP_ONLY_IF_SIZED_DEALLOCATION(, __size)); +#else + if (__is_overaligned_for_new(__align)) { + const align_val_t __align_val = static_cast(__align); + return std::__libcpp_operator_delete(__ptr _LIBCPP_ONLY_IF_SIZED_DEALLOCATION(, __size), __align_val); + } else { + return std::__libcpp_operator_delete(__ptr _LIBCPP_ONLY_IF_SIZED_DEALLOCATION(, __size)); + } #endif - return __builtin_operator_delete(__ptr _LIBCPP_ONLY_IF_SIZED_DEALLOCATION(, __size)); } #undef _LIBCPP_ONLY_IF_SIZED_DEALLOCATION template -inline _LIBCPP_HIDE_FROM_ABI void __libcpp_deallocate_unsized( - __type_identity_t<_Tp>* __ptr, [[__maybe_unused__]] size_t __align = _LIBCPP_ALIGNOF(_Tp)) _NOEXCEPT { -#if _LIBCPP_HAS_ALIGNED_ALLOCATION - if (__is_overaligned_for_new(__align)) - return __builtin_operator_delete(__ptr, static_cast(__align)); +inline _LIBCPP_HIDE_FROM_ABI void +__libcpp_deallocate_unsized(__type_identity_t<_Tp>* __ptr, size_t __align = _LIBCPP_ALIGNOF(_Tp)) _NOEXCEPT { +#if !_LIBCPP_HAS_ALIGNED_ALLOCATION + (void)__align; + return std::__libcpp_operator_delete(__ptr); +#else + if (__is_overaligned_for_new(__align)) { + const align_val_t __align_val = static_cast(__align); + return std::__libcpp_operator_delete(__ptr, __align_val); + } else { + return std::__libcpp_operator_delete(__ptr); + } #endif - return __builtin_operator_delete(__ptr); } _LIBCPP_END_NAMESPACE_STD From nobody Fri May 29 23:01:51 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRzPr11vzz6gDvh for ; Fri, 29 May 2026 23:01: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRzPq2KlRz3BtX for ; Fri, 29 May 2026 23:01:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095711; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y/FXsiiCCzn6bvbBMcYHokC6k37lmTpWwxccPy+N4CI=; b=VFI54qq8oYh2KT5RTY1DbT2b6jrlRM0GCAnl03O6NB3LNDb9Y0Pxd5qVDVxbfgjYDWP+LP snBfd7v8MJHLfuV1YzWFC+F35S7wogfhBMZsVLnpTAS3E7RvWJ10v6Py7G724jYrd1blws hZOVjTO7T+7gyJmrclmgqrM8l0/RXgMAmH4A33bSwsgMJXxqVvlinO/z7wweJTfYQw7dnR iqAwW9v68Q5RVqHaSm5tlhMxJj18w2CG/+PBTLokmLJuW/zPE113oEctbyXyXQCa2unRWO KRwSTDPQUcq2wBOpTHmfp5ZtOY77Pf5j/HR7nmBkcPYwRwXm1hTaf/Kmj8+2bQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780095711; a=rsa-sha256; cv=none; b=cwu+CsMlr+keG91MobtiNPqaFwU9sxdrjv3DD37obzihoxKG9VqUiB9rRUo7TEjBOtLBlD 3evm5Q8G2kW+5ZRHBVpJjwGBQTSYAhrKoS7bbDBqZCI5RvT+G4+xrft+MaHOO2092bYS1W tyiJXicmFb4WMWjz5R6GYBwamu7cDf6Ol3ZC/nzenmaXIoK/Ps7p44qcZCVFc72tbXacmH EXQNkInMNEHgDr28rCAQvTVtfkw8Svs93Nyzvm75CyIyOBUShxSnifGTIq4NiBV6xbjkbM o88G+WnpO6wiJoHaFVFMhkOdkCaqWIuc77mV2By2I6u6aKdo1QNZthKVbJMR5g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095711; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y/FXsiiCCzn6bvbBMcYHokC6k37lmTpWwxccPy+N4CI=; b=rAH9r126vIbAwe563yPX6h6l3xpXnpWznMzHwGOKUkF8SrsbzX9imlZkVlGxLCyXNoXFPI AzZkgyQAMS2GArI7rxNylzRvh1Cdc0fPxoz+FeUAYr43Ir1OiJKq16VGJ8+D9kVS3Tq2nC R/5pYLgl7CxsA5NghoekyhJu/fqZjvL7tJ2lVKfBLEQHbVPyjIHy6nB5nO0gQC2bjcGxOv G2H405xViuC7L4SebjVYmyIkf1OtdleNMizqmJ9wqMjAH++qncp1U58rfUuofHxkeHePM/ wHoO04G5Dgr836DGgmZfQR+ln3BHAkvuXzZu8NYnPV6AiDDhDParKYFyLy1PmQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRzPq1dXbztV6 for ; Fri, 29 May 2026 23:01:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 41333 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 23:01:51 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 6960284840f8 - stable/15 - llvm-libc-macros: work around gcc defining LDBL_MANT_DIG as 53 on i386 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 6960284840f8178cb86e359da3b2d4cbe1581b23 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 23:01:51 +0000 Message-Id: <6a1a1adf.41333.46a039ad@gitrepo.freebsd.org> The branch stable/15 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=6960284840f8178cb86e359da3b2d4cbe1581b23 commit 6960284840f8178cb86e359da3b2d4cbe1581b23 Author: Dimitry Andric AuthorDate: 2026-01-02 20:32:05 +0000 Commit: Dimitry Andric CommitDate: 2026-05-29 22:57:31 +0000 llvm-libc-macros: work around gcc defining LDBL_MANT_DIG as 53 on i386 Otherwise, gcc will not be able to compile parts of libc++ 21 in -m32 mode, resulting in errors similar to: In file included from /usr/src/contrib/llvm-project/libc/shared/str_to_float.h:13, from /usr/src/contrib/llvm-project/libcxx/src/include/from_chars_floating_point.h:14, from /usr/src/contrib/llvm-project/libcxx/src/charconv.cpp:12: /usr/src/contrib/llvm-project/libc/src/__support/str_to_float.h: In function 'void __llvm_libc::internal::set_implicit_bit(__llvm_libc::fputil::FPBits&) [with T = long double]': /usr/src/contrib/llvm-project/libc/src/__support/str_to_float.h:77:10: error: 'struct __llvm_libc::fputil::FPBits' has no member named 'set_implicit_bit' 77 | result.set_implicit_bit(result.get_biased_exponent() != 0); | ^~~~~~~~~~~~~~~~ PR: 292067 MFC after: 1 month (cherry picked from commit 718e5874be0306ea302fd2b8e1d97fc79682abbe) --- contrib/llvm-project/libc/include/llvm-libc-macros/float-macros.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/contrib/llvm-project/libc/include/llvm-libc-macros/float-macros.h b/contrib/llvm-project/libc/include/llvm-libc-macros/float-macros.h index a25ef60a293d..3bf92bc7b6c9 100644 --- a/contrib/llvm-project/libc/include/llvm-libc-macros/float-macros.h +++ b/contrib/llvm-project/libc/include/llvm-libc-macros/float-macros.h @@ -61,6 +61,11 @@ #define DBL_MANT_DIG __DBL_MANT_DIG__ #endif // DBL_MANT_DIG +// Kludge for gcc defining LDBL_MANT_DIG as 53 on i386 +#if defined(LDBL_MANT_DIG) && defined(__GNUC__) && !defined(__clang__) && defined(__i386__) +#undef LDBL_MANT_DIG +#endif + #ifndef LDBL_MANT_DIG #define LDBL_MANT_DIG __LDBL_MANT_DIG__ #endif // LDBL_MANT_DIG From nobody Fri May 29 23:01:52 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRzPr5fmzz6gF3s for ; Fri, 29 May 2026 23:01: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRzPr2xyNz3Bx2 for ; Fri, 29 May 2026 23:01:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095712; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pv3Gi8JRZ8GzWqQKCxrz9r2eHdVLP8Y1ikzLdI1hKNg=; b=AXUN/VwFZj55zeUfzzYMuP39QVOg6yAabRXsgR5FKp2mxFfVU+OMi2PRgy3Miqky09oQWj LOyUS2OuUq1gczjzJrcu5ZYvuLvofs1l/N1XDWSPh0TwtNf74nHq7kAFJm7Ewfu+LTpu7J 5uO288z6bll0M49qH9uYpGMiyNuoGT1Ht457iT3Cy7BuhgYHjk2kFejQEhJnCxmRGndB0+ c7ytDT8Yb01vqDKo/AmGYqhLQ/aIvJDE+YCT9kD8dcaGVzFeFSmTWYyNhqcbVq9ikkbZYJ cxHZ08QQJU+Esd5vHrytfYhUveJDUKQqpRuUZKf3XE0ybe3zWuUM1hRXCCjgPg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780095712; a=rsa-sha256; cv=none; b=E0pcojZu44DiUtCifHt95hihHMxuIDmobDQBzXXB8qR3cwjYh8I4IK9MbJBYC8b8r7gOKa N+u1DodjOAAh8Ts3dyduH4j0MA8YAJ5YdWsxX7SNAFO7VwmKI9+obozEIsom7Z6VxK6hZ5 TEu3u9qe2+v5pUR325eKxXhk+4DobiIYuLO+mb0wmt7VES5LnTDyKX4LMY08o78NLWN5hq 1+nhu9+1PKdfdjdkU1ZQKB/YRuVZgySNKKczwt/Zj4INGhqmrLg6zoDlfIAnjY+YRWuDzP RgPVNMlyK74euJGLVnGM9M6rR8LxhQnSqfTbNfwPR0HKDJYv9wt94W0jFLnnzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095712; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pv3Gi8JRZ8GzWqQKCxrz9r2eHdVLP8Y1ikzLdI1hKNg=; b=BAOaUHuGkb2tLxM7NbeYyxPrW0q102e15U7AW5g2H9HyX5rv5a83Z82hmBfGm8yJHvvp94 +FrrMxfTPoowu3kk/9mymjkIBLSfy+1WAsN4vtHFmSp3y4S2zpUt2lLSJJ/YWbxxRxaFHS NtcIj5xh1+G9I/8BYCVsA1HhHRNnjEAFTXbO4pEwIk3ZKuLcG/b6q86nNJleMbswifWYbt TPC+2KaHREwBIbMP6rs5Nsk7yCYSU0/5A+jEzf0SYU4IIIJqVgtaic6XOmGbtn7iU7nQkP iNoWQXRrvfnbO9zPxWH/wuHuQOPBMIJUr2tE06Ll0w/3CDOuFqreH/3/O0XXfg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRzPr2WvGztZv for ; Fri, 29 May 2026 23:01:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4124c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 23:01:52 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 6cfe00b44e4e - stable/15 - Merge commit 598f21e9fcf7 from llvm git (by zhijian lin): List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 6cfe00b44e4e3f80f532fd6824625d29c24e5473 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 23:01:52 +0000 Message-Id: <6a1a1ae0.4124c.6244f83f@gitrepo.freebsd.org> The branch stable/15 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=6cfe00b44e4e3f80f532fd6824625d29c24e5473 commit 6cfe00b44e4e3f80f532fd6824625d29c24e5473 Author: Dimitry Andric AuthorDate: 2026-01-10 14:45:16 +0000 Commit: Dimitry Andric CommitDate: 2026-05-29 22:57:31 +0000 Merge commit 598f21e9fcf7 from llvm git (by zhijian lin): [PowerPC] need to set CallFrameSize for the pass PPCReduceCRLogicals when insert a new block (#151017) In the [ [CodeGen] Store call frame size in MachineBasicBlock](https://reviews.llvm.org/D156113), it mentions When a basic block has been split in the middle of a call sequence. the call frame size may not be zero, it need to set the setCallFrameSize for the new MachineBasicBlock. but in the function `splitMBB(BlockSplitInfo &BSI)` in the llvm/lib/Target/PowerPC/PPCReduceCRLogicals.cpp , it do not setCallFrameSzie for the new MachineBasicBlock `NewMBB`, we will setCallFrameSzie in the patch. the patch fix the crash mention in https://github.com/llvm/llvm-project/pull/144594#issuecomment-2993736654 This fixes "error in backend: Found 1 machine code errors" while crypto/openssh/packet.c for PowerPC64. PR: 292067 MFC after: 1 month (cherry picked from commit 48c35ae6ebfc6d9a2259979d915fd3bc5d6c01db) --- contrib/llvm-project/llvm/lib/Target/PowerPC/PPCReduceCRLogicals.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCReduceCRLogicals.cpp b/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCReduceCRLogicals.cpp index 0ffd35dfa279..74bce436b53e 100644 --- a/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCReduceCRLogicals.cpp +++ b/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCReduceCRLogicals.cpp @@ -248,6 +248,10 @@ static bool splitMBB(BlockSplitInfo &BSI) { } addIncomingValuesToPHIs(NewBRTarget, ThisMBB, NewMBB, MRI); + // Set the call frame size on ThisMBB to the new basic blocks. + // See https://reviews.llvm.org/D156113. + NewMBB->setCallFrameSize(TII->getCallFrameSizeAt(ThisMBB->back())); + LLVM_DEBUG(dbgs() << "After splitting, ThisMBB:\n"; ThisMBB->dump()); LLVM_DEBUG(dbgs() << "NewMBB:\n"; NewMBB->dump()); LLVM_DEBUG(dbgs() << "New branch-to block:\n"; NewBRTarget->dump()); From nobody Fri May 29 23:01:50 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRzPp5sBvz6gDvg for ; Fri, 29 May 2026 23:01: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRzPp1dHjz3C6W for ; Fri, 29 May 2026 23:01:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095710; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TPqnTJ1/HArvG12UzCKkGm4HENSchQbtedZ+2LA13mY=; b=ECoP9gZEdcrbovojU5Mjm3SlfvtaXyxxY2q8YzLP2GRSDlWALJ5y3OVuAR2CmPizR5hd5Q FNayI2anNXQlARgirNAdWg7JTWfW+4zNnpq2+bSMShSOTESvkSV3kqm76rNsdSxVWd8cnq O2pNUEj6TyxUmvwZORggWSNMFW0oZ1bFl9kmSjdgGUpzDD6ZG8c4ruxTXewvKNU2Ws+oSm YP+AVZK6dyIOZq1pYc2YQurRdFaaIwRmF7mWg3uj11tFF6CTZWUUhYaKFC15Up1qNClDLl EOj7kp2qPFJKnUcV3b6wIVHyc6y5O8QEL8fTsO9T6T0jC54yPP2AZ8gqASqEGw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780095710; a=rsa-sha256; cv=none; b=cuh1XlbQJrIUmwa6e+02mUeG0SzQBPR7+ojgnHt2VTe8BviD1UOX87ZrrHbe7uQVEHPjJU AJWKT0iwOPRATR3XtkOJYsYSbQQoWVjFmSEKXv6GPocj0gh9aFO1Wwds7Qsu71LSOS2wat qSxShJtn74uzltAg53fa3WawwGqdCvD5Hp8Nrw+bkGQL8HnCgwGdHmtJXpnKAYYtditk/Q 9lwbmw7AIAbJh4ZhzpFp4GaFjxi6hWaXtp32bwyApaMAsGVbkG2FMt6Mrei/h2Tw6HIR4s dBh+K3Iq6GQnx2YpZD1+aQze45aGuYXD8O6DiyqyNuM47U9xknl97S99aT84SQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095710; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TPqnTJ1/HArvG12UzCKkGm4HENSchQbtedZ+2LA13mY=; b=HuWkRFTS2jUcLP6xsFi0UtNFdB8PhHt0goe/y816/P9m88MsJOs0IUafNWE2LmT80Tg181 b92TNSjPR4mPqE4d2HJeuIV9RNNzlnMUXmwaOVeb5z+qtN7LlB22KLgew2PEjys8ZNx24z v5jOBLjdyW3A7vp60y9cMopFaOVYY0R9SSr+HK5MSUEqE4755uUC38XSjial+qsNySoPZN bKT5iMOmE2wXMqZj+c94JqXiQ0nvxjNSp3IiUvdvQo9hjlOLKai6cSJCmijhkOQOn/0Sr+ uhn1UAUzB2TFGrJIihgsGAmhDJIXCRnEuBLBq4fUwyxHzNm6V44DmFjABEv4Ag== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRzPp1DbsztD2 for ; Fri, 29 May 2026 23:01:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 42b06 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 23:01:50 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 030fd7fb65c3 - stable/15 - libcxx-compat: revert llvmorg-21-init-17684-gae9990ed9651: List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 030fd7fb65c38d889f1dd6f81cb2971de5a09e5d Auto-Submitted: auto-generated Date: Fri, 29 May 2026 23:01:50 +0000 Message-Id: <6a1a1ade.42b06.836a45@gitrepo.freebsd.org> The branch stable/15 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=030fd7fb65c38d889f1dd6f81cb2971de5a09e5d commit 030fd7fb65c38d889f1dd6f81cb2971de5a09e5d Author: Dimitry Andric AuthorDate: 2026-01-02 20:25:42 +0000 Commit: Dimitry Andric CommitDate: 2026-05-29 22:57:31 +0000 libcxx-compat: revert llvmorg-21-init-17684-gae9990ed9651: [libc++] Remove dead code from (#143854) Since we've upgraded to GCC 15 now, we can remove a bunch of dead code from ``. This is part of making libc++ 21 build with GCC 14. PR: 292067 MFC after: 1 month (cherry picked from commit f7bcd8d8c9336b97569265e5ad36b73b30357beb) --- .../libcxx/include/__type_traits/add_pointer.h | 14 +----- .../libcxx/include/__type_traits/add_reference.h | 55 ++++++++++++++++------ .../libcxx/include/__type_traits/decay.h | 44 ++++++++++++++--- .../has_unique_object_representation.h | 8 +++- .../libcxx/include/__type_traits/is_array.h | 24 +++++++++- .../libcxx/include/__type_traits/is_const.h | 20 +++++++- .../libcxx/include/__type_traits/is_pointer.h | 33 +++++++++++++ .../libcxx/include/__type_traits/is_volatile.h | 20 +++++++- .../include/__type_traits/remove_all_extents.h | 21 +++++++-- .../libcxx/include/__type_traits/remove_extent.h | 21 +++++++-- 10 files changed, 213 insertions(+), 47 deletions(-) diff --git a/contrib/llvm-project/libcxx/include/__type_traits/add_pointer.h b/contrib/llvm-project/libcxx/include/__type_traits/add_pointer.h index f595000520ec..f37f9cf5a93c 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/add_pointer.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/add_pointer.h @@ -22,18 +22,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD #if !defined(_LIBCPP_WORKAROUND_OBJCXX_COMPILER_INTRINSICS) && __has_builtin(__add_pointer) && !defined(_LIBCPP_COMPILER_GCC) -template -struct _LIBCPP_NO_SPECIALIZATIONS add_pointer { - using type _LIBCPP_NODEBUG = __add_pointer(_Tp); -}; - -# ifdef _LIBCPP_COMPILER_GCC -template -using __add_pointer_t _LIBCPP_NODEBUG = typename add_pointer<_Tp>::type; -# else template using __add_pointer_t _LIBCPP_NODEBUG = __add_pointer(_Tp); -# endif #else template || is_void<_Tp>::value> @@ -48,13 +38,13 @@ struct __add_pointer_impl<_Tp, false> { template using __add_pointer_t = typename __add_pointer_impl<_Tp>::type; +#endif // !defined(_LIBCPP_WORKAROUND_OBJCXX_COMPILER_INTRINSICS) && __has_builtin(__add_pointer) + template struct _LIBCPP_NO_SPECIALIZATIONS add_pointer { using type _LIBCPP_NODEBUG = __add_pointer_t<_Tp>; }; -#endif // !defined(_LIBCPP_WORKAROUND_OBJCXX_COMPILER_INTRINSICS) - #if _LIBCPP_STD_VER >= 14 template using add_pointer_t = __add_pointer_t<_Tp>; diff --git a/contrib/llvm-project/libcxx/include/__type_traits/add_reference.h b/contrib/llvm-project/libcxx/include/__type_traits/add_reference.h index c6f5d63d26de..98f26f457daf 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/add_reference.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/add_reference.h @@ -10,6 +10,7 @@ #define _LIBCPP___TYPE_TRAITS_ADD_REFERENCE_H #include <__config> +#include <__type_traits/is_referenceable.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -17,36 +18,62 @@ _LIBCPP_BEGIN_NAMESPACE_STD +#if __has_builtin(__add_lvalue_reference) && !defined(_LIBCPP_COMPILER_GCC) + template -struct _LIBCPP_NO_SPECIALIZATIONS add_lvalue_reference { - using type _LIBCPP_NODEBUG = __add_lvalue_reference(_Tp); +using __add_lvalue_reference_t _LIBCPP_NODEBUG = __add_lvalue_reference(_Tp); + +#else + +template > +struct __add_lvalue_reference_impl { + using type _LIBCPP_NODEBUG = _Tp; +}; +template +struct __add_lvalue_reference_impl<_Tp, true> { + using type _LIBCPP_NODEBUG = _Tp&; }; -#ifdef _LIBCPP_COMPILER_GCC template -using __add_lvalue_reference_t _LIBCPP_NODEBUG = typename add_lvalue_reference<_Tp>::type; -#else +using __add_lvalue_reference_t = typename __add_lvalue_reference_impl<_Tp>::type; + +#endif // __has_builtin(__add_lvalue_reference) + template -using __add_lvalue_reference_t _LIBCPP_NODEBUG = __add_lvalue_reference(_Tp); -#endif +struct _LIBCPP_NO_SPECIALIZATIONS add_lvalue_reference { + using type _LIBCPP_NODEBUG = __add_lvalue_reference_t<_Tp>; +}; #if _LIBCPP_STD_VER >= 14 template using add_lvalue_reference_t = __add_lvalue_reference_t<_Tp>; #endif +#if __has_builtin(__add_rvalue_reference) && !defined(_LIBCPP_COMPILER_GCC) + template -struct _LIBCPP_NO_SPECIALIZATIONS add_rvalue_reference { - using type _LIBCPP_NODEBUG = __add_rvalue_reference(_Tp); +using __add_rvalue_reference_t _LIBCPP_NODEBUG = __add_rvalue_reference(_Tp); + +#else + +template > +struct __add_rvalue_reference_impl { + using type _LIBCPP_NODEBUG = _Tp; +}; +template +struct __add_rvalue_reference_impl<_Tp, true> { + using type _LIBCPP_NODEBUG = _Tp&&; }; -#ifdef _LIBCPP_COMPILER_GCC template -using __add_rvalue_reference_t _LIBCPP_NODEBUG = typename add_rvalue_reference<_Tp>::type; -#else +using __add_rvalue_reference_t = typename __add_rvalue_reference_impl<_Tp>::type; + +#endif // __has_builtin(__add_rvalue_reference) + template -using __add_rvalue_reference_t _LIBCPP_NODEBUG = __add_rvalue_reference(_Tp); -#endif +struct _LIBCPP_NO_SPECIALIZATIONS add_rvalue_reference { + using type _LIBCPP_NODEBUG = __add_rvalue_reference_t<_Tp>; +}; #if _LIBCPP_STD_VER >= 14 template diff --git a/contrib/llvm-project/libcxx/include/__type_traits/decay.h b/contrib/llvm-project/libcxx/include/__type_traits/decay.h index 661fba53dfaa..1e663fdcd0ed 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/decay.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/decay.h @@ -10,6 +10,14 @@ #define _LIBCPP___TYPE_TRAITS_DECAY_H #include <__config> +#include <__type_traits/add_pointer.h> +#include <__type_traits/conditional.h> +#include <__type_traits/is_array.h> +#include <__type_traits/is_function.h> +#include <__type_traits/is_referenceable.h> +#include <__type_traits/remove_cv.h> +#include <__type_traits/remove_extent.h> +#include <__type_traits/remove_reference.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -17,18 +25,42 @@ _LIBCPP_BEGIN_NAMESPACE_STD +#if __has_builtin(__decay) && !defined(_LIBCPP_COMPILER_GCC) +template +using __decay_t _LIBCPP_NODEBUG = __decay(_Tp); + template struct _LIBCPP_NO_SPECIALIZATIONS decay { - using type _LIBCPP_NODEBUG = __decay(_Tp); + using type _LIBCPP_NODEBUG = __decay_t<_Tp>; }; -#ifdef _LIBCPP_COMPILER_GCC -template -using __decay_t _LIBCPP_NODEBUG = typename decay<_Tp>::type; #else +template +struct __decay { + using type _LIBCPP_NODEBUG = __remove_cv_t<_Up>; +}; + +template +struct __decay<_Up, true> { +public: + using type _LIBCPP_NODEBUG = + __conditional_t::value, + __add_pointer_t<__remove_extent_t<_Up> >, + __conditional_t::value, typename add_pointer<_Up>::type, __remove_cv_t<_Up> > >; +}; + template -using __decay_t _LIBCPP_NODEBUG = __decay(_Tp); -#endif +struct decay { +private: + using _Up _LIBCPP_NODEBUG = __libcpp_remove_reference_t<_Tp>; + +public: + using type _LIBCPP_NODEBUG = typename __decay<_Up, __is_referenceable_v<_Up> >::type; +}; + +template +using __decay_t = typename decay<_Tp>::type; +#endif // __has_builtin(__decay) #if _LIBCPP_STD_VER >= 14 template diff --git a/contrib/llvm-project/libcxx/include/__type_traits/has_unique_object_representation.h b/contrib/llvm-project/libcxx/include/__type_traits/has_unique_object_representation.h index af9abfe81d41..ba81be6aa19b 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/has_unique_object_representation.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/has_unique_object_representation.h @@ -11,6 +11,7 @@ #include <__config> #include <__type_traits/integral_constant.h> +#include <__type_traits/remove_all_extents.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -22,7 +23,12 @@ _LIBCPP_BEGIN_NAMESPACE_STD template struct _LIBCPP_NO_SPECIALIZATIONS has_unique_object_representations - : integral_constant {}; + // TODO: We work around a Clang and GCC bug in __has_unique_object_representations by using remove_all_extents + // even though it should not be necessary. This was reported to the compilers: + // - Clang: https://github.com/llvm/llvm-project/issues/95311 + // - GCC: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115476 + // remove_all_extents_t can be removed once all the compilers we support have fixed this bug. + : public integral_constant)> {}; template _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool has_unique_object_representations_v = diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_array.h b/contrib/llvm-project/libcxx/include/__type_traits/is_array.h index e734d1a3043e..1d94370378c6 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_array.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_array.h @@ -10,6 +10,7 @@ #define _LIBCPP___TYPE_TRAITS_IS_ARRAY_H #include <__config> +#include <__cstddef/size_t.h> #include <__type_traits/integral_constant.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) @@ -18,13 +19,32 @@ _LIBCPP_BEGIN_NAMESPACE_STD +#if __has_builtin(__is_array) && \ + (!defined(_LIBCPP_COMPILER_CLANG_BASED) || (defined(_LIBCPP_CLANG_VER) && _LIBCPP_CLANG_VER >= 1900)) + template struct _LIBCPP_NO_SPECIALIZATIONS is_array : _BoolConstant<__is_array(_Tp)> {}; -#if _LIBCPP_STD_VER >= 17 +# if _LIBCPP_STD_VER >= 17 template _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_array_v = __is_array(_Tp); -#endif +# endif + +#else + +template +struct is_array : public false_type {}; +template +struct is_array<_Tp[]> : public true_type {}; +template +struct is_array<_Tp[_Np]> : public true_type {}; + +# if _LIBCPP_STD_VER >= 17 +template +inline constexpr bool is_array_v = is_array<_Tp>::value; +# endif + +#endif // __has_builtin(__is_array) _LIBCPP_END_NAMESPACE_STD diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_const.h b/contrib/llvm-project/libcxx/include/__type_traits/is_const.h index 85cc32bff1ea..4ec354d7f9bf 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_const.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_const.h @@ -18,13 +18,29 @@ _LIBCPP_BEGIN_NAMESPACE_STD +#if __has_builtin(__is_const) + template struct _LIBCPP_NO_SPECIALIZATIONS is_const : _BoolConstant<__is_const(_Tp)> {}; -#if _LIBCPP_STD_VER >= 17 +# if _LIBCPP_STD_VER >= 17 template _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_const_v = __is_const(_Tp); -#endif +# endif + +#else + +template +struct is_const : public false_type {}; +template +struct is_const<_Tp const> : public true_type {}; + +# if _LIBCPP_STD_VER >= 17 +template +inline constexpr bool is_const_v = is_const<_Tp>::value; +# endif + +#endif // __has_builtin(__is_const) _LIBCPP_END_NAMESPACE_STD diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_pointer.h b/contrib/llvm-project/libcxx/include/__type_traits/is_pointer.h index 1c3a93d1256c..3c58656e0e61 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_pointer.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_pointer.h @@ -11,6 +11,7 @@ #include <__config> #include <__type_traits/integral_constant.h> +#include <__type_traits/remove_cv.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -18,6 +19,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD +#if __has_builtin(__is_pointer) + template struct _LIBCPP_NO_SPECIALIZATIONS is_pointer : _BoolConstant<__is_pointer(_Tp)> {}; @@ -26,6 +29,36 @@ template _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_pointer_v = __is_pointer(_Tp); # endif +#else // __has_builtin(__is_pointer) + +template +struct __libcpp_is_pointer : false_type {}; +template +struct __libcpp_is_pointer<_Tp*> : true_type {}; + +template +struct __libcpp_remove_objc_qualifiers { + typedef _Tp type; +}; +# if __has_feature(objc_arc) +// clang-format off +template struct __libcpp_remove_objc_qualifiers<_Tp __strong> { typedef _Tp type; }; +template struct __libcpp_remove_objc_qualifiers<_Tp __weak> { typedef _Tp type; }; +template struct __libcpp_remove_objc_qualifiers<_Tp __autoreleasing> { typedef _Tp type; }; +template struct __libcpp_remove_objc_qualifiers<_Tp __unsafe_unretained> { typedef _Tp type; }; +// clang-format on +# endif + +template +struct is_pointer : __libcpp_is_pointer >::type> {}; + +# if _LIBCPP_STD_VER >= 17 +template +inline constexpr bool is_pointer_v = is_pointer<_Tp>::value; +# endif + +#endif // __has_builtin(__is_pointer) + _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP___TYPE_TRAITS_IS_POINTER_H diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_volatile.h b/contrib/llvm-project/libcxx/include/__type_traits/is_volatile.h index c654ebba9299..22e9c297c800 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_volatile.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_volatile.h @@ -18,13 +18,29 @@ _LIBCPP_BEGIN_NAMESPACE_STD +#if __has_builtin(__is_volatile) + template struct _LIBCPP_NO_SPECIALIZATIONS is_volatile : _BoolConstant<__is_volatile(_Tp)> {}; -#if _LIBCPP_STD_VER >= 17 +# if _LIBCPP_STD_VER >= 17 template _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_volatile_v = __is_volatile(_Tp); -#endif +# endif + +#else + +template +struct is_volatile : public false_type {}; +template +struct is_volatile<_Tp volatile> : public true_type {}; + +# if _LIBCPP_STD_VER >= 17 +template +inline constexpr bool is_volatile_v = is_volatile<_Tp>::value; +# endif + +#endif // __has_builtin(__is_volatile) _LIBCPP_END_NAMESPACE_STD diff --git a/contrib/llvm-project/libcxx/include/__type_traits/remove_all_extents.h b/contrib/llvm-project/libcxx/include/__type_traits/remove_all_extents.h index 2663628ee634..2c7aea2bfd18 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/remove_all_extents.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/remove_all_extents.h @@ -10,6 +10,7 @@ #define _LIBCPP___TYPE_TRAITS_REMOVE_ALL_EXTENTS_H #include <__config> +#include <__cstddef/size_t.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -23,13 +24,25 @@ struct _LIBCPP_NO_SPECIALIZATIONS remove_all_extents { using type _LIBCPP_NODEBUG = __remove_all_extents(_Tp); }; -#ifdef _LIBCPP_COMPILER_GCC template -using __remove_all_extents_t _LIBCPP_NODEBUG = typename remove_all_extents<_Tp>::type; +using __remove_all_extents_t _LIBCPP_NODEBUG = __remove_all_extents(_Tp); #else template -using __remove_all_extents_t _LIBCPP_NODEBUG = __remove_all_extents(_Tp); -#endif +struct remove_all_extents { + typedef _Tp type; +}; +template +struct remove_all_extents<_Tp[]> { + typedef typename remove_all_extents<_Tp>::type type; +}; +template +struct remove_all_extents<_Tp[_Np]> { + typedef typename remove_all_extents<_Tp>::type type; +}; + +template +using __remove_all_extents_t = typename remove_all_extents<_Tp>::type; +#endif // __has_builtin(__remove_all_extents) #if _LIBCPP_STD_VER >= 14 template diff --git a/contrib/llvm-project/libcxx/include/__type_traits/remove_extent.h b/contrib/llvm-project/libcxx/include/__type_traits/remove_extent.h index 4c43c4d85165..7745af14bdb1 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/remove_extent.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/remove_extent.h @@ -10,6 +10,7 @@ #define _LIBCPP___TYPE_TRAITS_REMOVE_EXTENT_H #include <__config> +#include <__cstddef/size_t.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -23,13 +24,25 @@ struct _LIBCPP_NO_SPECIALIZATIONS remove_extent { using type _LIBCPP_NODEBUG = __remove_extent(_Tp); }; -#ifdef _LIBCPP_COMPILER_GCC template -using __remove_extent_t _LIBCPP_NODEBUG = typename remove_extent<_Tp>::type; +using __remove_extent_t _LIBCPP_NODEBUG = __remove_extent(_Tp); #else template -using __remove_extent_t _LIBCPP_NODEBUG = __remove_extent(_Tp); -#endif +struct remove_extent { + typedef _Tp type; +}; +template +struct remove_extent<_Tp[]> { + typedef _Tp type; +}; +template +struct remove_extent<_Tp[_Np]> { + typedef _Tp type; +}; + +template +using __remove_extent_t = typename remove_extent<_Tp>::type; +#endif // __has_builtin(__remove_extent) #if _LIBCPP_STD_VER >= 14 template From nobody Fri May 29 23:01:53 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRzPt1dLYz6gDvp for ; Fri, 29 May 2026 23:01:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRzPs3xWvz3C0W for ; Fri, 29 May 2026 23:01:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095713; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ug/80IiLZ8asDg0hb6/HpSpjVxLaN4ej2m6yZyRYLck=; b=DBWWLlZPtWVg4kMD4StzBfUCrfBmoZQThw1Pbeq5pINL3iPl9RP3ToN8sJotm51bAhJvVk bdVlPRNbY0AxYCYkVyxPnWM+ZIcZIH851ulLIb/dFcQ7yBGNezsU/LiFniDvVY28BXPPhX mLIc41P5fUrBF67LlPzeJRaLykDYJxosUkPPeGMfUHNgJEy6Cfnpn2+R8YbCOZQPIpDhVl DLR0rp/Tmvk/ZdEv3BRP4PUyAVB8s9wriBvfinl27YNd/wHS9AZYwZg8I1FZZZgVe8euGh k+0s6Z8eMOqYAAy7tXCvrkVnE6CTLjgQ/Gofk3U5ujyRPsRsWhuI34QJ1S5aag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780095713; a=rsa-sha256; cv=none; b=GAvmQlE4+/eaMon69ZIECXRmjHfCPK1pSdY/2lm2LyegxwEoWU7HGze4y5P9d8F8HySFVL X1tSpirokvMi76RZNcwIqXPLt0zV2T44eIER8IpmrzqhCz4hN367Km+hqTZ3kfprSJGfqY y/hJy6VQfIIvbeVzcdDeVptTjemGbUs+wONgPvN0mR729hjYqjmXFzrwATNL37lDn1dDEm oN4IYMBfLzvpwNr31tLkaeqz2wrNaqViJRAUaEBhU+pf/fNPdhESLpZWukypy/FevbymRf 38k3RGiXgCw5hZL0UvmatQLPkgK9bnem7k3f3D5qJHKvZtOzzcJ6Dl2Jzad4nA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095713; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ug/80IiLZ8asDg0hb6/HpSpjVxLaN4ej2m6yZyRYLck=; b=YS3r+NO6LFKF3soY2FLYJAtJ42TFCzfazn0zfunNT45oh4v9INg6ZI+WBqv3/Gs9g83eDg v3XKIajkQKu0xXcs7/KnQJMutUEctDnQtxT1hH1fX+5zr5qVKKKyskwHVyF1BKHX+Ds0bI 6t9YahzO37C10USY8TCHGfPkqtfG6yaDbBYq4ZYzCN1Djl4sok1yXKXp/rSk1NoxKOhDrZ 1nLYgogUP0aNEn99VkIsXaJpucacZRKIep+zqZVDUsl2dijgg1D2BnS0VJc0JLcRkp+Hs5 nPBnHAFMc/9C+zDxyiOj8jn2jV3vinKxkBrfem/DSDvMi1MAaPXVbolEKJ0Jng== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRzPs3S6QztdM for ; Fri, 29 May 2026 23:01:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 41337 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 23:01:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: e40599641e0e - stable/15 - Merge llvm-project release/21.x llvmorg-21.1.8-0-g2078da43e25a List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: e40599641e0e6e6f35cb46e5b2f3e17db10e54ed Auto-Submitted: auto-generated Date: Fri, 29 May 2026 23:01:53 +0000 Message-Id: <6a1a1ae1.41337.20c5e72c@gitrepo.freebsd.org> The branch stable/15 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=e40599641e0e6e6f35cb46e5b2f3e17db10e54ed commit e40599641e0e6e6f35cb46e5b2f3e17db10e54ed Author: Dimitry Andric AuthorDate: 2026-01-10 15:55:44 +0000 Commit: Dimitry Andric CommitDate: 2026-05-29 22:57:31 +0000 Merge llvm-project release/21.x llvmorg-21.1.8-0-g2078da43e25a This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project release/21.x llvmorg-21.1.8-0-g2078da43e25a, a.k.a. 21.1.8 release. PR: 292067 MFC after: 1 month (cherry picked from commit 7351d001fc7f5a77a18a102e12a3ca2cbfd6988c) --- .../clang/lib/ExtractAPI/DeclarationFragments.cpp | 5 ++++- .../clang/lib/Format/QualifierAlignmentFixer.cpp | 17 +++++++++++++---- .../clang/lib/Format/UnwrappedLineParser.cpp | 8 ++++---- .../llvm-project/clang/lib/Format/WhitespaceManager.cpp | 5 ++++- .../lib/sanitizer_common/sanitizer_linux.cpp | 12 ++++++++++-- .../sanitizer_common/sanitizer_platform_limits_posix.h | 2 +- contrib/llvm-project/libcxx/include/__config | 2 +- .../llvm-project/llvm/lib/CodeGen/SelectOptimize.cpp | 2 +- .../Target/WebAssembly/WebAssemblyExplicitLocals.cpp | 14 ++++++++++++++ .../lib/Target/WebAssembly/WebAssemblyRegStackify.cpp | 4 ++++ .../Transforms/Instrumentation/RealtimeSanitizer.cpp | 3 +++ lib/clang/include/VCSVersion.inc | 6 +++--- lib/clang/include/clang/Basic/Version.inc | 6 +++--- lib/clang/include/lld/Common/Version.inc | 2 +- lib/clang/include/lldb/Version/Version.inc | 6 +++--- lib/clang/include/llvm/Config/config.h | 4 ++-- lib/clang/include/llvm/Config/llvm-config.h | 4 ++-- lib/clang/include/llvm/Support/VCSRevision.h | 2 +- 18 files changed, 74 insertions(+), 30 deletions(-) diff --git a/contrib/llvm-project/clang/lib/ExtractAPI/DeclarationFragments.cpp b/contrib/llvm-project/clang/lib/ExtractAPI/DeclarationFragments.cpp index 791afc1a9757..00138c14ddcc 100644 --- a/contrib/llvm-project/clang/lib/ExtractAPI/DeclarationFragments.cpp +++ b/contrib/llvm-project/clang/lib/ExtractAPI/DeclarationFragments.cpp @@ -636,7 +636,10 @@ DeclarationFragmentsBuilder::getFragmentsForParam(const ParmVarDecl *Param) { DeclarationFragments::FragmentKind::InternalParam); } else { Fragments.append(std::move(TypeFragments)); - if (!T->isAnyPointerType() && !T->isBlockPointerType()) + // If the type is a type alias, append the space + // even if the underlying type is a pointer type. + if (T->isTypedefNameType() || + (!T->isAnyPointerType() && !T->isBlockPointerType())) Fragments.appendSpace(); Fragments .append(Param->getName(), diff --git a/contrib/llvm-project/clang/lib/Format/QualifierAlignmentFixer.cpp b/contrib/llvm-project/clang/lib/Format/QualifierAlignmentFixer.cpp index 441a37a4902b..cc59dbd13621 100644 --- a/contrib/llvm-project/clang/lib/Format/QualifierAlignmentFixer.cpp +++ b/contrib/llvm-project/clang/lib/Format/QualifierAlignmentFixer.cpp @@ -182,8 +182,11 @@ const FormatToken *LeftRightQualifierAlignmentFixer::analyzeRight( // We only need to think about streams that begin with a qualifier. if (Tok->isNot(QualifierType)) return Tok; + + const auto *Next = Tok->getNextNonComment(); + // Don't concern yourself if nothing follows the qualifier. - if (!Tok->Next) + if (!Next) return Tok; // Skip qualifiers to the left to find what preceeds the qualifiers. @@ -247,9 +250,15 @@ const FormatToken *LeftRightQualifierAlignmentFixer::analyzeRight( }(); // Find the last qualifier to the right. - const FormatToken *LastQual = Tok; - while (isQualifier(LastQual->getNextNonComment())) - LastQual = LastQual->getNextNonComment(); + const auto *LastQual = Tok; + for (; isQualifier(Next); Next = Next->getNextNonComment()) + LastQual = Next; + + if (!LastQual || !Next || + (LastQual->isOneOf(tok::kw_const, tok::kw_volatile) && + Next->isOneOf(Keywords.kw_override, Keywords.kw_final))) { + return Tok; + } // If this qualifier is to the right of a type or pointer do a partial sort // and return. diff --git a/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp b/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp index 934605733542..3df071a197c6 100644 --- a/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp +++ b/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp @@ -2385,17 +2385,17 @@ bool UnwrappedLineParser::tryToParseLambdaIntroducer() { const FormatToken *LeftSquare = FormatTok; nextToken(); if (Previous) { + const auto *PrevPrev = Previous->getPreviousNonComment(); + if (Previous->is(tok::star) && PrevPrev && PrevPrev->isTypeName(LangOpts)) + return false; if (Previous->closesScope()) { // Not a potential C-style cast. if (Previous->isNot(tok::r_paren)) return false; - const auto *BeforeRParen = Previous->getPreviousNonComment(); // Lambdas can be cast to function types only, e.g. `std::function` // and `int (*)()`. - if (!BeforeRParen || !BeforeRParen->isOneOf(tok::greater, tok::r_paren)) + if (!PrevPrev || !PrevPrev->isOneOf(tok::greater, tok::r_paren)) return false; - } else if (Previous->is(tok::star)) { - Previous = Previous->getPreviousNonComment(); } if (Previous && Previous->Tok.getIdentifierInfo() && !Previous->isOneOf(tok::kw_return, tok::kw_co_await, tok::kw_co_yield, diff --git a/contrib/llvm-project/clang/lib/Format/WhitespaceManager.cpp b/contrib/llvm-project/clang/lib/Format/WhitespaceManager.cpp index cc3cc0f6906c..ecc696c53922 100644 --- a/contrib/llvm-project/clang/lib/Format/WhitespaceManager.cpp +++ b/contrib/llvm-project/clang/lib/Format/WhitespaceManager.cpp @@ -1295,7 +1295,10 @@ void WhitespaceManager::alignArrayInitializers() { bool FoundComplete = false; for (unsigned InsideIndex = ChangeIndex + 1; InsideIndex < ChangeEnd; ++InsideIndex) { - if (Changes[InsideIndex].Tok == C.Tok->MatchingParen) { + const auto *Tok = Changes[InsideIndex].Tok; + if (Tok->is(tok::pp_define)) + break; + if (Tok == C.Tok->MatchingParen) { alignArrayInitializers(ChangeIndex, InsideIndex + 1); ChangeIndex = InsideIndex + 1; FoundComplete = true; diff --git a/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp b/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp index 16caf699a4c2..ea5f2e8f8e02 100644 --- a/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp +++ b/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp @@ -1287,7 +1287,7 @@ uptr GetPageSize() { uptr ReadBinaryName(/*out*/ char *buf, uptr buf_len) { # if SANITIZER_HAIKU - int cookie = 0; + int32_t cookie = 0; image_info info; const char *argv0 = ""; while (get_next_image_info(B_CURRENT_TEAM, &cookie, &info) == B_OK) { @@ -1987,7 +1987,10 @@ SignalContext::WriteFlag SignalContext::GetWriteFlag() const { # elif SANITIZER_NETBSD uptr err = ucontext->uc_mcontext.__gregs[_REG_ERR]; # elif SANITIZER_HAIKU - uptr err = ucontext->uc_mcontext.r13; + uptr err = 0; // FIXME: ucontext->uc_mcontext.r13; + // The err register was added on the main branch and not + // available with the current release. To be reverted later. + // https://github.com/haiku/haiku/commit/11adda21aa4e6b24f71a496868a44d7607bc3764 # elif SANITIZER_SOLARIS && defined(__i386__) const int Err = 13; uptr err = ucontext->uc_mcontext.gregs[Err]; @@ -2617,6 +2620,11 @@ static void GetPcSpBp(void *context, uptr *pc, uptr *sp, uptr *bp) { *pc = ucontext->uc_mcontext.mc_eip; *bp = ucontext->uc_mcontext.mc_ebp; *sp = ucontext->uc_mcontext.mc_esp; +# elif SANITIZER_HAIKU + ucontext_t *ucontext = (ucontext_t *)context; + *pc = ucontext->uc_mcontext.eip; + *bp = ucontext->uc_mcontext.ebp; + *sp = ucontext->uc_mcontext.esp; # else ucontext_t *ucontext = (ucontext_t *)context; # if SANITIZER_SOLARIS diff --git a/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h b/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h index bfb3d5036522..ba1b9e194497 100644 --- a/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h +++ b/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h @@ -630,7 +630,7 @@ typedef unsigned long __sanitizer_sigset_t; # elif SANITIZER_APPLE typedef unsigned __sanitizer_sigset_t; # elif SANITIZER_HAIKU -typedef unsigned long __sanitizer_sigset_t; +typedef unsigned long long __sanitizer_sigset_t; # elif SANITIZER_LINUX struct __sanitizer_sigset_t { // The size is determined by looking at sizeof of real sigset_t on linux. diff --git a/contrib/llvm-project/libcxx/include/__config b/contrib/llvm-project/libcxx/include/__config index d6c6e6a08c08..699e195da2e0 100644 --- a/contrib/llvm-project/libcxx/include/__config +++ b/contrib/llvm-project/libcxx/include/__config @@ -28,7 +28,7 @@ // _LIBCPP_VERSION represents the version of libc++, which matches the version of LLVM. // Given a LLVM release LLVM XX.YY.ZZ (e.g. LLVM 17.0.1 == 17.00.01), _LIBCPP_VERSION is // defined to XXYYZZ. -# define _LIBCPP_VERSION 210107 +# define _LIBCPP_VERSION 210108 # define _LIBCPP_CONCAT_IMPL(_X, _Y) _X##_Y # define _LIBCPP_CONCAT(_X, _Y) _LIBCPP_CONCAT_IMPL(_X, _Y) diff --git a/contrib/llvm-project/llvm/lib/CodeGen/SelectOptimize.cpp b/contrib/llvm-project/llvm/lib/CodeGen/SelectOptimize.cpp index 13ed8f28d550..2052e9a75d89 100644 --- a/contrib/llvm-project/llvm/lib/CodeGen/SelectOptimize.cpp +++ b/contrib/llvm-project/llvm/lib/CodeGen/SelectOptimize.cpp @@ -502,7 +502,7 @@ static Value *getTrueOrFalseValue( } else { assert((isa(AuxI) || isa(AuxI)) && "Unexpected opcode"); - CBO->setOperand(CondIdx, ConstantInt::get(CBO->getType(), -1)); + CBO->setOperand(CondIdx, ConstantInt::getAllOnesValue(CBO->getType())); } unsigned OtherIdx = 1 - CondIdx; diff --git a/contrib/llvm-project/llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp b/contrib/llvm-project/llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp index e6486e247209..5c3127e2d3dc 100644 --- a/contrib/llvm-project/llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp +++ b/contrib/llvm-project/llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp @@ -216,6 +216,18 @@ static MachineInstr *findStartOfTree(MachineOperand &MO, return Def; } +// FAKE_USEs are no-ops, so remove them here so that the values used by them +// will be correctly dropped later. +static void removeFakeUses(MachineFunction &MF) { + SmallVector ToDelete; + for (auto &MBB : MF) + for (auto &MI : MBB) + if (MI.isFakeUse()) + ToDelete.push_back(&MI); + for (auto *MI : ToDelete) + MI->eraseFromParent(); +} + bool WebAssemblyExplicitLocals::runOnMachineFunction(MachineFunction &MF) { LLVM_DEBUG(dbgs() << "********** Make Locals Explicit **********\n" "********** Function: " @@ -226,6 +238,8 @@ bool WebAssemblyExplicitLocals::runOnMachineFunction(MachineFunction &MF) { WebAssemblyFunctionInfo &MFI = *MF.getInfo(); const auto *TII = MF.getSubtarget().getInstrInfo(); + removeFakeUses(MF); + // Map non-stackified virtual registers to their local ids. DenseMap Reg2Local; diff --git a/contrib/llvm-project/llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp b/contrib/llvm-project/llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp index bc91c6424b63..fd13ef9a1921 100644 --- a/contrib/llvm-project/llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp +++ b/contrib/llvm-project/llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp @@ -866,6 +866,10 @@ bool WebAssemblyRegStackify::runOnMachineFunction(MachineFunction &MF) { if (Insert->isDebugValue()) continue; + // Ignore FAKE_USEs, which are no-ops and will be deleted later. + if (Insert->isFakeUse()) + continue; + // Iterate through the inputs in reverse order, since we'll be pulling // operands off the stack in LIFO order. CommutingState Commuting; diff --git a/contrib/llvm-project/llvm/lib/Transforms/Instrumentation/RealtimeSanitizer.cpp b/contrib/llvm-project/llvm/lib/Transforms/Instrumentation/RealtimeSanitizer.cpp index 5ef6ffb58a7c..667fdb746175 100644 --- a/contrib/llvm-project/llvm/lib/Transforms/Instrumentation/RealtimeSanitizer.cpp +++ b/contrib/llvm-project/llvm/lib/Transforms/Instrumentation/RealtimeSanitizer.cpp @@ -90,6 +90,9 @@ PreservedAnalyses RealtimeSanitizerPass::run(Module &M, [&](Function *Ctor, FunctionCallee) { appendToGlobalCtors(M, Ctor, 0); }); for (Function &F : M) { + if (F.empty()) + continue; + if (F.hasFnAttribute(Attribute::SanitizeRealtime)) runSanitizeRealtime(F); diff --git a/lib/clang/include/VCSVersion.inc b/lib/clang/include/VCSVersion.inc index a8d79080c301..b664ab391f4f 100644 --- a/lib/clang/include/VCSVersion.inc +++ b/lib/clang/include/VCSVersion.inc @@ -1,8 +1,8 @@ -#define LLVM_REVISION "llvmorg-21.1.7-0-gcd708029e0b2" +#define LLVM_REVISION "llvmorg-21.1.8-0-g2078da43e25a" #define LLVM_REPOSITORY "https://github.com/llvm/llvm-project.git" -#define CLANG_REVISION "llvmorg-21.1.7-0-gcd708029e0b2" +#define CLANG_REVISION "llvmorg-21.1.8-0-g2078da43e25a" #define CLANG_REPOSITORY "https://github.com/llvm/llvm-project.git" -#define LLDB_REVISION "llvmorg-21.1.7-0-gcd708029e0b2" +#define LLDB_REVISION "llvmorg-21.1.8-0-g2078da43e25a" #define LLDB_REPOSITORY "https://github.com/llvm/llvm-project.git" diff --git a/lib/clang/include/clang/Basic/Version.inc b/lib/clang/include/clang/Basic/Version.inc index aae0d61e886b..dc2a7e5c7683 100644 --- a/lib/clang/include/clang/Basic/Version.inc +++ b/lib/clang/include/clang/Basic/Version.inc @@ -1,9 +1,9 @@ -#define CLANG_VERSION 21.1.7 -#define CLANG_VERSION_STRING "21.1.7" +#define CLANG_VERSION 21.1.8 +#define CLANG_VERSION_STRING "21.1.8" #define CLANG_VERSION_MAJOR 21 #define CLANG_VERSION_MAJOR_STRING "21" #define CLANG_VERSION_MINOR 1 -#define CLANG_VERSION_PATCHLEVEL 7 +#define CLANG_VERSION_PATCHLEVEL 8 #define MAX_CLANG_ABI_COMPAT_VERSION 21 #define CLANG_VENDOR "FreeBSD " diff --git a/lib/clang/include/lld/Common/Version.inc b/lib/clang/include/lld/Common/Version.inc index 3a33768a4b99..0e69f9627120 100644 --- a/lib/clang/include/lld/Common/Version.inc +++ b/lib/clang/include/lld/Common/Version.inc @@ -1,4 +1,4 @@ // Local identifier in __FreeBSD_version style #define LLD_FREEBSD_VERSION 1500001 -#define LLD_VERSION_STRING "21.1.7 (FreeBSD llvmorg-21.1.7-0-gcd708029e0b2-" __XSTRING(LLD_FREEBSD_VERSION) ")" +#define LLD_VERSION_STRING "21.1.8 (FreeBSD llvmorg-21.1.8-0-g2078da43e25a-" __XSTRING(LLD_FREEBSD_VERSION) ")" diff --git a/lib/clang/include/lldb/Version/Version.inc b/lib/clang/include/lldb/Version/Version.inc index bd72009d6981..8bce799f6ede 100644 --- a/lib/clang/include/lldb/Version/Version.inc +++ b/lib/clang/include/lldb/Version/Version.inc @@ -1,6 +1,6 @@ -#define LLDB_VERSION 21.1.7 -#define LLDB_VERSION_STRING "21.1.7" +#define LLDB_VERSION 21.1.8 +#define LLDB_VERSION_STRING "21.1.8" #define LLDB_VERSION_MAJOR 21 #define LLDB_VERSION_MINOR 1 -#define LLDB_VERSION_PATCH 7 +#define LLDB_VERSION_PATCH 8 /* #undef LLDB_FULL_VERSION_STRING */ diff --git a/lib/clang/include/llvm/Config/config.h b/lib/clang/include/llvm/Config/config.h index ec6ec2639eb4..e504ac8f13bb 100644 --- a/lib/clang/include/llvm/Config/config.h +++ b/lib/clang/include/llvm/Config/config.h @@ -301,10 +301,10 @@ #define PACKAGE_NAME "LLVM" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "LLVM 21.1.7" +#define PACKAGE_STRING "LLVM 21.1.8" /* Define to the version of this package. */ -#define PACKAGE_VERSION "21.1.7" +#define PACKAGE_VERSION "21.1.8" /* Define to the vendor of this package. */ /* #undef PACKAGE_VENDOR */ diff --git a/lib/clang/include/llvm/Config/llvm-config.h b/lib/clang/include/llvm/Config/llvm-config.h index 15814802ceca..da1dd05e926a 100644 --- a/lib/clang/include/llvm/Config/llvm-config.h +++ b/lib/clang/include/llvm/Config/llvm-config.h @@ -73,10 +73,10 @@ #define LLVM_VERSION_MINOR 1 /* Patch version of the LLVM API */ -#define LLVM_VERSION_PATCH 7 +#define LLVM_VERSION_PATCH 8 /* LLVM version string */ -#define LLVM_VERSION_STRING "21.1.7" +#define LLVM_VERSION_STRING "21.1.8" /* Whether LLVM records statistics for use with GetStatistics(), * PrintStatistics() or PrintStatisticsJSON() diff --git a/lib/clang/include/llvm/Support/VCSRevision.h b/lib/clang/include/llvm/Support/VCSRevision.h index db985a98ee88..691b724a0307 100644 --- a/lib/clang/include/llvm/Support/VCSRevision.h +++ b/lib/clang/include/llvm/Support/VCSRevision.h @@ -1,2 +1,2 @@ -#define LLVM_REVISION "llvmorg-21.1.7-0-gcd708029e0b2" +#define LLVM_REVISION "llvmorg-21.1.8-0-g2078da43e25a" #define LLVM_REPOSITORY "https://github.com/llvm/llvm-project.git" From nobody Fri May 29 23:01:54 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRzPt5ntxz6gDvs for ; Fri, 29 May 2026 23:01:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRzPt4FYvz3BxK for ; Fri, 29 May 2026 23:01:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095714; 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=WTxQJuefc+2PRrC2wKTYeFKsY8ysT3aSVcdr41BG5kY=; b=ilnBenLyByBv0c7/K2FZ4KONLOwRSjEiz8YP8nzQiWa2a8vuM8fb56XclqmXWyRk9osw0q qddQ2QQpaPKIoAn+g2wo8LLBimSzokdMoZlLVVTOjnw2EwSZX9GP/tB48naqH5WoQgLuLc VHv/Rp7LANWTmHpYMIdXmHBXIsROpievMzXG6esyKAUTX+t2h88W+FAMA9Z2ik1DeiAqDh KQzH8fyKyb6cZxqQxUAZtV72qoR4h0Ax82c+qptJ9/aClhlZoZmU5pajGLwDjLPYG7c/Vg fI8n/l/Fmd40/oS1omdMynEdqTqChLs5zUtIBY3mBl1rmOVm8sh2CLdOHazF5g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780095714; a=rsa-sha256; cv=none; b=j4LGGSWZih04Bu88A41sgpd9iuPVWftBVz5PWbF+MontpSWiGlbwAT04tfPkSqxq/urUMh 1ET91EOqxza/nrlkAvvNpuXNQwziVbE6SlJo+65Uz9JOy77YK81uVblCgxwvnMO2RtmT1l LQTduknCJni5VQfwHNlJUg/tpmK3nst4UazO4r9y9dhC+6qD6aq/+SDT8zRnEWr5Agj4bJ 28p33LFFY4lPP938lU1+FRxt5RkVyOMZJTaVoONf1sp0lxEjbsw55qTc88gWheskGFdXIX Ryw9NUGO3dXCTbV3p+i5Om0EeouUEfQxODEWup2igI3hIs07Y1tMmnVuDu3ApA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095714; 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=WTxQJuefc+2PRrC2wKTYeFKsY8ysT3aSVcdr41BG5kY=; b=H/819yv//+O6yCxxOkXNFfPZ6WYKk4/g9eU4eeVpp93Wa/1IqgENPcE/+8oN0OksIAryVm utHnD7HM5Dtwwg24NATjoEEwI0btL1ucTZln4ayXjxlcaoR/kBK1KTgFqqe31TDpbJ+XyY JVor5L6+LVyVoDbA4PtspMlPER8NODA/9gejsI8yKRC/el/HWpIGn1lARwlL7JY4u9XMv7 Lv//MIboQbpjPZDEGC966Pq9IMs0r7t9a6XIFEXRlgfAJt2l4q04oAI/X/xIP3m6pSEktH mooMqMXCP16mYhRDTzg4tGvMibOkbarbgCl9deXpGOvkd7B4Q+stD4I1UQD2pQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRzPt3rTLztgp for ; Fri, 29 May 2026 23:01:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 42b0d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 23:01:54 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Dimitry Andric From: Dimitry Andric Subject: git: 0746511e09a8 - stable/15 - libcxx-compat: revert llvmorg-21-init-9130-g9e3982d9ae81: List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 0746511e09a889187b5ce46fdb4eadc48dd782d3 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 23:01:54 +0000 Message-Id: <6a1a1ae2.42b0d.41d5d4a1@gitrepo.freebsd.org> The branch stable/15 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=0746511e09a889187b5ce46fdb4eadc48dd782d3 commit 0746511e09a889187b5ce46fdb4eadc48dd782d3 Author: Dimitry Andric AuthorDate: 2026-01-04 19:43:38 +0000 Commit: Dimitry Andric CommitDate: 2026-05-29 22:57:32 +0000 libcxx-compat: revert llvmorg-21-init-9130-g9e3982d9ae81: [libc++] Replace __libcpp_{ctz, clz} with __builtin_{ctzg, clzg} (#133920) `__libcpp_{ctz, clz}` were previously used as fallbacks for `__builtin_{ctzg, clzg}` to ensure compatibility with older compilers (Clang 18 and earlier), as `__builtin_{ctzg, clzg}` became available in Clang 19. Now that support for Clang 18 has been officially dropped in #130142, we can now safely replace all instances of `__libcpp_{ctz, clz}` with `__count{l,r}_zero` (which internally call `__builtin_{ctzg, clzg}` and eliminate the fallback logic. Closes #131179. This is part of making libc++ 21 build with clang 18. PR: 292067 MFC after: 1 month (cherry picked from commit 821fc643b3cad922e5438760eed9cad0d6d9b3b0) --- contrib/llvm-project/libcxx/include/__bit/countl.h | 28 ++++++++++++++++++ contrib/llvm-project/libcxx/include/__bit/countr.h | 33 ++++++++++++++++++++++ 2 files changed, 61 insertions(+) diff --git a/contrib/llvm-project/libcxx/include/__bit/countl.h b/contrib/llvm-project/libcxx/include/__bit/countl.h index 075914020879..11de5f214682 100644 --- a/contrib/llvm-project/libcxx/include/__bit/countl.h +++ b/contrib/llvm-project/libcxx/include/__bit/countl.h @@ -9,6 +9,7 @@ #ifndef _LIBCPP___BIT_COUNTL_H #define _LIBCPP___BIT_COUNTL_H +#include <__bit/rotate.h> #include <__config> #include <__type_traits/integer_traits.h> #include @@ -25,7 +26,34 @@ _LIBCPP_BEGIN_NAMESPACE_STD template _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 int __countl_zero(_Tp __t) _NOEXCEPT { static_assert(__is_unsigned_integer_v<_Tp>, "__countl_zero requires an unsigned integer type"); +#if __has_builtin(__builtin_clzg) return __builtin_clzg(__t, numeric_limits<_Tp>::digits); +#else // __has_builtin(__builtin_clzg) + if (__t == 0) + return numeric_limits<_Tp>::digits; + + if (sizeof(_Tp) <= sizeof(unsigned int)) + return __builtin_clz(static_cast(__t)) - + (numeric_limits::digits - numeric_limits<_Tp>::digits); + else if (sizeof(_Tp) <= sizeof(unsigned long)) + return __builtin_clzl(static_cast(__t)) - + (numeric_limits::digits - numeric_limits<_Tp>::digits); + else if (sizeof(_Tp) <= sizeof(unsigned long long)) + return __builtin_clzll(static_cast(__t)) - + (numeric_limits::digits - numeric_limits<_Tp>::digits); + else { + int __ret = 0; + int __iter = 0; + const unsigned int __ulldigits = numeric_limits::digits; + while (true) { + __t = std::__rotl(__t, __ulldigits); + if ((__iter = std::__countl_zero(static_cast(__t))) != __ulldigits) + break; + __ret += __iter; + } + return __ret + __iter; + } +#endif // __has_builtin(__builtin_clzg) } #if _LIBCPP_STD_VER >= 20 diff --git a/contrib/llvm-project/libcxx/include/__bit/countr.h b/contrib/llvm-project/libcxx/include/__bit/countr.h index f6c98695d3d0..2179eeae9e3d 100644 --- a/contrib/llvm-project/libcxx/include/__bit/countr.h +++ b/contrib/llvm-project/libcxx/include/__bit/countr.h @@ -22,10 +22,43 @@ _LIBCPP_PUSH_MACROS _LIBCPP_BEGIN_NAMESPACE_STD +// A constexpr implementation for C++11 and later (using clang extensions for constexpr support) +// Precondition: __t != 0 (the caller __countr_zero handles __t == 0 as a special case) +template +[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR int __countr_zero_impl(_Tp __t) _NOEXCEPT { + _LIBCPP_ASSERT_INTERNAL(__t != 0, "__countr_zero_impl called with zero value"); + static_assert(__is_unsigned_integer_v<_Tp>, "__countr_zero_impl only works with unsigned types"); + if _LIBCPP_CONSTEXPR (sizeof(_Tp) <= sizeof(unsigned int)) { + return __builtin_ctz(static_cast(__t)); + } else if _LIBCPP_CONSTEXPR (sizeof(_Tp) <= sizeof(unsigned long)) { + return __builtin_ctzl(static_cast(__t)); + } else if _LIBCPP_CONSTEXPR (sizeof(_Tp) <= sizeof(unsigned long long)) { + return __builtin_ctzll(static_cast(__t)); + } else { +#if _LIBCPP_STD_VER == 11 + unsigned long long __ull = static_cast(__t); + const unsigned int __ulldigits = numeric_limits::digits; + return __ull == 0ull ? __ulldigits + std::__countr_zero_impl<_Tp>(__t >> __ulldigits) : __builtin_ctzll(__ull); +#else + int __ret = 0; + const unsigned int __ulldigits = numeric_limits::digits; + while (static_cast(__t) == 0uLL) { + __ret += __ulldigits; + __t >>= __ulldigits; + } + return __ret + __builtin_ctzll(static_cast(__t)); +#endif + } +} + template [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR int __countr_zero(_Tp __t) _NOEXCEPT { static_assert(__is_unsigned_integer_v<_Tp>, "__countr_zero only works with unsigned types"); +#if __has_builtin(__builtin_ctzg) // TODO (LLVM 21): This can be dropped once we only support Clang >= 19. return __builtin_ctzg(__t, numeric_limits<_Tp>::digits); +#else + return __t != 0 ? std::__countr_zero_impl(__t) : numeric_limits<_Tp>::digits; +#endif } #if _LIBCPP_STD_VER >= 20 From nobody Fri May 29 23:01:55 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gRzPw0WZGz6gDsL for ; Fri, 29 May 2026 23:01: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRzPv4fmBz3C5y for ; Fri, 29 May 2026 23:01:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095715; 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=kOREs8bPWwyHhXRIdhOBdT34ExAphWxZfX4O0r92IsQ=; b=R7MW18RvS7q5UOtLK5lRtziZfRgdxm8gcmmWpHOuz+DUrmyLmi8LWfylL7V7L5AaIt+HpL 5M6qZqX+9vKHkWk1sLYyJ+JwKcp6RBIlBZPTsZBqS8FPYJmkajxWBu9oX6SIMWuVYRdIOc SUGy77FpEbA8XMpx0boB7ei4xPd0KixQHwScFBqoJ+9k7MzS+rGdsRMyKC+bGLRtqe1seD Sy6LWSmp2YFU1SZB5GS+A2FnzUwwNjy/RRE29PZvo/aCLvsEPKYR6fxeWIucZqxzNccEQ1 UzpckEqSlmQ/NqnD5ZbRSVkYi6oW1VP4MSTxt+jKG61DP2CjH5lg60izhwZXag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780095715; a=rsa-sha256; cv=none; b=kmHSpzcAPIOvYt6loojR+5lPwPLYakosDoIghjtuU5DgI3SLyC0U7eCF5iulC6mfVIweCT MQCq7nyZGSBLCgC3GEl9b8sYwOH1QVar+9+PeIpyGVP025Flwnv83Xk2mKxyUbjDmclDYk 796W6zB72sehMHQYx1UxnxI0GkOfILEPV4DnYTQaCgpcb+4JvCwfh9UzcyemlygLqVKg8O aEtfhraDRScLNjY2HLt2CVIhcmMMXl9IAtJyDVs81wGHVVFPc0PXa1EtmkxRrQdFTPYZPI ayoyKb8wtXK3uuI13ovEGSmjW/MXS8Ta7Ass3nmeVMm5NrvOaBUKEdaNh5ngCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780095715; 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=kOREs8bPWwyHhXRIdhOBdT34ExAphWxZfX4O0r92IsQ=; b=FTW75YgXdYBQXP48mE7UBY06o47UYrkrVywN5rceYUFZc03CaoUYN+gylG4P9yI5/qonkj iK4gso0S0WBvlTR7ek39qp7Xid8+ugruNxcamjiZveKEP4jwaSMoJ85kor1M/RF8Dw+n+W TwqGIrCszpzphivAKze56Ivi89hsh0tbbQsPi5NmjqmJmgxWApfciC1plZZlquTgByZzJ6 D6A4wZz8eeEe14JoDp8IfFeiGQZbAND3dhUYuKMdfvYEn+4FuhrU1O1gqravjBc1bBafQg X1Z+nyV7PFXBQbQzYOxfazNWgfiGabsS2Giv74TJ5GY53D8mXluyrwMnMbT+/A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRzPv4DHvztFy for ; Fri, 29 May 2026 23:01:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 40cd3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 23:01:55 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Dimitry Andric From: Dimitry Andric Subject: git: a39d06620d7a - stable/15 - libcxx-compat: revert llvmorg-21-init-15984-g650b451d0065: List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: a39d06620d7afb66f3263d1c4b487402426e81f7 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 23:01:55 +0000 Message-Id: <6a1a1ae3.40cd3.71fc0e82@gitrepo.freebsd.org> The branch stable/15 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=a39d06620d7afb66f3263d1c4b487402426e81f7 commit a39d06620d7afb66f3263d1c4b487402426e81f7 Author: Dimitry Andric AuthorDate: 2026-01-04 19:43:58 +0000 Commit: Dimitry Andric CommitDate: 2026-05-29 22:57:32 +0000 libcxx-compat: revert llvmorg-21-init-15984-g650b451d0065: [libc++] Simplify the implementation of pointer_traits a bit (#142260) This is part of making libc++ 21 build with clang 18. PR: 292067 MFC after: 1 month (cherry picked from commit bb6713d38cc0d988378394f599d81d3a83dbaf03) --- .../libcxx/include/__memory/pointer_traits.h | 116 +++++++++++++++------ 1 file changed, 83 insertions(+), 33 deletions(-) diff --git a/contrib/llvm-project/libcxx/include/__memory/pointer_traits.h b/contrib/llvm-project/libcxx/include/__memory/pointer_traits.h index 8c7f8dff1b76..879b387b9ad1 100644 --- a/contrib/llvm-project/libcxx/include/__memory/pointer_traits.h +++ b/contrib/llvm-project/libcxx/include/__memory/pointer_traits.h @@ -16,13 +16,11 @@ #include <__type_traits/conditional.h> #include <__type_traits/conjunction.h> #include <__type_traits/decay.h> -#include <__type_traits/detected_or.h> #include <__type_traits/enable_if.h> #include <__type_traits/integral_constant.h> #include <__type_traits/is_class.h> #include <__type_traits/is_function.h> #include <__type_traits/is_void.h> -#include <__type_traits/nat.h> #include <__type_traits/void_t.h> #include <__utility/declval.h> #include <__utility/forward.h> @@ -36,37 +34,67 @@ _LIBCPP_PUSH_MACROS _LIBCPP_BEGIN_NAMESPACE_STD +// clang-format off +#define _LIBCPP_CLASS_TRAITS_HAS_XXX(NAME, PROPERTY) \ + template \ + struct NAME : false_type {}; \ + template \ + struct NAME<_Tp, __void_t > : true_type {} +// clang-format on + +_LIBCPP_CLASS_TRAITS_HAS_XXX(__has_pointer, pointer); +_LIBCPP_CLASS_TRAITS_HAS_XXX(__has_element_type, element_type); + +template ::value> +struct __pointer_traits_element_type {}; + template -struct __pointer_traits_element_type_impl {}; +struct __pointer_traits_element_type<_Ptr, true> { + using type _LIBCPP_NODEBUG = typename _Ptr::element_type; +}; template