From nobody Mon Nov 11 01:12:20 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xms382cJ4z5cY0g; Mon, 11 Nov 2024 01:12:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xms381nzcz42M4; Mon, 11 Nov 2024 01:12:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731287540; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tgx5frZt+jA8jPireIT6U7UerSgpfhaTQr7kYxodguE=; b=AHEHtKtJmP9yqH9P7dNaohFTvs/kVy91SmUVPdxXJwGOKVNUjBkCgJiFgLjVUWr5oSs3nH znxrxSbKovFop/ETSXkKfkOXuYCE1PJ8NL68IVOOdeZ9vRBaPxWW/VgYnuzWafujy3Dxag OLM3Rf3FBTDzvXmOxPMzxfzIg2v6pvclGPsP+9gnwupp+jvHNM7tqh7nGOWovNjbRypIPN Bs9BnSTXa7KN/VNeZ8hW2plIhVTaL9JTUttIeRHpkrj70mzu1L7NtM3n0JKL8rbSyT4Q9w OnOv0aWVQeSuiTKdeRqZkwodmnZ4DnR9vxsqAnq+tfebtb9fR0YVHmbGPXCprQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731287540; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tgx5frZt+jA8jPireIT6U7UerSgpfhaTQr7kYxodguE=; b=CGmEMJHRNzD5C9Y3YdK/zAdj3Or/Mw5HZuFy1nNQ6aG0ZQlG8zv2vwMkRURH34BfD+IE4s /1EX9Gp+kLQmbFCxXLvpZgdI/rZugFbJf3cJktjiOxuTTXEYcrwa7zQW2CUteNoWwojsbI JwwppBHf72l8CbOZGh6p4KEh9GUdV/BghcX0StUYQIDj4aTl48NdMCMvU1dBqSvnTWdc3a g21pdUbx/CZdWa6VG7o2F31lkQAwAar5Om1aBc0YzHVKSkL1XyKJLepmQZ/QyDCnZ9qv9I ED3nV/DW/N/oGwOMeYZ1Clsk61OD5wbn25wZWBHvcq0khTqeouB163mzecwLxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731287540; a=rsa-sha256; cv=none; b=O809XJ2ehovAjs+NlFfiVXqtgN8MHjS8wnPDNnHfTL/LE74/eL8rQjkBATG1d0LwF1oa9q te0pIcHvQTmGhLSOsSSgmCSM/1KiTzfiA3i35AOsjvaW5mV0oTAvXGBRY60bA7W8o7dDoJ J6pYpyga3iy0uJ8mcFK8j5ARDW+DPGv0nJNO37KVB/SZuqhddC3ndZWHXQ8/a/GHqd03ZB wiDA5RGwgigxgKkVFsxmVoOzCrSqL/tfn6j9rpOIPk5r9E7gROFFuqPQLE3SdQStD876yQ /w7isdnmBvJk1vRg7EAivxd15RrlIdO+lbqTyugdowjEyuq96HAo1PK9tecDJQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xms381Q3Pz15Hs; Mon, 11 Nov 2024 01:12:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AB1CKIJ058386; Mon, 11 Nov 2024 01:12:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AB1CK3U058369; Mon, 11 Nov 2024 01:12:20 GMT (envelope-from git) Date: Mon, 11 Nov 2024 01:12:20 GMT Message-Id: <202411110112.4AB1CK3U058369@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: 37e54466cf7a - main - net80211: clean up / add more macros to check the frame 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 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: 37e54466cf7a7c60f3d57c23c09b832db876e2fc Auto-Submitted: auto-generated The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=37e54466cf7a7c60f3d57c23c09b832db876e2fc commit 37e54466cf7a7c60f3d57c23c09b832db876e2fc Author: Adrian Chadd AuthorDate: 2024-11-09 21:10:08 +0000 Commit: Adrian Chadd CommitDate: 2024-11-11 01:11:58 +0000 net80211: clean up / add more macros to check the frame types * Add new macros to check the version+type and version+type+subtype of a frame. * Use these for existing frame checks. * Convert the flag checks in net80211 to use the macros, rather than direct header poking. Notably I'm callign out things like QOS any versus QOS data, the kind of NULL frames, etc. Eg, in the TKIP code it's checking whether a frame is ANY kind of QOS frame, not just QOS data. These macros should hopefully make the header checks clearer and less error prone. They're also useful in drivers that are doing their own header parsing. Locally: * ath(4), AP, STA, AP+STA modes * local ath10k/athp - AP, STA modes * rtwn - STA mode Differential Revision: https://reviews.freebsd.org/D36615 --- sys/net80211/ieee80211.h | 54 ++++++++++++++++++++++++++++-------- sys/net80211/ieee80211_adhoc.c | 3 +- sys/net80211/ieee80211_crypto_tkip.c | 3 +- sys/net80211/ieee80211_hostap.c | 3 +- sys/net80211/ieee80211_ht.c | 2 +- sys/net80211/ieee80211_mesh.c | 3 +- sys/net80211/ieee80211_output.c | 3 +- sys/net80211/ieee80211_sta.c | 3 +- sys/net80211/ieee80211_wds.c | 3 +- 9 files changed, 52 insertions(+), 25 deletions(-) diff --git a/sys/net80211/ieee80211.h b/sys/net80211/ieee80211.h index 4203952367ca..a2d6b3040032 100644 --- a/sys/net80211/ieee80211.h +++ b/sys/net80211/ieee80211.h @@ -161,6 +161,7 @@ struct ieee80211_qosframe_addr4 { /* 0001-0011 Reserved 0x10-0x30 */ /* Were: CF_ACK, CF_POLL, CF_ACPL */ #define IEEE80211_FC0_SUBTYPE_NODATA 0x40 /* Null */ /* 0101-0111 Reserved 0x50-0x70 */ /* Were: CFACK, CFPOLL, CF_ACK_CF_ACK */ +#define IEEE80211_FC0_SUBTYPE_QOS_MASK_ANY 0x80 /* QoS mask - matching any subtypes 8..15 */ #define IEEE80211_FC0_SUBTYPE_QOS_DATA 0x80 /* QoS Data */ #define IEEE80211_FC0_SUBTYPE_QOS_DATA_CFACK 0x90 /* QoS Data +CF-Ack */ #define IEEE80211_FC0_SUBTYPE_QOS_DATA_CFPOLL 0xa0 /* QoS Data +CF-Poll */ @@ -190,24 +191,55 @@ struct ieee80211_qosframe_addr4 { #define IEEE80211_CTL_EXT_TDD_BF 0x0b /* TDD Beamforming, 80211ay-2021 */ /* 1100-1111 Reserved 0xc-0xf */ -#define IEEE80211_IS_MGMT(wh) \ - (!! (((wh)->i_fc[0] & IEEE80211_FC0_TYPE_MASK) \ - == IEEE80211_FC0_TYPE_MGT)) +/* Check the version field */ +#define IEEE80211_IS_FC0_CHECK_VER(wh, v) \ + (((wh)->i_fc[0] & IEEE80211_FC0_VERSION_MASK) == (v)) + +/* Check the version and type field */ +#define IEEE80211_IS_FC0_CHECK_VER_TYPE(wh, v, t) \ + (((((wh)->i_fc[0] & IEEE80211_FC0_VERSION_MASK) == (v))) && \ + (((wh)->i_fc[0] & IEEE80211_FC0_TYPE_MASK) == (t))) + +/* Check the version, type and subtype field */ +#define IEEE80211_IS_FC0_CHECK_VER_TYPE_SUBTYPE(wh, v, t, st) \ + (((((wh)->i_fc[0] & IEEE80211_FC0_VERSION_MASK) == (v))) && \ + (((wh)->i_fc[0] & IEEE80211_FC0_TYPE_MASK) == (t)) && \ + (((wh)->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK) == (st))) + +#define IEEE80211_IS_MGMT(wh) \ + (IEEE80211_IS_FC0_CHECK_VER_TYPE(wh, IEEE80211_FC0_VERSION_0, \ + IEEE80211_FC0_TYPE_MGT)) #define IEEE80211_IS_CTL(wh) \ - (!! (((wh)->i_fc[0] & IEEE80211_FC0_TYPE_MASK) \ - == IEEE80211_FC0_TYPE_CTL)) + (IEEE80211_IS_FC0_CHECK_VER_TYPE(wh, IEEE80211_FC0_VERSION_0, \ + IEEE80211_FC0_TYPE_CTL)) #define IEEE80211_IS_DATA(wh) \ - (!! (((wh)->i_fc[0] & IEEE80211_FC0_TYPE_MASK) \ - == IEEE80211_FC0_TYPE_DATA)) + (IEEE80211_IS_FC0_CHECK_VER_TYPE(wh, IEEE80211_FC0_VERSION_0, \ + IEEE80211_FC0_TYPE_DATA)) #define IEEE80211_IS_EXT(wh) \ - (!! (((wh)->i_fc[0] & IEEE80211_FC0_TYPE_MASK) \ - == IEEE80211_FC0_TYPE_EXT)) + (IEEE80211_IS_FC0_CHECK_VER_TYPE(wh, IEEE80211_FC0_VERSION_0, \ + IEEE80211_FC0_TYPE_EXT)) #define IEEE80211_FC0_QOSDATA \ (IEEE80211_FC0_TYPE_DATA|IEEE80211_FC0_SUBTYPE_QOS_DATA|IEEE80211_FC0_VERSION_0) -#define IEEE80211_IS_QOSDATA(wh) \ - ((wh)->i_fc[0] == IEEE80211_FC0_QOSDATA) +/* + * Return true if the frame is any of the QOS frame types, not just + * data frames. Matching on the IEEE80211_FC0_SUBTYPE_QOS_ANY bit + * being set also matches on subtypes 8..15. + */ +#define IEEE80211_IS_QOS_ANY(wh) \ + ((IEEE80211_IS_FC0_CHECK_VER_TYPE(wh, IEEE80211_FC0_VERSION_0, \ + IEEE80211_FC0_TYPE_DATA)) && \ + ((wh)->i_fc[0] & IEEE80211_FC0_SUBTYPE_QOS_MASK_ANY)) + +/* + * Return true if this frame is QOS data, and only QOS data. + */ +#define IEEE80211_IS_QOSDATA(wh) \ + (IEEE80211_IS_FC0_CHECK_VER_TYPE_SUBTYPE(wh, \ + IEEE80211_FC0_VERSION_0, \ + IEEE80211_FC0_TYPE_DATA, \ + IEEE80211_FC0_SUBTYPE_QOS_DATA)) #define IEEE80211_FC1_DIR_MASK 0x03 #define IEEE80211_FC1_DIR_NODS 0x00 /* STA->STA */ diff --git a/sys/net80211/ieee80211_adhoc.c b/sys/net80211/ieee80211_adhoc.c index f5e8a301ad28..d252b75899a2 100644 --- a/sys/net80211/ieee80211_adhoc.c +++ b/sys/net80211/ieee80211_adhoc.c @@ -362,8 +362,7 @@ adhoc_input(struct ieee80211_node *ni, struct mbuf *m, */ wh = mtod(m, struct ieee80211_frame *); - if ((wh->i_fc[0] & IEEE80211_FC0_VERSION_MASK) != - IEEE80211_FC0_VERSION_0) { + if (!IEEE80211_IS_FC0_CHECK_VER(wh, IEEE80211_FC0_VERSION_0)) { IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_ANY, ni->ni_macaddr, NULL, "wrong version, fc %02x:%02x", wh->i_fc[0], wh->i_fc[1]); diff --git a/sys/net80211/ieee80211_crypto_tkip.c b/sys/net80211/ieee80211_crypto_tkip.c index d2bc281f15a2..4cfb7542f8ff 100644 --- a/sys/net80211/ieee80211_crypto_tkip.c +++ b/sys/net80211/ieee80211_crypto_tkip.c @@ -860,7 +860,8 @@ michael_mic_hdr(const struct ieee80211_frame *wh0, uint8_t hdr[16]) break; } - if (wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_QOS_DATA) { + /* Match on any QOS frame, not just data */ + if (IEEE80211_IS_QOS_ANY(wh)) { const struct ieee80211_qosframe *qwh = (const struct ieee80211_qosframe *) wh; hdr[12] = qwh->i_qos[0] & IEEE80211_QOS_TID; diff --git a/sys/net80211/ieee80211_hostap.c b/sys/net80211/ieee80211_hostap.c index ac97889a9cef..1dce9a6b5923 100644 --- a/sys/net80211/ieee80211_hostap.c +++ b/sys/net80211/ieee80211_hostap.c @@ -532,8 +532,7 @@ hostap_input(struct ieee80211_node *ni, struct mbuf *m, */ wh = mtod(m, struct ieee80211_frame *); - if ((wh->i_fc[0] & IEEE80211_FC0_VERSION_MASK) != - IEEE80211_FC0_VERSION_0) { + if (!IEEE80211_IS_FC0_CHECK_VER(wh, IEEE80211_FC0_VERSION_0)) { IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_ANY, ni->ni_macaddr, NULL, "wrong version, fc %02x:%02x", wh->i_fc[0], wh->i_fc[1]); diff --git a/sys/net80211/ieee80211_ht.c b/sys/net80211/ieee80211_ht.c index c747d29735a6..28c329ce3d32 100644 --- a/sys/net80211/ieee80211_ht.c +++ b/sys/net80211/ieee80211_ht.c @@ -1014,7 +1014,7 @@ ieee80211_ampdu_reorder(struct ieee80211_node *ni, struct mbuf *m, /* NB: m_len known to be sufficient */ wh = mtod(m, struct ieee80211_qosframe *); - if (wh->i_fc[0] != IEEE80211_FC0_QOSDATA) { + if (!IEEE80211_IS_QOSDATA(wh)) { /* * Not QoS data, shouldn't get here but just * return it to the caller for processing. diff --git a/sys/net80211/ieee80211_mesh.c b/sys/net80211/ieee80211_mesh.c index 8359ea8878d2..c52122ebeb13 100644 --- a/sys/net80211/ieee80211_mesh.c +++ b/sys/net80211/ieee80211_mesh.c @@ -1564,8 +1564,7 @@ mesh_input(struct ieee80211_node *ni, struct mbuf *m, */ wh = mtod(m, struct ieee80211_frame *); - if ((wh->i_fc[0] & IEEE80211_FC0_VERSION_MASK) != - IEEE80211_FC0_VERSION_0) { + if (!IEEE80211_IS_FC0_CHECK_VER(wh, IEEE80211_FC0_VERSION_0)) { IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_ANY, ni->ni_macaddr, NULL, "wrong version %x", wh->i_fc[0]); vap->iv_stats.is_rx_badversion++; diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c index 22bbfe98f4b5..44903ed366fd 100644 --- a/sys/net80211/ieee80211_output.c +++ b/sys/net80211/ieee80211_output.c @@ -603,8 +603,7 @@ ieee80211_validate_frame(struct mbuf *m, return (EINVAL); wh = mtod(m, struct ieee80211_frame *); - if ((wh->i_fc[0] & IEEE80211_FC0_VERSION_MASK) != - IEEE80211_FC0_VERSION_0) + if (!IEEE80211_IS_FC0_CHECK_VER(wh, IEEE80211_FC0_VERSION_0)) return (EINVAL); type = wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK; diff --git a/sys/net80211/ieee80211_sta.c b/sys/net80211/ieee80211_sta.c index 8fd4de162359..97ed52295d6d 100644 --- a/sys/net80211/ieee80211_sta.c +++ b/sys/net80211/ieee80211_sta.c @@ -568,8 +568,7 @@ sta_input(struct ieee80211_node *ni, struct mbuf *m, vap->iv_stats.is_rx_tooshort++; goto err; } - if ((wh->i_fc[0] & IEEE80211_FC0_VERSION_MASK) != - IEEE80211_FC0_VERSION_0) { + if (!IEEE80211_IS_FC0_CHECK_VER(wh, IEEE80211_FC0_VERSION_0)) { IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_ANY, ni->ni_macaddr, NULL, "wrong version, fc %02x:%02x", wh->i_fc[0], wh->i_fc[1]); diff --git a/sys/net80211/ieee80211_wds.c b/sys/net80211/ieee80211_wds.c index 79c2d8a14e00..19827e78706a 100644 --- a/sys/net80211/ieee80211_wds.c +++ b/sys/net80211/ieee80211_wds.c @@ -465,8 +465,7 @@ wds_input(struct ieee80211_node *ni, struct mbuf *m, if (!IEEE80211_IS_MULTICAST(wh->i_addr1)) ni->ni_inact = ni->ni_inact_reload; - if ((wh->i_fc[0] & IEEE80211_FC0_VERSION_MASK) != - IEEE80211_FC0_VERSION_0) { + if (!IEEE80211_IS_FC0_CHECK_VER(wh, IEEE80211_FC0_VERSION_0)) { IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_ANY, ni->ni_macaddr, NULL, "wrong version, fc %02x:%02x", wh->i_fc[0], wh->i_fc[1]); From nobody Mon Nov 11 02:53:57 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XmvJP4X7Qz5cfrP; Mon, 11 Nov 2024 02:53:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XmvJP3yLDz472n; Mon, 11 Nov 2024 02:53:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731293637; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JY3WWyudSnEC9aekMSlX08jH7thEocmnF1rt3pgwKAA=; b=q5adRJke5yBTfAnjKAtG1wTjrQpXHzspEJO0BGLp9V6CW2j+wQe7Fkfdyrt37rL91T3SYd xExly9f7Vyh2Y8TlNj4D3AEZlL7p1E62b76J9iXky3cRIbK7XmBDvRB6pY2NOSZ0rH9DGb q2eNabnqW2APGKVUnZTQ1jJJU0iF4AlkNElxIFqWhWaGX61KT0fp3cx/PfZtkYBxkN9uTD 9OXELVxWeBzxBGgb+YP9Bflvsb42dqsaYtoJHVsZGetWIVWBxmOLgdPr+Bp4xKUUAtotAV 8fTvrL+cfEtS2UkHxocS1b0ufWGxIp07IsrtPFhzjd0TOZA8QCvKzDgDlaYDEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731293637; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JY3WWyudSnEC9aekMSlX08jH7thEocmnF1rt3pgwKAA=; b=JhFLNQiTtX9AOrxFOPQJ+Ry46VjgEfYgLnppQ6OxIOp4zFNNDol3zoPe185OCl6j9JLdV7 5WDMOBCJNWGY8aMK9hDXf+GmtHuihwFxE0bnz830d9ratUcHkR+g7H3tVvK3K1sOA9LY9Q Sn22HRn0oJXLnP1WCo2w1dyKzsIQzIh62nZ673FJaLIQ/p6f2XEOveLvjRBEVrb+4Z4Kof S2kIVFf1oyHF+riKx3UtC+2cFOKi3KnmidC5lEtp0qgT2jxBEFgFIFirvkghqCnyRVZlKq gTh0O3Xp78osPfunvCBl4lDBxhE3dCttpir9qTQSGnEtBnrqSqZIkDqJq3a7Rg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731293637; a=rsa-sha256; cv=none; b=i6bIhPjE1OmzSw2Rf+O6+NC28e8Ubj2V8txYoYcrQiTnK5iEDgq4aEjr47iMxMxiJmzI5L qOyBCBZ2wyDkaBX1wqPEBR+7yBAtYfkPcktQ1QDI/deBaFYcCtTqJVZNd9I077MQafY6D2 lJ+v3Q8K6CgXBWjd7NE9XIszCVbmmzW8bTRS0jV6d7w2Qr+/NrRTDeVHQb2jAKzknUCiqy jK0yWzMSQc+qYa+5P/xu/1iNPq5fHjt0EO3PnXz5/5HflemGTMXdYcH47+ZeoKYKuRzMlQ VnB3/1+ZIWlcves/RevFF/XPOmgl/iPVD9rJVSr+HB423638ZFvz8eNzkXxp1g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XmvJP3NrZz16xJ; Mon, 11 Nov 2024 02:53:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AB2rvZl042609; Mon, 11 Nov 2024 02:53:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AB2rvTx042606; Mon, 11 Nov 2024 02:53:57 GMT (envelope-from git) Date: Mon, 11 Nov 2024 02:53:57 GMT Message-Id: <202411110253.4AB2rvTx042606@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 114080d19973 - main - usb: fix loop in usb_config_parse List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 114080d19973331426cd826f3a961c6ea9216a53 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=114080d19973331426cd826f3a961c6ea9216a53 commit 114080d19973331426cd826f3a961c6ea9216a53 Author: Ed Maste AuthorDate: 2024-10-04 15:49:53 +0000 Commit: Ed Maste CommitDate: 2024-11-11 02:53:18 +0000 usb: fix loop in usb_config_parse By inspection, index increment was missing. PR: 281843 Reported by: Matt Jacobson Reviewed by: bz, markj Fixes: e4611d26265f ("usb(4): Call optional endpoint_uninit() when changing configuration or alternate setting.") Sponsored by: The FreeBSD Foundation --- sys/dev/usb/usb_device.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/usb/usb_device.c b/sys/dev/usb/usb_device.c index 0f3c6a959ad2..e478fa66b6c9 100644 --- a/sys/dev/usb/usb_device.c +++ b/sys/dev/usb/usb_device.c @@ -855,6 +855,7 @@ usb_config_parse(struct usb_device *udev, uint8_t iface_index, uint8_t cmd) if (ep->refcount_alloc != 0) return (USB_ERR_IN_USE); } + ep++; } } From nobody Mon Nov 11 08:23:24 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xn2cY0xZnz5d0Ww; Mon, 11 Nov 2024 08:23: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xn2cY0HKGz4VX0; Mon, 11 Nov 2024 08:23:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731313405; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Dc964JSywBitbQjDHVfmFIMoJ++feZWsye9Qyhqoo80=; b=ZAfUohKyMCByoTJRY+QZMhvoSXvsiHJjsNAe0OGlbrO4k0KoSfQc7hUeR6Me7WJHDEIoRL kR2HNp0+zA2wmopzkKfh78nx/Uk9ndsAPxDOeixJ4HjqZGT8kSylDbGNQHdy32v/9dgiI3 rPc1b4F2WOyfVc0fx1fQEXz09tFK4Y9Dq0cYQLtV/VxCjEoNuhiH7FZZJi2X4BZbds6RfZ R8QFHoEPQwjRcgtEwF9M588hsDmivm2dvAv9gXgIM7IO5NPMZa/Dhcjy3txe6XQK8qI2IH PXISncJMaep2eyKZ2OyBH6GQny2ZaWDLKuTmTYYc9waLq+5fPo5lC1BA4C5k/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731313405; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Dc964JSywBitbQjDHVfmFIMoJ++feZWsye9Qyhqoo80=; b=lij0EV7b5ahFa7QVugk15HkqmFv4FyEnoq+Bj/v1MJxElP54CdA8mmwCm/zj8poVHB9H0R dI9cWpMzx/MTigSvXTbDG5LvSDl5dj5giS4SJCdATz5du8j3bowsrfyoTLPZ/GSTgpOxgf +vS5utF39GnEjeDkoU7W38vX2NIj8SKcMcWTVER8VdzEEVDbvWNFSctdcLGPs6lJvtNYNy VWrMFrWxWKM0YfNaqQAliDW5zoQkDVf1BYgDJfjBGsC8zGPBKX65pkMPjoTJDzydp3Yxme NEsZeGVlBkFLI/dOXHnSIFOqEeUgJ+O+3TV8FL5WT6OLBWbMZmSYbFse2bmG6A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731313405; a=rsa-sha256; cv=none; b=paFPc8n8xTVl5QAjJ5USob0QmeuwfFVsFKKqodaF5RH8lcjcU32bzMRNjwf/lFZESZZ+Ar 40nVm3jQmvOMtXwfomSLrXtwuvGpg8xo2EzWVebMGbGMU9G2Yfsd+cXN5moiZjifp+jDDM OupnEOl2c4rCAqsMqx6VoN9nB7m/iwH1x1V2+T/cV+kW7bDiuyjFC9tHVlp3fLAIrslRPH k7E2f3LJ/o4skAQK8sBTrRmmXNpkcbm2GzBfwMXJWH0o8Aq81gTg8v6bBwdXB0eKUvDGAd lUqnlMzQRgceGLRYUd1acglqYweBc/9AnZiSxH3HwoQ5WSUrkHJ9nUoISZ75Gg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xn2cX718mzJXN; Mon, 11 Nov 2024 08:23:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AB8NOhX056704; Mon, 11 Nov 2024 08:23:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AB8NORB056701; Mon, 11 Nov 2024 08:23:24 GMT (envelope-from git) Date: Mon, 11 Nov 2024 08:23:24 GMT Message-Id: <202411110823.4AB8NORB056701@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michal Meloun Subject: git: 248109448f6a - main - arm: switch the BUSDMA buffers to normal uncached memory List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mmel X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 248109448f6afb3d093a522677aab2975a3e7a15 Auto-Submitted: auto-generated The branch main has been updated by mmel: URL: https://cgit.FreeBSD.org/src/commit/?id=248109448f6afb3d093a522677aab2975a3e7a15 commit 248109448f6afb3d093a522677aab2975a3e7a15 Author: Michal Meloun AuthorDate: 2024-11-08 12:00:57 +0000 Commit: Michal Meloun CommitDate: 2024-11-11 08:22:37 +0000 arm: switch the BUSDMA buffers to normal uncached memory The BUSDMA buffer is treated as normal memory during compilation and compiler is free to inline/optimize basic functions (i.e. memset, memcpy) accessing buffers, including when an instruction is generated that performs a word access to unaligned data. We support this, but only if the buffer in question is mapped as normal memory (cached or not), but not to memory mapped as strongly ordered or device type. MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D47485 --- sys/arm/include/vm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm/include/vm.h b/sys/arm/include/vm.h index 439dbdf440a6..697b48689bd8 100644 --- a/sys/arm/include/vm.h +++ b/sys/arm/include/vm.h @@ -36,7 +36,7 @@ #define VM_MEMATTR_WRITE_THROUGH ((vm_memattr_t)4) #define VM_MEMATTR_DEFAULT VM_MEMATTR_WB_WA -#define VM_MEMATTR_UNCACHEABLE VM_MEMATTR_SO /* misused by DMA */ +#define VM_MEMATTR_UNCACHEABLE VM_MEMATTR_NOCACHE /* used by BUSDMA */ #ifdef _KERNEL /* Don't export aliased VM_MEMATTR to userland */ #define VM_MEMATTR_WRITE_COMBINING VM_MEMATTR_WRITE_THROUGH /* for DRM */ From nobody Mon Nov 11 10:42:10 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xn5hg0BVXz5d7XC; Mon, 11 Nov 2024 10: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xn5hf3vkhz4g7q; Mon, 11 Nov 2024 10: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=1731321730; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EESP5kAB0GYF1Z8W4a5m0okKq7q63A5HThVuBI9ttPw=; b=XHXkw1xmuLHBGaYTF6DgAEbRwTbxprla/v7ByDwCWXH2CV3a8DqHifbPuVw6pu9c/GA1ho HJx3/y4tsB3Z8posB5u5WIEyIwz/2xeg/rzyYa/Wx9SmckNEhJAVdhOakcnqzzBhQYNxPf zPhuqpFA9Mj7lylKn2LL3dZhRHngDsQ7ojZjhvOukHPxOIy+haWJWnLlPeGgpLTSu/oKoA 8/+Nl/z/IPUlWecs0beLh90qwXPJdTc//GbL6jWQ0RQMg/BVfizLDszOtZwSdhbRDCT6ET ybZ6rjtbakCd0BDh7pN0vLgyfopIy1eJrCjc2zoIFBJsHLDLDBcJv35GeY+gcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731321730; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EESP5kAB0GYF1Z8W4a5m0okKq7q63A5HThVuBI9ttPw=; b=l5hBXwWCTwjT1yGjKob1OFo7zZEPpKrV4ut2yhUqjd6yfkfyO13yOtdhhcXKhHQzc/SLtG Ib4N01f1yTz8nML4WAC74syUwmlf+fU/6J4LEjpO4bZfwqMmXiMsj4/uxXOyWqK4L2Pb9Y fVt6ijmC92NvKmJ2ltuLszDVcTX21VLyyUFn+pWjBmEdWHuuFYHZRz6XoV1tlJOKriPiUz ZOpazL2HBRGszjofYeDdUY171PY9RUcfSKs3R2bal46Lf2Nk4v0ueYnb06nZbGmieKpww8 ljS955GOS7OSJ73bEn/aE9NBIYj0sJa2wSBY0emsQFmR+mPOW7dIjGOvENkBbA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731321730; a=rsa-sha256; cv=none; b=tbW1VMJ+snasBeUYBsxI9TGBRDWBcjV8kmExUvYzOqjLKD+u4/85v5WjRmOcdJf8yuwRu4 jM+hgtpDPaILQ+Jma8tIlwsiZVlVwwm96kHDYb4KloEznrPLluEtEQrHy/lfCJ5EBe3VSU gWY1MfFsKnO6HzC7RVXxNoKuxzBMGSDB5+nzzyvAeOQENUzGvVKx2eCPmpQWFvUXZdtsq+ Bo8F77zsAegsIYIcRgqKLCyLvBe5nnbQ9kfVuLK7QCPebSZos47ah+Pd/vpZHi31FniHXI l2wQnMPLOdNntJ6p6imJvBYddrapUBG6CPLuSyS7hYGxL9zcB0hxVO6ZRs70+g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xn5hf2y31zN4j; Mon, 11 Nov 2024 10:42:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ABAgAD4017304; Mon, 11 Nov 2024 10:42:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ABAgA6w017302; Mon, 11 Nov 2024 10:42:10 GMT (envelope-from git) Date: Mon, 11 Nov 2024 10:42:10 GMT Message-Id: <202411111042.4ABAgA6w017302@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Doug Rabson Subject: git: 6686056ca354 - stable/14 - release: add optional OCI images List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dfr X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6686056ca3547c8280bd2423c59c661c2f501409 Auto-Submitted: auto-generated The branch stable/14 has been updated by dfr: URL: https://cgit.FreeBSD.org/src/commit/?id=6686056ca3547c8280bd2423c59c661c2f501409 commit 6686056ca3547c8280bd2423c59c661c2f501409 Author: Doug Rabson AuthorDate: 2024-08-14 15:39:24 +0000 Commit: Doug Rabson CommitDate: 2024-11-10 10:34:42 +0000 release: add optional OCI images This adds three OCI archive format files to the release containing FreeBSD base images suitable for static linked, dynamic linked and shell workloads. The shell image also contains pkg-bootstrap and can be easily extended by installing packages (including pkgbase packages). Reviewed by: dch, cpersiva, jlduran, zlei Differential Revision: https://reviews.freebsd.org/D46759 MFC after: 2 days (cherry picked from commit d03c82c28da86e0812b98b051d24ae5980804ad7) --- release/Makefile | 11 ++++--- release/Makefile.oci | 34 +++++++++++++++++++ release/release.conf.sample | 4 +++ release/release.sh | 47 ++++++++++++++++++++++++++- release/scripts/make-oci-image.sh | 63 ++++++++++++++++++++++++++++++++++++ release/tools/oci-image-dynamic.conf | 11 +++++++ release/tools/oci-image-minimal.conf | 19 +++++++++++ release/tools/oci-image-static.conf | 42 ++++++++++++++++++++++++ share/examples/Makefile | 6 ++++ share/examples/oci/Containerfile.pkg | 27 ++++++++++++++++ share/examples/oci/README | 7 ++++ share/man/man7/release.7 | 14 +++++++- 12 files changed, 279 insertions(+), 6 deletions(-) diff --git a/release/Makefile b/release/Makefile index be0abf84de23..4f95d3ba32ec 100644 --- a/release/Makefile +++ b/release/Makefile @@ -7,14 +7,16 @@ # memstick: Builds memory stick image (memstick.img) # mini-memstick: Builds minimal memory stick image (mini-memstick.img) # ftp: Sets up FTP distribution area (ftp) -# release: Invokes real-release, vm-release, and cloudware-release targets +# release: Invokes real-release, vm-release, cloudware-release and oci-release targets # real-release: Build all media and FTP distribution area # vm-release: Build all virtual machine image targets # cloudware-release: Build all cloud hosting provider targets -# install: Invokes the release-install and vm-install targets +# oci-release: Build all OCI container images +# install: Invokes the release-install, vm-install and oci-install targets # release-install: Copies all release installation media into ${DESTDIR} # vm-install: Copies all virtual machine images into ${DESTDIR} # cloud-install: Copies non-uploaded cloud images into ${DESTDIR} +# oci-install: Copies all OCI container images into ${DESTDIR} # # Variables affecting the build process: # WORLDDIR: location of src tree -- must have built world and default kernel @@ -319,7 +321,7 @@ ftp: packagesystem mkdir -p ftp cp *.txz MANIFEST ftp -release: real-release vm-release cloudware-release +release: real-release vm-release cloudware-release oci-release ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} release-done true @@ -330,7 +332,7 @@ real-release: ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} obj ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} ${RELEASE_TARGETS} -install: release-install vm-install .WAIT cloud-install +install: release-install vm-install oci-install .WAIT cloud-install release-install: .if defined(DESTDIR) && !empty(DESTDIR) @@ -350,3 +352,4 @@ release-install: .include "${.CURDIR}/Makefile.inc1" .include "${.CURDIR}/Makefile.vm" +.include "${.CURDIR}/Makefile.oci" diff --git a/release/Makefile.oci b/release/Makefile.oci new file mode 100644 index 000000000000..461c95f49636 --- /dev/null +++ b/release/Makefile.oci @@ -0,0 +1,34 @@ +# +# +# +# Makefile for building OCI container images. +# + +.if defined(WITH_OCIIMAGES) && !empty(WITH_OCIIMAGES) +OCI_IMAGES= static dynamic minimal +.endif + +oci-install: +.if defined(WITH_OCIIMAGES) && !empty(WITH_OCIIMAGES) + mkdir -p ${DESTDIR}/ociimages +. for _IMG in ${OCI_IMAGES} + cp -p ${.OBJDIR}/container-image-${_IMG}.txz ${DESTDIR}/ociimages +. endfor +.endif + +OCI_TARGETS= +OCI_DEPS_static= +OCI_DEPS_dynamic= container-image-static.txz +OCI_DEPS_minimal= container-image-dynamic.txz + +.for _IMG in ${OCI_IMAGES} +OCI_TARGETS+= container-image-${_IMG}.txz +container-image-${_IMG}.txz: ${OCI_DEPS_${_IMG}} + sh ${.CURDIR}/scripts/make-oci-image.sh ${.CURDIR} ${REVISION} ${BRANCH} ${TARGET_ARCH} ${_IMG} + skopeo copy \ + containers-storage:localhost/freebsd${REVISION:R}-${_IMG}:latest \ + oci-archive:${.OBJDIR}/container-image-${_IMG}.tar:freebsd${REVISION:R}-${_IMG}:${REVISION}-${BRANCH}-${TARGET_ARCH} + ${XZ_CMD} < ${.OBJDIR}/container-image-${_IMG}.tar > ${.OBJDIR}/container-image-${_IMG}.txz +.endfor + +oci-release: ${OCI_TARGETS} diff --git a/release/release.conf.sample b/release/release.conf.sample index 351496dcf6a4..1dd2f2504e30 100644 --- a/release/release.conf.sample +++ b/release/release.conf.sample @@ -114,3 +114,7 @@ PORTBRANCH="main" ## If WITH_CLOUDWARE is set to a non-empty value, this is a list of providers ## to create disk images. #CLOUDWARE="EC2 GCE ORACLE VAGRANT-VIRTUALBOX VAGRANT-VMWARE" + +## If WITH_OCIIMAGES is set to a non-empty value, build Open Container +## Initiative (OCI) base images as part of the release. +#WITH_OCIIMAGES= diff --git a/release/release.sh b/release/release.sh index cee0fbd5643d..d6752e016994 100755 --- a/release/release.sh +++ b/release/release.sh @@ -120,6 +120,9 @@ env_setup() { # cloud providers as part of the release. WITH_CLOUDWARE= + # Set to non-empty to build OCI images as part of the release + WITH_OCIIMAGES= + return 0 } # env_setup() @@ -195,7 +198,8 @@ env_check() { RELEASE_RMAKEFLAGS="${ARCH_FLAGS} ${RELEASE_FLAGS} \ KERNCONF=\"${KERNEL}\" ${CONF_FILES} ${SRCPORTS} \ WITH_DVD=${WITH_DVD} WITH_VMIMAGES=${WITH_VMIMAGES} \ - WITH_CLOUDWARE=${WITH_CLOUDWARE} XZ_THREADS=${XZ_THREADS}" + WITH_CLOUDWARE=${WITH_CLOUDWARE} WITH_OCIIMAGES=${WITH_OCIIMAGES} \ + XZ_THREADS=${XZ_THREADS}" return 0 } # env_check() @@ -288,6 +292,44 @@ extra_chroot_setup() { fi fi + if [ ! -z "${WITH_OCIIMAGES}" ]; then + # Install buildah and skopeo from ports if the ports tree is available; + # otherwise install the pkg. + if [ -d ${CHROOTDIR}/usr/ports ]; then + # Trick the ports 'run-autotools-fixup' target to do the right + # thing. + _OSVERSION=$(chroot ${CHROOTDIR} /usr/bin/uname -U) + REVISION=$(chroot ${CHROOTDIR} make -C /usr/src/release -V REVISION) + BRANCH=$(chroot ${CHROOTDIR} make -C /usr/src/release -V BRANCH) + UNAME_r=${REVISION}-${BRANCH} + GITUNSETOPTS="CONTRIB CURL CVS GITWEB GUI HTMLDOCS" + GITUNSETOPTS="${GITUNSETOPTS} ICONV NLS P4 PERL" + GITUNSETOPTS="${GITUNSETOPTS} SEND_EMAIL SUBTREE SVN" + GITUNSETOPTS="${GITUNSETOPTS} PCRE PCRE2" + PBUILD_FLAGS="OSVERSION=${_OSVERSION} BATCH=yes" + PBUILD_FLAGS="${PBUILD_FLAGS} UNAME_r=${UNAME_r}" + PBUILD_FLAGS="${PBUILD_FLAGS} OSREL=${REVISION}" + PBUILD_FLAGS="${PBUILD_FLAGS} WRKDIRPREFIX=/tmp/ports" + PBUILD_FLAGS="${PBUILD_FLAGS} DISTDIR=/tmp/distfiles" + for _PORT in sysutils/buildah sysutils/skopeo; do + eval chroot ${CHROOTDIR} env ${PBUILD_FLAGS} make -C \ + /usr/ports/${_PORT} \ + FORCE_PKG_REGISTER=1 deinstall install clean distclean + done + else + eval chroot ${CHROOTDIR} env ASSUME_ALWAYS_YES=yes \ + pkg install -y sysutils/buildah sysutils/skopeo + eval chroot ${CHROOTDIR} env ASSUME_ALWAYS_YES=yes \ + pkg clean -y + fi + # Use the vfs storage driver so that this works whether or not + # the build directory is on ZFS. The images are small so the + # performance difference is negligible. + eval chroot ${CHROOTDIR} sed -I .bak -e '/^driver/s/zfs/vfs/' /usr/local/etc/containers/storage.conf + # Remove any stray images from previous builds + eval chroot ${CHROOTDIR} buildah rmi -af + fi + if [ ! -z "${EMBEDDEDPORTS}" ]; then _OSVERSION=$(chroot ${CHROOTDIR} /usr/bin/uname -U) REVISION=$(chroot ${CHROOTDIR} make -C /usr/src/release -V REVISION) @@ -323,6 +365,9 @@ chroot_build_target() { fi eval chroot ${CHROOTDIR} make -C /usr/src ${RELEASE_WMAKEFLAGS} buildworld eval chroot ${CHROOTDIR} make -C /usr/src ${RELEASE_KMAKEFLAGS} buildkernel + if [ ! -z "${WITH_OCIIMAGES}" ]; then + eval chroot ${CHROOTDIR} make -C /usr/src ${RELEASE_WMAKEFLAGS} packages + fi return 0 } # chroot_build_target diff --git a/release/scripts/make-oci-image.sh b/release/scripts/make-oci-image.sh new file mode 100644 index 000000000000..a139a38d1930 --- /dev/null +++ b/release/scripts/make-oci-image.sh @@ -0,0 +1,63 @@ +#! /bin/sh + +# Build an Open Container Initiative (OCI) container image + +curdir=$1; shift +rev=$1; shift +branch=$1; shift +arch=$1; shift +image=$1; shift + +major=${rev%.*} +minor=${rev#*.} + +abi=FreeBSD:${major}:${arch} + +echo "Building OCI freebsd${major}-${image} image for ${abi}" + +. ${curdir}/tools/oci-image-${image}.conf + +init_workdir() { + local abi=$1; shift + local workdir=$(mktemp -d -t oci-images) + + mkdir ${workdir}/repos + cat > ${workdir}/repos/base.conf < /dev/null + mtree -deU -p $m/var -f /etc/mtree/BSD.var.dist > /dev/null + mtree -deU -p $m/usr -f /etc/mtree/BSD.usr.dist > /dev/null + mtree -deU -p $m/usr/include -f /etc/mtree/BSD.include.dist > /dev/null + mtree -deU -p $m/usr/lib -f /etc/mtree/BSD.debug.dist > /dev/null + install_packages ${abi} ${workdir} $m FreeBSD-caroot FreeBSD-zoneinfo + cp /etc/master.passwd $m/etc + pwd_mkdb -p -d $m/etc $m/etc/master.passwd || return $? + cp /etc/group $m/etc || return $? + cp /etc/termcap.small $m/etc/termcap.small || return $? + cp /etc/termcap.small $m/usr/share/misc/termcap || return $? + env DESTDIR=$m /usr/sbin/certctl rehash + # Generate a suitable repo config for pkgbase + case ${branch} in + CURRENT|STABLE|BETA*) + repo=base_latest + ;; + *) + repo=base_release_${minor} + ;; + esac + mkdir -p $m/usr/local/etc/pkg/repos + cat > $m/usr/local/etc/pkg/repos/base.conf < To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Hajimu UMEMOTO Subject: git: 8eaeaf5c4678 - main - usb: Add support for Brainboxes USB-to-Serial adapters List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ume X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8eaeaf5c467866cf72701cdc34f7ab2ee3c2f123 Auto-Submitted: auto-generated The branch main has been updated by ume: URL: https://cgit.FreeBSD.org/src/commit/?id=8eaeaf5c467866cf72701cdc34f7ab2ee3c2f123 commit 8eaeaf5c467866cf72701cdc34f7ab2ee3c2f123 Author: Hajimu UMEMOTO AuthorDate: 2024-11-11 12:14:05 +0000 Commit: Hajimu UMEMOTO CommitDate: 2024-11-11 12:14:05 +0000 usb: Add support for Brainboxes USB-to-Serial adapters PR: 277482 Reported by: Cameron Williams --- sys/dev/usb/serial/uftdi.c | 18 ++++++++++++++++++ sys/dev/usb/usbdevs | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/sys/dev/usb/serial/uftdi.c b/sys/dev/usb/serial/uftdi.c index 458c6a740f7c..3b0400d9b353 100644 --- a/sys/dev/usb/serial/uftdi.c +++ b/sys/dev/usb/serial/uftdi.c @@ -289,8 +289,26 @@ static const STRUCT_USB_HOST_ID uftdi_devs[] = { UFTDI_DEV(BBELECTRONICS, USPTL4, 0), UFTDI_DEV(BBELECTRONICS, USTL4, 0), UFTDI_DEV(BBELECTRONICS, ZZ_PROG1_USB, 0), + UFTDI_DEV(BRAINBOXES, US101, 0), + UFTDI_DEV(BRAINBOXES, US159, 0), + UFTDI_DEV(BRAINBOXES, US235, 0), UFTDI_DEV(BRAINBOXES, US257, 0), UFTDI_DEV(BRAINBOXES, US25701, 0), + UFTDI_DEV(BRAINBOXES, US279_12, 0), + UFTDI_DEV(BRAINBOXES, US279_34, 0), + UFTDI_DEV(BRAINBOXES, US279_56, 0), + UFTDI_DEV(BRAINBOXES, US279_78, 0), + UFTDI_DEV(BRAINBOXES, US313, 0), + UFTDI_DEV(BRAINBOXES, US320, 0), + UFTDI_DEV(BRAINBOXES, US324, 0), + UFTDI_DEV(BRAINBOXES, US346_12, 0), + UFTDI_DEV(BRAINBOXES, US346_34, 0), + UFTDI_DEV(BRAINBOXES, US701_12, 0), + UFTDI_DEV(BRAINBOXES, US701_34, 0), + UFTDI_DEV(BRAINBOXES, US842_12, 0), + UFTDI_DEV(BRAINBOXES, US842_34, 0), + UFTDI_DEV(BRAINBOXES, US842_56, 0), + UFTDI_DEV(BRAINBOXES, US842_78, 0), UFTDI_DEV(CONTEC, COM1USBH, 0), UFTDI_DEV(DRESDENELEKTRONIK, SENSORTERMINALBOARD, 0), UFTDI_DEV(DRESDENELEKTRONIK, WIRELESSHANDHELDTERMINAL, 0), diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index 9a2f6a41c499..a368cf84d9d5 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -1461,8 +1461,26 @@ product BILLIONTON USBE100 0x8511 USBE100 product BILLIONTON USB2AR 0x90ff USB2AR Ethernet /* Brainboxes Limited products */ +product BRAINBOXES US101 0x1011 US-101 USB2Serial 1xRS232 +product BRAINBOXES US159 0x1021 US-159 USB2Serial 1xRS232 +product BRAINBOXES US235 0x1017 US-235 USB2Serial 1xRS232 product BRAINBOXES US257 0x5001 US-257 USB2Serial 2xRS232 product BRAINBOXES US25701 0x5002 US-25701 USB2Serial 2xRS232 +product BRAINBOXES US279_12 0x2021 US-279 USB2Serial 8xRS232 (Port 1 and 2) +product BRAINBOXES US279_34 0x2022 US-279 USB2Serial 8xRS232 (Port 3 and 4) +product BRAINBOXES US279_56 0x2023 US-279 USB2Serial 8xRS232 (Port 5 and 6) +product BRAINBOXES US279_78 0x2024 US-279 USB2Serial 8xRS232 (Port 7 and 8) +product BRAINBOXES US313 0x6001 US-313 USB2Serial 2xRS422/485 +product BRAINBOXES US320 0x1019 US-320 USB2Serial 1xRS422/485 +product BRAINBOXES US324 0x1013 US-324 USB2Serial 1xRS422/485 +product BRAINBOXES US346_12 0x3011 US-346 USB2Serial 4xRS422/485 (Port 1 and 2) +product BRAINBOXES US346_34 0x3012 US-346 USB2Serial 4xRS422/485 (Port 3 and 4) +product BRAINBOXES US701_12 0x2011 US-701 USB2Serial 4xRS232 (Port 1 and 2) +product BRAINBOXES US701_34 0x2012 US-701 USB2Serial 4xRS232 (Port 3 and 4) +product BRAINBOXES US842_12 0x8001 US-842 USB2Serial 8xRS-422/485 (Port 1 and 2) +product BRAINBOXES US842_34 0x8002 US-842 USB2Serial 8xRS-422/485 (Port 3 and 4) +product BRAINBOXES US842_56 0x8003 US-842 USB2Serial 8xRS-422/485 (Port 5 and 6) +product BRAINBOXES US842_78 0x8004 US-842 USB2Serial 8xRS-422/485 (Port 7 and 8) /* Broadcom products */ product BROADCOM BCM2033 0x2033 BCM2033 Bluetooth USB dongle From nobody Mon Nov 11 12:47:12 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xn8Sx1TmJz5dFs3; Mon, 11 Nov 2024 12: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xn8Sx0xwwz4pnj; Mon, 11 Nov 2024 12: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=1731329233; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lpbG6Igwha3Ti4p5jFOnEADkgl9TgEykr1xAjmZ/KGc=; b=NEckqcraE2vdsKOXULSLQp7s5nsH0dRY6zhAh7OLdpHb9OSFotTutjWET+r/zKlHIui3QW RJ8iP8++O3YqC1Ioel7CCH5wiNPWzIx7PkQKkgayn16kvlax1FeNapwrIdyJix81rgG9yQ DRNz4lKd40X3PXTEqWylD7OyofoFgGg4KGr1TKF0zs4dX0sQZA5X56+EMvsHPAGzklSKfi rl7mytoOfCp/rVLlILA7R0BRaEEi7fi+DZoeVh8oydq0P+0ogOFEsjrzqZj/SEU1MlZ31N SP/tZMU/yD9NN+jwwPb4KjGnLAJhZUdbMpc32L4Z20028lPHvQlQXuKXzbIzLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731329233; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lpbG6Igwha3Ti4p5jFOnEADkgl9TgEykr1xAjmZ/KGc=; b=tLiIskia8QLhNHljDH9B5rcoztO9BXRCM+21W2B0m1bKT4ZccK+OFwSHhpS3H4qN2VuY28 dodhUxz1mJibzi1tIk/S0HHQWV94YBSyHhsM29Qk7Z85+qgHYzjapcqT5FkDPstGyNlTfE VeCxjKniCrs5p2im0NS5tLtCQ/XkY3ueHgI6CVrPsHXwnf9bF8VIMnvpkZxwymwgk606gI opKYQvBSFXevdJQPx6SzG1edFFBcZqO6fYxwNi1HvVMw/v21QISIc8TqJbVPeY8fa+yPeZ PVvYuD5LxacIB/jhk7IIm2v12BAmTw9/Jnvh6Vzr5IUx721MaDkLo0rImz9yQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731329233; a=rsa-sha256; cv=none; b=YpQWqXcbSvG53KOmfveEIvcUIuXNoonovIMwGc0iimHF69TzY177iyc1W1uvVOXdaBZTbz RNTaogJI7KivpYFbYDp7cGApT2qEEDo3kwdMpU5/+MPzgN1DUNQO+R7LueAbPQUFhienlt 4VD9affv4yYfqKHO4qQg3xjF+bsN4UNAlpe1IHypBp3jJ9YS31kuE1Ig261x8+1Fpkei0w PdEi45mlz2xgcnJQ2Y1qUgypiEUeAVoBiLG7p5clHZvNxNO3cE+3qr2LKv9HpcsnwFHat4 WCAK0YoF3VLAQNEykquNCT7ZTijC4mmB/ozmyqRdvwvfwipIGbNvriTYC/RICw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xn8Sx0WSKzRBL; Mon, 11 Nov 2024 12:47:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ABClCPt042816; Mon, 11 Nov 2024 12:47:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ABClC6l042813; Mon, 11 Nov 2024 12:47:12 GMT (envelope-from git) Date: Mon, 11 Nov 2024 12:47:12 GMT Message-Id: <202411111247.4ABClC6l042813@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 9e469437993b - main - inet.4: drop "experimetal use" from net0 and net240 descriptions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9e469437993bd17290d145fa7a615a68b2257875 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=9e469437993bd17290d145fa7a615a68b2257875 commit 9e469437993bd17290d145fa7a615a68b2257875 Author: Ed Maste AuthorDate: 2024-11-10 15:41:02 +0000 Commit: Ed Maste CommitDate: 2024-11-11 12:46:58 +0000 inet.4: drop "experimetal use" from net0 and net240 descriptions The sysctls enable any use of 0/8 and 240/4, not only experimental use. Reviewed by: zlei Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D47506 --- share/man/man4/inet.4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man4/inet.4 b/share/man/man4/inet.4 index a12dec49caea..c9267558d6f3 100644 --- a/share/man/man4/inet.4 +++ b/share/man/man4/inet.4 @@ -169,10 +169,10 @@ The following general variables are defined: .It Va accept_sourceroute Boolean: enable/disable accepting of source-routed IP packets (default false). .It Va allow_net0 -Boolean: allow experimental use of addresses in 0.0.0.0/8 as endpoints, +Boolean: allow use of addresses in 0.0.0.0/8 as endpoints, and allow forwarding of packets with these addresses. .It Va allow_net240 -Boolean: allow experimental use of addresses in 240.0.0.0/4 as endpoints, +Boolean: allow use of addresses in 240.0.0.0/4 as endpoints, and allow forwarding of packets with these addresses. .It Va curfrags Integer: Current number of IPv4 fragments across all reassembly queues From nobody Mon Nov 11 14:09:06 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XnBHR0wxKz5bdC8; Mon, 11 Nov 2024 14:09: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XnBHR0KyHz3ymc; Mon, 11 Nov 2024 14:09:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731334147; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m1G2Ck+JoM8lJJXPrV2luNJCyugq8MKGQD/wbcPiYu4=; b=i4AmEBhDjiGLs8f0EhJWNQSMKG47oxzial/FUYUL8Fi7e9E0MyrWpUQ9EBxObRAXBgX2yJ IbUt9/6ct6kxkXmJanon6YUlrHyOhnxxLNvq5gEmAa+0zYuilRIbfsQMciUl4S3+mITE9j M9f7tcC1jHd7HaltMwo28EEBaLyZ5lul+Gxhg/Y1VVfO2lmb+GSlBVMfQ0djz0hSg2AVza iP5nsiq/q2MCVaMmHaSe1q0OdS49dg/VOHx2Tx83fXkyjUEMLwMUVpB8/79tC5lBC4/H9N rngLyl3weWxPKIy1uhbjKiZ7XeB59Q4XZl39ho57RRPzqNKu802e+0hcXrSo5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731334147; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m1G2Ck+JoM8lJJXPrV2luNJCyugq8MKGQD/wbcPiYu4=; b=EIuKsZ0DQpwSS8t9A5sgF2xUhgxdHMoexKhwXnrZ6RXBPLXUY4lAmaO4h5HXXWJNzXkmNu Wf3OCN1F06CAyOB0xa9+nZ85BQaU0BD9Upg/xjUAHY6vcghsSzzTRjdqrclDmdXuRH1eEJ 5bvLOWodbJeLRZXnGKpOFvAxEBHAA93o8jlUAaQ36Ttkoy2/voZAlcGMu0Mg269e3umZhA xpxKnZHG4G0Qp53dpRT/QDm/rYbWfaiu2FoT8tNFiZnGvSGecRauJBMXuri562OiDKj4eB Pp+JYZOtMmWomQ0KkeDF4j5m1nTVRDTdfZrSSKl+z13zVjyHQKRGYDxUlnAAyg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731334147; a=rsa-sha256; cv=none; b=LXv2mJpwv/F6b3i+s55UgDOtzhelaodnImHiPhYjccilP8nfu2z9tIaZWsvgy8I7Mldptk DnC+X7XSpleF1UcVYGNjdvtpNpstsgKxaMaQxlTBsu9gzgRzyNAvUqNLB2q4JCQUqEtfqK Udyn/Hu6/OFnraaLHPJNEt/7/hddFH14qlwSH1AF6bx3UeUVO9lrxEOsny/kGIkCw/nNZP 4r0rZq1+Mp62pwLtEIWPk0/uyrU+CzXhYtt5D/UsAl8IZmrWhfxk2Py9KRct7Erf9EaSr1 cOr2Ec0Ay+58Y3A+i8MXH2aJB4xLnt8LvrhtRIh9+ZsuiBb6173Ja0XN8EEEXw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XnBHQ6hklzTDv; Mon, 11 Nov 2024 14:09:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ABE965J091956; Mon, 11 Nov 2024 14:09:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ABE96la091953; Mon, 11 Nov 2024 14:09:06 GMT (envelope-from git) Date: Mon, 11 Nov 2024 14:09:06 GMT Message-Id: <202411111409.4ABE96la091953@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: de03af6da759 - stable/14 - fstyp: Fix some memory safety bugs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: de03af6da75990e56c45aea2c7eb53a06705b4c1 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=de03af6da75990e56c45aea2c7eb53a06705b4c1 commit de03af6da75990e56c45aea2c7eb53a06705b4c1 Author: Mark Johnston AuthorDate: 2024-10-28 13:51:58 +0000 Commit: Mark Johnston CommitDate: 2024-11-11 14:01:16 +0000 fstyp: Fix some memory safety bugs In the hammer2 label reader, make sure to check for a NULL return from read_buf(). In the NTFS label reader, - Avoid an infinite loop if a record length is 0. - Avoid walking past the end of the buffer. - When a label is found, avoid reading past the end of the buffer. PR: 278281 Reviewed by: emaste MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D47292 (cherry picked from commit 878ede1a0d0f10f851b2bc54be1e28f512bfc016) --- usr.sbin/fstyp/hammer2.c | 2 ++ usr.sbin/fstyp/ntfs.c | 36 ++++++++++++++++++++++++------------ 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/usr.sbin/fstyp/hammer2.c b/usr.sbin/fstyp/hammer2.c index e0c036c7442a..aeb29762fb6b 100644 --- a/usr.sbin/fstyp/hammer2.c +++ b/usr.sbin/fstyp/hammer2.c @@ -220,6 +220,8 @@ read_label(FILE *fp, char *label, size_t size) broot.data_off = (i * HAMMER2_ZONE_BYTES64) | HAMMER2_PBUFRADIX; vols[i] = read_buf(fp, broot.data_off & ~HAMMER2_OFF_MASK_RADIX, sizeof(*vols[i])); + if (vols[i] == NULL) + errx(1, "failed to read volume header"); broot.mirror_tid = vols[i]->voldata.mirror_tid; if (best_i < 0 || best.mirror_tid < broot.mirror_tid) { best_i = i; diff --git a/usr.sbin/fstyp/ntfs.c b/usr.sbin/fstyp/ntfs.c index a3457c285edc..be8095d5ee27 100644 --- a/usr.sbin/fstyp/ntfs.c +++ b/usr.sbin/fstyp/ntfs.c @@ -137,9 +137,8 @@ fstyp_ntfs(FILE *fp, char *label, size_t size) struct ntfs_filerec *fr; struct ntfs_attr *atr; off_t voloff; - char *ap; int8_t mftrecsz; - int recsize; + size_t recsize; #endif /* WITH_ICONV */ filerecp = NULL; @@ -152,7 +151,8 @@ fstyp_ntfs(FILE *fp, char *label, size_t size) goto ok; mftrecsz = bf->bf_mftrecsz; - recsize = (mftrecsz > 0) ? (mftrecsz * bf->bf_bps * bf->bf_spc) : (1 << -mftrecsz); + recsize = (mftrecsz > 0) ? + (mftrecsz * bf->bf_bps * bf->bf_spc) : (1 << -mftrecsz); voloff = bf->bf_mftcn * bf->bf_spc * bf->bf_bps + recsize * NTFS_VOLUMEINO; @@ -165,16 +165,28 @@ fstyp_ntfs(FILE *fp, char *label, size_t size) if (fr->fr_hdrmagic != NTFS_FILEMAGIC) goto fail; - for (ap = filerecp + fr->fr_attroff; - atr = (struct ntfs_attr *)ap, (int)atr->a_type != -1; - ap += atr->reclen) { - if (atr->a_type != NTFS_A_VOLUMENAME) - continue; - - convert_label(ap + atr->a_dataoff, - atr->a_datalen, label, size); - break; + for (size_t ioff = fr->fr_attroff; + ioff + sizeof(struct ntfs_attr) < recsize; + ioff += atr->reclen) { + atr = (struct ntfs_attr *)(filerecp + ioff); + if ((int)atr->a_type == -1) + goto ok; + if (atr->a_type == NTFS_A_VOLUMENAME) { + if ((size_t)atr->a_dataoff + atr->a_datalen > recsize) { + warnx("ntfs: Volume name attribute overflow"); + goto fail; + } + convert_label(filerecp + ioff + atr->a_dataoff, + atr->a_datalen, label, size); + goto ok; + } + if (atr->reclen == 0) { + warnx("ntfs: Invalid attribute record length"); + goto fail; + } } + warnx("ntfs: Volume name not found"); + goto fail; ok: #else From nobody Mon Nov 11 14:09:07 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XnBHS1778z5bd6K; Mon, 11 Nov 2024 14:09: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XnBHS0bwvz3xsf; Mon, 11 Nov 2024 14:09:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731334148; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=356AggNgn2A/pAkxAD1K/ce/ZJLp6bczgEAgaFU971E=; b=eed4UuXr0KvX56FIN295JUL7F+ks3N7+vZKoebH+m0crrQxzt4GSyFDAkhUKMNoZkmaPnN fZTehHqze+hT4etT9YOWdn94XBTavCQuKoMUDBT7u494logPknHftkUKzL0qxU5gCZwQVj NMhZbvaDJGyGfYV9h+XsEh4QNCR0X37QPGQ8BMiS1VzYB4knAfByyID/2zrZ/3lExRGK7Q nQESn27TMozsxicdZLW749wRhY/LDmZoJPaIyZX+k6ZfgAppoqisB/MnRfU3z5G7imMLfU /oa38eHmj/XVpNi8NWxQRjGeokpsC5Yr5R+S3nv/1ft8aW7UMmeZ80HGVKrukA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731334148; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=356AggNgn2A/pAkxAD1K/ce/ZJLp6bczgEAgaFU971E=; b=Ff41LDivvWV2RiG8jBd3saz/sTHviH+GCezNTNJee6i4SI/t4/dcv05wOP1tcU25yORxiA DzVOelsUjL072ffRrKA191FRbvMqjIOzL8okH2ouO4LsZfX4Kz0opbdxrzx5UEZ6j6wRuh Jk6fOiam5kLJDRcysiz9rIg88rSeHU27X/g+ZW9k2PLu0soeBftI+AAs//yMbpbk28ZClc a/vJkhhYOHhKwdYIi2jKr9i0bE8Q3p2BRTrbkY8GdAmbgVZZ+6JNPqmYqUJLe+kE8p+lg1 gGbPIKvHmDhDHy+aDKfpT6M5Nez9uTjvLi94fbqFgZmilGFOANEh0BoQTOlEdg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731334148; a=rsa-sha256; cv=none; b=od0K9p4Zxp2YJoxe9lrUXzE3wTc2Gcmy5IkhDzq4laeObkI99ywUKPsk1Ezz1y1gNl+oRg NDTKtNZG+plVdShP7ziT0jXBshPe35/ArM3zfZU5AoFFRNKUbyLm9BK2AmZYg7DT2OA9Zm B2HfUnXxv/Ch1fIaJNS5gC5TI+LNi5DXu9v8vU+Odki4EUo/S6mUMDX5dW0P1L7PJ8UMO4 8JxvEJS/tJTWY7Ml1cs9LujKH+sAqLFF7vfVCdmJ91ahBcnx5dNFKZ1GBEtYXcz/Z5wef6 fawfGAE+ki5IsNni1u+ji8/inxvM0Vr8Ntz7A1FDc/PhNFQ0UQE97QeeDodweg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XnBHS04bhzSjW; Mon, 11 Nov 2024 14:09:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ABE97K1092004; Mon, 11 Nov 2024 14:09:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ABE97Xv092001; Mon, 11 Nov 2024 14:09:07 GMT (envelope-from git) Date: Mon, 11 Nov 2024 14:09:07 GMT Message-Id: <202411111409.4ABE97Xv092001@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 5b0bc0edac5c - stable/14 - socket: Export the FIB number of 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 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: 5b0bc0edac5c8c2469748442a042037115354eb5 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=5b0bc0edac5c8c2469748442a042037115354eb5 commit 5b0bc0edac5c8c2469748442a042037115354eb5 Author: Mark Johnston AuthorDate: 2024-11-04 14:39:48 +0000 Commit: Mark Johnston CommitDate: 2024-11-11 14:01:34 +0000 socket: Export the FIB number of sockets Reviewed by: zlei MFC after: 1 week Sponsored by: Klara, Inc. Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D47315 (cherry picked from commit 349d1366edd23af0059e1798f436089e861d934f) --- sys/kern/uipc_socket.c | 1 + sys/sys/socketvar.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 84d817c9ada1..4ecd69d509ed 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -5020,6 +5020,7 @@ sotoxsocket(struct socket *so, struct xsocket *xso) xso->so_uid = so->so_cred->cr_uid; xso->so_pgid = so->so_sigio ? so->so_sigio->sio_pgid : 0; SOCK_LOCK(so); + xso->so_fibnum = so->so_fibnum; if (SOLISTENING(so)) { xso->so_qlen = so->sol_qlen; xso->so_incqlen = so->sol_incqlen; diff --git a/sys/sys/socketvar.h b/sys/sys/socketvar.h index f1407b7ea237..b60c8726833b 100644 --- a/sys/sys/socketvar.h +++ b/sys/sys/socketvar.h @@ -615,7 +615,8 @@ struct xsocket { uint32_t so_qlimit; pid_t so_pgid; uid_t so_uid; - int32_t so_spare32[8]; + int32_t so_fibnum; + int32_t so_spare32[7]; int16_t so_type; int16_t so_options; int16_t so_linger; From nobody Mon Nov 11 14:09:08 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XnBHT4nb1z5bd4t; Mon, 11 Nov 2024 14:09: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XnBHT1X8pz3ymY; Mon, 11 Nov 2024 14:09:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731334149; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3tIGvOQebIBEWb+3ljC/MEbnQU/sSKT6w37suDLSLBg=; b=W4JhwjgwqIrjQs5FR4CjHwlbl232WT0GMdC5P8rKmMvVH4MIT3/KjTIqEsAeQk+MZfoffu jR4koWwUlXHF1+Gs+0Pczg3nDvJMq2uWQG/z5uZR4brpjSwyVEQUCk4IsLDMuLUxQkJHSj iNgwN7V6uS1dhkUY8jtPGVUJ11ICJ+c78FiUJ/p4YlCDOtGCgbvOGMY1pGxmmpfVkQ4GZA Ld0Uv7Bdy1DJ/i4lYpXjzTObGTraXY0k6j7ghTaOTHbJOkIL40Gxg+FxHD8/vbGzhOo/AH tiI6EGQE5qBfLDpwcYG7rVIq2h49hmKwTJhFA58lcd81Zq6kpFs0AnC/WcCilw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731334149; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3tIGvOQebIBEWb+3ljC/MEbnQU/sSKT6w37suDLSLBg=; b=bOQpqFi1kJG/+J7svDuW/u/KykoEV54LGXaezPR19ZKj2n+WYXoOBnPPmVs6ysFtIvWT+o 8N82EVhYJ6yWtNFOPtb4Rx+g5VTDTrp79dcx+IMGIl0y9CBke+fqO1BEzDsN1fZe8UPt/z wkvy9KfSda5/DFAY1iMOJCw4k61BcyJyyZ2uUwZxdR1c6zpqLAUZX2Iy10scFvEXzZRmfV RsbhAhhDb3t2cETuDud4UBsRBWmZm/0t7OLlEISRCXaV7+YleAQyaE04gKsJnwC+bEJ8n9 r8HS5BLPE1MeoZ1Cqr93tSCQO3aDxsgQ63wZ65LBkE/KXaaqqZhkbQemN/U8XQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731334149; a=rsa-sha256; cv=none; b=MV8r4v0wJ1XcdLOwhetwiC2ihvbWEjQH6hxPwvw79k5fOk/sD2rEmMXoq0MUFFZf8AHuPF GMvo7FSZHo6/ejPHrvbisjZWwIF72IhM3fnKQM7seUXFWQdurrjDRYLH0Xi3d/3AiZ1IcQ aenRYwhfJKgyO4gKLzM3jiHrPUEwYykDbCoSctVG4RXExgWHv+jzHUTwwpEXQeca5pbBz9 LrkZ4D3wlmabbB5sg6j8O41zKpAmI6eHVMetHW+uh87Z4ck6B/oErGIJqHcMX7SZqPjfWr pCAkkynUKmusIZjee6jZ3wn0GKSfQFMWdrzU/GN2HkY0MlmZVxqc7nm6zzRrEw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XnBHT0mjxzSmC; Mon, 11 Nov 2024 14:09:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ABE98FF092080; Mon, 11 Nov 2024 14:09:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ABE98QS092077; Mon, 11 Nov 2024 14:09:08 GMT (envelope-from git) Date: Mon, 11 Nov 2024 14:09:08 GMT Message-Id: <202411111409.4ABE98QS092077@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 7f0981f8efeb - stable/14 - sockstat: Add a -f option to show FIB numbers of 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 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: 7f0981f8efeb0fb8c97787e7075cb1f62dd239fe Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=7f0981f8efeb0fb8c97787e7075cb1f62dd239fe commit 7f0981f8efeb0fb8c97787e7075cb1f62dd239fe Author: Mark Johnston AuthorDate: 2024-11-04 14:40:30 +0000 Commit: Mark Johnston CommitDate: 2024-11-11 14:01:55 +0000 sockstat: Add a -f option to show FIB numbers of sockets Reviewed by: zlei MFC after: 1 week Sponsored by: Klara, Inc. Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D47316 (cherry picked from commit a471d2b401c9b2d3a95d9139c9a6b123f686a8e9) --- usr.bin/sockstat/sockstat.1 | 7 +++++-- usr.bin/sockstat/sockstat.c | 22 ++++++++++++++++++---- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/usr.bin/sockstat/sockstat.1 b/usr.bin/sockstat/sockstat.1 index d7174b48f8d5..ca486a088b13 100644 --- a/usr.bin/sockstat/sockstat.1 +++ b/usr.bin/sockstat/sockstat.1 @@ -25,7 +25,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd July 9, 2024 +.Dd October 15, 2024 .Dt SOCKSTAT 1 .Os .Sh NAME @@ -33,7 +33,7 @@ .Nd list open sockets .Sh SYNOPSIS .Nm -.Op Fl 46CcIiLlnqSsUuvw +.Op Fl 46CcfIiLlnqSsUuvw .Op Fl j Ar jail .Op Fl p Ar ports .Op Fl P Ar protocols @@ -59,6 +59,8 @@ Display the congestion control module, if applicable. This is currently only implemented for TCP. .It Fl c Show connected sockets. +.It Fl f +Show the FIB number of each socket. .It Fl I Show the local address of the socket to which the current socket is spliced, if any. @@ -228,6 +230,7 @@ $ sockstat -6 -P tcp .Xr fstat 1 , .Xr netstat 1 , .Xr procstat 1 , +.Xr setfib 1 , .Xr inet 4 , .Xr inet6 4 , .Xr protocols 5 diff --git a/usr.bin/sockstat/sockstat.c b/usr.bin/sockstat/sockstat.c index 0481e82efee0..c1886deb89e7 100644 --- a/usr.bin/sockstat/sockstat.c +++ b/usr.bin/sockstat/sockstat.c @@ -83,6 +83,7 @@ static int opt_4; /* Show IPv4 sockets */ static int opt_6; /* Show IPv6 sockets */ static int opt_C; /* Show congestion control */ static int opt_c; /* Show connected sockets */ +static int opt_f; /* Show FIB numbers */ static int opt_I; /* Show spliced socket addresses */ static int opt_i; /* Show inp_gencnt */ static int opt_j; /* Show specified jail */ @@ -141,6 +142,7 @@ struct sock { int family; int proto; int state; + int fibnum; const char *protoname; char stack[TCP_FUNCTION_NAME_LEN_MAX]; char cc[TCP_CA_NAME_MAX]; @@ -772,6 +774,7 @@ gather_inet(int proto) sock->splice_socket = so->so_splice_so; sock->proto = proto; sock->inp_gencnt = xip->inp_gencnt; + sock->fibnum = so->so_fibnum; if (xip->inp_vflag & INP_IPV4) { sock->family = AF_INET; sockaddr(&laddr->address, sock->family, @@ -1205,6 +1208,12 @@ displaysock(struct sock *s, int pos) default: abort(); } + if (opt_f) { + while (pos < offset) + pos += xprintf(" "); + pos += xprintf("%d", s->fibnum); + offset += 7; + } if (opt_I) { if (s->splice_socket != 0) { struct sock *sp; @@ -1330,6 +1339,9 @@ display(void) "USER", "COMMAND", "PID", "FD", "PROTO", opt_w ? 45 : 21, "LOCAL ADDRESS", opt_w ? 45 : 21, "FOREIGN ADDRESS"); + if (opt_f) + /* RT_MAXFIBS is 65535. */ + printf(" %-6s", "FIB"); if (opt_I) printf(" %-*s", opt_w ? 45 : 21, "SPLICE ADDRESS"); if (opt_i) @@ -1454,9 +1466,8 @@ jail_getvnet(int jid) static void usage(void) { - fprintf(stderr, - "usage: sockstat [-46CcIiLlnqSsUuvw] [-j jid] [-p ports] [-P protocols]\n"); - exit(1); + errx(1, + "usage: sockstat [-46CcfIiLlnqSsUuvw] [-j jid] [-p ports] [-P protocols]"); } int @@ -1470,7 +1481,7 @@ main(int argc, char *argv[]) int o, i; opt_j = -1; - while ((o = getopt(argc, argv, "46CcIij:Llnp:P:qSsUuvw")) != -1) + while ((o = getopt(argc, argv, "46CcfIij:Llnp:P:qSsUuvw")) != -1) switch (o) { case '4': opt_4 = 1; @@ -1484,6 +1495,9 @@ main(int argc, char *argv[]) case 'c': opt_c = 1; break; + case 'f': + opt_f = 1; + break; case 'I': opt_I = 1; break; From nobody Mon Nov 11 14:09:10 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XnBHV3Rwgz5bd4v; Mon, 11 Nov 2024 14:09: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XnBHV2nzgz4001; Mon, 11 Nov 2024 14:09:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731334150; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4UhAUiEeAY4GO2Zx52Mnq0Tlm8Tp2I/C8k3LdBW07EY=; b=HzsX9TZP1a7PQs9g2jWQWQK5dHDM9KggRd8wb4bTl65KLLw8DmUq1OP6PO7tcXgXXIcKEZ 7jl0jw2GntdUn509UqSwZ2yXGUVwRALCksHzuTglPPng4ylZgich4BMKD/FS5Pw6DFpLZ2 Dvmue9TWOq8prI7Y3Me6Bxno/vvYglQWhlxI5MFOmdTSFirqqnNqke+z65BceOSdU08fP4 LBeA+i7QUTBsLSYpxEFCPxHug+eg+PQcFCMtTRCFE6TBgAS/pmuuLnd+wp9d9ttmMRNbrA dwM8ixaGpMoytO1uzxf1E46yVmtIG3ydFnakWS9/h244b/h9bxBpM21dIlohig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731334150; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4UhAUiEeAY4GO2Zx52Mnq0Tlm8Tp2I/C8k3LdBW07EY=; b=TQPBUGYZQGGr0n49GNI5XQmuZPtVDZ5s0El+rYYCYBKBZIxwkttXKULzgEGXBC0ThvNruu z7SX2It3y4ly2qBY57489mKPKp4DcXqG90pr2KpRHx5/m4qEH+D8nFC/3+FirUEfnwpFoq gbwhsCXsRu4cjDDOgiHph2iLRRB2ZYnmEqYDifC50kLDOsK7H8YYCrwUaJB2fe8ajBo+Fe 1G09OnA4lCl+JrHTiW1FbHEXLeU5FkhnkseQTP3x/fTR/Yav3QV5aTVKJWPklL9V37Oyzh Uo3G+NwHnrYEHKJJ223bTBMXy/KwtQfDYDYj0RYMmgA/Awv5xiQbTqGeBmRzEw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731334150; a=rsa-sha256; cv=none; b=Kbw86As2WFmQ66/lmyx0OriAtzGWPFCCbJ47FGPdBICfI/NEhJMjjBtoVNNWdztNSvHJXU gZYMwK6bHbb72YNttGFcRVEo4DobX++eANPzqsTMhyALHxtcgqNRG8cfHnOCXFFVPm2X8E R2pncVN6t2Os64N74QN2SEGYqwE0UI8DmhYHJdplVdXhjXUCUG0dUtZVQl4a36QLdArHso j/mNnkRYC9yl6UktNQFr7pGB80stI75g+U6A0fGBMiEeQ5RNBuf+cKep3cmPwTDqCpxunx aXN9IWGPxPhNEdOCzGhzxicnuC12sAjh7bPctiy8JCoieDkAJKhIhvXcq3+vgA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XnBHV1kkTzSsf; Mon, 11 Nov 2024 14:09:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ABE9AEx092136; Mon, 11 Nov 2024 14:09:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ABE9AYT092133; Mon, 11 Nov 2024 14:09:10 GMT (envelope-from git) Date: Mon, 11 Nov 2024 14:09:10 GMT Message-Id: <202411111409.4ABE9AYT092133@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 01a3c17d18ba - stable/14 - if_bridge: Mask MEXTPG if some members don't support 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 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: 01a3c17d18bafbf4e76e9d77e8862525b50602e9 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=01a3c17d18bafbf4e76e9d77e8862525b50602e9 commit 01a3c17d18bafbf4e76e9d77e8862525b50602e9 Author: Mark Johnston AuthorDate: 2024-10-28 13:52:07 +0000 Commit: Mark Johnston CommitDate: 2024-11-11 14:02:17 +0000 if_bridge: Mask MEXTPG if some members don't support it Similar to how the network stack needs to use mb_unmapped_to_ext() to convert mbufs before passing them to an unsupported driver, if_bridge needs to avoid passing M_EXTPG mbufs to interfaces that don't support them. Thus, clear IFCAP_MEXTPG on the bridge if any member interfaces don't handle unmapped mbufs. PR: 278245 Reviewed by: jhb, gallatin MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D47294 (cherry picked from commit 2bbfbf80d3bb828ac782c2d990a1fba0eb51e45a) --- sys/net/if_bridge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c index 723b92d3dcd5..299b6d80dcde 100644 --- a/sys/net/if_bridge.c +++ b/sys/net/if_bridge.c @@ -193,7 +193,7 @@ * List of capabilities to possibly mask on the member interface. */ #define BRIDGE_IFCAPS_MASK (IFCAP_TOE|IFCAP_TSO|IFCAP_TXCSUM|\ - IFCAP_TXCSUM_IPV6) + IFCAP_TXCSUM_IPV6|IFCAP_MEXTPG) /* * List of capabilities to strip From nobody Mon Nov 11 14:09:11 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XnBHW541dz5bcPR; Mon, 11 Nov 2024 14:09: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XnBHW3hplz3ymR; Mon, 11 Nov 2024 14:09:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731334151; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LyG4wvf7uPab1TwdTaatgrMk4AK+EZV8bxrOLoyf/VI=; b=Quk/EfSuKEPNVPm8J9u4cklx+bw6UCf4IAvm5G6xN+61BFFIRagzHls2zNr3C1ZIVQdt4y utUFq79wDZ9YxoTq80r/vntb6NeNkRmJPjlzusxGLujRIXkvoae1+wMimEKtcYyoloKlBD gYC23Aq7CFA/XgVuCXeBXZULiSajTK/sbNaeF3Kr2NXcigtzTx6p4o1RudeQzdX9+4/i1P rG8jGeCkYbHFuZ3YrREi/VFToZhwrfjvFrObGOIVgyzTVwtqvPn7Av2Wf0NRFNWTCIsvQx TWlvdf32C6tXAOZ+U5jdPYmXuE+4TCMiFNMmPfJ3eX0Xzn/OpARIq1sGwFS+Jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731334151; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LyG4wvf7uPab1TwdTaatgrMk4AK+EZV8bxrOLoyf/VI=; b=YEXNGco8jOmTcptJSvO8PqoFTJAKa/dKt5pY9Q58zdnA47BQ4QbOAwrZd8/qpcZPtAUgh8 LxZXwa6yyPNG/qjLAW7Z/+wAByVitqZckDrd5qrZGQtL0UBMtdvT9NYIu4z1HQ2iRCUx54 4f72bxroLgyB5UNFEvxbvQYWt+A+8EmcIYHNH24UK+vhdd8IMBnl5RqBOY1+COQ/1N+Qqj AdQCwLjHgYTe4yT6/Hp0bJFin4r+R1aXbxtyeVTY/3+1t3msP0u8RN2XbrnGzg29tMTIqG fMQcS7cE2q0P+shheOVDfWBCUvH7S6VDS1/miOyrwWEAcjusWu/6uUxRQgOQGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731334151; a=rsa-sha256; cv=none; b=cZEdA9713DjEDz9hiV7j1K1aSp+669JgGFY4xJeexc7WvYO2lTuriuCSX/+8l7S3nNqwXh jN7SxJ/Eiq9LeZQ8ch1P1MAfUPW1h2NTwVMhw96i1YdfC8DHhlTduvMRJKPCOCwZOyMY5M TOgyzOMIk5esvZu6u2tLjPSJWaB+6Di+x+apxf7yOuPqA6PMsPIVzFI2d6b9+4g+x0VO9F z4D5w6pjcxLUVtDeBdAOexfrrfoqriZbzSi/a0oFi9yxrSeaBhtnEGFT0HCjOCuHsAuxRG C5Nl8nrm0zcS3budIGWNLrdrEwhYkDaofCOmdnWJPbOLqHy+hcx+6XnbA6cC9g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XnBHW2jqWzTQh; Mon, 11 Nov 2024 14:09:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ABE9BVp092180; Mon, 11 Nov 2024 14:09:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ABE9BOM092177; Mon, 11 Nov 2024 14:09:11 GMT (envelope-from git) Date: Mon, 11 Nov 2024 14:09:11 GMT Message-Id: <202411111409.4ABE9BOM092177@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: e6f9f493a827 - stable/14 - if_tuntap: Enable MEXTPG support List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e6f9f493a827bb900e324d6790ea0ff465018ee3 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e6f9f493a827bb900e324d6790ea0ff465018ee3 commit e6f9f493a827bb900e324d6790ea0ff465018ee3 Author: Mark Johnston AuthorDate: 2024-10-28 13:52:14 +0000 Commit: Mark Johnston CommitDate: 2024-11-11 14:02:30 +0000 if_tuntap: Enable MEXTPG support Fix tunread() to use m_mbuftouio() instead of manually copying (which doesn't work for unmapped mbufs). Reviewed by: jhb, gallatin MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D47295 (cherry picked from commit 01c738cd5c3938374cce8293c82753d977966154) --- sys/net/if_tuntap.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/sys/net/if_tuntap.c b/sys/net/if_tuntap.c index 54d1908b078c..0dee2260973d 100644 --- a/sys/net/if_tuntap.c +++ b/sys/net/if_tuntap.c @@ -976,11 +976,11 @@ tuncreate(struct cdev *dev) ifp->if_ioctl = tunifioctl; ifp->if_flags = iflags; IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); - ifp->if_capabilities |= IFCAP_LINKSTATE; + ifp->if_capabilities |= IFCAP_LINKSTATE | IFCAP_MEXTPG; if ((tp->tun_flags & TUN_L2) != 0) ifp->if_capabilities |= IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6 | IFCAP_LRO; - ifp->if_capenable |= IFCAP_LINKSTATE; + ifp->if_capenable |= IFCAP_LINKSTATE | IFCAP_MEXTPG; if ((tp->tun_flags & TUN_L2) != 0) { ifp->if_init = tunifinit; @@ -1760,18 +1760,9 @@ tunread(struct cdev *dev, struct uio *uio, int flag) vhdr.hdr.csum_offset); error = uiomove(&vhdr, len, uio); } - - while (m && uio->uio_resid > 0 && error == 0) { - len = min(uio->uio_resid, m->m_len); - if (len != 0) - error = uiomove(mtod(m, void *), len, uio); - m = m_free(m); - } - - if (m) { - TUNDEBUG(ifp, "Dropping mbuf\n"); - m_freem(m); - } + if (error == 0) + error = m_mbuftouio(uio, m, 0); + m_freem(m); return (error); } From nobody Mon Nov 11 14:10:41 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XnBKF43JRz5bd5M; Mon, 11 Nov 2024 14:10: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XnBKF3dqdz41b7; Mon, 11 Nov 2024 14:10:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731334241; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pF8H12G2JQoTah5y1qNvDmuBRRSM9ZZhvfGs4oD9F3U=; b=ZeD6COjxkLjq5RKP/Usy0hO8x0H24jM3Es7U2Et+Wqfd5c4+uPKM/Wn56niLXYfQSWHKA3 zVllGLhttaFLOf6pMaoeqQXgcHKb5OYdR6ARKqLN0FofvARu6PVZ5S/dSJQOrRUH0ozF5x t9TZBh/i5rCUeU42GnTYsQxrBLLI1XVOb4mUhI3VO7w/uTPZE2UT3p2pRs91DJIEkeFk/m fF9WZJlOyKRkNx1wUc3qsuvtmeIuixnFJuRWXXGQC1eFAjKLclyepO1EVyvgRKlj6h5Gdv LTLpg8Bv9hTZgYEjLJfeGwQVnAAa7r6RdS6l4bQIpMr+0QBdem5kE6zSKSKHuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731334241; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pF8H12G2JQoTah5y1qNvDmuBRRSM9ZZhvfGs4oD9F3U=; b=qD6Nrl7jA04lT4hpSDQnWh7KFAKO9qGTgddyy3TYEwDzQ5zVOoNDoDx8MSvzhD4H7X+uVT ZGC1SlCTYbd4K1dFJz+RnlC/sdkjeg0mIbZUyh2thoKhajfToFMZGczjKyjFAFptS/3u0+ q5PahHgVOoyLdiF2fnM3qHK8MvFDzSjioBpsm06XIWf784HiYQcK0Cqoudm4ho5IORmiwi 1xNo6KrLtvcWa2K1jfh3C5zTowFxvd11gtzBDhAICGDOtft62LvW3AzKygC5+PYstpbriY DsI1sG9gRw0hjuDYY5UK5Wx9OvwWmDcKO7nvZkmKqCNyZ7g+mbpTVwKuEGs95w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731334241; a=rsa-sha256; cv=none; b=qykPOFsVNhT2oNjF1D3oOcfcpciBmcMnfIcOAG8FJOCB9zOv4mzJy3KmmlyVqksFz/N2ZX b9lLTyI11gbHWOaCh0UXTAFy1nLEmjaruU4QfwiuZmANHratTWmVD10CZ/uX1nD8h+vkdg D3fHLLYlIKm1zco2bpzBjTTsGXNXZezYRV+u8D5QDHSk59h0WlZTlvHluIMkmUxcV4s/Zr 3l7nl7gKFCNc71G+n9MxnxeNYV4zUli5RwyObKUTQxREHMXRRCJthlq4QUu++jK/ps0OIh EZBfTG1fPmrGIdBrBSqWa7qJM92mQVUSNzDYnU2z7ilCR3b1w5rcksQRG4YIuA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XnBKF36YFzTQl; Mon, 11 Nov 2024 14:10:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ABEAfNG001397; Mon, 11 Nov 2024 14:10:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ABEAf6Y001394; Mon, 11 Nov 2024 14:10:41 GMT (envelope-from git) Date: Mon, 11 Nov 2024 14:10:41 GMT Message-Id: <202411111410.4ABEAf6Y001394@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 75351a04884e - stable/13 - fstyp: Fix some memory safety bugs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 75351a04884e7c79332f9c7a148424bf8cfa2c7f Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=75351a04884e7c79332f9c7a148424bf8cfa2c7f commit 75351a04884e7c79332f9c7a148424bf8cfa2c7f Author: Mark Johnston AuthorDate: 2024-10-28 13:51:58 +0000 Commit: Mark Johnston CommitDate: 2024-11-11 14:01:23 +0000 fstyp: Fix some memory safety bugs In the hammer2 label reader, make sure to check for a NULL return from read_buf(). In the NTFS label reader, - Avoid an infinite loop if a record length is 0. - Avoid walking past the end of the buffer. - When a label is found, avoid reading past the end of the buffer. PR: 278281 Reviewed by: emaste MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D47292 (cherry picked from commit 878ede1a0d0f10f851b2bc54be1e28f512bfc016) --- usr.sbin/fstyp/hammer2.c | 2 ++ usr.sbin/fstyp/ntfs.c | 36 ++++++++++++++++++++++++------------ 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/usr.sbin/fstyp/hammer2.c b/usr.sbin/fstyp/hammer2.c index e0c036c7442a..aeb29762fb6b 100644 --- a/usr.sbin/fstyp/hammer2.c +++ b/usr.sbin/fstyp/hammer2.c @@ -220,6 +220,8 @@ read_label(FILE *fp, char *label, size_t size) broot.data_off = (i * HAMMER2_ZONE_BYTES64) | HAMMER2_PBUFRADIX; vols[i] = read_buf(fp, broot.data_off & ~HAMMER2_OFF_MASK_RADIX, sizeof(*vols[i])); + if (vols[i] == NULL) + errx(1, "failed to read volume header"); broot.mirror_tid = vols[i]->voldata.mirror_tid; if (best_i < 0 || best.mirror_tid < broot.mirror_tid) { best_i = i; diff --git a/usr.sbin/fstyp/ntfs.c b/usr.sbin/fstyp/ntfs.c index a3457c285edc..be8095d5ee27 100644 --- a/usr.sbin/fstyp/ntfs.c +++ b/usr.sbin/fstyp/ntfs.c @@ -137,9 +137,8 @@ fstyp_ntfs(FILE *fp, char *label, size_t size) struct ntfs_filerec *fr; struct ntfs_attr *atr; off_t voloff; - char *ap; int8_t mftrecsz; - int recsize; + size_t recsize; #endif /* WITH_ICONV */ filerecp = NULL; @@ -152,7 +151,8 @@ fstyp_ntfs(FILE *fp, char *label, size_t size) goto ok; mftrecsz = bf->bf_mftrecsz; - recsize = (mftrecsz > 0) ? (mftrecsz * bf->bf_bps * bf->bf_spc) : (1 << -mftrecsz); + recsize = (mftrecsz > 0) ? + (mftrecsz * bf->bf_bps * bf->bf_spc) : (1 << -mftrecsz); voloff = bf->bf_mftcn * bf->bf_spc * bf->bf_bps + recsize * NTFS_VOLUMEINO; @@ -165,16 +165,28 @@ fstyp_ntfs(FILE *fp, char *label, size_t size) if (fr->fr_hdrmagic != NTFS_FILEMAGIC) goto fail; - for (ap = filerecp + fr->fr_attroff; - atr = (struct ntfs_attr *)ap, (int)atr->a_type != -1; - ap += atr->reclen) { - if (atr->a_type != NTFS_A_VOLUMENAME) - continue; - - convert_label(ap + atr->a_dataoff, - atr->a_datalen, label, size); - break; + for (size_t ioff = fr->fr_attroff; + ioff + sizeof(struct ntfs_attr) < recsize; + ioff += atr->reclen) { + atr = (struct ntfs_attr *)(filerecp + ioff); + if ((int)atr->a_type == -1) + goto ok; + if (atr->a_type == NTFS_A_VOLUMENAME) { + if ((size_t)atr->a_dataoff + atr->a_datalen > recsize) { + warnx("ntfs: Volume name attribute overflow"); + goto fail; + } + convert_label(filerecp + ioff + atr->a_dataoff, + atr->a_datalen, label, size); + goto ok; + } + if (atr->reclen == 0) { + warnx("ntfs: Invalid attribute record length"); + goto fail; + } } + warnx("ntfs: Volume name not found"); + goto fail; ok: #else From nobody Mon Nov 11 14:10:42 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XnBKG6pmLz5bdCR; Mon, 11 Nov 2024 14:10: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XnBKG53r1z41Cb; Mon, 11 Nov 2024 14:10:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731334242; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n4CwiSpmeJENDIQaZccIIdLZQpxvbL4JQAXmjsvvSNQ=; b=uTtr9ZMz85umSbirBbIny5/up8tFOKqa2s1euIt3LMmbn06UhfF7DhRu1On2gMQWqDIzW7 71D8gT2lNxDthFeDwhX0YLBkf3XyuWFvPPeCYfdLFoiujbJKz1UMVtCdFFjhx8YF/s6ovD +H1QpRua/5uD7V7mIhBJ/oBPhpVGLXWfi1bar8cyWS2aDvUE9IFEHci7qf1sLwjbbH1UcT bho/+6PUFMDIVqPvEacO2YYpiJyJDKbUT6g2GczD/WoTRzWUHZC2sBU1orYGmcdTNiYh1p A+X0HHwzD36whYMYsqekK48GUmcfH1MtDyw+jcaYb1OCm04Bb7tx+HS9qXViTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731334242; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n4CwiSpmeJENDIQaZccIIdLZQpxvbL4JQAXmjsvvSNQ=; b=t2sBdLQxPGMGUj1yt4VaDy9yIhYNqvbztnM+b1QOHEjbRQoTFHWLFex1Otl5UuV07mIeHr qDvWq7qt/IHP9Tfe/rbjn3Zp++ogHMcFsFqOl2nv1US3AqVkf4SV2P0TEazC8mp7GCW47z Rc7gH1VbvcYgnDI/WjIJCPn9TzKDw5mGSmvunt4KigKtambezmlZsm0cc1Ufc/ceZvv/Eh 80Xa6X77rMA74BZbOYYzCpUCabDMahx4y43T6u1SXaXOE6vU4eO3U1jnztKD/PxrYpzhbz pLVdyhUjFpvsdkvPW8vwSQnHPXKjIafm+tQYsv9HSAWxVxljyMG1jdhnmwpYNQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731334242; a=rsa-sha256; cv=none; b=Ofi/uYBwz9GboNpwVP8x+EBDGhwXXBcmuoQSwHh+7UgKyZZQOqeIao9cPhOotFurPyppZM GQeyxFwvmYDybul+AUj+gUHuDOlgCl1XRjnUctdMYeeWLCfD+pkKtiPvulb04LIVDJtuRm tT13EqYYLfEPHblKBonADVwrugpVP6EV4PDQRVbjz61dkK64HMgJ9s4nPohXdf9gtA+C4s Ju914WiaGdGw7DQd2/WrKY8qsfdnHq/X23L6mRaGKFsOs5CrtDeVLlXrueQ9S6yiIKSFFf j572XWEmefs7R7vnC8ZTrWe9l7c2BYOO7OkTgLvo01zN0A4oIb5Bqe9eovGAYA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XnBKG4PYrzT14; Mon, 11 Nov 2024 14:10:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ABEAg4g001451; Mon, 11 Nov 2024 14:10:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ABEAgVm001448; Mon, 11 Nov 2024 14:10:42 GMT (envelope-from git) Date: Mon, 11 Nov 2024 14:10:42 GMT Message-Id: <202411111410.4ABEAgVm001448@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 3b7acf9a3b24 - stable/13 - if_bridge: Mask MEXTPG if some members don't support 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 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/13 X-Git-Reftype: branch X-Git-Commit: 3b7acf9a3b2428f86291e48298ee9bae8f1276c7 Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3b7acf9a3b2428f86291e48298ee9bae8f1276c7 commit 3b7acf9a3b2428f86291e48298ee9bae8f1276c7 Author: Mark Johnston AuthorDate: 2024-10-28 13:52:07 +0000 Commit: Mark Johnston CommitDate: 2024-11-11 14:02:21 +0000 if_bridge: Mask MEXTPG if some members don't support it Similar to how the network stack needs to use mb_unmapped_to_ext() to convert mbufs before passing them to an unsupported driver, if_bridge needs to avoid passing M_EXTPG mbufs to interfaces that don't support them. Thus, clear IFCAP_MEXTPG on the bridge if any member interfaces don't handle unmapped mbufs. PR: 278245 Reviewed by: jhb, gallatin MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D47294 (cherry picked from commit 2bbfbf80d3bb828ac782c2d990a1fba0eb51e45a) --- sys/net/if_bridge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c index d94b1d59afbd..b392a9c69a7f 100644 --- a/sys/net/if_bridge.c +++ b/sys/net/if_bridge.c @@ -200,7 +200,7 @@ extern void nd6_setmtu(struct ifnet *); * List of capabilities to possibly mask on the member interface. */ #define BRIDGE_IFCAPS_MASK (IFCAP_TOE|IFCAP_TSO|IFCAP_TXCSUM|\ - IFCAP_TXCSUM_IPV6) + IFCAP_TXCSUM_IPV6|IFCAP_MEXTPG) /* * List of capabilities to strip From nobody Mon Nov 11 14:10:30 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XnBLW5nFNz5bd09; Mon, 11 Nov 2024 14:11:47 +0000 (UTC) (envelope-from herbert@gojira.at) Received: from mail.bsd4all.net (mail.bsd4all.net [IPv6:2a01:4f8:13b:240c::25]) (using TLSv1.3 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 (P-384) client-digest SHA384) (Client CN "mail.bsd4all.net", Issuer "E6" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XnBLV3mptz4214; Mon, 11 Nov 2024 14:11:46 +0000 (UTC) (envelope-from herbert@gojira.at) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gojira.at header.s=mail202005 header.b=I7V3cpM3; spf=pass (mx1.freebsd.org: domain of herbert@gojira.at designates 2a01:4f8:13b:240c::25 as permitted sender) smtp.mailfrom=herbert@gojira.at; dmarc=none Date: Mon, 11 Nov 2024 15:10:30 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=gojira.at; s=mail202005; t=1731334297; bh=7YKKlkMf7WRxaZJL8df2MwRhsDSmGNR4W/mukXj2sFs=; h=Date:Message-ID:From:To:Cc:Subject:MIME-Version:Content-Type; b=I7V3cpM3zpnUEfyxKT4K3koR3hFfrxnhqhlzECbzGjal9Mgc+9JslE0G8lB+Ipbxk HMu1IZh19cg+ODuckaWdN6sSHnx4lvfKGboShcLpUpuyVd6IJQrCtjeuPSPOmYnUzu fTqNEvGNAGPuvum91X00ojXGlAq135EUOHlXOi5OiMxuJAHKcCKtn7ZFBq2NUn1I/H pvwz4uo4Xaw/OxLlYfpjPylGNmmIcRShXZlF4TvintlnP+/YzdqC3Zq2bxuWtLxH3c 9nqgjvdYFLD6ltiSrgQ3Zve2kXVNVMpq0UPa0Uko6KENxLU7UWlC0Ez7dvforgsL6y 44tnIjlIbjkIg== Message-ID: <877c99lv3d.wl-herbert@gojira.at> From: "Herbert J. Skuhra" To: Warner Losh Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: a85d870007e7 - main - man.sh: revert trapping SIGPIPE In-Reply-To: <202406280035.45S0ZKh9096365@gitrepo.freebsd.org> References: <202406280035.45S0ZKh9096365@gitrepo.freebsd.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/31.0 Mule/6.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 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-Spamd-Result: default: False [-2.46 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.96)[-0.957]; R_SPF_ALLOW(-0.20)[+ip6:2a01:4f8:13b:240c::25]; R_DKIM_ALLOW(-0.20)[gojira.at:s=mail202005]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/32, country:DE]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_COUNT_ZERO(0.00)[0]; DMARC_NA(0.00)[gojira.at]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@FreeBSD.org,dev-commits-src-main@FreeBSD.org]; DKIM_TRACE(0.00)[gojira.at:+] X-Rspamd-Queue-Id: 4XnBLV3mptz4214 X-Spamd-Bar: -- On Fri, 28 Jun 2024 02:35:20 +0200, Warner Losh wrote: > > The branch main has been updated by imp: > > URL: https://cgit.FreeBSD.org/src/commit/?id=a85d870007e7dd94242a2084dbb750438332ac1e > > commit a85d870007e7dd94242a2084dbb750438332ac1e > Author: Alexander Ziaee > AuthorDate: 2024-06-10 04:04:51 +0000 > Commit: Warner Losh > CommitDate: 2024-06-28 00:34:33 +0000 > > man.sh: revert trapping SIGPIPE > > PR: 279542 > Fixes: 14a5c1068d37 > Reported by: emaste > Reviewed by: imp, emaste, jilles > Pull Request: https://github.com/freebsd/freebsd-src/pull/1283 > --- > usr.bin/man/man.sh | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/usr.bin/man/man.sh b/usr.bin/man/man.sh > index 7461153942f5..f4037ed92215 100755 > --- a/usr.bin/man/man.sh > +++ b/usr.bin/man/man.sh > @@ -36,9 +36,6 @@ ulimit -t 20 > # do not ignore the exit status of roff tools > set -o pipefail > > -# ignore SIGPIPE exits because pagers may exit before reading all their input. > -trap '' SIGPIPE > - > # Usage: add_to_manpath path > # Adds a variable to manpath while ensuring we don't have duplicates. > # Returns true if we were able to add something. False otherwise. Should this be merged to stable/14 and releng/14.2? From nobody Mon Nov 11 16:39:39 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XnFd76tH1z5cJPd; Mon, 11 Nov 2024 16:39: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XnFd75dL0z4GMM; Mon, 11 Nov 2024 16:39:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731343179; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MAb2xmr9tcazybh9vDxIpQr7drwYMJmQVybltl1cUgM=; b=W5uI8ZfUk1tkqxkjTOqg4OSayEwpOk6mqYL0IGU9VXFMGdJFnEEMB3sz9KZA8xXVwRoNv0 tKw65b8quA/cSUT+TESuCzLSUNafqE5HJRJDfzXyHVKgEtiLj8jo/3kY8nB1TarOTMAhfN Iyjh31X6UNwHnftGoCFPcDLrXq03IK7Lc5787iqvlkXsqSvZLb/FYdrt/ZeHvxDMyrTZpO o73wtdtrvlW6QaBleE0ntSJ3rUa4jmmatz+EA6r4qItI5dCIyShODp9lyNsFMuqrJAlcS8 sQ26VawiH88wJi3Rg/mOTHeJ6uuD4/FyRqS2eDX7PKWysme1vi45SotbEGN1MA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731343179; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MAb2xmr9tcazybh9vDxIpQr7drwYMJmQVybltl1cUgM=; b=kPRvxxcFe+ASvUT797++Eak2LPTA8vffX/vYOFvXtedJsvdFVOG6ls09WaziBzjrOF4xMd eXx6JYKsXZTdU6xalsJnII7LYrQ/kiqPenHuDc1QxqUjy308dKpC+PX21CG3R91uMiudec qDQklWGWE6lvcyD6j70E6c38gYJFqZBdBv5D6f2xUPdk4o8zLL3ltut9sEiAuSzE+9q55s refO1dJAlO0HpbNJGzdhEhm3vOXlVpKZi5OKerM/V14Wv+EBYfindwDqNA+0qd4IGHA1nA LSSJsFNkObAzF/aKz1m7za++NPGle+CphxbyHgGhVrMQTTqwjq2r0eIA4/mwjA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731343179; a=rsa-sha256; cv=none; b=e6rx8vwLzO+EonlaEaVkD2uinKZLv1EFbS9dn/0exPasQOxnNacfXzoEXGNZ69svXkWm3o nIYZPEAlOs1Pemx+7pXaCAQ3VljfnHw9YmmTSMSG6pgu4mhuHLSsKTWRDMiKpGUw/Eqnuo 5LgL5Nbhfw/TKYp7dSEIwzOeL/yTOaD++sE5BPDQgMzGsYYgzwQ2ND8RtZNEum4f5eWawO h6jh0NzduMhOYreX5gHd0Hz1DZpU0/wH8ndMcQseU693GFb0c97R5pzg+C6Z2+xNdCVVi2 AiSkPzilnj80zXdmXALy6je40XzClFZQI9GQeFOs7Hny9dH/YCmief7mLgYwYg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XnFd74Q4WzYRK; Mon, 11 Nov 2024 16:39:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ABGdduM070452; Mon, 11 Nov 2024 16:39:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ABGddRw070449; Mon, 11 Nov 2024 16:39:39 GMT (envelope-from git) Date: Mon, 11 Nov 2024 16:39:39 GMT Message-Id: <202411111639.4ABGddRw070449@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 3ff90d91b433 - main - nvmf: Schedule requests across multiple I/O queues List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3ff90d91b433c1eafe857ba21470db5e5052b3b6 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=3ff90d91b433c1eafe857ba21470db5e5052b3b6 commit 3ff90d91b433c1eafe857ba21470db5e5052b3b6 Author: John Baldwin AuthorDate: 2024-11-11 16:37:32 +0000 Commit: John Baldwin CommitDate: 2024-11-11 16:37:32 +0000 nvmf: Schedule requests across multiple I/O queues Similar to nvme(4), use the current CPU to select which I/O queue to use. The assignment in nvmf_attach() had to be moved down since sc->num_io_queues is initialized in nvmf_establish_connection(). Note that nvmecontrol(8) still defaults to using a single I/O queue for an association. Sponsored by: Chelsio Communications --- sys/dev/nvmf/host/nvmf.c | 5 ++--- sys/dev/nvmf/host/nvmf_var.h | 5 +++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/dev/nvmf/host/nvmf.c b/sys/dev/nvmf/host/nvmf.c index 804e7528c931..c726e36e1fae 100644 --- a/sys/dev/nvmf/host/nvmf.c +++ b/sys/dev/nvmf/host/nvmf.c @@ -479,9 +479,6 @@ nvmf_attach(device_t dev) nvmf_init_aer(sc); - /* TODO: Multiqueue support. */ - sc->max_pending_io = ivars->io_params[0].qsize /* * sc->num_io_queues */; - error = nvmf_establish_connection(sc, ivars); if (error != 0) goto out; @@ -509,6 +506,8 @@ nvmf_attach(device_t dev) NVME_CAP_HI_MPSMIN(sc->cap >> 32))); } + sc->max_pending_io = ivars->io_params[0].qsize * sc->num_io_queues; + error = nvmf_init_sim(sc); if (error != 0) goto out; diff --git a/sys/dev/nvmf/host/nvmf_var.h b/sys/dev/nvmf/host/nvmf_var.h index 0e52f36a80a5..e9f33207fea1 100644 --- a/sys/dev/nvmf/host/nvmf_var.h +++ b/sys/dev/nvmf/host/nvmf_var.h @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -112,8 +113,8 @@ struct nvmf_completion_status { static __inline struct nvmf_host_qpair * nvmf_select_io_queue(struct nvmf_softc *sc) { - /* TODO: Support multiple queues? */ - return (sc->io[0]); + u_int idx = curcpu * sc->num_io_queues / (mp_maxid + 1); + return (sc->io[idx]); } static __inline bool From nobody Mon Nov 11 16:39:40 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XnFd91XHmz5cJPf; Mon, 11 Nov 2024 16:39: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XnFd9038Sz4GTc; Mon, 11 Nov 2024 16:39:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731343181; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=v7AbXEOj9blkf8CuDQOVAJ95SToZFwLMzOqBtA5jLT8=; b=HetJNdt6sHvj6gFIp5mr0poPnQp5owA1j7LACUGMYYzAp20SQ8BBtUF1MWQgEMxKKJMgRH YOqgaxznOnCxvsUcu1Jilf6C1BB/JCig7+BwH0JuwazIImcetZR9vyq1LI9sqIAc2AV+W8 X+syDVKODpJ3m6gsUPhxWfbWVMSZKxeQc+QJ295yu+09NpeqfKyssJSQlwQya/5sx6Z1sG C/DO+q5ZMC7LCOWe4+7ZE+ag+yWB7/92O0tBfVG0DFbqND2b7jsSlIjQZ2vIBEo2FRnHau RkWz+4vM1fEhaijx5pPqtzfYHuTqI1eHLVKAzVD0BcK2UycTGH2Vo9sLqDiaoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731343181; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=v7AbXEOj9blkf8CuDQOVAJ95SToZFwLMzOqBtA5jLT8=; b=Hh0M5lNbK/wV90gy9tfT6vEM2sWq4WFHmr7MBt7wCb1XSvexATFRn4jN6MysHsUaQ29rxn Q3CaFzZUmG5haaLo/KyqE9Qdt2o4EXG5RE7MI6YfsEZRtcynm8plW1W9tQ4vDNWg9UFhpb mojcsBE47R+IjHH58Lk8IpBWk/WTTu5dATcJH0qqhonD0k8j0VSXi7FYC+rfWRRdIX83LU JCT8qeGqeFsEnaaUz6VRWdkDVgIl8GYi1t6iuRLFjt/ZBCFeP6MNyPrtkY7Kuo17N/FQKu RCExNJsyywk5BASg6ThRkD7doIfrUcy61XkWkDF2ohiw1qeiSwa8NviKfQquwA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731343181; a=rsa-sha256; cv=none; b=qWddBct4AKCF+O1F2RZyi25X/qFKadjOg2ZuhA48+eEV7qeMcLzPeRF+byU3ra+BhfHnS3 59Le3UTcWor/Gf7IqO/X9Avw6mL09IApN2wPhJxyMHs9whIl3kMORpTNPTw7+lZZEDacCl OhGKVKSxKxPEsYVSr3w47PMHQTW1VLqLkc5lBifrgjhkPHBqOvp4eap6M+mIKS5IARaDFN l6vZs8f3V6g5NzmGMFmrSDKzpqXOeVvdcmlYuS7G1DzSVlkNaAFzOzheqdLJpIoT5e3Ehw KF+/aRxqeGf2PhNCKBbQv1wV55H9wKPooug8M2pWyXH0EuCmV1GgzAXnkHwcLQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XnFd854G9zZ4L; Mon, 11 Nov 2024 16:39:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ABGdeKJ070494; Mon, 11 Nov 2024 16:39:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ABGde9B070491; Mon, 11 Nov 2024 16:39:40 GMT (envelope-from git) Date: Mon, 11 Nov 2024 16:39:40 GMT Message-Id: <202411111639.4ABGde9B070491@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 4d3b659f24a8 - main - nvmf: Track SQ flow control List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4d3b659f24a88f76557019e6f3192760bdebfbdf Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=4d3b659f24a88f76557019e6f3192760bdebfbdf commit 4d3b659f24a88f76557019e6f3192760bdebfbdf Author: John Baldwin AuthorDate: 2024-11-11 16:39:05 +0000 Commit: John Baldwin CommitDate: 2024-11-11 16:39:05 +0000 nvmf: Track SQ flow control This isn't really needed since the host driver never submits more commands to a queue than it can hold, but I noticed that the recently-added SQ head and tail sysctl nodes were not updating. This fixes that and also uses these values to assert that there we never submit a command while a queue pair is full. Sponsored by: Chelsio Communications --- sys/dev/nvmf/host/nvmf_qpair.c | 33 ++++++++++++++++++++++++++++----- sys/dev/nvmf/nvmf_transport.c | 8 ++++++++ sys/dev/nvmf/nvmf_transport.h | 1 + 3 files changed, 37 insertions(+), 5 deletions(-) diff --git a/sys/dev/nvmf/host/nvmf_qpair.c b/sys/dev/nvmf/host/nvmf_qpair.c index 1aeb0535eacf..b03ecfa081d3 100644 --- a/sys/dev/nvmf/host/nvmf_qpair.c +++ b/sys/dev/nvmf/host/nvmf_qpair.c @@ -115,8 +115,23 @@ nvmf_dispatch_command(struct nvmf_host_qpair *qp, struct nvmf_host_command *cmd) struct nvmf_softc *sc = qp->sc; struct nvme_command *sqe; struct nvmf_capsule *nc; + uint16_t new_sqtail; int error; + mtx_assert(&qp->lock, MA_OWNED); + + qp->submitted++; + + /* + * Update flow control tracking. This is just a sanity check. + * Since num_commands == qsize - 1, there can never be too + * many commands in flight. + */ + new_sqtail = (qp->sqtail + 1) % (qp->num_commands + 1); + KASSERT(new_sqtail != qp->sqhd, ("%s: qp %p is full", __func__, qp)); + qp->sqtail = new_sqtail; + mtx_unlock(&qp->lock); + nc = cmd->req->nc; sqe = nvmf_capsule_sqe(nc); @@ -180,11 +195,23 @@ nvmf_receive_capsule(void *arg, struct nvmf_capsule *nc) return; } + /* Update flow control tracking. */ + mtx_lock(&qp->lock); + if (qp->sq_flow_control) { + if (nvmf_sqhd_valid(nc)) + qp->sqhd = le16toh(cqe->sqhd); + } else { + /* + * If SQ FC is disabled, just advance the head for + * each response capsule received. + */ + qp->sqhd = (qp->sqhd + 1) % (qp->num_commands + 1); + } + /* * If the queue has been shutdown due to an error, silently * drop the response. */ - mtx_lock(&qp->lock); if (qp->qp == NULL) { device_printf(sc->dev, "received completion for CID %u on shutdown %s\n", cid, @@ -215,8 +242,6 @@ nvmf_receive_capsule(void *arg, struct nvmf_capsule *nc) } else { cmd->req = STAILQ_FIRST(&qp->pending_requests); STAILQ_REMOVE_HEAD(&qp->pending_requests, link); - qp->submitted++; - mtx_unlock(&qp->lock); nvmf_dispatch_command(qp, cmd); } @@ -420,7 +445,5 @@ nvmf_submit_request(struct nvmf_request *req) ("%s: CID already busy", __func__)); qp->active_commands[cmd->cid] = cmd; cmd->req = req; - qp->submitted++; - mtx_unlock(&qp->lock); nvmf_dispatch_command(qp, cmd); } diff --git a/sys/dev/nvmf/nvmf_transport.c b/sys/dev/nvmf/nvmf_transport.c index ea4aee8cc7ae..316d1571e61d 100644 --- a/sys/dev/nvmf/nvmf_transport.c +++ b/sys/dev/nvmf/nvmf_transport.c @@ -180,6 +180,14 @@ nvmf_capsule_cqe(struct nvmf_capsule *nc) return (&nc->nc_cqe); } +bool +nvmf_sqhd_valid(struct nvmf_capsule *nc) +{ + KASSERT(nc->nc_qe_len == sizeof(struct nvme_completion), + ("%s: capsule %p is not a response capsule", __func__, nc)); + return (nc->nc_sqhd_valid); +} + uint8_t nvmf_validate_command_capsule(struct nvmf_capsule *nc) { diff --git a/sys/dev/nvmf/nvmf_transport.h b/sys/dev/nvmf/nvmf_transport.h index 549170b25940..bbd830eba576 100644 --- a/sys/dev/nvmf/nvmf_transport.h +++ b/sys/dev/nvmf/nvmf_transport.h @@ -78,6 +78,7 @@ int nvmf_transmit_capsule(struct nvmf_capsule *nc); void nvmf_abort_capsule_data(struct nvmf_capsule *nc, int error); void *nvmf_capsule_sqe(struct nvmf_capsule *nc); void *nvmf_capsule_cqe(struct nvmf_capsule *nc); +bool nvmf_sqhd_valid(struct nvmf_capsule *nc); /* Controller-specific APIs. */ From nobody Mon Nov 11 18:46:24 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XnJRN2YDCz5cSNS; Mon, 11 Nov 2024 18:46: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XnJRN22Bkz4Qq7; Mon, 11 Nov 2024 18:46:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731350784; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KK2UkIhRzjumYKedpHjwgFcSKSTJty9YlibBnwEaNso=; b=Cw/JQwqTX3wzrjRLlVioBLGdsNi8utyDj7TtpU+NIicofbj0wwLxiYjroTCFVoXBDJk5pj RLmY3eJglnUENMwTfhxUM4FbfLdhYC79LT/nbhhQbygvB9+UHU7xb1Hqojf4ZuJJ05EBi6 7D5hbLS4aWOQPu67J00kBgcm3DqcJL/gt+KxBCoINNPRhVPcbvnr5qJTAxtkIdK1Xsuvio En1GPa4Ox6gAAv42xnnoXtUdkaw8bocc2gJeXxK1Ae1qTaWGhhhQXu/98LdwvY22mla2uC IB4CWkaxWw2Krpe36k5az87eXMbcepECfKykYNQXePG5SXHYR/4gwS1h8iv59g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731350784; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KK2UkIhRzjumYKedpHjwgFcSKSTJty9YlibBnwEaNso=; b=Ajy6ADPjawRPw0FYwrthAXehuiAReJCKSCnz2HkgmKeajvVIGGnDoggPknNufgUU2YXWak hRMrWfdvnWWQ5Vl2FRXzVLbIEXzm3pwL3/cKSc2m6fLUyKzNatGTWRCACf8Q9Tai3gHxr6 N4YRslespg1RMQudh0WY62YEW+TIZKiqv4lTgXR25O2g7648V4Ggi5LMqBMUwpi+nWWCXj j4KVDtB7k/PnI/r41/qNv9GncVcqnQ41E8+qYTxucpxHS9juJeQem2lWqeWNtos84QQrMf WqImNHs/T6jn2lEavWSXlvPrfAsdSIJQmrgFGHYXNdES5GGgukai4EOfKmxPIg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731350784; a=rsa-sha256; cv=none; b=YJXmuXtMnKSlZ30XuGoFOdi4ZS8DXJFpdo4EkesTJSX+qGz+ZVZUpZjSyE/ciuFQEBDsGo LmfkfB37Ku9Tp4LmG9gB4fhW2V74AueMpW4xxyf7kB9mvW4jQwzyoQkfOyRIDK0Se+l4+g IUpHC0BlGFfse97sD9d4DiG2jp/NQN5zwXwCJM3rqadMfKQzcpamtmZLzhMoNwEzEfznH3 ec2MSQ/XeXELw/t2KEETCRn58iqrMxr+TEjxWddliCp/NZ3qEEjQ9Oy2GAbLK4QXoQLWEG M0EZdzIPCpB7fvIph7UTD9pbYYYegHOhHPPh2W+AtGWJpPlIYR/nL80SETLE8w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XnJRN1VxgzdXk; Mon, 11 Nov 2024 18:46:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ABIkOr6010458; Mon, 11 Nov 2024 18:46:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ABIkOum010455; Mon, 11 Nov 2024 18:46:24 GMT (envelope-from git) Date: Mon, 11 Nov 2024 18:46:24 GMT Message-Id: <202411111846.4ABIkOum010455@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: d86dcfc6486f - releng/14.2 - if_bridge: Mask MEXTPG if some members don't support 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 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/releng/14.2 X-Git-Reftype: branch X-Git-Commit: d86dcfc6486f7b5b9fcbc5e5ad457b0d22e1c5f6 Auto-Submitted: auto-generated The branch releng/14.2 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d86dcfc6486f7b5b9fcbc5e5ad457b0d22e1c5f6 commit d86dcfc6486f7b5b9fcbc5e5ad457b0d22e1c5f6 Author: Mark Johnston AuthorDate: 2024-10-28 13:52:07 +0000 Commit: Mark Johnston CommitDate: 2024-11-11 18:46:06 +0000 if_bridge: Mask MEXTPG if some members don't support it Similar to how the network stack needs to use mb_unmapped_to_ext() to convert mbufs before passing them to an unsupported driver, if_bridge needs to avoid passing M_EXTPG mbufs to interfaces that don't support them. Thus, clear IFCAP_MEXTPG on the bridge if any member interfaces don't handle unmapped mbufs. Approved by: re (kib) PR: 278245 Reviewed by: jhb, gallatin MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D47294 (cherry picked from commit 2bbfbf80d3bb828ac782c2d990a1fba0eb51e45a) (cherry picked from commit 01a3c17d18bafbf4e76e9d77e8862525b50602e9) --- sys/net/if_bridge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c index 723b92d3dcd5..299b6d80dcde 100644 --- a/sys/net/if_bridge.c +++ b/sys/net/if_bridge.c @@ -193,7 +193,7 @@ * List of capabilities to possibly mask on the member interface. */ #define BRIDGE_IFCAPS_MASK (IFCAP_TOE|IFCAP_TSO|IFCAP_TXCSUM|\ - IFCAP_TXCSUM_IPV6) + IFCAP_TXCSUM_IPV6|IFCAP_MEXTPG) /* * List of capabilities to strip From nobody Mon Nov 11 19:59:54 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XnL4L1Hk2z5cXYR; Mon, 11 Nov 2024 20:00:02 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XnL4L0c8Dz4WRq; Mon, 11 Nov 2024 20:00:02 +0000 (UTC) (envelope-from bz@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731355202; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=c8HzH0UPY6iVpsjUVK2NewVIw5DZDWCACyQiCEglZ98=; b=KgYrdwENra73qG4VDyK4LXfDk4uS7baxLzeOBMbJrzHEZjtnge5oXC5QLgMXDTyadIQg+c 6PNAd/TcnDAdBVQ5vw9DCudu8oViom4R0F4FAtos/Uh86RHdJeOJj+1dZHkLZ8S6NzaRbJ 0+lC1BKRHAYB0jNr1hGfHuruBduDtAbrCwwILNXvWfsudx7eQLDWwD9f7kuu/9HJl15f+S hzc1iMJigJ7ySx9PmDVGC0LFIeQFsd4PVUGcrInsxWIj7P5yT9yqqsC1nwkmR4JBJQlVs/ hr1ITx243j6u+hg06dslFb3GCj5QZPGJZFDZkqqfES4Bx8xMw0FxhdtmzO9izA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731355202; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=c8HzH0UPY6iVpsjUVK2NewVIw5DZDWCACyQiCEglZ98=; b=pfOFnuXQvzM0XRHK8wbcHBrujmYxBGaGdS1zhZu2by/kyIyXyIXn/heEK8Bvlw0p+NcEdh w+A82z5Y29sZIhwxletqr64S7aqK/64MEVu2cC7LVjzO8fe9HlGZAIBbfJ4+G2kziqIVK/ WO3MH+KRuqbsaSkt/4ak99bO4Yz3CeZtiL/0MxRKAIjjy5XLPhl9e9OVq6RP4HHZjxCEVS anGUufLnHkSektjPTy5Xx4Ud/Fa1XQFaOI2xMcHRWYlWREip8wl0zHBa2dajATdfiWFgBu eAbumbzAz30FNLnXZ0OdkmJ8s3JzwP+TRCMO/Nb+U8wzBXJsLtMoeN8xHKmbng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731355202; a=rsa-sha256; cv=none; b=AQcr7bKRIpssyvbrLZryK+D7OeZ8L//mAxJffvjIhz3AD4yuqP9UEmX0ZEJFvrlJZ/DQmq 11WGI8ucdRBgX9aOav4h8Z+blPa8l8OG5heapVq2G8a6rVI9WnlX4rayWTncgarTaj/Mh2 yWWrrUYV7i6yfu/+jz7dwXdw5pA6EppepdD3E3+Qcy59v0kMPDNEfpLxJzcfmeknrXoqcM QfVDbSwq/rTCebYiS+t49soRTwV9YSlHctNR3cbLgC5AGzCzlN6yts089TugqPNA3YPjfm QE4Hl1jfVeEDQXP6mdXxCPksw6boXIpxTxoIvF8kRC67h9YY+QoQ/sq7JB7Mhw== Received: from mx-01.divo.sbone.de (mx-01.divo.sbone.de [IPv6:2003:a:140a:2200:6:594:fffe:19]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature ECDSA (P-256) client-digest SHA256) (Client CN "mx-01.divo.sbone.de", Issuer "E6" (verified OK)) (Authenticated sender: bz/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4XnL4K6MsFzJpb; Mon, 11 Nov 2024 20:00:01 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by mx-01.divo.sbone.de (Postfix) with ESMTPS id B4D57A64805; Mon, 11 Nov 2024 19:59:51 +0000 (UTC) Received: from content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 132852D029D8; Mon, 11 Nov 2024 19:59:57 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) by content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (amavisd-new, port 10024) with ESMTP id DOOyGQms3dL7; Mon, 11 Nov 2024 19:59:56 +0000 (UTC) Received: from strong-iwl0.sbone.de (strong-iwl0.sbone.de [IPv6:fde9:577b:c1a9:4902:b66b:fcff:fef3:e3d2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 037BC2D029D2; Mon, 11 Nov 2024 19:59:55 +0000 (UTC) Date: Mon, 11 Nov 2024 19:59:54 +0000 (UTC) From: "Bjoern A. Zeeb" To: Ed Maste cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 9e469437993b - main - inet.4: drop "experimetal use" from net0 and net240 descriptions In-Reply-To: <202411111247.4ABClC6l042813@gitrepo.freebsd.org> Message-ID: <46spnoss-r0s0-92o3-60r7-r2o49ro82580@SerrOFQ.bet> References: <202411111247.4ABClC6l042813@gitrepo.freebsd.org> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed On Mon, 11 Nov 2024, Ed Maste wrote: > The branch main has been updated by emaste: > > URL: https://cgit.FreeBSD.org/src/commit/?id=9e469437993bd17290d145fa7a615a68b2257875 > > commit 9e469437993bd17290d145fa7a615a68b2257875 > Author: Ed Maste > AuthorDate: 2024-11-10 15:41:02 +0000 > Commit: Ed Maste > CommitDate: 2024-11-11 12:46:58 +0000 > > inet.4: drop "experimetal use" from net0 and net240 descriptions > > The sysctls enable any use of 0/8 and 240/4, not only experimental use. > > Reviewed by: zlei > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D47506 They are labeled "experimental" because they are in no way official standard or their use being endorsed by any accepted Internet Standards Body, Officially vendors at this point are not supposed to support it. The fact that most of them have a "simple switch" to turn it on but off by default as otherwise they would violate an RFC. I would really prefer this to be backed out until an RFC is published or IANA decided to re-assign the (use of the) netblock for any official/private use. I was fine with the original implementation if the default didn't change the status quo given it's experimental nature. I'll follow-up on that in the other review. > --- > share/man/man4/inet.4 | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/share/man/man4/inet.4 b/share/man/man4/inet.4 > index a12dec49caea..c9267558d6f3 100644 > --- a/share/man/man4/inet.4 > +++ b/share/man/man4/inet.4 > @@ -169,10 +169,10 @@ The following general variables are defined: > .It Va accept_sourceroute > Boolean: enable/disable accepting of source-routed IP packets (default false). > .It Va allow_net0 > -Boolean: allow experimental use of addresses in 0.0.0.0/8 as endpoints, > +Boolean: allow use of addresses in 0.0.0.0/8 as endpoints, > and allow forwarding of packets with these addresses. > .It Va allow_net240 > -Boolean: allow experimental use of addresses in 240.0.0.0/4 as endpoints, > +Boolean: allow use of addresses in 240.0.0.0/4 as endpoints, > and allow forwarding of packets with these addresses. > .It Va curfrags > Integer: Current number of IPv4 fragments across all reassembly queues > -- Bjoern A. Zeeb r15:7 From nobody Mon Nov 11 21:13:54 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XnMjb1wfbz5cccD; Mon, 11 Nov 2024 21:13:55 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XnMjb1NYjz4d4T; Mon, 11 Nov 2024 21:13:55 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731359635; h=from:from:reply-to:subject: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=v4U+AS59WmF0+Stzq/ZCCnexgrANDOvKEJMwrmamG5s=; b=j4XmMvzPbl2cgR50lAdCX7ipTLg5h2Eo5TqLUv+mboZCK84tkcHAfsTGObkvzMMjV+Lffc w+UKUwD4NIfKmBBQP/+hZoJek8YcLLvu04dEKGDwKsnnhH/OYwyT5RQFUjf3rewX/BZfZ1 oSKLC1b6Uk0mB26rA1WPIrf7l2ejuPEXwV32IMItL62iT2rRAX91a2voT5uwfQ2SeUBDUO iD6pk/j6ttLp1tGkAn9N/IQYkwh1gIE+TPbHJiRULkH4dxd1nqBSfyON/O58vPArE4gL2v XfvENYUU5RZbCMg62h8VlckqP4+txpJpswAGwZFpg9WZ2Vi/HfpyQQ3myGMgeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731359635; h=from:from:reply-to:subject: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=v4U+AS59WmF0+Stzq/ZCCnexgrANDOvKEJMwrmamG5s=; b=I6qPYorcTkY1+x6HzlGc54QhgtF16ze+wbHsMRIW7J4OjIQgYHPmF4rz31mvSl0Err06vk ZgGGfSpdpqyhCOEtph+nUgTJmeUiiInzvR3eAsfnqfXtG7DEtE2IPzT+HgBfX3iEpXYHvt UkXGlgs99+6BQ1IXFFTLxcA+5Pg8+7m5COqses6vwtDoNMuv1KozKKCKa6IzwiAixGvgqV MXuPBX5W077i2EQeLo4uH9VKkt0PhJMN+wgyJRIHshPHXUuK614TboQ7UXmqEm6tr7S7jM GCdOIJd4u0SGSjIF6+RMijri5cWSgguQeUFG6nX+aZ6DTC5krpQVhoQD1uUyNg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731359635; a=rsa-sha256; cv=none; b=XEJ2MUHw4s7Mj0NnWg9kClVuhYfYbWKi/ulk6ksAeATdjuynJW7Jf6EYTvzqsCBZumahMR lP7Rma7GDN+uZne3k9RxrwPF3Xd5N4N9TZzwY36N9F0zoRVKXD3r4A+XksCd9dtzBgAip6 1+vpIHhrUiu5joXaT0g4jRn1eg4jzzLIF5lOZJPWhujjJlsjxasQkTC35peiSFQc0Iv8Fz n4HQAMVf4fvVbGZw6JMMiqjpWYPafajdL+m/KlgiA2eaPHK4OhK5QUdrARyqOljidqjUrQ mcuvj/ejOA+ldqrOOgJtuUjCiXoXbBHMyTOJEkkNd42HmNOCtFNIlNdNTpeZUA== Received: from [IPV6:2601:5c0:4200:b830:d04f:46f9:caeb:6e94] (unknown [IPv6:2601:5c0:4200:b830:d04f:46f9:caeb:6e94]) (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 4XnMjZ6kMyzKt9; Mon, 11 Nov 2024 21:13:54 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <84468a78-9906-4275-8220-db5ef9ccff82@FreeBSD.org> Date: Mon, 11 Nov 2024 16:13:54 -0500 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: cf8e5289a110 - main - include: ssp: round out fortification of current set of headers Content-Language: en-US To: Kyle Evans , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202407130523.46D5N0Qh032534@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: <202407130523.46D5N0Qh032534@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 7/13/24 22:23, Kyle Evans wrote: > The branch main has been updated by kevans: > > URL: https://cgit.FreeBSD.org/src/commit/?id=cf8e5289a110954600f135024d1515a77d0ae34d > > commit cf8e5289a110954600f135024d1515a77d0ae34d > Author: Kyle Evans > AuthorDate: 2024-07-13 05:16:10 +0000 > Commit: Kyle Evans > CommitDate: 2024-07-13 05:16:24 +0000 > > include: ssp: round out fortification of current set of headers > > ssp/ssp.h needed some improvements: > - `len` isn't always a size_t, it may need casted > - In some cases we may want to use a len that isn't specified as a > parameter (e.g., L_ctermid), so __ssp_redirect() should be more > flexible. > - In other cases we may want additional checking, so pull all of the > declaration bits out of __ssp_redirect_raw() so that some functions > can implement the body themselves. > > strlcat/strlcpy should be the last of the fortified functions that get > their own __*_chk symbols, and these cases are only done to be > consistent with the rest of the str*() set. > > Reviewed by: markj > Sponsored by: Klara, Inc. > Sponsored by: Stormshield > Differential Revision: https://reviews.freebsd.org/D45679 For the change in , is the intention for to only be included in userspace binaries that use this header for some reason? As it is, there are a handful of files compiled in the kernel that use remove -nostdinc from CFLAGS to access intrinsic headers for things like crypto instructions and those files end up including all of in the kernel, e.g. this from armv8crypto: # Remove -nostdinc so we can get the intrinsics. armv8_crypto_wrap.o: armv8_crypto_wrap.c ${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc:N-mgeneral-regs-only} \ -I${SRCTOP}/sys/crypto/armv8 \ ${WERROR} ${PROF} \ -march=armv8-a+crypto ${.IMPSRC} ${CTFCONVERT_CMD} For CHERI this breaks in an obscure way (which is why I discovered this), but I'm curious what the intention is? Should the kernel always be using the fallback definition of __ssp_real? -- John Baldwin From nobody Mon Nov 11 21:43:26 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XnNMk65yBz5cfgB; Mon, 11 Nov 2024 21:43:30 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XnNMk5ZR5z4kRH; Mon, 11 Nov 2024 21:43:30 +0000 (UTC) (envelope-from kevans@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731361410; h=from:from:reply-to:subject: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=q8SS/5cvHUVsVeRFl3C2LdDOMNNPnlxqaPF5g5oCpZI=; b=bWgQAaZdKF2Fr7NeGHzo20+Jv9hrNk2KkkTiCC1j0uZ8J0yrqioowS3zA81kmHmzqGa72n BAirljQKbP/HDs7OwWtrqL0jDLBhcZ/6ZjgCXXa3K5efTfcD+QS4M6CY99NUqxj/L4cqD+ /Z2aaYQIds1OvDVbkU2b87hBVkJ/c5EgejXnu3RLwWWA/7ADhYc72gHX62QkpyXwlCIovg BAtrNnyndgSYmTtSSvNg9RnL5495YUth3DEZt5QrjwBBRsBNcidh6oC4pvZ2rHLX/FB2BK gL32Ve91A9m0H3pt+Tn2tA3Me5ns74uFViMQq3rv/7WymKwZKIjzbn9K+7i4gQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731361410; h=from:from:reply-to:subject: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=q8SS/5cvHUVsVeRFl3C2LdDOMNNPnlxqaPF5g5oCpZI=; b=Un3MNCRCyqMkalGeHYkfDbPzNm1+oM4QT9x6U1l5dxEEP/b4t0HKSFxGcGb4n1yAG70rJi vrtVY9NxMmOkUce62NDsduLHFIbh2yAxlGiLC/p++Bghv1fAy3uC/Fj/JkFMKoSfp+Iahz 83QKJ1Jn50m/2W+sGik+3BiCNt4aE5e17jDTxzgZJItg5De3BONWrRUlkXGHZhDDMoDF/n 4Ni1RQSrX+4BEQ56pzLqjwF/lcyuSRfhvFrVRvHzvGD51/d5FopxUNKCmWtlSZz1HYZ4oU R6o4m/jJmuCsxjdxSAa6LOT9VE256a7qC/ODmWO5ZigAhHo/hfwHfBOBZFl/oA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731361410; a=rsa-sha256; cv=none; b=a7E6zp0T6dmCeA7fgwIHa4LMzgH40OY3WS6ghJ42kWW8tw0LOreimsf9trR8uUQ3Fd9zh1 +EPEXNdBPEZ69dvR7c5RD7zA/tQMN44Fb3Zrv7C8F30gW5JmJghE0x/CTkgaz926lZx/O1 82hpxqiFeiLC0KMtdSov6CI2lQHa63flbivdxvZsz5XnrJD10azc64nFY3V5DTQE607m55 Q9WcrlJ3fpslYA++OZbjWP2xF8MJvobrFl+3ic07mRsk5xi89XmBx8G/bKjfZ2peuH4Yv1 LFSljEusNazwzIepohCHEEgTLaxfsq6cmKfO5YexRI+kLgwrob3MFUHKfNQk0w== Received: from [10.9.4.95] (unknown [209.182.120.176]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: kevans/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4XnNMj4Nf9zLMN; Mon, 11 Nov 2024 21:43:29 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Message-ID: <1e5d5d2b-9e16-451a-b083-ba26d28e694f@FreeBSD.org> Date: Mon, 11 Nov 2024 15:43:26 -0600 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: cf8e5289a110 - main - include: ssp: round out fortification of current set of headers To: John Baldwin , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202407130523.46D5N0Qh032534@gitrepo.freebsd.org> <84468a78-9906-4275-8220-db5ef9ccff82@FreeBSD.org> Content-Language: en-US From: Kyle Evans In-Reply-To: <84468a78-9906-4275-8220-db5ef9ccff82@FreeBSD.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 11/11/24 15:13, John Baldwin wrote: > On 7/13/24 22:23, Kyle Evans wrote: >> The branch main has been updated by kevans: >> >> URL: >> https://cgit.FreeBSD.org/src/commit/?id=cf8e5289a110954600f135024d1515a77d0ae34d >> >> commit cf8e5289a110954600f135024d1515a77d0ae34d >> Author:     Kyle Evans >> AuthorDate: 2024-07-13 05:16:10 +0000 >> Commit:     Kyle Evans >> CommitDate: 2024-07-13 05:16:24 +0000 >> >>      include: ssp: round out fortification of current set of headers >>      ssp/ssp.h needed some improvements: >>       - `len` isn't always a size_t, it may need casted >>       - In some cases we may want to use a len that isn't specified as a >>          parameter (e.g., L_ctermid), so __ssp_redirect() should be more >>          flexible. >>       - In other cases we may want additional checking, so pull all of >> the >>          declaration bits out of __ssp_redirect_raw() so that some >> functions >>          can implement the body themselves. >>      strlcat/strlcpy should be the last of the fortified functions >> that get >>      their own __*_chk symbols, and these cases are only done to be >>      consistent with the rest of the str*() set. >>      Reviewed by:    markj >>      Sponsored by:   Klara, Inc. >>      Sponsored by:   Stormshield >>      Differential Revision:  https://reviews.freebsd.org/D45679 > > For the change in , is the intention for to only > be included in userspace binaries that use this header for some reason?  As > it is, there are a handful of files compiled in the kernel that use remove > -nostdinc from CFLAGS to access intrinsic headers for things like crypto > instructions and those files end up including all of in the > kernel, e.g. this from armv8crypto: > > # Remove -nostdinc so we can get the intrinsics. > armv8_crypto_wrap.o: armv8_crypto_wrap.c >     ${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc:N-mgeneral-regs-only} \ >         -I${SRCTOP}/sys/crypto/armv8 \ >         ${WERROR} ${PROF} \ >          -march=armv8-a+crypto ${.IMPSRC} >     ${CTFCONVERT_CMD} > > For CHERI this breaks in an obscure way (which is why I discovered this), > but I'm curious what the intention is?  Should the kernel always be > using the fallback definition of __ssp_real? > I think this was meant to address some cross-build issue somewhere in our bootstrapped stuff; if it was a kernel vs. userspace thing I don't see why I wouldn't have used _KERNEL instead. The kernel should always use the stub that just defines it back to the name passed in, though, so we could definitely add a '&& !defined(_KERNEL)' there. Thanks, Kyle Evans From nobody Mon Nov 11 21:54:34 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XnNcW6W44z5cgMJ; Mon, 11 Nov 2024 21:54:35 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XnNcW5W1Qz4lGF; Mon, 11 Nov 2024 21:54:35 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731362075; h=from:from:reply-to:subject: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=oEYAJYVUdHx/BHW0G4FmZGXXaTLL5dscDEQZrObmSRA=; b=uPP2jHJsT1myIj7LxDokXuuyORLOBRKzvNWHnFlFki2gm4FzUG4ZlvmDdKtbvU3hTHqUid dQbf+0DfyDWhRbaaTfWMziEI81kIOE7YksuiofJ97lxjHcenQOFVfm3rm3RZxzy9tisRhq ijZGx8pGb+r7Ass/rbns+HUKYYhA1VIOcx84VfVDgk2X1ALeTi3n5YZIcNh9tANxesSoGi 5lRUC0kXxdG0TVKQ7WwHTxYoKr1B61qP/UcOt+ekl+NqotFdUIcqV3la9tm+S078gd9/HC pXs2/hPzb9gixvfcEY6FY9xu8WiZ58Fxzcz+ATfoasPY27a5g3KNuY/N0VZOuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731362075; h=from:from:reply-to:subject: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=oEYAJYVUdHx/BHW0G4FmZGXXaTLL5dscDEQZrObmSRA=; b=HvyOSLsQ6q5eTfDcJUFrcH1XET7NLyhdFu4cX1VWlbVpapTRy5DeOzz4w201ywO+ykh1R9 LPjaq8FH3ny955+rGqKJVZyTQDO2+1t8eQJK2LU1U4RfcNItV0X7ppdvh5wQNFQDwEs+oR iQ5xaKjx547LsGOpBGxxVCNNfAlCyzK8Bi2LWYcCpLfDweYQUnNgT5mTikvMAmE4nlQsXb VeKhqHawDVjZbSHZ8YR1ogRwNGPAfpJo0AvwQvzf4FTSsPzNgFtdCFwGvGaLw2zJskXzH2 5WcoRK0QTMRpScs+LQ7SE57PYl8XStHeqtb/rD7zNYaP9yREYDeMsx019k7cfQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731362075; a=rsa-sha256; cv=none; b=ya2b8Zl1f+4R4I2qX+g2T1iFlug6Qnf74MkaOoElN4MHrCIMTuPX4JElPOiN34parPL7aT JuB3oGMAAKt5u/cs4lnxYE5d/ERk6laLpYuMXs4ZnNzRt3jszQSal7yu84cosqJyX5UdEO cpNV9ReUKPjNhujb/lfWL9kp66At1JaH4A8FVsZATzREy3L+Afn1uVgKthfNR6dtCjryXp UH/SnDlL5JQ//0qcRyRfDesh5s1bBthjhChrdAyK8e1yUae8iJ4rKZJO9rtf92vWR9Z3bI bMO45g1+YtgioVBMMZPzS9W6btiMukRTBddt9xDBi6a3rZnGNpXIqarLpvtf0A== Received: from [IPV6:2601:5c0:4200:b830:d04f:46f9:caeb:6e94] (unknown [IPv6:2601:5c0:4200:b830:d04f:46f9:caeb:6e94]) (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 4XnNcW3fgMzLMS; Mon, 11 Nov 2024 21:54:35 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <33c76eb5-d0e9-43e8-a7f1-3c1911abdef3@FreeBSD.org> Date: Mon, 11 Nov 2024 16:54:34 -0500 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: cf8e5289a110 - main - include: ssp: round out fortification of current set of headers Content-Language: en-US To: Kyle Evans , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202407130523.46D5N0Qh032534@gitrepo.freebsd.org> <84468a78-9906-4275-8220-db5ef9ccff82@FreeBSD.org> <1e5d5d2b-9e16-451a-b083-ba26d28e694f@FreeBSD.org> From: John Baldwin In-Reply-To: <1e5d5d2b-9e16-451a-b083-ba26d28e694f@FreeBSD.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 11/11/24 13:43, Kyle Evans wrote: > On 11/11/24 15:13, John Baldwin wrote: >> On 7/13/24 22:23, Kyle Evans wrote: >>> The branch main has been updated by kevans: >>> >>> URL: >>> https://cgit.FreeBSD.org/src/commit/?id=cf8e5289a110954600f135024d1515a77d0ae34d >>> >>> commit cf8e5289a110954600f135024d1515a77d0ae34d >>> Author:     Kyle Evans >>> AuthorDate: 2024-07-13 05:16:10 +0000 >>> Commit:     Kyle Evans >>> CommitDate: 2024-07-13 05:16:24 +0000 >>> >>>      include: ssp: round out fortification of current set of headers >>>      ssp/ssp.h needed some improvements: >>>       - `len` isn't always a size_t, it may need casted >>>       - In some cases we may want to use a len that isn't specified as a >>>          parameter (e.g., L_ctermid), so __ssp_redirect() should be more >>>          flexible. >>>       - In other cases we may want additional checking, so pull all of >>> the >>>          declaration bits out of __ssp_redirect_raw() so that some >>> functions >>>          can implement the body themselves. >>>      strlcat/strlcpy should be the last of the fortified functions >>> that get >>>      their own __*_chk symbols, and these cases are only done to be >>>      consistent with the rest of the str*() set. >>>      Reviewed by:    markj >>>      Sponsored by:   Klara, Inc. >>>      Sponsored by:   Stormshield >>>      Differential Revision:  https://reviews.freebsd.org/D45679 >> >> For the change in , is the intention for to only >> be included in userspace binaries that use this header for some reason?  As >> it is, there are a handful of files compiled in the kernel that use remove >> -nostdinc from CFLAGS to access intrinsic headers for things like crypto >> instructions and those files end up including all of in the >> kernel, e.g. this from armv8crypto: >> >> # Remove -nostdinc so we can get the intrinsics. >> armv8_crypto_wrap.o: armv8_crypto_wrap.c >>     ${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc:N-mgeneral-regs-only} \ >>         -I${SRCTOP}/sys/crypto/armv8 \ >>         ${WERROR} ${PROF} \ >>          -march=armv8-a+crypto ${.IMPSRC} >>     ${CTFCONVERT_CMD} >> >> For CHERI this breaks in an obscure way (which is why I discovered this), >> but I'm curious what the intention is?  Should the kernel always be >> using the fallback definition of __ssp_real? >> > > I think this was meant to address some cross-build issue somewhere in > our bootstrapped stuff; if it was a kernel vs. userspace thing I don't > see why I wouldn't have used _KERNEL instead. The kernel should always > use the stub that just defines it back to the name passed in, though, so > we could definitely add a '&& !defined(_KERNEL)' there. Ok, thanks, that's what I've done locally. I'll throw it into a review in a bit. -- John Baldwin From nobody Tue Nov 12 00:38:19 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XnSFS1jQyz5crbN; Tue, 12 Nov 2024 00:38: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XnSFR7505z4ynK; Tue, 12 Nov 2024 00:38:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731371900; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=02/ULaSZJTNMVdQeEqRmqP2VB1o1IIrx22FDzswKlxo=; b=om8z7lOYN4LPVYpThxfZ6hUSfqIaaQXenFpUe2LUVcmxWQOEJjcjwFu+TVtw1dcNDynSDs JYICV6vqKaXV8ypA9g40irXnkuyPh3NRfKxD89/+V8HsV3Skdg37e2/dhu8jQR9yV2sPxz /OEac7n775/YX4jCbRf4NjKHpyIBSjNweQHUWB3FbLhT6THMDxvroNj0yWODMLUPwF8KjV 1Ji8+z/KE3ElkeNKYlJPW+t7TMmMq4Omt3V8B4ZQMKHQ3UfrfOm38cbKovmZ1K8UpUncWs 7Jliz8rm/4GV4P+l1hohXZfNgOp7BlnxQyr/JspAap4LsA+1AYDyVXPde8jMvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731371900; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=02/ULaSZJTNMVdQeEqRmqP2VB1o1IIrx22FDzswKlxo=; b=U6LEvC7TMb4sVaPJXpD/87WSZgPGW3RbUDEuAAiLw/bq93Qj0FryyhUAT5NZ0yTMlLq2vQ 5UU+HYisTAYsDKGUTtP35xiKkTeXU2wtEgNaIG/4OXroa18GYiHBy8zur3Qm5TE/aW4oZE BCPBcV1keNqqjevhQ6bgmiauAyOZ5HBPslLsYwNlDVuzzpmdc1YLg/FXNPbr7b9usvbqCD 948US+hRVMfc6Bt6q+PLxKTMHOlG+pdLTT5sQqgc9yCsbGmy4/DzhNOd2oYlkDyqnE7rMB PrzBMiPA3Ytfh6R2L28zjuHs2zhHA+LvsbKUp2A9M846476TYiKj1BXlUHTjmQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731371900; a=rsa-sha256; cv=none; b=lq4SvLp0zmd6kNlh1BuF2NVxxCbNACWA2Cb3ULAbnaRZj/SkzvgyEDOONJ3GfheH9sVsL2 h3+SSAOH6tiqvvAZRYe3kUSrhbW3cChgLGUqvc1NMV99lYkizaRX5lZ13SrDU47OTrYg7n WMKD1DGqRpOaV3afkHKBmUEeKTO1jSmdxAbkQJ8x6A9qjqJe+OI7Etu5Jf4CoP0RPkQ60S r1DcqAeXEK3nUfA3jTUjBx/dRaA0HiiKDV6Vm0JBwJKQxs3gnXRfUC7tIIaftqDPpl/RmJ 5pTaSgl2RYDwXMI7tztzn/4pdd1UCYskOjxE7zNdGe+r32wtvTm+klh9XnUGyA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XnSFR6hdrzp95; Tue, 12 Nov 2024 00:38:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AC0cJJd061343; Tue, 12 Nov 2024 00:38:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AC0cJJV061340; Tue, 12 Nov 2024 00:38:19 GMT (envelope-from git) Date: Tue, 12 Nov 2024 00:38:19 GMT Message-Id: <202411120038.4AC0cJJV061340@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 48d6303d9c96 - stable/14 - amdiommu: hide HPET report under verbose List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 48d6303d9c96d14741fe606e610db08c14a2f2ca Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=48d6303d9c96d14741fe606e610db08c14a2f2ca commit 48d6303d9c96d14741fe606e610db08c14a2f2ca Author: Konstantin Belousov AuthorDate: 2024-11-09 21:06:06 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-12 00:27:24 +0000 amdiommu: hide HPET report under verbose (cherry picked from commit 1bca58a1d40d10c7cdd14b2988924cadd6efdc43) --- sys/x86/iommu/amd_drv.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/x86/iommu/amd_drv.c b/sys/x86/iommu/amd_drv.c index 2c544dfb60a6..f1ee34467f46 100644 --- a/sys/x86/iommu/amd_drv.c +++ b/sys/x86/iommu/amd_drv.c @@ -1001,8 +1001,9 @@ amdiommu_find_unit_for_hpet(device_t hpet, struct amdiommu_unit **unitp, res = amdiommu_ivrs_iterate_tbl(amdiommu_find_unit_scan_0x11, amdiommu_find_unit_scan_0x11, amdiommu_find_unit_scan_0x10, &ifu); if (!res) { - printf("amdiommu cannot match hpet no %d in IVHD\n", - hpet_no); + if (verbose) + printf("amdiommu cannot match hpet no %d in IVHD\n", + hpet_no); return (ENXIO); } From nobody Tue Nov 12 00:38:20 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XnSFT2m6kz5crVx; Tue, 12 Nov 2024 00:38: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XnSFT0wlPz4ysW; Tue, 12 Nov 2024 00:38:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731371901; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DkwCCOEG/cesyoh90eo8RA91ZC8DgnOGbv8vetju6WU=; b=eC/3nISQGbLrP4apG4AbQ1alH5d+o/4BeRe1sX+CQT5isSVRY7VI5hu7dXcezOzsTguI3P 1lwzk8Jh29XG17IfInOJULOC+vmMoM5aBIIj1QlXvxpOUwdJUp7+lNbukIANCxBe+XQlr5 9Homlz8IH9mG5PrI+5kixYCtCBQl4er3Dql85rI2ry9Cu1dV0sLrtDC1475cJ/OmcCA+cH YV9nhn0/OeJh7GlcjuSNIyidg4g/xvD24YHz2YAg0ZX2AvssYatM0WVv5YoHWPQGujuA2N DICwwsMUZfnOMFKKORSSN/tw0EZSbciippzmXvw8MqVObKg54KPc+DNugx1JDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731371901; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DkwCCOEG/cesyoh90eo8RA91ZC8DgnOGbv8vetju6WU=; b=rzPdF9sLattWNfx0VyMgv8zKppXiLzGRysOPRReAPKEWbVOY4HbejKWaQLOSJD34qP/4E9 RIjpdGtkEAs7U/iNfqTvWuzUkh/YN23Un/Pu1+YPSjAo6DZnSvCprnB6iVoc17Z9uQdjgO ePosdfgK54sixJPqmZ6I0nVtLRKkieT88diRh7LPKPhHvGH6f9xOjAmxjkfSuzlyvCaKFs 2fjqjSfGKHfCTgfIqSly2Csu3C1V8xizy0fESdKy0guLuODsjY4aEjj73nSoBO3o0JLcNS xLEuUzagfPk7XDq0IFF6lrpvNZYAucA/aiIstM5QsPD+i5Od6QaWC+kmWQMkQQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731371901; a=rsa-sha256; cv=none; b=L08Hsk4kPpAgour8dRiKn8SG6bUa7vO03I1/zFpMPA81vvoc6V6uWSM0/Mh185U0dT/XWO HOEKkmBFvB3D0fnY7baMXC0EYCGDQlGjHcyZnNHl39LRYsn4+B1RSQcu/8MqBes+h16q5x ODVtHcPLN5Ozq3HfJ3pGYtRRQWELSje0FOTLhkNQTzihTT8ChBvhLST1arBv3WbAlR45su i9kzK14vXYcCpzSdOV0dMvJ0YvczYvN6l3/lnBnhK7BTEZbbEkCtPnpDdr7eiFpFOPyYDE zXDYK8ahOJZ4832ZSTS0nhrn3RlUIR0dpdO7/cQvEz64/lBBB+DISvmOoIfguQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XnSFT0Y14znhb; Tue, 12 Nov 2024 00:38:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AC0cKDT061390; Tue, 12 Nov 2024 00:38:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AC0cKFG061387; Tue, 12 Nov 2024 00:38:20 GMT (envelope-from git) Date: Tue, 12 Nov 2024 00:38:20 GMT Message-Id: <202411120038.4AC0cKFG061387@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 19cefbb3ddb1 - stable/14 - amdiommu: short-circuit all amdiommu_find_unit() 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 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 19cefbb3ddb157dfa3d24be0be7f1990b9567733 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=19cefbb3ddb157dfa3d24be0be7f1990b9567733 commit 19cefbb3ddb157dfa3d24be0be7f1990b9567733 Author: Konstantin Belousov AuthorDate: 2024-11-09 22:29:20 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-12 00:27:24 +0000 amdiommu: short-circuit all amdiommu_find_unit() functions (cherry picked from commit 9805e5b071a10711cfcd3c7a750ac4a4d14b6e3f) --- sys/x86/iommu/amd_drv.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sys/x86/iommu/amd_drv.c b/sys/x86/iommu/amd_drv.c index f1ee34467f46..4373987ae24a 100644 --- a/sys/x86/iommu/amd_drv.c +++ b/sys/x86/iommu/amd_drv.c @@ -879,6 +879,9 @@ amdiommu_find_unit(device_t dev, struct amdiommu_unit **unitp, uint16_t *ridp, int error, flags; bool res; + if (!amdiommu_enable) + return (ENXIO); + if (device_get_devclass(device_get_parent(dev)) != devclass_find("pci")) return (ENXIO); @@ -943,6 +946,9 @@ amdiommu_find_unit_for_ioapic(int apic_id, struct amdiommu_unit **unitp, device_t apic_dev; bool res; + if (!amdiommu_enable) + return (ENXIO); + bzero(&ifu, sizeof(ifu)); ifu.type = IFU_DEV_IOAPIC; ifu.devno = apic_id; @@ -992,6 +998,9 @@ amdiommu_find_unit_for_hpet(device_t hpet, struct amdiommu_unit **unitp, int hpet_no; bool res; + if (!amdiommu_enable) + return (ENXIO); + hpet_no = hpet_get_uid(hpet); bzero(&ifu, sizeof(ifu)); ifu.type = IFU_DEV_HPET; @@ -1042,7 +1051,7 @@ amdiommu_find_method(device_t dev, bool verbose) error = amdiommu_find_unit(dev, &unit, &rid, &dte, &edte, verbose); if (error != 0) { - if (verbose) + if (verbose && amdiommu_enable) device_printf(dev, "cannot find amdiommu unit, error %d\n", error); From nobody Tue Nov 12 00:52:50 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XnSZB3WhJz5csTg; Tue, 12 Nov 2024 00:52: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XnSZB33p5z514P; Tue, 12 Nov 2024 00:52:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731372770; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UaFTqSdppiaWt1T2wHWBo73mx9pUDIN/7yHH0V9iFyo=; b=Q2SVVzuR3Zrgj+AXa4l/9byjYU20PBCf66i6M3hq7wFAHizo21/pJY55BHGbVAunkYSQ/n ZAeN36coEI2CbEQSzeCKMpliKEJVgV4HOePgWW2ObOVoezKmWlKvLjhXa/2W5ZSLPIMdxd 5mWrRIIhB89OrlnCOw8uyUjuHIJtMWTOcSZbLdDnMgUNuzw20YSg3sBSi65nE3J6dTrhxQ wGWMsOGuz2Y4GLryJbHudLYDe5sZ3lhnb7K7tDGNkQdri4qhuSlvvvlfLNFJas2mx9agIy ajDsR12+QIv1/2e/2AvZvK+fd6QYlnNqgnYo0sQYjH6f6bve2bYZoYRbP8q/TQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731372770; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UaFTqSdppiaWt1T2wHWBo73mx9pUDIN/7yHH0V9iFyo=; b=BOmb8aNOFPaTa7seBuhzu3VvCgQZKP2gp1AwQ2dHIxop8MvtoEnqSXamg0dOPuwAoWEope Y6/zjsqoSWVlEn/FKI63mI19AksZtg3X5xiJxoEK74dzPMOXQ3PEVz5/rP17f6zbPuiRJk qRNMZYFYe1FMR0/m/WP7Z59uaKBZIiYWtDjkY2n+SJ1dOK0I+efYIfL0lbiX+OEE3VnBlu gru/hUzsXrPUZMZ1Cu6Etku42LNJEXiU0038aaYwiFzq3qQTWDrv4XBle/K4Jk7BCZBopR x+WpGMWw0rvqktJ1+KCa1llVsaM60Jq7rxqLK0bkbyK65suTG9enFrxGsOx96w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731372770; a=rsa-sha256; cv=none; b=UTO57euVZ3ptgj2WqGALsMmKUxisO9o1z6PN1HY1Ldddlgn2gE1EbPyWE8ulNNolqFowd6 dRLcVR4H8yiH1ieSGSolowGMhUqY/8uPPODkEmaydoRgqgMDgxDYrWsDPFnwji5M7y59Qq YssPxHk/omG0Q8NiSOOd/l14PeU9nBflYxWXWgrEJ212oOvWnzeURD4A2ZXeiouKyFd3Qb POZD+vJv1Vn7KCL2gUmhAHuAHCCpGq6S19kycTNWbKiHAeHAAO7Q2qqOHpgnNehat8Pg2h ZO6dIHX6DqtblWsQqBMFybRb22kXBpyyTwLWco1VChdKx4PYfxsR3K8cQh31Fg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XnSZB2LQhzpF9; Tue, 12 Nov 2024 00:52:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AC0qotR096065; Tue, 12 Nov 2024 00:52:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AC0qoQ3096062; Tue, 12 Nov 2024 00:52:50 GMT (envelope-from git) Date: Tue, 12 Nov 2024 00:52:50 GMT Message-Id: <202411120052.4AC0qoQ3096062@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 65a4daeaf324 - main - ktrace: log execve(2) arguments and environment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 65a4daeaf3247b7a2c16cf59cdea2ce05987a7cc Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=65a4daeaf3247b7a2c16cf59cdea2ce05987a7cc commit 65a4daeaf3247b7a2c16cf59cdea2ce05987a7cc Author: Artem Hevorhian AuthorDate: 2024-10-15 13:50:40 +0000 Commit: Gleb Smirnoff CommitDate: 2024-11-11 21:19:35 +0000 ktrace: log execve(2) arguments and environment Two new events KTR_ARGS and KTR_ENV can be used to trace arguments of execve(2). Reviewed by: glebius Differential Revision: https://reviews.freebsd.org/D47127 --- sys/kern/kern_exec.c | 11 ++++++++++- sys/kern/kern_ktrace.c | 17 +++++++++++++++++ sys/sys/ktrace.h | 13 +++++++++++++ usr.bin/kdump/kdump.c | 26 ++++++++++++++++++++++++++ usr.bin/ktrace/ktrace.1 | 10 +++++++++- usr.bin/ktrace/ktrace.h | 3 ++- usr.bin/ktrace/subr.c | 6 ++++++ 7 files changed, 83 insertions(+), 3 deletions(-) diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 63f007624e36..4a11be5b42b8 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -354,7 +354,16 @@ kern_execve(struct thread *td, struct image_args *args, struct mac *mac_p, exec_args_get_begin_envv(args) - args->begin_argv); AUDIT_ARG_ENVV(exec_args_get_begin_envv(args), args->envc, args->endp - exec_args_get_begin_envv(args)); - +#ifdef KTRACE + if (KTRPOINT(td, KTR_ARGS)) { + ktrdata(KTR_ARGS, args->begin_argv, + exec_args_get_begin_envv(args) - args->begin_argv); + } + if (KTRPOINT(td, KTR_ENVS)) { + ktrdata(KTR_ENVS, exec_args_get_begin_envv(args), + args->endp - exec_args_get_begin_envv(args)); + } +#endif /* Must have at least one argument. */ if (args->argc == 0) { exec_free_args(args); diff --git a/sys/kern/kern_ktrace.c b/sys/kern/kern_ktrace.c index 868885898d0c..7a31fe234cb5 100644 --- a/sys/kern/kern_ktrace.c +++ b/sys/kern/kern_ktrace.c @@ -124,6 +124,8 @@ static const int data_lengths[] = { [KTR_FAULT] = sizeof(struct ktr_fault), [KTR_FAULTEND] = sizeof(struct ktr_faultend), [KTR_STRUCT_ARRAY] = sizeof(struct ktr_struct_array), + [KTR_ARGS] = 0, + [KTR_ENVS] = 0, }; static STAILQ_HEAD(, ktr_request) ktr_free; @@ -559,6 +561,21 @@ ktrsyscall(int code, int narg, syscallarg_t args[]) ktr_submitrequest(curthread, req); } +void +ktrdata(int type, const void *data, size_t len) +{ + struct ktr_request *req; + void *buf; + + if ((req = ktr_getrequest(type)) == NULL) + return; + buf = malloc(len, M_KTRACE, M_WAITOK); + bcopy(data, buf, len); + req->ktr_header.ktr_len = len; + req->ktr_buffer = buf; + ktr_submitrequest(curthread, req); +} + void ktrsysret(int code, int error, register_t retval) { diff --git a/sys/sys/ktrace.h b/sys/sys/ktrace.h index 966af1744058..9d06cd33d5d2 100644 --- a/sys/sys/ktrace.h +++ b/sys/sys/ktrace.h @@ -263,6 +263,16 @@ struct ktr_struct_array { */ }; +/* + * KTR_ARGS - arguments of execve() + */ +#define KTR_ARGS 16 + +/* + * KTR_ENVS - environment variables of execve() + */ +#define KTR_ENVS 17 + /* * KTR_DROP - If this bit is set in ktr_type, then at least one event * between the previous record and this record was dropped. @@ -295,6 +305,8 @@ struct ktr_struct_array { #define KTRFAC_FAULT (1<ktr_type); type = unknown; @@ -1646,6 +1657,21 @@ ktrnamei(char *cp, int len) printf("\"%.*s\"\n", len, cp); } +void +ktrexecve(char *m, int len) +{ + int i = 0; + + while (i < len) { + printf("\"%s\"", m + i); + i += strlen(m + i) + 1; + if (i != len) { + printf(", "); + } + } + printf("\n"); +} + void hexdump(char *p, int len, int screenwidth) { diff --git a/usr.bin/ktrace/ktrace.1 b/usr.bin/ktrace/ktrace.1 index 5cc6df52d69a..6d78cb1504b4 100644 --- a/usr.bin/ktrace/ktrace.1 +++ b/usr.bin/ktrace/ktrace.1 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 10, 2024 +.Dd November 1, 2024 .Dt KTRACE 1 .Os .Sh NAME @@ -142,6 +142,14 @@ context switches trace .Xr sysctl 3 requests +.It Cm a +trace +.Xr execve 2 +arguments +.It Cm e +trace +.Xr execve 2 +environment variables .It Cm + trace the default set of trace points - .Cm c , i , n , s , t , u , y diff --git a/usr.bin/ktrace/ktrace.h b/usr.bin/ktrace/ktrace.h index bf3f70539310..d6da094f33a2 100644 --- a/usr.bin/ktrace/ktrace.h +++ b/usr.bin/ktrace/ktrace.h @@ -31,7 +31,8 @@ #define DEF_POINTS (KTRFAC_SYSCALL | KTRFAC_SYSRET | KTRFAC_NAMEI | \ KTRFAC_GENIO | KTRFAC_PSIG | KTRFAC_USER | \ - KTRFAC_STRUCT | KTRFAC_SYSCTL | KTRFAC_STRUCT_ARRAY) + KTRFAC_STRUCT | KTRFAC_SYSCTL | KTRFAC_STRUCT_ARRAY | \ + KTRFAC_ARGS | KTRFAC_ENVS) #define PROC_ABI_POINTS (KTRFAC_PROCCTOR | KTRFAC_PROCDTOR) diff --git a/usr.bin/ktrace/subr.c b/usr.bin/ktrace/subr.c index 520ee44a1575..6762fe9620cb 100644 --- a/usr.bin/ktrace/subr.c +++ b/usr.bin/ktrace/subr.c @@ -81,6 +81,12 @@ getpoints(char *s) case 'y': facs |= KTRFAC_SYSCTL; break; + case 'a': + facs |= KTRFAC_ARGS; + break; + case 'e': + facs |= KTRFAC_ENVS; + break; case '+': facs |= DEF_POINTS; break; From nobody Tue Nov 12 00:56:44 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XnSfl4sq3z5csCm; Tue, 12 Nov 2024 00:56:47 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XnSfl4C4bz51WJ; Tue, 12 Nov 2024 00:56:47 +0000 (UTC) (envelope-from glebius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731373007; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=WetZA04tm/6oWh93aKT8wfYu+yFpMIsd2jioJLIleJw=; b=pf/EVArjKZ786AbvfJN7k1X7OFxQvj37HXWQdXwRrl4mHyYgIXQkARyXmoWl55Gt5y8b48 yIrtxGSfE5djzuJzZC0wtGuRWK6aKi1uofUT1v/piQvM0aAA0DkLCdxNGTcZKGSu+rlZ/v ZWzD98y/mP0V5IRf02RxJtLxqyrqPQ36O/Fz9Eawj1HHwIAruEyvLFhMyVhvIurJVeBXsF VzK1nmFodl1Moj2m3fs6TNX4p5G4vmZhl0kfgDRZRlDF1OouiQME+9ZjbuExC2eNZE6jvg wq9A6EjiMu6Hqux6FcnM7S7cSUpvDxr8G11vbTGcGQHKiu+w6f8nNb+9Edb/Vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731373007; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=WetZA04tm/6oWh93aKT8wfYu+yFpMIsd2jioJLIleJw=; b=E22Qd6e1gEg9gacBrRT70a16HoomA8rq/Amo6nmnacE/xtBcV24KTieuBq7pkl9cudPIOw MQ00ka9fu2Y4V4aSVW+uzRLglYaI7B5CbjacUrARc3sYrvvgAr2WqDAozO3/G1+HIgSa93 WqsGMuhLp28uTO6S1cA/VwXlJkNIxoZzpq/AiNjh6nddr1n1qsV0Ixv1fHpamh1hSb7UNz 4KIvFs932zCTi+u/FOTaHy5eT8oLsmAw2d0Aqn0D6etoorvWLKNoSfn5hH83jNbrAwI2S9 9smLhlySEoR8QRZGkAJ2akGvA7R4RDc40eXMq5zjM5HCODzZas5PU1J0oUAaYA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731373007; a=rsa-sha256; cv=none; b=j9tpn9Rhf1rZ8/Gl6oceyjqX4QHqXH6n6MaZ5ADuSa4s0hV4wuQoOancEULz9nhi9Jkd7O 7ob91fnUsFZVInKCiiFAo/dW19VJzpq5CDGdo1pJ5wJga0EQ1uM9cFM+g2X3f1IjKugdVM /XENa6Jqx5j/qIggd+bhTMdP4N5s6+BJ6EA9P6R3BsVeXb/41uwmHHBKdsGFOnbILqb6M0 vGGLt5KgoQ8ZFYe+X0jPq+g4+GjvRbUrJ45G9wywG39edUF3d1uvGApRUnsTwqs/a0aWZi qSRRkIWfcPHd1G2mgX0H41EfrV+625Qnh1zR6DU5r7vPpy/PJIxlH4CnLED+jA== Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: glebius) by smtp.freebsd.org (Postfix) with ESMTPSA id 4XnSfk6jg3zQKp; Tue, 12 Nov 2024 00:56:46 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Mon, 11 Nov 2024 16:56:44 -0800 From: Gleb Smirnoff To: Mark Johnston Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 349d1366edd2 - main - socket: Export the FIB number of sockets Message-ID: References: <202411041456.4A4EuXKm059669@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 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202411041456.4A4EuXKm059669@gitrepo.freebsd.org> On Mon, Nov 04, 2024 at 02:56:33PM +0000, Mark Johnston wrote: M> diff --git a/sys/sys/socketvar.h b/sys/sys/socketvar.h M> index 40464f555816..fda8d23f5649 100644 M> --- a/sys/sys/socketvar.h M> +++ b/sys/sys/socketvar.h M> @@ -615,7 +615,8 @@ struct xsocket { M> uint32_t so_qlimit; M> pid_t so_pgid; M> uid_t so_uid; M> - int32_t so_spare32[8]; M> + int32_t so_fibnum; M> + int32_t so_spare32[7]; M> int16_t so_type; M> int16_t so_options; M> int16_t so_linger; I would suggest not to spend the spares in the main branch. So this commit should add the field, keeping 8 spares. But the merge to stable/14 should use a spare. Otherwise we eventually will run out of spares in main and also nearly run out of spares in some stable/22 branch. I'd suggest to follow the policy of not spending spares in the main branch for all structures, not just xsocket. -- Gleb Smirnoff From nobody Tue Nov 12 02:01:56 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XnV5w3sphz5cxVy; Tue, 12 Nov 2024 02: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XnV5w3S1Nz3xLl; Tue, 12 Nov 2024 02: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=1731376916; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vUD9zmxl8ZFLK9lgqYAoqCP3YNkQRhombgsvJJDm1NE=; b=OWMyhM9+8XAvkfovO9pV1rfxNQ6jtnng5C63bxk9T4SPn2RI8dMayHsH2eRCUhR/RqPDos VMeYhTl1mYp9Prbmv5N8M0ZM1Jnv9CEwEVhj2U1WuG096gq4ioRHDimcQDCiFWadrfq7w0 nVGxi7J3ht+pDsO2VWhFpu5lov4jDjMyQzEQrQ5dyoycFr8zxEyXFCCwrGqBmntiAPxTBj StF79l1GUVGug/usm4NJxuXw5b+jqtFgIcY7FXbd9Ck+33t456zMCaiE94etNyQpMpqhWy Bq8DV8aEe4eM8DMsrTRnrl5Rjq+1IcYf/xhoPPM+e0jrXjl4of0Couq8I8VoPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731376916; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vUD9zmxl8ZFLK9lgqYAoqCP3YNkQRhombgsvJJDm1NE=; b=EANlrBKAFsDLlTMu+uy4/e5ctP6XK2vQN5+xfg4QOiC6qQzy6Z3W7A/Hl/TpK7wZxbNpHV QYWtNXjzuQRt8qG7Xn7owv7c+r+mRUlu4U4MhJOSiRrgqljQwxkw79tY/fWnoGuWh6se66 t99RB7LMGGTfsJ887G2lq6sV3AjGgORJG1ToQYgWpbVcOOFw/+DSl2BQnxLM3z/PtvSyp6 SBnLlnqR/DQXpAT0IBoxgqBpToYEwRf5OMHdPKJTJiQCEa2fWxJX4AdmdH9fcI6Do0SWKl kItsLBYrggneO1kf+dvVy8Y2Rer4VELHuPYxVs+MI7SU3EQda0PEswa78ndSdg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731376916; a=rsa-sha256; cv=none; b=kaU2X2sp1yf/yJ/Faq6HomUaWKYqE2TX3XA8UerbwvFqSJJfGx6UMvmxR6PKTx3oibiicf hqHynr/uXdBrPKDtv3/cos2SAWK961AfIdEUoF9fygI8ehB9KXluOI96AG/wri5zdPnvwa IO9RMQqrJCwkLl52rW6UTy84HOSV/b9kZk4LjDcbNMH8cL5dZpuvEowUifrJ29J4Hw1GeE 8luTovArzoLSpNg2Cyefrc0xgcnA+4mqW1+Us01hegxzI8QYBLejwDPCc3Tlg4jhX9/y+l 1DTcPtq/8bPNbVAOGXFWyk3RdYzyDVw8VC8OB4ydrk4A30R0Q1Ka+Lc10/Muxg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XnV5w2vKCzrNB; Tue, 12 Nov 2024 02:01:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AC21uo3022967; Tue, 12 Nov 2024 02:01:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AC21ubS022964; Tue, 12 Nov 2024 02:01:56 GMT (envelope-from git) Date: Tue, 12 Nov 2024 02:01:56 GMT Message-Id: <202411120201.4AC21ubS022964@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 5b62dc782d48 - main - p9fs.5: rename to p9fs.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 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: 5b62dc782d4891845b47f2c0dfbb7717cbfe3897 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=5b62dc782d4891845b47f2c0dfbb7717cbfe3897 commit 5b62dc782d4891845b47f2c0dfbb7717cbfe3897 Author: Lexi Winter AuthorDate: 2024-11-07 20:25:10 +0000 Commit: Mark Johnston CommitDate: 2024-11-12 01:43:15 +0000 p9fs.5: rename to p9fs.4 This is a filesystem (driver), not a file format, so it should be in section 4. Pull Request: https://github.com/freebsd/freebsd-src/pull/1520 --- ObsoleteFiles.inc | 3 +++ share/man/man4/Makefile | 1 + share/man/{man5/p9fs.5 => man4/p9fs.4} | 4 ++-- share/man/man5/Makefile | 1 - 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 142a389a8e7a..75414bd1a111 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20241112: move p9fs from section 5 to section 4 +OLD_FILES+=usr/share/man/man5/p9fs.5.gz + # 20241104: remove the outdated c2x.7 symlink in favor of c23.7 OLD_FILES+=usr/share/man/man7/c2x.7.gz diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index ad1cf5dd3785..72e1de3009c9 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -442,6 +442,7 @@ MAN= aac.4 \ owc.4 \ ovpn.4 \ ${_padlock.4} \ + p9fs.4 \ pass.4 \ pca954x.4 \ pccard.4 \ diff --git a/share/man/man5/p9fs.5 b/share/man/man4/p9fs.4 similarity index 99% rename from share/man/man5/p9fs.5 rename to share/man/man4/p9fs.4 index 5c110e3dc963..04f27abd2545 100644 --- a/share/man/man5/p9fs.5 +++ b/share/man/man4/p9fs.4 @@ -22,8 +22,8 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd December 7, 2022 -.Dt P9FS 5 +.Dd November 7, 2024 +.Dt P9FS 4 .Os .Sh NAME .Nm p9fs diff --git a/share/man/man5/Makefile b/share/man/man5/Makefile index 553bedddeea1..e2abf1d60905 100644 --- a/share/man/man5/Makefile +++ b/share/man/man5/Makefile @@ -34,7 +34,6 @@ MAN= acct.5 \ nsmb.conf.5 \ nsswitch.conf.5 \ os-release.5 \ - p9fs.5 \ passwd.5 \ pbm.5 \ periodic.conf.5 \ From nobody Tue Nov 12 02:01:57 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XnV5y06bgz5cxdy; Tue, 12 Nov 2024 02: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XnV5x53ZPz3xBY; Tue, 12 Nov 2024 02: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=1731376917; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LOTPP0/XKK6kmAEPvIubyX5ygQR87ex8FsV9F81qnbg=; b=YtVa4+BXEKgVoX/QDAsI0C4XWmmkVzZ6lBp2AHMdpo7F15DxtIXgMWjocaOBq8MwcR48fh 8FIu54s2706k5Xyd0cnEQxNSmcG7Omq496rlDr/KJbaBipp43ebmL9JbG1dN7p+5DeKhS8 WnR2+cvzoVzmc0igae/Dv4nHVYuBaMdjK3RHm/jX9z1PkEQYp39biOJVmhhXnpPDXYNlpl xPJXaMF8tzEUYEoh3EjIan3WyKu8HyMJ4LGG+bgqQCcpTzwChtShtTDjviPwkgwByTEZq1 1AzD7JhtU8JZA4Bb3Mp0MvP2IqvltLPjuCkAf032hp0Q/SymggsioLT1VTsYTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731376917; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LOTPP0/XKK6kmAEPvIubyX5ygQR87ex8FsV9F81qnbg=; b=l3wHUqyzkrKkQSnxGB3713jgL7gWTiJq1UiIpBwxeRGNZkoLPntXBD2NLmPIGEjHCRoX8I J7VfukX1sx3vCbhrBk94BwJBi3J4HPjkQ+FLROegPiFdIiJFupXgLm7On9PM8Gw+vqAuxF 0TzNWLbTjeEmtv+1V8parphI61aRDiD6LMu73TscyrZzIu2Luu9TEVo4FhGWr6qOKEi9bP t3BDPBwG12pMrGJ1acxqcdFcCTujePectT1sdO0TaKmu9WlBRNUOuUBNLPwd1mh0n0wQvF X7mpxtqrIJsGHVlrLIPFL2M+Z1Yq0PPZtANjqdpBi/l6/It6xJc3C6FweRNL5g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731376917; a=rsa-sha256; cv=none; b=a2TcbMwUou6rDjH5j0xM67tfipypLqBmSJtRe5jIeCjjtXgmo3F8tISzuJIhk1Wc89ZGjT fSkBxUKFpilyOOvBV5Mz/O5Nm/ZiA6uDvwshppW6p/yWTmrntBD75njen5E/4fyomx6XR9 WRRVjrJO4T1IvszYT9lmkbjEdTA3otjUQ/zMPTtEwxKkjTr5TLlZ6FhZEUCFkmbNTnhbad zw1iuCOp8mS9ixuvfqTOym27mQ6uYAa+yHEur6GCbbWen7dT/ZpL4oVen6zMfkcy3d2ATP QuDKT2luarLadsAi98QC0hyWoVBOwa0s6JZbU98NAp6vkqCB/elk5l0QYjNNAQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XnV5x3vLjzqvY; Tue, 12 Nov 2024 02:01:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AC21vL1023012; Tue, 12 Nov 2024 02:01:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AC21vYk023009; Tue, 12 Nov 2024 02:01:57 GMT (envelope-from git) Date: Tue, 12 Nov 2024 02:01:57 GMT Message-Id: <202411120201.4AC21vYk023009@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 1030ee912837 - main - sleepqueue: Fix the comment for sleepq_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 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: 1030ee9128373e7819e5d4a45475ad8cda24fec9 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=1030ee9128373e7819e5d4a45475ad8cda24fec9 commit 1030ee9128373e7819e5d4a45475ad8cda24fec9 Author: Mark Johnston AuthorDate: 2024-11-12 01:57:24 +0000 Commit: Mark Johnston CommitDate: 2024-11-12 01:57:24 +0000 sleepqueue: Fix the comment for sleepq_switch() The comment from mi_switch() applies here. PR: 279708 Fixes: 686bcb5c14ab ("schedlock 4/4") MFC after: 1 week --- sys/kern/subr_sleepqueue.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/subr_sleepqueue.c b/sys/kern/subr_sleepqueue.c index 0af666653352..19dc88d71b73 100644 --- a/sys/kern/subr_sleepqueue.c +++ b/sys/kern/subr_sleepqueue.c @@ -539,7 +539,8 @@ sleepq_catch_signals(const void *wchan, int pri) /* * Switches to another thread if we are still asleep on a sleep queue. - * Returns with thread lock. + * + * The thread lock is required on entry and is no longer held on return. */ static void sleepq_switch(const void *wchan, int pri) From nobody Tue Nov 12 02:01:58 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XnV5z0506z5cxgg; Tue, 12 Nov 2024 02: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XnV5y50w7z3x86; Tue, 12 Nov 2024 02: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=1731376918; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6T6VA0tU2mPx/WDQXFVl51zAQOE1H+1zQFD7WkhZMwI=; b=H+OOhz6VVVAF2YKGBwLEcT7dhSxARrPyvO9p3ne6bvdPX7+1wRIbStNUcuRJQAQIaNYP0a dxZTc9LsHC93xiWa3I/2viHPi7qHD8JrVw3rqdbKHMRLuQO0Y3LEBrTLqk9wLK5wwkj8qs lNPAY8bqd2nqwEo865nlOOKJ7ZnUMd6v0IwqBR8PNvmSPtneWqSsii2xutp8Tskz6GNwXO LjKf/4nfXL7xLMphPXwpfzM9GU6/UVZ3QLUYwdfHGzP4cIF37+4MD4ZzkPzAvD7jAj2uV4 d5HXXPeS0HRkqUOmXyCZoGb1gHlueZl/s9Y0stZZBcPa9SY2LBl2xwBuQV4ISA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731376918; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6T6VA0tU2mPx/WDQXFVl51zAQOE1H+1zQFD7WkhZMwI=; b=wnxJ2gmEx8SRKKQn0q8kEkvHoZqbEveLlRTjW6frJlhLGKbiHd4Nn/x8mrlfYZFbhg2om5 Z3y63nARTMYhB9lgcmcXhqMZmm3U6vA7PnnGmg2pheC4jwLZmqIZDYJ4sXcEsssd6VQlVH kRRcuYCm1gEb+1vJIMun97HhEcjHus7OKKLwdGO13c89nKNCZehfEeayU3TmguO6ScY8Cn zSC1YbLE32GV21YGX6PT0xDvXjCUq2mLVwhEbQxUSspnk2LGZV+MRM9pKAgNat4KEq0ol8 rmN9RIuJ/gvo9aWHEpboQgGGYqUKqiHthlsMH6XRUxVbQtPPZ/1H/XigLLjPWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731376918; a=rsa-sha256; cv=none; b=HszyYTxEMtbc9T0mx0NStvNSQcjJoduclPNesW+GpOb+s9QYEpkgDFWQtlnTsS5BWyCyI5 VX9yKvC0PpVq9QJAsXKI0EEzHOQ1SzYJsri3RS1WqMtnpOcf74/ZVHcxyL1o3QWQ2/hINw YLXCGdLAG7VkxU1PmLGfntl4myJll40yNkUC6NZi05dTmzZ+OMlG9wje0tOXl6KsWXR1cy qQHdKp/D5E5M4vyw/MkeR8AJAiMkKWh3QUmZ/XvbYNlHS6XpcpGZoXoJeBgDUGcKL6by0J +pELYFNl/rF87G/BXSrVHqAXyOj+C2jW6mAwxEzJpiS4VrGFpYU3i5KAN5p6vQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XnV5y4b1FzrYw; Tue, 12 Nov 2024 02:01:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AC21wTZ023067; Tue, 12 Nov 2024 02:01:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AC21wNW023064; Tue, 12 Nov 2024 02:01:58 GMT (envelope-from git) Date: Tue, 12 Nov 2024 02:01:58 GMT Message-Id: <202411120201.4AC21wNW023064@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 195402c5c5b7 - main - busdma_bounce: Replace a SYSINIT with static initializations List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 195402c5c5b7b3236c0680f06b60b7f9465982c8 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=195402c5c5b7b3236c0680f06b60b7f9465982c8 commit 195402c5c5b7b3236c0680f06b60b7f9465982c8 Author: Mark Johnston AuthorDate: 2024-11-12 01:57:35 +0000 Commit: Mark Johnston CommitDate: 2024-11-12 01:57:35 +0000 busdma_bounce: Replace a SYSINIT with static initializations No functional change intended. MFC after: 1 week --- sys/kern/subr_busdma_bounce.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/sys/kern/subr_busdma_bounce.c b/sys/kern/subr_busdma_bounce.c index a27bc423c23a..60fe2fc6b2a6 100644 --- a/sys/kern/subr_busdma_bounce.c +++ b/sys/kern/subr_busdma_bounce.c @@ -86,11 +86,14 @@ struct bounce_zone { }; static struct mtx bounce_lock; +MTX_SYSINIT(bounce_lock, &bounce_lock, "bounce pages lock", MTX_DEF); static int total_bpages; static int busdma_zonecount; -static STAILQ_HEAD(, bounce_zone) bounce_zone_list; -static STAILQ_HEAD(, bus_dmamap) bounce_map_callbacklist; +static STAILQ_HEAD(, bounce_zone) bounce_zone_list = + STAILQ_HEAD_INITIALIZER(bounce_zone_list); +static STAILQ_HEAD(, bus_dmamap) bounce_map_callbacklist = + STAILQ_HEAD_INITIALIZER(bounce_map_callbacklist); static MALLOC_DEFINE(M_BOUNCE, "bounce", "busdma bounce pages"); @@ -130,17 +133,6 @@ _bus_dmamap_reserve_pages(bus_dma_tag_t dmat, bus_dmamap_t map, int flags) return (0); } -static void -init_bounce_pages(void *dummy __unused) -{ - - total_bpages = 0; - STAILQ_INIT(&bounce_zone_list); - STAILQ_INIT(&bounce_map_callbacklist); - mtx_init(&bounce_lock, "bounce pages lock", NULL, MTX_DEF); -} -SYSINIT(bpages, SI_SUB_LOCK, SI_ORDER_ANY, init_bounce_pages, NULL); - static struct sysctl_ctx_list * busdma_sysctl_tree(struct bounce_zone *bz) { From nobody Tue Nov 12 02:07:53 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XnVDt3Wmtz5cy4p; Tue, 12 Nov 2024 02:07:58 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-io1-xd2e.google.com (mail-io1-xd2e.google.com [IPv6:2607:f8b0:4864:20::d2e]) (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 4XnVDt1lVWz40Mj; Tue, 12 Nov 2024 02:07:58 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-io1-xd2e.google.com with SMTP id ca18e2360f4ac-83b2a41b81cso191255539f.0; Mon, 11 Nov 2024 18:07:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731377276; x=1731982076; darn=freebsd.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=v+MJS1XjTxMDA9I0zBKv3eAvtlgeZ4xuMakfJ8zNp0o=; b=QP2bJeNkl5ALMIualuj6H1mhv1qV+C3yMAD0zCaO2VJOd3+uTeEQkEZ8FqJBEmy37e RoGjFTHW6xAbrz6OhHy+QK08AGeQOc0LnPcWcx/UuDLvVTKPcSWklbvrhxVSaUQZby9x qZVmW9yMVhrx0pA8lyhCrbVVcmdYTOJ6Xm3OWX4TAChwDYArSUlq89WovCZUcAh5F0xw e/1qPU5PqiGRYNHU7lzqZBD8NPYy14lxh/EzUSSWIjRbH//HvqyEVHdspf5E+MNZRE4G PzifGbv1r+hVj/HMAkIQuxKnpYLz0fC+9pvS6pqg1WB1+m8nru6IPG48YkCDoh1eYeIB 6Z/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731377276; x=1731982076; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=v+MJS1XjTxMDA9I0zBKv3eAvtlgeZ4xuMakfJ8zNp0o=; b=HSgCgsOApGBm/QD+aRx0PigWB9VATn0POClam+Wtit8dOyf49Bjgi22/zuDts0KItQ UUz4PtsAofUVBUEA5qo3fd3IBsCzUcuQtcDju/xtCZ+dfYM96ZW7ShG0FOd0HJEbO5GS 4Q4smVWm5mu6O5yUyJt9LBHd591WezfRYoAWaUlGVqY2UHII2X+q7KWVCETlhjGNqRIL 8e21dCjpqZJQgIFAVb8rt1JnoVKM0Jj0lagjy1+TzNvhMBKiRwlGDSjpZrbX0rFU3nmr QttaowTp91iIlyjQ0Fj+TiSQkb42kCDQoE26Kd6KwmpPTeQ5OVu8zEKTvoeP3qQ0LuUe Pz7A== X-Forwarded-Encrypted: i=1; AJvYcCV4XqhJ6lzNG8tn+E656LH9HyRaEEFppPI+JST4WjVkDP6x1V27VrcIrqtbCtZQsww0Np+Kco2RvTjPnH0Pt20G0yVe3c0=@freebsd.org, AJvYcCXYaB0+7HC7Y317cyvpK9l8EAgpdnoutu/xUpqGOddTbAOkAmcOLNVDLPqEZoEfxFlpMaB+dwypAh4d7BQ8TmaPOpIy@freebsd.org X-Gm-Message-State: AOJu0Yz3V+ctwRfTQyPd8NT8OMfSE6ujT6l6Txv77amLdnLQe18/2ASO nH+RqcChs7VuZLl1BlNwTpXhqlBiMocrB8TiO2CaD1kial9+yfSNyzUKAA== X-Google-Smtp-Source: AGHT+IHqRsgX/3Mq96JYW8cDE8iK3OhMhoI2RaABYvd224+w++v/axnZYOfoWiDY97077ICvFSrHVw== X-Received: by 2002:a05:6602:1607:b0:83a:71c6:26fb with SMTP id ca18e2360f4ac-83e032a82c0mr1794223239f.6.1731377276595; Mon, 11 Nov 2024 18:07:56 -0800 (PST) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4de7883c8absm1612806173.154.2024.11.11.18.07.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Nov 2024 18:07:56 -0800 (PST) Date: Mon, 11 Nov 2024 21:07:53 -0500 From: Mark Johnston To: Gleb Smirnoff Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 349d1366edd2 - main - socket: Export the FIB number of sockets Message-ID: References: <202411041456.4A4EuXKm059669@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 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4XnVDt1lVWz40Mj X-Spamd-Bar: ---- On Mon, Nov 11, 2024 at 04:56:44PM -0800, Gleb Smirnoff wrote: > On Mon, Nov 04, 2024 at 02:56:33PM +0000, Mark Johnston wrote: > M> diff --git a/sys/sys/socketvar.h b/sys/sys/socketvar.h > M> index 40464f555816..fda8d23f5649 100644 > M> --- a/sys/sys/socketvar.h > M> +++ b/sys/sys/socketvar.h > M> @@ -615,7 +615,8 @@ struct xsocket { > M> uint32_t so_qlimit; > M> pid_t so_pgid; > M> uid_t so_uid; > M> - int32_t so_spare32[8]; > M> + int32_t so_fibnum; > M> + int32_t so_spare32[7]; > M> int16_t so_type; > M> int16_t so_options; > M> int16_t so_linger; > > I would suggest not to spend the spares in the main branch. > So this commit should add the field, keeping 8 spares. But > the merge to stable/14 should use a spare. This would break consumers running in a 14.x jail on a 15.x host, no? With VNET jails, this compatibility is very useful to have in my experience. > Otherwise we eventually will run out of spares in main > and also nearly run out of spares in some stable/22 branch. > > I'd suggest to follow the policy of not spending spares > in the main branch for all structures, not just xsocket. > > -- > Gleb Smirnoff From nobody Tue Nov 12 03:28:13 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XnX1V0DkDz5d42g; Tue, 12 Nov 2024 03:28: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XnX1T6k5Pz45rf; Tue, 12 Nov 2024 03:28:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731382093; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lbSPygb8eFak0+xgp0Fhru8XGDVovDViLToisvbqH+M=; b=gaqsXXTHmlklTIMHGOo43W8TYVPyD9AHqUZcXaNTPTVRyL0C8EPM7kU/+Cw2e3Krgtb/Bu WT0GkzjQw97QWKLUzvQqhAsSBB3tkIE4sLLzc/uBUZTP9lRFQzqE8cUVWt2CV6yofSXQpk +hMtD14w++SI3D8M3Lo28ngEGRxOXi3oFImwIlMwNlU3SbDJYxpO1x8xu5isbY69QyZDIZ R5tczlVP9YwC01zysz3Bm+YPE40EB9ALMPOkp3ZPK3HpfHYHBltsXE5to+v8TLGWmjBk19 Coqm9IxKOWhvw5GlzB0kmpvR3p3ZtOmuGSVudD+4yAihOF2CeTN5i3DuUAlF8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731382093; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lbSPygb8eFak0+xgp0Fhru8XGDVovDViLToisvbqH+M=; b=wi6RBMGJymU0bnBLcb6HikuDn2RVop7PlKmv/djHkVQzTry9y4LOPeJ0TeAwYnEV4Ckb4E P9wpSVP3IfbEPe29DllaCX7mtaFkM6C9Z9TDSGVVJ973++VZZTXqminhYLzZhfy5E6oPfA kOEXPZKfbHi1zi1XfEwh7XJvPGpQ09q0yLysvDEwDr07KQDqFYMLuFZ9A+zEzuhLPtyV4I x22JUHCrXfHg5y/nDJXT/9xaQjDJBUu7k9PL6v/jVxYwJFIF7hY0QCZEHM/7uNavlff2U7 UYh70ax5Xe4raL9aCNG8twfMpFihsMkNo8mDo3M/EQxC7/y0/w8YeHfK1COrnw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731382093; a=rsa-sha256; cv=none; b=MWhUIREJKubjc8a6kiZQiq+CDgNuQYcGZj3LW0019ho/52l97BkqlQBtdVSvA84AE3J/5A QT+wydPuKOIxldOThOXglKT2P6hYg+8dT8RBjLmvYk9xoy9tLpZqwSzNlo0nn6IhsgKBWZ wpLAjWtR0irbv3GBfimNJLXmT/7erRSfMyJBtpnk6q67OSUPL4JsFxgmOkTsB25LNVFv9R 41pndgfHVE2Qk9KqELy7giWuiFR4xm1ugNo8RtPmzCaNtN6J3Z3eXzltkS75T1jW+rvGO9 KsKua5nqZPGAGTOFsVHXbjTRz+KS0WOQfRBJjCf4JBSkT73ZmCkWicufYIs8MA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XnX1T6KWrztQv; Tue, 12 Nov 2024 03:28:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AC3SDrS077857; Tue, 12 Nov 2024 03:28:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AC3SD64077854; Tue, 12 Nov 2024 03:28:13 GMT (envelope-from git) Date: Tue, 12 Nov 2024 03:28:13 GMT Message-Id: <202411120328.4AC3SD64077854@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: c607b3258f15 - main - ntp: Switch to upstream man 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 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: c607b3258f15d4ea1710bc3cdbab05c9355c2828 Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=c607b3258f15d4ea1710bc3cdbab05c9355c2828 commit c607b3258f15d4ea1710bc3cdbab05c9355c2828 Author: Cy Schubert AuthorDate: 2024-10-28 16:33:30 +0000 Commit: Cy Schubert CommitDate: 2024-11-12 03:10:04 +0000 ntp: Switch to upstream man pages The downstream (FreeBSD) ntp man pages are out of date. Switch to those provided by ntp.org (nwtime.org). PR: 104493 Differential Revision: https://reviews.freebsd.org/D47319 --- usr.sbin/ntp/doc/Makefile | 39 +- usr.sbin/ntp/doc/ntp-keygen.8 | 1223 --------------- usr.sbin/ntp/doc/ntp.conf.5 | 3277 ----------------------------------------- usr.sbin/ntp/doc/ntp.keys.5 | 174 --- usr.sbin/ntp/doc/ntpd.8 | 908 ------------ usr.sbin/ntp/doc/ntpdc.8 | 809 ---------- usr.sbin/ntp/doc/ntpq.8 | 1055 ------------- usr.sbin/ntp/doc/sntp.8 | 317 ---- 8 files changed, 38 insertions(+), 7764 deletions(-) diff --git a/usr.sbin/ntp/doc/Makefile b/usr.sbin/ntp/doc/Makefile index 2da65eccc1f0..b122df4f095b 100644 --- a/usr.sbin/ntp/doc/Makefile +++ b/usr.sbin/ntp/doc/Makefile @@ -24,9 +24,46 @@ FILES= access.html accopt.html assoc.html audio.html authentic.html \ MAN= ntp.conf.5 ntp.keys.5 MAN+= ntp-keygen.8 ntpd.8 ntpdate.8 ntpdc.8 ntpq.8 ntptime.8 sntp.8 +CLEANFILES= ntp.conf.5 ntp.keys.5 +CLEANFILES+= ntp-keygen.8 ntpd.8 ntpdc.8 ntpq.8 sntp.8 + +SUFFIXES8= .1ntp-keygenmdoc \ + .1ntpdmdoc \ + .1ntpdcmdoc \ + .1ntpqmdoc \ + .1sntpmdoc + +.SUFFIXES: .html .5 .8 .5mdoc ${SUFFIXES8} + +.5mdoc.5: + sed '/^\.Dt /s/5mdoc/5/' ${.ALLSRC} > ${.TARGET} + +.for s in ${SUFFIXES8} +$s.8: + sed '/^\.Dt /s/1[a-z-][a-z-]*/8/' ${.ALLSRC} > ${.TARGET} +.endfor + +ntp.conf.5: ntp.conf.5mdoc + +ntp.keys.5: ntp.keys.5mdoc + +ntp-keygen.8: ntp-keygen.1ntp-keygenmdoc + +ntpd.8: ntpd.1ntpdmdoc + +ntpdc.8: ntpdc.1ntpdcmdoc + +ntpq.8: ntpq.1ntpqmdoc + +sntp.8: sntp.1sntpmdoc + .PATH: ${SRCTOP}/contrib/ntp/html \ ${SRCTOP}/contrib/ntp/util \ ${SRCTOP}/contrib/ntp/ntpd \ - ${SRCTOP}/contrib/ntp/ntpsnmpd + ${SRCTOP}/contrib/ntp/ntpdc \ + ${SRCTOP}/contrib/ntp/ntpq \ + ${SRCTOP}/contrib/ntp/ntpsnmpd \ + ${SRCTOP}/contrib/ntp/sntp \ + ${SRCTOP}/contrib/ntp/util .include diff --git a/usr.sbin/ntp/doc/ntp-keygen.8 b/usr.sbin/ntp/doc/ntp-keygen.8 deleted file mode 100644 index 3e8ffd9dbf58..000000000000 --- a/usr.sbin/ntp/doc/ntp-keygen.8 +++ /dev/null @@ -1,1223 +0,0 @@ -.Dd August 14 2018 -.Dt NTP_KEYGEN 8 User Commands -.Os -.\" EDIT THIS FILE WITH CAUTION (ntp-keygen-opts.mdoc) -.\" -.\" It has been AutoGen-ed August 14, 2018 at 08:30:38 AM by AutoGen 5.18.5 -.\" From the definitions ntp-keygen-opts.def -.\" and the template file agmdoc-cmd.tpl -.Sh NAME -.Nm ntp-keygen -.Nd create a Network Time Protocol host key -.Sh SYNOPSIS -.Nm -.\" Mixture of short (flag) options and long options -.Op Fl flags -.Op Fl flag Op Ar value -.Op Fl \-option\-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc -.Pp -All arguments must be options. -.Pp -.Sh DESCRIPTION -This program generates cryptographic data files used by the NTPv4 -authentication and identification schemes. -It can generate message digest keys used in symmetric key cryptography and, -if the OpenSSL software library has been installed, it can generate host keys, -signing keys, certificates, and identity keys and parameters used in Autokey -public key cryptography. -These files are used for cookie encryption, -digital signature, and challenge/response identification algorithms -compatible with the Internet standard security infrastructure. -.Pp -The message digest symmetric keys file is generated in a format -compatible with NTPv3. -All other files are in PEM\-encoded printable ASCII format, -so they can be embedded as MIME attachments in email to other sites -and certificate authorities. -By default, files are not encrypted. -.Pp -When used to generate message digest symmetric keys, the program -produces a file containing ten pseudo\-random printable ASCII strings -suitable for the MD5 message digest algorithm included in the -distribution. -If the OpenSSL library is installed, it produces an additional ten -hex\-encoded random bit strings suitable for SHA1, AES\-128\-CMAC, and -other message digest algorithms. -The message digest symmetric keys file must be distributed and stored -using secure means beyond the scope of NTP itself. -Besides the keys used for ordinary NTP associations, additional keys -can be defined as passwords for the -.Xr ntpq 8 -and -.Xr ntpdc 8 -utility programs. -.Pp -The remaining generated files are compatible with other OpenSSL -applications and other Public Key Infrastructure (PKI) resources. -Certificates generated by this program are compatible with extant -industry practice, although some users might find the interpretation of -X509v3 extension fields somewhat liberal. -However, the identity keys are probably not compatible with anything -other than Autokey. -.Pp -Some files used by this program are encrypted using a private password. -The -.Fl p -option specifies the read password for local encrypted files and the -.Fl q -option the write password for encrypted files sent to remote sites. -If no password is specified, the host name returned by the Unix -.Xr hostname 1 -command, normally the DNS name of the host, is used as the the default read -password, for convenience. -The -.Nm -program prompts for the password if it reads an encrypted file -and the password is missing or incorrect. -If an encrypted file is read successfully and -no write password is specified, the read password is used -as the write password by default. -.Pp -The -.Cm pw -option of the -.Ic crypto -.Xr ntpd 8 -configuration command specifies the read -password for previously encrypted local files. -This must match the local read password used by this program. -If not specified, the host name is used. -Thus, if files are generated by this program without an explicit password, -they can be read back by -.Xr ntpd 8 -without specifying an explicit password but only on the same host. -If the write password used for encryption is specified as the host name, -these files can be read by that host with no explicit password. -.Pp -Normally, encrypted files for each host are generated by that host and -used only by that host, although exceptions exist as noted later on -this page. -The symmetric keys file, normally called -.Pa ntp.keys , -is usually installed in -.Pa /etc . -Other files and links are usually installed in -.Pa /usr/local/etc , -which is normally in a shared filesystem in -NFS\-mounted networks and cannot be changed by shared clients. -In these cases, NFS clients can specify the files in another -directory such as -.Pa /etc -using the -.Ic keysdir -.Xr ntpd 8 -configuration file command. -.Pp -This program directs commentary and error messages to the standard -error stream -.Pa stderr -and remote files to the standard output stream -.Pa stdout -where they can be piped to other applications or redirected to files. -The names used for generated files and links all begin with the -string -.Pa ntpkey\&* -and include the file type, generating host and filestamp, -as described in the -.Sx "Cryptographic Data Files" -section below. -.Ss Running the Program -The safest way to run the -.Nm -program is logged in directly as root. -The recommended procedure is change to the -.Ar keys -directory, usually -.Pa /usr/local/etc , -then run the program. -.Pp -To test and gain experience with Autokey concepts, log in as root and -change to the -.Ar keys -directory, usually -.Pa /usr/local/etc . -When run for the first time, or if all files with names beginning with -.Pa ntpkey\&* -have been removed, use the -.Nm -command without arguments to generate a default -.Cm RSA -host key and matching -.Cm RSA\-MD5 -certificate file with expiration date one year hence, -which is all that is necessary in many cases. -The program also generates soft links from the generic names -to the respective files. -If run again without options, the program uses the -existing keys and parameters and generates a new certificate file with -new expiration date one year hence, and soft link. -.Pp -The host key is used to encrypt the cookie when required and so must be -.Cm RSA -type. -By default, the host key is also the sign key used to encrypt signatures. -When necessary, a different sign key can be specified and this can be -either -.Cm RSA -or -.Cm DSA -type. -By default, the message digest type is -.Cm MD5 , -but any combination -of sign key type and message digest type supported by the OpenSSL library -can be specified, including those using the -.Cm AES128CMAC , MD2 , MD5 , MDC2 , SHA , SHA1 -and -.Cm RIPE160 -message digest algorithms. -However, the scheme specified in the certificate must be compatible -with the sign key. -Certificates using any digest algorithm are compatible with -.Cm RSA -sign keys; -however, only -.Cm SHA -and -.Cm SHA1 -certificates are compatible with -.Cm DSA -sign keys. -.Pp -Private/public key files and certificates are compatible with -other OpenSSL applications and very likely other libraries as well. -Certificates or certificate requests derived from them should be compatible -with extant industry practice, although some users might find -the interpretation of X509v3 extension fields somewhat liberal. -However, the identification parameter files, although encoded -as the other files, are probably not compatible with anything other than Autokey. -.Pp -Running the program as other than root and using the Unix -.Xr su 1 -command -to assume root may not work properly, since by default the OpenSSL library -looks for the random seed file -.Pa .rnd -in the user home directory. -However, there should be only one -.Pa .rnd , -most conveniently -in the root directory, so it is convenient to define the -.Ev RANDFILE -environment variable used by the OpenSSL library as the path to -.Pa .rnd . -.Pp -Installing the keys as root might not work in NFS\-mounted -shared file systems, as NFS clients may not be able to write -to the shared keys directory, even as root. -In this case, NFS clients can specify the files in another -directory such as -.Pa /etc -using the -.Ic keysdir -.Xr ntpd 8 -configuration file command. -There is no need for one client to read the keys and certificates -of other clients or servers, as these data are obtained automatically -by the Autokey protocol. -.Pp -Ordinarily, cryptographic files are generated by the host that uses them, -but it is possible for a trusted agent (TA) to generate these files -for other hosts; however, in such cases files should always be encrypted. -The subject name and trusted name default to the hostname -of the host generating the files, but can be changed by command line options. -It is convenient to designate the owner name and trusted name -as the subject and issuer fields, respectively, of the certificate. -The owner name is also used for the host and sign key files, -while the trusted name is used for the identity files. -.Pp -All files are installed by default in the keys directory -.Pa /usr/local/etc , -which is normally in a shared filesystem -in NFS\-mounted networks. -The actual location of the keys directory -and each file can be overridden by configuration commands, -but this is not recommended. -Normally, the files for each host are generated by that host -and used only by that host, although exceptions exist -as noted later on this page. -.Pp -Normally, files containing private values, -including the host key, sign key and identification parameters, -are permitted root read/write\-only; -while others containing public values are permitted world readable. -Alternatively, files containing private values can be encrypted -and these files permitted world readable, -which simplifies maintenance in shared file systems. -Since uniqueness is insured by the -.Ar hostname -and -.Ar filestamp -file name extensions, the files for an NTP server and -dependent clients can all be installed in the same shared directory. -.Pp -The recommended practice is to keep the file name extensions -when installing a file and to install a soft link -from the generic names specified elsewhere on this page -to the generated files. -This allows new file generations to be activated simply -by changing the link. -If a link is present, -.Xr ntpd 8 -follows it to the file name to extract the -.Ar filestamp . -If a link is not present, -.Xr ntpd 8 -extracts the -.Ar filestamp -from the file itself. -This allows clients to verify that the file and generation times -are always current. -The -.Nm -program uses the same -.Ar filestamp -extension for all files generated -at one time, so each generation is distinct and can be readily -recognized in monitoring data. -.Pp -Run the command on as many hosts as necessary. -Designate one of them as the trusted host (TH) using -.Nm -with the -.Fl T -option and configure it to synchronize from reliable Internet servers. -Then configure the other hosts to synchronize to the TH directly or -indirectly. -A certificate trail is created when Autokey asks the immediately -ascendant host towards the TH to sign its certificate, which is then -provided to the immediately descendant host on request. -All group hosts should have acyclic certificate trails ending on the TH. -.Pp -The host key is used to encrypt the cookie when required and so must be -RSA type. -By default, the host key is also the sign key used to encrypt -signatures. -A different sign key can be assigned using the -.Fl S -option and this can be either -.Cm RSA -or -.Cm DSA -type. -By default, the signature -message digest type is -.Cm MD5 , -but any combination of sign key type and -message digest type supported by the OpenSSL library can be specified -using the -.Fl c -option. -.Pp -The rules say cryptographic media should be generated with proventic -filestamps, which means the host should already be synchronized before -this program is run. -This of course creates a chicken\-and\-egg problem -when the host is started for the first time. -Accordingly, the host time -should be set by some other means, such as eyeball\-and\-wristwatch, at -least so that the certificate lifetime is within the current year. -After that and when the host is synchronized to a proventic source, the -certificate should be re\-generated. -.Pp -Additional information on trusted groups and identity schemes is on the -.Dq Autokey Public\-Key Authentication -page. -.Pp -File names begin with the prefix -.Pa ntpkey Ns _ -and end with the suffix -.Pa _ Ns Ar hostname . Ar filestamp , -where -.Ar hostname -is the owner name, usually the string returned -by the Unix -.Xr hostname 1 -command, and -.Ar filestamp -is the NTP seconds when the file was generated, in decimal digits. -This both guarantees uniqueness and simplifies maintenance -procedures, since all files can be quickly removed -by a -.Ic rm Pa ntpkey\&* -command or all files generated -at a specific time can be removed by a -.Ic rm Pa \&* Ns Ar filestamp -command. -To further reduce the risk of misconfiguration, -the first two lines of a file contain the file name -and generation date and time as comments. -.Ss Trusted Hosts and Groups -Each cryptographic configuration involves selection of a signature scheme -and identification scheme, called a cryptotype, -as explained in the -.Sx Authentication Options -section of -.Xr ntp.conf 5 . -The default cryptotype uses -.Cm RSA -encryption, -.Cm MD5 -message digest -and -.Cm TC -identification. -First, configure a NTP subnet including one or more low\-stratum -trusted hosts from which all other hosts derive synchronization -directly or indirectly. -Trusted hosts have trusted certificates; -all other hosts have nontrusted certificates. -These hosts will automatically and dynamically build authoritative -certificate trails to one or more trusted hosts. -A trusted group is the set of all hosts that have, directly or indirectly, -a certificate trail ending at a trusted host. -The trail is defined by static configuration file entries -or dynamic means described on the -.Sx Automatic NTP Configuration Options -section of -.Xr ntp.conf 5 . -.Pp -On each trusted host as root, change to the keys directory. -To insure a fresh fileset, remove all -.Pa ntpkey -files. -Then run -.Nm -.Fl T -to generate keys and a trusted certificate. -On all other hosts do the same, but leave off the -.Fl T -flag to generate keys and nontrusted certificates. -When complete, start the NTP daemons beginning at the lowest stratum -and working up the tree. -It may take some time for Autokey to instantiate the certificate trails -throughout the subnet, but setting up the environment is completely automatic. -.Pp -If it is necessary to use a different sign key or different digest/signature -scheme than the default, run -.Nm -with the -.Fl S Ar type -option, where -.Ar type -is either -.Cm RSA -or -.Cm DSA . -The most frequent need to do this is when a -.Cm DSA Ns \-signed -certificate is used. -If it is necessary to use a different certificate scheme than the default, -run -.Nm -with the -.Fl c Ar scheme -option and selected -.Ar scheme -as needed. -If -.Nm -is run again without these options, it generates a new certificate -using the same scheme and sign key, and soft link. -.Pp -After setting up the environment it is advisable to update certificates -from time to time, if only to extend the validity interval. -Simply run -.Nm -with the same flags as before to generate new certificates -using existing keys, and soft links. -However, if the host or sign key is changed, -.Xr ntpd 8 -should be restarted. -When -.Xr ntpd 8 -is restarted, it loads any new files and restarts the protocol. -Other dependent hosts will continue as usual until signatures are refreshed, -at which time the protocol is restarted. -.Ss Identity Schemes -As mentioned on the Autonomous Authentication page, -the default -.Cm TC -identity scheme is vulnerable to a middleman attack. -However, there are more secure identity schemes available, -including -.Cm PC , IFF , GQ -and -.Cm MV -schemes described below. -These schemes are based on a TA, one or more trusted hosts -and some number of nontrusted hosts. -Trusted hosts prove identity using values provided by the TA, -while the remaining hosts prove identity using values provided -by a trusted host and certificate trails that end on that host. -The name of a trusted host is also the name of its sugroup -and also the subject and issuer name on its trusted certificate. -The TA is not necessarily a trusted host in this sense, but often is. -.Pp -In some schemes there are separate keys for servers and clients. -A server can also be a client of another server, -but a client can never be a server for another client. -In general, trusted hosts and nontrusted hosts that operate -as both server and client have parameter files that contain -both server and client keys. -Hosts that operate -only as clients have key files that contain only client keys. -.Pp -The PC scheme supports only one trusted host in the group. -On trusted host alice run -.Nm -.Fl P -.Fl p Ar password -to generate the host key file -.Pa ntpkey Ns _ Cm RSA Pa key_alice. Ar filestamp -and trusted private certificate file -.Pa ntpkey Ns _ Cm RSA\-MD5 _ Pa cert_alice. Ar filestamp , -and soft links. -Copy both files to all group hosts; -they replace the files which would be generated in other schemes. -On each host -.Ar bob -install a soft link from the generic name -.Pa ntpkey_host_ Ns Ar bob -to the host key file and soft link -.Pa ntpkey_cert_ Ns Ar bob -to the private certificate file. -Note the generic links are on bob, but point to files generated -by trusted host alice. -In this scheme it is not possible to refresh -either the keys or certificates without copying them -to all other hosts in the group, and recreating the soft links. -.Pp -For the -.Cm IFF -scheme proceed as in the -.Cm TC -scheme to generate keys -and certificates for all group hosts, then for every trusted host in the group, -generate the -.Cm IFF -parameter file. -On trusted host alice run -.Nm -.Fl T -.Fl I -.Fl p Ar password -to produce her parameter file -.Pa ntpkey_IFFpar_alice. Ns Ar filestamp , -which includes both server and client keys. -Copy this file to all group hosts that operate as both servers -and clients and install a soft link from the generic -.Pa ntpkey_iff_alice -to this file. -If there are no hosts restricted to operate only as clients, -there is nothing further to do. -As the -.Cm IFF -scheme is independent -of keys and certificates, these files can be refreshed as needed. -.Pp -If a rogue client has the parameter file, it could masquerade -as a legitimate server and present a middleman threat. -To eliminate this threat, the client keys can be extracted -from the parameter file and distributed to all restricted clients. -After generating the parameter file, on alice run -.Nm -.Fl e -and pipe the output to a file or email program. -Copy or email this file to all restricted clients. -On these clients install a soft link from the generic -.Pa ntpkey_iff_alice -to this file. -To further protect the integrity of the keys, -each file can be encrypted with a secret password. -.Pp -For the -.Cm GQ -scheme proceed as in the -.Cm TC -scheme to generate keys -and certificates for all group hosts, then for every trusted host -in the group, generate the -.Cm IFF -parameter file. -On trusted host alice run -.Nm -.Fl T -.Fl G -.Fl p Ar password -to produce her parameter file -.Pa ntpkey_GQpar_alice. Ns Ar filestamp , -which includes both server and client keys. -Copy this file to all group hosts and install a soft link -from the generic -.Pa ntpkey_gq_alice -to this file. -In addition, on each host -.Ar bob -install a soft link -from generic -.Pa ntpkey_gq_ Ns Ar bob -to this file. -As the -.Cm GQ -scheme updates the -.Cm GQ -parameters file and certificate -at the same time, keys and certificates can be regenerated as needed. -.Pp -For the -.Cm MV -scheme, proceed as in the -.Cm TC -scheme to generate keys -and certificates for all group hosts. -For illustration assume trish is the TA, alice one of several trusted hosts -and bob one of her clients. -On TA trish run -.Nm -.Fl V Ar n -.Fl p Ar password , -where -.Ar n -is the number of revokable keys (typically 5) to produce -the parameter file -.Pa ntpkeys_MVpar_trish. Ns Ar filestamp -and client key files -.Pa ntpkeys_MVkey Ns Ar d _ Pa trish. Ar filestamp -where -.Ar d -is the key number (0 \&< -.Ar d -\&< -.Ar n ) . -Copy the parameter file to alice and install a soft link -from the generic -.Pa ntpkey_mv_alice -to this file. -Copy one of the client key files to alice for later distribution -to her clients. -It does not matter which client key file goes to alice, -since they all work the same way. -Alice copies the client key file to all of her clients. -On client bob install a soft link from generic -.Pa ntpkey_mvkey_bob -to the client key file. -As the -.Cm MV -scheme is independent of keys and certificates, -these files can be refreshed as needed. -.Ss Command Line Options -.Bl -tag -width indent -.It Fl b Fl \-imbits Ns = Ar modulus -Set the number of bits in the identity modulus for generating identity keys to -.Ar modulus -bits. -The number of bits in the identity modulus defaults to 256, but can be set to -values from 256 to 2048 (32 to 256 octets). -Use the larger moduli with caution, as this can consume considerable computing -resources and increases the size of authenticated packets. -.It Fl c Fl \-certificate Ns = Ar scheme -Select certificate signature encryption/message digest scheme. -The -.Ar scheme -can be one of the following: -.Cm RSA\-MD2 , RSA\-MD5 , RSA\-MDC2 , RSA\-SHA , RSA\-SHA1 , RSA\-RIPEMD160 , DSA\-SHA , -or -.Cm DSA\-SHA1 . -Note that -.Cm RSA -schemes must be used with an -.Cm RSA -sign key and -.Cm DSA -schemes must be used with a -.Cm DSA -sign key. -The default without this option is -.Cm RSA\-MD5 . -If compatibility with FIPS 140\-2 is required, either the -.Cm DSA\-SHA -or -.Cm DSA\-SHA1 -scheme must be used. -.It Fl C Fl \-cipher Ns = Ar cipher -Select the OpenSSL cipher to encrypt the files containing private keys. -The default without this option is three\-key triple DES in CBC mode, -.Cm des\-ede3\-cbc . -The -.Ic openssl Fl h -command provided with OpenSSL displays available ciphers. -.It Fl d Fl \-debug\-level -Increase debugging verbosity level. -This option displays the cryptographic data produced in eye\-friendly billboards. -.It Fl D Fl \-set\-debug\-level Ns = Ar level -Set the debugging verbosity to -.Ar level . -This option displays the cryptographic data produced in eye\-friendly billboards. -.It Fl e Fl \-id\-key -Write the -.Cm IFF -or -.Cm GQ -public parameters from the -.Ar IFFkey or GQkey -client keys file previously specified -as unencrypted data to the standard output stream -.Pa stdout . -This is intended for automatic key distribution by email. -.It Fl G Fl \-gq\-params -Generate a new encrypted -.Cm GQ -parameters and key file for the Guillou\-Quisquater (GQ) identity scheme. -This option is mutually exclusive with the -.Fl I -and -.Fl V -options. -.It Fl H Fl \-host\-key -Generate a new encrypted -.Cm RSA -public/private host key file. -.It Fl I Fl \-iffkey -Generate a new encrypted -.Cm IFF -key file for the Schnorr (IFF) identity scheme. -This option is mutually exclusive with the -.Fl G -and -Fl V -options. -.It Fl i Fl \-ident Ns = Ar group -Set the optional Autokey group name to -.Ar group . -This is used in the identity scheme parameter file names of -.Cm IFF , GQ , -and -.Cm MV -client parameters files. -In that role, the default is the host name if no group is provided. -The group name, if specified using -.Fl i -or -.Fl s -following an -.Ql @ -character, is also used in certificate subject and issuer names in the form -.Ar host @ group -and should match the group specified via -.Ic crypto Cm ident -or -.Ic server Cm ident -in the ntpd configuration file. -.It Fl l Fl \-lifetime Ns = Ar days -Set the lifetime for certificate expiration to -.Ar days . -The default lifetime is one year (365 days). -.It Fl m Fl \-modulus Ns = Ar bits -Set the number of bits in the prime modulus for generating files to -.Ar bits . -The modulus defaults to 512, but can be set from 256 to 2048 (32 to 256 octets). -Use the larger moduli with caution, as this can consume considerable computing -resources and increases the size of authenticated packets. -.It Fl M Fl \-md5key -Generate a new symmetric keys file containing 10 -.Cm MD5 -keys, and if OpenSSL is available, 10 -.Cm SHA -keys. -An -.Cm MD5 -key is a string of 20 random printable ASCII characters, while a -.Cm SHA -key is a string of 40 random hex digits. -The file can be edited using a text editor to change the key type or key content. -This option is mutually exclusive with all other options. -.It Fl p Fl \-password Ns = Ar passwd -Set the password for reading and writing encrypted files to -.Ar passwd . -These include the host, sign and identify key files. -By default, the password is the string returned by the Unix -.Ic hostname -command. -.It Fl P Fl \-pvt\-cert -Generate a new private certificate used by the -.Cm PC -identity scheme. -By default, the program generates public certificates. -Note: the PC identity scheme is not recommended for new installations. -.It Fl q Fl \-export\-passwd Ns = Ar passwd -Set the password for writing encrypted -.Cm IFF , GQ and MV -identity files redirected to -.Pa stdout -to -.Ar passwd . -In effect, these files are decrypted with the -.Fl p -password, then encrypted with the -.Fl q -password. -By default, the password is the string returned by the Unix -.Ic hostname -command. -.It Fl s Fl \-subject\-key Ns = Ar Oo host Oc Op @ Ar group -Specify the Autokey host name, where -.Ar host -is the optional host name and -.Ar group -is the optional group name. -The host name, and if provided, group name are used in -.Ar host @ group -form as certificate subject and issuer. -Specifying -.Fl s @ Ar group -is allowed, and results in leaving the host name unchanged, as with -.Fl i Ar group . -The group name, or if no group is provided, the host name are also used in the -file names of -.Cm IFF , GQ , -and -.Cm MV -identity scheme client parameter files. -If -.Ar host -is not specified, the default host name is the string returned by the Unix -.Ic hostname -command. -.It Fl S Fl \-sign\-key Ns = Op Cm RSA | DSA -Generate a new encrypted public/private sign key file of the specified type. -By default, the sign key is the host key and has the same type. -If compatibility with FIPS 140\-2 is required, the sign key type must be -.Cm DSA . -.It Fl T Fl \-trusted\-cert -Generate a trusted certificate. -By default, the program generates a non\-trusted certificate. -.It Fl V Fl \-mv\-params Ar nkeys -Generate -.Ar nkeys -encrypted server keys and parameters for the Mu\-Varadharajan (MV) -identity scheme. -This option is mutually exclusive with the -.Fl I -and -.Fl G -options. -Note: support for this option should be considered a work in progress. -.El -.Ss Random Seed File -All cryptographically sound key generation schemes must have means -to randomize the entropy seed used to initialize -the internal pseudo\-random number generator used -by the library routines. -The OpenSSL library uses a designated random seed file for this purpose. -The file must be available when starting the NTP daemon and -.Nm -program. -If a site supports OpenSSL or its companion OpenSSH, -it is very likely that means to do this are already available. -.Pp -It is important to understand that entropy must be evolved -for each generation, for otherwise the random number sequence -would be predictable. -Various means dependent on external events, such as keystroke intervals, -can be used to do this and some systems have built\-in entropy sources. -Suitable means are described in the OpenSSL software documentation, -but are outside the scope of this page. -.Pp -The entropy seed used by the OpenSSL library is contained in a file, -usually called -.Pa .rnd , -which must be available when starting the NTP daemon -or the -.Nm -program. -The NTP daemon will first look for the file -using the path specified by the -.Cm randfile -subcommand of the -.Ic crypto -configuration command. -If not specified in this way, or when starting the -.Nm -program, -the OpenSSL library will look for the file using the path specified -by the -.Ev RANDFILE -environment variable in the user home directory, -whether root or some other user. -If the -.Ev RANDFILE -environment variable is not present, -the library will look for the -.Pa .rnd -file in the user home directory. -Since both the -.Nm -program and -.Xr ntpd 8 -daemon must run as root, the logical place to put this file is in -.Pa /.rnd -or -.Pa /root/.rnd . -If the file is not available or cannot be written, -the daemon exits with a message to the system log and the program -exits with a suitable error message. -.Ss Cryptographic Data Files -All file formats begin with two nonencrypted lines. -The first line contains the file name, including the generated host name -and filestamp, in the format -.Pa ntpkey_ Ns Ar key _ Ar name . Ar filestamp , -where -.Ar key -is the key or parameter type, -.Ar name -is the host or group name and -.Ar filestamp -is the filestamp (NTP seconds) when the file was created. -By convention, -.Ar key -names in generated file names include both upper and lower case -characters, while -.Ar key -names in generated link names include only lower case characters. -The filestamp is not used in generated link names. -The second line contains the datestamp in conventional Unix -.Pa date -format. -Lines beginning with -.Ql # -are considered comments and ignored by the -.Nm *** 6899 LINES SKIPPED *** From nobody Tue Nov 12 03:28:14 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XnX1W1FbMz5d3Ws; Tue, 12 Nov 2024 03:28: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XnX1W0N2rz45rg; Tue, 12 Nov 2024 03:28:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731382095; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GLdtv8kZ/trjIcKC1+4/qLjz5jQisdVNWiJNxU8bzSY=; b=N8125vf+XVhAzIfL0L27C//kJY6HPgpfrtKp1RqzhyHXPMzWcEcZC7t++QqM9Q6SLgCQbg 28TvbOwsrj+k1/VpqDauEden6zsTB70+VMIfDWqSLLVVW520tFpkWlLU9KStrBWVtkFeaY ay+LZMVdo0F3DUPgGX06YgLi2rGnCjZtRHcFogaYnCT0T4o0yNfhqkuwfHrPxCgXY/nB4W hdz1ye0uhRMbIo40xp96jZbbYb2VDVAdKyS2JufVjDvLMIYZKgfBcbHH432YVPKYAstZxA IovfU1JUJhZWS2rdOpAuhM+heScsBqa2Z8w4Q6rjby3gWVat4Om63HoT/gdDZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731382095; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GLdtv8kZ/trjIcKC1+4/qLjz5jQisdVNWiJNxU8bzSY=; b=U34E8OfDYdZZN+VWeODicOTuntb++XQbtXaQ7gwWq5FjEua8TJ8cfeNigny43+V5gHwMEG 0TynUWsdttXugMl1W9XrohjBBKRumTwI/xGRTuabE9bA+EQM8PeQnVLrMhiNE9akXSKMQa sddNo/cHKpxV6FlpGtktmryC5LK1wiJ6Z8o7G/vWuFyUTq9Z44WFq/zD8Rr72zaaREcJuX 13TFB2LW1+zEWJJxcxYltP2SYIrQrpH2UbYmCoAAq7SC+0QwYM1eQyupW8udqURfcMVh1O nWhwCQsEdWyFv1Rex3ZZlc3/dvyWr7vtcdhGd00NOehjUQxfIfZZf33Uo21qRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731382095; a=rsa-sha256; cv=none; b=R2HjzZ2+6k4KBuQOOuAfUMNvdOJejTCHy0EU8Kzrfop+MjWFPkRU4olwUlkxlXDU/2A1LO quK7AjgBP4c2jtjyk1vFZ2a2Dls5YVoS6Io5M78xaKpFh7NRAhViWKCwytgBa4StfSbkzX AO5LxWGMuM3gQJgs7wta70WBflp+emILeBri2fKrjkdMyMsekqJAa6pYqBiNb3zju/6VKS /vDJX0/H/ZerdnOsJE0H7fn93Nnrq/o1xyAKiB/nBECZI9G/m311yLHas42nuKrNCeyyOn 1N+3kym4RktwUtaxnIVoht/4Td9r7rq4DH62M7EyW9AnfCsXAwDBaW81To3ysw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XnX1V6xP9zt9R; Tue, 12 Nov 2024 03:28:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AC3SE4x077902; Tue, 12 Nov 2024 03:28:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AC3SEb2077899; Tue, 12 Nov 2024 03:28:14 GMT (envelope-from git) Date: Tue, 12 Nov 2024 03:28:14 GMT Message-Id: <202411120328.4AC3SEb2077899@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: 42935716286e - main - ipfilter: Avoid overrunning the message buffer List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 42935716286e7887bfeb9dd8daea72d6a5d40908 Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=42935716286e7887bfeb9dd8daea72d6a5d40908 commit 42935716286e7887bfeb9dd8daea72d6a5d40908 Author: Cy Schubert AuthorDate: 2024-11-07 01:22:57 +0000 Commit: Cy Schubert CommitDate: 2024-11-12 03:14:31 +0000 ipfilter: Avoid overrunning the message buffer Avoid overrunning the message buffer when printing an ippool btree error. We do this in two ways. First we increase the message buffer from 80 to 255 bytes and secondly we replace strcat(3) with strlcat(3). MFC after: 1 week --- sbin/ipf/libipf/load_poolnode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/ipf/libipf/load_poolnode.c b/sbin/ipf/libipf/load_poolnode.c index 5c9fd838bfa0..8d65f019da43 100644 --- a/sbin/ipf/libipf/load_poolnode.c +++ b/sbin/ipf/libipf/load_poolnode.c @@ -52,11 +52,11 @@ load_poolnode(int role, char *name, ip_pool_node_t *node, int ttl, if (err != 0) { if ((opts & OPT_DONOTHING) == 0) { - char msg[80]; + char msg[255]; snprintf(msg, sizeof(msg), "%s pool node(%s/", what, inet_ntoa(pn.ipn_addr.adf_addr.in4)); - strcat(msg, inet_ntoa(pn.ipn_mask.adf_addr.in4)); + strlcat(msg, inet_ntoa(pn.ipn_mask.adf_addr.in4), sizeof(msg)); return (ipf_perror_fd(pool_fd(), iocfunc, msg)); } } From nobody Tue Nov 12 03:28:15 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XnX1X25Vmz5d3vX; Tue, 12 Nov 2024 03:28: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XnX1X1Hwyz45cQ; Tue, 12 Nov 2024 03:28:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731382096; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UU0Lg9yY9OucJsI07CVoMGHxpkO/rytDOmoaiH9+LOM=; b=i1pauqMmmr105iSIVYzilFR58ZPpulPmw/UQEEEGQ4xD+Cuesg20Lf7TXGdSPY1mEEGzOS 9AHO/4uKrYCpxOd1rq7QupZnFkuUO4C4WGbw0HjNH8F7WhYnOr4NR98k/UN7bd4Lgg83V5 OWtP0o1dMBdfW4q0r6A9+pAhaGYCaMjn1pHjYC8eOjNVZOc9C95+XUgoVw8L0tnovs6G1y LlXRHLDkzee2MfKEGqbMckduFAmY1Q6byJ3llcwoClnxkFdTsVB+eaqDVbv8/kpHIt9EYq ErcN+kr5fQd7y7BFpp3l5P52p5xQ8n8c2kCrN1HG4ornIu/l7k5N4tdR5uQxZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731382096; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UU0Lg9yY9OucJsI07CVoMGHxpkO/rytDOmoaiH9+LOM=; b=lKfWVxNOnb8TTIEP1pZLecfDGPSSE6DEuVDe8achTRqgnuraffmTmST202z+5rc524Tsny BimtTgWyqTokTVXO/bKkAiykEFpWzn5700p0cyu7UdTxtHv4YI5lrESWPJkcUqOLTitaVX ExTiorgSz3CHO6aAwXUP867H6QoZ7zS7wctgUHqKUaIAdCVSk6BevuRcYxfeP2u7TD2DKX RHf8nd49lMVx9dlCjIXTIWaZ3UXfNmtZUN0XzkolJxwe3r9KadXAEgoZWhHIsBdzRFkRqt Feo/WH4rhjtD1SIjEZwr1BsDpimSzc2ShlCLbdk7x8lvsHBVU1ENkvssrThiIg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731382096; a=rsa-sha256; cv=none; b=wGvdWK5T12ieWVAaSjaLMxIOVAF22gWpMmb9kyOWKvV+C2SvWbtumuk0AZFZZykYPoFkYl +cYrJFgFsyj6XOj7zkNy6v8TPZc+QA3EDwlHJ2SvKKd8I0Zo8HDUOj6qR5z2X3wkHEaJVE IPZ06VPf1kB6D7f0lWgzJ8VpMcVHXPyDv8WmKRcP104w41IiWaFXfMBkEJHGw01WDgchXH b50dGfIUCEDGeywnedy+16QnbUP6zDGO06SelBxBKxBwpnRUXJtgTbmudJ5kYzTaxVky0l I439/tB6gIjd5jmjExRCfCUIXZ/fY4bfoFdzBBcywzjUxtkRnwYCKz+ycHkSiA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XnX1X0N7Hzt9S; Tue, 12 Nov 2024 03:28:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AC3SFH6077978; Tue, 12 Nov 2024 03:28:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AC3SFs1077975; Tue, 12 Nov 2024 03:28:15 GMT (envelope-from git) Date: Tue, 12 Nov 2024 03:28:15 GMT Message-Id: <202411120328.4AC3SFs1077975@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: 470c680cfbf5 - main - ipfilter: Print the pool name when adding a poolnode 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 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: 470c680cfbf5f6cd9ac392b210b97b41d02cd969 Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=470c680cfbf5f6cd9ac392b210b97b41d02cd969 commit 470c680cfbf5f6cd9ac392b210b97b41d02cd969 Author: Cy Schubert AuthorDate: 2024-11-07 01:26:37 +0000 Commit: Cy Schubert CommitDate: 2024-11-12 03:15:45 +0000 ipfilter: Print the pool name when adding a poolnode fails Printing the pool node (IP address) only leads to speculation which pool the failed add occurred. This is especially useful when the same IP address is listed in multiple pools. MFC after: 1 week --- sbin/ipf/libipf/load_poolnode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/ipf/libipf/load_poolnode.c b/sbin/ipf/libipf/load_poolnode.c index 8d65f019da43..7a01da9df94b 100644 --- a/sbin/ipf/libipf/load_poolnode.c +++ b/sbin/ipf/libipf/load_poolnode.c @@ -54,8 +54,8 @@ load_poolnode(int role, char *name, ip_pool_node_t *node, int ttl, if ((opts & OPT_DONOTHING) == 0) { char msg[255]; - snprintf(msg, sizeof(msg), "%s pool node(%s/", what, - inet_ntoa(pn.ipn_addr.adf_addr.in4)); + snprintf(msg, sizeof(msg), "%s pool(%s) node(%s/", what, + name, inet_ntoa(pn.ipn_addr.adf_addr.in4)); strlcat(msg, inet_ntoa(pn.ipn_mask.adf_addr.in4), sizeof(msg)); return (ipf_perror_fd(pool_fd(), iocfunc, msg)); } From nobody Tue Nov 12 03:28:17 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XnX1Y4Z83z5d3Wy; Tue, 12 Nov 2024 03:28: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XnX1Y1Pb8z45wx; Tue, 12 Nov 2024 03:28:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731382097; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Dvoj1v3xQeAVQZh/CLDDj+u8RODXAFlh+P6IskXWKAM=; b=IaJvwkvsmJKnoZf73odChFb9fRwbt5YgbELUEn5rMm1k8AsFIziegLBcg0RNJRhGi2Wr/t mDLsTzdYmE411D0XR1TDcS0pXuCtkt8vhl8yADAMS4r411dJOnnWLFG8NLVJo8A9Y0zi0n A+W4EvY0y5x1R8870ZA0i8SBIPzbOGnvc0rwc2YbRG7kgTj08zLAF03dInfAZYSvrrFxTE GcuunwxS268Yj02ev83g0UGda/oLruzSzBboTUTot5kKCAM0ZB3Sk4BSgv3i27fOlhQeHv ZiPFv96ea2ooBxA0okKoLIxheQBCNZ/0D0EGT81I3RgaM2YLf8AgX/1J1hfkNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731382097; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Dvoj1v3xQeAVQZh/CLDDj+u8RODXAFlh+P6IskXWKAM=; b=AdHDO/M9gbAjJWHpJ/q9Qmm0xBiU8bBHmDYq6N+U7491OuM15FNh7wIV/8iXk2bE3C6v19 4QiYuENm9BOZBE2d+dGRuboiQ+au893Nj3ByjSnIZCEEioBEeoAvu+O3ICLBBh+TM+AwbS 2UgniFiqtajrkR6SCWXwJraMRRKSaH7iSZ28L92RT0cgigXzmecwM05d3GCx2Y4ydNe/LM j/1k/1QOQVoBoLoR4nPftl40yWnIS3sESSTwWGJbhu1Qm/06lOiyrN0EGH9Haes2k3wBcB zaucNhYgX45xoz3gZcLENxT92eEIPkBxJ8xisj+xRhLc1rDzCfra2lyHoK8Y6A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731382097; a=rsa-sha256; cv=none; b=gtcVN4tgSTHtUQuI0iP4QbisSOaNxObrivx/qnuh+F9yZJ9NY+AwnfgOs97yGRfd+n3C/e 9DZN5pq6Kblo8uALURTFyEosn8F1VrjVWuz1E3EyP3D8IQc3Bv+V+6CRjvoiWDLl92eH68 dnJSEk8vq2ekMpv1YK2y1UsYApeFs1MXjMe4P/7LxEPKaBJGMzmgT4cEsphmGfPbHei6bu VJ2aB5JyY8jqyGGRtDmuvkJSYWQZnIom0cwNOfBQc7aSLy8izv9V7iyR5t6znqe2YO9l/u 4qaoC6ik30BbmdvNWOQCkmySwAuHKuWaRKWpYY9BFunziDIc4oEDbrsGiteP9A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XnX1Y0z4nztQw; Tue, 12 Nov 2024 03:28:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AC3SH8q078035; Tue, 12 Nov 2024 03:28:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AC3SHgq078032; Tue, 12 Nov 2024 03:28:17 GMT (envelope-from git) Date: Tue, 12 Nov 2024 03:28:17 GMT Message-Id: <202411120328.4AC3SHgq078032@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: 8aae4220d766 - main - ipfilter: Print the hash name when adding a hashnode 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 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: 8aae4220d76602f22291d7567ba0c61b9aa8c188 Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=8aae4220d76602f22291d7567ba0c61b9aa8c188 commit 8aae4220d76602f22291d7567ba0c61b9aa8c188 Author: Cy Schubert AuthorDate: 2024-11-07 15:51:12 +0000 Commit: Cy Schubert CommitDate: 2024-11-12 03:18:08 +0000 ipfilter: Print the hash name when adding a hashnode fails As with when printing errors for failed poolnodes, printing the hash node (IP address) only leads to speculation which hash pool the failed add occurred. This is especially useful when the same IP address is listed in multiple hash pools. MFC after: 1 week --- sbin/ipf/libipf/load_hashnode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/ipf/libipf/load_hashnode.c b/sbin/ipf/libipf/load_hashnode.c index 11525dc96e35..bf22edb9be87 100644 --- a/sbin/ipf/libipf/load_hashnode.c +++ b/sbin/ipf/libipf/load_hashnode.c @@ -55,7 +55,7 @@ load_hashnode(int unit, char *name, iphtent_t *node, int ttl, if (!(opts & OPT_DONOTHING)) { char msg[80]; - snprintf(msg, sizeof(msg), "%s node from lookup hash table", what); + snprintf(msg, sizeof(msg), "%s node from lookup hash table(%s)", what, name); return (ipf_perror_fd(pool_fd(), iocfunc, msg)); } return (0); From nobody Tue Nov 12 03:28:18 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XnX1Z5RzBz5d45J; Tue, 12 Nov 2024 03:28: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XnX1Z2MSbz45x8; Tue, 12 Nov 2024 03:28:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731382098; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uXiDx28DpWCDhPYgUbYF4yrjgWmkCFmHxpSFXihvQ5g=; b=uQ2DM8i2XYHgwvjqotMCy8QOH0RathRyTw/mNzY3NjIiOLvAK5Dov9tlpZjp6gkqmrP30G Iu8qPh5s+HgIiJBVy3nNIQAOGgKkRKW0B6RlgtGWPNnBBtC3Zo1UnZ8iSQNGjknVTzQ04n bbdvGzhsnjlgN3xL9opduPJG00nFTeOwogdswWMTOYgwlTAfd72xJfAA0GGNWyVXk2K4FX 2easDM9EieIzsVdWPwES+y3Dj7U84Tn/D18zMjuZfVFgrqc7sUaJtjo8PlxSJFWl/m/O9D 3QoeSEw388OXxINMxSFjParF6KZTBHArhdmxMsTp9pBpAgnU639uB+6WIm14DA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731382098; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uXiDx28DpWCDhPYgUbYF4yrjgWmkCFmHxpSFXihvQ5g=; b=yrzp6/Y5huWOHds/0DUXOCTWYrQlX4dX6R5XENf53FdSLYDzhAcXSNzL/Uro13lzvOjJEX 3X3WVjIWgUGTltPvFtCK7OrlmfIj5tumFxEqb0e1Pb0APzvKarfJDsC2ftwaeEx3yHpZ+W llOqgvQGQrNjcCLfGfMEFd9TyiUzIJ5iseHtfsZNpHCOu6QgVUpAlVNKW77294sM2CNth8 IWE+7K7RpgcfTQKPZQ5q3twdjFnKAo/pOdcEFXnhcQf8kCHtCZlkB/McfwbchU+PQ1bJ76 EpukT47UmXoYOpewZdyo9EdSs/ms3rhuM789CbyDQuq4JkF7X21vZ0LbuIHCsA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731382098; a=rsa-sha256; cv=none; b=H6gxRTzQ6VVBZCLqqoqT8fVBviJMcexb8SLb61B2u4mrPhDcfHbRmtHO6M/KmumKOnz/2y Y+NPJRPIOuyxWId8iuiLFwA4OjJdsGlGX83R4Mj68cXYiMv606uAoyU54qiwLTsnN0A2Og x3B+qt1Yos1ClOjr22rgxQwsk355rKPedMvS4DbvquLNIs4UrChdCliaZYwaq/yU7HZPaT KGBk8S8TGsWUt+OqreolBdzEeXD4MkeTfzwWVuBljVISa+pAqlm4hBb+/9IDJ9oI59cu8I FHMaurY6xqt1GBCvkmmAvCNsSFbv/P+AFF/vgG/5+YBMcgrysDvwcbTvvUMs4g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XnX1Z1lZnztRV; Tue, 12 Nov 2024 03:28:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AC3SIAA078096; Tue, 12 Nov 2024 03:28:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AC3SI0d078093; Tue, 12 Nov 2024 03:28:18 GMT (envelope-from git) Date: Tue, 12 Nov 2024 03:28:18 GMT Message-Id: <202411120328.4AC3SI0d078093@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: 858a7a27f5c8 - main - ipfilter: Close a bracket in the poolnode error message List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 858a7a27f5c82c8364a0eb8bf1d9f0b1315422aa Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=858a7a27f5c82c8364a0eb8bf1d9f0b1315422aa commit 858a7a27f5c82c8364a0eb8bf1d9f0b1315422aa Author: Cy Schubert AuthorDate: 2024-11-07 16:48:00 +0000 Commit: Cy Schubert CommitDate: 2024-11-12 03:20:49 +0000 ipfilter: Close a bracket in the poolnode error message When a node in a tree is discovered in error, i.e. duplicate, the IP address of the node is printed but no closing bracket completes the node in the message. Fix this. MFC after: 1 week --- sbin/ipf/libipf/load_poolnode.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sbin/ipf/libipf/load_poolnode.c b/sbin/ipf/libipf/load_poolnode.c index 7a01da9df94b..0e41a3921b71 100644 --- a/sbin/ipf/libipf/load_poolnode.c +++ b/sbin/ipf/libipf/load_poolnode.c @@ -57,6 +57,7 @@ load_poolnode(int role, char *name, ip_pool_node_t *node, int ttl, snprintf(msg, sizeof(msg), "%s pool(%s) node(%s/", what, name, inet_ntoa(pn.ipn_addr.adf_addr.in4)); strlcat(msg, inet_ntoa(pn.ipn_mask.adf_addr.in4), sizeof(msg)); + strcat(msg, ")"); return (ipf_perror_fd(pool_fd(), iocfunc, msg)); } } From nobody Tue Nov 12 03:28:19 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XnX1c1JQCz5d3TP; Tue, 12 Nov 2024 03:28: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XnX1b4J51z4611; Tue, 12 Nov 2024 03:28:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731382099; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=njpqOq6FymvLfDk6XlnabkloMF5OxivD4qHGQ9KIhUE=; b=Qoi4GkiP0SPxTkJLiili6qlLVM9oOhLNQk2WZ2xLH7G2bgPpvREpikpr4E974HN4UzhKID 2Nfr9ewL3i8+LZohv6RvEsLEMlmj7VrQBXLkSryufTHDY3rb8dqAocrkOZxJVcS2SJaIJn nymr6MdSVHzIHK2MJzkHnQrpLW9hT/E3tgCLGYV9c5l9blUdl675SN7Eh4l8MxAjEBQm7g wF+0Pt6GpDMOlSfCms4McApAv4a/gXpYyq8SZLXCESq+eLskLSWkhyMeByrORa6rf0plkC BDxOpin9UchYgRRk65v3a9eecwQqgWMEYI9+6o8JXX1VXnJ6SiQ6tY7nUOydWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731382099; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=njpqOq6FymvLfDk6XlnabkloMF5OxivD4qHGQ9KIhUE=; b=TPTxb+iW+ZOws2DsOA7jPvFfEZLKjLxIeqAxhosT7wSx9g0Co3vNowNTFq/Kfjyov7Wlns hVf1kL0OC19gj+jVVezLFX/JbJnpHWcqRPIb++MDTufkZyoP0Fevx1huuRPxAtaHSr8K5j JcnnS0NQg01vJn7tTvrZlrVK2UicQly1BGn4eek1KM7b76A/caL7o/eHc361jpb0TN8R50 s2APJZ3pGAq/Zt5FKmVNB0S0Ehj/jmah9Tj55+gmVfQN0zHHHnnAwb6GMmF+c5G1CMP/Rv 5OJOQM28+2we6qJUeB6EBq1eKnoFw6/XEQtmsY+LBmuRFPD+n2QuvEFUqjnHqw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731382099; a=rsa-sha256; cv=none; b=Gn1zkjcoUQWXQORe+VMd9kzcfh/+HP9CKSIMg/+XXv9n5gjztFydTD41ckGYqa15p+A8hZ CwFjOuRXru3dZLxs8X98iewfDHPuMb0XwohpJKMSnlWFIBeDu/EkdAh5krmaP8ybUlGtua JWNe181uu4CgycuMoW87yDxVDutFLeF2kNBcv07loASq6SKEEsjjpg7rwZEDA4le8NHG04 djf0js9H2dNgzPq0uzsIm+zBpF3hTYqJdUMeE0ysHHAY2SeNbPo0eVVkEjFUdb0buTVCS/ 6Fp5TqcCTzv7PvGWJ+SrdRjfujN1vjPFvQKP6N6aRdgwDKssYfAsxzqfpwGlQQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XnX1b32MCzt4y; Tue, 12 Nov 2024 03:28:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AC3SJdi078167; Tue, 12 Nov 2024 03:28:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AC3SJ3u078164; Tue, 12 Nov 2024 03:28:19 GMT (envelope-from git) Date: Tue, 12 Nov 2024 03:28:19 GMT Message-Id: <202411120328.4AC3SJ3u078164@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: 3a2cb65b6e6d - main - ipfilter: Support printing of IPv6 addresses in error message List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3a2cb65b6e6dc1e71013db27ce143eb8670a1755 Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=3a2cb65b6e6dc1e71013db27ce143eb8670a1755 commit 3a2cb65b6e6dc1e71013db27ce143eb8670a1755 Author: Cy Schubert AuthorDate: 2024-11-08 07:39:11 +0000 Commit: Cy Schubert CommitDate: 2024-11-12 03:21:22 +0000 ipfilter: Support printing of IPv6 addresses in error message Replace inet_ntoa(3) with inet_ntop(3). This supporting the printing of IPv6 IP addresses in addition to IPv4 IP addresses in error message. MFC after: 1 week --- sbin/ipf/libipf/load_poolnode.c | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/sbin/ipf/libipf/load_poolnode.c b/sbin/ipf/libipf/load_poolnode.c index 0e41a3921b71..880a6cd1c681 100644 --- a/sbin/ipf/libipf/load_poolnode.c +++ b/sbin/ipf/libipf/load_poolnode.c @@ -53,11 +53,29 @@ load_poolnode(int role, char *name, ip_pool_node_t *node, int ttl, if (err != 0) { if ((opts & OPT_DONOTHING) == 0) { char msg[255]; + char ipaddr[80], mask_msg[10], mask[8]; - snprintf(msg, sizeof(msg), "%s pool(%s) node(%s/", what, - name, inet_ntoa(pn.ipn_addr.adf_addr.in4)); - strlcat(msg, inet_ntoa(pn.ipn_mask.adf_addr.in4), sizeof(msg)); - strcat(msg, ")"); + inet_ntop(pn.ipn_addr.adf_family, + pn.ipn_addr.adf_addr.vptr, ipaddr, + sizeof(ipaddr)); + +#ifdef USE_INET6 + if (pn.ipn_mask.adf_family == AF_INET) { +#endif + inet_ntop(pn.ipn_mask.adf_family, + pn.ipn_mask.adf_addr.vptr, mask, + sizeof(mask)); + mask_msg[0]='/'; + mask_msg[1]='\0'; + strlcat(mask_msg, mask, sizeof(mask_msg)); +#ifdef USE_INET6 + } else { + mask_msg[0]='\0'; + } +#endif + + snprintf(msg, sizeof(msg), "%s pool(%s) node(%s%s)", + what, name, ipaddr, mask_msg); return (ipf_perror_fd(pool_fd(), iocfunc, msg)); } } From nobody Tue Nov 12 03:28:20 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XnX1c5Q73z5d42x; Tue, 12 Nov 2024 03:28: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XnX1c44nmz46GT; Tue, 12 Nov 2024 03:28:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731382100; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GQ7a8yegz0k9VT/sxXSWaH2bBp2T3vMjdR7gYFrqP3Y=; b=sRZQi3+K7cWBRi21z14Y8Ih45DK7Kr+9X7/dCDTDJRZx8A5aqPp5E8xLLmGqZYxal1AAax Iq+ad8KMosgUtYE5WooYOjocJkfthTC1erYWr4m59DFPwyJ+OyGSzhUYrBo6dVOzDPwkE0 QLgXD5clTTb7g8tVZaBTgHwo9o4PtfCtt9uTV2lHf/pCshgSy+DAXZkfHQY5ARUBouTgvb fYY0T18cGcAPoWLFJCP+muxH6xAtTWXG0DePX3JbBA9MPPJGBLnu3Pzq28LN1e+EdsLH4Y RSKIGat6eq+lKxAP/VCP4aI4M5iNc3LtlwcgD7/c91wsOK7Vdj3bs+zzt6ziGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731382100; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GQ7a8yegz0k9VT/sxXSWaH2bBp2T3vMjdR7gYFrqP3Y=; b=iG/Z5tMnusxpjXfOAyYiAj8pSWZXleiV0GFk2NIGTee1sS4KhAQ69N5LtIKgWdqhPqiwq4 GqzcY/IwgHeYbS2FEXooFkAJP/P2PGinRwYayPklmP43P5VF7oYIicJm7wZSA1tkYIaOQo sigA8kSaXcZbe9kUrtoHhs5MpNKKp3xzupUa04tTUYyWNqQjouM120r+Lox57Kp83tjnG9 s43g5bFU1CzgcH7S3fGyCe8iGp+7AuIb/zst/fOuBsqelQll+9zx3xa42LQXEMWibheVjI /hQ8V2Q3uK1zJNT9iHRWwhxjy8HFJ0kgf7wYe1UhARZqUSsp2tQANDNPpZUH+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731382100; a=rsa-sha256; cv=none; b=OFKCrJgHJFyP+D7LmjLdHlhTxT5gtRhq+28tP9qotc4AnS4MU6PexJhpMijOYEvX4Q5MsA ItZ35GnS0Jkl21KMlBB4Ft765pOypgIb4EmKN8KQp94/rrZ555weVfvvh6or0JYr/OTxK1 //9fgp5BoTGmhbfHQ7PnjUYDi5O+QeOeyI6Q3spAqZvMUwqiQP4UI4YMmuJmpvHKWBfONJ fs39WMNLNvNO1WDlbejdaL1qD+rkUdY/AUHZGp+VHF8eHIrwjsJXleRRZ9rQDrpwYe+55g KpBbhwgWpPILYMJPK6qtVvRlaWsM4r/cvHHzg7sxRUhO3ZxwliWhdRyQqFcc/w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XnX1c3hZfzt9T; Tue, 12 Nov 2024 03:28:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AC3SKi4078218; Tue, 12 Nov 2024 03:28:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AC3SKLh078215; Tue, 12 Nov 2024 03:28:20 GMT (envelope-from git) Date: Tue, 12 Nov 2024 03:28:20 GMT Message-Id: <202411120328.4AC3SKLh078215@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: 9da30a23a5ec - main - ipfilter: Include the IP address in error message List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9da30a23a5ecae151ae1db045354fab105c69e12 Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=9da30a23a5ecae151ae1db045354fab105c69e12 commit 9da30a23a5ecae151ae1db045354fab105c69e12 Author: Cy Schubert AuthorDate: 2024-11-08 16:30:53 +0000 Commit: Cy Schubert CommitDate: 2024-11-12 03:22:15 +0000 ipfilter: Include the IP address in error message Include the IP address in the message when a hashnode add error occurs. This helps to identify the ippool.conf statement that the error occurred. MFC after: 1 week --- sbin/ipf/libipf/load_hashnode.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/sbin/ipf/libipf/load_hashnode.c b/sbin/ipf/libipf/load_hashnode.c index bf22edb9be87..12b11687710d 100644 --- a/sbin/ipf/libipf/load_hashnode.c +++ b/sbin/ipf/libipf/load_hashnode.c @@ -53,9 +53,28 @@ load_hashnode(int unit, char *name, iphtent_t *node, int ttl, if (err != 0) if (!(opts & OPT_DONOTHING)) { - char msg[80]; + char msg[255]; + char ipaddr[80], mask_msg[10], mask[8]; - snprintf(msg, sizeof(msg), "%s node from lookup hash table(%s)", what, name); + inet_ntop(ipe.ipe_family, + ipe.ipe_addr.vptr, ipaddr, + sizeof(ipaddr)); +#ifdef USE_INET6 + if (ipe.ipe_family == AF_INET) { +#endif + inet_ntop(ipe.ipe_family, + ipe.ipe_mask.vptr, mask, + sizeof(mask)); + mask_msg[0]='/'; + mask_msg[1]='\0'; + strlcat(mask_msg, mask, sizeof(mask_msg)); +#ifdef USE_INET6 + } else { + mask_msg[0]='\0'; + } +#endif + + snprintf(msg, sizeof(msg), "%s node from lookup hash table(%s) node(%s%s)", what, name, ipaddr, mask_msg); return (ipf_perror_fd(pool_fd(), iocfunc, msg)); } return (0); From nobody Tue Nov 12 03:47:25 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XnXRf0Bmwz5d59t; Tue, 12 Nov 2024 03:47: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XnXRd6l97z4C9r; Tue, 12 Nov 2024 03:47:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731383245; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XjRUxBy0fKuiW0GTnH86JTPJigjATbOG7KGNy59APwk=; b=AJAyUu62kpVsriUh7fefjX8VXsW+RicKzw/VtOPyKJzRHNuexxtwprJ8fiQ7v/TqNR0Xbi ym0rkUnJTrQzafU4dtIUKI9HgKjdsSCzrhiKRa+SH7XmhitgwbbkAAGFMKqlkKLJtHyZ8C jl9Qbj7+RoXBKn16REmYj8HR0VrJL/qcV6XkkEa7VTmwd/nUFoVgGRQZQMBK1UK4v1TICr HzVbVjm2L2EJVt80YAexuS5oQ/6hVp2cCCvWHN5IGq9MzrdA92WqdQUMKJF1No5BjjbyPl oSfisYE0tY1PB56bbinVBR9BOCd5dNrtKjvUolQsPpPVSREHuZPM9/Kf4NVnIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731383245; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XjRUxBy0fKuiW0GTnH86JTPJigjATbOG7KGNy59APwk=; b=ZMNOZYGW0Wn0BUqOoqkin2A1mlc15xchTurjEc+W1Q4b6EdvrnXYYRKTWdBLFDdb8MoQCX 42UlqIO97BIkCQJnytckmO6DL4b8mDaKjpzmvDQiWF5jm94HZ8xnVzoN627nAwLWeB5raW PI8zaxZ+tNf3WXhUA7EwsZUBr4bWac/sSe/KkDnS5mxRRXwq33bIXtpn0Ld7WwFNVdtkGY Epn2WzqheuShISCBUHPToZJObmMDjP9MA2h8T3JzsDcrS1OOw8dVMX8pTp4aoHHI7VwW2L TPD4aQZCtDQbroXRbvRqNPcsLqD6SlWC8LVPtRuxrt8v1i4VZln7oziEkuAeFQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731383245; a=rsa-sha256; cv=none; b=o1oeWgbngG9u1KtWAWrvTGa7LjShEdSvMwwbEdhGk6aJaIsIecm05LIZ3Hl1a7ZEqpIH7I zRAOa2IUgQ9A0OjTSzUKWBfLVCYbMaiihv0kcXXRJvNi8vpecEO1fF3lRB1vaK0e1j88ro af9bR37H/xcSGtN6zT/AWjDoM4hfjBbfD7BFw8BIgEbbFkm0FJNMf/E+n0Kr2RbTHeu/gz J7hSMjdxLdlgMC+/JRBfXCD07LWjGVEHMv0z8R2YcnmFDr7ckPMKNt89gdQEKjQuPSgSl5 JI/PgVDFBbXaa/E64/OXXND/D17+3Es5mVuEvvwbYqQmb6rFSgkK/hEqoI//UA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XnXRd600xzv0L; Tue, 12 Nov 2024 03:47:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AC3lPHr015170; Tue, 12 Nov 2024 03:47:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AC3lPOA015167; Tue, 12 Nov 2024 03:47:25 GMT (envelope-from git) Date: Tue, 12 Nov 2024 03:47:25 GMT Message-Id: <202411120347.4AC3lPOA015167@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 1fa6daaafd74 - main - ipfilter: Avoid stopping with a lock held List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1fa6daaafd74c1a457dcfe26e0a5943b5441dc9d Auto-Submitted: auto-generated The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=1fa6daaafd74c1a457dcfe26e0a5943b5441dc9d commit 1fa6daaafd74c1a457dcfe26e0a5943b5441dc9d Author: Jose Luis Duran AuthorDate: 2024-11-02 17:58:59 +0000 Commit: Jose Luis Duran CommitDate: 2024-11-12 03:46:15 +0000 ipfilter: Avoid stopping with a lock held Avoid calling _callout_stop_safe with a non-sleepable lock held when detaching by initializing callout_init_rw() with CALLOUT_SHAREDLOCK. It avoids the following WITNESS warning when stopping the service: # service ipfilter stop calling _callout_stop_safe with the following non-sleepable locks held: shared rw ipf filter load/unload mutex (ipf filter load/unload mutex) r = 0 (0xffff0000417c7530) locked @ /usr/src/sys/netpfil/ipfilter/netinet/fil.c:7926 stack backtrace: #0 0xffff00000052d394 at witness_debugger+0x60 #1 0xffff00000052e620 at witness_warn+0x404 #2 0xffff0000004d4ffc at _callout_stop_safe+0x8c #3 0xffff0000f7236674 at ipfdetach+0x3c #4 0xffff0000f723fa4c at ipf_ipf_ioctl+0x788 #5 0xffff0000f72367e0 at ipfioctl+0x144 #6 0xffff00000034abd8 at devfs_ioctl+0x100 #7 0xffff0000005c66a0 at vn_ioctl+0xbc #8 0xffff00000034b2cc at devfs_ioctl_f+0x24 #9 0xffff0000005331ec at kern_ioctl+0x2e0 #10 0xffff000000532eb4 at sys_ioctl+0x140 #11 0xffff000000880480 at do_el0_sync+0x604 #12 0xffff0000008579ac at handle_el0_sync+0x4c PR: 282478 Suggested by: markj Reviewed by: cy Approved by: emaste (mentor) MFC after: 1 week --- sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c index bcde0d2c7323..b3dea40c3d8c 100644 --- a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c +++ b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c @@ -181,7 +181,7 @@ ipf_timer_func(void *arg) #if 0 softc->ipf_slow_ch = timeout(ipf_timer_func, softc, hz/2); #endif - callout_init(&softc->ipf_slow_ch, 1); + callout_init_rw(&softc->ipf_slow_ch, &softc->ipf_global.ipf_lk, CALLOUT_SHAREDLOCK); callout_reset(&softc->ipf_slow_ch, (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT, ipf_timer_func, softc); @@ -221,7 +221,7 @@ ipfattach(ipf_main_softc_t *softc) softc->ipf_slow_ch = timeout(ipf_timer_func, softc, (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT); #endif - callout_init(&softc->ipf_slow_ch, 1); + callout_init_rw(&softc->ipf_slow_ch, &softc->ipf_global.ipf_lk, CALLOUT_SHAREDLOCK); callout_reset(&softc->ipf_slow_ch, (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT, ipf_timer_func, softc); return (0); From nobody Tue Nov 12 04:10:55 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XnXym0snPz5d65K; Tue, 12 Nov 2024 04:10: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XnXyl6Mlzz4FPX; Tue, 12 Nov 2024 04:10:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731384655; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W2QMJKwEQ/eDrhvQnZznPm0VRhJtKSc8G+ie6xBSUBg=; b=pdxbiRPRJ32rs5flwjPFXhyPokfhVF9JcMFCLvAHa6Nwe3OZV7cJy426Oja+0LkYftWR4j A870rRWWrDAn5nfxvQxBYOcDwvu9PEokhTRrym5jSRUGf4SYzHs2rs/+bWmfPFrK6lCtkd 1QJ5f6tIG1QyYy78PgTmqPbjnY+muTYR6nejyimRn+MnUevcq8s+7i/+4ETEKfdqB+4J8p 47ajVzuxTnDIy3ZRNeZtZ/+dr/VtFztgcc3DetnrBPP/mgSfIFEtUwVeZRq1eOF7OZ0zjK FTWPGqHXmKDRHfpljgcMlMe4jR90EBNEKco+ZhsJ3lhlh1IbcljcM860eH+Bqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731384655; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W2QMJKwEQ/eDrhvQnZznPm0VRhJtKSc8G+ie6xBSUBg=; b=NKGHbg0kItZQ2PIPH9M47fLUSKjIsMDiKYE4iDtHPo3MITDmcbuInuVOHlJKfb4yelziXx cMKjxaRJPtN4yg1r6VynZUNZSPZLN5OQcUXC7pOT4r4mO6lSEZhjltTWMxpmLuRQryJBWg NrDSc5/FTE+fTes52qxU+EMUt8OEwWR/ZCINdtt38dd2Vwz5/PyvP9nngb1QOzBG6n71D5 SlHIOX3yaQ1XvwqcQpDzVq1rJ2O1Un+YF3x60a9Q4T8Yli7sgJBSiK0McC1n1fDrXL0CYw uNYXiOTNuqhupHaqwkYFdtZTeXnKVtCnmOumDoGvnPWP80XoyENMslVrUwA8mA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731384655; a=rsa-sha256; cv=none; b=a044JCawWmDPZJU+qaTJl9jCYhJL1ABVqGA6K2zv/I0AffNHrzOW2sSaPKKoTquUMy6i6J i/LCudBtJb8Tbictze0b706WGrjvbOc0n003TpU8gmq3UJ+EY9FsrplkquGivVX3Z0fFJj xxf+PABdzeKlltVXE3OYDTw3JDXZikESawc6zawhNboPRD1f9Njia1zHk//yqoiPA6fnM0 T3jWQ28Z01uBVLbLHgf70dhQQnqA/vEHkWgfT3rrM3A0Rc05wFYYLXVVWp1+s9CNXCl3Du 7h7uaSY0mndNNZ2ZqULspUfaQI/FGGfLkVKKxyxVIguE8AupsbTP75ipSAVKrg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XnXyl5sVMzvs2; Tue, 12 Nov 2024 04:10:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AC4Ated062495; Tue, 12 Nov 2024 04:10:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AC4At5G062492; Tue, 12 Nov 2024 04:10:55 GMT (envelope-from git) Date: Tue, 12 Nov 2024 04:10:55 GMT Message-Id: <202411120410.4AC4At5G062492@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: c53ec86f0ee9 - stable/14 - iichid(4): Do not power down opened device in attach 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 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c53ec86f0ee97f07f80c0902b189c845bf448e7d Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=c53ec86f0ee97f07f80c0902b189c845bf448e7d commit c53ec86f0ee97f07f80c0902b189c845bf448e7d Author: Vladimir Kondratyev AuthorDate: 2024-11-08 19:23:38 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-11-12 04:08:33 +0000 iichid(4): Do not power down opened device in attach handler Some iichid(4) child devices, currently hkbd(4) only, opens parent device in their attach handlers. That breaks internal iichid(4) state leading to rejecting any incoming data on software and hardware levels. Fix it with adding of extra state check in iichid(4) attach handler. Reported by: many Submitted by: trasz (initial version) PR: 280290 MFC after: 3 days (cherry picked from commit 018cb11cb7d412b031e1be681a6a19e734473f99) --- sys/dev/iicbus/iichid.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/dev/iicbus/iichid.c b/sys/dev/iicbus/iichid.c index 1e0dac2ee5dd..e99facdb06bb 100644 --- a/sys/dev/iicbus/iichid.c +++ b/sys/dev/iicbus/iichid.c @@ -1205,8 +1205,12 @@ iichid_attach(device_t dev) iichid_detach(dev); } done: - (void)iichid_set_power(sc, I2C_HID_POWER_OFF); - sc->power_on = false; + iicbus_request_bus(device_get_parent(dev), dev, IIC_WAIT); + if (!sc->open) { + (void)iichid_set_power(sc, I2C_HID_POWER_OFF); + sc->power_on = false; + } + iicbus_release_bus(device_get_parent(dev), dev); return (error); } From nobody Tue Nov 12 04:10:56 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XnXyn2Y0yz5d6XS; Tue, 12 Nov 2024 04:10: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XnXyn03Qjz4F2s; Tue, 12 Nov 2024 04:10:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731384657; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7yEsA64bdHh9UXAlPHj5oa+Qmwr5p9g1wj6tsBNf+SY=; b=qbedpEWCsOHJvYFID4FQHApPz+3IhtLnVCIjeH9hoEGf/kso10ODtvd6+rnnsRgo7D2Zs5 jnhz9C6Sb9n1lcVwf1ENc6YnwCE5hEldJwnltiFPumBJ8OeL6faGlvD21oXkXRmuowlDSa xHLwHxh5+UlTjfeht/dVo7txFPCOfdPzEnAJBC82tDQHLIODoa5Fa6BSP1RH7ziMfoiJGV rf937osMVuUpQjMvrYexczEyzpZT18ZESIjO5VwdxQ/y5t8EUe4KqaajGVwL4ZXPa1p95P e1R9KoibExM1Al4j1aGrLMQFwVSOBLbDmolejdvVPkTRVuNRE7qLG8sOCN7CTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731384657; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7yEsA64bdHh9UXAlPHj5oa+Qmwr5p9g1wj6tsBNf+SY=; b=kIh1RO3aoMIToccB1LRKKymChLkNsj1NjRPnr4w3wWdGNEUo84vYVLZh88gtG3StbxtkZy uAOGIilLzVKVqLILcUMo8hH8tDq3kIxJ9hlIAFOWRwxa39xT7inLmFfpE1x7EIaE9iXSsg AKqmu1sooZDd17s3IYfh+etJGK4fvVqkb4Pr4XQnR6eUBPpg2CHRI6FWOsDYuqGa5iMFbf +Oa60P+VTA3vAzfTuUB0JMfJYYE6xoOqWFFpn4P0fxZ9uMG0+/+NeSQlpXGkMJh/dY56G2 6Kx9fyUe2cirajmQj0fatUAyyL4hkB6xTKrix8NNLtvvgvoCk4meLShPGOrvfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731384657; a=rsa-sha256; cv=none; b=kKIeLzEda50DDoBQibicYLsrgXkpZUEIatfW+qGYCMukJsHYuqOWo7wemuK6h1Y+NtTh2o 3pbtNC+Kg9IHaquO+kx0dVG6hrFitkNjrDoXAYfrF28l52NEyLif3q+iDYgd8zShVYtc1z evmMUNHQkoDCHas1qnFPzHAEd6ZguLpAj7u7f0slKCHYl9CZtH6T+78peuC6S3n8RbipO2 MS2EXwY7ReeXloDdc7Gre4wS4LDLZC6bL60kfqw1RfgKp8jOycHkqey/ZYZEBgfrjbF4oq JTaFO3yAqn6YCMQr0Ww63QSRS4lZTBJBE5lLCzgivdj+tK5rR8nwvg4ZRognZg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XnXym6jpdzvdM; Tue, 12 Nov 2024 04:10:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AC4AuOs062540; Tue, 12 Nov 2024 04:10:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AC4Au72062537; Tue, 12 Nov 2024 04:10:56 GMT (envelope-from git) Date: Tue, 12 Nov 2024 04:10:56 GMT Message-Id: <202411120410.4AC4Au72062537@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: 5cc7196a81fe - stable/14 - ig4(4): Add Meteor Lake PCI IDs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5cc7196a81fe6924a2994a1efc31468ad045b0ce Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=5cc7196a81fe6924a2994a1efc31468ad045b0ce commit 5cc7196a81fe6924a2994a1efc31468ad045b0ce Author: Austin Shafer AuthorDate: 2024-11-09 05:05:34 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-11-12 04:08:43 +0000 ig4(4): Add Meteor Lake PCI IDs PR: 282389 MFC after: 3 days (cherry picked from commit bab5e3d468305928e9e5cf1ca9efcee4c89f6a76) --- sys/dev/ichiic/ig4_pci.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/dev/ichiic/ig4_pci.c b/sys/dev/ichiic/ig4_pci.c index 138de77c35db..874d6a9abc55 100644 --- a/sys/dev/ichiic/ig4_pci.c +++ b/sys/dev/ichiic/ig4_pci.c @@ -172,6 +172,8 @@ static int ig4iic_pci_detach(device_t dev); #define PCI_CHIP_METEORLAKE_M_I2C_1 0x7e798086 #define PCI_CHIP_METEORLAKE_M_I2C_2 0x7e508086 #define PCI_CHIP_METEORLAKE_M_I2C_3 0x7e518086 +#define PCI_CHIP_METEORLAKE_M_I2C_4 0x7e7a8086 +#define PCI_CHIP_METEORLAKE_M_I2C_5 0x7e7b8086 struct ig4iic_pci_device { uint32_t devid; @@ -288,6 +290,8 @@ static struct ig4iic_pci_device ig4iic_pci_devices[] = { { PCI_CHIP_METEORLAKE_M_I2C_1, "Intel Meteor Lake-M I2C Controller-1", IG4_TIGERLAKE}, { PCI_CHIP_METEORLAKE_M_I2C_2, "Intel Meteor Lake-M I2C Controller-2", IG4_TIGERLAKE}, { PCI_CHIP_METEORLAKE_M_I2C_3, "Intel Meteor Lake-M I2C Controller-3", IG4_TIGERLAKE}, + { PCI_CHIP_METEORLAKE_M_I2C_4, "Intel Meteor Lake-M I2C Controller-4", IG4_TIGERLAKE}, + { PCI_CHIP_METEORLAKE_M_I2C_5, "Intel Meteor Lake-M I2C Controller-5", IG4_TIGERLAKE}, }; static int From nobody Tue Nov 12 06:07:07 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XnbXr0Qy3z5dF74; Tue, 12 Nov 2024 06:07: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XnbXq6xcXz4RdS; Tue, 12 Nov 2024 06:07:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731391628; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NPhFUa5SWjNcEwisnwGWcvDA3c3ief+GKmzTQ3f597o=; b=XSjmuQCHROv1zsBNxZXPJNjBC6eONTNx1zEau83tPjJMAa3iGfTfLFU16aPhI9J9fh5uZ9 1gDbE/XAPjjLNQmiD/bOjVhvf72EQqY+yzgektptt/tMmLg2N3hVtUaHIUpd9jJCbg8cnY I8npvq0+nESq4S8VLNYMS+AaMALDJSlrvhTq8JRSkMLcwogHOFKNkqW5/7hmirKH8XTjdQ MpDLklAxrfXXUCymC6lnBxZ/dwo3n9Bqx3ognUUzGWd6zgKm+9eyevZU4MKeRkszXpB0KG OuTleyLO0Ed59nbIfSPb6oQCeC+z50X7c7fUWhERpT4T7sxaLJOaN8TCvXvr0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731391628; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NPhFUa5SWjNcEwisnwGWcvDA3c3ief+GKmzTQ3f597o=; b=rZ7D3z9UefEoGK+o0fLF6wsCsFfU8+ZLR9MgSslUwrg8aiU26J1FutzmRvKEVXL+CjXAqT S5Gz4avVNgCvalp7moyZcARqEU2Q+/SBrDwtP7bzvbGf0Z1ftllS2u0v3inLg3cxO+ij/P SieSd9n5WnX9TJN3bs07X7dDHGD2NirOusqXMbW2B2EvnUG7xyHzR2dij73wO7XwKvle7q s585TkjxPQkcnJ2seXpD8S4OwO6SvLBusRJZxwSe9Y5YOEh5QewYp3M7g3+7gg71/fb2BC QFDLD0VbMpjKc/kFs/y4hmh9cEWv/ZvFTWS3RxF6N3RHbD23xh58GyXyrur5bw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731391628; a=rsa-sha256; cv=none; b=PjDTLghzKZp2Qn+kL/eIhSTiXDOViwDw8SwFmC0Xiq4PtoYZ8aTFdmAk1COcjquVMFENgQ DowkkTJjwZ0XYof57pD1QLElrR640vLKsvMJCsxnud0qAPht7JdTm7mQTF93kSpWwANpjG YLeltxTDcy6LhpZRgj3ty8x1adpHBhOQKztg6yID9zx2fFNa7+nnk3UQ2eA09BZnmjOPgD ftkuUvP6jqd2Z/UcPEp8thOTsGLyWBy3dYM1XFwXXODrOHy8d/MTPg6Ekhx8UnoF8oZNUG ZpIIo82sTS/L7m1okx81kg81Ins9cHevZ/AgqMd/r5gmKfKCSxQL0MxziBWJog== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XnbXq6XxQzxvy; Tue, 12 Nov 2024 06:07:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AC677s7075093; Tue, 12 Nov 2024 06:07:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AC677gU075090; Tue, 12 Nov 2024 06:07:07 GMT (envelope-from git) Date: Tue, 12 Nov 2024 06:07:07 GMT Message-Id: <202411120607.4AC677gU075090@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 166c1fac59f0 - main - struct proc: add locking annotation for p_pendingcnt List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 166c1fac59f04cc346d8a18671f25d0ef0293611 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=166c1fac59f04cc346d8a18671f25d0ef0293611 commit 166c1fac59f04cc346d8a18671f25d0ef0293611 Author: Konstantin Belousov AuthorDate: 2024-11-12 06:05:48 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-12 06:05:48 +0000 struct proc: add locking annotation for p_pendingcnt Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/sys/proc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/proc.h b/sys/sys/proc.h index c56d3debd5c0..a69eecbb4661 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -709,7 +709,7 @@ struct proc { int p_suspcount; /* (j) Num threads in suspended mode. */ struct thread *p_xthread; /* (c) Trap thread */ int p_boundary_count;/* (j) Num threads at user boundary */ - int p_pendingcnt; /* how many signals are pending */ + int p_pendingcnt; /* (c) how many signals are pending */ struct itimers *p_itimers; /* (c) POSIX interval timers. */ struct procdesc *p_procdesc; /* (e) Process descriptor, if any. */ u_int p_treeflag; /* (e) P_TREE flags */ From nobody Tue Nov 12 07:55:40 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xndy5204Vz5bf7v; Tue, 12 Nov 2024 07:55: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xndy45Wvfz4dlm; Tue, 12 Nov 2024 07:55:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731398140; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Uaq2FcRuknG89hI8l9lM6Ww2Ll0kRkV/rAZ9ugh//Os=; b=G6zGCb1nFJDHd6Txe3nuTJc98KGVCihap+IMXfI6fpeFMaTXLQ6r2qcZa8M7RpwfmnwCqu 9pxnCLQcQAieZnLFUkZS6oDpc6S8MLex/m0SJxRg5ZNG0vgA0OjBtSIMw5oJIOr/XjLEj+ TMsGHSxRd7ibcedV+MKzcEr83OD+CNQwosrhTRExE9K2i9VTvU9l/HtT4/qBmN8VOrIQwp B9HNNyjJhuWcXKpg7iC+/z+CL1ZwqF4HA5meWHgK1XQ9XQdZo52KiZngbaRS5Q5HcheFVG kii3upt3nl0MlDE1669wfQn5vy9tJhXgygAGpH8bmadWWHLWGCO8lj9w8gzFdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731398140; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Uaq2FcRuknG89hI8l9lM6Ww2Ll0kRkV/rAZ9ugh//Os=; b=oHE24ahZmCJzB5W0hYRDx+/gd6sGcz11S9pyVJPrN8a6IOl+A/t6UJfOOwr8cclT+y2JPj nr8KjLplXZZgYjD0kbG5bM0S5pLnFeMuF9qBPGVk0ZuZZ0ZDw/jZAW51cq1SR2v9Tvhx+O Rx0Tjr6Xvj3BzUHu8LYTFc4NixoMk/xF7xLg/mTNsE72HFGGd4Btdc3eEJpFcBwKKheJ9N TBPyJbNZyUqp9QwyRcuu/rrsTNneEmOKmQk+mdx5AXoRht7BA8juUvM2NqI3aVPRVbusob GhuOthHuilep1PVW1PloNSBBAljHRAeqBN76xbJe/XE5FaFzMwBvbbcHL+lfjw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731398140; a=rsa-sha256; cv=none; b=NbVLzOwvWxlxxxSb/8brgMK7m7AKsvchgI+fKELoPA2nurdspWAR/rf/1nEZGwfAg3fc7V EgzcGgdRNnuGNY1r1V1vs5G+tEY8AtnlpSDUEdslo/bBeX+hOYvREEg+NTzK+eVWKYB3SM XpnZ+pqKwDIrsmRz1rA33o7TvNVbNmHv0R5RyTEkUJxTbOBHyxKFZ722geiIDBrzqZmEZT hTs0gv2pyeT6GE812uB9X5yFQhYwdXJ7VNcpv5KXpHLKx7y930kYjFRrpPUAh799QDkL9X 2YA15ePIzgFJgw7pcSBM1j8gBYsXyxxoQMdn7uMq8vd4IwpA+vO/dYIp5EB8eg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xndy457p1z127K; Tue, 12 Nov 2024 07:55:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AC7teJu076964; Tue, 12 Nov 2024 07:55:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AC7teAG076961; Tue, 12 Nov 2024 07:55:40 GMT (envelope-from git) Date: Tue, 12 Nov 2024 07:55:40 GMT Message-Id: <202411120755.4AC7teAG076961@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Corvin =?utf-8?Q?K=C3=B6hne?= Subject: git: 1616f7d4b57b - stable/14 - bhyve: avoid a potential deadlock List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: corvink X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1616f7d4b57bd463431ee2af7710b4f9d96db6ea Auto-Submitted: auto-generated The branch stable/14 has been updated by corvink: URL: https://cgit.FreeBSD.org/src/commit/?id=1616f7d4b57bd463431ee2af7710b4f9d96db6ea commit 1616f7d4b57bd463431ee2af7710b4f9d96db6ea Author: Pierre Pronchery AuthorDate: 2024-08-05 07:46:01 +0000 Commit: Corvin Köhne CommitDate: 2024-11-12 07:54:21 +0000 bhyve: avoid a potential deadlock This unlocks a mutex in an error path, that would otherwise remain locked and potentially cause a deadlock later on. Reported by: Coverity Scan CID: 1521334 Reviewed by: corvink, markj MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45401 (cherry picked from commit 1f3bfc60550cdd019f00bf6d274db762fda4ed2c) --- usr.sbin/bhyve/tpm_intf_crb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usr.sbin/bhyve/tpm_intf_crb.c b/usr.sbin/bhyve/tpm_intf_crb.c index 6aeafe7f0ec1..95cd8b1aae31 100644 --- a/usr.sbin/bhyve/tpm_intf_crb.c +++ b/usr.sbin/bhyve/tpm_intf_crb.c @@ -349,8 +349,10 @@ tpm_crb_mem_handler(struct vcpu *vcpu __unused, const int dir, pthread_mutex_lock(&crb->mutex); tpm_crb_mmiocpy(&start, val, size); - if (!start.start || crb->regs.ctrl_start.start) + if (!start.start || crb->regs.ctrl_start.start) { + pthread_mutex_unlock(&crb->mutex); break; + } crb->regs.ctrl_start.start = true; From nobody Tue Nov 12 07:55:41 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xndy602sDz5bfC1; Tue, 12 Nov 2024 07:55: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xndy56C1vz4dlp; Tue, 12 Nov 2024 07:55:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731398141; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f9XpFdu75kom2HnI1FXfWeaAo4zWULHKVHFrakh07Xk=; b=QIsTromHXfalPGbXoif7Ps/yDn+S/7TPzaDd5WFsbCwc/o3fSyIUdGLFaB8A2LUumZv74q f/Te67Azev9pHTBYaYaUWf3nyiL5NPL9GnivoQPY/b1HQ/nQ7NWLwbpoYL3w6LpcBNhWk8 O64TXA0CrFZtD12kPBoCU9SyESX9vea+21yfS0YZNsdxhDF/7gdtecaq1eaDfPF6dCWD2o UXWlSxTACizU3XOaW3DND4xPBGvYYBshVxaHUC8h+/+wysHaI+vVBrR3qOTEd+ha8qkiRT xH1+Zwd/VgpFr6+g/8t7NlZ5IJtRQlJBi2Um3fOIsPLX8/qGJFqAba5G3rJf2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731398141; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f9XpFdu75kom2HnI1FXfWeaAo4zWULHKVHFrakh07Xk=; b=BaStDWK34jrhZe4ZI5x+kLL7dRx690Mx2Koy3MGVMz+Oe5NW6p/5TQFzYvXQ0uEJXwDmyr 0UJRUeQ9KkVRFjBfPL5o3fQlIvB1lqw+plgYhVmCJU92eW0GNf53umTp/HDVIVvtLFdbiX LwT1Z2n7l8slMmVeQUKh4RjLwgRzSC+SuJlCGr1nyuL61YG/J6tAhyWcg3KihROE+Wt8xd boPuTgx+s/+9O6I8rH8lgJl1snKCxqP3o3N1TQxkrcGic3McfgTHBRbtzOdOX5CPw+BK1j q1OXaMIaN6MQkpIBlmStjqNgOUsU3bbxkOGQPF0AhuEZUutpJuS3u5nNtxP0Ew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731398141; a=rsa-sha256; cv=none; b=qKxV978QKRyN3PO0co03iWTU+4HAzJPEJfNOKrtjiT4cq8eLk6Wn+oVP8/vYbULoFXa1Ej W0XLMqGVWpml2+PlxAYBhSEAhVlflVBBqXg+aD9ER7ZEg0SjNdwuGhqmHR3ygHR/HkJGvf T2gB3+kV14TguUX4Bni9gpPEZOlX8/YYTLD7oFbnysO9ntOwD3tz/W4GteOy9UK580u292 qS5zwC/wEmBYflRocvU/Aru8JRNy4JFMnkwkTzd0WRTOp5gwfMXTKPHisWLYZKZy/qcf2k YE/kiSk7Nxmq3LpMX+KXp9aBgrfzzpTHrWqzRKFFu3PdXuGU4Lazt8Sii2k0mA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xndy55pkZz122X; Tue, 12 Nov 2024 07:55:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AC7tfeM077034; Tue, 12 Nov 2024 07:55:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AC7tfen077031; Tue, 12 Nov 2024 07:55:41 GMT (envelope-from git) Date: Tue, 12 Nov 2024 07:55:41 GMT Message-Id: <202411120755.4AC7tfen077031@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Corvin =?utf-8?Q?K=C3=B6hne?= Subject: git: 541696f2a1d0 - stable/14 - bhyve: remove empty E820 entries List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: corvink X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 541696f2a1d08eb7f808b3ac183dc64fa8fe3cf2 Auto-Submitted: auto-generated The branch stable/14 has been updated by corvink: URL: https://cgit.FreeBSD.org/src/commit/?id=541696f2a1d08eb7f808b3ac183dc64fa8fe3cf2 commit 541696f2a1d08eb7f808b3ac183dc64fa8fe3cf2 Author: Corvin Köhne AuthorDate: 2024-06-04 07:38:02 +0000 Commit: Corvin Köhne CommitDate: 2024-11-12 07:54:21 +0000 bhyve: remove empty E820 entries When reserving a block with the same size of a RAM segement, we can end up with an empty RAM segmenet. Avoid that by removing this empty segment from the E820 table. Reviewed by: jhb, markj (older version) MFC after: 1 week Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D45480 (cherry picked from commit f325f81f4ab93646debed0c2291c4c7f31470cfb) --- usr.sbin/bhyve/amd64/e820.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/usr.sbin/bhyve/amd64/e820.c b/usr.sbin/bhyve/amd64/e820.c index 9d95ec8ce688..148cae72ca6e 100644 --- a/usr.sbin/bhyve/amd64/e820.c +++ b/usr.sbin/bhyve/amd64/e820.c @@ -210,7 +210,19 @@ e820_add_entry(const uint64_t base, const uint64_t end, (base < element->base || end > element->end)) return (ENOMEM); - if (base == element->base) { + if (base == element->base && end == element->end) { + /* + * The new entry replaces an existing one. + * + * Old table: + * [ 0x1000, 0x4000] RAM <-- element + * New table: + * [ 0x1000, 0x4000] Reserved + */ + TAILQ_INSERT_BEFORE(element, new_element, chain); + TAILQ_REMOVE(&e820_table, element, chain); + free(element); + } else if (base == element->base) { /* * New element at system memory base boundary. Add new * element before current and adjust the base of the old From nobody Tue Nov 12 07:55:42 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xndy72BFFz5bf5t; Tue, 12 Nov 2024 07:55: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xndy70Bq0z4fFK; Tue, 12 Nov 2024 07:55:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731398143; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=64/L+PL77L0hPLxcOLQ1QmQB/Uz3CS1ysETs7bvqin8=; b=O27HM3Ey1x3QiAK7N2eS6YziOvLDgTvyQPQLAGIT90NqD48b7ADPUTgL4zR44IFuM1+ok2 1hixbnYj8xIdWxu8JhpPKLP4eT+K/xn/GHDRm8mTkIuGmGOKWeHL4gfRyMgi11GTO0LIus QQWdn/7SKBs4JDZp/E12AYLIjU/5QiYMXVZoewy2EZbUMchrmmLCZbjPM3es1iXoLQAR0n laEd0s9IleWCnO8F1wnLs3gOmHN93Gfy7SMBbsCsDaUOD+lRq1CxSLizJLN5sYykkNEES1 crGnvTk5IInm6C7ATX63ja7r7kyI4P4kcZ38Da3oC3Is/NAFGRamN59hQ6LrFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731398143; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=64/L+PL77L0hPLxcOLQ1QmQB/Uz3CS1ysETs7bvqin8=; b=jefxK3+0kr3EQXRbHlv44UM9ZWouq5izMFv0I/pbBgUeZxBvUEiVFxnKiFnK6PDOaQwW62 ASSUiKX8IFS8KE8r1qSjY5HBWDqQWQg/yOJxpWViZCyymx+dHsaB2V/OYnE7Cu6gOWZxRi GodCZ0h1XiOQmkhtp1WkWDK0zhLCdQXM7ZyzCKjf/mJsmAPY6EeTH7Wv2TrBkVzEHKtP4b U2YcbeRiRLGYu+Ff4Ogr8S+q4uKY/vdTzOyeEoCy14GlCYhvQxajba3UiXS1LfElKLeX8J UGvdGITjI1QhC+QiafucoRlafrWavCBP/BJCoIpCTrBo7ZzgyxiVHIS0cQH5DQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731398143; a=rsa-sha256; cv=none; b=D+PB53wu09eqNY91jqwDiadB9UA8Wd9U6qolKAG8bBSPXRoS7/G/7G5aDMUWuIkoFx5QL8 EXlik3dV4tGgyrK4RQGo//RyCfEOJDiI2waYQteRLC3Gdiy8vYGCSpff4PmOhIhGfiFNWt eQ/EtYl+TYAW6lfhXJz06j4YLMnUpm2RH6ciN0ugTzvtDF2UL6geAaMQqBL7tcharWYSZy 6JE+NiahC9glqNOLazs/oSIsEAV2+kjNyC3h/P8lRC0Ziv4GuFqdliK3c+yuFYhbYeOS+k jWCVpBIjtLnpnHexJmPVOKWD8wKVv570bFQzn6U5hJ1/5QnK9DZ0OUcwRpu/ZA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xndy66sQnz12TG; Tue, 12 Nov 2024 07:55:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AC7tgFS077096; Tue, 12 Nov 2024 07:55:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AC7tgfT077093; Tue, 12 Nov 2024 07:55:42 GMT (envelope-from git) Date: Tue, 12 Nov 2024 07:55:42 GMT Message-Id: <202411120755.4AC7tgfT077093@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Corvin =?utf-8?Q?K=C3=B6hne?= Subject: git: 5a43d257c0fe - stable/14 - bhyve: don't crash when guest writes TPM int_enable register List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: corvink X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5a43d257c0fe009235c11463ace889aaef3d0c8e Auto-Submitted: auto-generated The branch stable/14 has been updated by corvink: URL: https://cgit.FreeBSD.org/src/commit/?id=5a43d257c0fe009235c11463ace889aaef3d0c8e commit 5a43d257c0fe009235c11463ace889aaef3d0c8e Author: Hans Rosenfeld AuthorDate: 2024-09-09 08:41:31 +0000 Commit: Corvin Köhne CommitDate: 2024-11-12 07:54:22 +0000 bhyve: don't crash when guest writes TPM int_enable register FreeBSD's own TPM driver writes 0 to the INT_ENABLE register during attach, making sure interrupts are off. bhyve really shouldn't kill the VM when that happens just because it doesn't support TPM interrupts. Even if a guest was trying to enable interrupts, we should just ignore it like real TPM hardware would. Reviewed by: corvink MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D46562 (cherry picked from commit 2feea221b2480f9f97b3bc0f47510b5bdec96b79) --- usr.sbin/bhyve/tpm_intf_crb.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/usr.sbin/bhyve/tpm_intf_crb.c b/usr.sbin/bhyve/tpm_intf_crb.c index 95cd8b1aae31..3e0769d1fef6 100644 --- a/usr.sbin/bhyve/tpm_intf_crb.c +++ b/usr.sbin/bhyve/tpm_intf_crb.c @@ -338,6 +338,10 @@ tpm_crb_mem_handler(struct vcpu *vcpu __unused, const int dir, break; } + case offsetof(struct tpm_crb_regs, int_enable): + /* No interrupt support. Ignore writes to int_enable. */ + break; + case offsetof(struct tpm_crb_regs, ctrl_start): { union tpm_crb_reg_ctrl_start start; From nobody Tue Nov 12 07:55:44 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xndy84dyxz5bf4M; Tue, 12 Nov 2024 07:55: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xndy81c7hz4fFM; Tue, 12 Nov 2024 07:55:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731398144; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/lg0nhnY1meLWB9bForv1esezw0lRxTV8JKH2O6im14=; b=aryg6QFpK+VCKKArQwzthXpHfIraLC5F0HR91jeEL2QxMLcsvQwdTYAL6t2mTJbSvlubd3 TfNGOw5CJfllOQzhzraRhDKdJJEB71Lcuhu83d+49n3x1+YhtlQBL2JyB8tva7w/7gX9A1 2SKo4/FeTLwqhpcEPrlDRY3AyPaGZr6Inl3bYykDiD2yIOwuaAKpMsNdpKdksVQH+sG0oL RxpGRlO/fEpcrXR5GS8jV7nJvmRZuE9bQkoK8KrTnlgO8fRego7ZqTiy1PREyT4cbNueKX ttx0q5JA0Mw6W+51sKBqeA4TO2kZxGEGimAONNEoxVAZ0lsljD2Sq2r37drN2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731398144; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/lg0nhnY1meLWB9bForv1esezw0lRxTV8JKH2O6im14=; b=Pesb0geoDvuA9x0nJJ4eRdHFd0kYgV8Rm5Op+TCFWnVuf63QhheElO2SHWtal1R6Xx4fuA GEqHsQKwwg4S+QspIzD2itP7b5wNXrbLkMKFtfpJ6mZZTuQBGyny4AN3yKs3N86FIfsMBz AHcvOoHDSxOMtC4C5hio6lY6xI+jeq8v8U31fi8P+pe6Ax7XeY7Oqcq9KRVoFQIHxgeGs5 0wXbIBAaMQIpe92aJ7m8PO4uK2Aq8/a02fVCi67scV3HovUQ7qjCjBCThdyJep95M9bc1I M7j/uofyN1Ev5HpYAraqXJcAn2wt/sQle+hab2pCgJNYqn6Mha4pkAMt1ZEF9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731398144; a=rsa-sha256; cv=none; b=peIz+WcP0B+7Vb5UU51sPLfdVMR7hIWQkVzhQMH+7MHYKMTJw5Xis+b+fxZXI7IUnaM14v ZqX4RBtrrKNdRuA3MkD1ah/qFry9vuR6X+uM5ICglwtRmXXbqS/lISSEbDqQrRTD0ws4Ce i+8uSGaroSul0skskkwJPnsiwOcKI/3Ylgj7/pahcN5hQbRAZ7xvf+fBNVFSApO2ztxrH0 KtxQF90mUy8GYgDVqiZoIEnDWNiREhVs9pk/0q6JQ11wa9vffyaTiCypPtN/7/jYbMYTjO LGzYc4gqnCaugwfMlvcOuhxEFFuKgcafouNEplkglOhI0SfyoZiXgWek7ZmsxA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xndy817FFz11wB; Tue, 12 Nov 2024 07:55:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AC7tiHn077159; Tue, 12 Nov 2024 07:55:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AC7tiOh077156; Tue, 12 Nov 2024 07:55:44 GMT (envelope-from git) Date: Tue, 12 Nov 2024 07:55:44 GMT Message-Id: <202411120755.4AC7tiOh077156@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Corvin =?utf-8?Q?K=C3=B6hne?= Subject: git: b3180bea9b1d - stable/14 - bhyve: TPM CRB: pass actual TPM request length to backend execute_cmd() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: corvink X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b3180bea9b1d0c30d46a10e92d96d4944004f37a Auto-Submitted: auto-generated The branch stable/14 has been updated by corvink: URL: https://cgit.FreeBSD.org/src/commit/?id=b3180bea9b1d0c30d46a10e92d96d4944004f37a commit b3180bea9b1d0c30d46a10e92d96d4944004f37a Author: Hans Rosenfeld AuthorDate: 2024-09-09 08:42:42 +0000 Commit: Corvin Köhne CommitDate: 2024-11-12 07:54:22 +0000 bhyve: TPM CRB: pass actual TPM request length to backend execute_cmd() The TPM spec (TPM Library, Part3: Commands, Section 5.2: Command Header Validation) requires that no more bytes are written than the size of the commands, as given in the request header. Thus the TPM CRB interface needs to get the command size from the request header and pass that to the emulation backend. As the guest OS driver can set the address and size of the command and response buffers freely within the limits of the provided CRB data buffer, bhyve should verify that the values set in the corresponding registers make sense before processing a command. Reviewed by: corvink MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D46564 (cherry picked from commit bc3d09e90b8625f17017663fad3e049348b04ded) --- usr.sbin/bhyve/tpm_intf_crb.c | 45 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bhyve/tpm_intf_crb.c b/usr.sbin/bhyve/tpm_intf_crb.c index 3e0769d1fef6..b1f5b72b6285 100644 --- a/usr.sbin/bhyve/tpm_intf_crb.c +++ b/usr.sbin/bhyve/tpm_intf_crb.c @@ -166,6 +166,15 @@ static_assert(sizeof(struct tpm_crb_regs) == TPM_CRB_REGS_SIZE, regs.rsp_addr = val; \ } while (0) +struct tpm_cmd_hdr { + uint16_t tag; + uint32_t len; + union { + uint32_t ordinal; + uint32_t errcode; + }; +} __packed; + struct tpm_crb { struct tpm_emul *emul; void *emul_sc; @@ -177,6 +186,7 @@ struct tpm_crb { bool closing; }; + static void * tpm_crb_thread(void *const arg) { @@ -201,6 +211,26 @@ tpm_crb_thread(void *const arg) const uint32_t cmd_size = CRB_CMD_SIZE_READ(crb->regs); const uint32_t rsp_size = CRB_RSP_SIZE_READ(crb->regs); + if ((cmd_addr < TPM_CRB_DATA_BUFFER_ADDRESS) || + (cmd_size < sizeof (struct tpm_cmd_hdr)) || + (cmd_size > TPM_CRB_DATA_BUFFER_SIZE) || + (cmd_addr + cmd_size > + TPM_CRB_DATA_BUFFER_ADDRESS + TPM_CRB_DATA_BUFFER_SIZE)) { + warnx("%s: invalid cmd [%16lx/%8x] outside of TPM " + "buffer", __func__, cmd_addr, cmd_size); + break; + } + + if ((rsp_addr < TPM_CRB_DATA_BUFFER_ADDRESS) || + (rsp_size < sizeof (struct tpm_cmd_hdr)) || + (rsp_size > TPM_CRB_DATA_BUFFER_SIZE) || + (rsp_addr + rsp_size > + TPM_CRB_DATA_BUFFER_ADDRESS + TPM_CRB_DATA_BUFFER_SIZE)) { + warnx("%s: invalid rsp [%16lx/%8x] outside of TPM " + "buffer", __func__, rsp_addr, rsp_size); + break; + } + const uint64_t cmd_off = cmd_addr - TPM_CRB_DATA_BUFFER_ADDRESS; const uint64_t rsp_off = rsp_addr - TPM_CRB_DATA_BUFFER_ADDRESS; @@ -218,6 +248,17 @@ tpm_crb_thread(void *const arg) uint8_t cmd[TPM_CRB_DATA_BUFFER_SIZE]; memcpy(cmd, crb->regs.data_buffer, TPM_CRB_DATA_BUFFER_SIZE); + /* + * Do a basic sanity check of the TPM request header. We'll need + * the TPM request length for execute_cmd() below. + */ + struct tpm_cmd_hdr *req = (struct tpm_cmd_hdr *)&cmd[cmd_off]; + if (be32toh(req->len) < sizeof (struct tpm_cmd_hdr) || + be32toh(req->len) > cmd_size) { + warnx("%s: invalid TPM request header", __func__); + break; + } + /* * A TPM command can take multiple seconds to execute. As we've * copied all required values and buffers at this point, we can @@ -238,8 +279,8 @@ tpm_crb_thread(void *const arg) * response. */ uint8_t rsp[TPM_CRB_DATA_BUFFER_SIZE] = { 0 }; - crb->emul->execute_cmd(crb->emul_sc, &cmd[cmd_off], cmd_size, - &rsp[rsp_off], rsp_size); + (void) crb->emul->execute_cmd(crb->emul_sc, req, + be32toh(req->len), &rsp[rsp_off], rsp_size); pthread_mutex_lock(&crb->mutex); memset(crb->regs.data_buffer, 0, TPM_CRB_DATA_BUFFER_SIZE); From nobody Tue Nov 12 07:55:45 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xndy93f8kz5bfCW; Tue, 12 Nov 2024 07:55: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xndy92DrCz4f5K; Tue, 12 Nov 2024 07:55:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731398145; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kWvaYERNUvzC6RCW2uYC7LeTfrM3jG72Tsr0DSj88Vg=; b=fIh/GZVdbAbdh9KHY+JipPkCUrdkW69JuSDeZzKWDPxRNXPU1gk0aCgiilnBBd4Dxu3aIR g4eRB+Gkvsqf4SNkVEePPGJtYNnj2mUSfuZ2UJLmjE9TXS/iErqYhv0J2EkjOryIG4NcPC X3cC666IFZIJrVm0PTAhVJas5xQZWaWManapU76335pC5VpGWHBmenyCAOeKmZrgdcS0c2 hfZ+5R+ji4V1zaGqcqVBwpZwtiMiZmR22BlMzEFMq1jn/gAtiVg8OjfIJ63PUeEO53yrqn szub6xC6TzN2OM8sGJdAjh9HK8pNW+P93F72HXZS+jF7vFpwFdFTjjcqgwTNCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731398145; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kWvaYERNUvzC6RCW2uYC7LeTfrM3jG72Tsr0DSj88Vg=; b=cuRXmPLYvIxZBieDseZB0PelsUbGyFpJZ4jXfvUNjyB4Z+bExR6B+KW+vaLHFOa99ke/2X pCyhbJjrgdE9TMA8EINT5H6M1DnD3I9U7MW6IAtCzuY/Dw7ajPYkM+Hl4VSz4wGnbjNPbx kG1J7dEYdqPUXZ2eCCBMoKHiDwqZSKQ6xbJh6cC8J0ATeOnW89u6pogzj9rqI/kJa9WpSJ KC/D7TJRuWz0s+qT9fODTyTC5MGjO/o7Wd+bDo2ecsMswfz4op1KRA+1W5+7xW7OWjGbGc Jq2pJfC049ayFTlmsq4X2S1d+ZOb6qfRmjYN2nVbJreMxk1xwZAd41pTpRbdsw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731398145; a=rsa-sha256; cv=none; b=gbwiGeK+fJsR+8SUObuOtck6RPIhX1Mdv7u7YVy0wyPu5Jpnxh7bzyxU+GF8yV4mdny6CV q2YcAtJi6SVqRmKbDVcpWA9tFYqlmvaSX0DfGqdfJRwrK4ye4/vesd+5oznTHPvNoZJ8TD j3/A7/L1GvJCDPxLG5PCgfwOVZ7wguTWupEHvVT2535pfgCnBIfv79NTOl8PgbQAX3ps0p CQDJRZthIcQNxfrJBi+F37tOTaWXM7S4RCtkUMSvd8lrc0LG+2CQ3Ey/ELgJ6KtRhnCWRd ZfI6py3M9SQbQ5Kr3mYRpICpxD/6yF9nXfhPlE30Yl4/wK939e0LIM+OQkTXWg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xndy91pL0z11wC; Tue, 12 Nov 2024 07:55:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AC7tjd4077204; Tue, 12 Nov 2024 07:55:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AC7tj7P077201; Tue, 12 Nov 2024 07:55:45 GMT (envelope-from git) Date: Tue, 12 Nov 2024 07:55:45 GMT Message-Id: <202411120755.4AC7tj7P077201@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Corvin =?utf-8?Q?K=C3=B6hne?= Subject: git: 660e7182dbee - stable/14 - bhyve: merge adjacent E820 entries List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: corvink X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 660e7182dbeedea9083eb788dfcdfd17cc9ac6b6 Auto-Submitted: auto-generated The branch stable/14 has been updated by corvink: URL: https://cgit.FreeBSD.org/src/commit/?id=660e7182dbeedea9083eb788dfcdfd17cc9ac6b6 commit 660e7182dbeedea9083eb788dfcdfd17cc9ac6b6 Author: Corvin Köhne AuthorDate: 2023-12-19 14:01:45 +0000 Commit: Corvin Köhne CommitDate: 2024-11-12 07:54:22 +0000 bhyve: merge adjacent E820 entries EDKII can allocate adjacent E820 entries only if they are at a page boundary. For some unknown and probably strange reasons, Intel puts it's OpRegion at an offset of 0x18 bytes. If the VBT lays directly behind the OpRegion, we're going to try allocating two adjacent E820 sharing the same page. This causes EDKII to do not properly allocate those entries. A Linux guest then isn't able to map the VBT and those fails to find it. Reviewed by: markj MFC after: 1 week Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D45336 (cherry picked from commit 08139140c5f96fd9deb7a8de7a534bccf9a1d0c8) --- usr.sbin/bhyve/amd64/e820.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/usr.sbin/bhyve/amd64/e820.c b/usr.sbin/bhyve/amd64/e820.c index 148cae72ca6e..2fad22865ba6 100644 --- a/usr.sbin/bhyve/amd64/e820.c +++ b/usr.sbin/bhyve/amd64/e820.c @@ -156,6 +156,7 @@ e820_add_entry(const uint64_t base, const uint64_t end, { struct e820_element *new_element; struct e820_element *element; + struct e820_element *sib_element; struct e820_element *ram_element; assert(end >= base); @@ -273,6 +274,33 @@ e820_add_entry(const uint64_t base, const uint64_t end, element->base = end; } + /* + * If the previous element has the same type and ends at our base + * boundary, we can merge both entries. + */ + sib_element = TAILQ_PREV(new_element, e820_table, chain); + if (sib_element != NULL && + sib_element->type == new_element->type && + sib_element->end == new_element->base) { + new_element->base = sib_element->base; + TAILQ_REMOVE(&e820_table, sib_element, chain); + free(sib_element); + } + + /* + * If the next element has the same type and starts at our end + * boundary, we can merge both entries. + */ + sib_element = TAILQ_NEXT(new_element, chain); + if (sib_element != NULL && + sib_element->type == new_element->type && + sib_element->base == new_element->end) { + /* Merge new element into subsequent one. */ + new_element->end = sib_element->end; + TAILQ_REMOVE(&e820_table, sib_element, chain); + free(sib_element); + } + return (0); } From nobody Tue Nov 12 07:55:46 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XndyB4cndz5bfHc; Tue, 12 Nov 2024 07:55: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XndyB3FRXz4fGd; Tue, 12 Nov 2024 07:55:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731398146; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GHj0hfaen38NWHhPNCpxip72HO+BaGx3lUbgC1R92lY=; b=xX6E9qO68yTumWN1kWzja8/76A0HR/Se0JlhIrRgnodEXI0GDv0Dr7F7KIH189uBpq6KG+ tISQUGEDgt3a/7oRgR/oN6p/otPXjWjmctSx+NyK1EMPSifZi2GJ6uH6GvG0gAjH2606WT WtqovSOkPowsJ/Qlokk+cPG4l4EbofShYKFZ+dyiU+7qCehfC2Flp4NSeYQ5SqsoNhQmsW UPZQiiRSDEaN9wl2hxeWCVIYnjGMZ53Pg939ylY1vKXVThgawnst29lbUJ+5t34gsdzpC7 UeeR/hwjJV4AfplHFFKf/h7HQf3ifa+oNV+psAwWudrO0z5y8kPykdzGP4Ajqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731398146; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GHj0hfaen38NWHhPNCpxip72HO+BaGx3lUbgC1R92lY=; b=uYeQcSawHFXjXRmFggR93zjKHZ+GRipHiFfd05dSjp8dcFEMmLXjHgFYML7GZlOs6ceJac oFpMimWwwFb4WXHMppWbi8FJ8UgSh+RnT9C5swd1gpr/JzysSmfkbjMMRCS0FX+QDW952g M/2Wnqza6R3Xg+u+tm1cFDIaxvFINBBi7P/NZWmJy4ebs/bpfaQfkXwYqsyOA5NTCRLmJY FNf0yB0o5+SOehflwgX/rw0U144466MSSALHfZiznZOFwzbRSxrW7n08cZP14J7ANj0vrW JdsQ2CYiwyJoOiopPfI2pZPZzO5OZBLU8HwFH4VJY9qJ4IK8k7z7ReoG7NFvVQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731398146; a=rsa-sha256; cv=none; b=kfv7vxeL/U/3uieU724RMNGVv+jkbSbEMAmH1cMLKCmVwlLVX3K7vVR5q16DUFoT8C2JD5 VCeuUx/PHLBnbxvnLVLTkw4mFD95uBQoDZRHjLvTAoyD2rICkyc5aIYih0QKuR0eU3GAmN k+tBf3r5BXk8wyss/rPPLR6kY6Q++FBJbxkDrmqn+SM7ekGfjKy2TZhXyY+O93VwS982qv 9OBN60skPSfpUjAFIhTZj4C1NpmXqzG4mMsS1muZ0NGFtQTYKbLSnNX+oIrLVNq7dGkjB6 TOJFcDEumtx9Zv6ef/LVSJvwB5ghMyaPVSB+sgPrpWP+YpKI+fQ1Ywc2WxfMXw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XndyB2sCTz127L; Tue, 12 Nov 2024 07:55:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AC7tkYR077259; Tue, 12 Nov 2024 07:55:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AC7tkqu077256; Tue, 12 Nov 2024 07:55:46 GMT (envelope-from git) Date: Tue, 12 Nov 2024 07:55:46 GMT Message-Id: <202411120755.4AC7tkqu077256@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Corvin =?utf-8?Q?K=C3=B6hne?= Subject: git: fe019d5e443b - stable/14 - bhyve: TPM 2.0 emulation with swtpm List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: corvink X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: fe019d5e443bdf3b40eec06078d2c596e84f8c56 Auto-Submitted: auto-generated The branch stable/14 has been updated by corvink: URL: https://cgit.FreeBSD.org/src/commit/?id=fe019d5e443bdf3b40eec06078d2c596e84f8c56 commit fe019d5e443bdf3b40eec06078d2c596e84f8c56 Author: Hans Rosenfeld AuthorDate: 2024-09-09 08:45:40 +0000 Commit: Corvin Köhne CommitDate: 2024-11-12 07:54:22 +0000 bhyve: TPM 2.0 emulation with swtpm Implement a TPM 2.0 emulation backend to connect to a running swtpm instance using a UNIX domain socket. Reviewed by: corvink MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D46373 (cherry picked from commit d93fbcf0222b05fcd7704b35bc94e5513c2682e2) --- usr.sbin/bhyve/Makefile | 1 + usr.sbin/bhyve/bhyve.8 | 26 ++++++-- usr.sbin/bhyve/bhyve_config.5 | 45 ++++++++++---- usr.sbin/bhyve/tpm_emul_swtpm.c | 132 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 187 insertions(+), 17 deletions(-) diff --git a/usr.sbin/bhyve/Makefile b/usr.sbin/bhyve/Makefile index 03ea77769754..f4dae2f09904 100644 --- a/usr.sbin/bhyve/Makefile +++ b/usr.sbin/bhyve/Makefile @@ -54,6 +54,7 @@ SRCS= \ sockstream.c \ tpm_device.c \ tpm_emul_passthru.c \ + tpm_emul_swtpm.c \ tpm_intf_crb.c \ tpm_ppi_qemu.c \ uart_backend.c \ diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index ffdaf71d1d8a..90f34b3314f8 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -374,7 +374,7 @@ PCI 16550 serial device. .It Cm lpc LPC PCI-ISA bridge with COM1, COM2, COM3, and COM4 16550 serial ports, a boot ROM, and, -optionally, a fwcfg type and the debug/test device. +optionally, a TPM module, a fwcfg type, and the debug/test device. The LPC bridge emulation can only be configured on bus 0. .It Cm fbuf Raw framebuffer device attached to VNC server. @@ -566,10 +566,25 @@ process. Use the host TTY device for serial port I/O. .El .Pp -TPM device backends: -.Bl -tag -width 10n -.It Ar type Ns \&, Ns Ar path Ns Op Cm \&, Ns Ar tpm-device-options Emulate a TPM device. +Supported options for +.Ar type : +.Bl -tag -width 10n +.It Cm passthru +Use a physical TPM device. +The argument +.Ar path +needs to point to a valid TPM device path, i.e. +.Pa /dev/tpm0 . +.It Cm swtpm +Connect to a running +.Cm swtpm +instance. +The argument +.Ar path +needs to point to a UNIX domain socket that a +.Cm swtpm +process is listening on. .El .Pp The @@ -579,7 +594,8 @@ are: .It Cm version= Ns Ar version Version of the TPM device according to the TCG specification. Defaults to -.Cm 2.0 +.Cm 2.0 , +which is the only version currently supported. .El .Pp Boot ROM device backends: diff --git a/usr.sbin/bhyve/bhyve_config.5 b/usr.sbin/bhyve/bhyve_config.5 index cb2de997e63e..38a52b635ec8 100644 --- a/usr.sbin/bhyve/bhyve_config.5 +++ b/usr.sbin/bhyve/bhyve_config.5 @@ -146,15 +146,6 @@ Specify the keyboard layout name with the file name in This value only works when loaded with UEFI mode for VNC, and used a VNC client that don't support QEMU Extended Key Event Message (e.g. TightVNC). -.It Va tpm.path Ta string Ta Ta -Path to the host TPM device. -This is typically /dev/tpm0. -.It Va tpm.type Ta string Ta Ta -Type of the TPM device passed to the guest. -Currently, only "passthru" is supported. -.It Va tpm.version Ta string Ta 2.0 Ta -Version of the TPM device according to the TCG specification. -Currently, only version 2.0 is supported. .It Va rtc.use_localtime Ta bool Ta true Ta The real time clock uses the local time of the host. If this is set to false, the real time clock uses UTC. @@ -274,9 +265,8 @@ Intel e82545 network interface. VGA framebuffer device attached to VNC server. .It Li lpc LPC PCI-ISA bridge with COM1-COM4 16550 serial ports, -a boot ROM, -an optional fwcfg type, -and an optional debug/test device. +a boot ROM, and, optionally, a TPM module, a fwcfg type, +and a debug/test device. This device must be configured on bus 0. .It Li hda High Definition audio controller. @@ -593,6 +583,37 @@ This value is required for the Intel GOP driver to work properly. .It Va subdevice Ta 0 .El .El +.Ss TPM Device Settings +The TPM device stores its configuration under a top-level +.Va tpm +node rather than under the LPC TPM device's node. +Only one TPM device is supported. +The following nodes are available under +.Va tpm : +.Bl -column "tpm.version" "Format" "Default" +.It Sy Name Ta Sy Format Ta Sy Default Ta Sy Description +.It Va tpm.path Ta string Ta Ta +Path to the TPM backend. +Depending on the +.Va tpm.type , +this is either the host TPM device, typically +.Pa /dev/tpm0 , +or any UNIX domain socket on which a +.Cm swtpm +process is listening. +.It Va tpm.type Ta string Ta Ta +Type of the TPM device passed to the guest. +This can be either +.Dq passthru +to use the host TPM devices, or +.Dq swtpm +to connect to a running +.Cm swtpm +process. +.It Va tpm.version Ta string Ta 2.0 Ta +Version of the TPM device according to the TCG specification. +Currently, only version 2.0 is supported. +.El .Ss NVMe Controller Settings Each NVMe controller supports a single storage device. The device can be backed either by a memory disk described by the diff --git a/usr.sbin/bhyve/tpm_emul_swtpm.c b/usr.sbin/bhyve/tpm_emul_swtpm.c new file mode 100644 index 000000000000..aaa0c9c358cd --- /dev/null +++ b/usr.sbin/bhyve/tpm_emul_swtpm.c @@ -0,0 +1,132 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2024 Hans Rosenfeld + * Author: Hans Rosenfeld + */ + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "config.h" +#include "tpm_device.h" +#include "tpm_emul.h" + +struct tpm_swtpm { + int fd; +}; + +struct tpm_resp_hdr { + uint16_t tag; + uint32_t len; + uint32_t errcode; +} __packed; + +static int +tpm_swtpm_init(void **sc, nvlist_t *nvl) +{ + struct tpm_swtpm *tpm; + const char *path; + struct sockaddr_un tpm_addr; + + tpm = calloc(1, sizeof (struct tpm_swtpm)); + if (tpm == NULL) { + warnx("%s: failed to allocate tpm_swtpm", __func__); + return (ENOMEM); + } + + path = get_config_value_node(nvl, "path"); + if (path == NULL) { + warnx("%s: no socket path specified", __func__); + return (ENOENT); + } + + tpm->fd = socket(PF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0); + if (tpm->fd < 0) { + warnx("%s: unable to open tpm socket", __func__); + return (ENOENT); + } + + bzero(&tpm_addr, sizeof (tpm_addr)); + tpm_addr.sun_family = AF_UNIX; + strlcpy(tpm_addr.sun_path, path, sizeof (tpm_addr.sun_path) - 1); + + if (connect(tpm->fd, (struct sockaddr *)&tpm_addr, sizeof (tpm_addr)) == + -1) { + warnx("%s: unable to connect to tpm socket \"%s\"", __func__, + path); + return (ENOENT); + } + + *sc = tpm; + + return (0); +} + +static int +tpm_swtpm_execute_cmd(void *sc, void *cmd, uint32_t cmd_size, void *rsp, + uint32_t rsp_size) +{ + struct tpm_swtpm *tpm; + ssize_t len; + + if (rsp_size < (ssize_t)sizeof(struct tpm_resp_hdr)) { + warn("%s: rsp_size of %u is too small", __func__, rsp_size); + return (EINVAL); + } + + tpm = sc; + + len = send(tpm->fd, cmd, cmd_size, MSG_NOSIGNAL|MSG_DONTWAIT); + if (len == -1) + err(1, "%s: cmd send failed, is swtpm running?", __func__); + if (len != cmd_size) { + warn("%s: cmd write failed (bytes written: %zd / %d)", __func__, + len, cmd_size); + return (EFAULT); + } + + len = recv(tpm->fd, rsp, rsp_size, 0); + if (len == -1) + err(1, "%s: rsp recv failed, is swtpm running?", __func__); + if (len < (ssize_t)sizeof(struct tpm_resp_hdr)) { + warn("%s: rsp read failed (bytes read: %zd / %d)", __func__, + len, rsp_size); + return (EFAULT); + } + + return (0); +} + +static void +tpm_swtpm_deinit(void *sc) +{ + struct tpm_swtpm *tpm; + + tpm = sc; + if (tpm == NULL) + return; + + if (tpm->fd >= 0) + close(tpm->fd); + + free(tpm); +} + +static const struct tpm_emul tpm_emul_swtpm = { + .name = "swtpm", + .init = tpm_swtpm_init, + .deinit = tpm_swtpm_deinit, + .execute_cmd = tpm_swtpm_execute_cmd, +}; +TPM_EMUL_SET(tpm_emul_swtpm); From nobody Tue Nov 12 07:59:06 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xnf250Cc8z5bfKy; Tue, 12 Nov 2024 07:59:09 +0000 (UTC) (envelope-from corvink@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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xnf246jr2z4gf7; Tue, 12 Nov 2024 07:59:08 +0000 (UTC) (envelope-from corvink@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731398348; 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=1VAbI5pScR6YRWYjDopIhEX9QW4nnM6JBQVGWKTK4qs=; b=AKcRVVXgyqABlLvIMltAJ9CPw4SaAeiMGe9VPIoShA4/gMSzFESPA1bum+ZRvJNgOt5wHs +eZPMkL+A18LgT63FPBAmb5qaz7fhDnH1qg6RuP8sPDBveqlqmKRmqgOec73YUD0lj9UcA 46uiyGzeGv/1w8K+pTcQrDrG3j+/ADO+PCydOcVT8Ar0f4FOm1u8wpqfunGK5P2/0XciNB +9ky3CGzWn6D8ZVw9zmDurlTLeZGbq1DLUPvhqAr+NONzOHs/BDcBk8KJqBXTuQ98gvZGi y1tNQW9cefTaTTug2Od7ndjJR/N4fapjuxR8/ZKcKdsZuoOsXu84iqVLJIFY8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731398348; 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=1VAbI5pScR6YRWYjDopIhEX9QW4nnM6JBQVGWKTK4qs=; b=kiDD/zMZ6rYk/7PJjfQJZU858DoqZXt5qJ8vLzZJIhCfkgD2YXDG42V5b6/OYRH6fiCwc0 nrxNSGhRpHOf+hDatSB/FYWTUOXuqv+WEDhF80qzNoiQjpp3KkhZxPsg1TAIpigmWjcdb/ 4L/CwpGBQPcdo47dk1VMtPLIKHStEhr3Ax18GYEBKXVgmR6Pn1PKycLmWKFGt67h8AgIe7 VCxVjIvRyrTqslsbJByLOpE6yU5+UiHTrSpTmuRMQdC0pyefORV1fGWraiV0JZMAR4ny5t HOK2Rg2Ams7pPGDhvuvbaU1tt64ZTSKPCLtLWPbi2OLTyIQ3NHba0PpgHPNa/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731398348; a=rsa-sha256; cv=none; b=Kvy+oWRuhsQ1JLJDo4pkLtzF/U7bdUPol+PFC/Pfx+009lxIVBAHGw16ZQ25zG9RTLzEad wie/wzeE0BRSNj7i+zMX+LZ6frhVq6G4llGwAtaQ1kHvHD8oR73hdwJoPy2ilU2IT+fghE O7myDmqcwlYbJDXcTgS820cIkq6/DJMgjLg2TEbgONYTJoVnlpXPhzcUj+a+0QZoK9AIYx ZUSaMF41enZkowmsQKp4HXsdbBlnV04NnRgKjFxD1Ow3ZXKBnmYO5Nk4FZnFGzq79j/e9P aZt3N2QcZAjpO7qDqf8kxCAuXfnQp36vKcJtc3zigaowSDcsuh5C6BBNqH0C3w== Received: from [172.21.180.15] (unknown [195.226.174.194]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: corvink) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Xnf242x4hzZ8M; Tue, 12 Nov 2024 07:59:08 +0000 (UTC) (envelope-from corvink@FreeBSD.org) Message-ID: <52925e6528586184db8c5f7a69c745aaa64db70b.camel@FreeBSD.org> Subject: Re: git: d93fbcf0222b - main - bhyve: TPM 2.0 emulation with swtpm From: Corvin =?ISO-8859-1?Q?K=F6hne?= To: Shawn Webb Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Date: Tue, 12 Nov 2024 08:59:06 +0100 In-Reply-To: References: <202410221206.49MC6pt3085294@gitrepo.freebsd.org> Autocrypt: addr=corvink@FreeBSD.org; prefer-encrypt=mutual; keydata=mQINBGNjZaIBEADDTrDNf+0pwiuRPBdClcnZW83dH1UhuOi0u+A1J2SatEBbNaFVtXXAa vewCTuyV/ZbNidjlhq3R/pWyiKjFKvs5dj7PMCw+3z2D5OWpMdHg7TrB+fbdFPOEsu0zQVKNaO+pS KCfN0Re0m7bL3wuvl7PXvBufRwA3Guo1P4j3TXWaEkuso7VupTvE25zVGg9ONHrGOjA9RUy+Yg4Se 3NLgtUdjBgA21SBQTDvRQV4fDmVenlwvWeE0Xm8FcDcpQb6sJTihaDku78mi3Ux1HCk7rTcepVEB0 xIB6qmFxv0sLlDmVv6Z6qg1y/Q5m23Pgz60o3TulMPV4F+3Itm8ifU+wgVSzBZbD29GYkd7LKqMkF bhvfSBk+5db3vbYY5OD//+LTM5AV7e2AhXuXMvG1UNBqXqSJTTSy6KZz+qmPQO0zos0dq46p8o82l KiBEGD2Hu0p+u0OyV+MmRYo1NIBFVbOPXp2MvUVl5II0UIJ3+N9gLBmfGA+HEpVO8PnvdoT/5NQ7m 8JK1rQHzjiDub/iDPAYMqKH4C0eZ/7zO0fuY5FeRNtuNtpH1Bw/+7/5RJH7bcKkfGHHEp15FJUrGH gWNydoDLB9QBprwQc8FEldDXBjzOMXIgh6FGKLNu6DswvIPGy6M3u7DXwDakCXz+c9Ym0oFihLzZx WntrsxdswD/CwARAQABtCdDb3J2aW4gS8O2aG5lIDxjb3J2aW4ua29laG5lQGdtYWlsLmNvbT6JAl QEEwEIAD4WIQSC9FKVreba38fZT0bYVNpWMV4CagUCZArUIwIbAwUJCWYBgAULCQgHAgYVCgkICwI EFgIDAQIeAQIXgAAKCRDYVNpWMV4CalcID/44k2i/mqSSi4W6FAobSF1nFLtP/pfcRNJriWKx2UF7 cfFMKyg7Nilg7FhLb5FDB1umUW2nFfchFPTUp4FfKzgRvPzIMg4RIRcVtTpYbl3z7zs9ZXD8qS//i ibbiUG3quncm6tO2x1jLZD3ORC+8MuLGXhYQIa4O5vVF2SBHdb/U6P+wsrF+U+OpRdEdQ/4Xu9S02 kltzBGgArjcexdhUqEqW01KCCSH0+qgfN1NE+9L934ZOB+cai2b9apPbCOGuV6KcUKMj4z0RWInhl XIyMqtmhdix/P/GjrQ1REVNdp74JeweSSedM15wwc6YLMXPrtOnnExyZ1gyNFYaub+Mdo3ZQ+8386 3B0C9IlpzEW0K8bYlZrl4WBNdcMOyByETAxgQmBgP6ZFErTtaeUOH1nX2FyR6o2GLSahRgngQmnRE zScTpPbBEkMwJMDAO+rbjjGxjeKSUwD1WOfbI6QZj+MS/uBk2p08kgN7fQaCEwj6jqML/IIE+FZ9I In6TNG0hChD384VHO+YioLBno1Atgi4Q7JUWSRIHQXZW+StQajFrWPPyKQwCe1MwqpKoMpX/q8IZB lzwJgZS8ShLeFZjtzOt1jgM99TD91Neonf9OzjTSbfo7sJviSWoICMhB/MvDZjj+naMVF86uGFxnI EsjVKyBxlJd4TRHnLYPTIHFKBLQjQ29ydmluIEvDtmhuZSA8Y29ydmlua0BGcmVlQlNELm9yZz6JA lQEEwEKAD4WIQSC9FKVreba38fZT0bYVNpWMV4CagUCY2NlogIbAwUJCWYBgAULCQgHAwUVCgkICw UWAwIBAAIeAQIXgAAKCRDYVNpWMV4CavfDEACCFnXpR7H9eOgP+GJMNPtK6i9/xnqdyXi8uCZIN0h YwjN4Xzo9SMLOf4UUlQEveOB+bGqbRfHd/fGKnrlXiPd0SGpKWJC21gqL/DsIH0J8I3Whth+O8tfP WeFy0oCsvBaaGFLIrDfoIgHF9i/gqEe48xhN42weB02Z3mdR1L0d7ME/BLwS0mCXe9Zh3uHw63S6x YB3Wsjptxe/ph6TpQDUKWtRJkjC6BqXPBdThpbbfIRWmjZbp2fKEJPvtRXS14+gbUqWeJ4xCvprA3 +ae7vtrp91X775yngyW3XTw5cmDiJIjykH8+zhEIoNQXNBpFrehkQDYrcM+WoE6NGSJo+3VJvSRWh UGWDVrxdTYNkbIjmTNlkI12NINC007DiuV7OF9XHWgrbbylvuZvbODmbJRdhTFy9upAUygX1/xUAQ EIMqMiJmyTdv8i0IbZ611WElQx9XHgGeZgM6+39/laN8FwspM6gE/4NzZHIZN0LEBOerZqoF+Il6e ccQpoEWx7nb/RilJp3dUUyvkBnJWg+AJByosg857kvvmDnZ3UB+bejWpcfFvnbkiKPUBPDO7tWPb5 r2yFDpDe/Vg5x+sRbkkXGUFD6Rx0p/ZiRIneVVg8emTzhDR0IL/BZkq/uVJkdaphZli1F/31cNgf6 ZJYnjxlk86uiYSySZQR0dKLDqq7QlQ29ydmluIEvDtmhuZSA8Yy5rb2VobmVAYmVja2hvZmYuY29t PokCVAQTAQgAPhYhBIL0UpWt5trfx9lPRthU2lYxXgJqBQJkCtScAhsDBQkJZgGABQsJCAcCBhUKC QgLAgQWAgMBAh4BAheAAAoJENhU2lYxXgJqI+QQAML5PTR7KpUFV3SLG60LQJGEOHUfDmJYczxBFb IAq1U4hIbivopu1AdLty7oDDrIjCVoa2/Cy34dd99O7lhLvUmZFB/zDSUtbUg2zhDkU0YSZ11Fdrl Wzky2tFaQRgxpDvWlUP0baa3Pd4dPDRiIUI6AOSR2SL6XANk6sJh56gLVM6G8yyafGsxSyDYg6Z78 EEMFejHwB+KP2DdsahupzM+F97HeC1+bOHYxtqN+2hEkPLtQWizyumPqNg5FvZhwe7yO8V95hF3Rh uDO+9aJT+WLLvcZEb/L1bI04IvZ5FWgCLI7Levd/DuOtZI8gWapHhqGZRbXB2fuJkCoKCl6V67h/7 aWhU3LjFTsC5siJyrxPjapKcIk8a7PqZDswNCKR+24LJ5D59mPgEOnsiCCVpik1WE/kgD+rOu9dQx jpjKwuKowf4EJP1KYNkYtoy1HthzyTOqPwqXC3IUl0GVPO3xw6MhUM3irCVFruC+ecVrv85Rd37vr duT6JvgW92xjWegMsamtkDZH8Ik/cmYhH0K/qEc6OZVNea/4PTEZe0uxODJ6pbMd80AJyGqDPPVeA gWJtEIG4k6IS8XyD5v1QJtlpDVpPwP/bbFnVc3h3Oatfn8Etm1KAqYvNwyO+om2PkF1p732uapDZd LwksVmgc9s79+9pSpeP5DbIeMzhrIK Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-LOVYPtJsCtxCBc0Rg6aH" User-Agent: Evolution 3.54.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 MIME-Version: 1.0 --=-LOVYPtJsCtxCBc0Rg6aH Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 2024-11-07 at 18:40 +0000, Shawn Webb wrote: > On Tue, Oct 22, 2024 at 12:06:51PM UTC, Corvin K=C3=B6hne wrote: > > The branch main has been updated by corvink: > >=20 > > URL: > > https://cgit.FreeBSD.org/src/commit/?id=3Dd93fbcf0222b05fcd7704b35bc94e= 5513c2682e2 > >=20 > > commit d93fbcf0222b05fcd7704b35bc94e5513c2682e2 > > Author:=C2=A0=C2=A0=C2=A0=C2=A0 Hans Rosenfeld > > AuthorDate: 2024-09-09 08:45:40 +0000 > > Commit:=C2=A0=C2=A0=C2=A0=C2=A0 Corvin K=C3=B6hne > > CommitDate: 2024-10-22 12:04:24 +0000 > >=20 > > =C2=A0=C2=A0=C2=A0 bhyve: TPM 2.0 emulation with swtpm > > =C2=A0=C2=A0=C2=A0=20 > > =C2=A0=C2=A0=C2=A0 Implement a TPM 2.0 emulation backend to connect to = a running > > swtpm > > =C2=A0=C2=A0=C2=A0 instance using a UNIX domain socket. > > =C2=A0=C2=A0=C2=A0=20 > > =C2=A0=C2=A0=C2=A0 Reviewed by:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 corvink > > =C2=A0=C2=A0=C2=A0 MFC after:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 1 week >=20 > Hey Corvin, >=20 > Are you still planning on MFCing this? >=20 > Thanks, >=20 Done. Note that it's too late to slip into 14.2. --=20 Kind regards, Corvin --=-LOVYPtJsCtxCBc0Rg6aH Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEgvRSla3m2t/H2U9G2FTaVjFeAmoFAmczCsoACgkQ2FTaVjFe Amr97g//eSKSbEd/knV0R22pGl13FdH1Ufxx108xF/O/O8/hRquYsy8/P4nZ9gWm m6vorWxHC/V4tUm30Up8SsvwOYc/Tub3wm1SzkBmKMySpkreV8hw+cj8jNGbQD8p Cy9Ezu24ny/DaZTxlLtd783TKrGrVPFhO4eVfwhiVhFLm+dv0Y8LRB4ayqPvErhN AHowvpzDf3x3NnsvhUjUq0WtZBPWWM0j4KX7dKT4CTLCOBE3HJFo7SFjHo/FDT3w jd5zpRmeHCDmP5dCafuiA89VPtphXhk8XS6+HAnu82VxKsD8AvIXiiAoIs9VoayN PgTB1/avrAL79pc0GcGJ1Ml8BdHeZ/AGqKwjio/x1FXXJtaaOqRaF10DibHBoV/Z 0OCOnPPrJoRi4hNjymGHuARjiX+N+eAVAqGwzEklVg44TPV8E7iZ827hJEd3GQRL PZbp4yYV9RUMF2qKfui65gq8Of0mzVRp8Is+mldEygQdD4YSBY5AZNaWWc1U3tTP h+++2b7GdTcQOKK1kVI0zm4E+Y1LE746fFQ6oi5bfpaHTX/kFO2+NAgo3Eg+g02A FYATANaM9y2nVvOi5W5fTGA/DEwIW9/Qa2DT1zgGpnhrj/MBJdhPNwPi/EWtCr6E sLmP61mVEq0M//7M6Qze0bOnXq+e7iBZ4qI1z/m+jjRFk/98cMw= =YXpU -----END PGP SIGNATURE----- --=-LOVYPtJsCtxCBc0Rg6aH-- From nobody Tue Nov 12 08:12:13 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XnfKF01Qtz5bgMN; Tue, 12 Nov 2024 08:12:17 +0000 (UTC) (envelope-from SRS0=Rfen=SH=klop.ws=ronald-lists@realworks.nl) Received: from smtp-relay-int.realworks.nl (smtp-relay-int.realworks.nl [194.109.157.24]) (using TLSv1.3 with cipher TLS_AES_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 4XnfKD4yy1z4hvp; Tue, 12 Nov 2024 08:12:16 +0000 (UTC) (envelope-from SRS0=Rfen=SH=klop.ws=ronald-lists@realworks.nl) Authentication-Results: mx1.freebsd.org; none Date: Tue, 12 Nov 2024 09:12:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=klop.ws; s=rw2; t=1731399133; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=kx3DNU+eeVoLKXI5wJzKv+g/FYf1ymXshm31iuvtRT0=; b=To0xRrJHUsxrQfozAKMNsgXuZM47rB4AFjJHGl4eM9ZiSCzYnPrSSsx0C6KSL0ghjUoOnF rOM03OBO0XdA01We84r/iEZg79YL1c7WmsQnS5AuZAYVfmIZ6cG2EJgNA7Z7Hcpt4DwLKA SBCV9j5AAzUtDEPSnPLnf4aU+lliDQYJ9WE/yC6Ygo5hzOQAvFyIMidNS8l/CHMX/80qOQ QMdsMMIomK38lQ1Sq0LqTJ9lKYQVoOgo/V3SkxrzxknAHF00xqk6A9xAlC4HTd5pprWCkX 48xJwUOy59Xrk/Qm7AVHrFPiKfQaR/4BjBmK8Fk7tNkaTAxZLsbAYo0sGPGKhQ== From: Ronald Klop To: Mark Johnston Cc: dev-commits-src-all@FreeBSD.org, src-committers@FreeBSD.org, dev-commits-src-main@FreeBSD.org Message-ID: <705420107.1610.1731399133226@localhost> In-Reply-To: <202411120201.4AC21wNW023064@gitrepo.freebsd.org> References: <202411120201.4AC21wNW023064@gitrepo.freebsd.org> Subject: Re: git: 195402c5c5b7 - main - busdma_bounce: Replace a SYSINIT with static initializations List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1609_384912247.1731399133058" X-Mailer: Realworks (727.78) Importance: Normal X-Priority: 3 (Normal) X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:3265, ipnet:194.109.0.0/16, country:NL] X-Rspamd-Queue-Id: 4XnfKD4yy1z4hvp X-Spamd-Bar: ---- ------=_Part_1609_384912247.1731399133058 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Out of curiosity, what is the "why" of this commit? Regards, Ronald. Van: Mark Johnston Datum: dinsdag, 12 november 2024 03:01 Aan: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Onderwerp: git: 195402c5c5b7 - main - busdma_bounce: Replace a SYSINIT with static initializations > > The branch main has been updated by markj: > > URL: https://cgit.FreeBSD.org/src/commit/?id=195402c5c5b7b3236c0680f06b60b7f9465982c8 > > commit 195402c5c5b7b3236c0680f06b60b7f9465982c8 > Author: Mark Johnston > AuthorDate: 2024-11-12 01:57:35 +0000 > Commit: Mark Johnston > CommitDate: 2024-11-12 01:57:35 +0000 > > busdma_bounce: Replace a SYSINIT with static initializations > > No functional change intended. > > MFC after: 1 week > --- > sys/kern/subr_busdma_bounce.c | 18 +++++------------- > 1 file changed, 5 insertions(+), 13 deletions(-) > > diff --git a/sys/kern/subr_busdma_bounce.c b/sys/kern/subr_busdma_bounce.c > index a27bc423c23a..60fe2fc6b2a6 100644 > --- a/sys/kern/subr_busdma_bounce.c > +++ b/sys/kern/subr_busdma_bounce.c > @@ -86,11 +86,14 @@ struct bounce_zone { > }; > > static struct mtx bounce_lock; > +MTX_SYSINIT(bounce_lock, &bounce_lock, "bounce pages lock", MTX_DEF); > static int total_bpages; > static int busdma_zonecount; > > -static STAILQ_HEAD(, bounce_zone) bounce_zone_list; > -static STAILQ_HEAD(, bus_dmamap) bounce_map_callbacklist; > +static STAILQ_HEAD(, bounce_zone) bounce_zone_list = > + STAILQ_HEAD_INITIALIZER(bounce_zone_list); > +static STAILQ_HEAD(, bus_dmamap) bounce_map_callbacklist = > + STAILQ_HEAD_INITIALIZER(bounce_map_callbacklist); > > static MALLOC_DEFINE(M_BOUNCE, "bounce", "busdma bounce pages"); > > @@ -130,17 +133,6 @@ _bus_dmamap_reserve_pages(bus_dma_tag_t dmat, bus_dmamap_t map, int flags) > return (0); > } > > -static void > -init_bounce_pages(void *dummy __unused) > -{ > - > - total_bpages = 0; > - STAILQ_INIT(&bounce_zone_list); > - STAILQ_INIT(&bounce_map_callbacklist); > - mtx_init(&bounce_lock, "bounce pages lock", NULL, MTX_DEF); > -} > -SYSINIT(bpages, SI_SUB_LOCK, SI_ORDER_ANY, init_bounce_pages, NULL); > - > static struct sysctl_ctx_list * > busdma_sysctl_tree(struct bounce_zone *bz) > { > > > > ------=_Part_1609_384912247.1731399133058 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit Out of curiosity, what is the "why" of this commit?

Regards,
Ronald.

 

Van: Mark Johnston <markj@FreeBSD.org>
Datum: dinsdag, 12 november 2024 03:01
Aan: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Onderwerp: git: 195402c5c5b7 - main - busdma_bounce: Replace a SYSINIT with static initializations

The branch main has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=195402c5c5b7b3236c0680f06b60b7f9465982c8

commit 195402c5c5b7b3236c0680f06b60b7f9465982c8
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2024-11-12 01:57:35 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-11-12 01:57:35 +0000

    busdma_bounce: Replace a SYSINIT with static initializations
    
    No functional change intended.
    
    MFC after:      1 week
---
 sys/kern/subr_busdma_bounce.c | 18 +++++-------------
 1 file changed, 5 insertions(+), 13 deletions(-)

diff --git a/sys/kern/subr_busdma_bounce.c b/sys/kern/subr_busdma_bounce.c
index a27bc423c23a..60fe2fc6b2a6 100644
--- a/sys/kern/subr_busdma_bounce.c
+++ b/sys/kern/subr_busdma_bounce.c
@@ -86,11 +86,14 @@ struct bounce_zone {
 };
 
 static struct mtx bounce_lock;
+MTX_SYSINIT(bounce_lock, &bounce_lock, "bounce pages lock", MTX_DEF);
 static int total_bpages;
 static int busdma_zonecount;
 
-static STAILQ_HEAD(, bounce_zone) bounce_zone_list;
-static STAILQ_HEAD(, bus_dmamap) bounce_map_callbacklist;
+static STAILQ_HEAD(, bounce_zone) bounce_zone_list =
+    STAILQ_HEAD_INITIALIZER(bounce_zone_list);
+static STAILQ_HEAD(, bus_dmamap) bounce_map_callbacklist =
+    STAILQ_HEAD_INITIALIZER(bounce_map_callbacklist);
 
 static MALLOC_DEFINE(M_BOUNCE, "bounce", "busdma bounce pages");
 
@@ -130,17 +133,6 @@ _bus_dmamap_reserve_pages(bus_dma_tag_t dmat, bus_dmamap_t map, int flags)
    return (0);
 }
 
-static void
-init_bounce_pages(void *dummy __unused)
-{
-
-   total_bpages = 0;
-   STAILQ_INIT(&bounce_zone_list);
-   STAILQ_INIT(&bounce_map_callbacklist);
-   mtx_init(&bounce_lock, "bounce pages lock", NULL, MTX_DEF);
-}
-SYSINIT(bpages, SI_SUB_LOCK, SI_ORDER_ANY, init_bounce_pages, NULL);
-
 static struct sysctl_ctx_list *
 busdma_sysctl_tree(struct bounce_zone *bz)
 {
 


  ------=_Part_1609_384912247.1731399133058-- From nobody Tue Nov 12 13:41:24 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xnnd03HcPz5cYRl; Tue, 12 Nov 2024 13:41: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xnnd02rKsz4Gfx; Tue, 12 Nov 2024 13:41:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731418884; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8FiGcLYYg5rNMjIX+MxIRudp7CQ1zTY/dQpSC4X/2q0=; b=Owgta4Yg4BisktAy7+VDt/0m44loJRD+UU8lhm0UidwSSpXQ5zE8cYBlwWiqpNd2Rb72zL OK/AokdQdptH9THj+lvaxsO0aFRJfgMVS2vRU0d5rrMBhskxs+6RkCy8tgvaIYKHNvEIZl 5VDDqkX8X2mfvPmBH80vcWHEAefyKyyqUNVYvZKm2HHuUTuCtkt51/90X3SkNLE4dhLCVl LtbkWqjikRb1lvW1vb3S1iDukrOHwoMsv0Nyk3oCh37tXoAJ2NFa0X4dKt1jfjkhQPEkqM 8nbHTz/UeTEy45S3znisVMsxxBg9XrUvPj5m9FdV5TDq7YNPHjxda0UJ+w+uRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731418884; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8FiGcLYYg5rNMjIX+MxIRudp7CQ1zTY/dQpSC4X/2q0=; b=AGE7E8G433G9y9h7yl0dZNySHW/vqPo9Z1nVd25pKAgmSMwpSA1DGAqPj49l8D6RgHdKOl nqOuH3RoHkhFjgIvEORos+4vxg7tdzGpJjztSovgtupez6fwIVcV7o2f45NGTh2mlq8s6y iQO/JxTeVRhtw/vneRIkg8dN8qEulwWHZh+Zn62MT9s+O/T5uYC9C/kx5uxdPEdR+gzgeC eJgfwKwkLz6+0jT7bSOlBef732Lb4h/RkgNreHXCfrqnjcyOB9DxPxx425myqzJ75Fe2Bg DSTvCzowqI+p4nrOHs7ExQ928u0u9qB26ParaAh9DGVGw0BcvtgmiQ8oF7WZFA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731418884; a=rsa-sha256; cv=none; b=N9D0Jx2Avt+lYPgmnzOEbLPQSyXaV1CPbr+64mlFKACPFWFU4h0YzqQ0fcN+Qk1ACCnYt2 PMw1wDVgKmWlMDov9wtWUgNoWFuQ1fZXNspiMGnz9ejE1H8tKIBjHLFVIf2sLPXYnvP+kl PulEkKV04jEM+kwVElaWBck9W0CIwwhsQQYiyFf5FuQxem4oUxlQ55EVeyeTgLzl2YhgXc p8QT8gxwBjfcqMHkyrvaZP47MKpMPMRvAV1Hjo/Qe3iI6BwgJoYAjA8WC+rKxGg0v3ir+d LkwfxDaj+6JrLbRxaEiOTNtrruZZIKjwkwXHwNTrQA8dGQT1u8X541GHlr8tUQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xnnd028dHz1Bcb; Tue, 12 Nov 2024 13:41:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ACDfOp2017728; Tue, 12 Nov 2024 13:41:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ACDfO6a017725; Tue, 12 Nov 2024 13:41:24 GMT (envelope-from git) Date: Tue, 12 Nov 2024 13:41:24 GMT Message-Id: <202411121341.4ACDfO6a017725@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 094a5146dff4 - stable/14 - freebsd-update: refuse to operate on a pkgbase system List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 094a5146dff465622640cd2ec40a13451a0e6598 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=094a5146dff465622640cd2ec40a13451a0e6598 commit 094a5146dff465622640cd2ec40a13451a0e6598 Author: Ed Maste AuthorDate: 2024-10-30 19:15:13 +0000 Commit: Ed Maste CommitDate: 2024-11-12 13:40:05 +0000 freebsd-update: refuse to operate on a pkgbase system FreeBSD-update is not compatible with packaged base. PR: 282252 Reviewed by: bapt, markj (earlier) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D47341 (cherry picked from commit cf1aba2857c1ec59c9a34d363cb18a61ffa34a10) freebsd-update: improve pkgbase check The previous version used a case-insensitive match (default for -x). The presence of packages like freebsd-git-devtools and freebsd-ftpd would falsely trigger the packaged base check. Instead, just use `pkg which /usr/bin/uname` as a packaged base indication. pkg uses /usr/bin/uname to determine ABI, so we can rely on it existing. If it comes from a package then packaged base is in use. Also, extend the check to all freebsd-update commands. It is easier to just disallow all commands, and easier to test. Reported by: Mark Millard Reviewed by: manu Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D47378 (cherry picked from commit 856e158dc4aa5e43f0f15fcd3089fc0d71861b0e) --- usr.sbin/freebsd-update/freebsd-update.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh index 77b12a3756c2..f575f89bcf82 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -1046,6 +1046,26 @@ IDS_check_params () { fetch_setup_verboselevel } +# Packaged base and freebsd-update are incompatible. Exit with an error if +# packaged base is in use. +check_pkgbase() +{ + # Packaged base requires that pkg is bootstrapped. + if ! pkg -c ${BASEDIR} -N >/dev/null 2>/dev/null; then + return + fi + # uname(1) is used by pkg to determine ABI, so it should exist. + # If it comes from a package then this system uses packaged base. + if ! pkg -c ${BASEDIR} which /usr/bin/uname >/dev/null; then + return + fi + cat < To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 6abc57ceb6a0 - stable/14 - libbsm: honour AU_OFLAG_NORESOLVE List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6abc57ceb6a0af92ec86d95ba3bca0c396624c90 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=6abc57ceb6a0af92ec86d95ba3bca0c396624c90 commit 6abc57ceb6a0af92ec86d95ba3bca0c396624c90 Author: Ed Maste AuthorDate: 2024-10-23 12:25:29 +0000 Commit: Ed Maste CommitDate: 2024-11-12 13:40:05 +0000 libbsm: honour AU_OFLAG_NORESOLVE AU_OFLAG_NORESOLVE is documented as "Leave user and group IDs in their numeric form" but it was not actually tested. OpenBSM pull request at https://github.com/openbsm/openbsm/pull/85 PR: 282271 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D47263 (cherry picked from commit ba10bfe509dcb5d408de89c886527035068b8f17) (cherry picked from commit 914752d0f7f874ab4fc8393aee28c22df87324f2) --- contrib/openbsm/libbsm/bsm_io.c | 4 ++-- usr.sbin/praudit/tests/input/numeric_form | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/openbsm/libbsm/bsm_io.c b/contrib/openbsm/libbsm/bsm_io.c index 4b89ccb8b59c..f0b3e4a1a2df 100644 --- a/contrib/openbsm/libbsm/bsm_io.c +++ b/contrib/openbsm/libbsm/bsm_io.c @@ -644,7 +644,7 @@ print_user(FILE *fp, u_int32_t usr, int oflags) { struct passwd *pwent; - if (oflags & AU_OFLAG_RAW) + if (oflags & (AU_OFLAG_RAW | AU_OFLAG_NORESOLVE)) fprintf(fp, "%d", usr); else { pwent = getpwuid(usr); @@ -663,7 +663,7 @@ print_group(FILE *fp, u_int32_t grp, int oflags) { struct group *grpent; - if (oflags & AU_OFLAG_RAW) + if (oflags & (AU_OFLAG_RAW | AU_OFLAG_NORESOLVE)) fprintf(fp, "%d", grp); else { grpent = getgrgid(grp); diff --git a/usr.sbin/praudit/tests/input/numeric_form b/usr.sbin/praudit/tests/input/numeric_form index 09f089450ac3..144be694f2e4 100644 --- a/usr.sbin/praudit/tests/input/numeric_form +++ b/usr.sbin/praudit/tests/input/numeric_form @@ -2,6 +2,6 @@ header,113,11,socket(2),0,Mon Jun 11 10:18:45 2018, + 380 msec argument,1,0x1c,domain argument,2,0x2,type argument,3,0x0,protocol -subject,root,root,wheel,root,wheel,7053,4724,37636,10.0.2.2 +subject,0,0,0,0,0,7053,4724,37636,10.0.2.2 return,success,3 trailer,113 From nobody Tue Nov 12 13:44:59 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xnnj76Mckz5cYk1; Tue, 12 Nov 2024 13:44:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xnnj74lqlz4Hw1; Tue, 12 Nov 2024 13:44:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731419099; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Fz2/8/jJFgO5t1LnY8ifHaVgFN9gOpd0m6Q7zLkx2UI=; b=tyq0AzdozmYzIuLj/nMQxecDt4M3LFdGdHgbxHir1WL5oxG/FHGWRszaKVP7v5d1i5P2NI 86Ks/Bh804jB2bwQ2IdU6uvJUil8ZZY5hsh9wc1VIjVDzmp+QRivBX9jMlKQnc4P/vfatd zZO0isiW/XCyOtdEdiGFONnZeBkviwN05iezauFuFmwP8JmAF74qgcChKCzUf9t4NyuYAR Q7L+wqFvs34ko5q0vChtOQnBFRTtrk7weB9DXTaZESS+XId2FsfwtUkwee4MrDLBtlENuG KYbRF2HOEwqKV7nqVreWFwheKzdc0FmIEONI4Fgy6yV8rlh2TVGc8YLxBT3z+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731419099; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Fz2/8/jJFgO5t1LnY8ifHaVgFN9gOpd0m6Q7zLkx2UI=; b=YngpkZwOCGT5nprFBTSUW3IgEwraoiqLbdBvFsPe8tlwJdaUbQ+eaU0cr5XSJReCBIczWD 6KLMPsr1llRyyB6tTPyagQ4tbYzbFdp6Vcb/EjQMGwunNth+F3uj91OiQBWUQEsByGGw6H rv9yRG25yWekbW3IL3FMN6dAgwpckFaRyixJP5isDLnKpUqQTUdeaR3W/sdbnhIUZkKDQD LVK0mYYijwW2S+s13z7WbXBUN7o+r1BHy3fRjeveOiTxLhlJcQDnt1+x/81OXPmusUsPua lesvLwfkNiiB7BE4vlkB2/TE0JmKIWJHZ6XoE1jj0paaRN6hh9yGmf5VlBEFTw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731419099; a=rsa-sha256; cv=none; b=TorVZnmzzRJHf8b7V9FxzvGSGKwLzldG7lKeJYYpTNwxSa//t1ZGtYvOdvDcVtK03iGerw Ad4tJcwdh62El23jENHgiik4vtsnvsUfn6/mM5EISw+sruOSr6zHC/dgKyAoJa7y8ELgev 8jmlFZOQyvoLbedNdBzogSeexrOjOinD/vvkpfokAxeswfOSbwpfR7bYqfKaQcyIU5A+Y4 XyMFLuHgz835p07CE/AtJC3IDLgw9JMNmto20Hvmtjn6ap/NFfEmTdZW094lOiU7svE10F 4hXeWgM/s6eLKC+1vpXENKw2DklxAfE6gTMrrOsAbMNkjR0zStdshYPaTIyuBg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xnnj71TdGz1Bd8; Tue, 12 Nov 2024 13:44:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ACDixdj025593; Tue, 12 Nov 2024 13:44:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ACDix7T025590; Tue, 12 Nov 2024 13:44:59 GMT (envelope-from git) Date: Tue, 12 Nov 2024 13:44:59 GMT Message-Id: <202411121344.4ACDix7T025590@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 92a324a151ce - stable/13 - libbsm: honour AU_OFLAG_NORESOLVE List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 92a324a151ceef49cf52d33e9e30038f6459629a Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=92a324a151ceef49cf52d33e9e30038f6459629a commit 92a324a151ceef49cf52d33e9e30038f6459629a Author: Ed Maste AuthorDate: 2024-10-23 12:25:29 +0000 Commit: Ed Maste CommitDate: 2024-11-12 13:44:47 +0000 libbsm: honour AU_OFLAG_NORESOLVE AU_OFLAG_NORESOLVE is documented as "Leave user and group IDs in their numeric form" but it was not actually tested. OpenBSM pull request at https://github.com/openbsm/openbsm/pull/85 PR: 282271 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D47263 (cherry picked from commit ba10bfe509dcb5d408de89c886527035068b8f17) (cherry picked from commit 914752d0f7f874ab4fc8393aee28c22df87324f2) (cherry picked from commit 6abc57ceb6a0af92ec86d95ba3bca0c396624c90) --- contrib/openbsm/libbsm/bsm_io.c | 4 ++-- usr.sbin/praudit/tests/input/numeric_form | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/openbsm/libbsm/bsm_io.c b/contrib/openbsm/libbsm/bsm_io.c index 4b89ccb8b59c..f0b3e4a1a2df 100644 --- a/contrib/openbsm/libbsm/bsm_io.c +++ b/contrib/openbsm/libbsm/bsm_io.c @@ -644,7 +644,7 @@ print_user(FILE *fp, u_int32_t usr, int oflags) { struct passwd *pwent; - if (oflags & AU_OFLAG_RAW) + if (oflags & (AU_OFLAG_RAW | AU_OFLAG_NORESOLVE)) fprintf(fp, "%d", usr); else { pwent = getpwuid(usr); @@ -663,7 +663,7 @@ print_group(FILE *fp, u_int32_t grp, int oflags) { struct group *grpent; - if (oflags & AU_OFLAG_RAW) + if (oflags & (AU_OFLAG_RAW | AU_OFLAG_NORESOLVE)) fprintf(fp, "%d", grp); else { grpent = getgrgid(grp); diff --git a/usr.sbin/praudit/tests/input/numeric_form b/usr.sbin/praudit/tests/input/numeric_form index 09f089450ac3..144be694f2e4 100644 --- a/usr.sbin/praudit/tests/input/numeric_form +++ b/usr.sbin/praudit/tests/input/numeric_form @@ -2,6 +2,6 @@ header,113,11,socket(2),0,Mon Jun 11 10:18:45 2018, + 380 msec argument,1,0x1c,domain argument,2,0x2,type argument,3,0x0,protocol -subject,root,root,wheel,root,wheel,7053,4724,37636,10.0.2.2 +subject,0,0,0,0,0,7053,4724,37636,10.0.2.2 return,success,3 trailer,113 From nobody Tue Nov 12 13:56:43 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xnnyr4Tr2z5cZCX; Tue, 12 Nov 2024 13:56:52 +0000 (UTC) (envelope-from zlei@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xnnyr2xkKz4Jq9; Tue, 12 Nov 2024 13:56:52 +0000 (UTC) (envelope-from zlei@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731419812; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=2RjeK5XhTQOZiZKtBsTQywhtmPvWaHJTMBn7bEjasv8=; b=ffIayFYTjpGX7eUxlBl/wvpJmgH7nEobaiLiD9+oy1Nc+hP94quxTNJsFub3aXGrxs+Q55 GOq0cAGq6BGwc0QZWk8yTTjpTjpkGeEa1aiIKX/wfPkl/Vhu/hqbzZoaGLvnfxyuhsyn1d Xu+x7Y4o2TmGVEmoOz4BbjAn/eARElOH/pl/r9nYRfX2IO08RuT2pOtD+az7pJXZ6IU/DC EEzHKHwraRwNdAotsN8cKFW98Ih3Bfh3wER0njxN61f8PerLKatXy9DC6W0/DpMNzVysUK HZBexPxgZyw0Ylk0Pn+Pzvp4oVULOrsHwBZbb++oR13d9seSn/bMo7zseFwGgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731419812; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=2RjeK5XhTQOZiZKtBsTQywhtmPvWaHJTMBn7bEjasv8=; b=bZUbyrGye8GxA/lwxmTXrPPfWI85C9f26WLrn2odSyGEX98ECv4FLLYyJy6C3a03rLXc3z W+2zvDvtv24FM0S2jvUo2wY1ppFmsB3rUuO2jJ8k/5To/86VhDJjX+mJKOKF6rMhhLfkkH n3RQkR1wCGqJvIUggEbudtxDW6AsUFm97pCPBxNg7V/Ewiu+yKxhj93w44Dc3XtmU0H66z FA9yg0AUppNuGEDw175y9lq0aWcRCimo9fiWnIlqiNj/h17pLZ9dg5JUBmGwnn+ZDXB0Br P+sjE0NhePc1qTr33O6L0WW39WeZwW1gLTHVObENo043y6iYm0gPeqxyPvHCpg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731419812; a=rsa-sha256; cv=none; b=VE/Oae8XcXZNAHO71f4h258Y1D7XfjOtIdDDgndLJzZkDZFVrmRkLIMgL3KqW4O5RdFilb XFcWwxx5Oc4lXK93K1ikT24+pBFjkbMeHRYfNiYPcqWwioEESpbqwb6qnPJFh66l+TKDf5 huLWF6W4Uc4nVNFwp6M9qg3GdzUFmBtKauxALAxBRewR6XRWEF1QMGHyC33ROUh2F/Ljdk pEmeTKSGCuwTMmoul+OF02poFAaDHHojy/7j97s5I+Hha/aCtRQWlBh2aWtnWGMXuQYxso Rsd1rCg7A7wuw2yoiPUsdFEWcfvPm4YLWmyuV7A4RyqvSJWDmn3lZYW2svrhrQ== Received: from smtpclient.apple (ns1.oxydns.net [45.32.91.63]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: zlei/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Xnnyn6DRJzhXT; Tue, 12 Nov 2024 13:56:49 +0000 (UTC) (envelope-from zlei@FreeBSD.org) From: Zhenlei Huang Message-Id: <333D66C8-12BC-43CD-B33B-B410B8B3BC22@FreeBSD.org> Content-Type: multipart/alternative; boundary="Apple-Mail=_D3B1327B-7D7C-43FD-AC3F-5C01AF6C1C6F" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.10\)) Subject: Re: git: 9e469437993b - main - inet.4: drop "experimetal use" from net0 and net240 descriptions Date: Tue, 12 Nov 2024 21:56:43 +0800 In-Reply-To: <46spnoss-r0s0-92o3-60r7-r2o49ro82580@SerrOFQ.bet> Cc: Ed Maste , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" To: "Bjoern A. Zeeb" References: <202411111247.4ABClC6l042813@gitrepo.freebsd.org> <46spnoss-r0s0-92o3-60r7-r2o49ro82580@SerrOFQ.bet> X-Mailer: Apple Mail (2.3696.120.41.1.10) --Apple-Mail=_D3B1327B-7D7C-43FD-AC3F-5C01AF6C1C6F Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Nov 12, 2024, at 3:59 AM, Bjoern A. Zeeb wrote: >=20 > On Mon, 11 Nov 2024, Ed Maste wrote: >=20 >> The branch main has been updated by emaste: >>=20 >> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D9e469437993bd17290d145fa7a615a68= b2257875 >>=20 >> commit 9e469437993bd17290d145fa7a615a68b2257875 >> Author: Ed Maste >> AuthorDate: 2024-11-10 15:41:02 +0000 >> Commit: Ed Maste >> CommitDate: 2024-11-11 12:46:58 +0000 >>=20 >> inet.4: drop "experimetal use" from net0 and net240 descriptions >>=20 >> The sysctls enable any use of 0/8 and 240/4, not only experimental = use. >>=20 >> Reviewed by: zlei >> Sponsored by: The FreeBSD Foundation >> Differential Revision: https://reviews.freebsd.org/D47506 >=20 >=20 > They are labeled "experimental" because they are in no way official = standard > or their use being endorsed by any accepted Internet Standards Body, >=20 > Officially vendors at this point are not supposed to support it. > The fact that most of them have a "simple switch" to turn it on but = off > by default as otherwise they would violate an RFC. Emm, while I was reviewing this change, I also wondered if it is too = early to remove the word *experimental* as the RFC is still in draft = status. Well later I think ( maybe I'm wrong ) RFC actually lag behind = the reality ( I'm saying FreeBSD as a vendor and move fast action ) so I = think it is OK to remove now. >=20 > I would really prefer this to be backed out until an RFC is published = or > IANA decided to re-assign the (use of the) netblock for any > official/private use. No objection. >=20 >=20 > I was fine with the original implementation if the default didn't = change > the status quo given it's experimental nature. >=20 > I'll follow-up on that in the other review. >=20 >> --- >> share/man/man4/inet.4 | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >>=20 >> diff --git a/share/man/man4/inet.4 b/share/man/man4/inet.4 >> index a12dec49caea..c9267558d6f3 100644 >> --- a/share/man/man4/inet.4 >> +++ b/share/man/man4/inet.4 >> @@ -169,10 +169,10 @@ The following general variables are defined: >> .It Va accept_sourceroute >> Boolean: enable/disable accepting of source-routed IP packets = (default false). >> .It Va allow_net0 >> -Boolean: allow experimental use of addresses in 0.0.0.0/8 as = endpoints, >> +Boolean: allow use of addresses in 0.0.0.0/8 as endpoints, >> and allow forwarding of packets with these addresses. >> .It Va allow_net240 >> -Boolean: allow experimental use of addresses in 240.0.0.0/4 as = endpoints, >> +Boolean: allow use of addresses in 240.0.0.0/4 as endpoints, >> and allow forwarding of packets with these addresses. >> .It Va curfrags >> Integer: Current number of IPv4 fragments across all reassembly = queues >>=20 >=20 > --=20 > Bjoern A. Zeeb = r15:7 --Apple-Mail=_D3B1327B-7D7C-43FD-AC3F-5C01AF6C1C6F Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii

On Nov 12, 2024, at 3:59 AM, Bjoern A. Zeeb <bz@FreeBSD.org> = wrote:

On Mon, 11 Nov 2024, Ed Maste wrote:

The = branch main has been updated by emaste:

URL: = https://cgit.FreeBSD.org/src/commit/?id=3D9e469437993bd17290d14= 5fa7a615a68b2257875

commit = 9e469437993bd17290d145fa7a615a68b2257875
Author: =     Ed Maste <emaste@FreeBSD.org>
AuthorDate: = 2024-11-10 15:41:02 +0000
Commit: =     Ed Maste <emaste@FreeBSD.org>
CommitDate: = 2024-11-11 12:46:58 +0000

  inet.4:= drop "experimetal use" from net0 and net240 descriptions

  The sysctls enable any use of 0/8 = and 240/4, not only experimental use.

  Reviewed by:    zlei
  Sponsored by:   The FreeBSD = Foundation
  Differential Revision: https://reviews.freebsd.org/D47506


They are labeled "experimental" because they are in no way = official standard
or their use being endorsed by any accepted Internet = Standards Body,

Officially vendors at this point are not supposed to support = it.
The fact that = most of them have a "simple switch" to turn it on but off
by default as = otherwise they would violate an RFC.

Emm, while I was reviewing this change, I also = wondered if it is too early to remove the word *experimental* as the RFC = is still in draft status. Well later I think ( maybe I'm wrong ) RFC = actually lag behind the reality ( I'm saying FreeBSD as a vendor and = move fast action ) so I think it is OK to remove = now.


I would = really prefer this to be backed out until an RFC is published = or
IANA decided = to re-assign the (use of the) netblock for any
official/private use.

No objection.



I was fine = with the original implementation if the default didn't change
the status = quo given it's experimental nature.

I'll follow-up on that in the other review.

---
share/man/man4/inet.4 | 4 ++--
1 file changed, = 2 insertions(+), 2 deletions(-)

diff --git = a/share/man/man4/inet.4 b/share/man/man4/inet.4
index = a12dec49caea..c9267558d6f3 100644
--- = a/share/man/man4/inet.4
+++ b/share/man/man4/inet.4
@@ -169,10 +169,10 @@ The following general variables are = defined:
.It Va accept_sourceroute
Boolean: = enable/disable accepting of source-routed IP packets (default false).
.It Va allow_net0
-Boolean: allow experimental = use of addresses in 0.0.0.0/8 as endpoints,
+Boolean: = allow use of addresses in 0.0.0.0/8 as endpoints,
and = allow forwarding of packets with these addresses.
.It Va = allow_net240
-Boolean: allow experimental use of addresses = in 240.0.0.0/4 as endpoints,
+Boolean: allow use of = addresses in 240.0.0.0/4 as endpoints,
and allow = forwarding of packets with these addresses.
.It Va = curfrags
Integer: Current number of IPv4 fragments across = all reassembly queues


-- 
Bjoern A. = Zeeb =             &n= bsp;           &nbs= p;            =             &n= bsp;  r15:7



= --Apple-Mail=_D3B1327B-7D7C-43FD-AC3F-5C01AF6C1C6F-- From nobody Tue Nov 12 14:15:27 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XnpNR3SVyz5cbhq; Tue, 12 Nov 2024 14:15:35 +0000 (UTC) (envelope-from zlei@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XnpNR2WGhz4Lnl; Tue, 12 Nov 2024 14:15:35 +0000 (UTC) (envelope-from zlei@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731420935; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=LwK3EHjOpdnR3zVj+OdEf9cEYmvNVLYWolGHeqAJ8+U=; b=L7pAmTMvkTo7Vo59eD0leUhNeAV7m9tQJic0RfWEX8yQ/BcRpCgvkrfZakTrP7A+PE8+uo uA+dcbIgYbkpnnNJNsAO2Nr5eWGb0KbolXphEgB9RtVqxSb482uyGqZww6xeAB4iuhjC4S nCBUmJ/X2TEZ2zwf404ZnR3QRp8kTQE/Q3/ViI5TpCV68JFk945x/Jn4izIuCb4Tf9AFif pyncceNtISJA//1FD7C0On2qFefHMEhmmNhpWaFDHElmVYh1ZPVO+RDdUbWgfu5GIYMOvg wgupvoM2suF56LDu2zcQW3MKBw94oatwtpLETVJ+F5PEC7NYD/Np+bNLrNFUmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731420935; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=LwK3EHjOpdnR3zVj+OdEf9cEYmvNVLYWolGHeqAJ8+U=; b=PIv0u/hOYcZLfdBpV/D9db0xTZlXwcjCFrzYYEuSnnDt/63ku9F1A7lXQDP7+osJI60grO wXU+TwBZkzyCqHnkBh207BnXHFq0zbgguOy/Oj+vXp2HtjJCuOTTVJGSaO1IxdGTTrgKLj sBZ3I/huEFqPBaiLv1clgvodMUwT+D7gPIthi4mYnCTFlL+hIS+O+vwv5xnNIW/3gMtJgR S2z1Rpq6bwcmoi4JnmmaGASxDN+QRBzo/7MVkLiMi4kn3jN9mxCqsJB3QSlJ1s/aCoULsQ pmzh9SKnB/n0U8WmYIATSs60KH2rMnlYqJYYBPTg09LIWyzP6w9bRRCbszXfnw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731420935; a=rsa-sha256; cv=none; b=A7WV10rlQP3WhLXH3EJ01JKpQaWHCd51PEmNW1LFrU45Wr207pjvHuJwEeC1y4flTHmgaj W8WWaPn4xfajQy4P898nItL4XkZEYoRcO5f/Sfaf/tbMEKRWfaWbQ82KjRmu2hf4PTKkLh slQnw45qA2QvrjEhBhdAhUbYgB+As885OoVaGrOaKnplDCFZboepUgTc4KKSNvZpWqsoKF aWUujB1WqLC9LdFDNdhKxmNG56cEeZvPMH3XvleRmm5vk3DQ9kCHq+yGSkgrgw/ELBji6W f8PSGGKllJRnGGwTbIEib9K/+5E+LNdOECHOHRpAB3vX3znS2qdVk/GLEwd7vQ== Received: from smtpclient.apple (ns1.oxydns.net [45.32.91.63]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: zlei/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4XnpNN4PN0zhXb; Tue, 12 Nov 2024 14:15:32 +0000 (UTC) (envelope-from zlei@FreeBSD.org) From: Zhenlei Huang Message-Id: Content-Type: multipart/alternative; boundary="Apple-Mail=_0935611B-2776-4BFF-8EB5-D242FA2618BD" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.10\)) Subject: Re: git: 349d1366edd2 - main - socket: Export the FIB number of sockets Date: Tue, 12 Nov 2024 22:15:27 +0800 In-Reply-To: Cc: Mark Johnston , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org To: Gleb Smirnoff References: <202411041456.4A4EuXKm059669@gitrepo.freebsd.org> X-Mailer: Apple Mail (2.3696.120.41.1.10) --Apple-Mail=_0935611B-2776-4BFF-8EB5-D242FA2618BD Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Nov 12, 2024, at 8:56 AM, Gleb Smirnoff = wrote: >=20 > On Mon, Nov 04, 2024 at 02:56:33PM +0000, Mark Johnston wrote: > M> diff --git a/sys/sys/socketvar.h b/sys/sys/socketvar.h > M> index 40464f555816..fda8d23f5649 100644 > M> --- a/sys/sys/socketvar.h > M> +++ b/sys/sys/socketvar.h > M> @@ -615,7 +615,8 @@ struct xsocket { > M> uint32_t so_qlimit; > M> pid_t so_pgid; > M> uid_t so_uid; > M> - int32_t so_spare32[8]; > M> + int32_t so_fibnum; > M> + int32_t so_spare32[7]; > M> int16_t so_type; > M> int16_t so_options; > M> int16_t so_linger; >=20 > I would suggest not to spend the spares in the main branch. > So this commit should add the field, keeping 8 spares. But > the merge to stable/14 should use a spare. >=20 > Otherwise we eventually will run out of spares in main > and also nearly run out of spares in some stable/22 branch. >=20 > I'd suggest to follow the policy of not spending spares > in the main branch for all structures, not just xsocket. IIUC, those spares are reserved for **future** new features while keep = API / ABI compatibility. If we lack spares, or in a foresee future we will lack then we should = reserve large quantity of spares. If we happen to run out of them, then no choices but we have to break = the API / ABI compatibility, then this should be done in CURRENT. Right now there are still 7 spares not used, and I guess it is not = urgent to add extra spares. Please correct me if wrong. Best regards, Zhenlei >=20 > --=20 > Gleb Smirnoff --Apple-Mail=_0935611B-2776-4BFF-8EB5-D242FA2618BD Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii

On Nov 12, 2024, at 8:56 AM, Gleb Smirnoff <glebius@freebsd.org>= wrote:

On Mon, Nov 04, 2024 at 02:56:33PM +0000, Mark Johnston = wrote:
M> diff --git a/sys/sys/socketvar.h = b/sys/sys/socketvar.h
M> index = 40464f555816..fda8d23f5649 100644
M> --- = a/sys/sys/socketvar.h
M> +++ b/sys/sys/socketvar.h
M> @@ -615,7 +615,8 @@ struct xsocket {
M> =   = uint32_t = so_qlimit;
M>   pid_t so_pgid;
M> =   = uid_t = = so_uid;
M> - int32_t = so_spare32[8];
M> + int32_t = so_fibnum;
M> + int32_t = so_spare32[7];
M>   = int16_t = = so_type;
M>   int16_t = so_options;
M>   = int16_t = = so_linger;

I would suggest not to = spend the spares in the main branch.
So this commit should = add the field, keeping 8 spares. But
the merge to = stable/14 should use a spare.

Otherwise we = eventually will run out of spares in main
and also nearly = run out of spares in some stable/22 branch.

I'd suggest to follow the policy of not spending spares
in the main branch for all structures, not just xsocket.

IIUC, = those spares are reserved for **future** new features while keep API / = ABI compatibility.

If we = lack spares, or in a foresee future we will lack then we = should reserve large quantity of spares.

If we happen to run out of them, then = no choices but we have to break the API / ABI compatibility, then this should
be = done in CURRENT.

Right = now there are still 7 spares not used, and I guess it is not urgent to = add extra spares.

Please = correct me if wrong.

Best regards,
Zhenlei


--
Gleb Smirnoff



= --Apple-Mail=_0935611B-2776-4BFF-8EB5-D242FA2618BD-- From nobody Tue Nov 12 14:29:17 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XnphK2llGz5ccKg; Tue, 12 Nov 2024 14:29:21 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qk1-x730.google.com (mail-qk1-x730.google.com [IPv6:2607:f8b0:4864:20::730]) (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 4XnphK13kNz4NLC; Tue, 12 Nov 2024 14:29:21 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qk1-x730.google.com with SMTP id af79cd13be357-7b14f3927ddso396611185a.3; Tue, 12 Nov 2024 06:29:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731421760; x=1732026560; darn=freebsd.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=sXs/JayoG7dMdCaT4xdwxGJgBk0lQTbZ7C2yuLqPUaU=; b=lLhhXy2xESw560amYSAtInhE+W1WDvX9K1XDDnVtJ2h1rjSDKqV/jCuggRSOlrSrvJ 3b0hhmpJbI5F7wMRxX00LvCmmViLrrTBAbiG8C3E7YrfNSFfJXVCm59zJHl1mgy7Su5s JayyGITx5aqyccCnGm0DVuwz+Nzka9Tt8OZ73TBuTeicRrxnDJ3tuMjMA5vIn6vDso9J 8sg7AYtrHc7DmBZDGff2DgeQT5faWJqU3Rp60RTQPoJnpkWhnGJ/4FGyxd9pgL9p8WT7 di5ieh7QMFzK8sNiz2kBkZzM4J5rRi3Lc/F/HOTcdYQ7MZ++kUZ77OREEiGyGJspnTEG 8VMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731421760; x=1732026560; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sXs/JayoG7dMdCaT4xdwxGJgBk0lQTbZ7C2yuLqPUaU=; b=RuzY1F6P+Db+ebQeI4lGrWWDiknAlYR/8x7d53yUm92Fe1j+bNSTXPmjAAmgK0vhix NAzaTcJL7Ig4srcNIf0l1+UsIXWEgWqx0FdV18Hm7qZgq4mbMNuZSbB4yq+ACuOeo5Og JONicoyizZwykJc2FO9kq7Kens6erfR6hQBF6QT1+l0kAv7u2L9tGYZ7BreyfmUyRLZN aLuHmTF+oeMY5HaIRHSawmvgbjz3VD15aAs9yXc9nX1OqfolIObKojwl/3mxwcodDQs+ pFMl/kFBFMKnOexusnwaaJgHKO8NMT/R98Kvi2p/yDWc20x8VBVsIf7TQG/nSJo9p/M4 aW4A== X-Forwarded-Encrypted: i=1; AJvYcCV0xHdLZ/kqu1mNqzA0iNk8ffRR4JXXPjiVYk/DyA66cm9n+2rh3CogqTJqvhlbOzkjA/pmf1fG04psu0O5iH8=@freebsd.org, AJvYcCVC/cSsb/eCNamfQ87LYmkDEX288vnQb31ETQhchXINLGv4b42HveSaHXv5Z4rXvYDLb4aBzTTPyORQo/nARR/FcYZwNw==@freebsd.org X-Gm-Message-State: AOJu0YwPjuY+uEY7jXnk22GQEC0VeZv8pUJqe//dc/3JPA1aWGgpEhAp +hE3MvZj1S4K6rbZOSgGyAP067xXn5+1IZSDD3oekwA7rXwYqWLhgHA80A== X-Google-Smtp-Source: AGHT+IGzDac9aC5TIvZk3GW3pQ9oSzbskOedMnY37ps4ixNGzB4i9EhC81yXkgmPi3mCaVz+nvG0hQ== X-Received: by 2002:a05:620a:2953:b0:7b1:48d2:f174 with SMTP id af79cd13be357-7b331ec6151mr2163145085a.34.1731421760359; Tue, 12 Nov 2024 06:29:20 -0800 (PST) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7b32ac2daa6sm593873485a.14.2024.11.12.06.29.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Nov 2024 06:29:20 -0800 (PST) Date: Tue, 12 Nov 2024 09:29:17 -0500 From: Mark Johnston To: Ronald Klop Cc: dev-commits-src-all@freebsd.org, src-committers@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 195402c5c5b7 - main - busdma_bounce: Replace a SYSINIT with static initializations Message-ID: References: <202411120201.4AC21wNW023064@gitrepo.freebsd.org> <705420107.1610.1731399133226@localhost> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <705420107.1610.1731399133226@localhost> X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4XnphK13kNz4NLC X-Spamd-Bar: ---- On Tue, Nov 12, 2024 at 09:12:13AM +0100, Ronald Klop wrote: > Out of curiosity, what is the "why" of this commit? Just to remove unneeded code. All of the required initialization can be done using static definitions, so I wanted to simplify the initialization a bit ahead of https://reviews.freebsd.org/D47521 > Van: Mark Johnston > Datum: dinsdag, 12 november 2024 03:01 > Aan: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org > Onderwerp: git: 195402c5c5b7 - main - busdma_bounce: Replace a SYSINIT with static initializations > > > > The branch main has been updated by markj: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=195402c5c5b7b3236c0680f06b60b7f9465982c8 > > > > commit 195402c5c5b7b3236c0680f06b60b7f9465982c8 > > Author: Mark Johnston > > AuthorDate: 2024-11-12 01:57:35 +0000 > > Commit: Mark Johnston > > CommitDate: 2024-11-12 01:57:35 +0000 > > > > busdma_bounce: Replace a SYSINIT with static initializations > > No functional change intended. > > MFC after: 1 week > > --- > > sys/kern/subr_busdma_bounce.c | 18 +++++------------- > > 1 file changed, 5 insertions(+), 13 deletions(-) > > > > diff --git a/sys/kern/subr_busdma_bounce.c b/sys/kern/subr_busdma_bounce.c > > index a27bc423c23a..60fe2fc6b2a6 100644 > > --- a/sys/kern/subr_busdma_bounce.c > > +++ b/sys/kern/subr_busdma_bounce.c > > @@ -86,11 +86,14 @@ struct bounce_zone { > > }; > > static struct mtx bounce_lock; > > +MTX_SYSINIT(bounce_lock, &bounce_lock, "bounce pages lock", MTX_DEF); > > static int total_bpages; > > static int busdma_zonecount; > > -static STAILQ_HEAD(, bounce_zone) bounce_zone_list; > > -static STAILQ_HEAD(, bus_dmamap) bounce_map_callbacklist; > > +static STAILQ_HEAD(, bounce_zone) bounce_zone_list = > > + STAILQ_HEAD_INITIALIZER(bounce_zone_list); > > +static STAILQ_HEAD(, bus_dmamap) bounce_map_callbacklist = > > + STAILQ_HEAD_INITIALIZER(bounce_map_callbacklist); > > static MALLOC_DEFINE(M_BOUNCE, "bounce", "busdma bounce pages"); > > @@ -130,17 +133,6 @@ _bus_dmamap_reserve_pages(bus_dma_tag_t dmat, bus_dmamap_t map, int flags) > > return (0); > > } > > -static void > > -init_bounce_pages(void *dummy __unused) > > -{ > > - > > - total_bpages = 0; > > - STAILQ_INIT(&bounce_zone_list); > > - STAILQ_INIT(&bounce_map_callbacklist); > > - mtx_init(&bounce_lock, "bounce pages lock", NULL, MTX_DEF); > > -} > > -SYSINIT(bpages, SI_SUB_LOCK, SI_ORDER_ANY, init_bounce_pages, NULL); > > - > > static struct sysctl_ctx_list * > > busdma_sysctl_tree(struct bounce_zone *bz) > > { > > > > > > > > From nobody Tue Nov 12 14:49:36 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xnq7h3qJXz5cdJq; Tue, 12 Nov 2024 14:49: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xnq7h3B8mz4PwP; Tue, 12 Nov 2024 14:49:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731422976; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qHMM2xQ76izSg/rcFRfPvAlzu15QumnFsKaLm4ngm94=; b=uoPGYdAoqrauORIiCwiLFYCsi9EGImrVYzJ0TVs+6tga4iO+uvyNRWyG9ZRAezjI/kBKYU 8UZtBaWym7zK07IbUmY7buAyGQaR+Or2JHHQvlChHQ9H9Htgu3a02eM/RD8O6wXTCSIEcw FoNnTU6pk+yi0nTB96Xg+/o++6W3toKhyaDWuRzRyRteqDrQaSMwt4/hieUj4q8gyu1Nzi Y0E0n6eyGT69JCopkpERY6l0aUnSy1Nab5eiPeUuEkmQ1SL00n77UntlaspGHR8tn5n7hk EQNKCRqzFrrMeYoR2hqI3u7j8X1H5zJc0R68WsJixm283ueElXJ/SY1hC8/X5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731422976; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qHMM2xQ76izSg/rcFRfPvAlzu15QumnFsKaLm4ngm94=; b=OACgQFZq+nd8ht8bbXukHiIyzPR6R5kN2evTxfuPeeDCOgZPU4cfojw/uMu2Af+cwH4Xo8 zjnV0HvgRJ2Vjm9ajBV8sifEvqRQ+1cfun7JZzDY9bVwfa6wGajNBlSFF94c9JWPAAMZ2H GdgxjcaafS4lv42N4eN6qZAk/fwaM2R3AlvyhRJoer16ZUDi7019zzMCp4f2vb6Q2Wg68N 0TSO+joFxAtPqIsMK/835I6rR+QD0xLwhq8E4s+Gsw8wsh6nDyEc8rWY6JvV0J/IZdOi9g IDT2Iid9i/clkK0pl5+JKb+f51ic0wOpfuHqCxZMJl/3k89rSowNusWsAG9jxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731422976; a=rsa-sha256; cv=none; b=yOXl7VchlxdTo2fK8JXLzuJfmI865UrduII/JjMrcc2y2gyn/cZKX1pwkCa7Wvu8dFZ4xE InglTSNpOJZYQ2Qcz2IAgpikmW5CT5H2P+P2vlo4apC6BgZvNdV3Wnor2S98N1gRLlJg1D ES7YlLhPRVWawsgTTPopxfV2v9jSP1mkPab9uY9p7PaK5d5KnKa6cwOcfBgCDugTmsgp9M mZpIu78II6NwN0vNKlZvND0ybD5oMqrIqr/30qaotyrps+kBdnGnB7yiBwLshChbnBd6Ii aVR5psm3m/vobS28N/7jF9paI9iE6JQ5wREtkU9ax8drOtJ1BNrM5BrGPz5n6g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xnq7h2pbXzDvT; Tue, 12 Nov 2024 14:49:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ACEnahf037802; Tue, 12 Nov 2024 14:49:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ACEna4t037799; Tue, 12 Nov 2024 14:49:36 GMT (envelope-from git) Date: Tue, 12 Nov 2024 14:49:36 GMT Message-Id: <202411121449.4ACEna4t037799@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: f9f470f72c87 - main - ifnet(9): Document the IFF_PALLMULTI flag List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f9f470f72c8718c3503874791d593997c3d751b4 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=f9f470f72c8718c3503874791d593997c3d751b4 commit f9f470f72c8718c3503874791d593997c3d751b4 Author: Zhenlei Huang AuthorDate: 2024-11-12 14:47:45 +0000 Commit: Zhenlei Huang CommitDate: 2024-11-12 14:47:45 +0000 ifnet(9): Document the IFF_PALLMULTI flag It was introduced by the recent commit [1]. 1. 58f194223ab8 ifnet: Add handling for toggling IFF_ALLMULTI in ifhwioctl() Reviewed by: markj MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D47511 --- share/man/man9/ifnet.9 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/share/man/man9/ifnet.9 b/share/man/man9/ifnet.9 index 41cbfd8dad42..69804a754b3a 100644 --- a/share/man/man9/ifnet.9 +++ b/share/man/man9/ifnet.9 @@ -26,7 +26,7 @@ .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 24, 2022 +.Dd Nov 12, 2024 .Dt IFNET 9 .Os .Sh NAME @@ -608,6 +608,10 @@ This interface is in the permanently promiscuous mode (implies .It Dv IFF_ALLMULTI .Aq D* This interface is in all-multicasts mode (used by multicast routers). +.It Dv IFF_PALLMULTI +.Aq D +This interface is in the permanently all-multicasts mode (implies +.Dv IFF_ALLMULTI) . .It Dv IFF_DRV_OACTIVE .Aq D* The interface's hardware output queue (if any) is full; output packets From nobody Tue Nov 12 15:05:43 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XnqVM4xRdz5cfTL; Tue, 12 Nov 2024 15:05:47 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qk1-x732.google.com (mail-qk1-x732.google.com [IPv6:2607:f8b0:4864:20::732]) (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 4XnqVL75MWz4QwC; Tue, 12 Nov 2024 15:05:46 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qk1-x732.google.com with SMTP id af79cd13be357-7b13bf566c0so342409185a.3; Tue, 12 Nov 2024 07:05:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731423946; x=1732028746; darn=freebsd.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=qEAcFMlBhiS6EFchhHhQXMFiDVZ8LxwyYas3DWHa0Ys=; b=SWsRK2dUqh8RqJkVgPfktDrpBnbXRFq3BA+gFCKxxtAKdevOT/APnnMlKGxv3RvSO9 esM7VC4M0CZWs0BH3Wy+uQkXIQ48tP5AEhB5+VEqXEnajMBdeuWOrysTymkjMe+zVpWJ AiBR5iRZqKglTePAxajZ+xD6LZmcVsKX6qvr4qNQgy1tH9B80Qt5ulK9v/GAH/gYuaUE LnKnOUWAdcsZkHaoj4Vy7wAb+T4Ju7pGa7G01rig4CHJpGfPs1F6DH4lrfsy+DHzIejz bsj6qvsMuJpgwl8zl5S8v0qCe8a4MUHv/IiTk905zOoWqVAm4kkuLh96QJwxUr1Xcvde l0aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731423946; x=1732028746; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qEAcFMlBhiS6EFchhHhQXMFiDVZ8LxwyYas3DWHa0Ys=; b=IBTEY8QRjKDRWU2iYaZp8TYT1DfBtxdtuPwFlWhSmGQYYes+yuIVc6rqd1AlhpNnZt ozwLtLt2S86kE1DcaxCgh/nZGC7VtMxeg+nMkOMksFziwx1LwnW9ctztHtF3X5lsW6Yz HaXNs6+NjGMibbKWqnefkaUF+EcuWP0OqqmGlUoh4rlfUEDYWEyhsUMhCWQ7CpPqeZwk IDYZ+/h6MvPr4CgL7BfQz41CVFKvMeVaHrPDVSuP2/7TQWcp96q6+JlyEaVrWdvqoDck OclDP5n+JmdZBYzK1pUAPh99nYZxaJO9jWAvqrYnVtKvKa8lxLxLFwMqM62jO1IMLl/g WSmg== X-Forwarded-Encrypted: i=1; AJvYcCWHiJV9kEd3fiMWFtkxSzB/t5j4KYCS7fog7wrLeEuRzJum9MbGEc3YxqS3oKRmeX2wkxuXNU6WDWoN3gq36kni5FyY@freebsd.org, AJvYcCXXeEkWyN2pfz5TiR1R3R4rcVbnExMB4HReh47ZtbM4d0CC3Z9PzVFrixvYECOdSOwkI3d1acbrdf57uM47ZXMVzeE9azo=@freebsd.org X-Gm-Message-State: AOJu0YxAK6YOgRA/zpEA5f5qhRiynn8WpPXT2us+4IPGNTz4NTS2gEPG pFw11MBfeJyyOgbTDAwjPaSPEn/O4ceEQH+TM9lAOifjQnAYWzXDGUtxiw== X-Google-Smtp-Source: AGHT+IGI1OWlHYumFlF8n5RMLwqOYl9a+XMieCyMfiRVaV31H5CO0pzDCssk6tYFx5h+GL25rdCW0w== X-Received: by 2002:a05:620a:4712:b0:7b1:45be:2e89 with SMTP id af79cd13be357-7b34bb175c5mr318985185a.17.1731423945787; Tue, 12 Nov 2024 07:05:45 -0800 (PST) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7b32acf6c46sm597892885a.127.2024.11.12.07.05.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Nov 2024 07:05:45 -0800 (PST) Date: Tue, 12 Nov 2024 10:05:43 -0500 From: Mark Johnston To: Jose Luis Duran Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 1fa6daaafd74 - main - ipfilter: Avoid stopping with a lock held Message-ID: References: <202411120347.4AC3lPOA015167@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 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202411120347.4AC3lPOA015167@gitrepo.freebsd.org> X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4XnqVL75MWz4QwC X-Spamd-Bar: ---- On Tue, Nov 12, 2024 at 03:47:25AM +0000, Jose Luis Duran wrote: > The branch main has been updated by jlduran: > > URL: https://cgit.FreeBSD.org/src/commit/?id=1fa6daaafd74c1a457dcfe26e0a5943b5441dc9d > > commit 1fa6daaafd74c1a457dcfe26e0a5943b5441dc9d > Author: Jose Luis Duran > AuthorDate: 2024-11-02 17:58:59 +0000 > Commit: Jose Luis Duran > CommitDate: 2024-11-12 03:46:15 +0000 > > ipfilter: Avoid stopping with a lock held > > Avoid calling _callout_stop_safe with a non-sleepable lock held when > detaching by initializing callout_init_rw() with CALLOUT_SHAREDLOCK. > > It avoids the following WITNESS warning when stopping the service: > > # service ipfilter stop > calling _callout_stop_safe with the following non-sleepable locks held: > shared rw ipf filter load/unload mutex (ipf filter load/unload mutex) r = 0 (0xffff0000417c7530) locked @ /usr/src/sys/netpfil/ipfilter/netinet/fil.c:7926 > stack backtrace: > #0 0xffff00000052d394 at witness_debugger+0x60 > #1 0xffff00000052e620 at witness_warn+0x404 > #2 0xffff0000004d4ffc at _callout_stop_safe+0x8c > #3 0xffff0000f7236674 at ipfdetach+0x3c > #4 0xffff0000f723fa4c at ipf_ipf_ioctl+0x788 > #5 0xffff0000f72367e0 at ipfioctl+0x144 > #6 0xffff00000034abd8 at devfs_ioctl+0x100 > #7 0xffff0000005c66a0 at vn_ioctl+0xbc > #8 0xffff00000034b2cc at devfs_ioctl_f+0x24 > #9 0xffff0000005331ec at kern_ioctl+0x2e0 > #10 0xffff000000532eb4 at sys_ioctl+0x140 > #11 0xffff000000880480 at do_el0_sync+0x604 > #12 0xffff0000008579ac at handle_el0_sync+0x4c > > PR: 282478 > Suggested by: markj > Reviewed by: cy > Approved by: emaste (mentor) > MFC after: 1 week > --- > sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c > index bcde0d2c7323..b3dea40c3d8c 100644 > --- a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c > +++ b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c > @@ -181,7 +181,7 @@ ipf_timer_func(void *arg) > #if 0 > softc->ipf_slow_ch = timeout(ipf_timer_func, softc, hz/2); > #endif > - callout_init(&softc->ipf_slow_ch, 1); > + callout_init_rw(&softc->ipf_slow_ch, &softc->ipf_global.ipf_lk, CALLOUT_SHAREDLOCK); I didn't notice this before, but it's unnecessary to reinitialize the callout each time the timeout function fires. The initialization only needs to be done once. > callout_reset(&softc->ipf_slow_ch, > (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT, > ipf_timer_func, softc); > @@ -221,7 +221,7 @@ ipfattach(ipf_main_softc_t *softc) > softc->ipf_slow_ch = timeout(ipf_timer_func, softc, > (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT); > #endif > - callout_init(&softc->ipf_slow_ch, 1); > + callout_init_rw(&softc->ipf_slow_ch, &softc->ipf_global.ipf_lk, CALLOUT_SHAREDLOCK); > callout_reset(&softc->ipf_slow_ch, (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT, > ipf_timer_func, softc); > return (0); I think part of this diff is missing. The timeout function still tries to acquire this rwlock, and now it'll deadlock since the callout framework will have already acquired it as a result of this change. From nobody Tue Nov 12 15:23:57 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XnqvM04pFz5cgj6; Tue, 12 Nov 2024 15:23:59 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XnqvL6CKVz4Shx; Tue, 12 Nov 2024 15:23:58 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731425038; h=from:from:reply-to:subject: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=johdrE8hAqkY7wdFK8ywmxAvcYeFpV+QlsoydzpJDl4=; b=LSjQ/FOVVY7QNQny193dx1d5ZxALJyf9I38vOV7AYHkLkFKMxUEsxut8VV3AmAJt9x+XFY zvUfzmknNqMgzaKvVh0lr4HzUVvBfjvV7mF8axBuHLt+oGKqgUGJ58Wk0OqhwvZycYQ122 ZyCdOpdzz78g24Fq16merzgdNWlLVNQ577Sz5TNTtTdYeLTA4R2yEEUk7S7H3AnGxcQ/wZ EpkjbTaq4de8yp3dtG35niP1ydto5UlBuWRAA/n63vi39ce3rGflq32M3QP+xKqHd0WWeb zihzR/VTiP96U890IumNN6GxIDo9gAXpjEYlwS3ccNOBZzRD/hZ/ihIuVK9ijw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731425038; h=from:from:reply-to:subject: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=johdrE8hAqkY7wdFK8ywmxAvcYeFpV+QlsoydzpJDl4=; b=e2MmLezaTHH3Kvg9QEAzZaDqJLgS2dCcRCk/93mf0nRJogrdXShJtdY5DR0PgXRXD87TOO KB9xrDP6PwlyJ58c6hQyk3u9Erk9qyZ6qppu4ejDyujROpiSkyyhOv2xus6WthZS8xNG/8 jnS/9bBUwWoWoEv1yQxL6WjfkL/++RadhekSgg4a4xv52cSxggl7jOanD8HvCsrnG61IYS 0KdmoDTsbMUY34UEiaq/U8eNT7Lio7PVOAo2ip1YNoheSGkZgmoV9OOar1IMy6pkpmuZ8E 0hSCgN8jkUif1dpzBaoYJ/BdLfeJ2MSGUkcxz2N6Ae9mQvC6XTtXd/21i3nakw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731425038; a=rsa-sha256; cv=none; b=bmaY08JilrIlyx5Pf/iIcyJ+TtjR+iC+4CO0PaHtrt0uc4DvwoVvF1cKDhAz4hmfW9Raaj Dz79Pt5wUzRhDFq9qTr1xxi99dTrEqfZ28tcXE3s6s7cYgPKIquZed8tNa0ieZNC38MhgX YDz2afmBV2AazxVnotb00T0mn92CDnHyby8+3YxVXy1do7FZWVnfD4dIH8Yu0S93Q4keKn GHgOXqYhJKn8q8jIMyGlO7mZROHBzHxu0nz0kGW1HvbEwCyPts3McT3U7Bxc3tzQCIh638 2bEoWApNZQsd5ayepI51Y4sotXI/VlJEq/eI+jNkfY0NEjDDI/9VP1sMRE4Hjw== Received: from [IPV6:2601:5c0:4200:b830:d04f:46f9:caeb:6e94] (unknown [IPv6:2601:5c0:4200:b830:d04f:46f9:caeb:6e94]) (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 4XnqvL4GYBzjbx; Tue, 12 Nov 2024 15:23:58 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <09923ad3-4065-4a31-b35f-74f84e09cff1@FreeBSD.org> Date: Tue, 12 Nov 2024 10:23:57 -0500 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 1fa6daaafd74 - main - ipfilter: Avoid stopping with a lock held Content-Language: en-US To: Jose Luis Duran , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202411120347.4AC3lPOA015167@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: <202411120347.4AC3lPOA015167@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 11/11/24 19:47, Jose Luis Duran wrote: > The branch main has been updated by jlduran: > > URL: https://cgit.FreeBSD.org/src/commit/?id=1fa6daaafd74c1a457dcfe26e0a5943b5441dc9d > > commit 1fa6daaafd74c1a457dcfe26e0a5943b5441dc9d > Author: Jose Luis Duran > AuthorDate: 2024-11-02 17:58:59 +0000 > Commit: Jose Luis Duran > CommitDate: 2024-11-12 03:46:15 +0000 > > ipfilter: Avoid stopping with a lock held > > Avoid calling _callout_stop_safe with a non-sleepable lock held when > detaching by initializing callout_init_rw() with CALLOUT_SHAREDLOCK. > > It avoids the following WITNESS warning when stopping the service: > > # service ipfilter stop > calling _callout_stop_safe with the following non-sleepable locks held: > shared rw ipf filter load/unload mutex (ipf filter load/unload mutex) r = 0 (0xffff0000417c7530) locked @ /usr/src/sys/netpfil/ipfilter/netinet/fil.c:7926 > stack backtrace: > #0 0xffff00000052d394 at witness_debugger+0x60 > #1 0xffff00000052e620 at witness_warn+0x404 > #2 0xffff0000004d4ffc at _callout_stop_safe+0x8c > #3 0xffff0000f7236674 at ipfdetach+0x3c > #4 0xffff0000f723fa4c at ipf_ipf_ioctl+0x788 > #5 0xffff0000f72367e0 at ipfioctl+0x144 > #6 0xffff00000034abd8 at devfs_ioctl+0x100 > #7 0xffff0000005c66a0 at vn_ioctl+0xbc > #8 0xffff00000034b2cc at devfs_ioctl_f+0x24 > #9 0xffff0000005331ec at kern_ioctl+0x2e0 > #10 0xffff000000532eb4 at sys_ioctl+0x140 > #11 0xffff000000880480 at do_el0_sync+0x604 > #12 0xffff0000008579ac at handle_el0_sync+0x4c > > PR: 282478 > Suggested by: markj > Reviewed by: cy > Approved by: emaste (mentor) > MFC after: 1 week > --- > sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c > index bcde0d2c7323..b3dea40c3d8c 100644 > --- a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c > +++ b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c > @@ -181,7 +181,7 @@ ipf_timer_func(void *arg) > #if 0 > softc->ipf_slow_ch = timeout(ipf_timer_func, softc, hz/2); > #endif > - callout_init(&softc->ipf_slow_ch, 1); > + callout_init_rw(&softc->ipf_slow_ch, &softc->ipf_global.ipf_lk, CALLOUT_SHAREDLOCK); > callout_reset(&softc->ipf_slow_ch, > (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT, > ipf_timer_func, softc); > @@ -221,7 +221,7 @@ ipfattach(ipf_main_softc_t *softc) > softc->ipf_slow_ch = timeout(ipf_timer_func, softc, > (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT); > #endif > - callout_init(&softc->ipf_slow_ch, 1); > + callout_init_rw(&softc->ipf_slow_ch, &softc->ipf_global.ipf_lk, CALLOUT_SHAREDLOCK); > callout_reset(&softc->ipf_slow_ch, (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT, > ipf_timer_func, softc); > return (0); But this means the callout is now called with the lock held, and I don't see any changes to ipf_timer_func. Hmm, so you now recurse on the lock? You need to take out the locking in ipf_timer_func I think as it is now spurious. You can also axe the #if 0'd code around timeout() while you are at it. -- John Baldwin From nobody Tue Nov 12 15:37:09 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XnrBd2cHcz5chCs; Tue, 12 Nov 2024 15:37:13 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta001.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XnrBc3qbRz4VKQ; Tue, 12 Nov 2024 15:37:12 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4002a.ext.cloudfilter.net ([10.228.9.250]) by cmsmtp with ESMTPS id AqlStjniCAHbZAsx5tPHH1; Tue, 12 Nov 2024 15:37:11 +0000 Received: from spqr.komquats.com ([70.66.152.170]) by cmsmtp with ESMTPSA id Asx4tg76u2M9qAsx4txi9K; Tue, 12 Nov 2024 15:37:11 +0000 X-Auth-User: cschuber X-Authority-Analysis: v=2.4 cv=ce5xrWDM c=1 sm=1 tr=0 ts=67337627 a=y8EK/9tc/U6QY+pUhnbtgQ==:117 a=y8EK/9tc/U6QY+pUhnbtgQ==:17 a=kj9zAlcOel0A:10 a=VlfZXiiP6vEA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=qctbC0zNG9NHIYxnFvAA:9 a=CjuIK1q_8ugA:10 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id BB95E9AC; Tue, 12 Nov 2024 07:37:09 -0800 (PST) Received: by slippy.cwsent.com (Postfix, from userid 1000) id B1B0C1F7; Tue, 12 Nov 2024 07:37:09 -0800 (PST) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Mark Johnston cc: Jose Luis Duran , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 1fa6daaafd74 - main - ipfilter: Avoid stopping with a lock held In-reply-to: References: <202411120347.4AC3lPOA015167@gitrepo.freebsd.org> Comments: In-reply-to Mark Johnston message dated "Tue, 12 Nov 2024 10:05:43 -0500." List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 12 Nov 2024 07:37:09 -0800 Message-Id: <20241112153709.B1B0C1F7@slippy.cwsent.com> X-CMAE-Envelope: MS4xfN+fEwEXqtI+DIvH3BrQ2eyu4FPZdQ9IuL/KQIJkKpRKSDeHMrHHwg8zxS2RSRhp7GgVMjrLIR9QtY9pN7chD71DqXk5fOgeEVYF4FwWH8HAzsf9/qz3 P0n5OktfeJ8NeORQWHdAYe/VhxNEHuQju8/DpiTdyVSBeIH9UIW5mAdH6njA3a4ChOFeKPdoPBLukmOI8VenqlhvL3SWq69cME+Fy+kNYRbc9u2d9AZ0HJdB ZSacbKb8z9b6Xbsk/qTRNpyMGAW4zpJwZEFrgB9EVaQWHPoJnurJOv/GIfN5KYNPqf7qXGJSzBa6xpdaNet6TOKKiET5phuBJkwQRobtpEF6kKQvKaZkg70Y K7zK/bS1 X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US] X-Rspamd-Queue-Id: 4XnrBc3qbRz4VKQ X-Spamd-Bar: ---- In message , Mark Johnston writes: > On Tue, Nov 12, 2024 at 03:47:25AM +0000, Jose Luis Duran wrote: > > The branch main has been updated by jlduran: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=1fa6daaafd74c1a457dcfe26e0a594 > 3b5441dc9d > > > > commit 1fa6daaafd74c1a457dcfe26e0a5943b5441dc9d > > Author: Jose Luis Duran > > AuthorDate: 2024-11-02 17:58:59 +0000 > > Commit: Jose Luis Duran > > CommitDate: 2024-11-12 03:46:15 +0000 > > > > ipfilter: Avoid stopping with a lock held > > > > Avoid calling _callout_stop_safe with a non-sleepable lock held when > > detaching by initializing callout_init_rw() with CALLOUT_SHAREDLOCK. > > > > It avoids the following WITNESS warning when stopping the service: > > > > # service ipfilter stop > > calling _callout_stop_safe with the following non-sleepable locks h > eld: > > shared rw ipf filter load/unload mutex (ipf filter load/unload mute > x) r = 0 (0xffff0000417c7530) locked @ /usr/src/sys/netpfil/ipfilter/netinet/ > fil.c:7926 > > stack backtrace: > > #0 0xffff00000052d394 at witness_debugger+0x60 > > #1 0xffff00000052e620 at witness_warn+0x404 > > #2 0xffff0000004d4ffc at _callout_stop_safe+0x8c > > #3 0xffff0000f7236674 at ipfdetach+0x3c > > #4 0xffff0000f723fa4c at ipf_ipf_ioctl+0x788 > > #5 0xffff0000f72367e0 at ipfioctl+0x144 > > #6 0xffff00000034abd8 at devfs_ioctl+0x100 > > #7 0xffff0000005c66a0 at vn_ioctl+0xbc > > #8 0xffff00000034b2cc at devfs_ioctl_f+0x24 > > #9 0xffff0000005331ec at kern_ioctl+0x2e0 > > #10 0xffff000000532eb4 at sys_ioctl+0x140 > > #11 0xffff000000880480 at do_el0_sync+0x604 > > #12 0xffff0000008579ac at handle_el0_sync+0x4c > > > > PR: 282478 > > Suggested by: markj > > Reviewed by: cy > > Approved by: emaste (mentor) > > MFC after: 1 week > > --- > > sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c b/sys/netpfil/ip > filter/netinet/ip_fil_freebsd.c > > index bcde0d2c7323..b3dea40c3d8c 100644 > > --- a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c > > +++ b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c > > @@ -181,7 +181,7 @@ ipf_timer_func(void *arg) > > #if 0 > > softc->ipf_slow_ch = timeout(ipf_timer_func, softc, hz/2); > > #endif > > - callout_init(&softc->ipf_slow_ch, 1); > > + callout_init_rw(&softc->ipf_slow_ch, &softc->ipf_global.ipf_lk, > CALLOUT_SHAREDLOCK); > > I didn't notice this before, but it's unnecessary to reinitialize the > callout each time the timeout function fires. The initialization only > needs to be done once. I didn't clue in either. It should be removed entirely. It's already initialized in ipfattach(). > > > callout_reset(&softc->ipf_slow_ch, > > (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT, > > ipf_timer_func, softc); > > @@ -221,7 +221,7 @@ ipfattach(ipf_main_softc_t *softc) > > softc->ipf_slow_ch = timeout(ipf_timer_func, softc, > > (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT); > > #endif > > - callout_init(&softc->ipf_slow_ch, 1); > > + callout_init_rw(&softc->ipf_slow_ch, &softc->ipf_global.ipf_lk, CALLOUT > _SHAREDLOCK); The second callout_init_rw() call is fine. It's in ipfattach(). > > callout_reset(&softc->ipf_slow_ch, (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT, > > ipf_timer_func, softc); > > return (0); > > I think part of this diff is missing. The timeout function still tries > to acquire this rwlock, and now it'll deadlock since the callout > framework will have already acquired it as a result of this change. > The first callout_init_rw() should not be called as it's already initialized when ipfattach() is called upon ipfilter initialization. This will fix it: diff --git a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c index b3dea40c3d8c..009b13955cbc 100644 --- a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c +++ b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c @@ -181,7 +181,6 @@ ipf_timer_func(void *arg) #if 0 softc->ipf_slow_ch = timeout(ipf_timer_func, softc, hz/2); #endif - callout_init_rw(&softc->ipf_slow_ch, &softc->ipf_global.ipf_lk, CALLOUT_SHAREDLOCK); callout_reset(&softc->ipf_slow_ch, (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT, ipf_timer_func, softc); -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0 From nobody Tue Nov 12 15:52:19 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XnrX537byz5cj51; Tue, 12 Nov 2024 15:52:21 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta001.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XnrX52JDVz4Wn2; Tue, 12 Nov 2024 15:52:21 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4001a.ext.cloudfilter.net ([10.228.9.142]) by cmsmtp with ESMTPS id AnjTtjif4AHbZAtBktPMtx; Tue, 12 Nov 2024 15:52:20 +0000 Received: from spqr.komquats.com ([70.66.152.170]) by cmsmtp with ESMTPSA id AtBjt0rWcGvSVAtBktDzDt; Tue, 12 Nov 2024 15:52:20 +0000 X-Auth-User: cschuber X-Authority-Analysis: v=2.4 cv=FpSm/Hrq c=1 sm=1 tr=0 ts=673379b4 a=y8EK/9tc/U6QY+pUhnbtgQ==:117 a=y8EK/9tc/U6QY+pUhnbtgQ==:17 a=kj9zAlcOel0A:10 a=VlfZXiiP6vEA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=qctbC0zNG9NHIYxnFvAA:9 a=CjuIK1q_8ugA:10 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 36A779CF; Tue, 12 Nov 2024 07:52:19 -0800 (PST) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 2E15A2DF; Tue, 12 Nov 2024 07:52:19 -0800 (PST) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: John Baldwin cc: Jose Luis Duran , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 1fa6daaafd74 - main - ipfilter: Avoid stopping with a lock held In-reply-to: <09923ad3-4065-4a31-b35f-74f84e09cff1@FreeBSD.org> References: <202411120347.4AC3lPOA015167@gitrepo.freebsd.org> <09923ad3-4065-4a31-b35f-74f84e09cff1@FreeBSD.org> Comments: In-reply-to John Baldwin message dated "Tue, 12 Nov 2024 10:23:57 -0500." List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 12 Nov 2024 07:52:19 -0800 Message-Id: <20241112155219.2E15A2DF@slippy.cwsent.com> X-CMAE-Envelope: MS4xfMhqgiAQY8vLq7sbuzNWNgEfciWJv21VRVrsLrNp3OQCCgJTIRoZVs180Uy5SfYjFzSEncD+hE56Z6BbN43jiO3UZUlyAjDuDtyBOXIZVkslnn5E8TU0 6TdN2UkUmj+W9tb7+585JdK4GEzJIrEJgizxQzXnP+Wg6Y6g28lqektBcYUxUhzo3HRzFP5t0kYSHbxx0ofgMlP5xs3AypSQux4olZIquA1J5zrXg9YSk8aE y0gRV/weZDfE6SJWr66Ghgjzss1aUrPdmSDTpa40BL6NFynbxaBsjaa0DG861ursnSTt5txv3XUwLEytdqPANKpShh2LmBf16bkLfnv6tEZ5mCT6nzJzZNcr uL7QDn7x X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US] X-Rspamd-Queue-Id: 4XnrX52JDVz4Wn2 X-Spamd-Bar: ---- In message <09923ad3-4065-4a31-b35f-74f84e09cff1@FreeBSD.org>, John Baldwin wri tes: > On 11/11/24 19:47, Jose Luis Duran wrote: > > The branch main has been updated by jlduran: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=1fa6daaafd74c1a457dcfe26e0a594 > 3b5441dc9d > > > > commit 1fa6daaafd74c1a457dcfe26e0a5943b5441dc9d > > Author: Jose Luis Duran > > AuthorDate: 2024-11-02 17:58:59 +0000 > > Commit: Jose Luis Duran > > CommitDate: 2024-11-12 03:46:15 +0000 > > > > ipfilter: Avoid stopping with a lock held > > > > Avoid calling _callout_stop_safe with a non-sleepable lock held when > > detaching by initializing callout_init_rw() with CALLOUT_SHAREDLOCK. > > > > It avoids the following WITNESS warning when stopping the service: > > > > # service ipfilter stop > > calling _callout_stop_safe with the following non-sleepable locks > held: > > shared rw ipf filter load/unload mutex (ipf filter load/unload mut > ex) r = 0 (0xffff0000417c7530) locked @ /usr/src/sys/netpfil/ipfilter/netinet > /fil.c:7926 > > stack backtrace: > > #0 0xffff00000052d394 at witness_debugger+0x60 > > #1 0xffff00000052e620 at witness_warn+0x404 > > #2 0xffff0000004d4ffc at _callout_stop_safe+0x8c > > #3 0xffff0000f7236674 at ipfdetach+0x3c > > #4 0xffff0000f723fa4c at ipf_ipf_ioctl+0x788 > > #5 0xffff0000f72367e0 at ipfioctl+0x144 > > #6 0xffff00000034abd8 at devfs_ioctl+0x100 > > #7 0xffff0000005c66a0 at vn_ioctl+0xbc > > #8 0xffff00000034b2cc at devfs_ioctl_f+0x24 > > #9 0xffff0000005331ec at kern_ioctl+0x2e0 > > #10 0xffff000000532eb4 at sys_ioctl+0x140 > > #11 0xffff000000880480 at do_el0_sync+0x604 > > #12 0xffff0000008579ac at handle_el0_sync+0x4c > > > > PR: 282478 > > Suggested by: markj > > Reviewed by: cy > > Approved by: emaste (mentor) > > MFC after: 1 week > > --- > > sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c b/sys/netpfil/ip > filter/netinet/ip_fil_freebsd.c > > index bcde0d2c7323..b3dea40c3d8c 100644 > > --- a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c > > +++ b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c > > @@ -181,7 +181,7 @@ ipf_timer_func(void *arg) > > #if 0 > > softc->ipf_slow_ch = timeout(ipf_timer_func, softc, hz/2); > > #endif > > - callout_init(&softc->ipf_slow_ch, 1); > > + callout_init_rw(&softc->ipf_slow_ch, &softc->ipf_global.ipf_lk, > CALLOUT_SHAREDLOCK); > > callout_reset(&softc->ipf_slow_ch, > > (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT, > > ipf_timer_func, softc); > > @@ -221,7 +221,7 @@ ipfattach(ipf_main_softc_t *softc) > > softc->ipf_slow_ch = timeout(ipf_timer_func, softc, > > (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT); > > #endif > > - callout_init(&softc->ipf_slow_ch, 1); > > + callout_init_rw(&softc->ipf_slow_ch, &softc->ipf_global.ipf_lk, CALLOUT > _SHAREDLOCK); > > callout_reset(&softc->ipf_slow_ch, (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT, > > ipf_timer_func, softc); > > return (0); > > But this means the callout is now called with the lock held, and I don't see > any changes > to ipf_timer_func. Hmm, so you now recurse on the lock? You need to take ou > t the locking > in ipf_timer_func I think as it is now spurious. You can also axe the #if 0' > d code around > timeout() while you are at it. Reviewing all the #if 0's in ipfilter, discovering why they are there, and either removing them or implementing what Darren had initially intended is in my queue. The upstream git log isn't helpful for reasons I preach about proper commit logs. Given that this one is in ip_fil_freebsd.c (specific to FreeBSD), it can be removed. Others require more grokking. > > -- > John Baldwin > -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0 From nobody Tue Nov 12 16:02:43 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xnrm63Ym3z5ck3R; Tue, 12 Nov 2024 16:02:46 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta002.cacentral1.a.cloudfilter.net (omta002.cacentral1.a.cloudfilter.net [3.97.99.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xnrm61J0Jz4Xvy; Tue, 12 Nov 2024 16:02:46 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4002a.ext.cloudfilter.net ([10.228.9.250]) by cmsmtp with ESMTPS id AnxEtmZw5MArNAtLpttnEK; Tue, 12 Nov 2024 16:02:45 +0000 Received: from spqr.komquats.com ([70.66.152.170]) by cmsmtp with ESMTPSA id AtLntgDt22M9qAtLotxnka; Tue, 12 Nov 2024 16:02:45 +0000 X-Auth-User: cschuber X-Authority-Analysis: v=2.4 cv=ce5xrWDM c=1 sm=1 tr=0 ts=67337c25 a=y8EK/9tc/U6QY+pUhnbtgQ==:117 a=y8EK/9tc/U6QY+pUhnbtgQ==:17 a=kj9zAlcOel0A:10 a=VlfZXiiP6vEA:10 a=VxmjJ2MpAAAA:8 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=lxbSc3apC6ghUbFFKhkA:9 a=CjuIK1q_8ugA:10 a=7gXAzLPJhVmCkEl4_tsf:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id BAA7F9F4; Tue, 12 Nov 2024 08:02:43 -0800 (PST) Received: by slippy.cwsent.com (Postfix, from userid 1000) id B372532F; Tue, 12 Nov 2024 08:02:43 -0800 (PST) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Cy Schubert cc: John Baldwin , Jose Luis Duran , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 1fa6daaafd74 - main - ipfilter: Avoid stopping with a lock held In-reply-to: <20241112155219.2E15A2DF@slippy.cwsent.com> References: <202411120347.4AC3lPOA015167@gitrepo.freebsd.org> <09923ad3-4065-4a31-b35f-74f84e09cff1@FreeBSD.org> <20241112155219.2E15A2DF@slippy.cwsent.com> Comments: In-reply-to Cy Schubert message dated "Tue, 12 Nov 2024 07:52:19 -0800." List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 12 Nov 2024 08:02:43 -0800 Message-Id: <20241112160243.B372532F@slippy.cwsent.com> X-CMAE-Envelope: MS4xfCW7NLTpqnsRdqW1TxzTj7s79b01JqrDtmj3qWrqw9mu39E50V5aorvipPMpv19Ifm6LUPSwMkZlm3B1lTQR7c5vHZ5Oyze/zlQ4f0hDIplGp8Ibv3Zt Aer+mEQ6+bT9rH2btZbibaEBXbLDljZpIphfrf5wjzyRidPFLP8DZ6KNsgxJMOrsku/Z4b47sIgpj1FOdP0vERr30ZpNcUgtEO1TPRs9CWwNlMHLq9rZS+Hc Y6cQiZkPpmKC/Kso/HTwG1fOF5SYn9snGY0ldo/cPcglfSa4IM6eVbmTFwh9XT6st/EN4IrZUgw8Uip5Mp3zAezzPN763ip+NUpL8r9JvM5UAMIU/wTdu95b Vy8SDw2N X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US] X-Rspamd-Queue-Id: 4Xnrm61J0Jz4Xvy X-Spamd-Bar: ---- In message <20241112155219.2E15A2DF@slippy.cwsent.com>, Cy Schubert writes: > In message <09923ad3-4065-4a31-b35f-74f84e09cff1@FreeBSD.org>, John Baldwin > wri > tes: > > On 11/11/24 19:47, Jose Luis Duran wrote: > > > The branch main has been updated by jlduran: > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=1fa6daaafd74c1a457dcfe26e0a5 > 94 > > 3b5441dc9d > > > > > > commit 1fa6daaafd74c1a457dcfe26e0a5943b5441dc9d > > > Author: Jose Luis Duran > > > AuthorDate: 2024-11-02 17:58:59 +0000 > > > Commit: Jose Luis Duran > > > CommitDate: 2024-11-12 03:46:15 +0000 > > > > > > ipfilter: Avoid stopping with a lock held > > > > > > Avoid calling _callout_stop_safe with a non-sleepable lock held when > > > detaching by initializing callout_init_rw() with CALLOUT_SHAREDLOCK. > > > > > > It avoids the following WITNESS warning when stopping the service: > > > > > > # service ipfilter stop > > > calling _callout_stop_safe with the following non-sleepable lock > s > > held: > > > shared rw ipf filter load/unload mutex (ipf filter load/unload m > ut > > ex) r = 0 (0xffff0000417c7530) locked @ /usr/src/sys/netpfil/ipfilter/netin > et > > /fil.c:7926 > > > stack backtrace: > > > #0 0xffff00000052d394 at witness_debugger+0x60 > > > #1 0xffff00000052e620 at witness_warn+0x404 > > > #2 0xffff0000004d4ffc at _callout_stop_safe+0x8c > > > #3 0xffff0000f7236674 at ipfdetach+0x3c > > > #4 0xffff0000f723fa4c at ipf_ipf_ioctl+0x788 > > > #5 0xffff0000f72367e0 at ipfioctl+0x144 > > > #6 0xffff00000034abd8 at devfs_ioctl+0x100 > > > #7 0xffff0000005c66a0 at vn_ioctl+0xbc > > > #8 0xffff00000034b2cc at devfs_ioctl_f+0x24 > > > #9 0xffff0000005331ec at kern_ioctl+0x2e0 > > > #10 0xffff000000532eb4 at sys_ioctl+0x140 > > > #11 0xffff000000880480 at do_el0_sync+0x604 > > > #12 0xffff0000008579ac at handle_el0_sync+0x4c > > > > > > PR: 282478 > > > Suggested by: markj > > > Reviewed by: cy > > > Approved by: emaste (mentor) > > > MFC after: 1 week > > > --- > > > sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c | 4 ++-- > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > diff --git a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c b/sys/netpfil/ > ip > > filter/netinet/ip_fil_freebsd.c > > > index bcde0d2c7323..b3dea40c3d8c 100644 > > > --- a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c > > > +++ b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c > > > @@ -181,7 +181,7 @@ ipf_timer_func(void *arg) > > > #if 0 > > > softc->ipf_slow_ch = timeout(ipf_timer_func, softc, hz/ > 2); > > > #endif > > > - callout_init(&softc->ipf_slow_ch, 1); > > > + callout_init_rw(&softc->ipf_slow_ch, &softc->ipf_global.ipf_lk, > > CALLOUT_SHAREDLOCK); > > > callout_reset(&softc->ipf_slow_ch, > > > (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT, > > > ipf_timer_func, softc); > > > @@ -221,7 +221,7 @@ ipfattach(ipf_main_softc_t *softc) > > > softc->ipf_slow_ch = timeout(ipf_timer_func, softc, > > > (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT > ); > > > #endif > > > - callout_init(&softc->ipf_slow_ch, 1); > > > + callout_init_rw(&softc->ipf_slow_ch, &softc->ipf_global.ipf_lk, CALLOUT > > _SHAREDLOCK); > > > callout_reset(&softc->ipf_slow_ch, (hz / IPF_HZ_DIVIDE) * IPF_H > Z_MULT, > > > ipf_timer_func, softc); > > > return (0); > > > > But this means the callout is now called with the lock held, and I don't se > e > > any changes > > to ipf_timer_func. Hmm, so you now recurse on the lock? You need to take > ou > > t the locking > > in ipf_timer_func I think as it is now spurious. You can also axe the #if > 0' > > d code around > > timeout() while you are at it. > > Reviewing all the #if 0's in ipfilter, discovering why they are there, and > either removing them or implementing what Darren had initially intended is > in my queue. The upstream git log isn't helpful for reasons I preach about > proper commit logs. > > Given that this one is in ip_fil_freebsd.c (specific to FreeBSD), it can be > removed. Others require more grokking. It can go. It was #if 0'd by ea3022cbbd3f5, IIRC in discussion with you at the time (2013). ea3022cbbd3f5 converted timeout(9) to callout(9). This code remained as an artifact of the conversion. It was sent by you to me following the ipfilter upgrade from 4.1.28 to 5.1.2 earlier that year. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0 From nobody Tue Nov 12 16:03:09 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XnrmY5Lzfz5ckVw; Tue, 12 Nov 2024 16: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XnrmY3Zpfz4YDj; Tue, 12 Nov 2024 16: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=1731427389; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XpiUy/6UggbkAuIDSWbvcQsJgHE2hc2xlJbbYcenpw0=; b=Cs12Ii5jMn9bOGz0WXbUEexHX7yz+pSkq/0Kkxws0IvDOgZjXAoc1d/XY7qJ2CUbp6YXXd iPYoXkaUaWHgVjB7vnllA6YBFVNEXZFuOjPmZH2Q7YloVM6RCm+gBkVmoy5HNdakB2y+Fi Q1sTM/Xh43hXPJJ68gQf6NiN6ueVC+fFRuyIbUzjuvb8crVRpcL8RzhFWanalh59f6btDp /K87BMNj4IxSdWK233F0VKHZ914YVSHvMeOYOx9q6T/4Pa41Em3n6OBmdOngkpMDBthvLN LfXZSopgtqS3sS2aBnQ1t+Zl9IyCp8fAvAzNe1Y1/Zl3IexAYnk1UOJqxJB3xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731427389; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XpiUy/6UggbkAuIDSWbvcQsJgHE2hc2xlJbbYcenpw0=; b=w9ge/mtXbLVmg797PtLm9MwPVJIo8aOmSk9LceNsHFLJquXo/EgUsAMAZNDJ51uqAqb2z9 LoAr6sZPQNoPUcIlgv/stXbiwo0w/fwp+PieQTQAZTMp4d3LzpgXRCW16RLkitmOLKtC/X U7zKM5GmtBrJPA9W0zIg1KY11SzYX8tCTqddeEyIoUi7A7G6k4dZsHsbToCuhGAvBWuUZ5 cO4ivw7f8l+5hZuLaLom1zAo0/BX31KSMCvvaG48AU7zG5EBUQ/ReVZlojvWjn2e2JlvXJ IcTz1LmDy+2tPWC4FEfpCkNqYOAU3E8EyvGQF+UBxhalgbxPF/gA0apVTRvI3Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731427389; a=rsa-sha256; cv=none; b=mFS2BF9dncUqlj0CkWIg+ArwhN13qj91gJk9fRxOtulsArJ5AUGh17bLbXRWJpRoTg7XFU aGgy7VWXY0GSOf9YBqK4I0muAKCw+IkonODFj9QH/oPpoojaIZH0k39K9uswkSgJOB3HXX WSIJBC3eO46nAw67VV5jvp7sg81ddFwdSNqSiXS4vUt6I28bBigRFo7pyCURejTp2aWwPs IQCU6DFFDUQ/yqeIIdvOJJ4EeWkiLcUtA1oqXlnA5aEocqWiytmVt52cFBOZCuGO13o3R+ AQqykm/KMyjr02veup1rPz+jbJYp1pQH1sDQkIRVvuVX88S82izcDQzC5qJZ9A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XnrmY34DyzHJQ; Tue, 12 Nov 2024 16:03:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ACG390U084284; Tue, 12 Nov 2024 16:03:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ACG39Pj084281; Tue, 12 Nov 2024 16:03:09 GMT (envelope-from git) Date: Tue, 12 Nov 2024 16:03:09 GMT Message-Id: <202411121603.4ACG39Pj084281@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: fc32b5ddf3af - main - ipfilter: Remove dead 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 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: fc32b5ddf3af503b41e81df8f1dc4f6a0aace25b Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=fc32b5ddf3af503b41e81df8f1dc4f6a0aace25b commit fc32b5ddf3af503b41e81df8f1dc4f6a0aace25b Author: Cy Schubert AuthorDate: 2024-11-12 15:58:03 +0000 Commit: Cy Schubert CommitDate: 2024-11-12 16:00:46 +0000 ipfilter: Remove dead code ea3022cbbd3f5 converted timeout(9) to callout(9). This code remained as an artifact of the conversion. Fixes: ea3022cbbd3f5 MFC after: 1 week --- sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c index b3dea40c3d8c..23514907f86e 100644 --- a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c +++ b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c @@ -178,9 +178,6 @@ ipf_timer_func(void *arg) ipf_slowtimer(softc); if (softc->ipf_running == -1 || softc->ipf_running == 1) { -#if 0 - softc->ipf_slow_ch = timeout(ipf_timer_func, softc, hz/2); -#endif callout_init_rw(&softc->ipf_slow_ch, &softc->ipf_global.ipf_lk, CALLOUT_SHAREDLOCK); callout_reset(&softc->ipf_slow_ch, (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT, From nobody Tue Nov 12 16:40:45 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xnsc02cMdz5cmPv for ; Tue, 12 Nov 2024 16:40:48 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-il1-x134.google.com (mail-il1-x134.google.com [IPv6:2607:f8b0:4864:20::134]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xnsc00K1Mz4gHK for ; Tue, 12 Nov 2024 16:40:48 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Authentication-Results: mx1.freebsd.org; none Received: by mail-il1-x134.google.com with SMTP id e9e14a558f8ab-3a6c2077afcso19012305ab.0 for ; Tue, 12 Nov 2024 08:40:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd.org; s=google; t=1731429647; x=1732034447; darn=freebsd.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=g1irF1wVJ6QzG+RJ1i9aGVcSPNaaIkG7dnrkGW3C6ac=; b=ANj0W92IMqk0BovDzy58Ji7Pjd1FfJxZJqFHPzq/9Paq1mrAAoAa3xIPz+m8wSYjsI eGhktQTru026rWiWiLVUS4GVT4mzCKCmbKZGZnhAzPRsd9xFWCB4zCDJ3lGc2yZkwFtQ iOS21SWcdF2g/3Ra4Hun2aVmLE4oxTt7XRY2xGJ/sEY9BGv3NWBdjowWqPYb1qXkH74D IdRv4v9Qvt3I3fuLYwtZwVrggguub97HIKezDnartXalHG5QncqQyuzIzLTyt1K5mFZx iHkYKE2gex/yec68lZ4aGGilVDzMaxa50loNG6d6+k5IkuGYvlTOenuT/9KyejfUsUXy 5M1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731429647; x=1732034447; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=g1irF1wVJ6QzG+RJ1i9aGVcSPNaaIkG7dnrkGW3C6ac=; b=F4yQYbk7x8MoX9kGRXRFHNsY9zSxh6cygESp+OmTTuzk9rEL8hc/4LRyy7gup0AEJL NLcOhI/AwVDsalAxR9m2raNA3Ynth0rF+0Hfs0pmWDwDa2WftvYg4UokI1cVTSXXyiTt m9GtnKIxLUsAnu5J+ON6PN6mL9uOumicBROoW9vR6oIjn7SYpJnsk59N5iTTcK2kmeJ8 ZpBFd2O1Rcv3fnLvR9G+7xqlRZUxAjKwD0HaONV3wo1tBcjVZDJ9iaMZEEXXifiYu918 ICkE+UtOKMCB5EcCzuGD0W3Sb9EWigcDMSCQfVIuQxeUPOGAoTsG0WDyakan4V8brtF6 vkGQ== X-Forwarded-Encrypted: i=1; AJvYcCVXaJ1iEuy9tk/6+0lqJMTC1ljucmkxhA/IaHNTAI+v3wwW05n1r24+JyRdX8Yl/Wa534i7AOSt40tdHxq4RMCXYpro@freebsd.org X-Gm-Message-State: AOJu0YxwdVR6g7vbWBk73SQfYh0tm3KlIS+8ua9eS+AHSLAiQQz9lhQO EiQIfX0jT47CXJ8Uy8cCoxOfr3/RKerK+0PjMh2MFni1dQI2uHOFSowwu4RS4A0= X-Google-Smtp-Source: AGHT+IHR3pYTqfRCroi700YFYK08WhH7dx9bTgDJ4pwx52m3cvdYuK7vFx0V9uTvmi9CUnB6B2//hA== X-Received: by 2002:a05:6e02:1350:b0:3a6:da79:12bc with SMTP id e9e14a558f8ab-3a6f199ff96mr142251965ab.7.1731429646923; Tue, 12 Nov 2024 08:40:46 -0800 (PST) Received: from mutt-hbsd (174-24-91-193.clsp.qwest.net. [174.24.91.193]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-3a6f9837201sm22811085ab.20.2024.11.12.08.40.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Nov 2024 08:40:46 -0800 (PST) Date: Tue, 12 Nov 2024 16:40:45 +0000 From: Shawn Webb To: Corvin =?utf-8?B?S8O2aG5l?= Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: d93fbcf0222b - main - bhyve: TPM 2.0 emulation with swtpm Message-ID: X-Operating-System: FreeBSD mutt-hbsd 15.0-CURRENT-HBSD FreeBSD 15.0-CURRENT-HBSD X-PGP-Key: https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/blob/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc References: <202410221206.49MC6pt3085294@gitrepo.freebsd.org> <52925e6528586184db8c5f7a69c745aaa64db70b.camel@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 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="kg2jijasu7f77jo3" Content-Disposition: inline In-Reply-To: <52925e6528586184db8c5f7a69c745aaa64db70b.camel@FreeBSD.org> X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4Xnsc00K1Mz4gHK X-Spamd-Bar: ---- --kg2jijasu7f77jo3 Content-Type: text/plain; protected-headers=v1; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: Re: git: d93fbcf0222b - main - bhyve: TPM 2.0 emulation with swtpm MIME-Version: 1.0 On Tue, Nov 12, 2024 at 08:59:06AM +0100, Corvin K=F6hne wrote: > On Thu, 2024-11-07 at 18:40 +0000, Shawn Webb wrote: > > On Tue, Oct 22, 2024 at 12:06:51PM UTC, Corvin K=F6hne wrote: > > > The branch main has been updated by corvink: > > >=20 > > > URL: > > > https://cgit.FreeBSD.org/src/commit/?id=3Dd93fbcf0222b05fcd7704b35bc9= 4e5513c2682e2 > > >=20 > > > commit d93fbcf0222b05fcd7704b35bc94e5513c2682e2 > > > Author:=A0=A0=A0=A0 Hans Rosenfeld > > > AuthorDate: 2024-09-09 08:45:40 +0000 > > > Commit:=A0=A0=A0=A0 Corvin K=F6hne > > > CommitDate: 2024-10-22 12:04:24 +0000 > > >=20 > > > =A0=A0=A0 bhyve: TPM 2.0 emulation with swtpm > > > =A0=A0=A0=20 > > > =A0=A0=A0 Implement a TPM 2.0 emulation backend to connect to a runni= ng > > > swtpm > > > =A0=A0=A0 instance using a UNIX domain socket. > > > =A0=A0=A0=20 > > > =A0=A0=A0 Reviewed by:=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 corvink > > > =A0=A0=A0 MFC after:=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 1 week > >=20 > > Hey Corvin, > >=20 > > Are you still planning on MFCing this? > >=20 > > Thanks, > >=20 >=20 > Done. >=20 > Note that it's too late to slip into 14.2. Thanks for the MFC! --=20 Shawn Webb Cofounder / Security Engineer HardenedBSD Tor-ified Signal: +1 303-901-1600 / shawn_webb_opsec.50 https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_Webb/03A= 4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc --kg2jijasu7f77jo3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEA6TL67gupaZ9nzhT/y5nonf44foFAmczhQQACgkQ/y5nonf4 4fpv6RAAjIpNZ0rrWhre92Ed01jrBCVRVRetxgNZ4aaEmcD8FeWqLIuktDLCKdRc du9SosIlSZId+mKfQnj2eN2Y21eNQZZ9fzdsAnH4VaYJpCrXXPlOIyRVH/4Y3AhB 0G+quGo6a91klyUDoa9gBITdV/eW6iKc+TBH6fiCrg6tetcg9mx3VYJJ2/TEYco0 e0BvUxE86hQ+kPP0TKW1Tl/OTDrInX2Y1qUR0cWrmVTHbFzdTYjx6gKaB+LJZ8eo hSfKh0q4dCaPSVZ/ijYEFdsFsxqFPe1rXYaQi9cXu8+FuR9Y280ox1V0fhtst6rj K3FUh7RXkMGqxfnUSnpwmrbKxf3AQNqFa+G8a3ZvXdiAc63SqwleHHmR2zNIijMJ DMgIB7qAitHYXyigBzzGf6ZjXJd9xbBlyqdwnksuc46gCKm5YtRLF1Ocl9Q3L+b+ GbTTKoOkQEi0JqNCRLN50uzPnT3w5tun4Hqe7O2p35ThcHwvNLp576gOk9CxhiGC nd8fToVpc2WhEuGHXh+g9bNJ0PtyWYU2A3WhZOQDQRY47yQ7F0MalH2+I87/V2Sc Twoqx685Vuk+98o/9bSXEsq0aU1DpAdl1qzWJS/9S0T9G6FPgSNgV4Ke3mpfh/Hm 7dDDvBnD26YIihCqlddMFNR/1QrL/5xjNzgook0F+DQeC4px/Kw= =/bEn -----END PGP SIGNATURE----- --kg2jijasu7f77jo3-- From nobody Tue Nov 12 17:12:40 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XntJn1dDJz5cpv2; Tue, 12 Nov 2024 17:12: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XntJn0y5Sz4kkG; Tue, 12 Nov 2024 17:12:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731431561; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZTNYZvFDLw2thCp9lCMp3Hfnll59T7/TNe81KOSSo80=; b=W1Frq9KKCv59pFu0C/4dSBgnGt2CjNNsrmu7KoaRdOUkg8nVqEuapQFhwnOyesraE4Dgo/ S/H2teX5hHGt3t6SieFUov1OlnuRUgNwxhKV5X8hFGyUGxfo+7f65tw/T5JQiAHsAlIE20 84qoLo6mr0DOq2svmZ4kJ1I97KDR44eYzjCyml+yYYB2IqIEWM5MVONjBkndIxAJuR8GrQ 2ef5sDzN4APM07PrGy6VwrBWPyDiGCe5tcRsUmFvAfj+/ggpKO/E2G8kGXgd7NV/6ObJPR HMYaNiPRJiRn1OfI5KVu5L2E/O+1heLgPt/MTQ5uPpcF87l38V3LtrpoIG7pKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731431561; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZTNYZvFDLw2thCp9lCMp3Hfnll59T7/TNe81KOSSo80=; b=cXjEknAKmPOjlgSYVALfk68oVQ8PMfOJnYdqRBKcentRgwBTIzuSWeSy2FUvzmZWzDvvek 8c7QsWvBfgsXXoN/E/Km57/FdNDuV68BqGfDofw4OpDd7XimusFEtYXn9k6NRReFzlvfm+ 2PPc0Hn9oGETzTQExU2H+78cfcl5LAGwzTL7TaPGtifFV06eXDJkrVSV/if26v97/TROw6 o8JT/4uuEaUeOcTQiKKwmrBSslhWyo2NBxZzYOhWF/p1BdacyOiQegxJHmw7YI9X/RXYt/ 73W8yhaovTS7QYjQB9owd6wdyJ0CvSnjsA5Ct1z1Estdg78avVBnbVl50sX0gw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731431561; a=rsa-sha256; cv=none; b=O2mx8CaRoGuWautOke4DutJVmXwaHDefttSwcKGu1zetBfQYt9LW/j1z4oq9UhrCXi/h5f HybQ/9ETz/gn6tEstASFFhwpj2HuGUMIjY2c/EWzWsExmK1fi0GgHwIdCds3jsJ5Q/7E8H eoE765/2crzuhcLXLhjo21RezoQMJdqaBuqYEHY0aBVO7BHwQtA10uXrZHvaZu/uOawlxs M3nsYKXmmiPAprzxAS8VSbm5//gZq0empZQM3/iR1imADAntjfJZtrfYnSLGuba42MSC+7 QVYignhXC9Jr4Vu8oKAqIMOdmrfFlwWW0v7MQqVFHiouTUNimNxSmt6yrU9TyA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XntJn0WvLzKCw; Tue, 12 Nov 2024 17:12:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ACHCf1n014036; Tue, 12 Nov 2024 17:12:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ACHCexe014021; Tue, 12 Nov 2024 17:12:40 GMT (envelope-from git) Date: Tue, 12 Nov 2024 17:12:40 GMT Message-Id: <202411121712.4ACHCexe014021@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 3750ccefb862 - main - Retire MK_PROFILE infrastructure List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3750ccefb8629a08890bfbae894dd6bc6a7483b4 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=3750ccefb8629a08890bfbae894dd6bc6a7483b4 commit 3750ccefb8629a08890bfbae894dd6bc6a7483b4 Author: Ed Maste AuthorDate: 2021-08-08 01:00:28 +0000 Commit: Ed Maste CommitDate: 2024-11-12 17:11:51 +0000 Retire MK_PROFILE infrastructure It was disabled by default in fe52b7f60ef4. We planned to (but did not) remove the option before FreeBSD 14. Remove it now, for FreeBSD 15. Relnotes: Yes Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D31558 --- Makefile.inc1 | 11 +- ObsoleteFiles.inc | 183 ++++++++++++++++++++++++++++++ cddl/lib/libzpool/Makefile | 3 - lib/libc++experimental/Makefile | 1 - lib/libc_nonshared/Makefile | 1 - lib/libclang_rt/Makefile.inc | 1 - lib/libcompiler_rt/Makefile | 3 - lib/libiconv_modules/Makefile.inc | 1 - lib/libpam/libpam/Makefile | 2 - lib/libpam/modules/Makefile.inc | 1 - lib/libprocstat/Makefile | 2 - lib/librpcsec_gss/Makefile | 1 - lib/libssp_nonshared/Makefile | 1 - lib/libthr/Makefile | 3 - lib/libulog/Makefile | 3 - lib/ncurses/form/Makefile | 3 - lib/ncurses/menu/Makefile | 3 - lib/ncurses/ncurses/Makefile | 6 - lib/ncurses/panel/Makefile | 3 - lib/ncurses/tinfo/Makefile | 8 -- lib/ofed/complib/Makefile | 1 - lib/ofed/libbnxtre/Makefile | 1 - lib/ofed/libcxgb4/Makefile | 1 - lib/ofed/libibcm/Makefile | 1 - lib/ofed/libibmad/Makefile | 1 - lib/ofed/libibnetdisc/Makefile | 1 - lib/ofed/libibumad/Makefile | 1 - lib/ofed/libibverbs/Makefile | 1 - lib/ofed/libirdma/Makefile | 1 - lib/ofed/libmlx4/Makefile | 1 - lib/ofed/libmlx5/Makefile | 1 - lib/ofed/libopensm/Makefile | 1 - lib/ofed/librdmacm/Makefile | 1 - lib/ofed/libvendor/Makefile | 1 - release/Makefile | 4 +- sbin/nvmecontrol/modules/Makefile.inc | 1 - share/mk/bsd.lib.mk | 16 --- share/mk/bsd.opts.mk | 1 - stand/defs.mk | 1 - targets/pseudo/bootstrap-tools/Makefile | 1 - tools/build/mk/OptionalObsoleteFiles.inc | 184 ------------------------------- usr.bin/lex/lib/Makefile | 5 - 42 files changed, 189 insertions(+), 278 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 4bd85a8cbf04..ef63bfd52381 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -770,7 +770,6 @@ BSARGS= DESTDIR= \ MK_CLANG_FULL=no \ MK_HTML=no \ MK_MAN=no \ - MK_PROFILE=no \ MK_RETPOLINE=no \ MK_SSP=no \ MK_TESTS=no \ @@ -837,7 +836,6 @@ KTMAKE= ${TIME_ENV} \ MK_CTF=no \ MK_HTML=no \ MK_MAN=no \ - MK_PROFILE=no \ MK_SSP=no \ MK_RETPOLINE=no \ MK_WERROR=no @@ -1207,7 +1205,7 @@ _libraries: @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; \ ${WMAKE} -DNO_FSCHG MK_HTML=no -DNO_LINT MK_MAN=no \ - MK_PROFILE=no MK_TESTS=no MK_TESTS_SUPPORT=${MK_TESTS_SUPPORT} \ + MK_TESTS=no MK_TESTS_SUPPORT=${MK_TESTS_SUPPORT} \ libraries everything: .PHONY @echo @@ -3086,7 +3084,6 @@ NXBMAKEARGS+= \ MK_MAN_UTILS=yes \ MK_OFED=no \ MK_OPENSSH=no \ - MK_PROFILE=no \ MK_RETPOLINE=no \ MK_SENDMAIL=no \ MK_SSP=no \ @@ -3451,9 +3448,9 @@ ${_lib}__PL: .PHONY .MAKE ${_+_}@${ECHODIR} "===> ${_lib} (obj,all,install)"; \ cd ${.CURDIR}/${_lib}; \ if [ -z "${NO_OBJWALK}" ]; then ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ obj; fi; \ - ${MAKE} MK_TESTS=no MK_PROFILE=no -DNO_PIC \ + ${MAKE} MK_TESTS=no -DNO_PIC \ DIRPRFX=${_lib}/ all; \ - ${MAKE} MK_TESTS=no MK_PROFILE=no -DNO_PIC \ + ${MAKE} MK_TESTS=no -DNO_PIC \ DIRPRFX=${_lib}/ install .endif .endfor @@ -3756,7 +3753,7 @@ XDEV_CPUTYPE?=${TARGET_CPUTYPE} .endif NOFUN=-DNO_FSCHG MK_HTML=no -DNO_LINT \ - MK_MAN=no MK_NLS=no MK_PROFILE=no \ + MK_MAN=no MK_NLS=no \ MK_KERBEROS=no MK_RESCUE=no MK_TESTS=no MK_WERROR=no \ TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ CPUTYPE=${XDEV_CPUTYPE} diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 75414bd1a111..57e0f4609050 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,189 @@ # xargs -n1 | sort | uniq -d; # done +# 20241112: Retire MK_PROFILE support +OLD_FILES+=usr/lib/lib80211_p.a +OLD_FILES+=usr/lib/lib9p_p.a +OLD_FILES+=usr/lib/libBlocksRuntime_p.a +OLD_FILES+=usr/lib/libalias_dummy_p.a +OLD_FILES+=usr/lib/libalias_ftp_p.a +OLD_FILES+=usr/lib/libalias_irc_p.a +OLD_FILES+=usr/lib/libalias_nbt_p.a +OLD_FILES+=usr/lib/libalias_p.a +OLD_FILES+=usr/lib/libalias_pptp_p.a +OLD_FILES+=usr/lib/libalias_skinny_p.a +OLD_FILES+=usr/lib/libalias_smedia_p.a +OLD_FILES+=usr/lib/libarchive_p.a +OLD_FILES+=usr/lib/libasn1_p.a +OLD_FILES+=usr/lib/libauditd_p.a +OLD_FILES+=usr/lib/libavl_p.a +OLD_FILES+=usr/lib/libbe_p.a +OLD_FILES+=usr/lib/libbegemot_p.a +OLD_FILES+=usr/lib/libblacklist_p.a +OLD_FILES+=usr/lib/libbluetooth_p.a +OLD_FILES+=usr/lib/libbsdxml_p.a +OLD_FILES+=usr/lib/libbsm_p.a +OLD_FILES+=usr/lib/libbsnmp_p.a +OLD_FILES+=usr/lib/libbz2_p.a +OLD_FILES+=usr/lib/libc++_p.a +OLD_FILES+=usr/lib/libc_p.a +OLD_FILES+=usr/lib/libcalendar_p.a +OLD_FILES+=usr/lib/libcam_p.a +OLD_FILES+=usr/lib/libcom_err_p.a +OLD_FILES+=usr/lib/libcompat_p.a +OLD_FILES+=usr/lib/libcompiler_rt_p.a +OLD_FILES+=usr/lib/libcrypt_p.a +OLD_FILES+=usr/lib/libcrypto_p.a +OLD_FILES+=usr/lib/libctf_p.a +OLD_FILES+=usr/lib/libcurses_p.a +OLD_FILES+=usr/lib/libcursesw_p.a +OLD_FILES+=usr/lib/libcuse_p.a +OLD_FILES+=usr/lib/libcxxrt_p.a +OLD_FILES+=usr/lib/libdevctl_p.a +OLD_FILES+=usr/lib/libdevinfo_p.a +OLD_FILES+=usr/lib/libdevstat_p.a +OLD_FILES+=usr/lib/libdialog_p.a +OLD_FILES+=usr/lib/libdl_p.a +OLD_FILES+=usr/lib/libdpv_p.a +OLD_FILES+=usr/lib/libdtrace_p.a +OLD_FILES+=usr/lib/libdwarf_p.a +OLD_FILES+=usr/lib/libedit_p.a +OLD_FILES+=usr/lib/libefivar_p.a +OLD_FILES+=usr/lib/libelf_p.a +OLD_FILES+=usr/lib/libexecinfo_p.a +OLD_FILES+=usr/lib/libfetch_p.a +OLD_FILES+=usr/lib/libfigpar_p.a +OLD_FILES+=usr/lib/libfl_p.a +OLD_FILES+=usr/lib/libform_p.a +OLD_FILES+=usr/lib/libformw_p.a +OLD_FILES+=usr/lib/libgcc_eh_p.a +OLD_FILES+=usr/lib/libgcc_p.a +OLD_FILES+=usr/lib/libgeom_p.a +OLD_FILES+=usr/lib/libgpio_p.a +OLD_FILES+=usr/lib/libgssapi_krb5_p.a +OLD_FILES+=usr/lib/libgssapi_ntlm_p.a +OLD_FILES+=usr/lib/libgssapi_p.a +OLD_FILES+=usr/lib/libgssapi_spnego_p.a +OLD_FILES+=usr/lib/libhdb_p.a +OLD_FILES+=usr/lib/libheimbase_p.a +OLD_FILES+=usr/lib/libheimntlm_p.a +OLD_FILES+=usr/lib/libheimsqlite_p.a +OLD_FILES+=usr/lib/libhistory_p.a +OLD_FILES+=usr/lib/libhx509_p.a +OLD_FILES+=usr/lib/libicp_p.a +OLD_FILES+=usr/lib/libicp_rescue_p.a +OLD_FILES+=usr/lib/libipsec_p.a +OLD_FILES+=usr/lib/libipt_p.a +OLD_FILES+=usr/lib/libjail_p.a +OLD_FILES+=usr/lib/libkadm5clnt_p.a +OLD_FILES+=usr/lib/libkadm5srv_p.a +OLD_FILES+=usr/lib/libkafs5_p.a +OLD_FILES+=usr/lib/libkdc_p.a +OLD_FILES+=usr/lib/libkiconv_p.a +OLD_FILES+=usr/lib/libkrb5_p.a +OLD_FILES+=usr/lib/libkvm_p.a +OLD_FILES+=usr/lib/libl_p.a +OLD_FILES+=usr/lib/libln_p.a +OLD_FILES+=usr/lib/liblzma_p.a +OLD_FILES+=usr/lib/libm_p.a +OLD_FILES+=usr/lib/libmagic_p.a +OLD_FILES+=usr/lib/libmd_p.a +OLD_FILES+=usr/lib/libmemstat_p.a +OLD_FILES+=usr/lib/libmenu_p.a +OLD_FILES+=usr/lib/libmenuw_p.a +OLD_FILES+=usr/lib/libmilter_p.a +OLD_FILES+=usr/lib/libmp_p.a +OLD_FILES+=usr/lib/libmt_p.a +OLD_FILES+=usr/lib/libncurses_p.a +OLD_FILES+=usr/lib/libncursesw_p.a +OLD_FILES+=usr/lib/libnetgraph_p.a +OLD_FILES+=usr/lib/libnetmap_p.a +OLD_FILES+=usr/lib/libnss_tacplus_p.a +OLD_FILES+=usr/lib/libnv_p.a +OLD_FILES+=usr/lib/libnvpair_p.a +OLD_FILES+=usr/lib/libopencsd_p.a +OLD_FILES+=usr/lib/libopie_p.a +OLD_FILES+=usr/lib/libpanel_p.a +OLD_FILES+=usr/lib/libpanelw_p.a +OLD_FILES+=usr/lib/libpathconv_p.a +OLD_FILES+=usr/lib/libpcap_p.a +OLD_FILES+=usr/lib/libpjdlog_p.a +OLD_FILES+=usr/lib/libpmc_p.a +OLD_FILES+=usr/lib/libprivateatf-c++_p.a +OLD_FILES+=usr/lib/libprivateatf-c_p.a +OLD_FILES+=usr/lib/libprivateauditd_p.a +OLD_FILES+=usr/lib/libprivatebsdstat_p.a +OLD_FILES+=usr/lib/libprivatecbor_p.a +OLD_FILES+=usr/lib/libprivatedevdctl_p.a +OLD_FILES+=usr/lib/libprivateevent_p.a +OLD_FILES+=usr/lib/libprivateevent1_p.a +OLD_FILES+=usr/lib/libprivatefido2_p.a +OLD_FILES+=usr/lib/libprivategmock_main_p.a +OLD_FILES+=usr/lib/libprivategmock_p.a +OLD_FILES+=usr/lib/libprivategtest_main_p.a +OLD_FILES+=usr/lib/libprivategtest_p.a +OLD_FILES+=usr/lib/libprivateheimipcc_p.a +OLD_FILES+=usr/lib/libprivateheimipcs_p.a +OLD_FILES+=usr/lib/libprivateifconfig_p.a +OLD_FILES+=usr/lib/libprivateldns_p.a +OLD_FILES+=usr/lib/libprivatesqlite3_p.a +OLD_FILES+=usr/lib/libprivatessh_p.a +OLD_FILES+=usr/lib/libprivateucl_p.a +OLD_FILES+=usr/lib/libprivateunbound_p.a +OLD_FILES+=usr/lib/libprivatezstd_p.a +OLD_FILES+=usr/lib/libproc_p.a +OLD_FILES+=usr/lib/libprocstat_p.a +OLD_FILES+=usr/lib/libpthread_p.a +OLD_FILES+=usr/lib/libradius_p.a +OLD_FILES+=usr/lib/libregex_p.a +OLD_FILES+=usr/lib/libroken_p.a +OLD_FILES+=usr/lib/librpcsvc_p.a +OLD_FILES+=usr/lib/librss_p.a +OLD_FILES+=usr/lib/librt_p.a +OLD_FILES+=usr/lib/librtld_db_p.a +OLD_FILES+=usr/lib/libsbuf_p.a +OLD_FILES+=usr/lib/libsdp_p.a +OLD_FILES+=usr/lib/libsmb_p.a +OLD_FILES+=usr/lib/libspl_p.a +OLD_FILES+=usr/lib/libssl_p.a +OLD_FILES+=usr/lib/libstats_p.a +OLD_FILES+=usr/lib/libstdbuf_p.a +OLD_FILES+=usr/lib/libstdc++_p.a +OLD_FILES+=usr/lib/libstdthreads_p.a +OLD_FILES+=usr/lib/libsupc++_p.a +OLD_FILES+=usr/lib/libsysdecode_p.a +OLD_FILES+=usr/lib/libtacplus_p.a +OLD_FILES+=usr/lib/libtermcap_p.a +OLD_FILES+=usr/lib/libtermcapw_p.a +OLD_FILES+=usr/lib/libtermlib_p.a +OLD_FILES+=usr/lib/libtermlibw_p.a +OLD_FILES+=usr/lib/libthr_p.a +OLD_FILES+=usr/lib/libthread_db_p.a +OLD_FILES+=usr/lib/libtinfo_p.a +OLD_FILES+=usr/lib/libtinfow_p.a +OLD_FILES+=usr/lib/libtpool_p.a +OLD_FILES+=usr/lib/libufs_p.a +OLD_FILES+=usr/lib/libugidfw_p.a +OLD_FILES+=usr/lib/libulog_p.a +OLD_FILES+=usr/lib/libumem_p.a +OLD_FILES+=usr/lib/libusb_p.a +OLD_FILES+=usr/lib/libusbhid_p.a +OLD_FILES+=usr/lib/libutempter_p.a +OLD_FILES+=usr/lib/libutil_p.a +OLD_FILES+=usr/lib/libuutil_p.a +OLD_FILES+=usr/lib/libvgl_p.a +OLD_FILES+=usr/lib/libvmmapi_p.a +OLD_FILES+=usr/lib/libwind_p.a +OLD_FILES+=usr/lib/libwrap_p.a +OLD_FILES+=usr/lib/libxo_p.a +OLD_FILES+=usr/lib/liby_p.a +OLD_FILES+=usr/lib/libypclnt_p.a +OLD_FILES+=usr/lib/libz_p.a +OLD_FILES+=usr/lib/libzfs_core_p.a +OLD_FILES+=usr/lib/libzfs_p.a +OLD_FILES+=usr/lib/libzfsbootenv_p.a +OLD_FILES+=usr/lib/libzutil_p.a + # 20241112: move p9fs from section 5 to section 4 OLD_FILES+=usr/share/man/man5/p9fs.5.gz diff --git a/cddl/lib/libzpool/Makefile b/cddl/lib/libzpool/Makefile index 4c8285eedb2d..a73c9754ebbb 100644 --- a/cddl/lib/libzpool/Makefile +++ b/cddl/lib/libzpool/Makefile @@ -283,9 +283,6 @@ CFLAGS.gcc+= -fms-extensions LIBADD= md pthread z spl icp nvpair avl umem -# atomic.S doesn't like profiling. -MK_PROFILE= no - CSTD= c99 # Since there are many asserts in this library, it makes no sense to compile diff --git a/lib/libc++experimental/Makefile b/lib/libc++experimental/Makefile index 733bb8946900..02551645ca74 100644 --- a/lib/libc++experimental/Makefile +++ b/lib/libc++experimental/Makefile @@ -5,7 +5,6 @@ SRCDIR= ${SRCTOP}/contrib/llvm-project/libcxx LIB= c++experimental NO_PIC= -MK_PROFILE= no .PATH: ${SRCDIR}/src diff --git a/lib/libc_nonshared/Makefile b/lib/libc_nonshared/Makefile index 840dc3b8c291..90c3b756b0a5 100644 --- a/lib/libc_nonshared/Makefile +++ b/lib/libc_nonshared/Makefile @@ -2,7 +2,6 @@ # It is used exclusively with libc.so.* - there is no need for any other # compile modes. # bsd.lib.mk doesn't have an easy way to express that. -MK_PROFILE?=no .include NO_PIC= # -fpic on some platforms, -fPIC on others. diff --git a/lib/libclang_rt/Makefile.inc b/lib/libclang_rt/Makefile.inc index e351d6ebef9d..c472e8b741be 100644 --- a/lib/libclang_rt/Makefile.inc +++ b/lib/libclang_rt/Makefile.inc @@ -10,7 +10,6 @@ LIBDIR= ${SANITIZER_LIBDIR} SHLIBDIR= ${LIBDIR} NO_PIC= -MK_PROFILE= no MK_ASAN:= no MK_SSP= no MK_UBSAN:= no diff --git a/lib/libcompiler_rt/Makefile b/lib/libcompiler_rt/Makefile index 3543ce5728d7..08467bbec310 100644 --- a/lib/libcompiler_rt/Makefile +++ b/lib/libcompiler_rt/Makefile @@ -40,8 +40,5 @@ ${lse_name}: lse.S .if ${MK_INSTALLLIB} != "no" SYMLINKS+= libcompiler_rt.a ${LIBDIR}/libgcc.a .endif -.if ${MK_PROFILE} != "no" -SYMLINKS+= libcompiler_rt_p.a ${LIBDIR}/libgcc_p.a -.endif .include diff --git a/lib/libiconv_modules/Makefile.inc b/lib/libiconv_modules/Makefile.inc index ba2ccb0dd270..196f3bde8b32 100644 --- a/lib/libiconv_modules/Makefile.inc +++ b/lib/libiconv_modules/Makefile.inc @@ -7,4 +7,3 @@ CFLAGS+= -Dbool=_Bool SHLIBDIR= /usr/lib${COMPAT_libcompat:U}/i18n LIBDIR= ${SHLIBDIR} -MK_PROFILE= no diff --git a/lib/libpam/libpam/Makefile b/lib/libpam/libpam/Makefile index f7108252b974..9bd855f60ed8 100644 --- a/lib/libpam/libpam/Makefile +++ b/lib/libpam/libpam/Makefile @@ -44,8 +44,6 @@ SHLIB= pam PACKAGE= runtime -MK_PROFILE=no - SRCS= openpam_asprintf.c \ openpam_borrow_cred.c \ openpam_check_owner_perms.c \ diff --git a/lib/libpam/modules/Makefile.inc b/lib/libpam/modules/Makefile.inc index dc701f921077..2e66aec64f07 100644 --- a/lib/libpam/modules/Makefile.inc +++ b/lib/libpam/modules/Makefile.inc @@ -1,7 +1,6 @@ PAMDIR= ${SRCTOP}/contrib/openpam MK_INSTALLLIB= no -MK_PROFILE= no CFLAGS+= -I${PAMDIR}/include -I${SRCTOP}/lib/libpam diff --git a/lib/libprocstat/Makefile b/lib/libprocstat/Makefile index d1b15b47eb83..229adc6015f7 100644 --- a/lib/libprocstat/Makefile +++ b/lib/libprocstat/Makefile @@ -64,8 +64,6 @@ zfs/zfs_defs.pico: .PHONY @cd ${.CURDIR}/zfs && ${MAKE} zfs_defs.pico zfs/zfs_defs.pieo: .PHONY @cd ${.CURDIR}/zfs && ${MAKE} zfs_defs.pieo -zfs/zfs_defs.po: .PHONY - @cd ${.CURDIR}/zfs && ${MAKE} zfs_defs.po .endif .include diff --git a/lib/librpcsec_gss/Makefile b/lib/librpcsec_gss/Makefile index 9b04340c8eb0..a29d9780c1ab 100644 --- a/lib/librpcsec_gss/Makefile +++ b/lib/librpcsec_gss/Makefile @@ -11,7 +11,6 @@ SYMBOL_MAPS= ${.CURDIR}/Symbol.map CFLAGS+= -I${SRCTOP}/include CFLAGS+= -I${SRCTOP}/lib/libc_rpc -MK_PROFILE= no MAN= rpcsec_gss.3 MAN+= rpc_gss_seccreate.3 diff --git a/lib/libssp_nonshared/Makefile b/lib/libssp_nonshared/Makefile index 8bad8722a5b9..c156d0ae8007 100644 --- a/lib/libssp_nonshared/Makefile +++ b/lib/libssp_nonshared/Makefile @@ -1,7 +1,6 @@ PACKAGE= clibs LIB= ssp_nonshared NO_PIC= -MK_PROFILE= no SRCS= libssp_nonshared.c CFLAGS+= -fPIC diff --git a/lib/libthr/Makefile b/lib/libthr/Makefile index 88ccecdeba29..19afa93f12be 100644 --- a/lib/libthr/Makefile +++ b/lib/libthr/Makefile @@ -91,9 +91,6 @@ SYMLINKS+=lib${LIB}.a ${LIBDIR}/libpthread.a .if !defined(NO_PIC) SYMLINKS+=lib${LIB}.so ${LIBDIR}/libpthread.so .endif -.if ${MK_PROFILE} != "no" -SYMLINKS+=lib${LIB}_p.a ${LIBDIR}/libpthread_p.a -.endif HAS_TESTS= SUBDIR.${MK_TESTS}+= tests diff --git a/lib/libulog/Makefile b/lib/libulog/Makefile index 22138a09a9fa..af26b485bf18 100644 --- a/lib/libulog/Makefile +++ b/lib/libulog/Makefile @@ -28,8 +28,5 @@ SYMLINKS+=libulog.a ${LIBDIR}/libutempter.a .if !defined(NO_PIC) SYMLINKS+=libulog.so ${LIBDIR}/libutempter.so .endif -.if ${MK_PROFILE} != "no" -SYMLINKS+=libulog_p.a ${LIBDIR}/libutempter_p.a -.endif .include diff --git a/lib/ncurses/form/Makefile b/lib/ncurses/form/Makefile index aaa3be9f3c0f..d4774a5f51a8 100644 --- a/lib/ncurses/form/Makefile +++ b/lib/ncurses/form/Makefile @@ -166,9 +166,6 @@ SYMLINKS+= libformw.a ${LIBDIR}/libform.a .if !defined(NO_PIC) SYMLINKS+= libformw.so ${LIBDIR}/libform.so .endif -.if ${MK_PROFILE} != "no" -SYMLINKS+= libformw_p.a ${LIBDIR}/libform_p.a -.endif .include diff --git a/lib/ncurses/menu/Makefile b/lib/ncurses/menu/Makefile index 0864da644bdf..793ee60c3a3e 100644 --- a/lib/ncurses/menu/Makefile +++ b/lib/ncurses/menu/Makefile @@ -135,9 +135,6 @@ SYMLINKS+= libmenuw.a ${LIBDIR}/libmenu.a .if !defined(NO_PIC) SYMLINKS+= libmenuw.so ${LIBDIR}/libmenu.so .endif -.if ${MK_PROFILE} != "no" -SYMLINKS+= libmenuw_p.a ${LIBDIR}/libmenu_p.a -.endif .include diff --git a/lib/ncurses/ncurses/Makefile b/lib/ncurses/ncurses/Makefile index ad3f20f5f72c..254f05a1e740 100644 --- a/lib/ncurses/ncurses/Makefile +++ b/lib/ncurses/ncurses/Makefile @@ -160,12 +160,6 @@ SYMLINKS+= libncursesw.so ${LIBDIR}/libcursesw.so SYMLINKS+= libncursesw.so ${LIBDIR}/libncurses.so SYMLINKS+= libncursesw.so ${LIBDIR}/libcurses.so .endif -.if ${MK_PROFILE} != "no" -SYMLINKS+= libncursesw_p.a ${LIBDIR}/libcursesw_p.a -# backward compat -SYMLINKS+= libncursesw_p.a ${LIBDIR}/libncurses_p.a -SYMLINKS+= libncursesw_p.a ${LIBDIR}/libcurses_p.a -.endif LIBADD+= tinfow SHLIB_LDSCRIPT= libncursesw.ldscript diff --git a/lib/ncurses/panel/Makefile b/lib/ncurses/panel/Makefile index 93b07bf9b7d6..a51129df42e3 100644 --- a/lib/ncurses/panel/Makefile +++ b/lib/ncurses/panel/Makefile @@ -62,9 +62,6 @@ SYMLINKS+= libpanelw.a ${LIBDIR}/libpanel.a .if !defined(NO_PIC) SYMLINKS+= libpanelw.so ${LIBDIR}/libpanel.so .endif -.if ${MK_PROFILE} != "no" -SYMLINKS+= libpanelw_p.a ${LIBDIR}/libpanel_p.a -.endif INCS= panel.h .include diff --git a/lib/ncurses/tinfo/Makefile b/lib/ncurses/tinfo/Makefile index ea06e7bec03f..e11d0e15245e 100644 --- a/lib/ncurses/tinfo/Makefile +++ b/lib/ncurses/tinfo/Makefile @@ -195,14 +195,6 @@ SYMLINKS+= libtinfow.so ${LIBDIR}/libtermcap.so SYMLINKS+= libtinfow.so ${LIBDIR}/libtermlib.so SYMLINKS+= libtinfow.so ${LIBDIR}/libtinfo.so .endif -.if ${MK_PROFILE} != "no" -SYMLINKS+= libtinfow_p.a ${LIBDIR}/libtermcapw_p.a -SYMLINKS+= libtinfow_p.a ${LIBDIR}/libtermlibw_p.a -# backward compat -SYMLINKS+= libtinfow_p.a ${LIBDIR}/libtermcap_p.a -SYMLINKS+= libtinfow_p.a ${LIBDIR}/libtermlib_p.a -SYMLINKS+= libtinfow_p.a ${LIBDIR}/libtinfo_p.a -.endif DOCSDIR= ${SHAREDIR}/doc/ncurses DOCS= ncurses-intro.html hackguide.html diff --git a/lib/ofed/complib/Makefile b/lib/ofed/complib/Makefile index e900bc2b9a3f..43019e6ba5e0 100644 --- a/lib/ofed/complib/Makefile +++ b/lib/ofed/complib/Makefile @@ -4,7 +4,6 @@ _spath= ${SRCTOP}/contrib/ofed/opensm/complib SHLIBDIR?= /usr/lib LIB= osmcomp SHLIB_MAJOR= 3 -MK_PROFILE= no SRCS= \ cl_complib.c \ diff --git a/lib/ofed/libbnxtre/Makefile b/lib/ofed/libbnxtre/Makefile index e78f2a93ba44..f73099a44915 100755 --- a/lib/ofed/libbnxtre/Makefile +++ b/lib/ofed/libbnxtre/Makefile @@ -4,7 +4,6 @@ SPATH= ${SRCTOP}/contrib/ofed/libbnxtre SHLIBDIR?= /lib LIB= bnxtre SHLIB_MAJOR= 1 -MK_PROFILE= no SRCS= main.c db.c memory.c verbs.c diff --git a/lib/ofed/libcxgb4/Makefile b/lib/ofed/libcxgb4/Makefile index da831be6ebba..7c50e47ceec7 100644 --- a/lib/ofed/libcxgb4/Makefile +++ b/lib/ofed/libcxgb4/Makefile @@ -4,7 +4,6 @@ _spath= ${SRCTOP}/contrib/ofed/libcxgb4 SHLIBDIR?= /usr/lib LIB= cxgb4 SHLIB_MAJOR= 1 -MK_PROFILE= no SRCS= \ cq.c \ diff --git a/lib/ofed/libibcm/Makefile b/lib/ofed/libibcm/Makefile index ba8c2e8adf11..04f124d06167 100644 --- a/lib/ofed/libibcm/Makefile +++ b/lib/ofed/libibcm/Makefile @@ -4,7 +4,6 @@ _spath= ${SRCTOP}/contrib/ofed/libibcm SHLIBDIR?= /usr/lib LIB= ibcm SHLIB_MAJOR= 1 -MK_PROFILE= no SRCS= cm.c LIBADD= ibverbs CFLAGS+= -I${_spath} diff --git a/lib/ofed/libibmad/Makefile b/lib/ofed/libibmad/Makefile index 985efda634f1..298bb7dffbfe 100644 --- a/lib/ofed/libibmad/Makefile +++ b/lib/ofed/libibmad/Makefile @@ -4,7 +4,6 @@ _spath= ${SRCTOP}/contrib/ofed/libibmad SHLIBDIR?= /usr/lib LIB= ibmad SHLIB_MAJOR= 5 -MK_PROFILE= no SRCS= \ bm.c \ diff --git a/lib/ofed/libibnetdisc/Makefile b/lib/ofed/libibnetdisc/Makefile index d471189cb7c9..d3e0dd92509a 100644 --- a/lib/ofed/libibnetdisc/Makefile +++ b/lib/ofed/libibnetdisc/Makefile @@ -6,7 +6,6 @@ _spath= ${SRCTOP}/contrib/ofed/libibnetdisc SHLIBDIR?= /usr/lib LIB_CXX= ibnetdisc SHLIB_MAJOR= 5 -MK_PROFILE= no SRCS= \ chassis.c \ diff --git a/lib/ofed/libibumad/Makefile b/lib/ofed/libibumad/Makefile index 7d12e5cfa388..46e69012ba72 100644 --- a/lib/ofed/libibumad/Makefile +++ b/lib/ofed/libibumad/Makefile @@ -4,7 +4,6 @@ _spath= ${SRCTOP}/contrib/ofed/libibumad SHLIBDIR?= /usr/lib LIB= ibumad SHLIB_MAJOR= 1 -MK_PROFILE= no SRCS= \ umad.c \ umad_str.c \ diff --git a/lib/ofed/libibverbs/Makefile b/lib/ofed/libibverbs/Makefile index d336c40363d2..96e90c6615e2 100644 --- a/lib/ofed/libibverbs/Makefile +++ b/lib/ofed/libibverbs/Makefile @@ -4,7 +4,6 @@ _spath= ${SRCTOP}/contrib/ofed/libibverbs LIB= ibverbs SHLIB_MAJOR= 1 SHLIBDIR?= /lib -MK_PROFILE= no VERSION_MAP= ${_spath}/libibverbs.map CFLAGS+= -I${_spath} diff --git a/lib/ofed/libirdma/Makefile b/lib/ofed/libirdma/Makefile index 349590672b44..6629e8c2d6aa 100644 --- a/lib/ofed/libirdma/Makefile +++ b/lib/ofed/libirdma/Makefile @@ -6,7 +6,6 @@ lin_inc=/usr/src/sys/compat/linuxkpi/common/include SHLIBDIR?= /lib LIB= irdma SHLIB_MAJOR= 1 -MK_PROFILE= no SRCS= \ irdma_umain.c \ diff --git a/lib/ofed/libmlx4/Makefile b/lib/ofed/libmlx4/Makefile index cd4dccb99168..1b1dd07dbc23 100644 --- a/lib/ofed/libmlx4/Makefile +++ b/lib/ofed/libmlx4/Makefile @@ -4,7 +4,6 @@ _spath= ${SRCTOP}/contrib/ofed/libmlx4 SHLIBDIR?= /usr/lib LIB= mlx4 SHLIB_MAJOR= 1 -MK_PROFILE= no SRCS= \ buf.c \ diff --git a/lib/ofed/libmlx5/Makefile b/lib/ofed/libmlx5/Makefile index 38700bb7b9ee..72981091bed8 100644 --- a/lib/ofed/libmlx5/Makefile +++ b/lib/ofed/libmlx5/Makefile @@ -4,7 +4,6 @@ _spath= ${SRCTOP}/contrib/ofed/libmlx5 SHLIBDIR?= /lib LIB= mlx5 SHLIB_MAJOR= 1 -MK_PROFILE= no SRCS= \ buf.c \ diff --git a/lib/ofed/libopensm/Makefile b/lib/ofed/libopensm/Makefile index 11179a758609..a7133064977b 100644 --- a/lib/ofed/libopensm/Makefile +++ b/lib/ofed/libopensm/Makefile @@ -4,7 +4,6 @@ _spath= ${SRCTOP}/contrib/ofed/opensm/opensm SHLIBDIR?= /usr/lib LIB= opensm SHLIB_MAJOR= 5 -MK_PROFILE= no SRCS= \ osm_log.c \ diff --git a/lib/ofed/librdmacm/Makefile b/lib/ofed/librdmacm/Makefile index 37b79d56513c..8c86bada22f9 100644 --- a/lib/ofed/librdmacm/Makefile +++ b/lib/ofed/librdmacm/Makefile @@ -4,7 +4,6 @@ _spath= ${SRCTOP}/contrib/ofed/librdmacm SHLIBDIR?= /usr/lib LIB= rdmacm SHLIB_MAJOR= 1 -MK_PROFILE= no CFLAGS+= -I${_spath} SRCS= \ diff --git a/lib/ofed/libvendor/Makefile b/lib/ofed/libvendor/Makefile index 8082a866e9fb..c78e9da07e5f 100644 --- a/lib/ofed/libvendor/Makefile +++ b/lib/ofed/libvendor/Makefile @@ -4,7 +4,6 @@ _spath= ${SRCTOP}/contrib/ofed/opensm/libvendor SHLIBDIR?= /usr/lib LIB= osmvendor SHLIB_MAJOR= 4 -MK_PROFILE= no SRCS= \ osm_vendor_ibumad.c \ diff --git a/release/Makefile b/release/Makefile index 85da63b0c49a..bd130082a9ce 100644 --- a/release/Makefile +++ b/release/Makefile @@ -165,7 +165,7 @@ disc1: packagesystem DESTDIR=${.OBJDIR}/${.TARGET} MK_AT=no \ MK_INSTALLLIB=no MK_MAIL=no \ ${_ALL_LIBCOMPATS:@v@MK_LIB$v=no@} \ - MK_TOOLCHAIN=no MK_PROFILE=no \ + MK_TOOLCHAIN=no \ MK_RESCUE=no MK_DICT=no \ MK_KERNEL_SYMBOLS=no MK_TESTS=no MK_DEBUG_FILES=no \ -DDB_FROM_SRC ) @@ -206,7 +206,7 @@ bootonly: packagesystem MK_GAMES=no \ MK_INSTALLLIB=no MK_MAIL=no \ ${_ALL_LIBCOMPATS:@v@MK_LIB$v=no@} \ - MK_TOOLCHAIN=no MK_PROFILE=no \ + MK_TOOLCHAIN=no \ MK_RESCUE=no MK_DICT=no \ MK_KERNEL_SYMBOLS=no MK_TESTS=no MK_DEBUG_FILES=no \ -DDB_FROM_SRC ) diff --git a/sbin/nvmecontrol/modules/Makefile.inc b/sbin/nvmecontrol/modules/Makefile.inc index d88927501437..030b488e44e0 100644 --- a/sbin/nvmecontrol/modules/Makefile.inc +++ b/sbin/nvmecontrol/modules/Makefile.inc @@ -2,7 +2,6 @@ PACKAGE=nvme-tools NVMECONTROLDIR= ${SRCTOP}/sbin/nvmecontrol MK_INSTALLLIB= no -MK_PROFILE= no CFLAGS+= -I${NVMECONTROLDIR} diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index 6e288b9cd4ce..06afa8630a20 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -297,18 +297,6 @@ lib${LIB_PRIVATE}${LIB}${_STATICLIB_SUFFIX}.a: ${OBJS} ${STATICOBJS} .if !defined(INTERNALLIB) -.if ${MK_PROFILE} != "no" && defined(LIB) && !empty(LIB) -_LIBS+= lib${LIB_PRIVATE}${LIB}_p.a -POBJS+= ${OBJS:.o=.po} ${STATICOBJS:.o=.po} -DEPENDOBJS+= ${POBJS} -CLEANFILES+= ${POBJS} - -lib${LIB_PRIVATE}${LIB}_p.a: ${POBJS} - @${ECHO} building profiled ${LIB} library - @rm -f ${.TARGET} - ${AR} ${ARFLAGS} ${.TARGET} ${POBJS} ${ARADD} -.endif - .if defined(LLVM_LINK) lib${LIB_PRIVATE}${LIB}.bc: ${BCOBJS} ${LLVM_LINK} -o ${.TARGET} ${BCOBJS} @@ -495,10 +483,6 @@ _libinstall: .if defined(LIB) && !empty(LIB) && ${MK_INSTALLLIB} != "no" ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},dev} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ ${_INSTALLFLAGS} lib${LIB_PRIVATE}${LIB}${_STATICLIB_SUFFIX}.a ${DESTDIR}${_LIBDIR}/ -.if ${MK_PROFILE} != "no" - ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},dev} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ - ${_INSTALLFLAGS} lib${LIB_PRIVATE}${LIB}_p.a ${DESTDIR}${_LIBDIR}/ -.endif .endif .if defined(SHLIB_NAME) ${INSTALL} ${TAG_ARGS} ${STRIP} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ diff --git a/share/mk/bsd.opts.mk b/share/mk/bsd.opts.mk index 136215a2db47..c05de9b079ce 100644 --- a/share/mk/bsd.opts.mk +++ b/share/mk/bsd.opts.mk @@ -78,7 +78,6 @@ __DEFAULT_NO_OPTIONS = \ CCACHE_BUILD \ CTF \ INSTALL_AS_USER \ - PROFILE \ RETPOLINE \ STALE_STAGED \ UBSAN \ diff --git a/stand/defs.mk b/stand/defs.mk index 0e84df0f4633..fa3c89a4c3cc 100644 --- a/stand/defs.mk +++ b/stand/defs.mk @@ -10,7 +10,6 @@ FORTIFY_SOURCE= 0 MK_CTF= no MK_SSP= no -MK_PROFILE= no MK_PIE= no MAN= .if !defined(PIC) diff --git a/targets/pseudo/bootstrap-tools/Makefile b/targets/pseudo/bootstrap-tools/Makefile index f3ed985e14b9..d342af4ff9f9 100644 --- a/targets/pseudo/bootstrap-tools/Makefile +++ b/targets/pseudo/bootstrap-tools/Makefile @@ -47,7 +47,6 @@ BSARGS= DESTDIR= \ MK_CLANG_FULL=no \ MK_HTML=no \ MK_MAN=no \ - MK_PROFILE=no \ MK_RETPOLINE=no \ MK_SSP=no \ MK_TESTS=no \ diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index c03611c976a6..e326155b26a4 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -6850,190 +6850,6 @@ OLD_FILES+=usr/share/man/man8/ppp.8.gz OLD_FILES+=usr/share/man/man8/pppctl.8.gz .endif -.if ${MK_PROFILE} == no -OLD_FILES+=usr/lib/lib80211_p.a -OLD_FILES+=usr/lib/lib9p_p.a -OLD_FILES+=usr/lib/libBlocksRuntime_p.a -OLD_FILES+=usr/lib/libalias_dummy_p.a -OLD_FILES+=usr/lib/libalias_ftp_p.a -OLD_FILES+=usr/lib/libalias_irc_p.a -OLD_FILES+=usr/lib/libalias_nbt_p.a -OLD_FILES+=usr/lib/libalias_p.a -OLD_FILES+=usr/lib/libalias_pptp_p.a -OLD_FILES+=usr/lib/libalias_skinny_p.a -OLD_FILES+=usr/lib/libalias_smedia_p.a -OLD_FILES+=usr/lib/libarchive_p.a -OLD_FILES+=usr/lib/libasn1_p.a -OLD_FILES+=usr/lib/libauditd_p.a -OLD_FILES+=usr/lib/libavl_p.a -OLD_FILES+=usr/lib/libbe_p.a -OLD_FILES+=usr/lib/libbegemot_p.a -OLD_FILES+=usr/lib/libblacklist_p.a -OLD_FILES+=usr/lib/libbluetooth_p.a -OLD_FILES+=usr/lib/libbsdxml_p.a -OLD_FILES+=usr/lib/libbsm_p.a -OLD_FILES+=usr/lib/libbsnmp_p.a -OLD_FILES+=usr/lib/libbz2_p.a -OLD_FILES+=usr/lib/libc++_p.a -OLD_FILES+=usr/lib/libc_p.a -OLD_FILES+=usr/lib/libcalendar_p.a -OLD_FILES+=usr/lib/libcam_p.a -OLD_FILES+=usr/lib/libcom_err_p.a -OLD_FILES+=usr/lib/libcompat_p.a -OLD_FILES+=usr/lib/libcompiler_rt_p.a -OLD_FILES+=usr/lib/libcrypt_p.a -OLD_FILES+=usr/lib/libcrypto_p.a -OLD_FILES+=usr/lib/libctf_p.a -OLD_FILES+=usr/lib/libcurses_p.a -OLD_FILES+=usr/lib/libcursesw_p.a -OLD_FILES+=usr/lib/libcuse_p.a -OLD_FILES+=usr/lib/libcxxrt_p.a -OLD_FILES+=usr/lib/libdevctl_p.a -OLD_FILES+=usr/lib/libdevinfo_p.a -OLD_FILES+=usr/lib/libdevstat_p.a -OLD_FILES+=usr/lib/libdialog_p.a -OLD_FILES+=usr/lib/libdl_p.a -OLD_FILES+=usr/lib/libdpv_p.a -OLD_FILES+=usr/lib/libdtrace_p.a -OLD_FILES+=usr/lib/libdwarf_p.a -OLD_FILES+=usr/lib/libedit_p.a -OLD_FILES+=usr/lib/libefivar_p.a -OLD_FILES+=usr/lib/libelf_p.a -OLD_FILES+=usr/lib/libexecinfo_p.a -OLD_FILES+=usr/lib/libfetch_p.a -OLD_FILES+=usr/lib/libfigpar_p.a -OLD_FILES+=usr/lib/libfl_p.a -OLD_FILES+=usr/lib/libform_p.a -OLD_FILES+=usr/lib/libformw_p.a -OLD_FILES+=usr/lib/libgcc_eh_p.a -OLD_FILES+=usr/lib/libgcc_p.a -OLD_FILES+=usr/lib/libgeom_p.a -OLD_FILES+=usr/lib/libgpio_p.a -OLD_FILES+=usr/lib/libgssapi_krb5_p.a -OLD_FILES+=usr/lib/libgssapi_ntlm_p.a -OLD_FILES+=usr/lib/libgssapi_p.a -OLD_FILES+=usr/lib/libgssapi_spnego_p.a -OLD_FILES+=usr/lib/libhdb_p.a -OLD_FILES+=usr/lib/libheimbase_p.a -OLD_FILES+=usr/lib/libheimntlm_p.a -OLD_FILES+=usr/lib/libheimsqlite_p.a -OLD_FILES+=usr/lib/libhistory_p.a -OLD_FILES+=usr/lib/libhx509_p.a -OLD_FILES+=usr/lib/libicp_p.a -OLD_FILES+=usr/lib/libicp_rescue_p.a -OLD_FILES+=usr/lib/libipsec_p.a -OLD_FILES+=usr/lib/libipt_p.a -OLD_FILES+=usr/lib/libjail_p.a -OLD_FILES+=usr/lib/libkadm5clnt_p.a -OLD_FILES+=usr/lib/libkadm5srv_p.a -OLD_FILES+=usr/lib/libkafs5_p.a -OLD_FILES+=usr/lib/libkdc_p.a -OLD_FILES+=usr/lib/libkiconv_p.a -OLD_FILES+=usr/lib/libkrb5_p.a -OLD_FILES+=usr/lib/libkvm_p.a -OLD_FILES+=usr/lib/libl_p.a -OLD_FILES+=usr/lib/libln_p.a -OLD_FILES+=usr/lib/liblzma_p.a -OLD_FILES+=usr/lib/libm_p.a -OLD_FILES+=usr/lib/libmagic_p.a -OLD_FILES+=usr/lib/libmd_p.a -OLD_FILES+=usr/lib/libmemstat_p.a -OLD_FILES+=usr/lib/libmenu_p.a -OLD_FILES+=usr/lib/libmenuw_p.a -OLD_FILES+=usr/lib/libmilter_p.a -OLD_FILES+=usr/lib/libmp_p.a -OLD_FILES+=usr/lib/libmt_p.a -OLD_FILES+=usr/lib/libncurses_p.a -OLD_FILES+=usr/lib/libncursesw_p.a -OLD_FILES+=usr/lib/libnetgraph_p.a -OLD_FILES+=usr/lib/libnetmap_p.a -OLD_FILES+=usr/lib/libnss_tacplus_p.a -OLD_FILES+=usr/lib/libnv_p.a -OLD_FILES+=usr/lib/libnvpair_p.a -OLD_FILES+=usr/lib/libopencsd_p.a -OLD_FILES+=usr/lib/libopie_p.a -OLD_FILES+=usr/lib/libpanel_p.a -OLD_FILES+=usr/lib/libpanelw_p.a -OLD_FILES+=usr/lib/libpathconv_p.a -OLD_FILES+=usr/lib/libpcap_p.a -OLD_FILES+=usr/lib/libpjdlog_p.a -OLD_FILES+=usr/lib/libpmc_p.a -OLD_FILES+=usr/lib/libprivateatf-c++_p.a -OLD_FILES+=usr/lib/libprivateatf-c_p.a -OLD_FILES+=usr/lib/libprivateauditd_p.a -OLD_FILES+=usr/lib/libprivatebsdstat_p.a -OLD_FILES+=usr/lib/libprivatecbor_p.a -OLD_FILES+=usr/lib/libprivatedevdctl_p.a -OLD_FILES+=usr/lib/libprivateevent_p.a -OLD_FILES+=usr/lib/libprivateevent1_p.a -OLD_FILES+=usr/lib/libprivatefido2_p.a -OLD_FILES+=usr/lib/libprivategmock_main_p.a -OLD_FILES+=usr/lib/libprivategmock_p.a -OLD_FILES+=usr/lib/libprivategtest_main_p.a -OLD_FILES+=usr/lib/libprivategtest_p.a -OLD_FILES+=usr/lib/libprivateheimipcc_p.a -OLD_FILES+=usr/lib/libprivateheimipcs_p.a -OLD_FILES+=usr/lib/libprivateifconfig_p.a -OLD_FILES+=usr/lib/libprivateldns_p.a -OLD_FILES+=usr/lib/libprivatesqlite3_p.a -OLD_FILES+=usr/lib/libprivatessh_p.a -OLD_FILES+=usr/lib/libprivateucl_p.a -OLD_FILES+=usr/lib/libprivateunbound_p.a -OLD_FILES+=usr/lib/libprivatezstd_p.a -OLD_FILES+=usr/lib/libproc_p.a -OLD_FILES+=usr/lib/libprocstat_p.a -OLD_FILES+=usr/lib/libpthread_p.a -OLD_FILES+=usr/lib/libradius_p.a -OLD_FILES+=usr/lib/libregex_p.a -OLD_FILES+=usr/lib/libroken_p.a -OLD_FILES+=usr/lib/librpcsvc_p.a -OLD_FILES+=usr/lib/librss_p.a -OLD_FILES+=usr/lib/librt_p.a -OLD_FILES+=usr/lib/librtld_db_p.a -OLD_FILES+=usr/lib/libsbuf_p.a -OLD_FILES+=usr/lib/libsdp_p.a -OLD_FILES+=usr/lib/libsmb_p.a -OLD_FILES+=usr/lib/libspl_p.a -OLD_FILES+=usr/lib/libssl_p.a -OLD_FILES+=usr/lib/libstats_p.a -OLD_FILES+=usr/lib/libstdbuf_p.a -OLD_FILES+=usr/lib/libstdc++_p.a -OLD_FILES+=usr/lib/libstdthreads_p.a -OLD_FILES+=usr/lib/libsupc++_p.a -OLD_FILES+=usr/lib/libsysdecode_p.a -OLD_FILES+=usr/lib/libtacplus_p.a *** 50 LINES SKIPPED *** From nobody Tue Nov 12 17:20:26 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XntTk5Llcz5cqV3; Tue, 12 Nov 2024 17:20: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XntTk4k17z4lKt; Tue, 12 Nov 2024 17:20:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731432026; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1eKnDoC/VEcXsjcgT5pAcNVASVOmTYN5f3L2DQCmr00=; b=F4weShWHuvxq9fN5oFNJp89VmQw+m7wL/3tF8ZdGf3DtCNqCpkeL47xAxmlj0QG0PX7BK4 ZiGbfLvhtqVRaGPwF9hrzPxO3DeGQOvZkR96iPmwO82Ui5SAGX8rMDhc0l+Y/PjIPMuVI/ Liy+pLomAZ3iQWuXoqx4HaVbXulEDfPESOLlTJonSBlJnkkQuF+coWYLU8lDEkohJiMiuQ W+OOS4NgD+Huw2BI6oj7bzky7cJjtiNtSfOKHGo96w4EY+82CDfft53gqty1jA4EVbNxva rouZdAulM/wks7SlleURt+D213gI+qrasVl7axI9LvhDJQ5Aaau89ayS7rpg9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731432026; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1eKnDoC/VEcXsjcgT5pAcNVASVOmTYN5f3L2DQCmr00=; b=TG7BqvmafYhRmWolTbHLSL8OvWmBte7+ho/kEh7rzc5XEn5YTmQD432PJkzy21d6Gn3nm4 +PE+0vVRuRZ+RvRYo7BKx0rGDarJk8JqxAcN3XZf/S2FGI7XFCZTI3LNeDaAkjzt9vNn/w vvLvuMkCPIjqpSR/8cYn/fJudj89o8jA/rerO6jnOlEreLVv9YW7PbpGgxxfjR6nMQGRXr xNoMPPvTIY8Xz876w6b8oaGJrn5TMbTgKSghwHQIz2lW2vBGWSnzwTTishw/RdTdfvLyJh /yQ3hVRk/JhEyNbvia1yccEqPwXDRM7167jfbKFQ4s+PSkCB8MPnp0mcgY5IgA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731432026; a=rsa-sha256; cv=none; b=VFG/mXZt3LNgz/HsKaIIY9QIFGIOCaSwdF7ut6T7g4F6OSYQUuDd22DuMmK0vZ/IUSV0Zd 7mc50KGFzZ5MqEg5gfCs7Zt3Zz/p1vIvmLFV3DYA4oRKOmekMm5TpG5ibIpdlpmp3xKnzN pYQfiLd+f+5vIE0K/4wUMvSx5vUZKp5BSwiQrK7kXY3mUbwgXM+lXpUxjql3PhMojT2IKC zmb3fYB1j9nRDiQtYqlBeyTI5r6jvLKtWqb86vJpMxrIwDfBeYUCGLLwmDl4eOOeTNjBHQ eguW7g5lFcZm+0vdIQsrkZ4hBcej2QJI5wd0sckh93217UFPFWRKoMZT5EhSvA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XntTk4K95zJnP; Tue, 12 Nov 2024 17:20:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ACHKQ7x024935; Tue, 12 Nov 2024 17:20:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ACHKQ8Q024932; Tue, 12 Nov 2024 17:20:26 GMT (envelope-from git) Date: Tue, 12 Nov 2024 17:20:26 GMT Message-Id: <202411121720.4ACHKQ8Q024932@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kajetan Staszkiewicz Subject: git: 452e6f549cdb - main - pf: Merge pf_clear_srcnodes() and pf_kill_srcnodes() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 452e6f549cdb33393e05fabbaee0aed7eb744e68 Auto-Submitted: auto-generated The branch main has been updated by ks: URL: https://cgit.FreeBSD.org/src/commit/?id=452e6f549cdb33393e05fabbaee0aed7eb744e68 commit 452e6f549cdb33393e05fabbaee0aed7eb744e68 Author: Kajetan Staszkiewicz AuthorDate: 2024-11-12 17:17:11 +0000 Commit: Kajetan Staszkiewicz CommitDate: 2024-11-12 17:17:11 +0000 pf: Merge pf_clear_srcnodes() and pf_kill_srcnodes() The functions pf_clear_srcnodes() and pf_kill_srcnodes() serve the same purpose, however the former kills all source nodes while the later only a selected subset of them. They differ in how they reach that goal. pf_clear_srcnodes() first iterates over all states and detaches the source nodes from them. Then it iterates over all source nodes and marks them as expired leaving the cleanup to pf_purge_expired_src_nodes(). If a new state and a new source node are created between iterating over all states and all source nodes, this source node will have its state counter set to 0 and expiry to 1, marking it as expired without properly detaching the state from it. Later the source node will be freed with the state sill pointing to it. The function pf_kill_srcnodes() performs the same operation in a safer manner by first marking the required source nodes as expiring and then iterating over all states and checking which states point to expiring nodes. Any source node created between iterating over states and source nodes will simply be ignored. Add functionality of killing all source nodes to pf_kill_srcnodes(). Replace all calls to pf_clear_srcnodes() with a calls to pf_kill_srcnodes(), and remove the former. Reviewed by: kp Approved by: kp (mentor) Differential Revision: https://reviews.freebsd.org/D47440 --- sys/netpfil/pf/pf_ioctl.c | 47 ++++++++++------------------------------------- 1 file changed, 10 insertions(+), 37 deletions(-) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index ce28a9cd6dc1..c3f0166810ec 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -233,7 +233,6 @@ static int pf_clearstates_nv(struct pfioc_nv *); static int pf_getstate(struct pfioc_nv *); static int pf_getstatus(struct pfioc_nv *); static int pf_clear_tables(void); -static void pf_clear_srcnodes(void); static void pf_kill_srcnodes(struct pfioc_src_node_kill *); static int pf_keepcounters(struct pfioc_nv *); static void pf_tbladdr_copyout(struct pf_addr_wrap *); @@ -5451,8 +5450,7 @@ DIOCCHANGEADDR_error: } case DIOCCLRSRCNODES: { - pf_clear_srcnodes(); - pf_purge_expired_src_nodes(); + pf_kill_srcnodes(NULL); break; } @@ -5927,40 +5925,11 @@ pf_clear_tables(void) return (error); } -static void -pf_clear_srcnodes(void) -{ - struct pf_kstate *s; - struct pf_srchash *sh; - struct pf_ksrc_node *sn; - int i; - - for (i = 0; i <= V_pf_hashmask; i++) { - struct pf_idhash *ih = &V_pf_idhash[i]; - - PF_HASHROW_LOCK(ih); - LIST_FOREACH(s, &ih->states, entry) { - s->src_node = NULL; - s->nat_src_node = NULL; - } - PF_HASHROW_UNLOCK(ih); - } - - for (i = 0, sh = V_pf_srchash; i <= V_pf_srchashmask; - i++, sh++) { - PF_HASHROW_LOCK(sh); - LIST_FOREACH(sn, &sh->nodes, entry) { - sn->expire = 1; - sn->states = 0; - } - PF_HASHROW_UNLOCK(sh); - } -} - static void pf_kill_srcnodes(struct pfioc_src_node_kill *psnk) { struct pf_ksrc_node_list kill; + u_int killed; LIST_INIT(&kill); for (int i = 0; i <= V_pf_srchashmask; i++) { @@ -5969,14 +5938,15 @@ pf_kill_srcnodes(struct pfioc_src_node_kill *psnk) PF_HASHROW_LOCK(sh); LIST_FOREACH_SAFE(sn, &sh->nodes, entry, tmp) - if (PF_MATCHA(psnk->psnk_src.neg, + if (psnk == NULL || + (PF_MATCHA(psnk->psnk_src.neg, &psnk->psnk_src.addr.v.a.addr, &psnk->psnk_src.addr.v.a.mask, &sn->addr, sn->af) && PF_MATCHA(psnk->psnk_dst.neg, &psnk->psnk_dst.addr.v.a.addr, &psnk->psnk_dst.addr.v.a.mask, - &sn->raddr, sn->af)) { + &sn->raddr, sn->af))) { pf_unlink_src_node(sn); LIST_INSERT_HEAD(&kill, sn, entry); sn->expire = 1; @@ -5998,7 +5968,10 @@ pf_kill_srcnodes(struct pfioc_src_node_kill *psnk) PF_HASHROW_UNLOCK(ih); } - psnk->psnk_killed = pf_free_src_nodes(&kill); + killed = pf_free_src_nodes(&kill); + + if (psnk != NULL) + psnk->psnk_killed = killed; } static int @@ -6422,7 +6395,7 @@ shutdown_pf(void) pf_clear_all_states(); - pf_clear_srcnodes(); + pf_kill_srcnodes(NULL); /* status does not use malloced mem so no need to cleanup */ /* fingerprints and interfaces have their own cleanup code */ From nobody Tue Nov 12 17:20:27 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XntTl6907z5cqV5; Tue, 12 Nov 2024 17:20: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XntTl5hSzz4lKx; Tue, 12 Nov 2024 17:20:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731432027; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sjrQP5AdlKdJJRfIOUtgOiZEckI7yEWWTDhrAjliiVk=; b=SZhGyMAIFutjUpGekqiCzibakiix8Tsat8tyZzxWpSzeC3F+BOhhQEuwAPFvFEIJ6CX6/S kyHae5RuObCfw+m9RUKwYLDKqrkERysev7FdeKx9NnVcETNdPu3ZhcXwJeywzxn8w7CIh3 g5MLQWe+zn8Zt5v4vxDXnr9x7yMvHFiQAwHoEUnoQK56wF6zj0EVmtRE4aA+mlQIrcaFiL ihZe/SWycEfBu+n3Np/45S4Ag6Ef3KjWEus+HSifkD43hUTKj2crDC9MsgkgD1rDGA4l2k RzY50ztHY8NKx/2hKG71i8tIuLaey07aFZAd81AMAUzMEcn2uHwd0ec09T0yTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731432027; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sjrQP5AdlKdJJRfIOUtgOiZEckI7yEWWTDhrAjliiVk=; b=vKXmrnN/0JlJGw+iin2KreNNX9vPLJ+56rs2zvyrq9M4kLf/KUAgKFG9px1GNyxJCVv8pD 4HyP/SCQSE6HkGxm/1xWbxmIzdMe9dEYzewhxZrsuUq0ltQpJPmQEh/E1nSjuslRjhYRi7 SgFVD3nmnxxmtXozpejGVMqu3GQFlMBlNQRfesV//cairIkBKj21tKtoSKxddix9MD3u61 6588skWKpW9z6wnesiWsOIrvUd1Gb/5HFLMjKdjWY32/sSfB0yVfyCJRICK30NNyK/bEOc rBD8sCQuh+M25fe4TmQmjcr8vyTAmOU4TNjna9wtA/adxQIXLt/iV2m07N2Mhw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731432027; a=rsa-sha256; cv=none; b=NRpeXbcTekqD3iE3aa7FqDecpt4SHS/M/Juk9G5xnP9rUAL0ngzMvEuy97KpzP4s7CnltN O43q3BYB7zhaMVcM0KkxrnraU6U9bPpkPHxyWgUy79FEK4fu+rSuTS/M/Dl3IUAFlNLiIq IX6hdJNv5/V0V44ZUpLaEtuicQA5EO2pkoCrK4rQ0iZo3huF9p7rUO6RJBmMdVd0S7aFTY /L9XfVTuf0kfY7FYqevSNX8V93b7VWxADzssvxUTZEdt769AE5OJXNwju7mZtihq2khDUb i9m0T7g113LsDJtbdUOwClT34F6i9bBJNcaApTQJODhrhCRXdUh6yjxiN7fzDA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XntTl5H1fzKCy; Tue, 12 Nov 2024 17:20:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ACHKRpL024993; Tue, 12 Nov 2024 17:20:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ACHKRlT024990; Tue, 12 Nov 2024 17:20:27 GMT (envelope-from git) Date: Tue, 12 Nov 2024 17:20:27 GMT Message-Id: <202411121720.4ACHKRlT024990@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kajetan Staszkiewicz Subject: git: 65b20771713c - main - pf tests: Simplify handling of pfctl -s List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 65b20771713c7ec4d46fb5af4a16353209658d79 Auto-Submitted: auto-generated The branch main has been updated by ks: URL: https://cgit.FreeBSD.org/src/commit/?id=65b20771713c7ec4d46fb5af4a16353209658d79 commit 65b20771713c7ec4d46fb5af4a16353209658d79 Author: Kajetan Staszkiewicz AuthorDate: 2024-11-12 17:17:12 +0000 Commit: Kajetan Staszkiewicz CommitDate: 2024-11-12 17:17:12 +0000 pf tests: Simplify handling of pfctl -s Some pf tests check the output of pfctl -s[sSr] to find if relevant states, source nodes or rules exist and if their counters have proper values. The output is multiple lines per entry and contains varying amount of whitespace. This makes parsing it rather hard. Provide a function for standardization of output of pfctl -s[sSr] which converts the output to a single line per entry and reduces whitespace always to a single space. Adjust existing tests to make use of this function. Revieved by: kp Approved by: kp (mentor) Differental Revision: https://reviews.freebsd.org/D47435 --- tests/sys/netpfil/pf/fragmentation_pass.sh | 5 ++--- tests/sys/netpfil/pf/src_track.sh | 24 ++++++++++++------------ tests/sys/netpfil/pf/utils.subr | 10 ++++++++++ 3 files changed, 24 insertions(+), 15 deletions(-) diff --git a/tests/sys/netpfil/pf/fragmentation_pass.sh b/tests/sys/netpfil/pf/fragmentation_pass.sh index 99d2c827b239..94a25cc41988 100644 --- a/tests/sys/netpfil/pf/fragmentation_pass.sh +++ b/tests/sys/netpfil/pf/fragmentation_pass.sh @@ -580,13 +580,12 @@ dummynet_fragmented_body() ping_dummy_check_request exit:0 --ping-type=udp --send-length=10000 --send-frag-length=1280 rules=$(mktemp) || exit 1 - jexec router pfctl -qvsr > $rules + jexec router pfctl -qvsr | normalize_pfctl_s > $rules # Count that fragmented packets have hit the rule only once and that # they have not created states. There is no stateful firewall support # for fragmented packets. - grep -A2 'pass in on epair0b inet proto udp all keep state dnpipe(1, 1)' $rules | - grep -qE 'Packets: 8\s+Bytes: 10168\s+States: 0\s+' || + grep -qE 'pass in on epair0b inet proto udp all keep state dnpipe\(1, 1\) .* Packets: 8 Bytes: 10168 States: 0 ' $rules || atf_fail "Fragmented packets not counted correctly" } diff --git a/tests/sys/netpfil/pf/src_track.sh b/tests/sys/netpfil/pf/src_track.sh index 9d0ca690d344..5349e61ec76b 100755 --- a/tests/sys/netpfil/pf/src_track.sh +++ b/tests/sys/netpfil/pf/src_track.sh @@ -165,16 +165,16 @@ max_src_conn_rule_body() ping_server_check_reply exit:0 --ping-type=tcp3way --send-sport=4205 --fromaddr 2001:db8:44::2 states=$(mktemp) || exit 1 - jexec router pfctl -qss | grep 'tcp 2001:db8:43::2\[9\] <-' > $states + jexec router pfctl -qss | normalize_pfctl_s | grep 'tcp 2001:db8:43::2\[9\] <-' > $states - grep -qE '2001:db8:44::1\[4201\]\s+ESTABLISHED:ESTABLISHED' $states || atf_fail "State for port 4201 not found or not established" - grep -qE '2001:db8:44::1\[4202\]\s+ESTABLISHED:ESTABLISHED' $states || atf_fail "State for port 4202 not found or not established" - grep -qE '2001:db8:44::1\[4203\]\s+ESTABLISHED:ESTABLISHED' $states || atf_fail "State for port 4203 not found or not established" - grep -qE '2001:db8:44::2\[4205\]\s+ESTABLISHED:ESTABLISHED' $states || atf_fail "State for port 4205 not found or not established" + grep -qE '2001:db8:44::1\[4201\] ESTABLISHED:ESTABLISHED' $states || atf_fail "State for port 4201 not found or not established" + grep -qE '2001:db8:44::1\[4202\] ESTABLISHED:ESTABLISHED' $states || atf_fail "State for port 4202 not found or not established" + grep -qE '2001:db8:44::1\[4203\] ESTABLISHED:ESTABLISHED' $states || atf_fail "State for port 4203 not found or not established" + grep -qE '2001:db8:44::2\[4205\] ESTABLISHED:ESTABLISHED' $states || atf_fail "State for port 4205 not found or not established" if ( - grep -qE '2001:db8:44::1\[4204\]\s+' $states && - ! grep -qE '2001:db8:44::1\[4204\]\s+CLOSED:CLOSED' $states + grep -qE '2001:db8:44::1\[4204\] ' $states && + ! grep -qE '2001:db8:44::1\[4204\] CLOSED:CLOSED' $states ); then atf_fail "State for port 4204 found but not closed" fi @@ -234,13 +234,13 @@ max_src_states_rule_body() # We will check the resulting source nodes, though. # Order of source nodes in output is not guaranteed, find each one separately. nodes=$(mktemp) || exit 1 - jexec router pfctl -qvsS > $nodes + jexec router pfctl -qvsS | normalize_pfctl_s > $nodes for node_regexp in \ - '2001:db8:44::1 -> :: \( states 2, connections 2, rate [0-9/\.]+s \)\s+age [0-9:]+, 6 pkts, [0-9]+ bytes, filter rule 3' \ - '2001:db8:44::1 -> :: \( states 2, connections 2, rate [0-9/\.]+s \)\s+age [0-9:]+, 6 pkts, [0-9]+ bytes, filter rule 4' \ - '2001:db8:44::2 -> :: \( states 2, connections 2, rate [0-9/\.]+s \)\s+age [0-9:]+, 6 pkts, [0-9]+ bytes, filter rule 4' \ + '2001:db8:44::1 -> :: \( states 2, connections 2, rate [0-9/\.]+s \) age [0-9:]+, 6 pkts, [0-9]+ bytes, filter rule 3$' \ + '2001:db8:44::1 -> :: \( states 2, connections 2, rate [0-9/\.]+s \) age [0-9:]+, 6 pkts, [0-9]+ bytes, filter rule 4$' \ + '2001:db8:44::2 -> :: \( states 2, connections 2, rate [0-9/\.]+s \) age [0-9:]+, 6 pkts, [0-9]+ bytes, filter rule 4$' \ ; do - cat $nodes | tr '\n' ' ' | grep -qE "$node_regexp" || atf_fail "Source nodes not matching expected output" + grep -qE "$node_regexp" $nodes || atf_fail "Source nodes not matching expected output" done # Check if limit counters have been properly set. diff --git a/tests/sys/netpfil/pf/utils.subr b/tests/sys/netpfil/pf/utils.subr index c854ad5e69d8..6af10e80390d 100644 --- a/tests/sys/netpfil/pf/utils.subr +++ b/tests/sys/netpfil/pf/utils.subr @@ -301,3 +301,13 @@ ping_server_check_reply() --replyif ${epair_tester}a \ $params } + +normalize_pfctl_s() +{ + # `pfctl -s[rsS]` output is divided into sections. Each rule, state or + # source node starts with the beginning of a line and next lines with leading + # spaces are various parameters of said rule, state or source node. + # Convert it into a single line per entry, and remove multiple spaces, + # so that regular expressions for matching them in tests can be simpler. + awk '{ if ($0 ~ /^[^ ]/ && NR > 1) print(""); gsub(/ +/, " ", $0); printf("%s", $0); } END {print("");}' +} From nobody Tue Nov 12 17:25:46 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xntbv010Bz5cqh8; Tue, 12 Nov 2024 17:25: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xntbt6bPtz4mn4; Tue, 12 Nov 2024 17:25:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731432346; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Iz7huuoD+yiNmfZaN6uzv34OLo2vXxjgk8ITWD+LqEI=; b=vrVPjXgYpxabA7zESPAOUafbiJbNHBoE1B2LOeSaz7BXc7wh1Qy1AbElQBeVW1OrXZ3jmd gzk1CWpe6DfOG6O8ESGnTGPuA/4jamuU8SqHkKk4yZRKPsetqnSugOxLIKqzup+m0SCwTm YqdhaYRHqrMLNRnrAFAFkWGF+Dt4AhD5n2Z5sjJPtTsOdgZfrdUWDaauQ7jvYoWnGnmK/F c7OGrXEmYK7/FnXIHDPsS4jdAHRsM6c/q2spXFz40qh9q0e3x/uFWGwYeaUtJ44X8DsEq6 70sk0SPjtWVhY3vCuhJUJT+iNaUkixSgy1DHxEOX25PtCHIlSPu4vyvEPoGCbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731432346; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Iz7huuoD+yiNmfZaN6uzv34OLo2vXxjgk8ITWD+LqEI=; b=U9V7ZmEiXgmLbyjYTKWjqBOx2bQSAf0Qps0lHe4lJJoOxu4LL/5DfwttXugz2iRBdBdJfl MqULkNcbXHEIpXeEbZhkMMx2408dM6cR+WMguTS3JTclRCyxOo27ePTJUh63twF/8I9d6f QiZ8GEOlC3NSA/ovtvk6KsLMotf1jhjaSnzZAAuVpuFrWikdTzqzTdhKnerJiU02JSxyfB rUYfZML0AoJGYmYSa3Pf2QnKezZQmQdhoBfoCeDfHy7FXlGTQ2i5na6Z/EAMqCDJzyXD0C +DfiYmdJWLSnSythPmNh0S3InxStr8VCf2yb+GPldBqn8LlMxVkCEtsbHzCZAg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731432346; a=rsa-sha256; cv=none; b=biUY4BbPzNjqokDNPdq5kwCWiuIMPbSel6uafSckXnY4HGly/9gIYAfV7FuCPPngtpMkZL ipE+hQIRJ8UPzJdzkspsJ7P1dQSzhArYD3SOar1n3DW039cEp6vp0BubYZdDxFc7cOaa9Q 1kb12CW8eIbQFq4YncJMgtsvS9/iVitnhJDUWmoJas8D3IImfoFn8xcY3ScKVOPCFFcmDk RP2UT6LWzLBWY8Potdnng/howe798pwy4Ty+juIIP0XwO311aLdwKUui00c8oKPlQafMpj /WVJ6PyCC3lcYW8VP1UbRNistJWEBbQtVOVgPfHvMwCyZC4F6NyuK8XaCOZPDw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xntbt6BhTzKY8; Tue, 12 Nov 2024 17:25:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ACHPkJ5033767; Tue, 12 Nov 2024 17:25:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ACHPkjP033764; Tue, 12 Nov 2024 17:25:46 GMT (envelope-from git) Date: Tue, 12 Nov 2024 17:25:46 GMT Message-Id: <202411121725.4ACHPkjP033764@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 93f7a3023c31 - main - style.9: be explicit about booleans in comparisons List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 93f7a3023c3147d42dbe3dab58a5a70779587ea5 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=93f7a3023c3147d42dbe3dab58a5a70779587ea5 commit 93f7a3023c3147d42dbe3dab58a5a70779587ea5 Author: Ed Maste AuthorDate: 2021-05-27 15:25:32 +0000 Commit: Ed Maste CommitDate: 2024-11-12 17:25:28 +0000 style.9: be explicit about booleans in comparisons We prefer something like "if (count != 0)" over "if (count)" for non-boolean variables. This was implicit in examples, but was unclear for some new contributors. Attempt to clarify by providing a more explicit statement and example. Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D30507 --- share/man/man9/style.9 | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/share/man/man9/style.9 b/share/man/man9/style.9 index 69561e3e1e73..9bf30370a374 100644 --- a/share/man/man9/style.9 +++ b/share/man/man9/style.9 @@ -746,9 +746,10 @@ not: !(p = f()) .Ed .Pp -Do not use +Do not test without a comparison, or with unary .Ic \&! -for tests unless it is a boolean, e.g., use: +(except for booleans). +For example, use: .Bd -literal if (*p == '\e0') .Ed @@ -758,6 +759,16 @@ not: if (!*p) .Ed .Pp +Prefer: +.Bd -literal +if (count != 0) +.Ed +.Pp +over: +.Bd -literal +if (count) +.Ed +.Pp Routines returning .Vt "void *" should not have their return values cast From nobody Tue Nov 12 18:35:55 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xnw952NYnz5cvyl; Tue, 12 Nov 2024 18:36:09 +0000 (UTC) (envelope-from jlduran@gmail.com) Received: from mail-yw1-f170.google.com (mail-yw1-f170.google.com [209.85.128.170]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xnw945d0jz4trw; Tue, 12 Nov 2024 18:36:08 +0000 (UTC) (envelope-from jlduran@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-yw1-f170.google.com with SMTP id 00721157ae682-6ea5cc68944so727267b3.1; Tue, 12 Nov 2024 10:36:08 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731436567; x=1732041367; h=content-transfer-encoding:cc:to:subject:message-id:date:from :reply-to:in-reply-to:references:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=a1ISLPTtHmqXfO4952p6takPms+ko5QSCXT7XinyAXY=; b=C8HiKE/J7D7U6KkMCIkFEyZN0m4X61ELMCDmHWJnqcibVEjGo6ESM5Q+nmk5FOrzBC WRrI+pKmPMcFTtv7cSeXT9TQIUAToqfdO8k6B7XnvS1Vw1F+8egjfpr+k29FN7sXj3pv +6uhWRS+xN7d2ra6A6vwCKUrjYqEwNnY8CAzO820js+oIFd13M46OikhFtMUvYVLI6S3 EP1HHczgn/0DN7Q5AVU83OIPzPjkkPlXLP1bdM5K//VDn8rCrDu+P4QvXp2V21f2i9gT J+Ek2N8l3qGkfHeBlhQkRCBUUXl7FRLmHcaUewsd8cuvNsFG4kDx2H3IEQMEDW/6Oh19 dqaQ== X-Forwarded-Encrypted: i=1; AJvYcCUMGJCnZ7tsXIs3vhly7YGQOaspFSIF21T/qK1gKMhJMXVvYNOWXMABJDoTLnXUCeLWYTUZyyAbO9Pyrck0Hpo6mS79Pyc=@freebsd.org, AJvYcCVKICxaRSrCrMa1rgpSSHdBp3jm04nWxz6k83S7s8K1aozwBvjLNSCmqeNe2Kr9PkbYltuR14UbfvpiWA2JjL0=@freebsd.org, AJvYcCWBWaRROnmwh5g6yk8pnA5c2r6jMtvWV2uVq1vNGKqWX2HA8yVHc8zfkin6N0YjQX7Nx/Uq0u4JhWMwVKrsWeflLQtO@freebsd.org X-Gm-Message-State: AOJu0YzAgUt0pPe7UoL0jeKyGKGnrDWZPbsmRovsDaaRK/hGTvNwo5Y2 Uw06Np5y3DbdpF6N7kOeTn2nsQvf38WZvjVaE0VQCpgJrMMbD3zvBj8PjTaGm0E= X-Google-Smtp-Source: AGHT+IFKLkgABr3yC2ET35sK7PTt0fq8Mg/2DkTlSjfwEPvRXRW3Kj6viYZ0DXi9OEf1oHqB8kZoRA== X-Received: by 2002:a05:690c:a85:b0:6ea:85ee:b5bb with SMTP id 00721157ae682-6eaddd9fbbamr59953827b3.3.1731436567149; Tue, 12 Nov 2024 10:36:07 -0800 (PST) Received: from mail-yb1-f176.google.com (mail-yb1-f176.google.com. [209.85.219.176]) by smtp.gmail.com with ESMTPSA id 00721157ae682-6eaceb7a6f0sm26937477b3.104.2024.11.12.10.36.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 12 Nov 2024 10:36:06 -0800 (PST) Received: by mail-yb1-f176.google.com with SMTP id 3f1490d57ef6-e30ca1726c5so110562276.0; Tue, 12 Nov 2024 10:36:06 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCV8v8XFD8/ksPIprsEwX6Dk065qIzLLZguG5NtOxg5jz49RogV08VoAtkL9RkdIq7aIz9nMXw8Q8CwPeSRsTRXiSmH50Vw=@freebsd.org, AJvYcCWN2njTeXemiBCjNenzzGjlJoeCgT4OvMDk9pAaWBVOcBK0sTFkIbYaiTZ28LIi08WF6kDxIR/p+KRxm3dsfUinsQhw@freebsd.org, AJvYcCWoixw6yWxloxRLTHiH3v64rMLTIOzTQcU5lNoz138DWuozC4bN90Vy9doHtseM2O1e4cxBJiV+FpkIDh9qTak=@freebsd.org X-Received: by 2002:a05:6902:2290:b0:e30:de32:8362 with SMTP id 3f1490d57ef6-e337f901c8bmr6027980276.11.1731436566532; Tue, 12 Nov 2024 10:36:06 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <202411120347.4AC3lPOA015167@gitrepo.freebsd.org> <09923ad3-4065-4a31-b35f-74f84e09cff1@FreeBSD.org> <20241112155219.2E15A2DF@slippy.cwsent.com> <20241112160243.B372532F@slippy.cwsent.com> In-Reply-To: <20241112160243.B372532F@slippy.cwsent.com> Reply-To: jlduran@freebsd.org From: Jose Luis Duran Date: Tue, 12 Nov 2024 15:35:55 -0300 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 1fa6daaafd74 - main - ipfilter: Avoid stopping with a lock held To: Cy Schubert Cc: John Baldwin , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4Xnw945d0jz4trw X-Spamd-Bar: ---- What would be the recommended approach in this case? Revert, and commit with the fixes, or just fix the problematic code. At any rate, I have created https://reviews.freebsd.org/D47530. Feel free to commandeer it, as my testing is limited to what's currently in the "Test Plan". I was not able to recreate the deadlock described here, but it definitely makes sense. On Tue, Nov 12, 2024 at 1:02=E2=80=AFPM Cy Schubert wrote: > > In message <20241112155219.2E15A2DF@slippy.cwsent.com>, Cy Schubert write= s: > > In message <09923ad3-4065-4a31-b35f-74f84e09cff1@FreeBSD.org>, John Bal= dwin > > wri > > tes: > > > On 11/11/24 19:47, Jose Luis Duran wrote: > > > > The branch main has been updated by jlduran: > > > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D1fa6daaafd74c1a457dc= fe26e0a5 > > 94 > > > 3b5441dc9d > > > > > > > > commit 1fa6daaafd74c1a457dcfe26e0a5943b5441dc9d > > > > Author: Jose Luis Duran > > > > AuthorDate: 2024-11-02 17:58:59 +0000 > > > > Commit: Jose Luis Duran > > > > CommitDate: 2024-11-12 03:46:15 +0000 > > > > > > > > ipfilter: Avoid stopping with a lock held > > > > > > > > Avoid calling _callout_stop_safe with a non-sleepable lock hel= d when > > > > detaching by initializing callout_init_rw() with CALLOUT_SHARE= DLOCK. > > > > > > > > It avoids the following WITNESS warning when stopping the serv= ice: > > > > > > > > # service ipfilter stop > > > > calling _callout_stop_safe with the following non-sleepabl= e lock > > s > > > held: > > > > shared rw ipf filter load/unload mutex (ipf filter load/un= load m > > ut > > > ex) r =3D 0 (0xffff0000417c7530) locked @ /usr/src/sys/netpfil/ipfilt= er/netin > > et > > > /fil.c:7926 > > > > stack backtrace: > > > > #0 0xffff00000052d394 at witness_debugger+0x60 > > > > #1 0xffff00000052e620 at witness_warn+0x404 > > > > #2 0xffff0000004d4ffc at _callout_stop_safe+0x8c > > > > #3 0xffff0000f7236674 at ipfdetach+0x3c > > > > #4 0xffff0000f723fa4c at ipf_ipf_ioctl+0x788 > > > > #5 0xffff0000f72367e0 at ipfioctl+0x144 > > > > #6 0xffff00000034abd8 at devfs_ioctl+0x100 > > > > #7 0xffff0000005c66a0 at vn_ioctl+0xbc > > > > #8 0xffff00000034b2cc at devfs_ioctl_f+0x24 > > > > #9 0xffff0000005331ec at kern_ioctl+0x2e0 > > > > #10 0xffff000000532eb4 at sys_ioctl+0x140 > > > > #11 0xffff000000880480 at do_el0_sync+0x604 > > > > #12 0xffff0000008579ac at handle_el0_sync+0x4c > > > > > > > > PR: 282478 > > > > Suggested by: markj > > > > Reviewed by: cy > > > > Approved by: emaste (mentor) > > > > MFC after: 1 week > > > > --- > > > > sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c | 4 ++-- > > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > > > diff --git a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c b/sys/ne= tpfil/ > > ip > > > filter/netinet/ip_fil_freebsd.c > > > > index bcde0d2c7323..b3dea40c3d8c 100644 > > > > --- a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c > > > > +++ b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c > > > > @@ -181,7 +181,7 @@ ipf_timer_func(void *arg) > > > > #if 0 > > > > softc->ipf_slow_ch =3D timeout(ipf_timer_func, so= ftc, hz/ > > 2); > > > > #endif > > > > - callout_init(&softc->ipf_slow_ch, 1); > > > > + callout_init_rw(&softc->ipf_slow_ch, &softc->ipf_global.i= pf_lk, > > > CALLOUT_SHAREDLOCK); > > > > callout_reset(&softc->ipf_slow_ch, > > > > (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT, > > > > ipf_timer_func, softc); > > > > @@ -221,7 +221,7 @@ ipfattach(ipf_main_softc_t *softc) > > > > softc->ipf_slow_ch =3D timeout(ipf_timer_func, softc, > > > > (hz / IPF_HZ_DIVIDE) * IPF_H= Z_MULT > > ); > > > > #endif > > > > - callout_init(&softc->ipf_slow_ch, 1); > > > > + callout_init_rw(&softc->ipf_slow_ch, &softc->ipf_global.ipf_lk, C= ALLOUT > > > _SHAREDLOCK); > > > > callout_reset(&softc->ipf_slow_ch, (hz / IPF_HZ_DIVIDE) *= IPF_H > > Z_MULT, > > > > ipf_timer_func, softc); > > > > return (0); > > > > > > But this means the callout is now called with the lock held, and I do= n't se > > e > > > any changes > > > to ipf_timer_func. Hmm, so you now recurse on the lock? You need to= take > > ou > > > t the locking > > > in ipf_timer_func I think as it is now spurious. You can also axe th= e #if > > 0' > > > d code around > > > timeout() while you are at it. > > > > Reviewing all the #if 0's in ipfilter, discovering why they are there, = and > > either removing them or implementing what Darren had initially intended= is > > in my queue. The upstream git log isn't helpful for reasons I preach ab= out > > proper commit logs. > > > > Given that this one is in ip_fil_freebsd.c (specific to FreeBSD), it ca= n be > > removed. Others require more grokking. > > It can go. It was #if 0'd by ea3022cbbd3f5, IIRC in discussion with you a= t > the time (2013). > > ea3022cbbd3f5 converted timeout(9) to callout(9). This code remained as a= n > artifact of the conversion. It was sent by you to me following the ipfilt= er > upgrade from 4.1.28 to 5.1.2 earlier that year. > > > -- > Cheers, > Cy Schubert > FreeBSD UNIX: Web: https://FreeBSD.org > NTP: Web: https://nwtime.org > > e^(i*pi)+1=3D0 > > > > > --=20 Jose Luis Duran From nobody Tue Nov 12 18:41:11 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XnwGy3Xy3z5cwPJ; Tue, 12 Nov 2024 18:41:14 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta002.cacentral1.a.cloudfilter.net (omta002.cacentral1.a.cloudfilter.net [3.97.99.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XnwGx6QKpz4vZb; Tue, 12 Nov 2024 18:41:13 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4003a.ext.cloudfilter.net ([10.228.9.183]) by cmsmtp with ESMTPS id Aq62tmdQqMArNAvpBtub3Z; Tue, 12 Nov 2024 18:41:13 +0000 Received: from spqr.komquats.com ([70.66.152.170]) by cmsmtp with ESMTPSA id Avp9tAMkzE0IVAvpAtjnlu; Tue, 12 Nov 2024 18:41:13 +0000 X-Auth-User: cschuber X-Authority-Analysis: v=2.4 cv=cI9DsUeN c=1 sm=1 tr=0 ts=6733a149 a=y8EK/9tc/U6QY+pUhnbtgQ==:117 a=y8EK/9tc/U6QY+pUhnbtgQ==:17 a=kj9zAlcOel0A:10 a=VlfZXiiP6vEA:10 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=VxmjJ2MpAAAA:8 a=VpgKYua3uFmnTG855akA:9 a=CjuIK1q_8ugA:10 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 a=7gXAzLPJhVmCkEl4_tsf:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 31306C72; Tue, 12 Nov 2024 10:41:11 -0800 (PST) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 2CCA53C2; Tue, 12 Nov 2024 10:41:11 -0800 (PST) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: jlduran@freebsd.org cc: Cy Schubert , John Baldwin , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 1fa6daaafd74 - main - ipfilter: Avoid stopping with a lock held In-reply-to: References: <202411120347.4AC3lPOA015167@gitrepo.freebsd.org> <09923ad3-4065-4a31-b35f-74f84e09cff1@FreeBSD.org> <20241112155219.2E15A2DF@slippy.cwsent.com> <20241112160243.B372532F@slippy.cwsent.com> Comments: In-reply-to Jose Luis Duran message dated "Tue, 12 Nov 2024 15:35:55 -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 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 12 Nov 2024 10:41:11 -0800 Message-Id: <20241112184111.2CCA53C2@slippy.cwsent.com> X-CMAE-Envelope: MS4xfEALqe26UzI6jarQWfOFMS0gQSjyLd5CrgPt8t355PNl3F5MvfQu31jTe487gC1py2ZE/GyCHWt23ZDUSC3xVY3K7MfgjYlpjJr2JDgtPV5LD7ff3znc jXP6K9U50kRzJhhL8rchZ4B+EqyAYRtJTOg/Mw/LBWD8l+ZNrxfX5/hVi37UwjDq6Cq5sexqGAu3Tb5HPZG5h4kwqj0Q8D5jsSbTs6kSriFEK1Q5Ct3w5tbn smeRGgxLeDmVovJyPM0BqYvQbytfXIR0UhirKxhwhQFpQIXO8zdoxWEWFlcxliERcwMWKHSG4lgplybGcqx1vxVetCw4e+z8boGHzaG4rfsFX8l3y+bYResN +LRzrsxt X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US] X-Rspamd-Queue-Id: 4XnwGx6QKpz4vZb X-Spamd-Bar: ---- I'm building a test patch on my sandbox machine. The patches in my git repo will, a) remove another #if 0 from 2013, b) revert this commit, c) fix the "stopping with lock held" bug Testing on the sandbox is needed before I submit a review. You can revert this if you want, or I can push my three commits when my testing is complete. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0 In message , Jose Luis Duran writes: > What would be the recommended approach in this case? > Revert, and commit with the fixes, or just fix the problematic code. > > At any rate, I have created https://reviews.freebsd.org/D47530. Feel > free to commandeer it, as my testing is limited to what's currently in > the "Test Plan". I was not able to recreate the deadlock described > here, but it definitely makes sense. > > On Tue, Nov 12, 2024 at 1:02=E2=80=AFPM Cy Schubert com> wrote: > > > > In message <20241112155219.2E15A2DF@slippy.cwsent.com>, Cy Schubert write= > s: > > > In message <09923ad3-4065-4a31-b35f-74f84e09cff1@FreeBSD.org>, John Bal= > dwin > > > wri > > > tes: > > > > On 11/11/24 19:47, Jose Luis Duran wrote: > > > > > The branch main has been updated by jlduran: > > > > > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D1fa6daaafd74c1a457dc= > fe26e0a5 > > > 94 > > > > 3b5441dc9d > > > > > > > > > > commit 1fa6daaafd74c1a457dcfe26e0a5943b5441dc9d > > > > > Author: Jose Luis Duran > > > > > AuthorDate: 2024-11-02 17:58:59 +0000 > > > > > Commit: Jose Luis Duran > > > > > CommitDate: 2024-11-12 03:46:15 +0000 > > > > > > > > > > ipfilter: Avoid stopping with a lock held > > > > > > > > > > Avoid calling _callout_stop_safe with a non-sleepable lock hel= > d when > > > > > detaching by initializing callout_init_rw() with CALLOUT_SHARE= > DLOCK. > > > > > > > > > > It avoids the following WITNESS warning when stopping the serv= > ice: > > > > > > > > > > # service ipfilter stop > > > > > calling _callout_stop_safe with the following non-sleepabl= > e lock > > > s > > > > held: > > > > > shared rw ipf filter load/unload mutex (ipf filter load/un= > load m > > > ut > > > > ex) r =3D 0 (0xffff0000417c7530) locked @ /usr/src/sys/netpfil/ipfilt= > er/netin > > > et > > > > /fil.c:7926 > > > > > stack backtrace: > > > > > #0 0xffff00000052d394 at witness_debugger+0x60 > > > > > #1 0xffff00000052e620 at witness_warn+0x404 > > > > > #2 0xffff0000004d4ffc at _callout_stop_safe+0x8c > > > > > #3 0xffff0000f7236674 at ipfdetach+0x3c > > > > > #4 0xffff0000f723fa4c at ipf_ipf_ioctl+0x788 > > > > > #5 0xffff0000f72367e0 at ipfioctl+0x144 > > > > > #6 0xffff00000034abd8 at devfs_ioctl+0x100 > > > > > #7 0xffff0000005c66a0 at vn_ioctl+0xbc > > > > > #8 0xffff00000034b2cc at devfs_ioctl_f+0x24 > > > > > #9 0xffff0000005331ec at kern_ioctl+0x2e0 > > > > > #10 0xffff000000532eb4 at sys_ioctl+0x140 > > > > > #11 0xffff000000880480 at do_el0_sync+0x604 > > > > > #12 0xffff0000008579ac at handle_el0_sync+0x4c > > > > > > > > > > PR: 282478 > > > > > Suggested by: markj > > > > > Reviewed by: cy > > > > > Approved by: emaste (mentor) > > > > > MFC after: 1 week > > > > > --- > > > > > sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c | 4 ++-- > > > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > > > > > diff --git a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c b/sys/ne= > tpfil/ > > > ip > > > > filter/netinet/ip_fil_freebsd.c > > > > > index bcde0d2c7323..b3dea40c3d8c 100644 > > > > > --- a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c > > > > > +++ b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c > > > > > @@ -181,7 +181,7 @@ ipf_timer_func(void *arg) > > > > > #if 0 > > > > > softc->ipf_slow_ch =3D timeout(ipf_timer_func, so= > ftc, hz/ > > > 2); > > > > > #endif > > > > > - callout_init(&softc->ipf_slow_ch, 1); > > > > > + callout_init_rw(&softc->ipf_slow_ch, &softc->ipf_global.i= > pf_lk, > > > > CALLOUT_SHAREDLOCK); > > > > > callout_reset(&softc->ipf_slow_ch, > > > > > (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT, > > > > > ipf_timer_func, softc); > > > > > @@ -221,7 +221,7 @@ ipfattach(ipf_main_softc_t *softc) > > > > > softc->ipf_slow_ch =3D timeout(ipf_timer_func, softc, > > > > > (hz / IPF_HZ_DIVIDE) * IPF_H= > Z_MULT > > > ); > > > > > #endif > > > > > - callout_init(&softc->ipf_slow_ch, 1); > > > > > + callout_init_rw(&softc->ipf_slow_ch, &softc->ipf_global.ipf_lk, C= > ALLOUT > > > > _SHAREDLOCK); > > > > > callout_reset(&softc->ipf_slow_ch, (hz / IPF_HZ_DIVIDE) *= > IPF_H > > > Z_MULT, > > > > > ipf_timer_func, softc); > > > > > return (0); > > > > > > > > But this means the callout is now called with the lock held, and I do= > n't se > > > e > > > > any changes > > > > to ipf_timer_func. Hmm, so you now recurse on the lock? You need to= > take > > > ou > > > > t the locking > > > > in ipf_timer_func I think as it is now spurious. You can also axe th= > e #if > > > 0' > > > > d code around > > > > timeout() while you are at it. > > > > > > Reviewing all the #if 0's in ipfilter, discovering why they are there, = > and > > > either removing them or implementing what Darren had initially intended= > is > > > in my queue. The upstream git log isn't helpful for reasons I preach ab= > out > > > proper commit logs. > > > > > > Given that this one is in ip_fil_freebsd.c (specific to FreeBSD), it ca= > n be > > > removed. Others require more grokking. > > > > It can go. It was #if 0'd by ea3022cbbd3f5, IIRC in discussion with you a= > t > > the time (2013). > > > > ea3022cbbd3f5 converted timeout(9) to callout(9). This code remained as a= > n > > artifact of the conversion. It was sent by you to me following the ipfilt= > er > > upgrade from 4.1.28 to 5.1.2 earlier that year. > > > > > > -- > > Cheers, > > Cy Schubert > > FreeBSD UNIX: Web: https://FreeBSD.org > > NTP: Web: https://nwtime.org > > > > e^(i*pi)+1=3D0 > > > > > > > > > > > > > --=20 > Jose Luis Duran From nobody Tue Nov 12 18:45:44 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XnwNQ17Hdz5cwby; Tue, 12 Nov 2024 18:45:58 +0000 (UTC) (envelope-from jlduran@gmail.com) Received: from mail-yb1-f179.google.com (mail-yb1-f179.google.com [209.85.219.179]) (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 4XnwNP4sZFz3wqX; Tue, 12 Nov 2024 18:45:57 +0000 (UTC) (envelope-from jlduran@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-yb1-f179.google.com with SMTP id 3f1490d57ef6-e2905d083d5so334473276.0; Tue, 12 Nov 2024 10:45:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731437156; x=1732041956; h=content-transfer-encoding:cc:to:subject:message-id:date:from :reply-to:in-reply-to:references:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=XC+KEMdEsMFRNsiyy07hPHLKxrQ1gtwma7srQQ5/vcg=; b=ZO990jbsP15axC+wdaGXp3HSmrYNN4xwaVNHEVhPqUdldCC998ca6IkuFj4tR75pcX JIK7UPAB3jOGR9prGbbVxHOakTV4TH21DGawMAu3gkBowj6uJb9ZbyY6+M2I3Up8BZz4 q188tlqwEW516rom3HK4vDUBrZz8aQgUUbW/UqQHg/bOCLSpNTlpI2mSVxv0t4jYdqKH HBo19ShSe0d782pKnXVBSxRSFnWgdqD6pnL74ON2wxr1M4UoMPoBwTMllqec1O64i/M2 k2Rt73YA7E4HgkJhJOOTeGh3IRz3HP469MCcGLZJDwO7xXFnM8qgN4ggEsVjOgwf+lI1 AZvw== X-Forwarded-Encrypted: i=1; AJvYcCUl2DtFrUDmb5I4uDBrrouY8RHOn18ZgPEQFJKHp+f/8ZQncyUHp3nabzVScOOxbV1/XVq3CUcdz6K4Y+BB/PBQtx/sLkk=@freebsd.org, AJvYcCVtUba896dNCn4YmTiblsBBFyPqn8v/u+va4rBT2hl62Wflb5cA2SNlPLL6x3Y4A19JUrkSGWZ9ONZDOOgvLpY=@freebsd.org, AJvYcCWlNOvHsMm+wMZwcWuUJDmInQqB3kx6qyFddtKLsRHT4mKXqPlKyxN9B1wUeoBWg2lx2eL81I6HNR4k7eC+5HBORPRa@freebsd.org X-Gm-Message-State: AOJu0YxWOjzCbmY8VlqiVLOEoP7DaURTi3JLKWOb5Vp9KfnIjkucDkUr pi8wOIpelKuBEYam4I++XyBAezwAwAs/kLhgtkuftwCVK/iyiow+63B2gFDPSVU= X-Google-Smtp-Source: AGHT+IENYGOSYub5gZWwJKohHg31d65SZ+XcJKkTrJAnk5yD7MxgzCQ7WIP/u73wImCqUiTyxKZfXg== X-Received: by 2002:a05:690c:3506:b0:6ea:4d3f:df8c with SMTP id 00721157ae682-6eaddd73a18mr62819567b3.1.1731437156206; Tue, 12 Nov 2024 10:45:56 -0800 (PST) Received: from mail-yb1-f169.google.com (mail-yb1-f169.google.com. [209.85.219.169]) by smtp.gmail.com with ESMTPSA id 00721157ae682-6eaceb656aasm26677357b3.83.2024.11.12.10.45.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 12 Nov 2024 10:45:55 -0800 (PST) Received: by mail-yb1-f169.google.com with SMTP id 3f1490d57ef6-e2905d083d5so334468276.0; Tue, 12 Nov 2024 10:45:55 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCUv6okY70ewGJueImII2pjRNFeJbeU058WN40hkum2Y+0oPztF+54cEev9Le6QbOZ7dfJxEbFE4RFkK+QpSOkk3x5mt/lc=@freebsd.org, AJvYcCVDR+RlbmODAbDRz0Dktt9Lnaa7N8vZJY4OSJ1QSNZFCJOZBxyteYiIJ7OEnf3cILGGj8AR6het+/NAQjTiv2lN/Jc3@freebsd.org, AJvYcCVPCy8ipdH7Xent7r40IzmCIP2dpkROc26o2eGdIchgvLZN1/cdRrMQFfXUqdoWh+/Yk2WxrLkn0OF5c6mzuMw=@freebsd.org X-Received: by 2002:a05:6902:2847:b0:e2b:dc86:c45d with SMTP id 3f1490d57ef6-e337f86b07bmr5956417276.3.1731437155610; Tue, 12 Nov 2024 10:45:55 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <202411120347.4AC3lPOA015167@gitrepo.freebsd.org> <09923ad3-4065-4a31-b35f-74f84e09cff1@FreeBSD.org> <20241112155219.2E15A2DF@slippy.cwsent.com> <20241112160243.B372532F@slippy.cwsent.com> <20241112184111.2CCA53C2@slippy.cwsent.com> In-Reply-To: <20241112184111.2CCA53C2@slippy.cwsent.com> Reply-To: jlduran@freebsd.org From: Jose Luis Duran Date: Tue, 12 Nov 2024 15:45:44 -0300 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 1fa6daaafd74 - main - ipfilter: Avoid stopping with a lock held To: Cy Schubert Cc: John Baldwin , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4XnwNP4sZFz3wqX X-Spamd-Bar: ---- On Tue, Nov 12, 2024 at 3:41=E2=80=AFPM Cy Schubert wrote: > > I'm building a test patch on my sandbox machine. The patches in my git re= po > will, > > a) remove another #if 0 from 2013, > b) revert this commit, > c) fix the "stopping with lock held" bug > > Testing on the sandbox is needed before I submit a review. > > You can revert this if you want, or I can push my three commits when my > testing is complete. I'll revert the commit, I feel better with this approach, thank you! > > > -- > Cheers, > Cy Schubert > FreeBSD UNIX: Web: https://FreeBSD.org > NTP: Web: https://nwtime.org > > e^(i*pi)+1=3D0 > > > In message om> > , Jose Luis Duran writes: > > What would be the recommended approach in this case? > > Revert, and commit with the fixes, or just fix the problematic code. > > > > At any rate, I have created https://reviews.freebsd.org/D47530. Feel > > free to commandeer it, as my testing is limited to what's currently in > > the "Test Plan". I was not able to recreate the deadlock described > > here, but it definitely makes sense. > > > > On Tue, Nov 12, 2024 at 1:02=3DE2=3D80=3DAFPM Cy Schubert > com> wrote: > > > > > > In message <20241112155219.2E15A2DF@slippy.cwsent.com>, Cy Schubert w= rite=3D > > s: > > > > In message <09923ad3-4065-4a31-b35f-74f84e09cff1@FreeBSD.org>, John= Bal=3D > > dwin > > > > wri > > > > tes: > > > > > On 11/11/24 19:47, Jose Luis Duran wrote: > > > > > > The branch main has been updated by jlduran: > > > > > > > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D3D1fa6daaafd74c1= a457dc=3D > > fe26e0a5 > > > > 94 > > > > > 3b5441dc9d > > > > > > > > > > > > commit 1fa6daaafd74c1a457dcfe26e0a5943b5441dc9d > > > > > > Author: Jose Luis Duran > > > > > > AuthorDate: 2024-11-02 17:58:59 +0000 > > > > > > Commit: Jose Luis Duran > > > > > > CommitDate: 2024-11-12 03:46:15 +0000 > > > > > > > > > > > > ipfilter: Avoid stopping with a lock held > > > > > > > > > > > > Avoid calling _callout_stop_safe with a non-sleepable lock= hel=3D > > d when > > > > > > detaching by initializing callout_init_rw() with CALLOUT_S= HARE=3D > > DLOCK. > > > > > > > > > > > > It avoids the following WITNESS warning when stopping the = serv=3D > > ice: > > > > > > > > > > > > # service ipfilter stop > > > > > > calling _callout_stop_safe with the following non-slee= pabl=3D > > e lock > > > > s > > > > > held: > > > > > > shared rw ipf filter load/unload mutex (ipf filter loa= d/un=3D > > load m > > > > ut > > > > > ex) r =3D3D 0 (0xffff0000417c7530) locked @ /usr/src/sys/netpfil/= ipfilt=3D > > er/netin > > > > et > > > > > /fil.c:7926 > > > > > > stack backtrace: > > > > > > #0 0xffff00000052d394 at witness_debugger+0x60 > > > > > > #1 0xffff00000052e620 at witness_warn+0x404 > > > > > > #2 0xffff0000004d4ffc at _callout_stop_safe+0x8c > > > > > > #3 0xffff0000f7236674 at ipfdetach+0x3c > > > > > > #4 0xffff0000f723fa4c at ipf_ipf_ioctl+0x788 > > > > > > #5 0xffff0000f72367e0 at ipfioctl+0x144 > > > > > > #6 0xffff00000034abd8 at devfs_ioctl+0x100 > > > > > > #7 0xffff0000005c66a0 at vn_ioctl+0xbc > > > > > > #8 0xffff00000034b2cc at devfs_ioctl_f+0x24 > > > > > > #9 0xffff0000005331ec at kern_ioctl+0x2e0 > > > > > > #10 0xffff000000532eb4 at sys_ioctl+0x140 > > > > > > #11 0xffff000000880480 at do_el0_sync+0x604 > > > > > > #12 0xffff0000008579ac at handle_el0_sync+0x4c > > > > > > > > > > > > PR: 282478 > > > > > > Suggested by: markj > > > > > > Reviewed by: cy > > > > > > Approved by: emaste (mentor) > > > > > > MFC after: 1 week > > > > > > --- > > > > > > sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c | 4 ++-- > > > > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > > > > > > > diff --git a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c b/sy= s/ne=3D > > tpfil/ > > > > ip > > > > > filter/netinet/ip_fil_freebsd.c > > > > > > index bcde0d2c7323..b3dea40c3d8c 100644 > > > > > > --- a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c > > > > > > +++ b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c > > > > > > @@ -181,7 +181,7 @@ ipf_timer_func(void *arg) > > > > > > #if 0 > > > > > > softc->ipf_slow_ch =3D3D timeout(ipf_timer_fu= nc, so=3D > > ftc, hz/ > > > > 2); > > > > > > #endif > > > > > > - callout_init(&softc->ipf_slow_ch, 1); > > > > > > + callout_init_rw(&softc->ipf_slow_ch, &softc->ipf_glob= al.i=3D > > pf_lk, > > > > > CALLOUT_SHAREDLOCK); > > > > > > callout_reset(&softc->ipf_slow_ch, > > > > > > (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT, > > > > > > ipf_timer_func, softc); > > > > > > @@ -221,7 +221,7 @@ ipfattach(ipf_main_softc_t *softc) > > > > > > softc->ipf_slow_ch =3D3D timeout(ipf_timer_func, soft= c, > > > > > > (hz / IPF_HZ_DIVIDE) * I= PF_H=3D > > Z_MULT > > > > ); > > > > > > #endif > > > > > > - callout_init(&softc->ipf_slow_ch, 1); > > > > > > + callout_init_rw(&softc->ipf_slow_ch, &softc->ipf_global.ipf_l= k, C=3D > > ALLOUT > > > > > _SHAREDLOCK); > > > > > > callout_reset(&softc->ipf_slow_ch, (hz / IPF_HZ_DIVID= E) *=3D > > IPF_H > > > > Z_MULT, > > > > > > ipf_timer_func, softc); > > > > > > return (0); > > > > > > > > > > But this means the callout is now called with the lock held, and = I do=3D > > n't se > > > > e > > > > > any changes > > > > > to ipf_timer_func. Hmm, so you now recurse on the lock? You nee= d to=3D > > take > > > > ou > > > > > t the locking > > > > > in ipf_timer_func I think as it is now spurious. You can also ax= e th=3D > > e #if > > > > 0' > > > > > d code around > > > > > timeout() while you are at it. > > > > > > > > Reviewing all the #if 0's in ipfilter, discovering why they are the= re, =3D > > and > > > > either removing them or implementing what Darren had initially inte= nded=3D > > is > > > > in my queue. The upstream git log isn't helpful for reasons I preac= h ab=3D > > out > > > > proper commit logs. > > > > > > > > Given that this one is in ip_fil_freebsd.c (specific to FreeBSD), i= t ca=3D > > n be > > > > removed. Others require more grokking. > > > > > > It can go. It was #if 0'd by ea3022cbbd3f5, IIRC in discussion with y= ou a=3D > > t > > > the time (2013). > > > > > > ea3022cbbd3f5 converted timeout(9) to callout(9). This code remained = as a=3D > > n > > > artifact of the conversion. It was sent by you to me following the ip= filt=3D > > er > > > upgrade from 4.1.28 to 5.1.2 earlier that year. > > > > > > > > > -- > > > Cheers, > > > Cy Schubert > > > FreeBSD UNIX: Web: https://FreeBSD.org > > > NTP: Web: https://nwtime.org > > > > > > e^(i*pi)+1=3D3D0 > > > > > > > > > > > > > > > > > > > > > --=3D20 > > Jose Luis Duran > > --=20 Jose Luis Duran From nobody Tue Nov 12 18:49:11 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XnwS934kXz5cwGv; Tue, 12 Nov 2024 18:49:13 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta002.cacentral1.a.cloudfilter.net (omta002.cacentral1.a.cloudfilter.net [3.97.99.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XnwS921tzz3xP3; Tue, 12 Nov 2024 18:49:13 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4003a.ext.cloudfilter.net ([10.228.9.183]) by cmsmtp with ESMTPS id Av9GtmuX1MArNAvwutucrg; Tue, 12 Nov 2024 18:49:12 +0000 Received: from spqr.komquats.com ([70.66.152.170]) by cmsmtp with ESMTPSA id AvwttAOcNE0IVAvwutjotu; Tue, 12 Nov 2024 18:49:12 +0000 X-Auth-User: cschuber X-Authority-Analysis: v=2.4 cv=cI9DsUeN c=1 sm=1 tr=0 ts=6733a328 a=y8EK/9tc/U6QY+pUhnbtgQ==:117 a=y8EK/9tc/U6QY+pUhnbtgQ==:17 a=kj9zAlcOel0A:10 a=VlfZXiiP6vEA:10 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=VxmjJ2MpAAAA:8 a=qoy45kKaB9dZ2ii3csIA:9 a=CjuIK1q_8ugA:10 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 a=7gXAzLPJhVmCkEl4_tsf:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 2C8EFD0A; Tue, 12 Nov 2024 10:49:11 -0800 (PST) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 28C0EFA; Tue, 12 Nov 2024 10:49:11 -0800 (PST) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: jlduran@freebsd.org cc: Cy Schubert , John Baldwin , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 1fa6daaafd74 - main - ipfilter: Avoid stopping with a lock held In-reply-to: References: <202411120347.4AC3lPOA015167@gitrepo.freebsd.org> <09923ad3-4065-4a31-b35f-74f84e09cff1@FreeBSD.org> <20241112155219.2E15A2DF@slippy.cwsent.com> <20241112160243.B372532F@slippy.cwsent.com> <20241112184111.2CCA53C2@slippy.cwsent.com> Comments: In-reply-to Jose Luis Duran message dated "Tue, 12 Nov 2024 15:45:44 -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 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 12 Nov 2024 10:49:11 -0800 Message-Id: <20241112184911.28C0EFA@slippy.cwsent.com> X-CMAE-Envelope: MS4xfDAccdziw4N+OTL9jUgwfLp63Lyd5nCGqcn+wqazqyNuJGoRIQ2JTQMNq/tT2uzwVA3FPZY9WQ+KNe5+XeE5NLgicTJxGkKrLRxAD8Ov0bUd3stAz2SZ XVPylKY+x4EvS2O8evAiNAvtt/rNAI5ZpNRUlMUSLr9ekh2JYkhynn13RIY0QFIFPoE8kEO6Qy+EDUYRLC/vM24ODPRnqGYe558BYoT5r8u8YCwrvzA9FGgP OdF7iFBQdXoOxsk9nWHbYYQP6zIWEZa4jxhjX0EvgEyCwXlGR7RePKOzDsgSBQOwwH9Tx3a3ymihbomdbeJUU+OyN+8Dx+XKfsyLtceCXK4QEy2ECbfSfluk W0TGMJde X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US] X-Rspamd-Queue-Id: 4XnwS921tzz3xP3 X-Spamd-Bar: ---- In message , Jose Luis Duran writes: > On Tue, Nov 12, 2024 at 3:41=E2=80=AFPM Cy Schubert com> wrote: > > > > I'm building a test patch on my sandbox machine. The patches in my git re= > po > > will, > > > > a) remove another #if 0 from 2013, > > b) revert this commit, > > c) fix the "stopping with lock held" bug > > > > Testing on the sandbox is needed before I submit a review. > > > > You can revert this if you want, or I can push my three commits when my > > testing is complete. > > I'll revert the commit, I feel better with this approach, thank you! -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0 > > > > > > > -- > > Cheers, > > Cy Schubert > > FreeBSD UNIX: Web: https://FreeBSD.org > > NTP: Web: https://nwtime.org > > > > e^(i*pi)+1=3D0 > > > > > > In message ail.c > > om> > > , Jose Luis Duran writes: > > > What would be the recommended approach in this case? > > > Revert, and commit with the fixes, or just fix the problematic code. > > > > > > At any rate, I have created https://reviews.freebsd.org/D47530. Feel > > > free to commandeer it, as my testing is limited to what's currently in > > > the "Test Plan". I was not able to recreate the deadlock described > > > here, but it definitely makes sense. > > > > > > On Tue, Nov 12, 2024 at 1:02=3DE2=3D80=3DAFPM Cy Schubert cschubert.=3D > > > com> wrote: > > > > > > > > In message <20241112155219.2E15A2DF@slippy.cwsent.com>, Cy Schubert w= > rite=3D > > > s: > > > > > In message <09923ad3-4065-4a31-b35f-74f84e09cff1@FreeBSD.org>, John= > Bal=3D > > > dwin > > > > > wri > > > > > tes: > > > > > > On 11/11/24 19:47, Jose Luis Duran wrote: > > > > > > > The branch main has been updated by jlduran: > > > > > > > > > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D3D1fa6daaafd74c1= > a457dc=3D > > > fe26e0a5 > > > > > 94 > > > > > > 3b5441dc9d > > > > > > > > > > > > > > commit 1fa6daaafd74c1a457dcfe26e0a5943b5441dc9d > > > > > > > Author: Jose Luis Duran > > > > > > > AuthorDate: 2024-11-02 17:58:59 +0000 > > > > > > > Commit: Jose Luis Duran > > > > > > > CommitDate: 2024-11-12 03:46:15 +0000 > > > > > > > > > > > > > > ipfilter: Avoid stopping with a lock held > > > > > > > > > > > > > > Avoid calling _callout_stop_safe with a non-sleepable lock= > hel=3D > > > d when > > > > > > > detaching by initializing callout_init_rw() with CALLOUT_S= > HARE=3D > > > DLOCK. > > > > > > > > > > > > > > It avoids the following WITNESS warning when stopping the = > serv=3D > > > ice: > > > > > > > > > > > > > > # service ipfilter stop > > > > > > > calling _callout_stop_safe with the following non-slee= > pabl=3D > > > e lock > > > > > s > > > > > > held: > > > > > > > shared rw ipf filter load/unload mutex (ipf filter loa= > d/un=3D > > > load m > > > > > ut > > > > > > ex) r =3D3D 0 (0xffff0000417c7530) locked @ /usr/src/sys/netpfil/= > ipfilt=3D > > > er/netin > > > > > et > > > > > > /fil.c:7926 > > > > > > > stack backtrace: > > > > > > > #0 0xffff00000052d394 at witness_debugger+0x60 > > > > > > > #1 0xffff00000052e620 at witness_warn+0x404 > > > > > > > #2 0xffff0000004d4ffc at _callout_stop_safe+0x8c > > > > > > > #3 0xffff0000f7236674 at ipfdetach+0x3c > > > > > > > #4 0xffff0000f723fa4c at ipf_ipf_ioctl+0x788 > > > > > > > #5 0xffff0000f72367e0 at ipfioctl+0x144 > > > > > > > #6 0xffff00000034abd8 at devfs_ioctl+0x100 > > > > > > > #7 0xffff0000005c66a0 at vn_ioctl+0xbc > > > > > > > #8 0xffff00000034b2cc at devfs_ioctl_f+0x24 > > > > > > > #9 0xffff0000005331ec at kern_ioctl+0x2e0 > > > > > > > #10 0xffff000000532eb4 at sys_ioctl+0x140 > > > > > > > #11 0xffff000000880480 at do_el0_sync+0x604 > > > > > > > #12 0xffff0000008579ac at handle_el0_sync+0x4c > > > > > > > > > > > > > > PR: 282478 > > > > > > > Suggested by: markj > > > > > > > Reviewed by: cy > > > > > > > Approved by: emaste (mentor) > > > > > > > MFC after: 1 week > > > > > > > --- > > > > > > > sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c | 4 ++-- > > > > > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > > > > > > > > > diff --git a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c b/sy= > s/ne=3D > > > tpfil/ > > > > > ip > > > > > > filter/netinet/ip_fil_freebsd.c > > > > > > > index bcde0d2c7323..b3dea40c3d8c 100644 > > > > > > > --- a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c > > > > > > > +++ b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c > > > > > > > @@ -181,7 +181,7 @@ ipf_timer_func(void *arg) > > > > > > > #if 0 > > > > > > > softc->ipf_slow_ch =3D3D timeout(ipf_timer_fu= > nc, so=3D > > > ftc, hz/ > > > > > 2); > > > > > > > #endif > > > > > > > - callout_init(&softc->ipf_slow_ch, 1); > > > > > > > + callout_init_rw(&softc->ipf_slow_ch, &softc->ipf_glob= > al.i=3D > > > pf_lk, > > > > > > CALLOUT_SHAREDLOCK); > > > > > > > callout_reset(&softc->ipf_slow_ch, > > > > > > > (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT, > > > > > > > ipf_timer_func, softc); > > > > > > > @@ -221,7 +221,7 @@ ipfattach(ipf_main_softc_t *softc) > > > > > > > softc->ipf_slow_ch =3D3D timeout(ipf_timer_func, soft= > c, > > > > > > > (hz / IPF_HZ_DIVIDE) * I= > PF_H=3D > > > Z_MULT > > > > > ); > > > > > > > #endif > > > > > > > - callout_init(&softc->ipf_slow_ch, 1); > > > > > > > + callout_init_rw(&softc->ipf_slow_ch, &softc->ipf_global.ipf_l= > k, C=3D > > > ALLOUT > > > > > > _SHAREDLOCK); > > > > > > > callout_reset(&softc->ipf_slow_ch, (hz / IPF_HZ_DIVID= > E) *=3D > > > IPF_H > > > > > Z_MULT, > > > > > > > ipf_timer_func, softc); > > > > > > > return (0); > > > > > > > > > > > > But this means the callout is now called with the lock held, and = > I do=3D > > > n't se > > > > > e > > > > > > any changes > > > > > > to ipf_timer_func. Hmm, so you now recurse on the lock? You nee= > d to=3D > > > take > > > > > ou > > > > > > t the locking > > > > > > in ipf_timer_func I think as it is now spurious. You can also ax= > e th=3D > > > e #if > > > > > 0' > > > > > > d code around > > > > > > timeout() while you are at it. > > > > > > > > > > Reviewing all the #if 0's in ipfilter, discovering why they are the= > re, =3D > > > and > > > > > either removing them or implementing what Darren had initially inte= > nded=3D > > > is > > > > > in my queue. The upstream git log isn't helpful for reasons I preac= > h ab=3D > > > out > > > > > proper commit logs. > > > > > > > > > > Given that this one is in ip_fil_freebsd.c (specific to FreeBSD), i= > t ca=3D > > > n be > > > > > removed. Others require more grokking. > > > > > > > > It can go. It was #if 0'd by ea3022cbbd3f5, IIRC in discussion with y= > ou a=3D > > > t > > > > the time (2013). > > > > > > > > ea3022cbbd3f5 converted timeout(9) to callout(9). This code remained = > as a=3D > > > n > > > > artifact of the conversion. It was sent by you to me following the ip= > filt=3D > > > er > > > > upgrade from 4.1.28 to 5.1.2 earlier that year. > > > > > > > > > > > > -- > > > > Cheers, > > > > Cy Schubert > > > > FreeBSD UNIX: Web: https://FreeBSD.org > > > > NTP: Web: https://nwtime.org > > > > > > > > e^(i*pi)+1=3D3D0 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --=3D20 > > > Jose Luis Duran > > > > > > > --=20 > Jose Luis Duran From nobody Tue Nov 12 18:57:39 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xnwdw1TF6z5cxDm; Tue, 12 Nov 2024 18:57: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xnwdw0ggXz3yg2; Tue, 12 Nov 2024 18:57:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731437860; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YjbTG7sbOdlgJSRmCX/PJYWZ0eKo/UwiSsgbbUKTHCY=; b=IgDVzLiViCQeyRuLWnEy+0iIDmcT0Bg8uKd2dTCn4IPCNRPInIIOMeUOyWvX7H2cJXi7Pc 84fujqiGC+hqfMd4aah+VvmS4+bk0LB5mNF2QCBBGv0i5+MfspHMY5DYXvvEOAJz7BkZpT GOvIVy4DgLzd7WW77HsGRUFRBkTCFQ0cbAPLMTcoaushR/ZHeBcCAp4yq+YjxeVvyEID9U 4WzbQ4sMm+0hRcVKf0hvnP2Fky3Y5/eYTP543PdZNU4u+peUsRmHqi5nLCgNuDtT4abFuy QpZQnebeOCh5KROPTgvJO4RfIp6bgjzKnahGDwVBHzlfAjDWNn52HTgENns0SA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731437860; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YjbTG7sbOdlgJSRmCX/PJYWZ0eKo/UwiSsgbbUKTHCY=; b=gPag2nQotyRXOXpyS9fDRC1iqoJxbxfYGwhwWVHNmmsAhjMjNyCXDe6NzYyi2w95bwXGLe 4ml2DdTUQBLR4IITJILzI4oKSDjsSKOykL0Ihka/1EMrLadfPTZWAKl26mdGwHYssclpQp 9czLhR1ncXhViLj7uPLLnWa6p5TUowsGugJkTDcA5+n+QNtxaxR+1PhW0HbGFx9r0i964X 0tVU6XGitH+BwwAcGFJ53jGqm4TRQ5QQiBV2vO6FtfsqVrEd+2QtYbtWbBEU0aJeTedKI2 tsDr0gEpQpicff/8toWESko2x40kR4Gn+y6PMojbBZ8kLCP0YJS6nYetgZZYhw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731437860; a=rsa-sha256; cv=none; b=wRF5FO9huL6YgBiRujUTlJj1g9D2w4aBLrQWlfJHpaDtoJsBYHNqcwsXf7rxqLrP/SMdK5 njTP/3WCGBGw5sGAsw6tXDl3dK7eAlXR1D8+CTTg18J03ZWIx4q2rCy1Nb06DBkmP+eox2 la3VtZ423ln3Vgh7FGEVrP1VEnkFGIKRyethViC6+tGcrJN7AV39FrCetiXjH16of90AzN atWM1zJwbe41jZwD59FdkqnGF0UIDInYweaNcIp0SwDV1P9JdXlEu2ygRl3whRt68PbxoX QLmHwPPQpDm95MyfyBRSw/+LPqZywHe82KeZEvPmj9zar+xjo8aCaghocDOZ0g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xnwdw0GklzMqF; Tue, 12 Nov 2024 18:57:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ACIvdic099949; Tue, 12 Nov 2024 18:57:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ACIvdWW099946; Tue, 12 Nov 2024 18:57:39 GMT (envelope-from git) Date: Tue, 12 Nov 2024 18:57:39 GMT Message-Id: <202411121857.4ACIvdWW099946@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: a0618fbe19df - main - Revert "ipfilter: Avoid stopping with a lock held" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a0618fbe19dfedcdf01b4c232fe6669ae19505c4 Auto-Submitted: auto-generated The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=a0618fbe19dfedcdf01b4c232fe6669ae19505c4 commit a0618fbe19dfedcdf01b4c232fe6669ae19505c4 Author: Jose Luis Duran AuthorDate: 2024-11-12 18:51:45 +0000 Commit: Jose Luis Duran CommitDate: 2024-11-12 18:53:39 +0000 Revert "ipfilter: Avoid stopping with a lock held" The timeout function still tries to acquire the rwlock, and now it deadlocks, since the callout framework will have already acquired it. This reverts commit 1fa6daaafd74c1a457dcfe26e0a5943b5441dc9d. PR: 282478 Reported by: markj Approved by: emaste (mentor) --- sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c index 23514907f86e..84fac0205ffc 100644 --- a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c +++ b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c @@ -178,7 +178,7 @@ ipf_timer_func(void *arg) ipf_slowtimer(softc); if (softc->ipf_running == -1 || softc->ipf_running == 1) { - callout_init_rw(&softc->ipf_slow_ch, &softc->ipf_global.ipf_lk, CALLOUT_SHAREDLOCK); + callout_init(&softc->ipf_slow_ch, 1); callout_reset(&softc->ipf_slow_ch, (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT, ipf_timer_func, softc); @@ -218,7 +218,7 @@ ipfattach(ipf_main_softc_t *softc) softc->ipf_slow_ch = timeout(ipf_timer_func, softc, (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT); #endif - callout_init_rw(&softc->ipf_slow_ch, &softc->ipf_global.ipf_lk, CALLOUT_SHAREDLOCK); + callout_init(&softc->ipf_slow_ch, 1); callout_reset(&softc->ipf_slow_ch, (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT, ipf_timer_func, softc); return (0); From nobody Tue Nov 12 19:04:24 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xnwnh6PBnz5cxLc; Tue, 12 Nov 2024 19:04: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xnwnh5qyLz40rB; Tue, 12 Nov 2024 19:04:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731438264; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f2VI0FEur3VihcRFfa7kdorEA1z7f3SN7ISUmGerhBw=; b=Lr8zIchtmD29j8uEmFEtqZ5ElW/ucKIQlNB7W4Xfn8ZhCv3CfxLG9/02Pst/sywZNBkZry kYwKZJrO5XeFn7qlsUppJCnfit9GELEfk3T4iMPesg+vfscSU3xrOo7ukt8w1rYXG17HB5 +g0Maw6fQOWYh/W0nTbmW75QNwsrMJCdSAbU2GoU+Htz5hTpYasqUqGXuA0/2ZT9LBqB7j FQVxzyMZUO0UrC46n5AJYtldOkWcYLHaa/NzQyHvhbLHZIV2WnJN+N/Ja0J1we2RPehSpF VH1sIOjQNtq9njOFAwfcaTcxG7rSTHAv5VCU+hhlhn90lt4hZ/tXRC93cdc50w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731438264; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f2VI0FEur3VihcRFfa7kdorEA1z7f3SN7ISUmGerhBw=; b=ENEz6BZ1Hdh4nvN7TNFCn+pnN4ogw/ODuxSsfmr0KBI+7JshBbWUcMP5m5gn0kSgeuA9hc VoLw5G8HhzZvo1nOLXVGk4JGobtnIk2JBPMdO4+zV0uT2h8pLSV0VZFjDTvTHGhPnWz000 juER14ESlvlLf83f7kW5YFKv6e1rmEPi637EdBHAkOgu8+EGBawVUgGG24gioU7H1dkYqP Et3+ZwIDwFlNFrG2L9eF8nhFunvZYdmSeCzQjZqVccPa2yHrY5B3+H/DOiZcBz0Iy10vV/ AbXFJcg0oVBvWfzaJd7kDGeO/i800lWUu/y0yPNatFlleJRFOh8iyRUoHgZ4FA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731438264; a=rsa-sha256; cv=none; b=cgk3KN43NVlnQw+aqWvne7NHtmyzZtKfUtGSpNtkY40m3YL40AerfqdyxN379+NFfw+iHc IboBpU7kUUViplk+8+Y1nPXIJaCSGyj50kmy0WMdHNqjD/CoCfvYKfOU4BhLffdEyI04DF RIWrli6aJ430sBg4HhVWputC/MgGDyKtFnps402s0Ap7UNLR6u+3QQPZN+yjx/opxijgTK pPRsPSD4TbdLlw8zz+xtQ1HG1PTOiOwJnwopzxufX+caUG6QE/qeSaEnVGP1vtX19jkFPO 1puje9n3Bais1CT8aAZlUIFa1X1DHxMmtxFyLn04ZI6zQdFATyuk/94eGVD7kQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xnwnh5L7yzMfr; Tue, 12 Nov 2024 19:04:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ACJ4OX3018138; Tue, 12 Nov 2024 19:04:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ACJ4OZO018135; Tue, 12 Nov 2024 19:04:24 GMT (envelope-from git) Date: Tue, 12 Nov 2024 19:04:24 GMT Message-Id: <202411121904.4ACJ4OZO018135@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ka Ho Ng Subject: git: 6e3875ebcf0e - main - sys: move SAN and COVERAGE options handling to kern.mk List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: khng X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6e3875ebcf0e768332735f8306bf4625b30ab61c Auto-Submitted: auto-generated The branch main has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=6e3875ebcf0e768332735f8306bf4625b30ab61c commit 6e3875ebcf0e768332735f8306bf4625b30ab61c Author: Ka Ho Ng AuthorDate: 2024-11-10 04:07:14 +0000 Commit: Ka Ho Ng CommitDate: 2024-11-12 19:04:13 +0000 sys: move SAN and COVERAGE options handling to kern.mk This allows the flags to be picked up more easily when building external modules. Sponsored by: Juniper Networks, Inc. Reviewed by: markj (earlier) Differential Revision: https://reviews.freebsd.org/D45563 --- sys/conf/kern.mk | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++ sys/conf/kern.post.mk | 4 --- sys/conf/kern.pre.mk | 64 ----------------------------------------- sys/conf/kmod.mk | 6 ++-- 4 files changed, 84 insertions(+), 70 deletions(-) diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index 2f451f9286a6..5d07a1d9ad3c 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -247,6 +247,86 @@ CFLAGS+= -fstack-protector CFLAGS+= -mretpoline .endif +# +# Kernel Address SANitizer support +# +.if !empty(KASAN_ENABLED) +SAN_CFLAGS+= -DSAN_NEEDS_INTERCEPTORS -DSAN_INTERCEPTOR_PREFIX=kasan \ + -fsanitize=kernel-address +.if ${COMPILER_TYPE} == "clang" +SAN_CFLAGS+= -mllvm -asan-stack=true \ + -mllvm -asan-instrument-dynamic-allocas=true \ + -mllvm -asan-globals=true \ + -mllvm -asan-use-after-scope=true \ + -mllvm -asan-instrumentation-with-call-threshold=0 \ + -mllvm -asan-instrument-byval=false +.endif + +.if ${MACHINE_CPUARCH} == "aarch64" +# KASAN/ARM64 TODO: -asan-mapping-offset is calculated from: +# (VM_KERNEL_MIN_ADDRESS >> KASAN_SHADOW_SCALE_SHIFT) + $offset = KASAN_MIN_ADDRESS +# +# This is different than amd64, where we have a different +# KASAN_MIN_ADDRESS, and this offset value should eventually be +# upstreamed similar to: https://reviews.llvm.org/D98285 +# +.if ${COMPILER_TYPE} == "clang" +SAN_CFLAGS+= -mllvm -asan-mapping-offset=0xdfff208000000000 +.else +SAN_CFLAGS+= -fasan-shadow-offset=0xdfff208000000000 +.endif +.elif ${MACHINE_CPUARCH} == "amd64" && \ + ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 180000 +# Work around https://github.com/llvm/llvm-project/issues/87923, which leads to +# an assertion failure compiling dtrace.c with asan enabled. +SAN_CFLAGS+= -mllvm -asan-use-stack-safety=0 +.endif +.endif # !empty(KASAN_ENABLED) + +# +# Kernel Concurrency SANitizer support +# +.if !empty(KCSAN_ENABLED) +SAN_CFLAGS+= -DSAN_NEEDS_INTERCEPTORS -DSAN_INTERCEPTOR_PREFIX=kcsan \ + -fsanitize=thread +.endif + +# +# Kernel Memory SANitizer support +# +.if !empty(KMSAN_ENABLED) +# Disable -fno-sanitize-memory-param-retval until interceptors have been +# updated to work properly with it. +MSAN_CFLAGS+= -DSAN_NEEDS_INTERCEPTORS -DSAN_INTERCEPTOR_PREFIX=kmsan \ + -fsanitize=kernel-memory +.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 160000 +MSAN_CFLAGS+= -fno-sanitize-memory-param-retval +.endif +SAN_CFLAGS+= ${MSAN_CFLAGS} +.endif # !empty(KMSAN_ENABLED) + +# +# Kernel Undefined Behavior SANitizer support +# +.if !empty(KUBSAN_ENABLED) +SAN_CFLAGS+= -fsanitize=undefined +.endif + +# +# Generic Kernel Coverage support +# +.if !empty(COVERAGE_ENABLED) +.if ${COMPILER_TYPE} == "clang" || \ + (${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 80100) +SAN_CFLAGS+= -fsanitize-coverage=trace-pc,trace-cmp +.else +SAN_CFLAGS+= -fsanitize-coverage=trace-pc +.endif +.endif # !empty(COVERAGE_ENABLED) + +# Add the sanitizer C flags +CFLAGS+= ${SAN_CFLAGS} + # # Initialize stack variables on function entry # diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk index 5f6ec2db498d..59e51c394a35 100644 --- a/sys/conf/kern.post.mk +++ b/sys/conf/kern.post.mk @@ -37,10 +37,6 @@ MKMODULESENV+= WITH_CTF="${WITH_CTF}" MKMODULESENV+= KCSAN_ENABLED="yes" .endif -.if defined(SAN_CFLAGS) -MKMODULESENV+= SAN_CFLAGS="${SAN_CFLAGS}" -.endif - .if defined(GCOV_CFLAGS) MKMODULESENV+= GCOV_CFLAGS="${GCOV_CFLAGS}" .endif diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk index d0a66ceceae2..6ad9d209c70a 100644 --- a/sys/conf/kern.pre.mk +++ b/sys/conf/kern.pre.mk @@ -93,73 +93,9 @@ ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${CFLAGS} ${ASM_CFLAGS.${.IMPSRC:T}} COMPAT_FREEBSD32_ENABLED!= grep COMPAT_FREEBSD32 opt_global.h || true ; echo KASAN_ENABLED!= grep KASAN opt_global.h || true ; echo -.if !empty(KASAN_ENABLED) -SAN_CFLAGS+= -DSAN_NEEDS_INTERCEPTORS -DSAN_INTERCEPTOR_PREFIX=kasan \ - -fsanitize=kernel-address -.if ${COMPILER_TYPE} == "clang" -SAN_CFLAGS+= -mllvm -asan-stack=true \ - -mllvm -asan-instrument-dynamic-allocas=true \ - -mllvm -asan-globals=true \ - -mllvm -asan-use-after-scope=true \ - -mllvm -asan-instrumentation-with-call-threshold=0 \ - -mllvm -asan-instrument-byval=false -.endif - -.if ${MACHINE_CPUARCH} == "aarch64" -# KASAN/ARM64 TODO: -asan-mapping-offset is calculated from: -# (VM_KERNEL_MIN_ADDRESS >> KASAN_SHADOW_SCALE_SHIFT) + $offset = KASAN_MIN_ADDRESS -# -# This is different than amd64, where we have a different -# KASAN_MIN_ADDRESS, and this offset value should eventually be -# upstreamed similar to: https://reviews.llvm.org/D98285 -# -.if ${COMPILER_TYPE} == "clang" -SAN_CFLAGS+= -mllvm -asan-mapping-offset=0xdfff208000000000 -.else -SAN_CFLAGS+= -fasan-shadow-offset=0xdfff208000000000 -.endif -.elif ${MACHINE_CPUARCH} == "amd64" && \ - ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 180000 -# Work around https://github.com/llvm/llvm-project/issues/87923, which leads to -# an assertion failure compiling dtrace.c with asan enabled. -SAN_CFLAGS+= -mllvm -asan-use-stack-safety=0 -.endif -.endif - -KCSAN_ENABLED!= grep KCSAN opt_global.h || true ; echo -.if !empty(KCSAN_ENABLED) -SAN_CFLAGS+= -DSAN_NEEDS_INTERCEPTORS -DSAN_INTERCEPTOR_PREFIX=kcsan \ - -fsanitize=thread -.endif - KMSAN_ENABLED!= grep KMSAN opt_global.h || true ; echo -.if !empty(KMSAN_ENABLED) -# Disable -fno-sanitize-memory-param-retval until interceptors have been -# updated to work properly with it. -MSAN_CFLAGS+= -DSAN_NEEDS_INTERCEPTORS -DSAN_INTERCEPTOR_PREFIX=kmsan \ - -fsanitize=kernel-memory -.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 160000 -MSAN_CFLAGS+= -fno-sanitize-memory-param-retval -.endif -SAN_CFLAGS+= ${MSAN_CFLAGS} -.endif - KUBSAN_ENABLED!= grep KUBSAN opt_global.h || true ; echo -.if !empty(KUBSAN_ENABLED) -SAN_CFLAGS+= -fsanitize=undefined -.endif - COVERAGE_ENABLED!= grep COVERAGE opt_global.h || true ; echo -.if !empty(COVERAGE_ENABLED) -.if ${COMPILER_TYPE} == "clang" || \ - (${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 80100) -SAN_CFLAGS+= -fsanitize-coverage=trace-pc,trace-cmp -.else -SAN_CFLAGS+= -fsanitize-coverage=trace-pc -.endif -.endif - -CFLAGS+= ${SAN_CFLAGS} GCOV_ENABLED!= grep GCOV opt_global.h || true ; echo .if !empty(GCOV_ENABLED) diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk index 03bf42f5b413..645c04cdd135 100644 --- a/sys/conf/kmod.mk +++ b/sys/conf/kmod.mk @@ -406,8 +406,10 @@ ${_src}: .endfor .endif -# Add the sanitizer C flags -CFLAGS+= ${SAN_CFLAGS} +KASAN_ENABLED= ${KERN_OPTS:MKASAN} +KCSAN_ENABLED= ${KERN_OPTS:MKCSAN} +KMSAN_ENABLED= ${KERN_OPTS:MKMSAN} +KUBSAN_ENABLED= ${KERN_OPTS:MKUBSAN} # Add the gcov flags CFLAGS+= ${GCOV_CFLAGS} From nobody Tue Nov 12 19:49:39 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xnxnx4xbVz5d1BZ; Tue, 12 Nov 2024 19:49:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xnxnx1Q8cz44VC; Tue, 12 Nov 2024 19:49:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731440981; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qku0/3lvkhIiCXM+wedawsTaoZd+g+n6QheNncLTXkg=; b=K9XGALAhO3t6a39jZx8YIGOeyvc4KWhyHjz+LThCgDazR0I4DWe6KFFH26NmpT2xFRog/x zU3NZ3AVStH0h1kqGAJ5sEn1aeEli6CL8592vnHVmAdW53aDKiuFXdzcAdDcxHE3TCny4l LPZRSRHRB2X6MLLFMl4sPGUCoUahFxcFhCcr4Kzv9aSNILcCbPT9t4IYswLQ4/OsgbduWn KSHQHGUtlKmkCFcBdScAFYlafrl59oQzXdCDRjvTCphcdNebUiRnwvY3lnkN2HXXGDmPyy FQKOpUuaozgI93UL9W2/xdcOjWg3/zvsrK78cyJxlV9HvZiQ2GdJ8CwBqX0zjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731440981; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qku0/3lvkhIiCXM+wedawsTaoZd+g+n6QheNncLTXkg=; b=px1TsOs/8sQYM5VY2xb7oreZ0X42mXarN6NOokDDKbaZ5kRnsQxLu9Befwn2DoYXehbLBn tEvG15qJ4ND9O0Xx4PypiGoz01nmggtOojFIdrJKW+cJWpZoA/H8ERk4RzTklnoSpQdosG uCUHbwWMn1mS7cQcZvDW4iuHLL2pRtg7VKkl+NgSikdT7NFPBAzI3YkDAxaaJ+mRVYSn5W tySallPTK+jHXMSUL8VfQMSWU8mezfqjBMh14bXViV4vE7gUFXgCLeLQataTJb+uJF+Tsw o1yDZ1F+p5q1zAPCNj53EO9q+1eYGi9rogBmBqBR0iWIzvOxrVMFtCBi3sE4Hw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731440981; a=rsa-sha256; cv=none; b=Pkq7mT/2lt6L2kl6spIrdSPqcAh6DWO01OwPPSWVDi5HJ3Dj3UxUt3bZD2GF84uR5Jo9YD Msq+9Yfsk/qcoEsSKl4GH30atV4+3EP+jp9jjCqNmUELjVPU6SltdcTAbBMNZIsD1vnU8f TKm25C7aq8FcVIAA2ThWlLu7p1i05OGuZL71smxPiDh/yVPL5nhWp9H52bsChwgu/UlH5+ 2juVfXGa1VGX0ctbCJyAk6UIcoJE5UUxXOXsg3xAC/Z3ooYmAav0AC+I+Q9DdugxgEyBV4 zoiHRBPVI7S0g9MgnFIDWgXBHnvZlFp8JTxmaMUtEpPx9m05Ll/zkYXTt2F0Dg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xnxnv2w2LzNFw; Tue, 12 Nov 2024 19:49:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ACJndiB093386; Tue, 12 Nov 2024 19:49:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ACJnd5T093383; Tue, 12 Nov 2024 19:49:39 GMT (envelope-from git) Date: Tue, 12 Nov 2024 19:49:39 GMT Message-Id: <202411121949.4ACJnd5T093383@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 2d9ff965b554 - main - bsdinstall: skip tzsetup UTC question List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2d9ff965b554840cfc0791f96623f6cf5795d40d Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=2d9ff965b554840cfc0791f96623f6cf5795d40d commit 2d9ff965b554840cfc0791f96623f6cf5795d40d Author: Ed Maste AuthorDate: 2024-06-12 15:33:46 +0000 Commit: Ed Maste CommitDate: 2024-11-12 19:49:04 +0000 bsdinstall: skip tzsetup UTC question During installation bsdinstall asks (via tzsetup): > Is this machine's CMOS clock set to UTC? If it is set to local time, > or you don't know, please choose NO here! Most operating systems, except for Windows, use UTC in the hardware real-time clock by default. This question from tzsetup is presumably intended to aid in dual-boot-with-Windows configurations, but these represent a fraction of all FreeBSD installs. Rather than asking this question on every install just default to UTC. Users who want to dual-boot Windows can create /etc/wall_cmos_clock. We can look at making this smarter in the future. Reviewed by: bapt, brooks, brd, cy, 0mp, ngie Relnotes: yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45569 --- usr.sbin/bsdinstall/scripts/time | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bsdinstall/scripts/time b/usr.sbin/bsdinstall/scripts/time index fe82ce274729..7197ae4e7f47 100755 --- a/usr.sbin/bsdinstall/scripts/time +++ b/usr.sbin/bsdinstall/scripts/time @@ -29,7 +29,7 @@ BSDCFG_SHARE="/usr/share/bsdconfig" . $BSDCFG_SHARE/common.subr || exit 1 # Select timezone -chroot $BSDINSTALL_CHROOT tzsetup +chroot $BSDINSTALL_CHROOT tzsetup -s # Switch to target timezone saved_TZ="$TZ" From nobody Tue Nov 12 20:18:21 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XnyR24Lsxz5cXZv; Tue, 12 Nov 2024 20:18:22 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XnyR23qRzz46rt; Tue, 12 Nov 2024 20:18:22 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731442702; 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=j+R7RRPz71piLnQNVkKMuLB0U/YQHnsOM+RhqiGgHCw=; b=O7OwmHoCa3O6MugxP3POiVWOF9+AEHSaAwbcXN0e8O8NJjVAahyXVtCsrTocp+Wa76Q6JV 9Lld2infj+vOj/hJBXXrFppdY0WUQMF3WlWwLDQtQ5LPs7T3X6CZgy4DFpxnro6Lq6DLWm 3BgJHzW4otsCrxWA3XzjcG2k+2joeu+GuJylr253CvIVPz0K74qSqccLhkajcdkskdkU90 MMh6fvHxXxV0l+i3W7kb09oquynU9XE6NGdsLAr/c5pvqlqChcEuTFS8vl9Ff1XZV9tsUM N9G568hyGTca+Y2PO1SthsE/8QZ5S65wCtPDR+k080mII+TOhYpcxXFJXNil2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731442702; 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=j+R7RRPz71piLnQNVkKMuLB0U/YQHnsOM+RhqiGgHCw=; b=MxzRANuF3KLC7YQBY+4Eb5SE0Xju4DFwv7BsfIK5LPbEvlPWAyk+GMCdjgoaow9r0ym5br dSKw+WwlErH6DsnZyY4Mk1+BxyV54+4WdXQWp35+mu3AKrQ3HjLTqzG0dQOOVGmK5p9oIg FSKHcG3RtIK/pdCRmYT2akH7PHscvR0sdGnB4mt880CRsZGhuJLaiQGtU85cgaoc84nWRA SqY///oiQjUiajK8gX0legQUiYfEtdvH4LPe27f1rEU4madH248tC6UkZYsYijCHvU5259 seL203FNH4y/qomAxgoQyvghN2qvmOftKyEwgQE2rPJf73U6GypzGf7xdPlyWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731442702; a=rsa-sha256; cv=none; b=gpWsqFlD/V0kiFax+juOucYl3dJ99ysjtNDe+ZLTabSNBEL3DINSg7gNTpA3urwNBbOXsE ya8/9JCZSz8vTM8O8FkxuEzeyyZvhX0Hzngm+aec3VC4YN8w9lEmKnlMnPBTGfv6m+4paf qf6qcMS8NhrrWz+H2Gq59kInvKlEm6/LwFzF4k5pScdnSGaBvpFZ08sN8bw10gUOlivbmp oBBMrBzd9xDL/8qOhLBfdwrKKwLf8oQco70ZPytzJ8/8cBTEhEMLiZcVmWUNS9jJ1gMu8i l4mX6m5LqXz6uhhe95/OJRYNCJPU3pj92MGgp0bG+fJOnQZe7EfsvAyXkCBeQw== Received: from [IPV6:2601:5c0:4200:b830:2540:4129:cca:cf63] (unknown [IPv6:2601:5c0:4200:b830:2540:4129:cca:cf63]) (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 4XnyR21kl5z12DX; Tue, 12 Nov 2024 20:18:22 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: Date: Tue, 12 Nov 2024 15:18:21 -0500 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 1fa6daaafd74 - main - ipfilter: Avoid stopping with a lock held Content-Language: en-US To: jlduran@freebsd.org, Cy Schubert Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202411120347.4AC3lPOA015167@gitrepo.freebsd.org> <09923ad3-4065-4a31-b35f-74f84e09cff1@FreeBSD.org> <20241112155219.2E15A2DF@slippy.cwsent.com> <20241112160243.B372532F@slippy.cwsent.com> From: John Baldwin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 11/12/24 10:35, Jose Luis Duran wrote: > What would be the recommended approach in this case? > Revert, and commit with the fixes, or just fix the problematic code. > > At any rate, I have created https://reviews.freebsd.org/D47530. Feel > free to commandeer it, as my testing is limited to what's currently in > the "Test Plan". I was not able to recreate the deadlock described > here, but it definitely makes sense. There is no deadlock in this case because it is recursing on a shared lock. FWIW, I think your review is fine, and I would have been ok with just committing that instead of reverting everything. -- John Baldwin From nobody Tue Nov 12 21:32:57 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xp0560Whkz5cf25; Tue, 12 Nov 2024 21:32: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xp0556YWsz4MTY; Tue, 12 Nov 2024 21:32:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731447178; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YbV74cwTjBl4Lg1IOZ+dnQXBjCil5dSEgPruT0vD/jo=; b=vPSUUnoS0PD337eulWA9kmvkSI4M8s7hCzRohmsvbfprLXeLpJlHsipUovfiJHuDoBN/8o DKtxg7UuUZD0RgX38aqxdji2RjllE9G9NDMmBwBtkE9iQObFe/ir9dXfqHcG3RDZz0wgUa P6HtqxjCjz8jDJmTH0ORabdp9nejoDzTWkRtq3mS1TmlyMEPil+TiwVHpMnNHV6iDkIJgC RxtsfhqGGpZ4O9WulFvq7m9UOr5O0aPlwunxp9VQ6HAvEO6D4TZS0O4RaPUkjwKLs2Yxiu YdkyYxLescaV8/lA/c/fDvXbs2f9amWGFkRMvG8lX66aw3dA5hchTJJKPv250A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731447178; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YbV74cwTjBl4Lg1IOZ+dnQXBjCil5dSEgPruT0vD/jo=; b=vxaRh8oaR/GTt3ysKuwYSn7f8uPWRt8etS0HpCsCW05QFA+HeEVoPDrkViar+dsKgbrR0z z9eTkLC0beWkHr+1jyJAdmCcZIFRZ3qSMQGsQw47wLVdyJOBF2aHzJUZDTgz7GBb/BNQrq 7FF5lF+vf4E1055NGMvldtFc3xEYqqp2kmzulxcZtMB4B75m+mDW9C1/8uWWds4F9wfVO9 uNAYNH+bDVoMmMxO1OH9ERBWakgdN0WitNQLbvRNQKiJkYd0CyNKmlOztN8LohyQdjAz0G oBfcFdB6h56/BfLEtmS967awq9PZeunnFY1GKNUzZKUi1HZqDdr1eVVl1MHUOw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731447178; a=rsa-sha256; cv=none; b=qGx4SXMSVTQWhKKEO3gR956gd1xRETJCt5ZEBUTID+BLFZUFRAI2kkFFk20emDW5+QSyHW x4pxUj/Pm6kKylk3W1tzr7B0XsvZvUyW3NyKbIhPIYHLQxzMm5AxPkYem2nCUlNzh8UwRO xt8L5tol4RI35Z8+UecLvePaxL4wm1L+yiTEivVMyDZDfbyfQzPGVc29FvMzSsIR3PzGwp P9W7Wmbtpx9IcnjmLA+y/f37r6QQO4Ytajzi4TFn4EW2leGNfmcSMPx38pDy/0vWdJSdaQ 8a+/ju08dSr5bP9yJiZjt3shXYmI2zxaIXYYYErLKONRiMqRgu4LPP7/aYf78A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xp05564frzRWl; Tue, 12 Nov 2024 21:32:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ACLWv37096369; Tue, 12 Nov 2024 21:32:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ACLWvXk096366; Tue, 12 Nov 2024 21:32:57 GMT (envelope-from git) Date: Tue, 12 Nov 2024 21:32:57 GMT Message-Id: <202411122132.4ACLWvXk096366@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 650900cc2f60 - main - ipfilter: Avoid holding a lock while stopping List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 650900cc2f607458d32d333bd7ab0aa10be13ba4 Auto-Submitted: auto-generated The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=650900cc2f607458d32d333bd7ab0aa10be13ba4 commit 650900cc2f607458d32d333bd7ab0aa10be13ba4 Author: Jose Luis Duran AuthorDate: 2024-11-12 21:08:50 +0000 Commit: Jose Luis Duran CommitDate: 2024-11-12 21:31:24 +0000 ipfilter: Avoid holding a lock while stopping Avoid calling _callout_stop_safe with a non-sleepable lock held when detaching by initializing callout_init_rw() with CALLOUT_SHAREDLOCK, and avoiding re-initialization inside the timer function. PR: 282478 Reviewed by: cy, emaste, jhb, markj Tested by: cy Approved by: emaste (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D47530 --- sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c index 84fac0205ffc..3d3601ede00f 100644 --- a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c +++ b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c @@ -172,18 +172,15 @@ ipf_timer_func(void *arg) SPL_INT(s); SPL_NET(s); - READ_ENTER(&softc->ipf_global); if (softc->ipf_running > 0) ipf_slowtimer(softc); if (softc->ipf_running == -1 || softc->ipf_running == 1) { - callout_init(&softc->ipf_slow_ch, 1); callout_reset(&softc->ipf_slow_ch, (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT, ipf_timer_func, softc); } - RWLOCK_EXIT(&softc->ipf_global); SPL_X(s); } @@ -218,7 +215,7 @@ ipfattach(ipf_main_softc_t *softc) softc->ipf_slow_ch = timeout(ipf_timer_func, softc, (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT); #endif - callout_init(&softc->ipf_slow_ch, 1); + callout_init_rw(&softc->ipf_slow_ch, &softc->ipf_global.ipf_lk, CALLOUT_SHAREDLOCK); callout_reset(&softc->ipf_slow_ch, (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT, ipf_timer_func, softc); return (0); From nobody Tue Nov 12 22:00:59 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xp0jR2vcPz5cghN; Tue, 12 Nov 2024 22: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xp0jR2SLTz4RBt; Tue, 12 Nov 2024 22:00:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731448859; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qnTTaecsgpucccR73mbF770pLfFIvrX3Kxjdrcyrqhc=; b=v5YWJwT/UgR8PZQ/7RK7MHVrKYeGXkOqWsKzYkfeb8d7uCv0NY+CPvN+0fkd5uqjjC9ZNr HPmw/ubomoodJ8FcyqA6pJ1QwAJ5u5xnvPSqf6Z96RfsL7rxeBaxX7mLig/VzqBCryi44z fcszJ9ygiHvHrVRteD2WiXVujAlwbcXnz6Mnjkwv39u8qn/+J0ftL5n1IdAMRH6kRELjta gctfKsa0GFPkMhP9o3dOnBCe3SorPi7nfO+kbyj28fVehBw3f3NqO/OFZ8GRFLqJl82Jeg 4gRqmyQdgRPQ+4Brm1arGPv4SoLJF/JTqRM3nLcn+v9wij2dYEQEzKRMS7bgxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731448859; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qnTTaecsgpucccR73mbF770pLfFIvrX3Kxjdrcyrqhc=; b=axP/5RhZStGH1jnOuEuFvX3VeJftbHFS93vDL/TiVxHr9A6X7O6sOaplbl80/rrFFbZaqf ZdgEHhu1+WHlD0DgfdfvmqvYus8JWvCCEiG9DQdFNTaTgaa9v3Hzbr1VA7XZqpQ70gonx/ DEuvgWlZ80AkO/MuB6VZtHifIKoK+9XarWX33lCW7EHrRNRWDooVuSfB0zRJPXcZQX9nNX vqi0gFhX2KOzH1+RIxuPytvmKc4pDsJ+nOg3cc/z4r9FB9VrLW7R3UdpjiBBHVI3g4nrFT dtj0fjOuGVx1Zpeju3a9D2Qn8I9mzwVqLqyxzjg0EoNP8iB9SxiCPaXnVqOlHw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731448859; a=rsa-sha256; cv=none; b=uV6L1qh6XP7O5GmBth5KniZlBtI0ptZck6UTmA/jDXAbU28jJY3gWVGIUPg8C9xg5SZEH7 DinU9e007A4HfJSMjYqT0MNHnDtYWSsQNmHZHl4tM0rBkUyeLqStFS0W0RxMOr+eoadwdc VRZNT5OlVPobhG7OeMQ7d4XYMrB4ukZW0HkJGwyMl12xWvKhbLjonSHoj9ZFe4/6pMu2x9 HmDkGYMczbh7fJqE6W3fC/lBPiDxUxd4TbF4S9COZbBBMBSgxh82IArEPzYIIa9brs4kHk r/aZCVekXwzsVxYbr/PG3FYf9ew4SYnW1dQyMFzuLsYTSTaGmXSOM6x/zJQAAQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xp0jR23zxzScQ; Tue, 12 Nov 2024 22:00:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ACM0xTu048828; Tue, 12 Nov 2024 22:00:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ACM0xBe048825; Tue, 12 Nov 2024 22:00:59 GMT (envelope-from git) Date: Tue, 12 Nov 2024 22:00:59 GMT Message-Id: <202411122200.4ACM0xBe048825@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: 6e608d2990e9 - main - ipfilter: ipfilter: Remove more dead 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 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: 6e608d2990e91d06eea37d168d855965357d7d8d Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=6e608d2990e91d06eea37d168d855965357d7d8d commit 6e608d2990e91d06eea37d168d855965357d7d8d Author: Cy Schubert AuthorDate: 2024-11-12 21:48:18 +0000 Commit: Cy Schubert CommitDate: 2024-11-12 21:52:38 +0000 ipfilter: ipfilter: Remove more dead code This also is an artifact of the timeout(9) to callout(9) conversion done in ea3022cbbd3f5. Fixes: ea3022cbbd3f5 MFC after: 1 week --- sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c index 3d3601ede00f..47dbf017c0f4 100644 --- a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c +++ b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c @@ -211,10 +211,6 @@ ipfattach(ipf_main_softc_t *softc) V_ipforwarding = 1; SPL_X(s); -#if 0 - softc->ipf_slow_ch = timeout(ipf_timer_func, softc, - (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT); -#endif callout_init_rw(&softc->ipf_slow_ch, &softc->ipf_global.ipf_lk, CALLOUT_SHAREDLOCK); callout_reset(&softc->ipf_slow_ch, (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT, ipf_timer_func, softc); @@ -238,11 +234,6 @@ ipfdetach(ipf_main_softc_t *softc) SPL_NET(s); -#if 0 - if (softc->ipf_slow_ch.callout != NULL) - untimeout(ipf_timer_func, softc, softc->ipf_slow_ch); - bzero(&softc->ipf_slow, sizeof(softc->ipf_slow)); -#endif callout_drain(&softc->ipf_slow_ch); ipf_fini_all(softc); From nobody Tue Nov 12 22:01:00 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xp0jS59dMz5cgY0; Tue, 12 Nov 2024 22: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xp0jS3TNfz4R3S; Tue, 12 Nov 2024 22: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=1731448860; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Sn+aePp01qDsqDi9uZvJUoQVEw//xFKwM3dcRfzts2Y=; b=rKxjPwHJKL0uXaKa83AkkdE1tICH4hg5VgB5ZaTbzFwuvVYAKSM53rt89ahfRgWQ2AOIkv VT0TIvhPE3m8ahpEVFUlyDICPfcN2y3ji8vAYsPpHS2eusbJIA4Wz5GAdEaDKbJPA3XV6n 9UQ5duy8Gbjc8NveTLNG/vJOFpw42KkWcXUmrYyPlRhNv8aGclPlvBn80GvB15Bg4OWKOW HdezqBcD4eONas/wOSGBD3JKr4bXJjxiBmTnSahOc1lGnWiCtxgrvyOSwClYtzXSJMVUUZ vQ/jcXAnVpsm+lnVPieRhZV6FTFM+liW5dNFb6liWGDurlcTBTr3Kd7Dq2UjIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731448860; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Sn+aePp01qDsqDi9uZvJUoQVEw//xFKwM3dcRfzts2Y=; b=gSQKLkML1VJbrN8Y13WQZK2yHBP3Nr7CPZnex6AN2M3fkRfPqRCcuN4Zjt/R9kIRrcTTZ9 /DbwEJ/5KloakxPYu1O+PU+zhQpPEwRb9oLX4D9nFGhIkh7Hj3O3gzunYQK/16X7ZvRRk1 4hcEK2jb0lnQhVSelbLHaSqyUF/olF0Zksmx00ln92On0P84jkVc1WRe1eRePUMSNLLZtm ACQ5IL2lZDpuIhshNgtDfqYcTXwb/EVwJ1wQ55bZDe31a+l6cvNrp78rd+PYkfGdGzqAtO OoiznxASwtoIeQsAydbHcJn9Rm+DUsH5THZzzMCa9g6HaAk1ux73nkE0AcX9Cw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731448860; a=rsa-sha256; cv=none; b=T3qhcIey/D75mTcoy3bFTWBSkURJ3gcS2Vrq7LJQy/6PnOvyh1NU6l7/J1YK6fMhJtCk7J 2MiVFs3ygpDXfnYiboeMgiCAeRQzvd/5Fdh3LttbKjn1sq2kKI5jgHUoMC4e4iWosUevjZ c66XurCJom6y2Dr64xxX9c0nDjY7HRLuZ5XG07myDEBNNK7SSQDjAl7BCQYGaCPsR+KkVi O0B2bvkzv74m/BfpoFl6Wyxo+3pmIAl96xPwff1tzA7oK/daZRzda/SiiTdBueXWpXOvi1 QnE6S6S4WdYNKfDWAK4EEF8KphIy90sl1FdNX0lapWKSIKR+COFwO8knveZIoQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xp0jS333qzSMp; Tue, 12 Nov 2024 22:01:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ACM10ZT048882; Tue, 12 Nov 2024 22:01:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ACM10qq048879; Tue, 12 Nov 2024 22:01:00 GMT (envelope-from git) Date: Tue, 12 Nov 2024 22:01:00 GMT Message-Id: <202411122201.4ACM10qq048879@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: fabc5e81bd04 - main - ipfilter: Remove dead code from "Virtualize ipfilter" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fabc5e81bd041d3e04ebab6e77c8271cbd57a009 Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=fabc5e81bd041d3e04ebab6e77c8271cbd57a009 commit fabc5e81bd041d3e04ebab6e77c8271cbd57a009 Author: Cy Schubert AuthorDate: 2024-11-12 21:55:43 +0000 Commit: Cy Schubert CommitDate: 2024-11-12 21:58:59 +0000 ipfilter: Remove dead code from "Virtualize ipfilter" 6d8a5eacae82 virtualized ipfilter for VNET. A few remnants of old defunct code remained. Remove them. At the time it was not known if 6d8a5eacae82 would cause any issues. As it's been a number of years since the conversion was done, it's certainly safe to remove the dead code. MFC after: 1 week --- sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c index 47dbf017c0f4..aa0de6b8678a 100644 --- a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c +++ b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c @@ -96,18 +96,6 @@ VNET_DEFINE_STATIC(eventhandler_tag, ipf_arrivetag); VNET_DEFINE_STATIC(eventhandler_tag, ipf_departtag); #define V_ipf_arrivetag VNET(ipf_arrivetag) #define V_ipf_departtag VNET(ipf_departtag) -#if 0 -/* - * Disable the "cloner" event handler; we are getting interface - * events before the firewall is fully initiallized and also no vnet - * information thus leading to uninitialised memory accesses. - * In addition it is unclear why we need it in first place. - * If it turns out to be needed, well need a dedicated event handler - * for it to deal with the ifc and the correct vnet. - */ -VNET_DEFINE_STATIC(eventhandler_tag, ipf_clonetag); -#define V_ipf_clonetag VNET(ipf_clonetag) -#endif static void ipf_ifevent(void *arg, struct ifnet *ifp); @@ -1345,10 +1333,6 @@ ipf_event_reg(void) V_ipf_departtag = EVENTHANDLER_REGISTER(ifnet_departure_event, \ ipf_ifevent, NULL, \ EVENTHANDLER_PRI_ANY); -#if 0 - V_ipf_clonetag = EVENTHANDLER_REGISTER(if_clone_event, ipf_ifevent, \ - NULL, EVENTHANDLER_PRI_ANY); -#endif } void @@ -1360,11 +1344,6 @@ ipf_event_dereg(void) if (V_ipf_departtag != NULL) { EVENTHANDLER_DEREGISTER(ifnet_departure_event, V_ipf_departtag); } -#if 0 - if (V_ipf_clonetag != NULL) { - EVENTHANDLER_DEREGISTER(if_clone_event, V_ipf_clonetag); - } -#endif } From nobody Tue Nov 12 23:04:15 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xp26R4Yksz5cmMq; Tue, 12 Nov 2024 23:04: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xp26R46kFz4YBh; Tue, 12 Nov 2024 23:04:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731452655; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A1VfmcOkraLTVjVV4X6Px7XNQQG5d89Ld1FEtsbb0gE=; b=yvW6XPCPcE/x6q9n0H7fR9TbxxNtElC4LYc3HCqZUI2iUKcP+dnuxVEvotwv02Y80V0tz3 I+1gDKrzzDkfp0z7qEXu9lCyq/i/0SRkmn0gWGtvKVdxfw+YroPifR259VxErzsypzA1aG VLFI2XolmCV9e1fdTzeVhca1jMTh+fbtQ4XFdZbMnxasTiCm2HsJWjEEi0qqpAjZGu2qsS z79BveHWWfoeGdbfw3SpHSwge30aq9uYGxXYHDiQKLAmrz/uwjfGUB90iFqpdjZ+tImd3a m4rvqZS38fJv0Jm8sRVxpcaJdzvq682U9QffeWFosdsSJnb5xtlTtjLdw2p1Yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731452655; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A1VfmcOkraLTVjVV4X6Px7XNQQG5d89Ld1FEtsbb0gE=; b=CCXBSaST3xK+qIB4qAf5N/e/P8MxtHPWSR8rfEX3GSu+LhSs05IJTJ+lvIR+yBCReZIXJl SX8p84mWC9+lZb+TXcmeFXZaH6jMhMxewB77EI4G4HcQzzILUkfxwqEWqhapEk7kFa18FD DOQEDREY/5kRINPTY4p7YJC8Iaoe3GNd4lZd4j7TplCt6zpSeV1477tkxT6wzb+8Ee5DYG xxlX916iAINh92juvjyHNCZjrA0EJ4wizIsVvmPMUOwQZ83yPRUwFa6Ey9KoXw3dE0Rn0V SlPwq3fo2U5mAmm7RsXsoy8p3VK4bkZgb4mR2wvMZiefGQKzIy+JByFqzwMZgQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731452655; a=rsa-sha256; cv=none; b=G3SEp1c/XFnwqq7kOj+ISwkhAE6kkxHkQyz9k0EAHZzjfO0CAcJY7IGVs9EGt8ZWMSW8sF YFiyJddmymQ6ffSPUDu0Ctj7y3YA02ecQn7pCbR3ael3IxR6hMudD1tflYJggWuCEqMjp6 a8Eg0dCEpYHgOEk8f/kEjCPVdrz0yi25V6eaGy82hlIDSPcvqyCm/JyWrUz83Vk6mo7Jcf u4uRBb6s84S89PTUOdNWDQ5JkJmpi6+Zcomg9V7FGTBb6CrvDo+pufhkBzLXGz1a2Jk04D f2nskaGY++LbiY9SJ39qdZ7lZqDrCRCMdrBTHAKhRJTxX7vr14mCpf8bYskygQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xp26R3kHwzVNs; Tue, 12 Nov 2024 23:04:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ACN4FVp064806; Tue, 12 Nov 2024 23:04:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ACN4FsA064803; Tue, 12 Nov 2024 23:04:15 GMT (envelope-from git) Date: Tue, 12 Nov 2024 23:04:15 GMT Message-Id: <202411122304.4ACN4FsA064803@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 93b30f1b6cae - main - man4:: wifi manuals: revise .Sh HARDWARE + polish some List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 93b30f1b6caec5083efacf3fb5049b72e75cc09e Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=93b30f1b6caec5083efacf3fb5049b72e75cc09e commit 93b30f1b6caec5083efacf3fb5049b72e75cc09e Author: Alexander Ziaee AuthorDate: 2024-11-12 22:44:37 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-11-12 23:02:45 +0000 man4:: wifi manuals: revise .Sh HARDWARE + polish some The Release Hardware Notes are generated from hardware sections in the manual pages. Create or organize these sections in Wi-Fi driver manuals for information flow, and perform minor maintenance on them while here. After some testing, we have determined that a compact column list is the best for a single column listing in the hardware release notes. This makes very clean subsections and is for some reason denser than using a tagged list. This adds the long requested conversion from netmask to cidr examples. These examples probably shouldn't even be here, but that is a discussion for another day. MFC after: 3 days X-MFC with: 8f1a2d507e25e77d20a5 Reported by: bz (relnotes generation, cidr, test-net-1 ip4addr) Reported by: grahamperrin (HARDWARE order mentioned in fdp-primer) Reported by: Graham Percival (don't prompt) Reviewed by: bz (anything wrong likely is my polishing fault; incl. iwm.4) Differential Revision: https://reviews.freebsd.org/D47508 --- share/man/man4/ipw.4 | 39 +++++---- share/man/man4/iwi.4 | 47 +++++++---- share/man/man4/iwlwifi.4 | 41 +++++---- share/man/man4/iwm.4 | 2 +- share/man/man4/mt7915.4 | 38 ++++++--- share/man/man4/mt7921.4 | 38 ++++++--- share/man/man4/otus.4 | 94 +++++++++++++-------- share/man/man4/ral.4 | 27 +++--- share/man/man4/rsu.4 | 83 ++++++++++-------- share/man/man4/rtw88.4 | 61 ++++++++------ share/man/man4/rtw89.4 | 64 +++++++------- share/man/man4/rtwn.4 | 104 ++++++++++++++--------- share/man/man4/rtwn_pci.4 | 26 ++++-- share/man/man4/rtwn_usb.4 | 21 +++-- share/man/man4/rum.4 | 23 ++--- share/man/man4/run.4 | 211 ++++++++++++++++++++++++++++++---------------- share/man/man4/ural.4 | 30 ++++--- share/man/man4/urtw.4 | 44 +++++----- share/man/man4/zyd.4 | 147 +++++++++++++++++++++----------- 19 files changed, 698 insertions(+), 442 deletions(-) diff --git a/share/man/man4/ipw.4 b/share/man/man4/ipw.4 index c1010b798290..0ebee0f1e6eb 100644 --- a/share/man/man4/ipw.4 +++ b/share/man/man4/ipw.4 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2004-2006 .\" Damien Bergamini . All rights reserved. .\" @@ -23,12 +26,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 15, 2015 +.Dd November 10, 2024 .Dt IPW 4 .Os .Sh NAME .Nm ipw -.Nd "Intel PRO/Wireless 2100 IEEE 802.11 driver" +.Nd Intel PRO/Wireless 2100 IEEE 802.11a/b driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -57,19 +60,14 @@ legal.intel_ipw.license_ack=1 .Sh DESCRIPTION The .Nm -driver provides support for the -.Tn Intel -PRO/Wireless 2100 MiniPCI network adapter. -.Nm -supports +driver provides support for Intel PRO/Wireless 2100 802.11a/b +wireless network devices in .Cm station , .Cm adhoc , and .Cm monitor mode operation. Only one virtual interface may be configured at any time. -For more information on configuring this device, see -.Xr ifconfig 8 . .Pp This driver requires the firmware built with the .Nm ipwfw @@ -80,28 +78,34 @@ must be agreed by adding the following line to .Xr loader.conf 5 : .Pp .Dl "legal.intel_ipw.license_ack=1" +.Pp +For more information on configuring this device, see +.Xr ifconfig 8 . +.Sh HARDWARE +The +.Nm +driver provides support for the +Intel PRO/Wireless 2100a/b MiniPCI network adapter. .Sh FILES -.Bl -tag -width ".Pa /usr/share/doc/legal/intel_ipw.LICENSE" -compact +.Bl -tag -width "/usr/share/doc/legal/intel_ipw.LICENSE" -compact .It Pa /usr/share/doc/legal/intel_ipw.LICENSE .Nm firmware license .El .Sh EXAMPLES Join an existing BSS network (i.e., connect to an access point): -.Bd -literal -offset indent -ifconfig wlan create wlandev ipw0 inet 192.168.0.20 \e - netmask 0xffffff00 -.Ed +.Pp +.Dl ifconfig wlan create wlandev ipw0 inet 192.0.2.20/24 .Pp Join a specific BSS network with network name -.Dq Li my_net : +.Ar my_net : .Pp -.Dl "ifconfig wlan create wlandev ipw0 ssid my_net up" +.Dl ifconfig wlan create wlandev ipw0 ssid my_net up .Pp Join a specific BSS network with 64-bit WEP encryption: .Bd -literal -offset indent ifconfig wlan create wlandev ipw0 ssid my_net \e - wepmode on wepkey 0x1234567890 weptxkey 1 up + wepmode on wepkey 0x1234567890 weptxkey 1 up .Ed .Pp Join a specific BSS network with 128-bit WEP encryption: @@ -144,6 +148,7 @@ This should not happen. .Xr wlan_ccmp 4 , .Xr wlan_tkip 4 , .Xr wlan_wep 4 , +.Xr networking 7 , .Xr ifconfig 8 , .Xr wpa_supplicant 8 .Sh AUTHORS diff --git a/share/man/man4/iwi.4 b/share/man/man4/iwi.4 index 9de9b3e6c490..31ef4ec83d32 100644 --- a/share/man/man4/iwi.4 +++ b/share/man/man4/iwi.4 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2004-2006 .\" Damien Bergamini . All rights reserved. .\" @@ -23,12 +26,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 15, 2015 +.Dd November 10, 2024 .Dt IWI 4 .Os .Sh NAME .Nm iwi -.Nd "Intel PRO/Wireless 2200BG/2225BG/2915ABG IEEE 802.11 driver" +.Nd Intel PRO/Wireless 2200BG/2225BG/2915ABG IEEE 802.11 network driver .Sh SYNOPSIS To compile this driver into the kernel, include the following lines in your @@ -57,19 +60,14 @@ legal.intel_iwi.license_ack=1 .Sh DESCRIPTION The .Nm -driver provides support for -.Tn Intel -PRO/Wireless 2200BG/2915ABG MiniPCI and 2225BG PCI network adapters. -.Nm -supports +driver provides support for Intel PRO/Wireless 2200BG/2225BG/2915ABG +IEEE 802.11a/b/g wireless network devices in .Cm station , .Cm adhoc , and .Cm monitor mode operation. Only one virtual interface may be configured at any time. -For more information on configuring this device, see -.Xr ifconfig 8 . .Pp This driver requires the firmware built with the .Nm iwifw @@ -80,28 +78,42 @@ must be agreed by adding the following line to .Xr loader.conf 5 : .Pp .Dl "legal.intel_iwi.license_ack=1" +.Pp +For more information on configuring this device, see +.Xr ifconfig 8 . +.Sh HARDWARE +The +.Nm +driver supports the following wireless network devices: +.Pp +.Bl -bullet -compact +.It +Intel PRO/Wireless 2200BG MiniPCI Network Connection +.It +Intel PRO/Wireless 2225BG PCI Network Connection +.It +Intel PRO/Wireless 2915ABG MiniPCI Network Connection +.El .Sh FILES -.Bl -tag -width ".Pa /usr/share/doc/legal/intel_iwi.LICENSE" -compact +.Bl -tag -width "/usr/share/doc/legal/intel_iwi.LICENSE" -compact .It Pa /usr/share/doc/legal/intel_iwi.LICENSE .Nm firmware license .El .Sh EXAMPLES Join an existing BSS network (i.e., connect to an access point): -.Bd -literal -offset indent -ifconfig wlan create wlandev iwi0 inet 192.168.0.20 \e - netmask 0xffffff00 -.Ed +.Pp +.Dl ifconfig wlan create wlandev iwi0 inet 192.0.2.20/24 .Pp Join a specific BSS network with network name -.Dq Li my_net : +.Ar my_net : .Pp -.Dl "ifconfig wlan create wlandev iwi0 ssid my_net up" +.Dl ifconfig wlan create wlandev iwi0 ssid my_net up .Pp Join a specific BSS network with 64-bit WEP encryption: .Bd -literal -offset indent ifconfig wlan create wlandev iwi0 ssid my_net \e - wepmode on wepkey 0x1234567890 weptxkey 1 up + wepmode on wepkey 0x1234567890 weptxkey 1 up .Ed .Pp Join a specific BSS network with 128-bit WEP encryption: @@ -149,6 +161,7 @@ This should not happen. .Xr wlan_ccmp 4 , .Xr wlan_tkip 4 , .Xr wlan_wep 4 , +.Xr networking 7 , .Xr ifconfig 8 , .Xr wpa_supplicant 8 .Sh AUTHORS diff --git a/share/man/man4/iwlwifi.4 b/share/man/man4/iwlwifi.4 index c5622f2586f1..04317c22936f 100644 --- a/share/man/man4/iwlwifi.4 +++ b/share/man/man4/iwlwifi.4 @@ -1,4 +1,6 @@ .\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2021-2024 The FreeBSD Foundation .\" .\" This documentation was written by Bj\xc3\xb6rn Zeeb under sponsorship from @@ -25,7 +27,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 12, 2024 +.Dd November 10, 2024 .Dt IWLWIFI 4 .Os .Sh NAME @@ -54,11 +56,11 @@ It is discouraged to load the driver from .Sh DESCRIPTION The .Nm -driver is derived from Intel's Linux iwlwifi driver +driver provides support for Intel Wireless network devices. .Pp .Nm -will be a successor to -.Xr iwm 4 +is derived from Intel's Linux iwlwifi driver, will be a successor to +.Xr iwm 4 , and may supersede that driver in the future. It still complements the .Xr iwn 4 @@ -66,26 +68,20 @@ driver which supports older chipsets. .Pp The driver uses the .\" No LinuxKPI man pages so no .Xr here. -.Em linuxkpi_wlan +.Sy linuxkpi_wlan and -.Em linuxkpi +.Sy linuxkpi compat framework to bridge between the Linux and native .Fx driver code as well as to the native .Xr net80211 4 wireless stack. -.Pp -While -.Nm -supports all 802.11 a/b/g/n/ac/ax -the compatibility code currently only supports 802.11 a/b/g modes. -Support for 802.11 n/ac is to come. 802.11ax and 6Ghz support are planned. .Sh HARDWARE The .Nm driver supports PCIe devices from the -.Em mvm +.Sy mvm sub-driver with the following chipset generations: .Pp .\" awk -F\\t '{ print $5 }' ~/tmp/iwlwifi_pci_ids_name.txt | \ @@ -111,12 +107,12 @@ SC These chipset generations match the following common device names: .Pp .Bl -bullet -compact -.\" --------------------------------------------------------------------- +.\" -------------------------------------------------------------------- .\" This list is manually generated from a sysctl and post-processing. .\" Edits will be overwritten on next update. .\" awk -F\\t '{ if ($2 == "") { next; } if (seen[$2]) { next; } \ .\" seen[$2]=1; printf ".It\n%s\n", $2; }' iwlwifi_pci_ids_name.txt -.\" --------------------------------------------------------------------- +.\" -------------------------------------------------------------------- .It Intel(R) Dual Band Wireless AC 7260 .It @@ -237,15 +233,15 @@ Intel(R) TBD Sc device Intel(R) TBD Sc2 device .It Intel(R) TBD Sc2f device -.\" --------------------------------------------------------------------- +.\" -------------------------------------------------------------------- .El -.Sh BUGS -Certainly. .Sh SEE ALSO .Xr iwlwififw 4 , .Xr iwm 4 , .Xr iwn 4 , .Xr wlan 4 , +.Xr networking 7 , +.Xr fwget 8 , .Xr ifconfig 8 , .Xr wpa_supplicant 8 .Sh HISTORY @@ -253,3 +249,12 @@ The .Nm driver first appeared in .Fx 13.1 . +.Sh BUGS +Certainly. +.Pp +While +.Nm +supports 802.11a/b/g/n/ac/ax modes, +the compatibility code currently only supports 802.11a/b/g modes. +Support for 802.11n/ac/ax is yet to come. +802.11ax and 6Ghz support are planned. diff --git a/share/man/man4/iwm.4 b/share/man/man4/iwm.4 index 7fd301929524..5249959cd3f6 100644 --- a/share/man/man4/iwm.4 +++ b/share/man/man4/iwm.4 @@ -26,7 +26,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd February 20, 2024 +.Dd November 10, 2024 .Dt IWM 4 .Os .Sh NAME diff --git a/share/man/man4/mt7915.4 b/share/man/man4/mt7915.4 index eece142c11a5..ba67a77af735 100644 --- a/share/man/man4/mt7915.4 +++ b/share/man/man4/mt7915.4 @@ -1,4 +1,6 @@ .\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2023-2024 Bjoern A. Zeeb .\" .\" Redistribution and use in source and binary forms, with or without @@ -22,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 30, 2024 +.Dd November 10, 2024 .Dt MT7915 4 .Os .Sh NAME @@ -50,7 +52,9 @@ It is discouraged to load the driver from .Sh DESCRIPTION The .Nm -driver is derived from MediaTek's Linux mt76 driver. +driver provides support for MediaTek MT7915E wireless network devices. +.Nm +is derived from MediaTek's Linux mt76 driver. .Pp This driver requires firmware to be loaded before it will work. The package @@ -62,36 +66,34 @@ Otherwise no .Xr wlan 4 interface can be created using .Xr ifconfig 8 . +One can use +.Xr fwget 8 +to install the correct firmware package. .Pp The driver uses the .\" No LinuxKPI man pages so no .Xr here. -.Em linuxkpi_wlan +.Sy linuxkpi_wlan and -.Em linuxkpi +.Sy linuxkpi compat framework to bridge between the Linux and native .Fx driver code as well as to the native .Xr net80211 4 wireless stack. -.Pp -While -.Nm -supports all 802.11 a/b/g/n/ac and ax -the compatibility code currently only supports 802.11 a/b/g modes. -Support for 802.11 n/ac is to come. .Sh HARDWARE The .Nm driver supports PCIe devices with the following chipsets: .Pp -.Bl -tag -width Ds -offset indent -compact -.It MediaTek MT7915E +.Bl -bullet -offset indent -compact +.It +MediaTek MT7915E .El -.Sh BUGS -Certainly. .Sh SEE ALSO .Xr wlan 4 , +.Xr networking 7 , +.Xr fwget 8 , .Xr ifconfig 8 , .Xr wpa_supplicant 8 .Sh HISTORY @@ -99,3 +101,11 @@ The .Nm driver first appeared in .Fx 14.0 . +.Sh BUGS +Certainly. +.Pp +While +.Nm +supports 802.11a/b/g/n/ac/ax modes, +the compatibility code currently only supports 802.11a/b/g modes. +Support for 802.11n/ac/ax is yet to come. diff --git a/share/man/man4/mt7921.4 b/share/man/man4/mt7921.4 index d28dc520de6b..fe9efa77e35d 100644 --- a/share/man/man4/mt7921.4 +++ b/share/man/man4/mt7921.4 @@ -1,4 +1,6 @@ .\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2023-2024 Bjoern A. Zeeb .\" .\" Redistribution and use in source and binary forms, with or without @@ -22,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 30, 2024 +.Dd November 10, 2024 .Dt MT7921 4 .Os .Sh NAME @@ -50,7 +52,9 @@ It is discouraged to load the driver from .Sh DESCRIPTION The .Nm -driver is derived from MediaTek's Linux mt76 driver. +driver provides support for MediaTek MT7921E wireless network devices. +.Nm +is derived from MediaTek's Linux mt76 driver. .Pp This driver requires firmware to be loaded before it will work. The package @@ -62,36 +66,34 @@ Otherwise no .Xr wlan 4 interface can be created using .Xr ifconfig 8 . +One can use +.Xr fwget 8 +to install the correct firmware package. .Pp The driver uses the .\" No LinuxKPI man pages so no .Xr here. -.Em linuxkpi_wlan +.Sy linuxkpi_wlan and -.Em linuxkpi +.Sy linuxkpi compat framework to bridge between the Linux and native .Fx driver code as well as to the native .Xr net80211 4 wireless stack. -.Pp -While -.Nm -supports all 802.11 a/b/g/n/ac and ax -the compatibility code currently only supports 802.11 a/b/g modes. -Support for 802.11 n/ac is to come. .Sh HARDWARE The .Nm driver supports PCIe devices with the following chipsets: .Pp -.Bl -tag -width Ds -offset indent -compact -.It MediaTek MT7921E +.Bl -bullet -offset indent -compact +.It +MediaTek MT7921E .El -.Sh BUGS -Certainly. .Sh SEE ALSO .Xr wlan 4 , +.Xr networking 7 , +.Xr fwget 8 , .Xr ifconfig 8 , .Xr wpa_supplicant 8 .Sh HISTORY @@ -99,3 +101,11 @@ The .Nm driver first appeared in .Fx 14.0 . +.Sh BUGS +Certainly. +.Pp +While +.Nm +supports 802.11a/b/g/n/ac/ax modes, +the compatibility code currently only supports 802.11a/b/g modes. +Support for 802.11n/ac/ax is to come. diff --git a/share/man/man4/otus.4 b/share/man/man4/otus.4 index 040d4b14cb01..06f73bfe3338 100644 --- a/share/man/man4/otus.4 +++ b/share/man/man4/otus.4 @@ -1,3 +1,5 @@ +.\"- +.\" SPDX-License-Identifier: ISC .\" .\" Copyright (c) 2015 Adrian Chadd .\" @@ -13,12 +15,12 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd September 25, 2015 +.Dd November 10, 2024 .Dt OTUS 4 .Os .Sh NAME .Nm otus -.Nd Atheros AR9170 USB IEEE 802.11a/b/g/n wireless network device +.Nd Atheros AR9170 USB IEEE 802.11a/b/g/n wireless network driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your kernel configuration file: @@ -79,57 +81,73 @@ The .Nm driver can be configured at runtime with .Xr ifconfig 8 . -.Sh FILES -The driver needs at least version 1.0 of the following firmware files, -which is loaded when an interface is attached: -.Pp -.Bl -tag -width Ds -offset indent -compact -.It Pa /boot/kernel/otusfw-init.ko -.It Pa /boot/kernel/otusfw-main.ko -.El .Sh HARDWARE The .Nm driver provides support for Atheros AR9170 USB IEEE 802.11b/g/n wireless network adapters, including: .Pp -.Bl -tag -width Ds -offset indent -compact -.It 3Com 3CRUSBN275 -.It Arcadyan WN7512 +.Bl -bullet -offset indent -compact +.It +3Com 3CRUSBN275 +.It +Arcadyan WN7512 .\" .It AVM FRITZ!WLAN USB Stick N -.It CACE AirPcap \&Nx -.It D-Link DWA-130 rev \&D1 -.It D-Link DWA-160 rev A1 -.It D-Link DWA-160 rev A2 -.It IO-Data WN-GDN/US2 -.It NEC Aterm WL300NU-G -.It Netgear WNDA3100 -.It Netgear WN111 v2 -.It Planex GW-US300 -.It SMC Networks SMCWUSB-N2 -.It TP-Link TL-WN821N v1, v2 -.It Ubiquiti SR71 USB -.It Unex DNUA-81 -.It Z-Com UB81 -.It Z-Com UB82 -.It ZyXEL NWD-271N +.It +CACE AirPcap \&Nx +.It +D-Link DWA-130 rev \&D1 +.It +D-Link DWA-160 rev A1 +.It +D-Link DWA-160 rev A2 +.It +IO-Data WN-GDN/US2 +.It +NEC Aterm WL300NU-G +.It +Netgear WNDA3100 +.It +Netgear WN111 v2 +.It +Planex GW-US300 +.It +SMC Networks SMCWUSB-N2 +.It +TP-Link TL-WN821N v1, v2 +.It +Ubiquiti SR71 USB +.It +Unex DNUA-81 +.It +Z-Com UB81 +.It +Z-Com UB82 +.It +ZyXEL NWD-271N +.El +.Sh FILES +The driver needs at least version 1.0 of the following firmware files, +which is loaded when an interface is attached: +.Pp +.Bl -tag -width Ds -offset indent -compact +.It Pa /boot/kernel/otusfw-init.ko +.It Pa /boot/kernel/otusfw-main.ko .El .Sh EXAMPLES Join an existing BSS network (i.e., connect to an access point): -.Bd -literal -offset indent -ifconfig wlan create wlandev otus0 inet 192.168.0.20 \e - netmask 0xffffff00 -.Ed +.Pp +.Dl ifconfig wlan create wlandev otus0 inet 192.0.2.20/24 .Pp Join a specific BSS network with network name -.Dq Li my_net : +.Ar my_net : .Pp -.Dl "ifconfig wlan create wlandev otus0 ssid my_net up" +.Dl ifconfig wlan create wlandev otus0 ssid my_net up .Pp Join a specific BSS network with 64-bit WEP encryption: .Bd -literal -offset indent ifconfig wlan create wlandev otus0 ssid my_net \e - wepmode on wepkey 0x1234567890 weptxkey 1 up + wepmode on wepkey 0x1234567890 weptxkey 1 up .Ed .Sh DIAGNOSTICS .Bl -diag @@ -152,7 +170,9 @@ The file might be missing or corrupted. The .Nm driver first appeared in -.Ox 4.6 . +.Ox 4.6 +and +.Fx 11 . .Sh AUTHORS .An -nosplit The diff --git a/share/man/man4/ral.4 b/share/man/man4/ral.4 index dbdc017dc33a..ad385e5f09d6 100644 --- a/share/man/man4/ral.4 +++ b/share/man/man4/ral.4 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: ISC +.\" .\" Copyright (c) 2005-2010 Damien Bergamini .\" .\" Permission to use, copy, modify, and distribute this software for any @@ -12,12 +15,12 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd April 4, 2017 +.Dd November 10, 2024 .Dt RAL 4 .Os .Sh NAME .Nm ral -.Nd "Ralink Technology IEEE 802.11a/g/n wireless network device" +.Nd Ralink Technology IEEE 802.11a/g/n wireless network driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -119,7 +122,7 @@ The driver supports PCI/PCIe/CardBus wireless adapters based on Ralink Technology chipsets, including: .Pp -.Bl -column -compact ".Li Atlantis Land A02-PCM-W54" "RT2561S" "CardBus" +.Bl -column -offset indent -compact "Atlantis Land A02-PCM-W54" "RT2561S" "CardBus" .It Em Card Ta Em MAC/BBP Ta Em Bus .It "A-Link WL54H" Ta RT2560 Ta PCI .It "A-Link WL54PC" Ta RT2560 Ta CardBus @@ -212,26 +215,25 @@ chipsets, including: .Sh EXAMPLES Join an existing BSS network (i.e., connect to an access point): .Pp -.Dl "ifconfig wlan create wlandev ral0 inet 192.168.0.20 netmask 0xffffff00" +.Dl ifconfig wlan create wlandev ral0 inet 192.0.2.20/24 .Pp Join a specific BSS network with network name -.Dq Li my_net : +.Ar my_net : .Bd -literal -offset indent -ifconfig wlan create wlandev ral0 inet 192.168.0.20 \e - netmask 0xffffff00 ssid my_net +ifconfig wlan create wlandev ral0 inet 192.0.2.20/24 \e + ssid my_net .Ed .Pp Join a specific BSS network with 40-bit WEP encryption: .Bd -literal -offset indent -ifconfig wlan create wlandev ral0 inet 192.168.0.20 \e - netmask 0xffffff00 ssid my_net \e - wepmode on wepkey 0x1234567890 weptxkey 1 +ifconfig wlan create wlandev ral0 inet 192.0.2.20/24 \e + ssid my_net wepmode on wepkey 0x1234567890 weptxkey 1 .Ed .Pp Join a specific BSS network with 104-bit WEP encryption: .Bd -literal -offset indent -ifconfig wlan create wlandev ral0 inet 192.168.0.20 \e - netmask 0xffffff00 ssid my_net \e +ifconfig wlan create wlandev ral0 inet 192.0.2.20/24 \e + ssid my_net \e wepmode on wepkey 0x01020304050607080910111213 weptxkey 1 .Ed .Sh DIAGNOSTICS @@ -254,6 +256,7 @@ This should not happen. .Xr wlan_tkip 4 , .Xr wlan_wep 4 , .Xr wlan_xauth 4 , +.Xr networking 7 , .Xr hostapd 8 , .Xr ifconfig 8 , .Xr wpa_supplicant 8 diff --git a/share/man/man4/rsu.4 b/share/man/man4/rsu.4 index b523bfe4aa0e..7aaacb8112a0 100644 --- a/share/man/man4/rsu.4 +++ b/share/man/man4/rsu.4 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: ISC +.\" .\" $OpenBSD: rsu.4,v 1.11 2013/02/14 07:40:42 jmc Exp $ .\" .\" Copyright (c) 2010 Damien Bergamini @@ -14,12 +17,12 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd May 23, 2021 +.Dd November 10, 2024 .Dt RSU 4 .Os .Sh NAME .Nm rsu -.Nd Realtek RTL8188SU/RTL8192SU USB IEEE 802.11b/g/n wireless network device +.Nd Realtek RTL8188SU/RTL8192SU USB IEEE 802.11b/g/n wireless network driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your kernel configuration file: @@ -93,8 +96,46 @@ The .Nm driver can be configured at runtime with .Xr ifconfig 8 . +.Sh HARDWARE +The +.Nm +driver provides support for Realtek RTL8188SU/RTL8192SU USB IEEE 802.11b/g/n +wireless network adapters, including: +.Pp +.Bl -bullet -offset indent -compact +.It +ASUS USB-N10 +.It +ASUS WL-167G V3 +.It +Belkin F7D1101 v1 +.It +D-Link DWA-131 A1 +.It +EDUP EP-MS150N(W) +.It +Edimax EW-7622UMN +.It +Hercules HWGUn-54 +.It +Hercules HWNUm-300 +.It +Planex GW-USNano +.It +Sitecom WL-349 v1 +.It +Sitecom WL-353 +.It +Sweex LW154 +.It +TRENDnet TEW-646UBH +.It +TRENDnet TEW-648UB +.It +TRENDnet TEW-649UB +.El .Sh FILES -.Bl -tag -width ".Pa /usr/share/doc/legal/realtek.LICENSE" -compact +.Bl -tag -width "/usr/share/doc/legal/realtek.LICENSE" -compact .It Pa /usr/share/doc/legal/realtek.LICENSE .Nm firmware license @@ -106,45 +147,20 @@ which is loaded when an interface is attached: .Bl -tag -width Ds -offset indent -compact .It Pa /boot/kernel/rsu-rtl8712fw.ko .El -.Sh HARDWARE -The -.Nm -driver provides support for Realtek RTL8188SU/RTL8192SU USB IEEE 802.11b/g/n -wireless network adapters, including: -.Pp -.Bl -tag -width Ds -offset indent -compact -.It ASUS USB-N10 -.It ASUS WL-167G V3 -.It Belkin F7D1101 v1 -.It D-Link DWA-131 A1 -.It EDUP EP-MS150N(W) -.It Edimax EW-7622UMN -.It Hercules HWGUn-54 -.It Hercules HWNUm-300 -.It Planex GW-USNano -.It Sitecom WL-349 v1 -.It Sitecom WL-353 -.It Sweex LW154 -.It TRENDnet TEW-646UBH -.It TRENDnet TEW-648UB -.It TRENDnet TEW-649UB -.El .Sh EXAMPLES Join an existing BSS network (i.e., connect to an access point): -.Bd -literal -offset indent -ifconfig wlan create wlandev rsu0 inet 192.168.0.20 \e - netmask 0xffffff00 -.Ed +.Pp +.Dl ifconfig wlan create wlandev rsu0 inet 192.0.2.20/24 .Pp Join a specific BSS network with network name -.Dq Li my_net : +.Ar my_net : .Pp -.Dl "ifconfig wlan create wlandev rsu0 ssid my_net up" +.Dl ifconfig wlan create wlandev rsu0 ssid my_net up .Pp Join a specific BSS network with 64-bit WEP encryption: .Bd -literal -offset indent ifconfig wlan create wlandev rsu0 ssid my_net \e - wepmode on wepkey 0x1234567890 weptxkey 1 up + wepmode on wepkey 0x1234567890 weptxkey 1 up .Ed .Sh DIAGNOSTICS .Bl -diag @@ -163,6 +179,7 @@ This should not happen. .Xr rsufw 4 , .Xr usb 4 , .Xr wlan 4 , +.Xr networking 7 , .Xr arp 8 , .Xr hostapd 8 , .Xr ifconfig 8 , diff --git a/share/man/man4/rtw88.4 b/share/man/man4/rtw88.4 index 898f57beabd8..1165c5763de8 100644 --- a/share/man/man4/rtw88.4 +++ b/share/man/man4/rtw88.4 @@ -1,4 +1,6 @@ .\"- +.\" SPDX-License-Identifer: BSD-2-Clause +.\" .\" Copyright (c) 2022-2024 Bjoern A. Zeeb .\" .\" Redistribution and use in source and binary forms, with or without @@ -22,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 30, 2024 +.Dd November 10, 2024 .Dt RTW88 4 .Os .Sh NAME @@ -65,21 +67,30 @@ to install the correct firmware package. .Pp The driver uses the .\" No LinuxKPI man pages so no .Xr here. -.Em linuxkpi_wlan +.Sy linuxkpi_wlan and -.Em linuxkpi +.Sy linuxkpi compat framework to bridge between the Linux and native .Fx driver code as well as to the native .Xr net80211 4 wireless stack. -.Pp -While +.Sh HARDWARE +The .Nm -supports all 802.11 a/b/g/n and ac -the compatibility code currently only supports 802.11 a/b/g modes. -Support for 802.11 n/ac is to come. +driver supports PCIe devices with the following chipsets: +.Pp +.Bl -bullet -offset indent -compact +.It +Realtek 802.11n wireless 8723de (RTL8723DE) +.It +Realtek 802.11ac wireless 8821ce (RTL8821CE) +.It +Realtek 802.11ac wireless 8822be (RTL8822BE) +.It +Realtek 802.11ac wireless 8822ce (RTL8822CE) +.El .Sh LOADER TUNABLES .Bl -tag -width indent .It Va compat.linuxkpi.skb.mem_limit @@ -93,28 +104,10 @@ This tunable will work around a problem with DMA and limit allocations for network buffer memory to the lower 32bit of physical memory and make the driver work. .El -.Sh HARDWARE -The -.Nm -driver supports PCIe devices with the following chipsets: *** 1162 LINES SKIPPED *** From nobody Tue Nov 12 23:19:47 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xp2SM4JnDz5cmwr; Tue, 12 Nov 2024 23:19: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xp2SM3g0Tz4ZMh; Tue, 12 Nov 2024 23:19:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731453587; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kvGZaExDsJx+Dlht9cA/lpYmtqspPfj0Qa0Iz+HU8fw=; b=ujN1oY8W75eNaTDxKJRsjy6d5qa2ElXmYlBPO/KwMNTgpOZtu6ikwY0VmHD+T6gfRofRt7 Q52h3F2nXTzDcENjBpfTzfU+iKz6aV2pJydoqW0mzQaK5hZT+CecFTspKXF6DghcptGuwj /dMD9kE31Uj9KAwP/fqWZJF1jv6Fj9TICEf6xc3b7ByjHdh+tBWnDt641pYxuJmV8shlOU nKPed+QMetgwpDJC6IOFhuRoP5uRP2omz7ubnr4WvalxxIKzdTSb4VwO6kllm+gwqdWh35 0GxroC7aMFHkecdHPjmaTmoVu5Gs9fyVMvVNCrKsXCbvGLUALvQGcvH/RpdWqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731453587; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kvGZaExDsJx+Dlht9cA/lpYmtqspPfj0Qa0Iz+HU8fw=; b=btVK0YCfZRX76cKL8fnoPH5aC70Q3yQB09Xbb2AanKOt/v5kuEnT9kOkMnIvDtwrVjQ6i2 LJzdrLSvyFYvso2WzGtHviMQ5bTRdgCIH+MwGTg9ZRPZi+pHCVNITVahD+EHjeMUa33Cqg mVP+gspv3vilDh+NAuRQAAP0IlKCljRzvbIhy8N7Hm/CTmAv1ARP6IVxjpd7iPGSIp+V7+ z2LRibjGQVcAtyW9LYp38c7Fw8aPLwTQq9Keq3CFiNMBFiXmgM6LbXA9XUk44o+0580Jkl 4nVyRGEdn1E8aHv1UNXHijHCugd584bRKHWIRoRh2+aMIOIuxbyEzOTC4+uuFw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731453587; a=rsa-sha256; cv=none; b=jPs7IJ0e+6vNMw+kX5UL4aXSFoec0ALc0oPSqR+cWPuxNCMQhdl+fGgiOMBS1EsNir/q7T JhlHuMESODQqWpqGKbFc1Dzg3fLdSPdkiHGEICkmS6vjpy2Me9QzKva9OuiVsxPiHL6NKT 7JwugKrTGxjWklK5RDP3Be0M7ER7PsO2Fj7gAPZ6s0aZ7J/dw89ySai1GXVf8RryJW3j8j 9Ye+xxJwQiQVSCq2VhAFAFNh1aQH4DtNQEh5Wnts+FTyhAeoyYGy2bLPThMqAKsHGQkwGj oHmBpDqgOFOaFW9PPQrDYMV8Ai8EAtzpNKYmuvRV3PHxBr3kla+s1L7pX7rCZw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xp2SM38QpzVwl; Tue, 12 Nov 2024 23:19:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ACNJlnC084813; Tue, 12 Nov 2024 23:19:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ACNJlQY084810; Tue, 12 Nov 2024 23:19:47 GMT (envelope-from git) Date: Tue, 12 Nov 2024 23:19:47 GMT Message-Id: <202411122319.4ACNJlQY084810@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: c57dc755fa1a - stable/14 - device_pager: rename the un_pager.devp.dev field to handle List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c57dc755fa1a8bb0a4190f60df02b2bce5b8033c Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=c57dc755fa1a8bb0a4190f60df02b2bce5b8033c commit c57dc755fa1a8bb0a4190f60df02b2bce5b8033c Author: Konstantin Belousov AuthorDate: 2024-11-04 22:10:06 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-12 23:19:18 +0000 device_pager: rename the un_pager.devp.dev field to handle (cherry picked from commit f0c07fe3d0007a4499f81583a99598cd0a74d45b) --- sys/kern/kern_proc.c | 2 +- sys/vm/device_pager.c | 20 ++++++++++---------- sys/vm/vm_object.c | 2 +- sys/vm/vm_object.h | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index b8bc1a7e5dfe..18302bb8abae 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -2720,7 +2720,7 @@ kern_proc_vmmap_out(struct proc *p, struct sbuf *sb, ssize_t maxlen, int flags) kve->kve_shadow_count = obj->shadow_count; if (obj->type == OBJT_DEVICE || obj->type == OBJT_MGTDEVICE) { - cdev = obj->un_pager.devp.dev; + cdev = obj->un_pager.devp.handle; if (cdev != NULL) { csw = dev_refthread(cdev, &ref); if (csw != NULL) { diff --git a/sys/vm/device_pager.c b/sys/vm/device_pager.c index cb3b0e522d9a..bceff38a41c3 100644 --- a/sys/vm/device_pager.c +++ b/sys/vm/device_pager.c @@ -121,8 +121,8 @@ cdev_pager_lookup(void *handle) again: mtx_lock(&dev_pager_mtx); object = vm_pager_object_lookup(&dev_pager_object_list, handle); - if (object != NULL && object->un_pager.devp.dev == NULL) { - msleep(&object->un_pager.devp.dev, &dev_pager_mtx, + if (object != NULL && object->un_pager.devp.handle == NULL) { + msleep(&object->un_pager.devp.handle, &dev_pager_mtx, PVM | PDROP, "cdplkp", 0); vm_object_deallocate(object); goto again; @@ -186,8 +186,8 @@ again: object1->type = OBJT_DEAD; vm_object_deallocate(object1); object1 = NULL; - if (object->un_pager.devp.dev == NULL) { - msleep(&object->un_pager.devp.dev, + if (object->un_pager.devp.handle == NULL) { + msleep(&object->un_pager.devp.handle, &dev_pager_mtx, PVM | PDROP, "cdplkp", 0); vm_object_deallocate(object); goto again; @@ -221,7 +221,7 @@ again: mtx_lock(&dev_pager_mtx); TAILQ_REMOVE(&dev_pager_object_list, object, pager_object_list); - wakeup(&object->un_pager.devp.dev); + wakeup(&object->un_pager.devp.handle); mtx_unlock(&dev_pager_mtx); object->type = OBJT_DEAD; vm_object_deallocate(object); @@ -231,14 +231,14 @@ again: mtx_lock(&dev_pager_mtx); object->flags |= OBJ_COLORED; object->pg_color = color; - object->un_pager.devp.dev = handle; - wakeup(&object->un_pager.devp.dev); + object->un_pager.devp.handle = handle; + wakeup(&object->un_pager.devp.handle); } } MPASS(object1 == NULL); } else { - if (object->un_pager.devp.dev == NULL) { - msleep(&object->un_pager.devp.dev, + if (object->un_pager.devp.handle == NULL) { + msleep(&object->un_pager.devp.handle, &dev_pager_mtx, PVM | PDROP, "cdplkp", 0); vm_object_deallocate(object); goto again; @@ -292,7 +292,7 @@ dev_pager_dealloc(vm_object_t object) vm_page_t m; VM_OBJECT_WUNLOCK(object); - object->un_pager.devp.ops->cdev_pg_dtor(object->un_pager.devp.dev); + object->un_pager.devp.ops->cdev_pg_dtor(object->un_pager.devp.handle); mtx_lock(&dev_pager_mtx); TAILQ_REMOVE(&dev_pager_object_list, object, pager_object_list); diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index 06dae7de3baa..5933b2c1d4bd 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -2611,7 +2611,7 @@ vm_object_list_handler(struct sysctl_req *req, bool swap_only) kvo->kvo_swapped = sp > UINT32_MAX ? UINT32_MAX : sp; } if (obj->type == OBJT_DEVICE || obj->type == OBJT_MGTDEVICE) { - cdev = obj->un_pager.devp.dev; + cdev = obj->un_pager.devp.handle; if (cdev != NULL) { csw = dev_refthread(cdev, &ref); if (csw != NULL) { diff --git a/sys/vm/vm_object.h b/sys/vm/vm_object.h index 9921f1130e8c..16ee3544b658 100644 --- a/sys/vm/vm_object.h +++ b/sys/vm/vm_object.h @@ -139,7 +139,7 @@ struct vm_object { struct { TAILQ_HEAD(, vm_page) devp_pglist; const struct cdev_pager_ops *ops; - struct cdev *dev; + void *handle; } devp; /* From nobody Tue Nov 12 23:19:48 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xp2SN4w8gz5cn4M; Tue, 12 Nov 2024 23:19: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xp2SN4Lk5z4ZWn; Tue, 12 Nov 2024 23:19:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731453588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HbaKbgWyfiBFjREumFNZyOGt0s01blNUZ/zJO/0dC6A=; b=Msoo3AyBCsYm3B8Tx7e9wXtCs2Z4lADXpUj6l/gWIiJqce/HEVyibSLRdNHm3KK1vY/Xlh oJ60BpglIQIM3skPxw6fB0oP3T8z2fDoURHKNBt/Un94eoNwueq6c6WCVC/slwvXFXGVOv wJRZ5Ok27fuvigoY+H63t5y7RSuFys3cZgYDpD9AERBKlBs7qaNuBiG30Xjl6xEtobndfd JqPgCabLnr2heoHBqwpczg3DogQYvUCKH7kKwDPM3dTAlsD+yoivupZLPzHUYD0xPIzcSB NnrdoWHv5AJvd7S/lxPozA5Rzb4VrzORzCht6A5zW+nAPB2iQc6udeFn+MS+4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731453588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HbaKbgWyfiBFjREumFNZyOGt0s01blNUZ/zJO/0dC6A=; b=ca/b7cObCGl36z7Bd1jbNCePT57ae/p2wjrvq5Ls3N9wNPVtmJmIrfBBRY8sGflI+l3rwq pdzyg9DDQiwdSKieQxQj2ODeocx0NFcI1olUSZRoFWWl2llO1E/6BBl3K4NyUmbusmG7We 9o5WeKCo/vQVE5X5yy+uQyfhOzfo9dP4Dt9ukE/1Dleb9Hu2utD4zYESaKU/k7abTo7pAF ipUwKt6/EtxlceDxSIn3S/N1AOlNmV94bgJIwY0fd5ua8Bz24YPDlshIw+l4VbPZsOvksf 5NaizbQAvJ1PkWFVwRfu42/mzRgh+maRZ+TjAxIhHivfJcwbjZp8AwoFS5BrZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731453588; a=rsa-sha256; cv=none; b=C7tRLs7a7aYJl05CTXAQrFJg9h5whTTu+Ui8C8+q2yxWIcvuUsvVUP9lons1tXcAy313lc x+WsbDg4zfNQ4qF8LV7xPY+W5Tz59qSY46F3lhzzuArA//lxKGQcPVRUvCynhemn1O4gMg PycV4hB1SOdSXHaTXyl1NMzFYZfVqcjNq6/TSY1LITT9OcIqInpx1SOW3ZIwB8jKVeGczt m5P6pdGIhVcqLSFUs+Xj4B/ZSh480F9hrvCfBoNFj1fXs8h3pxEupCc3FrLcCgrN8Rk7Mq FkYOybuLdE558UWLmOHhcfn0hMCs2zYynNI4cqeGPwhHqD91TnUnQ5EZRiECTQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xp2SN3dtdzVwm; Tue, 12 Nov 2024 23:19:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ACNJmjm084893; Tue, 12 Nov 2024 23:19:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ACNJmmd084890; Tue, 12 Nov 2024 23:19:48 GMT (envelope-from git) Date: Tue, 12 Nov 2024 23:19:48 GMT Message-Id: <202411122319.4ACNJmmd084890@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 92a9501b6be3 - stable/14 - vm_object: do not assume that un_pager.devp.dev is cdev List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 92a9501b6be3d37a4eefcfbdda799b656ae146e8 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=92a9501b6be3d37a4eefcfbdda799b656ae146e8 commit 92a9501b6be3d37a4eefcfbdda799b656ae146e8 Author: Konstantin Belousov AuthorDate: 2024-11-04 21:54:30 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-12 23:19:18 +0000 vm_object: do not assume that un_pager.devp.dev is cdev PR: 282533 (cherry picked from commit 580340dbdaaf372867e9ed3dd257430982753e5e) --- sys/kern/kern_proc.c | 5 +++-- sys/vm/vm_mmap.c | 3 +++ sys/vm/vm_object.c | 3 ++- sys/vm/vm_object.h | 1 + 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index 18302bb8abae..b7fa7bfb60e9 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -2718,8 +2718,9 @@ kern_proc_vmmap_out(struct proc *p, struct sbuf *sb, ssize_t maxlen, int flags) kve->kve_ref_count = obj->ref_count; kve->kve_shadow_count = obj->shadow_count; - if (obj->type == OBJT_DEVICE || - obj->type == OBJT_MGTDEVICE) { + if ((obj->type == OBJT_DEVICE || + obj->type == OBJT_MGTDEVICE) && + (obj->flags & OBJ_CDEVH) != 0) { cdev = obj->un_pager.devp.handle; if (cdev != NULL) { csw = dev_refthread(cdev, &ref); diff --git a/sys/vm/vm_mmap.c b/sys/vm/vm_mmap.c index 6b0a70d523d5..21ec52b8124f 100644 --- a/sys/vm/vm_mmap.c +++ b/sys/vm/vm_mmap.c @@ -1435,6 +1435,9 @@ vm_mmap_cdev(struct thread *td, vm_size_t objsize, vm_prot_t prot, td->td_ucred); if (obj == NULL) return (EINVAL); + VM_OBJECT_WLOCK(obj); + vm_object_set_flag(obj, OBJ_CDEVH); + VM_OBJECT_WUNLOCK(obj); *objp = obj; *flagsp = flags; return (0); diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index 5933b2c1d4bd..84e56b910809 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -2610,7 +2610,8 @@ vm_object_list_handler(struct sysctl_req *req, bool swap_only) sp = swap_pager_swapped_pages(obj); kvo->kvo_swapped = sp > UINT32_MAX ? UINT32_MAX : sp; } - if (obj->type == OBJT_DEVICE || obj->type == OBJT_MGTDEVICE) { + if ((obj->type == OBJT_DEVICE || obj->type == OBJT_MGTDEVICE) && + (obj->flags & OBJ_CDEVH) != 0) { cdev = obj->un_pager.devp.handle; if (cdev != NULL) { csw = dev_refthread(cdev, &ref); diff --git a/sys/vm/vm_object.h b/sys/vm/vm_object.h index 16ee3544b658..bd71820bed3c 100644 --- a/sys/vm/vm_object.h +++ b/sys/vm/vm_object.h @@ -206,6 +206,7 @@ struct vm_object { #define OBJ_PAGERPRIV2 0x00008000 /* Pager private */ #define OBJ_SYSVSHM 0x00010000 /* SysV SHM */ #define OBJ_POSIXSHM 0x00020000 /* Posix SHM */ +#define OBJ_CDEVH 0x00040000 /* OBJT_DEVICE handle is cdev */ /* * Helpers to perform conversion between vm_object page indexes and offsets. From nobody Tue Nov 12 23:28:51 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xp2fq3c5kz5cnZ1; Tue, 12 Nov 2024 23:28: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xp2fq1z7Lz4bZR; Tue, 12 Nov 2024 23:28:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731454131; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jwFGZuzpZFseUg5ZW/131rSLIeLMV5yI1O2pHH69mmc=; b=uObBCZmOUcK2hiwMIYQh38fe6VuDvOpPHVMhMszAGIHdXXiiMRpo2Y10Lco8OHugunpGLO wS638v9PuHMMOcBBt7Op0aIKFuPjEWE4fr5T/LEmhiAEmLjpIFz8kgxaP6HX/zKjDU/32i fVBiParFk2+9VBAKoxLX5g6iQ4IxAG9+E1z/wrlbytqJFDJbnxWJwcPoSSVC54BgN5xM17 jXWrBUSB/EmQ1p2mkJ0ns9R9CSOjFNZUCqLqC4xIVHJ9uoHk0DdOlDpucNAZigMO7NB0hW FGCh/JvTtJ2ATzpNm1bSHmSTmStwy5MfE+ZOgAYs6ZHSFAIw/wls2CugsOoLeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731454131; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jwFGZuzpZFseUg5ZW/131rSLIeLMV5yI1O2pHH69mmc=; b=mpOdJ6f+++W1J4OEJf2RdGg1+LLalZmRkJBOo0klVsEXVieKxhm8grmwNSCqj7ncdpl7aU Rv2mL644plgD9Zi8lzaOsOWvpoS1XIN/75H2p51WoZx2AnYF9XDXjJ2O2NG07oimV2knD0 ydAbb8/4EG9UDpEl4wTpy1Ot7/Pp4teVqSCbnZuMnM98fxMEzrQ7pyeY8tM8cMULTxCnul sHiwR6BrHu2BzTTvvcGzqfWpUB/RJamC/INTujLaZF3pgkcYCyXgqyhpdrBLIiuMVqBoJG Mqn4TpRa+wbfRIhoOb4qlHT03ooXxRab7m1vXhiV9Zry49UXxG4Dw7RZtab07A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731454131; a=rsa-sha256; cv=none; b=qbb8yL/4zZ5wLBJPH3rGLlnEqhy7UCNtFG4BkUhkd7dg3Xzdv6IRXTqyTvytdYZeJ3dpsX 68C/dvyp5PZ/iahgfOKo+HYeoi3A/ODTsqwFNinHABkqOJvP48GGgMBhsrkCnVt/6sRkWF 3iN8bESUdA2/ruORXvYDvWfZvpEs03mLMob019t3UzeIkPAlptZgCqxP37zuWJIhYKryfm gIJlk5j0uCMguyl9a832mg8vmaAxgJve9HB0k4LlEKaMe5Ed5rhWusgKUUgAfIygQH1j9k 9fObPBVbfAvWhgEBr/vOajaLQ4Y10ZOwHrLpZQGSoSzsXZS0t9u+Hbhl4mitVg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xp2fq1S94zW51; Tue, 12 Nov 2024 23:28:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ACNSpbj003096; Tue, 12 Nov 2024 23:28:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ACNSpfj003093; Tue, 12 Nov 2024 23:28:51 GMT (envelope-from git) Date: Tue, 12 Nov 2024 23:28:51 GMT Message-Id: <202411122328.4ACNSpfj003093@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: b8276743e4bb - releng/14.2 - iichid(4): Do not power down opened device in attach 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 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.2 X-Git-Reftype: branch X-Git-Commit: b8276743e4bbff1c11e910eef1599cbdfd88bc38 Auto-Submitted: auto-generated The branch releng/14.2 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=b8276743e4bbff1c11e910eef1599cbdfd88bc38 commit b8276743e4bbff1c11e910eef1599cbdfd88bc38 Author: Vladimir Kondratyev AuthorDate: 2024-11-08 19:23:38 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-11-12 23:27:30 +0000 iichid(4): Do not power down opened device in attach handler Some iichid(4) child devices, currently hkbd(4) only, opens parent device in their attach handlers. That breaks internal iichid(4) state leading to rejecting any incoming data on software and hardware levels. Fix it with adding of extra state check in iichid(4) attach handler. Approved by: re (cperciva) Reported by: many Submitted by: trasz (initial version) PR: 280290 MFC after: 3 days (cherry picked from commit 018cb11cb7d412b031e1be681a6a19e734473f99) (cherry picked from commit c53ec86f0ee97f07f80c0902b189c845bf448e7d) --- sys/dev/iicbus/iichid.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/dev/iicbus/iichid.c b/sys/dev/iicbus/iichid.c index 1e0dac2ee5dd..e99facdb06bb 100644 --- a/sys/dev/iicbus/iichid.c +++ b/sys/dev/iicbus/iichid.c @@ -1205,8 +1205,12 @@ iichid_attach(device_t dev) iichid_detach(dev); } done: - (void)iichid_set_power(sc, I2C_HID_POWER_OFF); - sc->power_on = false; + iicbus_request_bus(device_get_parent(dev), dev, IIC_WAIT); + if (!sc->open) { + (void)iichid_set_power(sc, I2C_HID_POWER_OFF); + sc->power_on = false; + } + iicbus_release_bus(device_get_parent(dev), dev); return (error); } From nobody Tue Nov 12 23:28:52 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xp2fr49YZz5cncr; Tue, 12 Nov 2024 23:28: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xp2fr3X8Tz4bck; Tue, 12 Nov 2024 23:28:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731454132; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BvjCinGod1LEBQewCGr386yTxNH7EvtxWLKriJ6TNWI=; b=ejC5J6BFsLatWeYwcz4FHyy/1y8sEDCiGhpLsJGj/DVvyyZu2YV3Fu7ZzYYrB4SjLuWEXW /65NCISeH9EbookPSe0WDADURakxCASzj3A6ym+I5LCbHEwoRrx1jHapQR2S6InvWh4/Sb IFrZnZCTeNEUN4fv3gvwLRoLGq7pUDkd3hZJG8A4WcsImDjv/w4AT3+H1XvW2MuURtAiak lCfLFMSC7O8RAUOp8DTPnRXwWhfRzMHzrDKplQjHwxv8Ca/u19PMmYOu7CUw14ao5FqKOa AEAIXHDZxrHqZ1Cld7MEHxON6EKNl8t5bRiyBaipKHhnIkq9uDCJiY+8UJqgrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731454132; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BvjCinGod1LEBQewCGr386yTxNH7EvtxWLKriJ6TNWI=; b=ySQETJ0adCvnzWW7+heFT4z4Kcj6WKPiX9WRm44IcZlOS+pOW5T13k4YCmUALmxyeIT4z2 FFpW+0zhF1tCqX4VMjGrY4BqcMw6FQgwRoIdiJkh2loN475HiwLl5jIsgcL41J6o4BGeU/ x0SCmb9C0Uzh1/WSmGi05eAFMZzpRLhBUhyDFalr6D3BvedJcad3hF86dy1tRj3mVFl6sv AogopHesXyISXi1E3Dqn9ayTx2+FQmjwSIcZJbkyGM9leLAkwpbHZ892kixqFegoRrE+uy XM5yx+Ctg6A1dKQhkBD8pl1J+XvIzYp3xXZkukLEizJHwpG+5eWCSch62rAWKg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731454132; a=rsa-sha256; cv=none; b=XkHQW3y/Lic0jhCPNkLLlzWzLsRP6/bz7NkDdNr5xD30Z7FRXWpJWXi+Q9AYRBWNuCHtuY oRVKDFt4rbfSXsJJD7DzJmMm4ApYVy9to6ntEbfmd704tSa77EMywQ0L3UNSlmmBQZIQDR jIqQe4mFDeu/e3goHWwI0Yu8DVjtUBNMnJ64PhPUKuJ2zkSEG/cj80Z778Do0WmDRcGWLI L447gq1dWh1/BSfvjk6tyziYw5pS1ottoSU9TyTVsFmEOzrnLqy96PZ4mVNx0XBL4EAgmY gapQtYZCmx7dqGKAtEJcSwzyULr9W4+SYtHgX8v1VMp2LxdixV47g93SJmGrRg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xp2fr2Bn1zW52; Tue, 12 Nov 2024 23:28:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ACNSqZv003145; Tue, 12 Nov 2024 23:28:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ACNSqI5003142; Tue, 12 Nov 2024 23:28:52 GMT (envelope-from git) Date: Tue, 12 Nov 2024 23:28:52 GMT Message-Id: <202411122328.4ACNSqI5003142@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: 56f0fc0011c2 - releng/14.2 - ig4(4): Add Meteor Lake PCI IDs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.2 X-Git-Reftype: branch X-Git-Commit: 56f0fc0011c2c2f57e0d9382e87cd7ea4e014bcd Auto-Submitted: auto-generated The branch releng/14.2 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=56f0fc0011c2c2f57e0d9382e87cd7ea4e014bcd commit 56f0fc0011c2c2f57e0d9382e87cd7ea4e014bcd Author: Austin Shafer AuthorDate: 2024-11-09 05:05:34 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-11-12 23:27:46 +0000 ig4(4): Add Meteor Lake PCI IDs Approved by: re (cperciva) PR: 282389 MFC after: 3 days (cherry picked from commit bab5e3d468305928e9e5cf1ca9efcee4c89f6a76) (cherry picked from commit 5cc7196a81fe6924a2994a1efc31468ad045b0ce) --- sys/dev/ichiic/ig4_pci.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/dev/ichiic/ig4_pci.c b/sys/dev/ichiic/ig4_pci.c index 138de77c35db..874d6a9abc55 100644 --- a/sys/dev/ichiic/ig4_pci.c +++ b/sys/dev/ichiic/ig4_pci.c @@ -172,6 +172,8 @@ static int ig4iic_pci_detach(device_t dev); #define PCI_CHIP_METEORLAKE_M_I2C_1 0x7e798086 #define PCI_CHIP_METEORLAKE_M_I2C_2 0x7e508086 #define PCI_CHIP_METEORLAKE_M_I2C_3 0x7e518086 +#define PCI_CHIP_METEORLAKE_M_I2C_4 0x7e7a8086 +#define PCI_CHIP_METEORLAKE_M_I2C_5 0x7e7b8086 struct ig4iic_pci_device { uint32_t devid; @@ -288,6 +290,8 @@ static struct ig4iic_pci_device ig4iic_pci_devices[] = { { PCI_CHIP_METEORLAKE_M_I2C_1, "Intel Meteor Lake-M I2C Controller-1", IG4_TIGERLAKE}, { PCI_CHIP_METEORLAKE_M_I2C_2, "Intel Meteor Lake-M I2C Controller-2", IG4_TIGERLAKE}, { PCI_CHIP_METEORLAKE_M_I2C_3, "Intel Meteor Lake-M I2C Controller-3", IG4_TIGERLAKE}, + { PCI_CHIP_METEORLAKE_M_I2C_4, "Intel Meteor Lake-M I2C Controller-4", IG4_TIGERLAKE}, + { PCI_CHIP_METEORLAKE_M_I2C_5, "Intel Meteor Lake-M I2C Controller-5", IG4_TIGERLAKE}, }; static int From nobody Wed Nov 13 04:56:07 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xp9wR1vh9z5d9RW; Wed, 13 Nov 2024 04:56: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xp9wR1L60z43sL; Wed, 13 Nov 2024 04:56:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731473767; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HWKKbm69npeNJZkOjekbeA13U4UAXko/YxsnmkNQkO0=; b=MO7zYB4Soe3tNVCp/ZT2a90DMEC7zrTEMQ7Bi3e3RjWnx+sjarUz7X+4Nn/UiFY1CFs+SF KlbE2XL5R3yIdi9lzfB3ED/ExTbSRrNAbzddXmkaPnJ7NsGtNcLoAjGIHDGrIwj2/DE4nj WEt9E0sI5tBkw/3VADXlsaV7HBR9ekbUs1pSBl1zXV1wvyNAU5BwnQdkERFNiZycjz1tRA Y7bZn0420Z8qokhGpNKsMsG1tP2eVbjV4nxkhJRy+oSxJFAZPWsjTlkE6vJqCt+a125a38 o5LpgBI2F4O4nYcSFC23TUoLGeWpkUXZcUcagLWrtvzkUJTMZqdOsRdSVwhhPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731473767; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HWKKbm69npeNJZkOjekbeA13U4UAXko/YxsnmkNQkO0=; b=PNgbnhI7tGh0TP6oHGwbYx/zxWKk+E/GO1eK/jUI1Ev2P6lFdgO9toX4ou5TAyLlXhga7i FANTT9BAvIBHndzP4s5joCMZ1UhcAyKRXtRz3GttzM7kkwEcL1gRbfHmLZ2DldGuSLImvU jmcvCZaqG21ZyILGpDL2j6xSrjk/1ZIjkBKQ7U7XFJmgryqHKsVYbugHxVecFL/A2JJvvz KA27PL3ZY6XC7TPLzFtqJtX0JAIdazjKyw+9WoMC6x5mgeaH3xC2kBsaQfDqzle0lwUo6n TtSyiV9veRFFVZO54yGJb4Ywpq3Np1zfMMerSPwyl/FEriySs7WfVrzS/IHp2Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731473767; a=rsa-sha256; cv=none; b=vRwjuhxmXN7jhLtxb3Q5nn3FB7N+QS5IsGP3C9k3S1Qr7wKd1n57p/6C6W7V2llmKVnHBJ y0EM/r1uoQcqgkIMsPaYsoGV38g5eDMZwOGsFuTgJMkHPNeNUwR2vrTKn6dK6RNHzOQ6gk Hqwwv0E39mvy2rcH1q1Ytqx0ozBVIufhZHMoz6A2AQMWwUqpfocuVE9keHGMqkJ2cC7goR YpHhbiRS5S9Y3/BeHD51yPhr07idhlFvOFjvYl5DykCCaKVEXm0peGvKuBfBrOHyLb9Ova yvRgDWADVveq8AUuek4PlQ8gucZOgXvbk8x20XgXqvmNJwIxELz+PjfoguAJNQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xp9wR0xbtzgqb; Wed, 13 Nov 2024 04:56:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AD4u7FJ016339; Wed, 13 Nov 2024 04:56:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AD4u7u5016336; Wed, 13 Nov 2024 04:56:07 GMT (envelope-from git) Date: Wed, 13 Nov 2024 04:56:07 GMT Message-Id: <202411130456.4AD4u7u5016336@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 5d3100f95bc3 - stable/14 - man.sh: revert trapping SIGPIPE List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5d3100f95bc3558e12185a8c11e1d5f2a42f2965 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=5d3100f95bc3558e12185a8c11e1d5f2a42f2965 commit 5d3100f95bc3558e12185a8c11e1d5f2a42f2965 Author: Alexander Ziaee AuthorDate: 2024-06-10 04:04:51 +0000 Commit: Warner Losh CommitDate: 2024-11-13 04:53:43 +0000 man.sh: revert trapping SIGPIPE PR: 279542 Fixes: 14a5c1068d37 Reported by: emaste Reviewed by: imp, emaste, jilles Pull Request: https://github.com/freebsd/freebsd-src/pull/1283 (cherry picked from commit a85d870007e7dd94242a2084dbb750438332ac1e) --- usr.bin/man/man.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/usr.bin/man/man.sh b/usr.bin/man/man.sh index ec14fe08cf67..3d1f4d2e9fe0 100755 --- a/usr.bin/man/man.sh +++ b/usr.bin/man/man.sh @@ -36,9 +36,6 @@ ulimit -t 20 # do not ignore the exit status of roff tools set -o pipefail -# ignore SIGPIPE exits because pagers may exit before reading all their input. -trap '' SIGPIPE - # Usage: add_to_manpath path # Adds a variable to manpath while ensuring we don't have duplicates. # Returns true if we were able to add something. False otherwise. From nobody Wed Nov 13 04:56:08 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xp9wS3ZGTz5d9RZ; Wed, 13 Nov 2024 04:56: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xp9wS2KZQz43kr; Wed, 13 Nov 2024 04:56:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731473768; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gWuWBIV+oNrT0KVGxiwto9Fa+VEvhzcZK6HKuIPBra0=; b=UJR8NcmczjSXPEmNawjdLaQGfWC0nWjACDAR8/6ySXlcuYt6eMdE7miTx/pxRVWtjsrxY7 hVxfeQxOF2IicmpYDwxI5vx+jMqdjoPp67N6QaNHDdyoRstfgyfVAFooicVKNxhy4y5+0/ 93+Y3A/QZ8NUKGo4rvAz7IsF0HmpzBh9jrmMgba1QGwRo0zyr4SBQojzshF6ydq7ZWdYWF fLQw7GQ8t+5ATXsX9AnUjJJI0IqP13e/QPtSp/Z7+ay0XT4UU6wbpoUp2Ph9b9n84uI7nT YCnx7ssOKV3/7WXoPmrNBiytdDfzjIeQFQmMH3MXJlGG7C2dytnmfHDBcNdISA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731473768; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gWuWBIV+oNrT0KVGxiwto9Fa+VEvhzcZK6HKuIPBra0=; b=J7wcv65EHQE+uTc4XVXKnZx6htz20ItzatKtnI2ehNDgvices6mfVi119Gf4gerWWbQYFV SvwGShcsTn1AAXG3hlg88FuU/QtgxZlES1lSFv0zNMcQDK5dxzD0LefrrAMF3vWRr45/6L sKngmrfcwMlOntV7Vlse/il9cZJcimnJxZbjwATEXU2NA8WjQlHoHKzEPHIKPwNmAvpGnK /Qc23r/fMg12kA8xDL16MP723wIBgyxzsOERJosTjWbuy3VcfBRkUPDay36+tDdUFk6tqF XvePl6y7vkMya+Yq9soLcif6q+iO3321dnbxOZDBrigwxare4slx+6lt41DSPA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731473768; a=rsa-sha256; cv=none; b=BxGRpiJ7FhMnJmAZcpxvhsir4po0yP6mt1S9rmr1rNEK9mv81C8MeC49hG0yvQNgp0LAaP XjzK7wULhsgVqdRK4uzW6H7/ml3DCMn8mxfpjsyA8QyROMzey5ixFuMeI5F7uwiKllQnnw 2JcowXqLeGxVB3dDq6DOqGGNI/obbdZjM/bDm/TVyKQV3ZWn17xf6AaXTomyXr3b8IJ3/l iMrshJz/a7e+c0N7UMzy00Uc7KhCPLinH5Zz2iDUKFT9xMydlpCnIUja6nWnk5FJOixtFm fZ2GeKLcVLXDBMivhuOWjk20pO/Pkc795cmxcQ2jvRq6g/UUvE1Mth/eu/vhTQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xp9wS1x08zh8j; Wed, 13 Nov 2024 04:56:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AD4u8Vs016398; Wed, 13 Nov 2024 04:56:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AD4u87R016395; Wed, 13 Nov 2024 04:56:08 GMT (envelope-from git) Date: Wed, 13 Nov 2024 04:56:08 GMT Message-Id: <202411130456.4AD4u87R016395@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 18e42bdf1a7b - stable/14 - da: Add quirk for ADATA USB Drive List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 18e42bdf1a7b493d6305d104ebec68cb01ab0285 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=18e42bdf1a7b493d6305d104ebec68cb01ab0285 commit 18e42bdf1a7b493d6305d104ebec68cb01ab0285 Author: Warner Losh AuthorDate: 2024-11-08 00:11:15 +0000 Commit: Warner Losh CommitDate: 2024-11-13 04:55:04 +0000 da: Add quirk for ADATA USB Drive ADATA USB Drive lies about the RC16, so add a quirk to ignore it. MFC After: 3 days PR: 188999 Sponsored by: Netflix (cherry picked from commit f11b6ce4a3bc6d455dbec375218c01ce9b6b5dc2) --- sys/cam/scsi/scsi_da.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c index 5b1cc7314984..efa903c2e57a 100644 --- a/sys/cam/scsi/scsi_da.c +++ b/sys/cam/scsi/scsi_da.c @@ -882,6 +882,11 @@ static struct da_quirk_entry da_quirk_table[] = {T_DIRECT, SIP_MEDIA_REMOVABLE, "JetFlash", "Transcend*", "*"}, /*quirks*/ DA_Q_NO_RC16 }, + { + /* ADATA USB sticks lie on RC16. */ + {T_DIRECT, SIP_MEDIA_REMOVABLE, "ADATA", "USB Flash Drive*", + "*"}, /*quirks*/ DA_Q_NO_RC16 + }, { /* * I-O Data USB Flash Disk From nobody Wed Nov 13 05:05:59 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpB7r1TMmz5dB7l; Wed, 13 Nov 2024 05:06: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XpB7q5jBQz44mr; Wed, 13 Nov 2024 05:05:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731474359; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sfC5AD20YboxV2rcS6BHzStulA0oFaCPcPfIo9yw4OY=; b=m00w/6d625pIbDXrwa8UYAprp2SeAyRx1F8S+M3K/8ctLalcvjaMeIhfy+dDzm+ONDbglM Q1jiGbOtDj5Bidd3zWyzC+q3fOQL5DzleDSTKdpcVlfsc0XYCjFF+HADQVbgWhmw2hUnfl 9byIpijVKTYYDx3XfhJ/5XYn57N5VyOPv4g60GGy3NnYdDrPQUtCd1IsggTexmqYdgTFrT L8l7aD/3+sVzeKRsipcq0zK8EUT4M6OGPcV6xd17oqQjiTCW9/G6T4C0rVbFCtEPnYFvVn nP3iDxH9YBRETN3Rht2iJh9O/xVxWEz+7UuMwRUumvirfczunJtIO+kFkVI1aQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731474359; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sfC5AD20YboxV2rcS6BHzStulA0oFaCPcPfIo9yw4OY=; b=tfSTd1e+2yOPOQOyuVhrv8nD1aVQTzMcyzMw5pXbqXg2ZZCieEMQO3XC8DhocJMHnyMjaH Kn9krBhajyv+5xrmqZ8EL8LidWZYr3RuJdy16cIPM3Z06phjgNG6muNC0Cm1uhcLp05g/Z ShOG2TP8yNW8busFquEXkw8byTZ/hudrYDQZdP086vEQtpT5yLhYySq+/K0/AEbov0YCDa cm+nzamRQ7Do2IkDw1QPv1YAGrrTry4L1ZHKHRE8W7f6jq4RaX1PPbb8BslsU+6rU17rqY 99lkhN8Zrl7gj7W72Q+Y+6/EXdQrWbK4ZnNsR6o/0iyZAadFoT42KLFRKMHgRQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731474359; a=rsa-sha256; cv=none; b=ZM5TOIeFIT/bVYm57sQ6olpuSNCxbbJPf9qlfa2CuSxFsQ3xgXyvG3ILgB5DT/fWS9E6Gv n70LW2G+zxvsnOdSaFFwKVJ6R/DPpP6Jy2a0A48BByLgMwAzCS7RV486T9UxmTBPyS/3hT uKBIVKLHJNjPXVee8+4+O6EuQsmUbeEDxk3TuD8MGoWG4BaLmWaB1zdHRVqUKg74THhU8C 9FFyOQxYdc8C5OoppS71MCQyMc5gryAmcYQgnIPwYV+3eBuTXhSISK5ELreB0vuYKYX5L4 N8PoRv5FMwueUtDJ58kn2/ZcodcnY587IeEvR2voGsvAFrlCFBu0HRTBGex61Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XpB7q4xyWzgqs; Wed, 13 Nov 2024 05:05:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AD55xSt035931; Wed, 13 Nov 2024 05:05:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AD55xpk035928; Wed, 13 Nov 2024 05:05:59 GMT (envelope-from git) Date: Wed, 13 Nov 2024 05:05:59 GMT Message-Id: <202411130505.4AD55xpk035928@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 7e8f87ca2b9f - main - loader: Don't need the arch list List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7e8f87ca2b9f9e50c5bcd8dbe03ef2b7d18a6574 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=7e8f87ca2b9f9e50c5bcd8dbe03ef2b7d18a6574 commit 7e8f87ca2b9f9e50c5bcd8dbe03ef2b7d18a6574 Author: Warner Losh AuthorDate: 2024-11-13 05:01:24 +0000 Commit: Warner Losh CommitDate: 2024-11-13 05:01:24 +0000 loader: Don't need the arch list MK_LOADER_KBOOT is already marked broken for these architectures, so I don't need an if too. Sponsored by: Netflix --- stand/Makefile | 2 -- 1 file changed, 2 deletions(-) diff --git a/stand/Makefile b/stand/Makefile index 5d81e5f8a032..f5ce6ca3db71 100644 --- a/stand/Makefile +++ b/stand/Makefile @@ -37,9 +37,7 @@ INTERP_DEPENDS+= lua .include S.${MK_EFI}+= efi -.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "aarch64" || ${MACHINE_ARCH} == "powerpc64" S.${MK_LOADER_KBOOT}+= kboot -.endif S.${MK_LOADER_UBOOT}+= uboot .if defined(LIB32LIST) From nobody Wed Nov 13 05:27:50 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpBd307KXz5dBr0; Wed, 13 Nov 2024 05:27: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XpBd26m5Tz46fx; Wed, 13 Nov 2024 05:27:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731475671; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pHtxtSB2gIZN+FlxXyM7h5arxCN2/KpEilTkSWcPp+M=; b=fzyabjRJHwC2rSmpo+veYMGTAm1sXLxEA3S7iojuIUHXHnJoKr9RYLvp+qhjmPTVbVxZdu /Pxy89+44orq8Xiqf5HHxvWO/XxhJFP5nvFioDbAlunA37WCinq4tU3XE0ui2iYyrDuenC yxhKKLX+2BeKWlgGiDRL50xKS59h8oFqHI8+m/QWdmqZPy8yGFg2ouIgacrFj+QRmzsuEx UV+S9c1+Y9kGzaGYdPf7CJiIL/vrFUEiK34/D9T2zgsAQdmaFjCz8gdY9I638If6STukvS RdMHUSGjRG17h7CMNYbnq1pcl/4td2nLoBtIMG22BBkhIZt6oo/to7XsbLpyaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731475670; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pHtxtSB2gIZN+FlxXyM7h5arxCN2/KpEilTkSWcPp+M=; b=bDR2Aw1DrlRLosh/tpv3x0ukR8LCbrYLwEqgOHufwpUsJVmziY8ePyFyS7gzC7lJlNOMRH EI8gcmg4yMqBwcicDSFIp5/nhbEAb4iE73VrLIhXRTk+ypTvBpH2H8f9uyHuYaWKioosP+ 85eyHCDqRx6wqIr2Jt5OdEVRAaknJF3mE/c7O4zsR6kwL0obP5dKj0KkpkdoDDI5ZLRcIL oYzZfQq6ItmXwdpqE3ecy9rHKmJlCC9IU/PQELjZ+bl09smA+W7/RponQ7DW6vZFAODQQ5 YB68ioqRNvCBsEh6HKW9EsEimMLfQCpXlQc/PESdwCSiPWeZ2LOXz/RsL7Wa/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731475670; a=rsa-sha256; cv=none; b=AXrMAdhwzgzmT89pc7+plOySt/3dYOb0lcWX0+Y2BkKTeM2TMEqNTW2rzBJk7q04BSpKdf ShBnooUArmV0lg6xljOwYalc9lqMh+XYKKT5gyZevocd2UKfmq5VPNEi9/9UZ8xfpLiTtC NKLGNPSxPuBznNZrXjhKTwJL6AM6hutFKSNsr4bPwD5Q6U/EOcrqSxojg7FC5W9DgCkoTL aMU3mb7RiCISx33g8rZ/Z0AqMOtWKueenZZ8SqVJau5Tg8+5+1X75FKeE+KXOTbVS8v34u 7p+u1bp5792F61dLZ1rw1RvWLm/zTUddyOTiI3Rpb4wZ+9/8aEJhX8UdLmv0Yw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XpBd262HpzhrH; Wed, 13 Nov 2024 05:27:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AD5RoTn073317; Wed, 13 Nov 2024 05:27:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AD5Ro75073314; Wed, 13 Nov 2024 05:27:50 GMT (envelope-from git) Date: Wed, 13 Nov 2024 05:27:50 GMT Message-Id: <202411130527.4AD5Ro75073314@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: 78c63ed260fa - main - net: if_media for 1000Base-BX BiDi List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 78c63ed260fa20b3500aedfe41dc0dcae9593f51 Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=78c63ed260fa20b3500aedfe41dc0dcae9593f51 commit 78c63ed260fa20b3500aedfe41dc0dcae9593f51 Author: Tore Amundsen AuthorDate: 2024-11-13 05:08:06 +0000 Commit: Kevin Bowling CommitDate: 2024-11-13 05:27:32 +0000 net: if_media for 1000Base-BX BiDi 1000Base-BX uses two wavelengths, commonly 1310nm, 1490nm, 1550nm, or 1590nm, in a Coarse Wavelength Division Multiplexing (CWDM) arrangement so that a single fiber strand may carry both upstream and downstream. It is sometimes referred to as BiDi for bi-directional usage of one fiber. Optics must be paired such that the RX and TX wavelengths cross over, with one side often called U(pstream) and the other D(ownstream). This technology is useful for increasing link density or working around construction issues, and is also frequently used as a last mile delivery technology for FTTx. MFC after: 3 days Sponsored by: BBOX.io (review/commits) Pull Request: https://github.com/freebsd/freebsd-src/pull/1518 --- sys/net/ieee8023ad_lacp.c | 1 + sys/net/if_media.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/sys/net/ieee8023ad_lacp.c b/sys/net/ieee8023ad_lacp.c index c1e91f7fcb3e..be047c4913fc 100644 --- a/sys/net/ieee8023ad_lacp.c +++ b/sys/net/ieee8023ad_lacp.c @@ -1146,6 +1146,7 @@ lacp_compose_key(struct lacp_port *lp) case IFM_1000_KX: case IFM_1000_SGMII: case IFM_1000_CX_SGMII: + case IFM_1000_BX: key = IFM_1000_SX; break; case IFM_10G_LR: diff --git a/sys/net/if_media.h b/sys/net/if_media.h index c03a4c87b355..2b308ccfea25 100644 --- a/sys/net/if_media.h +++ b/sys/net/if_media.h @@ -258,6 +258,7 @@ uint64_t ifmedia_baudrate(int); #define IFM_400G_AUI8 IFM_X(117) /* 400G-AUI8 */ #define IFM_50G_KR4 IFM_X(118) /* 50GBase-KR4 */ #define IFM_40G_LM4 IFM_X(119) /* 40GBase-LM4 */ +#define IFM_1000_BX IFM_X(120) /* 1000Base-BX */ /* * Please update ieee8023ad_lacp.c:lacp_compose_key() @@ -442,6 +443,7 @@ struct ifmedia_description { { IFM_1000_SX, "1000baseSX" }, \ { IFM_1000_LX, "1000baseLX" }, \ { IFM_1000_CX, "1000baseCX" }, \ + { IFM_1000_BX, "1000baseBX" }, \ { IFM_1000_T, "1000baseT" }, \ { IFM_HPNA_1, "homePNA" }, \ { IFM_10G_LR, "10Gbase-LR" }, \ @@ -789,6 +791,7 @@ struct ifmedia_baudrate { { IFM_ETHER | IFM_10_FL, IF_Mbps(10) }, \ { IFM_ETHER | IFM_1000_LX, IF_Mbps(1000) }, \ { IFM_ETHER | IFM_1000_CX, IF_Mbps(1000) }, \ + { IFM_ETHER | IFM_1000_BX, IF_Mbps(1000) }, \ { IFM_ETHER | IFM_1000_T, IF_Mbps(1000) }, \ { IFM_ETHER | IFM_HPNA_1, IF_Mbps(1) }, \ { IFM_ETHER | IFM_10G_LR, IF_Gbps(10ULL) }, \ From nobody Wed Nov 13 06:41:25 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpDFx74WQz5dGmB; Wed, 13 Nov 2024 06:41: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XpDFx6XWvz4D3Q; Wed, 13 Nov 2024 06:41:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731480085; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mbGW/YxFZggw7zD/Fw60t0OD84G3kxQ+7eBO2pXKE0U=; b=UgESfevfHazosv9ZlSeLRmy3ddHj/3qllT8FVGYUGXOrvDXjgmjGhssAnawYs0CJPiAyJF qPO8KN/M2uHlFMN731qfUeEVrpjxkyq1nPpzcBxOHu/EdOunUWTjJsXJV5u0BUrrULJQ8K 258UMgwUFRw+d8xc4ymzebdmkQJssIob8mhI2weYnrjVOH5A3XEz0yeyz7XE4BTO9kTzpi Zfli08R3U6TXJ4qFP0AR+vj2z+ZNHP1CpIcDPGD22A6YoVhaAmU96bb7r3x0v4MzXqOLU7 6EIa5sImjau98KKwuNr4a59gTLTEP+lDxhtUwFBf+gvdbYVEWgk61ztZdO84fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731480085; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mbGW/YxFZggw7zD/Fw60t0OD84G3kxQ+7eBO2pXKE0U=; b=h8liKyNzaXVkAy27latzdUN8Yh9k4hBjRwAGciLWxE7iiwYiCfHj5629nmLg1BIxl2vhq2 AlM+lPGi8EhqBW5AgDqZIYH/z+Ztw7CRtrpCBk0ZoSWtAr38SK4EUVMFnbqhgvSvjizEzt qnUtsZUUBQmmZ/e9k/hHekI/ehLcCPndTtWppD/sB34iUUSCy9LkE44bnIBOkShQutp86M cXgDv1qhHw1fE2pNRFH+To6i/+PZd/LsqilOn2Ew75+I0kuMGTFLjle0Vb9wxeaegrqsO5 vF4b7bzF9YTnEnlusahUpnZaLUL0o0lH2N3VO5czrlnDSAGKjUFK3DRGn1ZkHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731480085; a=rsa-sha256; cv=none; b=mnJLPXLgQIptQ4XfLFJTgrjhsHRP5BEZYZ8ENlgqf4om5rIu6NogOjqYYTyJHzofOZ394h g0cCv99cXdVu2Ou6cZj/RjHOvcGGxDRjGtGlfQ4vSS2VE9cJOtmr/C3EZrv+iWH5zAlQ00 BV4ta9NT1sIexHLh1jJ+MYzrZb89TZnPTUSv4+AOHhnsjQo3vOmNcU2F0Rb/uwvF2GCOxV F95/YILWA1rNQcAZOVIXw153LawcILAuOXI2qhA1sUZhuKv5uzSEVTHrYyIimkroqimbMq etO0ROObAHZ+r8oCMHv/BlBLQukVuQxr4L6Zttn6+80RFQA5rjUQP+ypcfBhvw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XpDFx67qgzkL3; Wed, 13 Nov 2024 06:41:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AD6fPIw016800; Wed, 13 Nov 2024 06:41:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AD6fPTA016797; Wed, 13 Nov 2024 06:41:25 GMT (envelope-from git) Date: Wed, 13 Nov 2024 06:41:25 GMT Message-Id: <202411130641.4AD6fPTA016797@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: e95e3e6eb7ef - main - release: Publish OCI images on "ftp" mirrors List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e95e3e6eb7ef723aa5dd08de48a9ad3fec647c7d Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=e95e3e6eb7ef723aa5dd08de48a9ad3fec647c7d commit e95e3e6eb7ef723aa5dd08de48a9ad3fec647c7d Author: Colin Percival AuthorDate: 2024-11-13 06:36:14 +0000 Commit: Colin Percival CommitDate: 2024-11-13 06:36:14 +0000 release: Publish OCI images on "ftp" mirrors If WITH_OCIIMAGES is set, "make ftp-stage" will now publish those bits into a directory under /OCI-IMAGES/, similar to how we publish CI and VM images. MFC after: 1 minute --- release/Makefile.mirrors | 53 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/release/Makefile.mirrors b/release/Makefile.mirrors index 8a6888ccc96c..8856389979d1 100644 --- a/release/Makefile.mirrors +++ b/release/Makefile.mirrors @@ -58,6 +58,11 @@ STAGE_TARGETS+= ci-images-stage CI_DIR= ${TLD}/CI-IMAGES/${REVISION}-${BRANCH}/${TARGET_ARCH} .endif +.if defined(WITH_OCIIMAGES) && !empty(WITH_OCIIMAGES) +STAGE_TARGETS+= oci-images-stage +OCI_DIR= ${TLD}/OCI-IMAGES/${REVISION}-${BRANCH}/${TARGET_ARCH} +.endif + CLEANFILES+= ${STAGE_TARGETS} CHECKSUM_FILES?= SHA512 SHA256 SNAP_SUFFIX!= echo ${_SNAP_SUFFIX:S,^-,,1} | tr -d ' ' @@ -313,5 +318,53 @@ ci-images-stage: . endfor .endif +oci-images-stage: + mkdir -p ${OCI_DIR} +.if defined(SNAPSHOT) && !empty(SNAPSHOT) +. if exists(${OCI_DIR}/Latest) + rm -rf ${OCI_DIR}/Latest +. endif + mkdir -p ${OCI_DIR}/Latest + mkdir -p ${OCI_DIR}/${BUILDDATE} +. for _IMG in ${OCI_IMAGES} + cd ${RELEASEDIR}/ociimages && \ + mv container-image-${_IMG}.txz \ + ${OSRELEASE}-container-image-${SNAP_SUFFIX}-${_IMG}.txz + cp ${RELEASEDIR}/ociimages/${OSRELEASE}-container-image-${SNAP_SUFFIX}-${_IMG}.txz \ + ${OCI_DIR}/${BUILDDATE}/${OSRELEASE}-container-image-${SNAP_SUFFIX}-${_IMG}.txz + cd ${OCI_DIR}/Latest && \ + ln -s ../${BUILDDATE}/${OSRELEASE}-container-image-${SNAP_SUFFIX}-${_IMG}.txz \ + ${OSRELEASE}-container-image-${_IMG}.txz +. endfor + cd ${RELEASEDIR}/ociimages && rm -f CHECKSUM.* +. for CHECKSUM in ${CHECKSUM_FILES} + cd ${RELEASEDIR}/ociimages && \ + ${CHECKSUM:tl} ${OSRELEASE}* > CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} + cp -p ${RELEASEDIR}/ociimages/CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} \ + ${OCI_DIR}/${BUILDDATE}/CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} + cd ${OCI_DIR}/Latest && \ + ln -s ../${BUILDDATE}/CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} \ + CHECKSUM.${CHECKSUM} +. endfor +.else # not snapshot +. if exists(${OCI_DIR}/Latest) + rm -rf ${OCI_DIR}/Latest +. endif + mkdir -p ${OCI_DIR}/Latest +. for _IMG in ${OCI_IMAGES} + cd ${RELEASEDIR}/ociimages && \ + mv container-image-${_IMG}.txz \ + ${OSRELEASE}-container-image-${_IMG}.txz + cp ${RELEASEDIR}/ociimages/${OSRELEASE}-container-image-${_IMG}.txz \ + ${OCI_DIR}/Latest/${OSRELEASE}-container-image-${_IMG}.txz +. endfor +. for CHECKSUM in ${CHECKSUM_FILES} + cd ${RELEASEDIR}/ociimages && \ + ${CHECKSUM:tl} ${OSRELEASE}* > CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} + cp -p ${RELEASEDIR}/ociimages/CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} \ + ${OCI_DIR}/Latest/CHECKSUM.${CHECKSUM} +. endfor +.endif + ftp-stage: remove-old-bits ${STAGE_TARGETS} From nobody Wed Nov 13 06:42:09 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpDGn1rFlz5dGpX; Wed, 13 Nov 2024 06: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XpDGn1Pgzz4DSM; Wed, 13 Nov 2024 06: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=1731480129; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pWdOR2McKwCiMDNiHwvIQB9K0Afh4EkgR1pNpncjM5o=; b=hZ5HwaOEL/jZMj6aMFImJJ5IAqyZ1paWG86ELPoMFuuxXXAEqrWrklGwwNh17xUr1yx+DL 2Pf65JB61gX99FcfQaLF78mY8iPEDZfvu3xCcejMGGkjeMSk32ZN7NiKEufHaMGn4IGL9b pZ8b8ouhlZ6PCerzMrSYHPNPD7WoaxR0UnnVS+Sz2KRyGZs22H+m958q8esN+EKpuHwC6C hct3rs6fKvhsdJij8eUut84Ny+zLNTDC76/GcB0j32k8fCCQKSdOcEIXG4oFmqp7TAwVID nXwMo3QBHYMGYu2WQARaCmt+KXrmmeBq7oAHJpq3S+YZV9yryOK2EWavtQahJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731480129; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pWdOR2McKwCiMDNiHwvIQB9K0Afh4EkgR1pNpncjM5o=; b=ZOo62VzF8BIpL6bPe20uRZ65Zb6Yeap3up6gxN3Xus+MwewVYmUhAPXDgmh0iVPmwlMfoB 0oLTwtURg+Y9G1OpQV7Vm7OsRDg4cVaj5EOT70P6h/chH0L/LM+GdAam2eALnsCtUen0ib tW6B0nApOeuPLRFHS4PqUZb+ijvw9DyO2d/2Kvb3TDyb0iyesEn1QS5iKLEBLXok8jzVqR tIBBxV6QCXwvJStndKss5b1zrEjbEHW768rR5s6iAzJGZNJRLrNn4T/ovncdnsXXmSqQ4z qcXzWl4dDTh6v6ZOSJt30/4WNydiu7DL2GfgexyKiiATLDT1UcNLd3z7tDBGXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731480129; a=rsa-sha256; cv=none; b=Q/dZAtgNkCkKOvNfqjFMFYyUhkmrSX59Wlvj4RnJEI8hAdeM142zrjprf+yxo40GAJAMpq n55c8TIAkf58rUx/EkIdp0V1N5JhcZF55/L0+aHcat5BS5AAnPuUT/xwDetThbcdtfVaEH q/8/aUt1wKaUFUs3iLurc4lpJdnhNAoHvqrcck1XG9uhGTa2dhSw7WB9zmloTsbCP8m7PA QYimbKxi02y38yJNjm9L3svSxs1ggTcz6hb2ikhiHJoWunOVkYTDFUKg+dRjeAWF/kCm5i P+pVj/w7jR5+gfbRIkIWrzHhUGJEP/Y8vnr4lqmuSaiA397byAP51Gs56koGfg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XpDGn118dzkLS; Wed, 13 Nov 2024 06:42:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AD6g9on017129; Wed, 13 Nov 2024 06:42:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AD6g9R7017126; Wed, 13 Nov 2024 06:42:09 GMT (envelope-from git) Date: Wed, 13 Nov 2024 06:42:09 GMT Message-Id: <202411130642.4AD6g9R7017126@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: e8c5d6f6b89f - stable/14 - release: Publish OCI images on "ftp" mirrors List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e8c5d6f6b89f38ed7c20ad5537fc82092106d378 Auto-Submitted: auto-generated The branch stable/14 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=e8c5d6f6b89f38ed7c20ad5537fc82092106d378 commit e8c5d6f6b89f38ed7c20ad5537fc82092106d378 Author: Colin Percival AuthorDate: 2024-11-13 06:36:14 +0000 Commit: Colin Percival CommitDate: 2024-11-13 06:42:04 +0000 release: Publish OCI images on "ftp" mirrors If WITH_OCIIMAGES is set, "make ftp-stage" will now publish those bits into a directory under /OCI-IMAGES/, similar to how we publish CI and VM images. MFC after: 1 minute (cherry picked from commit e95e3e6eb7ef723aa5dd08de48a9ad3fec647c7d) --- release/Makefile.mirrors | 53 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/release/Makefile.mirrors b/release/Makefile.mirrors index 1888f86d3002..8af614d9a9bb 100644 --- a/release/Makefile.mirrors +++ b/release/Makefile.mirrors @@ -58,6 +58,11 @@ STAGE_TARGETS+= ci-images-stage CI_DIR= ${TLD}/CI-IMAGES/${REVISION}-${BRANCH}/${TARGET_ARCH} .endif +.if defined(WITH_OCIIMAGES) && !empty(WITH_OCIIMAGES) +STAGE_TARGETS+= oci-images-stage +OCI_DIR= ${TLD}/OCI-IMAGES/${REVISION}-${BRANCH}/${TARGET_ARCH} +.endif + CLEANFILES+= ${STAGE_TARGETS} CHECKSUM_FILES?= SHA512 SHA256 SNAP_SUFFIX!= echo ${_SNAP_SUFFIX:S,^-,,1} | tr -d ' ' @@ -333,5 +338,53 @@ ci-images-stage: . endfor .endif +oci-images-stage: + mkdir -p ${OCI_DIR} +.if defined(SNAPSHOT) && !empty(SNAPSHOT) +. if exists(${OCI_DIR}/Latest) + rm -rf ${OCI_DIR}/Latest +. endif + mkdir -p ${OCI_DIR}/Latest + mkdir -p ${OCI_DIR}/${BUILDDATE} +. for _IMG in ${OCI_IMAGES} + cd ${RELEASEDIR}/ociimages && \ + mv container-image-${_IMG}.txz \ + ${OSRELEASE}-container-image-${SNAP_SUFFIX}-${_IMG}.txz + cp ${RELEASEDIR}/ociimages/${OSRELEASE}-container-image-${SNAP_SUFFIX}-${_IMG}.txz \ + ${OCI_DIR}/${BUILDDATE}/${OSRELEASE}-container-image-${SNAP_SUFFIX}-${_IMG}.txz + cd ${OCI_DIR}/Latest && \ + ln -s ../${BUILDDATE}/${OSRELEASE}-container-image-${SNAP_SUFFIX}-${_IMG}.txz \ + ${OSRELEASE}-container-image-${_IMG}.txz +. endfor + cd ${RELEASEDIR}/ociimages && rm -f CHECKSUM.* +. for CHECKSUM in ${CHECKSUM_FILES} + cd ${RELEASEDIR}/ociimages && \ + ${CHECKSUM:tl} ${OSRELEASE}* > CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} + cp -p ${RELEASEDIR}/ociimages/CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} \ + ${OCI_DIR}/${BUILDDATE}/CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} + cd ${OCI_DIR}/Latest && \ + ln -s ../${BUILDDATE}/CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} \ + CHECKSUM.${CHECKSUM} +. endfor +.else # not snapshot +. if exists(${OCI_DIR}/Latest) + rm -rf ${OCI_DIR}/Latest +. endif + mkdir -p ${OCI_DIR}/Latest +. for _IMG in ${OCI_IMAGES} + cd ${RELEASEDIR}/ociimages && \ + mv container-image-${_IMG}.txz \ + ${OSRELEASE}-container-image-${_IMG}.txz + cp ${RELEASEDIR}/ociimages/${OSRELEASE}-container-image-${_IMG}.txz \ + ${OCI_DIR}/Latest/${OSRELEASE}-container-image-${_IMG}.txz +. endfor +. for CHECKSUM in ${CHECKSUM_FILES} + cd ${RELEASEDIR}/ociimages && \ + ${CHECKSUM:tl} ${OSRELEASE}* > CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} + cp -p ${RELEASEDIR}/ociimages/CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} \ + ${OCI_DIR}/Latest/CHECKSUM.${CHECKSUM} +. endfor +.endif + ftp-stage: remove-old-bits ${STAGE_TARGETS} From nobody Wed Nov 13 08:15:14 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpGLB5VPrz5dL63; Wed, 13 Nov 2024 08:15: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XpGLB4rtpz4K5v; Wed, 13 Nov 2024 08:15:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731485714; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BIz4fMOulF/s6/148fWaI96kyIHU2F51Ck1qaMI0oqI=; b=Y7MGW1m3fRTHt15VE6pD6sRqxhHMy6DzwaFD0HmfsNBScTYffCTd0GQp0XV7k0SBfUjkXG uMhpTCnX+QNDb319sOYsADSM2Ok8AOG71wHJs4phkumxaQYVDh7rVLu/UkUWP0J1Xz+BzU k1/1KnoXm2H3zm2S7l/OGOUsEeZuDGPUA/Q6dvtUMHUJR60VQR0UF3SJwA847Eb2/4FbEm +wBHJeGJGkoq6a7EU5ok6Sn6dJigHhkU78icC+imRDFvQpCLDNkjq+pWJG0loL/hXedW/i NyBdr6sEbP8XjdE9yh9X9LsqxtlmVkPxjP+oTlTWbA7EOpNvGZNJusQvt2PsZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731485714; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BIz4fMOulF/s6/148fWaI96kyIHU2F51Ck1qaMI0oqI=; b=aWtY2KcszQmxslG8hFT+OWQJ5MTpuntJJSthxRFyeEEO6JJsdyU1o/Ui0dPt2mp3mWwlDN zGK57yWb7HpVZU03UULIcDRvC8qv5DOoXnaEenRkrGw+PyLov1ZRZMk370Da3oJY87htSe gp5Mqj/hcjnREMcXUjcuVjxtGG2FUe+GECS66V6iOdxHzREDwWO2ZCxTrr9hmRcaAoSKf7 NvZ20avyDb/OO0qPB7r09NcLw/0WYtMXY2eSOjjU+xkfjcskaenM3A0KRmT4/sYBNQJ4iT qDo908TIdrEvXomtO3q0RcRlzlbK6axxduJOG535J++p6gouEmWUXFa6rEIdRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731485714; a=rsa-sha256; cv=none; b=XPAFeE+Kl2aopykCeti0GfaTuRL8CkBnRIcgLERO1D+jj3UCNDcrTen5zxv8yBW43a/b38 bfib0KKh1Cj80QRUDwwQd+J4PU/XnE9ehcQmCrca6519piv7NPyhL7gAGMMJ+1uHi+8+CB GN0Bbf6UE1oRWYZd+V0SpvIZtWixFr7omP47Ra/6hBrURcz5/Ex6PH2oNvm2WtpP1D1O9B dlQ6UjrAKR6CF6oosD78c25059geqpj8WaJPzEKN8leTLn9pSQtv1muuFP3b5IATTMZzZq zcNdkteBAc6Xhya5BQbs4OWnivlN7YLFt3TrI77gVoOp/kStqjtjPfVhF6Uo4A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XpGLB4S4yzmDk; Wed, 13 Nov 2024 08:15:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AD8FEiu087014; Wed, 13 Nov 2024 08:15:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AD8FEfN087011; Wed, 13 Nov 2024 08:15:14 GMT (envelope-from git) Date: Wed, 13 Nov 2024 08:15:14 GMT Message-Id: <202411130815.4AD8FEfN087011@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: aa5d3dec9df9 - main - route.8: remove now incorrect bug report about blackhole routes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aa5d3dec9df9379ab610f426e9653d1a55b254e5 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=aa5d3dec9df9379ab610f426e9653d1a55b254e5 commit aa5d3dec9df9379ab610f426e9653d1a55b254e5 Author: Kristof Provost AuthorDate: 2024-11-12 13:58:14 +0000 Commit: Kristof Provost CommitDate: 2024-11-13 08:12:32 +0000 route.8: remove now incorrect bug report about blackhole routes We removed IP fast forwarding a while ago, so this is no longer relevant. The netlink interface always sets the nexthop interface as V_loif, so users don't need to worry about it either. Reported by: Jim Thompson Reviewed by: melifaro Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D47528 --- sbin/route/route.8 | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/sbin/route/route.8 b/sbin/route/route.8 index 08d5aae36b28..572781ef59c8 100644 --- a/sbin/route/route.8 +++ b/sbin/route/route.8 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 16, 2023 +.Dd November 12, 2024 .Dt ROUTE 8 .Os .Sh NAME @@ -552,17 +552,3 @@ The .Nm utility appeared in .Bx 4.2 . -.Sh BUGS -The first paragraph may have slightly exaggerated -.Xr routed 8 Ns 's -abilities. -.Pp -Currently, routes with the -.Dv RTF_BLACKHOLE -flag set need to have the gateway set to an instance of the -.Xr lo 4 -driver, using the -.Fl iface -option, for the flag to have any effect; unless IP fast forwarding -is enabled, in which case the meaning of the flag will always -be honored. From nobody Wed Nov 13 09:45:30 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpJLL67Z4z5dQDS for ; Wed, 13 Nov 2024 09:45: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XpJLL5cs1z4PYH; Wed, 13 Nov 2024 09:45:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731491130; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o2xr5303R7urHWMwuIPn8IP1SH51L+nQNAqMWLQLvDg=; b=pUUhgFkbIsBqT9LyS4ogLK/xQFymwrx3YhPn0cdZ1yYiqLl4bC4aF+GNewV1zDhfPuVdAN TN1XAp4M9uoXBt8+FRbwyV0AQF25A6mak30zpDKqUUBxK5AbwbXo1VnCgxUGSRb66U6QGY qyH/QVxYHptL5GQFUyfqkb85dbYwU1NHlTdNHHVyuU9nvqJW+hcvIQsFo2JqLyCdsUpMmj xiF3SlD3BmiPSionNp2HY9jmxNOTP+91nCfDkYVB+fYB0P6BIdId/cuF5xhWc98ZTZkcbu kTnQ+nlOGp2cwGbghEYyPfMgs3TM1e1BXl9sNEEnEIvgZx8BkVwfRWIghKSoBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731491130; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o2xr5303R7urHWMwuIPn8IP1SH51L+nQNAqMWLQLvDg=; b=I5UVtUtarB8hidr1Wv7OvbGoxeheIxORtQuyIT2E+aOPug3snJAyxALhr3uGOYvv6g4OlQ kuCPyWJXtlfPNGwLNt12UaxTci6Oeb6B5pfB6X+zLhhU5VYhp7B8hDl9GJAuPj5m5n4mHC 1K9eJn2szH0cGxph1wQgARaRec7G0BQQEqcd6OsIB1E/5lSY7agSTxQuRX+YwB85kGitpK /E2ABQKW/pBn/olpkX5g6Bhwjpa/z5pXfhAOM0EqStXrd40amRGtK9YiXEz9F6MbixIbhh vcH1MwZTBHFLDYEmFbYZqS3sdJ0FfK4IGivcdbxHVBAxgseyXrQz5x1grOQtwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731491130; a=rsa-sha256; cv=none; b=PpvUI4GSD60vnpeqxRAn2PdJyzq9HCs9/9TsyEcarNq27RtzXNc8gunGW/CvzQiMC/0oZh VuPO96npg38DHFtScmqM3A6dR2GFfexzO6ke/nSyq+VcajpH6w7ePaeiSLRYjZzgM/Hb3q tnB3Ows73nxLiBvNYVN4oOvteLvcKuqF8Dg+tzATmVX/0vJrvME0MPhlUKhi4MWOgM0AUV COMvVmVRRvwWxwMs7bsxqfHuJU/lwgrsB8Htw/zVJH/uFS4qc2ljn4ZRhVhii0uOHFCSvB v7cEqRWZp2Lt+B5yAXxQ2Y9LkZlKtgl7uaxRrvXNidvHuOlcmKpNOH5P3QkpFw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XpJLL5DTvzpmw; Wed, 13 Nov 2024 09:45:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AD9jUjh053406; Wed, 13 Nov 2024 09:45:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AD9jUqv053405; Wed, 13 Nov 2024 09:45:30 GMT (envelope-from git) Date: Wed, 13 Nov 2024 09:45:30 GMT Message-Id: <202411130945.4AD9jUqv053405@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Martin Matuska Subject: git: b2f6de7b58f8..1c9a4c8cb44d - vendor/openzfs/master - 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 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/vendor/openzfs/master X-Git-Reftype: branch X-Git-Commit: 1c9a4c8cb44d5f865c29e3df3f019872329554b3 X-Git-Oldrev: b2f6de7b58f81a4894ba26d87865a15e6115a1c2 X-Git-Newrev: 1c9a4c8cb44d5f865c29e3df3f019872329554b3 Auto-Submitted: auto-generated The branch vendor/openzfs/master has been updated by mm: URL: https://cgit.FreeBSD.org/src/log/?id=b2f6de7b58f8..1c9a4c8cb44d 21cba06befe9 config: fix dequeue_signal check for kernels <4.20 96f382d1132c spl/thread: explicitly define thread_func_t as noreturn 152ae5c9bc2b ZTS: Add additional exceptions aefc2da8a594 Workaround issue of Linux vdev_disk.c, (#16678) 2e4e0928220f Fix dependency install on Debian 11 (#16683) 94a03dd1e49a Pack dmu_buf_impl_t by 16 bytes e5d1f6816758 ZTS: Add LUKS sanity test c480e06d88e0 Fix gcc unused value warning in FreeBSD simd.h 2bf152021107 Fix gcc uninitialized warning in FreeBSD zio_crypt.c 6187b194349c On the first vdev open ignore impossible ashift hints ae93aeb84941 Add warning for external consumers of dmu_tx_callback_register 63bafe60ec74 vdev_disk: try harder to ensure IO alignment rules e7425ae6248d vdev_disk: move abd return and free off the interrupt handler 3c650bec152e Revert "Workaround issue of Linux vdev_disk.c, (#16678)" acb6e71eda3c Added output to `zpool online` and `offline` 673efbbf5d16 zdb: add extra -T flag to show histograms of BRT refcounts db2354534db8 ZTS: Add Fedora 41, remove Fedora 39 1c7d4b4c943b module: unicode: remove unused uconv.c 91bd12dfeb9a zfs(4): remove "experimental" from zfs_bclone_enabled b16e096198ba Reduce dirty records memory usage c8aed9f97329 Verify parent_dev before calling udev_device_get_sysattr_value 5a2333b10fd2 CI: Automate some GitHub PR status labels manipulations 5e726779f55d module: unicode: u8_textprep_data.h tables: 2 => U8_UNICODE_LATEST+1 e17a9698faf9 module: unicode: #ifdef out unused U8_UNICODE_320 60c202cca47f module: unicode: remove unused tolower transformations f38e2d239fe3 Revert "Avoid BUG in migrate_folio_extra" 7b6e9675daef Use simple folio migration function 5945676bcc5d ZFS send should use spill block prefetched from send_reader_thread 187f93137265 Update ABD stats for linear page Linux 4a7a0a029011 Use instead of 57fc5971f6be JSON: fix user properties output for zfs list 3a0a142f1c41 JSON: fix user properties output for zpool list 1c9a4c8cb44d Fix user properties output for zpool list From nobody Wed Nov 13 10:29:02 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpKJZ3hxPz5dS1L; Wed, 13 Nov 2024 10:29: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XpKJZ34dwz4SDf; Wed, 13 Nov 2024 10:29:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731493742; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3pGt47nsrC4ZvfuN++5pgS3n1x3pKe4rLCqjx+k1R1s=; b=ZpZn95BZ5j1XN6wTm9bmHe69UUeLqpzt2MmsKcyyQDQabQpBHdGKAOme0DvLE8RMduqF8E 599JPkoKZJPrCBLSTTD9UYnJz9nqXYpez395zlC/GW1TUT0aecZaogDuFQ7BxF4GzCztDI mB9BFpyxpFWDzVpCYg7dbXzPr+JZOJ5h2e6i/U5MVuJyKgLf8b4Iu6AMXejnT5p/x3/pxQ nx5/4k+abrFfaaj3wqP06CxqBfz6QFGHdFHHMYKBAneNF2KaDTyMhBRBKFuZy93pwolrhL PgjoFijnJPPihrmH0jbmb3APJjB6/N+77PD8WqKa9zoooROWeslJ5yM1rGqG0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731493742; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3pGt47nsrC4ZvfuN++5pgS3n1x3pKe4rLCqjx+k1R1s=; b=BFQcpUCyrJkJLcMHXvAB+ylSmc5w4cfE84VlK15w1gZexI6Z8D2lHF51c2FJa/4BlFM5yD K0mmpGtZCZb3U5kMk+XK5TwvYSce0K0tMHNew9MMiyNVsI8pDx8prOvQpoFNV6RJcbg4Kb aeIN0f5jGez6iyy2dIF9izUPyLDh9HdTfu7k+KrfyYFy0ywMV9avtLbXrcnNeOtslr+v/N s+T72fBmeXL5XT9nmjWLCRZAl3dSdIXQqumkeKDifKpIiI443d0N8LgrHjcSR4xrcOsZVr cXR6e1RWJkE7KtwZIYyFDoiqentCTZFae8kqB25KemOoRPQJL4DyYJLt0BeJng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731493742; a=rsa-sha256; cv=none; b=ZFklxL33vt1ZuqFrHuXfo/xw/XhiVzXHbgXgShHhxGg+DRZvwx4aEtK5oMf0eVx9RnpNqV 2Tw+hf0KDrXR7NW9I6lAcj3zNKhyhEAV+HZHDuMb0gTLLl8SY8qIaNczysP73C9aR6X5wj KN0Ig+54z3Tit9bmV6Bo1FZ7yG1qkFbcYHEhJOgzJ8MmzuqaKIFLYvAgsDjnxBLWuFDSPy XKCYhqVkFOCSwpMapOpMNK+4T8vXb3zxmiP6s0VqDqOFw6ZC56WtnqTrAjnHZWKZgeP3J+ aqVXfLp5f/jFvabVtfU79NwCD1D+GQAp1l0GHMlV+fsHkeIXE+X2lZyGLDT72A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XpKJZ2gnGzqd8; Wed, 13 Nov 2024 10:29:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ADAT2sL029747; Wed, 13 Nov 2024 10:29:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ADAT2E8029744; Wed, 13 Nov 2024 10:29:02 GMT (envelope-from git) Date: Wed, 13 Nov 2024 10:29:02 GMT Message-Id: <202411131029.4ADAT2E8029744@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Edward Tomasz Napierala Subject: git: fc595a6b7664 - main - Fix "vrefact: wrong use count 0" with DRM List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: trasz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fc595a6b76642dfdfdb8e6f9b9bbc734e95fb59c Auto-Submitted: auto-generated The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=fc595a6b76642dfdfdb8e6f9b9bbc734e95fb59c commit fc595a6b76642dfdfdb8e6f9b9bbc734e95fb59c Author: Edward Tomasz Napierala AuthorDate: 2024-11-13 10:00:38 +0000 Commit: Edward Tomasz Napierala CommitDate: 2024-11-13 10:25:57 +0000 Fix "vrefact: wrong use count 0" with DRM Bump the vnode use count, not its hold count. This fixes a panic triggered by fstatat(..., AT_EMPTY_PATH) on DRM device nodes, which happens to be what glxinfo(1) from Ubuntu Jammy is doing. PR: kern/274538 Reviewed By: kib (earlier version), olce Differential Revision: https://reviews.freebsd.org/D47391 --- sys/compat/linuxkpi/common/src/linux_compat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c index 81d24603d1dd..8f705cd3b2ce 100644 --- a/sys/compat/linuxkpi/common/src/linux_compat.c +++ b/sys/compat/linuxkpi/common/src/linux_compat.c @@ -772,7 +772,7 @@ linux_dev_fdopen(struct cdev *dev, int fflags, struct thread *td, } /* hold on to the vnode - used for fstat() */ - vhold(filp->f_vnode); + vref(filp->f_vnode); /* release the file from devfs */ finit(file, filp->f_mode, DTYPE_DEV, filp, &linuxfileops); @@ -1504,7 +1504,7 @@ linux_file_close(struct file *file, struct thread *td) error = -OPW(file, td, release(filp->f_vnode, filp)); funsetown(&filp->f_sigio); if (filp->f_vnode != NULL) - vdrop(filp->f_vnode); + vrele(filp->f_vnode); linux_drop_fop(ldev); ldev = filp->f_cdev; if (ldev != NULL) From nobody Wed Nov 13 10:34:31 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpKQv4NKxz5dSlj; Wed, 13 Nov 2024 10:34:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XpKQv3vmtz4T9N; Wed, 13 Nov 2024 10:34:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731494071; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7xxRQk6y7zNtsBZq29QJ6oQP9V/H92qSUubQWG0p3pY=; b=v5kXOJQrRDy5I7kikMvEzlLpMi8uk44ixotMS8hQG+XxWrKGaQQyby2G010v9M/86GH1Xa 34vF4G7/7uDl8FSOPo9TVp++CRznSIJhUdUkj7RLWU97NvRw3W33GZ4BSkvK+7Cx+GRQcX CkhK0M/ctWfaIh9G4/P5LmezUxCaH8UtZGyOW/dIh1Ebw2bXg0BgE5kHWTeCcXpm5a2ZtF TNEqdkNTJF/wxlVi0ce8l2n+uLHXPiA6PuDKI0SrkaGp6q3/WS2Q8yVtSH3/AyL9ofYaSR G1Ir3u4lUyMkYPbxRhpnY+BFoupcI3Iwl0QYoZTjmcb/zwGpQO7sCmYjbIXUEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731494071; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7xxRQk6y7zNtsBZq29QJ6oQP9V/H92qSUubQWG0p3pY=; b=uJJpeMnOlvmNlo6V3CWnt144a8m0YAYUXajG9nansEC6eNVsvynoQpN6C3Rk8uUpip/mxd rS9d/m134Hf5O+2V6xj971kSjthgGKbDoDWiIZB+pSL91hSpH/MmIE1Aoh0ZxgsWDm5cqW GSVBFkwXZ3BbeQMOpex/n2EXuW2/PmEsEBvwt66t7x7j+I3eNLJNX7WXUnqwCEum1Za+fg 9+lYGEscCA5PkLzvf6LuTWrfdmxD/u6kJEXH/jJUXFBvgmeZGDyn/pCCfXQpyK3kqOG3Gj weyCLpNVO4LCCcHmitBdW47+oJFUh/XGP6eaK9KA3EDnmEhtSs5llTcdrS0VGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731494071; a=rsa-sha256; cv=none; b=Xdd8LfeRRsVgnyoZ+x2N2S69MCpufvTUq2VBjlr46jerA57DrSq6G5cXDHA0rdk8iYneOR o2zkeLU28LBtTrg+QxztdG/b10WSLxPpC3nAe1gy5BgfzFMMeUd1Ib/mTsS1/az86cKODE LKgosLRAKUBj5zjfTLaRlZjkI3czvZBTgiukmMyr37wrreJsnvTD2Zbg3gaRfeyzt5tJwp H1MoFQWCqUSe1EAocR2jiIbqHU5tduT2FAdQjS5BrfdUwcVUQR1o0/PLpwX0H2dTJQTc6/ TXC3WpoyMFyHXax8gkMI35+jWa7TlbdRF1zsIZEI/MammFcIjtzm69EKMgxEHw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XpKQv3WX7zqg1; Wed, 13 Nov 2024 10:34:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ADAYVTg046430; Wed, 13 Nov 2024 10:34:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ADAYVqL046427; Wed, 13 Nov 2024 10:34:31 GMT (envelope-from git) Date: Wed, 13 Nov 2024 10:34:31 GMT Message-Id: <202411131034.4ADAYVqL046427@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 371bd29d4b22 - main - pf: fix potential state key 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 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 371bd29d4b22257a7e92e1e711cca3d94cfbd00d Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=371bd29d4b22257a7e92e1e711cca3d94cfbd00d commit 371bd29d4b22257a7e92e1e711cca3d94cfbd00d Author: Kristof Provost AuthorDate: 2024-11-09 09:53:37 +0000 Commit: Kristof Provost CommitDate: 2024-11-13 09:34:08 +0000 pf: fix potential state key leak If we fail to attach the new state keys in pf_state_key_attach() we are expected to free both keys. Do so. Note that in some scenarios both key are the same, so check for that before freeing. MFC after: 2 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D47495 --- sys/netpfil/pf/pf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 90ec2b1ed033..691cb697a659 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -1433,7 +1433,9 @@ keyattach: s->timeout = PFTM_UNLINKED; PF_HASHROW_UNLOCK(ih); KEYS_UNLOCK(); - uma_zfree(V_pf_state_key_z, sk); + uma_zfree(V_pf_state_key_z, skw); + if (skw != sks) + uma_zfree(V_pf_state_key_z, sks); if (idx == PF_SK_STACK) pf_detach_state(s); return (EEXIST); /* collision! */ From nobody Wed Nov 13 10:34:32 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpKQw5fl7z5dSvC; Wed, 13 Nov 2024 10:34:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XpKQw4wGDz4TCs; Wed, 13 Nov 2024 10:34:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731494072; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PSw6PWxfGkiHM5cntJq9zy8PZ+hhjAyZN8viyNIvxDU=; b=MZDvnKtdG7AjZ1uGNeKLRAk65GbWvVzhXpcJbPvGrZoprbDsG3dt986TpOKxx2RgNBRbjC Iyv17xBaiNbRsmmEOO0n/pU650W7r0A/QNmdYGZoLSN4myyeEaW94aQGaayhvOwtGuBv73 R0L7wHQcO/+DifiPLSKT5xQdPIbGdPWoAkZZ45akvjP7GWzGXdkxv72NIsXoCSvAFhZM08 K8uRPawd5e78Rqdbnqg/J37l5EqISvBZXT7YBnVEH3+htr60MnEK1KTcmr2DkuJlECrpwN SbphaRfKdz9PE1mTt6UJVC7g/7TdqdSp7YF7d4jYtCBRykSaoH5YJ716Ysiwag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731494072; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PSw6PWxfGkiHM5cntJq9zy8PZ+hhjAyZN8viyNIvxDU=; b=OtAm5jH5gvV6jXxMu97AT5NVnOu7+qOeRKROR/eeWfjVT22q1wPwlXL5UgtaxMuyRs28+T DgplDSLxfmbBO7emzMpBeorYoFGW+sPbQm1vs8qy6LwP1aktLZzPeuOsYev5enWGquJYhM k1sz1+pS3TZ3K9GMMl+GAhEzMn8WDRZVRd2BsgFLWwP9QrV/vAEsvbA5TETAfim8WzLqTd Zl5PECe/5fHyJIdaElY4UGHkT21f1/rqEllFwH6Z3kxjkMNrXfJVTxWvZgnIDg6ZtAT3WM ON6KM09IT5J6WUSM3S0uHZaN9PMlxaKBiqZoA6+6qWH/hT5YlDOMDLNHJn5o3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731494072; a=rsa-sha256; cv=none; b=Emnq6HEtdA5Qb5qX1NzI/xlwQW/SD0C5aFgz+hQglrf5bvY4tDJ27y3d3lUuNfSlQUOavp LcDen1d4sXniE295786FDGm9Zc+uwoEJinj+fnycLaTXsQcsbDvX0S7DaWxTXPHO9OyCf0 tGU+rAeX3L/78v3yDW7tvIgiJoeYwqlMn+jN/mzcn21DeOa2bD1cGvNrUBzE9lZvdOFf+y 2KQozJQL2Uq/9fXCgZeJ/B3fgZNPHAwb/70T6rdlU25WIkTF2zGtgWlJsRZi/1MtGuDvyY yc94YqPnb2v9hFYPOFGEcRqY96vY59C5+l4zWzGMJSUefXKYq6iBa+YXroa5SA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XpKQw4XBWzrWc; Wed, 13 Nov 2024 10:34:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ADAYWhX046478; Wed, 13 Nov 2024 10:34:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ADAYWhO046475; Wed, 13 Nov 2024 10:34:32 GMT (envelope-from git) Date: Wed, 13 Nov 2024 10:34:32 GMT Message-Id: <202411131034.4ADAYWhO046475@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 3b337076ba61 - main - pf: remove stale no_df tests from fragemtation_*.sh List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3b337076ba61ccb7280543ebe3737bc32b7f8a89 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=3b337076ba61ccb7280543ebe3737bc32b7f8a89 commit 3b337076ba61ccb7280543ebe3737bc32b7f8a89 Author: Franco Fichtner AuthorDate: 2024-11-13 07:49:49 +0000 Commit: Kristof Provost CommitDate: 2024-11-13 09:34:08 +0000 pf: remove stale no_df tests from fragemtation_*.sh compat: test case add was previously removed but not the test itself pass: test was added twice Reviewed by: kp Differential Revision: https://reviews.freebsd.org/D47535 --- tests/sys/netpfil/pf/fragmentation_compat.sh | 47 ----------------------- tests/sys/netpfil/pf/fragmentation_pass.sh | 56 +--------------------------- 2 files changed, 1 insertion(+), 102 deletions(-) diff --git a/tests/sys/netpfil/pf/fragmentation_compat.sh b/tests/sys/netpfil/pf/fragmentation_compat.sh index 21ce6b734ea1..e9b89f5ff170 100644 --- a/tests/sys/netpfil/pf/fragmentation_compat.sh +++ b/tests/sys/netpfil/pf/fragmentation_compat.sh @@ -326,53 +326,6 @@ reassemble_cleanup() pft_cleanup } -atf_test_case "no_df" "cleanup" -no_df_head() -{ - atf_set descr 'Test removing of DF flag' - atf_set require.user root -} - -no_df_body() -{ - setup_router_server_ipv4 - - ifconfig ${epair_tester}a mtu 9000 - jexec router ifconfig ${epair_tester}b mtu 9000 - jexec router ifconfig ${epair_server}a mtu 1500 - jexec server ifconfig ${epair_server}b mtu 1500 - - # Sanity check. - ping_server_check_reply exit:0 --ping-type=icmp - - pft_set_rules router \ - "scrub fragment reassemble" \ - "pass out" \ - "block in" \ - "pass in inet proto icmp all icmp-type echoreq" - - # Ping with normal, fragmentable packets. - ping_server_check_reply exit:0 --ping-type=icmp --send-length=2000 - - # Ping with non-fragmentable packets, this will fail. - ping_server_check_reply exit:1 --ping-type=icmp --send-length=2000 --send-flags DF - - pft_set_rules router \ - "scrub any reassemble" \ - "pass out" \ - "block in" \ - "pass in inet proto icmp all icmp-type echoreq" - - # Ping with non-fragmentable packets again. - # This time pf will strip the DF flag. - ping_server_check_reply exit:0 --ping-type=icmp --send-length=2000 --send-flags DF -} - -no_df_cleanup() -{ - pft_cleanup -} - atf_init_test_cases() { atf_add_test_case "too_many_fragments" diff --git a/tests/sys/netpfil/pf/fragmentation_pass.sh b/tests/sys/netpfil/pf/fragmentation_pass.sh index 94a25cc41988..2399eb0374bb 100644 --- a/tests/sys/netpfil/pf/fragmentation_pass.sh +++ b/tests/sys/netpfil/pf/fragmentation_pass.sh @@ -340,61 +340,6 @@ no_df_head() atf_set require.user root } -no_df_body() -{ - setup_router_server_ipv4 - - ifconfig ${epair_tester}a mtu 9000 - jexec router ifconfig ${epair_tester}b mtu 9000 - jexec router ifconfig ${epair_server}a mtu 1500 - jexec server ifconfig ${epair_server}b mtu 1500 - - # Sanity check. - ping_server_check_reply exit:0 --ping-type=icmp - - pft_set_rules router \ - "set reassemble no" \ - "pass out" \ - "block in" \ - "pass in inet proto icmp all icmp-type echoreq" - - # Ping with normal, fragmentable packets. - ping_server_check_reply exit:1 --ping-type=icmp --send-length=2000 - - pft_set_rules router \ - "set reassemble yes" \ - "pass out" \ - "block in" \ - "pass in inet proto icmp all icmp-type echoreq" - - # Ping with normal, fragmentable packets. - ping_server_check_reply exit:0 --ping-type=icmp --send-length=2000 - - # Ping with non-fragmentable packets. - ping_server_check_reply exit:1 --ping-type=icmp --send-length=2000 --send-flags DF - - pft_set_rules router \ - "set reassemble yes no-df" \ - "pass out" \ - "block in" \ - "pass in inet proto icmp all icmp-type echoreq" - - # Ping with non-fragmentable packets again. - # This time pf will strip the DF flag. - ping_server_check_reply exit:0 --ping-type=icmp --send-length=2000 --send-flags DF -} -no_df_cleanup() -{ - pft_cleanup -} - -atf_test_case "no_df" "cleanup" -no_df_head() -{ - atf_set descr 'Test removing of DF flag' - atf_set require.user root -} - no_df_body() { setup_router_server_ipv4 @@ -420,6 +365,7 @@ no_df_body() # getting properly forwarded. ping_server_check_reply exit:0 --ping-type=icmp --send-length=2000 --send-flags DF } + no_df_cleanup() { pft_cleanup From nobody Wed Nov 13 12:49:36 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpNQq5Gcmz5dZm6; Wed, 13 Nov 2024 12:49: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XpNQq4dGRz4fZ6; Wed, 13 Nov 2024 12:49:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731502179; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JcPcbsvYPP2vramZkR3Ong1mWBq7s3GUNItz2/qHh1c=; b=xAnlmh/bGw4WtC5TKN0cNvf47SQxRBYWQ+N8ceLYNhsRmIzvP+g3aAZZULE2VcGR3Fv9xC I71tFfJOBvREq7SODmD0CGLd7yoI7CKCpF4bP4nmiDOBUXAUqL5+vOFd4eqm8d9BtlY0L3 BlALmR9CtmYBWE6esmQctCmj0lc8key27Zp80dnQl9sc+G4vi6//y50P1rbcTMUQHi3JKV RhhflKNvsfnopMRGd3b7lHhRByMLEUQzvqkZjavvSNQdmispKOypJ5thI2201PJ3hd5RGN fAHSqurn38Ght9sVg8vS4l8M0Z3651/CqYx4RXyhIFwdV3zsN379SrjCU8stQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731502179; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JcPcbsvYPP2vramZkR3Ong1mWBq7s3GUNItz2/qHh1c=; b=INuFgkbS/qXdvzMcdzSn6HtevvzasTO8hHU4I4/B3+flZpUSoKpM0qYOam7T4A2KD51O8v AK5UEfQqN5sii1ExPXgYjBPo68NRyr3Dc5eVTkKaA+O81d0PLcLlzN1DalwhuwXWawXuIQ AbkefE4x5gTLR2AU+kY14SP8gWJ/3bn4iLKpG9hIzlJ5h8xqKdGgYfoouIYlNZTuxO7dA/ l/zuDrbe1pII+x4JKsQ1dHwLVFnaaQ96pN9ZvLpEpFtE7aRlW33/8TAt+42shBDDNxM+28 6evQlslQdwF1bB9T61+4pEke7Ogh9ec2CE5tD1dDLpVMFQc0RQxujkM0ceHQxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731502179; a=rsa-sha256; cv=none; b=roZssHGa0Xz0RzPXhchCslpC+L4QQZB8wfVKMyqv3IVYj9NmAgLbHFh8pjKOJsC9GnfOEu 529xC6kyTmjQXjOMsG9uCsUnROWFx+PzX75fyw3eb6UzXWXxQ3AqkJJe6avQXrN3kMwC99 hjCmy8z4pWD9qBuBdHIpgy5S4V78YMyPzIrrVTdBAZ+M9Ly3Wh/bGAdvUZiooUaUhbGhuQ LImUeFv7adMM3MXLztWXXm7CAFfRmLR+KDpPS3k5aCTX5934r81FUOqnPAK6ac+dWSX2AC sV+JlBBAoG4O5f8QOKUQkO11ki5N+0DUQLSnRF7ORVTqSQ/4e+QxXx2Eu4vw0A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XpNQq3pnJzvgy; Wed, 13 Nov 2024 12:49:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ADCndWv089652; Wed, 13 Nov 2024 12:49:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ADCna4j089647; Wed, 13 Nov 2024 12:49:36 GMT (envelope-from git) Date: Wed, 13 Nov 2024 12:49:36 GMT Message-Id: <202411131249.4ADCna4j089647@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Martin Matuska Subject: git: 5c65a0a9163c - main - zfs: merge openzfs/zfs@1c9a4c8cb List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5c65a0a9163cc00389d8527ee12c4e69df07ea42 Auto-Submitted: auto-generated The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=5c65a0a9163cc00389d8527ee12c4e69df07ea42 commit 5c65a0a9163cc00389d8527ee12c4e69df07ea42 Merge: 3b337076ba61 1c9a4c8cb44d Author: Martin Matuska AuthorDate: 2024-11-13 10:40:48 +0000 Commit: Martin Matuska CommitDate: 2024-11-13 12:49:10 +0000 zfs: merge openzfs/zfs@1c9a4c8cb Notable upstream pull request merges: #16244 acb6e71ed Added output to `zpool online` and `offline` #16684 94a03dd1e Pack dmu_buf_impl_t by 16 bytes #16690 6187b1943 On the first vdev open ignore impossible ashift hints #16692 673efbbf5 zdb: add extra -T flag to show histograms of BRT refcounts #16693 2bf152021 Fix gcc uninitialized warning in FreeBSD zio_crypt.c #16694 b16e09619 Reduce dirty records memory usage #16701 5945676bc ZFS send should use spill block prefetched from send_reader_thread #16734 1c9a4c8cb Fix user properties output for zpool list Obtained from: OpenZFS OpenZFS commit: 1c9a4c8cb44d5f865c29e3df3f019872329554b3 cddl/lib/libzpool/Makefile | 2 +- sys/conf/files | 1 - sys/contrib/openzfs/.github/workflows/labels.yml | 49 ++ .../.github/workflows/scripts/qemu-2-start.sh | 12 +- .../.github/workflows/scripts/qemu-3-deps.sh | 44 +- .../.github/workflows/scripts/qemu-4-build.sh | 2 +- sys/contrib/openzfs/.github/workflows/zfs-qemu.yml | 6 +- sys/contrib/openzfs/cmd/zdb/zdb.c | 29 +- sys/contrib/openzfs/cmd/zed/zed_disk_event.c | 3 +- sys/contrib/openzfs/cmd/zfs/zfs_main.c | 7 +- sys/contrib/openzfs/cmd/zpool/zpool_main.c | 25 +- sys/contrib/openzfs/config/kernel-kthread.m4 | 37 +- .../openzfs/config/kernel-vfs-invalidate_folio.m4 | 33 - .../openzfs/config/kernel-vfs-migrate_folio.m4 | 27 + .../openzfs/config/kernel-vfs-release_folio.m4 | 32 - sys/contrib/openzfs/config/kernel.m4 | 6 +- .../openzfs/include/os/linux/spl/sys/thread.h | 2 +- sys/contrib/openzfs/include/sys/dbuf.h | 79 +- sys/contrib/openzfs/include/sys/u8_textprep.h | 30 +- sys/contrib/openzfs/include/sys/u8_textprep_data.h | 102 ++- sys/contrib/openzfs/lib/libunicode/Makefile.am | 3 +- sys/contrib/openzfs/lib/libzfs/libzfs_pool.c | 8 +- sys/contrib/openzfs/man/man4/zfs.4 | 7 +- sys/contrib/openzfs/man/man8/zdb.8 | 4 +- sys/contrib/openzfs/module/Kbuild.in | 3 +- sys/contrib/openzfs/module/Makefile.bsd | 3 +- .../openzfs/module/os/linux/spl/spl-thread.c | 6 +- sys/contrib/openzfs/module/os/linux/zfs/abd_os.c | 2 + .../openzfs/module/os/linux/zfs/vdev_disk.c | 154 ++-- .../openzfs/module/os/linux/zfs/vdev_file.c | 4 +- .../openzfs/module/os/linux/zfs/zfs_vnops_os.c | 17 - .../openzfs/module/os/linux/zfs/zfs_znode_os.c | 8 - sys/contrib/openzfs/module/os/linux/zfs/zpl_file.c | 48 +- sys/contrib/openzfs/module/unicode/u8_textprep.c | 37 +- sys/contrib/openzfs/module/unicode/uconv.c | 859 --------------------- sys/contrib/openzfs/module/zfs/dbuf.c | 21 +- sys/contrib/openzfs/module/zfs/dmu.c | 9 +- sys/contrib/openzfs/module/zfs/dmu_direct.c | 1 + sys/contrib/openzfs/module/zfs/dmu_send.c | 126 +-- sys/contrib/openzfs/module/zfs/dmu_tx.c | 7 + sys/contrib/openzfs/module/zfs/dnode_sync.c | 2 +- sys/contrib/openzfs/module/zfs/vdev.c | 5 +- sys/contrib/openzfs/module/zfs/zfs_vnops.c | 6 +- sys/contrib/openzfs/tests/runfiles/linux.run | 6 + .../openzfs/tests/test-runner/bin/zts-report.py.in | 4 +- .../openzfs/tests/zfs-tests/cmd/getversion.c | 2 +- .../openzfs/tests/zfs-tests/include/commands.cfg | 1 + .../openzfs/tests/zfs-tests/tests/Makefile.am | 3 +- .../cli_root/zpool_add/zpool_add_dryrun_output.ksh | 6 +- .../zpool_create/zpool_create_dryrun_output.ksh | 4 +- .../zpool_split/zpool_split_dryrun_output.ksh | 6 +- .../tests/functional/luks/luks_sanity.ksh | 90 +++ .../tests/functional/vdev_disk/page_alignment.c | 264 ++++--- sys/modules/zfs/Makefile | 3 +- sys/modules/zfs/zfs_config.h | 20 +- sys/modules/zfs/zfs_gitrev.h | 2 +- 56 files changed, 855 insertions(+), 1424 deletions(-) diff --cc cddl/lib/libzpool/Makefile index a73c9754ebbb,000000000000..5a69843d6c8e mode 100644,000000..100644 --- a/cddl/lib/libzpool/Makefile +++ b/cddl/lib/libzpool/Makefile @@@ -1,342 -1,0 +1,342 @@@ +ZFSTOP= ${SRCTOP}/sys/contrib/openzfs + +.PATH: ${ZFSTOP}/lib/libzpool + +# ZFS_COMMON_SRCS +.PATH: ${ZFSTOP}/module/zfs +.PATH: ${ZFSTOP}/module/zcommon +.PATH: ${ZFSTOP}/module/unicode +# LUA_SRCS +.PATH: ${ZFSTOP}/module/lua +# ZSTD_SRCS +.PATH: ${ZFSTOP}/module/zstd +.PATH: ${ZFSTOP}/module/zstd/lib/common +.PATH: ${ZFSTOP}/module/zstd/lib/compress +.PATH: ${ZFSTOP}/module/zstd/lib/decompress + +.if exists(${SRCTOP}/sys/cddl/contrib/opensolaris/common/atomic/${MACHINE_ARCH}/opensolaris_atomic.S) +.PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/common/atomic/${MACHINE_ARCH} +ATOMIC_SRCS= opensolaris_atomic.S +ACFLAGS+= -Wa,--noexecstack +.else +.PATH: ${SRCTOP}/sys/cddl/compat/opensolaris/kern +ATOMIC_SRCS= opensolaris_atomic.c +.endif + +.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpcspe" +# Don't waste GOT entries on small data. +PICFLAG= -fPIC +.endif + +PACKAGE= zfs +LIB= zpool + +USER_C = \ + arc_os.c \ + kernel.c \ + taskq.c \ + util.c \ + zfs_debug.c + +.PATH: ${ZFSTOP}/module/os/linux/zfs + +KERNEL_C = \ + simd_stat.c \ + zfeature_common.c \ + zfs_comutil.c \ + zfs_deleg.c \ + zfs_fletcher.c \ + zfs_fletcher_superscalar.c \ + zfs_fletcher_superscalar4.c \ + zfs_namecheck.c \ + zfs_prop.c \ + zfs_zstd.c \ + zpool_prop.c \ + zprop_common.c \ + abd.c \ + abd_os.c \ + aggsum.c \ + arc.c \ + blake3_zfs.c \ + blkptr.c \ + bplist.c \ + bpobj.c \ + bptree.c \ + bqueue.c \ + btree.c \ + brt.c \ + cityhash.c \ + dbuf.c \ + dbuf_stats.c \ + ddt.c \ + ddt_log.c \ + ddt_stats.c \ + ddt_zap.c \ + dmu.c \ + dmu_diff.c \ + dmu_direct.c \ + dmu_object.c \ + dmu_objset.c \ + dmu_recv.c \ + dmu_redact.c \ + dmu_send.c \ + dmu_traverse.c \ + dmu_tx.c \ + dmu_zfetch.c \ + dnode.c \ + dnode_sync.c \ + dsl_bookmark.c \ + dsl_dataset.c \ + dsl_deadlist.c \ + dsl_deleg.c \ + dsl_dir.c \ + dsl_crypt.c \ + dsl_pool.c \ + dsl_prop.c \ + dsl_scan.c \ + dsl_synctask.c \ + dsl_destroy.c \ + dsl_userhold.c \ + edonr_zfs.c \ + entropy_common.c \ + error_private.c \ + fm.c \ + fse_compress.c \ + fse_decompress.c \ + gzip.c \ + hist.c \ + hkdf.c \ + huf_compress.c \ + huf_decompress.c \ + lzjb.c \ + lz4.c \ + lz4_zfs.c \ + metaslab.c \ + mmp.c \ + multilist.c \ + objlist.c \ + pathname.c \ + pool.c \ + range_tree.c \ + refcount.c \ + rrwlock.c \ + sa.c \ + sha2_zfs.c \ + skein_zfs.c \ + spa.c \ + spa_checkpoint.c \ + spa_config.c \ + spa_errlog.c \ + spa_history.c \ + spa_log_spacemap.c \ + spa_misc.c \ + spa_stats.c \ + space_map.c \ + space_reftree.c \ + txg.c \ + trace.c \ + uberblock.c \ + unique.c \ + vdev.c \ + vdev_draid.c \ + vdev_draid_rand.c \ + vdev_file.c \ + vdev_indirect_births.c \ + vdev_indirect.c \ + vdev_indirect_mapping.c \ + vdev_initialize.c \ + vdev_label.c \ + vdev_label_os.c \ + vdev_mirror.c \ + vdev_missing.c \ + vdev_queue.c \ + vdev_raidz.c \ + vdev_raidz_math_aarch64_neon.c \ + vdev_raidz_math_aarch64_neonx2.c \ + vdev_raidz_math_avx2.c \ + vdev_raidz_math_avx512bw.c \ + vdev_raidz_math_avx512f.c \ + vdev_raidz_math.c \ + vdev_raidz_math_scalar.c \ + vdev_rebuild.c \ + vdev_removal.c \ + vdev_root.c \ + vdev_trim.c \ + xxhash.c \ + zap.c \ + zap_leaf.c \ + zap_micro.c \ + zcp.c \ + zcp_get.c \ + zcp_global.c \ + zcp_iter.c \ + zcp_set.c \ + zcp_synctask.c \ + zfeature.c \ + zfs_byteswap.c \ + zfs_chksum.c \ + zfs_fm.c \ + zfs_fuid.c \ + zfs_sa.c \ + zfs_znode.c \ + zfs_racct.c \ + zfs_ratelimit.c \ + zfs_rlock.c \ + zil.c \ + zio.c \ + zio_checksum.c \ + zio_compress.c \ + zio_crypt.c \ + zio_inject.c \ + zle.c \ + zrlock.c \ + zstd_common.c \ + zstd_compress.c \ + zstd_compress_literals.c \ + zstd_compress_sequences.c \ + zstd_compress_superblock.c \ + zstd_ddict.c \ + zstd_decompress.c \ + zstd_decompress_block.c \ + zstd_double_fast.c \ + zstd_fast.c \ + zstd_lazy.c \ + zstd_ldm.c \ + zstd_opt.c \ + zthr.c + +ARCH_C = +.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" +ARCH_C += vdev_raidz_math_sse2.c \ + vdev_raidz_math_ssse3.c \ + zfs_fletcher_intel.c \ + zfs_fletcher_sse.c +CFLAGS += -DHAVE_SSE2 -DHAVE_SSE3 +.endif +.if ${MACHINE_ARCH} == "amd64" +ARCH_C += zfs_fletcher_avx512.c +CFLAGS+= -DHAVE_AVX2 -DHAVE_AVX -D__x86_64 -DHAVE_AVX512F \ + -DHAVE_AVX512BW +.endif +.if ${MACHINE_CPUARCH} == "aarch64" +ARCH_C += zfs_fletcher_aarch64_neon.c +.endif + +LUA_C = \ + lapi.c \ + lauxlib.c \ + lbaselib.c \ + lcode.c \ + lcompat.c \ + lcorolib.c \ + lctype.c \ + ldebug.c \ + ldo.c \ + lfunc.c \ + lgc.c \ + llex.c \ + lmem.c \ + lobject.c \ + lopcodes.c \ + lparser.c \ + lstate.c \ + lstring.c \ + lstrlib.c \ + ltable.c \ + ltablib.c \ + ltm.c \ + lvm.c \ + lzio.c + - UNICODE_C = u8_textprep.c uconv.c ++UNICODE_C = u8_textprep.c + +SRCS+= ${USER_C} ${KERNEL_C} ${LUA_C} ${UNICODE_C} ${ARCH_C} + + +WARNS?= 2 +CFLAGS+= \ + -DIN_BASE \ + -I${ZFSTOP}/include \ + -I${ZFSTOP}/lib/libspl/include \ + -I${ZFSTOP}/lib/libspl/include/os/freebsd \ + -I${SRCTOP}/sys/contrib/openzfs/lib/libzpool/include \ + -I${SRCTOP}/sys \ + -I${ZFSTOP}/include/os/freebsd/zfs \ + -I${SRCTOP}/cddl/compat/opensolaris/include \ + -I${ZFSTOP}/module/icp/include \ + -I${SRCTOP}/compat/linuxkpi/common/include/linux \ + -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h \ + -DHAVE_ISSETUGID \ + -include ${SRCTOP}/sys/modules/zfs/zfs_config.h \ + -I${SRCTOP}/sys/modules/zfs \ + -I${ZFSTOP}/include/os/freebsd/zfs \ + -DLIB_ZPOOL_BUILD -DZFS_DEBUG \ + +# XXX: pthread doesn't have mutex_owned() equivalent, so we need to look +# into libthr private structures. That's sooo evil, but it's only for +# ZFS debugging tools needs. +CFLAGS+= -DWANTS_MUTEX_OWNED +CFLAGS+= -I${SRCTOP}/lib/libpthread/thread +CFLAGS+= -I${SRCTOP}/lib/libpthread/sys +CFLAGS+= -I${SRCTOP}/lib/libthr/arch/${MACHINE_CPUARCH}/include +CFLAGS.gcc+= -fms-extensions + +LIBADD= md pthread z spl icp nvpair avl umem + +CSTD= c99 + +# Since there are many asserts in this library, it makes no sense to compile +# it without debugging. + +CFLAGS+= -g -DDEBUG=1 + +CFLAGS.gcc+= -Wno-pointer-to-int-cast + +# Pointer values are used as debugging "tags" to mark reference count +# ownerships and in some cases the tag reference is dropped after an +# object is freed. +CFLAGS.dbuf.c= ${NO_WUSE_AFTER_FREE} +CFLAGS.entropy_common.c= -fno-tree-vectorize +CFLAGS.entropy_common.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL} +CFLAGS.error_private.c= -fno-tree-vectorize +CFLAGS.error_private.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL} +CFLAGS.fse_compress.c= -fno-tree-vectorize +CFLAGS.fse_compress.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL} +CFLAGS.fse_decompress.c= -fno-tree-vectorize +CFLAGS.fse_decompress.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL} +CFLAGS.hist.c= -fno-tree-vectorize +CFLAGS.hist.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL} +CFLAGS.huf_compress.c= -fno-tree-vectorize +CFLAGS.huf_compress.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL} +CFLAGS.huf_decompress.c= -fno-tree-vectorize +CFLAGS.huf_decompress.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL} +CFLAGS.pool.c= -fno-tree-vectorize +CFLAGS.pool.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL} +CFLAGS.xxhash.c= -fno-tree-vectorize +CFLAGS.xxhash.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL} +CFLAGS.zstd_compress.c= -fno-tree-vectorize +CFLAGS.zstd_compress.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL} +CFLAGS.zstd_compress_literals.c= -fno-tree-vectorize +CFLAGS.zstd_compress_literals.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL} +CFLAGS.zstd_compress_sequences.c= -fno-tree-vectorize +CFLAGS.zstd_compress_sequences.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL} +CFLAGS.zstd_compress_superblock.c= -fno-tree-vectorize +CFLAGS.zstd_compress_superblock.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL} +CFLAGS.zstd_double_fast.c= -fno-tree-vectorize +CFLAGS.zstd_double_fast.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL} +CFLAGS.zstd_fast.c= -fno-tree-vectorize +CFLAGS.zstd_fast.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL} +CFLAGS.zstd_lazy.c= -fno-tree-vectorize +CFLAGS.zstd_lazy.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL} +CFLAGS.zstd_ldm.c= -fno-tree-vectorize +CFLAGS.zstd_ldm.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL} +CFLAGS.zstd_opt.c= -fno-tree-vectorize +CFLAGS.zstd_opt.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL} +CFLAGS.zstd_ddict.c= -fno-tree-vectorize +CFLAGS.zstd_ddict.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL} +CFLAGS.zstd_decompress.c= -fno-tree-vectorize +CFLAGS.zstd_decompress.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL} +CFLAGS.zstd_decompress_block.c= -fno-tree-vectorize +CFLAGS.zstd_decompress_block.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL} + +.include diff --cc sys/conf/files index 7818104b8d50,000000000000..9b50c4e08274 mode 100644,000000..100644 --- a/sys/conf/files +++ b/sys/conf/files @@@ -1,5311 -1,0 +1,5310 @@@ +# +# The long compile-with and dependency lines are required because of +# limitations in config: backslash-newline doesn't work in strings, and +# dependency lines other than the first are silently ignored. +# +acpi_quirks.h optional acpi \ + dependency "$S/tools/acpi_quirks2h.awk $S/dev/acpica/acpi_quirks" \ + compile-with "${AWK} -f $S/tools/acpi_quirks2h.awk $S/dev/acpica/acpi_quirks" \ + no-obj no-implicit-rule before-depend \ + clean "acpi_quirks.h" +bhnd_nvram_map.h optional bhnd \ + dependency "$S/dev/bhnd/tools/nvram_map_gen.sh $S/dev/bhnd/tools/nvram_map_gen.awk $S/dev/bhnd/nvram/nvram_map" \ + compile-with "sh $S/dev/bhnd/tools/nvram_map_gen.sh $S/dev/bhnd/nvram/nvram_map -h" \ + no-obj no-implicit-rule before-depend \ + clean "bhnd_nvram_map.h" +bhnd_nvram_map_data.h optional bhnd \ + dependency "$S/dev/bhnd/tools/nvram_map_gen.sh $S/dev/bhnd/tools/nvram_map_gen.awk $S/dev/bhnd/nvram/nvram_map" \ + compile-with "sh $S/dev/bhnd/tools/nvram_map_gen.sh $S/dev/bhnd/nvram/nvram_map -d" \ + no-obj no-implicit-rule before-depend \ + clean "bhnd_nvram_map_data.h" +fdt_static_dtb.h optional fdt fdt_dtb_static \ + compile-with "sh -c 'MACHINE=${MACHINE} $S/tools/fdt/make_dtbh.sh ${FDT_DTS_FILE} ${.OBJDIR}'" \ + dependency "${FDT_DTS_FILE:T:R}.dtb" \ + no-obj no-implicit-rule before-depend \ + clean "fdt_static_dtb.h" +feeder_eq_gen.h optional sound \ + dependency "$S/tools/sound/feeder_eq_mkfilter.awk" \ + compile-with "${AWK} -f $S/tools/sound/feeder_eq_mkfilter.awk -- ${FEEDER_EQ_PRESETS} > feeder_eq_gen.h" \ + no-obj no-implicit-rule before-depend \ + clean "feeder_eq_gen.h" +feeder_rate_gen.h optional sound \ + dependency "$S/tools/sound/feeder_rate_mkfilter.awk" \ + compile-with "${AWK} -f $S/tools/sound/feeder_rate_mkfilter.awk -- ${FEEDER_RATE_PRESETS} > feeder_rate_gen.h" \ + no-obj no-implicit-rule before-depend \ + clean "feeder_rate_gen.h" +font.h optional sc_dflt_font \ + compile-with "uudecode < ${SRCTOP}/share/syscons/fonts/${SC_DFLT_FONT}-8x16.fnt && file2c 'u_char dflt_font_16[16*256] = {' '};' < ${SC_DFLT_FONT}-8x16 > font.h && uudecode < ${SRCTOP}/share/syscons/fonts/${SC_DFLT_FONT}-8x14.fnt && file2c 'u_char dflt_font_14[14*256] = {' '};' < ${SC_DFLT_FONT}-8x14 >> font.h && uudecode < ${SRCTOP}/share/syscons/fonts/${SC_DFLT_FONT}-8x8.fnt && file2c 'u_char dflt_font_8[8*256] = {' '};' < ${SC_DFLT_FONT}-8x8 >> font.h" \ + no-obj no-implicit-rule before-depend \ + clean "font.h ${SC_DFLT_FONT}-8x14 ${SC_DFLT_FONT}-8x16 ${SC_DFLT_FONT}-8x8" +snd_fxdiv_gen.h optional sound \ + dependency "$S/tools/sound/snd_fxdiv_gen.awk" \ + compile-with "${AWK} -f $S/tools/sound/snd_fxdiv_gen.awk -- > snd_fxdiv_gen.h" \ + no-obj no-implicit-rule before-depend \ + clean "snd_fxdiv_gen.h" +miidevs.h optional miibus | mii \ + dependency "$S/tools/miidevs2h.awk $S/dev/mii/miidevs" \ + compile-with "${AWK} -f $S/tools/miidevs2h.awk $S/dev/mii/miidevs" \ + no-obj no-implicit-rule before-depend \ + clean "miidevs.h" +kbdmuxmap.h optional kbdmux_dflt_keymap \ + compile-with "${KEYMAP} -L ${KBDMUX_DFLT_KEYMAP} | ${KEYMAP_FIX} > ${.TARGET}" \ + no-obj no-implicit-rule before-depend \ + clean "kbdmuxmap.h" +teken_state.h optional sc | vt \ + dependency "$S/teken/gensequences $S/teken/sequences" \ + compile-with "${AWK} -f $S/teken/gensequences $S/teken/sequences > teken_state.h" \ + no-obj no-implicit-rule before-depend \ + clean "teken_state.h" +ukbdmap.h optional ukbd_dflt_keymap \ + compile-with "${KEYMAP} -L ${UKBD_DFLT_KEYMAP} | ${KEYMAP_FIX} > ${.TARGET}" \ + no-obj no-implicit-rule before-depend \ + clean "ukbdmap.h" +usbdevs.h optional usb | hid \ + dependency "$S/tools/usbdevs2h.awk $S/dev/usb/usbdevs" \ + compile-with "${AWK} -f $S/tools/usbdevs2h.awk $S/dev/usb/usbdevs -h" \ + no-obj no-implicit-rule before-depend \ + clean "usbdevs.h" +usbdevs_data.h optional usb \ + dependency "$S/tools/usbdevs2h.awk $S/dev/usb/usbdevs" \ + compile-with "${AWK} -f $S/tools/usbdevs2h.awk $S/dev/usb/usbdevs -d" \ + no-obj no-implicit-rule before-depend \ + clean "usbdevs_data.h" +sdiodevs.h optional mmccam \ + dependency "$S/tools/sdiodevs2h.awk $S/dev/sdio/sdiodevs" \ + compile-with "${AWK} -f $S/tools/sdiodevs2h.awk $S/dev/sdio/sdiodevs -h" \ + no-obj no-implicit-rule before-depend \ + clean "sdiodevs.h" +sdiodevs_data.h optional mmccam \ + dependency "$S/tools/sdiodevs2h.awk $S/dev/sdio/sdiodevs" \ + compile-with "${AWK} -f $S/tools/sdiodevs2h.awk $S/dev/sdio/sdiodevs -d" \ + no-obj no-implicit-rule before-depend \ + clean "sdiodevs_data.h" +cam/cam.c optional scbus +cam/cam_compat.c optional scbus +cam/cam_iosched.c optional scbus +cam/cam_periph.c optional scbus +cam/cam_queue.c optional scbus +cam/cam_sim.c optional scbus +cam/cam_xpt.c optional scbus +cam/ata/ata_all.c optional scbus +cam/ata/ata_xpt.c optional scbus +cam/ata/ata_pmp.c optional scbus +cam/nvme/nvme_all.c optional scbus +cam/nvme/nvme_da.c optional nda | da +cam/nvme/nvme_xpt.c optional scbus +cam/scsi/scsi_xpt.c optional scbus +cam/scsi/scsi_all.c optional scbus +cam/scsi/scsi_cd.c optional cd +cam/scsi/scsi_ch.c optional ch +cam/ata/ata_da.c optional ada | da +cam/ctl/ctl.c optional ctl +cam/ctl/ctl_backend.c optional ctl +cam/ctl/ctl_backend_block.c optional ctl +cam/ctl/ctl_backend_ramdisk.c optional ctl +cam/ctl/ctl_cmd_table.c optional ctl +cam/ctl/ctl_frontend.c optional ctl +cam/ctl/ctl_frontend_cam_sim.c optional ctl +cam/ctl/ctl_frontend_ioctl.c optional ctl +cam/ctl/ctl_frontend_iscsi.c optional ctl cfiscsi +cam/ctl/ctl_ha.c optional ctl +cam/ctl/ctl_nvme_all.c optional ctl +cam/ctl/ctl_nvme_cmd_table.c optional ctl +cam/ctl/ctl_scsi_all.c optional ctl +cam/ctl/ctl_tpc.c optional ctl +cam/ctl/ctl_tpc_local.c optional ctl +cam/ctl/ctl_error.c optional ctl +cam/ctl/ctl_util.c optional ctl +cam/ctl/scsi_ctl.c optional ctl +cam/mmc/mmc_xpt.c optional scbus mmccam +cam/mmc/mmc_sim.c optional scbus mmccam +cam/mmc/mmc_sim_if.m optional scbus mmccam +cam/mmc/mmc_da.c optional scbus mmccam da +cam/scsi/scsi_da.c optional da +cam/scsi/scsi_pass.c optional pass +cam/scsi/scsi_pt.c optional pt +cam/scsi/scsi_sa.c optional sa +cam/scsi/scsi_enc.c optional ses +cam/scsi/scsi_enc_ses.c optional ses +cam/scsi/scsi_enc_safte.c optional ses +cam/scsi/scsi_sg.c optional sg +cam/scsi/scsi_targ_bh.c optional targbh +cam/scsi/scsi_target.c optional targ +cam/scsi/smp_all.c optional scbus + +# shared between zfs and dtrace +cddl/compat/opensolaris/kern/opensolaris.c optional dtrace compile-with "${CDDL_C}" +cddl/compat/opensolaris/kern/opensolaris_proc.c optional zfs | dtrace compile-with "${CDDL_C}" +contrib/openzfs/module/os/freebsd/spl/spl_misc.c optional zfs | dtrace compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/spl/spl_cmn_err.c optional zfs | dtrace compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/spl/spl_taskq.c optional zfs | dtrace compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/spl/spl_kmem.c optional zfs | dtrace compile-with "${ZFS_C}" + +#zfs solaris portability layer +contrib/openzfs/module/os/freebsd/spl/acl_common.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/spl/callb.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/spl/list.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/spl/spl_acl.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/spl/spl_dtrace.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/spl/spl_kstat.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/spl/spl_policy.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/spl/spl_procfs_list.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/spl/spl_string.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/spl/spl_sunddi.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/spl/spl_sysevent.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/spl/spl_uio.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/spl/spl_vfs.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/spl/spl_vm.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/spl/spl_zlib.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/spl/spl_zone.c optional zfs compile-with "${ZFS_C}" + + + +# zfs specific + +#zfs avl +contrib/openzfs/module/avl/avl.c optional zfs compile-with "${ZFS_C}" + +# zfs lua support +contrib/openzfs/module/lua/lapi.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/lua/lauxlib.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/lua/lbaselib.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/lua/lcode.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/lua/lcompat.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/lua/lcorolib.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/lua/lctype.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/lua/ldebug.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/lua/ldo.c optional zfs compile-with "${ZFS_C} ${NO_WINFINITE_RECURSION}" +contrib/openzfs/module/lua/lfunc.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/lua/lgc.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/lua/llex.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/lua/lmem.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/lua/lobject.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/lua/lopcodes.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/lua/lparser.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/lua/lstate.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/lua/lstring.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/lua/lstrlib.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/lua/ltable.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/lua/ltablib.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/lua/ltm.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/lua/lvm.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/lua/lzio.c optional zfs compile-with "${ZFS_C}" + +# zfs nvpair support +contrib/openzfs/module/nvpair/fnvpair.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/nvpair/nvpair.c optional zfs compile-with "${ZFS_RPC_C} ${NO_WSTRINGOP_OVERREAD}" +contrib/openzfs/module/nvpair/nvpair_alloc_fixed.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/nvpair/nvpair_alloc_spl.c optional zfs compile-with "${ZFS_C}" + +#zfs platform compatibility code +contrib/openzfs/module/os/freebsd/zfs/abd_os.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/zfs/arc_os.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/zfs/crypto_os.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/zfs/dmu_os.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/zfs/event_os.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/zfs/hkdf.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/zfs/kmod_core.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/zfs/spa_os.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/zfs/sysctl_os.c optional zfs compile-with "${ZFS_C} -include $S/modules/zfs/zfs_config.h" +contrib/openzfs/module/os/freebsd/zfs/vdev_file.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/zfs/vdev_label_os.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/zfs/vdev_geom.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/zfs/zfs_acl.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/zfs/zfs_ctldir.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/zfs/zfs_debug.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/zfs/zfs_dir.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/zfs/zfs_file_os.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/zfs/zfs_ioctl_compat.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/zfs/zfs_ioctl_os.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/zfs/zfs_racct.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/zfs/zfs_znode_os.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/zfs/zio_crypt.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/zfs/zvol_os.c optional zfs compile-with "${ZFS_C}" + +#zfs unicode support - contrib/openzfs/module/unicode/uconv.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/unicode/u8_textprep.c optional zfs compile-with "${ZFS_C}" + +#zfs checksums / zcommon +contrib/openzfs/module/zcommon/cityhash.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zcommon/zfeature_common.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zcommon/zfs_comutil.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zcommon/zfs_deleg.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zcommon/zfs_fletcher.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zcommon/zfs_fletcher_superscalar.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zcommon/zfs_fletcher_superscalar4.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zcommon/zfs_namecheck.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zcommon/zfs_prop.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zcommon/zfs_valstr.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zcommon/zpool_prop.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zcommon/zprop_common.c optional zfs compile-with "${ZFS_C}" + +# zfs edon-r hash support +contrib/openzfs/module/icp/algs/edonr/edonr.c optional zfs compile-with "${ZFS_C}" + +# zfs blake3 hash support +contrib/openzfs/module/icp/algs/blake3/blake3.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/icp/algs/blake3/blake3_generic.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/icp/algs/blake3/blake3_impl.c optional zfs compile-with "${ZFS_C}" + +# zfs sha2 hash support +contrib/openzfs/module/icp/algs/sha2/sha2_generic.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/icp/algs/sha2/sha256_impl.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/icp/algs/sha2/sha512_impl.c optional zfs compile-with "${ZFS_C}" + +#zfs core common code +contrib/openzfs/module/zfs/abd.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/aggsum.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/arc.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/blake3_zfs.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/blkptr.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/bplist.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/bpobj.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/bptree.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/brt.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/btree.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/bqueue.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/dbuf.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/dbuf_stats.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/dataset_kstats.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/ddt.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/ddt_log.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/ddt_stats.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/ddt_zap.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/dmu.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/dmu_direct.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/dmu_diff.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/dmu_object.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/dmu_objset.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/dmu_recv.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/dmu_redact.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/dmu_send.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/dmu_traverse.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/dmu_tx.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/dmu_zfetch.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/dnode.c optional zfs compile-with "${ZFS_C} ${NO_WUNUSED_BUT_SET_VARIABLE}" \ + warning "kernel contains CDDL licensed ZFS filesystem" +contrib/openzfs/module/zfs/dnode_sync.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/dsl_bookmark.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/dsl_crypt.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/dsl_dataset.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/dsl_deadlist.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/dsl_deleg.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/dsl_destroy.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/dsl_dir.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/dsl_pool.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/dsl_prop.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/dsl_scan.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/dsl_synctask.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/dsl_userhold.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/edonr_zfs.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/fm.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/gzip.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/lzjb.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/lz4.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/lz4_zfs.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/metaslab.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/mmp.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/multilist.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/objlist.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/pathname.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/range_tree.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/refcount.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/rrwlock.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/sa.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/sha2_zfs.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/skein_zfs.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/spa.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/spa_checkpoint.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/spa_config.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/spa_errlog.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/spa_history.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/spa_log_spacemap.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/spa_misc.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/spa_stats.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/space_map.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/space_reftree.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/txg.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/uberblock.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/unique.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/vdev.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/vdev_draid.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/vdev_draid_rand.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/vdev_indirect.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/vdev_indirect_births.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/vdev_indirect_mapping.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/vdev_initialize.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/vdev_label.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/vdev_mirror.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/vdev_missing.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/vdev_queue.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/vdev_raidz.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/vdev_raidz_math.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/vdev_raidz_math_scalar.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/vdev_rebuild.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/vdev_removal.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/vdev_root.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/vdev_trim.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zap.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zap_leaf.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zap_micro.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zcp.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zcp_get.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zcp_global.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zcp_iter.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zcp_set.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zcp_synctask.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zfeature.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zfs_byteswap.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zfs_chksum.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zfs_fm.c optional zfs compile-with "${ZFS_C} ${NO_WUNUSED_BUT_SET_VARIABLE}" +contrib/openzfs/module/zfs/zfs_fuid.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zfs_impl.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zfs_ioctl.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zfs_log.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zfs_onexit.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zfs_quota.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zfs_ratelimit.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zfs_replay.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zfs_rlock.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zfs_sa.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zfs_vnops.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zfs_znode.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zstd/zfs_zstd.c optional zfs zstdio compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zil.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zio.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zio_checksum.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zio_compress.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zio_inject.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zle.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zrlock.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zthr.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zvol.c optional zfs compile-with "${ZFS_C}" + +# dtrace specific +cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c optional dtrace compile-with "${DTRACE_C}" \ + warning "kernel contains CDDL licensed DTRACE" +cddl/contrib/opensolaris/uts/common/dtrace/dtrace_xoroshiro128_plus.c optional dtrace compile-with "${DTRACE_C}" +cddl/dev/dtmalloc/dtmalloc.c optional dtmalloc | dtraceall compile-with "${CDDL_C}" +cddl/dev/profile/profile.c optional dtrace_profile | dtraceall compile-with "${CDDL_C}" +cddl/dev/sdt/sdt.c optional dtrace_sdt | dtraceall compile-with "${CDDL_C}" +cddl/dev/fbt/fbt.c optional dtrace_fbt | dtraceall compile-with "${FBT_C}" +cddl/dev/systrace/systrace.c optional dtrace_systrace | dtraceall compile-with "${CDDL_C}" +cddl/dev/prototype.c optional dtrace_prototype | dtraceall compile-with "${CDDL_C}" +fs/nfsclient/nfs_clkdtrace.c optional dtnfscl nfscl | dtraceall nfscl compile-with "${CDDL_C}" +compat/freebsd32/freebsd32_abort2.c optional compat_freebsd32 +compat/freebsd32/freebsd32_capability.c optional compat_freebsd32 +compat/freebsd32/freebsd32_ioctl.c optional compat_freebsd32 +compat/freebsd32/freebsd32_misc.c optional compat_freebsd32 +compat/freebsd32/freebsd32_syscalls.c optional compat_freebsd32 +compat/freebsd32/freebsd32_sysent.c optional compat_freebsd32 +contrib/ck/src/ck_array.c standard compile-with "${NORMAL_C} -I$S/contrib/ck/include" +contrib/ck/src/ck_barrier_centralized.c standard compile-with "${NORMAL_C} -I$S/contrib/ck/include" +contrib/ck/src/ck_barrier_combining.c standard compile-with "${NORMAL_C} -I$S/contrib/ck/include" +contrib/ck/src/ck_barrier_dissemination.c standard compile-with "${NORMAL_C} -I$S/contrib/ck/include" +contrib/ck/src/ck_barrier_mcs.c standard compile-with "${NORMAL_C} -I$S/contrib/ck/include" +contrib/ck/src/ck_barrier_tournament.c standard compile-with "${NORMAL_C} -I$S/contrib/ck/include" +contrib/ck/src/ck_epoch.c standard compile-with "${NORMAL_C} -I$S/contrib/ck/include" +contrib/ck/src/ck_hp.c standard compile-with "${NORMAL_C} -I$S/contrib/ck/include" +contrib/ck/src/ck_hs.c standard compile-with "${NORMAL_C} -I$S/contrib/ck/include" +contrib/ck/src/ck_ht.c standard compile-with "${NORMAL_C} -I$S/contrib/ck/include" +contrib/ck/src/ck_rhs.c standard compile-with "${NORMAL_C} -I$S/contrib/ck/include" +contrib/dev/acpica/common/ahids.c optional acpi acpi_debug +contrib/dev/acpica/common/ahuuids.c optional acpi acpi_debug +contrib/dev/acpica/components/debugger/dbcmds.c optional acpi acpi_debug +contrib/dev/acpica/components/debugger/dbconvert.c optional acpi acpi_debug +contrib/dev/acpica/components/debugger/dbdisply.c optional acpi acpi_debug +contrib/dev/acpica/components/debugger/dbexec.c optional acpi acpi_debug +contrib/dev/acpica/components/debugger/dbhistry.c optional acpi acpi_debug +contrib/dev/acpica/components/debugger/dbinput.c optional acpi acpi_debug +contrib/dev/acpica/components/debugger/dbmethod.c optional acpi acpi_debug +contrib/dev/acpica/components/debugger/dbnames.c optional acpi acpi_debug +contrib/dev/acpica/components/debugger/dbobject.c optional acpi acpi_debug +contrib/dev/acpica/components/debugger/dbstats.c optional acpi acpi_debug +contrib/dev/acpica/components/debugger/dbtest.c optional acpi acpi_debug +contrib/dev/acpica/components/debugger/dbutils.c optional acpi acpi_debug +contrib/dev/acpica/components/debugger/dbxface.c optional acpi acpi_debug +contrib/dev/acpica/components/disassembler/dmbuffer.c optional acpi acpi_debug +contrib/dev/acpica/components/disassembler/dmcstyle.c optional acpi acpi_debug +contrib/dev/acpica/components/disassembler/dmdeferred.c optional acpi acpi_debug +contrib/dev/acpica/components/disassembler/dmnames.c optional acpi acpi_debug +contrib/dev/acpica/components/disassembler/dmopcode.c optional acpi acpi_debug +contrib/dev/acpica/components/disassembler/dmresrc.c optional acpi acpi_debug +contrib/dev/acpica/components/disassembler/dmresrcl.c optional acpi acpi_debug +contrib/dev/acpica/components/disassembler/dmresrcl2.c optional acpi acpi_debug +contrib/dev/acpica/components/disassembler/dmresrcs.c optional acpi acpi_debug +contrib/dev/acpica/components/disassembler/dmutils.c optional acpi acpi_debug +contrib/dev/acpica/components/disassembler/dmwalk.c optional acpi acpi_debug +contrib/dev/acpica/components/dispatcher/dsargs.c optional acpi +contrib/dev/acpica/components/dispatcher/dscontrol.c optional acpi +contrib/dev/acpica/components/dispatcher/dsdebug.c optional acpi +contrib/dev/acpica/components/dispatcher/dsfield.c optional acpi +contrib/dev/acpica/components/dispatcher/dsinit.c optional acpi +contrib/dev/acpica/components/dispatcher/dsmethod.c optional acpi +contrib/dev/acpica/components/dispatcher/dsmthdat.c optional acpi +contrib/dev/acpica/components/dispatcher/dsobject.c optional acpi +contrib/dev/acpica/components/dispatcher/dsopcode.c optional acpi +contrib/dev/acpica/components/dispatcher/dspkginit.c optional acpi +contrib/dev/acpica/components/dispatcher/dsutils.c optional acpi +contrib/dev/acpica/components/dispatcher/dswexec.c optional acpi +contrib/dev/acpica/components/dispatcher/dswload.c optional acpi +contrib/dev/acpica/components/dispatcher/dswload2.c optional acpi +contrib/dev/acpica/components/dispatcher/dswscope.c optional acpi +contrib/dev/acpica/components/dispatcher/dswstate.c optional acpi +contrib/dev/acpica/components/events/evevent.c optional acpi +contrib/dev/acpica/components/events/evglock.c optional acpi +contrib/dev/acpica/components/events/evgpe.c optional acpi +contrib/dev/acpica/components/events/evgpeblk.c optional acpi +contrib/dev/acpica/components/events/evgpeinit.c optional acpi +contrib/dev/acpica/components/events/evgpeutil.c optional acpi +contrib/dev/acpica/components/events/evhandler.c optional acpi +contrib/dev/acpica/components/events/evmisc.c optional acpi +contrib/dev/acpica/components/events/evregion.c optional acpi +contrib/dev/acpica/components/events/evrgnini.c optional acpi +contrib/dev/acpica/components/events/evsci.c optional acpi +contrib/dev/acpica/components/events/evxface.c optional acpi +contrib/dev/acpica/components/events/evxfevnt.c optional acpi +contrib/dev/acpica/components/events/evxfgpe.c optional acpi +contrib/dev/acpica/components/events/evxfregn.c optional acpi +contrib/dev/acpica/components/executer/exconcat.c optional acpi +contrib/dev/acpica/components/executer/exconfig.c optional acpi +contrib/dev/acpica/components/executer/exconvrt.c optional acpi +contrib/dev/acpica/components/executer/excreate.c optional acpi +contrib/dev/acpica/components/executer/exdebug.c optional acpi +contrib/dev/acpica/components/executer/exdump.c optional acpi +contrib/dev/acpica/components/executer/exfield.c optional acpi +contrib/dev/acpica/components/executer/exfldio.c optional acpi +contrib/dev/acpica/components/executer/exmisc.c optional acpi +contrib/dev/acpica/components/executer/exmutex.c optional acpi +contrib/dev/acpica/components/executer/exnames.c optional acpi +contrib/dev/acpica/components/executer/exoparg1.c optional acpi +contrib/dev/acpica/components/executer/exoparg2.c optional acpi +contrib/dev/acpica/components/executer/exoparg3.c optional acpi +contrib/dev/acpica/components/executer/exoparg6.c optional acpi +contrib/dev/acpica/components/executer/exprep.c optional acpi +contrib/dev/acpica/components/executer/exregion.c optional acpi +contrib/dev/acpica/components/executer/exresnte.c optional acpi +contrib/dev/acpica/components/executer/exresolv.c optional acpi +contrib/dev/acpica/components/executer/exresop.c optional acpi +contrib/dev/acpica/components/executer/exserial.c optional acpi +contrib/dev/acpica/components/executer/exstore.c optional acpi +contrib/dev/acpica/components/executer/exstoren.c optional acpi +contrib/dev/acpica/components/executer/exstorob.c optional acpi +contrib/dev/acpica/components/executer/exsystem.c optional acpi +contrib/dev/acpica/components/executer/extrace.c optional acpi +contrib/dev/acpica/components/executer/exutils.c optional acpi +contrib/dev/acpica/components/hardware/hwacpi.c optional acpi +contrib/dev/acpica/components/hardware/hwesleep.c optional acpi +contrib/dev/acpica/components/hardware/hwgpe.c optional acpi +contrib/dev/acpica/components/hardware/hwpci.c optional acpi +contrib/dev/acpica/components/hardware/hwregs.c optional acpi +contrib/dev/acpica/components/hardware/hwsleep.c optional acpi +contrib/dev/acpica/components/hardware/hwtimer.c optional acpi +contrib/dev/acpica/components/hardware/hwvalid.c optional acpi +contrib/dev/acpica/components/hardware/hwxface.c optional acpi +contrib/dev/acpica/components/hardware/hwxfsleep.c optional acpi +contrib/dev/acpica/components/namespace/nsaccess.c optional acpi \ + compile-with "${NORMAL_C} ${NO_WUNUSED_BUT_SET_VARIABLE}" +contrib/dev/acpica/components/namespace/nsalloc.c optional acpi +contrib/dev/acpica/components/namespace/nsarguments.c optional acpi +contrib/dev/acpica/components/namespace/nsconvert.c optional acpi +contrib/dev/acpica/components/namespace/nsdump.c optional acpi +contrib/dev/acpica/components/namespace/nseval.c optional acpi +contrib/dev/acpica/components/namespace/nsinit.c optional acpi +contrib/dev/acpica/components/namespace/nsload.c optional acpi +contrib/dev/acpica/components/namespace/nsnames.c optional acpi +contrib/dev/acpica/components/namespace/nsobject.c optional acpi +contrib/dev/acpica/components/namespace/nsparse.c optional acpi +contrib/dev/acpica/components/namespace/nspredef.c optional acpi +contrib/dev/acpica/components/namespace/nsprepkg.c optional acpi +contrib/dev/acpica/components/namespace/nsrepair.c optional acpi +contrib/dev/acpica/components/namespace/nsrepair2.c optional acpi +contrib/dev/acpica/components/namespace/nssearch.c optional acpi +contrib/dev/acpica/components/namespace/nsutils.c optional acpi +contrib/dev/acpica/components/namespace/nswalk.c optional acpi +contrib/dev/acpica/components/namespace/nsxfeval.c optional acpi +contrib/dev/acpica/components/namespace/nsxfname.c optional acpi +contrib/dev/acpica/components/namespace/nsxfobj.c optional acpi +contrib/dev/acpica/components/parser/psargs.c optional acpi +contrib/dev/acpica/components/parser/psloop.c optional acpi +contrib/dev/acpica/components/parser/psobject.c optional acpi +contrib/dev/acpica/components/parser/psopcode.c optional acpi +contrib/dev/acpica/components/parser/psopinfo.c optional acpi +contrib/dev/acpica/components/parser/psparse.c optional acpi +contrib/dev/acpica/components/parser/psscope.c optional acpi +contrib/dev/acpica/components/parser/pstree.c optional acpi +contrib/dev/acpica/components/parser/psutils.c optional acpi +contrib/dev/acpica/components/parser/pswalk.c optional acpi +contrib/dev/acpica/components/parser/psxface.c optional acpi +contrib/dev/acpica/components/resources/rsaddr.c optional acpi +contrib/dev/acpica/components/resources/rscalc.c optional acpi +contrib/dev/acpica/components/resources/rscreate.c optional acpi +contrib/dev/acpica/components/resources/rsdump.c optional acpi acpi_debug +contrib/dev/acpica/components/resources/rsdumpinfo.c optional acpi +contrib/dev/acpica/components/resources/rsinfo.c optional acpi *** 6174 LINES SKIPPED *** From nobody Wed Nov 13 13:28:43 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpPHv3wg2z5dck4; Wed, 13 Nov 2024 13:28: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XpPHv2zZnz4jSR; Wed, 13 Nov 2024 13:28:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731504523; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WibXmFTZiduvN0TZgcZNocJ8kYSrCTUbW7vSdSxSuL0=; b=KdarGJQ9MlYoQAZOL8/zCpjEY7d9DOT+q/HZ3nFqH4sjdW8C5Vk8A0o2HvBuEggCdBbeuB F64je7wiELZ82eYS2K8dZcdHfyMjXRvCsuHL05X2iU35ucuTVLy8dItObT7bY3s51zyu36 wFvFhJoZInMObq7ZYKP8Ku0t+gX0+Sltg/bHpe9qOdtmwmG7lfH4dnfvFEB4i7xX+HLHSg 7qQRehNU7+JJtWYC2R2UeWUV9uVLAC51mGXh9vOy+DPLY10u6wzJBQQnXlDFuSwQnqDpIm UI1+MGqH9So3lgGc+8s95US58orgqPQ33ZhKhYX081S+11g1dJgQ3dxK9apiUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731504523; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WibXmFTZiduvN0TZgcZNocJ8kYSrCTUbW7vSdSxSuL0=; b=X9tlrwAr7wZDIM5js3hf5eVJFlWxPPWssWKguskRphQz0NeE/PG9/vROI3GuMfndCiw9Gc Um16whgxOZyZK4jDfzoVFVO+0cofIXklBZJww9LL3M9Z+kyoZjABtrhkNJT1uGU9ZBCq26 hmSEaLKl98EwLTcpvsLc8rBQvS4NOCJp8W7aP2XhiU1arkaba/3L/mBcxFmEdqMkkC/b8x 1VrgmQjnv4DyHc9p7PeWn4KgtD/GTYeiAEKB9quAxLUlLP0G7rvM1bKHOGfRbYN6lyCltm 0D55XJchH3sDGdWYm0cH1/wrCuDWhxU+XzPtz3lSuyuAI/nkA98XCYgXpxL1wQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731504523; a=rsa-sha256; cv=none; b=GDqXP2+t28iAdCcpU+bVUjQ7fQCr/lmljXpKe2zogd560tL+hDykE2yHZhqmOYMRhbUsgS N1mvKlBZinmXj0ivou+E3AWPdCy9s+1k4SqoW62OFcztd9P0aHw5Mv/40PHllW68lO6goD Cnki8CBnWcTb0e74k+Oh8P7J2G3oFnuA07uxmscaAWZ5/LnABj7NWhlCuwXTrfp0qQRWPS ZxwXTPXXEFLKRlXwB91NeDJXfl8cSlFy2vrzwEVDHNy6hOWITJaZNDIlR7KhRYSBCrUVZe /iABfPYqp/Do+MrdZz1cTpHdwD/6u0yDmXCRhyyVCGGKXokdO7Tu48Di2UQ/sw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XpPHv2F5BzwWv; Wed, 13 Nov 2024 13:28:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ADDShHF063488; Wed, 13 Nov 2024 13:28:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ADDShh6063485; Wed, 13 Nov 2024 13:28:43 GMT (envelope-from git) Date: Wed, 13 Nov 2024 13:28:43 GMT Message-Id: <202411131328.4ADDShh6063485@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dave Cottlehuber Subject: git: aad6a5f96b78 - stable/13 - release: move OCI to ORACLE List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org 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/13 X-Git-Reftype: branch X-Git-Commit: aad6a5f96b7820e2d67b1d01435100353c7f15ac Auto-Submitted: auto-generated The branch stable/13 has been updated by dch: URL: https://cgit.FreeBSD.org/src/commit/?id=aad6a5f96b7820e2d67b1d01435100353c7f15ac commit aad6a5f96b7820e2d67b1d01435100353c7f15ac Author: Dave Cottlehuber AuthorDate: 2024-10-15 09:28:12 +0000 Commit: Dave Cottlehuber CommitDate: 2024-11-13 13:08:15 +0000 release: move OCI to ORACLE This allows future releng tooling to use OCI for the industry standard Open Container Initiative tooling, reducing potential for confusion. Approved by: cperciva Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D46975 MFC after: 3 days Sponsored by: SkunkWerks, GmbH (cherry picked from commit 1be84d745bcc11b766ac1fa03afd2c8ea8771737) --- release/Makefile.vm | 8 ++++---- release/release.conf.sample | 2 +- release/tools/{oci.conf => oracle.conf} | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/release/Makefile.vm b/release/Makefile.vm index 4d301672836d..d3fe1e161260 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -22,7 +22,7 @@ RAW_DESC= Unformatted raw disk image CLOUDWARE?= BASIC-CI \ EC2 \ GCE \ - OCI \ + ORACLE \ VAGRANT-VIRTUALBOX \ VAGRANT-VMWARE AZURE_FORMAT= vhdf @@ -37,9 +37,9 @@ EC2_DISK= ${OSRELEASE}.${EC2_FORMAT} GCE_FORMAT= raw GCE_DESC= Google Compute Engine image GCE_DISK= disk.${GCE_FORMAT} -OCI_FORMAT= qcow2 -OCI_DESC= Oracle Cloud Infrastructure image -OCI_DISK= ${OSRELEASE}.${OCI_FORMAT} +ORACLE_FORMAT= qcow2 +ORACLE_DESC= Oracle Cloud Infrastructure image +ORACLE_DISK= ${OSRELEASE}.${OCI_FORMAT} OPENSTACK_FORMAT=qcow2 OPENSTACK_DESC= OpenStack platform image OPENSTACK_DISK= ${OSRELEASE}.${OPENSTACK_FORMAT} diff --git a/release/release.conf.sample b/release/release.conf.sample index e4e37909c34e..998392036f4d 100644 --- a/release/release.conf.sample +++ b/release/release.conf.sample @@ -113,4 +113,4 @@ PORTBRANCH="main" ## If WITH_CLOUDWARE is set to a non-empty value, this is a list of providers ## to create disk images. -#CLOUDWARE="EC2 GCE OCI VAGRANT-VIRTUALBOX VAGRANT-VMWARE" +#CLOUDWARE="EC2 GCE ORACLE VAGRANT-VIRTUALBOX VAGRANT-VMWARE" diff --git a/release/tools/oci.conf b/release/tools/oracle.conf similarity index 94% rename from release/tools/oci.conf rename to release/tools/oracle.conf index 47231d65d79b..b0d5afc3cef8 100644 --- a/release/tools/oci.conf +++ b/release/tools/oracle.conf @@ -68,15 +68,15 @@ EOF # S14 Root user login must be disabled on serial-over-ssh console pw -R ${DESTDIR} usermod root -w no - # OCI requirements override the default FreeBSD cloud-init settings - cat <<-'EOF' >> ${DESTDIR}/usr/local/etc/cloud/cloud.cfg.d/98_oci.cfg + # Oracle requirements override the default FreeBSD cloud-init settings + cat <<-'EOF' >> ${DESTDIR}/usr/local/etc/cloud/cloud.cfg.d/98_oracle.cfg disable_root: true system_info: distro: freebsd default_user: name: freebsd lock_passwd: True - gecos: "OCI Default User" + gecos: "Oracle Cloud Default User" groups: [wheel] sudo: ["ALL=(ALL) NOPASSWD:ALL"] shell: /bin/sh From nobody Wed Nov 13 13:28:44 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpPHw5zb3z5dcPm; Wed, 13 Nov 2024 13:28: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XpPHw3nYsz4jST; Wed, 13 Nov 2024 13:28:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731504524; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zLGD/DlPG+RR4/jwiuZuyLZlLBG6R5hACqducLGttDM=; b=q09FxkCGmOiErKlLdLHqKofb5Py85TmgiN9gBYrlcjcwe9i4zquUgf8PbcHEBkFN/v8GdO iVEoBf6zxE4vsFLYQ92EB7Dj9Mp5WnyEqhVINDg05YWtv8chDq0Ib7Z1Qg0ZC5X0XVU7mS QM3WRxU/JSDaObnrRxZGsePa9cSRd7dKjuUxJF+JpLS8iva3cj7Vdc6hbtfN1Wq8TzoH2/ O2fUxk54MOqaJqdM+MzbpvHE+aYpXt6SFOqbkMADaXRTSjGAimofwePyLGYpFDXUPEoUdB KpxeZ7mzz1idZTpHllqcNAAHSiXx+SW9TfzvGoccsqSvhRPa0V3aEF9YbXs+aA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731504524; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zLGD/DlPG+RR4/jwiuZuyLZlLBG6R5hACqducLGttDM=; b=nMVpNozrTGm2dC/uSZs13XkNkt2lIgeovgKLTtFb6Xt65fuLG2yPMKkkDQh4CHIsjBSaCo 1SV9jSYHantJqKIh2T8BRbAnU7mtz95VAR/wI/xHJLrBq4O3qB6m24TmyVTwozQnwrEgQO v8lChcLBVU0Rz1oDqWGpvT9D5WMOFT5SZQ+XLT0nT1EMircvRe9NinA7a+HQP/iXB4bbXi LcJ7ZaQ81XGWv7hh9NewKu7ccZLvzMGNLiedVZG76LwZsS86JOJSivbM0Abei/dsTDHFX+ Ai4y8lM3w7LLNZ7AvQ8vz2pnAiIJ2d/mkAZsSDxJd+GCWvvegmR6kTBwoUFWvA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731504524; a=rsa-sha256; cv=none; b=eTkM7yjenmazU6IBwakLKljdQTcwRJa2+OMp7STmq+fyTcbr5NQfRfrbiTdgdKaCOYYpI1 Jl2jrtJWR9PAcDcT9NF5xt1yvfvbkpnBoIfb48gchriFoMFU0AbIwekGQA07T1OrNmP6uf nwvOiUw7ojoy341GbXMecRrSzu1GSg6m5GNGPMSYl7pLWkQ47NWx4/3sWhc2fBRrGmyiJL QmtTFPXGp1yfW5OzBHIOTKNnPUtdW2JB7WlCL9D23u8N7TycPFgVchNS5h5TtPFlBR2PL3 Vfl7ltp15C0RzGFc5CGOanWKZixI812zfOK3tuPcL5jjC3/c5s7rsOurQoRcxQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XpPHw3FwWzw6T; Wed, 13 Nov 2024 13:28:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ADDSiSf063544; Wed, 13 Nov 2024 13:28:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ADDSieG063541; Wed, 13 Nov 2024 13:28:44 GMT (envelope-from git) Date: Wed, 13 Nov 2024 13:28:44 GMT Message-Id: <202411131328.4ADDSieG063541@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dave Cottlehuber Subject: git: 75cd2f886164 - stable/13 - release: bump ORACLE VMSIZE to accommodate growth List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org 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/13 X-Git-Reftype: branch X-Git-Commit: 75cd2f886164e358c53aedb3e9f18ef683d936d9 Auto-Submitted: auto-generated The branch stable/13 has been updated by dch: URL: https://cgit.FreeBSD.org/src/commit/?id=75cd2f886164e358c53aedb3e9f18ef683d936d9 commit 75cd2f886164e358c53aedb3e9f18ef683d936d9 Author: Dave Cottlehuber AuthorDate: 2024-11-13 13:08:54 +0000 Commit: Dave Cottlehuber CommitDate: 2024-11-13 13:23:25 +0000 release: bump ORACLE VMSIZE to accommodate growth Approved by: emaste Sponsored by: SkunkWerks, GmbH --- release/tools/oracle.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/tools/oracle.conf b/release/tools/oracle.conf index b0d5afc3cef8..6b7516c36897 100644 --- a/release/tools/oracle.conf +++ b/release/tools/oracle.conf @@ -27,7 +27,7 @@ export VM_EXTRA_PACKAGES=" " # Should be enough for base image, image can be resized in needed -export VMSIZE=5g +export VMSIZE=8g # Set to a list of third-party software to enable in rc.conf(5). export VM_RC_LIST=" From nobody Wed Nov 13 13:49:49 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpPmF3C8Pz5dcy1; Wed, 13 Nov 2024 13: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XpPmF2K6Cz4kn9; Wed, 13 Nov 2024 13: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=1731505789; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tWYQnj+XvF39AvUJK02HfhTRu4osDn2eDHo08J2E/Tw=; b=whMt2MNmB5Umx9iAdXGB3Ec0KaShRQdQ7xhSV1bPXphtMvWSRCGhSDXxVlolf9K1USLuz/ VguAQEfkjf4SJ6o9Y6cVvyVi3rTz3wNRlrVbX2zQ/XNDTOuQD3xg/pV1loUqC3ASoBZxK4 tgHrsz0EjQReuiSUIujeKbcut+4Lr894M6FpaTsCfay+KCf6sGDnryT/CrBvhm3dOEOQNX Z+f5qRxA+daSffCRrVsdpiyaYHywrqMktNlG5BpuVZBj0EoD5XmfjH2HnOiSI1Tdecoo8D mCe8ojC8w35u2ueK0zEiOySRrt6QLfcZAGRpD84uVAqd7DUpL53Ab75sUDVgzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731505789; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tWYQnj+XvF39AvUJK02HfhTRu4osDn2eDHo08J2E/Tw=; b=B0YW0ctRLcXwn1wz4o+iDWir44AUCXD+/N1FED41e7aGNMAxRoAnQ8fQmCey8STKGee7l4 HwuicT/z9zWbSYULionAtamlCvHgkiXb/K8K+vRZ53aMNWxsJemE8OGFaLjDq+2pKU9WMR E4IWd+WD2gPu7TWc1evUxfArY8SWdpFJDcC4DKFLhs/0Xp+F20tq6OG6pZRB0g8qkAZlXR pvnhQ8tZ4w8dnKtTkU/FfRV6i/WRhjJoFnC3yn/4sVGRaSx36Jf0EmBUngjVPwP3mrtpp+ hqcpDbaFsD+mquFt7gVoYOVXHGV/t3L9/lMxaTdIj7u+OZiccDzF4c4e3pp2Fg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731505789; a=rsa-sha256; cv=none; b=uk9BHRIIdiPQfrUjD/g7SGPHhVingZmrtVs4+DMHq6Xxj1aMHguEByv2kx82qLfAbhGb2W brftF/81h55LvICfxIb/UmABf0tMuJ9Sn0vITCsdxjzkrhx2xnoo+3HlPCOgY0LJDyIaeJ b0Nzst5A1zmDd/2hx9nAyaBwTztXnLS7xmHyB/wYazgzq/qLDo8K3OvfhJ6Z5WflUkmWOf N0+Q9KsOvZPwMtfZFFQv6iXe7Or2mbJSoEFrhgYj1/vIrl3xvrjC5WdKw9HsO+jgGi6kQK 1VF5WtIEYzCKTM360Nc15y5xp4a2SWzriTGV+61pAtTrOlWqVxhFjW4zN727yA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XpPmF1wKXzxDv; Wed, 13 Nov 2024 13:49:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ADDnnb1000215; Wed, 13 Nov 2024 13:49:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ADDnnNo000212; Wed, 13 Nov 2024 13:49:49 GMT (envelope-from git) Date: Wed, 13 Nov 2024 13:49:49 GMT Message-Id: <202411131349.4ADDnnNo000212@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: b210c33a91ee - main - mv: Type and 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 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: b210c33a91ee9de41495a03a8bbff81f25be73b9 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=b210c33a91ee9de41495a03a8bbff81f25be73b9 commit b210c33a91ee9de41495a03a8bbff81f25be73b9 Author: Dag-Erling Smørgrav AuthorDate: 2024-11-13 13:47:29 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-11-13 13:47:29 +0000 mv: Type and style nits. Sponsored by: Klara, Inc. Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D47537 --- bin/mv/mv.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/bin/mv/mv.c b/bin/mv/mv.c index 8aea4bbf567c..c3080112cee5 100644 --- a/bin/mv/mv.c +++ b/bin/mv/mv.c @@ -262,18 +262,19 @@ static int fastcopy(const char *from, const char *to, struct stat *sbp) { struct timespec ts[2]; - static u_int blen = MAXPHYS; + struct stat tsb; static char *bp = NULL; + static size_t blen = MAXPHYS; + ssize_t nread; + int from_fd, to_fd; mode_t oldmode; - int nread, from_fd, to_fd; - struct stat tsb; if ((from_fd = open(from, O_RDONLY, 0)) < 0) { warn("fastcopy: open() failed (from): %s", from); return (1); } - if (bp == NULL && (bp = malloc((size_t)blen)) == NULL) { - warnx("malloc(%u) failed", blen); + if (bp == NULL && (bp = malloc(blen)) == NULL) { + warnx("malloc(%zu) failed", blen); (void)close(from_fd); return (1); } @@ -285,7 +286,7 @@ fastcopy(const char *from, const char *to, struct stat *sbp) (void)close(from_fd); return (1); } - while ((nread = read(from_fd, bp, (size_t)blen)) > 0) + while ((nread = read(from_fd, bp, blen)) > 0) if (write(to_fd, bp, (size_t)nread) != nread) { warn("fastcopy: write() failed: %s", to); goto err; From nobody Wed Nov 13 14:15:17 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpQKd3vxNz5dfSM; Wed, 13 Nov 2024 14:15: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XpQKd3LPlz4n1R; Wed, 13 Nov 2024 14:15:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731507317; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sY+ejOPCVH2luzH5SCgwLsFWWAzPRXyVW0AWXGuSfkg=; b=VKcwvxeKtb6hrRNdD15ZH2slTcalLlKTK+6uZf/w52ISlbmbE/1GBh/laLqA88HQgkCI53 /hDxeKijYtnNwz3fDvXF02kR0i9wLbQBB93GHLW2zgmHYdvxvuvJOrpr6ujocA3WQCcz8D vaIk+87gR10fKLYbi5G8JFyLVoz8+W8W6bO9CgwXXRI9fCKRAyVXlZiayJFN1AUIgMBHvW TqEJV7TVqCBV60UowRp4ZdTxAZEYnhjCTEOqPL1tP3bE0H+X0REUBg2rPLLOEAQzqf01Jj TdKUkdQRjLdf07t+RiLf5cmZM+txyEfdVg/dSylxqcEklKMcq0qPRFBM4cdSbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731507317; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sY+ejOPCVH2luzH5SCgwLsFWWAzPRXyVW0AWXGuSfkg=; b=QrAqoB7XZ0Cm57P7NMH7Edv1mtZHmrnhQiV9EG9JnhCA+G74GPfnL8DE6XxAUnWLgOD9Co 5CAdsc7AxT1eqsHG4rIHwByksnP/SkerYCFN+M/z6GWRiOPoK60agl75h+R6m8dBk6Htsa Eas+vJCl5xTpiGb9hINtItJ6Zm956VmSzHdUciSRNaSQhz3nH5QGgysdrTQU1OJQofb9ii rhBMVyib73H7Q1+HFEvO0/vLQOxul/DAsPsHzGwgfoukT/v5teq4+Zax8PC0HttqM3QUa4 zKay+24opdxv3Fd+HNJX3JO21Awj9qdI5w7H5/Vhp9aWjhZpsN7RI9wn6f+Efg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731507317; a=rsa-sha256; cv=none; b=dh0R2HE0D6d6KKJndwFbT02ogTH2+IP2mMmoBHySccbYeDzDPltIskBBWShCaHVYjZ5PaL LHRN4aFapcIX1P9AK7PRZEiM3jPRwsSWTRzTsR8AozZAyWmWCBpC9jRmAMVqKWu+oOi7Ci tMr8fHIxogXZnknVZ9rrm5BuvWy7Y9h7DBS6K12xe3zlaIZkoy3CptnDKwXsR74KG1scFS EmfPILc7L7ZXE9TIL74Wnvp+44fT6/pDSDEqK7ckEaAgz9UqwoKl/LVd/6oCvOvGE7EGkk sPgRaD5s5azZ2kCHQlhxmO8DW7xDEab+IsTfEeDeYdstqV3+Hq/ypT3amt0i+g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XpQKd2wpXzxWQ; Wed, 13 Nov 2024 14:15:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ADEFH76054809; Wed, 13 Nov 2024 14:15:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ADEFH1L054806; Wed, 13 Nov 2024 14:15:17 GMT (envelope-from git) Date: Wed, 13 Nov 2024 14:15:17 GMT Message-Id: <202411131415.4ADEFH1L054806@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: d11d407aee48 - main - swap_pager: Ensure that swapoff puts swapped-in pages in page queues List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d11d407aee4835fd50811a5980125bb46748fa0b Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d11d407aee4835fd50811a5980125bb46748fa0b commit d11d407aee4835fd50811a5980125bb46748fa0b Author: Mark Johnston AuthorDate: 2024-11-13 14:02:20 +0000 Commit: Mark Johnston CommitDate: 2024-11-13 14:14:32 +0000 swap_pager: Ensure that swapoff puts swapped-in pages in page queues Readahead/behind pages are handled by the swap pager, but the get_pages caller is responsible for putting fetched pages into queues (or wiring them beforehand). Note that the VM object lock prevents the newly queued page from being immediately reclaimed in the window before it is marked dirty by swap_pager_swapoff_object(). Reported by: pho Tested by: pho Reviewed by: dougm, alc, kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D47526 --- sys/vm/swap_pager.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index a402516fdb0e..db925f4ae7f6 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -1998,6 +1998,7 @@ swap_pager_swapoff_object(struct swdevt *sp, vm_object_t object) vm_object_pip_wakeupn(object, 1); KASSERT(vm_page_all_valid(m), ("%s: Page %p not all valid", __func__, m)); + vm_page_deactivate_noreuse(m); vm_page_xunbusy(m); break; } From nobody Wed Nov 13 14:15:18 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpQKf6Pc5z5dfNq; Wed, 13 Nov 2024 14:15: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XpQKf40d0z4mvh; Wed, 13 Nov 2024 14:15:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731507318; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ytcSI2b6UiCs1DoaC6NvIOapXb9zPSLq1zCLlYmgWN0=; b=VamppcKhyCy0h85kM1OmyKbZEz3pYneApP29FmE0C4ALL9PMvKwsPWHGmhyf0fHLdM0OTD 0UMRoMaimcyBBkZdh9WN2H9T2N06/TLgBlzqdOffeW7qbA6WjcxTRb7xvkt6gyPmKe3HFK YEXIqnVCB/dK0q/KIH8Y81RS08PrOIyKsEStktlwOIVkWTx68Kg47dE5pjIySHGEuhDF16 SoSrrg1KYjcnk4N9EQ92P/4O42Wp7Dy+zIgciqREOv5tYT7OBILmInDUDOAkPiUX+P/VFq 5Q0jGzVVcDmmCDnDuiCyYFWmrJ3A6ocxfgIqtcTILojX6mHVCtUITMuNrnC75A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731507318; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ytcSI2b6UiCs1DoaC6NvIOapXb9zPSLq1zCLlYmgWN0=; b=GbQl1KJ/D9Qbq2WB0OFTk4QkAF0Em8cCLrMoxJzpHi8LVLlitrmTILx8ZHEtVydafngefy CxvPmiqOhLvRTST4DXB5GexFC6GPzALs2vzLPyFh3PduZJDB5NTgRn0uLYM6qLQjijnDnP qxQ1sUTiMfDFLwejFahRpHwgFMa0PcwhMrXvpwpS5IwZJApUlR2VGZbkbN53dJlHrTZtAP ZsTQ8yWBEDsCJKOfxY9/oWTRVfFCOf+lNX14s6jvK953ECqyQjioOAHxjTd8Rr9hJQEA38 NRJrfygS7sDRKMm9hykpHDFf1iiRLkDbPafiCzikUrMjybJ1l5fAuUZC/DuEvQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731507318; a=rsa-sha256; cv=none; b=mIREKVdNQLbmVZb8zcIXidpHsF5jSkgyhm0LKWn1PNETEEX+uo6Ucv2U6g9ZVa1FeQkbbW ldaFBwLY6rztJD1iVVytIfJwRGTLggLj2/sy84i6TTAgWkYDPAo13ZGXULPahmzXUOqLsG QC1YzbPE5mbS3S8eAneD1MOl0Nbv9RdN6ec1b8xQzTGEQ/zvoPlTGfX5GH5LyZ3X5Yucsh uAWVUcJUTgmrEEsGDlbmGFUGowFzGwFUfXb4dwiVSAJsuV9zBlSas4YZQu+8dXOXkpnj/W PRvG7u85865VYhUPNlNBwfW4FvVocbkEednyEtsEV9Fd8RkdFO1JD5VhvOO40w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XpQKf3c23zxWR; Wed, 13 Nov 2024 14:15:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ADEFIrH054873; Wed, 13 Nov 2024 14:15:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ADEFI69054870; Wed, 13 Nov 2024 14:15:18 GMT (envelope-from git) Date: Wed, 13 Nov 2024 14:15:18 GMT Message-Id: <202411131415.4ADEFI69054870@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 0a897e675481 - main - riscv: Add support for building vmm as a kernel module List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0a897e67548156ed731dae68eafd21728894ef91 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=0a897e67548156ed731dae68eafd21728894ef91 commit 0a897e67548156ed731dae68eafd21728894ef91 Author: Mark Johnston AuthorDate: 2024-11-13 14:09:58 +0000 Commit: Mark Johnston CommitDate: 2024-11-13 14:15:07 +0000 riscv: Add support for building vmm as a kernel module - Update sys/modules/vmm/Makefile. - Add some required symbol definitions. - Hook up vmm in sys/modules/Makefile. Reviewed by: br Differential Revision: https://reviews.freebsd.org/D47477 --- sys/conf/files.riscv | 2 +- sys/modules/Makefile | 3 ++- sys/modules/vmm/Makefile | 20 +++++++++++++++----- sys/riscv/vmm/vmm.c | 5 +++++ 4 files changed, 23 insertions(+), 7 deletions(-) diff --git a/sys/conf/files.riscv b/sys/conf/files.riscv index f75fee72fde2..d325502e03ee 100644 --- a/sys/conf/files.riscv +++ b/sys/conf/files.riscv @@ -46,7 +46,7 @@ riscv/riscv/dump_machdep.c standard riscv/riscv/elf_machdep.c standard riscv/riscv/exception.S standard riscv/riscv/exec_machdep.c standard -riscv/riscv/fpe.c optional vmm +riscv/riscv/fpe.c standard riscv/riscv/gdb_machdep.c optional gdb riscv/riscv/intc.c standard riscv/riscv/identcpu.c standard diff --git a/sys/modules/Makefile b/sys/modules/Makefile index d76e16b1da1b..be485b9d393c 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -856,7 +856,8 @@ _smartpqi= smartpqi _p2sb= p2sb .endif -.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ + ${MACHINE_CPUARCH} == "riscv" .if ${MK_BHYVE} != "no" || defined(ALL_MODULES) .if ${KERN_OPTS:MSMP} _vmm= vmm diff --git a/sys/modules/vmm/Makefile b/sys/modules/vmm/Makefile index 15454b345934..0ec1147d0d4b 100644 --- a/sys/modules/vmm/Makefile +++ b/sys/modules/vmm/Makefile @@ -3,16 +3,12 @@ KMOD= vmm .if ${MACHINE_CPUARCH} == "amd64" -SRCS+= opt_acpi.h \ - opt_bhyve_snapshot.h \ - opt_ddb.h .endif SRCS+= acpi_if.h bus_if.h device_if.h pci_if.h pcib_if.h vnode_if.h CFLAGS+= -DVMM_KEEP_STATS CFLAGS+= -I${SRCTOP}/sys/${MACHINE}/vmm -CFLAGS+= -I${SRCTOP}/sys/${MACHINE}/vmm/io # generic vmm support .PATH: ${SRCTOP}/sys/dev/vmm ${SRCTOP}/sys/${MACHINE}/vmm @@ -24,6 +20,7 @@ SRCS+= vmm.c \ vmm_stat.c .if ${MACHINE_CPUARCH} == "aarch64" +CFLAGS+= -I${SRCTOP}/sys/${MACHINE}/vmm/io DPSRCS+= assym.inc # TODO: Add the new EL2 code @@ -71,12 +68,17 @@ vmm_hyp_blob.bin: vmm_hyp_blob.elf vmm_hyp_el2.o: vmm_hyp_blob.bin .elif ${MACHINE_CPUARCH} == "amd64" +CFLAGS+= -I${SRCTOP}/sys/${MACHINE}/vmm/io DPSRCS+= vmx_assym.h svm_assym.h DPSRCS+= vmx_genassym.c svm_genassym.c offset.inc CFLAGS+= -I${SRCTOP}/sys/amd64/vmm/intel CFLAGS+= -I${SRCTOP}/sys/amd64/vmm/amd +SRCS+= opt_acpi.h \ + opt_bhyve_snapshot.h \ + opt_ddb.h + SRCS+= vmm_host.c \ vmm_ioport.c \ vmm_lapic.c \ @@ -123,7 +125,6 @@ CLEANFILES+= vmx_assym.h vmx_genassym.o svm_assym.h svm_genassym.o OBJS_DEPEND_GUESS.vmx_support.o+= vmx_assym.h OBJS_DEPEND_GUESS.svm_support.o+= svm_assym.h -.endif vmx_assym.h: vmx_genassym.o sh ${SYSDIR}/kern/genassym.sh vmx_genassym.o > ${.TARGET} @@ -148,4 +149,13 @@ vmx_genassym.o: offset.inc svm_genassym.o: offset.inc ${CC} -c ${NOSAN_CFLAGS:N-flto*:N-fno-common} -fcommon ${.IMPSRC} +.elif ${MACHINE_CPUARCH} == "riscv" + +SRCS+= vmm_aplic.c \ + vmm_riscv.c \ + vmm_sbi.c \ + vmm_switch.S + +.endif + .include diff --git a/sys/riscv/vmm/vmm.c b/sys/riscv/vmm/vmm.c index f8be363b6170..33a0cb5fe420 100644 --- a/sys/riscv/vmm/vmm.c +++ b/sys/riscv/vmm/vmm.c @@ -176,6 +176,11 @@ static void vm_free_memmap(struct vm *vm, int ident); static bool sysmem_mapping(struct vm *vm, struct mem_map *mm); static void vcpu_notify_event_locked(struct vcpu *vcpu); +/* global statistics */ +VMM_STAT(VMEXIT_COUNT, "total number of vm exits"); +VMM_STAT(VMEXIT_IRQ, "number of vmexits for an irq"); +VMM_STAT(VMEXIT_UNHANDLED, "number of vmexits for an unhandled exception"); + /* * Upper limit on vm_maxcpu. We could increase this to 28 bits, but this * is a safe value for now. From nobody Wed Nov 13 14:16:36 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpQM831XHz5dfHd; Wed, 13 Nov 2024 14:16: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XpQM82KT2z4nP7; Wed, 13 Nov 2024 14:16:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731507396; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G13WxosrCURDNU40ZXSMtMJtwswk+CL2EjCof5xmy+8=; b=qpM6ZEBLbQaI78zwMNHZZdWWy2E1WZAaHrV4suvS5o34uuOgEchq9/sQgJHKgnk+KgPde3 1tfvs4oNG7aWHzIX+NiselPTbkIYyAPuxohpVj4+P2f4LDls9r4BnbWqwwsnzK26W58gfB KECcH5iOfCbBtey8bZ7JAANKG4Rj9osZrPvRv71YasWFWPNHbkFNAL0rZn/VrZSJoCLSPH AnhU0tT96n6vYD4h4ZTgPucSkcRg/YvDxUHR2tVv2awg+/foGzvM/XNBTsH0K7v6CSrrcJ GX3ZqDbZD1NqhlCjEwcclPfTRX8MQ9t5DHvs8FTgTH5EMqq+rw7dwJGHmtzlJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731507396; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G13WxosrCURDNU40ZXSMtMJtwswk+CL2EjCof5xmy+8=; b=XeMo91F0q886nHEBEFQOjCtv1O2ZLBsFfrzARELXJtZCp0+c8Yv+8zDKsXw4z5l7Ui/uRj 6EXF3QJyzezTLWx9bOczjY8Q4o/xB7HEh9P19gjugyeeFopyPsSquO2045l+TgvXCwd/vn 1nOuM2E1hQDTpbgY15BmZpctJ8MFBsJ9QlUgIh6b0xKcIoX8IsOLa6LmsDq6EMjyxo5Fmu hn0Ch6Ru7uN5Yjrk4OjyHEe3TkttL9rf4DUnoID8vf1CeUZhlLGHQzMAyKC0ea5vSEiwrV VUFnxEa3ddjrNwPpUBl2x9uDeAJ+AJ8UHDnQN3fFHgM5egS5OOfjhQ6s3suKPw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731507396; a=rsa-sha256; cv=none; b=bJCDa/FEWDqvdK0UPUCyAFQ3iQZ9WlmgWbkkgyklnD98v6VDYPklg3VNZY73Eb0WpdJFNj rT2npqkgoDgXz4piD6u9/sGHNxBsEqUJAaULfw/HG2w3FIcTjLudIovvycei2XC6SyjLsR Ged17WsXUSR9N/TIA0T88TvU0k6n/pa5frbeqMiWcenOzZUlSPBaVsDnT/ASDss9oofL17 KBwiQUm5+fMJFHmrHhVcn2CXRBdmtm8WQKb9DCCGOP4LuiD5sqduayzXbqRCVD7d2tG5Vu qmzGx6Bj2xHIndfTlQ5p10k/pgsBKhv2ArYpWx/Mz2oCq8aukPvJFfPPLVrJEA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XpQM81wnjzy05; Wed, 13 Nov 2024 14:16:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ADEGaDx055371; Wed, 13 Nov 2024 14:16:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ADEGaJ4055368; Wed, 13 Nov 2024 14:16:36 GMT (envelope-from git) Date: Wed, 13 Nov 2024 14:16:36 GMT Message-Id: <202411131416.4ADEGaJ4055368@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: a43b745aaf4f - main - linux sendfile: Fix handling of non-blocking 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 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: a43b745aaf4f5bbc96875d2ab3ec9bea8024eda4 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a43b745aaf4f5bbc96875d2ab3ec9bea8024eda4 commit a43b745aaf4f5bbc96875d2ab3ec9bea8024eda4 Author: Mark Johnston AuthorDate: 2024-11-13 14:15:47 +0000 Commit: Mark Johnston CommitDate: 2024-11-13 14:15:47 +0000 linux sendfile: Fix handling of non-blocking sockets FreeBSD sendfile() may perform a partial transfer and return EAGAIN if the socket is non-blocking. Linux sendfile() expects no error in this case, so squash EAGAIN. PR: 282495 Tested by: pieter@krikkit.xyz MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D47447 --- sys/compat/linux/linux_socket.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c index 15431bf3127c..6c6751ad30a8 100644 --- a/sys/compat/linux/linux_socket.c +++ b/sys/compat/linux/linux_socket.c @@ -2538,6 +2538,13 @@ sendfile_sendfile(struct thread *td, struct file *fp, l_int out, current_offset = *offset; error = fo_sendfile(fp, out, NULL, NULL, current_offset, count, sbytes, 0, td); + if (error == EAGAIN && *sbytes > 0) { + /* + * The socket is non-blocking and we didn't finish sending. + * Squash the error, since that's what Linux does. + */ + error = 0; + } if (error == 0) { current_offset += *sbytes; if (offset != NULL) From nobody Wed Nov 13 14:27:13 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpQbP3lptz5dgLd; Wed, 13 Nov 2024 14: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XpQbP357fz4p7m; Wed, 13 Nov 2024 14: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=1731508033; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BcyVYmTYRaCIr54ACdUYpPKgq9iXk5EIHv9rY8Bocuo=; b=oBqmDRNbpeAJSzRnUuftL3RqRmJzELetlQXLYCVltCBJVkOkBMe38yBAeRE7UQwaw1rdVm +A5YHxIaQaIamo1oECNuUv2MnLSFp+Zu6yVwP3yczqyGb76Jb9wIPlXjWIHuBSEwsSJsir J+1SbViiGqWAfGRVzmzdf2M/AWRPaJJOUvxmiRh/ZPUV2yPuJwRT/hJkSbL0Hgvw+To+oT Z/FJuymRA4cCpLnGAsV+RDVM5LmdW06tRytRmOBJHQdcCh0yElKL4RYdXyrkf4JMfI1kjT 8intfjnIYRIoj18ErsfSp188Sckf+BAHc+nQqQH3OCDyO11llNLxcqNcbf/S2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731508033; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BcyVYmTYRaCIr54ACdUYpPKgq9iXk5EIHv9rY8Bocuo=; b=vNNVGT81aoc753qUx/1P2+yRYUQjiccw0JpqX8AbVuc8nn4zLRJIrdrV4OSNxf1BG1BRI0 KuOHgROMYh/f5Lcrqcd0wETpjRmB5PXT+FLWWGJno/4ZjG77edJtpAfYP/vD5AHFuHHvtR Cse1Ik34Rjmch58khkk2TE52SoXolv3+Jghm3mZduUe6LLeCEJaZsnRyrhJGu61+nFvOBV jT2Z8w9vayDraCfKLnsdLQG3+AI8997Uqbu0kODLIJ5NBrwoYA1tChZRB2diPB/obHPDtL VHiWu9wVWEcGLPZPO86zXIFJJTvQAoCIdJcU5A7HjG3SvFR01nH/GNzZ7mB5Nw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731508033; a=rsa-sha256; cv=none; b=v9GjbJTe+Grxetjc14dLQEolR43kSqAeLLaiZlrJQgpgPeQVdMFgrZvUzP6AQfutlVJlYN Dxeoyv1DkvzyCDIFrze2pRVkv1Jvn6NhZ7SFw2b4WS64rdJS9eTr4XvpI3O98qkLObzNAG HaUF0FiZLTRbgzCnqBn/iB2s3N5bAmyoab43XEMBHwPSxH1/2YjaHjqbOahOcqMfJeUWn9 lRwi6IAcFz6R8+i2v/74p7gVkFBsHq1geX/vqVzXlRIVSI3eZ3BFDXsPdn3SuGsTxk/79E 1/clOk5rYcINlZNiGWFgYPJ2VM81ZepxePnaRmtX3ZZFGqJKE6d7XeS91EOnTw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XpQbP2gZXzxwF; Wed, 13 Nov 2024 14:27:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ADERDkd074780; Wed, 13 Nov 2024 14:27:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ADERDjc074777; Wed, 13 Nov 2024 14:27:13 GMT (envelope-from git) Date: Wed, 13 Nov 2024 14:27:13 GMT Message-Id: <202411131427.4ADERDjc074777@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: ddc9bb706808 - stable/14 - usb: fix loop in usb_config_parse List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ddc9bb706808468b2808ab9a32efc5f8dfb346c9 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=ddc9bb706808468b2808ab9a32efc5f8dfb346c9 commit ddc9bb706808468b2808ab9a32efc5f8dfb346c9 Author: Ed Maste AuthorDate: 2024-10-04 15:49:53 +0000 Commit: Ed Maste CommitDate: 2024-11-13 14:26:44 +0000 usb: fix loop in usb_config_parse By inspection, index increment was missing. PR: 281843 Reported by: Matt Jacobson Reviewed by: bz, markj Fixes: e4611d26265f ("usb(4): Call optional endpoint_uninit() when changing configuration or alternate setting.") Sponsored by: The FreeBSD Foundation (cherry picked from commit 114080d19973331426cd826f3a961c6ea9216a53) --- sys/dev/usb/usb_device.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/usb/usb_device.c b/sys/dev/usb/usb_device.c index c4fe3b4a6ab6..bce1541ab3ad 100644 --- a/sys/dev/usb/usb_device.c +++ b/sys/dev/usb/usb_device.c @@ -855,6 +855,7 @@ usb_config_parse(struct usb_device *udev, uint8_t iface_index, uint8_t cmd) if (ep->refcount_alloc != 0) return (USB_ERR_IN_USE); } + ep++; } } From nobody Wed Nov 13 14:28:07 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpQcS1Mwdz5dgJW; Wed, 13 Nov 2024 14:28: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XpQcS0Pxmz4pn1; Wed, 13 Nov 2024 14:28:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731508088; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tup3XSAhZWNjWFQRwWx+0xl/4SiaxZRbvsLTyNFT0N4=; b=pCZZ6/kLuEwRQIzcVJD8Ghx+PDyjDYYlMdx1AgnO//v24t0nJbmG7UYjD/Y/9lhQUpFNRQ MnVThRTHAbGUT5trme7BQp58X0r6srm2M9bHJWYD0yg9eF1dbAmZ47RRtBhFVQUbzUhNeI mJQfC2x5wuPfKOwtY6ZQKmnR4X/dMzMMgW4GSQY6AXVsrlII+N3COptJ6Jzi28vb45tlKx cBHaWeTj+VtxFx5VK+SDeXd1zlFwfvqCQ48sFSfVqbgRD+Juup+5BbuC2kvtSHPbHxxS6h YXIJoF254KFf+CHygFU7uX/1SSVaH8pzuMBYL3LHqjucNUidaICFcwHY9pNJ2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731508088; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tup3XSAhZWNjWFQRwWx+0xl/4SiaxZRbvsLTyNFT0N4=; b=vdfVKa79yCwPwMg3Sr3NHXQhZdoVzptpzjAOle/2GJh7pvTKuwmRkvnu+m3rYcgh+dC/T9 MD+3VGOHyVtO/ld6WR33sOjf7QO9tCDHccZAGSIEy6SkSmZt0mmjw6VPmYviwj3txp0xbT I9C41//ZqzVsaiuP7K5Q+gHrAA7T1iKBFzEeEZvuPn2Wnn5M9NBKbwWA+9lhnqIbk7tSOC Lmr6pBjlBoEDS6QJUQRNn1ao6FGipP2xw4idRMoALSWn7CH74esW0lkgT+b3wcixgYedfK lWYsDHfEq3IGg6kHLpJ4+hVsPTg3xyreewNWomJ4q0T5WlcKCbP+zfcZjktNbQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731508088; a=rsa-sha256; cv=none; b=gkyLyMJ0i5Jjn+9PVskVcMxclMUD1ReoExO23G3DuzBjpc/N03NHdaK6MUmXN4ZtSsAMUL E+9PYfxOqz1ZyWRhPOshx9pHDPMMFqvYfAvlBMGgzuclSHt0+VHLUKcyHhM3TAtDlfuwH3 qWwRoMEJh/7RIZOLRckCFBcgCO7DsDtK/vL/XrFP/FXkB5xrdAEimihRQpI3DhGidCaPHw zGJgxBGEpxRHsunLhXj138KB6VrMDXvHID4xBQMUmI+dJoxfzXnjo6oQVw6fMRkV48XKFy dMnYyJZ8GKV0OedK7UZSin89bMsH7h6/DsHBRJyra7DRzNoJTlPhRHZlxL+4QA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XpQcR6ppXzyH7; Wed, 13 Nov 2024 14:28:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ADES7b4075217; Wed, 13 Nov 2024 14:28:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ADES7jw075214; Wed, 13 Nov 2024 14:28:07 GMT (envelope-from git) Date: Wed, 13 Nov 2024 14:28:07 GMT Message-Id: <202411131428.4ADES7jw075214@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 9e7356944da4 - stable/13 - usb: fix loop in usb_config_parse List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9e7356944da4693e9ceb40bf65ed525048faa106 Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=9e7356944da4693e9ceb40bf65ed525048faa106 commit 9e7356944da4693e9ceb40bf65ed525048faa106 Author: Ed Maste AuthorDate: 2024-10-04 15:49:53 +0000 Commit: Ed Maste CommitDate: 2024-11-13 14:27:54 +0000 usb: fix loop in usb_config_parse By inspection, index increment was missing. PR: 281843 Reported by: Matt Jacobson Reviewed by: bz, markj Fixes: e4611d26265f ("usb(4): Call optional endpoint_uninit() when changing configuration or alternate setting.") Sponsored by: The FreeBSD Foundation (cherry picked from commit 114080d19973331426cd826f3a961c6ea9216a53) (cherry picked from commit ddc9bb706808468b2808ab9a32efc5f8dfb346c9) --- sys/dev/usb/usb_device.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/usb/usb_device.c b/sys/dev/usb/usb_device.c index c4fe3b4a6ab6..bce1541ab3ad 100644 --- a/sys/dev/usb/usb_device.c +++ b/sys/dev/usb/usb_device.c @@ -855,6 +855,7 @@ usb_config_parse(struct usb_device *udev, uint8_t iface_index, uint8_t cmd) if (ep->refcount_alloc != 0) return (USB_ERR_IN_USE); } + ep++; } } From nobody Wed Nov 13 14:41:45 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpQw93M3mz5dgbs; Wed, 13 Nov 2024 14: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XpQw92bjHz4r0Z; Wed, 13 Nov 2024 14: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=1731508905; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yvVj5QTARwIuQflzLLi4z74MVhtuHaPWjip/g687PrM=; b=ZZ3JF8LPs4VZr8nQBRuIRqiJXkthuV/iEns4fhv+frRXKkrm7oeNzQOIYr9IZBAIXuMvfA 8unWXeIxIh/2QVKf9UWODVvRgQeD0Qnglnjur8DEdQgRv5DB43lkH5YDSwr00meH65+U/o 9YHEhTjTE4lhMQMHIw2Zsg6NQUyvCVfu6KF7gWScPn7EIOh+xvhasUjVvppsLR4/9u3ejq kwkO9lapEmgkCCPo/TypnFMogFxXbYNnGhLQUAqfK79QRm7XNuvj6cMHYkGfGxXUhgBmXW QcbTZ2EC8K+P8edgPPBHLDlDX7Ny9d7jAaUHzS8crH342duZZ7kyhJAEronmPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731508905; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yvVj5QTARwIuQflzLLi4z74MVhtuHaPWjip/g687PrM=; b=w4GwgHieLfCg2Zf4bU/MuY2C3z/HTVywAYnG9bkCnujHXFHzRyI4xnKM6nyJt766TidEJD I3RjNt3V50pVl6Gss8pQG651jnF6KcXhgRPF22Jp9T/tPYPp6Ot5jSUpvBfz2ZdmSDC58J SmKiImhZHGwwv17Kbu1yfgXYGPqdQ1fJmpXUKioxDUw8CSTV8MwyKIGiHW3m/spw2EsJUy 36t7dP9j26DpBBu58kmflgLizaExm5V6/rwfNqgFw9aljTp+uQI9jbnu8A244lCas7tf1v kIDeZ/AEbvP7p2v1n5adUB0FIPorHZiOGJcxn1ZOxMW+UVRJamnKR6VmRx1QfA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731508905; a=rsa-sha256; cv=none; b=wdES32K6iG08yttd/UfUIkZVud3dZjr2iZbK0eNtufhP6QCQUMnV0knLWlguyFo/wV1DrI yuD1p8JSIK3ewSfTMweqe2sjIRSEpPLN88aOQS7pPchnnG+JDgyL46S0Lolory5lHJMZx3 uQGthsU3GKFFr1pJ1sVGT6YOhXTJC9Gy9FTzw7LMV5AEsJk6DYX0sNkrmBCImgVi77aGs4 OXi4RxQx14meraRFwt/x3QqMZzt5KWImGUl+87z0EGuYeHnvlJBtmQjz4OniUdBfWtEyw4 1rFH78i4Qfiyi7OF5nPhIYwTnIOHi1zmLNGb4yEGOXDdIbPBAbbTqE4JnFxNjw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XpQw92CJFzyVd; Wed, 13 Nov 2024 14:41:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ADEfj8a005076; Wed, 13 Nov 2024 14:41:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ADEfjD9005073; Wed, 13 Nov 2024 14:41:45 GMT (envelope-from git) Date: Wed, 13 Nov 2024 14:41:45 GMT Message-Id: <202411131441.4ADEfjD9005073@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dave Cottlehuber Subject: git: 803a860c6172 - stable/13 - release: fix stray OCI_FORMAT List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org 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/13 X-Git-Reftype: branch X-Git-Commit: 803a860c61720904b06ca204867fe50824dfadc6 Auto-Submitted: auto-generated The branch stable/13 has been updated by dch: URL: https://cgit.FreeBSD.org/src/commit/?id=803a860c61720904b06ca204867fe50824dfadc6 commit 803a860c61720904b06ca204867fe50824dfadc6 Author: Dave Cottlehuber AuthorDate: 2024-11-13 14:36:16 +0000 Commit: Dave Cottlehuber CommitDate: 2024-11-13 14:37:56 +0000 release: fix stray OCI_FORMAT The OCI_FORMAT variable was renamed, but this use was missed. Fixes: aad6a5f96b7820e2d67b1d01435100353c7f15ac Sponsored by: SkunkWerks, GmbH --- release/Makefile.vm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/Makefile.vm b/release/Makefile.vm index d3fe1e161260..4fc8f8f75acf 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -39,7 +39,7 @@ GCE_DESC= Google Compute Engine image GCE_DISK= disk.${GCE_FORMAT} ORACLE_FORMAT= qcow2 ORACLE_DESC= Oracle Cloud Infrastructure image -ORACLE_DISK= ${OSRELEASE}.${OCI_FORMAT} +ORACLE_DISK= ${OSRELEASE}.${ORACLE_FORMAT} OPENSTACK_FORMAT=qcow2 OPENSTACK_DESC= OpenStack platform image OPENSTACK_DISK= ${OSRELEASE}.${OPENSTACK_FORMAT} From nobody Wed Nov 13 15:48:01 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpSNd5tw9z5dkZC; Wed, 13 Nov 2024 15:48: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XpSNd5PKNz4xWS; Wed, 13 Nov 2024 15:48:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731512881; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z7VW3tH8nu4dEdfmICPAaAAbc6rHvM+yX1147lrdzOc=; b=bxi8ebfSz1fWiI/NI3/vqmcrbGdlVsFObnkRiIdIks6es9Mg2yXr42VizRK85uyYpYd0b3 97nsKKEIK3Cw7AP/dLrHl739uokaCYkXw6rgrZDkGZ9L8veTZDQmnXQMAAAA8GrWCwQJ3u W2r8hCdXKwh4Nonrn3/oNaycTqOkCruyGHeSJoRwMd5DMnZHlcn6R4sadEDIMGdyE8K1w0 KtqDObccOxw3ICpZJ9McSjailVAN1GY8IWGJveAD+IkyGDPGRK7RKukPiHZkQb08mfA/gv bPM61wTuMfahEizEzeFyMTlwb1jq197kZq7IXU6vieKnpWNMKtnsyhwuLRSmrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731512881; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z7VW3tH8nu4dEdfmICPAaAAbc6rHvM+yX1147lrdzOc=; b=vng+975PA8t63rSSUQNClh1V0bdOLQzJYNpJZ8kBRau+HNUzmk9DkqroMCNPbxuLoqLG3q CYUiRpJOZpvFcev9RT/30bdFwK8JWDHP1Fx0bzJGvTOJzN0NnSI6WZ6i4X1jflMqs17VIF 6rbaKeLdcnGCQqT9RA5DgoOl/4+RT+J+k3dB0Kxbt7jGu0uSI7FS6hEwv9kv0p3QJ1k/Xa rTDs7xbQ+QgR6KdClzCwqHGfnXlorXN+fTq6dRZNvzGRjDk1NyT3M/LXy4lgkJ2kcLAiW1 ajnS5nWAbMd13pyVDFY7TsPnQuNSUChvZDk3ghkbiGKtg0qGuDza5FASAeXjqg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731512881; a=rsa-sha256; cv=none; b=NPiW2RvQMj818Jl507H4dIrPwwz/lZMmNVtTtHmPaLpGFZY2CeUtD83PNMViyIl6Y0Ep/6 VcKjM93W7BEh+COrnKinXrpFIwqLVknf8BvEko+0GKiE06rww2JGeLALtQSNC502AUq1ZT nKkRQmAJgI4H414g2COFmes20I7tV6s0N90HnjwaSKF717bUoNJPGyeN3h8473pdE83aU6 khAALNRlKVlJZY8Pe5mEyhaYJR31fIcd6f3kYmunIbbGu/Y+4TBibZNp4bpjS++6ih2JSD 6Px/MCREoDdVbq9akNsT7tP4M/zo4rqyxcxPtLI2q3Ub/mhWAhB7iggix1bibA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XpSNd4tQnz11JJ; Wed, 13 Nov 2024 15:48:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ADFm1Qe024567; Wed, 13 Nov 2024 15:48:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ADFm1Yf024564; Wed, 13 Nov 2024 15:48:01 GMT (envelope-from git) Date: Wed, 13 Nov 2024 15:48:01 GMT Message-Id: <202411131548.4ADFm1Yf024564@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 23173329b096 - stable/14 - ice(4): properly use kernel option RSS List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org 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/stable/14 X-Git-Reftype: branch X-Git-Commit: 23173329b096499f818adaa35255c033e9ee78bc Auto-Submitted: auto-generated The branch stable/14 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=23173329b096499f818adaa35255c033e9ee78bc commit 23173329b096499f818adaa35255c033e9ee78bc Author: Brian Poole AuthorDate: 2024-10-11 19:57:52 +0000 Commit: Mitchell Horne CommitDate: 2024-11-13 15:47:28 +0000 ice(4): properly use kernel option RSS Header ice_rss.h uses the kernel RSS interface if option RSS is defined. However when ice_rss.h is included by ice_lib.h there is no prior inclusion of ice_opts.h to set RSS causing ifdef RSS to always fail. Add ice_opts.h to the top of ice_lib.h (like ice_iflib.h) so RSS can be defined when ice_rss.h is parsed. With that in place, compilation fails due to a missing defintion of ICE_DEFAULT_RSS_HASH_CONFIG. It is defined in ice_rss.h only when RSS is not defined. Since this define is not part of the kernel RSS interface but ice-specific, it should always be defined. Move its definition outside of ifdef RSS. PR: 255309 Reviewed by: mhorne, erj (earlier version) MFC after: 3 days Pull Request: https://github.com/freebsd/freebsd-src/pull/1460 (cherry picked from commit 6e5650896fe47398e49e3d81af60cc60dbb09e6e) --- sys/dev/ice/ice_lib.h | 3 +++ sys/dev/ice/ice_rss.h | 16 ++++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/sys/dev/ice/ice_lib.h b/sys/dev/ice/ice_lib.h index 466cb8701b79..b6b23ec82161 100644 --- a/sys/dev/ice/ice_lib.h +++ b/sys/dev/ice/ice_lib.h @@ -40,6 +40,9 @@ #ifndef _ICE_LIB_H_ #define _ICE_LIB_H_ +/* include kernel options first */ +#include "ice_opts.h" + #include #include #include diff --git a/sys/dev/ice/ice_rss.h b/sys/dev/ice/ice_rss.h index ede1fad5abe7..df485f4b1f5a 100644 --- a/sys/dev/ice/ice_rss.h +++ b/sys/dev/ice/ice_rss.h @@ -68,14 +68,6 @@ CTASSERT(ICE_AQC_GET_SET_RSS_KEY_DATA_RSS_KEY_SIZE >= RSS_KEYSIZE); #define RSS_HASHTYPE_RSS_UDP_IPV6 (1 << 9) /* IPv6 UDP 4-tuple */ #define RSS_HASHTYPE_RSS_UDP_IPV6_EX (1 << 10) /* IPv6 UDP 4-tuple + ext hdrs */ -#define ICE_DEFAULT_RSS_HASH_CONFIG \ - ((u_int)(RSS_HASHTYPE_RSS_IPV4 | \ - RSS_HASHTYPE_RSS_TCP_IPV4 | \ - RSS_HASHTYPE_RSS_UDP_IPV4 | \ - RSS_HASHTYPE_RSS_IPV6 | \ - RSS_HASHTYPE_RSS_TCP_IPV6 | \ - RSS_HASHTYPE_RSS_UDP_IPV6)) - #define rss_getkey(key) ice_get_default_rss_key(key) #define rss_getnumbuckets() (mp_ncpus) #define rss_get_indirection_to_bucket(index) (index) @@ -113,4 +105,12 @@ rss_hash2bucket(uint32_t hash_val, uint32_t hash_type, uint32_t *bucket_id) #endif /* !RSS */ +#define ICE_DEFAULT_RSS_HASH_CONFIG \ + ((u_int)(RSS_HASHTYPE_RSS_IPV4 | \ + RSS_HASHTYPE_RSS_TCP_IPV4 | \ + RSS_HASHTYPE_RSS_UDP_IPV4 | \ + RSS_HASHTYPE_RSS_IPV6 | \ + RSS_HASHTYPE_RSS_TCP_IPV6 | \ + RSS_HASHTYPE_RSS_UDP_IPV6)) + #endif /* _ICE_COMMON_COMPAT_H_ */ From nobody Wed Nov 13 15:49:56 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpSQr5wvhz5dl1w; Wed, 13 Nov 2024 15: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XpSQr5Nr3z4yTQ; Wed, 13 Nov 2024 15:49:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731512996; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ByoT8uxA1Gr71/kbvEDlGlkuEaClRFzlyJRVkElMbt4=; b=DcjHu8a5hY8EYc40CbBd5yxRpiPqPDAJPPkafvBBR7xwSRaLIfSBuoqqfJzqqgqnsCuZB1 1lcTlXCGZrwTvFw/wRhwFUVTRzCzPGY1Yl8ZcHlo/R2p33lv6Ur7cb+KNuVCD8bAGb2QXM 6TFc1xb5NDKml144PkmyCumJ05q+DuwuyNIGppanXtiKPBLrla7dWu5ZdccqcUq5QlFqWP hm8mi9VoiTtLVSSEMaJ8A9sfs5oIibcOZshMwdDFAHJqQKwcvP2mtIQqtVTy+kDpP3jnEC iCnDW8D6HSrcJekLfmNXQ4uisRPvz3uNmRxinrdTVVRyE1MBnMAHJo/kN/VA2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731512996; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ByoT8uxA1Gr71/kbvEDlGlkuEaClRFzlyJRVkElMbt4=; b=KFTiMHvWuxtEofl+kFWXAwHeJ8cxWWsUW4UlWmR5/CPaj6vof/Ra/oNxm+V5tKuVrw0yv+ 1tu09gZyLFJ8vX7GzEarsg1XDR3s5wLcr5+ghWiiD4XzVguPNE4yg8eKNfc4sq+Sj07dRK cNPgnT8HVuk6gprsbvLJEiyo38GWd/3ftnTB8YUsdKCqunYP9MA9hviFStcDOkgdkjhk8E gDnWwAAAdhz+xaemB5ux5Uu/3hMMeI4tnDGmfNHnDHVoyZ9Nq0vk9aiBhMLmfllh5DsHgH Jj9wiP2bf3W9YiFA3h4FQhHpt2L0PD49/6TnVL0hYfmfGSjhAFecoCk280Z0Sw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731512996; a=rsa-sha256; cv=none; b=m//7wCB6ByXDdfF+1tD3kZLg2rlCuj6r7vp6JqSwevhLuBlDk+L52iqk5uMjJA5wBeg45q z5idSmjWr3LHe70LTSq5eIdsj1re+Ao5BrJsjVGOT3EUyFenXnuVmGAGf1kKka0S4SRzUC 4R9kW8XZHhwcKODlXe6B9sYZtrTZf2f+jwhCaq+zzOuKHzQ0z7r2Wibnj/DLM3xXE7JX6F CON4XKegpCNQvW+TQ06dMhNQVCPfSIFz0Npf36clrFLsEMCqb5qg5KR4QL3qhFVSDvHN8n T8OTaTwHa8EzbZ47oAKIP7+QhLbQQuFmEQghKQyQ2TaeoakqfN1W285ZND3VfA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XpSQr50DGz11JL; Wed, 13 Nov 2024 15:49:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ADFnuUQ025218; Wed, 13 Nov 2024 15:49:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ADFnuGM025215; Wed, 13 Nov 2024 15:49:56 GMT (envelope-from git) Date: Wed, 13 Nov 2024 15:49:56 GMT Message-Id: <202411131549.4ADFnuGM025215@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 2c6edd6dc94e - stable/13 - ice(4): properly use kernel option RSS List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 2c6edd6dc94e7d429ce022262b9e25d159ce61e5 Auto-Submitted: auto-generated The branch stable/13 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=2c6edd6dc94e7d429ce022262b9e25d159ce61e5 commit 2c6edd6dc94e7d429ce022262b9e25d159ce61e5 Author: Brian Poole AuthorDate: 2024-10-11 19:57:52 +0000 Commit: Mitchell Horne CommitDate: 2024-11-13 15:49:33 +0000 ice(4): properly use kernel option RSS Header ice_rss.h uses the kernel RSS interface if option RSS is defined. However when ice_rss.h is included by ice_lib.h there is no prior inclusion of ice_opts.h to set RSS causing ifdef RSS to always fail. Add ice_opts.h to the top of ice_lib.h (like ice_iflib.h) so RSS can be defined when ice_rss.h is parsed. With that in place, compilation fails due to a missing defintion of ICE_DEFAULT_RSS_HASH_CONFIG. It is defined in ice_rss.h only when RSS is not defined. Since this define is not part of the kernel RSS interface but ice-specific, it should always be defined. Move its definition outside of ifdef RSS. PR: 255309 Reviewed by: mhorne, erj (earlier version) MFC after: 3 days Pull Request: https://github.com/freebsd/freebsd-src/pull/1460 (cherry picked from commit 6e5650896fe47398e49e3d81af60cc60dbb09e6e) --- sys/dev/ice/ice_lib.h | 3 +++ sys/dev/ice/ice_rss.h | 16 ++++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/sys/dev/ice/ice_lib.h b/sys/dev/ice/ice_lib.h index 6c010cffc0fd..09385d3be34b 100644 --- a/sys/dev/ice/ice_lib.h +++ b/sys/dev/ice/ice_lib.h @@ -40,6 +40,9 @@ #ifndef _ICE_LIB_H_ #define _ICE_LIB_H_ +/* include kernel options first */ +#include "ice_opts.h" + #include #include #include diff --git a/sys/dev/ice/ice_rss.h b/sys/dev/ice/ice_rss.h index ede1fad5abe7..df485f4b1f5a 100644 --- a/sys/dev/ice/ice_rss.h +++ b/sys/dev/ice/ice_rss.h @@ -68,14 +68,6 @@ CTASSERT(ICE_AQC_GET_SET_RSS_KEY_DATA_RSS_KEY_SIZE >= RSS_KEYSIZE); #define RSS_HASHTYPE_RSS_UDP_IPV6 (1 << 9) /* IPv6 UDP 4-tuple */ #define RSS_HASHTYPE_RSS_UDP_IPV6_EX (1 << 10) /* IPv6 UDP 4-tuple + ext hdrs */ -#define ICE_DEFAULT_RSS_HASH_CONFIG \ - ((u_int)(RSS_HASHTYPE_RSS_IPV4 | \ - RSS_HASHTYPE_RSS_TCP_IPV4 | \ - RSS_HASHTYPE_RSS_UDP_IPV4 | \ - RSS_HASHTYPE_RSS_IPV6 | \ - RSS_HASHTYPE_RSS_TCP_IPV6 | \ - RSS_HASHTYPE_RSS_UDP_IPV6)) - #define rss_getkey(key) ice_get_default_rss_key(key) #define rss_getnumbuckets() (mp_ncpus) #define rss_get_indirection_to_bucket(index) (index) @@ -113,4 +105,12 @@ rss_hash2bucket(uint32_t hash_val, uint32_t hash_type, uint32_t *bucket_id) #endif /* !RSS */ +#define ICE_DEFAULT_RSS_HASH_CONFIG \ + ((u_int)(RSS_HASHTYPE_RSS_IPV4 | \ + RSS_HASHTYPE_RSS_TCP_IPV4 | \ + RSS_HASHTYPE_RSS_UDP_IPV4 | \ + RSS_HASHTYPE_RSS_IPV6 | \ + RSS_HASHTYPE_RSS_TCP_IPV6 | \ + RSS_HASHTYPE_RSS_UDP_IPV6)) + #endif /* _ICE_COMMON_COMPAT_H_ */ From nobody Wed Nov 13 17:11:29 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpVDx3RT6z5cLYs; Wed, 13 Nov 2024 17:11: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XpVDx2yqfz56Fq; Wed, 13 Nov 2024 17:11:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731517889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C2NqQN8iSIzdnZXTrqblKQaUWguvcJSFsKnDCEu7bW4=; b=vWaAhssJ/ydxGTVCEVrcTpwFMRFwUMQHIoG6KZMk1klvaZMO41t0VnCrull65IRCvxQnYv I3YnibAIZzFpWTjolCy9dQlWtUpHr94gLWuGTbv/7cGyD9g0qHwFl8l8aGKPOHUEPkr3u2 VPfHVtUVl/wFSyYJD0v7CgVYBjbLA9xZXQpyXWQREFLTuePjXQpnAZKHHKj/i42UFPGgtA J+sfGiuLfO7iRC5wlRLUaMVKXNBHrNrkjPfb6kn3UKN4T8g29nq0kBYH/WhgrIzBKv4jJO Rnnfk0ar6+IhpGZWtcQCimt4bK4GJoKDmhnoLUJbOtPDnGhPMjMqf0BI4nyMDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731517889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C2NqQN8iSIzdnZXTrqblKQaUWguvcJSFsKnDCEu7bW4=; b=UWoZKZOIwyMFpiY+fukEfptLVjP8LqY5StGgnnTWkeKmUFVeo3dplUYyfD2uslsPvZczI6 yU8xGz3jyNgvTHRFnCQaSdl2CJz3GALrY8RIyf9ClHyx8Zkr8X+AAIt4G3e5GkA+lOantJ YpUosuohY+WWyhuk0MFAtexEadxkn3rkjxb1AYUZDYV4DF7v70FKA7nUWFaIq7vvaBFFnS wK6dtpO40SHw4xpi/vagThAlAsMyB+L5iKTn8hzxXPwTa+aGhViHB20jYgB/ydb/Ny0y/h AjEaYfdQ009da0NwbWXniYM0Y8n58pCgiCjeMEySGFK4b3FAa3vG181WdgzIYw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731517889; a=rsa-sha256; cv=none; b=twARxX5kwejadJuYdM26/UAH+yw8lOkZT5VgOVC3TLitAr6+zi8urG6n6NAn2mKrlIKEz7 V1v4dNxUFzAcK59eKYBra1vleGLL6CfXTMw6l94LPl6Wg6oq6J6UhKnst8+GN1hO4BvzHH esI7qNuzt2Quhhjc4wM+GtiOahm0yYTsWDF7HjnwOYn1G+FaB+PIgn0Getm/xj9S0CHNnW xrmQ/QPViQIYdWvCgXBYLBRJDo6+6MTPHkY+rnq2sFI6OAkfi5fnOI8tVmcDHx19ZgMHra ezvHMolQVSmLFPEXan+zcTPy0S0jQMD0Ig2URxRDjAhtr98wy2HN3A1W/nDFrQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XpVDx2ZYkz13b4; Wed, 13 Nov 2024 17:11:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ADHBTRe087296; Wed, 13 Nov 2024 17:11:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ADHBTE9087293; Wed, 13 Nov 2024 17:11:29 GMT (envelope-from git) Date: Wed, 13 Nov 2024 17:11:29 GMT Message-Id: <202411131711.4ADHBTE9087293@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 727de621c5f0 - main - pci_user.c: Cosmetic 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 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: 727de621c5f07681034eed2d6ce3662a8239e987 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=727de621c5f07681034eed2d6ce3662a8239e987 commit 727de621c5f07681034eed2d6ce3662a8239e987 Author: John Baldwin AuthorDate: 2024-11-13 16:07:03 +0000 Commit: John Baldwin CommitDate: 2024-11-13 16:10:27 +0000 pci_user.c: Cosmetic fixes Correct leading whitespace for a few lines. Consistently use more canonical #ifdef to test for COMPAT_FREEBSD32. Obtained from: CheriBSD Sponsored by: AFRL, DARPA --- sys/dev/pci/pci_user.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/sys/dev/pci/pci_user.c b/sys/dev/pci/pci_user.c index aedf3409fc6e..f68b5b7e71ff 100644 --- a/sys/dev/pci/pci_user.c +++ b/sys/dev/pci/pci_user.c @@ -692,7 +692,7 @@ pci_conf_size(u_long cmd) static void pci_conf_io_init(struct pci_conf_io *cio, caddr_t data, u_long cmd) { -#if defined(COMPAT_FREEBSD32) +#ifdef COMPAT_FREEBSD32 struct pci_conf_io32 *cio32; #endif @@ -709,17 +709,17 @@ pci_conf_io_init(struct pci_conf_io *cio, caddr_t data, u_long cmd) #ifdef PRE7_COMPAT case PCIOCGETCONF_FREEBSD6_32: #endif - cio32 = (struct pci_conf_io32 *)data; - cio->pat_buf_len = cio32->pat_buf_len; - cio->num_patterns = cio32->num_patterns; - cio->patterns = (void *)(uintptr_t)cio32->patterns; - cio->match_buf_len = cio32->match_buf_len; - cio->num_matches = cio32->num_matches; - cio->matches = (void *)(uintptr_t)cio32->matches; - cio->offset = cio32->offset; - cio->generation = cio32->generation; - cio->status = cio32->status; - return; + cio32 = (struct pci_conf_io32 *)data; + cio->pat_buf_len = cio32->pat_buf_len; + cio->num_patterns = cio32->num_patterns; + cio->patterns = (void *)(uintptr_t)cio32->patterns; + cio->match_buf_len = cio32->match_buf_len; + cio->num_matches = cio32->num_matches; + cio->matches = (void *)(uintptr_t)cio32->matches; + cio->offset = cio32->offset; + cio->generation = cio32->generation; + cio->status = cio32->status; + return; #endif default: @@ -733,7 +733,7 @@ pci_conf_io_update_data(const struct pci_conf_io *cio, caddr_t data, u_long cmd) { struct pci_conf_io *d_cio; -#if defined(COMPAT_FREEBSD32) +#ifdef COMPAT_FREEBSD32 struct pci_conf_io32 *cio32; #endif @@ -1172,7 +1172,7 @@ pci_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *t */ cio->status = PCI_GETCONF_ERROR; error = EINVAL; - goto getconfexit; + goto getconfexit; } /* From nobody Wed Nov 13 17:11:30 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpVDy4Yx2z5cLYt; Wed, 13 Nov 2024 17:11: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XpVDy40hhz56V9; Wed, 13 Nov 2024 17:11:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731517890; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OvD464P7mh2cF3WCP1j4ONXtHoQxM6CPcbx55qJEdLo=; b=l8a0X+tjQCAZDL0B89speS1XSNp9vtYV3Gakda2/ZAF7qWVK2T647V192F3gQlJAo94WCn xN3wjLd7b3uED51DsQGMENQUojfwp0YYxrNhjitZwadPhYPfE6M6XmfOCgK4uF16FwMGrF sPXgxCw+YnFAODAxwWnLU9BIKUjka7Y2L8MrSB63pogTxWkIzrWCy/90nifuAaTNZnQ7yR LNsf3EuzlRo4YXbZTSefQ4PHESQR+928zqJMU6g4iVOzia0WrnVKV+wvjl+CbImSJ52Upa RVeaxm0pbZZqugaW3+s9fn0xRyWtldTaxtaRhB2d9keXdiW58NvZ3kans+/W7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731517890; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OvD464P7mh2cF3WCP1j4ONXtHoQxM6CPcbx55qJEdLo=; b=DM+EIg/PWUFpNySMByHfSXNDJMldoXghjuYQ0trp3LCkm1hyYj4ujyLVs0rpfacvRsyBTU T9PxM+Iks4O8BXmy5kxuju0u+7XsfHnyZFxLt7eiFZSS3wyGFYsDStAPoUVFfi89MdFshq mJUe17+m3rmSY00jDghFs6zBWKjcA7IERMUcrrzULO5dizOaxkT01Pm4n5BuWMPvwAoRmi u8sXuFC+swACKTc3PEp5GxzglrQbKRRc05WByftJihtbPM2etwcSJw/qWiUY9u1jH1UtD+ Yng2Z1ZsKu4fUx4qDRYghW/9RZseLyjgTvgETLYN4ANr9w3S9fKJJX2GSrE6aQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731517890; a=rsa-sha256; cv=none; b=g1+Vp6Dmu1qMWOWrb36KxwM3jiKLp13McQtoBACSAXRIje8bZ0XglPjmIt5CbSMWYEYs4V OPq3+o4N0+/WElTsY6g401HOoDXH8VZyaoejNTmXbULKha00bH5PNsP3fjg4AGUC0kYCsE 3Z4fiRrX1aAC1PYqU7OIgR0X24bVndpy7DEnxb+o0Zj7yXh/5+eT3iF+TYbE/4U6/fg1yt /E4Ol4bRdhfMfEsUSgBgE4iohZ0TG7LFyDfWtU7jdq8gxoYU56S0newZOdoS/X8wxqD03E ORde+QmNJHw2svNLF6Ac+hh9pzNlOP3NjrTn0fAwL9bD/CB7K1HUbtlA+ugdgQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XpVDy3cYGz13Mj; Wed, 13 Nov 2024 17:11:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ADHBUbn087361; Wed, 13 Nov 2024 17:11:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ADHBURH087358; Wed, 13 Nov 2024 17:11:30 GMT (envelope-from git) Date: Wed, 13 Nov 2024 17:11:30 GMT Message-Id: <202411131711.4ADHBURH087358@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: c55e4971d9dc - main - RELNOTES: Document that grep no longer follows symlinks 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 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: c55e4971d9dccf5d5cd5902b258955b47932a877 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c55e4971d9dccf5d5cd5902b258955b47932a877 commit c55e4971d9dccf5d5cd5902b258955b47932a877 Author: John Baldwin AuthorDate: 2024-11-13 17:10:39 +0000 Commit: John Baldwin CommitDate: 2024-11-13 17:10:39 +0000 RELNOTES: Document that grep no longer follows symlinks by default Requested by: markj --- RELNOTES | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/RELNOTES b/RELNOTES index 71dea5561ed6..6441bffcb358 100644 --- a/RELNOTES +++ b/RELNOTES @@ -34,6 +34,11 @@ a1da7dc1cdad: be spliced together, enabling proxy-like functionality without the need to copy data in and out of user memory. +fc12c191c087: + grep(1) no longer follows symbolic links by default for + recursive searches. This matches the documented behavior in + the manual page. + e962b37bf0ff: When running bhyve(8) guests with a boot ROM, i.e., bhyveload(8) is not used, bhyve now assumes that the boot ROM will enable PCI BAR decoding. From nobody Wed Nov 13 17:45:27 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpW072f35z5cMcQ; Wed, 13 Nov 2024 17:45: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XpW0721nZz59D4; Wed, 13 Nov 2024 17:45:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731519927; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uT4gZFtUjmWV39Y8Z5wl8gQDbm6epmEsCBu33R4nJAw=; b=heTWhebNIDc5kNcRtHZ5MARB5J1FBLpzow2cniX0l4wVnz2P3sfcOWm9BgovJ1ZAPWNUdb E9cLra7g0bc1jUZzwQFDIeJmCjbT9UxMJZWs6GPoC9O13cHEoO3rd/nCJw2wP+hQjlKtex A3GjvH0e1lXsBEk3ez4yDi0Jd3TgSLa/RcWZUqXpQAU86VWZxWHTUapd5zyBWhu4bmcbNk HWT/XNTxms+752xuTPk88Ij8TI+1+fsJMRq0ofjPxWhkF9zNLwY6l95i3OvrQO6hCDqlV9 gVdLd5O2ClengU3UoAWPxpuok6XUE3l7CqNtVm8VF67ieMO+QU6Th+p8GXN3DQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731519927; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uT4gZFtUjmWV39Y8Z5wl8gQDbm6epmEsCBu33R4nJAw=; b=R9rD+GaEISbCkctJVygamxnjm+uciGe2aoxU5j/e2WlPRUHljBYq3nhy+mRRDlOUnF2slw LIYnEtgGblz9ZmmpqGgqQ2kTYl2jS7kbsF4dvW2CBCBHyGuHYrauYn3og/ge3TsSpwFyz3 fzREmxwcYY5wypTfuqVPNTwvqhRreQc2pLzV6ENWQOkq0CmJqvtOKZI8ueZFqeiyf5pNyi O2YtI9GT9hm+cCEqYDVQWxT1mPBwhvTpwJ7iuf7SvUsmPc1OcvBxAEEniCLxVrRNomWG/n URmYNMG00CW0hVerEUU4GXASBoc5O7BESImhlXQfA6fPtUq1B7apKuJc1xr2Lg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731519927; a=rsa-sha256; cv=none; b=ILVsOcXGlhChXIEmoQeNR9qJ8WFrctVR7xHBPxki1kpPloUhDE7Pky3WubLIQ+ufue/wrc htgT7M2T0cPDulVnOMsmAxfPgBUKL8Ho9MlJAyIs33CNp9QiWWtQnysa7RffGcuYqYrRYV G98EnltlOyd5uB8+OlFAhn2TRggUe47DF1TNkxBAA8xPOtRSXALzMHiSFk6pPNc/Fs6zP4 p5FqysxYYRdYsQAAYsJdKP/GTDNymCj24yeKP8yibDo/Y6YJiFSFBGyMP3RfBEOHtN77p9 OAYaQi6kE1BmYNjsIs7P6fgSbn5SIQH/pJh65l0Ub1dvjY72vyto84S2oifZgA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XpW071Rffz144S; Wed, 13 Nov 2024 17:45:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ADHjRZF046334; Wed, 13 Nov 2024 17:45:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ADHjRci046330; Wed, 13 Nov 2024 17:45:27 GMT (envelope-from git) Date: Wed, 13 Nov 2024 17:45:27 GMT Message-Id: <202411131745.4ADHjRci046330@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 75af1320f4b5 - main - build: note that MAKEOBJDIRPREFIX must be absolute List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 75af1320f4b57fb568ec4f6df6171a0343953f4f Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=75af1320f4b57fb568ec4f6df6171a0343953f4f commit 75af1320f4b57fb568ec4f6df6171a0343953f4f Author: Ed Maste AuthorDate: 2024-11-13 15:13:51 +0000 Commit: Ed Maste CommitDate: 2024-11-13 17:45:09 +0000 build: note that MAKEOBJDIRPREFIX must be absolute PR: 282711 Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D47538 --- share/man/man7/build.7 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/share/man/man7/build.7 b/share/man/man7/build.7 index afafef9d3c02..ca0d72e89c67 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 June 4, 2024 +.Dd November 13, 2024 .Dt BUILD 7 .Os .Sh NAME @@ -512,6 +512,8 @@ and not via or .Pa /etc/src.conf or the command line. +.Va MAKEOBJDIRPREFIX +must specify an absolute path. .It Va WITHOUT_WERROR If defined, compiler warnings will not cause the build to halt, even if the makefile says otherwise. From nobody Wed Nov 13 18:06:50 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpWSp6d3jz5cPZw; Wed, 13 Nov 2024 18:06: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XpWSp651Jz412D; Wed, 13 Nov 2024 18:06:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731521210; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1MBNOI1f/ABEz8et2CfQPbB0GYA45xY9NCNo6cz2LTg=; b=UkOQrrLTr2f5OKihTS90ZM2O2gjmKOtnBEKyQTLuldtgp0FL72KGABsbe2egU8MKbjwO3Y yFa1/5WtrY1VkWfLsBY2PhVKgndqjJK5Lvpx8kseeVli/aogHvuBBbOzaDHfEgxF/cNGu6 os9wk94OZYIWMU+1CzGgM7QmrzJM8l5SmeD4/wNRyhXkN8GfqsIRacAN2zOxnEEbmmzytP 2TnM/1+hACF+rQ8Mcnq7DoYtPCV4ikMG3EhDuT+kRDsl3MW/djnZVWKUVM71tCYxIcURVQ bpv6IqLyBhPcSAAfJTbYoGZxuMPf4EbkZWnhSKiNh4nXw+zvrIadC92hxghQQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731521210; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1MBNOI1f/ABEz8et2CfQPbB0GYA45xY9NCNo6cz2LTg=; b=M4uuBmwYxJHgW5HReImlZW/wfdQCKt0P+T6BnbQsdFgB7LwnkHWJWvf+l1bQmuTfiqKela r2sZy8O7rdsVrZWuXOhMm8ubprlmIoeXj0yWzKgQ2Q83hxHzv0uPjCx97YxaN5HzSUmHQV PQucNWHEtGoAZzFwOLHH05ocWi7IwusgAiGMsw67lQDlnOCa6yYphkIoaW82mo+lBNqRDh WyvX9SYJqMgztvA8F6f3LDURimb+5B0Fj96w497FaOpitygXk9ugjnv6uUGD/7WhlCUGeP HmVMHRj6JeIcvTw94/3RPZ8nbTmrkvJSrrfbCuPIHGym3bL3z3NIgsuMz7FJzg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731521210; a=rsa-sha256; cv=none; b=ZqTBrFM/10lbhqu+eKkozlJZ5KmY8/fprFYp1ufBBplkAK+it8BGO2do26E7o7BUN0CPxR 8PNYmlr0iyJgtxfpq55O8ktPzl2MBGI+QEbtfjgULjH6UnK68OwBO6Aj74M1ZID47B6cTr sMQg710eieEy+Gu4bR1LWCqS23LIW1Oxb8g1zkEtKecTPP/zKolRl/cDqrtVDlfK16v27p HJjyK/faGE+h9ElkcULAQfjik0m0Isose2xthJC9+f+kLVyVxS6/6o//Yi12aRbg+ok4Sh HA6PYUebIhhkA0B4ixfJCHr9DYv8jeDwEwvvMuf4mhKQO7XDfYZwE6oh17+PGw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XpWSp5Fx9z14nL; Wed, 13 Nov 2024 18:06:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ADI6oO7085287; Wed, 13 Nov 2024 18:06:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ADI6o2H085284; Wed, 13 Nov 2024 18:06:50 GMT (envelope-from git) Date: Wed, 13 Nov 2024 18:06:50 GMT Message-Id: <202411131806.4ADI6o2H085284@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 300d034b3c29 - releng/14.2 - device_pager: rename the un_pager.devp.dev field to handle List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.2 X-Git-Reftype: branch X-Git-Commit: 300d034b3c29972c7f9e073c322a95dff510e89b Auto-Submitted: auto-generated The branch releng/14.2 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=300d034b3c29972c7f9e073c322a95dff510e89b commit 300d034b3c29972c7f9e073c322a95dff510e89b Author: Konstantin Belousov AuthorDate: 2024-11-04 22:10:06 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-13 18:06:28 +0000 device_pager: rename the un_pager.devp.dev field to handle (cherry picked from commit f0c07fe3d0007a4499f81583a99598cd0a74d45b) (cherry picked from commit c57dc755fa1a8bb0a4190f60df02b2bce5b8033c) Approved by: re (cperciva) --- sys/kern/kern_proc.c | 2 +- sys/vm/device_pager.c | 20 ++++++++++---------- sys/vm/vm_object.c | 2 +- sys/vm/vm_object.h | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index b8bc1a7e5dfe..18302bb8abae 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -2720,7 +2720,7 @@ kern_proc_vmmap_out(struct proc *p, struct sbuf *sb, ssize_t maxlen, int flags) kve->kve_shadow_count = obj->shadow_count; if (obj->type == OBJT_DEVICE || obj->type == OBJT_MGTDEVICE) { - cdev = obj->un_pager.devp.dev; + cdev = obj->un_pager.devp.handle; if (cdev != NULL) { csw = dev_refthread(cdev, &ref); if (csw != NULL) { diff --git a/sys/vm/device_pager.c b/sys/vm/device_pager.c index cb3b0e522d9a..bceff38a41c3 100644 --- a/sys/vm/device_pager.c +++ b/sys/vm/device_pager.c @@ -121,8 +121,8 @@ cdev_pager_lookup(void *handle) again: mtx_lock(&dev_pager_mtx); object = vm_pager_object_lookup(&dev_pager_object_list, handle); - if (object != NULL && object->un_pager.devp.dev == NULL) { - msleep(&object->un_pager.devp.dev, &dev_pager_mtx, + if (object != NULL && object->un_pager.devp.handle == NULL) { + msleep(&object->un_pager.devp.handle, &dev_pager_mtx, PVM | PDROP, "cdplkp", 0); vm_object_deallocate(object); goto again; @@ -186,8 +186,8 @@ again: object1->type = OBJT_DEAD; vm_object_deallocate(object1); object1 = NULL; - if (object->un_pager.devp.dev == NULL) { - msleep(&object->un_pager.devp.dev, + if (object->un_pager.devp.handle == NULL) { + msleep(&object->un_pager.devp.handle, &dev_pager_mtx, PVM | PDROP, "cdplkp", 0); vm_object_deallocate(object); goto again; @@ -221,7 +221,7 @@ again: mtx_lock(&dev_pager_mtx); TAILQ_REMOVE(&dev_pager_object_list, object, pager_object_list); - wakeup(&object->un_pager.devp.dev); + wakeup(&object->un_pager.devp.handle); mtx_unlock(&dev_pager_mtx); object->type = OBJT_DEAD; vm_object_deallocate(object); @@ -231,14 +231,14 @@ again: mtx_lock(&dev_pager_mtx); object->flags |= OBJ_COLORED; object->pg_color = color; - object->un_pager.devp.dev = handle; - wakeup(&object->un_pager.devp.dev); + object->un_pager.devp.handle = handle; + wakeup(&object->un_pager.devp.handle); } } MPASS(object1 == NULL); } else { - if (object->un_pager.devp.dev == NULL) { - msleep(&object->un_pager.devp.dev, + if (object->un_pager.devp.handle == NULL) { + msleep(&object->un_pager.devp.handle, &dev_pager_mtx, PVM | PDROP, "cdplkp", 0); vm_object_deallocate(object); goto again; @@ -292,7 +292,7 @@ dev_pager_dealloc(vm_object_t object) vm_page_t m; VM_OBJECT_WUNLOCK(object); - object->un_pager.devp.ops->cdev_pg_dtor(object->un_pager.devp.dev); + object->un_pager.devp.ops->cdev_pg_dtor(object->un_pager.devp.handle); mtx_lock(&dev_pager_mtx); TAILQ_REMOVE(&dev_pager_object_list, object, pager_object_list); diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index 06dae7de3baa..5933b2c1d4bd 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -2611,7 +2611,7 @@ vm_object_list_handler(struct sysctl_req *req, bool swap_only) kvo->kvo_swapped = sp > UINT32_MAX ? UINT32_MAX : sp; } if (obj->type == OBJT_DEVICE || obj->type == OBJT_MGTDEVICE) { - cdev = obj->un_pager.devp.dev; + cdev = obj->un_pager.devp.handle; if (cdev != NULL) { csw = dev_refthread(cdev, &ref); if (csw != NULL) { diff --git a/sys/vm/vm_object.h b/sys/vm/vm_object.h index 9921f1130e8c..16ee3544b658 100644 --- a/sys/vm/vm_object.h +++ b/sys/vm/vm_object.h @@ -139,7 +139,7 @@ struct vm_object { struct { TAILQ_HEAD(, vm_page) devp_pglist; const struct cdev_pager_ops *ops; - struct cdev *dev; + void *handle; } devp; /* From nobody Wed Nov 13 18:06:51 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpWSr0q28z5cPgJ; Wed, 13 Nov 2024 18:06: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XpWSq6jfCz41JF; Wed, 13 Nov 2024 18:06:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731521211; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FmmEstSn2l4eTHZ2bZDwpiCscYbST1L5s+iymwYPRpw=; b=Bs+wlvkwFPwso0wIsESHXVYet1Yc3FlHSIb2sa4toFZjgPvluVCFzGIHLgtcgACQd5Gcdc asAa/hmGQEYHoeG1CyigxaC2j6q71k+Fs/t4FDDl4VMO8DZIDO+htnUVYEnVSIpEVAx3mB 2mfajvk8daqvCwojn5Kmar1mDg2zKYUmP7dU8GW6Q3avy3AuUwk85DW0Yeu0CFXOb70jzH aK0MW4zsEEKLGf2ZJDmXfEzdLkvXiw7OOJEvsktDhAZuvpSyk6CUKXcIFC0gpQ+4HZ5YHu Ae1DkPz+PdHNene2KtWyxHX++NuRRUYP4FfJl00UJEEalLj19P9WghBGmZ7thw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731521211; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FmmEstSn2l4eTHZ2bZDwpiCscYbST1L5s+iymwYPRpw=; b=FF2/OViIGJGLdceP9NhCli5K5xV9p5zSZWEn+LJbmNX7AOJeHPTazrYzzv3dHslI+hw9dr RWX+xsY3dxmA5YadB8EmndWBgvaCRVs3VhJr827pSeNrxVLC/hPaa7rJaEuakTcACgHmsj we5jyB/bN5ApU2WqqYmuK6AyHU+5mm6D2NTXdsx/GnTt+GMETRVcDZa775OFl9AaXPONoL pQneuk14OIvmeJ7ME5xaIvEokrnUTbLrA2ccqgJapcBfbLdiv5/vivPuBO990GElecTHlT 0RPx9ap7hwGoMvBSUhqkXIPvt3xiJ9dtAOnthFq0h2pQW6HdXQHPuXBGcj1jpw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731521211; a=rsa-sha256; cv=none; b=v54dKunIyJX8pmxPeoSS5cihAIiSmQbjI5uA/NJUAgtX8w5fcR9A0kCfdATKbHayGILdJy vnt9RHFrJEsU2SiNsRA6AsIhlmBmcumcf5HdX80tdB0dwzifZBi/RyBeL0QHhNDCVXk0B9 J+Tqk4sKCnrTPFQuQltd1rb3VQ/oobN329vVXa5AQwyON0McGICVxb4T1HvMBShWe6SsZ2 HisQ3F64Jk7uB9FAi1Uimn7eESqe8DOK4sEDOebZXslAjpTI0CJ+l2AfvYxuOOp8XR7Xmw 4Qld5ZD+K2wgFSiEFHK1IYfDX97oGjGs1Iz8j1Q+uXK+CFPX1FuNLvEOyD2w5A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XpWSq62Sbz14nM; Wed, 13 Nov 2024 18:06:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ADI6pCY085346; Wed, 13 Nov 2024 18:06:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ADI6pwe085343; Wed, 13 Nov 2024 18:06:51 GMT (envelope-from git) Date: Wed, 13 Nov 2024 18:06:51 GMT Message-Id: <202411131806.4ADI6pwe085343@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 19d23cb8acc9 - releng/14.2 - vm_object: do not assume that un_pager.devp.dev is cdev List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.2 X-Git-Reftype: branch X-Git-Commit: 19d23cb8acc934a9bb5ca46375da4cc5c4d2094c Auto-Submitted: auto-generated The branch releng/14.2 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=19d23cb8acc934a9bb5ca46375da4cc5c4d2094c commit 19d23cb8acc934a9bb5ca46375da4cc5c4d2094c Author: Konstantin Belousov AuthorDate: 2024-11-04 21:54:30 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-13 18:06:36 +0000 vm_object: do not assume that un_pager.devp.dev is cdev PR: 282533 Approved by: re (cperciva) (cherry picked from commit 580340dbdaaf372867e9ed3dd257430982753e5e) (cherry picked from commit 92a9501b6be3d37a4eefcfbdda799b656ae146e8) --- sys/kern/kern_proc.c | 5 +++-- sys/vm/vm_mmap.c | 3 +++ sys/vm/vm_object.c | 3 ++- sys/vm/vm_object.h | 1 + 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index 18302bb8abae..b7fa7bfb60e9 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -2718,8 +2718,9 @@ kern_proc_vmmap_out(struct proc *p, struct sbuf *sb, ssize_t maxlen, int flags) kve->kve_ref_count = obj->ref_count; kve->kve_shadow_count = obj->shadow_count; - if (obj->type == OBJT_DEVICE || - obj->type == OBJT_MGTDEVICE) { + if ((obj->type == OBJT_DEVICE || + obj->type == OBJT_MGTDEVICE) && + (obj->flags & OBJ_CDEVH) != 0) { cdev = obj->un_pager.devp.handle; if (cdev != NULL) { csw = dev_refthread(cdev, &ref); diff --git a/sys/vm/vm_mmap.c b/sys/vm/vm_mmap.c index 6b0a70d523d5..21ec52b8124f 100644 --- a/sys/vm/vm_mmap.c +++ b/sys/vm/vm_mmap.c @@ -1435,6 +1435,9 @@ vm_mmap_cdev(struct thread *td, vm_size_t objsize, vm_prot_t prot, td->td_ucred); if (obj == NULL) return (EINVAL); + VM_OBJECT_WLOCK(obj); + vm_object_set_flag(obj, OBJ_CDEVH); + VM_OBJECT_WUNLOCK(obj); *objp = obj; *flagsp = flags; return (0); diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index 5933b2c1d4bd..84e56b910809 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -2610,7 +2610,8 @@ vm_object_list_handler(struct sysctl_req *req, bool swap_only) sp = swap_pager_swapped_pages(obj); kvo->kvo_swapped = sp > UINT32_MAX ? UINT32_MAX : sp; } - if (obj->type == OBJT_DEVICE || obj->type == OBJT_MGTDEVICE) { + if ((obj->type == OBJT_DEVICE || obj->type == OBJT_MGTDEVICE) && + (obj->flags & OBJ_CDEVH) != 0) { cdev = obj->un_pager.devp.handle; if (cdev != NULL) { csw = dev_refthread(cdev, &ref); diff --git a/sys/vm/vm_object.h b/sys/vm/vm_object.h index 16ee3544b658..bd71820bed3c 100644 --- a/sys/vm/vm_object.h +++ b/sys/vm/vm_object.h @@ -206,6 +206,7 @@ struct vm_object { #define OBJ_PAGERPRIV2 0x00008000 /* Pager private */ #define OBJ_SYSVSHM 0x00010000 /* SysV SHM */ #define OBJ_POSIXSHM 0x00020000 /* Posix SHM */ +#define OBJ_CDEVH 0x00040000 /* OBJT_DEVICE handle is cdev */ /* * Helpers to perform conversion between vm_object page indexes and offsets. From nobody Wed Nov 13 19:29:31 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpYJD0hCRz5cTs9; Wed, 13 Nov 2024 19:29: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XpYJD03bjz45T5; Wed, 13 Nov 2024 19:29:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731526172; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tH4V3dYZTeWRaXujU6qD/eA1qDU5k9FBxQu5iSPEC3o=; b=wHdEEOiTaXq4gTMkGi+alcta9u7QFO4PKBakXyYdtguB37Cbsacjj9/ADhuxkJXcrKZMdr qYejV15QdWgTXJBLOQeyRK+/kVemN912qrHGwiVbIZS6hl1qjPB3fDvBKIXoic387jzSeN R1vFLCwINmqL6SqbA0LDnJfAjI60oJ1yFg6YgPkFij72Dt9lPwXbYFlm5XzAaQJkeVmBQp 9unE7ieCT9Csx6rEjahRfBjiZKsG63gBQYwjLgTEhsbfUjQ03Mgj0tMocxVw2ejpbuh5Jx bIXsGx14Es3Lv2/RpxPb5qoDiyk/nJxiKQ9BnCINccIVPn4hiCEDBSifXFJ4bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731526172; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tH4V3dYZTeWRaXujU6qD/eA1qDU5k9FBxQu5iSPEC3o=; b=ZJjtK92mn2WvEyBuer1wGxsW0p507OQn/bdBPW8fSfzTSc2wh/kgEb88gPJX4eZWBro7A7 6G3b5DYL5g9Qr0WQWAixXdJ+yCwGllQm5OjwSd6UkkghCdiH4l5i9vUG6G/HP47EVVmjlv ksLxGhsNiQYxHieU6mMcXhOjjL+wTresGZPAmqMPp8F8+f4d1mXEWmjl5KDWLXbI1Yc8T/ 5pM+s7s7Iiq4fzMeIcfP/Oc0A2uY//FbPdnHvFi570KgdI55QuA4qK0sQXPeSzi+rgirtm +Q74OvepPKUB6BCtIJz9UL0HjN2RV+8WeC54XNPN7CORmpmZKSkSF8x7AYc5mw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731526172; a=rsa-sha256; cv=none; b=KV/iR89C0j52kylmzs3SeNSXXXmMmbp+mjuHQPpybgw/hVy6rgfijWJyGYPYFSdkwgAcO2 yNdGYGgE6CrVFd/ViM7yjpWSk0fb7VJyYE/3VhV9kTZWMLK88Onk0YydjeJCmgK9j3MTeN aSRSeM1YsHkCWOvEYAmAovoekyd3A35bLJ0ioifIQS7wWNYPVrsHPKj20W0zGg2sujAOa0 LmJl5OcpjJnCxWcqToZI3rkarxzMDjCZONyCiLuar15flULsaV57kliqgDgpGcf30xNRTe ypRNKb/MmfTvGBNK6SRgFln0+mLKAqQWM1M3n6juGRlxKnUoeBMq+Cf2xH1rNg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XpYJC6mjqz15jQ; Wed, 13 Nov 2024 19:29:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ADJTVQM033342; Wed, 13 Nov 2024 19:29:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ADJTV8g033339; Wed, 13 Nov 2024 19:29:31 GMT (envelope-from git) Date: Wed, 13 Nov 2024 19:29:31 GMT Message-Id: <202411131929.4ADJTV8g033339@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Justin Hibbits Subject: git: 84d7ec4c657f - main - bnxt: Use IfAPI accessors where able List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 84d7ec4c657f406c6cbd29baf32c8e057b663d17 Auto-Submitted: auto-generated The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=84d7ec4c657f406c6cbd29baf32c8e057b663d17 commit 84d7ec4c657f406c6cbd29baf32c8e057b663d17 Author: Justin Hibbits AuthorDate: 2024-10-31 14:04:11 +0000 Commit: Justin Hibbits CommitDate: 2024-11-13 19:30:58 +0000 bnxt: Use IfAPI accessors where able Summary: Don't directly access ifnet members, it's a private structure. Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D47353 --- sys/dev/bnxt/bnxt_re/bnxt_re.h | 4 ++-- sys/dev/bnxt/bnxt_re/ib_verbs.c | 6 +++--- sys/dev/bnxt/bnxt_re/main.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/dev/bnxt/bnxt_re/bnxt_re.h b/sys/dev/bnxt/bnxt_re/bnxt_re.h index 56b3c8c0488c..fe7a27f4e216 100644 --- a/sys/dev/bnxt/bnxt_re/bnxt_re.h +++ b/sys/dev/bnxt/bnxt_re/bnxt_re.h @@ -946,8 +946,8 @@ int bnxt_re_setup_cnp_cos(struct bnxt_re_dev *rdev, bool reset); static inline enum ib_port_state bnxt_re_get_link_state(struct bnxt_re_dev *rdev) { - if (rdev->netdev->if_drv_flags & IFF_DRV_RUNNING && - rdev->netdev->if_link_state == LINK_STATE_UP) + if (if_getdrvflags(rdev->netdev) & IFF_DRV_RUNNING && + if_getlinkstate(rdev->netdev) == LINK_STATE_UP) return IB_PORT_ACTIVE; return IB_PORT_DOWN; } diff --git a/sys/dev/bnxt/bnxt_re/ib_verbs.c b/sys/dev/bnxt/bnxt_re/ib_verbs.c index 8d43fa96c048..0383a16757aa 100644 --- a/sys/dev/bnxt/bnxt_re/ib_verbs.c +++ b/sys/dev/bnxt/bnxt_re/ib_verbs.c @@ -299,7 +299,7 @@ int bnxt_re_query_port(struct ib_device *ibdev, u8 port_num, if (port_attr->state == IB_PORT_ACTIVE) port_attr->phys_state = IB_PORT_PHYS_STATE_LINK_UP; port_attr->max_mtu = IB_MTU_4096; - port_attr->active_mtu = iboe_get_mtu(rdev->netdev->if_mtu); + port_attr->active_mtu = iboe_get_mtu(if_getmtu(rdev->netdev)); port_attr->gid_tbl_len = dev_attr->max_sgid; port_attr->port_cap_flags = IB_PORT_CM_SUP | IB_PORT_REINIT_SUP | IB_PORT_DEVICE_MGMT_SUP | @@ -2118,7 +2118,7 @@ static int bnxt_re_init_qp_attr(struct bnxt_re_qp *qp, struct bnxt_re_pd *pd, qplqp->max_rd_atomic = dev_attr->max_qp_rd_atom; qplqp->max_dest_rd_atomic = dev_attr->max_qp_init_rd_atom; } - qplqp->mtu = ib_mtu_enum_to_int(iboe_get_mtu(rdev->netdev->if_mtu)); + qplqp->mtu = ib_mtu_enum_to_int(iboe_get_mtu(if_getmtu(rdev->netdev))); qplqp->dpi = &rdev->dpi_privileged; /* Doorbell page */ if (init_attr->create_flags) { dev_dbg(rdev_to_dev(rdev), @@ -2691,7 +2691,7 @@ int bnxt_re_modify_qp(struct ib_qp *ib_qp, struct ib_qp_attr *qp_attr, /* MTU settings allowed only during INIT -> RTR */ if (qp_attr->qp_state == IB_QPS_RTR) { - bnxt_re_init_qpmtu(qp, rdev->netdev->if_mtu, qp_attr_mask, qp_attr, + bnxt_re_init_qpmtu(qp, if_getmtu(rdev->netdev), qp_attr_mask, qp_attr, &is_qpmtu_high); if (udata && !ib_copy_from_udata(&ureq, udata, sizeof(ureq))) { if (ureq.comp_mask & BNXT_RE_COMP_MASK_MQP_EX_PATH_MTU_MASK) { diff --git a/sys/dev/bnxt/bnxt_re/main.c b/sys/dev/bnxt/bnxt_re/main.c index e6c6f754ea47..3d26d21f3fc7 100644 --- a/sys/dev/bnxt/bnxt_re/main.c +++ b/sys/dev/bnxt/bnxt_re/main.c @@ -4168,8 +4168,8 @@ static int bnxt_re_netdev_event(struct notifier_block *notifier, dev_info(rdev_to_dev(rdev), "%s: Event = %s (0x%lx), rdev %s (real_dev %s)\n", __func__, bnxt_re_netevent(event), event, - rdev ? rdev->netdev ? rdev->netdev->if_dname : "->netdev = NULL" : "= NULL", - (real_dev == netdev) ? "= netdev" : real_dev->if_dname); + rdev ? rdev->netdev ? if_getdname(rdev->netdev) : "->netdev = NULL" : "= NULL", + (real_dev == netdev) ? "= netdev" : if_getdname(real_dev)); if (!test_bit(BNXT_RE_FLAG_IBDEV_REGISTERED, &rdev->flags)) goto exit; From nobody Wed Nov 13 19:29:33 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpYJF1pg6z5cTth; Wed, 13 Nov 2024 19:29: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XpYJF19Hnz45T6; Wed, 13 Nov 2024 19:29:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731526173; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j7YY/XjyD80fZ/6TIVcE8vdMC3Woq8Bsj05e9XvHksM=; b=h0HYCBKQ6jA6battlfyo1JKx0J1cibWEMVo90yzS5V/e7uI9d2UG9UorvlffTZLuX3O6FO I5ctTnAfEP9ZD0nH+rW23lRCTef7GiZvcmeiCljjWzNc0oanY9JPWRgyltoFeljlRKdi1f pbClB4Qx8vYUNdU9YABWDnmkZ5rnwOZtQ/GdqsiaEp0GUbrb70JhRbnXlRqzrA2tfPRGxF wc6Y2VIxIPHW7tnuLGY02k0SgSeevXxaP86brnnS1j8GQ+L2Ssy2Wm9erJ99DcpqIRIkGL I+8QWcttnC/9xa1h69T3qPDQBr9xTP0N73SvbC327G82t7yl7s0dBWi2C2V5wQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731526173; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j7YY/XjyD80fZ/6TIVcE8vdMC3Woq8Bsj05e9XvHksM=; b=VS2rRmMwHw3FluhNkX9MxPnng0YJ28mhNK9guI9/j6yMPOLoGbN7RLmv8ctJtvuQk97u06 17YZ+FlRfT8kBovvgKoeGvnb4PyLP09Z7MUblfIQFjzL17SYv9nyfQUxU6eAyzT4vz2B1h bwU8Z6TVNhQg8n0YY01TsmWpdz+A8aOCS+BsF8ySK9kuqUK5+hUT01Kb1UbKlQAMpXV+lO oRG6LV2AaHRyIXraqyrI6nedw72SZnLbRvPPMJnYnG1XSqMUsTcEtMCnSHgSiwqeSOrRVj YznlfY+uGNcxJtcK4uBH9EixzuIEBrhRurKnOiLuVZxn/5/CTXJZ6UImIYiuGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731526173; a=rsa-sha256; cv=none; b=E49JIBTtTu4mrEcWxoojK/LIZMZ+9jgHYfkG8IRrdLUiZ+s63Fv0xpzWwEu4skPrAEQKIi 7SIr0IM9+UATMmardy1sKrr43Df5dNSlAZqz9y5kfTq02IekFY0fqaspQUIySWrKgMFZ3p MddT914mbKqoI5+J7S/QFTIXxRZdznAjPp527YxccwLCroIpGdrA0LtXPkQLPsHwrIASkv XICY8CrBSrszGGL2J7Gl1B4W0rx2nDF1oCWdcHjDcb14cjQ81982Oc4a8S8xVAdXtcl6S3 4DHcO5g+F0r75M7qCHsEuOcoOvGjtLHQKUtcKvXVyW8RX6iWxVB0TLJiTPUDRw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XpYJF0m0Pz16tD; Wed, 13 Nov 2024 19:29:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ADJTX1s033388; Wed, 13 Nov 2024 19:29:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ADJTXOU033385; Wed, 13 Nov 2024 19:29:33 GMT (envelope-from git) Date: Wed, 13 Nov 2024 19:29:33 GMT Message-Id: <202411131929.4ADJTXOU033385@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Justin Hibbits Subject: git: 3f2eb1ac2326 - main - dummymbuf: Explicitly include if_private.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 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3f2eb1ac2326826383e919383554d14a69a5321d Auto-Submitted: auto-generated The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=3f2eb1ac2326826383e919383554d14a69a5321d commit 3f2eb1ac2326826383e919383554d14a69a5321d Author: Justin Hibbits AuthorDate: 2024-10-31 14:53:43 +0000 Commit: Justin Hibbits CommitDate: 2024-11-13 19:30:58 +0000 dummymbuf: Explicitly include if_private.h struct ifnet is expected to be private for everything outside of the network stack (sys/net*, except netlink. Since dummymbuf is part of the network stack, explicitly include the header to get access to the private members. Sponsored by: Juniper Networks, Inc. --- sys/net/dummymbuf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/net/dummymbuf.c b/sys/net/dummymbuf.c index f7aef562c8d2..d73566759ed3 100644 --- a/sys/net/dummymbuf.c +++ b/sys/net/dummymbuf.c @@ -37,6 +37,7 @@ #include #include +#include #include #include From nobody Wed Nov 13 19:29:34 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpYJG4C0tz5cTWk; Wed, 13 Nov 2024 19:29:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XpYJG2LNyz45n7; Wed, 13 Nov 2024 19:29:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731526174; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+HzN5ZtDsrZvpe5fm8ReZrOYumAbhiKn/NXLbNE7NBc=; b=v3HjX0fE2iGedGB37xC6zcxBKgJKP3m4DWxpCbYH2VFI8Z2VGR8hWJUNbYb4VAX1V15Vuy 3sAfsk2lk8hrHqBxHsV98Z4dAhskpbg3Kl65bED0XymDRYEOFgKwPC7PMzyODmhbMJW+qI U+nu7HHYVsD+UezFXnuOvZbjUEce8PmWv+npZYqevj6rtlifEN8ZMOvEbLTVdjhs3zYcsm U4eblyv62Hqop2REuj3RHnP8VGKdvnXT+k4Lx1tU239XAzrkEkRnxI1Ysv1SziWv9p6unZ l3aKrLbM5wNyEORVWOvyuVzwUVtqfiarkssp7DyJI+R54S8e17uLdVQZXVJXAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731526174; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+HzN5ZtDsrZvpe5fm8ReZrOYumAbhiKn/NXLbNE7NBc=; b=QCNayBMiMo7FJes4TmbXgGF5W8pk9WsB+Yhpf5oGRDDcOxPAPf1FtiprMrwxhoMLD1BuKC fiDYvqxuuxKKHJ3nQ+UPBPr5EhvTA2PoYi8t7Nj0a/OG1E/a1P+5/kVjtKoo2MTftzoN3y s5lhRtOt4eYFDBJbU8KrBxk2YC7kkrQqspbr9BejOZOgrcjmh32GqDetAyNBvcwrMJHFGq UZgFJF3+hyABE2IOtORlFcmZMRwQYIKzME7zAxxrcBiAtOKEcMwpWQbPxWDnfeqnO+65l0 089Re+CImdAaoloJ4O0XYxZjk2Qrj/weJDIh/9HerGVx6b6WCaOXvZa/dTijRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731526174; a=rsa-sha256; cv=none; b=SldTTf1vNLSqycluky+MdW8JDgwDXscV95Iks3eWH5E+n3hDNIVd/kxFcfdBzbBJcknwgv gjtiJs0Ad0fgf/zVm5jnvAqXm4DlX7ELVenaWs+aqFyvEFWrRm0/x977FDgHI/og6w3EtZ pMwNWRjgIj5tAv3w3PFAdRksfLB9Uidep8mCzEDfrQsZ8JjV3HZBj0rkAIi1pGVVmtr+Zl BKeHFAuPk11QP8HCqeNrY5egoF/mVOb5o8J/IlcEOIZg9taYsZDVKcj4KKOxbxCRLa2dTy 5IU+z2Fi7ZMre5r0b9pSb/5lmASHMkUhBlHPRVoqeiBInUn5tES3V1BlTJjMbQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XpYJG1pgMz16MF; Wed, 13 Nov 2024 19:29:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ADJTYDT033442; Wed, 13 Nov 2024 19:29:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ADJTYlQ033439; Wed, 13 Nov 2024 19:29:34 GMT (envelope-from git) Date: Wed, 13 Nov 2024 19:29:34 GMT Message-Id: <202411131929.4ADJTYlQ033439@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Justin Hibbits Subject: git: b224af946a17 - main - netlink: Don't directly access ifnet members List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b224af946a17b8e7a7b4942157556b5bc86dd6fb Auto-Submitted: auto-generated The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=b224af946a17b8e7a7b4942157556b5bc86dd6fb commit b224af946a17b8e7a7b4942157556b5bc86dd6fb Author: Justin Hibbits AuthorDate: 2024-10-31 15:09:48 +0000 Commit: Justin Hibbits CommitDate: 2024-11-13 19:30:58 +0000 netlink: Don't directly access ifnet members Summary: Remove the final direct access of struct ifnet members from netlink. Since only the first address is used, create the iterator and then free, without fully iterating. Reviewed By: kp Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D42972 --- sys/netlink/route/iface.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/netlink/route/iface.c b/sys/netlink/route/iface.c index 7d33c89a396a..48fdab6a8475 100644 --- a/sys/netlink/route/iface.c +++ b/sys/netlink/route/iface.c @@ -322,11 +322,13 @@ dump_iface(struct nl_writer *nw, if_t ifp, const struct nlmsghdr *hdr, */ if (if_getaddrlen(ifp) != 0) { struct ifaddr *ifa; + struct ifa_iter it; NET_EPOCH_ENTER(et); - ifa = CK_STAILQ_FIRST(&ifp->if_addrhead); + ifa = ifa_iter_start(ifp, &it); if (ifa != NULL) dump_sa(nw, IFLA_ADDRESS, ifa->ifa_addr); + ifa_iter_finish(&it); NET_EPOCH_EXIT(et); } From nobody Wed Nov 13 19:29:35 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpYJJ0898z5cTcs; Wed, 13 Nov 2024 19:29: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XpYJH3mb2z45yr; Wed, 13 Nov 2024 19:29:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731526175; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TqhdXJZgMgH2ztjc2iS0UxA2w9Tt0adb33JxcvgqxYE=; b=pM8YLH9+q8vieurut6dpz65alRlGHi8CrPKbAXTGK0sodEu7gH1tpZ4WlmtfLc9cE0la5e bTpR6EKx7XuCENOpmXFJ44N2BOAca8+NVlikCbozyDQsHjxbby3vZShrIeoUATYQuwJX6G qSkno6rss6AjMutuNOyJoz/Y+0GRH6qq93HLOngWL1ycf3imaRCXUGpPhTU755Qwt26gcD T/L/EVDEsyjRphlURzMVm3Gp9fyovplDce9Qk8dig3nFN9ZipJ48RK5xtk99VT8fohtLKF +V641pysPZIfosVGctq3RQdDrte2uuuOCMbo4Pr8dIuIe/aPvAu43Pl0i136jA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731526175; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TqhdXJZgMgH2ztjc2iS0UxA2w9Tt0adb33JxcvgqxYE=; b=GUMkEuWTzQcZ+zoKrR9MQQwCTsy2HCf4X20Wo3QsyPe6G8XVnZj78AfbcKL+vm+c/D+/Xc CELeHu5SzMVlH6Jn/QZJFMTYkiwgaJicVNR7VFjpFltfA45QWyd6MbNOhO8oAa8XeWNej7 AAM0sorjZx/Cc/8xEw6m64zJcKFSMiIwY9V9CWZsVD2IBzsKDxV6UObxaUFFfCn8p5aTvn F26gX5mkAdimgOu1Vi2SazVIOdpXpD5qdEu4r/azFydi5uUyaaZn7T2qyKy+6ZdJm/Gbxt wET/PiTiiH3NIDfTyit5wEaNUBuPFmYb0FXINMNtxU2llilHIJePynpnV6S8iw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731526175; a=rsa-sha256; cv=none; b=lbfg93Nph0rISWWg68XwDX1lDorxCArUX4b9s2xY2wlKT2/QkoMajIDBd7lDMN/xDKqima NtPGxZGvElFYFGM4ztLeyd5SNh/fXldTu1CFf8/WyZhmcKKLN/qOK+eW+gWVx9D4p/dcMc mtfbW6z+qXBAVTmSLE6oiR8WjmH8vUsQN5UpWugtMH3aW8e2iUOYDUynodiCd9hl+7Ixnd ir9enp9uVyirnifrsCIRzjP4wPvC3q2dSHhWbHNS6Mpn6iFtBNgCMlWBUVKA/t83rIURVe XccM/vC7DRbVa9xAHKg5XhBM0C2tQ3ZM0AVxq1fHxGeW/DJMwVsbu7RXPC2Mxg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XpYJH2sPPz16cV; Wed, 13 Nov 2024 19:29:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ADJTZ05033487; Wed, 13 Nov 2024 19:29:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ADJTZIb033484; Wed, 13 Nov 2024 19:29:35 GMT (envelope-from git) Date: Wed, 13 Nov 2024 19:29:35 GMT Message-Id: <202411131929.4ADJTZIb033484@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Justin Hibbits Subject: git: 1eaecc214ea2 - main - qlnx: Convert recent changes to IfAPI List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1eaecc214ea2bfde84f4194c1d0e20b18117343f Auto-Submitted: auto-generated The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=1eaecc214ea2bfde84f4194c1d0e20b18117343f commit 1eaecc214ea2bfde84f4194c1d0e20b18117343f Author: Justin Hibbits AuthorDate: 2024-11-08 20:22:11 +0000 Commit: Justin Hibbits CommitDate: 2024-11-13 19:30:59 +0000 qlnx: Convert recent changes to IfAPI Sponsored by: Juniper Networks, Inc. Reviewed by: zlei Differential Revision: https://reviews.freebsd.org/D47533 --- sys/dev/qlnx/qlnxe/qlnx_os.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/sys/dev/qlnx/qlnxe/qlnx_os.c b/sys/dev/qlnx/qlnxe/qlnx_os.c index 49d3f20aa0c2..a984908abf34 100644 --- a/sys/dev/qlnx/qlnxe/qlnx_os.c +++ b/sys/dev/qlnx/qlnxe/qlnx_os.c @@ -2624,6 +2624,7 @@ static int qlnx_ioctl(if_t ifp, u_long cmd, caddr_t data) { int ret = 0, mask; + int flags; struct ifreq *ifr = (struct ifreq *)data; #ifdef INET struct ifaddr *ifa = (struct ifaddr *)data; @@ -2677,15 +2678,16 @@ qlnx_ioctl(if_t ifp, u_long cmd, caddr_t data) QL_DPRINT4(ha, "SIOCSIFFLAGS (0x%lx)\n", cmd); QLNX_LOCK(ha); + flags = if_getflags(ifp); - if (if_getflags(ifp) & IFF_UP) { + if (flags & IFF_UP) { if (if_getdrvflags(ifp) & IFF_DRV_RUNNING) { - if ((if_getflags(ifp) ^ ha->if_flags) & + if ((flags ^ ha->if_flags) & IFF_PROMISC) { - ret = qlnx_set_promisc(ha, ifp->if_flags & IFF_PROMISC); + ret = qlnx_set_promisc(ha, flags & IFF_PROMISC); } else if ((if_getflags(ifp) ^ ha->if_flags) & IFF_ALLMULTI) { - ret = qlnx_set_allmulti(ha, ifp->if_flags & IFF_ALLMULTI); + ret = qlnx_set_allmulti(ha, flags & IFF_ALLMULTI); } } else { ha->max_frame_size = if_getmtu(ifp) + @@ -7055,12 +7057,14 @@ qlnx_set_rx_mode(qlnx_host_t *ha) { int rc = 0; uint8_t filter; - const struct ifnet *ifp = ha->ifp; + const if_t ifp = ha->ifp; + const struct ifaddr *ifa; struct sockaddr_dl *sdl; - if (ifp->if_type == IFT_ETHER && ifp->if_addr != NULL && - ifp->if_addr->ifa_addr != NULL) { - sdl = (struct sockaddr_dl *) ifp->if_addr->ifa_addr; + ifa = if_getifaddr(ifp); + if (if_gettype(ifp) == IFT_ETHER && ifa != NULL && + ifa->ifa_addr != NULL) { + sdl = (struct sockaddr_dl *) ifa->ifa_addr; rc = qlnx_set_ucast_rx_mac(ha, ECORE_FILTER_REPLACE, LLADDR(sdl)); } else { @@ -7077,10 +7081,10 @@ qlnx_set_rx_mode(qlnx_host_t *ha) ECORE_ACCEPT_MCAST_MATCHED | ECORE_ACCEPT_BCAST; - if (qlnx_vf_device(ha) == 0 || (ha->ifp->if_flags & IFF_PROMISC)) { + if (qlnx_vf_device(ha) == 0 || (if_getflags(ha->ifp) & IFF_PROMISC)) { filter |= ECORE_ACCEPT_UCAST_UNMATCHED; filter |= ECORE_ACCEPT_MCAST_UNMATCHED; - } else if (ha->ifp->if_flags & IFF_ALLMULTI) { + } else if (if_getflags(ha->ifp) & IFF_ALLMULTI) { filter |= ECORE_ACCEPT_MCAST_UNMATCHED; } ha->filter = filter; From nobody Wed Nov 13 19:29:36 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpYJJ5vyXz5cTWp; Wed, 13 Nov 2024 19:29: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XpYJJ4GX6z45wQ; Wed, 13 Nov 2024 19:29:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731526176; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pfyJeY6sRxCw6ywurIlShFGgGld7pH8VdYdOJ49g1ws=; b=DxgmJo8rfNBHZlRzwSzcZRC8mDC+F2EMZQpD4qlbKqSdwnFvyaTMXwsZuYx/9ZiAENvCOT S6wO68Awzu6QLYp9nAF7ZPq3aPr3ooBwVkMeeKhl/dwsMb4R8DY217pg7UG8z0ZfSflGvq TRtZN2c2aSzNkJYqRAoLrZLNht15v1ge4dQZqZfRw4LHsNVzHx7QnzT3iR2PLJ0EVB4qAA vI6dNQTSTbPH5lo96ihj/zm7cFJdLn1rgGuewWf78ZkWr/1PXGiV+ei2xzw+sXITYMwW1p 912GxBpm2n59eDRiUQ7E3zBGv82kLAuG0Get8+yT3TUnCejTI2ZdzTyomhLfbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731526176; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pfyJeY6sRxCw6ywurIlShFGgGld7pH8VdYdOJ49g1ws=; b=kyjb9X6E+F0/AWh72jlSK6bEdQ8WXQoEVzcnql5MCi8YNVl5MmF0OnaxVqrswRGBBCJ+CH lixIwK/e7TLRiVy7tmjtDljG8p6oaNz9LoKBYMTI/owfpTEB3E8J7QYBdclUmuyhXi5GXM d6I+TgzMzdQhah+BDP7Tn/Id2avwX+7iVZwOrW37XRqYsFGyYve2j69RWT4MwFdfYDq1Pe HcwD/TmLp12J1tGBQN/s8nnn0LHDjrkNxijX1BM6VjyE9dH+FEfQIrU6w85KiD9k6t1aM2 adkazqUtLeiWgp7qbEOW8WzWReR3RNmNcqYB2AgjFXDb/roamgUTeVDj7VYG1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731526176; a=rsa-sha256; cv=none; b=rkQtNJwvBOjCh1pPok/0zc4djgWW01L1mNJWJkhPYJ5J5/SpZ8uRDye4ptuqoJi4fHOqO5 Ma0o9yDsR92Tz9OpyrQAQGu/pWf5IxOUcQQoYVN/OjUBilQjuFTh0KPGqf1SSyWjkWfELf ip8wTi7cHVhOwEP/6yX914gCt2uJu4ZPFRcdS0wnEGGN4Rm7Xwudaf7z+Ey/+Kg1PhdAHz dnbS6XjPYMsXHh1pjMNpBjumA62HEsiKo1j7o3iJwuDCsu2tfkWfHnp/I1hVLqnvveTwAw KMqEcQg2bgrl4eiaiaCgfClglF7fdwX3r1of4syoxGccaCgkEVcAoHoqPS2I8A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XpYJJ3tj8z16jT; Wed, 13 Nov 2024 19:29:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ADJTaqZ033541; Wed, 13 Nov 2024 19:29:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ADJTa5Z033538; Wed, 13 Nov 2024 19:29:36 GMT (envelope-from git) Date: Wed, 13 Nov 2024 19:29:36 GMT Message-Id: <202411131929.4ADJTa5Z033538@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Justin Hibbits Subject: git: 4d0c95384f9b - main - net: Include private header in more needed places List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4d0c95384f9b2c2691459f22d68f0a2c8b2383c9 Auto-Submitted: auto-generated The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=4d0c95384f9b2c2691459f22d68f0a2c8b2383c9 commit 4d0c95384f9b2c2691459f22d68f0a2c8b2383c9 Author: Justin Hibbits AuthorDate: 2024-11-08 20:22:49 +0000 Commit: Justin Hibbits CommitDate: 2024-11-13 19:30:59 +0000 net: Include private header in more needed places sys/netinet and sys/netipsec are both part of the 'blessed' netstack, so can access struct ifnet directly. With this structure becoming private very soon, the necessary files need to get direct access. Sponsored by: Juniper Networks, Inc. --- sys/netinet/tcp_lro_hpts.c | 1 + sys/netipsec/ipsec_offload.c | 1 + 2 files changed, 2 insertions(+) diff --git a/sys/netinet/tcp_lro_hpts.c b/sys/netinet/tcp_lro_hpts.c index cd757d5a6164..d56967a12809 100644 --- a/sys/netinet/tcp_lro_hpts.c +++ b/sys/netinet/tcp_lro_hpts.c @@ -39,6 +39,7 @@ #include #include +#include #include #include #include diff --git a/sys/netipsec/ipsec_offload.c b/sys/netipsec/ipsec_offload.c index 19719a8f171b..d57ac3826012 100644 --- a/sys/netipsec/ipsec_offload.c +++ b/sys/netipsec/ipsec_offload.c @@ -44,6 +44,7 @@ #include #include +#include #include #include #include From nobody Wed Nov 13 19:29:37 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpYJL07Xvz5cTtm; Wed, 13 Nov 2024 19:29: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XpYJK53zrz460G; Wed, 13 Nov 2024 19:29:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731526177; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e7bDw2MMwcr0x/nWIJS7IkfgBlqQKjQOVdWT5IFwmk4=; b=cO5DgKvUTAzt77sMLkQVw5SsTHrlfHCRxHQ8yYBiCIMfrJPs/Dsj/0qJKcRT1vumE0tUKY yFSfRBFadnSFX/nECm9N85XerkpSFjTz29Fblw70GHovqyHxKt88AGpGmstjo7YbikAcvE psm/Wit3Lfe8hT2ve/g9opovuwS88G1cawdVlzHerCY9YAeiyMSEA7ANQs1MDBkc/4gAds EzEaHi+Ck+ABHvHs69UwsOtnfqRk1Wv6CFzbdgrTvNm1LZcjNe1NdLN8we1cKKMsx77svJ dfyxjzKaxfKedUAmKkkp07LnMzDyEyfGZaUQEhVgA28KJIO1pjsm4m1kMwDfHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731526177; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e7bDw2MMwcr0x/nWIJS7IkfgBlqQKjQOVdWT5IFwmk4=; b=L34dOmeDFXrcjwQLabwKZNB07SEevE/YMwzESVH55qd/XZ91FJTpgf8afVLTmqdEt4zBK8 fHscFaQ8qtLK3eU46+agovbADT4/rU6MjD31rB6JyBZ/DQWx8v8j6Zqx3y0GJr+9kSScbN oQOTQjAA59pDznjYljgmi6BT4wxpDLx9Nfh4ilg0Ps9vsnuZW9BuJGK5dwCfMS4ae57lCg bpNIPGqM/owkAg8/6DCqFgNWMRQ3AeUHxwUYt5DVgcEEnKcGapb2nwij9wMYNiW3dKRNEB 4HhVGqXOnuk7HQXs1fH0KdMtDJvBp//ZyXJmio5NYs8IOHywrrMhJl4+7uvHGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731526177; a=rsa-sha256; cv=none; b=sr00tgDrYhW9abqRqs4bhKHaX8RMXM2AjxkyTflPbFQJ5og9GMAwBP03WTe1z5mThmgMAh S2Y1fHqOivxN+qWHMTNEZrF5DfMnLvBgnWTm5L1mEZsjBcq0j4R/7s9I9IkWhIYna95nD3 EDgShWMtx7zpKhJmsSDQn3Nm9CF0XrSXBlPNGXRpe1r2oOGYDR6JMfnNwN9gKw8v/m3xjj BCAR2opT8MRlczTLGHpag0pYhrsV44ACYlE1rdcOn4bphOfG9H5JUzSsRhA3dHSjicXq/y Zo5pWuibhLC/wQG8Dz8QCKUxUlXs6QOROoynR+5Pl+Z2v2U8gfBWxj44b9H7LA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XpYJK4cP8z16cW; Wed, 13 Nov 2024 19:29:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ADJTb3p033589; Wed, 13 Nov 2024 19:29:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ADJTbMx033586; Wed, 13 Nov 2024 19:29:37 GMT (envelope-from git) Date: Wed, 13 Nov 2024 19:29:37 GMT Message-Id: <202411131929.4ADJTbMx033586@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Justin Hibbits Subject: git: 57609cb2de14 - main - LinuxKPI: Use IfAPI to get LLADDR List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 57609cb2de149a3c99c43e98d37cfa4784958f73 Auto-Submitted: auto-generated The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=57609cb2de149a3c99c43e98d37cfa4784958f73 commit 57609cb2de149a3c99c43e98d37cfa4784958f73 Author: Justin Hibbits AuthorDate: 2024-11-12 15:01:00 +0000 Commit: Justin Hibbits CommitDate: 2024-11-13 19:31:20 +0000 LinuxKPI: Use IfAPI to get LLADDR Reviewed by: bz, emaste Differential Revision: https://reviews.freebsd.org/D47525 --- sys/compat/linuxkpi/common/src/linux_80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 9d0166829d52..543a11b1f729 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -2783,7 +2783,7 @@ lkpi_vif_iflladdr(void *arg, struct ifnet *ifp) } vif = arg; - IEEE80211_ADDR_COPY(vif->bss_conf.addr, IF_LLADDR(ifp)); + IEEE80211_ADDR_COPY(vif->bss_conf.addr, if_getlladdr(ifp)); NET_EPOCH_EXIT(et); } From nobody Wed Nov 13 19:29:38 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpYJM1dcLz5cTst; Wed, 13 Nov 2024 19:29: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XpYJL5ztqz45lY; Wed, 13 Nov 2024 19:29:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731526178; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YgB0bjc5w2HqecwmNWpTqqYgdfiS2BFhb4ufQpMp7Gw=; b=xbZAxh3i9YBqstH4xFXRG+pZBTyjncyUbcfvRwTpdUzoky9GsTX9oEXVO+qfPz03jqHUjg SzpLjt22p40hAEY8pvpzGXOQthC5mX9RsxZQzuMas/Em9PPEIhFg9XNxEQUO3aXNlyHT9N Zv+LltZj55E0Sm/4OvXDCaftYZ1xh/LC0ikOmXcJZ7sWNYOR+84vU59fXgIb7VmTrXiNka Q8rZIgsbITVMJrsW7NUp90irPUKcXWDbVqvjvup1OVgGubaeb1Cpw2x4UB64dJUuLZgFwR MzBdzy7YLKWBAUVLiHDC8xbtS+k3ekveyHzvtpBP2ECg0bjBjOYrBX4Dkn48Xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731526178; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YgB0bjc5w2HqecwmNWpTqqYgdfiS2BFhb4ufQpMp7Gw=; b=Ejpy6EbAuo4+dlKxW1OOXLHNwVe1aTgmUC8JmhLQ6uqgw88qdMVqOXZvQcQs+1iknXeMhV wZZPxo9CzFPSf8LE2cvq3iF2mlOw4+kfm9CtBZSNRS9wWsaS8Wj+48eKGNDhuDkI5fcxut uzabQJkfe0r20plmc81Lb8Tizl7lbGXYbCFelgIwVTm+uJmAPDTb4fnAMRLxGWO8r8mmwU oAiW1I8ir+kkwBqB1owwjPZPHBJiL+LXWg9ua5HajQ619/MTMtRjVrSAFkDLODAe/Mqtky t19eDlUM0HwDlE+VZ7uZiEl913gaDW/rn+QmVh5pEnv6v09aPtm64KBM1fsDkg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731526178; a=rsa-sha256; cv=none; b=sqhm735dcvpNUnfKm+fdQagBv2ZOeweqQrC/BBnSEoX2+/21uTbrwzn5bCdQtdrDo2Emhl dmn66cW7HhDzCeYm3viWyiX6z/894ucuaM20Bf5SELTieq9vdqZqVVcj5lC14ZWZft+3OH z25z64tdbGbs2nILWnAsC/5ygtkVmorqvXWW3NLnwwuEQJGd5A6n9RVvtWkuXiVTSguKpB AXF739wMIdjFElVxChKtd0sfmimf/V44Al3rc6woSbkYJZOvbltmBmLOvNDDgGncb2y9sH 4ne3CunTj48+nyD1IxZrsVYD6Xmg69OtfRX5CuOjhLM6mTKkHeYHQ2pQeOD4lQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XpYJL5Z2Lz16tF; Wed, 13 Nov 2024 19:29:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ADJTcK7033655; Wed, 13 Nov 2024 19:29:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ADJTcCe033652; Wed, 13 Nov 2024 19:29:38 GMT (envelope-from git) Date: Wed, 13 Nov 2024 19:29:38 GMT Message-Id: <202411131929.4ADJTcCe033652@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Justin Hibbits Subject: git: f6efccaa35fe - main - IfAPI: Remove temporary inclusion of if_private.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 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f6efccaa35fe07f5659dd5d84769f56453f12169 Auto-Submitted: auto-generated The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=f6efccaa35fe07f5659dd5d84769f56453f12169 commit f6efccaa35fe07f5659dd5d84769f56453f12169 Author: Justin Hibbits AuthorDate: 2024-11-08 19:42:19 +0000 Commit: Justin Hibbits CommitDate: 2024-11-13 19:31:20 +0000 IfAPI: Remove temporary inclusion of if_private.h Summary: The kernel is now fully migrated to the IfAPI, so remove the temporary inclusion of the private structure definition. Reviewed By: #network, melifaro Differential Revision: https://reviews.freebsd.org/D39621 --- sys/net/if_var.h | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/net/if_var.h b/sys/net/if_var.h index cd074e4a8f4e..a0271cfe2a7c 100644 --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -753,7 +753,6 @@ int ether_poll_deregister(if_t ifp); #endif /* _KERNEL */ -#include /* XXX: temporary until drivers converted. */ #include /* XXXAO: temporary unconditional include */ #endif /* !_NET_IF_VAR_H_ */ From nobody Wed Nov 13 19:35:44 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpYRN48Czz5cVBW; Wed, 13 Nov 2024 19:35: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XpYRN3hN9z48vK; Wed, 13 Nov 2024 19:35:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731526544; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s6E9IbaueJQfXMSMPu7/CKRguvSCqgofj+cwUya41+0=; b=ILf3faMWcST0pLmpWJxMc2jsQGHvQiFDI70WBfABl8BjEPOeUOwkkRkZNMJQwzckHy477n 72eKlpwHj6hCxPZK7IGRKIMkeN6tFJDHzky5TWCgFb8Z4Dx7HJbhnufEwWwJAbSEemhkJP nk7q8cBtcgqdDDrUct6CdVJIWMv1VVg4yuTCzEtxoLEnIF6iuHrvGGY74KyVple5oLPqJE 1yfqmQmw1yHET2xjxMyGsNF9crSvKUypnU3gOFKuwZC+5FPFxPdj+bgLsyWwOpWXoIVGx3 F8NlSljmcmyV84xjGBQ7jz63cDDLaIzRlRQBtC8MLuzFeS4ws1GO4RGIwjXg/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731526544; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s6E9IbaueJQfXMSMPu7/CKRguvSCqgofj+cwUya41+0=; b=rkKFxw5zDdT8nSKv/ifskay12qT7MeqPssU175K/Gy9lbE61FIa/VwEgxPy3T5l8BhnzZM UMedLqutzqTZnC79ddhGZZjVT4xgsXvzeOZDt9Az+sxeaKTAFeeE1WRoYS2F+N6Ps5GP5P d2lew1DPiIczE4RWYpTmkTi/pfpmtl/cSolDGbhjMJzDNzY0ZhSZvck3d7gLVdmvrLJboJ N0OcGlxSUM49PFD8xPeRHgnbt+HpHVAhOzV7pFHyIKcxdjMBnns1BIsXNf4BE15FMtlqf0 TPzYaM7iEw6QmkgZw74UijsCBvvHsdNWk6BgSK/j9D3rscicekFVeq3ytekxmg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731526544; a=rsa-sha256; cv=none; b=hlFUtLoVsmffiZ8H+Cpo5WVji6S/unqnTs/lcCS5D8TCKF8BqnFD2s4AVIL/uAqACkxHwU zc/Jdph8fQUkYDqqWG18R7BglFvW0iC1ClK3MTW0YdVKmgft4ABS+UgqwD/L9rh/plcaLZ Pc1eeA2hhHKzIR6iU5P1sT1V4+uxF0h40omaXECJZE4wsAeL6ROrg9kXdMe14yHx5nP4nv 4Hk7X/29hAsXM0aNLmiD2aFy1JuG0xLR0uSDmH/uRIr+XaAZT1xoqkm+Dh2HwjoH9Cnj0+ 1DRlVwupXC6rs8gX57c8TjeG9gmuqMU22PALxDqTo1WYvsrey0V4IR/pI/395Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XpYRN3JGQz172N; Wed, 13 Nov 2024 19:35:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ADJZi0R050660; Wed, 13 Nov 2024 19:35:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ADJZiB8050657; Wed, 13 Nov 2024 19:35:44 GMT (envelope-from git) Date: Wed, 13 Nov 2024 19:35:44 GMT Message-Id: <202411131935.4ADJZiB8050657@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: c1d93f81e49c - main - bufwrite(): style List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c1d93f81e49c5c32262eefcd087b9c5582e0f83c Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=c1d93f81e49c5c32262eefcd087b9c5582e0f83c commit c1d93f81e49c5c32262eefcd087b9c5582e0f83c Author: Konstantin Belousov AuthorDate: 2024-11-12 06:22:06 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-13 19:35:02 +0000 bufwrite(): style Use bool for vp_md. Compactify the calculation. Explicitly check for non-zero when testing flags. Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/kern/vfs_bio.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 7bcc61c27109..3ef715baebfa 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -2304,10 +2304,10 @@ breadn_flags(struct vnode *vp, daddr_t blkno, daddr_t dblkno, int size, int bufwrite(struct buf *bp) { - int oldflags; struct vnode *vp; long space; - int vp_md; + int oldflags, retval; + bool vp_md; CTR3(KTR_BUF, "bufwrite(%p) vp %p flags %X", bp, bp->b_vp, bp->b_flags); if ((bp->b_bufobj->bo_flag & BO_DEAD) != 0) { @@ -2316,24 +2316,21 @@ bufwrite(struct buf *bp) brelse(bp); return (ENXIO); } - if (bp->b_flags & B_INVAL) { + if ((bp->b_flags & B_INVAL) != 0) { brelse(bp); return (0); } - if (bp->b_flags & B_BARRIER) + if ((bp->b_flags & B_BARRIER) != 0) atomic_add_long(&barrierwrites, 1); oldflags = bp->b_flags; - KASSERT(!(bp->b_vflags & BV_BKGRDINPROG), + KASSERT((bp->b_vflags & BV_BKGRDINPROG) == 0, ("FFS background buffer should not get here %p", bp)); vp = bp->b_vp; - if (vp) - vp_md = vp->v_vflag & VV_MD; - else - vp_md = 0; + vp_md = vp != NULL && (vp->v_vflag & VV_MD) != 0; /* * Mark the buffer clean. Increment the bufobj write count @@ -2365,19 +2362,19 @@ bufwrite(struct buf *bp) } #endif /* RACCT */ curthread->td_ru.ru_oublock++; - if (oldflags & B_ASYNC) + if ((oldflags & B_ASYNC) != 0) BUF_KERNPROC(bp); bp->b_iooffset = dbtob(bp->b_blkno); buf_track(bp, __func__); bstrategy(bp); if ((oldflags & B_ASYNC) == 0) { - int rtval = bufwait(bp); + retval = bufwait(bp); brelse(bp); - return (rtval); + return (retval); } else if (space > hirunningspace) { /* - * don't allow the async write to saturate the I/O + * Don't allow the async write to saturate the I/O * system. We will not deadlock here because * we are blocking waiting for I/O that is already in-progress * to complete. We do not block here if it is the update From nobody Wed Nov 13 19:35:45 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpYRP5Ms2z5cVBX; Wed, 13 Nov 2024 19:35: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XpYRP4Hm2z48x9; Wed, 13 Nov 2024 19:35:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731526545; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/3AgPLubraIcZVh+LB+vcwVX+UXXeNNmi7bn1PnJVMU=; b=RthhwY1Jj+C5A2GL26FYjx/MsYcL1TVEiYE5IwAGCdfkMoK4cJ9x5zpk52tt2FlaHWpOXV FIn1v36IbH4gpSOaaiKQVZKoTlA5rteQmj5lPwdurHFfhiyA5YR3yNV6q23EsmtOqNYbRq 0LMesS3liNr7Jj22oF+6uDk4MWNGNJT4iUUdrld2HZbJWkdACL5G8ImTdx4O9K7NPPHyWi 53mKzap2Kj4yjs2vq9AeZ1fPeVVrXDiEX9cuIODfD2nZW/yupJisGlNYmwSvp56wjHJY1b 7yFX6GZ8OL4bOfCBFVFGgt1sN9RtC/WG/7rTiEWFvbnndEOpytAMdftvCoofsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731526545; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/3AgPLubraIcZVh+LB+vcwVX+UXXeNNmi7bn1PnJVMU=; b=ajHpxkWrYAyjxFyCLOVu2X1Knn54gKF9ziQlIWDnpiEvu3qL4CcH1jvYoU3+DAns7tuwGz 2N1mcK2x8Wiaju+/GHiBDD0CWIWSyp8JkVyNLAW9nNO4Vsz8iQKuCf+6YwhG5alwQUZlNh rIwgMvXjzqNk3Q7CTuisKnuJk6xIXMjb1uxdVWPuTBRcjdpbvcqmg7tdKHNJkYFD2+wlwC j+OK9jmGFb4OMXJhgA39htOPYYDzzA4Jwr8QUePEKPh4qNvhYNBJh0YT2Q88sVCar+O5Xh ysNqwgpz0R551ui3LgMfF9x5OmobzZ/yEA21lY8Yh0JbRmCtUuG1KarYi952zw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731526545; a=rsa-sha256; cv=none; b=oHUatS+9ADOfoGrRWNRtha0eynr1XP4bg6P8TC4Kxk0TC8t4XumEjI5FJxMxDwKqnsQoAJ qttpPv2pUmBPiuPK/2pqVFzWOeCgm2JI89Y4CryWGCSjeY6R+El6lSa0lGLasFAhc8/qIk 6PnMX7UAOePn2O6t51UO1w2BXFjm5le+EcQbwmujMrYUVeu2DOhQt91mmv/kxPiAs8Yjxe /YqeyxHSuDhLxXZqJyEhSxTFRzZKxgXbVnVU0CNThIvZjKZVwgkj+7otuDagjxGcHvJFxY TdccVReCl/2haOhBwYb5fctLLjiVHnZIJErB7UQPLXc33+y5vZbrgqakzwv34w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XpYRP3vPMz16dG; Wed, 13 Nov 2024 19:35:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ADJZjZr050708; Wed, 13 Nov 2024 19:35:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ADJZja2050705; Wed, 13 Nov 2024 19:35:45 GMT (envelope-from git) Date: Wed, 13 Nov 2024 19:35:45 GMT Message-Id: <202411131935.4ADJZja2050705@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: d0b41249bfbe - main - bufwrite(): adjust the 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 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: d0b41249bfbe4481baec8f1659468ffbb30388ab Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=d0b41249bfbe4481baec8f1659468ffbb30388ab commit d0b41249bfbe4481baec8f1659468ffbb30388ab Author: Konstantin Belousov AuthorDate: 2024-11-12 06:24:03 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-13 19:35:02 +0000 bufwrite(): adjust the comment The statement about 'do not deadlock there' is false, since this write might need other writes to finish, which cannot be started due to runningbufspace. PR: 282449 Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/kern/vfs_bio.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 3ef715baebfa..62b0567f269a 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -2375,11 +2375,9 @@ bufwrite(struct buf *bp) } else if (space > hirunningspace) { /* * Don't allow the async write to saturate the I/O - * system. We will not deadlock here because - * we are blocking waiting for I/O that is already in-progress - * to complete. We do not block here if it is the update - * or syncer daemon trying to clean up as that can lead - * to deadlock. + * system. We do not block here if it is the update + * or syncer daemon trying to clean up as that can + * lead to deadlock. */ if ((curthread->td_pflags & TDP_NORUNNINGBUF) == 0 && !vp_md) waitrunningbufspace(); From nobody Wed Nov 13 19:35:46 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpYRQ72HQz5cTyh; Wed, 13 Nov 2024 19:35: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XpYRQ5QCzz487C; Wed, 13 Nov 2024 19:35:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731526546; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3m0V1JiIvcN7E4ucrHopgPkwShCo8PoAVHCnvnZEliY=; b=byksGnCEu30bT44fbQKF0jCQTsDi1GePks0DkYnoIuiwfn6i/xdrlY+qNVENUmdcDZAtH0 i/YVDpPs8Nd1985zw7M8SqxMIzY/jVEiZLlbwH/3hy6bAkfH4Wksubh9AKxQj7S6fROa1w 9kb8TX3X8oDTeKKW2K+RxY2/bYKKLqklBTdENqRdehsNfG9Ku/Zf7TrduuSO8CblU9DYbP JzU5irz+/i2funDDpcfvAjooXMEqbO2PhN0fJX/vZ+V5kbnl95oTGc08vuTeyGUeaSZi2h lHThzuvYIf1PogXWxaMMFmo/mZg8pSsvbVIZ1Yp2EmR9/2mgRSYoIWWNFSzUUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731526546; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3m0V1JiIvcN7E4ucrHopgPkwShCo8PoAVHCnvnZEliY=; b=mfA2F8mC+u9dVyG4fD0jKoc1WcfXqnDJWRf5a1t2awEiZKt7skk2cm50V3LeLC8sa1K9WT kqgwgYWES7afvLMKQu69kPbOkHgcT8MDWK47e/KIYu916ADkhz4HUoyiLt8WnvGBKspu6u S7NcYPYFyWYVWPRMGmOQM8HeSpf7MKRPyAy0fSCgSzJOHdyPjRZbEI9Wmek6fyvVb9CafY /fZl3B9l5Y5M6ThrqM5/RBgVWyESQSe23CoxhdwMGdXNjFCOENv4HwMzVQYATQJ351D60R i6AvsNzVTYkRPS4vP6kZ9bdVWR5BelcNnqozrQr0MxOgkU2BkVHZ1PqFywGFgA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731526546; a=rsa-sha256; cv=none; b=tdKb2JMQonydqAgSbmqWbZhGBXPwp2Uzq39Qyf0Nc7b7wuyQeDGgOVh5q2DAjJI5Fwg1Vb oaQYwvZolSq3Qncqm8pK0hRfGuFcNf7Tl5VxnLM0C27D1g/EJWTbZSbxILc5XE4HV+1yTk K+lZZk/fmoMW2wk1uz/9BRHNoCStUsFgVEktbpmJDwua29EDeKQz0NOnQK/cvZAocEezQS kYEGJ8JVE3NI1IwcUOxxeYkeCsECUiIglstLyqJwea1FBiYZ0bEzlC1XiRoEGUKXtp5R6Y lbO93ic455q1wO2ULRshpeP+AYePiFp97CsR5ABWhjEAqviz5h7gaTeiXMW9nw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XpYRQ51zPz174H; Wed, 13 Nov 2024 19:35:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ADJZkje050782; Wed, 13 Nov 2024 19:35:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ADJZkoa050779; Wed, 13 Nov 2024 19:35:46 GMT (envelope-from git) Date: Wed, 13 Nov 2024 19:35:46 GMT Message-Id: <202411131935.4ADJZkoa050779@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 46f02c4282ff - main - SU+J: all writes to SU journal must be exempt from runningbufspace throttling List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 46f02c4282ff76b66579c83be53ef441ea522536 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=46f02c4282ff76b66579c83be53ef441ea522536 commit 46f02c4282ff76b66579c83be53ef441ea522536 Author: Konstantin Belousov AuthorDate: 2024-11-12 06:29:23 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-13 19:35:03 +0000 SU+J: all writes to SU journal must be exempt from runningbufspace throttling regardless whether they come from the system thread or initiated from a normal thread helping the system. If we block waiting for other writes, that writes might not finish because our journal updates block that. Set TDP_NORUNNINGBUF around softdep_process_journal(). Note: Another solution might be to use bwrite() instead of bawrite() if the current thread is subject to the runningbufspace limit. The exempt approach is used to be same as the bufdaemon. PR: 282449 Noted and reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/ufs/ffs/ffs_softdep.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c index 97f50867b012..98ad4269b5f2 100644 --- a/sys/ufs/ffs/ffs_softdep.c +++ b/sys/ufs/ffs/ffs_softdep.c @@ -3630,6 +3630,7 @@ softdep_process_journal(struct mount *mp, int cnt; int off; int devbsize; + int savef; ump = VFSTOUFS(mp); if (ump->um_softdep == NULL || ump->um_softdep->sd_jblocks == NULL) @@ -3641,6 +3642,8 @@ softdep_process_journal(struct mount *mp, fs = ump->um_fs; jblocks = ump->softdep_jblocks; devbsize = ump->um_devvp->v_bufobj.bo_bsize; + savef = curthread_pflags_set(TDP_NORUNNINGBUF); + /* * We write anywhere between a disk block and fs block. The upper * bound is picked to prevent buffer cache fragmentation and limit @@ -3859,12 +3862,15 @@ softdep_process_journal(struct mount *mp, */ if (flags == 0 && jblocks->jb_suspended) { if (journal_unsuspend(ump)) - return; + goto out; FREE_LOCK(ump); VFS_SYNC(mp, MNT_NOWAIT); ffs_sbupdate(ump, MNT_WAIT, 0); ACQUIRE_LOCK(ump); } + +out: + curthread_pflags_restore(savef); } /* From nobody Wed Nov 13 19:44:24 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpYdP66jJz5cVrL; Wed, 13 Nov 2024 19:44:25 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XpYdP5Yvdz4Dsw; Wed, 13 Nov 2024 19:44:25 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731527065; h=from:from:reply-to:subject: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=o57QcPah4O/3SruVVQVEcje46kR4UFX2TEuGO27+00w=; b=QJzKc1sswcVMR+VpYljOxsmwlsqXQeH7CNJwwN0+mOEOMcsMydfjeSKr95WOtmfShqnDLD HzPtNruMJkAy5KdKtqNuemqgp8cojOvHPx2Vx1FIPi4rfDPK/0GQnNwb1pDVFv2l7AZFFI Fdb93PJzCXPeQFc4jlLqYU2Xe2X4AF5Ys1F8Bm0fLl0uM1IU9SPFv2KDC75mdy1IOn+vNf tGghfj/auW2qLcdiNSaQCWRqL9EVuw0h9oOJC3RP1XNvxI3daZa7GNBzHBqPxgEj5kkyCp k3IMsVpBpcWZX/tLPq4zjgcx5bUCxPGdsOg3adlpNTRcBaBVwr+tbD6M3uCjOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731527065; h=from:from:reply-to:subject: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=o57QcPah4O/3SruVVQVEcje46kR4UFX2TEuGO27+00w=; b=rLr+duN7/P9qNaoQ9L4tK1ovpVEBnEleV0kJd/6ShE6tYKlUm30xbvit8cYBnpK6wA4MFW p+C8hcRnmSFYrgbzPMrYZyh6WVLvjqrPavuaAZ1YPZRbBGDuVtj6fXkw1lMxz6t7KUYmcA QrmpvmNkXHCE+3tI5RkojXGlMwddbt4ix64dRok5XhDb0TsUPoS/uc1AUU0CxPnnL06hGe gs14pAyqhgWJ+li4FfNvNrghXIwllb+yZVmNzyhfA1bKhITnTnBAQ4CAs7w2DH8nNrqi5c ikXLegKJYKDAJIx+EtQbV8rY5wHcsypu1pLIRBWXNdv6LLpqJk/3lFFP6xS4dQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731527065; a=rsa-sha256; cv=none; b=WuFKdspAky5IZps6SaQkNd+5xymMVstGBvz/8g26LZAHz9Hcx394auYHBOeFVGPDZAiYmg qsYDuRDVANgHyggiM7IPwWVhfe64rnqDbFfZobQyEQ/Dbk7CM7Qr+Fu0OGsl+gzfGC3Iuk FlbE3+Tl34QDn2cPZfBcwClYWihhgGV5H3CpfeJiOe/R7ERr4M2jB0P81pA86C3T+vG1cv DdWrf9pibe1FQtpcLZRet5bqvkYedDqiUhplsZWzQKzVT6uUVxnbqGck9xwopY4sQqpoJW 82v3EBrpZTNPSrNAii4VyOi6NEl0xYdjFTVEpfujb2VT0dWfWvl5E51j1SuABQ== Received: from [IPV6:2601:5c0:4200:b830:e12f:83c9:e3d1:29c8] (unknown [IPv6:2601:5c0:4200:b830:e12f:83c9:e3d1:29c8]) (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 4XpYdP3n0ZzJ1K; Wed, 13 Nov 2024 19:44:25 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <92a05dfe-683c-43d9-bd29-3110e89be275@FreeBSD.org> Date: Wed, 13 Nov 2024 14:44:24 -0500 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: e85eaa930862 - main - Have rtld query the page size from the kernel Content-Language: en-US To: Andrew Turner , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202204071438.237Ecn2A012737@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: <202204071438.237Ecn2A012737@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 4/7/22 07:38, Andrew Turner wrote: > The branch main has been updated by andrew: > > URL: https://cgit.FreeBSD.org/src/commit/?id=e85eaa930862d5b4dc917bc31e8d7254a693635d > > commit e85eaa930862d5b4dc917bc31e8d7254a693635d > Author: Andrew Turner > AuthorDate: 2022-04-04 15:05:40 +0000 > Commit: Andrew Turner > CommitDate: 2022-04-07 14:37:37 +0000 > > Have rtld query the page size from the kernel > > To allow for a dynamic page size on arm64 have the runtime linker > query the kernel for the currentl page size. > > Reviewed by: kib > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D34765 This broke relro handling for rtld. The reason is that init_pagesizes() is called after parsing the program headers for rltd in init_rtld(). As a result, page_size is 0 when rtld_round_page() is called so the relro_size is 0. The RTLD_INIT_EARLY_PAGESIZES case was for ia64, and in the early case it's probably not safe to call sysctl? If it is safe to call sysctl, we could just always init pagesizes early? -- John Baldwin From nobody Wed Nov 13 19:46:57 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpYhK4ZJkz5cVv7; Wed, 13 Nov 2024 19:46:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XpYhK42vmz4Fbs; Wed, 13 Nov 2024 19:46:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731527217; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4MJXem+4C4Uq8DtlgSuRxHECim2i8DyuhFyk12GKtTg=; b=eyCLOXAFPcm3/j0GF46GtIMEMLI23SLzPRRzmZyEqXSr59TxRVxqgB7cDCAyroCbYjdvls KzCZWreB6mktaNaRJlQwcvNK8r93SUFXmbwT+ySg3AyrDoi5VzElTEOM+Ma3L4YMYFi+lH wfM13Oqnz8FnWPzNyjqGXNkMkIjSI9LxeTb8I38rtTZj2GSBaqhJqgCd39FWLHR7wPGApp JXAirdhyAIiZogVx5s4nOJIq1cHhkQS4BuE76bMXFSRN7eWcod+WTpa6SO+DGAEEntwmI8 yqqPxu78mf0BVeAq31CLvqrEpuQNLwPWkbgYiuUxAI3wvu50kT3K2jMhGN914g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731527217; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4MJXem+4C4Uq8DtlgSuRxHECim2i8DyuhFyk12GKtTg=; b=FCLNYy7BqjxnQ1Pun/kZAklW1lZns7EXFMlC1k85AwYf//mwPipVOPJv4KdotXSbhXVyUV yOaO5KAvjf8aX0kdBUJp1Zc6GwkE7ph85ZKdwKaXqa2n9EilkBlifa0keazEXWxeQLHZ6W ViDKXbjquNGu2x7GivJKJTV+NfHc0B07YHebzArgz25a8/nGdTJQr5FNRzfS/6z/fx4Olo cW0CjcLUKyiepAqaOLRrRmjvPCm1sGUhWwzDcnaA/IH0UKcnglr/We8vA2qqzhIvWBuTs5 Hh9G6sLWftynXOsFrg6YLF7W+j8iwPTU2tvqmGVWEKg2ko+1tfeagOV3bhJ+JA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731527217; a=rsa-sha256; cv=none; b=oSXW1AXXUO3ErlVAtqJfss/5vAEENwOGt6kzFc9A4NCBSlDB6CUNp88ymwz+JRGBipZ2lb DmmbjTQRcvD9dExCKc6qn4MUBCa6JG7Y7HHsNCMUAHS4Jfvn9+Q6Ic7acW67495t2tszyC Zw1vp2HX/4bsHOJdoXWqHt3Q4X1sDHbLPlMY29Rt4QhvBmtZY+eNwHpo767hdT2z16Z/ig xPa6+LraUgpprIFpPRBbBq6HjXvJuAd1rtdMlCn3qEVBM3v8HVDTtiUL14eyv01wR1+p2W xbgswUFi95Dlz/BT/zpoc4GnIfYUthoyFKNLkoC9S9xCXL82VxysPfLNXcz/BA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XpYhK3W7sz1758; Wed, 13 Nov 2024 19:46:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ADJkvEQ070271; Wed, 13 Nov 2024 19:46:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ADJkvKA070268; Wed, 13 Nov 2024 19:46:57 GMT (envelope-from git) Date: Wed, 13 Nov 2024 19:46:57 GMT Message-Id: <202411131946.4ADJkvKA070268@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kirk McKusick Subject: git: ab05a1cf321a - main - Revert commit 8733bc277a383cf59f38a83956f4f523869cfc90 Author: Mateusz Guzik Date: Thu Sep 14 16:13:01 2023 +0000 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mckusick X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ab05a1cf321aca0fe632c1ab40f68630b477422c Auto-Submitted: auto-generated The branch main has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=ab05a1cf321aca0fe632c1ab40f68630b477422c commit ab05a1cf321aca0fe632c1ab40f68630b477422c Author: Kirk McKusick AuthorDate: 2024-11-13 19:37:14 +0000 Commit: Kirk McKusick CommitDate: 2024-11-13 19:46:47 +0000 Revert commit 8733bc277a383cf59f38a83956f4f523869cfc90 Author: Mateusz Guzik Date: Thu Sep 14 16:13:01 2023 +0000 vfs: don't provoke recycling non-free vnodes without a good reason If the total number of free vnodes is at or above target, there is no point creating more of them. This commit was done as a performance optimization but ends up causing slowdowns when doing operations on many files. Requested by: re (cperciva) MFC after: 1 minute --- sys/kern/vfs_subr.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 3b00fdbe93b4..f9b2a4fb68d1 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1992,25 +1992,11 @@ vn_alloc_hard(struct mount *mp, u_long rnumvnodes, bool bumped) mtx_lock(&vnode_list_mtx); - if (vn_alloc_cyclecount != 0) { - rnumvnodes = atomic_load_long(&numvnodes); - if (rnumvnodes + 1 < desiredvnodes) { - vn_alloc_cyclecount = 0; - mtx_unlock(&vnode_list_mtx); - goto alloc; - } - - rfreevnodes = vnlru_read_freevnodes(); - if (rfreevnodes < wantfreevnodes) { - if (vn_alloc_cyclecount++ >= rfreevnodes) { - vn_alloc_cyclecount = 0; - vstir = true; - } - } else { - vn_alloc_cyclecount = 0; - } + rfreevnodes = vnlru_read_freevnodes(); + if (vn_alloc_cyclecount++ >= rfreevnodes) { + vn_alloc_cyclecount = 0; + vstir = true; } - /* * Grow the vnode cache if it will not be above its target max after * growing. Otherwise, if there is at least one free vnode, try to From nobody Wed Nov 13 19:52:18 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpYpW04jDz5cVvl; Wed, 13 Nov 2024 19:52: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XpYpV6k0Kz4Fs9; Wed, 13 Nov 2024 19:52:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731527538; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LyP4JmA+mDYJwCFRK4QEfJbvowIyi/beAlcU1GQqncA=; b=ghul+yqw+RgD5U5/wfy0IwVTiyeRa6S8gTw0aaEKA6S9nSUIxxyaOkFWgk18Q7A5uC4mHZ bKcJU1FiZEqiqCcrGWnJrU5vwI8esaWA9/c5vl1+rvsA/LGX6gonHhDLtlO4WhbxDXuYFb aFMBVFjYqXvTM2GtR09FNC3VsLMw4eYgTEVkfo5hf8DTEqNmiGIRAJKtZRop6CdBWcPXt5 ICGDPyG2KX8dsysT2+wtE6hwGVd02JYjaeAfVDyVmaPUi5NygFeY5zMhdgf4DUq+dRVlsg rpTx2+F+mPVc/4Rw2PsVR0xMWUUaCLyZEP4PfVg5qxtlSWbckkUhbqBdCEITrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731527538; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LyP4JmA+mDYJwCFRK4QEfJbvowIyi/beAlcU1GQqncA=; b=HTB+hJ1O1aUR2ALIfPDxZ2OvlGtggBa/94t79EQQ7pBoJL0NQxvHxS8qV8XZ3iiAfBomRn 4v/h2myWqZ5CN1/7S5d6gJ3dBCzLk672qfHKGs0aB/HrfKbkGohlPyKzc19EfuMexX+Jlg 1n2L8oEWUzLQVwOvm89rBHNsaMulf//9Z41uv/5Apmrn7oS5sAbCR9wSpOxIAbBcN1q9LV s8nOZjCToYogzQCStqVcExIpWTJlvZTFDSOYrdnR+1sfpK+y3Gne3Ekdndbj/S2kXFLVp9 1it0Ocsx9+gvyYTPike+gQGS6aD9aQaxz32k1fgK8q2m3/Dk7tkdt8zahAae7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731527538; a=rsa-sha256; cv=none; b=uCld+hhDNmxFuXC21JWmFzmt7XW/aPswl+9OwrXbIhdlK9agnsgWxNmOxPtx6GoZfIxp3a jDO5P6JnDnbT8baIWCdxrR6QbjFBGIwNaPU01fIXkOmsOQd+ow2dsCNdtJzAbhetE3iXtb DCtVzwFuFFrurQ6SdNXjl83byUkIkmzams9hNM4lHxgRwb88SlO1UYbFqQ7JvB+Gkt2UxF hREd5Pvf897S/XgeM9CPC7hscykRmxczBkEmauDIXk18Q/CYtJbtwWjYKtKtHcfKCsRGyn a2/bsuEBMj/JjO02Mtyvh64zqz355jxn0Y4XMj2uEGjO7pe+HveES5xtB/Kqfw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XpYpV6Kb3z17Xp; Wed, 13 Nov 2024 19:52:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ADJqIRM087181; Wed, 13 Nov 2024 19:52:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ADJqIuK087178; Wed, 13 Nov 2024 19:52:18 GMT (envelope-from git) Date: Wed, 13 Nov 2024 19:52:18 GMT Message-Id: <202411131952.4ADJqIuK087178@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kirk McKusick Subject: git: 2ca9c96dc0cf - stable/14 - Revert commit 8733bc277a383cf59f38a83956f4f523869cfc90 Author: Mateusz Guzik Date: Thu Sep 14 16:13:01 2023 +0000 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mckusick X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 2ca9c96dc0cf0d1f91b37346bce8fd0dd1639ddd Auto-Submitted: auto-generated The branch stable/14 has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=2ca9c96dc0cf0d1f91b37346bce8fd0dd1639ddd commit 2ca9c96dc0cf0d1f91b37346bce8fd0dd1639ddd Author: Kirk McKusick AuthorDate: 2024-11-13 19:37:14 +0000 Commit: Kirk McKusick CommitDate: 2024-11-13 19:52:05 +0000 Revert commit 8733bc277a383cf59f38a83956f4f523869cfc90 Author: Mateusz Guzik Date: Thu Sep 14 16:13:01 2023 +0000 vfs: don't provoke recycling non-free vnodes without a good reason If the total number of free vnodes is at or above target, there is no point creating more of them. This commit was done as a performance optimization but ends up causing slowdowns when doing operations on many files. Requested by: re (cperciva) (cherry picked from commit ab05a1cf321aca0fe632c1ab40f68630b477422c) --- sys/kern/vfs_subr.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 646339987ba2..747cdf722cc9 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1961,25 +1961,11 @@ vn_alloc_hard(struct mount *mp, u_long rnumvnodes, bool bumped) mtx_lock(&vnode_list_mtx); - if (vn_alloc_cyclecount != 0) { - rnumvnodes = atomic_load_long(&numvnodes); - if (rnumvnodes + 1 < desiredvnodes) { - vn_alloc_cyclecount = 0; - mtx_unlock(&vnode_list_mtx); - goto alloc; - } - - rfreevnodes = vnlru_read_freevnodes(); - if (rfreevnodes < wantfreevnodes) { - if (vn_alloc_cyclecount++ >= rfreevnodes) { - vn_alloc_cyclecount = 0; - vstir = true; - } - } else { - vn_alloc_cyclecount = 0; - } + rfreevnodes = vnlru_read_freevnodes(); + if (vn_alloc_cyclecount++ >= rfreevnodes) { + vn_alloc_cyclecount = 0; + vstir = true; } - /* * Grow the vnode cache if it will not be above its target max * after growing. Otherwise, if the free list is nonempty, try From nobody Wed Nov 13 20:10:53 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpZDB6dvhz5cWwr for ; Wed, 13 Nov 2024 20:11:06 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (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 4XpZDB1Nxlz4HQF for ; Wed, 13 Nov 2024 20:11:06 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-4315839a7c9so69308105e9.3 for ; Wed, 13 Nov 2024 12:11:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731528665; x=1732133465; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=J4oful3xxwVSUgn5woIxLr7TGyHWHAMdF0QBhQiDrcM=; b=kl4PlNmymPdWDHIYIoi7Yscb2WrEo84IXYvYYT8JHeM0aNhPQ6whJ5B1OprWMPZ1jt h8v155BbD9YOstS8g7kwiIbJDuIFfH+JK4ttSbjECiJBd2vO2fzAFPM5RCu5YmmmZDU/ i9dLqMDOZ/ZmzDTkKWdiWGfC/XLu1cvvEow3qv0bluWDH3rr+gclk++74wt1WgDFG45+ Tkqx7l9Qpgodp4mxaRBSjB/PXckS1gXaCOQBNwym04h/GqlWlDAE4R8j+4ZVRi4s8aku ZoaxSk9Hxf2eOBkN2C0qWiDMqZ/6SqYUDOvXtb4uu3QqN5GjpkeXbVlISYvp8K+2ou9G 51kw== X-Forwarded-Encrypted: i=1; AJvYcCV0CUrthHr3C00w1j5BBpWsf5w9JQ/e8LpicRndHoBdb5FsSKoTnjMFjN1HxgUZZDYOZnV9QYtEx7hoE+Nq+nIks8GY@freebsd.org X-Gm-Message-State: AOJu0YzbPjrOV6u1BxDy1U1NeOC9Co9F5k3bRCJG3whJ9CA+KUeGnqdS PbiCT3vu2osSsyI0mkKWXccmLHWu52GqpY1+Y6TTX33s7ZzG5yjyqHLZ8tjR+XQaxnIJRdrCuur P X-Google-Smtp-Source: AGHT+IEzEdPbxLEWeqnc7J9jCVk8ZtClk8fkTLEvaoMdE6QcPR0hk+CVsOadJEP8a1wnldzO0SXOjQ== X-Received: by 2002:a05:600c:354c:b0:42c:ba83:3f0e with SMTP id 5b1f17b1804b1-432b74fcb3emr189703065e9.7.1731528664646; Wed, 13 Nov 2024 12:11:04 -0800 (PST) Received: from smtpclient.apple ([131.111.5.201]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-432d5551f9csm35088285e9.40.2024.11.13.12.11.03 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Nov 2024 12:11:04 -0800 (PST) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.200.121\)) Subject: Re: git: e85eaa930862 - main - Have rtld query the page size from the kernel From: Jessica Clarke In-Reply-To: <92a05dfe-683c-43d9-bd29-3110e89be275@FreeBSD.org> Date: Wed, 13 Nov 2024 20:10:53 +0000 Cc: Andrew Turner , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <768D45F9-2F02-4BA1-BFB7-51685486CFCC@freebsd.org> References: <202204071438.237Ecn2A012737@gitrepo.freebsd.org> <92a05dfe-683c-43d9-bd29-3110e89be275@FreeBSD.org> To: John Baldwin X-Mailer: Apple Mail (2.3826.200.121) X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4XpZDB1Nxlz4HQF X-Spamd-Bar: ---- On 13 Nov 2024, at 19:44, John Baldwin wrote: >=20 > On 4/7/22 07:38, Andrew Turner wrote: >> The branch main has been updated by andrew: >> URL: = https://cgit.FreeBSD.org/src/commit/?id=3De85eaa930862d5b4dc917bc31e8d7254= a693635d >> commit e85eaa930862d5b4dc917bc31e8d7254a693635d >> Author: Andrew Turner >> AuthorDate: 2022-04-04 15:05:40 +0000 >> Commit: Andrew Turner >> CommitDate: 2022-04-07 14:37:37 +0000 >> Have rtld query the page size from the kernel >> To allow for a dynamic page size on arm64 have the runtime = linker >> query the kernel for the currentl page size. >> Reviewed by: kib >> Sponsored by: The FreeBSD Foundation >> Differential Revision: https://reviews.freebsd.org/D34765 >=20 > This broke relro handling for rtld. The reason is that = init_pagesizes() is > called after parsing the program headers for rltd in init_rtld(). As = a result, > page_size is 0 when rtld_round_page() is called so the relro_size is = 0. The > RTLD_INIT_EARLY_PAGESIZES case was for ia64, and in the early case = it's probably > not safe to call sysctl? If it is safe to call sysctl, we could just = always > init pagesizes early? It looks like there are a few things going on: 1. relocate_object calls obj_enforce_relro if !obj->mainprog, so will try to enforce RELRO for RTLD itself whilst page_size is 0 2. init_rtld later calls obj_enforce_relro for obj_rtld, after page_size has been initialised 3. init_rtld is careful to avoid using global variables until it=E2=80=99s= called relocate_objects for RTLD itself, but by hiding accesses to page_size away in rtld_*_page that=E2=80=99s no longer true (definitely = not true in the case of text relocations, for example, though whether it also occurs for other cases we care more about I don=E2=80=99t know) So I think there are a couple of things to fix: 1. Stop accessing page_size prior to relocate_objects returning for RTLD itself 2. Stop enforcing RELRO twice for RTLD (e.g. add && obj !=3D rtldobj to relocate_object=E2=80=99s case) At least, that=E2=80=99s what I=E2=80=99ve inferred from reading the = code. Though, to be honest, things might be rather nicer if we just made .rtld_start responsible for relocating RTLD itself prior to calling init_rtld, that=E2=80=99s what we have to do for CHERI, as do arm, = powerpc and powerpc64, and it means you can use globals from the start in init_rtld. Jess From nobody Wed Nov 13 20:10:53 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpZDB6fnFz5cWws for ; Wed, 13 Nov 2024 20:11:06 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (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 4XpZDB1jsgz4H1W for ; Wed, 13 Nov 2024 20:11:06 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-4315e62afe0so69415105e9.1 for ; Wed, 13 Nov 2024 12:11:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731528665; x=1732133465; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=J4oful3xxwVSUgn5woIxLr7TGyHWHAMdF0QBhQiDrcM=; b=AIcAfTcD79YPzauzZpbw0t7FKQlAUBpdu61Adp6uUwmdAswbgfz55F5ATBfLjtJLVT dD4Yfs9ZPNNLo1Sk2njfu/EnXEA7CpIypDmAtrObr6y5zCHuXjAILbYNZMPrSYyttG47 QVVWcQl4Uw4Q7NuZPe8qAlswH5qskUdIKg96zGF50HdaG14EaTfVEpCGi6mjWrMwCIRc YfJLSytEXrINjIGbd/SEyTqPaHQaSRAxLn5crUP/Xl0+yn86rpZVZ5mnm9VDbMqT3h+Z GPU/0jBYy5HUW+F5ysyk0/3sHFTOHOwSMEvu8LChWDa9dnP84pkzt0n6wdbs/vVe3TmD offA== X-Forwarded-Encrypted: i=1; AJvYcCUlCEGUl/K1C5HoiIVbZRjQ+QOllgS78zlQR+GqvOP+Fp5tyIhMPgV9GSK7XxHpJcwax48nuPu5Rh3+vPuRpb41JrEq@freebsd.org X-Gm-Message-State: AOJu0YyRbF4BL+Y+tKzUp6j3bR4oTgMW+labEElZhza5KD8Uw+1QKdxW Z+G3lo4B6kC7Hh9XK5/tMeJ7C/ssCUr4DRubnXNE0afHwp+rF7ZDz0jg/XwJJVCLOILCVNe4bTN W X-Google-Smtp-Source: AGHT+IFlwoVAeXari+vFl0aEHF+0a0so05vPqatK1i47Zpq7hUpcMDWsxLszPmHPFxCg+qODss5Chw== X-Received: by 2002:a05:600c:4f09:b0:42e:93af:61c5 with SMTP id 5b1f17b1804b1-432b7501fdemr198402575e9.14.1731528664782; Wed, 13 Nov 2024 12:11:04 -0800 (PST) Received: from smtpclient.apple ([131.111.5.201]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-432d55520e5sm34373795e9.41.2024.11.13.12.11.04 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Nov 2024 12:11:04 -0800 (PST) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.200.121\)) Subject: Re: git: e85eaa930862 - main - Have rtld query the page size from the kernel From: Jessica Clarke In-Reply-To: <92a05dfe-683c-43d9-bd29-3110e89be275@FreeBSD.org> Date: Wed, 13 Nov 2024 20:10:53 +0000 Cc: Andrew Turner , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <768D45F9-2F02-4BA1-BFB7-51685486CFCC@freebsd.org> References: <202204071438.237Ecn2A012737@gitrepo.freebsd.org> <92a05dfe-683c-43d9-bd29-3110e89be275@FreeBSD.org> To: John Baldwin X-Mailer: Apple Mail (2.3826.200.121) X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4XpZDB1jsgz4H1W X-Spamd-Bar: ---- On 13 Nov 2024, at 19:44, John Baldwin wrote: >=20 > On 4/7/22 07:38, Andrew Turner wrote: >> The branch main has been updated by andrew: >> URL: = https://cgit.FreeBSD.org/src/commit/?id=3De85eaa930862d5b4dc917bc31e8d7254= a693635d >> commit e85eaa930862d5b4dc917bc31e8d7254a693635d >> Author: Andrew Turner >> AuthorDate: 2022-04-04 15:05:40 +0000 >> Commit: Andrew Turner >> CommitDate: 2022-04-07 14:37:37 +0000 >> Have rtld query the page size from the kernel >> To allow for a dynamic page size on arm64 have the runtime = linker >> query the kernel for the currentl page size. >> Reviewed by: kib >> Sponsored by: The FreeBSD Foundation >> Differential Revision: https://reviews.freebsd.org/D34765 >=20 > This broke relro handling for rtld. The reason is that = init_pagesizes() is > called after parsing the program headers for rltd in init_rtld(). As = a result, > page_size is 0 when rtld_round_page() is called so the relro_size is = 0. The > RTLD_INIT_EARLY_PAGESIZES case was for ia64, and in the early case = it's probably > not safe to call sysctl? If it is safe to call sysctl, we could just = always > init pagesizes early? It looks like there are a few things going on: 1. relocate_object calls obj_enforce_relro if !obj->mainprog, so will try to enforce RELRO for RTLD itself whilst page_size is 0 2. init_rtld later calls obj_enforce_relro for obj_rtld, after page_size has been initialised 3. init_rtld is careful to avoid using global variables until it=E2=80=99s= called relocate_objects for RTLD itself, but by hiding accesses to page_size away in rtld_*_page that=E2=80=99s no longer true (definitely = not true in the case of text relocations, for example, though whether it also occurs for other cases we care more about I don=E2=80=99t know) So I think there are a couple of things to fix: 1. Stop accessing page_size prior to relocate_objects returning for RTLD itself 2. Stop enforcing RELRO twice for RTLD (e.g. add && obj !=3D rtldobj to relocate_object=E2=80=99s case) At least, that=E2=80=99s what I=E2=80=99ve inferred from reading the = code. Though, to be honest, things might be rather nicer if we just made .rtld_start responsible for relocating RTLD itself prior to calling init_rtld, that=E2=80=99s what we have to do for CHERI, as do arm, = powerpc and powerpc64, and it means you can use globals from the start in init_rtld. Jess From nobody Wed Nov 13 20:13:57 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpZHT3tvYz5cWlg; Wed, 13 Nov 2024 20:13: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XpZHT1S6nz4J6j; Wed, 13 Nov 2024 20:13:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731528837; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=92MdNOTkHWDiNPNgnFk9GuGg8eqQEICWw43Ed6FSJsQ=; b=JS+8PL6sV1pEV8EEkp3WJdVjE2+swsHSachfCOe/JTM/nfR0WRrxBlRiRLSP7h9RV+xr4N ugQNxy+PGZOvJ3CXfV7OkxOeHsKjdAUlkx/fy0urYBUhCy39R9l8NSVcthlCtEPxjGOrUi 9b13fW/eRjdzy4iUHybhlEX3sDATjIPq913PwXlQj1R4QZu3o2HVWyzNDt2nAvexfS5TcI hsBKhXdmMdkciY72A9TJW+iMWq6VVuMat7R8Ot7miS4m0qbbIQ3mPa8XEYtIfPaBQnh0a8 nwJDmF8RG8MWZ9O4o9q0vTcW91DaoHBiGzZJyAk0LPEVh49vu5UBJmAcC/Kbtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731528837; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=92MdNOTkHWDiNPNgnFk9GuGg8eqQEICWw43Ed6FSJsQ=; b=U49nQJ76Ja6+UEod3Y5KNEI8gBjqLmP5zxyCyppAYZtHO508ojB1wb0zXGnUOJ6OPwsMy0 u555pHScpAab5T1S2OzDvlQ2ZDP671hsPYzh9ljNBixKSD8DRJSfi2jujs3PmOY9BVmMxc ZcVlvs3F/AJv+XN65To+P3di5HeHDKZAs1k/Ons1xfJ8ZDRu6yVskKJ508Ae7sGt+s93P7 Mp0jrUVh8M6VpwzDcNOFRm5UPoDn8dxotIuYnJMl9kyvvv7533MPbeMDum2+ilTtdevsL0 7Atjsn/iNk2QTNR5wWp3SWQwKirnFELmtjocHIVIRvf+3eg3WcCgjP0uho5Liw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731528837; a=rsa-sha256; cv=none; b=Bok8IpBMqmex9dbAHA9VIvKrmxeNK6AbbgOgau7tCok1sHoUToONEd02WAY482C/uiXXxZ u89D6AIPB1ghi4mCgsTMQw8/OoUC/Dgc4KRTOKSYPxm9ftu1rXigUzZK7El+yoe2APDzuo wjDcN/gb5vR423IBK3XpQ8XNRJQ7C0qSuUDqO6pKv7LCcF8YYfKz3RFnFnAGjHkT/NcXEx 5eSQsC4bcPX9ja+jg7fdmb3SrdQzRh5m7xmqaUTcKRZILSFdcU8udNXNpbvaVO9XdVhXJO kExrkHLaZVc86pCMzd7N7v8xDxSYeHs+WZWtvJjcWRadgatHD8qZeYfgP1X80w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XpZHT13KKz17rM; Wed, 13 Nov 2024 20:13:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ADKDv2p024864; Wed, 13 Nov 2024 20:13:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ADKDvfl024861; Wed, 13 Nov 2024 20:13:57 GMT (envelope-from git) Date: Wed, 13 Nov 2024 20:13:57 GMT Message-Id: <202411132013.4ADKDvfl024861@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 01e186731a14 - main - g_eli: update comment for bool return 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 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: 01e186731a141d106ff5bee5a41412e7e2582a78 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=01e186731a141d106ff5bee5a41412e7e2582a78 commit 01e186731a141d106ff5bee5a41412e7e2582a78 Author: Ed Maste AuthorDate: 2024-11-13 20:07:32 +0000 Commit: Ed Maste CommitDate: 2024-11-13 20:13:35 +0000 g_eli: update comment for bool return type Fixes: 68eadcec0f7c8 ("Give a couple of predication functions a bool return type.") Sponsored by: The FreeBSD Foundation --- sys/geom/mirror/g_mirror.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/geom/mirror/g_mirror.c b/sys/geom/mirror/g_mirror.c index b46296fd211c..25c0490938ef 100644 --- a/sys/geom/mirror/g_mirror.c +++ b/sys/geom/mirror/g_mirror.c @@ -1222,7 +1222,7 @@ g_mirror_start(struct bio *bp) } /* - * Return TRUE if the given request is colliding with a in-progress + * Return true if the given request is colliding with a in-progress * synchronization request. */ static bool @@ -1254,7 +1254,7 @@ g_mirror_sync_collision(struct g_mirror_softc *sc, struct bio *bp) } /* - * Return TRUE if the given sync request is colliding with a in-progress regular + * Return true if the given sync request is colliding with a in-progress regular * request. */ static bool From nobody Wed Nov 13 20:27:42 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpZbc2JpFz5cXn2; Wed, 13 Nov 2024 20:27:56 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-ot1-f43.google.com (mail-ot1-f43.google.com [209.85.210.43]) (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 4XpZbb1b5nz4K9n; Wed, 13 Nov 2024 20:27:55 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of carpeddiem@gmail.com designates 209.85.210.43 as permitted sender) smtp.mailfrom=carpeddiem@gmail.com; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=freebsd.org (policy=none) Received: by mail-ot1-f43.google.com with SMTP id 46e09a7af769-7180ab89c58so3733038a34.1; Wed, 13 Nov 2024 12:27:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731529674; x=1732134474; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kBeMY2N8RrXrfA1xBOVxJSBY7AZOwCRXrL5F4a6mnhk=; b=ca6dBwHtmdYdq24HmsoHv8dDXYGRY1JUfoXzdz494EdT6TGDtkSQVSs/geVJhUElx6 FXyT1D+d+gasLqu8oTmdSfHjabxFyHaOHhj4rEX7jLJ8NvyD8DMpzl4XiVL4BLNdKJmi ZQlg0mxL/uLvMkCUII29KrdR+2A7MDCGwdEutToUD5A9J/lHc23Em4P3PY5niHN2gjWc Z7rImRHdujzvf/gfZSQbjJO5ff0gQrR89DkZslkoJUDNZttWSx2tHyTAVAIvj+O9RNy6 90GqqhbjoH4tuIZBgag4p0x5Yz6oC3TGtmGeD28zXqQUFj43zcofspO04/GYJfJC1iuL yJrA== X-Forwarded-Encrypted: i=1; AJvYcCWEKaH+7NHATo6vsy/9F5PLkREnowx4uv9KwyX7euk8Kpc/eyScui0gqQLmyYYpRHe7o0fe8rY3XjoIuChx5K2BHwONkVI=@freebsd.org, AJvYcCWa3kB3qDSlkpP5TidTPCLg8HStcQ+eDWfO5iS+KQPraDmvm9ySArrtbAVVqJs3WJct2qJao7I5U4u7uIhdCKI=@freebsd.org, AJvYcCWsZEwj3dYKkoWfhsSs3b+6cL8vfJtKGMYgYazRBMhf3tL9ZS+UtcCV5nv4eT6G7EtL4BmGvFWS8vikDRagWzp5P8gF@freebsd.org X-Gm-Message-State: AOJu0Yy6zy8sx2bKaIwY/6HJHFYlpF+xSYsquW5gD35Fx4zSR8O0Mg2m vHaqeSgI58fpzMBfpQhWgqCXPafaX5jsVqs0PQfbrKt+f+DR0PebK7QGfgDx5nmQKSqBaD1Thhz YEEC/lpkgfbMENS5zJVAL8JkP7/UVivCj X-Google-Smtp-Source: AGHT+IGpvvWgME+Bym3bLzYKrJngC7v/uQG8Wt6r3wvvuLyREDY56InGP5nACAX/zOKUy4gay5pXZzXqW4yB9jFJmJw= X-Received: by 2002:a05:6830:d85:b0:718:9ae5:9030 with SMTP id 46e09a7af769-71a600d3d48mr4872207a34.4.1731529673621; Wed, 13 Nov 2024 12:27:53 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <202411111247.4ABClC6l042813@gitrepo.freebsd.org> <46spnoss-r0s0-92o3-60r7-r2o49ro82580@SerrOFQ.bet> <333D66C8-12BC-43CD-B33B-B410B8B3BC22@FreeBSD.org> In-Reply-To: <333D66C8-12BC-43CD-B33B-B410B8B3BC22@FreeBSD.org> From: Ed Maste Date: Wed, 13 Nov 2024 15:27:42 -0500 Message-ID: Subject: Re: git: 9e469437993b - main - inet.4: drop "experimetal use" from net0 and net240 descriptions To: Zhenlei Huang Cc: "Bjoern A. Zeeb" , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Result: default: False [-2.99 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; NEURAL_HAM_SHORT(-0.99)[-0.992]; FORGED_SENDER(0.30)[emaste@freebsd.org,carpeddiem@gmail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; MIME_GOOD(-0.10)[text/plain]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : SPF not aligned (relaxed), No valid DKIM,none]; RWL_MAILSPIKE_GOOD(-0.10)[209.85.210.43:from]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEFALL_USER(0.00)[carpeddiem]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_COUNT_ONE(0.00)[1]; RCVD_TLS_LAST(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; FROM_NEQ_ENVFROM(0.00)[emaste@freebsd.org,carpeddiem@gmail.com]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; R_DKIM_NA(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.210.43:from]; MISSING_XM_UA(0.00)[]; RCPT_COUNT_FIVE(0.00)[5] X-Rspamd-Queue-Id: 4XpZbb1b5nz4K9n X-Spamd-Bar: -- On Tue, 12 Nov 2024 at 08:56, Zhenlei Huang wrote: > > Emm, while I was reviewing this change, I also wondered if it is too earl= y to remove the word *experimental* as the RFC is still in draft status. We= ll later I think ( maybe I'm wrong ) RFC actually lag behind the reality ( = I'm saying FreeBSD as a vendor and move fast action ) so I think it is OK t= o remove now. My argument for the man page update was that the sysctl controls use of those addresses, regardless of purpose. Note that the sysctl description captures this subtle distinction already: net.inet.ip.allow_net240: Allow use of Experimental addresses, aka Class E (240/4) That is, it's "... use of Experimental addresses ..." not "... experimental use of ..." Unfortunately it's a bit more of a mess than that. Most operating systems are allowing 240/4 by default and as it turns out we (unintentionally?) also allow configuring 240/4 the host's IPv4 address already. This sysctl actually controls only forwarding, and we'll need to update anyway. I'm inclined to indicate in the man page that these sysctls control forwarding, and add a note along the lines of "at time of writing this region is reserved." From nobody Wed Nov 13 20:32:00 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpZhJ3Nwsz5cXbW; Wed, 13 Nov 2024 20:32: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XpZhJ2skJz4LfG; Wed, 13 Nov 2024 20:32:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731529920; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zZ977j6aDGm7jN8/M5zOv6TTb92VruIl2pSgkuP4Nco=; b=U04ya3cP0mmeQmu9jJxqOqKa8y2u9DPfWUuBIbfCZu0ZE9Tv9DvvpP2cGWQhJhrKYEwuVp kFBCt9hVd13rd6LC9BFABHHQk2jbTh9pUcEE/Kfsnenq2r/yTEgA15VMPVBNAq8F/hnBTb yI/Hxsbx5sbun8YwoSJez/QfdSSuVLh/xHoerq0cYy/lT6bcKGWBm1jf7toqUiWTUyn81U 2kpVhTSRuHcriWHNQgpsORnA7o5rNUoNgOvZdeJcK7dEloBJpKhEoJtMuzY1qhWCD8nJiz rXR9bq7JOqCycPXMkRJ7+f+EoYOQN169AKcwJShdiFGdV4VdryDZtsBA6MZBrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731529920; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zZ977j6aDGm7jN8/M5zOv6TTb92VruIl2pSgkuP4Nco=; b=dnXkg4l9cDrHXkddzwM86vztr7OZUiRb+nlRgLoWKuQVgrnC0egac7hVNzJfWW0IEKO+xx ut8EWTE6giANJw+krGs7FvxCO3UsRfFd2WfMvxzoGn+/eNSLjdbs8p0mi7Or4cmqFuf0IV lO4N1Gbu1Ybb4keTui2FopcuEh8haXgrbuBFckHjBdPWjG6PUeB/kRi2sOiT0XZINhGmIX 925PEhiRDnd2R39UwNNiv1JHc+2xybPSuUAYoUV+OtVxpkj4BklP0kJM6VPs0h44klnuMk KXS9ii1cd7VQhhp5VyTK0h95paO7NXSkZCc8VrgtIp/ikf3pJcqBaZ2mzWs2PQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731529920; a=rsa-sha256; cv=none; b=wtqtQxMk5t6SADLk8A02LNKVNsDMd83vM8AsVr2Yzy8kl2kSTCofKwdxtX+7fHtNGFBfnm JJdLJ7Oxy2skoZmadKhrbGuLR3ZsjKv4Q9GpR++5CwZDIGl2q2Vra33IPMmRsHIvWKwV80 7cxZGCcAPGjpYMGGgKpgEdSpdF1YxIWj0sVhy+Worh9AMOGu3cGHh4625CIaIIz2Brm8WE tLUVbDqzw7tDEs5Q9iyJXGlt4haCumcwS8mJDeOsjI76WaKPsWVPRNV8iYM1mMOqe2xakE 17F+BbOzCYlIYyY8keOXlX5pjx7+QvZ/TucTk3uVcpZOLW099ISIY2wPLo6udw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XpZhJ2LtTz17y7; Wed, 13 Nov 2024 20:32:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ADKW0UE058190; Wed, 13 Nov 2024 20:32:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ADKW0dj058187; Wed, 13 Nov 2024 20:32:00 GMT (envelope-from git) Date: Wed, 13 Nov 2024 20:32:00 GMT Message-Id: <202411132032.4ADKW0dj058187@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: ac5e30a8073f - main - pf: add probe points to pf_route(6)() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ac5e30a8073f95a4764c939cde29adae51229bdd Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=ac5e30a8073f95a4764c939cde29adae51229bdd commit ac5e30a8073f95a4764c939cde29adae51229bdd Author: Kristof Provost AuthorDate: 2024-11-13 10:26:39 +0000 Commit: Kristof Provost CommitDate: 2024-11-13 20:26:28 +0000 pf: add probe points to pf_route(6)() Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf.c | 71 +++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 58 insertions(+), 13 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 691cb697a659..daf3fcf567ad 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -126,6 +126,14 @@ SDT_PROBE_DEFINE5(pf, ip, state, lookup, "struct pfi_kkif *", "struct pf_kstate *"); SDT_PROBE_DEFINE2(pf, ip, , bound_iface, "struct pf_kstate *", "struct pfi_kkif *"); +SDT_PROBE_DEFINE4(pf, ip, route_to, entry, "struct mbuf *", + "struct pf_pdesc *", "struct pf_kstate *", "struct ifnet *"); +SDT_PROBE_DEFINE1(pf, ip, route_to, drop, "int"); +SDT_PROBE_DEFINE2(pf, ip, route_to, output, "struct ifnet *", "int"); +SDT_PROBE_DEFINE4(pf, ip6, route_to, entry, "struct mbuf *", + "struct pf_pdesc *", "struct pf_kstate *", "struct ifnet *"); +SDT_PROBE_DEFINE1(pf, ip6, route_to, drop, "int"); +SDT_PROBE_DEFINE2(pf, ip6, route_to, output, "struct ifnet *", "int"); SDT_PROBE_DEFINE4(pf, sctp, multihome, test, "struct pfi_kkif *", "struct pf_krule *", "struct mbuf *", "int"); SDT_PROBE_DEFINE2(pf, sctp, multihome, add, "uint32_t", @@ -7660,6 +7668,8 @@ pf_route(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp, KASSERT(m && *m && r && oifp, ("%s: invalid parameters", __func__)); + SDT_PROBE4(pf, ip, route_to, entry, *m, pd, s, oifp); + if (s) { r_rt = s->rt; r_dir = s->direction; @@ -7677,6 +7687,7 @@ pf_route(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp, pd->pf_mtag->routed++ > 3) { m0 = *m; *m = NULL; + SDT_PROBE1(pf, ip, route_to, drop, __LINE__); goto bad_locked; } @@ -7699,6 +7710,7 @@ pf_route(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp, } else { m0 = *m; *m = NULL; + SDT_PROBE1(pf, ip, route_to, drop, __LINE__); goto bad; } } else { @@ -7732,6 +7744,7 @@ pf_route(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp, if (TAILQ_EMPTY(&r->rpool.list)) { DPFPRINTF(PF_DEBUG_URGENT, ("%s: TAILQ_EMPTY(&r->rpool.list)\n", __func__)); + SDT_PROBE1(pf, ip, route_to, drop, __LINE__); goto bad_locked; } pf_map_addr(AF_INET, r, (struct pf_addr *)&ip->ip_src, @@ -7764,18 +7777,24 @@ pf_route(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp, PF_STATE_UNLOCK(s); } - if (ifp == NULL) + if (ifp == NULL) { + SDT_PROBE1(pf, ip, route_to, drop, __LINE__); goto bad; + } if (pd->dir == PF_IN) { if (pf_test(AF_INET, PF_OUT, PFIL_FWD, ifp, &m0, inp, - &pd->act) != PF_PASS) + &pd->act) != PF_PASS) { + SDT_PROBE1(pf, ip, route_to, drop, __LINE__); goto bad; - else if (m0 == NULL) + } else if (m0 == NULL) { + SDT_PROBE1(pf, ip, route_to, drop, __LINE__); goto done; + } if (m0->m_len < sizeof(struct ip)) { DPFPRINTF(PF_DEBUG_URGENT, ("%s: m0->m_len < sizeof(struct ip)\n", __func__)); + SDT_PROBE1(pf, ip, route_to, drop, __LINE__); goto bad; } ip = mtod(m0, struct ip *); @@ -7834,8 +7853,10 @@ pf_route(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp, md = m0; error = pf_dummynet_route(pd, s, r, ifp, sintosa(&dst), &md); - if (md != NULL) + if (md != NULL) { error = (*ifp->if_output)(ifp, md, sintosa(&dst), NULL); + SDT_PROBE2(pf, ip, route_to, output, ifp, error); + } goto done; } @@ -7851,14 +7872,19 @@ pf_route(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp, icmp_error(m0, ICMP_UNREACH, ICMP_UNREACH_NEEDFRAG, 0, ifp->if_mtu); + SDT_PROBE1(pf, ip, route_to, drop, __LINE__); goto done; - } else + } else { + SDT_PROBE1(pf, ip, route_to, drop, __LINE__); goto bad; + } } error = ip_fragment(ip, &m0, ifp->if_mtu, ifp->if_hwassist); - if (error) + if (error) { + SDT_PROBE1(pf, ip, route_to, drop, __LINE__); goto bad; + } for (; m0; m0 = m1) { m1 = m0->m_nextpkt; @@ -7869,9 +7895,11 @@ pf_route(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp, pd->pf_mtag = pf_find_mtag(md); error = pf_dummynet_route(pd, s, r, ifp, sintosa(&dst), &md); - if (md != NULL) + if (md != NULL) { error = (*ifp->if_output)(ifp, md, sintosa(&dst), NULL); + SDT_PROBE2(pf, ip, route_to, output, ifp, error); + } } else m_freem(m0); } @@ -7908,6 +7936,8 @@ pf_route6(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp, KASSERT(m && *m && r && oifp, ("%s: invalid parameters", __func__)); + SDT_PROBE4(pf, ip6, route_to, entry, *m, pd, s, oifp); + if (s) { r_rt = s->rt; r_dir = s->direction; @@ -7925,6 +7955,7 @@ pf_route6(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp, pd->pf_mtag->routed++ > 3) { m0 = *m; *m = NULL; + SDT_PROBE1(pf, ip6, route_to, drop, __LINE__); goto bad_locked; } @@ -7947,6 +7978,7 @@ pf_route6(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp, } else { m0 = *m; *m = NULL; + SDT_PROBE1(pf, ip6, route_to, drop, __LINE__); goto bad; } } else { @@ -7980,6 +8012,7 @@ pf_route6(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp, if (TAILQ_EMPTY(&r->rpool.list)) { DPFPRINTF(PF_DEBUG_URGENT, ("%s: TAILQ_EMPTY(&r->rpool.list)\n", __func__)); + SDT_PROBE1(pf, ip6, route_to, drop, __LINE__); goto bad_locked; } pf_map_addr(AF_INET6, r, (struct pf_addr *)&ip6->ip6_src, @@ -8014,19 +8047,25 @@ pf_route6(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp, if (s) PF_STATE_UNLOCK(s); - if (ifp == NULL) + if (ifp == NULL) { + SDT_PROBE1(pf, ip6, route_to, drop, __LINE__); goto bad; + } if (pd->dir == PF_IN) { if (pf_test(AF_INET6, PF_OUT, PFIL_FWD, ifp, &m0, inp, - &pd->act) != PF_PASS) + &pd->act) != PF_PASS) { + SDT_PROBE1(pf, ip6, route_to, drop, __LINE__); goto bad; - else if (m0 == NULL) + } else if (m0 == NULL) { + SDT_PROBE1(pf, ip6, route_to, drop, __LINE__); goto done; + } if (m0->m_len < sizeof(struct ip6_hdr)) { DPFPRINTF(PF_DEBUG_URGENT, ("%s: m0->m_len < sizeof(struct ip6_hdr)\n", __func__)); + SDT_PROBE1(pf, ip6, route_to, drop, __LINE__); goto bad; } ip6 = mtod(m0, struct ip6_hdr *); @@ -8051,8 +8090,11 @@ pf_route6(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp, if ((u_long)m0->m_pkthdr.len <= ifp->if_mtu) { md = m0; pf_dummynet_route(pd, s, r, ifp, sintosa(&dst), &md); - if (md != NULL) - nd6_output_ifp(ifp, ifp, md, &dst, NULL); + if (md != NULL) { + int ret; + ret = nd6_output_ifp(ifp, ifp, md, &dst, NULL); + SDT_PROBE2(pf, ip6, route_to, output, ifp, ret); + } } else { in6_ifstat_inc(ifp, ifs6_in_toobig); @@ -8063,8 +8105,11 @@ pf_route6(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp, sizeof(struct ip6_hdr), s); icmp6_error(m0, ICMP6_PACKET_TOO_BIG, 0, ifp->if_mtu); - } else + SDT_PROBE1(pf, ip6, route_to, drop, __LINE__); + } else { + SDT_PROBE1(pf, ip6, route_to, drop, __LINE__); goto bad; + } } done: From nobody Wed Nov 13 21:03:58 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpbPC1LmWz5cb2W; Wed, 13 Nov 2024 21:03: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XpbPC0Xfpz4P6Y; Wed, 13 Nov 2024 21:03:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731531839; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wYPUXh0lrec0K0iY4ga38dPDGwcbDVFa8OqJBlPcMRQ=; b=JshWtNC8gelvhwk+j4U7klRpvtgc2zEm0umbAJb8C4nYMSlT4Cme9Uzz5uIiYu5YBortzF FIeqCOVeAZm6w6fNOOD63D0ANB/N8VcDNZgakX94Gv9EpIf1eGCRl2LlY5p7ID4s9OE1OK j12g/0YR+H3QMT17JZPnMBIhCWfyomsuqU1QmuCQy9RUb2+Lif/VVDM+qsVQ5h/5KzNjVK TR4kqfyFuPSkJ9x3H4C228EPFGzw24gP0mD7rcUQNGL5Xn5giRPGnZJyHxwInHdHRx7nvo 9bNPbariP2N84S7VCPjAjGOowQ8uGs9v5c195DzPX0DdBrz9EDZHDEiE4M6tMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731531839; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wYPUXh0lrec0K0iY4ga38dPDGwcbDVFa8OqJBlPcMRQ=; b=ZtV/OqEl+hBNSlGN46FWL/BvVTTc23MFLDUsAm9hegIHbqefVmfIorCpKH5wR8lzVWwN17 QW81j2EbLa9ZSfZVY2Hv3vqLZ8Thm1dVrMGcSHNNzuFvn5cprlzPmvsNp+KH9c4wguT2sM B6gRdge8D6lgJ3QGQEBJLqdHT/D4osRJqxTGaBZ63I7lG06GX7eazRpCyng2RY94jLni5+ g/i9Wo6m1DjZ/8yP2ntF6lTpayzHOI8/nQq+DmWl24ZtlGcANp5sPDoCYaWHGJIgnUlxA4 88cxjAukOji7buYOKjHg3Cx/ZdYfvpl7p4x356owLVbM0Jsb/BQ4b15PeJv94A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731531839; a=rsa-sha256; cv=none; b=xeJLd3FCnb26jLAgRfS1vJjeZDwUYI/Q7mP2eWS3x3s0qFyLXx/Z0s/o3cH9GVebj+IRMH Peec9nGj2y2t7Kfc+XcydqBgPxlxzqSECCf3Kb6ncEHpRyKP3qXse4CHOJURmQhne6HwsR ZINylrPEbS3xW3M+JLBc54MLNAhVgBnTw5EbaC1kuFqSILPHdu+Ryr11lNEB+3H0pikfjX UMSdF3949VobGqA6kt1IgA77efnX5cNVAHZ9CZ/beUjyhD9oe3kkjTfS1Qu0c15M4NsJ06 4Qy3hEv1pOxTkf9xX2ADIVBZStk1k93Mj/jg5sxGaWzrjTRh4X5H2j/b9TardQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XpbPC05Ltz1939; Wed, 13 Nov 2024 21:03:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ADL3wTS018675; Wed, 13 Nov 2024 21:03:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ADL3wng018672; Wed, 13 Nov 2024 21:03:58 GMT (envelope-from git) Date: Wed, 13 Nov 2024 21:03:58 GMT Message-Id: <202411132103.4ADL3wng018672@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: 1da4954c92ea - main - Fix failure to add an interface prefix route when route with the same prefix is already presented in the routing table. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1da4954c92ea7585b352ba830d3ee64ca69ada52 Auto-Submitted: auto-generated The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=1da4954c92ea7585b352ba830d3ee64ca69ada52 commit 1da4954c92ea7585b352ba830d3ee64ca69ada52 Author: Alexander V. Chernikov AuthorDate: 2024-11-12 23:36:50 +0000 Commit: Alexander V. Chernikov CommitDate: 2024-11-12 23:36:50 +0000 Fix failure to add an interface prefix route when route with the same prefix is already presented in the routing table. PR: 277125 Reported by: Oleksandr Ignatyev Reviewed by: ae, jlduran Tested by: jlduran Differential Revision: https://reviews.freebsd.org/D47534 MFC after: 2 weeks --- sys/net/route/route_ctl.c | 13 ++++++++----- sys/net/route/route_ctl.h | 10 +++++----- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/sys/net/route/route_ctl.c b/sys/net/route/route_ctl.c index a07a58737c1c..d7756f2a0eb6 100644 --- a/sys/net/route/route_ctl.c +++ b/sys/net/route/route_ctl.c @@ -772,12 +772,15 @@ add_route_byinfo(struct rib_head *rnh, struct rt_addrinfo *info, rnd_add.rnd_weight = get_info_weight(info, RT_DEFAULT_WEIGHT); int op_flags = RTM_F_CREATE; - if (get_prio_from_info(info) == NH_PRIORITY_HIGH) - op_flags |= RTM_F_FORCE; - else - op_flags |= RTM_F_APPEND; - return (add_route_flags(rnh, rt, &rnd_add, op_flags, rc)); + /* + * Set the desired action when the route already exists: + * If RTF_PINNED is present, assume the direct kernel routes that cannot be multipath. + * Otherwise, append the path. + */ + op_flags |= (info->rti_flags & RTF_PINNED) ? RTM_F_REPLACE : RTM_F_APPEND; + + return (add_route_flags(rnh, rt, &rnd_add, op_flags, rc)); } static int diff --git a/sys/net/route/route_ctl.h b/sys/net/route/route_ctl.h index 140f14aa9e4f..845df8ce1fbe 100644 --- a/sys/net/route/route_ctl.h +++ b/sys/net/route/route_ctl.h @@ -61,11 +61,11 @@ int rib_del_route_px_gw(uint32_t fibnum, struct sockaddr *dst, int plen, const struct sockaddr *gw, int op_flags, struct rib_cmd_info *rc); /* operation flags */ -#define RTM_F_CREATE 0x01 -#define RTM_F_EXCL 0x02 -#define RTM_F_REPLACE 0x04 -#define RTM_F_APPEND 0x08 -#define RTM_F_FORCE 0x10 +#define RTM_F_CREATE 0x01 /* Create object if not exists */ +#define RTM_F_EXCL 0x02 /* (Deprecated) Do not replace or append if exists */ +#define RTM_F_REPLACE 0x04 /* Replace if route (even multipath) if exists */ +#define RTM_F_APPEND 0x08 /* Append path to the route */ +#define RTM_F_FORCE 0x10 /* Bump operation priority to highest */ int rib_add_route(uint32_t fibnum, struct rt_addrinfo *info, struct rib_cmd_info *rc); From nobody Wed Nov 13 21:25:16 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xpbsw2RPWz5cbjX; Wed, 13 Nov 2024 21:25:24 +0000 (UTC) (envelope-from bz@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xpbsw1s3Hz4R2C; Wed, 13 Nov 2024 21:25:24 +0000 (UTC) (envelope-from bz@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731533124; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=jDgaGlizlGTTU5jxQsvDVUyY/L/h4s9pehrNku/VUwo=; b=mZ07ezCfeMxxOG3IPIfhtc58LpIhJ6inpu4fejV73/I1zENH1JxzcrHXD/CyNX91K+pbtc yzDIKi1eIH+1QIfXzA0j8uNZ6vOECediOhkV+kBzd5x8AD777SQjWUc+ObE3kdVwHiY551 kkW/Rr+v/b5C4lKH3iMxa0kVsQdq9aUVHYYx5TYdu/RBgJfdpKrg3guUZV4OCMmPRq7iPh ed7Wa48QgXuXAE4LrnnYi1wIKNKQao9Jl7WMYRfrIuE3mbm8M/fzWhkdAbd38Ogb9DyoGQ 0CHeWWNudrn6n+j0MXr9wW7HHy35oWuLdwZ20EZjbfTJds7vfGoTD300oZ0IYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731533124; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=jDgaGlizlGTTU5jxQsvDVUyY/L/h4s9pehrNku/VUwo=; b=yO/R53CEb8sW+tCCifjoq1egWm4Aq7J/RZB2j+FIt9nJRI7dTuwXJpqy5z0WkpYKIaMomh M78m7PwwyK1AOwELZHO6A0gTWl981hCQz5fz1ZIV3ID1U1AKJexM8r/1vxs819L9UdHsQV z0sebhsNWB+EfXmQuiRfHDfHlaUOKAB67MjJWMpxojscUgsEw7szIuLnGbTKC3z3+udYzD lalAxQ5DEL5qD9G++ryDutuHEpddujv2AAkvzErnFlRXRa1+oL0fDKW9He1eo2EaYlL+yi v5V3OBn+kX712nIWoSdTLZLzqJB8VAGbgKW8wgPtr4OXtuCwq4gJv4EVGnQOjA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731533124; a=rsa-sha256; cv=none; b=umlW5LBywL4jTghXLeGRY7levvsnBipp6BwvZc8Z14NXk+RM04ift3aqKnUEnZP1CtLD3g VzoyLepXjab7l9hq0XCGUO9uc204jQoAe4a49YidxOJTG92heZogh9Z9fXbHZEVqXXoW3p f34JJ38tKMSfPU+Pggg4OmKL2p5R5Ha2QVjtKTYtrpoTLtf0PollSHSjPszNEb+TFoi6Me lwC791qBIEk2JELnVJULQOZ0oxj89ALw17So7BH5VmQ3dv6XGy1OBm6WnZGbouHq0DAi7T wz6KYPBIFK84Ya/QEAnH94rmoWorGEcHSfX+IUZadSGGl65nVO3bnC6oYrDKIg== Received: from mx-01.divo.sbone.de (mx-01.divo.sbone.de [IPv6:2003:a:140a:2200:6:594:fffe:19]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature ECDSA (P-256) client-digest SHA256) (Client CN "mx-01.divo.sbone.de", Issuer "E6" (verified OK)) (Authenticated sender: bz/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Xpbsw0WHYzLxx; Wed, 13 Nov 2024 21:25:23 +0000 (UTC) (envelope-from bz@freebsd.org) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by mx-01.divo.sbone.de (Postfix) with ESMTPS id C22CCA64805; Wed, 13 Nov 2024 21:25:13 +0000 (UTC) Received: from content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 3D9892D029D8; Wed, 13 Nov 2024 21:25:19 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) by content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (amavisd-new, port 10024) with ESMTP id KQNrxk0dum2I; Wed, 13 Nov 2024 21:25:18 +0000 (UTC) Received: from strong-iwl0.sbone.de (strong-iwl0.sbone.de [IPv6:fde9:577b:c1a9:4902:b66b:fcff:fef3:e3d2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 1E42A2D029D2; Wed, 13 Nov 2024 21:25:18 +0000 (UTC) Date: Wed, 13 Nov 2024 21:25:16 +0000 (UTC) From: "Bjoern A. Zeeb" To: Ed Maste cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Subject: Re: git: 9e469437993b - main - inet.4: drop "experimetal use" from net0 and net240 descriptions In-Reply-To: Message-ID: <92rrs9s2-0846-ppno-o673-69np1773qq40@serrofq.bet> References: <202411111247.4ABClC6l042813@gitrepo.freebsd.org> <46spnoss-r0s0-92o3-60r7-r2o49ro82580@SerrOFQ.bet> <333D66C8-12BC-43CD-B33B-B410B8B3BC22@FreeBSD.org> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed On Wed, 13 Nov 2024, Ed Maste wrote: > On Tue, 12 Nov 2024 at 08:56, Zhenlei Huang wrote: >> >> Emm, while I was reviewing this change, I also wondered if it is too early to remove the word *experimental* as the RFC is still in draft status. Well later I think ( maybe I'm wrong ) RFC actually lag behind the reality ( I'm saying FreeBSD as a vendor and move fast action ) so I think it is OK to remove now. > > My argument for the man page update was that the sysctl controls use > of those addresses, regardless of purpose. Note that the sysctl > description captures this subtle distinction already: > > net.inet.ip.allow_net240: Allow use of Experimental addresses, aka > Class E (240/4) > > That is, it's "... use of Experimental addresses ..." not "... > experimental use of ..." > > Unfortunately it's a bit more of a mess than that. Most operating > systems are allowing 240/4 by default and as it turns out we > (unintentionally?) also allow configuring 240/4 the host's IPv4 > address already. This sysctl actually controls only forwarding, and > we'll need to update anyway. I'm inclined to indicate in the man page > that these sysctls control forwarding, and add a note along the lines > of "at time of writing this region is reserved." Sounds good to me. Thank you! /bz -- Bjoern A. Zeeb r15:7 From nobody Wed Nov 13 22:13:11 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xpcx35svkz5cfQr; Wed, 13 Nov 2024 22:13: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xpcx35M5Fz4VtC; Wed, 13 Nov 2024 22:13:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731535991; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tSGr3cP43gBciXbyPrY2EDBkYdwx9yF7fsWG+SRVC1M=; b=WmiHoHOOdvgkn4PtD8IpIoJQqITXFWQNS+moHsUoxsgk6FIA5xH/suzFv828iDMit8gsVy uRg1bcYM9v7Wd5xSqF0tBrnfOY+1+fQ1o11st00m82sY9aAI5i2ZnagtskjTTa5RgaRJmC fl08WqzWq/Es51h/VcHUPJ/jG8dRFwQDL1JAJDGtskFSvnIHktJQ/2GbFLZ3BMv7dOlxVB af1wEjYbMpSfess1HDiirf+LTewQAZdBftTYFAmF/Wc2XX5zlCwVp4eGJuaGJCnsBGm79c QSqMRzlqkN6TgrPzrovhzOhM/5y8whpvQsc63BTit3Eoyc9lT/U0CLhUzFeaCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731535991; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tSGr3cP43gBciXbyPrY2EDBkYdwx9yF7fsWG+SRVC1M=; b=m/x3OiD81VVoJb1Jc+cRXim3Gf3LvwSS6FAwqEuZ/AQ2xGCRAMWG7SUNcsuhGw416gfekR ocUu031QxoyPqJtK3NCBU9YX6wsyQW3hqUxgHy+Dg693024qJtues4zvcYHS3EiQBMeJgN A0Z0mos/utS9/K7HxvBtey3LaoSZMnAEvtQnOLj1RRqA3YBb8GasdmiV1i6yR8AWwL6YRy RqdOx60hvWH0oUHMpJ0U0BhGQfZRF6zXXuTz/PL487uRqqbDFcBy2fDjB2HkcMtFvkb/ga y9AsyO9H8BZiJu1zw/n5MzrZEaa7K4z4nT2s3A2idmBj5+uFJqavuGDSzY/DkA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731535991; a=rsa-sha256; cv=none; b=SF5+Iu41bUHA6WedZ17CUEYypETINas30o+SHzIknDrFIs4K5Zy0v4vAVlM5/1r7wReiaC gvEvwkp9Tc/H6Grm5W1YHcHlPmUAqyWhcLtC7P7YcJgj24te/AvScZ3yzJKeVCDK5dgTGj YkSVjxSKE6sYzffszLMprOUJ5LUqHg5X3UcfZrCWcYLKuWJGHr4unlvKve4M7kZ2RxLXKj Is2rBQD+Iq6t19Cw2r51SzFUbuQebWTFcAy5mkar+SOVEyadPHYO9p5oR1su9FEDlXiopU j5x9mAmF/X32WxvO3+kjJp9OxKqaPSVDq4YKubWkcv6P89WMnvq722X1VLtCdA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xpcx34y2zz1C5P; Wed, 13 Nov 2024 22:13:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ADMDBTU046946; Wed, 13 Nov 2024 22:13:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ADMDBAK046943; Wed, 13 Nov 2024 22:13:11 GMT (envelope-from git) Date: Wed, 13 Nov 2024 22:13:11 GMT Message-Id: <202411132213.4ADMDBAK046943@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: a4b7367eb027 - main - timedef: remove redundancy in Catalan date_fmt 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 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a4b7367eb027a99b9eb48bf18951049434a9e189 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=a4b7367eb027a99b9eb48bf18951049434a9e189 commit a4b7367eb027a99b9eb48bf18951049434a9e189 Author: Kyle Evans AuthorDate: 2024-11-13 22:12:42 +0000 Commit: Kyle Evans CommitDate: 2024-11-13 22:12:42 +0000 timedef: remove redundancy in Catalan date_fmt definitions This is already factored into the month names, resulting in an awkward construction: $ env LC_ALL=ca_ES.UTF-8 date dimecres, 6 de de novembre de 2024, 21:21:18 CST This would now render as: $ env LC_ALL=ca_ES.UTF-8 date dimecres, 6 de novembre de 2024, 21:22:41 CST Reviewed by: bapt, royger Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D47471 --- share/timedef/ca_IT.ISO8859-15.src | 2 +- share/timedef/ca_IT.UTF-8.src | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/share/timedef/ca_IT.ISO8859-15.src b/share/timedef/ca_IT.ISO8859-15.src index 669fbab13074..7c625aad19b5 100644 --- a/share/timedef/ca_IT.ISO8859-15.src +++ b/share/timedef/ca_IT.ISO8859-15.src @@ -59,7 +59,7 @@ a. m. p. m. # # date_fmt -%A, %e de %B de %Y, %X %Z +%A, %e %B de %Y, %X %Z # # Long month names (without case ending) de gener diff --git a/share/timedef/ca_IT.UTF-8.src b/share/timedef/ca_IT.UTF-8.src index 5dfd3841d9af..a85dd8c4b942 100644 --- a/share/timedef/ca_IT.UTF-8.src +++ b/share/timedef/ca_IT.UTF-8.src @@ -63,7 +63,7 @@ a. m. p. m. # # date_fmt -%A, %e de %B de %Y, %X %Z +%A, %e %B de %Y, %X %Z # # Long month names (without case ending) de gener From nobody Wed Nov 13 22:13:12 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xpcx50bJmz5cfSn; Wed, 13 Nov 2024 22:13: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xpcx46fZHz4VgX; Wed, 13 Nov 2024 22:13:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731535992; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qVqEsuB0Q9GWXemzJpIGkzFMcYogp9gSsrFbhbFORwY=; b=UDrz5USv68qb9T6unpIZvZxbbuF3o2urtqsrFjlMzvAYK00qfisX+E0xOUNqeCpBUJBpRf TinybBXnoxsFkhw0cz61Wm7v1qO2V/y0+zi8TOWAhosX2qyFJwLEWpFg17lAjm4a4DKv9g iAHQ9A5IdPG7rJ8sOCg9NQtXnh66gz8kUepjHRrrhkbPQJMhVk83fJk34c9z8NbCLOlcdz Avj6uiE6ZepCAgxS+kythPTRFr3AtO4l811C8ZEp5ZcCDM+ZQkkNO2l6n+1VJFKb1fM+nr K6Q5/H7YuDzSjhEOtB3fWL0Yl1lHJsTrguJSO9j6kVYFCVnDEJbYz3dv0PP8tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731535992; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qVqEsuB0Q9GWXemzJpIGkzFMcYogp9gSsrFbhbFORwY=; b=UqrlzDNYl/T6dKQS9F4BmOUFKc+fJaCeEYDFHbPUlI0cMULTltW1bePGg4My8LkcAkLfg1 ds1rdAym/G9Vp9hOTDOc2AQOTg5TWEPVO5jVrmnCef40Z7Ir+1+urxFN0HBH2jVlEf/DGo YkQkvaKQW+AFrmZMErzqoNmbnjXj+l9eH0XdDgd9Do43fZBFVnxopdMO3gZN/fS6BFqfp4 2yyeSBZctPgb4OSBWyl0UlpgH2CUxhLRb32v4ko1D/c9lKFL0hojhkVN5cAXugIeTPGnvm mprt5AjtlTl5oOm6Ce1wjzbXBW6vzBVjXE3kNcgnqKm+4qYTK8X5UYcrCuF+cg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731535992; a=rsa-sha256; cv=none; b=rmVFG15O5+lJBbSMJ134xaBilaHAefFRQMfwhNEEmWaB51+9INoK55vF2nklpmkYBaos3s 04n/D9jfXBT/WCTiMF6hweyCvQ4ZoY29HoC5IKr6aT6HMXCBZGt9EHMsAh8heTMlnrrthC Yp4WPx7o03yiu5uo/c5i6ktPP38Q69T2Cpn7Ferv9yAY6pa+BcQ3k37+V/pt3gYUE7e5Tz x0IoeLFQt2Gm9i7p+tYZD/pJ6AA8HB7a4ODL604plnef5k85qZ436vEVKr59k4XGVL2CKN A2EfAiG0rxS8neFKK89ocSNnlvU3mtE4gt9Ah6A5qG9ShuFT4q5f7oz/MwKk2g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xpcx46G9tz1BqV; Wed, 13 Nov 2024 22:13:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ADMDCWf046996; Wed, 13 Nov 2024 22:13:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ADMDC6O046993; Wed, 13 Nov 2024 22:13:12 GMT (envelope-from git) Date: Wed, 13 Nov 2024 22:13:12 GMT Message-Id: <202411132213.4ADMDC6O046993@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 160c36eae41a - main - localedata: add some exceptions to utf8proc widths List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 160c36eae41afa3c4944ed44778c2b48db8fbb77 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=160c36eae41afa3c4944ed44778c2b48db8fbb77 commit 160c36eae41afa3c4944ed44778c2b48db8fbb77 Author: Kyle Evans AuthorDate: 2024-11-13 22:12:42 +0000 Commit: Kyle Evans CommitDate: 2024-11-13 22:12:42 +0000 localedata: add some exceptions to utf8proc widths Hangul Jamo medial vowels and final consonants are reportedly combining characters that won't take up any columns on their own and should be reported as zero-width, so add an exception for these as well to reflect how they work in practice. This conforms to how other implementations (e.g., glibc) treat these characters. Reviewed by: bapt (earlier version), jkim Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D47472 --- tools/tools/locale/tools/getwidths.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/tools/tools/locale/tools/getwidths.c b/tools/tools/locale/tools/getwidths.c index 2790b8031912..63c62791253f 100644 --- a/tools/tools/locale/tools/getwidths.c +++ b/tools/tools/locale/tools/getwidths.c @@ -28,6 +28,21 @@ #include +static int +width_of(int32_t wc) +{ + + /* + * Hangul Jamo medial vowels and final consonants are more of + * a combining character, and should be considered zero-width. + */ + if (wc >= 0x1160 && wc <= 0x11ff) + return (0); + + /* No override by default, trust utf8proc's width. */ + return (utf8proc_charwidth(wc)); +} + int main(void) { @@ -43,9 +58,10 @@ main(void) wcc = utf8proc_category(wc); if (wcc == UTF8PROC_CATEGORY_CC) continue; - wcw = utf8proc_charwidth(wc); + wcw = width_of(wc); if (wcw == 1) continue; + printf("%04X %d\n", wc, wcw); } From nobody Wed Nov 13 22:13:13 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xpcx62mMtz5cf92; Wed, 13 Nov 2024 22:13: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xpcx60Yk3z4VnX; Wed, 13 Nov 2024 22:13:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731535994; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2kiCWJuJZS+vjfMOYqFZ2jYUeObPkNDh1+LQOjaC5qw=; b=GSpNRNSv6DN1CWdLDgVQZEAsEvdA5V/yJV7MAXU2vglgF8vWTA6EQmAqfGpgkt2aoTOjmm ItKbgsgXCT3/Ei/PiwoaLQ86yKMGHV9r19PyplcilnC+sc4iHquKnkQpX21SO8WtcRabGW 4EiGiRYGTxWPEE4lrFuUMG8lVo0U0uZJHd4mM2049W5rONboYKncEXoq4ViOBtGXTR952q 9RfMaELPWLbqYiJZ618slz7aOdarQ+YylGAqcGQkaSO2MkpdldbGaDrBUtDjm/p3sjJMB3 oCjujaPn75wGrDYGUctUXEx7ryaHbGqJgRoSPlcTdyYMVZVQqMQ7sLCFSfBJmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731535994; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2kiCWJuJZS+vjfMOYqFZ2jYUeObPkNDh1+LQOjaC5qw=; b=X8rYUgW/oUoLZGCL4NcM9eVahufB5RFxjX2/K7i/9SbtIw3immZwYY+4md2Xdg2xvDOXVq MmuttLDjSRmzb2NUsrbAEB0L9gSE3BnAV7FUT9YpWGHtZQANX8V9Tk5JA5zw4kTJCdt1nJ 7ETDqtl+6Q9Y5DZ3+bkiDTBP+REPc5hgIjYIKl0U+2h6CZFSFokH6an5tH+naa7yw9X9pA 4oGdpsOD5/Cjfg6id8wxS6JyxHG0ScJotU1b/o4uc8BNyeNXh5E9yON+RxIPBnbw3Dzl9b jmI2QcsZVlz4dp4hdwOizu1o2hqeLqwY46388zIW6xpUhLbsVUhHHfjuWp/cQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731535994; a=rsa-sha256; cv=none; b=hua6+jI/rq6irmCZ06E+pdJ3X8otS9DivffLqOpvMNH+K3Q1o324W17OhO7ZM5iDz4zOjq F2A9yLVEM1WVRcZB79+90cQ2UCDfTHlYNIL1uYdi8DOfvMeJj+XZyFVCmrrNZhrSQ6LwyH OuCRWgedkv75RdICFR96gNITf0WWTWClNV3jZ4LoIkJndfvXTm10PUHt3b+K2YEqDFEONl VmVVmuKcAizovT065cizpQJamK+q33DJqWQgAy/O6HG4nU+sIdJ2EekmlOjj0EvrOYVDc6 4AFMzazhXteehbMP6PzQfz7i7wA/PxHa+YzTIYQtTsn0HEeLXbRO1qwYybQxag== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xpcx6097hz1BqW; Wed, 13 Nov 2024 22:13:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ADMDD6Z047049; Wed, 13 Nov 2024 22:13:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ADMDDvD047046; Wed, 13 Nov 2024 22:13:13 GMT (envelope-from git) Date: Wed, 13 Nov 2024 22:13:13 GMT Message-Id: <202411132213.4ADMDDvD047046@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 0f30aed1056a - main - localedata: update widths.txt after recent Hangul exceptions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0f30aed1056a2e12ca40095debff6735642c4ff4 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=0f30aed1056a2e12ca40095debff6735642c4ff4 commit 0f30aed1056a2e12ca40095debff6735642c4ff4 Author: Kyle Evans AuthorDate: 2024-11-13 22:12:42 +0000 Commit: Kyle Evans CommitDate: 2024-11-13 22:12:42 +0000 localedata: update widths.txt after recent Hangul exceptions Sponsored by: Klara, Inc. --- tools/tools/locale/etc/final-maps/widths.txt | 160 +++++++++++++++++++++++++++ 1 file changed, 160 insertions(+) diff --git a/tools/tools/locale/etc/final-maps/widths.txt b/tools/tools/locale/etc/final-maps/widths.txt index 93b2e8d7430b..3d0535be3884 100644 --- a/tools/tools/locale/etc/final-maps/widths.txt +++ b/tools/tools/locale/etc/final-maps/widths.txt @@ -859,6 +859,166 @@ WIDTH 2 2 2 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 0 0 0 From nobody Wed Nov 13 22:18:47 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xpd3W3ZFtz5cfBw; Wed, 13 Nov 2024 22:18: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xpd3W2vLbz4WwQ; Wed, 13 Nov 2024 22:18:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731536327; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w7kfai3hqnbQsbQOFVTzBedxdOSFjSnPaG0cYzzIDOI=; b=HWCcGPj91KyAVAAG9zZ70W3oHY8AJNZY2xN1x00F4mX0W8jxZ5qYGlPSyjgwAY1YZLEbEB NN2PLKTZOPXpa4F8ebEP3RjLnFN7BNWsZ0Ms92cn3IvU1sYXEYhVH+ItDfzylTVyNqn1ic vUio+dcLHP4Y4jdViRTj3I4sinIhMiqIPyLwdzDPg9HfbGaqCXXqH2fGGpcv1rFWvQNhdU sajQxN3Q+N2VkSwIJELaIIY9DVO0QrTW740/mR2Wnt4ztNIUZqu/SD1o7dpkUVxUGZ/d/d FP5yJiuW7Bk2E8djQOBFRccE/pBAX0bMafmnDJKzfYKD7+LysCeKI+zIoR1X8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731536327; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w7kfai3hqnbQsbQOFVTzBedxdOSFjSnPaG0cYzzIDOI=; b=XytzXSy/3ZhW8F45jpPmevPBEl/8gp8hlltgAtrFLVvDEs8ns/srukTRgf+3XxdykXx9xy m+RtsMWSKCQTwPgcjKhbudkDRped6+3elBqYWukbaTU8tBZd8aNR8K4IKhsyiG8MmIjKfc OzllMeRnZgNB2gDTbfZBenWnv4yJmzTeRAe9RQrXZnHPo/CqCpGSLUnqDYkMBcW6EeGdLt jM0b03ZtIn9n71YvHBi1SUXDDZewVPPfBRAJxEBrj6DT3nU2YnM7Ma5ll+WgN7rBa3gP7I 3naCDy4Vjht3RSVylf/E7qevxe2ndr74niGMJEf02zQXlvkAJwI2Jx23cOsGHw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731536327; a=rsa-sha256; cv=none; b=ou4M11jd7LaCBI3FvYnQW0Qi5CN7pFpPQncGIFQwfq1sBqkxX4JtzJagFc5OWYsjCkD5r1 0/XhJExRh/t+d00IFC7c9F6sMjzyHqfka8yorTanwlVUTDcBsrbpkiUuBz6eQKzQ+p6UQq RzhoS0tGFc6dF/AXVZwhPaaPZdNNme5gGPnwCEkqKfbg3XQH+yliKSMZUvGp2Yk+kSe02j cbWbeT+6e7/9ZPvofQQ8gd0Q1rDSGX3RjWh67gaV+KLf74TJ6qxeZZ+IQSKkinVxfab2d0 Av9QGCSLI31ebvFvatsQZDYudy/87LbOdL744mv9tI+hAA/fdtEz6VINJKsylw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xpd3W2N2pz1C5Q; Wed, 13 Nov 2024 22:18:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ADMIlu2048760; Wed, 13 Nov 2024 22:18:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ADMIlEf048757; Wed, 13 Nov 2024 22:18:47 GMT (envelope-from git) Date: Wed, 13 Nov 2024 22:18:47 GMT Message-Id: <202411132218.4ADMIlEf048757@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: f660777865fc - main - _utmx_op: don't recurse on chain busy List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f660777865fcc28e147b51362412e0286e7df78e Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=f660777865fcc28e147b51362412e0286e7df78e commit f660777865fcc28e147b51362412e0286e7df78e Author: Kyle Evans AuthorDate: 2024-11-13 22:18:40 +0000 Commit: Kyle Evans CommitDate: 2024-11-13 22:18:40 +0000 _utmx_op: don't recurse on chain busy In handling a PP mutex, we'll busy it as soon as we enter the loop and unbusy it either prior to sleeping or at exit time. In this particular case, if we fail to transition the mutex from OWNERDEAD -> owned because of casueword(9) failure and the suspend check fails, we'll start over and attempt to busy an already-busied chain and irrecoverably lock up both this thread and anything else that tries to busy the chain. Unbusy the chain prior to restarting because I couldn't decide if that was a better or worse idea than just keeping track of whether we dirtied it in do_lock_pp() and avoiding re-dirty. This is marginally easier to reason about as it returns us to expected state on entry to the loop. While we're here, simplify the code a bit as `error` will be clobbered right after the branch anyways. Reviewed by: kib, olce (both earlier version) Differential Revision: https://reviews.freebsd.org/D47493 --- sys/kern/kern_umtx.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sys/kern/kern_umtx.c b/sys/kern/kern_umtx.c index 705571930d7b..b71fa9a6de24 100644 --- a/sys/kern/kern_umtx.c +++ b/sys/kern/kern_umtx.c @@ -2605,11 +2605,9 @@ do_lock_pp(struct thread *td, struct umutex *m, uint32_t flags, */ if (error == 0) { error = thread_check_susp(td, false); - if (error == 0) { - if (try != 0) - error = EBUSY; - else - continue; + if (error == 0 && try == 0) { + umtxq_unbusy_unlocked(&uq->uq_key); + continue; } error = 0; } From nobody Wed Nov 13 22:56:36 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xpdv90WZJz5ch2N; Wed, 13 Nov 2024 22:56: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xpdv875Kdz4cPq; Wed, 13 Nov 2024 22:56:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731538597; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rgHpSffa/eCcysXrhcWCaFl16uD2AkDXISK2aJzUcIs=; b=I/uJtDdPpfJUWNIWWClpQUW/dz0crL1YvDzbN//44MaqGEauvjGbyesdiCDvPsevuxIiYl vmQz0ynl4EVX6jrF5AIMTsncTR58IecIwIhnKB+7oW77dMkBHM64mVDDTh4pqdPMmH8xpg dlDPfTiXw9Zdp1UQQcNC8nugY/ADOclW+VL+i5SvDFSR5C5xig8Q3gCOa5w/suRh4PzJlR 3idnNlaYPX5gb8MoBAW0bTn+fA95/6ktR24iv06mHh16W8hxZa4xaibQAK90/WSyM8RJIM S+aci53kk9yA3boNCW85EyKBRdEcGJYf6tWqSvgObCA4/yxV9kUunAD+cAcN/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731538597; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rgHpSffa/eCcysXrhcWCaFl16uD2AkDXISK2aJzUcIs=; b=kDJ/83Iha9q3wLUfhUnak3QqHR8xxmS2bjO5LNL5eW1XpEMHqE3XMDAg9R9dnNB3an91Xr 9X2NjssdN0nm73wv/8VLlyuQnfS7xzhqWAfbnHxme98oF+vqjh9yy6UOcad3wYcMB/O5bv gnBMRQRxiAft28h3U0PsjcTh0nuu5q9zf7yXWpt0/hg5+BkhDQKfUt1moMoL31mVQlhhbl zFTwcEWEhfMdnYZnAKPT8Xh+8aD445V3aNuQ3O0hhznqnV4m3YKgOTrhDBeizTbW+QT17s PzV+Nn67R7z0L0sdX84j/ZoA5ASqmk/iiSeldPOJClXUVSLw5a9MZhGaniw9mg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731538597; a=rsa-sha256; cv=none; b=QK/oRBSe/BL4tGEClxsF1vyx5tAqlxvog1QFlXPSPVN8aNZvtqoGg/T2t2RJ0I8EHtAkXh mLOW/Io3ecC2L6aLjS+TUwBhkIuVRxlyodkLAWDqu02ats5X6gljdm7Y07TBiaV9ylE6AY 5m3paqAjiQK+lalYhSRcQ8g0Httmsa4eKWfwIu2vVb6VAd/KLPYQmgCWMipuNNdSJx/TBz iCVDYzk7tv01jte1+sXwEzBDXiVoxLIVtEbYYEIZwkUPzKF0wixZ42i7nwisimK4nJc92p 7oG4sMAUpnZda+HX1MS1ybAc68opRLrZgaKHEGGo4Myidw8TeRFJ5oTCGQ+G8w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xpdv86dPrz1ChH; Wed, 13 Nov 2024 22:56:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ADMuamF021663; Wed, 13 Nov 2024 22:56:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ADMualH021661; Wed, 13 Nov 2024 22:56:36 GMT (envelope-from git) Date: Wed, 13 Nov 2024 22:56:36 GMT Message-Id: <202411132256.4ADMualH021661@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: de7a92756f0a - main - mlx5en: improve reporting of kernel TLS, IPSEC offload, and ratelimit caps List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: de7a92756f0ab50e5e243ce9ac680e27f5c41370 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=de7a92756f0ab50e5e243ce9ac680e27f5c41370 commit de7a92756f0ab50e5e243ce9ac680e27f5c41370 Author: Konstantin Belousov AuthorDate: 2024-10-15 22:34:58 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-13 22:56:11 +0000 mlx5en: improve reporting of kernel TLS, IPSEC offload, and ratelimit caps Only ever set the capabilities bits if kernel options are enabled. Check for hardware capabilities before setting software bits. Sponsored by: NVidia networking MFC after: 1 week --- sys/dev/mlx5/mlx5_en/mlx5_en_main.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c index 5081c1a0b782..ec35d87af962 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c @@ -4535,17 +4535,29 @@ mlx5e_create_ifp(struct mlx5_core_dev *mdev) if_setcapabilitiesbit(ifp, IFCAP_TSO | IFCAP_VLAN_HWTSO, 0); if_setcapabilitiesbit(ifp, IFCAP_HWSTATS | IFCAP_HWRXTSTMP, 0); if_setcapabilitiesbit(ifp, IFCAP_MEXTPG, 0); - if_setcapabilitiesbit(ifp, IFCAP_TXTLS4 | IFCAP_TXTLS6, 0); +#ifdef KERN_TLS + if (MLX5_CAP_GEN(mdev, tls_tx) != 0 && + MLX5_CAP_GEN(mdev, log_max_dek) != 0) + if_setcapabilitiesbit(ifp, IFCAP_TXTLS4 | IFCAP_TXTLS6, 0); + if (MLX5_CAP_GEN(mdev, tls_rx) != 0 && + MLX5_CAP_GEN(mdev, log_max_dek) != 0 && + MLX5_CAP_FLOWTABLE_NIC_RX(mdev, + ft_field_support.outer_ip_version) != 0) + if_setcapabilities2bit(ifp, IFCAP2_BIT(IFCAP2_RXTLS4) | + IFCAP2_BIT(IFCAP2_RXTLS6), 0); +#endif #ifdef RATELIMIT - if_setcapabilitiesbit(ifp, IFCAP_TXRTLMT | IFCAP_TXTLS_RTLMT, 0); + if (MLX5_CAP_GEN(mdev, qos) && + MLX5_CAP_QOS(mdev, packet_pacing)) + if_setcapabilitiesbit(ifp, IFCAP_TXRTLMT | IFCAP_TXTLS_RTLMT, + 0); #endif if_setcapabilitiesbit(ifp, IFCAP_VXLAN_HWCSUM | IFCAP_VXLAN_HWTSO, 0); - if_setcapabilities2bit(ifp, IFCAP2_BIT(IFCAP2_RXTLS4) | - IFCAP2_BIT(IFCAP2_RXTLS6), 0); - +#ifdef IPSEC_OFFLOAD if (mlx5_ipsec_device_caps(mdev) & MLX5_IPSEC_CAP_PACKET_OFFLOAD) if_setcapabilities2bit(ifp, IFCAP2_BIT(IFCAP2_IPSEC_OFFLOAD), 0); +#endif if_setsndtagallocfn(ifp, mlx5e_snd_tag_alloc); #ifdef RATELIMIT From nobody Thu Nov 14 00:32:32 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xph1r57Cpz5cnBr; Thu, 14 Nov 2024 00:32: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xph1r4gsKz4q5d; Thu, 14 Nov 2024 00:32:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731544352; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gJ7py5fya5sL1WnwLzFebeD/jP6icQEvPwKuKtc10jE=; b=HIbGet3/7yQjVePBhp2Yz2ckEbW16idzp7OQSoqsB8uvdqcA1Mlxp6/mrEHwFyAzV1+Nuv FhW4hOg/Y8Rvk/eLrYOfdaS3GA200MAchbqAhhlwshLmI0puexYQroaVa2oAqxb8iA2ahm kCMTzNpfiikq5p5tB4nzScMXNRXZvO8XpOpLwJRBfa1bPD7HGMtdDypbGw3z75WwRHEl6Z 6NvUh3vCBJzg4mXNHletgCyYMARBiNgLpiCR0Q3jEAQPU5wf9ulspI6NDVVH7jONVfZcmR Lqi3H3DwazxjRVRXgvZnWGimS0pqQdEsBeE30OFsmQxXWvGldNTaJVcWjYKH1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731544352; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gJ7py5fya5sL1WnwLzFebeD/jP6icQEvPwKuKtc10jE=; b=hAW8JvrHkN4K74/FLqsn4xnfOwWoEafwO2JvMtqzpNmZwugP/gnG/8eplruZuTi5MwF5nZ A71mQuyNwhkFiqRK5i+tH4uy8ucpyn4y8s6NZ8KNi2ZLuZvAcEsZWVV0yDgXqmaDFLYNWR 9+w5kZUxQpgi/Udj9gRV/gG8Q31v6tsE06shWqoJ9fTir6QAuZe11RBYd09uhe/XljY+3B 9eJlQAvsfU7cqhSQGdXd/3skFwc+Tn+3bNrqarx5SjRJzyKBMym6w8NHN6ONoae50QMgAR aF6ofGBsUHuWIzIumiFL+y35SFK65UuBG5nwgcKhaKzFas0MWaSoUBs79Bn/GA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731544352; a=rsa-sha256; cv=none; b=hUsGJlo54ae8qfjiod+0WNXCZ93hGGbH8YFw1x281OqQZXw7aZ8HnXc2vF3dNfdvIgpj3H u1rSeGLYYjmFifXUcHOsCH+/Ya6KI2waht71aVghN+BGsPh8/yGP4W4u4wqa+Oe07yOWRw ehBqp3xZdda4fJzIP0ZQgLYvNQYNcgZi53uLdKlO0/1PZDfenjBopPb5PVSNXdYzLa+jJk 8UEQE3KQyDhTN8H1vbVjjJVMgEPIeg2zQJCHvMK0lTSuwCOfmiCbQM2GVlUedGzFDiZR71 V0lDD8PLzyEOHUvhCWLheCIcLGgMADQs/oprVv3M53EPjvLHdCFBYPJKOgxE7A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xph1r4HHyzG1G; Thu, 14 Nov 2024 00:32:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AE0WWcd005036; Thu, 14 Nov 2024 00:32:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AE0WW4L005033; Thu, 14 Nov 2024 00:32:32 GMT (envelope-from git) Date: Thu, 14 Nov 2024 00:32:32 GMT Message-Id: <202411140032.4AE0WW4L005033@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 36887e04947f - main - sched_getcpu: Add man 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 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: 36887e04947fedfebb9b648fadd0dd6cc03142ea Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=36887e04947fedfebb9b648fadd0dd6cc03142ea commit 36887e04947fedfebb9b648fadd0dd6cc03142ea Author: Ed Maste AuthorDate: 2024-11-13 22:04:06 +0000 Commit: Ed Maste CommitDate: 2024-11-14 00:32:04 +0000 sched_getcpu: Add man page Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D47556 --- lib/libsys/Makefile.sys | 1 + lib/libsys/sched_getcpu.3 | 51 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) diff --git a/lib/libsys/Makefile.sys b/lib/libsys/Makefile.sys index 87290a17820a..4be64a98bb96 100644 --- a/lib/libsys/Makefile.sys +++ b/lib/libsys/Makefile.sys @@ -299,6 +299,7 @@ MAN+= abort2.2 \ rmdir.2 \ rtprio.2 \ sched_get_priority_max.2 \ + sched_getcpu.3 \ sched_setparam.2 \ sched_setscheduler.2 \ sched_yield.2 \ diff --git a/lib/libsys/sched_getcpu.3 b/lib/libsys/sched_getcpu.3 new file mode 100644 index 000000000000..050a8f3facb4 --- /dev/null +++ b/lib/libsys/sched_getcpu.3 @@ -0,0 +1,51 @@ +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2024 The FreeBSD Foundation +.\" +.\" This documentation was written by Ed Maste +.\" under sponsorship from the FreeBSD Foundation. +.\" +.Dd November 13, 2024 +.Dt SCHED_GETCPU 3 +.Os +.Sh NAME +.Nm sched_getcpu +.Nd get current CPU +.Sh LIBRARY +.Lb libc +.Sh SYNOPSIS +.In sched.h +.Ft int +.Fn sched_getcpu void +.Sh DESCRIPTION +The +.Fn sched_getcpu +function returns the current CPU on which the calling thread is running. +.Sh RETURN VALUES +.Fn sched_getcpu +returns the 0-based index of the current CPU at the time of the call. +The value may become invalid immediately after return, unless the thread is +pinned to a specific CPU. +CPU numbering is the same as used by +.Xr cpuset 2 +and CPU affinity calls. +.Pp +There are no error values as +.Fn sched_getcpu +does not fail. +.Sh SEE ALSO +.Xr cpuset 2 , +.Xr cpuset_getaffinity 2 , +.Xr cpuset_setaffinity 2 , +.Xr pthread_getaffinity_np 3 , +.Xr pthread_setaffinity_np +.Sh STANDARDS +The +.Nm +function originated in Linux. +This implementation aims to be source-compatible with the Linux implementation. +.Sh HISTORY +The +.Nm +function was introduced in +.Fx 13.1 . From nobody Thu Nov 14 00:43:04 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XphG06Xn8z5cnqN; Thu, 14 Nov 2024 00:43: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XphG05zlRz4qt2; Thu, 14 Nov 2024 00:43:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731544984; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XaoyJ1zTxARF6CIqQy8040fu8WhDN2iYBp5cAjzCM4M=; b=M05Mlymef6tw40jvR0kC2ckgP2p1SYyQZvWKYqlk1fifW0WVMSE0K7F2LAuk9ZK2vp9s7v 1kKCJ1REnI/DQz7FHt5EdxvI2BqAaHVqSoyYgkfg1iI1ryyOegAsdjESmRR/qbpflLdvSD AC1ipudAQ+ViSHppDyEVC8TJf2+itZqfY+MZT5o9P58SBv6VrxR/CkGUKgtvp7sl/rRxCf rEK4WwQV94RhQ+PypWxUUqEdxS4fSIW1VE9uxJWLEj8TRE1Mp1Y93domOgaq4a0z+FRBAS gUiAjtSSLwW8pihmypmN2xxklF0vchKEFjjm0GPoRdTUYBMuxi5c4XsmWAQKKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731544984; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XaoyJ1zTxARF6CIqQy8040fu8WhDN2iYBp5cAjzCM4M=; b=vl1+GN52k+KdFBwX9a55fNJZLTqFF/82TEexEjgCUs9MxMHAJSJxPhtaxs2jKcioa1+5cP kRiSIgcBC0YQvjLsVanAFdsFIQnLZSrPn+shVYAYKDDkeHyBz2yxpPJaMFiTPpApKmW6gi gwGiRygE1aVJhgOEDR//MPV8mSNN9B5DDadITlFpaGa+36rNZIyPEdvKzcjpmoU2+IRl5C 7qI1cfc5e3WYrp7uAQMqxDlhTGPJjMO2CCYZKtwFrImocKy/vQRrgTPJeR5yYQcELFZBzU y1AuaAFLVuqLDCedKAfODd9Yb4Rhat89FrWDoxFaXwbD5AwLnwSg/SEoq/jkFA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731544984; a=rsa-sha256; cv=none; b=vAgUxnYlK6sro93R3puWysWxL2E3xgQSp4XUz1A7czam3NvDxFo2Cbt1UapRDhIvC47BH+ aHERtzpPg2I86vVHWMXnhfLLywdEIL1KIsTvdD+dEudh0tnlHyHx4EQ72OnR2WmIaGL7fn zSEQVnq4D9jUIkP1bPHZmaucFYuRM+DAklMrnotE3fbPad5UyANuMEJftdRexXknH1dZ0q 2ZlyQR8Dny0eLHATLiHLIi4MndpAncCdvGRAL4Mm0/wa1ISnWo8r3bN26UkpdTBqlhAWUk DLcKq7hkaj2DSEzgzKup1TjnuC9PgG5VWHgVbaJaxuiKrFjWCb3aQLNKq9GCsg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XphG05b6yzGFW; Thu, 14 Nov 2024 00:43:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AE0h49W024247; Thu, 14 Nov 2024 00:43:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AE0h4pU024244; Thu, 14 Nov 2024 00:43:04 GMT (envelope-from git) Date: Thu, 14 Nov 2024 00:43:04 GMT Message-Id: <202411140043.4AE0h4pU024244@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 287995f1086e - stable/14 - sys/link_elf.h: remove extern linkage specifier from dl_iterate_phdr() prototype List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 287995f1086e5374cde84c2a76d0c2a31428932c Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=287995f1086e5374cde84c2a76d0c2a31428932c commit 287995f1086e5374cde84c2a76d0c2a31428932c Author: Konstantin Belousov AuthorDate: 2024-10-31 05:55:43 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-14 00:42:17 +0000 sys/link_elf.h: remove extern linkage specifier from dl_iterate_phdr() prototype (cherry picked from commit 7cd3e2696ca357630ff591959956295da9abbe2d) --- sys/sys/link_elf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/link_elf.h b/sys/sys/link_elf.h index 9752bdff55dc..7b51b3e87d1d 100644 --- a/sys/sys/link_elf.h +++ b/sys/sys/link_elf.h @@ -93,7 +93,7 @@ struct dl_phdr_info __BEGIN_DECLS typedef int (*__dl_iterate_hdr_callback)(struct dl_phdr_info *, size_t, void *); -extern int dl_iterate_phdr(__dl_iterate_hdr_callback, void *); +int dl_iterate_phdr(__dl_iterate_hdr_callback, void *); int _rtld_addr_phdr(const void *, struct dl_phdr_info *); int _rtld_get_stack_prot(void); int _rtld_is_dlopened(void *); From nobody Thu Nov 14 00:43:05 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XphG21G9pz5cntC; Thu, 14 Nov 2024 00:43: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XphG16ngzz4qlD; Thu, 14 Nov 2024 00:43:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731544986; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g2IT3jjctgc1vm6ge1541ygVQG4FJqYZpNZFuxUavlU=; b=X87elkLAx1mbXBfZTzxxBAyLRZ7gXLu/OR/TvCFgj403G/X4MKSf7Vzcx+fXoWdzdjZwQD T20hZucYREMvSiS6cf60Z5aYnTnrS+rth5H+kzKmJZNhwiv5hF/QrtM67RVU3tonMMNIo7 L7NiM/sDYQWdaFVYX9i4LCKNkn7v3dVynEG9sXvGYFFXJrHA7edyUSfeb1Qe7dT65oKctx no8fIcYbG9CXcav8Kbi8d1P4iUpijAE/BfbdSex5eaGN0iG7lBG+jgHuwNMhzD/92VOZGf a64lRwY7+dkSaziC6iAY0e+efLl8xrpM9JciK5SSIt6O4sKR3C5PwMQniYxy4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731544986; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g2IT3jjctgc1vm6ge1541ygVQG4FJqYZpNZFuxUavlU=; b=iOOkLMPd51CPiyTfudekuNF3GDwzTe2zg86rkk7MYHcPxEWKpWSFcBJV4Lbgmr14NXJtkN sQvX/IJU/N45JKYJXdF/R9U52vg4Rz8DFCDw2po4p7iFfs68Fe7M0NCMWVm6F4WxI6Io2/ bhVLMjavlYu/4EAeSZWb/yJdZKH+ymz830feBfiW2z9sxn/+b++xW2z6O3LrIBL80X3pUc 2XwkFMQbKq+D46qQ6b8+cmw1YI/3/J+a2slNrz0U9KmS29m9uIuneAn4mFamXyIe+TJX8w XBaSd2DLISYqHzkYk8Uz3tGNR5gmW55/FFO3KGvU9DdEURx9ixJObRCH6REk9w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731544986; a=rsa-sha256; cv=none; b=Kz/OelXxkmlsbPyFO6JOODNTjT8mT683SzpXDjv/8LWa9XAb2AM9Gd/inVFg3nqWivYBYL 7oUZyVpLo6ZsaS7nzyO4EQQOKDC4EqPJO8yQdrx5b0Xk3u4v3f8YVtAVIqAbWRr7A4HdXT eCUcJhf4K/x+5a4J85RPL6wam9Or2zc7/KzWRQyr9zbjCVvZeMEEN1QWisi+Wo51zbOlMZ NNltqzg6KXpRELiTGlUcE7z7bKcTKa9lm6+Unq3JowRpb+kWMCQ1taxYehY9x2C6dyosZI 1ynX1Qv8jzMD5Ta3GzfQ9hrga+MhfQ+Dga/6EUYA0nPjVe0xqD/j8659RXwVuw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XphG16MlGzHRC; Thu, 14 Nov 2024 00:43:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AE0h51X024304; Thu, 14 Nov 2024 00:43:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AE0h5dM024301; Thu, 14 Nov 2024 00:43:05 GMT (envelope-from git) Date: Thu, 14 Nov 2024 00:43:05 GMT Message-Id: <202411140043.4AE0h5dM024301@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 8ee3da8e738b - stable/14 - rtld: 1-bit for bool is enough List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8ee3da8e738beea9f071dc068d99effbe4d3935e Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=8ee3da8e738beea9f071dc068d99effbe4d3935e commit 8ee3da8e738beea9f071dc068d99effbe4d3935e Author: Konstantin Belousov AuthorDate: 2024-10-31 19:11:02 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-14 00:42:17 +0000 rtld: 1-bit for bool is enough (cherry picked from commit 450e684e0fea2785b5770241f51e897070c86726) --- libexec/rtld-elf/rtld.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index e7fcfde8f474..9e0c3b92848e 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -347,7 +347,7 @@ ld_utrace_log(int event, void *handle, void *mapbase, size_t mapsize, struct ld_env_var_desc { const char * const n; const char *val; - const bool unsecure; + const bool unsecure:1; }; #define LD_ENV_DESC(var, unsec) \ [LD_##var] = { .n = #var, .unsecure = unsec } From nobody Thu Nov 14 00:43:06 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XphG33TGDz5cpNP; Thu, 14 Nov 2024 00:43: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XphG30QQzz4qjF; Thu, 14 Nov 2024 00:43:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731544987; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Bd/5wHwuzl/IsZpAS1EpnkcY1zciQ2rqBopEIT1W4kA=; b=Waam+hZO2TcbMC0K8rnp5H1iHDrmhTj5m3QUXIQJBGh4a2bXAiuz/ZIWPFjxaIOPF9cxFe +y8YqYivZ/jpxdmNS92UsZf6tEFo8nPwKCwa/dW1lBPNGD9XuXKSA9ygiofXkR9G+mO9zq UDlFlVyEsjK6ZIx5IEEen842J1c33PA7NrSrpRxc2VomSdY3dQlHCRWTbeqWP1VTCCEwmG Jn0Txlt7Q21Ej0j9AT2yFbLaJ7H4YntD9gp4L4kDPYpyWA46FfLytzg6gfWoo+ADq/iZTt PuGQmRHUOJfy2hoTHjrv0TWvhiomEy9CTCfIz/B8aufyYzkUVuJpmk3NwYK2bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731544987; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Bd/5wHwuzl/IsZpAS1EpnkcY1zciQ2rqBopEIT1W4kA=; b=AJ3LBBwUKEf0mmnmqRMTS5+1OPQUmSXGoP+kHwMgwFC2Mb+1sPUqMKUew4SbC7YbkvRJrp bPcvaZw9woaxNo9zf8iKSEoVzINbIGRj6QSt498RdoKwAVUONSb+QDMMMTasCVWGU9yDmv 9O70fll2GLMxzkyoLk5/uL894MES5PHR0Naz6CWMQ7J9hvXGdUu2uRA2pPfUwidOdWU+p7 DMWKZZYFZ+fhObw16oQLNEQ1TwhfAB7s/3b8IBH+EtWVqDPUTJFbvUTyo3LG/JwzR3d1Hv iAI9k/kFGL3zaALQVbnATP8sgyqmj/MnLCMQb+KiM+8EqWmWzip/RHDawcl1Zg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731544987; a=rsa-sha256; cv=none; b=u8K+bTNX1LsmdL+MvfbNwvpI2X4J/LD1AmPg/l8Bfjc5KMb6GUR238M4EplSsOA2ThwsZU ph9oTshIVCKiUsIIx//0d7xw3r4J6A4PqH3o6Zl6qE0QIezGwBaYFXu0ER0qedKOnRFdQB 2USNphCny54XeDRbyv2NJGB9WS1tI31RhrDIvrllY4gllHBa2pLzxeQnJhccbhf5FdWB4m VVm659HFBGwBGpRB1V3/VnZezmhkUndAUJk88eTDYR7Kn7DPp+drvP2eUJxjOLy6ZsIHJx 3OHlIclzCtlrlLH3tmZ9HXcbV014jWQooHcYN08Ujwd8WmvOTquH4Ejxga7Cvw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XphG300gGzH94; Thu, 14 Nov 2024 00:43:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AE0h6p1024370; Thu, 14 Nov 2024 00:43:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AE0h6rj024367; Thu, 14 Nov 2024 00:43:06 GMT (envelope-from git) Date: Thu, 14 Nov 2024 00:43:06 GMT Message-Id: <202411140043.4AE0h6rj024367@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: db21e6980b92 - stable/14 - rtld: make it easier to add sparce non-default members to ld_env_var_desc List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: db21e6980b92140e044d1eaf5b86971e49b1574d Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=db21e6980b92140e044d1eaf5b86971e49b1574d commit db21e6980b92140e044d1eaf5b86971e49b1574d Author: Konstantin Belousov AuthorDate: 2024-11-01 19:20:17 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-14 00:42:17 +0000 rtld: make it easier to add sparce non-default members to ld_env_var_desc (cherry picked from commit d7214577ff00221ac84a85e61794a5e126b952dd) --- libexec/rtld-elf/rtld.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index 9e0c3b92848e..41d11adacb09 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -349,8 +349,11 @@ struct ld_env_var_desc { const char *val; const bool unsecure:1; }; -#define LD_ENV_DESC(var, unsec) \ - [LD_##var] = { .n = #var, .unsecure = unsec } +#define LD_ENV_DESC(var, unsec, ...) \ + [LD_##var] = { \ + .n = #var, \ + .unsecure = unsec, \ + __VA_ARGS__ \ static struct ld_env_var_desc ld_env_vars[] = { LD_ENV_DESC(BIND_NOW, false), From nobody Thu Nov 14 00:43:08 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XphG44zNgz5cnvm; Thu, 14 Nov 2024 00:43: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XphG41VYwz4r4p; Thu, 14 Nov 2024 00:43:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731544988; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8X+GuYHRQfcw7tzewYnEN9dwYyoOtDpC4FD1icaEBo0=; b=cjGN01NmTT0g2cBtV2LRvMm8cJ5AbDyKzsW0G1UXWl0HiMJv5QajviQFPtKjyiOw+Y9H0s 4MCNw65rqYZI8XlsFtqM8boYkzfaNdh+SmlJbCOWPf9P/oXMMTwros/T4Qs5ZCjtUmP6A6 WBUN+OmW3xo6b2onJSv0jtlHIgwMnJCczJhmjDHtH9OjEgcHFcvPwEzO4KqiXtXDIOM27E 28U/HVXzzir3ookeEbAFMVyDUQ39lzlCp2e16AZ5zUdcISMaVHZb23wu853bR2hsfd+i82 skrktM6hgmNeyhKPQlatQWICGPMYnmOFyTQKnvJE7zGbboHqygbB293NhhH4Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731544988; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8X+GuYHRQfcw7tzewYnEN9dwYyoOtDpC4FD1icaEBo0=; b=AmHb6vYnFE/yRKLcocfKSB8yyIPsNbcJwVm4k8tbXzmkfz5El9eEIaK2UleasUrp9hCMds G+X74WdBPBxFrjo4IaFOP2xtzva24NvenxUEUXMcffmC5esDNbjztOs31ytQfnSsM4NOrN 5qlmxz4kTiwTavKltRoqQUnX8ZsKVbBXRPoBAio4FFHIzjREc/49+EfsIxRzjlPBo78ej6 bEKH8iI4ZN1Dx25M5VZHZDHbdEMpmTS51A47JMIplqqyp484SeQf4hijcAlWlYZcgp3rMy lov+MeDoA8cAMRxEzXOD3/NoSgZ7s+Yd7KZeAgm+CFVOCql/DV92euTY/AH3UA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731544988; a=rsa-sha256; cv=none; b=wg15B/OGHDaQ1rYe7fWVHsNSvgWeXwanvhE87vAi22rFFfGgPmktYMw0bcumlxIg6JE/pe KkcMN7L+jXRUfEwi4bRV6dLV79WBzpd8O5Y5kBWRcunIp3GsAvfB474wIFBvxEvQ1SI4+i fTXyGZXpf8+BpJXUZYVMbUYHxPkilUxL1n3MCyDgwDqUw+sFbRVM8HFE8WztQOdnNKtbnb twEDsdeoTmCLEzuULcg0/wFWjtVix4ckEd3O8EWSMVpdLxH+JVoIloF0l8bun91Qsg1Ipp qM432eYec3eDgdB7LhiWANF9PpJpX2SYn3H8SQxShtRQS1Yi3qmlpaKeo1l2BQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XphG414ldzGFX; Thu, 14 Nov 2024 00:43:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AE0h8LK024417; Thu, 14 Nov 2024 00:43:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AE0h8tJ024414; Thu, 14 Nov 2024 00:43:08 GMT (envelope-from git) Date: Thu, 14 Nov 2024 00:43:08 GMT Message-Id: <202411140043.4AE0h8tJ024414@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 86a2abab0a8e - stable/14 - rtld: add rtld_{get,set}_var List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 86a2abab0a8e717c594f9f0c3c91b684ed2993c7 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=86a2abab0a8e717c594f9f0c3c91b684ed2993c7 commit 86a2abab0a8e717c594f9f0c3c91b684ed2993c7 Author: Konstantin Belousov AuthorDate: 2024-10-31 06:01:39 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-14 00:42:17 +0000 rtld: add rtld_{get,set}_var (cherry picked from commit c56df6ce71ae96f00b088790d3ad2e0ebebdd59a) --- lib/libc/gen/Symbol.map | 2 ++ lib/libc/gen/dlfcn.c | 17 +++++++++++++ lib/libdl/Symbol.map | 5 ++++ libexec/rtld-elf/Symbol.map | 5 ++++ libexec/rtld-elf/rtld.c | 62 +++++++++++++++++++++++++++++++++++++++------ sys/sys/link_elf.h | 2 ++ 6 files changed, 85 insertions(+), 8 deletions(-) diff --git a/lib/libc/gen/Symbol.map b/lib/libc/gen/Symbol.map index 1f8d77e7cd0a..8e4a26df8f08 100644 --- a/lib/libc/gen/Symbol.map +++ b/lib/libc/gen/Symbol.map @@ -461,6 +461,8 @@ FBSD_1.8 { aio_read2; aio_write2; execvpe; + rtld_get_var; + rtld_set_var; }; FBSDprivate_1.0 { diff --git a/lib/libc/gen/dlfcn.c b/lib/libc/gen/dlfcn.c index b678df9eef47..b30cb82e5e43 100644 --- a/lib/libc/gen/dlfcn.c +++ b/lib/libc/gen/dlfcn.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -337,4 +338,20 @@ _rtld_is_dlopened(void *arg __unused) return (0); } +#pragma weak rtld_get_var +const char * +rtld_get_var(const char *name __unused) +{ + _rtld_error(sorry); + return (NULL); +} + +#pragma weak rtld_set_var +int +rtld_set_var(const char *name __unused, const char *val __unused) +{ + _rtld_error(sorry); + return (EINVAL); +} + #endif /* !defined(IN_LIBDL) || defined(PIC) */ diff --git a/lib/libdl/Symbol.map b/lib/libdl/Symbol.map index 67d26c1f1dfe..dd9a8252e4a3 100644 --- a/lib/libdl/Symbol.map +++ b/lib/libdl/Symbol.map @@ -17,3 +17,8 @@ FBSD_1.0 { FBSD_1.3 { fdlopen; }; + +FBSD_1.8 { + rtld_get_var; + rtld_set_var; +}; diff --git a/libexec/rtld-elf/Symbol.map b/libexec/rtld-elf/Symbol.map index 0b7ad63f60a7..3cdbb30d04a0 100644 --- a/libexec/rtld-elf/Symbol.map +++ b/libexec/rtld-elf/Symbol.map @@ -21,6 +21,11 @@ FBSD_1.3 { fdlopen; }; +FBSD_1.8 { + rtld_get_var; + rtld_set_var; +}; + FBSDprivate_1.0 { _rtld_thread_init; _rtld_allocate_tls; diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index 41d11adacb09..32d0b879c5bc 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -258,6 +258,8 @@ int _rtld_addr_phdr(const void *, struct dl_phdr_info *) __exported; int _rtld_get_stack_prot(void) __exported; int _rtld_is_dlopened(void *) __exported; void _rtld_error(const char *, ...) __exported; +const char *rtld_get_var(const char *name) __exported; +int rtld_set_var(const char *name, const char *val) __exported; /* Only here to fix -Wmissing-prototypes warnings */ int __getosreldate(void); @@ -348,31 +350,35 @@ struct ld_env_var_desc { const char * const n; const char *val; const bool unsecure:1; + const bool can_update:1; + const bool debug:1; + bool owned:1; }; #define LD_ENV_DESC(var, unsec, ...) \ [LD_##var] = { \ .n = #var, \ .unsecure = unsec, \ __VA_ARGS__ \ + } static struct ld_env_var_desc ld_env_vars[] = { LD_ENV_DESC(BIND_NOW, false), LD_ENV_DESC(PRELOAD, true), LD_ENV_DESC(LIBMAP, true), - LD_ENV_DESC(LIBRARY_PATH, true), - LD_ENV_DESC(LIBRARY_PATH_FDS, true), + LD_ENV_DESC(LIBRARY_PATH, true, .can_update = true), + LD_ENV_DESC(LIBRARY_PATH_FDS, true, .can_update = true), LD_ENV_DESC(LIBMAP_DISABLE, true), LD_ENV_DESC(BIND_NOT, true), - LD_ENV_DESC(DEBUG, true), + LD_ENV_DESC(DEBUG, true, .can_update = true, .debug = true), LD_ENV_DESC(ELF_HINTS_PATH, true), LD_ENV_DESC(LOADFLTR, true), - LD_ENV_DESC(LIBRARY_PATH_RPATH, true), + LD_ENV_DESC(LIBRARY_PATH_RPATH, true, .can_update = true), LD_ENV_DESC(PRELOAD_FDS, true), - LD_ENV_DESC(DYNAMIC_WEAK, true), + LD_ENV_DESC(DYNAMIC_WEAK, true, .can_update = true), LD_ENV_DESC(TRACE_LOADED_OBJECTS, false), - LD_ENV_DESC(UTRACE, false), - LD_ENV_DESC(DUMP_REL_PRE, false), - LD_ENV_DESC(DUMP_REL_POST, false), + LD_ENV_DESC(UTRACE, false, .can_update = true), + LD_ENV_DESC(DUMP_REL_PRE, false, .can_update = true), + LD_ENV_DESC(DUMP_REL_POST, false, .can_update = true), LD_ENV_DESC(TRACE_LOADED_OBJECTS_PROGNAME, false), LD_ENV_DESC(TRACE_LOADED_OBJECTS_FMT1, false), LD_ENV_DESC(TRACE_LOADED_OBJECTS_FMT2, false), @@ -6336,6 +6342,46 @@ dump_auxv(Elf_Auxinfo **aux_info) } } +const char * +rtld_get_var(const char *name) +{ + const struct ld_env_var_desc *lvd; + u_int i; + + for (i = 0; i < nitems(ld_env_vars); i++) { + lvd = &ld_env_vars[i]; + if (strcmp(lvd->n, name) == 0) + return (lvd->val); + } + return (NULL); +} + +int +rtld_set_var(const char *name, const char *val) +{ + struct ld_env_var_desc *lvd; + u_int i; + + for (i = 0; i < nitems(ld_env_vars); i++) { + lvd = &ld_env_vars[i]; + if (strcmp(lvd->n, name) != 0) + continue; + if (!lvd->can_update || (lvd->unsecure && !trust)) + return (EPERM); + if (lvd->owned) + free(__DECONST(char *, lvd->val)); + if (val != NULL) + lvd->val = xstrdup(val); + else + lvd->val = NULL; + lvd->owned = true; + if (lvd->debug) + debug = lvd->val != NULL && *lvd->val != '\0'; + return (0); + } + return (ENOENT); +} + /* * Overrides for libc_pic-provided functions. */ diff --git a/sys/sys/link_elf.h b/sys/sys/link_elf.h index 7b51b3e87d1d..996e1f70a9f1 100644 --- a/sys/sys/link_elf.h +++ b/sys/sys/link_elf.h @@ -97,6 +97,8 @@ int dl_iterate_phdr(__dl_iterate_hdr_callback, void *); int _rtld_addr_phdr(const void *, struct dl_phdr_info *); int _rtld_get_stack_prot(void); int _rtld_is_dlopened(void *); +const char *rtld_get_var(const char *name); +int rtld_set_var(const char *name, const char *val); #ifdef __ARM_EABI__ void * dl_unwind_find_exidx(const void *, int *); From nobody Thu Nov 14 00:43:09 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XphG55kG7z5cny5; Thu, 14 Nov 2024 00:43: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XphG52j3Cz4qtR; Thu, 14 Nov 2024 00:43:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731544989; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=852AWupY1eGt/0DTWdxOk/KQ9Tf7w9GaHPs5khcnLmk=; b=PDVBT51nIdguRJdBAuV1TrhsiwmDCQJKPlvnegZrvhCcKtAs8vSrQ+nZ8oOlfjdRhNVkat YNr/P9Eyx6HFUOySEMXdNf01HILe5jyXhu8PDIEtcr1K8c3NP31ynNBIRfCt3eLuEduKbz CCtEHFjoxEWiCd3ulprY20PPKegiBmb30olyJ85cPBge72ghRQMdZJ8I/kI4bD1AXgatoJ t2aLy7WaSLDeX1APiROkVv7YIvj8MXD8EZnApaJKNw5qlzcMka9KCziInYXl+/ZE34JcxC vlI6k97K65Gwyow14lSwnMGqZJz45Z1qLhcPEflzZt8QXaApu51dPJpywXlXwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731544989; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=852AWupY1eGt/0DTWdxOk/KQ9Tf7w9GaHPs5khcnLmk=; b=F05ZqHzoNemObWfpjCV//mE3djPOIkkHQVtxPAUe43tYf42fDQpilzI+ftP+vShgf+tiT8 Noc0ZjGnHxFA2p1B/kx6wzdcWOC09tLuFfNF4ncLB2B4z+x5Y+Zy7WuVM1nGlKigrq/9Zm nrnqZPtJiOYEFx3DjbNQB9XlHn2dwXCHS9Q07qAaICp9+2DM/lWUGBpLXZ/YLew9ujZU/P /KGKkZRjhp/NPcCXxM3CmIE15A2rMJDbCmkhBynfoWN8zRTh6RnJ6vPPlkdJ4hPJsxPBwd YUncil7CJ7avPItn8ilbSbrV8/4Zp31sF2zWPxdtwjQL07kq4Gq/XUl1VA4wnw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731544989; a=rsa-sha256; cv=none; b=mcGlZzANOzOIET4C4SomdFhjpcCDExN3Fz8NLQGtgW2b4B+ONhkvdB0/pH9SiNaMWm8/US +GdrR0CEaitq5qE8DN8kRJzmZkRWOKcMVoNjWr0+JbWLWfUQto6Q5aK9nCh3rTUxrW5QsC Osnsvtsl+NCvyZZ7Afy53F4Ksj1OQTXcGTA2rUmMpU/dY2MZNAUBeTuPxPsf50KC9xkn8V JOqZNVdZshhfCrxUPdKhcKMqChqt86WEaPIVgiv4QJ0N1kUe5UYGnAfW0sVqSgB/9denZ6 7NsErdaBPDfC7w8Va2x4MyyIpXctRY1z+mOIzaRhUyzs3KXbkkt9z3iMDwnGTA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XphG52K53zHFH; Thu, 14 Nov 2024 00:43:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AE0h925024458; Thu, 14 Nov 2024 00:43:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AE0h92U024455; Thu, 14 Nov 2024 00:43:09 GMT (envelope-from git) Date: Thu, 14 Nov 2024 00:43:09 GMT Message-Id: <202411140043.4AE0h92U024455@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: cc3978cb74d6 - stable/14 - Document rtld_get_var(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 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: cc3978cb74d66eb30c809d834bacee80fc92172c Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=cc3978cb74d66eb30c809d834bacee80fc92172c commit cc3978cb74d66eb30c809d834bacee80fc92172c Author: Konstantin Belousov AuthorDate: 2024-10-31 20:15:33 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-14 00:42:17 +0000 Document rtld_get_var(3) (cherry picked from commit 3820f784597cf87deb42522f108c5ee477a1f282) --- lib/libc/gen/Makefile.inc | 3 ++ lib/libc/gen/rtld_get_var.3 | 106 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 109 insertions(+) diff --git a/lib/libc/gen/Makefile.inc b/lib/libc/gen/Makefile.inc index 408eb2ff1e28..332edfcd6695 100644 --- a/lib/libc/gen/Makefile.inc +++ b/lib/libc/gen/Makefile.inc @@ -292,6 +292,7 @@ MAN+= alarm.3 \ rand48.3 \ readpassphrase.3 \ rfork_thread.3 \ + rtld_get_var.3 \ scandir.3 \ sem_destroy.3 \ sem_getvalue.3 \ @@ -500,6 +501,8 @@ MLINKS+=rand48.3 _rand48.3 \ rand48.3 seed48.3 \ rand48.3 srand48.3 MLINKS+=recv.2 recvmmsg.2 +MLINKS+=rtld_get_var.3 \ + rtld_set_var.3 MLINKS+=scandir.3 alphasort.3 \ scandir.3 scandirat.3 \ scandir.3 scandir_b.3 \ diff --git a/lib/libc/gen/rtld_get_var.3 b/lib/libc/gen/rtld_get_var.3 new file mode 100644 index 000000000000..06d2e8a41cbc --- /dev/null +++ b/lib/libc/gen/rtld_get_var.3 @@ -0,0 +1,106 @@ +.\" Copyright (c) 2024 The FreeBSD Foundation +.\" +.\" This documentation was written by +.\" Konstantin Belousov under sponsorship +.\" from the FreeBSD Foundation. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.Dd October 31, 2024 +.Dt RTLD_GET_VAR 3 +.Os +.Sh NAME +.Nm rtld_get_var , +.Nm rtld_set_var +.Nd query or change run-time linker parameters after image activation +.Sh LIBRARY +.Lb libc +.Sh SYNOPSIS +.In sys/errno.h +.In link.h +.Ft const char * +.Fn rtld_get_var "const char *name" +.Ft int +.Fn rtld_set_var "const char *name" "const char *value" +.Sh DESCRIPTION +The dynamic linker +.Xr rtld 1 +can be configured be setting some environment variables for the process, +before image activation. +Sometimes it is desirable to query the current effective settings or +change them afterward. +.Pp +Since the process environment variables are maintained by higher-level +libraries, the run-time linker cannot access them after the image +activation. +The described functions make it possible to operate on rtld settings. +.Pp +The +.Fn rtld_get_var +function returns the current value of the named parameter. +.Pp +The +.Fn rtld_set_var +functions changes the value of the parameter to the new +.Fa value +value, if possible. +The +.Fa name +argument to both functions is the name of the parameter, which +is same as the corresponding environment variable +.Pq see Xr rtld 1 +but without the +.Ev LD_ +(or +.Ev LD_32_ +or any other ABI-specific) prefix. +.Sh RETURN VALUES +The +.Fn rtld_get_var +returns the current value of the named parameter, or +.Dv NULL +if the name is invalid. +.Pp +The +.Fn rtld_set_var +returns 0 on success, or an integer indicating the error condition +which prevented the operation. +.Sh ERRORS +Possible errors returned from +.Fn rtld_set_var : +.Bl -tag -width Er +.It Bq Er EPERM +The requested change cannot be made at runtime, either because the +runtime linker can only take this parameter at initialization time, +or because the current process is executing with elevated privileges. +.It Bq ENOENT +The supplied parameter +.Fa name +is unknown. +.El +.Sh SEE ALSO +.Xr rtld 1 +.Sh HISTORY +The +.Nm +function first appeared in +.Fx 15.0 . From nobody Thu Nov 14 00:43:10 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XphG666jlz5cpL3; Thu, 14 Nov 2024 00:43: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XphG63WSBz4qtZ; Thu, 14 Nov 2024 00:43:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731544990; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JJxGFkWSwr50dhXFJs5/5a8rhmlI6NdRmZO2JHpUaUI=; b=weO6R8nWIR/1LGRpoUlpC6roKJyww65/hYVmQVjRm+x+1bA+yCDeQ2lBKM/UeoHs7M+eMM yTTZS/W7bHAg75vsucwZuPFVuIK+ZQu281ZSqfdui7xQFSZ//cy14mSnP+XBLc8FPOL5Cp cM8kuZFrqAOGb6DPCgbqyxPJN0JMT3JJwEMMjDo+XqIndvq0i/Q5P3zcma+B6TfAIbU1DC RfqrIeLaJxolIGJ+Nn5bYAf/I/D5Gv+JYc97wAlVSSL9tfCtAsE6PWMPZE0ucWc7BbGGK+ wCd4MR+5b3lE7IBzzY0F+50vQMi5wt76Fd0Glas45HFwUztjk731gMTuL4GLaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731544990; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JJxGFkWSwr50dhXFJs5/5a8rhmlI6NdRmZO2JHpUaUI=; b=cxMY/A5iHO1KdDMOUM+sPhXA6YdBil9Qkc59blOCFNBaI7kYCArg+5UhBe4TeoDmjlhkbG +5/jGeC4IRHOw0jkyeDgCtR28ArQ3hJPR92oHr6tz+RJseLaf3nWp/H0JUbrSp7ggW3hMQ NbDb3dBVg72XiGwl/0q/vU4kWI0HfhgPdj8OAosRGdFtjwJc/QwzegxNRH/RjM7dNGIKse YtP1/eyPwaq0SufR3qvpHWFv1CZ24WgxJVOs2AVIqP/M/W/ZcwqGN20iR66aKwnDQtT7xS hBq2UjZolDLW+gCufZQng9Byrr2V4EqURy4eIMm66lWS5AThcHakRkgWr0Kigw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731544990; a=rsa-sha256; cv=none; b=TnFzzWHdwJEl4OymZLi1OasXBvjqJYxTMyccKXo8nj4+WygKFonvK1Wq/pwnDz7IJFnlaS 1tBXtpjdr8/5SGSMDrrJl8VIJueporJNur2A/enyw9G8h5RFx4nLHtQt66NKqR6BT+rznw uqRblUKHmizvkXCjsg42tj3PKIe6RTec8f7oMOl+qVIngntudnOIwdDKVxtaNjKmQBjz6t Wgw72U3sE1Lav33dNTewSmI6XcCf/BcTgzjNRtN/E9HtYCvu+eoV3mHcbPyZMFXRVTPcmC 9ryv46Vb/qt+DOf+6BFL2rYSL8IUkxGdfdotg6G5uX9o8p3iqLiizcGYn4hcBA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XphG633cvzGyP; Thu, 14 Nov 2024 00:43:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AE0hAT0024502; Thu, 14 Nov 2024 00:43:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AE0hAvk024499; Thu, 14 Nov 2024 00:43:10 GMT (envelope-from git) Date: Thu, 14 Nov 2024 00:43:10 GMT Message-Id: <202411140043.4AE0hAvk024499@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: dcdc0d716715 - stable/14 - rtld.1: cross-reference rtld_get_var.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 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: dcdc0d71671536faa0919b2ccb996ff5173ce2a4 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=dcdc0d71671536faa0919b2ccb996ff5173ce2a4 commit dcdc0d71671536faa0919b2ccb996ff5173ce2a4 Author: Konstantin Belousov AuthorDate: 2024-10-31 20:20:39 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-14 00:42:17 +0000 rtld.1: cross-reference rtld_get_var.3 (cherry picked from commit 16d000bdac54d7153f33a0d050bcc4307b702751) --- libexec/rtld-elf/rtld.1 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libexec/rtld-elf/rtld.1 b/libexec/rtld-elf/rtld.1 index 5631c28e1f84..62e4fc5676c2 100644 --- a/libexec/rtld-elf/rtld.1 +++ b/libexec/rtld-elf/rtld.1 @@ -138,6 +138,15 @@ all the environment variables listed below, but is being prefixed with for example: .Ev LD_32_TRACE_LOADED_OBJECTS . If the activated image is setuid or setgid, the variables are ignored. +.Pp +The run-time linker is able to access the environment provided +at process startup. +After startup, environment variables are maintained by higher-level +libraries and are not accessible by the run-time linker. +At run-time, effective settings can be queried using +.Xr rtld_get_var 3 , +and some of them can be changed with +.Xr rtld_set_var 3 . .Bl -tag -width ".Ev LD_LIBMAP_DISABLE" .It Ev LD_DUMP_REL_POST If set, @@ -527,6 +536,7 @@ The libmap configuration file for 32-bit binaries on 64-bit system. .Xr ld 1 , .Xr ldd 1 , .Xr dlinfo 3 , +.Xr rtld_get_var 3 , .Xr capsicum 4 , .Xr elf 5 , .Xr libmap.conf 5 , From nobody Thu Nov 14 00:43:11 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XphG75sTnz5cp1D; Thu, 14 Nov 2024 00:43: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XphG74Wc2z4rGk; Thu, 14 Nov 2024 00:43:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731544991; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QfBp8yC9wz0JRtegWJZqBb3UU7Em2PVdAeOZpeUeUxs=; b=oyyVdWTkZgyw/5fD+12baqjwb3/FSbQNqH+RotgD4xKGKK+E5pQAFkFcj0Q2PrYTo6vwqt CApj88hVaYyoOj14hGa2xk/7f42C1+Ii1wQmCo7osHldEc1uybJCzoRK5JR9l4f0SU4IDg Mh6kASQggy8rRmwQVgKZqniQf3m1j4rBV719YpZB5kixEZIJOqVygLWLU+lwhY46RFOGdZ ZuUp4b3msIzC1bKLidoREjJMpeNDZh5l6nPdEe7le9WlVeUgcjcWwojeLRdj4EubMKPnD1 BymGhda8bdaHLdKMxJ7uSbAc5JlMzW4/MHvF7Gm6SFp2JG8FasvNle3OwH7nrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731544991; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QfBp8yC9wz0JRtegWJZqBb3UU7Em2PVdAeOZpeUeUxs=; b=kWb0nUjBHu0lxOQ6Yk7czKb0ZqY0Pgm9okJUBGCte77uC7uhsZ5HmZxSqaaVfQ/T9uF2+/ UVzfcAMHd19t1mXKLPttqkZoum7ukI9eg9go6rCLvtujsGy0HhHySYwtWE8whZqSzYEPa8 BP11/Rwx5HTETFnK8uJ7Ois1zNITQfsHCRha3d8gzLOXmnCC7dI88uMmmjrZU9+OXvWwle thuKe6iz6VtQpG/Mg/PXypAH7NmV+MTLLMWDDY9mZIz4/sq5st3VLbnJA7c39kk0g4WWFX 7DUg9CZxftnb6SJWq1s5Wz/9WAyW+wJTfAluEWUu/pzP6CCV+14swXTYxfGRXA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731544991; a=rsa-sha256; cv=none; b=fYdLoi5Y13ocBgahJOwYm5nKhXjEfyhBh6kuGMQ5RVAuip8Xlt1uePpN+ThGKU2WkzwuT+ 8EyIXC6RDQ9paFb9Aqaf+uU91zwvQ0Ml9uxaB4D/EJEEJybiLBtQNaPY5AtaNf1bksHVZt yDZEgPO1cNbC1NWV9/ou0VB0rFYI8xmjelvnz6Ct/9n48G4uOfClZJh1R9r3OlZcHMUKK6 eiHaeFzHU/jHmR/DWnq8/Prcvfrmgfoj2gJMgUF2TjjBPhUeS/lSF7D9PZR2WH83jV54ub YiZhypTLtaq55336ZDB62pbCs7Hdpk/zLTH/qBjavQ+C1ljRUopt8hWOUtzdbA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XphG747V7zGFY; Thu, 14 Nov 2024 00:43:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AE0hB9a024541; Thu, 14 Nov 2024 00:43:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AE0hBUC024538; Thu, 14 Nov 2024 00:43:11 GMT (envelope-from git) Date: Thu, 14 Nov 2024 00:43:11 GMT Message-Id: <202411140043.4AE0hBUC024538@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: a2d4e8b93ea2 - stable/14 - rtld_get_var.3: fix typo List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a2d4e8b93ea215fb001130036e45a42a832bc564 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=a2d4e8b93ea215fb001130036e45a42a832bc564 commit a2d4e8b93ea215fb001130036e45a42a832bc564 Author: Konstantin Belousov AuthorDate: 2024-11-07 18:48:28 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-14 00:42:17 +0000 rtld_get_var.3: fix typo (cherry picked from commit e434c56fcd4f9eee04ac6bb5e0cf028db3006be3) --- lib/libc/gen/rtld_get_var.3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libc/gen/rtld_get_var.3 b/lib/libc/gen/rtld_get_var.3 index 06d2e8a41cbc..e211d78345e3 100644 --- a/lib/libc/gen/rtld_get_var.3 +++ b/lib/libc/gen/rtld_get_var.3 @@ -44,7 +44,7 @@ .Sh DESCRIPTION The dynamic linker .Xr rtld 1 -can be configured be setting some environment variables for the process, +can be configured by setting some environment variables for the process, before image activation. Sometimes it is desirable to query the current effective settings or change them afterward. From nobody Thu Nov 14 00:43:40 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XphGh3zm8z5cp1P; Thu, 14 Nov 2024 00:43: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XphGh1SbSz4sZL; Thu, 14 Nov 2024 00:43:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731545020; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A3pZ35SEncgPtULvx26ZMrCpppj4o4NBJBebleHGMiI=; b=vzm75rxdint7JFCpMGvr4AlyFqombl4SgGUJQ3KnB9tRl59DMvYwGzRUApCZXsErn8CkHm f62R1gbjlUgTS5CZkVD3fGGuDSgQguZqklKb0Tx/sdUL7CFvP+hbHf1qC8Ls9T0jROUBOq Di4MLIeh/sXmiNP8lPagr2s24uZSzFxp9vMseSqB3k3jEu84m9J616thXr3bun58EA0Byf 4leF2yzNePvPpzG69U86z//mX+6XlpCnIU2D207vwCQEGiQoVYNDdAB9YzaKtyuSb3C1hr kIBeXyk1y+Xi/3vzE7qEYI72RRXw4VgAFBD8T9sf1GeQBY+OvQYzfO/1gvACcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731545020; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A3pZ35SEncgPtULvx26ZMrCpppj4o4NBJBebleHGMiI=; b=YJv0Hdt/+eNW5PAywD/EjKbClf43KIgYdd9rhn1jvVl+/4M9nr8Wf2btjUsrC2khPFfoOG gzGhIpdiZje84Kcy61U7EsJQosPo++kCrPVO94oCWbJ9AFrjpMgiRS2smgE6FClL/3h/BK +3bCcEVzn+GxXTGAzy30i1UDkbG5VOdTxd84M21fhj1inuu7MMjF9G0cndFXXg0AfIpybY /0gTC3aZaK01iiCuLH+RMoX4KHR7neFZ7ZpU+aDRfkewiYPPIuNWT8+9vjfvgnhTSb6P3i khIwhwH9orimENGkoihabBhwEYgGFZ0fRXg3D6ZSPaIzXMPYYRaJY0xBAB2g0w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731545020; a=rsa-sha256; cv=none; b=l4BL/FlIOs6DevhNje7drSuBjhXdCzmALr1kZajsuHF8J0X3WWKhbJKg5Z7DLlKXX5oh3N IRiyaCG0l3xenD9OyWMsgV4IENxhik5+c1qwIZs2qhJGO0vCakJoTLv2xzV2yAaRqp/aaJ wOdYA7Nn31ntk6gZnoep61f3kCAxqjDuZDTBvgJQmk0jYaoelh6cZ6Q0DlgbtE2T5wAOo9 E47hrH6+GdmEDVAhAmvB0hMWuekr/OUpko3UCrhTB/z1Ssj6SH7MP6wzbqog4121Laktdl OIhipwpzI31I1f24lCOm7G4kgKKT+3ndR4/sBG92+L1kf8RgER4x8M8yofRmhA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XphGh14QwzGw8; Thu, 14 Nov 2024 00:43:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AE0heIh024850; Thu, 14 Nov 2024 00:43:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AE0heJ7024847; Thu, 14 Nov 2024 00:43:40 GMT (envelope-from git) Date: Thu, 14 Nov 2024 00:43:40 GMT Message-Id: <202411140043.4AE0heJ7024847@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 087558ec3e01 - stable/14 - ps.1: visually align process flags hex values by filling leading zeroes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 087558ec3e01cbbce725eb406fca6072763a3103 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=087558ec3e01cbbce725eb406fca6072763a3103 commit 087558ec3e01cbbce725eb406fca6072763a3103 Author: Konstantin Belousov AuthorDate: 2024-11-09 01:43:31 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-14 00:42:18 +0000 ps.1: visually align process flags hex values by filling leading zeroes (cherry picked from commit cd9e781e76d90275b26b92ba512297ea3ca852e5) --- bin/ps/ps.1 | 54 +++++++++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/bin/ps/ps.1 b/bin/ps/ps.1 index 23868d8b3009..cc08344b928b 100644 --- a/bin/ps/ps.1 +++ b/bin/ps/ps.1 @@ -333,33 +333,33 @@ The flags associated with the process as in the include file .In sys/proc.h : .Bl -column P_SINGLE_BOUNDARY 0x40000000 -.It Dv "P_ADVLOCK" Ta No "0x00001" Ta "Process may hold a POSIX advisory lock" -.It Dv "P_CONTROLT" Ta No "0x00002" Ta "Has a controlling terminal" -.It Dv "P_KPROC" Ta No "0x00004" Ta "Kernel process" -.It Dv "P_PPWAIT" Ta No "0x00010" Ta "Parent is waiting for child to exec/exit" -.It Dv "P_PROFIL" Ta No "0x00020" Ta "Has started profiling" -.It Dv "P_STOPPROF" Ta No "0x00040" Ta "Has thread in requesting to stop prof" -.It Dv "P_HADTHREADS" Ta No "0x00080" Ta "Has had threads (no cleanup shortcuts)" -.It Dv "P_SUGID" Ta No "0x00100" Ta "Had set id privileges since last exec" -.It Dv "P_SYSTEM" Ta No "0x00200" Ta "System proc: no sigs, stats or swapping" -.It Dv "P_SINGLE_EXIT" Ta No "0x00400" Ta "Threads suspending should exit, not wait" -.It Dv "P_TRACED" Ta No "0x00800" Ta "Debugged process being traced" -.It Dv "P_WAITED" Ta No "0x01000" Ta "Someone is waiting for us" -.It Dv "P_WEXIT" Ta No "0x02000" Ta "Working on exiting" -.It Dv "P_EXEC" Ta No "0x04000" Ta "Process called exec" -.It Dv "P_WKILLED" Ta No "0x08000" Ta "Killed, shall go to kernel/user boundary ASAP" -.It Dv "P_CONTINUED" Ta No "0x10000" Ta "Proc has continued from a stopped state" -.It Dv "P_STOPPED_SIG" Ta No "0x20000" Ta "Stopped due to SIGSTOP/SIGTSTP" -.It Dv "P_STOPPED_TRACE" Ta No "0x40000" Ta "Stopped because of tracing" -.It Dv "P_STOPPED_SINGLE" Ta No "0x80000" Ta "Only one thread can continue" -.It Dv "P_PROTECTED" Ta No "0x100000" Ta "Do not kill on memory overcommit" -.It Dv "P_SIGEVENT" Ta No "0x200000" Ta "Process pending signals changed" -.It Dv "P_SINGLE_BOUNDARY" Ta No "0x400000" Ta "Threads should suspend at user boundary" -.It Dv "P_HWPMC" Ta No "0x800000" Ta "Process is using HWPMCs" -.It Dv "P_JAILED" Ta No "0x1000000" Ta "Process is in jail" -.It Dv "P_TOTAL_STOP" Ta No "0x2000000" Ta "Stopped for system suspend" -.It Dv "P_INEXEC" Ta No "0x4000000" Ta Process is in Xr execve 2 -.It Dv "P_STATCHILD" Ta No "0x8000000" Ta "Child process stopped or exited" +.It Dv "P_ADVLOCK" Ta No "0x00000001" Ta "Process may hold a POSIX advisory lock" +.It Dv "P_CONTROLT" Ta No "0x00000002" Ta "Has a controlling terminal" +.It Dv "P_KPROC" Ta No "0x00000004" Ta "Kernel process" +.It Dv "P_PPWAIT" Ta No "0x00000010" Ta "Parent is waiting for child to exec/exit" +.It Dv "P_PROFIL" Ta No "0x00000020" Ta "Has started profiling" +.It Dv "P_STOPPROF" Ta No "0x00000040" Ta "Has thread in requesting to stop prof" +.It Dv "P_HADTHREADS" Ta No "0x00000080" Ta "Has had threads (no cleanup shortcuts)" +.It Dv "P_SUGID" Ta No "0x00000100" Ta "Had set id privileges since last exec" +.It Dv "P_SYSTEM" Ta No "0x00000200" Ta "System proc: no sigs, stats or swapping" +.It Dv "P_SINGLE_EXIT" Ta No "0x00000400" Ta "Threads suspending should exit, not wait" +.It Dv "P_TRACED" Ta No "0x00000800" Ta "Debugged process being traced" +.It Dv "P_WAITED" Ta No "0x00001000" Ta "Someone is waiting for us" +.It Dv "P_WEXIT" Ta No "0x00002000" Ta "Working on exiting" +.It Dv "P_EXEC" Ta No "0x00004000" Ta "Process called exec" +.It Dv "P_WKILLED" Ta No "0x00008000" Ta "Killed, shall go to kernel/user boundary ASAP" +.It Dv "P_CONTINUED" Ta No "0x00010000" Ta "Proc has continued from a stopped state" +.It Dv "P_STOPPED_SIG" Ta No "0x00020000" Ta "Stopped due to SIGSTOP/SIGTSTP" +.It Dv "P_STOPPED_TRACE" Ta No "0x00040000" Ta "Stopped because of tracing" +.It Dv "P_STOPPED_SINGLE" Ta No "0x00080000" Ta "Only one thread can continue" +.It Dv "P_PROTECTED" Ta No "0x00100000" Ta "Do not kill on memory overcommit" +.It Dv "P_SIGEVENT" Ta No "0x00200000" Ta "Process pending signals changed" +.It Dv "P_SINGLE_BOUNDARY" Ta No "0x00400000" Ta "Threads should suspend at user boundary" +.It Dv "P_HWPMC" Ta No "0x00800000" Ta "Process is using HWPMCs" +.It Dv "P_JAILED" Ta No "0x01000000" Ta "Process is in jail" +.It Dv "P_TOTAL_STOP" Ta No "0x02000000" Ta "Stopped for system suspend" +.It Dv "P_INEXEC" Ta No "0x04000000" Ta Process is in Xr execve 2 +.It Dv "P_STATCHILD" Ta No "0x08000000" Ta "Child process stopped or exited" .It Dv "P_INMEM" Ta No "0x10000000" Ta "Loaded into memory" .It Dv "P_SWAPPINGOUT" Ta No "0x20000000" Ta "Process is being swapped out" .It Dv "P_SWAPPINGIN" Ta No "0x40000000" Ta "Process is being swapped in" From nobody Thu Nov 14 00:43:41 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XphGj3LmZz5cpLB; Thu, 14 Nov 2024 00:43: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XphGj1nv2z4sbl; Thu, 14 Nov 2024 00:43:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731545021; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GEWSLXjwo2fJCW4bovDfnqWDKiAngFZd1ef0bLPa/mI=; b=NCWqqk5R0cLuo5qX64Vb+2sRVMybesgPLxxwFef7SGvcvjy9hmrRl2N0LSkRqVyBqg8Zyj A41gAO9pq3Sd3i7npJsei2aJZpj6wwNaRgHr8oauH+yWycnPgnFWzHJtnl1XdSCzhAp/nu oIwTVUXGyUT6g4VQjGaPWwYUhW+HK8LwQ9sG7Muz5tdB1UmwsrT2diU8FBbiKde4EF+3Zq bkWN9p2vyyYfytYh9oUumMfsfQSzs7SnHudhr8bU3DhdeODbvT93RblCe215W6myb/ADl4 c9qG1YknUYX/CIR3o1fCiB+92gqJUDcluKLii6qi+mXvTHkb2ZX1HAwxas9H6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731545021; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GEWSLXjwo2fJCW4bovDfnqWDKiAngFZd1ef0bLPa/mI=; b=SkB9vzrTfZ8OsppH7fL+b1BNdA9Z1gKJdy0DIl7WorJbsF01LTXB7dLXa6/X+9zBxqBn9u MBdPTFCKZm0S+6j22NwWH/UPNeyvYF+jXUdZeAJyKwHccmzfj1y/GU0ohAJmAAoe78SSKU b6iG00D7jbbf3fdAWtaBXrTVxiADjbUchyUuBLmo4DvLJ2WzhX0Yil4MbeQODlVzCcMp9/ EacTnqNYpMDyGx9kaPZPZoBxWQtGjoCJ9FcREEqNX8jQpw2uSQXyfH6SOierAQibz3NtKD hjxRVm74Lxn4fJbPXlL+FqJ8bmNojJa3+0IKJtHZ4VsAdpnl0aNXQn06jRMnGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731545021; a=rsa-sha256; cv=none; b=eP7m0t5gnHmm8Y7x0k5X64rac2pNthyXXibixdENKqMONwMzNnArTNNJhlLIQ+rDE8sWVs VQXbwpmqxvPg5JDdjznpThY4BRlLtXHQXU5rewUdLoJF3PFnEjLben8ejv5omS7kEPfCF4 RwFErDe3gj+lYrTJbN8Vu6R/7o9lYuCZ4QeVibpcZPYhtV22X3s1xkv5NaU7gyG8nsyfGJ FWzxL8IFxqe2Ngv8fO4b89r0+ssvonEg4ripWzy5GQxwaDU7ZOoCjEd2qkFM9SKRtbpzxA q8Rnszo4ZPzit3d89aJ8FPdRslUBYAorZ9xjefPKKD5Y56PuApJtz8Hoyx+ZIg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XphGj1Q3KzGsZ; Thu, 14 Nov 2024 00:43:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AE0hfaD024913; Thu, 14 Nov 2024 00:43:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AE0hfbf024910; Thu, 14 Nov 2024 00:43:41 GMT (envelope-from git) Date: Thu, 14 Nov 2024 00:43:41 GMT Message-Id: <202411140043.4AE0hfbf024910@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 5f52fa2ac30e - stable/14 - ps.1: document rest of flag2 bits List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5f52fa2ac30ecf1c707600d922191c0d061fa41e Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=5f52fa2ac30ecf1c707600d922191c0d061fa41e commit 5f52fa2ac30ecf1c707600d922191c0d061fa41e Author: Konstantin Belousov AuthorDate: 2024-11-09 02:00:42 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-14 00:42:18 +0000 ps.1: document rest of flag2 bits (cherry picked from commit 4c367bc90ba02a76d015364345343eed1cc4492a) --- bin/ps/ps.1 | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/bin/ps/ps.1 b/bin/ps/ps.1 index cc08344b928b..cd29f4a0d70e 100644 --- a/bin/ps/ps.1 +++ b/bin/ps/ps.1 @@ -377,6 +377,24 @@ the include file .It Dv "P2_NOTRACE_EXEC" Ta No "0x00000004" Ta Keep P2_NOPTRACE on Xr execve 2 .It Dv "P2_AST_SU" Ta No "0x00000008" Ta "Handles SU ast for kthreads" .It Dv "P2_PTRACE_FSTP" Ta No "0x00000010" Ta "SIGSTOP from PT_ATTACH not yet handled" +.It Dv "P2_TRAPCAP" Ta No "0x00000020" Ta "SIGTRAP on ENOTCAPABLE" +.It Dv "P2_ASLR_ENABLE" Ta No "0x00000040" Ta "Force enable ASLR" +.It Dv "P2_ASLR_DISABLE" Ta No "0x00000080" Ta "Force disable ASLR" +.It Dv "P2_ASLR_IGNSTART" Ta No "0x00000100" Ta "Enable ASLR to consume sbrk area" +.It Dv "P2_PROTMAX_ENABLE" Ta No "0x00000200" Ta "Force enable implied PROT_MAX" +.It Dv "P2_PROTMAX_DISABLE" Ta No "0x00000400" Ta "Force disable implied PROT_MAX" +.It Dv "P2_STKGAP_DISABLE" Ta No "0x00000800" Ta "Disable stack gap for MAP_STACK" +.It Dv "P2_STKGAP_DISABLE_EXEC" Ta No " 0x00001000" Ta "Stack gap disabled after exec" +.It Dv "P2_ITSTOPPED" Ta No "0x00002000" Ta "itimers stopped (as part of process stop)" +.It Dv "P2_PTRACEREQ" Ta No "0x00004000" Ta "Active ptrace req" +.It Dv "P2_NO_NEW_PRIVS" Ta No "0x00008000" Ta "Ignore setuid on exec" +.It Dv "P2_WXORX_DISABLE" Ta No "0x00010000" Ta "WX mappings enabled" +.It Dv "P2_WXORX_ENABLE_EXEC" Ta No "0x00020000" Ta "WxorX enabled after exec" +.It Dv "P2_WEXIT" Ta No "0x00040000" Ta "Internal exit early state" +.It Dv "P2_REAPKILLED" Ta No "0x00080000" Ta "REAP_KILL pass handled the process" +.It Dv "P2_MEMBAR_PRIVE" Ta No "0x00100000" Ta "membarrier private expedited registered" +.It Dv "P2_MEMBAR_PRIVE_SYNCORE" Ta No "0x00200000" Ta "membarrier private expedited sync core registered" +.It Dv "P2_MEMBAR_GLOBE" Ta No "0x00400000" Ta "membar global expedited registered" .El .It Cm label The MAC label of the process. From nobody Thu Nov 14 00:43:42 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XphGk4RqKz5cp1S; Thu, 14 Nov 2024 00:43: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XphGk2rvsz4sfg; Thu, 14 Nov 2024 00:43:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731545022; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NoP+o06F3YKfAgLyKyfpVtgb+BBerR8+Kfpc+wZPRo4=; b=FX9eEYMx3lvtPUJolqUdnA/YNwDb7P82H0F81IzmGItOoYTwYrgdpursWfC4wBXBEEW73C oDQwRV13hIcjnHFEU0/D7fcuAfOLxLC4LKRlpnaiq05HgBo0yj1qJzKfFA0s+cXp0zgUiJ q9hqsWWOqq5Mn0ilJ2kQrPlR1wvkHK3CvYZuLUsSdXOZ2+2YPxWjJJI4oe/xqgh7wfg+qc bbF4xrinRr6FH+vpbxVJkSaFuscGE4X3YwuIqGiqpuRAMc/rYn5kbrTdzTrZwuivhQ0MOK pZam9jBJ+TGiIE3HRRQG9baW5MsFerv+dUW8MAs8OwAPYSOkcZcj4ptOS6AmNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731545022; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NoP+o06F3YKfAgLyKyfpVtgb+BBerR8+Kfpc+wZPRo4=; b=EKxgSjefbsFxG/x3pasuH8PmD1hragN99HbE+dVfsITW9l4dtu52QSmBl46ZmL4kqoZZBf z1N3xEjNNtWV4hjqxPPivCCK0cciskyGG89kAww2h6lbTW9sdn8e0PwDhaLs7/NcKn3EWt Z/NNw4FwbblPS3FQLJC4SzClVJ/uHgA1eXIk0FUonp9rNYLZ3yAU8vjbm+8nLwOBhVXoUz E6mYnpNKwmodcni1sCSStRmCkr7RCkDlYz7voo7zzYwiH4NcF0kUdVsiTa0ItEKdiYA3Hg c0bD2HZk8AupN61PZq2THf4JS7Xbz7+qjR9RzfLY93I6+cAKiVGrMwIeW+iSrA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731545022; a=rsa-sha256; cv=none; b=nfypb4GINwz5xGsZi0BXXzr+38xo+AEMg/pDN0aktk/WK3+U9dHXW24SRDeHvNs8PBI2t2 h+qfLat0i+P29Ol8Uy2J9aayxLAx3Mbru3gjpFQqzXtxvZKsFwyaQdG139Z1vo6JOE9ox+ NcgfWi9IeI20hsW2kEQBtm/qSGkY7W7jJnenE9AbEUWHlqB5zC4dUdvq7O31daI5o4QV1D eNcjvyK1DKBW5a36Wb9kVCnr2jmTX4SM1x76NwbUs0iQ8M/PxvcNjVzSNxuN247hL6kiH6 9oY4U+JXZyCD41uvAOtL45dqiv8lHhRZDZrQ+N9iQfxDEql8dx8W24uJEDfEOw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XphGk2TQTzGw9; Thu, 14 Nov 2024 00:43:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AE0hg9x024961; Thu, 14 Nov 2024 00:43:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AE0hgK1024958; Thu, 14 Nov 2024 00:43:42 GMT (envelope-from git) Date: Thu, 14 Nov 2024 00:43:42 GMT Message-Id: <202411140043.4AE0hgK1024958@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 5eda09abc32f - stable/14 - sys/proc.h: add comments to the flag2 bits List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5eda09abc32f0707664a76367aea8ab2db2ea506 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=5eda09abc32f0707664a76367aea8ab2db2ea506 commit 5eda09abc32f0707664a76367aea8ab2db2ea506 Author: Konstantin Belousov AuthorDate: 2024-11-09 02:02:36 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-14 00:42:18 +0000 sys/proc.h: add comments to the flag2 bits (cherry picked from commit 14b3a4564af36d30a94f01d7d94e64f72df7b880) --- sys/sys/proc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/sys/proc.h b/sys/sys/proc.h index 6d6a4e8624c5..96cfc5f199ae 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -874,7 +874,7 @@ struct proc { MAP_STACK */ #define P2_STKGAP_DISABLE_EXEC 0x00001000 /* Stack gap disabled after exec */ -#define P2_ITSTOPPED 0x00002000 +#define P2_ITSTOPPED 0x00002000 /* itimers stopped */ #define P2_PTRACEREQ 0x00004000 /* Active ptrace req */ #define P2_NO_NEW_PRIVS 0x00008000 /* Ignore setuid */ #define P2_WXORX_DISABLE 0x00010000 /* WX mappings enabled */ @@ -882,7 +882,7 @@ struct proc { #define P2_WEXIT 0x00040000 /* exit just started, no external thread_single() is permitted */ -#define P2_REAPKILLED 0x00080000 +#define P2_REAPKILLED 0x00080000 /* REAP_KILL pass touched me */ #define P2_MEMBAR_PRIVE 0x00100000 /* membar private expedited registered */ #define P2_MEMBAR_PRIVE_SYNCORE 0x00200000 /* membar private expedited From nobody Thu Nov 14 00:43:43 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XphGm0KG4z5cnvw; Thu, 14 Nov 2024 00:43: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XphGl3wbBz4sc2; Thu, 14 Nov 2024 00:43:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731545023; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RN/TyJ6utGT7oJH90v3i/6Z8kwnP2AiQTQbtWpkraaU=; b=tsnHCem+JDVAERhtj5WZsWRj1dwucYjMyhFwK37C+6ck6FxoJYg7Y4gJg5UPYsho9d0Vm0 5C9+JBpehvZVn0H6HxUPw8udVnNR0cTLNaJeB50+p4XsrZEjQQCrk8gYMaOEnMizZZB4or ox5mIGtTVnbj0qD48ByJPw+XcyVg/U1B/BOf8QkiJDrViSZoANHss3MxirmoVmkce2nd15 uGBgh064g76rt6tJCOMeS0GlhjTlTDLE3eLfUyTdl/mWAgkaxioXrrOKh7zghAoFj44bRk atakoLR9npQC1tY3AEqOO0Xa+Ssu8NpvNeuGPQ1wWwJDvfplMEERI4tLGU39dA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731545023; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RN/TyJ6utGT7oJH90v3i/6Z8kwnP2AiQTQbtWpkraaU=; b=ssuwYKJrvVxVzUtc/Sj6ac4vPfRbq6sNvR24tm3qxKjRmcZP3E3unzH5AINS7Bnc2l/n7D DsPHRVBLhGEa0hffRwtTQnz/DDxWZQmquzg70Bki16IQDow+Zg+kzxhUr2i0jynhYqYFpW BNDa4/QjVlB4eXTaUxjG6knMo+IY0PcqosVJDFgVm2GX36jjPzi27JINNKIrTOR4zaLmUl +kyF7PQg6rxOnvWFN8QlQ1PwtluVTnAImeRCWM+ErhGZxEZHlc+6B/UQF7U5jlodM6Nq6G blvbu+l0wdiMHT01Ow/XGmwrwxjvwE1S5Y2VmtHGBw5VKQojB7yT6ZRxuc9DGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731545023; a=rsa-sha256; cv=none; b=QjLwO4kDbtW3bOmvyeQWVVuncl+8p7a7oEx8f7nwRXZOE+A9vt7gnUksuzqP6+h4MUK3m+ G/uK0e1coph1GEW4yS/j3vIV6YOqjweAmYp+fuxszeId4Yx9uLLkJmyuhM7dxlH0D23fFg t2J1GNVEHnRZK3tddjNY0IEPFxH4iRh0hGlI6dkNEI3PfppPnlnzjjy5yfTTuFFi+H6qLe 43es6knYxafwkz8Y+tRUfP+u3JV28zXIEktXr3ZiqQnno9kvKouJEJjZ6krzzHtyg1O43t WOuA8Sz50CXBmTdEJlxG8itZALQIsehE5SLWuxfjsI1yv0yhKfu0Vh3pl8Qoog== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XphGl3VcTzGwB; Thu, 14 Nov 2024 00:43:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AE0hhHp025009; Thu, 14 Nov 2024 00:43:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AE0hhOa025006; Thu, 14 Nov 2024 00:43:43 GMT (envelope-from git) Date: Thu, 14 Nov 2024 00:43:43 GMT Message-Id: <202411140043.4AE0hhOa025006@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: b01067349311 - stable/14 - struct proc: add locking annotation for p_pendingcnt List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b01067349311656d51172da8900c4281ca115ac4 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b01067349311656d51172da8900c4281ca115ac4 commit b01067349311656d51172da8900c4281ca115ac4 Author: Konstantin Belousov AuthorDate: 2024-11-12 06:05:48 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-14 00:42:18 +0000 struct proc: add locking annotation for p_pendingcnt (cherry picked from commit 166c1fac59f04cc346d8a18671f25d0ef0293611) --- sys/sys/proc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/proc.h b/sys/sys/proc.h index 96cfc5f199ae..f794cbe17442 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -714,7 +714,7 @@ struct proc { int p_suspcount; /* (j) Num threads in suspended mode. */ struct thread *p_xthread; /* (c) Trap thread */ int p_boundary_count;/* (j) Num threads at user boundary */ - int p_pendingcnt; /* how many signals are pending */ + int p_pendingcnt; /* (c) how many signals are pending */ struct itimers *p_itimers; /* (c) POSIX interval timers. */ struct procdesc *p_procdesc; /* (e) Process descriptor, if any. */ u_int p_treeflag; /* (e) P_TREE flags */ From nobody Thu Nov 14 00:49:33 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XphPT61kGz5cpVh; Thu, 14 Nov 2024 00:49: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XphPT5Dsgz4tx1; Thu, 14 Nov 2024 00:49:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731545373; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FQ0sGkeBD2/CR8cMxZ97I03Lf01zYka02x+9LkZznxU=; b=PxW0j7ZgAnTh2J9QJH6owhz6sTJRDNZuYfT3G5RbJlogdN7YMb6a+1CPYNnKdK2rnLU99k p++dRld+HTr/cHJfskxPRm7MgmjvUoFw+Z38mdBdJu10HYaMK6hBdCzRHJbKJDBAsNxwgE +pQCde+0Cg01fgisck3oExZpoC5egxD1RDGY6A+PwlvHLTnbbC1jAb8L2tTssG5kmF5fg6 STm9L0NYR7mWBs3esixQlChjW2MTg3LcUF2NTTdVNEulmMqwZkPT92NFXYI8RzIiKmE75A +u3wqZ+1B2zhxX/uqmiyQAluT3pJjBjuKhm6gIuv3eb6UX7wVK3aRyzyS5kc6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731545373; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FQ0sGkeBD2/CR8cMxZ97I03Lf01zYka02x+9LkZznxU=; b=x0ostHFV3RSYlK5hwkNxz5XXT/BgDXk+RnK+Qluxtio7DiZHl3grZyWg4ddKB4c/L7UEXn avsKQZ6AqHwuB9Ch2kS822lXh0nDIHTsbh4k68bD32WQ6lJKknI2KwOedeWbRXSIz5zuAP JQIULqcQ2/WTQq4PkHRjKpTdX9pJOiEt5jYuq4WRDy8e/8zzp1GG8ujgrL/TfhrlipK6xJ JcgMXI3fMxdosrIIceNUHgMxnKpCUDiK00wqc2/qw5hzjitUlVl8EJTVliJesijAUSNm/N PgSw8WtJW2rI9C+7d56h7CNkMnjRwfq0GcHlhUd1StG+5o2/XfouHaAyeULrPw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731545373; a=rsa-sha256; cv=none; b=p3oXmfK+KsymoGtd+W5BxcVFkJacaCeXLpTaCsP5xI5PHwZ7V5QZ5YKvZ7EllOu8bgwtZf Ud6dnD1Hium51iysFn8pip+W7OsrqFAp8tm1oEVfDOFPbm1/zFKM9iMoDW5FS0zRktUPmx ILJL5Nfyyv24N1HZmDsr9iB/AJrdlTZ2qzwUJtsQZZeNExzHHdoE77YQN9ykcjq3Hx1Ddn s8URoKH7XwlpzREKgCsVlRU2b0hB9DbRs8fPNM/m1TsbgclY+/WM52MZDQgFBWPrZKM+w3 wtpDzce4N55WIDh9rmq3AFKiY7e55aOjK/HdGItBrYcDD4PS1kapYAtG6Pdjhg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XphPT4jZYzGsc; Thu, 14 Nov 2024 00:49:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AE0nXSf026853; Thu, 14 Nov 2024 00:49:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AE0nXaJ026850; Thu, 14 Nov 2024 00:49:33 GMT (envelope-from git) Date: Thu, 14 Nov 2024 00:49:33 GMT Message-Id: <202411140049.4AE0nXaJ026850@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: fcd8e27dcf38 - stable/14 - style.9: be explicit about booleans in comparisons List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: fcd8e27dcf38532c4caf62f1610f389e5c9bd20c Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=fcd8e27dcf38532c4caf62f1610f389e5c9bd20c commit fcd8e27dcf38532c4caf62f1610f389e5c9bd20c Author: Ed Maste AuthorDate: 2021-05-27 15:25:32 +0000 Commit: Ed Maste CommitDate: 2024-11-14 00:49:21 +0000 style.9: be explicit about booleans in comparisons We prefer something like "if (count != 0)" over "if (count)" for non-boolean variables. This was implicit in examples, but was unclear for some new contributors. Attempt to clarify by providing a more explicit statement and example. Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D30507 (cherry picked from commit 93f7a3023c3147d42dbe3dab58a5a70779587ea5) --- share/man/man9/style.9 | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/share/man/man9/style.9 b/share/man/man9/style.9 index 52292b896add..75daea47ca96 100644 --- a/share/man/man9/style.9 +++ b/share/man/man9/style.9 @@ -756,9 +756,10 @@ not: !(p = f()) .Ed .Pp -Do not use +Do not test without a comparison, or with unary .Ic \&! -for tests unless it is a boolean, e.g., use: +(except for booleans). +For example, use: .Bd -literal if (*p == '\e0') .Ed @@ -768,6 +769,16 @@ not: if (!*p) .Ed .Pp +Prefer: +.Bd -literal +if (count != 0) +.Ed +.Pp +over: +.Bd -literal +if (count) +.Ed +.Pp Routines returning .Vt "void *" should not have their return values cast From nobody Thu Nov 14 01:34:25 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpjPG19gcz5cshZ; Thu, 14 Nov 2024 01:34:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XpjPF70VJz42bT; Thu, 14 Nov 2024 01:34:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731548066; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=81Pw8S+QrDo+zSwext3bI6An4/bzSo+EZj0x57JVVK4=; b=KA1qVH/QZoleX/OpY7z5s+g2nH4mCd2cpy7TP/7tY9dehj6ZkozRUY711oNefZTopmVzzk Zd9zsn04GjTc2aU+YgGXZuc8u1hITXNYbv5Tc6YFDwbN8EOdig/ycRJEDtkF4drXXbK0uw HC8zxTTxF2A0c4dahsjgKT6yhewcVSofTA7jCtzYcZ2nQrbPAc+88yr2UdVpZfZEn6iKbV lsfd1OIbOnZlExF+nQzMP6vIa5zfMNIUus0EQsD4DErXPKaD86UEomkD12w74avKIxdWhT Rx41Q0XyzyYJhGCoslbBR3NWbVO9SvOJ368gX9iSsHwOkKZtLIwk2sgwClvRMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731548066; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=81Pw8S+QrDo+zSwext3bI6An4/bzSo+EZj0x57JVVK4=; b=blOUnPQYJLSJQhWyYVkjwWJZCgMBC/puKzCUkspQjVQHkfhlpDUvdqtwfqxcR0t/6jP0ug pNLqzukC0Rkd2a9JdhbTzNjR/lWdk/H3qM4ex+LOQaZoOsFYRMrpcmSTuRs5vbDGgUn1+6 2hPSBx7tTI8n4Lah1h7c9y/L+1Wy3Dh0Z7BVws62aKPUHxsa46vLI+P1p7Z+omyGh4PGFS 7lkJVKOn8l8C2hqDoM0FKHYHaEynP8l4wFwdO5fJ8XU1PDgB1+00ET6+tm/egq8kpD6NrN Wg6pIDkuQBYElrmeoDzMT5jt4oOaasKnxljRCDK8YLYeHoz5cecPkrs4TnwqOA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731548066; a=rsa-sha256; cv=none; b=jR+Mguni5dLeZ6MzhBzUSjKQg1An93LzQqNIb4TM5TqgN7200VhheodcpdwSWt6mtVcGf+ A+lsx30VpvgwWiyExUw/IxGNCVMPCifJmXocXcCb3KGmNOFKkBOkT5UuMeXADEVdlwvYZd CxNNxGjZbb3bucCPjNzpOzcgyiAcomhgslYu9bsBm3wbbocp+zW7mfBZCYxDsIkvhpJsgN EFOLXUoIER4pSo6NANZ20Lo1P9czKAnvDJeSq9QTTEbjIip2IQ5U/KTTEaS1x1BZ4jPRaf PKr80gZSPCqSu6N9NV3BV9I/JyzOzP1PmFeqJ3Kop43kdf49If0KS8E7Sjuu7Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XpjPF6bTrzJZY; Thu, 14 Nov 2024 01:34:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AE1YP78017981; Thu, 14 Nov 2024 01:34:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AE1YPCg017976; Thu, 14 Nov 2024 01:34:25 GMT (envelope-from git) Date: Thu, 14 Nov 2024 01:34:25 GMT Message-Id: <202411140134.4AE1YPCg017976@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 7e6ac503ffeb - main - libthr: add some tests for pthread_atfork() 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 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7e6ac503ffeb81733272d54af367db58e45e57ca Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=7e6ac503ffeb81733272d54af367db58e45e57ca commit 7e6ac503ffeb81733272d54af367db58e45e57ca Author: Kyle Evans AuthorDate: 2024-11-14 01:33:36 +0000 Commit: Kyle Evans CommitDate: 2024-11-14 01:33:37 +0000 libthr: add some tests for pthread_atfork() handling Test that it generally functions, and also that registering multiple times calls each handler in the order that it's documented to call them in. Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D47348 --- lib/libthr/tests/Makefile | 1 + lib/libthr/tests/atfork_test.c | 227 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 228 insertions(+) diff --git a/lib/libthr/tests/Makefile b/lib/libthr/tests/Makefile index aadf0a4d80ca..017b740157dc 100644 --- a/lib/libthr/tests/Makefile +++ b/lib/libthr/tests/Makefile @@ -33,6 +33,7 @@ NETBSD_ATF_TESTS_SH+= cancel_test NETBSD_ATF_TESTS_SH+= exit_test NETBSD_ATF_TESTS_SH+= resolv_test +ATF_TESTS_C+= atfork_test ATF_TESTS_C+= umtx_op_test ATF_TESTS_C+= pthread_sigqueue_test diff --git a/lib/libthr/tests/atfork_test.c b/lib/libthr/tests/atfork_test.c new file mode 100644 index 000000000000..5133330b1247 --- /dev/null +++ b/lib/libthr/tests/atfork_test.c @@ -0,0 +1,227 @@ +/*- + * + * Copyright (C) 2024 Kyle Evans + * + * SPDX-License-Identifier: BSD-2-Clause + * + */ + +#include +#include +#include +#include +#include +#include +#include + +#include + +#define EXIT_NOPREPARE 1 +#define EXIT_CALLEDPARENT 2 +#define EXIT_NOCHILD 3 +#define EXIT_BADORDER 4 + +static int child; +static int forked; +static int parent; + +static void +basic_prepare(void) +{ + ATF_REQUIRE(parent == 0); + forked++; +} + +static void +basic_parent(void) +{ + ATF_REQUIRE(forked != 0); + parent++; +} + +static void +basic_child(void) +{ + if (!forked) + _exit(EXIT_NOPREPARE); + if (parent != 0) + _exit(EXIT_CALLEDPARENT); + child++; +} + +/* + * In the basic test, we'll register just once and set some globals to confirm + * that the prepare/parent callbacks were executed as expected. The child will + * use its exit status to communicate to us if the callback was not executed + * properly since we cannot assert there. This is a subset of the + * multi-callback test, but separated out so that it's more obvious from running + * the atfork_test if pthread_atfork() is completely broken or just + * out-of-order. + */ +ATF_TC(basic_atfork); +ATF_TC_HEAD(basic_atfork, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Checks invocation of all three atfork callbacks"); +} +ATF_TC_BODY(basic_atfork, tc) +{ + pid_t p, wpid; + int status; + + pthread_atfork(basic_prepare, basic_parent, basic_child); + + p = fork(); + + ATF_REQUIRE(p >= 0); + if (p == 0) + _exit(child != 0 ? 0 : EXIT_NOCHILD); + + /* + * The child can't use any of our standard atf-c(3) macros, so we have + * to rely on the exit status to convey any shenanigans. + */ + while ((wpid = waitpid(p, &status, 0)) != p) { + ATF_REQUIRE_ERRNO(EINTR, wpid == -1); + if (wpid == -1) + continue; + } + + ATF_REQUIRE_MSG(WIFEXITED(status), + "child did not exit cleanly, status %x", status); + + status = WEXITSTATUS(status); + ATF_REQUIRE_MSG(status == 0, "atfork in child %s", + status == EXIT_NOPREPARE ? "did not see `prepare` execute" : + (status == EXIT_CALLEDPARENT ? "observed `parent` executing" : + (status == EXIT_NOCHILD ? "did not see `child` execute" : + "mystery"))); + + ATF_REQUIRE(forked != 0); + ATF_REQUIRE(parent != 0); + ATF_REQUIRE(child == 0); +} + +static void +multi_assert(bool cond, bool can_assert) +{ + if (can_assert) + ATF_REQUIRE((cond)); + else if (!(cond)) + _exit(EXIT_BADORDER); +} + +static void +multi_bump(int *var, int bit, bool can_assert) +{ + int mask, val; + + mask = (1 << (bit - 1)); + val = *var; + + /* + * Every bit below this one must be set, and none of the upper bits + * should be set. + */ + multi_assert((val & mask) == 0, can_assert); + if (bit == 1) + multi_assert(val == 0, can_assert); + else + multi_assert((val & ~mask) == (mask - 1), can_assert); + + *var |= mask; +} + +static void +multi_prepare1(void) +{ + /* + * The bits are flipped for prepare because it's supposed to be called + * in the reverse order of registration. + */ + multi_bump(&forked, 2, true); +} +static void +multi_prepare2(void) +{ + multi_bump(&forked, 1, true); +} + +static void +multi_parent1(void) +{ + multi_bump(&parent, 1, true); +} +static void +multi_parent2(void) +{ + multi_bump(&parent, 2, true); +} + +static void +multi_child1(void) +{ + multi_bump(&child, 1, false); +} +static void +multi_child2(void) +{ + multi_bump(&child, 2, false); +} + +/* + * The multi-atfork test works much like the basic one, but it registers + * multiple times and enforces an order. The child still does just as strict + * of tests as the parent and continues to communicate the results of those + * tests back via its exit status. + */ +ATF_TC(multi_atfork); +ATF_TC_HEAD(multi_atfork, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Checks that multiple callbacks are called in the documented order"); +} +ATF_TC_BODY(multi_atfork, tc) +{ + pid_t p, wpid; + int status; + + pthread_atfork(multi_prepare1, multi_parent1, multi_child1); + pthread_atfork(multi_prepare2, multi_parent2, multi_child2); + + p = fork(); + + ATF_REQUIRE(p >= 0); + if (p == 0) + _exit(child != 0 ? 0 : EXIT_NOCHILD); + + /* + * The child can't use any of our standard atf-c(3) macros, so we have + * to rely on the exit status to convey any shenanigans. + */ + while ((wpid = waitpid(p, &status, 0)) != p) { + ATF_REQUIRE_ERRNO(EINTR, wpid == -1); + if (wpid == -1) + continue; + } + + ATF_REQUIRE_MSG(WIFEXITED(status), + "child did not exit cleanly, status %x", status); + + status = WEXITSTATUS(status); + ATF_REQUIRE_MSG(status == 0, "atfork in child %s", + status == EXIT_BADORDER ? "called in wrong order" : + (status == EXIT_NOCHILD ? "did not see `child` execute" : + "mystery")); + + ATF_REQUIRE(forked != 0); + ATF_REQUIRE(parent != 0); + ATF_REQUIRE(child == 0); +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, basic_atfork); + ATF_TP_ADD_TC(tp, multi_atfork); + return (atf_no_error()); +} From nobody Thu Nov 14 01:34:26 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpjPH3Zm4z5cskP; Thu, 14 Nov 2024 01:34:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XpjPH1cVcz42Sy; Thu, 14 Nov 2024 01:34:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731548067; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ooJ9eFjnV+1AY8URObRU2Iyt/xEU3d211+wQ23itRx4=; b=K1UUcYZAqBNIySbtGvfCQCS4cdvrAeuMNYVkXa2mg5Vk97Cs6lpdwau86fbu86b/IVer9o fYBvBJT7P4ZIvCVLsUHhlYYdGDJxXBWCtaePb9C83KYSED2Y4XdJmvw12wqbkjYSNrNqh4 IJIfyYPKoLU+HIj+CtkX5PZSpdZd/POjCuPuHCzyRSEq0Cv21vEmJPstSTYQNe93HGCxCT UqFVpbU8Cn1WZ1rEwb195UIkILPNJvqaG/ejQcnO0MUgz2iKlSzEMqwB7ImzQJm+NHxSzM xA5KB+d/p15LjVxsa019wSLn73Sil2iX+fmyqT2FnvlCTaQ+t35HQRbWgdc7rQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731548067; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ooJ9eFjnV+1AY8URObRU2Iyt/xEU3d211+wQ23itRx4=; b=flkM8YnD23tU9qYQSH72AcFEJhpJCRH6x+4ODHuZMeft9r2/K1MLDiTxESd0W9PaDvyyoF EGBIKt0h0XbO6akoBVUM8W5khl2qgKDQDH7tjCE0TIdRkKXfhckqxqS2D1AGi5eRKL3OK8 EM/nR4UqF/JM5DZBw89qKLDDz5lQutyhzZRXXPICIGO7HFOZ2NK4UFXLnp7iTRDesv6IG7 gou6zc9p4IMeGa0jMejArhWzHXUg7GnWtPItCnnr/pApXW6ZKP3qpH/4+vDPudgdxCqEkT trQjkDHFTLWSOP5nCfO0M1U/Iiu/HWE8up9jrHkLF/EsYEIq5Gyzk9ttR8bltA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731548067; a=rsa-sha256; cv=none; b=QrDQIkvZ73efNr5lk4cBgfoY7XKMwIaJWALEvmlOpx96nwiOhPBPN14xxFysMOC0Qm2iRZ 7iOsMlpjyvuMPVmkYIY46YiFbje8w4sVIa8QZMJ7H8gETU3hhwrgquIC/4JRYbZ4Q+UGhK lEXGtB0EjR7QjefS8AtKXPDdmgUicsufHizlbBgDeU2QyyY2ac4sdX1fHWsphPZHDak6mc n9GP4GDH/F0iVmPQnky7L74e0c+G/qqPiLJslPK5jue8tdI3IUunkmSoZwD7DZRGrGSvsI +BRLEd2vaLFVXLyc1WLR+6Pq9OgX+0h8a0UVQYqPnkfwyb8SWxHxMsGLylg4kg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XpjPH0MsyzJZZ; Thu, 14 Nov 2024 01:34:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AE1YQB6018030; Thu, 14 Nov 2024 01:34:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AE1YQmG018027; Thu, 14 Nov 2024 01:34:26 GMT (envelope-from git) Date: Thu, 14 Nov 2024 01:34:26 GMT Message-Id: <202411140134.4AE1YQmG018027@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 4b202f4faf40 - main - libthr: allow very early atfork registration List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4b202f4faf40fd7af8b84491360186aed8ce5733 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=4b202f4faf40fd7af8b84491360186aed8ce5733 commit 4b202f4faf40fd7af8b84491360186aed8ce5733 Author: Kyle Evans AuthorDate: 2024-11-14 01:33:44 +0000 Commit: Kyle Evans CommitDate: 2024-11-14 01:33:44 +0000 libthr: allow very early atfork registration LSan wants to be able to register atfork handlers at __lsan_init time, which can happen either at the first intercepted function call or in a .preinit_array function. Both of these end up being very early in rtld and executed with the bind lock held, which ends up causing problems when we go to _libpthread_init(). Instead of requiring libpthread to be initialized, just insert the new atfork handler straight into the list if it's not ready yet. The critical section and locking should not be necessary if we're really executing this early, as there won't be any threads to contend with. Reviewed by: kib (earlier version), markj Differential Revision: https://reviews.freebsd.org/D47349 --- lib/libthr/tests/atfork_test.c | 53 ++++++++++++++++++++++++++++++++++++++++++ lib/libthr/thread/thr_fork.c | 20 +++++++++------- lib/libthr/thread/thr_init.c | 1 - 3 files changed, 65 insertions(+), 9 deletions(-) diff --git a/lib/libthr/tests/atfork_test.c b/lib/libthr/tests/atfork_test.c index 5133330b1247..cb0fcb7e62db 100644 --- a/lib/libthr/tests/atfork_test.c +++ b/lib/libthr/tests/atfork_test.c @@ -25,6 +25,58 @@ static int child; static int forked; static int parent; +/* + * We'll disable prefork unless we're specifically running the preinit test to + * be sure that we don't mess up any other tests' results. + */ +static bool prefork_enabled; + +static void +prefork(void) +{ + if (prefork_enabled) + forked++; +} + +static void +registrar(void) +{ + pthread_atfork(prefork, NULL, NULL); +} + +static __attribute__((section(".preinit_array"), used)) +void (*preinitfn)(void) = ®istrar; + +/* + * preinit_atfork() just enables the prepare handler that we registered in a + * .preinit_array entry and checks that forking actually invoked that callback. + * We don't bother testing all three callbacks here because the implementation + * doesn't really lend itself to the kind of error where we only have a partial + * set of callbacks registered. + */ +ATF_TC(preinit_atfork); +ATF_TC_HEAD(preinit_atfork, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Checks that atfork callbacks may be registered in .preinit_array functions"); +} +ATF_TC_BODY(preinit_atfork, tc) +{ + pid_t p; + + (void)signal(SIGCHLD, SIG_IGN); + prefork_enabled = true; + p = fork(); + + ATF_REQUIRE(p >= 0); + if (p == 0) + _exit(0); + + prefork_enabled = false; + + ATF_REQUIRE(forked != 0); +} + static void basic_prepare(void) { @@ -221,6 +273,7 @@ ATF_TC_BODY(multi_atfork, tc) ATF_TP_ADD_TCS(tp) { + ATF_TP_ADD_TC(tp, preinit_atfork); ATF_TP_ADD_TC(tp, basic_atfork); ATF_TP_ADD_TC(tp, multi_atfork); return (atf_no_error()); diff --git a/lib/libthr/thread/thr_fork.c b/lib/libthr/thread/thr_fork.c index 614841cc314f..aa54b0444cf4 100644 --- a/lib/libthr/thread/thr_fork.c +++ b/lib/libthr/thread/thr_fork.c @@ -84,20 +84,24 @@ _thr_atfork(void (*prepare)(void), void (*parent)(void), struct pthread *curthread; struct pthread_atfork *af; - _thr_check_init(); - if ((af = malloc(sizeof(struct pthread_atfork))) == NULL) return (ENOMEM); - curthread = _get_curthread(); af->prepare = prepare; af->parent = parent; af->child = child; - THR_CRITICAL_ENTER(curthread); - _thr_rwl_wrlock(&_thr_atfork_lock); - TAILQ_INSERT_TAIL(&_thr_atfork_list, af, qe); - _thr_rwl_unlock(&_thr_atfork_lock); - THR_CRITICAL_LEAVE(curthread); + + if (_thr_initial != NULL) { + curthread = _get_curthread(); + THR_CRITICAL_ENTER(curthread); + _thr_rwl_wrlock(&_thr_atfork_lock); + TAILQ_INSERT_TAIL(&_thr_atfork_list, af, qe); + _thr_rwl_unlock(&_thr_atfork_lock); + THR_CRITICAL_LEAVE(curthread); + } else { + TAILQ_INSERT_TAIL(&_thr_atfork_list, af, qe); + } + return (0); } diff --git a/lib/libthr/thread/thr_init.c b/lib/libthr/thread/thr_init.c index 007cf5be81c9..ff59288d919e 100644 --- a/lib/libthr/thread/thr_init.c +++ b/lib/libthr/thread/thr_init.c @@ -519,7 +519,6 @@ init_private(void) env = getenv("LIBPTHREAD_QUEUE_FIFO"); if (env) _thr_queuefifo = atoi(env); - TAILQ_INIT(&_thr_atfork_list); env = getenv("LIBPTHREAD_UMTX_MIN_TIMEOUT"); if (env) { char *endptr; From nobody Thu Nov 14 01:34:28 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpjPJ5gv3z5csqT; Thu, 14 Nov 2024 01:34:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XpjPJ1lckz42bY; Thu, 14 Nov 2024 01:34:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731548068; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dRnwVA4sIkIhCUN5Vk2VnVVXq+ZvMc1ufbh1gXEicwg=; b=RNvgPL1ZaXZ/hY8aEK7kJUSsqVxUpKgemFkjs+zqKjrqUcWa14fZjyMIwC9pTRD1d2DsLA vrKRVuWBb40in2QWDje8zMOZXIOUOjNFDL16fH/LE3qJ0Q4lcAFgqf1cMIU865RWLOyxxw C3IL7+tGUoKSLWDb8L+McXyTmePVc+rJhbxMP2O9D7ijiGNUrl6w5rymr1KouEv5NPajqF WP9nQtfx1xSWII9RZhXCmO9R+VbvttQiDptT1ru1ewEwLyH1whcMo3xYNJe2+ezH6CMt8Q M8XJTWoZ2MB1HpSaxb9bnE9AwaOkuhlpyVdRSDmWqA1Igj+qld/KMAjNBwhztg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731548068; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dRnwVA4sIkIhCUN5Vk2VnVVXq+ZvMc1ufbh1gXEicwg=; b=XZIJRg2bCXU+TRwEURDwBo+4j+0fJBDi2atLtjUq7KpZIPEkrpywdJHVwfSG9mM6r/4y/j XYNdAoNIPdHueVGCX32aL1SJBlcV/pL1LWgQTKlX0NLed3sQawSuFBVhhpHQX1zMk8qC+i ieZJzAqO/SkRrrIWB2CtFb3uyov74kS+a/XBapQd0dxBWIU5ZOulU2IjLNrHEa/2a5Y8LM RjK9dNMqpIeygfHFv1mG7AzTUELnWNoShDWwCzX95lj7Tw7eRaZhdRigu1opFA/Ls8Hfew OT4Ue4VIteONvhFDqpMzICPStuSH7hDEBde4NxwMRuygEeCbEe5nLkaFzLp8MQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731548068; a=rsa-sha256; cv=none; b=BvuWC71G+Wn6Dn/i4X66zyRdJOw8IFgVgSBd8quMTaMzEXqdKs8cZREBK8LuofjhH8fplo jDbftUXj8+lWOH1qPvY0vOek+V6Hg3cP15lI9ne0X64aTDHx8kxyNvewKJV3bEVPuZ7ICV YKPMHmccjjrJD3+0WAWtQBuSrGfy4a7f0eB5qyyYUuNEEzQ4g0QS5vA1NKyAkC55zr7H+F ouj8zJmxOQh3NOO4F4J33KURNbfqEJoUw6nlYsOaSo8T1kIs8CVlCkFX4+ToigsR1lS172 0f6QHPZoghw9v0/127miZFZ2TMdqjcrKTLSVL807eDc0l9GdLgWx8ImzJxFvng== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XpjPJ1M5JzJm3; Thu, 14 Nov 2024 01:34:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AE1YSjY018072; Thu, 14 Nov 2024 01:34:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AE1YSun018069; Thu, 14 Nov 2024 01:34:28 GMT (envelope-from git) Date: Thu, 14 Nov 2024 01:34:28 GMT Message-Id: <202411140134.4AE1YSun018069@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 1426fd6cff06 - main - rtld: implement _dl_iterate_phdr_locked List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1426fd6cff0603f0ee275b99f2ba35dc36f3d0c2 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=1426fd6cff0603f0ee275b99f2ba35dc36f3d0c2 commit 1426fd6cff0603f0ee275b99f2ba35dc36f3d0c2 Author: Kyle Evans AuthorDate: 2024-11-14 01:33:59 +0000 Commit: Kyle Evans CommitDate: 2024-11-14 01:33:59 +0000 rtld: implement _dl_iterate_phdr_locked Some sanitizers need to be able to use dl_iterate_phdr() after stopping the rest of the process, but it's very hard to do so reliably as a non-participant in the main logic of the program. Introduce _dl_iterate_phdr_locked to bypass the locking that's normally required for dl_iterate_phdr() and slap some scary warning on it. It will remain undocumented and probably shouldn't be used for anything else. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D47558 --- lib/libc/gen/Symbol.map | 1 + lib/libc/gen/dlfcn.c | 24 ++++++++++++++++++++---- libexec/rtld-elf/Symbol.map | 1 + libexec/rtld-elf/rtld.c | 24 ++++++++++++++++++++++++ 4 files changed, 46 insertions(+), 4 deletions(-) diff --git a/lib/libc/gen/Symbol.map b/lib/libc/gen/Symbol.map index df950697cf23..4f77023dad72 100644 --- a/lib/libc/gen/Symbol.map +++ b/lib/libc/gen/Symbol.map @@ -464,6 +464,7 @@ FBSDprivate_1.0 { /* needed by thread libraries */ __thr_jtable; + _dl_iterate_phdr_locked; _pthread_atfork; _pthread_attr_destroy; _pthread_attr_getdetachstate; diff --git a/lib/libc/gen/dlfcn.c b/lib/libc/gen/dlfcn.c index b30cb82e5e43..b814fdc845c4 100644 --- a/lib/libc/gen/dlfcn.c +++ b/lib/libc/gen/dlfcn.c @@ -203,9 +203,10 @@ dl_init_phdr_info(void) } #endif -#pragma weak dl_iterate_phdr +#pragma weak _dl_iterate_phdr_locked int -dl_iterate_phdr(int (*callback)(struct dl_phdr_info *, size_t, void *) __unused, +_dl_iterate_phdr_locked( + int (*callback)(struct dl_phdr_info *, size_t, void *) __unused, void *data __unused) { #if defined IN_LIBDL @@ -227,14 +228,29 @@ dl_iterate_phdr(int (*callback)(struct dl_phdr_info *, size_t, void *) __unused, _once(&dl_phdr_info_once, dl_init_phdr_info); ti.ti_module = 1; ti.ti_offset = 0; - mutex_lock(&dl_phdr_info_lock); phdr_info.dlpi_tls_data = __tls_get_addr(&ti); ret = callback(&phdr_info, sizeof(phdr_info), data); - mutex_unlock(&dl_phdr_info_lock); return (ret); #endif } +#pragma weak dl_iterate_phdr +int +dl_iterate_phdr(int (*callback)(struct dl_phdr_info *, size_t, void *) __unused, + void *data __unused) +{ + int error; + +#if !defined(IN_LIBDL) && !defined(PIC) + mutex_lock(&dl_phdr_info_lock); +#endif + error = _dl_iterate_phdr_locked(callback, data); +#if !defined(IN_LIBDL) && !defined(PIC) + mutex_unlock(&dl_phdr_info_lock); +#endif + return (error); +} + #pragma weak fdlopen void * fdlopen(int fd __unused, int mode __unused) diff --git a/libexec/rtld-elf/Symbol.map b/libexec/rtld-elf/Symbol.map index 3cdbb30d04a0..9e9e702a1261 100644 --- a/libexec/rtld-elf/Symbol.map +++ b/libexec/rtld-elf/Symbol.map @@ -27,6 +27,7 @@ FBSD_1.8 { }; FBSDprivate_1.0 { + _dl_iterate_phdr_locked; _rtld_thread_init; _rtld_allocate_tls; _rtld_free_tls; diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index f1075bc75d5f..9e5876e26453 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -252,6 +252,7 @@ int dladdr(const void *, Dl_info *) __exported; void dllockinit(void *, void *(*)(void *), void (*)(void *), void (*)(void *), void (*)(void *), void (*)(void *), void (*)(void *)) __exported; int dlinfo(void *, int , void *) __exported; +int _dl_iterate_phdr_locked(__dl_iterate_hdr_callback, void *) __exported; int dl_iterate_phdr(__dl_iterate_hdr_callback, void *) __exported; int _rtld_addr_phdr(const void *, struct dl_phdr_info *) __exported; int _rtld_get_stack_prot(void) __exported; @@ -4201,6 +4202,29 @@ rtld_fill_dl_phdr_info(const Obj_Entry *obj, struct dl_phdr_info *phdr_info) phdr_info->dlpi_subs = obj_loads - obj_count; } +/* + * It's completely UB to actually use this, so extreme caution is advised. It's + * probably not what you want. + */ +int +_dl_iterate_phdr_locked(__dl_iterate_hdr_callback callback, void *param) +{ + struct dl_phdr_info phdr_info; + Obj_Entry *obj; + int error; + + for (obj = globallist_curr(TAILQ_FIRST(&obj_list)); obj != NULL; + obj = globallist_next(obj)) { + rtld_fill_dl_phdr_info(obj, &phdr_info); + error = callback(&phdr_info, sizeof(phdr_info), param); + if (error != 0) + return (error); + } + + rtld_fill_dl_phdr_info(&obj_rtld, &phdr_info); + return (callback(&phdr_info, sizeof(phdr_info), param)); +} + int dl_iterate_phdr(__dl_iterate_hdr_callback callback, void *param) { From nobody Thu Nov 14 01:53:50 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xpjqg18Rnz5ctXD; Thu, 14 Nov 2024 01:53: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xpjqg0Nz2z44Ym; Thu, 14 Nov 2024 01:53:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731549231; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=845CHvkgL2CGR48/2RqvPkg5AqI3PdinBToPabvhJFk=; b=DJ583icNS7qlwe5iYFHdp4mycPcCU9809e/BjQ6dsJoPV3oBCv7ze9mtL1vdRvxMbEMEoi /LqiqoeD4seOHy1cedvWbCWTVuKNgCH0CbKmFexP7gMsr7BAeKjiq9Neepl6Pn6fKEXatR KQbYPxu7COUdoMTO0vmE7+hdwqpXnGbBIQuZ3H9Oqc4rXfhi4drvhF8vZxIf2crVlQL+nA yjbEai6R4uU1fA+ob2AGO03OsGGdlfAwquG2iWuwc8HsNdLC+EhtGgEFoNJ5MNzbXWD5wZ 9H9B6+yH6LeerIx2nz07qcxFQF8weuXtTG5lGhvM8jc6Ee577Ijqqc4s9diszg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731549231; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=845CHvkgL2CGR48/2RqvPkg5AqI3PdinBToPabvhJFk=; b=JXVKls2vxn6ElrHmagfuuhRC8YgcdVeZeCgwi6NzDTb/z5NhUASkTqUYgopVHuVLd6Vdj3 6eq8S4u3kDs9PTPE6mez5phXdWbtPDyb76RCArrNJDh1xa+hOEMtGFP/sv4RBrgD/MjTBJ 1+C6UG69izJ4RQWXTKdwdzP7ORnDd2yibumI9ocyzVzP7lGwNLH7MIQR9+MOJLUJJx0YmU XjDbBhEM3h1SWx3xVeB5OVeXalA4HtEwf1vkHtlRpUiGpvChQ8vI3owCX6pQY0OOL9d6UG yeobihDuh0rYP+gAu1vPImVgr/TX29Sv7knwVQ2gpnMDg3ss8htJ9NMP8tQFYA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731549231; a=rsa-sha256; cv=none; b=Uq+wVa5CvHN901tXcQyTJK/iXW90iKnKYxg3pLjt35lTde8fEqor+spbTWY+2vlc0aH9aT /9iulpPIfCMzuN15hOJEfoNR2JzKGj8WXTtrZNzZoCfhjvg6f6MRm5+qgTvVf0GqoBLx4b 5vSkbwhhaUxsRE8Jw2zJZ6ozmJzlo6Y9o6LaSZRGEkF6ewmogcbScjenA/Eq7OH/40HkXv dUfl9T1xW1wdJs4BeqwrqWvDA/RzXTOldSa2mBZswEbCpm1wBY3wTucUXxraNzSBPRm+cP Un52b4cE+9VdxweaGTeuYqcrFlT/gVUCC4AJfMMNMdfDjedpOfD6Zak7q+aWNQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xpjqg00MmzJc8; Thu, 14 Nov 2024 01:53:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AE1roIC054962; Thu, 14 Nov 2024 01:53:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AE1rodJ054959; Thu, 14 Nov 2024 01:53:50 GMT (envelope-from git) Date: Thu, 14 Nov 2024 01:53:50 GMT Message-Id: <202411140153.4AE1rodJ054959@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 06733ceca677 - stable/14 - LinuxKPI: lockdep fix #includes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 06733ceca677b2d8ea2ae738bbb624d510fc9df8 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=06733ceca677b2d8ea2ae738bbb624d510fc9df8 commit 06733ceca677b2d8ea2ae738bbb624d510fc9df8 Author: Bjoern A. Zeeb AuthorDate: 2024-11-02 01:21:52 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-11-14 01:52:01 +0000 LinuxKPI: lockdep fix #includes Add sys/sytm.h for __diagused which unbreaks compilation of drm-kmod 5.10-lts on main. Sponsored by: The FreeBSD Foundation Reported by: Evgenii Khramtsov PR: 282479 Fixes: 5c92f84bb607 (cherry picked from commit 9b2705121ba230bf71a1509cc928f0481dfbf31c) --- sys/compat/linuxkpi/common/include/linux/lockdep.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/compat/linuxkpi/common/include/linux/lockdep.h b/sys/compat/linuxkpi/common/include/linux/lockdep.h index 70a4e45867fe..93fe445f7057 100644 --- a/sys/compat/linuxkpi/common/include/linux/lockdep.h +++ b/sys/compat/linuxkpi/common/include/linux/lockdep.h @@ -30,6 +30,7 @@ #ifndef _LINUXKPI_LINUX_LOCKDEP_H_ #define _LINUXKPI_LINUX_LOCKDEP_H_ +#include #include #include From nobody Thu Nov 14 01:53:52 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xpjqh2jSzz5ctZ2; Thu, 14 Nov 2024 01:53:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xpjqh1hbVz44wm; Thu, 14 Nov 2024 01:53:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731549232; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gZztAntIc5K/pLcInkqjggzQGB1US4DJ3HFcXjnUVjA=; b=dqs5m27W55m1imFImuivj8c/yZ1VFet+OPaokuZ8owd283NTEFweQ+SJ+z6YCXYZ7bujbH boHB9w7xOb3xcGYvH8putR4JTAwvBgfwKC71YVn447WtcmwOV4bBWc5WFA54kSkxeWbi1F 5NCFrF9PQAiBgi7/44Os/WlJNUbB/RZ0xv/Vt0ZwbHdd7fF7QovyOmXN1rolt056JPA0HP ZWzbwG0Yf6kGEqt3DYdghjUmzChnhXMISj/r0DCOtKGc2BM6NjOUI7mAGd4K0tGEPS7vGa 5ZwBcD5J38eYXLhc5ma6ORf7sYvInvitNrVM77Klm1Ac0I5cAP2IzJUk2z8I9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731549232; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gZztAntIc5K/pLcInkqjggzQGB1US4DJ3HFcXjnUVjA=; b=KuaMNr06SQ2cB4R3rPQiQsJ29SC8hALcDNx+xXDfFwAYO4j88xmrwxE4pF9xVPO7vtOTum FyHSAErjN/USeRfP68IBJ1uPqTO7kYsQHQeGBwhUWGt0gHkHcGU8JNMDHPTFVEL7ztrvI9 Dg6aYVIyMVxftbPIx9VnUEtZB1VKWeQgso+hJblRDus53P15xNd0VDnXABwDdNkQP4SUDp nX8bSWCTlPoXZUvUNL5sRfWXjLBL5B+6luxVZjkP1smwVjfxwvFWDHaCYxdiBcMJT1wLfO xoFnPQdBor5bbz2W8KfhHHP1Vdx7AWunyIH8AVPgrR5496FOChmSCwDelnhtHw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731549232; a=rsa-sha256; cv=none; b=xJolGogLFf2o09V+fwh49xDAPIbxzc1pNVm+fmLsTYFVH73QNbc5It+yaPrJg4w6TJsyRe 6lVuSUdgD/6SeAyzL8ON5DAKblXKBUAqA+UkT8PJxshGZiBMvABZR4TzqlvIn+7hFuEMuv MYSjII8M0WclhL+10gFzgawISStLKg0floKemTIFeLXxJw4o14Q6RmkrEngJTL16ZLidxh aIiochuWfLSmpuQ/ZK5vK8lUIXS+KCdQeXzf7MGyk/3c1Q6DOftESumIun/BGHpjH2xzgj rtrfZhzmrNTXnhSlmdLluXsKqRW/3Uw4kSBVvg8M9UCX3nKW1TnTj73kZfB7QQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xpjqh1HYRzK97; Thu, 14 Nov 2024 01:53:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AE1rqFx055028; Thu, 14 Nov 2024 01:53:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AE1rqTN055025; Thu, 14 Nov 2024 01:53:52 GMT (envelope-from git) Date: Thu, 14 Nov 2024 01:53:52 GMT Message-Id: <202411140153.4AE1rqTN055025@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: f21cb43c91ef - stable/14 - release: add wifi-firmware-kmod@release to ship as package List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f21cb43c91ef5ff54173b15f550e711c9f87eec6 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=f21cb43c91ef5ff54173b15f550e711c9f87eec6 commit f21cb43c91ef5ff54173b15f550e711c9f87eec6 Author: Bjoern A. Zeeb AuthorDate: 2024-11-02 23:47:14 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-11-14 01:52:01 +0000 release: add wifi-firmware-kmod@release to ship as package Add the flavored port for all the supported wireless drivers we recently added support for. Sponsored by: The FreeBSD Foundation Pointed out by: cperciva (as part of the set of changes) Reviewed by: cperciva (#releng) Differential Revision: https://reviews.freebsd.org/D47406 (cherry picked from commit 2483a2d36803896d27861c03e1f53dd9546b1e73) --- release/scripts/pkg-stage.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/release/scripts/pkg-stage.sh b/release/scripts/pkg-stage.sh index 5742f84b0258..8f96bd5cf5a1 100755 --- a/release/scripts/pkg-stage.sh +++ b/release/scripts/pkg-stage.sh @@ -19,6 +19,7 @@ graphics/drm-515-kmod misc/freebsd-doc-all net/mpd5 net/rsync +net/wifi-firmware-kmod@release ports-mgmt/pkg shells/bash shells/zsh From nobody Thu Nov 14 01:53:53 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xpjqj68qnz5ctZ3; Thu, 14 Nov 2024 01:53:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xpjqj30hXz44rY; Thu, 14 Nov 2024 01:53:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731549233; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wfnO1MWX5hkg9VvJXhmshYKHQAzN37tCZrDvQf59rEM=; b=v4np3c4IdFORJH34D67COYXFdEHbES8q93p70qFnLFAXAGqVQL/Y9M1EBNtsiXHe8sfkzg 632rI+eWVGQb3W+Y5hAzjCoXIo507o3LOAMmSeCu9K5eese9bB+tKA4zEfwHp4DT9lnWi4 aqaZhGGcEGEuxA6EaFkep472bvCC//0BWRE+NC9LsExYOsI2mCMY0bF3Grxfzi+caVCz0I Ssfj4UipbSndop9LQ6aRZFZfu0KGJ3WRIxDmImjJT2xHiJKv8TH773wGBzC3ZJZnxCeMPu 9E5xTW0VfZZ5fUwfwVYlcwy6BPEFCr0s54DcWYyJldCyefSvuBACEc+IMpuquQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731549233; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wfnO1MWX5hkg9VvJXhmshYKHQAzN37tCZrDvQf59rEM=; b=haqQdYk/uQ8sAxn0UNrW/K6C9FoZ6zaC55MIZ7p7edG+CBYDDxFthXugrB2w6ovxL1+gIJ AfZ98DrB0FqmGvY/q9JPDOEEQg4nS9Q83UCweRrFsSLeIe8MkmsiEa8nkcJhHUhDumz19Y UCuKvBCcfNHK83FzKCGxH/2HwJ8YpiGTk5xtrAGNXiYgJZjX1eaLac2bK7zKG/nG603c8F Q5X2MyFonqZ1j6E/zjDx9isRf8w3uQ19KxGWpT2sqQF5d3M28Qq69ge4ueqn02reXW70W+ YPCVWGFzELF1Vz5F6E+mr8522zabtSA4aSh0zN1BHqyeG9nQasSsVHMN1lY6sg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731549233; a=rsa-sha256; cv=none; b=rQi241942ZZm/LDfJpmElF7mODawVWzXVfbKkvizzq1hTA8klheczpOjZ3Bpa3JNS42m9F 9ITo/lO89CSdgXgzSSiqvkIEXo/HoGjouoCRkXIKar6WwKf2zy9eS7T9brUt7eU4VgV/OT Xl6bVTlKQsaiMCGi+swLUcxv/PmD6BxO7O0irsrOUmS9Foo2v9YdycnzkcpWRt1VJTovnS DjSyHCotWWLJrGhY1hJwWMWTs5ZFf48OA8NoMdgfMZRyntsLkgko8M48b0AG+b8sKFnHaU DrhLsoFQD9yPb6GgyJ2BA6Pd/jwF0GhFEfSx1/HjzyNbgjElUDvf/auwnDZnLg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xpjqj2HrgzK00; Thu, 14 Nov 2024 01:53:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AE1rr6A055077; Thu, 14 Nov 2024 01:53:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AE1rrsO055074; Thu, 14 Nov 2024 01:53:53 GMT (envelope-from git) Date: Thu, 14 Nov 2024 01:53:53 GMT Message-Id: <202411140153.4AE1rrsO055074@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 814a49d65ace - stable/14 - fwget: add -q for quiet 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 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/14 X-Git-Reftype: branch X-Git-Commit: 814a49d65ace83b7a955cca32ff243f4abe7cd50 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=814a49d65ace83b7a955cca32ff243f4abe7cd50 commit 814a49d65ace83b7a955cca32ff243f4abe7cd50 Author: Bjoern A. Zeeb AuthorDate: 2024-11-04 23:59:58 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-11-14 01:53:00 +0000 fwget: add -q for quiet output Introduce -q to quieten other output (unless -v is also given). pkg-install(8) currently has no option to allow skipping unavail packages but it will just fail. We would realy want to try to install as much firmware found as possible from the installer. Work around this by doing one firmware package at a time. For that it is highly helpful to be able to query (or possibly re-query) all outstanding fimrware packages. -q together with -n only shows each package to be installed one by line. Once https://github.com/freebsd/pkg/issues/2195 will be implemented we could undo this part of the change and future changes to the installer and use the new option for pkg-install(8) there. While here switch to getopts so -qn works and not just -q -n. Sponsored by: The FreeBSD Foundation Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D47445 (cherry picked from commit 1eb3f15c149b9a2e5b6f5e10aed454fc85945bbd) --- usr.sbin/fwget/fwget.sh | 48 +++++++++++++++++++++++++++++++++--------------- 1 file changed, 33 insertions(+), 15 deletions(-) diff --git a/usr.sbin/fwget/fwget.sh b/usr.sbin/fwget/fwget.sh old mode 100644 new mode 100755 index 154fb7dc92e1..3e2181e53b73 --- a/usr.sbin/fwget/fwget.sh +++ b/usr.sbin/fwget/fwget.sh @@ -38,7 +38,8 @@ Supported subsystems pci Options: - -n -- Do not install package, only print the results + -n -- Do not install packages, only print the results + -q -- Quiet mode. If used with -n only prints a package a line -v -- More verbose EOF exit 1 @@ -75,22 +76,27 @@ addpkg() } DRY_RUN=n +QUIET=n VERBOSE=n -while [ $# -gt 0 ]; do - case $1 in - -n) - DRY_RUN=y - ;; - -v) - VERBOSE=y - ;; - *) - subsystems="${subsystems} $1" - ;; +while getopts ":nqv" _arg; do + case ${_arg} in + n) + DRY_RUN=y + ;; + q) + QUIET=y + ;; + v) + VERBOSE=y + ;; + ?) + usage + ;; esac - shift done +shift $(($OPTIND - 1)) +subsystems="$@" # Default searching PCI subsystem if [ -z "${subsystems}" ]; then @@ -112,13 +118,25 @@ done case "${packages}" in ""|^[[:space:]]*$) - echo "No firmware packages to install." + if [ "${QUIET}" != "y" ]; then + echo "No firmware packages to install." + fi exit 0 ;; esac -echo "Needed firmware packages: '${packages}'" +if [ "${QUIET}" != "y" ]; then + echo "Needed firmware packages: '${packages}'" +fi if [ "${DRY_RUN}" = "y" ]; then + if [ "${QUIET}" = "y" ]; then + for pkg in ${packages}; do + case "${pkg}" in + ""|^[[:space:]]*$) continue ;; + esac + echo "${pkg}" + done + fi exit 0 fi From nobody Thu Nov 14 01:53:54 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xpjqk68Yqz5ctD6; Thu, 14 Nov 2024 01:53:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xpjqk3ZMpz44WJ; Thu, 14 Nov 2024 01:53:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731549234; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vxtihlPNRgopHKGEcO2C6VU6A13g9yeF99uV46n42wM=; b=a3aGxV9oMI4Jd3bouR54jf1k6TO/dCv+HHRJ9v579ZgsxnvXEAkVrB85MozzDTRd7qrYVh S63Kn+VhjWkYWQ4qm5DHVsZEWUOTXKTY7/CeDQzqoJ8alpgVo5uYNTBYJR6cLoPWyEbtap oUMcYWDMlN1XyJIVSsMMdxxpzVHK8qNLlb85tEPjv3ReNMgXIY/P2+AbWLhcB1d6MYzNV1 v2NeydTTOk2ffOD3eFxup1re6iY+Lgpbg/aQPV0eM1hSOnUJaLr2yYg8RmP7nN5zK91VoB eGEzwTAiPdGy5TPSBOMHwkBbQ86cHHal29igQjd+tNdziVfuySsJtTWyZQpzyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731549234; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vxtihlPNRgopHKGEcO2C6VU6A13g9yeF99uV46n42wM=; b=NE195twrYE8MBMIWOaigtbAkAIClDPOPSvti6efXCTNnZDczMK4wYNK0/YOvkrXd+SB0vm ECTMa4JVC4o+4E7qbyg4WOimtJAqSIgtvP2l9U9kObFBCOa9+Ac1qnWkDAgIAyS1DNK06a rdND/asOAdDr6nsW3IgULm2C6Vj/3bz33oGPC93hqLeqb47uKMO7tjNlYK7Tt04NLu3rWU pJYNzKf9mda+D9HcTBlFUZ6C9IGugvJJaRDhya7gCOTZ7QXuWMQqdZqI7wkpGzXyyXfnNG C0fb146v72UkjfB7brjcDNQPhMbSTXD5Z+2oRiKxJl1SjfmuMY4ICzvMzBt4WA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731549234; a=rsa-sha256; cv=none; b=EKpgvurMiXSp9nIvTatDscgODI5ym33jPf5EaojPgSN2+6uVvIWq5uHEnJ39qE4KYKK6BZ pMXaVHS+Bdc24et3siESgMDQK6ONCKs9T7N9Kl+YPf9cA7UHrHEwlrfOQYSYI2qOEVxSCp NeeQv8zKi/cbWDgMF/aFdGPhQLpQkyjyGHju2AxzDsFHnT1ZJ56VXous4Ri6Xm2wF2pP9C d66AKHxeFlX88wHUdJxjVmDiu4QeXhc6j7qs2nyfq7f0bnfR2VxE7i+mwgmzynPpQgsfsY +hWHysiaQEUrrZ6Jm801rNY5BGSm1kPeBgb8bh8YvKgkLGhu5wZWwIfjPwi/Cg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xpjqk3BMMzK6k; Thu, 14 Nov 2024 01:53:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AE1rsX4055134; Thu, 14 Nov 2024 01:53:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AE1rsKt055131; Thu, 14 Nov 2024 01:53:54 GMT (envelope-from git) Date: Thu, 14 Nov 2024 01:53:54 GMT Message-Id: <202411140153.4AE1rsKt055131@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 6c140ba1266b - stable/14 - man4: wifi manuals: revise .Sh HARDWARE + polish some List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6c140ba1266b7957e1c2861e6ce41d9b88381f8a Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=6c140ba1266b7957e1c2861e6ce41d9b88381f8a commit 6c140ba1266b7957e1c2861e6ce41d9b88381f8a Author: Alexander Ziaee AuthorDate: 2024-11-10 19:28:22 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-11-14 01:53:11 +0000 man4: wifi manuals: revise .Sh HARDWARE + polish some The Release Hardware Notes are generated from hardware sections in the manual pages. Create or organize these sections in Wi-Fi driver manuals for information flow, and perform minor maintenance on them while here. After some testing, we have determined that a compact column list is the best for a single column listing in the hardware release notes. This makes very clean subsections and is for some reason denser than using a tagged list. This adds the long requested conversion from netmask to cidr examples. These examples probably shouldn't even be here, but that is a discussion for another day. X-MFC with: 8f1a2d507e25e77d20a5 Reported by: bz (relnotes generation, cidr, test-net-1 ip4addr) Reported by: grahamperrin (HARDWARE order mentioned in fdp-primer) Reported by: Graham Percival (don't prompt) Reviewed by: bz (anything wrong likely is my polishing fault; incl. iwm.4) Differential Revision: https://reviews.freebsd.org/D47508 (cherry picked from commit 8f1a2d507e25e77d20a5d7675dc8eee9b83d3570) (cherry picked from commit 93b30f1b6caec5083efacf3fb5049b72e75cc09e) --- share/man/man4/ipw.4 | 39 +++++---- share/man/man4/iwi.4 | 47 +++++++---- share/man/man4/iwlwifi.4 | 67 ++++++++++----- share/man/man4/iwm.4 | 96 ++++++++++++--------- share/man/man4/mt7915.4 | 38 ++++++--- share/man/man4/mt7921.4 | 38 ++++++--- share/man/man4/otus.4 | 94 +++++++++++++-------- share/man/man4/ral.4 | 27 +++--- share/man/man4/rsu.4 | 83 ++++++++++-------- share/man/man4/rtw88.4 | 60 +++++++------ share/man/man4/rtw89.4 | 63 ++++++++------ share/man/man4/rtwn.4 | 104 ++++++++++++++--------- share/man/man4/rtwn_pci.4 | 26 ++++-- share/man/man4/rtwn_usb.4 | 21 +++-- share/man/man4/rum.4 | 23 ++--- share/man/man4/run.4 | 211 ++++++++++++++++++++++++++++++---------------- share/man/man4/ural.4 | 30 ++++--- share/man/man4/urtw.4 | 44 +++++----- share/man/man4/zyd.4 | 147 +++++++++++++++++++++----------- 19 files changed, 777 insertions(+), 481 deletions(-) diff --git a/share/man/man4/ipw.4 b/share/man/man4/ipw.4 index c1010b798290..0ebee0f1e6eb 100644 --- a/share/man/man4/ipw.4 +++ b/share/man/man4/ipw.4 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2004-2006 .\" Damien Bergamini . All rights reserved. .\" @@ -23,12 +26,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 15, 2015 +.Dd November 10, 2024 .Dt IPW 4 .Os .Sh NAME .Nm ipw -.Nd "Intel PRO/Wireless 2100 IEEE 802.11 driver" +.Nd Intel PRO/Wireless 2100 IEEE 802.11a/b driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -57,19 +60,14 @@ legal.intel_ipw.license_ack=1 .Sh DESCRIPTION The .Nm -driver provides support for the -.Tn Intel -PRO/Wireless 2100 MiniPCI network adapter. -.Nm -supports +driver provides support for Intel PRO/Wireless 2100 802.11a/b +wireless network devices in .Cm station , .Cm adhoc , and .Cm monitor mode operation. Only one virtual interface may be configured at any time. -For more information on configuring this device, see -.Xr ifconfig 8 . .Pp This driver requires the firmware built with the .Nm ipwfw @@ -80,28 +78,34 @@ must be agreed by adding the following line to .Xr loader.conf 5 : .Pp .Dl "legal.intel_ipw.license_ack=1" +.Pp +For more information on configuring this device, see +.Xr ifconfig 8 . +.Sh HARDWARE +The +.Nm +driver provides support for the +Intel PRO/Wireless 2100a/b MiniPCI network adapter. .Sh FILES -.Bl -tag -width ".Pa /usr/share/doc/legal/intel_ipw.LICENSE" -compact +.Bl -tag -width "/usr/share/doc/legal/intel_ipw.LICENSE" -compact .It Pa /usr/share/doc/legal/intel_ipw.LICENSE .Nm firmware license .El .Sh EXAMPLES Join an existing BSS network (i.e., connect to an access point): -.Bd -literal -offset indent -ifconfig wlan create wlandev ipw0 inet 192.168.0.20 \e - netmask 0xffffff00 -.Ed +.Pp +.Dl ifconfig wlan create wlandev ipw0 inet 192.0.2.20/24 .Pp Join a specific BSS network with network name -.Dq Li my_net : +.Ar my_net : .Pp -.Dl "ifconfig wlan create wlandev ipw0 ssid my_net up" +.Dl ifconfig wlan create wlandev ipw0 ssid my_net up .Pp Join a specific BSS network with 64-bit WEP encryption: .Bd -literal -offset indent ifconfig wlan create wlandev ipw0 ssid my_net \e - wepmode on wepkey 0x1234567890 weptxkey 1 up + wepmode on wepkey 0x1234567890 weptxkey 1 up .Ed .Pp Join a specific BSS network with 128-bit WEP encryption: @@ -144,6 +148,7 @@ This should not happen. .Xr wlan_ccmp 4 , .Xr wlan_tkip 4 , .Xr wlan_wep 4 , +.Xr networking 7 , .Xr ifconfig 8 , .Xr wpa_supplicant 8 .Sh AUTHORS diff --git a/share/man/man4/iwi.4 b/share/man/man4/iwi.4 index 9de9b3e6c490..31ef4ec83d32 100644 --- a/share/man/man4/iwi.4 +++ b/share/man/man4/iwi.4 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2004-2006 .\" Damien Bergamini . All rights reserved. .\" @@ -23,12 +26,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 15, 2015 +.Dd November 10, 2024 .Dt IWI 4 .Os .Sh NAME .Nm iwi -.Nd "Intel PRO/Wireless 2200BG/2225BG/2915ABG IEEE 802.11 driver" +.Nd Intel PRO/Wireless 2200BG/2225BG/2915ABG IEEE 802.11 network driver .Sh SYNOPSIS To compile this driver into the kernel, include the following lines in your @@ -57,19 +60,14 @@ legal.intel_iwi.license_ack=1 .Sh DESCRIPTION The .Nm -driver provides support for -.Tn Intel -PRO/Wireless 2200BG/2915ABG MiniPCI and 2225BG PCI network adapters. -.Nm -supports +driver provides support for Intel PRO/Wireless 2200BG/2225BG/2915ABG +IEEE 802.11a/b/g wireless network devices in .Cm station , .Cm adhoc , and .Cm monitor mode operation. Only one virtual interface may be configured at any time. -For more information on configuring this device, see -.Xr ifconfig 8 . .Pp This driver requires the firmware built with the .Nm iwifw @@ -80,28 +78,42 @@ must be agreed by adding the following line to .Xr loader.conf 5 : .Pp .Dl "legal.intel_iwi.license_ack=1" +.Pp +For more information on configuring this device, see +.Xr ifconfig 8 . +.Sh HARDWARE +The +.Nm +driver supports the following wireless network devices: +.Pp +.Bl -bullet -compact +.It +Intel PRO/Wireless 2200BG MiniPCI Network Connection +.It +Intel PRO/Wireless 2225BG PCI Network Connection +.It +Intel PRO/Wireless 2915ABG MiniPCI Network Connection +.El .Sh FILES -.Bl -tag -width ".Pa /usr/share/doc/legal/intel_iwi.LICENSE" -compact +.Bl -tag -width "/usr/share/doc/legal/intel_iwi.LICENSE" -compact .It Pa /usr/share/doc/legal/intel_iwi.LICENSE .Nm firmware license .El .Sh EXAMPLES Join an existing BSS network (i.e., connect to an access point): -.Bd -literal -offset indent -ifconfig wlan create wlandev iwi0 inet 192.168.0.20 \e - netmask 0xffffff00 -.Ed +.Pp +.Dl ifconfig wlan create wlandev iwi0 inet 192.0.2.20/24 .Pp Join a specific BSS network with network name -.Dq Li my_net : +.Ar my_net : .Pp -.Dl "ifconfig wlan create wlandev iwi0 ssid my_net up" +.Dl ifconfig wlan create wlandev iwi0 ssid my_net up .Pp Join a specific BSS network with 64-bit WEP encryption: .Bd -literal -offset indent ifconfig wlan create wlandev iwi0 ssid my_net \e - wepmode on wepkey 0x1234567890 weptxkey 1 up + wepmode on wepkey 0x1234567890 weptxkey 1 up .Ed .Pp Join a specific BSS network with 128-bit WEP encryption: @@ -149,6 +161,7 @@ This should not happen. .Xr wlan_ccmp 4 , .Xr wlan_tkip 4 , .Xr wlan_wep 4 , +.Xr networking 7 , .Xr ifconfig 8 , .Xr wpa_supplicant 8 .Sh AUTHORS diff --git a/share/man/man4/iwlwifi.4 b/share/man/man4/iwlwifi.4 index ddeeb549d0f4..b4dce91f1ee4 100644 --- a/share/man/man4/iwlwifi.4 +++ b/share/man/man4/iwlwifi.4 @@ -1,4 +1,6 @@ .\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2021-2024 The FreeBSD Foundation .\" .\" This documentation was written by Bj\xc3\xb6rn Zeeb under sponsorship from @@ -25,7 +27,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 30, 2024 +.Dd November 10, 2024 .Dt IWLWIFI 4 .Os .Sh NAME @@ -54,11 +56,11 @@ It is discouraged to load the driver from .Sh DESCRIPTION The .Nm -driver is derived from Intel's Linux iwlwifi driver +driver provides support for Intel Wireless network devices. .Pp .Nm -will be a successor to -.Xr iwm 4 +is derived from Intel's Linux iwlwifi driver, will be a successor to +.Xr iwm 4 , and may supersede that driver in the future. It still complements the .Xr iwn 4 @@ -66,33 +68,51 @@ driver which supports older chipsets. .Pp The driver uses the .\" No LinuxKPI man pages so no .Xr here. -.Em linuxkpi_wlan +.Sy linuxkpi_wlan and -.Em linuxkpi +.Sy linuxkpi compat framework to bridge between the Linux and native .Fx driver code as well as to the native .Xr net80211 4 wireless stack. -.Pp -While -.Nm -supports all 802.11 a/b/g/n/ac/ax -the compatibility code currently only supports 802.11 a/b/g modes. -Support for 802.11 n/ac is to come. 802.11ax and 6Ghz support are planned. .Sh HARDWARE The .Nm driver supports PCIe devices from the -.Em mvm -sub-driver with the following chipsets: +.Sy mvm +sub-driver with the following chipset generations: .Pp +.\" awk -F\\t '{ print $5 }' ~/tmp/iwlwifi_pci_ids_name.txt | \ +.\" grep -v undefined | sort -V | uniq | grep -v ^$ | \ +.\" awk '{ printf ".It\n%s\n", $0 }' .Bl -bullet -compact -.\" --------------------------------------------------------------------- +.It +7000 +.It +8000 +.It +9000 +.It +22000 +.It +AX210 +.It +BZ +.It +SC +.El +.Pp +These chipset generations match the following common device names: +.Pp +.Bl -bullet -compact +.\" -------------------------------------------------------------------- .\" This list is manually generated from a sysctl and post-processing. .\" Edits will be overwritten on next update. -.\" --------------------------------------------------------------------- +.\" awk -F\\t '{ if ($2 == "") { next; } if (seen[$2]) { next; } \ +.\" seen[$2]=1; printf ".It\n%s\n", $2; }' iwlwifi_pci_ids_name.txt +.\" -------------------------------------------------------------------- .It Intel(R) Dual Band Wireless AC 7260 .It @@ -209,15 +229,15 @@ Intel(R) TBD Bz device Intel(R) Wi-Fi 6 AX204 160MHz .It Intel(R) TBD Sc device -.\" --------------------------------------------------------------------- +.\" -------------------------------------------------------------------- .El -.Sh BUGS -Certainly. .Sh SEE ALSO .Xr iwlwififw 4 , .Xr iwm 4 , .Xr iwn 4 , .Xr wlan 4 , +.Xr networking 7 , +.Xr fwget 8 , .Xr ifconfig 8 , .Xr wpa_supplicant 8 .Sh HISTORY @@ -225,3 +245,12 @@ The .Nm driver first appeared in .Fx 13.1 . +.Sh BUGS +Certainly. +.Pp +While +.Nm +supports 802.11a/b/g/n/ac/ax modes, +the compatibility code currently only supports 802.11a/b/g modes. +Support for 802.11n/ac/ax is yet to come. +802.11ax and 6Ghz support are planned. diff --git a/share/man/man4/iwm.4 b/share/man/man4/iwm.4 index b810f7016e54..5249959cd3f6 100644 --- a/share/man/man4/iwm.4 +++ b/share/man/man4/iwm.4 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2004-2006 .\" Damien Bergamini . All rights reserved. .\" @@ -23,7 +26,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd February 20, 2024 +.Dd November 10, 2024 .Dt IWM 4 .Os .Sh NAME @@ -31,8 +34,7 @@ .Nd Intel IEEE 802.11ac wireless network driver .Sh SYNOPSIS To compile this driver into the kernel, -include the following lines in your -kernel configuration file: +include the following lines in your kernel configuration file: .Bd -ragged -offset indent .Cd "device iwm" .Cd "device pci" @@ -79,55 +81,59 @@ iwm9260fw_load="YES" .Sh DESCRIPTION The .Nm -driver provides support for: -.Pp -.Bl -tag -width Ds -offset indent -compact -.It Intel Dual Band Wireless AC 3160 -.It Intel Dual Band Wireless AC 3165 -.It Intel Dual Band Wireless AC 3168 -.It Intel Dual Band Wireless AC 7260 -.It Intel Dual Band Wireless AC 7265 -.It Intel Dual Band Wireless AC 8260 -.It Intel Dual Band Wireless AC 8265 -.It Intel Dual Band Wireless AC 9260 -.It Intel Dual Band Wireless AC 9270 -.It Intel Dual Band Wireless AC 946X -.It Intel Dual Band Wireless AC 9560 -.El -.Pp -.Nm -supports +driver supports running most Intel Wireless AC series network devices in .Cm station mode operation. Only one virtual interface may be configured at any time. -For more information on configuring this device, see -.Xr ifconfig 8 . -.Pp This driver requires the firmware built with the -.Nm iwmfw +.Xr iwmfw 4 module to work. .Pp -Currently, +For more information on configuring this device, see +.Xr ifconfig 8 . +.Sh HARDWARE +The .Nm -only supports 802.11b and 802.11g modes. -It will not associate to access points that are configured to operate only -in 802.11n or 802.11ac modes. +driver supports the following PCIe Wi-Fi devices: +.Pp +.Bl -bullet -compact +.It +Intel Dual Band Wireless AC 3160 +.It +Intel Dual Band Wireless AC 3165 +.It +Intel Dual Band Wireless AC 3168 +.It +Intel Dual Band Wireless AC 7260 +.It +Intel Dual Band Wireless AC 7265 +.It +Intel Dual Band Wireless AC 8260 +.It +Intel Dual Band Wireless AC 8265 +.It +Intel Dual Band Wireless AC 9260 +.It +Intel Dual Band Wireless AC 9270 +.It +Intel Dual Band Wireless AC 946X +.It +Intel Dual Band Wireless AC 9560 +.El .Sh EXAMPLES Join an existing BSS network (i.e., connect to an access point): -.Bd -literal -offset indent -ifconfig wlan create wlandev iwm0 inet 192.168.0.20 \e - netmask 0xffffff00 -.Ed +.Pp +.Dl ifconfig wlan create wlandev iwm0 inet 192.0.2.20/24 .Pp Join a specific BSS network with network name -.Dq Li my_net : +.Ar my_net : .Pp -.Dl "ifconfig wlan create wlandev iwm0 ssid my_net up" +.Dl ifconfig wlan create wlandev iwm0 ssid my_net up .Pp Join a specific BSS network with 64-bit WEP encryption: .Bd -literal -offset indent ifconfig wlan create wlandev iwm0 ssid my_net \e - wepmode on wepkey 0x1234567890 weptxkey 1 up + wepmode on wepkey 0x1234567890 weptxkey 1 up .Ed .Pp Join a specific BSS network with 128-bit WEP encryption: @@ -155,15 +161,16 @@ Verify the .Xr iwmfw 4 firmware module is present. .It "iwm%d: could not load boot firmware" -An attempt to upload the boot firmware image to the onboard microcontroller -failed. +An attempt to upload the boot firmware image +to the onboard microcontroller failed. This should not happen. .It "iwm%d: could not load microcode" -An attempt to upload the microcode image to the onboard microcontroller failed. +An attempt to upload the microcode image +to the onboard microcontroller failed. This should not happen. .It "iwm%d: could not load main firmware" -An attempt to upload the main firmware image to the onboard microcontroller -failed. +An attempt to upload the main firmware image +to the onboard microcontroller failed. This should not happen. .El .Sh SEE ALSO @@ -174,5 +181,12 @@ This should not happen. .Xr wlan_ccmp 4 , .Xr wlan_tkip 4 , .Xr wlan_wep 4 , +.Xr networking 7 , .Xr ifconfig 8 , .Xr wpa_supplicant 8 +.Sh BUGS +Currently, +.Nm +only supports 802.11a/b/g modes. +It will not associate to access points that are configured to operate +only in 802.11n/ac modes. diff --git a/share/man/man4/mt7915.4 b/share/man/man4/mt7915.4 index eece142c11a5..ba67a77af735 100644 --- a/share/man/man4/mt7915.4 +++ b/share/man/man4/mt7915.4 @@ -1,4 +1,6 @@ .\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2023-2024 Bjoern A. Zeeb .\" .\" Redistribution and use in source and binary forms, with or without @@ -22,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 30, 2024 +.Dd November 10, 2024 .Dt MT7915 4 .Os .Sh NAME @@ -50,7 +52,9 @@ It is discouraged to load the driver from .Sh DESCRIPTION The .Nm -driver is derived from MediaTek's Linux mt76 driver. +driver provides support for MediaTek MT7915E wireless network devices. +.Nm +is derived from MediaTek's Linux mt76 driver. .Pp This driver requires firmware to be loaded before it will work. The package @@ -62,36 +66,34 @@ Otherwise no .Xr wlan 4 interface can be created using .Xr ifconfig 8 . +One can use +.Xr fwget 8 +to install the correct firmware package. .Pp The driver uses the .\" No LinuxKPI man pages so no .Xr here. -.Em linuxkpi_wlan +.Sy linuxkpi_wlan and -.Em linuxkpi +.Sy linuxkpi compat framework to bridge between the Linux and native .Fx driver code as well as to the native .Xr net80211 4 wireless stack. -.Pp -While -.Nm -supports all 802.11 a/b/g/n/ac and ax -the compatibility code currently only supports 802.11 a/b/g modes. -Support for 802.11 n/ac is to come. .Sh HARDWARE The .Nm driver supports PCIe devices with the following chipsets: .Pp -.Bl -tag -width Ds -offset indent -compact -.It MediaTek MT7915E +.Bl -bullet -offset indent -compact +.It +MediaTek MT7915E .El -.Sh BUGS -Certainly. .Sh SEE ALSO .Xr wlan 4 , +.Xr networking 7 , +.Xr fwget 8 , .Xr ifconfig 8 , .Xr wpa_supplicant 8 .Sh HISTORY @@ -99,3 +101,11 @@ The .Nm driver first appeared in .Fx 14.0 . +.Sh BUGS +Certainly. +.Pp +While +.Nm +supports 802.11a/b/g/n/ac/ax modes, +the compatibility code currently only supports 802.11a/b/g modes. +Support for 802.11n/ac/ax is yet to come. diff --git a/share/man/man4/mt7921.4 b/share/man/man4/mt7921.4 index d28dc520de6b..fe9efa77e35d 100644 --- a/share/man/man4/mt7921.4 +++ b/share/man/man4/mt7921.4 @@ -1,4 +1,6 @@ .\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2023-2024 Bjoern A. Zeeb .\" .\" Redistribution and use in source and binary forms, with or without @@ -22,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 30, 2024 +.Dd November 10, 2024 .Dt MT7921 4 .Os .Sh NAME @@ -50,7 +52,9 @@ It is discouraged to load the driver from .Sh DESCRIPTION The .Nm -driver is derived from MediaTek's Linux mt76 driver. +driver provides support for MediaTek MT7921E wireless network devices. +.Nm +is derived from MediaTek's Linux mt76 driver. .Pp This driver requires firmware to be loaded before it will work. The package @@ -62,36 +66,34 @@ Otherwise no .Xr wlan 4 interface can be created using .Xr ifconfig 8 . +One can use +.Xr fwget 8 +to install the correct firmware package. .Pp The driver uses the .\" No LinuxKPI man pages so no .Xr here. -.Em linuxkpi_wlan +.Sy linuxkpi_wlan and -.Em linuxkpi +.Sy linuxkpi compat framework to bridge between the Linux and native .Fx driver code as well as to the native .Xr net80211 4 wireless stack. -.Pp -While -.Nm -supports all 802.11 a/b/g/n/ac and ax -the compatibility code currently only supports 802.11 a/b/g modes. -Support for 802.11 n/ac is to come. .Sh HARDWARE The .Nm driver supports PCIe devices with the following chipsets: .Pp -.Bl -tag -width Ds -offset indent -compact -.It MediaTek MT7921E +.Bl -bullet -offset indent -compact +.It +MediaTek MT7921E .El -.Sh BUGS -Certainly. .Sh SEE ALSO .Xr wlan 4 , +.Xr networking 7 , +.Xr fwget 8 , .Xr ifconfig 8 , .Xr wpa_supplicant 8 .Sh HISTORY @@ -99,3 +101,11 @@ The .Nm driver first appeared in .Fx 14.0 . +.Sh BUGS +Certainly. +.Pp +While +.Nm +supports 802.11a/b/g/n/ac/ax modes, +the compatibility code currently only supports 802.11a/b/g modes. +Support for 802.11n/ac/ax is to come. diff --git a/share/man/man4/otus.4 b/share/man/man4/otus.4 index 1e2d1e0a402f..06f73bfe3338 100644 --- a/share/man/man4/otus.4 +++ b/share/man/man4/otus.4 @@ -1,3 +1,5 @@ +.\"- +.\" SPDX-License-Identifier: ISC .\" .\" Copyright (c) 2015 Adrian Chadd .\" @@ -13,12 +15,12 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd September 25, 2015 +.Dd November 10, 2024 .Dt OTUS 4 .Os .Sh NAME .Nm otus -.Nd Atheros AR9170 USB IEEE 802.11a/b/g/n wireless network device +.Nd Atheros AR9170 USB IEEE 802.11a/b/g/n wireless network driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your kernel configuration file: @@ -79,6 +81,51 @@ The .Nm driver can be configured at runtime with .Xr ifconfig 8 . +.Sh HARDWARE +The +.Nm +driver provides support for Atheros AR9170 USB IEEE 802.11b/g/n +wireless network adapters, including: +.Pp +.Bl -bullet -offset indent -compact +.It +3Com 3CRUSBN275 +.It +Arcadyan WN7512 +.\" .It AVM FRITZ!WLAN USB Stick N +.It +CACE AirPcap \&Nx +.It +D-Link DWA-130 rev \&D1 +.It +D-Link DWA-160 rev A1 +.It +D-Link DWA-160 rev A2 +.It +IO-Data WN-GDN/US2 +.It +NEC Aterm WL300NU-G +.It +Netgear WNDA3100 +.It +Netgear WN111 v2 +.It +Planex GW-US300 +.It +SMC Networks SMCWUSB-N2 +.It +TP-Link TL-WN821N v1, v2 +.It +Ubiquiti SR71 USB +.It +Unex DNUA-81 +.It +Z-Com UB81 +.It +Z-Com UB82 +.It +ZyXEL NWD-271N +.El .Sh FILES The driver needs at least version 1.0 of the following firmware files, which is loaded when an interface is attached: @@ -87,49 +134,20 @@ which is loaded when an interface is attached: .It Pa /boot/kernel/otusfw-init.ko .It Pa /boot/kernel/otusfw-main.ko .El -.Sh HARDWARE -The -.Nm -driver provices support for Atheros AR9170 USB IEEE 802.11b/g/n -wireless network adapters, including: -.Pp -.Bl -tag -width Ds -offset indent -compact -.It 3Com 3CRUSBN275 -.It Arcadyan WN7512 -.\" .It AVM FRITZ!WLAN USB Stick N -.It CACE AirPcap \&Nx -.It D-Link DWA-130 rev \&D1 -.It D-Link DWA-160 rev A1 -.It D-Link DWA-160 rev A2 -.It IO-Data WN-GDN/US2 -.It NEC Aterm WL300NU-G -.It Netgear WNDA3100 -.It Netgear WN111 v2 -.It Planex GW-US300 -.It SMC Networks SMCWUSB-N2 -.It TP-Link TL-WN821N v1, v2 -.It Ubiquiti SR71 USB -.It Unex DNUA-81 -.It Z-Com UB81 -.It Z-Com UB82 -.It ZyXEL NWD-271N -.El .Sh EXAMPLES Join an existing BSS network (i.e., connect to an access point): -.Bd -literal -offset indent -ifconfig wlan create wlandev otus0 inet 192.168.0.20 \e - netmask 0xffffff00 -.Ed +.Pp +.Dl ifconfig wlan create wlandev otus0 inet 192.0.2.20/24 .Pp Join a specific BSS network with network name -.Dq Li my_net : +.Ar my_net : .Pp -.Dl "ifconfig wlan create wlandev otus0 ssid my_net up" +.Dl ifconfig wlan create wlandev otus0 ssid my_net up .Pp Join a specific BSS network with 64-bit WEP encryption: .Bd -literal -offset indent ifconfig wlan create wlandev otus0 ssid my_net \e - wepmode on wepkey 0x1234567890 weptxkey 1 up + wepmode on wepkey 0x1234567890 weptxkey 1 up .Ed .Sh DIAGNOSTICS .Bl -diag @@ -152,7 +170,9 @@ The file might be missing or corrupted. The .Nm driver first appeared in -.Ox 4.6 . +.Ox 4.6 +and +.Fx 11 . .Sh AUTHORS .An -nosplit The diff --git a/share/man/man4/ral.4 b/share/man/man4/ral.4 index dbdc017dc33a..ad385e5f09d6 100644 --- a/share/man/man4/ral.4 +++ b/share/man/man4/ral.4 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: ISC +.\" .\" Copyright (c) 2005-2010 Damien Bergamini .\" .\" Permission to use, copy, modify, and distribute this software for any @@ -12,12 +15,12 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd April 4, 2017 +.Dd November 10, 2024 .Dt RAL 4 .Os .Sh NAME .Nm ral -.Nd "Ralink Technology IEEE 802.11a/g/n wireless network device" +.Nd Ralink Technology IEEE 802.11a/g/n wireless network driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -119,7 +122,7 @@ The driver supports PCI/PCIe/CardBus wireless adapters based on Ralink Technology chipsets, including: .Pp -.Bl -column -compact ".Li Atlantis Land A02-PCM-W54" "RT2561S" "CardBus" +.Bl -column -offset indent -compact "Atlantis Land A02-PCM-W54" "RT2561S" "CardBus" .It Em Card Ta Em MAC/BBP Ta Em Bus .It "A-Link WL54H" Ta RT2560 Ta PCI .It "A-Link WL54PC" Ta RT2560 Ta CardBus @@ -212,26 +215,25 @@ chipsets, including: .Sh EXAMPLES Join an existing BSS network (i.e., connect to an access point): .Pp -.Dl "ifconfig wlan create wlandev ral0 inet 192.168.0.20 netmask 0xffffff00" +.Dl ifconfig wlan create wlandev ral0 inet 192.0.2.20/24 .Pp Join a specific BSS network with network name -.Dq Li my_net : +.Ar my_net : .Bd -literal -offset indent -ifconfig wlan create wlandev ral0 inet 192.168.0.20 \e - netmask 0xffffff00 ssid my_net +ifconfig wlan create wlandev ral0 inet 192.0.2.20/24 \e + ssid my_net .Ed .Pp Join a specific BSS network with 40-bit WEP encryption: .Bd -literal -offset indent -ifconfig wlan create wlandev ral0 inet 192.168.0.20 \e - netmask 0xffffff00 ssid my_net \e - wepmode on wepkey 0x1234567890 weptxkey 1 +ifconfig wlan create wlandev ral0 inet 192.0.2.20/24 \e + ssid my_net wepmode on wepkey 0x1234567890 weptxkey 1 .Ed .Pp Join a specific BSS network with 104-bit WEP encryption: .Bd -literal -offset indent -ifconfig wlan create wlandev ral0 inet 192.168.0.20 \e - netmask 0xffffff00 ssid my_net \e +ifconfig wlan create wlandev ral0 inet 192.0.2.20/24 \e + ssid my_net \e wepmode on wepkey 0x01020304050607080910111213 weptxkey 1 .Ed .Sh DIAGNOSTICS @@ -254,6 +256,7 @@ This should not happen. .Xr wlan_tkip 4 , .Xr wlan_wep 4 , .Xr wlan_xauth 4 , +.Xr networking 7 , .Xr hostapd 8 , .Xr ifconfig 8 , .Xr wpa_supplicant 8 diff --git a/share/man/man4/rsu.4 b/share/man/man4/rsu.4 index 34cebc598c0a..7aaacb8112a0 100644 --- a/share/man/man4/rsu.4 +++ b/share/man/man4/rsu.4 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: ISC +.\" .\" $OpenBSD: rsu.4,v 1.11 2013/02/14 07:40:42 jmc Exp $ .\" .\" Copyright (c) 2010 Damien Bergamini @@ -14,12 +17,12 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd May 23, 2021 +.Dd November 10, 2024 .Dt RSU 4 .Os .Sh NAME .Nm rsu -.Nd Realtek RTL8188SU/RTL8192SU USB IEEE 802.11b/g/n wireless network device +.Nd Realtek RTL8188SU/RTL8192SU USB IEEE 802.11b/g/n wireless network driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your kernel configuration file: @@ -93,8 +96,46 @@ The .Nm driver can be configured at runtime with .Xr ifconfig 8 . +.Sh HARDWARE +The +.Nm +driver provides support for Realtek RTL8188SU/RTL8192SU USB IEEE 802.11b/g/n *** 1325 LINES SKIPPED *** From nobody Thu Nov 14 01:53:55 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xpjqm0DrBz5ctPN; Thu, 14 Nov 2024 01:53:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xpjql4QYQz44cf; Thu, 14 Nov 2024 01:53:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731549235; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HVY5pcizdpfuxvkEE4kxzKwV8RmITkoJlCZXgfGTwFk=; b=PrMD80moFbc5oUV2BKd+rcUqVcsO0HcsxJKkWI4dKgZm/dpxPOixzUSMrAIJ/Tx34SjHm2 Y6Kf1EJvadlEH45BAWBisKWv6NRGE3wIcKZnIbOjpOkcbS/ZU1eP7AMl2vgN213X8sSwhp FAXmrF02W0NHCbMC77iHLbaoh1/b8JkIapOwDGENtKWrV2nZgdl53hL8zpTKc40vzKYrEm syfHqX6FVc0CRwAjadyL83ESv7mUXfwcyWjWCi7hJQr4NAgoeY3eCW3MnkMrfFzUib9mUR 3i5ltOkD0Qgz866hi9ZkY5CcqwHQNUwLeZzbiMsRTTHwbqDzUX+gBDs0UUPvrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731549235; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HVY5pcizdpfuxvkEE4kxzKwV8RmITkoJlCZXgfGTwFk=; b=k+TFmRMB3dJALk5WSjkTNMR/gFBBCO3GUVdEAoGnxzmWC4vTJl2rcyWTdA8xzgxA+g2D6L /SVxp6+vqaleqa02zKyxiPJ+3eOww5QMFkNfxCfCY3gNZzwQy67jijnHdkw31I3iJbNtl4 o92Ef77urj5EXGDYNq/lNqNhb/JpLiu3uxf4SPeO9ohI/w8GcVNWIqwi74e2NnzWDBtfMj 1GIxPeCPPcj4mYJu1ei2wuGo1fCLCkkfcF/sC1Jolzpj0aiM8y8qdQ/H36k9mPPLWo97KS P7f9amlKEcla0PNycOcnYlOU9nwRBalb1xnlCe3Lr97JxGWJrY+oRBVou/tRtw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731549235; a=rsa-sha256; cv=none; b=gk9cgLdjKwLalqVbGZCpX0VN6eif55Y4z30V3OpDZ7AV/JnRpp/d9QVQAge2M8K6LrpUoX v8ignjAlFdtAVhBRpvQZM1pnxO5ucELO9DNZ9NEfeQXKSYzevm6ParwPaV6nB80u5qEYbJ VtP40s4MJW4DW+WwzGrmHMe+s/o6tcIqALYHpDdEmTn4/2hxeRLX34MiMfSBcV2xvlnW2H 94yPO3uj89F/rS5Dk07/DF8DX5bqqW2jKd4mv+h1p8RSo93bs35mHmL+bNUg6cJGhI+d5S Ub1YhHZWdqCqPhh89wEmpwJmY8jo7792sb/nY7lVV2m+DmT7GomWj1KlBD/IjA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xpjql3yM1zK01; Thu, 14 Nov 2024 01:53:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AE1rtPZ055194; Thu, 14 Nov 2024 01:53:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AE1rtvX055191; Thu, 14 Nov 2024 01:53:55 GMT (envelope-from git) Date: Thu, 14 Nov 2024 01:53:55 GMT Message-Id: <202411140153.4AE1rtvX055191@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 8d9b4e219f5a - stable/14 - LinuxKPI: 802.11: improve lladdr change to not use ifnet internals List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8d9b4e219f5ac1b0f4f7fb646472c162b0c9af00 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=8d9b4e219f5ac1b0f4f7fb646472c162b0c9af00 commit 8d9b4e219f5ac1b0f4f7fb646472c162b0c9af00 Author: Bjoern A. Zeeb AuthorDate: 2024-11-08 21:24:00 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-11-14 01:53:12 +0000 LinuxKPI: 802.11: improve lladdr change to not use ifnet internals The changes from 4aff4048 were based on net80211 which is still using if_private.h details. Adjust the code to no longer depend on internal details of ifnet. We also switch the "check"-functionn from if_init to if_transmit which we can query. Given we do have a per-vif eventhandler we could do without that check but would still need to check if_getflags() for IFF_UP. Sponsored by: The FreeBSD Foundation Reported by: jhibbits Fixes: 4aff4048 Reviewed by: jhibbits Differential Revision: https://reviews.freebsd.org/D47490 (cherry picked from commit edab5a280e0b4a53d0f3e34957075c7efe048e8d) --- sys/compat/linuxkpi/common/src/linux_80211.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index c26eb8740c77..b0ad1dee4784 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -2764,6 +2764,10 @@ lkpi_ic_wme_update(struct ieee80211com *ic) * we do use a per-[l]vif event handler to be sure we exist as we * cannot assume that from every vap derives a vif and we have a hard * time checking based on net80211 information. + * Should this ever become a real problem we could add a callback function + * to wlan_iflladdr() to be set optionally but that would be for a + * single-consumer (or needs a list) -- was just too complicated for an + * otherwise perfect mechanism FreeBSD already provides. */ static void lkpi_vif_iflladdr(void *arg, struct ifnet *ifp) @@ -2772,8 +2776,9 @@ lkpi_vif_iflladdr(void *arg, struct ifnet *ifp) struct ieee80211_vif *vif; NET_EPOCH_ENTER(et); - /* NB: identify vap's by if_init; left as an extra check. */ - if (ifp->if_init != ieee80211_init || (ifp->if_flags & IFF_UP) != 0) { + /* NB: identify vap's by if_transmit; left as an extra check. */ + if (if_gettransmitfn(ifp) != ieee80211_vap_transmit || + (if_getflags(ifp) & IFF_UP) != 0) { NET_EPOCH_EXIT(et); return; } From nobody Thu Nov 14 01:53:57 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xpjqp1GSzz5ctD8; Thu, 14 Nov 2024 01:53:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xpjqn6r8Gz44Ws; Thu, 14 Nov 2024 01:53:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731549238; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Pv2LqtJ2QRPEBcTEofnbrehyN4x2K4SIFwjR1HREI38=; b=N4L/YhVdrYhWO3wy6xGftVlxHRl1w3DKCZNR+vrBbFUXE5zI8rIEHYZEpKOqNdk9UO/uoz 8SRDYcWOpm/GZM51w7AhwBj6MZ9LC0izO+BQ32DRw7ttZzZC8akFbrf8OG0aDraJOf24oG jGwio1J5cCCUC9ITTAdbo6SULjaLLyQlTpHjNaC2U89PvN8orQWdRZxQ6wt5ka/0M+HlKr q1v5Y0LEH55iesJ7fsKQDD8L//6aRcVPzwllHAn5oi/Rp8w8Yqr9V3RC2+Dc11kbN2eAlD Bufx71Haw1ubzHLu7iVfGP5hkieEG+NBO8EyjaB31LjHsAxqZXeb2xOtnHsIaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731549238; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Pv2LqtJ2QRPEBcTEofnbrehyN4x2K4SIFwjR1HREI38=; b=ZK0cFs8Uo4IPTno5GdB6wXUlV+rUnWhUMG7h0/9GGHNYS6hY8HYYN7wLB8UcdkcI+Emvvn uejoFQChrJj8+t2uv+oRJDMkat6RTzHfm4tJgFbpouBtJPcDsnvs+u62Uw5YsLQo/RLkWO uh06pI0FzdflOBL/LSjxQRYgXWW9Qvr2SBHLEnyz1b115FrLOsLOmd9OYiSU7IcnR4Q6fm SGiWwc3KyAybXwCt/Cd/Udl+g5jXCogW/fA7u9DiCqymWbPoDVk3R0RBYpJPTbWOAPEB6l QU5e/QH6PKCcCwy/KsK74xnAZVk7p67GQYjNIkF6rcr1qm3R/+7AiEe/8bmMgw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731549238; a=rsa-sha256; cv=none; b=QK3rfe+vVpdfBwS8+nsHwY9UaWJuJXt25B+XEWf42b3nFHOgWIgAvyEubGqy3Ped2AJnGU Vh+4R/+86NiUSUzJApOGTtrd3zkzc0gsPiO/aic/5QZSGlmmIHMTlfiH9mwP8nd/RkV0Un I0UB1qoHA3GU9GzT752pPOWZm5O0J800i2CVraZJDFvDeOmXNY5scChBawHjO+q3AfH2E5 Slzgih2vvNvQ2MfiS7M41dlQBukCjrpX07Cm1tz35Oo/LncPW+PAh1jVIhjdtR8H2q87J7 uh4E3cfD/XV9EnVaOtK3OQvQE1y6rJiulZfraIAt3MDJJPlXhfj4ZhWIQyBxHg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xpjqn65ckzKK0; Thu, 14 Nov 2024 01:53:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AE1rv9H055311; Thu, 14 Nov 2024 01:53:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AE1rvxJ055308; Thu, 14 Nov 2024 01:53:57 GMT (envelope-from git) Date: Thu, 14 Nov 2024 01:53:57 GMT Message-Id: <202411140153.4AE1rvxJ055308@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: a27b3695d123 - stable/14 - LinuxKPI: 802.11: improvements to (*ampdu_action)() callers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a27b3695d12300bd458e0d9efc0780f095691204 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=a27b3695d12300bd458e0d9efc0780f095691204 commit a27b3695d12300bd458e0d9efc0780f095691204 Author: Bjoern A. Zeeb AuthorDate: 2024-01-27 13:24:27 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-11-14 01:53:12 +0000 LinuxKPI: 802.11: improvements to (*ampdu_action)() callers Annotate lkpi_ic_recv_action(), lkpi_ic_send_action(), and lkpi_ic_ampdu_enable() with HT specifc debug logging as we only hook them up currently for debug tracing but later should not need them anymore. Start the implementation for lkpi_ic_addba_request(), lkpi_ic_addba_response(), and lkpi_ic_addba_stop(). Improve the implementation of lkpi_ic_ampdu_rx_start() and lkpi_ic_ampdu_rx_stop(). Sponsored by: The FreeBSD Foundation (commit) (cherry picked from commit 310743c4ccc545d58401cb9fb7761432e12a9fb5) --- sys/compat/linuxkpi/common/src/linux_80211.c | 206 +++++++++++++++++++++++++-- 1 file changed, 192 insertions(+), 14 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 1a07ef0a82fe..2bb0c2ab113c 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -3992,7 +3992,7 @@ lkpi_ic_recv_action(struct ieee80211_node *ni, const struct ieee80211_frame *wh, ic = ni->ni_ic; lhw = ic->ic_softc; - IMPROVE_HT(); + IMPROVE_HT("recv_action called; nothing to do in lkpi; make debugging"); return (lhw->ic_recv_action(ni, wh, frm, efrm)); } @@ -4006,7 +4006,7 @@ lkpi_ic_send_action(struct ieee80211_node *ni, int category, int action, void *s ic = ni->ni_ic; lhw = ic->ic_softc; - IMPROVE_HT(); + IMPROVE_HT("send_action called; nothing to do in lkpi; make debugging"); return (lhw->ic_send_action(ni, category, action, sa)); } @@ -4021,52 +4021,207 @@ lkpi_ic_ampdu_enable(struct ieee80211_node *ni, struct ieee80211_tx_ampdu *tap) ic = ni->ni_ic; lhw = ic->ic_softc; - IMPROVE_HT(); + IMPROVE_HT("ieee80211_ampdu_enable called; nothing to do in lkpi for now; make debugging"); return (lhw->ic_ampdu_enable(ni, tap)); } +/* + * (*ic_addba_request)() is called by ieee80211_ampdu_request() before + * calling send_action(CAT_BA, BA_ADDBA_REQUEST). + * + * NB: returns 0 on ERROR! + */ static int lkpi_ic_addba_request(struct ieee80211_node *ni, struct ieee80211_tx_ampdu *tap, int dialogtoken, int baparamset, int batimeout) { struct ieee80211com *ic; struct lkpi_hw *lhw; + struct ieee80211_hw *hw; + struct ieee80211vap *vap; + struct lkpi_vif *lvif; + struct ieee80211_vif *vif; + struct lkpi_sta *lsta; + struct ieee80211_sta *sta; + struct ieee80211_ampdu_params params = { }; + int error; ic = ni->ni_ic; lhw = ic->ic_softc; + hw = LHW_TO_HW(lhw); + vap = ni->ni_vap; + lvif = VAP_TO_LVIF(vap); + vif = LVIF_TO_VIF(lvif); + lsta = ni->ni_drv_data; + sta = LSTA_TO_STA(lsta); - IMPROVE_HT(); + if (!lsta->added_to_drv) { + ic_printf(ic, "%s: lsta %p ni %p, sta %p not added to firmware\n", + __func__, lsta, ni, sta); + return (0); + } + + params.sta = sta; + params.action = IEEE80211_AMPDU_TX_START; + /* Keep 0 here! */ + params.buf_size = 0; + params.timeout = 0; + params.ssn = tap->txa_start & (IEEE80211_SEQ_RANGE-1); + params.tid = tap->txa_tid; + params.amsdu = false; + + IEEE80211_UNLOCK(ic); + LKPI_80211_LHW_LOCK(lhw); + error = lkpi_80211_mo_ampdu_action(hw, vif, ¶ms); + LKPI_80211_LHW_UNLOCK(lhw); + IEEE80211_LOCK(ic); + if (error != 0) { + ic_printf(ic, "%s: mo_ampdu_action returned %d. ni %p tap %p\n", + __func__, error, ni, tap); + return (0); + } return (lhw->ic_addba_request(ni, tap, dialogtoken, baparamset, batimeout)); } +/* + * (*ic_addba_response)() is called from ht_recv_action_ba_addba_response() + * and calls the default ieee80211_addba_response() which always returns 1. + * + * NB: No error checking in net80211! + * Staying with 0 is an error. + */ static int lkpi_ic_addba_response(struct ieee80211_node *ni, struct ieee80211_tx_ampdu *tap, int status, int baparamset, int batimeout) { struct ieee80211com *ic; struct lkpi_hw *lhw; + struct ieee80211_hw *hw; + struct ieee80211vap *vap; + struct lkpi_vif *lvif; + struct ieee80211_vif *vif; + struct lkpi_sta *lsta; + struct ieee80211_sta *sta; + struct ieee80211_ampdu_params params = { }; + int error; ic = ni->ni_ic; lhw = ic->ic_softc; + hw = LHW_TO_HW(lhw); + vap = ni->ni_vap; + lvif = VAP_TO_LVIF(vap); + vif = LVIF_TO_VIF(lvif); + lsta = ni->ni_drv_data; + sta = LSTA_TO_STA(lsta); - IMPROVE_HT(); + if (!lsta->added_to_drv) { + ic_printf(ic, "%s: lsta %p ni %p, sta %p not added to firmware\n", + __func__, lsta, ni, sta); + return (0); + } + + if (status == IEEE80211_STATUS_SUCCESS) { + params.sta = sta; + params.action = IEEE80211_AMPDU_TX_OPERATIONAL; + params.buf_size = tap->txa_wnd; + params.timeout = 0; + params.ssn = 0; + params.tid = tap->txa_tid; + if ((tap->txa_flags & IEEE80211_AGGR_AMSDU) != 0) + params.amsdu = true; + else + params.amsdu = false; + } else { + /* We need to free the allocated resources. */ + params.sta = sta; + switch (status) { + /* params.action = FLUSH, FLUSH_CONT */ + default: + params.action = IEEE80211_AMPDU_TX_STOP_CONT; + break; + } + params.buf_size = 0; + params.timeout = 0; + params.ssn = 0; + params.tid = tap->txa_tid; + params.amsdu = false; + } + + IEEE80211_UNLOCK(ic); + LKPI_80211_LHW_LOCK(lhw); + error = lkpi_80211_mo_ampdu_action(hw, vif, ¶ms); + LKPI_80211_LHW_UNLOCK(lhw); + IEEE80211_LOCK(ic); + if (error != 0) { + ic_printf(ic, "%s: mo_ampdu_action returned %d. ni %p tap %p\n", + __func__, error, ni, tap); + return (0); + } + + IMPROVE_HT("who unleashes the TXQ? and when?, do we need to ni->ni_txseqs[tid] = tap->txa_start & 0xfff;"); return (lhw->ic_addba_response(ni, tap, status, baparamset, batimeout)); } +/* + * (*ic_addba_stop)() is called from ampdu_tx_stop(), ht_recv_action_ba_delba(), + * and ieee80211_ampdu_stop() and calls the default ieee80211_addba_stop(). + */ static void lkpi_ic_addba_stop(struct ieee80211_node *ni, struct ieee80211_tx_ampdu *tap) { struct ieee80211com *ic; struct lkpi_hw *lhw; + struct ieee80211_hw *hw; + struct ieee80211vap *vap; + struct lkpi_vif *lvif; + struct ieee80211_vif *vif; + struct lkpi_sta *lsta; + struct ieee80211_sta *sta; + struct ieee80211_ampdu_params params = { }; + int error; ic = ni->ni_ic; lhw = ic->ic_softc; + hw = LHW_TO_HW(lhw); + vap = ni->ni_vap; + lvif = VAP_TO_LVIF(vap); + vif = LVIF_TO_VIF(lvif); + lsta = ni->ni_drv_data; + sta = LSTA_TO_STA(lsta); - IMPROVE_HT(); + if (!lsta->added_to_drv) { + ic_printf(ic, "%s: lsta %p ni %p, sta %p not added to firmware\n", + __func__, lsta, ni, sta); + goto n80211; + } + /* We need to free the allocated resources. */ + params.sta = sta; + IMPROVE("net80211 does not provide a reason to us"); + params.action = IEEE80211_AMPDU_TX_STOP_CONT; /* params.action = FLUSH, FLUSH_CONT */ + params.buf_size = 0; + params.timeout = 0; + params.ssn = 0; + params.tid = tap->txa_tid; + params.amsdu = false; + + IEEE80211_UNLOCK(ic); + LKPI_80211_LHW_LOCK(lhw); + error = lkpi_80211_mo_ampdu_action(hw, vif, ¶ms); + LKPI_80211_LHW_UNLOCK(lhw); + IEEE80211_LOCK(ic); + if (error != 0) { + ic_printf(ic, "%s: mo_ampdu_action returned %d. ni %p tap %p\n", + __func__, error, ni, tap); + goto n80211; + } + + IMPROVE_HT("anyting else?"); + +n80211: lhw->ic_addba_stop(ni, tap); } @@ -4110,8 +4265,8 @@ lkpi_ic_ampdu_rx_start(struct ieee80211_node *ni, struct ieee80211_rx_ampdu *rap struct lkpi_vif *lvif; struct ieee80211_vif *vif; struct lkpi_sta *lsta; - struct ieee80211_sta *sta; - struct ieee80211_ampdu_params params; + struct ieee80211_sta *sta; + struct ieee80211_ampdu_params params = { }; int error; ic = ni->ni_ic; @@ -4123,6 +4278,14 @@ lkpi_ic_ampdu_rx_start(struct ieee80211_node *ni, struct ieee80211_rx_ampdu *rap lsta = ni->ni_drv_data; sta = LSTA_TO_STA(lsta); + IEEE80211_UNLOCK_ASSERT(ic); + + if (!lsta->added_to_drv) { + ic_printf(ic, "%s: lsta %p ni %p vap %p, sta %p not added to firmware\n", + __func__, lsta, ni, vap, sta); + return (-ENXIO); + } + params.sta = sta; params.action = IEEE80211_AMPDU_RX_START; params.buf_size = _IEEE80211_MASKSHIFT(le16toh(baparamset), IEEE80211_BAPS_BUFSIZ); @@ -4130,22 +4293,33 @@ lkpi_ic_ampdu_rx_start(struct ieee80211_node *ni, struct ieee80211_rx_ampdu *rap params.buf_size = IEEE80211_MAX_AMPDU_BUF_HT; else params.buf_size = min(params.buf_size, IEEE80211_MAX_AMPDU_BUF_HT); - if (params.buf_size > hw->max_rx_aggregation_subframes) + if (hw->max_rx_aggregation_subframes > 0 && + params.buf_size > hw->max_rx_aggregation_subframes) params.buf_size = hw->max_rx_aggregation_subframes; params.timeout = le16toh(batimeout); params.ssn = _IEEE80211_MASKSHIFT(le16toh(baseqctl), IEEE80211_BASEQ_START); params.tid = _IEEE80211_MASKSHIFT(le16toh(baparamset), IEEE80211_BAPS_TID); - params.amsdu = false; - IMPROVE_HT("Do we need to distinguish based on SUPPORTS_REORDERING_BUFFER?"); + /* Based on net80211::ampdu_rx_start(). */ + if ((vap->iv_htcaps & IEEE80211_HTC_RX_AMSDU_AMPDU) && + (_IEEE80211_MASKSHIFT(baparamset, IEEE80211_BAPS_AMSDU))) + params.amsdu = true; + else + params.amsdu = false; - /* This may call kalloc. Make sure we can sleep. */ + LKPI_80211_LHW_LOCK(lhw); error = lkpi_80211_mo_ampdu_action(hw, vif, ¶ms); + LKPI_80211_LHW_UNLOCK(lhw); if (error != 0) { ic_printf(ic, "%s: mo_ampdu_action returned %d. ni %p rap %p\n", __func__, error, ni, rap); return (error); } + + if (!ieee80211_hw_check(hw, SUPPORTS_REORDERING_BUFFER)) { + IMPROVE("%s: TODO: SUPPORTS_REORDERING_BUFFER not set; check net80211\n", __func__); + } + IMPROVE_HT("net80211 is missing the error check on return and assumes success"); error = lhw->ic_ampdu_rx_start(ni, rap, baparamset, batimeout, baseqctl); @@ -4162,8 +4336,8 @@ lkpi_ic_ampdu_rx_stop(struct ieee80211_node *ni, struct ieee80211_rx_ampdu *rap) struct lkpi_vif *lvif; struct ieee80211_vif *vif; struct lkpi_sta *lsta; - struct ieee80211_sta *sta; - struct ieee80211_ampdu_params params; + struct ieee80211_sta *sta; + struct ieee80211_ampdu_params params = { }; int error; uint8_t tid; @@ -4203,7 +4377,11 @@ lkpi_ic_ampdu_rx_stop(struct ieee80211_node *ni, struct ieee80211_rx_ampdu *rap) params.tid = tid; params.amsdu = false; + // IEEE80211_UNLOCK(ic); + LKPI_80211_LHW_LOCK(lhw); error = lkpi_80211_mo_ampdu_action(hw, vif, ¶ms); + LKPI_80211_LHW_UNLOCK(lhw); + // IEEE80211_LOCK(ic); if (error != 0) ic_printf(ic, "%s: mo_ampdu_action returned %d. ni %p rap %p\n", __func__, error, ni, rap); From nobody Thu Nov 14 01:53:56 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xpjqn0G1fz5ctfL; Thu, 14 Nov 2024 01:53:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xpjqm5k2rz44sD; Thu, 14 Nov 2024 01:53:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731549236; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=91FCoyoO2F0CPZBO3oCuiC6vP2IL3bb6n9atZZAdht4=; b=FDi11BhLySAj3Qs0ItEIyeHMnspKkNwXDvG9/RrxoCuTixUpBjG+UqeVskOzRv/SKYs8x7 2TRsJdIdrqBn2j2ejAUmoBEC6vzAfyCEQLIJQuW+sZDwkOR2vQeV1t/T8iCMBVtlXJeGX9 dlM8rQUfe4HBKAL+o+dIpQbS7ByeCRrz2NdWHqnIM/UYFwQHtbfuI2AFGsKYXFKWBwmyQZ vGbhiGlnKe13fQx+wQ6t0Dt7oc1P88YtMF1berWbvBv7saFQQs+aZOduGJlgrDVuppzAqM xVqIUgskUUcE9H3Ya72gddGyoqYMZXY3CFCT258sNTIiTvjsy7U7JU0MxJHsOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731549236; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=91FCoyoO2F0CPZBO3oCuiC6vP2IL3bb6n9atZZAdht4=; b=xE6nLAb7QTyKwzGF5YryCTStbDri4xtH/LtfIqg1xk0bSZYDypTrlqG9CnfhuVPFAkwUhA T8d2Cts3cxzgWfhtADxO/Cn4CxuPCD8NvX05oU/B+ahBpO25YdA9YtWtxqemmZRBAG4ByV 2oRatPD88trcJxrJI1HkfPqj2RmVre+rq/sebz8viEfGHza3V4qTnmb3QdYDMdKvehNzAL lHpOGCX7II1m+E62yPfpy7l8BdWzwfH0xj8T1nb5VAAv97xvI+ldfwMQWFPZgDMPvIhH0+ WaYaizfaP5XmWXDcfsB9oZvUInTLLF1dm1xmukJiCpD27Lbh1jIN3o7rFwB7Rg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731549236; a=rsa-sha256; cv=none; b=OGN5EkHi1lMAo1oBf/ec9CBFM1wVAqOPW/bUPCYxRuC1pM8mRoKOpgNWCRNdbf1oQGZP5U TmJwquH4RVvPn43Xug8NHfep5uXQRTpBnuT2fgxDn/rFOaR8h07sATaaSHp9zraaMRXDEl rr9SoD/2g0VKsV7vQbha9JypbQ2DA+s3ujgOrJQH5v5dD0sj8M7NIZl0NrgwVhHn8CqdP4 AU14q/KlVRfx8A9dx4pyDCJvw0PKsikee/vFL62ft1FCDGG+YS+bZYnYPatK3AcEAvRhDo 47LAt/cmiIvAJ4m3TMDZI6wap29u7UVF0fLNuAJPjH+1h96o1+ILi7LxepZrWQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xpjqm4p6QzK02; Thu, 14 Nov 2024 01:53:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AE1ruAj055257; Thu, 14 Nov 2024 01:53:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AE1ruWL055254; Thu, 14 Nov 2024 01:53:56 GMT (envelope-from git) Date: Thu, 14 Nov 2024 01:53:56 GMT Message-Id: <202411140153.4AE1ruWL055254@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: ce5b0b7b991f - stable/14 - LinuxKPI: 802.11: hookup net80211 callbacks dependent on (*ampdu_action)() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ce5b0b7b991f302fe1caef0bdbd838c743e6361b Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=ce5b0b7b991f302fe1caef0bdbd838c743e6361b commit ce5b0b7b991f302fe1caef0bdbd838c743e6361b Author: Bjoern A. Zeeb AuthorDate: 2024-01-27 13:24:27 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-11-14 01:53:12 +0000 LinuxKPI: 802.11: hookup net80211 callbacks dependent on (*ampdu_action)() If a LinuxkPI base wireless driver does not support the (*ampdu_action)() ieee80211_ops function for offloading parts to firmware there is no reason for us to hook into the net80211 callbacks either but simply to let software (net80211) handle this. Sponsored by: The FreeBSD Foundation (commit) (cherry picked from commit 86bc7259d3d558495511a0a23d137b4a6cd030f3) --- sys/compat/linuxkpi/common/src/linux_80211.c | 56 +++++++++++++++------------- 1 file changed, 31 insertions(+), 25 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index b0ad1dee4784..1a07ef0a82fe 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2020-2024 The FreeBSD Foundation - * Copyright (c) 2020-2022 Bjoern A. Zeeb + * Copyright (c) 2020-2024 Bjoern A. Zeeb * * This software was developed by Björn Zeeb under sponsorship from * the FreeBSD Foundation. @@ -4681,30 +4681,36 @@ linuxkpi_ieee80211_ifattach(struct ieee80211_hw *hw) ic->ic_node_free = lkpi_ic_node_free; #ifdef LKPI_80211_HT - lhw->ic_recv_action = ic->ic_recv_action; - ic->ic_recv_action = lkpi_ic_recv_action; - lhw->ic_send_action = ic->ic_send_action; - ic->ic_send_action = lkpi_ic_send_action; - - lhw->ic_ampdu_enable = ic->ic_ampdu_enable; - ic->ic_ampdu_enable = lkpi_ic_ampdu_enable; - - lhw->ic_addba_request = ic->ic_addba_request; - ic->ic_addba_request = lkpi_ic_addba_request; - lhw->ic_addba_response = ic->ic_addba_response; - ic->ic_addba_response = lkpi_ic_addba_response; - lhw->ic_addba_stop = ic->ic_addba_stop; - ic->ic_addba_stop = lkpi_ic_addba_stop; - lhw->ic_addba_response_timeout = ic->ic_addba_response_timeout; - ic->ic_addba_response_timeout = lkpi_ic_addba_response_timeout; - - lhw->ic_bar_response = ic->ic_bar_response; - ic->ic_bar_response = lkpi_ic_bar_response; - - lhw->ic_ampdu_rx_start = ic->ic_ampdu_rx_start; - ic->ic_ampdu_rx_start = lkpi_ic_ampdu_rx_start; - lhw->ic_ampdu_rx_stop = ic->ic_ampdu_rx_stop; - ic->ic_ampdu_rx_stop = lkpi_ic_ampdu_rx_stop; + /* + * Only attach if the driver/firmware supports (*ampdu_action)(). + * Otherwise it is in the hands of net80211. + */ + if (lhw->ops->ampdu_action != NULL) { + lhw->ic_recv_action = ic->ic_recv_action; + ic->ic_recv_action = lkpi_ic_recv_action; + lhw->ic_send_action = ic->ic_send_action; + ic->ic_send_action = lkpi_ic_send_action; + + lhw->ic_ampdu_enable = ic->ic_ampdu_enable; + ic->ic_ampdu_enable = lkpi_ic_ampdu_enable; + + lhw->ic_addba_request = ic->ic_addba_request; + ic->ic_addba_request = lkpi_ic_addba_request; + lhw->ic_addba_response = ic->ic_addba_response; + ic->ic_addba_response = lkpi_ic_addba_response; + lhw->ic_addba_stop = ic->ic_addba_stop; + ic->ic_addba_stop = lkpi_ic_addba_stop; + lhw->ic_addba_response_timeout = ic->ic_addba_response_timeout; + ic->ic_addba_response_timeout = lkpi_ic_addba_response_timeout; + + lhw->ic_bar_response = ic->ic_bar_response; + ic->ic_bar_response = lkpi_ic_bar_response; + + lhw->ic_ampdu_rx_start = ic->ic_ampdu_rx_start; + ic->ic_ampdu_rx_start = lkpi_ic_ampdu_rx_start; + lhw->ic_ampdu_rx_stop = ic->ic_ampdu_rx_stop; + ic->ic_ampdu_rx_stop = lkpi_ic_ampdu_rx_stop; + } #endif lkpi_radiotap_attach(lhw); From nobody Thu Nov 14 01:53:58 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xpjqq2qGPz5ctPV; Thu, 14 Nov 2024 01:53:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xpjqq0T8dz44gS; Thu, 14 Nov 2024 01:53:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731549239; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zO8sUFhebE73HVhd1RJJnkg73+4YczlU6fN0Dhv7WT0=; b=YM1v3znRJB5/sgDXmQbbSRCPtQ8TUj0sjt8IOucVFB+7Zh1fokuaA/+YcIMJ05MUWi0oS7 GKct/ocQTszXlCa+KXRNVvuIy0mqRuzOPya1qvJ7l4tLg55jP8kA7k7GWs9Q0Ea/Y/6Zsd +v3VaQtCp3dZixVo40bIKWvuP7UxfNCsrUmyxaD9hUgKbsFGEAv2jel7LiLH0WKV9GfcBt LO3trJ/LGjJ15tmcYrpWZu0UhiAgKP2ZV4XmUY0LtxQ4t24Vyz+nhVI3zip22Em4WmJJjn AHpd7Ub8OouN9FOa4muAcyhMl57d2bL8HVLEm9lhh8GI6tb4sJblk+dOhjXHUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731549239; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zO8sUFhebE73HVhd1RJJnkg73+4YczlU6fN0Dhv7WT0=; b=W1valmJowUdZdXu4DIW5exsa9YkbXC8JOhUCFpC5CNlJdAWW8oeryPUoXSs58nHNXG2BB3 NaBpjargBLl8tvdnLAzgBiJHaSKjW+qRWfHP73DyHEtrbt6j8dfXoz+jVBxqkjrOPt6Q6p e98C5Ur+sUUl8HQZ4IxCQzuMOFIsASa648xMGxe7XmuYQBQfmKLea336RcY6zNMj6Pvfs1 tR0AIGYi6Fs2E3PCBrRjJ9fkFeImnRKNPxUGMUfCckdRCnjMYghnaz9erSBuh0IrJNHVLR distLcI7dkh+ZSWyH8+XbPT2EPPoeAysX15HEn58Jzkv+WGEhFLd4jHEz87bFQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731549239; a=rsa-sha256; cv=none; b=iL9MpXE7xrjCFBQU/Iv2wiN1ku+cKVVKsUry7D9Vzst1FWeFZP1cZgYWdNCVisi/DKzWhG B7O4pvlxjtfNAytySFVSpkZ8qd4IS7/dtiel/2WKQA2dDDONrSXbQxYGHAumnsip4BxNR4 TdLpV+8L15Do7QHwoPehW5ENUFPzTnj+VBQ1/+cE/B+UYHWrjGnX3fTGy7SQVb1rY/iZbB KPhkS3pcGZGFKCIXyJ10onYnhwyk1Lc2i57mTE2KOEHtdiYYBIjtEK3qf413KmPmNm0qII axXsmSWF5HDfdxeLCgRNUYW0o7jjKR2JfoGSUmLDVbCHEsXy2ffGJwb8yqIQXQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xpjqp75HPzJc9; Thu, 14 Nov 2024 01:53:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AE1rwLQ055361; Thu, 14 Nov 2024 01:53:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AE1rwHN055358; Thu, 14 Nov 2024 01:53:58 GMT (envelope-from git) Date: Thu, 14 Nov 2024 01:53:58 GMT Message-Id: <202411140153.4AE1rwHN055358@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 7ff741003780 - stable/14 - iwlwifi: script to extract firmware details List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 7ff7410037807498c2f56151d5c93fcd80987a17 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=7ff7410037807498c2f56151d5c93fcd80987a17 commit 7ff7410037807498c2f56151d5c93fcd80987a17 Author: Bjoern A. Zeeb AuthorDate: 2024-11-08 18:09:37 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-11-14 01:53:12 +0000 iwlwifi: script to extract firmware details When having to find a firmware image with a lower version number we must only break the inner but not also the outer loop so we keep looking at any possibly remaining firmware details. While here also try to find a version from max..1 and not from 1..max. Sponsored by: The FreeBSD Foundation (cherry picked from commit 52f8e99e7e5e6fab52b3fff535d62b873f8c02dd) --- sys/contrib/dev/iwlwifi/zzz_fw_ports_fwget.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/contrib/dev/iwlwifi/zzz_fw_ports_fwget.sh b/sys/contrib/dev/iwlwifi/zzz_fw_ports_fwget.sh index 60c75c00cbc7..6b6798aae49e 100644 --- a/sys/contrib/dev/iwlwifi/zzz_fw_ports_fwget.sh +++ b/sys/contrib/dev/iwlwifi/zzz_fw_ports_fwget.sh @@ -155,11 +155,11 @@ list_fw() vn=$(echo ${fx} | awk '{ gsub(".ucode$", ""); gsub("^.*-", ""); print; }') #echo "BN ${bn} VN ${vn}" # Single digits are not zero-padded so just ${i} will be fine. - for i in `jot ${vn} 1`; do + for i in `jot ${vn} ${vn} 1`; do xn="${bn}-${i}.ucode" if test -e ${LFWDIR}/${xn}; then lx="${lx} ${xn}" - break 2; + break fi done ;; From nobody Thu Nov 14 02:21:24 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpkRk4Y9fz5cwBX; Thu, 14 Nov 2024 02:21:38 +0000 (UTC) (envelope-from jlduran@gmail.com) Received: from mail-yb1-f180.google.com (mail-yb1-f180.google.com [209.85.219.180]) (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 4XpkRj13Phz48L4; Thu, 14 Nov 2024 02:21:37 +0000 (UTC) (envelope-from jlduran@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of jlduran@gmail.com designates 209.85.219.180 as permitted sender) smtp.mailfrom=jlduran@gmail.com; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=freebsd.org (policy=none) Received: by mail-yb1-f180.google.com with SMTP id 3f1490d57ef6-e2bd1bbaf03so20923276.2; Wed, 13 Nov 2024 18:21:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731550896; x=1732155696; h=content-transfer-encoding:cc:to:subject:message-id:date:from :reply-to:in-reply-to:references:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=5bAyygh2TYBw+2xBJ2yf5RVL4jkiOPMwxcmOAhuY0BQ=; b=qAFg9pCyjzxAZ972G9mAbwhzwGP1sgo+OoO8px+gGHeoqya9SJQ4dNjWn2ci2JU002 qFNzNLatMPA0IbgGEP7dFl0lQiUNSnJ5EeFsAyoq16vdkXo9TU0CRVBBLKu6CJOvATHI JwyPK3rPWMrhsHKG/91nEN98FHASxBmwknxooTc/n5azJmJsPg3h36zDkIwiqhtIjzsJ wmK1YPn4QhSXVOtAWeRntN598MUvdd51+GLfu6JhXaZBNolDTds9AgB8ZE8eE+JiLIX3 XvnO4lepuifkq3a/qwwCYdQpF/sx2vMa75MorR37UPjXuEthh0+fDdlcXJI898j9MnjM zO8g== X-Forwarded-Encrypted: i=1; AJvYcCV0bxMTFlFt0papspZ7ys9RXUZuGVFIwLRpy5LZiF/qK3dGi90yVTHCAU96EgYwEOdrQM688GkATN43T6NmK94+Wyjw@freebsd.org, AJvYcCV7YIHbk1Lrrg68iamSHlQTb7YkEycGu5wgWVjxFIRFwUK3Hd1e9e3TmW2vEsTf3/fEC8Z5Z+HxB/JvfhidmOZKEX9CR/I=@freebsd.org X-Gm-Message-State: AOJu0YymQSOdqT4sBjJ+FoKn6mZdl4i8eoWmouy+5I224NkfVUNhnCh2 jf5keIUAU/gTJhBjP8ji2xTu0wYynLUs4i3gDK3BiDwHmgeYMl+wjtSTL8wo X-Google-Smtp-Source: AGHT+IEerycBfLEEH4eQ4orQJnvIMs42nc9jc8Evqm2nzdCf5yV+D4i5umJkFKvaznxKlM/mtxZHkw== X-Received: by 2002:a25:ae50:0:b0:e38:1230:45c4 with SMTP id 3f1490d57ef6-e3812304661mr186116276.3.1731550895848; Wed, 13 Nov 2024 18:21:35 -0800 (PST) Received: from mail-yb1-f177.google.com (mail-yb1-f177.google.com. [209.85.219.177]) by smtp.gmail.com with ESMTPSA id 3f1490d57ef6-e3815478758sm46190276.59.2024.11.13.18.21.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 13 Nov 2024 18:21:35 -0800 (PST) Received: by mail-yb1-f177.google.com with SMTP id 3f1490d57ef6-e30cf3ef571so17225276.3; Wed, 13 Nov 2024 18:21:35 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCVQaNlSgczYuMcijMLI916YNEJrWO/NVw7KKKm6ymEkbm1tNYXPjfaIczIKGXGsu+8agGZnMhI2Y6v8cqh+8JDFm6Cz@freebsd.org, AJvYcCXGkQyBrXThgJp8//hS6Q6U0VvRGL/DlDfU5g2dN3zjw0VRpo9J6EM6b+YazPeHZ2X1CurOM2ZHOGYxKZoMQUgRun+G0DQ=@freebsd.org X-Received: by 2002:a05:6902:160d:b0:e2b:de2b:e467 with SMTP id 3f1490d57ef6-e337f8dfe89mr8536633276.9.1731550895309; Wed, 13 Nov 2024 18:21:35 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <202411091725.4A9HPCHC015836@gitrepo.freebsd.org> In-Reply-To: <202411091725.4A9HPCHC015836@gitrepo.freebsd.org> Reply-To: jlduran@freebsd.org From: Jose Luis Duran Date: Wed, 13 Nov 2024 23:21:24 -0300 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 62e6ca0f07e4 - main - ps(1): clean up after swapout removal To: Konstantin Belousov Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Result: default: False [-2.82 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.92)[-0.917]; FORGED_SENDER(0.30)[jlduran@freebsd.org,jlduran@gmail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : SPF not aligned (relaxed), No valid DKIM,none]; MIME_GOOD(-0.10)[text/plain]; RCVD_COUNT_THREE(0.00)[3]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; FROM_HAS_DN(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.219.180:from,209.85.219.177:received]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; REPLYTO_ADDR_EQ_FROM(0.00)[]; FROM_NEQ_ENVFROM(0.00)[jlduran@freebsd.org,jlduran@gmail.com]; MISSING_XM_UA(0.00)[]; R_DKIM_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.219.180:from]; FREEFALL_USER(0.00)[jlduran]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; HAS_REPLYTO(0.00)[jlduran@freebsd.org] X-Rspamd-Queue-Id: 4XpkRj13Phz48L4 X-Spamd-Bar: -- On Sat, Nov 9, 2024 at 2:25=E2=80=AFPM Konstantin Belousov wrote: > > The branch main has been updated by kib: > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D62e6ca0f07e448da27cb2cc816= 5e749e7fdfcd7e > > commit 62e6ca0f07e448da27cb2cc8165e749e7fdfcd7e > Author: Konstantin Belousov > AuthorDate: 2024-11-09 01:37:07 +0000 > Commit: Konstantin Belousov > CommitDate: 2024-11-09 17:22:42 +0000 > > ps(1): clean up after swapout removal > > The process flag P_INMEM is always set. Eliminate all checks for the > bit. Also eliminate LAZY_PS define and code covered by it: we do no= t > have an u-area for long time, and it cannot be swapped out. > > Also eliminate setting controlled by the '-f' switch, but accept it f= or > backward compatibility. > > The 'W' process secondary state (swapped out) is impossible, stop > calculating it. > > Reviewed by: markj > Sponsored by: The FreeBSD Foundation > Differential revision: https://reviews.freebsd.org/D47492 > --- > bin/ps/Makefile | 7 ------- > bin/ps/print.c | 6 +----- > bin/ps/ps.1 | 9 +-------- > bin/ps/ps.c | 41 ++++++++--------------------------------- > 4 files changed, 10 insertions(+), 53 deletions(-) > > diff --git a/bin/ps/Makefile b/bin/ps/Makefile > index a25b6a796ed0..71973b34dd24 100644 > --- a/bin/ps/Makefile > +++ b/bin/ps/Makefile > @@ -2,13 +2,6 @@ PACKAGE=3Druntime > PROG=3D ps > SRCS=3D fmt.c keyword.c nlist.c print.c ps.c > > -# > -# To support "lazy" ps for non root/wheel users > -# add -DLAZY_PS to the cflags. This helps > -# keep ps from being an unnecessary load > -# on large systems. > -# > -CFLAGS+=3D-DLAZY_PS > LIBADD=3D m kvm jail xo > > .include > diff --git a/bin/ps/print.c b/bin/ps/print.c > index a3423d8b3956..59631fb66a10 100644 > --- a/bin/ps/print.c > +++ b/bin/ps/print.c > @@ -253,8 +253,6 @@ state(KINFO *k, VARENT *ve __unused) > *cp =3D '?'; > } > cp++; > - if (!(flag & P_INMEM)) > - *cp++ =3D 'W'; > if (k->ki_p->ki_nice < NZERO || k->ki_p->ki_pri.pri_class =3D=3D = PRI_REALTIME) > *cp++ =3D '<'; > else if (k->ki_p->ki_nice > NZERO || k->ki_p->ki_pri.pri_class = =3D=3D PRI_IDLE) > @@ -633,7 +631,7 @@ getpcpu(const KINFO *k) > #define fxtofl(fixpt) ((double)(fixpt) / fscale) > > /* XXX - I don't like this */ > - if (k->ki_p->ki_swtime =3D=3D 0 || (k->ki_p->ki_flag & P_INMEM) = =3D=3D 0) > + if (k->ki_p->ki_swtime =3D=3D 0) > return (0.0); > if (rawcpu) > return (100.0 * fxtofl(k->ki_p->ki_pctcpu)); > @@ -661,8 +659,6 @@ getpmem(KINFO *k) > if (failure) > return (0.0); > > - if ((k->ki_p->ki_flag & P_INMEM) =3D=3D 0) > - return (0.0); > /* XXX want pmap ptpages, segtab, etc. (per architecture) */ > /* XXX don't have info about shared */ > fracmem =3D ((double)k->ki_p->ki_rssize) / mempages; > diff --git a/bin/ps/ps.1 b/bin/ps/ps.1 > index 828239fd2ba9..8ece5b1bbfad 100644 > --- a/bin/ps/ps.1 > +++ b/bin/ps/ps.1 > @@ -159,9 +159,6 @@ does not imply > but works well with it. > .It Fl e > Display the environment as well. > -.It Fl f > -Show command-line and environment information about swapped out processe= s. > -This option is honored only if the UID of the user is 0. > .It Fl G > Display information about processes which are running with the specified > real group IDs. > @@ -358,9 +355,7 @@ the include file > .It Dv "P_TOTAL_STOP" Ta No "0x02000000" Ta "Stopped for system suspend" > .It Dv "P_INEXEC" Ta No "0x04000000" Ta Process is in Xr execve 2 > .It Dv "P_STATCHILD" Ta No "0x08000000" Ta "Child process stopped or exi= ted" > -.It Dv "P_INMEM" Ta No "0x10000000" Ta "Loaded into memory" > -.It Dv "P_SWAPPINGOUT" Ta No "0x20000000" Ta "Process is being swapped o= ut" > -.It Dv "P_SWAPPINGIN" Ta No "0x40000000" Ta "Process is being swapped in= " > +.It Dv "P_INMEM" Ta No "0x10000000" Ta "Always set, unused" > .It Dv "P_PPTRACE" Ta No "0x80000000" Ta "Vforked child issued ptrace(PT= _TRACEME)" > .El > .It Cm flags2 > @@ -491,8 +486,6 @@ The process is a session leader. > The process' parent is suspended during a > .Xr vfork 2 , > waiting for the process to exec or exit. > -.It Li W > -The process is swapped out. > .It Li X > The process is being traced or debugged. > .El > diff --git a/bin/ps/ps.c b/bin/ps/ps.c > index b0af2bdf37ca..49c69bb76084 100644 > --- a/bin/ps/ps.c > +++ b/bin/ps/ps.c > @@ -68,14 +68,6 @@ > #define W_SEP " \t" /* "Whitespace" list separators *= / > #define T_SEP "," /* "Terminate-element" list separ= ators */ > > -#ifdef LAZY_PS > -#define DEF_UREAD 0 > -#define OPT_LAZY_f "f" > -#else > -#define DEF_UREAD 1 /* Always do the more-expensive r= ead. */ > -#define OPT_LAZY_f /* I.e., the `-f' option is not a= dded. */ > -#endif > - > /* > * isdigit takes an `int', but expects values in the range of unsigned c= har. > * This wrapper ensures that values from a 'char' end up in the correct = range. > @@ -92,7 +84,6 @@ int showthreads; /* will threads be shown?= */ > > struct velisthead varlist =3D STAILQ_HEAD_INITIALIZER(varlist); > > -static int forceuread =3D DEF_UREAD; /* Do extra work to get u-area= . */ > static kvm_t *kd; > static int needcomm; /* -o "command" */ > static int needenv; /* -e */ > @@ -154,7 +145,7 @@ static char vfmt[] =3D "pid,state,time,sl,re,pagein,v= sz,rss,lim,tsiz," > "%cpu,%mem,command"; > static char Zfmt[] =3D "label"; > > -#define PS_ARGS "AaCcD:de" OPT_LAZY_f "G:gHhjJ:LlM:mN:O:o:p:rSTt:= U:uvwXxZ" > +#define PS_ARGS "AaCcD:defG:gHhjJ:LlM:mN:O:o:p:rSTt:U:uvwXxZ" > > int > main(int argc, char *argv[]) > @@ -272,12 +263,9 @@ main(int argc, char *argv[]) > case 'e': /* XXX set ufmt */ > needenv =3D 1; > break; > -#ifdef LAZY_PS > case 'f': > - if (getuid() =3D=3D 0 || getgid() =3D=3D 0) > - forceuread =3D 1; > + /* compat */ > break; > -#endif > case 'G': > add_list(&gidlist, optarg); > xkeep_implied =3D 1; > @@ -1276,31 +1264,21 @@ fmt(char **(*fn)(kvm_t *, const struct kinfo_proc= *, int), KINFO *ki, > return (s); > } > > -#define UREADOK(ki) (forceuread || (ki->ki_p->ki_flag & P_INMEM)) > - > static void > saveuser(KINFO *ki) > { > char tdname[COMMLEN + 1]; > char *argsp; > > - if (ki->ki_p->ki_flag & P_INMEM) { > - /* > - * The u-area might be swapped out, and we can't get > - * at it because we have a crashdump and no swap. > - * If it's here fill in these fields, otherwise, just > - * leave them 0. > - */ > - ki->ki_valid =3D 1; > - } else > - ki->ki_valid =3D 0; > + ki->ki_valid =3D 1; > + > /* > * save arguments if needed > */ > if (needcomm) { > if (ki->ki_p->ki_stat =3D=3D SZOMB) { > ki->ki_args =3D strdup(""); > - } else if (UREADOK(ki) || (ki->ki_p->ki_args !=3D NULL)) = { Apparently this is missing an explicit check of ki->ki_p->ki_flag, causing the processes in square brackets be printed within parentheses, that is, taking the else path below, and making test: https://ci.freebsd.org/view/Test/job/FreeBSD-main-amd64-test/lastCompletedB= uild/testReport/bin.pkill/pgrep-_s_test/main/ fail. I have already sent a message via Phabricator, but I am unsure if it has visibility there after the commit. I apologize if this is something that's already known. Thank you! > + } else if (ki->ki_p->ki_args !=3D NULL) { > (void)snprintf(tdname, sizeof(tdname), "%s%s", > ki->ki_p->ki_tdname, ki->ki_p->ki_moretdname)= ; > ki->ki_args =3D fmt(kvm_getargv, ki, > @@ -1315,11 +1293,8 @@ saveuser(KINFO *ki) > ki->ki_args =3D NULL; > } > if (needenv) { > - if (UREADOK(ki)) > - ki->ki_env =3D fmt(kvm_getenvv, ki, > - (char *)NULL, (char *)NULL, 0); > - else > - ki->ki_env =3D strdup("()"); > + ki->ki_env =3D fmt(kvm_getenvv, ki, (char *)NULL, > + (char *)NULL, 0); > if (ki->ki_env =3D=3D NULL) > xo_errx(1, "malloc failed"); > } else { > @@ -1479,7 +1454,7 @@ pidmax_init(void) > static void __dead2 > usage(void) > { > -#define SINGLE_OPTS "[-aCcde" OPT_LAZY_f "HhjlmrSTuvwXxZ]" > +#define SINGLE_OPTS "[-aCcdeHhjlmrSTuvwXxZ]" > > xo_error("%s\n%s\n%s\n%s\n%s\n", > "usage: ps [--libxo] " SINGLE_OPTS " [-O fmt | -o fmt]", --=20 Jose Luis Duran From nobody Thu Nov 14 02:41:59 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpkvC6YtWz5cxjv; Thu, 14 Nov 2024 02:41: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XpkvC5lj2z4CSP; Thu, 14 Nov 2024 02:41:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731552119; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vnorSzr0w8MF5ceHVy3zFG6gEPQMTYfyIZQFBzBxZkk=; b=gqXtbQXzQd43PcyrVVVG5iMGMCQve2WGc59fJjXYbIvYIVHvV88R4b2awmloz65hK7bHEP YgtqaKgLfCTVlclHJDupqF6YyDFDYqENgSsdcDPsy1ZUbi8UooGdrmi1AqcPutVmTfyPq4 NuJYKOyLnyvF2jQgQBSo8HW23nSQMMx2HgIB4VgKGga4jiQXxkgxqKZeKb7JNmyYCW/Of+ C/0hUNqZufVgHvYjQr129WgI9lHyAZHPBFHZTbtwcv72ddGfw2EpStazXRfpO9DVesojQa HVEFNPaHdp02GXWymUdna0uVMKnCNTJdCZ57E/XAgJLCmnWlOjKxz7W2+r9RAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731552119; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vnorSzr0w8MF5ceHVy3zFG6gEPQMTYfyIZQFBzBxZkk=; b=uKhMStEF0Z8KNecoXQIidAoEK8/1bAsl3vGRUgJ6FFb/q1WqL+6jjI5a+V1FjdXHzYB0DB TclJ76wuO9bDPXi2lrSdnhDloKz8/7mC8bE7uK+J66mBZKy2eu+dmgmQLjlN1vUR7crEdL Ib8/OBrxI/lUcW39eyuaBXHW2cGvlXLQeQIPmq7ZMuFkUYtCOrgW8tUG4yQ4Vncame9SJb Qxm0R5rGzf9ZbMUY4JMAW/8YwJZFyyg4ym4QsihRUCajl/2EEhgnJddivoTyOcTvmHhUIF l0uZz1kJuoaNgQcrm07+oLxtriMN/pz1Gy/LDjjzXZvVpmbaaUujrzs2YrZhFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731552119; a=rsa-sha256; cv=none; b=JDTU0NwqoxRjkt2SK4VewnwQ+ie5OBYpb5vjHjCvtbsqWeWV+pBmKoKQ3eCFUKD26FxNn2 mgxycFvec9iEASrh4p4IHi8RYaq8GeuaM2F3+a3o/fE1TsRKL1VBWhlvFviwrc6DLSBrDe /IX0NFB9ic4oQbMpi9KefDLh15OuXX6RjQ+nEzb5IY4N12enReDCoUfbhRyk9M21lGUDJH nN0k3Q3tKc9kUTZTVb83PMilbn4kQpVGfBFSJPc9QEvg/hcPCgosaAO5tFDs/cw5F36azD Jl5BsfbU35OJfYNyXN2RtVgDJHgYorkrm73DrQvpXTOY5/qntTudRHSzF8SznA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XpkvC5MHVzLG3; Thu, 14 Nov 2024 02:41:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AE2fxvu042731; Thu, 14 Nov 2024 02:41:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AE2fx8x042728; Thu, 14 Nov 2024 02:41:59 GMT (envelope-from git) Date: Thu, 14 Nov 2024 02:41:59 GMT Message-Id: <202411140241.4AE2fx8x042728@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 092e2ff33be2 - main - ps.1: restore always true if predicate List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 092e2ff33be2fbe878ad65fe2e9daea918e35e39 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=092e2ff33be2fbe878ad65fe2e9daea918e35e39 commit 092e2ff33be2fbe878ad65fe2e9daea918e35e39 Author: Konstantin Belousov AuthorDate: 2024-11-14 02:16:51 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-14 02:41:42 +0000 ps.1: restore always true if predicate Fixes: 62e6ca0f07e448da27cb2cc8165e749e7fdfcd7e Reported and reviewed by: jlduran Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D47561 --- bin/ps/ps.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/bin/ps/ps.c b/bin/ps/ps.c index 49c69bb76084..3257f0885aa0 100644 --- a/bin/ps/ps.c +++ b/bin/ps/ps.c @@ -1268,7 +1268,6 @@ static void saveuser(KINFO *ki) { char tdname[COMMLEN + 1]; - char *argsp; ki->ki_valid = 1; @@ -1278,14 +1277,11 @@ saveuser(KINFO *ki) if (needcomm) { if (ki->ki_p->ki_stat == SZOMB) { ki->ki_args = strdup(""); - } else if (ki->ki_p->ki_args != NULL) { + } else { (void)snprintf(tdname, sizeof(tdname), "%s%s", ki->ki_p->ki_tdname, ki->ki_p->ki_moretdname); ki->ki_args = fmt(kvm_getargv, ki, ki->ki_p->ki_comm, tdname, COMMLEN * 2 + 1); - } else { - asprintf(&argsp, "(%s)", ki->ki_p->ki_comm); - ki->ki_args = argsp; } if (ki->ki_args == NULL) xo_errx(1, "malloc failed"); From nobody Thu Nov 14 02:49:14 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xpl3Z2xzyz5cxnG; Thu, 14 Nov 2024 02:49: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xpl3Z2SCWz4Clp; Thu, 14 Nov 2024 02:49:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731552554; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pQBNGmwxDpCgqsoQ1m/ijgMBqD1Susbri0gV0fSZH0g=; b=xpWNIMs9tMeNhJtQOCIkwEj36r3UNTLZde3CLp0gYmdQF7bbHhu4GEdif/o47NB0D8N9eQ 8m+oUHo259x4it9b3oOeBm1wo2a+5ZS+zHpzbgEoAD/77dh4BwSwxLxRMEbTgUyoj6+Zqp +9St5sq546mBu6R/fT5Jy5rz1Rg18uxu47h+4osWRIfNi49G6B6FBsj2qnTeozoZmWsEeU VBhkZgszyPbPfAFzJu3QnnSSXrI1g4v2rIBgeWeIKtiof4IT01HE3DnfwXoWdEBNVb/LVQ u+PVd6lIimtoPGMk9wvaszw7Ao21GwDcynqWM2FIX2zE4gapz6QzYC0XQM3H7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731552554; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pQBNGmwxDpCgqsoQ1m/ijgMBqD1Susbri0gV0fSZH0g=; b=n6sW4qbD2AcXp8b6HiKt3bGIGNp+h1WPsdLIzUlz6EnZmjkdFE1URU9qQ4ktgvrHVbRRnB YaKG9lvYei+vJItntQL/pVB+SZuaPVRFfZ7DB0DcM6h046R4ZX2ZZlXBheZXe6IVAra/Pn A7TUo70IGUeNF4dCwwMTvzmCQaypPcqnkoE9KySUXnxU2BKjTsIMUQeBt8rjQ9vbkVzKBD RigHbD/ALzbfgwY73XJnEl1Hftc97uyrlBYE6YngjIEU2hWE0EZugKJV1SHeXEzT9gmjVb ImB8H0ECfP4VwooGKURogKweaHfgE0iSKXHzNuDUc732XqoUq7FzqeZd2VL01Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731552554; a=rsa-sha256; cv=none; b=dP8hgiI0f3bxrX2VFio1e159wSSAtrYsW9YSeg++bVSGlvLC+QrAMGQej0FzNg5jt/9hxF we9Xgd8ZNAHX1LDRg2J13uu+aiL6Rz7CoXx8b81BG7ZiBwY6UfoYM7136uAtw6cvXh08dy Ml8cJeAyiQgtLyLMYGfsGWYx+QQ6Qp8NwJ1pyeT4CiDZcMm4ryb2xRHKQgjj2xEKPJAwUa /ZqMXrBjRG00xjAy7ROj47XeEQbT/wkK3Z2c/hEg/h/HsGuTyo9qQiLA4BXqqdPgRFz3Jj dOKxeVlo4oSgocBLQj33jT6eTdq3iP/2m2c1H2RE33SMQxVOHW6KPdivGfToKw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xpl3Z1lBKzLXW; Thu, 14 Nov 2024 02:49:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AE2nEVs049811; Thu, 14 Nov 2024 02:49:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AE2nE1I049808; Thu, 14 Nov 2024 02:49:14 GMT (envelope-from git) Date: Thu, 14 Nov 2024 02:49:14 GMT Message-Id: <202411140249.4AE2nE1I049808@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 83aafcdc8892 - main - libc, libthr: coordinate stubs for pthread_{suspend,resume}_all_np List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 83aafcdc88928c99e80b04ead23a156e235f9af4 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=83aafcdc88928c99e80b04ead23a156e235f9af4 commit 83aafcdc88928c99e80b04ead23a156e235f9af4 Author: Kyle Evans AuthorDate: 2024-11-14 02:48:02 +0000 Commit: Kyle Evans CommitDate: 2024-11-14 02:48:05 +0000 libc, libthr: coordinate stubs for pthread_{suspend,resume}_all_np If libthr isn't linked into the process, then we don't have any pthreads to worry about and our stubs can just return success -- there are none to suspend/resume. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D47350 --- lib/libc/gen/Symbol.map | 2 ++ lib/libc/gen/_pthread_stubs.c | 4 ++++ lib/libc/include/libc_private.h | 2 ++ lib/libthr/thread/thr_init.c | 2 ++ lib/libthr/thread/thr_private.h | 2 ++ lib/libthr/thread/thr_resume_np.c | 5 +++-- lib/libthr/thread/thr_suspend_np.c | 5 +++-- 7 files changed, 18 insertions(+), 4 deletions(-) diff --git a/lib/libc/gen/Symbol.map b/lib/libc/gen/Symbol.map index 4f77023dad72..ca3974e6b747 100644 --- a/lib/libc/gen/Symbol.map +++ b/lib/libc/gen/Symbol.map @@ -47,6 +47,7 @@ FBSD_1.0 { pthread_mutexattr_init; pthread_mutexattr_settype; pthread_once; + pthread_resume_all_np; pthread_rwlock_destroy; pthread_rwlock_init; pthread_rwlock_rdlock; @@ -59,6 +60,7 @@ FBSD_1.0 { pthread_setcanceltype; pthread_setspecific; pthread_sigmask; + pthread_suspend_all_np; pthread_testcancel; alarm; arc4random; diff --git a/lib/libc/gen/_pthread_stubs.c b/lib/libc/gen/_pthread_stubs.c index a8723bbe72be..9df9ec9b8599 100644 --- a/lib/libc/gen/_pthread_stubs.c +++ b/lib/libc/gen/_pthread_stubs.c @@ -132,6 +132,8 @@ pthread_func_entry_t __thr_jtable[PJT_MAX] = { [PJT_GETTHREADID_NP] = {PJT_DUAL_ENTRY(stub_zero)}, [PJT_ATTR_GET_NP] = {PJT_DUAL_ENTRY(stub_esrch)}, [PJT_GETNAME_NP] = {PJT_DUAL_ENTRY(stub_getname_np)}, + [PJT_SUSPEND_ALL_NP] = {PJT_DUAL_ENTRY(stub_null)}, + [PJT_RESUME_ALL_NP] = {PJT_DUAL_ENTRY(stub_null)}, }; /* @@ -291,6 +293,8 @@ STUB_FUNC1(_pthread_cancel_enter, PJT_CANCEL_ENTER, void, int) STUB_FUNC1(_pthread_cancel_leave, PJT_CANCEL_LEAVE, void, int) STUB_FUNC2(pthread_attr_get_np, PJT_ATTR_GET_NP, int, pthread_t, pthread_attr_t *) STUB_FUNC3(pthread_getname_np, PJT_GETNAME_NP, int, pthread_t, char *, size_t) +STUB_FUNC(pthread_suspend_all_np, PJT_SUSPEND_ALL_NP, void); +STUB_FUNC(pthread_resume_all_np, PJT_RESUME_ALL_NP, void); static int stub_zero(void) diff --git a/lib/libc/include/libc_private.h b/lib/libc/include/libc_private.h index 4d4779647f50..4c244f962b2b 100644 --- a/lib/libc/include/libc_private.h +++ b/lib/libc/include/libc_private.h @@ -187,6 +187,8 @@ typedef enum { PJT_GETTHREADID_NP, PJT_ATTR_GET_NP, PJT_GETNAME_NP, + PJT_SUSPEND_ALL_NP, + PJT_RESUME_ALL_NP, PJT_MAX } pjt_index_t; diff --git a/lib/libthr/thread/thr_init.c b/lib/libthr/thread/thr_init.c index ff59288d919e..708c425d69c1 100644 --- a/lib/libthr/thread/thr_init.c +++ b/lib/libthr/thread/thr_init.c @@ -271,6 +271,8 @@ static pthread_func_t jmp_table[][2] = { [PJT_GETTHREADID_NP] = {DUAL_ENTRY(_thr_getthreadid_np)}, [PJT_ATTR_GET_NP] = {DUAL_ENTRY(_thr_attr_get_np)}, [PJT_GETNAME_NP] = {DUAL_ENTRY(_thr_getname_np)}, + [PJT_SUSPEND_ALL_NP] = {DUAL_ENTRY(_thr_suspend_all_np)}, + [PJT_RESUME_ALL_NP] = {DUAL_ENTRY(_thr_resume_all_np)}, }; static int init_once = 0; diff --git a/lib/libthr/thread/thr_private.h b/lib/libthr/thread/thr_private.h index 023558100e2a..d6c12348e3ab 100644 --- a/lib/libthr/thread/thr_private.h +++ b/lib/libthr/thread/thr_private.h @@ -840,6 +840,8 @@ void _thr_signal_postfork(void) __hidden; void _thr_signal_postfork_child(void) __hidden; void _thr_suspend_all_lock(struct pthread *) __hidden; void _thr_suspend_all_unlock(struct pthread *) __hidden; +void _thr_suspend_all_np(void) __hidden; +void _thr_resume_all_np(void) __hidden; void _thr_try_gc(struct pthread *, struct pthread *) __hidden; int _rtp_to_schedparam(const struct rtprio *rtp, int *policy, struct sched_param *param) __hidden; diff --git a/lib/libthr/thread/thr_resume_np.c b/lib/libthr/thread/thr_resume_np.c index 1e69bfa7358b..c5669fd4f0ff 100644 --- a/lib/libthr/thread/thr_resume_np.c +++ b/lib/libthr/thread/thr_resume_np.c @@ -38,7 +38,8 @@ #include "thr_private.h" __weak_reference(_pthread_resume_np, pthread_resume_np); -__weak_reference(_pthread_resume_all_np, pthread_resume_all_np); +__weak_reference(_thr_resume_all_np, pthread_resume_all_np); +__weak_reference(_thr_resume_all_np, _pthread_resume_all_np); static void resume_common(struct pthread *thread); @@ -59,7 +60,7 @@ _pthread_resume_np(pthread_t thread) } void -_pthread_resume_all_np(void) +_thr_resume_all_np(void) { struct pthread *curthread = _get_curthread(); struct pthread *thread; diff --git a/lib/libthr/thread/thr_suspend_np.c b/lib/libthr/thread/thr_suspend_np.c index b272c7b2a169..cf4e9e8a96b1 100644 --- a/lib/libthr/thread/thr_suspend_np.c +++ b/lib/libthr/thread/thr_suspend_np.c @@ -41,7 +41,8 @@ static int suspend_common(struct pthread *, struct pthread *, int); __weak_reference(_pthread_suspend_np, pthread_suspend_np); -__weak_reference(_pthread_suspend_all_np, pthread_suspend_all_np); +__weak_reference(_thr_suspend_all_np, pthread_suspend_all_np); +__weak_reference(_thr_suspend_all_np, _pthread_suspend_all_np); /* Suspend a thread: */ int @@ -101,7 +102,7 @@ _thr_suspend_all_unlock(struct pthread *curthread) } void -_pthread_suspend_all_np(void) +_thr_suspend_all_np(void) { struct pthread *curthread = _get_curthread(); struct pthread *thread; From nobody Thu Nov 14 03:08:33 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XplTs6Cbyz5d02j; Thu, 14 Nov 2024 03:08: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XplTs5jMqz4FLV; Thu, 14 Nov 2024 03:08:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731553713; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BFEpHpYitxg4ImNABDkp7r2eEl1X+IQVQBZ9eYwDZPk=; b=TxIcU/azx5X5UDJ2gzR7VYDJA1q35C/Ol0hIsBobv/xw2xuZLyz4wVKAx1mv+y7pj/dnm7 4t/LvHY97Ox11lKn9sWPmSXWV0LlwQ1vhbybs3/GyPXfPgYDBFFNv+R8db9Zmay+4pgopd 3AnOPEfq0Gnczw9PX8rTHs4MjgKfWklhr47+IpHoJF5tQSwadUTFjLAMwaHXhKIJ84GxvZ owoXV8aEqS9DJSWzgKXLc7csfBtk88c/eTU6rLKhRmwnRJDL4ZTXjk/TmqZ4uL79xD+YLo 9YU0+IdC684Qd2BfNZfLlGliCCCGOdkQTsc/5D7s/dqvAaxgWvwYKOk9whavAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731553713; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BFEpHpYitxg4ImNABDkp7r2eEl1X+IQVQBZ9eYwDZPk=; b=omQw2b9TmyL+d6dxn7Ap33guPEOM4oC198c3smNKxKgQLwNAJ5ke1ohvYigDZTyw/pAg0R mz09QZPgqwxwCE4tCPSc2/2IkuW0OUeRVNwN0VxAk27fUIybgSt5ZGZAwfu2YrhyvMfbOT 5pxoM5nZK1KV8tO2r1vNCRLi0M19ED739kRUxzNuAIoPy0rcUBoFiLr72JwKqc/ucl8fUn z/UtUfuaZqVbtpc2ensRHWsAYyqZ9W+i9Dz+g/cSdCvb667ODrV7pNO89vY+i2DtGUThXR Q1fShV2cPKdB5UHsyYi1pXQ6RqDPMzuiU1DDuW1F2Tw1TwfrLCtxhAm//Ar0KQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731553713; a=rsa-sha256; cv=none; b=Ga4aV+BW+NkQHbX40+nFmR1trySMP9+p/tN+CmLIQrUTv1S8SAjNVgZvagP8p85I34Dt6T aUUpRq7EO2ShOqtH45QBV8BnRmQ9qLxgnC6fNgfdzcGkgs+v+6KiXkK6QmCeiGlYo9a3DE csDRDdGGfUe7Y6nliH7FlthGAQvNpYFpZwiaoe59Oy4DRh/gIjTMMF9qds7F0n1TTrcuPs DUng7hDeKdX50AAQg/gZR877gurIdArQrHyOIXYKBgJtxu3GH0HksJpasJvVh9qaclupZN XzhVtMHDTYtZYeXrKfykO9V0/lnSBm83KaO8jGheCyUfyKVvB1I0qdH7fDzr0g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XplTs5JBTzLTV; Thu, 14 Nov 2024 03:08:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AE38Xgc088793; Thu, 14 Nov 2024 03:08:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AE38X3h088790; Thu, 14 Nov 2024 03:08:33 GMT (envelope-from git) Date: Thu, 14 Nov 2024 03:08:33 GMT Message-Id: <202411140308.4AE38X3h088790@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 3cc3d71efe29 - main - libc: fix the stubs for pthread_{suspend,resume}_all_np List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3cc3d71efe299ed222dc2b6cd5af365ef35f76a7 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=3cc3d71efe299ed222dc2b6cd5af365ef35f76a7 commit 3cc3d71efe299ed222dc2b6cd5af365ef35f76a7 Author: Kyle Evans AuthorDate: 2024-11-14 03:05:22 +0000 Commit: Kyle Evans CommitDate: 2024-11-14 03:08:02 +0000 libc: fix the stubs for pthread_{suspend,resume}_all_np Noticed just a little too late, stub_null returns a `void *` but these prototypes have no return value. As far as I know, all of our archs will throw the return value in a caller-saved register and it'll simply be ignored, but it's probably worth being more accurate. Fixes: 83aafcdc8892 ("libc, libthr: coordinate stubs for [...]") --- lib/libc/gen/_pthread_stubs.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/libc/gen/_pthread_stubs.c b/lib/libc/gen/_pthread_stubs.c index 9df9ec9b8599..2a0cebadd5fd 100644 --- a/lib/libc/gen/_pthread_stubs.c +++ b/lib/libc/gen/_pthread_stubs.c @@ -50,6 +50,7 @@ struct pthread { static struct pthread main_thread; static int stub_main(void); +static void stub_void(void); static void *stub_null(void); static struct pthread *stub_self(void); static int stub_zero(void); @@ -132,8 +133,8 @@ pthread_func_entry_t __thr_jtable[PJT_MAX] = { [PJT_GETTHREADID_NP] = {PJT_DUAL_ENTRY(stub_zero)}, [PJT_ATTR_GET_NP] = {PJT_DUAL_ENTRY(stub_esrch)}, [PJT_GETNAME_NP] = {PJT_DUAL_ENTRY(stub_getname_np)}, - [PJT_SUSPEND_ALL_NP] = {PJT_DUAL_ENTRY(stub_null)}, - [PJT_RESUME_ALL_NP] = {PJT_DUAL_ENTRY(stub_null)}, + [PJT_SUSPEND_ALL_NP] = {PJT_DUAL_ENTRY(stub_void)}, + [PJT_RESUME_ALL_NP] = {PJT_DUAL_ENTRY(stub_void)}, }; /* @@ -302,6 +303,12 @@ stub_zero(void) return (0); } +static void +stub_void(void) +{ + +} + static void * stub_null(void) { From nobody Thu Nov 14 03:25:03 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xplrv3ycbz5d1N9; Thu, 14 Nov 2024 03:25: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xplrv32Qbz4GjY; Thu, 14 Nov 2024 03:25:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731554703; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j84qaDrpHS21Ib9Dbul6J/KIKqkoehjlxAxx9dFjDTU=; b=fNUZv4sxV63xsKgJTAYeuPD1ZMAzzhdU5wTzBWt5HPFBBKaoUnoXhebxRYkdDuScVR7XB5 nOgsXEGdwMQUDNEzlsCKe6BQKh9J8MT3xr5MzRv5xaU4OexMS7MDMQwylJ7dr8y6LmdNau KUEA3n4nsnqDTVDk7tm7Rzg+h5d0iGyNTYcfWB8kfMLmpgjWY1a361e/0FF+41nIba7D10 vCqIX3vM/szipZTSqPOaOBoPryj/AmyRtdceDJ6icowQaBPrkstBka2onIqzcY90VsmgFK RYhMsj2dgiDGnad1uJMkrwi4vG3gU65DPy8LSqeN64rGDC2wCEgkWUjPlziOIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731554703; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j84qaDrpHS21Ib9Dbul6J/KIKqkoehjlxAxx9dFjDTU=; b=NKIOVm3AfJPkDWMaxt5SU1q8QvWo/JbjuGoLKqdv/YMRWm7kb3bu07+WA617iCddyJV2Fs x8eR6FLdsVrJUjdOt4K4BzVpyd14xOhbs4bdPSup0SGqptcYoEJDpz2COU1iWHjfsUfUwJ 4YBhihQ4ypu711MgEojh4hw6MYoS1P1QzHYbBzfP54mpepkHkmxCXRfwS68ppzkatdw3PT PCSIgc8VgUeTaBWjF+XYFwEkXbC6YYlLOoHSPilX9fWaCaG2HwosVdj6i6CkZb/CfgWs4p YfpKVKOUfTTv24hIAecaJn9yqNdDn7bip5+l6eZ15Yz9dglaY9DbLJIAafDQGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731554703; a=rsa-sha256; cv=none; b=ExtBHBrqsBSRd/P09QljiXlMZFVLXyLR9ZpAprn3EPBE/zz/Z4QH0Omlw/p9pWY0lYbLee 8UIYe+P3WYydkQ2n3JD5rE6WR1EkK5BUSVdLhWUKfnbczJ/qUXDxj9VCbAlGbyAXvMoykK 3owN+xi8v1/JY2xT2SqVc8ALDVUoYOEnpd/RUbdvPfcy9stF9/mhRe98EQ968jbx+KvEVT +kR36je+7BAeJm0pDjB3GyUnRNvtuPoZ4BpeCT3wrRRGr1dwVE9cU//EUsSXdwybVdwcK8 OSrfXYblDedx8wm6s0D6JbFrDrx3FOtNXudmL2UvtybXTcdrXu5YTBP7plTp0Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xplrv2dVyzM1D; Thu, 14 Nov 2024 03:25:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AE3P3Og024744; Thu, 14 Nov 2024 03:25:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AE3P3qY024741; Thu, 14 Nov 2024 03:25:03 GMT (envelope-from git) Date: Thu, 14 Nov 2024 03:25:03 GMT Message-Id: <202411140325.4AE3P3qY024741@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: 200a3cb706f6 - stable/14 - sound: Include snd_cmi only for i386 and amd64 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 200a3cb706f62a61ecfe48e946573fddf6ec9e29 Auto-Submitted: auto-generated The branch stable/14 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=200a3cb706f62a61ecfe48e946573fddf6ec9e29 commit 200a3cb706f62a61ecfe48e946573fddf6ec9e29 Author: Jose Luis Duran AuthorDate: 2024-11-04 19:57:25 +0000 Commit: Jose Luis Duran CommitDate: 2024-11-14 03:19:19 +0000 sound: Include snd_cmi only for i386 and amd64 When running FreeBSD on an arm64/aarch64 QEMU virtual machine, using the Intel HD Audio Controller (ich6) (intel-hda), for example, and by following the procedure in the handbook ("Setting Up the Sound Card"): kldload snd_driver The following error is shown: KLD snd_driver.ko: depends on snd_cmi - not available or version mismatch This is because the CMedia sound driver (snd_cmi) is only built for i386 and amd64. Add the same guards to the snd_driver metadriver. Reviewed by: christos, emaste Approved by: emaste (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D47399 (cherry picked from commit 0187bc8a472ef21ddb901f797d46075fc0d5eb14) --- sys/dev/sound/driver.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/sound/driver.c b/sys/dev/sound/driver.c index 927941ab3d01..b9d530dce921 100644 --- a/sys/dev/sound/driver.c +++ b/sys/dev/sound/driver.c @@ -57,7 +57,9 @@ MODULE_VERSION(snd_driver, 1); MODULE_DEPEND(snd_driver, snd_als4000, 1, 1, 1); MODULE_DEPEND(snd_driver, snd_atiixp, 1, 1, 1); +#if defined(__i386__) || defined(__amd64__) MODULE_DEPEND(snd_driver, snd_cmi, 1, 1, 1); +#endif MODULE_DEPEND(snd_driver, snd_cs4281, 1, 1, 1); MODULE_DEPEND(snd_driver, snd_csa, 1, 1, 1); MODULE_DEPEND(snd_driver, snd_csapcm, 1, 1, 1); From nobody Thu Nov 14 03:25:04 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xplrw4pTMz5d1NB; Thu, 14 Nov 2024 03:25: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xplrw43J1z4GnX; Thu, 14 Nov 2024 03:25:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731554704; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JCVVmTbOgTUZUvh3B3AKEOBbB7EA0BsgyopbljKkttg=; b=YNRsqErdasGE3TRjEKLCfqpbzschaPuCs6etugJKkftxLcyT/oYgkgzPAO39yIVxjps71A EvOIR85Ts39areiMsa8QVUEMVUsG3kMYle5Xl5QVzczZpYiyiQXHYlMHVnd8u5QohGR9sL QjyyvgyX3Fbn79RWObvtBy7yJ7fneQzp44R/V9Ykbc5mbYQJPz+jyxTWlCnLOBCsY0J8l7 S3Uy7PiYPE9EFe6/0dKjJHqWveoldwjjT59rUPMK89u7M7QF92n4WepaDTnD+Rb1tOxv/C 13/NioI63np4x64HftyophO8gSjRSeXp2ufoXa2Kd/sbOD5jTHb6jCVndvJDbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731554704; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JCVVmTbOgTUZUvh3B3AKEOBbB7EA0BsgyopbljKkttg=; b=ydurk1A8tHL0g8vHJZds4SJxNGBlXHoWVV4YuEIftY+KOpztQLpZ89U9ViXn0jZ8pOJeNU Kw0yqnfzHQvnvP48uLkKpJlMWQMczt5Q6WmRbdQbT1mGSHhumvTlOHYxPMR5WRB7ClQmPf qBK50RPn70KJMJxXsLp2DHiHJzBCCGt0ijNciEJMUjLoR7if8GZdUuFq2zS4JdMGL51fGl 3dlz6h2cDl2tfo1XFcIjLHvRV/rOHZLU6rzOFgv+afiBUIk0lBJpdXMPE9k7ARIq7tkKUD L7xPtDpHmCbVZ/nJfchqo5XUAf54EPTUR53X/OuQRo6iaNuByG3gO/F3V0uHkw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731554704; a=rsa-sha256; cv=none; b=f0L1d8KjI2SxnYdewU1Fs9tbbEUt5BEe26bBhAF52SicpXe+hkYtxSimRxNIdU6gByo9aT CIV0lghaREeYG6wlAUIbE5X/xFzI+a9G+hMrOjjW5VngCSqvSQ0Ezlxs3sZRTf+Vqkdvfe ZqQYU9cI0Zrx4bl96TfBaZh1OIDwHovyiua6CT+IFRYTvsPtwLRFJwGCBaFKFaaN2389Gr ReAYPsOld90WL2BSItk4SVcbEOd0e28yi7y3ArYEv3Z14hBm/c7yuXfpTfLcMp/b0INO00 OiTe/fc+RzqYCZ/Mlfzn72IxbBNtkQfaa80gQl3KXzu5sWuuaLn0m6JnVm+7bg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xplrw3fVSzMYJ; Thu, 14 Nov 2024 03:25:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AE3P4fr024803; Thu, 14 Nov 2024 03:25:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AE3P4RF024800; Thu, 14 Nov 2024 03:25:04 GMT (envelope-from git) Date: Thu, 14 Nov 2024 03:25:04 GMT Message-Id: <202411140325.4AE3P4RF024800@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: f6d94e23d1d9 - stable/14 - rc: Update ipfilter example rules location List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f6d94e23d1d9ce4de5f1584ecfe1c7aeb2d545c2 Auto-Submitted: auto-generated The branch stable/14 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=f6d94e23d1d9ce4de5f1584ecfe1c7aeb2d545c2 commit f6d94e23d1d9ce4de5f1584ecfe1c7aeb2d545c2 Author: Jose Luis Duran AuthorDate: 2024-11-04 20:02:01 +0000 Commit: Jose Luis Duran CommitDate: 2024-11-14 03:21:25 +0000 rc: Update ipfilter example rules location It was originally /usr/src/contrib/ipfilter/rules and moved to /usr/src/share/examples/ipfilter/rules in 41edb306f056. Point to users to /usr/src/share/examples/ipfilter instead, as the base directory also contains example rules. Reviewed by: emaste Approved by: emaste (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D47392 (cherry picked from commit 8934526be1843ba033e1423f6ecd8b3b3f2a9c23) --- libexec/rc/rc.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf index eb971a76ecf2..9da9c7203832 100644 --- a/libexec/rc/rc.conf +++ b/libexec/rc/rc.conf @@ -218,7 +218,7 @@ natd_flags="" # Additional flags for natd. ipfilter_enable="NO" # Set to YES to enable ipfilter functionality ipfilter_program="/sbin/ipf" # where the ipfilter program lives ipfilter_rules="/etc/ipf.rules" # rules definition file for ipfilter, see - # /usr/src/contrib/ipfilter/rules for examples + # /usr/src/share/examples/ipfilter for examples ipfilter_flags="" # additional flags for ipfilter ippool_enable="NO" # Set to YES to enable ip filter pools ippool_program="/sbin/ippool" # where the ippool program lives From nobody Thu Nov 14 03:25:05 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xplrx5lbZz5d13x; Thu, 14 Nov 2024 03:25: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xplrx4cYXz4Gcq; Thu, 14 Nov 2024 03:25:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731554705; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j8z3z3BpdxOf2wynPOBZAHitYqpxAIkcVIyBWa/jOzY=; b=Dm5Eh4sytuG534wyILRxW8J9ddkMOAPOxGWp9j3LW9biXpJ0DG956n0NYAGKKRdWGYRQnU TZcFAc9mFUWD0LF0cysUbesnkrQf3D0Fz1R6+m7iZYOnykJ7WDgVRhrWJ02t/RewpaO0PZ 6JcIbBe9L8UJUwSxTRTo01JQWzDoTbnCQY8IDgNmNl3sg/a8GEY1eqZUu498NLZBtqj9TT bSarLCNrEo6DeC3qoUdT4rY7Wqh1LSw+k6qzLxE2ff/MfgNEUQA+fqbRtqr9B4cbQ4iAwj totbf16uNFi2+Omlh0gE6ZAUj5/yHzb1M8nMxPqMRyDz3YifcjHph5DwsOQnoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731554705; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j8z3z3BpdxOf2wynPOBZAHitYqpxAIkcVIyBWa/jOzY=; b=adfPWsMqv4TBGXAsOcR6esRa24AG005Lli3X6AVN5Xy+FZTo/154flXNUEOtZnzXoEnyJu p7FgUvTyS4Ih/NtPpjk6w9L6e1Zng4DDyBO/+UZMr1hguA2fZZLnCBuCy9ZJ3XsNpskXE8 tofYkv+y08w1uIcKIFymRjXRc2cBJVtk1mdrNXItpd5FZkloQk7VWCnf9H6q1Jmox0+C4o cyuUQc7W65bLhpmhtpCxiAzGHlNMmFkRe2uagPrqOht5siQUkWX96Y27km2x10JbfiZkFM YTrxC6duwcmML3Zdzqk9GJtVUuKavfq2yFVKNMJGjLqbGWkQzFSotLQ0yj35kA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731554705; a=rsa-sha256; cv=none; b=oC37H7d0z+Svb1SVXhpIYk2yuVoggWjNYkQZVkbonDgW1VWDKFjDpbZs4aGdlvj3n+SJl2 ERkF7W+XfR67Uzs+aBEjJZlF8wQM8OWnaKM5amEiaqC2zQS8xpSE8jKWVOHQzXED4f+yt2 WpTWgDzfhcVbCjZLe9sbDeIxWBDHD1gOrsDsHEhXHEf5Pn9VskMdTRZos1esYN60sIUdAR cPRNLHQAMflJdswo9MpghnL4v0D5dwj9e8J1rlzUe4oeXb8HQZQtQiQDV7UII9pdOXb+1w J4IxzQOG3g3qXZNmAI5JWQzpd/0IFbsJK+YAi5sV0bV8ZYUBPZlT5HKfrqxKfw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xplrx4DvNzMYK; Thu, 14 Nov 2024 03:25:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AE3P5Li024852; Thu, 14 Nov 2024 03:25:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AE3P5BS024849; Thu, 14 Nov 2024 03:25:05 GMT (envelope-from git) Date: Thu, 14 Nov 2024 03:25:05 GMT Message-Id: <202411140325.4AE3P5BS024849@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: 797884a5d990 - stable/14 - ping: tests: Cleanup IPOption()s List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 797884a5d9900ae66d31112274bc1fdb3f4d9e9e Auto-Submitted: auto-generated The branch stable/14 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=797884a5d9900ae66d31112274bc1fdb3f4d9e9e commit 797884a5d9900ae66d31112274bc1fdb3f4d9e9e Author: Jose Luis Duran AuthorDate: 2024-11-05 02:46:45 +0000 Commit: Jose Luis Duran CommitDate: 2024-11-14 03:22:40 +0000 ping: tests: Cleanup IPOption()s Scapy now only accepts known options with IPOption(), so our unknown option must be passed raw. While here, prefer the named options for EOL and NOP. Reviewed by: emaste, kp Approved by: emaste (mentor) Differential Revision: https://reviews.freebsd.org/D47160 (cherry picked from commit 2e29bf7a2ae66acb6e65ffc1c923cfb373af67bd) --- sbin/ping/tests/test_ping.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sbin/ping/tests/test_ping.py b/sbin/ping/tests/test_ping.py index 8ec0f3dc74dc..90df07d0e5b9 100644 --- a/sbin/ping/tests/test_ping.py +++ b/sbin/ping/tests/test_ping.py @@ -85,11 +85,11 @@ def generate_ip_options(opts): ] routers_zero = [0, 0, 0, 0, 0, 0, 0, 0, 0] if opts == "EOL": - options = sc.IPOption(b"\x00") + options = sc.IPOption_EOL() elif opts == "NOP": - options = sc.IPOption(b"\x01") + options = sc.IPOption_NOP() elif opts == "NOP-40": - options = sc.IPOption(b"\x01" * 40) + options = sc.IPOption_NOP() * 40 elif opts == "RR": ToolsHelper.set_sysctl("net.inet.ip.process_options", 0) options = sc.IPOption_RR(pointer=40, routers=routers) @@ -116,7 +116,7 @@ def generate_ip_options(opts): options = b"\x9f" elif opts == "unk-40": ToolsHelper.set_sysctl("net.inet.ip.process_options", 0) - options = sc.IPOption(b"\x9f" * 40) + options = b"\x9f" * 40 else: options = "" return options From nobody Thu Nov 14 03:25:06 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xplrz2Mmhz5d0v2; Thu, 14 Nov 2024 03:25: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xplry5Kmkz4Gnm; Thu, 14 Nov 2024 03:25:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731554706; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nxg5QFjyfQQtfVff1ieYDFYUoQfaVQ4roBxEbjRV7DA=; b=tXWnORyQ4+IbrNNuwf36gnPxewxY7qv5r3FxdANDNRBD4+HKJv1m4KduYyyA/3SfAysZbC t3eaYMN4waAQUcTgwFNhADlP/E1dch9b58kqjAGT6Xs/MHnsdSDy9H5klMuSu0FdIYvitb xOpmGY9V0GvEdrQE26nWmUSlk5FgL2MZPxYRBENPr99+NExhep2vH+GUXs06AgtZ8dLed7 rQsp59ueH8uQmbIQ8GK5f4RPqztIl83CdivMSvxNPgoDjiKinchIBu13gj6T29VJnkzkdB GGCHVlmuZZL/Z8KC8e1E0AugnlFFir4kwK4CsvhIQJOi3xZ6fpI9VATq9+GxvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731554706; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nxg5QFjyfQQtfVff1ieYDFYUoQfaVQ4roBxEbjRV7DA=; b=lOyCVZEg149aW5wXRmlb7Z3UGJJw+ujl0y4wHeBcoDkSUGMsWzAqsSfuC76giD5Ad7eJv+ lLtUDtWVF0XWUWP6LRIXWvDTP+MA9f9KldAO3lkh9c6bPsTjSlIBKKqTS/cY9b11PB531z RmYms7Yp02lCQphoLv2XpoQiVMlsjfkS+KKaKAXLUSaT8sOryNdz5F4YPI/qJW1akFruEF WJD/9EiTk13pwQME9OW0ORY6uHy4n4AE1QZOydbMlb3Nq2AeHRlwM57N+pDoJ2tzalthi4 OLOdqE03UzcZjDEagw75zy3rqSi+BnB5QdGq9mkKucyE0/dppUYiPAt9RRWqQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731554706; a=rsa-sha256; cv=none; b=XgC2HrTtFOvS1TsKTJVahtKfI5NLCh5Einqi0qmt0+QZs8zymwAsfYgNYFaugWNtKN683o pgacELE/6otghyhPiwm/ckx4V4VCPzh29pVbpqs2KTOb+GMyjxuKtCJoUMFEp2frLty4d0 +ZkzaCOZpZATmmR1OSP+2H1+WR6dfMxzn6sTT7ZSCtxT8jvebiIj8wzWyRPSaUdvKJFrjS fDSWigNwxSizcKOCD5Nlckvm5TDRUlXIny9LSxUrannx53oLxDKJ9rp2i/iDRkcmteEKgF ZQq/oQDZ3cxutXU9fb4P4zmuXnr/szanOkGWwPkoiV14RyT9GPFnH31d5M2H3Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xplry4v6GzMNL; Thu, 14 Nov 2024 03:25:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AE3P6XT024900; Thu, 14 Nov 2024 03:25:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AE3P6Rj024897; Thu, 14 Nov 2024 03:25:06 GMT (envelope-from git) Date: Thu, 14 Nov 2024 03:25:06 GMT Message-Id: <202411140325.4AE3P6Rj024897@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: 4c7c29a020c5 - stable/14 - ping: tests: Align with Scapy defaults List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4c7c29a020c5235eca369c89b9cc750a1d4e4656 Auto-Submitted: auto-generated The branch stable/14 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=4c7c29a020c5235eca369c89b9cc750a1d4e4656 commit 4c7c29a020c5235eca369c89b9cc750a1d4e4656 Author: Jose Luis Duran AuthorDate: 2024-11-05 02:48:34 +0000 Commit: Jose Luis Duran CommitDate: 2024-11-14 03:23:00 +0000 ping: tests: Align with Scapy defaults Align some of pinger() defaults with Scapy to facilitate debugging when printing packets. No functional change intended. Reviewed by: emaste, kp Approved by: emaste (mentor) Differential Revision: https://reviews.freebsd.org/D47159 (cherry picked from commit 4859030ef193688153f490915794ae9ab77f012b) --- sbin/ping/tests/test_ping.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sbin/ping/tests/test_ping.py b/sbin/ping/tests/test_ping.py index 90df07d0e5b9..cf2e46a146c8 100644 --- a/sbin/ping/tests/test_ping.py +++ b/sbin/ping/tests/test_ping.py @@ -63,14 +63,14 @@ def build_response_packet(echo, ip, icmp, oip_ihl, special): if icmp.type in icmp_id_seq_types: pkt = ip / icmp / load else: - ip.options = "" + del ip.options pkt = ip / icmp / oip / oicmp / load return pkt def generate_ip_options(opts): if not opts: - return "" + return [] routers = [ "192.0.2.10", @@ -118,7 +118,7 @@ def generate_ip_options(opts): ToolsHelper.set_sysctl("net.inet.ip.process_options", 0) options = b"\x9f" * 40 else: - options = "" + options = [] return options @@ -134,7 +134,7 @@ def pinger( icmp_code: sc.scapy.fields.MultiEnumField, # IP arguments ihl: Optional[sc.scapy.fields.BitField] = None, - flags: Optional[sc.scapy.fields.FlagsField] = None, + flags: Optional[sc.scapy.fields.FlagsField] = 0, opts: Optional[str] = None, oip_ihl: Optional[sc.scapy.fields.BitField] = None, special: Optional[str] = None, @@ -169,7 +169,7 @@ def pinger( :keyword ihl: Internet Header Length, defaults to None :type ihl: class:`scapy.fields.BitField`, optional - :keyword flags: IP flags - one of `DF`, `MF` or `evil`, defaults to None + :keyword flags: IP flags - one of `DF`, `MF` or `evil`, defaults to 0 :type flags: class:`scapy.fields.FlagsField`, optional :keyword opts: Include IP options - one of `EOL`, `NOP`, `NOP-40`, `unk`, `unk-40`, `RR`, `RR-same`, `RR-trunc`, `LSRR`, `LSRR-trunc`, `SSRR` or From nobody Thu Nov 14 03:25:07 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xpls01h6cz5d0v3; Thu, 14 Nov 2024 03:25: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xplrz61jGz4Gp2; Thu, 14 Nov 2024 03:25:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731554707; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sh4qdIxDDvdbdz6fp+WTsT/buaitGQlV4BE4JWnyRGc=; b=Lotj2FaLB/CtB+8UMCZZ6nZFD63spPlyzVil/l7+U/wd/iwGaA/MQb25x1Vpn+eTj95OEx 9DzaB5RSzx7BoZ74v5XBYFvph6eRVgDu0sEZlwrstkdS1dw/rOZIhWnF9B6mNVonb68Nax nm6CQzJNb8NnTKqqAIDAMMH7VBGUN3EOTdRqAFhJS4WVOu1i8FNA9lYctSnY5g+85Sn3TO 5phY1ByGNsi7qWSlYZ4zuw/Z4iGrXClWoh6zhVIjDJaQGmmFhkKkv9aVT+9D4TzP/tT0/u XsjzIPIwyY8gZ8hMux6QyNViqeknb18466HYdtISnntqrFjww6InML+wQriYZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731554707; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sh4qdIxDDvdbdz6fp+WTsT/buaitGQlV4BE4JWnyRGc=; b=Xl9efOYgDNXRv88aqsQB8ADzSr5knSBNAUtB6dwCf9RxVJnlUOsTEFey6/7MGMIHBa0elL aGk0ttz623qGkqybUjsf+VP6TOyl5Yd6rRkxtdVS7TGx68R8dIiIIKOW6aQVMxUNlVDwVe CUMXKGGXmjy7FSJvLMrDglzpyq9mz+zzQPkSm67/y6+tHx9G0huPSEPLYadfK+J0pEo7AJ bm2xPzc3EulcIaMey1W3lgTlHuYEi9aTYnDuOt68bnn0QWXV0+H4nuZopW5x7eC0Ust+57 r5D0DjnET0tiwBuYsZQfTIV+g/xvDHFdslDDyhgftQK7G9xIkzHdW3GeRbfuFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731554707; a=rsa-sha256; cv=none; b=nxrBG8xSEdmGw4LXB5Z7mI90ipOVz2D4plOyGxThEwhJB2TCIMJyB/Pi+IDzb7A3yMWdSj l8BzEpMNfRbmdpaUFGL/pcL70OPjfUFfKHZNeW8R9c92JRaagLMMN1NvW7YdD5ecIu0twK antlD34QkkScANj8zcbgPgs24kuxrVTbAPTrIo9sI3YMy51Puy0xGgUVKHm9OgHUatO/ts k22LhmoLXcnLUGrmfrDFIIKDtrZ76UTwzZSeQ1rg2ynsddq750NsxgitBoD5qSrwtCdqYD qW9K/C4eD8npzU1f4WxD4uCIZX3vIyO0eSvFYcLLK4OUVbkpx+kr38af/0P12Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xplrz5ZdKzMLc; Thu, 14 Nov 2024 03:25:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AE3P7Vo024946; Thu, 14 Nov 2024 03:25:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AE3P7Sg024943; Thu, 14 Nov 2024 03:25:07 GMT (envelope-from git) Date: Thu, 14 Nov 2024 03:25:07 GMT Message-Id: <202411140325.4AE3P7Sg024943@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: 124ecd59ba81 - stable/14 - ping tests: Silence deprecation warnings List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 124ecd59ba8160f9adbaca833e83a96b2d57370d Auto-Submitted: auto-generated The branch stable/14 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=124ecd59ba8160f9adbaca833e83a96b2d57370d commit 124ecd59ba8160f9adbaca833e83a96b2d57370d Author: Jose Luis Duran AuthorDate: 2024-11-05 03:04:53 +0000 Commit: Jose Luis Duran CommitDate: 2024-11-14 03:23:16 +0000 ping tests: Silence deprecation warnings Declare some regex patterns as a raw string by prepending `r`. Reviewed by: markj Approved by: emaste (mentor) Differential Revision: https://reviews.freebsd.org/D42174 (cherry picked from commit 8b13cb9d654c985534d24a09ec5dab02cc4dea6e) --- sbin/ping/tests/test_ping.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sbin/ping/tests/test_ping.py b/sbin/ping/tests/test_ping.py index cf2e46a146c8..93b42d7d53bd 100644 --- a/sbin/ping/tests/test_ping.py +++ b/sbin/ping/tests/test_ping.py @@ -270,15 +270,15 @@ def pinger( def redact(output): """Redact some elements of ping's output""" pattern_replacements = [ - ("localhost \([0-9]{1,3}(\.[0-9]{1,3}){3}\)", "localhost"), - ("from [0-9]{1,3}(\.[0-9]{1,3}){3}", "from"), + (r"localhost \([0-9]{1,3}(\.[0-9]{1,3}){3}\)", "localhost"), + (r"from [0-9]{1,3}(\.[0-9]{1,3}){3}", "from"), ("hlim=[0-9]*", "hlim="), ("ttl=[0-9]*", "ttl="), ("time=[0-9.-]*", "time="), ("cp: .*", "cp: xx xx xx xx xx xx xx xx"), ("dp: .*", "dp: xx xx xx xx xx xx xx xx"), - ("\(-[0-9\.]+[0-9]+ ms\)", "(- ms)"), - ("[0-9\.]+/[0-9.]+", "/"), + (r"\(-[0-9\.]+[0-9]+ ms\)", "(- ms)"), + (r"[0-9\.]+/[0-9.]+", "/"), ] for pattern, repl in pattern_replacements: output = re.sub(pattern, repl, output) From nobody Thu Nov 14 03:25:08 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xpls12l3Xz5d1QR; Thu, 14 Nov 2024 03:25:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xpls06dM7z4HB6; Thu, 14 Nov 2024 03:25:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731554708; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sx7HcIJoJ4eDmCAooj2o5GOwuj98r47p44CgiWUiKP0=; b=lZU8E7YGqUvHrIpyFW2okoX2PYo8RKKwONGrzZkHyWeFIB9GqLBR79rXpn99m2JA4TKHgr 99+UqeVihUGcRgG68AYxjrdCx1UOdXD1LDuJ7TiSUc9HTQkfwKRQPOlpMo+QDXAhmPod/F SAzOD/aFwik4G1XZbcHbWhtIAlC4B60EZn4MY/jHlyFb4CZ1MHNURCMMgiPe8snYWRbB4/ +qR10Vboe5eaZBuRJfGNfnvy0FlAJkwUSwE5kKC37yVxVCHKw8MzhlqXjQgJxoCLQjUTd5 DlWj9vs5B/YWYfHxomAm3FIe/QYCBHm8WxrrKgPhOzpXYCRoybi0aarsVWJhgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731554708; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sx7HcIJoJ4eDmCAooj2o5GOwuj98r47p44CgiWUiKP0=; b=AcJBSnY0Y0WrrFDVeSwvy8SEnnaKGuJingPvmMpYyxp39b8DBdMInUf7om+4SeJkFRV7EK 0/YhhWQ0oyVIxxTNHz5dcKhPYIHRz6VFgWsQX7EhKML7mQbxQzoM35/KV4U64SfJN5Cwe5 l54Xc+30MkDuvJmn2jm33lIT4nFe+4jSYacCITRElyqLBnEIHYnmQTTgwknVTSLXs95HEW 1DnRFYLTGaIFK6sa0bphC4k8WvPiN/pGqclF1fuzlyF3dZpDEPE4gb6Z1rpRvavDVnqbvV CUpc++7uKwN7MkqAHFto4jTKpokSDbGsZWQgAQogyHNrpRjKN8KYn8/1WjIA0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731554708; a=rsa-sha256; cv=none; b=Fzdb6BjJz2SeOKopZ6KsQTucC7N7b7RMH7nj0csldtSl+EDJu1/X5hkbCzmo1mbyTJl5Mr s2Ox7Vd32FDF9rEyp8VLBcfDy2ABb7AJQxiEljAlgqBV5DFzB0Kjz7f3ICU7g0wHKXGtFA gHf6sfHQHSG7lAYQkEtDB9nLFOjYlR1mscqEB1Fx5QgtlTva8tTcUAvhN+iVKzHz9K+NpJ E03WJ69ul9V+bgbe23t0ZyJxn6yaOGgCKj2DtYmCu2C9hoOURJWRhucEnRqYn1M698ySZq o/L4vbKvZaqaAAyTpOXSm6/Yi9fqc1R+uc7qJMEG+usZs5jNvaFRlEPnpC7wcw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xpls06BKDzM93; Thu, 14 Nov 2024 03:25:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AE3P8du025006; Thu, 14 Nov 2024 03:25:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AE3P8ka025003; Thu, 14 Nov 2024 03:25:08 GMT (envelope-from git) Date: Thu, 14 Nov 2024 03:25:08 GMT Message-Id: <202411140325.4AE3P8ka025003@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: 5d24286be13a - stable/14 - ping tests: Run tests unprivileged inside a vnet List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5d24286be13a0553fd8a2024c9f4a83d33649085 Auto-Submitted: auto-generated The branch stable/14 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=5d24286be13a0553fd8a2024c9f4a83d33649085 commit 5d24286be13a0553fd8a2024c9f4a83d33649085 Author: Jose Luis Duran AuthorDate: 2024-11-05 03:00:38 +0000 Commit: Jose Luis Duran CommitDate: 2024-11-14 03:23:33 +0000 ping tests: Run tests unprivileged inside a vnet In order to create vnet jails, atf_python needs root privileges. However, once the vnet is created, its privileges inside the vnet can be demoted, as these tests should not require root in order to pass. Reviewed by: markj Approved by: emaste (mentor) Fixes: 4efaf43c6fa7 ("ping: Require root user for pytests") MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42175 (cherry picked from commit 5797a03fe8a7c3355a727aaaea803ee1f42d106b) --- sbin/ping/tests/test_ping.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sbin/ping/tests/test_ping.py b/sbin/ping/tests/test_ping.py index 93b42d7d53bd..3f9a3aecf924 100644 --- a/sbin/ping/tests/test_ping.py +++ b/sbin/ping/tests/test_ping.py @@ -724,6 +724,7 @@ PING(56=40+8+8 bytes) 2001:db8::1 --> 2001:db8::2 @pytest.mark.parametrize("expected", testdata) @pytest.mark.require_user("root") + @pytest.mark.require_user("unprivileged") def test_ping(self, expected): """Test ping""" ping = subprocess.run( @@ -753,6 +754,7 @@ PING(56=40+8+8 bytes) 2001:db8::1 --> 2001:db8::2 @pytest.mark.parametrize("expected", ping46_testdata) @pytest.mark.require_user("root") + @pytest.mark.require_user("unprivileged") def test_ping_46(self, expected): """Test ping -4/ping -6""" for version in [4, 6]: From nobody Thu Nov 14 04:58:22 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpnwZ4ljlz5d5kr; Thu, 14 Nov 2024 04:58: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XpnwZ4B5Zz4Rpj; Thu, 14 Nov 2024 04:58:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731560302; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q58pdvNg4+P/BF6XGJZogDNeekHy6YjqWCbm0GmIxU0=; b=qWlLGgANT1N6xUpymbdMqIBWzg2ktC7bD5aKBUwv4uG/xmxE0yoLi4e4PAXJ4AnCiyRrj/ 8es6QGDkCmNmVSoBrZWcEqGwXPr8CbbrSTQn5sIzIftdGin04Egqp5lwgsdxJ19HxpG7G5 OdrKm1sF82PNzH5KdfKB5Bx+bQ0EOSG3J4/TfTncBT5i0P29Guqx2dCuW/TE0wcCEUYNyX ZWLp0bmOU2f/XeIACM4IcpyxuWIW+TgGDvf+a7r+YHmeu8EOQAjoGpS+4BESxcd4AyPgw1 NgS17v/yI6GzjK6sbvxmLzWeiEb//PR3RpKBFEvpc348Aaa1JJjFOy9mmtmrnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731560302; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q58pdvNg4+P/BF6XGJZogDNeekHy6YjqWCbm0GmIxU0=; b=S7feXZ05N3eSS+4u/cKBm7FSzIz0h23PB5Je/EUZw7Wprh0Nh1Uft+eeOSb8fAQ5CfmrEj CLZjruQo+0Qdv6zXOHBdqhSK9uMBqmBYJUOF+DY9dS4KYdJrA04/4ERabCZnfX3z8rkLtW hYtqJGe432hV6+jnuhqml+yCrc21ATEjimxutZ65GJn9bNxEhGBlzncWcdkEjxVOXJXV8E J0fYIFGdsoNnG5KaRV04rVBNb1GVbqs1wkMSMuCEBbhYkmpAN7bUOvf1He9ZYNsoCv76hg GBmP6AKasM/dy7yrU5ZB53/A767bV3+nQOCc1tZbCxsu4zXA9PHWInppWgieHQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731560302; a=rsa-sha256; cv=none; b=Cls4IzaZX2UakPTxtIntoqsg26rg70GX0PY8JR70nADQBup1fhQCFvH5/Gtxik+imiXeDZ 9NxEvOIzROY8k1krS+dbOZvqxJ7BhSUa8Rkui7p7xnyRwT0qY4DcVvnVzl4u4iz/lCQjKL jMA1u1VT7b7v2mOBewG9fAZdajJ4GIw76aK+Nk+HYeljf1R7GYq/j/wkaFqzPYZ0MCThxo l4D3xW/ecMDGyF6wRMMa0X4tcnkA/0u56eyU7yvAsb37g7c79jr8zzHj1LeqKYKjwGrobh 0JdJuRc2LWP4FfBP+3i3mPXWx16UIKDunoJBQCBQdQWsWtHZLPgE/7U2Wxzjtw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XpnwZ3ggpzQ2Z; Thu, 14 Nov 2024 04:58:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AE4wMvI092534; Thu, 14 Nov 2024 04:58:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AE4wM3O092531; Thu, 14 Nov 2024 04:58:22 GMT (envelope-from git) Date: Thu, 14 Nov 2024 04:58:22 GMT Message-Id: <202411140458.4AE4wM3O092531@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 209fd89a2810 - main - _dl_iterate_phdr_locked(): fix libc and libdl List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 209fd89a2810419309944f10d11834321f0ebb25 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=209fd89a2810419309944f10d11834321f0ebb25 commit 209fd89a2810419309944f10d11834321f0ebb25 Author: Konstantin Belousov AuthorDate: 2024-11-14 03:54:24 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-14 04:14:05 +0000 _dl_iterate_phdr_locked(): fix libc and libdl Add prototype. Export from libdl. Fixes: 1426fd6cff0603f0ee275b99f2ba35dc36f3d0c2 Reviewed by: kevans Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D47563 --- lib/libc/gen/dlfcn.c | 2 ++ lib/libdl/Symbol.map | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/lib/libc/gen/dlfcn.c b/lib/libc/gen/dlfcn.c index b814fdc845c4..bffee3952e0d 100644 --- a/lib/libc/gen/dlfcn.c +++ b/lib/libc/gen/dlfcn.c @@ -204,6 +204,8 @@ dl_init_phdr_info(void) #endif #pragma weak _dl_iterate_phdr_locked +int _dl_iterate_phdr_locked(int (*callback)(struct dl_phdr_info *, + size_t, void *), void *data); int _dl_iterate_phdr_locked( int (*callback)(struct dl_phdr_info *, size_t, void *) __unused, diff --git a/lib/libdl/Symbol.map b/lib/libdl/Symbol.map index dd9a8252e4a3..f0e03c4940ce 100644 --- a/lib/libdl/Symbol.map +++ b/lib/libdl/Symbol.map @@ -22,3 +22,7 @@ FBSD_1.8 { rtld_get_var; rtld_set_var; }; + +FBSDprivate_1.0 { + _dl_iterate_phdr_locked; +}; From nobody Thu Nov 14 07:13:11 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xprw80kXnz5dFFC; Thu, 14 Nov 2024 07:13: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xprw75n5Hz4d6n; Thu, 14 Nov 2024 07:13:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731568391; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gXZFceapMqHMoibagUXY8SOK+kBISqqWpJ4+T6DO3dQ=; b=ghMZpxNW/gLHNL+VKC9T7jSOHHwSbTP7zTfuiLJA+lQoxopkUNWRoMd2axHalOb96pGR0Z KY+Rqg/ts73P7UQCBfYBeBM2ye/s7Vp/nIXBzQZHLPSfUJ+X3T2kmuNd+H/wjx76E7zfbr 9UW2o1zhBj/3Ywe8SdEYxf805y8MjedEhTDmhBxki12jGhd/hi4aGS6mQtQsz7/PDMskWY DwQ3Na3aMilVLWeuh6jxWtDl2LstKzUGEmv6LwV33Ha1nCS4rXGIjhxQzyp9ypoLr5jrVV tAdDdWQByY5XywJOt4vI6P/G3ePAdUlazmWM6DVQj41i8T8nRb/TZRdfSCZxpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731568391; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gXZFceapMqHMoibagUXY8SOK+kBISqqWpJ4+T6DO3dQ=; b=nUP3iDEfOaFY50tEAKdHrWPnhJ3/CihvpaJ4rXA/N0l948bf/d7BglsKvx4myjECSI6ekq RwRpS5TXwFHrelILOGZyZz0FSfzjojD3f2emgzbJs6g082hfc0yBXQB32BazQeu7+9cE7c 71wabx3J9NwVaSeKK62qXiChBmiNFMG/oHHDfxDV9yhgKvPfGM5GuWGA6aZ7BtfTEHiRBy ETYJc3gmEwABk6kO8ALVracJRkUHezmuFyDO8Byhrn0IL3BKsXJ8nvFnTBNXVTnqnJe98l sIFkaCXx9LO4kcbx0UP19fBR1gNKeapfifvTHgefL5RZk7bnYq0Wg52yDxcsOA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731568391; a=rsa-sha256; cv=none; b=OQQUYPH/5tNZ3GtMDZI1dznIqX6Fm0n5N/h5xXaiUtKO4cUD+B469OqPhZLPvCvHHiACo0 VOA91giC1Q30HDcjcKlnL0u5PxCwgIu4YwhCl7gJ5Li/QecatxQ3T6v8ROwaHYYy6fiYTF 5YtaYTUDPeGaK+l06eLUpj4JHe8imHz8ZqJVREBBLgjtYPBdwFLrjQKECgkcUew39VhpM2 DFN7i/jJWg8OI+j0Wkk9alLcfV+7mjGHZ38UcA8wEAJj5MiAfR001ypu6oz3d2VtxYye7Z zhtnBFQypWTD1fS8CQskvjtrmY02YYaK2/Bt9zPjMLAPFfqFu9vfq1YCMSFxZw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xprw75PTPzTxF; Thu, 14 Nov 2024 07:13:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AE7DBUh051121; Thu, 14 Nov 2024 07:13:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AE7DBmM051118; Thu, 14 Nov 2024 07:13:11 GMT (envelope-from git) Date: Thu, 14 Nov 2024 07:13:11 GMT Message-Id: <202411140713.4AE7DBmM051118@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: 48ddd1b9f887 - main - ixgbe: Add support for 1Gbit DAC links List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 48ddd1b9f88753c6875566fbb67bc622453e4993 Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=48ddd1b9f88753c6875566fbb67bc622453e4993 commit 48ddd1b9f88753c6875566fbb67bc622453e4993 Author: Kevin Bowling AuthorDate: 2024-11-14 06:33:28 +0000 Commit: Kevin Bowling CommitDate: 2024-11-14 07:11:08 +0000 ixgbe: Add support for 1Gbit DAC links This is a relatively well known trick for the X520 (82599), can be useful for testing and lab settings. It's not an official standard or particularly common but ubiquitous Broadcom switch ASICs deal with it. We'll call it 1000Base-KX because it's SerDes on the passive cable and I don't think it's worth adding another media type for this. Reviewed by: emaste MFC after: 1 week Sponsored by: BBOX.io Differential Revision: https://reviews.freebsd.org/D47352 --- sys/dev/ixgbe/if_ix.c | 7 ++++++- sys/dev/ixgbe/ixgbe_82599.c | 11 +++++++++++ sys/dev/ixgbe/ixgbe_phy.c | 3 ++- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c index 80f288a4ccf0..f8a620295aa4 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -1315,9 +1315,11 @@ ixgbe_add_media_types(if_ctx_t ctx) } if (layer & IXGBE_PHYSICAL_LAYER_SFP_PLUS_CU || - layer & IXGBE_PHYSICAL_LAYER_SFP_ACTIVE_DA) + layer & IXGBE_PHYSICAL_LAYER_SFP_ACTIVE_DA) { ifmedia_add(sc->media, IFM_ETHER | IFM_10G_TWINAX, 0, NULL); + ifmedia_add(sc->media, IFM_ETHER | IFM_1000_KX, 0, NULL); + } if (layer & IXGBE_PHYSICAL_LAYER_10GBASE_LR) { ifmedia_add(sc->media, IFM_ETHER | IFM_10G_LR, 0, NULL); @@ -2323,6 +2325,9 @@ ixgbe_if_media_status(if_ctx_t ctx, struct ifmediareq * ifmr) case IXGBE_LINK_SPEED_10GB_FULL: ifmr->ifm_active |= IFM_10G_TWINAX | IFM_FDX; break; + case IXGBE_LINK_SPEED_1GB_FULL: + ifmr->ifm_active |= IFM_1000_KX | IFM_FDX; + break; } if (layer & IXGBE_PHYSICAL_LAYER_10GBASE_LR) switch (sc->link_speed) { diff --git a/sys/dev/ixgbe/ixgbe_82599.c b/sys/dev/ixgbe/ixgbe_82599.c index 1ecab83a4e92..b2b40371648b 100644 --- a/sys/dev/ixgbe/ixgbe_82599.c +++ b/sys/dev/ixgbe/ixgbe_82599.c @@ -441,6 +441,17 @@ s32 ixgbe_get_link_capabilities_82599(struct ixgbe_hw *hw, goto out; } + if (hw->phy.sfp_type == ixgbe_sfp_type_da_cu_core0 || + hw->phy.sfp_type == ixgbe_sfp_type_da_cu_core1) { + *speed = IXGBE_LINK_SPEED_10GB_FULL; + *autoneg = true; + + if (hw->phy.multispeed_fiber) + *speed |= IXGBE_LINK_SPEED_1GB_FULL; + + goto out; + } + /* * Determine link capabilities based on the stored value of AUTOC, * which represents EEPROM defaults. If AUTOC value has not diff --git a/sys/dev/ixgbe/ixgbe_phy.c b/sys/dev/ixgbe/ixgbe_phy.c index da7d16a514d0..218a9dac3b78 100644 --- a/sys/dev/ixgbe/ixgbe_phy.c +++ b/sys/dev/ixgbe/ixgbe_phy.c @@ -1436,7 +1436,8 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw) if (((comp_codes_1g & IXGBE_SFF_1GBASESX_CAPABLE) && (comp_codes_10g & IXGBE_SFF_10GBASESR_CAPABLE)) || ((comp_codes_1g & IXGBE_SFF_1GBASELX_CAPABLE) && - (comp_codes_10g & IXGBE_SFF_10GBASELR_CAPABLE))) + (comp_codes_10g & IXGBE_SFF_10GBASELR_CAPABLE)) || + (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE)) hw->phy.multispeed_fiber = true; /* Determine PHY vendor */ From nobody Thu Nov 14 10:08:15 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xpwp73Z1fz5cR9w; Thu, 14 Nov 2024 10:08:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xpwp732p5z40gZ; Thu, 14 Nov 2024 10:08:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731578895; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zY0SnxzxYYor0uYGyroxNJjaDzG1IBO0SrmaozVS1T8=; b=f1s6p/nqlJziaO0lAlBRtts6tlJ42qt6Vay9FZQwsYCM+TCqEcLMb3ECZj0LI9T+meixCJ 6C4QBRscIT9O17QlHHPn1llGctDsRYyZDliE7P1CvsbaNiTXTbTBqHHDFsnAhgOG/bxSEh xkQH3xXBlmVqSco4/gGyRV/tXdXHqs66wnDsbNId4Loxa5yZIgtFSDURWfkWdMftFulZIV E81MHwAIlFrLofzthWbvIdt1vCRz1K8Q32P9Wkx/nejAgn35eCN5o2vmdRUUWhvk0qfU+r R42ZkEX92xLf5uN1Lj5L2m2vl16z1eSuXnuxmDFIJxANVWDQIKJSh9UiJKZnfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731578895; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zY0SnxzxYYor0uYGyroxNJjaDzG1IBO0SrmaozVS1T8=; b=yPaLwO9V7AFOBDcK1xpVVihrhBdLi/3zPdN9MfAmt517QXg+l47IdKcfjivk+c2hZcBCo7 mpFjxB8CrUDqGmt5RhxGlDXJ7lI42jbjWJdsJ7nOUVfMZf20IaJk76sDTu+dSCv0Pw3IG+ 4bepJNgGvG2DSUu45/DcDbyIf35DCS76HSNEY/2czTF052/LRk6T8wu/irHgHpISR4mjtU BOJfh4OW4d6LFeXfnoZZUkBuHysmif6XH8e/p6H73ywHCCRNbhQdmgpS9ySn4DWsB4yig1 JTdePhZQijZxMNUuMpIA3Y1MyhR4zdvDIrRnPp+W5t5cnJh2pYrWO34vktY3bw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731578895; a=rsa-sha256; cv=none; b=WKlsYgk+s3EwED3o2O0RnMd7kCRfvqZaR27Fkv/apCu1HZGjmSu8jfy5laYTxae5S77q0n BRpvL77fywqWr2FR7TMDDzPvJ8Xosk5Rpy2d9Px0WZR/zaaMbrXObKFdQQw2k4Tkp9fJEX RYToraWPb1nchYxdvx29N1NY5HIO9Br6vljDloi8O6JFBMaj2fqW6ojgdd8TsSV7qk8ZTt 0sfKPMewYExNM3ddoSQfzKWkucrV5+rHWiZNiR/yWauU6aQZajh+QDptytJcL3GppsSr3Z ytNsW4FXq8OQvDakNgj8W4axVw4tR/nY2w+Swzmv665XH7K609FbWZEw1iNl0Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xpwp72f8tzZxD; Thu, 14 Nov 2024 10:08:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AEA8F48071348; Thu, 14 Nov 2024 10:08:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AEA8Fd6071345; Thu, 14 Nov 2024 10:08:15 GMT (envelope-from git) Date: Thu, 14 Nov 2024 10:08:15 GMT Message-Id: <202411141008.4AEA8Fd6071345@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Richard Scheffenegger Subject: git: dded4e9e524c - main - tcp: change SOCKBUF_* macros to SOCK_[RECV|SEND]BUF_* macros List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dded4e9e524ca1fcf4ad1c8822817ec010caf5e6 Auto-Submitted: auto-generated The branch main has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=dded4e9e524ca1fcf4ad1c8822817ec010caf5e6 commit dded4e9e524ca1fcf4ad1c8822817ec010caf5e6 Author: Richard Scheffenegger AuthorDate: 2024-11-13 23:41:44 +0000 Commit: Richard Scheffenegger CommitDate: 2024-11-14 01:08:12 +0000 tcp: change SOCKBUF_* macros to SOCK_[RECV|SEND]BUF_* macros Change the older LOCK related macros over to the dedicated send/recv buffer macros in the base tcp stack. No functional change intended. Reviewed By: tuexen, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D47567 --- sys/netinet/tcp_input.c | 28 ++++++++++++++-------------- sys/netinet/tcp_output.c | 22 +++++++++++----------- sys/netinet/tcp_reass.c | 4 ++-- sys/netinet/tcp_subr.c | 4 ++-- sys/netinet/tcp_usrreq.c | 10 +++++----- 5 files changed, 34 insertions(+), 34 deletions(-) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index e5f5e09e57d8..3dfdb13994a5 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -1512,7 +1512,7 @@ tcp_handle_wakeup(struct tcpcb *tp) struct socket *so = tptosocket(tp); tp->t_flags &= ~TF_WAKESOR; - SOCKBUF_LOCK_ASSERT(&so->so_rcv); + SOCK_RECVBUF_LOCK_ASSERT(so); sorwakeup_locked(so); } } @@ -1939,7 +1939,7 @@ tcp_do_segment(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th, newsize = tcp_autorcvbuf(m, th, so, tp, tlen); /* Add data to socket buffer. */ - SOCKBUF_LOCK(&so->so_rcv); + SOCK_RECVBUF_LOCK(so); if (so->so_rcv.sb_state & SBS_CANTRCVMORE) { m_freem(m); } else { @@ -2819,9 +2819,9 @@ enter_recovery: * is new data available to be sent * or we need to send an ACK. */ - SOCKBUF_LOCK(&so->so_snd); + SOCK_SENDBUF_LOCK(so); avail = sbavail(&so->so_snd); - SOCKBUF_UNLOCK(&so->so_snd); + SOCK_SENDBUF_UNLOCK(so); if (tp->t_flags & TF_ACKNOW || (avail >= SEQ_SUB(tp->snd_nxt, tp->snd_una))) { @@ -2998,7 +2998,7 @@ process_ACK: tcp_xmit_timer(tp, ticks - tp->t_rtttime); } - SOCKBUF_LOCK(&so->so_snd); + SOCK_SENDBUF_LOCK(so); /* * Clear t_acktime if remote side has ACKd all data in the * socket buffer and FIN (if applicable). @@ -3029,7 +3029,7 @@ process_ACK: * skip rest of ACK processing. */ if (acked == 0) { - SOCKBUF_UNLOCK(&so->so_snd); + SOCK_SENDBUF_UNLOCK(so); goto step6; } @@ -3165,11 +3165,11 @@ step6: * soreceive. It's hard to imagine someone * actually wanting to send this much urgent data. */ - SOCKBUF_LOCK(&so->so_rcv); + SOCK_RECVBUF_LOCK(so); if (th->th_urp + sbavail(&so->so_rcv) > sb_max) { th->th_urp = 0; /* XXX */ thflags &= ~TH_URG; /* XXX */ - SOCKBUF_UNLOCK(&so->so_rcv); /* XXX */ + SOCK_RECVBUF_UNLOCK(so); /* XXX */ goto dodata; /* XXX */ } /* @@ -3195,7 +3195,7 @@ step6: sohasoutofband(so); tp->t_oobflags &= ~(TCPOOB_HAVEDATA | TCPOOB_HADDATA); } - SOCKBUF_UNLOCK(&so->so_rcv); + SOCK_RECVBUF_UNLOCK(so); /* * Remove out of band data so doesn't get presented to user. * This can happen independent of advancing the URG pointer, @@ -3268,7 +3268,7 @@ dodata: /* XXX */ thflags = tcp_get_flags(th) & TH_FIN; TCPSTAT_INC(tcps_rcvpack); TCPSTAT_ADD(tcps_rcvbyte, tlen); - SOCKBUF_LOCK(&so->so_rcv); + SOCK_RECVBUF_LOCK(so); if (so->so_rcv.sb_state & SBS_CANTRCVMORE) m_freem(m); else @@ -3980,7 +3980,7 @@ tcp_mss(struct tcpcb *tp, int offer) * if the mss is larger than the socket buffer, decrease the mss. */ so = inp->inp_socket; - SOCKBUF_LOCK(&so->so_snd); + SOCK_SENDBUF_LOCK(so); if ((so->so_snd.sb_hiwat == V_tcp_sendspace) && metrics.rmx_sendpipe) bufsize = metrics.rmx_sendpipe; else @@ -3994,7 +3994,7 @@ tcp_mss(struct tcpcb *tp, int offer) if (bufsize > so->so_snd.sb_hiwat) (void)sbreserve_locked(so, SO_SND, bufsize, NULL); } - SOCKBUF_UNLOCK(&so->so_snd); + SOCK_SENDBUF_UNLOCK(so); /* * Sanity check: make sure that maxseg will be large * enough to allow some data on segments even if the @@ -4015,7 +4015,7 @@ tcp_mss(struct tcpcb *tp, int offer) tp->t_flags2 &= ~TF2_PROC_SACK_PROHIBIT; } - SOCKBUF_LOCK(&so->so_rcv); + SOCK_RECVBUF_LOCK(so); if ((so->so_rcv.sb_hiwat == V_tcp_recvspace) && metrics.rmx_recvpipe) bufsize = metrics.rmx_recvpipe; else @@ -4027,7 +4027,7 @@ tcp_mss(struct tcpcb *tp, int offer) if (bufsize > so->so_rcv.sb_hiwat) (void)sbreserve_locked(so, SO_RCV, bufsize, NULL); } - SOCKBUF_UNLOCK(&so->so_rcv); + SOCK_RECVBUF_UNLOCK(so); /* Check the interface for TSO capabilities. */ if (cap.ifcap & CSUM_TSO) { diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index 860b785b631b..8f19885f6b9b 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -359,7 +359,7 @@ after_sack_rexmit: if (tp->t_flags & TF_NEEDSYN) flags |= TH_SYN; - SOCKBUF_LOCK(&so->so_snd); + SOCK_SENDBUF_LOCK(so); /* * If in persist timeout with window of 0, send 1 byte. * Otherwise, if window is small but nonzero @@ -752,11 +752,11 @@ dontupdate: * No reason to send a segment, just return. */ just_return: - SOCKBUF_UNLOCK(&so->so_snd); + SOCK_SENDBUF_UNLOCK(so); return (0); send: - SOCKBUF_LOCK_ASSERT(&so->so_snd); + SOCK_SENDBUF_LOCK_ASSERT(so); if (len > 0) { if (len >= tp->t_maxseg) tp->t_flags2 |= TF2_PLPMTU_MAXSEGSNT; @@ -886,7 +886,7 @@ send: if (tp->t_port) { if (V_tcp_udp_tunneling_port == 0) { /* The port was removed?? */ - SOCKBUF_UNLOCK(&so->so_snd); + SOCK_SENDBUF_UNLOCK(so); return (EHOSTUNREACH); } hdrlen += sizeof(struct udphdr); @@ -978,7 +978,7 @@ send: * byte of the payload can be put into the * TCP segment. */ - SOCKBUF_UNLOCK(&so->so_snd); + SOCK_SENDBUF_UNLOCK(so); error = EMSGSIZE; sack_rxmit = 0; goto out; @@ -1060,7 +1060,7 @@ send: m = m_gethdr(M_NOWAIT, MT_DATA); if (m == NULL) { - SOCKBUF_UNLOCK(&so->so_snd); + SOCK_SENDBUF_UNLOCK(so); error = ENOBUFS; sack_rxmit = 0; goto out; @@ -1103,7 +1103,7 @@ send: tso = 0; } if (m->m_next == NULL) { - SOCKBUF_UNLOCK(&so->so_snd); + SOCK_SENDBUF_UNLOCK(so); (void) m_free(m); error = ENOBUFS; sack_rxmit = 0; @@ -1120,9 +1120,9 @@ send: if (((uint32_t)off + (uint32_t)len == sbused(&so->so_snd)) && !(flags & TH_SYN)) flags |= TH_PUSH; - SOCKBUF_UNLOCK(&so->so_snd); + SOCK_SENDBUF_UNLOCK(so); } else { - SOCKBUF_UNLOCK(&so->so_snd); + SOCK_SENDBUF_UNLOCK(so); if (tp->t_flags & TF_ACKNOW) TCPSTAT_INC(tcps_sndacks); else if (flags & (TH_SYN|TH_FIN|TH_RST)) @@ -1147,7 +1147,7 @@ send: m->m_data += max_linkhdr; m->m_len = hdrlen; } - SOCKBUF_UNLOCK_ASSERT(&so->so_snd); + SOCK_SENDBUF_UNLOCK_ASSERT(so); m->m_pkthdr.rcvif = (struct ifnet *)0; #ifdef MAC mac_inpcb_create_mbuf(inp, m); @@ -1687,7 +1687,7 @@ timer: if (IN_RECOVERY(tp->t_flags)) tp->sackhint.prr_out -= len; } - SOCKBUF_UNLOCK_ASSERT(&so->so_snd); /* Check gotos. */ + SOCK_SENDBUF_UNLOCK_ASSERT(so); /* Check gotos. */ switch (error) { case EACCES: case EPERM: diff --git a/sys/netinet/tcp_reass.c b/sys/netinet/tcp_reass.c index 5768d90a9337..5f73e83dc8a9 100644 --- a/sys/netinet/tcp_reass.c +++ b/sys/netinet/tcp_reass.c @@ -957,7 +957,7 @@ new_entry: flags = tcp_get_flags(th) & TH_FIN; TCPSTAT_INC(tcps_rcvoopack); TCPSTAT_ADD(tcps_rcvoobyte, *tlenp); - SOCKBUF_LOCK(&so->so_rcv); + SOCK_RECVBUF_LOCK(so); if (so->so_rcv.sb_state & SBS_CANTRCVMORE) { m_freem(m); } else { @@ -1058,7 +1058,7 @@ present: #endif return (0); } - SOCKBUF_LOCK(&so->so_rcv); + SOCK_RECVBUF_LOCK(so); do { tp->rcv_nxt += q->tqe_len; flags = q->tqe_flags & TH_FIN; diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 668d218b34a8..8bf011afe855 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -3346,7 +3346,7 @@ tcp_mtudisc(struct inpcb *inp, int mtuoffer) tcp_mss_update(tp, -1, mtuoffer, NULL, NULL); so = inp->inp_socket; - SOCKBUF_LOCK(&so->so_snd); + SOCK_SENDBUF_LOCK(so); /* If the mss is larger than the socket buffer, decrease the mss. */ if (so->so_snd.sb_hiwat < tp->t_maxseg) { tp->t_maxseg = so->so_snd.sb_hiwat; @@ -3361,7 +3361,7 @@ tcp_mtudisc(struct inpcb *inp, int mtuoffer) tp->t_flags2 &= ~TF2_PROC_SACK_PROHIBIT; } } - SOCKBUF_UNLOCK(&so->so_snd); + SOCK_SENDBUF_UNLOCK(so); TCPSTAT_INC(tcps_mturesent); tp->t_rtttime = 0; diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index 8326c67cf085..9a6e80363f0c 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -1125,9 +1125,9 @@ tcp_usr_send(struct socket *so, int flags, struct mbuf *m, /* * XXXRW: PRUS_EOF not implemented with PRUS_OOB? */ - SOCKBUF_LOCK(&so->so_snd); + SOCK_SENDBUF_LOCK(so); if (sbspace(&so->so_snd) < -512) { - SOCKBUF_UNLOCK(&so->so_snd); + SOCK_SENDBUF_UNLOCK(so); error = ENOBUFS; goto out; } @@ -1142,7 +1142,7 @@ tcp_usr_send(struct socket *so, int flags, struct mbuf *m, if (tp->t_acktime == 0) tp->t_acktime = ticks; sbappendstream_locked(&so->so_snd, m, flags); - SOCKBUF_UNLOCK(&so->so_snd); + SOCK_SENDBUF_UNLOCK(so); m = NULL; if (nam && tp->t_state < TCPS_SYN_SENT) { /* @@ -1237,9 +1237,9 @@ tcp_usr_ready(struct socket *so, struct mbuf *m, int count) } tp = intotcpcb(inp); - SOCKBUF_LOCK(&so->so_snd); + SOCK_SENDBUF_LOCK(so); error = sbready(&so->so_snd, m, count); - SOCKBUF_UNLOCK(&so->so_snd); + SOCK_SENDBUF_UNLOCK(so); if (error) { INP_WUNLOCK(inp); return (error); From nobody Thu Nov 14 14:47:30 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xq30M2LzRz5clMk; Thu, 14 Nov 2024 14:47:31 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xq30M1s8Bz4Zfv; Thu, 14 Nov 2024 14:47:31 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731595651; 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=nnSM/DtVM8pmYnNWl9tmZEoD/sm16dSJUaNFzb5OHQI=; b=uBLHJQ0qQjfsQzK5qdKg/zgyhQdGy3tAAfgHG8jeBx5HEGoGaHVoxsm06ZL8OvNjA0qRGj jaj8GiIjwMCp6Hm7ys9FGa5wj2csAUVyXXyms0eG5O8xtQZEdKY9VtgU6hvgsOupAZJkTP UCC9PE/eyPuXqnuU55qfOwobsl2naW7R/QxTKzj+oOsZz9M61zK2N5o8DP2CDqR1TNFrEL Rukm8+3Rj0yA2t7RQHCwZyW9ZOGuefK+uQthGho3vJ1CAWGGa1YYnTaeOYkImmUUxeuCLx NGBUv11tOwiALnBmLEOtOomThTtsD4t71haP67R7WOqdYxPj3rWmDcoiiBP+xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731595651; 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=nnSM/DtVM8pmYnNWl9tmZEoD/sm16dSJUaNFzb5OHQI=; b=BeJgyjpy2ksYUBnK9LeWM3nWELSHqnAkZRoDGOI9ZjdakrX9SY8EMsoGEmFHzrzgQhpW5z AH396AK9ULXMJQsJPfV15jOWSKAMKuQWaJAjgwpBh8M+ae7zSwg+6UUQstkCnKO0CgA5wi AKDw8R5TsdZ0bckY+hqTRspsunfb3M/zI9n0HXrf+Dsf66lRaMabNT4fLO6ofQGMzkW+mv wG54eHCvCyxX89RcnIe/wa0ppRWYd/VTGUV5UcRnJ7BUL+VgtjCMIDp9pRcm6MpbGPgsAv mKvUWLXDWh+tX+wJi8C4pFl5HWZ8xs0FrsLvy4wLDwp/8KVOAhzrWVSFGpB2Bg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731595651; a=rsa-sha256; cv=none; b=TDc73akLOEDqbZxFrct9F/mFmDW2b50kJ0sTinHF/hDYg0qm1OOsYeIOj4CRURDxbrh6Gw XlAvjeB+IjXPRqxsrtKi9ToApDFg+kLL/h0UokkSsiZ8O8D3GqegEWlfCFEpjB3u8249ra nBGwjI/HJlPjUxc39ekBV+4xUV7n0m+8DMUM+f6QO5vVez7U9wwlrVVScyJjkTFfsKPa4w orOAdwi8RQ9AqqTtspZurT092OPqNNg65M/oCkXfZw7/sRvW4YYqXxtZwDqGwHqQ22bq1O QiwbZwXTQ83wBGAQYkblY+7pBfpEhHOhSMkMA/8ewMq4vbDSByx3kkvC8HPlOA== Received: from [IPV6:2601:5c0:4200:b830:e12f:83c9:e3d1:29c8] (unknown [IPv6:2601:5c0:4200:b830:e12f:83c9:e3d1:29c8]) (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 4Xq30L6lvxzj1K; Thu, 14 Nov 2024 14:47:30 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <4d81d34f-4749-4911-b302-eca9166e4be7@FreeBSD.org> Date: Thu, 14 Nov 2024 09:47:30 -0500 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: e85eaa930862 - main - Have rtld query the page size from the kernel Content-Language: en-US To: Jessica Clarke Cc: Andrew Turner , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" References: <202204071438.237Ecn2A012737@gitrepo.freebsd.org> <92a05dfe-683c-43d9-bd29-3110e89be275@FreeBSD.org> <768D45F9-2F02-4BA1-BFB7-51685486CFCC@freebsd.org> From: John Baldwin In-Reply-To: <768D45F9-2F02-4BA1-BFB7-51685486CFCC@freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 11/13/24 12:10, Jessica Clarke wrote: > On 13 Nov 2024, at 19:44, John Baldwin wrote: >> >> On 4/7/22 07:38, Andrew Turner wrote: >>> The branch main has been updated by andrew: >>> URL: https://cgit.FreeBSD.org/src/commit/?id=e85eaa930862d5b4dc917bc31e8d7254a693635d >>> commit e85eaa930862d5b4dc917bc31e8d7254a693635d >>> Author: Andrew Turner >>> AuthorDate: 2022-04-04 15:05:40 +0000 >>> Commit: Andrew Turner >>> CommitDate: 2022-04-07 14:37:37 +0000 >>> Have rtld query the page size from the kernel >>> To allow for a dynamic page size on arm64 have the runtime linker >>> query the kernel for the currentl page size. >>> Reviewed by: kib >>> Sponsored by: The FreeBSD Foundation >>> Differential Revision: https://reviews.freebsd.org/D34765 >> >> This broke relro handling for rtld. The reason is that init_pagesizes() is >> called after parsing the program headers for rltd in init_rtld(). As a result, >> page_size is 0 when rtld_round_page() is called so the relro_size is 0. The >> RTLD_INIT_EARLY_PAGESIZES case was for ia64, and in the early case it's probably >> not safe to call sysctl? If it is safe to call sysctl, we could just always >> init pagesizes early? > > It looks like there are a few things going on: > > 1. relocate_object calls obj_enforce_relro if !obj->mainprog, so will > try to enforce RELRO for RTLD itself whilst page_size is 0 > > 2. init_rtld later calls obj_enforce_relro for obj_rtld, after > page_size has been initialised > > 3. init_rtld is careful to avoid using global variables until it’s > called relocate_objects for RTLD itself, but by hiding accesses to > page_size away in rtld_*_page that’s no longer true (definitely not > true in the case of text relocations, for example, though whether it > also occurs for other cases we care more about I don’t know) > > So I think there are a couple of things to fix: > > 1. Stop accessing page_size prior to relocate_objects returning for > RTLD itself > > 2. Stop enforcing RELRO twice for RTLD (e.g. add && obj != rtldobj to > relocate_object’s case) > > At least, that’s what I’ve inferred from reading the code. > > Though, to be honest, things might be rather nicer if we just made > .rtld_start responsible for relocating RTLD itself prior to calling > init_rtld, that’s what we have to do for CHERI, as do arm, powerpc and > powerpc64, and it means you can use globals from the start in init_rtld. I've done 2) locally which fixed my immediate issue. I agree though that having all arches implement rtld_relocate_nonplt_self() which is called before rtld() would be nicer. -- John Baldwin From nobody Thu Nov 14 14:58:21 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xq3Ds2z4Pz5cmBB; Thu, 14 Nov 2024 14:58: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xq3Ds2SrBz4cKv; Thu, 14 Nov 2024 14:58:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731596301; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FkxPacgNRlnUocwYcX5Npf5apzisPlQKOGO3GysE+jw=; b=L7keL4WU5g4tJjIiBVtv+6NPFs9Y/wFshYC8NlRXfvF9fPFx5SXxKwXu+Nu55tEwpgo8I6 qEtgitTclI7pLymUvGhQtdnWToiqI0lYh1/hvXncMLiZkwWN3rdVI3PMyHi+8N9Mu9/vBE +d/17lFg8iC3kWRXsJfx9iSOy7pUwBGOUTH5Ma8mJJQvMXeYuuRlnRe+7HsvHnkTvP1wI1 GJMcahSUSf08B5lRG48E7S17L87GZ9pg1/ExtDsBdX4VVhbFl8Jog0/8JdiPEs2yF9AMv5 N/+GUeKsKPQiFQkl33bfbYnF8cToPyGn2YwTWy9zHTKuoiSzrPjvx7JKzB3ZVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731596301; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FkxPacgNRlnUocwYcX5Npf5apzisPlQKOGO3GysE+jw=; b=jIk9Zb6ufyGvapssRDX7aDgj2L2u4tzWqHJhevJ6l1Vghao8uyq49bju92TO6rNIFr+Cvs n9BNl4HX+eCGxT+dZHfi4FE0AIL6twiKltswXSzdgOz9I1Nof+fLEAd6It2dZcogEOd1wm RiijR5DZ8spIVN3dpjJHSWA9Adza0rylwb/EU63vCAqW40pZo7NhEmp9U396Syj0Bt9fvI DBnr7ofi2FUY1bGtTPFhArsJqZzFlr3J6GXvDuSx2Rw/deohgcTjWTzA7WVqR1f5RQRsSA C8qDVZM1wrtzzVPLDsOb7N2HvHSeJkSr2CZTGLefIGEhfHvbss84m4+7SGZTAw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731596301; a=rsa-sha256; cv=none; b=Lsg5wY4ff0e4rgqWqR0DwF4eLN070NImNHj/nrmhV+cduPyL+OLi2rNpugJbXytvKkbHpP r2EV1IcqKmK+NNpo43bN75QOFIV6SXCak8Z6C/Z59Frp0poiifbJuDou7i/RllrIcog8QE Q/lrC9DyXXMrwTZUcGoU7i+V7jhhwcEDHbzgC6bG2aEynhu60GD6YUqvzj56+q4T8kKvVf dTAWRd3hNaOqnlOW9FBn9ggnv2EwSNiSm8uz04cgfTtyZ1nw2PfWQa6pXbHpaQDBX4b5Gz KRPrH2awtMv7+r0ULpCsEvO7n3itcr9VZYObRF0JNJZ9hEGEXHIr4XS6kMgqrg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xq3Ds247dzkBW; Thu, 14 Nov 2024 14:58:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AEEwLv6006708; Thu, 14 Nov 2024 14:58:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AEEwLPi006705; Thu, 14 Nov 2024 14:58:21 GMT (envelope-from git) Date: Thu, 14 Nov 2024 14:58:21 GMT Message-Id: <202411141458.4AEEwLPi006705@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 73da0265c29c - main - locks: Use %p to print uintptr_t 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 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: 73da0265c29c79641dab3e6b98452bd5afca01fb Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=73da0265c29c79641dab3e6b98452bd5afca01fb commit 73da0265c29c79641dab3e6b98452bd5afca01fb Author: John Baldwin AuthorDate: 2024-11-14 14:57:14 +0000 Commit: John Baldwin CommitDate: 2024-11-14 14:57:56 +0000 locks: Use %p to print uintptr_t values Pointers are not the same shape as sizes on CHERI architectures. Cast to void * and print with %p instead. Obtained from: CheriBSD Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D47342 --- sys/kern/kern_mutex.c | 2 +- sys/kern/kern_rwlock.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/kern/kern_mutex.c b/sys/kern/kern_mutex.c index fa043fa7e124..c04412688979 100644 --- a/sys/kern/kern_mutex.c +++ b/sys/kern/kern_mutex.c @@ -1072,7 +1072,7 @@ __mtx_unlock_sleep(volatile uintptr_t *c, uintptr_t v) _mtx_release_lock_quick(m); ts = turnstile_lookup(&m->lock_object); if (__predict_false(ts == NULL)) { - panic("got NULL turnstile on mutex %p v %zx", m, v); + panic("got NULL turnstile on mutex %p v %p", m, (void *)v); } if (LOCK_LOG_TEST(&m->lock_object, opts)) CTR1(KTR_LOCK, "_mtx_unlock_sleep: %p contested", m); diff --git a/sys/kern/kern_rwlock.c b/sys/kern/kern_rwlock.c index c7e377c8f77a..3286fce76d96 100644 --- a/sys/kern/kern_rwlock.c +++ b/sys/kern/kern_rwlock.c @@ -843,8 +843,8 @@ __rw_runlock_hard(struct rwlock *rw, struct thread *td, uintptr_t v */ ts = turnstile_lookup(&rw->lock_object); if (__predict_false(ts == NULL)) { - panic("got NULL turnstile on rwlock %p passedv %zx v %zx", - rw, passedv, v); + panic("got NULL turnstile on rwlock %p passedv %p v %p", + rw, (void *)passedv, (void *)v); } turnstile_broadcast(ts, queue); turnstile_unpend(ts); @@ -1288,8 +1288,8 @@ __rw_wunlock_hard(volatile uintptr_t *c, uintptr_t v LOCK_FILE_LINE_ARG_DEF) ts = turnstile_lookup(&rw->lock_object); if (__predict_false(ts == NULL)) { - panic("got NULL turnstile on rwlock %p passedv %zx v %zx", rw, - passedv, v); + panic("got NULL turnstile on rwlock %p passedv %p v %p", rw, + (void *)passedv, (void *)v); } turnstile_broadcast(ts, queue); turnstile_unpend(ts); From nobody Thu Nov 14 14:58:22 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xq3Dt5KZnz5cmDC; Thu, 14 Nov 2024 14:58: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xq3Dt3LGXz4ccC; Thu, 14 Nov 2024 14:58:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731596302; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MeuoqBnGyM8/HJGrY4ZnTAtfIXHzQ5EsU9pIgOKflEE=; b=ZX3dVrJS/hswCLOOWd4lRaZK3gyU4WKooWELEgoetCMCtAcAnrD7Aatmt6e4DS1+Ic59Xw m9fIuekC8LFhGcKIeFgDkveU7Uqh5FV7FlPNGyuNRwIjqi4ztNePeKkdBk+5oiHJP1Fnha uAKfwEIqsJiORbmcRuq0fo4bHnNKVxcWXuEFy1TsI3SNNZhR1BGjo45M9+ZgqGciwBG6BL EeBnVVb6mpJ1hM5GsglF1d4VyNyMAMlgVWVBVfldoVJN9GS5i1VfJ7Qn93I0CgWMHgKYFg 9G3kJhPDxRiwg0WUxdE8eP0LSyWE6pyKBoSNm5gSTtwphR3oHMAG9j6R/sqc/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731596302; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MeuoqBnGyM8/HJGrY4ZnTAtfIXHzQ5EsU9pIgOKflEE=; b=uCyuUeD1MHeWcK9Ql22roE48nRQbJp3vEULpLG/Naja+1sJH/CAIMZZICEbhWuYtDIU82Z fdujW4j6vWEAkg76hH5M0UhYHeFXD3NxOIE08bI2FtFjV+FLkeS1APleDp/uMM/Y+XbIJ0 OOavqpWBN2bYpHcEmB1EOWUNtDbGDoloAnhYvUkMVfSmsD9dMvns4XAfla9ffKJ+PV83hj BNN/n6ZhV+qyEavSBk1Nt4vhC1WNBkOl+cwzEPsuPvBEMsKhFtJXSwiVWste5QQOfn21Id YxsFZRlLER3p4bOS0B3cHg7USzUR4WwdNMVISyybyBSAfw3t+e0aRDPj5EtqjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731596302; a=rsa-sha256; cv=none; b=dh72xgGe1M1FFxFH+UCeDgJw/QWkvcxwkb2gAYYQsj9oWOirBOkZKp+akljnbHzZ6DNWkg QlcfS2SE3X0qXd1eGExtC5og+F0arbUW5RYTTukvJqIvJvV+1Gry93riVe5fQHaFjW8Vly /jam6w5+BJTzrk4wPY+zZh6PFBA7nvMdmpGeYE2QGhRb7JQ/JcYI/xiWhheXshmYkwzjxd mjUMa6CLvK4mZgT/jAiCbplqKmbJ4sx/mLkIahVjXfvVG5hgJ4LQ2GCI/YUpF3Y8ykBOK1 /d2+Fvq0KADCrcaartxIixU00B2Z4Y3a2P4Th9LPj23IgXWlmdgepgTsDa3OUA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xq3Dt2xpLzkDN; Thu, 14 Nov 2024 14:58:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AEEwMUl006773; Thu, 14 Nov 2024 14:58:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AEEwMe5006770; Thu, 14 Nov 2024 14:58:22 GMT (envelope-from git) Date: Thu, 14 Nov 2024 14:58:22 GMT Message-Id: <202411141458.4AEEwMe5006770@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 9d4428ad0239 - main - : Don't include in the kernel List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9d4428ad0239c9d0c2795a7b34caa726873d963e Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=9d4428ad0239c9d0c2795a7b34caa726873d963e commit 9d4428ad0239c9d0c2795a7b34caa726873d963e Author: John Baldwin AuthorDate: 2024-11-14 14:57:29 +0000 Commit: John Baldwin CommitDate: 2024-11-14 14:58:09 +0000 : Don't include in the kernel Reviewed by: kevans Obtained from: CheriBSD Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D47519 --- sys/sys/libkern.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/libkern.h b/sys/sys/libkern.h index ad64d0fb0a57..b9d395ba151f 100644 --- a/sys/sys/libkern.h +++ b/sys/sys/libkern.h @@ -334,7 +334,7 @@ signed_extend32(uint32_t bitmap, int lsb, int width) #define FNM_IGNORECASE FNM_CASEFOLD #define FNM_FILE_NAME FNM_PATHNAME -#if __has_include() +#if !defined(_KERNEL) && __has_include() #include /* __ssp_real */ #else #define __ssp_real(fun) fun From nobody Thu Nov 14 15:32:58 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xq40p2kCGz5cp0w; Thu, 14 Nov 2024 15:32: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xq40p29ZGz4hDk; Thu, 14 Nov 2024 15:32:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731598378; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Lrexc3GXQegq625RnAz7UoQXbP6bN1iIHjtHF2sm9IM=; b=N0ou7Y700iKmo0r8+C9BwMDylMX462DlJY5WyW4j51e2k2M3+znm0IAs4u1tYADxTapjaS XesfKfcFCRXVhCXx+UXObXndnfrzpZIo3yZdI8Wfw4pPXKgU3ZSw0Lf3zTQSueDfiOgUbC KFLq4OSDrtBCZNC8YMh/ACntq5odXVKCWrhFfq6D1akHxSLAGiE4srIIAvN//nGUL/FoQO ME7T/2aHksGWdTx47ktQUfi7QFMjnGGIqDtAaPzO8NvGXnd/BwL7+DsmRx/upvkWKrt9hU le2Tqj1KCjhb0rSg/5oSfxM8oU7/UUT7S5LbvX9ehzX794ltA5QM16zLSr92DQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731598378; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Lrexc3GXQegq625RnAz7UoQXbP6bN1iIHjtHF2sm9IM=; b=Pir8UCxzNGnEzyUwkEJxiYsh7DiFFGEFEPdCYrKSHh2Ht/iHAmo/HBIy3qTHsjaGxhyi/s fozLXi15zckYJ4+G+FDFkogXAtk7NsknOHQiOurRUxD6TWciHaqF43e7+xL+fd4xdkFJ0m pCazCtpr0KoFqOv6UdMQG2jgHN09hP2QFHJJnMCgzS/N1DQTTU90mDrholbBO9lfj1MEko xFCkPIYl4Rfk/zPSQTkYhtk1ocbidEsa9na/9HP8vLhM3l22EtNs0Yg+CaK/r3+3cednZ5 mcxafLWxK/AwsoTVdrYtZ1q6yPfPXMOw3MOun6YLBazPBQDP+UkCWb+Ijbp46A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731598378; a=rsa-sha256; cv=none; b=ra4T9gJPo1fOI/TAaa00MU6SIHDujZe7YdVL+bhiL4eLKZdH40R7oVfBdjf3uVknw9/HXS Qw6Tz1UCpwSDmQT3MLOsrBImFqcMITV12+Y6eI2nkD8zWE8kHXSgxGXdyGiO9Ie9orp8k4 Z5ZOE0xCNVk5X+5axZrHsF9gcbhsA4HhYnYaRHtmLP1Tsu6tMtQgOiBg8lUIsrylTT/nAn jrnsj4rjR0BXZ1u8lmzkwIKsEfTBX6+Nw6isfElznrnM+x3H4o7MoxxfG9sJjSTfv02Q5y Y+WpU7Joiei7COraW8YiQo067H4tQpLbryig1+SF0rbSciTBl2LZmXSjKlyg/g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xq40p1mPLzkfC; Thu, 14 Nov 2024 15:32:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AEFWwh4079708; Thu, 14 Nov 2024 15:32:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AEFWwix079705; Thu, 14 Nov 2024 15:32:58 GMT (envelope-from git) Date: Thu, 14 Nov 2024 15:32:58 GMT Message-Id: <202411141532.4AEFWwix079705@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Justin Hibbits Subject: git: 893d044346d5 - main - Bump __FreeBSD_version for hiding struct ifnet List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 893d044346d5ae5fe10cc188b8b0762efd2a5b27 Auto-Submitted: auto-generated The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=893d044346d5ae5fe10cc188b8b0762efd2a5b27 commit 893d044346d5ae5fe10cc188b8b0762efd2a5b27 Author: Justin Hibbits AuthorDate: 2024-11-14 15:33:35 +0000 Commit: Justin Hibbits CommitDate: 2024-11-14 15:34:45 +0000 Bump __FreeBSD_version for hiding struct ifnet Reported by: olivie@ Sponsored by: Juniper Networks, Inc. --- sys/sys/param.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/param.h b/sys/sys/param.h index 7647c0d6e518..388b3a05f718 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -73,7 +73,7 @@ * cannot include sys/param.h and should only be updated here. */ #undef __FreeBSD_version -#define __FreeBSD_version 1500026 +#define __FreeBSD_version 1500027 /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From nobody Thu Nov 14 15:48:51 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xq4M80NrVz5cpdR; Thu, 14 Nov 2024 15:48: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xq4M75dYhz4jm7; Thu, 14 Nov 2024 15: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=1731599331; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p0d7uxElM6gynSzP3AmAf9WaFpR7wG+mKc/DFilUCI8=; b=DCEdP6SpUkX+mVlmrA5YY+esW3jeBJLBjF5NH68nbPjbPXYvx42Q+cR2bUgd40PATDGgGQ dgOHCgax+lKqfxWml1y0wiMRDQX8eURmsvs2YUchWM1wo1d8y/b75BA8ReXSI7cKyBNb/+ V4/yXLgSEPXMQeINU2mNNYo6+GazNbDRW7EP0CDzfrZpTozTxPxPbvRsz827bUEwlCWLX8 l2NL5iaP+myh4Xb7kWZnKmWezR3dRtV3lE7orx4QpV/m7MUq35KrsSHllpWN6x/C1p9Hfz UtpnoHjxUg/BALPST5phF5u6a8qkrlLKwzO5cUfzILKCkPj/EyibpJjwfO5qWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731599331; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p0d7uxElM6gynSzP3AmAf9WaFpR7wG+mKc/DFilUCI8=; b=O5UFebsLT7yqK1ZEYFNgICxw8DbNvOn69dcVOirDiuILKE0jdKTpqBnaqqe/+Dmn2fjcr8 ZIvo3w14bd3QRJ8VOcf8uIsVqYaSSut3KvcqrIobFAF3Yom85O+I6s4Lhshtl4YEtykpT4 MOP/HqsFYyNLJMaCSVzTEXYK2bIjron72/G3wfcGEDXS7MzhRzzi8wM3/6cUyQX9uADDzw E8d0W+1+9dIzNpPWciJnVFpH3VLsxvwu85nplr2madB5M2xDrvgvXIC8nmNS+3q+jrmdan LvwH4QsWdQ3gmrOQUBF2WdalOKdQ3teILg0TQvsiJL3x/hfnzff9QvdWsxuLGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731599331; a=rsa-sha256; cv=none; b=pGrFYpzkOQIPnmdnXoUxuM9ezgtySDU4SSr+rlSr9POtDPPGiUrzTdMB1CpjaR+Uo4e0wZ fvV4mCEKNdWkerBFrYJzjTRN0A61RijH0q5GTsxHEaK/lSrY3ka8dNRwHH29z00BZqmKs5 Z5FXQCN4AwPaVsQaH9yKWa5D4OSO90UK1+/ojcpYTmPutUBC8JH2kxneDMjv8lauftNpJk W0wXCJQMgZVHTZXITnDWBl955PoWLptlsEefcTCVSIBwwI6Cc6n47+3HpxL49NDNs9LaDc xLqsg9dBmHzkHSc5jQVTPJZFqQXVGU9gdoiuYimZuhMiSvWGtsYIThmvui3NgA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xq4M75DppzlMc; Thu, 14 Nov 2024 15:48:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AEFmpHF000071; Thu, 14 Nov 2024 15:48:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AEFmpUs000068; Thu, 14 Nov 2024 15:48:51 GMT (envelope-from git) Date: Thu, 14 Nov 2024 15:48:51 GMT Message-Id: <202411141548.4AEFmpUs000068@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 02dc158215a6 - main - build: note that DESTDIR must be an absolute path List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 02dc158215a69c6439e5a0809e5f9c79e62c5fd1 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=02dc158215a69c6439e5a0809e5f9c79e62c5fd1 commit 02dc158215a69c6439e5a0809e5f9c79e62c5fd1 Author: Ed Maste AuthorDate: 2024-11-14 15:47:08 +0000 Commit: Ed Maste CommitDate: 2024-11-14 15:48:26 +0000 build: note that DESTDIR must be an absolute path PR: 282737 Sponsored by: The FreeBSD Foundation --- share/man/man7/build.7 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/share/man/man7/build.7 b/share/man/man7/build.7 index ca0d72e89c67..32c33aa3d730 100644 --- a/share/man/man7/build.7 +++ b/share/man/man7/build.7 @@ -500,6 +500,9 @@ The directory hierarchy prefix where built objects will be installed. If not set, .Va DESTDIR defaults to the empty string. +If set, +.Va DESTDIR +must specify an absolute path. .It Va MAKEOBJDIRPREFIX Defines the prefix for directory names in the tree of built objects. Defaults to From nobody Thu Nov 14 16:12:52 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xq4tr5hrcz5crFh; Thu, 14 Nov 2024 16:12: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xq4tr5Bh2z4pKB; Thu, 14 Nov 2024 16:12:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731600772; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dobCKEU93mqNRXOSs9q6L7TLN4OCQKHnVxNPNOVAWyE=; b=IloBZJ03/xETAvtJlSSA7/vuDJBOwj9OGyWxa5hMBXZGxShjw8r7mmXXy0j9pzkw5V+fyw 1/d89w6Gy+uMqwaz6mWp1qWyoUN8rfPePlSq3GghgyfZBCVHIEmNNkAf9bYmd2Jemn2OLK llnuPl3mcAPAjsJ69c8zgQbw2kUmgzuNu9S/kkVIhAAkPB8G/mu0VF1XFmf/ePI6Om2khR vkSAnHPxzLFaZJ89UfJzVnGLvL4VQ8Ew+gg6l68hf6zUfKkMcgakzc6/X4daivTh6ystaY GdKZVV5+cr/1DXAYVm1f3xOtcyf2MKIiCUeyU5caHSolDIlmP/soA3ydDPg07w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731600772; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dobCKEU93mqNRXOSs9q6L7TLN4OCQKHnVxNPNOVAWyE=; b=mfgb1BaMXQrwxarM8qC9ByhaBoJLJ2nPsBx0mSnr13yD0ZXxgX83CCCsWo53YPltPVupxR 4cqTQmDho+XxYMH0hmd+zYmMS3pjtfjHqbPO5xnwPIaw+qBVBzfWtlNu9hAQ7q120ORsZX YZi6ik3HmEgMv932ffn5v4v65luaBIzKVohI+y0jGTzl1dxdlBpxk1gNTZ9aza5piRiDZ3 HBD0uIJGDZVLHK8aLn0F51Vq9yw6RUHOAwwJrhz80VUibD1FtxkhqFM1HcxpTQdaLD1nSp I8WTxXZw5ZhSSyJEJdZsjfA9VNqsPZkr3HSVBwSWV+UrfidXloYMYvHMZXzYFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731600772; a=rsa-sha256; cv=none; b=gkWocV1EqjaWa0r0yuF8JA6gNnpwb2ZTWn7HCH7BmPyM7+GP5BaJ36C8l5ZKQ5uggMMcWl qAqkprPIIOc4WLzCJqt4OKF2uyDdeHGPJnJpChx6cmIXseHKk7uZyEcc6enqBIhhpsUOlL Nm+J1CcflnlkzJ1AKy/6sjT9NpNcGIjMvAOQG4MgfFgUBSK5qQZEqtLMp9EsJ/jouZYweT K1vrQ2U9HKT4rPsMzuRTzX5kCGlvePI9PN9SMc/ef03B0SBJ+rtCeTRP6/rDhRnhOjYwBz dn5uHb33lzoLqjPmHGNKQS9tYVwmls/qSVP6JN+6P8a2UseBht1+dfJqZL0hjQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xq4tr4VTNzls5; Thu, 14 Nov 2024 16:12:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AEGCqKQ054377; Thu, 14 Nov 2024 16:12:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AEGCqmC054374; Thu, 14 Nov 2024 16:12:52 GMT (envelope-from git) Date: Thu, 14 Nov 2024 16:12:52 GMT Message-Id: <202411141612.4AEGCqmC054374@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 45a77bf23fa2 - main - inpcb: Make some cosmetic improvements to in_pcbbind() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 45a77bf23fa2f36bf2169f7ba2a33b31f4c35adb Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=45a77bf23fa2f36bf2169f7ba2a33b31f4c35adb commit 45a77bf23fa2f36bf2169f7ba2a33b31f4c35adb Author: Mark Johnston AuthorDate: 2024-11-14 16:05:27 +0000 Commit: Mark Johnston CommitDate: 2024-11-14 16:05:27 +0000 inpcb: Make some cosmetic improvements to in_pcbbind() - Use the local var "laddr" instead of sin->sin_addr in one block. - Use in_nullhost() instead of explicit comparisons with INADDR_ANY. - Combine multiple socket options checks into one. - Fix indentation. - Remove some unhelpful comments. This is in preparation for some simplification and bug-fixing. No functional change intended. Reviewed by: glebius MFC after: 2 weeks Sponsored by: Klara, Inc. Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D47451 --- sys/netinet/in_pcb.c | 44 ++++++++++++++++++++------------------------ sys/netinet6/in6_pcb.c | 19 ++++++++----------- 2 files changed, 28 insertions(+), 35 deletions(-) diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index 769724fd5063..116ee149fecb 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -916,8 +916,10 @@ in_pcbbind_setup(struct inpcb *inp, struct sockaddr_in *sin, in_addr_t *laddrp, return (EINVAL); lport = sin->sin_port; } + laddr = sin->sin_addr; + /* NB: lport is left as 0 if the port isn't being changed. */ - if (IN_MULTICAST(ntohl(sin->sin_addr.s_addr))) { + if (IN_MULTICAST(ntohl(laddr.s_addr))) { /* * Treat SO_REUSEADDR as SO_REUSEPORT for multicast; * allow complete duplication of binding if @@ -934,7 +936,7 @@ in_pcbbind_setup(struct inpcb *inp, struct sockaddr_in *sin, in_addr_t *laddrp, if ((so->so_options & (SO_REUSEADDR|SO_REUSEPORT_LB)) != 0) reuseport_lb = SO_REUSEADDR|SO_REUSEPORT_LB; - } else if (sin->sin_addr.s_addr != INADDR_ANY) { + } else if (!in_nullhost(laddr)) { sin->sin_port = 0; /* yech... */ bzero(&sin->sin_zero, sizeof(sin->sin_zero)); /* @@ -943,50 +945,44 @@ in_pcbbind_setup(struct inpcb *inp, struct sockaddr_in *sin, in_addr_t *laddrp, * to any endpoint address, local or not. */ if ((inp->inp_flags & INP_BINDANY) == 0 && - ifa_ifwithaddr_check((struct sockaddr *)sin) == 0) + ifa_ifwithaddr_check( + (const struct sockaddr *)sin) == 0) return (EADDRNOTAVAIL); } - laddr = sin->sin_addr; if (lport) { struct inpcb *t; - /* GROSS */ if (ntohs(lport) <= V_ipport_reservedhigh && ntohs(lport) >= V_ipport_reservedlow && priv_check_cred(cred, PRIV_NETINET_RESERVEDPORT)) return (EACCES); - if (!IN_MULTICAST(ntohl(sin->sin_addr.s_addr)) && + + if (!IN_MULTICAST(ntohl(laddr.s_addr)) && priv_check_cred(inp->inp_cred, PRIV_NETINET_REUSEPORT) != 0) { - t = in_pcblookup_local(pcbinfo, sin->sin_addr, - lport, INPLOOKUP_WILDCARD, cred); - /* - * XXX - * This entire block sorely needs a rewrite. - */ + t = in_pcblookup_local(pcbinfo, laddr, lport, + INPLOOKUP_WILDCARD, cred); if (t != NULL && (so->so_type != SOCK_STREAM || - ntohl(t->inp_faddr.s_addr) == INADDR_ANY) && - (ntohl(sin->sin_addr.s_addr) != INADDR_ANY || - ntohl(t->inp_laddr.s_addr) != INADDR_ANY || + in_nullhost(t->inp_faddr)) && + (!in_nullhost(laddr) || + !in_nullhost(t->inp_laddr) || (t->inp_socket->so_options & SO_REUSEPORT) || (t->inp_socket->so_options & SO_REUSEPORT_LB) == 0) && (inp->inp_cred->cr_uid != t->inp_cred->cr_uid)) return (EADDRINUSE); } - t = in_pcblookup_local(pcbinfo, sin->sin_addr, - lport, lookupflags, cred); - if (t != NULL && (reuseport & t->inp_socket->so_options) == 0 && - (reuseport_lb & t->inp_socket->so_options) == 0) { + t = in_pcblookup_local(pcbinfo, laddr, lport, + lookupflags, cred); + if (t != NULL && ((reuseport | reuseport_lb) & + t->inp_socket->so_options) == 0) { #ifdef INET6 - if (ntohl(sin->sin_addr.s_addr) != - INADDR_ANY || - ntohl(t->inp_laddr.s_addr) != - INADDR_ANY || + if (!in_nullhost(laddr) || + !in_nullhost(t->inp_laddr) || (inp->inp_vflag & INP_IPV6PROTO) == 0 || (t->inp_vflag & INP_IPV6PROTO) == 0) #endif - return (EADDRINUSE); + return (EADDRINUSE); } } } diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c index 49a430ea6d01..45fdd6541bf7 100644 --- a/sys/netinet6/in6_pcb.c +++ b/sys/netinet6/in6_pcb.c @@ -247,11 +247,11 @@ in6_pcbbind(struct inpcb *inp, struct sockaddr_in6 *sin6, struct ucred *cred) if (lport) { struct inpcb *t; - /* GROSS */ if (ntohs(lport) <= V_ipport_reservedhigh && ntohs(lport) >= V_ipport_reservedlow && priv_check_cred(cred, PRIV_NETINET_RESERVEDPORT)) return (EACCES); + if (!IN6_IS_ADDR_MULTICAST(&sin6->sin6_addr) && priv_check_cred(inp->inp_cred, PRIV_NETINET_REUSEPORT) != 0) { t = in6_pcblookup_local(pcbinfo, @@ -279,8 +279,7 @@ in6_pcbbind(struct inpcb *inp, struct sockaddr_in6 *sin6, struct ucred *cred) INPLOOKUP_WILDCARD, cred); if (t != NULL && (so->so_type != SOCK_STREAM || - ntohl(t->inp_faddr.s_addr) == - INADDR_ANY) && + in_nullhost(t->inp_faddr)) && (inp->inp_cred->cr_uid != t->inp_cred->cr_uid)) return (EADDRINUSE); @@ -289,10 +288,9 @@ in6_pcbbind(struct inpcb *inp, struct sockaddr_in6 *sin6, struct ucred *cred) } t = in6_pcblookup_local(pcbinfo, &sin6->sin6_addr, lport, lookupflags, cred); - if (t && (reuseport & t->inp_socket->so_options) == 0 && - (reuseport_lb & t->inp_socket->so_options) == 0) { + if (t != NULL && ((reuseport | reuseport_lb) & + t->inp_socket->so_options) == 0) return (EADDRINUSE); - } #ifdef INET if ((inp->inp_flags & IN6P_IPV6_V6ONLY) == 0 && IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) { @@ -301,11 +299,10 @@ in6_pcbbind(struct inpcb *inp, struct sockaddr_in6 *sin6, struct ucred *cred) in6_sin6_2_sin(&sin, sin6); t = in_pcblookup_local(pcbinfo, sin.sin_addr, lport, lookupflags, cred); - if (t && - (reuseport & t->inp_socket->so_options) == 0 && - (reuseport_lb & t->inp_socket->so_options) == 0 && - (ntohl(t->inp_laddr.s_addr) != INADDR_ANY || - (t->inp_vflag & INP_IPV6PROTO) != 0)) { + if (t != NULL && ((reuseport | reuseport_lb) & + t->inp_socket->so_options) == 0 && + (!in_nullhost(t->inp_laddr) || + (t->inp_vflag & INP_IPV6PROTO) != 0)) { return (EADDRINUSE); } } From nobody Thu Nov 14 16:33:10 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xq5LH01m2z5csTC; Thu, 14 Nov 2024 16: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xq5LG6qv1z4sjN; Thu, 14 Nov 2024 16: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=1731601990; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hAaTkb+dYthqQP2ZPJTMdsUBSErML6cGTJQg/tGR1Zs=; b=C1jUp6uOqWN5FGH0uOjymd2NUKqVN2OfH95EzebjymDsPkEfgWgnT5KPNAsJtrjjxMXdh+ sLoKA8n0XFN2PQeOSCBU6nfbkph1GVp6r9AqMIqaFr7f/yO6QYgS+KGE0gLyZILt+6WNfj F+fW0BlzpQFpZm2VT7NxraGe9pQnnNgHDNiD3Y/bPNbyz7koHBJ6JNleapqaHbA8HJmEje QZNkr1kxKziGJTQRAkjs4p180EsNHVC7kwKL4g8hWc+Rtj7z2nmObH0ojuw7BTWMfHMd4p hYTfQslbimFB6uCmhXlDsopQ3s6HqLKUattnjcHDTzAdN4/Pqg+xuchRzbi+Mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731601990; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hAaTkb+dYthqQP2ZPJTMdsUBSErML6cGTJQg/tGR1Zs=; b=tJ+wy2ysbauwN+sgKrCuoHnCRFNSs+QVslePVaJXoeQzfXixyLYszr8HPIaBoMeMytUI6K 0/gX0MYI95B/MOS0NnaPku/LDViGeMmouKW6/gnIJPTUJfbs3FWQctFpZALz4pHbkjX0Ow DUcZQJVioyunFcHvwaLmvxe+9dk10e3deoC3OLjRIt5qTxstNZijVxJr/FHC3TlAVqvCdE r0/l9rpe2InKwzOSr8SDZcMKOrukWYAhqHCIfSHNIj6HCYMsi0fKkxs3jmUemScWZ6Me+S 3fZwztuJ3Yjb6DGcbWTUgvj1b4W9LvzJB7QhXA2t4j3Z2gD74wSXgZwsOB5frQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731601990; a=rsa-sha256; cv=none; b=tzc2ZBgQYHiGPG8fXlL8lQV4OVV4gZ5GmLlHmhnbBq8kNydqIMIm4YDGPpzMfOeUkQYcqJ jLtaOhsEBqE/Z1wsUJT9+cqMci+7W+bDj5He0hYHKrSKGfOV5yzpNS6HCtNa3UqTYECnFx LE+aEI0jIfDfkCi+OwQ1xWHnH229VNE8dVY78ntLXy4Fd05kWONWhRWwykrxxn9tIYiLID dlJ3lz6Wbp3p2jUOiZn8M6TnBZPdJV8cp2T387mMOAuLKf+jUk3e/t7TpVaJ9tqZu+M//m AdrgrOW9eu60yIZOPrpgrrZc0C1h491PBgxMSsQgqy0n7qdr2XZ5uSee/Q3kjw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xq5LG62n9zmGf; Thu, 14 Nov 2024 16:33:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AEGXAOp091788; Thu, 14 Nov 2024 16:33:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AEGXAdc091785; Thu, 14 Nov 2024 16:33:10 GMT (envelope-from git) Date: Thu, 14 Nov 2024 16:33:10 GMT Message-Id: <202411141633.4AEGXAdc091785@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: b64867e332f8 - stable/14 - Revert "sound: Make device registration more intuitive" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b64867e332f8196cb61947fc189ff108ca1065db Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=b64867e332f8196cb61947fc189ff108ca1065db commit b64867e332f8196cb61947fc189ff108ca1065db Author: Christos Margiolis AuthorDate: 2024-11-14 16:25:41 +0000 Commit: Christos Margiolis CommitDate: 2024-11-14 16:25:41 +0000 Revert "sound: Make device registration more intuitive" These KPI changes will break out-of-tree drivers. Keep the commit only in -CURRENT. This reverts commit 5aece3be1c84f6786f89894efeca1219a282f3f3. --- sys/arm/allwinner/a10_codec.c | 10 +-- sys/arm/broadcom/bcm2835/bcm2835_audio.c | 10 +-- sys/arm/freescale/imx/imx6_ssi.c | 12 ++-- sys/arm/freescale/vybrid/vf_sai.c | 12 ++-- sys/dev/sound/dummy.c | 6 +- sys/dev/sound/fdt/audio_soc.c | 10 +-- sys/dev/sound/macio/aoa.c | 6 +- sys/dev/sound/pci/als4000.c | 11 ++-- sys/dev/sound/pci/atiixp.c | 6 +- sys/dev/sound/pci/cmi.c | 6 +- sys/dev/sound/pci/cs4281.c | 6 +- sys/dev/sound/pci/csapcm.c | 8 +-- sys/dev/sound/pci/emu10k1.c | 5 +- sys/dev/sound/pci/emu10kx-pcm.c | 8 ++- sys/dev/sound/pci/envy24.c | 7 ++- sys/dev/sound/pci/envy24ht.c | 8 ++- sys/dev/sound/pci/es137x.c | 6 +- sys/dev/sound/pci/fm801.c | 5 +- sys/dev/sound/pci/hda/hdaa.c | 7 ++- sys/dev/sound/pci/hdspe-pcm.c | 13 ++-- sys/dev/sound/pci/ich.c | 5 +- sys/dev/sound/pci/maestro3.c | 9 ++- sys/dev/sound/pci/neomagic.c | 5 +- sys/dev/sound/pci/solo.c | 6 +- sys/dev/sound/pci/t4dwave.c | 6 +- sys/dev/sound/pci/via8233.c | 6 +- sys/dev/sound/pci/via82c686.c | 5 +- sys/dev/sound/pci/vibes.c | 11 ++-- sys/dev/sound/pcm/sound.c | 103 +++++++++++++++---------------- sys/dev/sound/pcm/sound.h | 4 +- sys/dev/sound/usb/uaudio.c | 11 ++-- 31 files changed, 172 insertions(+), 161 deletions(-) diff --git a/sys/arm/allwinner/a10_codec.c b/sys/arm/allwinner/a10_codec.c index a2ad58bab6fc..036de684b788 100644 --- a/sys/arm/allwinner/a10_codec.c +++ b/sys/arm/allwinner/a10_codec.c @@ -1166,16 +1166,16 @@ a10codec_attach(device_t dev) pcm_setflags(dev, pcm_getflags(dev) | SD_F_MPSAFE); - pcm_init(dev, sc); + if (pcm_register(dev, sc, 1, 1)) { + device_printf(dev, "pcm_register failed\n"); + goto fail; + } pcm_addchan(dev, PCMDIR_PLAY, &a10codec_chan_class, sc); pcm_addchan(dev, PCMDIR_REC, &a10codec_chan_class, sc); snprintf(status, SND_STATUSLEN, "at %s", ofw_bus_get_name(dev)); - if (pcm_register(dev, status)) { - device_printf(dev, "pcm_register failed\n"); - goto fail; - } + pcm_setstatus(dev, status); return (0); diff --git a/sys/arm/broadcom/bcm2835/bcm2835_audio.c b/sys/arm/broadcom/bcm2835/bcm2835_audio.c index 13f309dd3f11..75a0c81f29a1 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_audio.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_audio.c @@ -867,15 +867,15 @@ bcm2835_audio_delayed_init(void *xsc) goto no; } - pcm_init(sc->dev, sc); - - pcm_addchan(sc->dev, PCMDIR_PLAY, &bcmchan_class, sc); - snprintf(status, SND_STATUSLEN, "at VCHIQ"); - if (pcm_register(sc->dev, status)) { + if (pcm_register(sc->dev, sc, 1, 0)) { device_printf(sc->dev, "pcm_register failed\n"); goto no; } + pcm_addchan(sc->dev, PCMDIR_PLAY, &bcmchan_class, sc); + snprintf(status, SND_STATUSLEN, "at VCHIQ"); + pcm_setstatus(sc->dev, status); + bcm2835_audio_reset_channel(&sc->pch); bcm2835_audio_create_worker(sc); diff --git a/sys/arm/freescale/imx/imx6_ssi.c b/sys/arm/freescale/imx/imx6_ssi.c index 779c41553734..6b23334a4e97 100644 --- a/sys/arm/freescale/imx/imx6_ssi.c +++ b/sys/arm/freescale/imx/imx6_ssi.c @@ -811,18 +811,18 @@ ssi_attach(device_t dev) pcm_setflags(dev, pcm_getflags(dev) | SD_F_MPSAFE); - pcm_init(dev, scp); + err = pcm_register(dev, scp, 1, 0); + if (err) { + device_printf(dev, "Can't register pcm.\n"); + return (ENXIO); + } scp->chnum = 0; pcm_addchan(dev, PCMDIR_PLAY, &ssichan_class, scp); scp->chnum++; snprintf(status, SND_STATUSLEN, "at simplebus"); - err = pcm_register(dev, status); - if (err) { - device_printf(dev, "Can't register pcm.\n"); - return (ENXIO); - } + pcm_setstatus(dev, status); mixer_init(dev, &ssimixer_class, scp); setup_ssi(sc); diff --git a/sys/arm/freescale/vybrid/vf_sai.c b/sys/arm/freescale/vybrid/vf_sai.c index 92dc185c13eb..3b3a120df4e1 100644 --- a/sys/arm/freescale/vybrid/vf_sai.c +++ b/sys/arm/freescale/vybrid/vf_sai.c @@ -763,18 +763,18 @@ sai_attach(device_t dev) pcm_setflags(dev, pcm_getflags(dev) | SD_F_MPSAFE); - pcm_init(dev, scp); + err = pcm_register(dev, scp, 1, 0); + if (err) { + device_printf(dev, "Can't register pcm.\n"); + return (ENXIO); + } scp->chnum = 0; pcm_addchan(dev, PCMDIR_PLAY, &saichan_class, scp); scp->chnum++; snprintf(status, SND_STATUSLEN, "at simplebus"); - err = pcm_register(dev, status); - if (err) { - device_printf(dev, "Can't register pcm.\n"); - return (ENXIO); - } + pcm_setstatus(dev, status); mixer_init(dev, &saimixer_class, scp); diff --git a/sys/dev/sound/dummy.c b/sys/dev/sound/dummy.c index 9013fd023a7e..c1cd4dff15f9 100644 --- a/sys/dev/sound/dummy.c +++ b/sys/dev/sound/dummy.c @@ -305,7 +305,8 @@ dummy_attach(device_t dev) }; pcm_setflags(dev, pcm_getflags(dev) | SD_F_MPSAFE); - pcm_init(dev, sc); + if (pcm_register(dev, sc, DUMMY_NPCHAN, DUMMY_NRCHAN)) + return (ENXIO); for (i = 0; i < DUMMY_NPCHAN; i++) pcm_addchan(dev, PCMDIR_PLAY, &dummy_chan_class, sc); for (i = 0; i < DUMMY_NRCHAN; i++) @@ -313,8 +314,7 @@ dummy_attach(device_t dev) snprintf(status, SND_STATUSLEN, "on %s", device_get_nameunit(device_get_parent(dev))); - if (pcm_register(dev, status)) - return (ENXIO); + pcm_setstatus(dev, status); mixer_init(dev, &dummy_mixer_class, sc); callout_init(&sc->callout, 1); diff --git a/sys/dev/sound/fdt/audio_soc.c b/sys/dev/sound/fdt/audio_soc.c index c2bdea399364..92813a3079d8 100644 --- a/sys/dev/sound/fdt/audio_soc.c +++ b/sys/dev/sound/fdt/audio_soc.c @@ -397,7 +397,10 @@ audio_soc_init(void *arg) } } - pcm_init(sc->dev, sc); + if (pcm_register(sc->dev, sc, 1, 1)) { + device_printf(sc->dev, "failed to register PCM\n"); + return; + } sc->play_channel.sc = sc; sc->rec_channel.sc = sc; @@ -405,10 +408,7 @@ audio_soc_init(void *arg) pcm_addchan(sc->dev, PCMDIR_PLAY, &audio_soc_chan_class, &sc->play_channel); pcm_addchan(sc->dev, PCMDIR_REC, &audio_soc_chan_class, &sc->rec_channel); - if (pcm_register(sc->dev, "at simplebus")) { - device_printf(sc->dev, "failed to register PCM\n"); - return; - } + pcm_setstatus(sc->dev, "at simplebus"); AUDIO_DAI_SETUP_INTR(sc->cpu_dev, audio_soc_intr, sc); AUDIO_DAI_SETUP_MIXER(sc->codec_dev, sc->dev); diff --git a/sys/dev/sound/macio/aoa.c b/sys/dev/sound/macio/aoa.c index 9861bbd92a0c..27626b3d570a 100644 --- a/sys/dev/sound/macio/aoa.c +++ b/sys/dev/sound/macio/aoa.c @@ -372,7 +372,8 @@ aoa_attach(void *xsc) sc = xsc; self = sc->sc_dev; - pcm_init(self, sc); + if (pcm_register(self, sc, 1, 0)) + return (ENXIO); err = pcm_getbuffersize(self, AOA_BUFFER_SIZE, AOA_BUFFER_SIZE, AOA_BUFFER_SIZE); @@ -381,6 +382,7 @@ aoa_attach(void *xsc) pcm_addchan(self, PCMDIR_PLAY, &aoa_chan_class, sc); snprintf(status, sizeof(status), "at %s", ofw_bus_get_name(self)); + pcm_setstatus(self, status); - return (pcm_register(self, status)); + return (0); } diff --git a/sys/dev/sound/pci/als4000.c b/sys/dev/sound/pci/als4000.c index 9d86713b379e..b1376d2b6e5a 100644 --- a/sys/dev/sound/pci/als4000.c +++ b/sys/dev/sound/pci/als4000.c @@ -839,7 +839,10 @@ als_pci_attach(device_t dev) goto bad_attach; } - pcm_init(dev, sc); + if (pcm_register(dev, sc, 1, 1)) { + device_printf(dev, "failed to register pcm entries\n"); + goto bad_attach; + } pcm_addchan(dev, PCMDIR_PLAY, &alspchan_class, sc); pcm_addchan(dev, PCMDIR_REC, &alsrchan_class, sc); @@ -847,11 +850,7 @@ als_pci_attach(device_t dev) snprintf(status, SND_STATUSLEN, "port 0x%jx irq %jd on %s", rman_get_start(sc->reg), rman_get_start(sc->irq), device_get_nameunit(device_get_parent(dev))); - if (pcm_register(dev, status)) { - device_printf(dev, "failed to register pcm entries\n"); - goto bad_attach; - } - + pcm_setstatus(dev, status); return 0; bad_attach: diff --git a/sys/dev/sound/pci/atiixp.c b/sys/dev/sound/pci/atiixp.c index 90e5742e6523..eeb28bb08276 100644 --- a/sys/dev/sound/pci/atiixp.c +++ b/sys/dev/sound/pci/atiixp.c @@ -1084,7 +1084,8 @@ atiixp_chip_post_init(void *arg) mixer_init(sc->dev, ac97_getmixerclass(), sc->codec); - pcm_init(sc->dev, sc); + if (pcm_register(sc->dev, sc, ATI_IXP_NPCHAN, ATI_IXP_NRCHAN)) + goto postinitbad; for (i = 0; i < ATI_IXP_NPCHAN; i++) pcm_addchan(sc->dev, PCMDIR_PLAY, &atiixp_chan_class, sc); @@ -1100,8 +1101,7 @@ atiixp_chip_post_init(void *arg) rman_get_start(sc->reg), rman_get_start(sc->irq), device_get_nameunit(device_get_parent(sc->dev))); - if (pcm_register(sc->dev, status)) - goto postinitbad; + pcm_setstatus(sc->dev, status); atiixp_lock(sc); if (sc->polling == 0) diff --git a/sys/dev/sound/pci/cmi.c b/sys/dev/sound/pci/cmi.c index 22f1e76a4d1f..9a92066c51a4 100644 --- a/sys/dev/sound/pci/cmi.c +++ b/sys/dev/sound/pci/cmi.c @@ -982,7 +982,8 @@ cmi_attach(device_t dev) if (mixer_init(dev, &cmi_mixer_class, sc)) goto bad; - pcm_init(dev, sc); + if (pcm_register(dev, sc, 1, 1)) + goto bad; cmi_initsys(sc); @@ -992,8 +993,7 @@ cmi_attach(device_t dev) snprintf(status, SND_STATUSLEN, "port 0x%jx irq %jd on %s", rman_get_start(sc->reg), rman_get_start(sc->irq), device_get_nameunit(device_get_parent(dev))); - if (pcm_register(dev, status)) - goto bad; + pcm_setstatus(dev, status); DEB(printf("cmi_attach: succeeded\n")); return 0; diff --git a/sys/dev/sound/pci/cs4281.c b/sys/dev/sound/pci/cs4281.c index 7a25f7f4c08d..972b83efff8f 100644 --- a/sys/dev/sound/pci/cs4281.c +++ b/sys/dev/sound/pci/cs4281.c @@ -839,7 +839,8 @@ cs4281_pci_attach(device_t dev) mixer_init(dev, ac97_getmixerclass(), codec); - pcm_init(dev, sc); + if (pcm_register(dev, sc, 1, 1)) + goto bad; pcm_addchan(dev, PCMDIR_PLAY, &cs4281chan_class, sc); pcm_addchan(dev, PCMDIR_REC, &cs4281chan_class, sc); @@ -848,8 +849,7 @@ cs4281_pci_attach(device_t dev) (sc->regtype == SYS_RES_IOPORT)? "port" : "mem", rman_get_start(sc->reg), rman_get_start(sc->irq), device_get_nameunit(device_get_parent(dev))); - if (pcm_register(dev, status)) - goto bad; + pcm_setstatus(dev, status); return 0; diff --git a/sys/dev/sound/pci/csapcm.c b/sys/dev/sound/pci/csapcm.c index a966a2e66402..c8424dd3e433 100644 --- a/sys/dev/sound/pci/csapcm.c +++ b/sys/dev/sound/pci/csapcm.c @@ -832,14 +832,14 @@ pcmcsa_attach(device_t dev) csa_writemem(resp, BA1_CIE, (csa_readmem(resp, BA1_CIE) & ~0x0000003f) | 0x00000001); csa_active(csa, -1); - pcm_init(dev, csa); - pcm_addchan(dev, PCMDIR_REC, &csachan_class, csa); - pcm_addchan(dev, PCMDIR_PLAY, &csachan_class, csa); - if (pcm_register(dev, status)) { + if (pcm_register(dev, csa, 1, 1)) { ac97_destroy(codec); csa_releaseres(csa, dev); return (ENXIO); } + pcm_addchan(dev, PCMDIR_REC, &csachan_class, csa); + pcm_addchan(dev, PCMDIR_PLAY, &csachan_class, csa); + pcm_setstatus(dev, status); return (0); } diff --git a/sys/dev/sound/pci/emu10k1.c b/sys/dev/sound/pci/emu10k1.c index e4b2c22f4f07..0813f89c87b8 100644 --- a/sys/dev/sound/pci/emu10k1.c +++ b/sys/dev/sound/pci/emu10k1.c @@ -2130,14 +2130,13 @@ emu_pci_attach(device_t dev) rman_get_start(sc->reg), rman_get_start(sc->irq), device_get_nameunit(device_get_parent(dev))); - pcm_init(dev, sc); + if (pcm_register(dev, sc, sc->nchans, gotmic ? 3 : 2)) goto bad; for (i = 0; i < sc->nchans; i++) pcm_addchan(dev, PCMDIR_PLAY, &emupchan_class, sc); for (i = 0; i < (gotmic ? 3 : 2); i++) pcm_addchan(dev, PCMDIR_REC, &emurchan_class, sc); - if (pcm_register(dev, status)) - goto bad; + pcm_setstatus(dev, status); return 0; diff --git a/sys/dev/sound/pci/emu10kx-pcm.c b/sys/dev/sound/pci/emu10kx-pcm.c index c280b64892f6..bef6b596646e 100644 --- a/sys/dev/sound/pci/emu10kx-pcm.c +++ b/sys/dev/sound/pci/emu10kx-pcm.c @@ -1459,7 +1459,10 @@ emu_pcm_attach(device_t dev) pcm_setflags(dev, pcm_getflags(dev) | SD_F_MPSAFE); /* XXX we should better get number of available channels from parent */ - pcm_init(dev, sc); + if (pcm_register(dev, sc, (route == RT_FRONT) ? MAX_CHANNELS : 1, (route == RT_FRONT) ? 1 : 0)) { + device_printf(dev, "can't register PCM channels!\n"); + goto bad; + } sc->pnum = 0; if (route != RT_MCHRECORD) pcm_addchan(dev, PCMDIR_PLAY, &emupchan_class, sc); @@ -1473,8 +1476,7 @@ emu_pcm_attach(device_t dev) snprintf(status, SND_STATUSLEN, "on %s", device_get_nameunit(device_get_parent(dev))); - if (pcm_register(dev, status)) - goto bad; + pcm_setstatus(dev, status); return (0); diff --git a/sys/dev/sound/pci/envy24.c b/sys/dev/sound/pci/envy24.c index 51842bfdb480..f7cc7ff5724d 100644 --- a/sys/dev/sound/pci/envy24.c +++ b/sys/dev/sound/pci/envy24.c @@ -2575,7 +2575,9 @@ envy24_pci_attach(device_t dev) mixer_init(dev, &envy24mixer_class, sc); /* set channel information */ - pcm_init(dev, sc); + err = pcm_register(dev, sc, 5, 2 + sc->adcn); + if (err) + goto bad; sc->chnum = 0; for (i = 0; i < 5; i++) { pcm_addchan(dev, PCMDIR_PLAY, &envy24chan_class, sc); @@ -2599,8 +2601,7 @@ envy24_pci_attach(device_t dev) rman_get_end(sc->mt) - rman_get_start(sc->mt) + 1, rman_get_start(sc->irq), device_get_nameunit(device_get_parent(dev))); - if (pcm_register(dev, status)) - goto bad; + pcm_setstatus(dev, status); return 0; diff --git a/sys/dev/sound/pci/envy24ht.c b/sys/dev/sound/pci/envy24ht.c index b8202a9fa7cd..65c67b84ce53 100644 --- a/sys/dev/sound/pci/envy24ht.c +++ b/sys/dev/sound/pci/envy24ht.c @@ -2480,7 +2480,10 @@ envy24ht_pci_attach(device_t dev) mixer_init(dev, &envy24htmixer_class, sc); /* set channel information */ - pcm_init(dev, sc); + /* err = pcm_register(dev, sc, 5, 2 + sc->adcn); */ + err = pcm_register(dev, sc, 1, 2 + sc->adcn); + if (err) + goto bad; sc->chnum = 0; /* for (i = 0; i < 5; i++) { */ pcm_addchan(dev, PCMDIR_PLAY, &envy24htchan_class, sc); @@ -2500,8 +2503,7 @@ envy24ht_pci_attach(device_t dev) rman_get_end(sc->mt) - rman_get_start(sc->mt) + 1, rman_get_start(sc->irq), device_get_nameunit(device_get_parent(dev))); - if (pcm_register(dev, status)) - goto bad; + pcm_setstatus(dev, status); return 0; diff --git a/sys/dev/sound/pci/es137x.c b/sys/dev/sound/pci/es137x.c index 3c1bea09b5d1..8f832d899dd3 100644 --- a/sys/dev/sound/pci/es137x.c +++ b/sys/dev/sound/pci/es137x.c @@ -1861,13 +1861,13 @@ es_pci_attach(device_t dev) rman_get_start(es->reg), rman_get_start(es->irq), device_get_nameunit(device_get_parent(dev))); - pcm_init(dev, es); + if (pcm_register(dev, es, numplay, 1)) + goto bad; for (i = 0; i < numplay; i++) pcm_addchan(dev, PCMDIR_PLAY, ct, es); pcm_addchan(dev, PCMDIR_REC, ct, es); es_init_sysctls(dev); - if (pcm_register(dev, status)) - goto bad; + pcm_setstatus(dev, status); es->escfg = ES_SET_GP(es->escfg, 0); if (numplay == 1) device_printf(dev, "\n", diff --git a/sys/dev/sound/pci/fm801.c b/sys/dev/sound/pci/fm801.c index ca6a2271096c..fbde14f37afe 100644 --- a/sys/dev/sound/pci/fm801.c +++ b/sys/dev/sound/pci/fm801.c @@ -642,11 +642,10 @@ fm801_pci_attach(device_t dev) device_get_nameunit(device_get_parent(dev))); #define FM801_MAXPLAYCH 1 - pcm_init(dev, fm801); + if (pcm_register(dev, fm801, FM801_MAXPLAYCH, 1)) goto oops; pcm_addchan(dev, PCMDIR_PLAY, &fm801ch_class, fm801); pcm_addchan(dev, PCMDIR_REC, &fm801ch_class, fm801); - if (pcm_register(dev, status)) - goto oops; + pcm_setstatus(dev, status); fm801->radio = device_add_child(dev, "radio", -1); bus_generic_attach(dev); diff --git a/sys/dev/sound/pci/hda/hdaa.c b/sys/dev/sound/pci/hda/hdaa.c index d6aa24125c7b..c0eb1864f145 100644 --- a/sys/dev/sound/pci/hda/hdaa.c +++ b/sys/dev/sound/pci/hda/hdaa.c @@ -7053,7 +7053,9 @@ hdaa_pcm_attach(device_t dev) HDA_BOOTHVERBOSE( device_printf(dev, "Registering PCM channels...\n"); ); - pcm_init(dev, pdevinfo); + if (pcm_register(dev, pdevinfo, (pdevinfo->playas >= 0)?1:0, + (pdevinfo->recas >= 0)?1:0) != 0) + device_printf(dev, "Can't register PCM\n"); pdevinfo->registered++; @@ -7106,8 +7108,9 @@ hdaa_pcm_attach(device_t dev) snprintf(status, SND_STATUSLEN, "on %s", device_get_nameunit(device_get_parent(dev))); + pcm_setstatus(dev, status); - return (pcm_register(dev, status)); + return (0); } static int diff --git a/sys/dev/sound/pci/hdspe-pcm.c b/sys/dev/sound/pci/hdspe-pcm.c index d58353685663..4bea6c65e087 100644 --- a/sys/dev/sound/pci/hdspe-pcm.c +++ b/sys/dev/sound/pci/hdspe-pcm.c @@ -1020,10 +1020,13 @@ hdspe_pcm_attach(device_t dev) */ pcm_setflags(dev, pcm_getflags(dev) | SD_F_MPSAFE); - pcm_init(dev, scp); - play = (hdspe_channel_play_ports(scp->hc)) ? 1 : 0; rec = (hdspe_channel_rec_ports(scp->hc)) ? 1 : 0; + err = pcm_register(dev, scp, play, rec); + if (err) { + device_printf(dev, "Can't register pcm.\n"); + return (ENXIO); + } scp->chnum = 0; if (play) { @@ -1040,11 +1043,7 @@ hdspe_pcm_attach(device_t dev) rman_get_start(scp->sc->cs), rman_get_start(scp->sc->irq), device_get_nameunit(device_get_parent(dev))); - err = pcm_register(dev, status); - if (err) { - device_printf(dev, "Can't register pcm.\n"); - return (ENXIO); - } + pcm_setstatus(dev, status); mixer_init(dev, &hdspemixer_class, scp); diff --git a/sys/dev/sound/pci/ich.c b/sys/dev/sound/pci/ich.c index 500d6d95daac..910a371c6653 100644 --- a/sys/dev/sound/pci/ich.c +++ b/sys/dev/sound/pci/ich.c @@ -695,7 +695,7 @@ ich_setstatus(struct sc_info *sc) device_printf(sc->dev, "PCI Master abort workaround enabled\n"); - pcm_register(sc->dev, status); + pcm_setstatus(sc->dev, status); } /* -------------------------------------------------------------------- */ @@ -1066,7 +1066,8 @@ ich_pci_attach(device_t dev) ich_setmap, sc, 0)) goto bad; - pcm_init(dev, sc); + if (pcm_register(dev, sc, 1, (sc->hasmic) ? 2 : 1)) + goto bad; pcm_addchan(dev, PCMDIR_PLAY, &ichchan_class, sc); /* play */ pcm_addchan(dev, PCMDIR_REC, &ichchan_class, sc); /* record */ diff --git a/sys/dev/sound/pci/maestro3.c b/sys/dev/sound/pci/maestro3.c index 2d102fcd6dbe..f922aa5cec3f 100644 --- a/sys/dev/sound/pci/maestro3.c +++ b/sys/dev/sound/pci/maestro3.c @@ -1423,7 +1423,10 @@ m3_pci_attach(device_t dev) m3_enable_ints(sc); - pcm_init(dev, sc); + if (pcm_register(dev, sc, dacn, adcn)) { + device_printf(dev, "pcm_register error\n"); + goto bad; + } for (i=0 ; iregtype == SYS_RES_IOPORT)? "port" : "mem", rman_get_start(sc->reg), rman_get_start(sc->irq), device_get_nameunit(device_get_parent(dev))); - if (pcm_register(dev, status)) { - device_printf(dev, "pcm_register error\n"); + if (pcm_setstatus(dev, status)) { + device_printf(dev, "attach: pcm_setstatus error\n"); goto bad; } diff --git a/sys/dev/sound/pci/neomagic.c b/sys/dev/sound/pci/neomagic.c index d7824c990a52..25273633ff18 100644 --- a/sys/dev/sound/pci/neomagic.c +++ b/sys/dev/sound/pci/neomagic.c @@ -707,11 +707,10 @@ nm_pci_attach(device_t dev) rman_get_start(sc->irq), device_get_nameunit(device_get_parent(dev))); - pcm_init(dev, sc); + if (pcm_register(dev, sc, 1, 1)) goto bad; pcm_addchan(dev, PCMDIR_REC, &nmchan_class, sc); pcm_addchan(dev, PCMDIR_PLAY, &nmchan_class, sc); - if (pcm_register(dev, status)) - goto bad; + pcm_setstatus(dev, status); return 0; diff --git a/sys/dev/sound/pci/solo.c b/sys/dev/sound/pci/solo.c index 90dd2e26ad41..82eabf3a4884 100644 --- a/sys/dev/sound/pci/solo.c +++ b/sys/dev/sound/pci/solo.c @@ -1026,11 +1026,11 @@ ess_attach(device_t dev) rman_get_start(sc->irq), device_get_nameunit(device_get_parent(dev))); - pcm_init(dev, sc); + if (pcm_register(dev, sc, 1, 1)) + goto no; pcm_addchan(dev, PCMDIR_REC, &esschan_class, sc); pcm_addchan(dev, PCMDIR_PLAY, &esschan_class, sc); - if (pcm_register(dev, status)) - goto no; + pcm_setstatus(dev, status); return 0; diff --git a/sys/dev/sound/pci/t4dwave.c b/sys/dev/sound/pci/t4dwave.c index 07b9e1004573..653e610febbe 100644 --- a/sys/dev/sound/pci/t4dwave.c +++ b/sys/dev/sound/pci/t4dwave.c @@ -921,12 +921,12 @@ tr_pci_attach(device_t dev) rman_get_start(tr->reg), rman_get_start(tr->irq), device_get_nameunit(device_get_parent(dev))); - pcm_init(dev, tr); + if (pcm_register(dev, tr, dacn, 1)) + goto bad; pcm_addchan(dev, PCMDIR_REC, &trrchan_class, tr); for (i = 0; i < dacn; i++) pcm_addchan(dev, PCMDIR_PLAY, &trpchan_class, tr); - if (pcm_register(dev, status)) - goto bad; + pcm_setstatus(dev, status); return 0; diff --git a/sys/dev/sound/pci/via8233.c b/sys/dev/sound/pci/via8233.c index 243353805b94..9f3b312e4365 100644 --- a/sys/dev/sound/pci/via8233.c +++ b/sys/dev/sound/pci/via8233.c @@ -1352,7 +1352,8 @@ via_attach(device_t dev) device_get_nameunit(device_get_parent(dev))); /* Register */ - pcm_init(dev, via); + if (pcm_register(dev, via, via_dxs_chnum + via_sgd_chnum, NWRCHANS)) + goto bad; for (i = 0; i < via_dxs_chnum; i++) pcm_addchan(dev, PCMDIR_PLAY, &via8233dxs_class, via); for (i = 0; i < via_sgd_chnum; i++) @@ -1365,8 +1366,7 @@ via_attach(device_t dev) (via_dxs_chnum > 0) ? "En" : "Dis", (via->dxs_src) ? "(SRC)" : "", via_dxs_chnum, via_sgd_chnum, NWRCHANS); - if (pcm_register(dev, status)) - goto bad; + pcm_setstatus(dev, status); return (0); bad: diff --git a/sys/dev/sound/pci/via82c686.c b/sys/dev/sound/pci/via82c686.c index 40f3521a57a2..44f846b684d7 100644 --- a/sys/dev/sound/pci/via82c686.c +++ b/sys/dev/sound/pci/via82c686.c @@ -585,11 +585,10 @@ via_attach(device_t dev) device_get_nameunit(device_get_parent(dev))); /* Register */ - pcm_init(dev, via); + if (pcm_register(dev, via, 1, 1)) goto bad; pcm_addchan(dev, PCMDIR_PLAY, &viachan_class, via); pcm_addchan(dev, PCMDIR_REC, &viachan_class, via); - if (pcm_register(dev, status)) - goto bad; + pcm_setstatus(dev, status); return 0; bad: if (via->codec) ac97_destroy(via->codec); diff --git a/sys/dev/sound/pci/vibes.c b/sys/dev/sound/pci/vibes.c index 7e908f188614..e587f0113b5d 100644 --- a/sys/dev/sound/pci/vibes.c +++ b/sys/dev/sound/pci/vibes.c @@ -866,17 +866,18 @@ sv_attach(device_t dev) { if (bootverbose) printf("Sonicvibes: revision %d.\n", sc->rev); - pcm_init(dev, sc); + if (pcm_register(dev, sc, 1, 1)) { + device_printf(dev, "sv_attach: pcm_register fail\n"); + goto fail; + } + pcm_addchan(dev, PCMDIR_PLAY, &svpchan_class, sc); pcm_addchan(dev, PCMDIR_REC, &svrchan_class, sc); snprintf(status, SND_STATUSLEN, "port 0x%jx irq %jd on %s", rman_get_start(sc->enh_reg), rman_get_start(sc->irq), device_get_nameunit(device_get_parent(dev))); - if (pcm_register(dev, status)) { - device_printf(dev, "sv_attach: pcm_register fail\n"); - goto fail; - } + pcm_setstatus(dev, status); DEB(printf("sv_attach: succeeded\n")); diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c index fc9d13593b9e..e03bcab6d8fc 100644 --- a/sys/dev/sound/pcm/sound.c +++ b/sys/dev/sound/pcm/sound.c @@ -273,6 +273,53 @@ pcm_best_unit(int old) return (best); } +int +pcm_setstatus(device_t dev, char *str) +{ + struct snddev_info *d = device_get_softc(dev); + + /* should only be called once */ + if (d->flags & SD_F_REGISTERED) + return (EINVAL); + + PCM_BUSYASSERT(d); + + if (d->playcount == 0 || d->reccount == 0) + d->flags |= SD_F_SIMPLEX; + + if (d->playcount > 0 || d->reccount > 0) + d->flags |= SD_F_AUTOVCHAN; + + vchan_setmaxauto(d, snd_maxautovchans); + + strlcpy(d->status, str, SND_STATUSLEN); + sndstat_register(dev, d->status); + + PCM_LOCK(d); + + /* Done, we're ready.. */ + d->flags |= SD_F_REGISTERED; + + PCM_RELEASE(d); + + PCM_UNLOCK(d); + + /* + * Create all sysctls once SD_F_REGISTERED is set else + * tunable sysctls won't work: + */ + pcm_sysinit(dev); + + if (snd_unit_auto < 0) + snd_unit_auto = (snd_unit < 0) ? 1 : 0; + if (snd_unit < 0 || snd_unit_auto > 1) + snd_unit = device_get_unit(dev); + else if (snd_unit_auto == 1) + snd_unit = pcm_best_unit(snd_unit); + + return (dsp_make_dev(dev)); +} + uint32_t pcm_getflags(device_t dev) { @@ -417,12 +464,9 @@ pcm_sysinit(device_t dev) feeder_eq_initsys(dev); } -/* - * Basic initialization so that drivers can use pcm_addchan() before - * pcm_register(). - */ -void -pcm_init(device_t dev, void *devinfo) +int +pcm_register(device_t dev, void *devinfo, int numplay __unused, + int numrec __unused) { struct snddev_info *d; int i; @@ -459,53 +503,8 @@ pcm_init(device_t dev, void *devinfo) CHN_INIT(d, channels.pcm); CHN_INIT(d, channels.pcm.busy); CHN_INIT(d, channels.pcm.opened); -} - -int -pcm_register(device_t dev, char *str) -{ - struct snddev_info *d = device_get_softc(dev); - - /* should only be called once */ - if (d->flags & SD_F_REGISTERED) - return (EINVAL); - - PCM_BUSYASSERT(d); - if (d->playcount == 0 || d->reccount == 0) - d->flags |= SD_F_SIMPLEX; - - if (d->playcount > 0 || d->reccount > 0) - d->flags |= SD_F_AUTOVCHAN; - - vchan_setmaxauto(d, snd_maxautovchans); - - strlcpy(d->status, str, SND_STATUSLEN); - sndstat_register(dev, d->status); - - PCM_LOCK(d); - - /* Done, we're ready.. */ - d->flags |= SD_F_REGISTERED; - - PCM_RELEASE(d); - - PCM_UNLOCK(d); - - /* - * Create all sysctls once SD_F_REGISTERED is set else - * tunable sysctls won't work: - */ - pcm_sysinit(dev); - - if (snd_unit_auto < 0) - snd_unit_auto = (snd_unit < 0) ? 1 : 0; - if (snd_unit < 0 || snd_unit_auto > 1) - snd_unit = device_get_unit(dev); - else if (snd_unit_auto == 1) - snd_unit = pcm_best_unit(snd_unit); - - return (dsp_make_dev(dev)); + return (0); } int diff --git a/sys/dev/sound/pcm/sound.h b/sys/dev/sound/pcm/sound.h index 1d09c48fc06b..c5013e76034a 100644 --- a/sys/dev/sound/pcm/sound.h +++ b/sys/dev/sound/pcm/sound.h @@ -245,9 +245,9 @@ int pcm_chnalloc(struct snddev_info *d, struct pcm_channel **ch, int direction, int pcm_addchan(device_t dev, int dir, kobj_class_t cls, void *devinfo); unsigned int pcm_getbuffersize(device_t dev, unsigned int minbufsz, unsigned int deflt, unsigned int maxbufsz); -void pcm_init(device_t dev, void *devinfo); -int pcm_register(device_t dev, char *str); +int pcm_register(device_t dev, void *devinfo, int numplay, int numrec); int pcm_unregister(device_t dev); +int pcm_setstatus(device_t dev, char *str); u_int32_t pcm_getflags(device_t dev); void pcm_setflags(device_t dev, u_int32_t val); void *pcm_getdevinfo(device_t dev); diff --git a/sys/dev/sound/usb/uaudio.c b/sys/dev/sound/usb/uaudio.c index b1dbc81c6b6f..8238629a2a51 100644 --- a/sys/dev/sound/usb/uaudio.c +++ b/sys/dev/sound/usb/uaudio.c @@ -1209,9 +1209,14 @@ uaudio_attach_sub(device_t dev, kobj_class_t mixer_class, kobj_class_t chan_clas snprintf(status, sizeof(status), "on %s", device_get_nameunit(device_get_parent(dev))); - pcm_init(dev, sc); + if (pcm_register(dev, sc, + (sc->sc_play_chan[i].num_alt > 0) ? 1 : 0, + (sc->sc_rec_chan[i].num_alt > 0) ? 1 : 0)) { + goto detach; + } uaudio_pcm_setflags(dev, SD_F_MPSAFE); + sc->sc_child[i].pcm_registered = 1; if (sc->sc_play_chan[i].num_alt > 0) { sc->sc_play_chan[i].priv_sc = sc; @@ -1224,9 +1229,7 @@ uaudio_attach_sub(device_t dev, kobj_class_t mixer_class, kobj_class_t chan_clas pcm_addchan(dev, PCMDIR_REC, chan_class, &sc->sc_rec_chan[i]); } - if (pcm_register(dev, status)) - goto detach; - sc->sc_child[i].pcm_registered = 1; + pcm_setstatus(dev, status); uaudio_mixer_register_sysctl(sc, dev, i); From nobody Thu Nov 14 17:15:09 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xq6Gj5zVXz5cvXt; Thu, 14 Nov 2024 17:15: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xq6Gj4Qjvz4y29; Thu, 14 Nov 2024 17:15:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731604509; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W0MopInfDcsLQC2QVdMp5ySUnbheohr+YD86QQsZluo=; b=Ao7uYXVQP9q/GcTDd71waOnXJPqWn5PQxkjX5pLUvyAeimSkg8FlUMUNzWjNxH7gn6OUW0 gypgPSlQUhiy/0t+jKmgqx0gUY1vMPYFwklZGjOieSlgt3CNSENSCYhkvK0/ejrRMf+DQE FXTJfbBdnruw7sXBQU+cfMqdgmqTNluQnVC1gGwfsdPsW1jgsI2m162zBGT5JSRRoW1VQ4 Q6skqAh5KUPEczeNAQsTg+gltmiAR/equu0NBdDZcs07JF1+DERhEH8MfCG1qXBHx2UmWm jpH8wZkg+G2TgQT/PTQoFOQGYpY7fCt+XH+3LBGhyALWdZvGgEG+x8yrNFCh1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731604509; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W0MopInfDcsLQC2QVdMp5ySUnbheohr+YD86QQsZluo=; b=mCEfDuQ0eUAiFvk+LTHgYpp1C8P+v38oOgpTW89NzriBkntoOyTuZXq/N6CTNF7mZdKPER G3azQsxYK0MnzVZF5a9mSw1LU0nVA1dbqtzuL0K2213zj2FfKU69ubkYkbLx5eTdNls440 k3/hWse59lXwOvl6uTB4N9lyp/IZqcBmQ+HjitZRJnvcAQY24keh4sWtHvV2pCMEIWiPuM l0eW7EeL2m3hfjLFhplIxiv0EkWLLoXbs5mTYdjkwzPlpbRVx1M31SAzk99UvSs6WgC54O tlZtFy4OFYzQHNo7jRukbpo3BBh0PUdpvsgQR/RjgXbu6LmI1Vvtielh/M+/+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731604509; a=rsa-sha256; cv=none; b=wUpVgnl1xNssXYZynJ2SeJS/onPwSag96ZL3dMx/KQIlCP7VgO7mX3alvhGXG3JpGwONzn +HodrIInmi8fQxIOeJVRj2dnf3MCKoHNFtCtqWx5iWT1shJ2qiFKq8ynvgrMskWKUZaXD0 T/zp+GSQmP93PjOrz7XZVOXS9YCk8H8hp5Y8EruRpfcQhWjN+dUGP5ZQYnIIWHTDPWUy4k TaN06Qqy+Z9UwsRzZpRZRTt9g4K1CxD88hzrp7xZFljLrL3GBkHeuF5N5dIHctQTs+iML7 HMpVKMR8L8XD/SAiIavmquOKk43S2PQLIBtuanzeNRWokoTPpqi9/YMbm/q1cg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xq6Gj41z0zndC; Thu, 14 Nov 2024 17:15:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AEHF9r3066346; Thu, 14 Nov 2024 17:15:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AEHF9JT066343; Thu, 14 Nov 2024 17:15:09 GMT (envelope-from git) Date: Thu, 14 Nov 2024 17:15:09 GMT Message-Id: <202411141715.4AEHF9JT066343@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Richard Scheffenegger Subject: git: c9047eb7b30d - main - tcp: allow TSO even while RX path is unordered List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c9047eb7b30d8f88fd90b62fbb40d90e046bd1d7 Auto-Submitted: auto-generated The branch main has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=c9047eb7b30d8f88fd90b62fbb40d90e046bd1d7 commit c9047eb7b30d8f88fd90b62fbb40d90e046bd1d7 Author: Richard Scheffenegger AuthorDate: 2024-11-14 07:38:30 +0000 Commit: Richard Scheffenegger CommitDate: 2024-11-14 08:15:53 +0000 tcp: allow TSO even while RX path is unordered Over IP networks, forward and return path largely act independently from each other. Do not disable LRO on the TX side, when reordering/loss is happening on the RX half-connection. Reviewed By: rrs, #transport, peter.lei_ieee.org Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D47056 --- sys/netinet/tcp_output.c | 8 ++++---- sys/netinet/tcp_stacks/bbr.c | 1 - sys/netinet/tcp_stacks/rack.c | 5 +---- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index 8f19885f6b9b..38ce2e3f3145 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -513,8 +513,8 @@ after_sack_rexmit: * hardware). * * TSO may only be used if we are in a pure bulk sending state. The - * presence of TCP-MD5, SACK retransmits, SACK advertizements and - * IP options prevent using TSO. With TSO the TCP header is the same + * presence of TCP-MD5, IP options (IPsec), and possibly SACK + * retransmits prevent using TSO. With TSO the TCP header is the same * (except for the sequence number) for all generated packets. This * makes it impossible to transmit any options which vary per generated * segment or packet. @@ -556,9 +556,9 @@ after_sack_rexmit: if ((tp->t_flags & TF_TSO) && V_tcp_do_tso && len > tp->t_maxseg && (tp->t_port == 0) && ((tp->t_flags & TF_SIGNATURE) == 0) && - tp->rcv_numsacks == 0 && ((sack_rxmit == 0) || V_tcp_sack_tso) && + ((sack_rxmit == 0) || V_tcp_sack_tso) && (ipoptlen == 0 || (ipoptlen == ipsec_optlen && - (tp->t_flags2 & TF2_IPSEC_TSO) != 0)) && + (tp->t_flags2 & TF2_IPSEC_TSO) != 0)) && !(flags & TH_SYN)) tso = 1; diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c index 866ae29eef45..4ab12884b379 100644 --- a/sys/netinet/tcp_stacks/bbr.c +++ b/sys/netinet/tcp_stacks/bbr.c @@ -12619,7 +12619,6 @@ recheck_resend: (len > maxseg) && (tp->t_port == 0) && ((tp->t_flags & TF_SIGNATURE) == 0) && - tp->rcv_numsacks == 0 && ipoptlen == 0) tso = 1; diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index e77604820b63..30b0704ed7d6 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -20708,7 +20708,7 @@ again: if ((tp->t_flags & TF_TSO) && V_tcp_do_tso && len > segsiz && (tp->t_port == 0) && ((tp->t_flags & TF_SIGNATURE) == 0) && - tp->rcv_numsacks == 0 && sack_rxmit == 0 && + sack_rxmit == 0 && ipoptlen == 0) tso = 1; { @@ -20910,7 +20910,6 @@ just_return_nolock: rack_use_rfo && ((flags & (TH_SYN|TH_FIN)) == 0) && (ipoptlen == 0) && - (tp->rcv_numsacks == 0) && rack->r_fsb_inited && TCPS_HAVEESTABLISHED(tp->t_state) && ((IN_RECOVERY(tp->t_flags)) == 0) && @@ -22550,7 +22549,6 @@ enobufs: ((flags & (TH_SYN|TH_FIN)) == 0) && (rsm == NULL) && (ipoptlen == 0) && - (tp->rcv_numsacks == 0) && rack->r_fsb_inited && TCPS_HAVEESTABLISHED(tp->t_state) && ((IN_RECOVERY(tp->t_flags)) == 0) && @@ -22578,7 +22576,6 @@ enobufs: ((flags & (TH_SYN|TH_FIN)) == 0) && (rsm == NULL) && (ipoptlen == 0) && - (tp->rcv_numsacks == 0) && (rack->r_must_retran == 0) && rack->r_fsb_inited && TCPS_HAVEESTABLISHED(tp->t_state) && From nobody Thu Nov 14 17:59:42 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xq7G64dqwz5cyJP; Thu, 14 Nov 2024 17:59: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xq7G6483sz53K6; Thu, 14 Nov 2024 17:59:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731607182; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5n2rniXikmSS9U5clz7qcCle7TAyo8KN/GOGH/uU+Mk=; b=jjxjeEyIhVMtxZPeJoGsXRINYxq88382cCo46Tx3MqJL8i821kAQMhYG8teCMl2W2XR86U codhHUj81gx11BzaWB5iWayBl1VhvCofBD15SzP0qFHyvcDX64XlQpUrkTyWlRRljUwGX9 HE3xABSmCYS9a3Clk85YaBNCugpFF/VvYepiju2E4QbY3S62LQLbR2ycr/k68KDAopyaSw 6TJSvvTR5z5iBD7d/62kEUV2Dcdu92u+exLOiMfaSG/fxUagxDzYkU/cyvaopLH9NePFC6 Q8RJLfVxu0is69+DXZkRUgiM/x8L36TrZfJ37b67h7A5pUPw0U1xPK/FBeHdPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731607182; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5n2rniXikmSS9U5clz7qcCle7TAyo8KN/GOGH/uU+Mk=; b=e0t6CCOlTMqfbol7gIw5fdUvTyMUUozNB0PukXz8TTKUHTs1qbUDg1nUnpjWNYb4XIT0r7 BAzURXLhLJYiiGlummQ2tDyALWVar3xgE8BXhqIhxxZwBCF1mQyAgVmHgMmtDLBtXueaa1 cZrOr6fbwXiHI2qMmnlPR5pPoo9rgvH8BMhqN0tOnhIdprTofzvo3slGQ4FeshAdn2L9W6 OuQRSU2yMW4w1t4vEeMeUH0cIzUiY8ZloQESOMHZgXTHWT2aLuJT6gZvMHg+/o+/PBVfpI vQjW2vT4F6uI8amB3dn3DzkGORb2o8cJqBJUhNIjkvcb8YqEGwZyvQ+rw3gCfw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731607182; a=rsa-sha256; cv=none; b=imJo7IPIMnK2/q8xdfKIdrCIT7rSEk7kUNrxTK1sRp8UH73Nx4VPOMnKj22EHobPU4Mza4 1JQOPKPkpDQ4wgJyJW4blSm3+8N9ujw2FzMt7voDn+Km1crwSC53Pj7KF3ZMxzgIjvgpjL +NLMs6VF/i8W8WiKSPwH4I9pbhE0rlS44//84DLZhFbQqn0TfCFMEGUzsIHFI99wjd9ljF GybcmqBpU5O8JDu7r5kmsb3DbZK1DkJuQBHg4/DCT5SmzHMbr/B7pWFwxtrGWdcPgrhpUs P2v7oMMfV9dT22DXX898iLoQOeKuIa6p4C50UPAlieTNxVcjQ8OWZ3mZHx4JaA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xq7G63XLczpZ2; Thu, 14 Nov 2024 17:59:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AEHxgD7041133; Thu, 14 Nov 2024 17:59:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AEHxgDq041130; Thu, 14 Nov 2024 17:59:42 GMT (envelope-from git) Date: Thu, 14 Nov 2024 17:59:42 GMT Message-Id: <202411141759.4AEHxgDq041130@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Richard Scheffenegger Subject: git: 8f5a2e216f4c - main - tcp: fix cwnd recalculation during limited transmit List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8f5a2e216f4cb955150c8f88ab21eaecc5adc8b9 Auto-Submitted: auto-generated The branch main has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=8f5a2e216f4cb955150c8f88ab21eaecc5adc8b9 commit 8f5a2e216f4cb955150c8f88ab21eaecc5adc8b9 Author: Richard Scheffenegger AuthorDate: 2024-11-14 08:19:34 +0000 Commit: Richard Scheffenegger CommitDate: 2024-11-14 08:19:49 +0000 tcp: fix cwnd recalculation during limited transmit Properly calculate the expected flight size (cwnd) during limited transmit. Exclude the SACK scoreboard from consideration when still in limited transmit. PR: 282605 Reviewed By: tuexen, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D47541 --- sys/netinet/tcp_input.c | 2 +- sys/netinet/tcp_output.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 3dfdb13994a5..7ef480d949e4 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -2813,7 +2813,7 @@ enter_recovery: tcp_sack_adjust(tp); tp->snd_cwnd += (tp->t_dupacks - tp->snd_limited) * - maxseg; + maxseg - tcp_sack_adjust(tp); /* * Only call tcp_output when there * is new data available to be sent diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index 38ce2e3f3145..854cce2a0cc1 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -292,7 +292,8 @@ again: len = 0; p = NULL; if ((tp->t_flags & TF_SACK_PERMIT) && - (IN_FASTRECOVERY(tp->t_flags) || SEQ_LT(tp->snd_nxt, tp->snd_max)) && + (IN_FASTRECOVERY(tp->t_flags) || + (SEQ_LT(tp->snd_nxt, tp->snd_max) && (tp->t_dupacks >= tcprexmtthresh))) && (p = tcp_sack_output(tp, &sack_bytes_rxmt))) { int32_t cwin; From nobody Thu Nov 14 18:38:01 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xq86L2n7Dz5d0qB; Thu, 14 Nov 2024 18:38:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xq86L0xbVz57Sy; Thu, 14 Nov 2024 18:38:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731609482; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Pce34Byfs0W2sitUWNqGWCmRH1JlYqa6ZQE6JF8BA5k=; b=s0QzyiHCZncXbpxD5VUtIKXWAiAtaoUIQLU9TNKkzlNcTE4P6deh0eCSFkJYJj0lym8rah juCRqL6xifF+IoLEPXnC7/0xtx2mc86fqG7Y++YjAZg73jFDjJwFPLpgFJAvn6quYMt+Qb CSmsWlJEJP7oqK4LTWnprd7hfVP39zN5yO8VchjwkjRg4dJOhM/yrhlQzZ/t+ct/MQ3Ve7 mDGEEYhKsB2utVKDLx+R66FFwJgEAiPpkaAFODPnm7wsK07mwk1xqYC9xc3RsbXYLM5j5y tI7v9U7jdksrGZFj0PnD12oZzBznlc+x3/dCNEKZnHlDpl9isIgIxpVUVD+wtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731609482; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Pce34Byfs0W2sitUWNqGWCmRH1JlYqa6ZQE6JF8BA5k=; b=K/aVlODDTjSbfcyB+rgCEWLBDkQtKxXsy0+G5GUski4dAxaCP6oE4Nw0Wno1w7Nqgdu8Vz +P435iCfXwra1/zLEDIakKhsjLsCnebk7Kyc4a29cBR7ZefbzNH2D+nLhM9H9YJCK/tH8+ 5wVbP2K27JBZALdBPIQA6iKSHNwj1cyFUt8TF9XR/8CqFEvSpR8dhoZXlEGlzFUyl4IvpD YbzgLiGJvNmGJ6qs18h5Ycpn29w7E1yCB3rLc8lxjmyYgfNgoW5lLF+FMBtOFPqsy5L1Nz sSGy3J8lSGDoO+H7RlJpuaJ+Mn8JR+NZcT37IPf0L/2EjHJv/zvqEBoAev3okw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731609482; a=rsa-sha256; cv=none; b=K0fzj5nBofmCyl6gapvhhBmE5IkWWiRSv1CE2iblwlNYb26X07h5dmcYpSKTEEahiK9ujD 2jLBSp0ALof4ZmKlNlF0a3oxCGRC182alH8sG74iBjo5uCF/tNmGUivY0c4hEj4EBCPFXo LiBjWSocn0XjIBW1biFD46DvaUmTmcpaz8UORO0xAaryI6XYYBcO9+IZ3fp9gHx2cPMUKw Iik2aupCnBNpokM2nfaGSogMP159/IRzPpoAowIsKo3HoljlV+DPD/K11jDBHOJOinxRyV leQB6UsvKfzn1QcOypjrO7hSm55qLBeZYmrXa60GeQEyCO2y6uLGtgVRMeh6Tg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xq86L0QQRzqS3; Thu, 14 Nov 2024 18:38:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AEIc1kV015611; Thu, 14 Nov 2024 18:38:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AEIc14J015608; Thu, 14 Nov 2024 18:38:01 GMT (envelope-from git) Date: Thu, 14 Nov 2024 18:38:01 GMT Message-Id: <202411141838.4AEIc14J015608@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Richard Scheffenegger Subject: git: 22dcc8129385 - main - tcp: Use segment size excluding tcp options for all cwnd calculations List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 22dcc81293854c4d39df639a329fecded175b2b0 Auto-Submitted: auto-generated The branch main has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=22dcc81293854c4d39df639a329fecded175b2b0 commit 22dcc81293854c4d39df639a329fecded175b2b0 Author: Richard Scheffenegger AuthorDate: 2024-11-14 09:03:40 +0000 Commit: Richard Scheffenegger CommitDate: 2024-11-14 09:16:57 +0000 tcp: Use segment size excluding tcp options for all cwnd calculations Avoid sending small segments by making sure that cwnd is usually calculated in full (data) segment sizes. Especially during loss recovery and retransmission scenarios. Reviewed By: tuexen, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D47474 --- sys/netinet/cc/cc.c | 13 +++++++------ sys/netinet/cc/cc_cdg.c | 9 +++++---- sys/netinet/cc/cc_chd.c | 20 +++++++++++--------- sys/netinet/cc/cc_cubic.c | 24 ++++++++++++------------ sys/netinet/cc/cc_dctcp.c | 13 +++++++------ sys/netinet/cc/cc_htcp.c | 15 ++++++++------- sys/netinet/cc/cc_newreno.c | 8 ++++---- sys/netinet/cc/cc_vegas.c | 11 ++++++----- sys/netinet/tcp_output.c | 2 +- 9 files changed, 61 insertions(+), 54 deletions(-) diff --git a/sys/netinet/cc/cc.c b/sys/netinet/cc/cc.c index c628be250abf..eae5b7bca4d9 100644 --- a/sys/netinet/cc/cc.c +++ b/sys/netinet/cc/cc.c @@ -392,6 +392,7 @@ void newreno_cc_post_recovery(struct cc_var *ccv) { int pipe; + uint32_t mss = tcp_fixed_maxseg(ccv->tp); if (IN_FASTRECOVERY(CCV(ccv, t_flags))) { /* @@ -412,8 +413,7 @@ newreno_cc_post_recovery(struct cc_var *ccv) * Ensure that cwnd does not collapse to 1 MSS under * adverse conditions. Implements RFC6582 */ - CCV(ccv, snd_cwnd) = max(pipe, CCV(ccv, t_maxseg)) + - CCV(ccv, t_maxseg); + CCV(ccv, snd_cwnd) = max(pipe, mss) + mss; else CCV(ccv, snd_cwnd) = CCV(ccv, snd_ssthresh); } @@ -521,7 +521,7 @@ u_int newreno_cc_cwnd_in_cong_avoid(struct cc_var *ccv) { u_int cw = CCV(ccv, snd_cwnd); - u_int incr = CCV(ccv, t_maxseg); + u_int incr = tcp_fixed_maxseg(ccv->tp); KASSERT(cw > CCV(ccv, snd_ssthresh), ("congestion control state not in congestion avoidance\n")); @@ -561,7 +561,8 @@ u_int newreno_cc_cwnd_in_slow_start(struct cc_var *ccv) { u_int cw = CCV(ccv, snd_cwnd); - u_int incr = CCV(ccv, t_maxseg); + u_int mss = tcp_fixed_maxseg(ccv->tp); + u_int incr = mss; KASSERT(cw <= CCV(ccv, snd_ssthresh), ("congestion control state not in slow start\n")); @@ -599,9 +600,9 @@ newreno_cc_cwnd_in_slow_start(struct cc_var *ccv) abc_val = V_tcp_abc_l_var; if (CCV(ccv, snd_nxt) == CCV(ccv, snd_max)) incr = min(ccv->bytes_this_ack, - ccv->nsegs * abc_val * CCV(ccv, t_maxseg)); + ccv->nsegs * abc_val * mss); else - incr = min(ccv->bytes_this_ack, CCV(ccv, t_maxseg)); + incr = min(ccv->bytes_this_ack, mss); } /* ABC is on by default, so incr equals 0 frequently. */ if (incr > 0) diff --git a/sys/netinet/cc/cc_cdg.c b/sys/netinet/cc/cc_cdg.c index 997d9435870f..5b1df76e71a2 100644 --- a/sys/netinet/cc/cc_cdg.c +++ b/sys/netinet/cc/cc_cdg.c @@ -416,27 +416,28 @@ cdg_window_increase(struct cc_var *ccv, int new_measurement) { struct cdg *cdg_data; int incr, s_w_incr; + uint32_t mss = tcp_fixed_maxseg(ccv->tp); cdg_data = ccv->cc_data; incr = s_w_incr = 0; if (CCV(ccv, snd_cwnd) <= CCV(ccv, snd_ssthresh)) { /* Slow start. */ - incr = CCV(ccv, t_maxseg); + incr = mss; s_w_incr = incr; cdg_data->window_incr = cdg_data->rtt_count = 0; } else { /* Congestion avoidance. */ if (new_measurement) { - s_w_incr = CCV(ccv, t_maxseg); + s_w_incr = mss; if (V_cdg_alpha_inc == 0) { - incr = CCV(ccv, t_maxseg); + incr = mss; } else { if (++cdg_data->rtt_count >= V_cdg_alpha_inc) { cdg_data->window_incr++; cdg_data->rtt_count = 0; } - incr = CCV(ccv, t_maxseg) * + incr = mss * cdg_data->window_incr; } } diff --git a/sys/netinet/cc/cc_chd.c b/sys/netinet/cc/cc_chd.c index f48d1f0066e2..1d440f43578f 100644 --- a/sys/netinet/cc/cc_chd.c +++ b/sys/netinet/cc/cc_chd.c @@ -147,10 +147,11 @@ static __inline void chd_window_decrease(struct cc_var *ccv) { unsigned long win; + uint32_t mss = tcp_fixed_maxseg(ccv->tp); - win = min(CCV(ccv, snd_wnd), CCV(ccv, snd_cwnd)) / CCV(ccv, t_maxseg); + win = min(CCV(ccv, snd_wnd), CCV(ccv, snd_cwnd)) / mss; win -= max((win / 2), 1); - CCV(ccv, snd_ssthresh) = max(win, 2) * CCV(ccv, t_maxseg); + CCV(ccv, snd_ssthresh) = max(win, 2) * mss; } /* @@ -190,6 +191,7 @@ chd_window_increase(struct cc_var *ccv, int new_measurement) { struct chd *chd_data; int incr; + uint32_t mss = tcp_fixed_maxseg(ccv->tp); chd_data = ccv->cc_data; incr = 0; @@ -201,23 +203,22 @@ chd_window_increase(struct cc_var *ccv, int new_measurement) if (CCV(ccv, snd_nxt) == CCV(ccv, snd_max)) { /* Not due to RTO. */ incr = min(ccv->bytes_this_ack, - V_tcp_abc_l_var * CCV(ccv, t_maxseg)); + V_tcp_abc_l_var * mss); } else { /* Due to RTO. */ - incr = min(ccv->bytes_this_ack, - CCV(ccv, t_maxseg)); + incr = min(ccv->bytes_this_ack, mss); } } else - incr = CCV(ccv, t_maxseg); + incr = mss; } else { /* Congestion avoidance. */ if (V_tcp_do_rfc3465) { if (ccv->flags & CCF_ABC_SENTAWND) { ccv->flags &= ~CCF_ABC_SENTAWND; - incr = CCV(ccv, t_maxseg); + incr = mss; } } else if (new_measurement) - incr = CCV(ccv, t_maxseg); + incr = mss; } if (chd_data->shadow_w > 0) { @@ -380,8 +381,9 @@ chd_cong_signal(struct cc_var *ccv, ccsignal_t signal_type) } if (chd_data->shadow_w > 0) { + uint32_t mss = tcp_fixed_maxseg(ccv->tp); chd_data->shadow_w = max(chd_data->shadow_w / - CCV(ccv, t_maxseg) / 2, 2) * CCV(ccv, t_maxseg); + mss / 2, 2) * mss; } ENTER_FASTRECOVERY(CCV(ccv, t_flags)); break; diff --git a/sys/netinet/cc/cc_cubic.c b/sys/netinet/cc/cc_cubic.c index c4b44d5c3660..3b134082a59b 100644 --- a/sys/netinet/cc/cc_cubic.c +++ b/sys/netinet/cc/cc_cubic.c @@ -168,7 +168,8 @@ cubic_does_slow_start(struct cc_var *ccv, struct cubic *cubicd) * doesn't rely on tcpcb vars. */ u_int cw = CCV(ccv, snd_cwnd); - u_int incr = CCV(ccv, t_maxseg); + uint32_t mss = tcp_fixed_maxseg(ccv->tp); + u_int incr = mss; uint16_t abc_val; cubicd->flags |= CUBICFLAG_IN_SLOWSTART; @@ -216,10 +217,9 @@ cubic_does_slow_start(struct cc_var *ccv, struct cubic *cubicd) } if (CCV(ccv, snd_nxt) == CCV(ccv, snd_max)) incr = min(ccv->bytes_this_ack, - ccv->nsegs * abc_val * - CCV(ccv, t_maxseg)); + ccv->nsegs * abc_val * mss); else - incr = min(ccv->bytes_this_ack, CCV(ccv, t_maxseg)); + incr = min(ccv->bytes_this_ack, mss); /* Only if Hystart is enabled will the flag get set */ if (cubicd->flags & CUBICFLAG_HYSTART_IN_CSS) { @@ -238,6 +238,7 @@ cubic_ack_received(struct cc_var *ccv, ccsignal_t type) struct cubic *cubic_data; unsigned long W_est, W_cubic; int usecs_since_epoch; + uint32_t mss = tcp_fixed_maxseg(ccv->tp); cubic_data = ccv->cc_data; cubic_record_rtt(ccv); @@ -277,8 +278,7 @@ cubic_ack_received(struct cc_var *ccv, ccsignal_t type) cubic_data->flags &= ~(CUBICFLAG_IN_SLOWSTART | CUBICFLAG_IN_APPLIMIT); cubic_data->t_epoch = ticks; - cubic_data->K = cubic_k(cubic_data->W_max / - CCV(ccv, t_maxseg)); + cubic_data->K = cubic_k(cubic_data->W_max / mss); } usecs_since_epoch = (ticks - cubic_data->t_epoch) * tick; if (usecs_since_epoch < 0) { @@ -298,7 +298,7 @@ cubic_ack_received(struct cc_var *ccv, ccsignal_t type) W_cubic = cubic_cwnd(usecs_since_epoch + cubic_data->mean_rtt_usecs, cubic_data->W_max, - CCV(ccv, t_maxseg), + tcp_fixed_maxseg(ccv->tp), cubic_data->K); if (W_cubic < W_est) { @@ -329,7 +329,7 @@ cubic_ack_received(struct cc_var *ccv, ccsignal_t type) cubic_data->W_max < CCV(ccv, snd_cwnd)) { cubic_data->W_max = CCV(ccv, snd_cwnd); cubic_data->K = cubic_k(cubic_data->W_max / - CCV(ccv, t_maxseg)); + tcp_fixed_maxseg(ccv->tp)); } } } else if (type == CC_ACK && !IN_RECOVERY(CCV(ccv, t_flags)) && @@ -351,7 +351,7 @@ cubic_after_idle(struct cc_var *ccv) cubic_data = ccv->cc_data; cubic_data->W_max = ulmax(cubic_data->W_max, CCV(ccv, snd_cwnd)); - cubic_data->K = cubic_k(cubic_data->W_max / CCV(ccv, t_maxseg)); + cubic_data->K = cubic_k(cubic_data->W_max / tcp_fixed_maxseg(ccv->tp)); if ((cubic_data->flags & CUBICFLAG_HYSTART_ENABLED) == 0) { /* * Re-enable hystart if we have been idle. @@ -532,6 +532,7 @@ cubic_post_recovery(struct cc_var *ccv) { struct cubic *cubic_data; int pipe; + uint32_t mss = tcp_fixed_maxseg(ccv->tp); cubic_data = ccv->cc_data; pipe = 0; @@ -554,13 +555,12 @@ cubic_post_recovery(struct cc_var *ccv) * Ensure that cwnd does not collapse to 1 MSS under * adverse conditions. Implements RFC6582 */ - CCV(ccv, snd_cwnd) = max(pipe, CCV(ccv, t_maxseg)) + - CCV(ccv, t_maxseg); + CCV(ccv, snd_cwnd) = max(pipe, mss) + mss; else /* Update cwnd based on beta and adjusted W_max. */ CCV(ccv, snd_cwnd) = max(((uint64_t)cubic_data->W_max * CUBIC_BETA) >> CUBIC_SHIFT, - 2 * CCV(ccv, t_maxseg)); + 2 * mss); } /* Calculate the average RTT between congestion epochs. */ diff --git a/sys/netinet/cc/cc_dctcp.c b/sys/netinet/cc/cc_dctcp.c index 06b2de11fd46..f43efe0e27c7 100644 --- a/sys/netinet/cc/cc_dctcp.c +++ b/sys/netinet/cc/cc_dctcp.c @@ -108,6 +108,7 @@ dctcp_ack_received(struct cc_var *ccv, ccsignal_t type) { struct dctcp *dctcp_data; int bytes_acked = 0; + uint32_t mss = tcp_fixed_maxseg(ccv->tp); dctcp_data = ccv->cc_data; @@ -125,7 +126,7 @@ dctcp_ack_received(struct cc_var *ccv, ccsignal_t type) newreno_cc_ack_received(ccv, type); if (type == CC_DUPACK) - bytes_acked = min(ccv->bytes_this_ack, CCV(ccv, t_maxseg)); + bytes_acked = min(ccv->bytes_this_ack, mss); if (type == CC_ACK) bytes_acked = ccv->bytes_this_ack; @@ -138,16 +139,16 @@ dctcp_ack_received(struct cc_var *ccv, ccsignal_t type) //XXRMS: For fluid-model DCTCP, update //cwnd here during for RTT fairness if (!dctcp_data->ece_prev - && bytes_acked > CCV(ccv, t_maxseg)) { + && bytes_acked > mss) { dctcp_data->bytes_ecn += - (bytes_acked - CCV(ccv, t_maxseg)); + (bytes_acked - mss); } else dctcp_data->bytes_ecn += bytes_acked; dctcp_data->ece_prev = 1; } else { if (dctcp_data->ece_prev - && bytes_acked > CCV(ccv, t_maxseg)) - dctcp_data->bytes_ecn += CCV(ccv, t_maxseg); + && bytes_acked > mss) + dctcp_data->bytes_ecn += mss; dctcp_data->ece_prev = 0; } dctcp_data->ece_curr = 0; @@ -305,7 +306,7 @@ dctcp_cong_signal(struct cc_var *ccv, ccsignal_t type) } CCV(ccv, snd_cwnd) = mss; dctcp_update_alpha(ccv); - dctcp_data->save_sndnxt += CCV(ccv, t_maxseg); + dctcp_data->save_sndnxt += mss; dctcp_data->num_cong_events++; break; default: diff --git a/sys/netinet/cc/cc_htcp.c b/sys/netinet/cc/cc_htcp.c index 49bf4d6142f1..13441bb49190 100644 --- a/sys/netinet/cc/cc_htcp.c +++ b/sys/netinet/cc/cc_htcp.c @@ -193,6 +193,7 @@ static void htcp_ack_received(struct cc_var *ccv, ccsignal_t type) { struct htcp *htcp_data; + uint32_t mss = tcp_fixed_maxseg(ccv->tp); htcp_data = ccv->cc_data; htcp_record_rtt(ccv); @@ -220,7 +221,7 @@ htcp_ack_received(struct cc_var *ccv, ccsignal_t type) if (V_tcp_do_rfc3465) { /* Increment cwnd by alpha segments. */ CCV(ccv, snd_cwnd) += htcp_data->alpha * - CCV(ccv, t_maxseg); + mss; ccv->flags &= ~CCF_ABC_SENTAWND; } else /* @@ -230,8 +231,8 @@ htcp_ack_received(struct cc_var *ccv, ccsignal_t type) */ CCV(ccv, snd_cwnd) += (((htcp_data->alpha << HTCP_SHIFT) / (max(1, - CCV(ccv, snd_cwnd) / CCV(ccv, t_maxseg)))) * - CCV(ccv, t_maxseg)) >> HTCP_SHIFT; + CCV(ccv, snd_cwnd) / mss))) * + mss) >> HTCP_SHIFT; } } } @@ -370,6 +371,7 @@ htcp_post_recovery(struct cc_var *ccv) { int pipe; struct htcp *htcp_data; + uint32_t mss = tcp_fixed_maxseg(ccv->tp); pipe = 0; htcp_data = ccv->cc_data; @@ -392,12 +394,11 @@ htcp_post_recovery(struct cc_var *ccv) * Ensure that cwnd down not collape to 1 MSS under * adverse conditions. Implements RFC6582 */ - CCV(ccv, snd_cwnd) = max(pipe, CCV(ccv, t_maxseg)) + - CCV(ccv, t_maxseg); + CCV(ccv, snd_cwnd) = max(pipe, mss) + mss; else CCV(ccv, snd_cwnd) = max(1, ((htcp_data->beta * - htcp_data->prev_cwnd / CCV(ccv, t_maxseg)) - >> HTCP_SHIFT)) * CCV(ccv, t_maxseg); + htcp_data->prev_cwnd / mss) + >> HTCP_SHIFT)) * mss; } } diff --git a/sys/netinet/cc/cc_newreno.c b/sys/netinet/cc/cc_newreno.c index 4515ac133c19..d7172fa78bc4 100644 --- a/sys/netinet/cc/cc_newreno.c +++ b/sys/netinet/cc/cc_newreno.c @@ -215,12 +215,13 @@ static void newreno_ack_received(struct cc_var *ccv, ccsignal_t type) { struct newreno *nreno; + uint32_t mss = tcp_fixed_maxseg(ccv->tp); nreno = ccv->cc_data; if (type == CC_ACK && !IN_RECOVERY(CCV(ccv, t_flags)) && (ccv->flags & CCF_CWND_LIMITED)) { u_int cw = CCV(ccv, snd_cwnd); - u_int incr = CCV(ccv, t_maxseg); + u_int incr = mss; /* * Regular in-order ACK, open the congestion window. @@ -324,10 +325,9 @@ newreno_ack_received(struct cc_var *ccv, ccsignal_t type) } if (CCV(ccv, snd_nxt) == CCV(ccv, snd_max)) incr = min(ccv->bytes_this_ack, - ccv->nsegs * abc_val * - CCV(ccv, t_maxseg)); + ccv->nsegs * abc_val * mss); else - incr = min(ccv->bytes_this_ack, CCV(ccv, t_maxseg)); + incr = min(ccv->bytes_this_ack, mss); /* Only if Hystart is enabled will the flag get set */ if (nreno->newreno_flags & CC_NEWRENO_HYSTART_IN_CSS) { diff --git a/sys/netinet/cc/cc_vegas.c b/sys/netinet/cc/cc_vegas.c index 45d6b646bcba..2e24a717f869 100644 --- a/sys/netinet/cc/cc_vegas.c +++ b/sys/netinet/cc/cc_vegas.c @@ -129,6 +129,7 @@ vegas_ack_received(struct cc_var *ccv, ccsignal_t ack_type) struct ertt *e_t; struct vegas *vegas_data; long actual_tx_rate, expected_tx_rate, ndiff; + uint32_t mss = tcp_fixed_maxseg(ccv->tp); e_t = khelp_get_osd(&CCV(ccv, t_osd), ertt_id); vegas_data = ccv->cc_data; @@ -139,7 +140,7 @@ vegas_ack_received(struct cc_var *ccv, ccsignal_t ack_type) actual_tx_rate = e_t->bytes_tx_in_marked_rtt / e_t->markedpkt_rtt; ndiff = (expected_tx_rate - actual_tx_rate) * - e_t->minrtt / CCV(ccv, t_maxseg); + e_t->minrtt / mss; if (ndiff < V_vegas_alpha) { if (CCV(ccv, snd_cwnd) <= @@ -150,8 +151,7 @@ vegas_ack_received(struct cc_var *ccv, ccsignal_t ack_type) } else { vegas_data->slow_start_toggle = 0; CCV(ccv, snd_cwnd) = - min(CCV(ccv, snd_cwnd) + - CCV(ccv, t_maxseg), + min(CCV(ccv, snd_cwnd) + mss, TCP_MAXWIN << CCV(ccv, snd_scale)); } } else if (ndiff > V_vegas_beta) { @@ -207,6 +207,7 @@ vegas_cong_signal(struct cc_var *ccv, ccsignal_t signal_type) { struct vegas *vegas_data; int presignalrecov; + uint32_t mss = tcp_fixed_maxseg(ccv->tp); vegas_data = ccv->cc_data; @@ -218,8 +219,8 @@ vegas_cong_signal(struct cc_var *ccv, ccsignal_t signal_type) switch((int)signal_type) { case CC_VEGAS_RATE: if (!IN_RECOVERY(CCV(ccv, t_flags))) { - CCV(ccv, snd_cwnd) = max(2 * CCV(ccv, t_maxseg), - CCV(ccv, snd_cwnd) - CCV(ccv, t_maxseg)); + CCV(ccv, snd_cwnd) = max(2 * mss, + CCV(ccv, snd_cwnd) - mss); if (CCV(ccv, snd_cwnd) < CCV(ccv, snd_ssthresh)) /* Exit slow start. */ CCV(ccv, snd_ssthresh) = CCV(ccv, snd_cwnd); diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index 854cce2a0cc1..be98d2e41f11 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -1696,7 +1696,7 @@ timer: return (error); case ENOBUFS: TCP_XMIT_TIMER_ASSERT(tp, len, flags); - tp->snd_cwnd = tp->t_maxseg; + tp->snd_cwnd = tcp_maxseg(tp); return (0); case EMSGSIZE: /* From nobody Thu Nov 14 19:41:40 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xq9Wm5jHVz5d4HG; Thu, 14 Nov 2024 19:41: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xq9Wm5GNtz41W6; Thu, 14 Nov 2024 19:41:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731613300; h=from:from:reply-to:subject:subject: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+6Bcr+CwvRFjhVn1pot9k5ZIjvDYDNoZr9i9r1wOsE=; b=x001GneoIRgI3VmRY/SIY9/6j0H78TTta+3HHJQ7+VN3eBTzakbDQEAUH/P9hYg3dz43X0 GQc49DKAy1URk4QpYCaFPY7ruJ0sBDQ66VrIlR+ZuMOwXyrJv/Q5RCt8kQDIEtlCajUrfc qxSTV0QaDNjNConiypeGd5b79xzWtESxgfwBgPz73HAn6N3Xm40pJg+aXsGEGqSHhmNhLG cgDVaeaf4+znXFe9qNeSODXDxHaxUeofdQva/q9EKXyS3VpwkIJCsK2KhUqf6cZDRZNC9m UGTGKazCRT8ElHQxnU9COXUcqWp6Dr1GewEnjSqofMyWggGPrfBFNPgDg1y8NQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731613300; h=from:from:reply-to:subject:subject: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+6Bcr+CwvRFjhVn1pot9k5ZIjvDYDNoZr9i9r1wOsE=; b=fSotFGliAtoV5CGDiS5uGeNIGi5Z5JHDUMv65Lv00baKtIsTzGG99+1ZE2BGrW7P5CcRrn /MbTmMYE/F+Yd1QaIyGyhqplVfWYiLTENxsi1zXvmFhZXc0y5kbpWW5mNRADv++V1azw4u aXcQmvDVkABbJx4RoME9QXnhoGwlMdy3fNXf5NzRupCjAZj0180XeraVAKOJ923oY7r8DT a8FFvMVXFjTgZ6hzeDu9E8z0ns94vygbGnz7FgEGV2bzozVDDSDCSEC3IoqXdBYrXYsEG7 sqsybeO5BttaKeaTAD3kR3mXrBVG8tlrg80HTUm7KaBpsGSPQODcJjC1p70zyw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731613300; a=rsa-sha256; cv=none; b=NVeIRVvkeb1BKk4VUOtF6BjbuUYDptMgPoe1Lsf3Owxw6xGAsuPl2/Iqe41ClRp4Ak9Dq7 RQBZaefAaVAVnm6bIB/lBiWQiS//jxoRitoLIMLnZ/BDg93BsRrtcXR+31bivZiuHr5mvj lVuFtmgqlQQV/BlIMg/pfGkw/sOvlju+tjPABbocXI3muG0synBBNYK2XaThsc2gdY7H/d Xz8lW/ngHF8P49DZxoKzse9lXQpRXS6vgBj/rr1W5CxN+ClBnpgGRiyxDhCV0lzofF4q3A xPyN3jYVVNuqbWWm1AwjdbqXOQPFvSV8fZdNCBS/fiXq7Xw92o36j7IhV/xAKQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xq9Wm4r22zsM4; Thu, 14 Nov 2024 19:41:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AEJfeHt037185; Thu, 14 Nov 2024 19:41:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AEJfeSe037182; Thu, 14 Nov 2024 19:41:40 GMT (envelope-from git) Date: Thu, 14 Nov 2024 19:41:40 GMT Message-Id: <202411141941.4AEJfeSe037182@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 81f08f303805 - main - siftr: remove pointless assertion List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 81f08f303805bcfd0a32fb34835956740c3c9a81 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=81f08f303805bcfd0a32fb34835956740c3c9a81 commit 81f08f303805bcfd0a32fb34835956740c3c9a81 Author: Gleb Smirnoff AuthorDate: 2024-11-14 19:39:12 +0000 Commit: Gleb Smirnoff CommitDate: 2024-11-14 19:39:12 +0000 siftr: remove pointless assertion The assertion is correct, but isn't useful. Also it contradicts its own comment. --- sys/netinet/siftr.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sys/netinet/siftr.c b/sys/netinet/siftr.c index ea1fbc8ff394..374b5595fcbc 100644 --- a/sys/netinet/siftr.c +++ b/sys/netinet/siftr.c @@ -597,9 +597,6 @@ siftr_findinpcb(int ipver, struct ip *ip, struct mbuf *m, uint16_t sport, { struct inpcb *inp; - /* We need the tcbinfo lock. */ - INP_INFO_WUNLOCK_ASSERT(&V_tcbinfo); - if (dir == PFIL_IN) inp = (ipver == INP_IPV4 ? in_pcblookup(&V_tcbinfo, ip->ip_src, sport, ip->ip_dst, From nobody Thu Nov 14 19:41:41 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xq9Wp0pfRz5d494; Thu, 14 Nov 2024 19:41: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xq9Wn69NXz41W7; Thu, 14 Nov 2024 19:41:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731613301; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QMiUwuXYfYhX6yktFzMqZWveO9ohxmQPKlxqeRrwXxc=; b=coKC6IR+JZZafnLL4RqN9VisqWy1z6eV8Jg6tid1L3xLaHp897N0JibT0KmOqrzSeaS60X ItTPRsMhXQJvD37uhgv5F+XX8zs3JtOnDI8E8Xd3Zz2s6IiWfs6fBSEFctSPHZQihwOgM1 ELfvk2M/Fd9SjSeaIV8iElMad07o/9Ir5Iy7vpzp8Bh9D5mV/ULxXZGnurMkEGXxm80zR/ UAJ5KNghLMWVmsmek9B2f8RFNGxFeZyRslZ1ZVKrXubiQ6NQ6+8P0z+oBW0r2oqS5mqwan cCEIr9lZegpOVzw3iIyNODNTEUCRKHEflS/vOASeH3/Ih9D2ejZbHmnhYymx2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731613301; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QMiUwuXYfYhX6yktFzMqZWveO9ohxmQPKlxqeRrwXxc=; b=O0nFw1lOEKcdPmZ7MHfasZmTswGi1NlSZpUmQ67bcFUmc8kn3sahMmC/aLdLwAo6NTJogk xK+QNyY6xSzJJweyPDa3iBUqSQtLhAsaDxAZMtf7augoipQz/QXV6b2ysXWHsl5L2YPloR NQINLm25J4JQPfif9fkYPfWBoxSxKID2Gi+b41GW2LKjD+MGBC/keBpgayNi8nGq3Z0nm/ cbt/oXMlQy9mwSsGfTj5JltiLGFvU8+daX8i0VFVKfz+eFQmPTtCirT6HGTurRjT441Lh6 U1KR01f8CkekNRAWM/w/Gj374x/fxqyGPBuxHkvn08v3q9Si3tb+NRoiDd2ztQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731613301; a=rsa-sha256; cv=none; b=OrBRGKqc6OxW/EsHnb1g+lkb3eURFDmh7FfJFc2KxLjM0VV3KoQU26HVnagfSGHuHwuXmn WxNP3FBET9YEoWna/mA/88dF93gl1CMYf3JxGXstzD5keE5ZQdwz710M/b/DlDApE5Lu31 C25K/WOD/WDh9zqzzLs/4WzBCbwSBNR688Icbjc9YnF+iduhV7vSyUYD1d5oiuI89jv/Zz cUIuvLc6nXIP4oMfWquwrYRiq6tbhAlykj/u9CYQjWAEGGfi812b2zPuWI4Veb36FUmzaM BzP23s63uMPY0FeE7tS2PVX/GF5O3zAxGnvLOqK19sZ3lYO/KGCSfxOKTA9ixQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xq9Wn5nKkzsJw; Thu, 14 Nov 2024 19:41:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AEJffup037236; Thu, 14 Nov 2024 19:41:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AEJff2O037233; Thu, 14 Nov 2024 19:41:41 GMT (envelope-from git) Date: Thu, 14 Nov 2024 19:41:41 GMT Message-Id: <202411141941.4AEJff2O037233@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 20162e6f1c17 - main - rip6: don't lock the inpcb list List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 20162e6f1c176c906c6d9d99fc66f6b0ed37dc05 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=20162e6f1c176c906c6d9d99fc66f6b0ed37dc05 commit 20162e6f1c176c906c6d9d99fc66f6b0ed37dc05 Author: Gleb Smirnoff AuthorDate: 2024-11-14 19:39:12 +0000 Commit: Gleb Smirnoff CommitDate: 2024-11-14 19:39:12 +0000 rip6: don't lock the inpcb list There is no point in doing that when we operate on a particular inpcb. --- sys/netinet6/raw_ip6.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/sys/netinet6/raw_ip6.c b/sys/netinet6/raw_ip6.c index b4421509ec62..8f1955164928 100644 --- a/sys/netinet6/raw_ip6.c +++ b/sys/netinet6/raw_ip6.c @@ -766,9 +766,7 @@ rip6_bind(struct socket *so, struct sockaddr *nam, struct thread *td) } NET_EPOCH_EXIT(et); INP_WLOCK(inp); - INP_INFO_WLOCK(&V_ripcbinfo); inp->in6p_laddr = addr->sin6_addr; - INP_INFO_WUNLOCK(&V_ripcbinfo); INP_WUNLOCK(inp); return (0); } @@ -806,14 +804,12 @@ rip6_connect(struct socket *so, struct sockaddr *nam, struct thread *td) return (error); INP_WLOCK(inp); - INP_INFO_WLOCK(&V_ripcbinfo); /* Source address selection. XXX: need pcblookup? */ NET_EPOCH_ENTER(et); error = in6_selectsrc_socket(addr, inp->in6p_outputopts, inp, so->so_cred, scope_ambiguous, &in6a, NULL); NET_EPOCH_EXIT(et); if (error) { - INP_INFO_WUNLOCK(&V_ripcbinfo); INP_WUNLOCK(inp); return (error); } @@ -821,7 +817,6 @@ rip6_connect(struct socket *so, struct sockaddr *nam, struct thread *td) inp->in6p_faddr = addr->sin6_addr; inp->in6p_laddr = in6a; soisconnected(so); - INP_INFO_WUNLOCK(&V_ripcbinfo); INP_WUNLOCK(inp); return (0); } From nobody Thu Nov 14 19:41:42 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xq9Wq10cXz5d497; Thu, 14 Nov 2024 19: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xq9Wq068Cz41H4; Thu, 14 Nov 2024 19: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=1731613303; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2d0QmqXFa+NYc2ouUcd8ZqeoMbXpAyOgDtpCsHmRpBY=; b=s7b/i51i4V7VNcgcsRQkPyVcUYInPM/HUVmgLcoAtBi1TOls/MTKETpkSJkFtQrnem9ncH VS56OZpuEKBCVzvuOB8prPRMInRGLwHyV2dUE+8t90wJUoVFSI6d3qf2NV66o220dStDIw e9ZqWokmwBz1iUDGaSbrB7hScDYPb22VaXLOwL8IwhL10U4Qn53s3cf60ZJpGX/h/QMWW7 vt/hVJ0cRamNuOIzXGdzMlynxx3Eg/0InAC2TG191/N8K4rTg1AjU0r4aIwvp5tdRcSfCt oGZZI70wsvGSBCvCOpUj6AemBvmJ0RhREq4XqDUotodILA8NKezrFRYetqLI6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731613303; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2d0QmqXFa+NYc2ouUcd8ZqeoMbXpAyOgDtpCsHmRpBY=; b=jr2/4VhWDFWcFiEMVHbLKBfEm64Jc0p8gqjMCgwOzCfbKcaeKX6vs1PK3FWcY/u0nyu5KT bMJn8jNKGjcd16dqdXVYEKo+ucj3oZHqvcXaLpM7Mf0WM2rNOe3OSkHUEQyr3eUBvqVpEH OP7YYbURLIBHjd+7DorrCcPSOolyf7tfjyHXDg6TVYJHV2qtgU8lHBmS4zuWBA88rfU/E8 Hp0GEkN82fX92RN0+gBJtxdHq5Oj9hmA4JO+bvcH3f13joL2P1qNk5PEKEa+MpUtJZm0Lh C+Va2cuBdtsI5oythpAIFWxza49SU5NFoy5MwOYPNszVwrHp5L1lGLORqnZUvg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731613303; a=rsa-sha256; cv=none; b=g4NUJTBBcwC4QqS7zqTeZMpLtmsMLfko3PMoXRjEwylL83A6kjtb+SUw8/CzEz03xZC+GK Ou9GMXU1J+2RI8VCVz96UAGtKmtLbOpg45Vpkr/Qa0abuBN9gDDVYZ4NRa9viDMJclIoMG UdBpU96SqqHvCpdbY+AJBRr0U7HTd/f9RLuEvpYX1iznPOOewzftJtrq9xD3Z8CeaURTIG x5sVRqcUmk1AYgytzs0UX6WsON0/z1276U0R+OSzeBVE9Kc4eifpBEQ2QRoQ+lvHgyDXNK 6L5gxpJ91cxbIN6CeZ3gUtTzkcrye7CdpjdnM+EMUkvwwOC/ngPPmhjrXb8kHg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xq9Wp6psvzsPX; Thu, 14 Nov 2024 19:41:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AEJfgMR037295; Thu, 14 Nov 2024 19:41:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AEJfg77037292; Thu, 14 Nov 2024 19:41:42 GMT (envelope-from git) Date: Thu, 14 Nov 2024 19:41:42 GMT Message-Id: <202411141941.4AEJfg77037292@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: fb7c1ac5ac49 - main - tcp: remove the looping on pcb count in tcp_destroy() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fb7c1ac5ac499b8d5cbd928c5b2e9b3831ea29f7 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=fb7c1ac5ac499b8d5cbd928c5b2e9b3831ea29f7 commit fb7c1ac5ac499b8d5cbd928c5b2e9b3831ea29f7 Author: Gleb Smirnoff AuthorDate: 2024-11-14 19:39:12 +0000 Commit: Gleb Smirnoff CommitDate: 2024-11-14 19:39:12 +0000 tcp: remove the looping on pcb count in tcp_destroy() This was useful when TCP timers were not able to reliably stop. Note that in_pcbinfo_destroy() called later asserts that V_tcbinfo.ipi_count is 0. This reverts 806929d514234, b54e08e11ac15. --- sys/netinet/tcp_subr.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 8bf011afe855..872ea6249051 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -58,7 +58,6 @@ #include #include #include -#include #include #include #include @@ -1593,24 +1592,10 @@ SYSINIT(tcp_init, SI_SUB_PROTO_DOMAIN, SI_ORDER_THIRD, tcp_init, NULL); static void tcp_destroy(void *unused __unused) { - int n; #ifdef TCP_HHOOK int error; #endif - /* - * All our processes are gone, all our sockets should be cleaned - * up, which means, we should be past the tcp_discardcb() calls. - * Sleep to let all tcpcb timers really disappear and cleanup. - */ - for (;;) { - INP_INFO_WLOCK(&V_tcbinfo); - n = V_tcbinfo.ipi_count; - INP_INFO_WUNLOCK(&V_tcbinfo); - if (n == 0) - break; - pause("tcpdes", hz / 10); - } tcp_hc_destroy(); syncache_destroy(); in_pcbinfo_destroy(&V_tcbinfo); From nobody Thu Nov 14 19:41:43 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xq9Wr3gRDz5d4Dx; Thu, 14 Nov 2024 19:41: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xq9Wr1DR1z41WQ; Thu, 14 Nov 2024 19: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=1731613304; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zQ7POcbFgpXF7TMTpolq8l8bwO3/lbtOlt1rzTpVrgY=; b=LXMxW/LQBGuZBPWFr5vsLQ6gJUB/FdcRK3RxvfIg8F2IXkN52aEcP6I/9BEPnX2cdRYHDt /bXVOTdkzfytquTdKt6t1zNLT2BSoq4Qj+B2KArddVQZaD/6UEQg7lFn3BLQWcQpoz1yJH bgm6l9B0cUeyrV/L5yPmoETzlrL/RrcRsAPdfKfcFKvaJaByUETr3oyv7LaV9d5oAQ75eV 8AtZ2S2h//Rz60Zlq/PzmcApYmMZm6L8unTgRWZXmM8Bm9L1jRME6hLWycxDO2EUDPpIPm BCwZ2I5Vcci5NaTDX7tGPTbxad9pNGmSP65u/pKWHr8BWIBisoPygcBZ6/8J7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731613304; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zQ7POcbFgpXF7TMTpolq8l8bwO3/lbtOlt1rzTpVrgY=; b=LM4g/JoPO98VOrG1oDWukof5BuG6Unik9nWCTDAeQrX6vHMshi9CCXfHjoLFxII3BJHVA4 Vh6QLLbF1iYz/qWaT68frb/LzenECuZQArYo1Z4Ma6vobcqa2znR8CyGZlob955HgmaZlD qEsDqpjFyccBP70znn+BYgDAcn3k/f+GDTEFZiTupai2eTXbmo0qRm+sYSIChNqh4XHght Itw9foH8borfloixe9bkMuzgw19hCQ2Wv1ZCVHrDrLI/kumVH75bnEScCbpxcW3GpQNnWk fZh+7sozpnbRiF1/TOEcN5hZMqPcKK1671/kDBacajeTmfBwJtg9bJrJxnj54A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731613304; a=rsa-sha256; cv=none; b=mE88X0Ey8k0QDOMW8uGFV0BdasKGdXGvjBFWipjryn8arWzfAGkrdFkp15Zfg/Tg5cTDE2 Xr4nOj3jJWWwviqQfNFxlUSH4gbe3SF4Ie+K4chLb3Ch2C3qeF8zPhOaS/6LwMiDQe/cSc bwEtoRtf35jJazJWbTbfhJZ8gomuI4eNofnCT6BLjYFKItVWTBEueYOzLHqMGpRXofWbY9 CcOUFrOsIEyvw7K52MPWGMCy2GEknQIWUjGdeDB3A6QTliKtH4H5xBi9X+2L99AgQqmNMj JzOCmQQ/ee1+2GTnfJo69jq0rJSruLuTk2Tomqp1KG7dMVEk5i6aSgfgX16fOA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xq9Wr0rB0zrc1; Thu, 14 Nov 2024 19:41:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AEJfiHX037341; Thu, 14 Nov 2024 19:41:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AEJfhu1037338; Thu, 14 Nov 2024 19:41:43 GMT (envelope-from git) Date: Thu, 14 Nov 2024 19:41:43 GMT Message-Id: <202411141941.4AEJfhu1037338@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 0b4539ee542f - main - inpcb: gc unused argument of in_pcbconnect() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0b4539ee542f7011160c07bf52af7f16739f4a92 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=0b4539ee542f7011160c07bf52af7f16739f4a92 commit 0b4539ee542f7011160c07bf52af7f16739f4a92 Author: Gleb Smirnoff AuthorDate: 2024-11-14 19:39:13 +0000 Commit: Gleb Smirnoff CommitDate: 2024-11-14 19:39:13 +0000 inpcb: gc unused argument of in_pcbconnect() --- sys/netinet/in_pcb.c | 3 +-- sys/netinet/in_pcb.h | 3 +-- sys/netinet/tcp_syncache.c | 2 +- sys/netinet/tcp_usrreq.c | 2 +- sys/netinet/udp_usrreq.c | 2 +- sys/netinet6/udp6_usrreq.c | 2 +- 6 files changed, 6 insertions(+), 8 deletions(-) diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index 116ee149fecb..7c881817ac6e 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -1005,8 +1005,7 @@ in_pcbbind_setup(struct inpcb *inp, struct sockaddr_in *sin, in_addr_t *laddrp, * then pick one. */ int -in_pcbconnect(struct inpcb *inp, struct sockaddr_in *sin, struct ucred *cred, - bool rehash __unused) +in_pcbconnect(struct inpcb *inp, struct sockaddr_in *sin, struct ucred *cred) { u_short lport, fport; in_addr_t laddr, faddr; diff --git a/sys/netinet/in_pcb.h b/sys/netinet/in_pcb.h index a4b4075b3501..0cf5ca017963 100644 --- a/sys/netinet/in_pcb.h +++ b/sys/netinet/in_pcb.h @@ -661,8 +661,7 @@ int in_pcballoc(struct socket *, struct inpcbinfo *); int in_pcbbind(struct inpcb *, struct sockaddr_in *, struct ucred *); int in_pcbbind_setup(struct inpcb *, struct sockaddr_in *, in_addr_t *, u_short *, struct ucred *); -int in_pcbconnect(struct inpcb *, struct sockaddr_in *, struct ucred *, - bool); +int in_pcbconnect(struct inpcb *, struct sockaddr_in *, struct ucred *); int in_pcbconnect_setup(struct inpcb *, struct sockaddr_in *, in_addr_t *, u_short *, in_addr_t *, u_short *, struct ucred *); void in_pcbdisconnect(struct inpcb *); diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index d0068a9d313b..606d808676e1 100644 --- a/sys/netinet/tcp_syncache.c +++ b/sys/netinet/tcp_syncache.c @@ -898,7 +898,7 @@ syncache_socket(struct syncache *sc, struct socket *lso, struct mbuf *m) sin.sin_port = sc->sc_inc.inc_fport; bzero((caddr_t)sin.sin_zero, sizeof(sin.sin_zero)); INP_HASH_WLOCK(&V_tcbinfo); - error = in_pcbconnect(inp, &sin, thread0.td_ucred, false); + error = in_pcbconnect(inp, &sin, thread0.td_ucred); INP_HASH_WUNLOCK(&V_tcbinfo); if (error != 0) goto abort; diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index 9a6e80363f0c..b5725eb1ce86 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -1471,7 +1471,7 @@ tcp_connect(struct tcpcb *tp, struct sockaddr_in *sin, struct thread *td) return (EISCONN); INP_HASH_WLOCK(&V_tcbinfo); - error = in_pcbconnect(inp, sin, td->td_ucred, true); + error = in_pcbconnect(inp, sin, td->td_ucred); INP_HASH_WUNLOCK(&V_tcbinfo); if (error != 0) return (error); diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index 9dad79e95b04..30c8fff5ea94 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -1648,7 +1648,7 @@ udp_connect(struct socket *so, struct sockaddr *nam, struct thread *td) } NET_EPOCH_ENTER(et); INP_HASH_WLOCK(pcbinfo); - error = in_pcbconnect(inp, sin, td->td_ucred, true); + error = in_pcbconnect(inp, sin, td->td_ucred); INP_HASH_WUNLOCK(pcbinfo); NET_EPOCH_EXIT(et); if (error == 0) diff --git a/sys/netinet6/udp6_usrreq.c b/sys/netinet6/udp6_usrreq.c index 414be35b5bef..c52c808a3299 100644 --- a/sys/netinet6/udp6_usrreq.c +++ b/sys/netinet6/udp6_usrreq.c @@ -1151,7 +1151,7 @@ udp6_connect(struct socket *so, struct sockaddr *nam, struct thread *td) inp->inp_vflag &= ~INP_IPV6; NET_EPOCH_ENTER(et); INP_HASH_WLOCK(pcbinfo); - error = in_pcbconnect(inp, &sin, td->td_ucred, true); + error = in_pcbconnect(inp, &sin, td->td_ucred); INP_HASH_WUNLOCK(pcbinfo); NET_EPOCH_EXIT(et); /* From nobody Thu Nov 14 19:41:53 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xq9X22PGXz5d4N3; Thu, 14 Nov 2024 19:41: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xq9X12jQQz425w; Thu, 14 Nov 2024 19:41:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731613313; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3Ruxqmuw7TJp29LXnjbRGH8hxNSXWry4KPV87Ncpdq8=; b=vcT9Ncd+ie4U+UfRUIZxs0g79s6e9KpsPAhJT2ROakm8Jw2QMHEV4M7dQM5mr/8NLXe/0A IjnuRIdrwtVzeixQ2pw5K9wcVjnujinXJQqVn5uXRgrqhkJALWhM3/mQMZukpgtW07+hYr 8IdQEOfiq56O0DaT1jNORu81QbtCGmTzOislelB7edKWevevSPdlhwZAi1tu4RHi10JPfA 9oYZl6VipeZwvXC7I2nWolsmmWZTARfXr+zRglL00aLT8Y8KZ9u5ttPtLO/Sx6PggT+9JE 78RrMK5DSQfcOj4nXd8BYmbDE/b4pBpz0WGFkfXZtro0uYVz1eN5JC/nEu6UWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731613313; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3Ruxqmuw7TJp29LXnjbRGH8hxNSXWry4KPV87Ncpdq8=; b=uHECrMBCrmU4lO8jsCc8ZbGi2mV3Aj5OFZZT5t2t2Sdc4PXzrNcG52s3t+ZsZPHImXjQWP 2nrZcMScQZcjb2dXJ30inT9UYc7BO/JbMIxgvjAJ32wrNRL7j5JT724jAL4oJ69SOdMmgp +6E5YBHiCmP07R8XJw3qqdKOYufR0rta/UGGx2bXaAjubSG9/wLBkac0+JHHjo9eci7NU7 PReSQVqxBShBjyohLAOGzHdUFckfSOVwbqGo0PzlMa5UUG3oFP4LqpoQyIKbdwwxT/Dsgb l2cNC3dlbwaXyXUFftAwrNd42hu7XilWswqCWKY5mHRI4G7gklNmwIJmO3FUrw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731613313; a=rsa-sha256; cv=none; b=DZU5/eSs6JWaydVTiHsKSVKaYRZUfHdQL/H8basDYuG0ZKQP0NIb71Kk5Y4qR0s+Ra9vt4 cQh1tShD0VsEsMzciyfmrebcZIES1nmJuMvL+k2mONqfjj0RQOEjsVL6wSWoeGnqvuxuWa 3q0tP3PSGpg76sPJmMblZmRxvsVQxZtuEJflxB2itgVknyH2++DAgmfvm5unwXbV3g/aV3 K1J9KbPm5w6ZC1EzKRtudbQjkqk2VDgqSIU7006RMfAr6jfPR1+De7zMBNo0X3xiw4QjB+ 8bW5p+CFGOkbCzHCXXkaTKuCKOmUA+OF9P2VVmKbgMqm5ESqctsZJOYmAYgH3g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xq9X12Gdkzs86; Thu, 14 Nov 2024 19:41:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AEJfrZX038577; Thu, 14 Nov 2024 19:41:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AEJfrkI038574; Thu, 14 Nov 2024 19:41:53 GMT (envelope-from git) Date: Thu, 14 Nov 2024 19:41:53 GMT Message-Id: <202411141941.4AEJfrkI038574@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: b697835ce614 - main - Improve reliability of stdout 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 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: b697835ce614de2fa30ba066983d7e71c48f34ce Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=b697835ce614de2fa30ba066983d7e71c48f34ce commit b697835ce614de2fa30ba066983d7e71c48f34ce Author: Dag-Erling Smørgrav AuthorDate: 2024-11-14 19:41:35 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-11-14 19:41:47 +0000 Improve reliability of stdout tests. If the test runner is under heavy load, the command we are testing may succeed in printing to stdout before the dummy receiver has terminated. Add a short delay to reduce the likelihood of this happening. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D47572 --- usr.bin/asa/tests/asa_test.sh | 1 + usr.bin/cmp/tests/cmp_test2.sh | 1 + usr.bin/env/tests/env_test.sh | 1 + 3 files changed, 3 insertions(+) diff --git a/usr.bin/asa/tests/asa_test.sh b/usr.bin/asa/tests/asa_test.sh index 91515bb55d95..2b8fecb12d98 100644 --- a/usr.bin/asa/tests/asa_test.sh +++ b/usr.bin/asa/tests/asa_test.sh @@ -70,6 +70,7 @@ stdout_head() { stdout_body() { ( trap "" PIPE + sleep 1 echo " $a $b" | asa 2>stderr echo $? >result ) | true diff --git a/usr.bin/cmp/tests/cmp_test2.sh b/usr.bin/cmp/tests/cmp_test2.sh index 2ec6071851d3..bca8fc18a6b8 100755 --- a/usr.bin/cmp/tests/cmp_test2.sh +++ b/usr.bin/cmp/tests/cmp_test2.sh @@ -138,6 +138,7 @@ atf_check_stdout() { ( trap "" PIPE + sleep 1 cmp "$@" 2>stderr echo $? >result ) | true diff --git a/usr.bin/env/tests/env_test.sh b/usr.bin/env/tests/env_test.sh index 2dc8f1a4c911..3210361eb223 100644 --- a/usr.bin/env/tests/env_test.sh +++ b/usr.bin/env/tests/env_test.sh @@ -139,6 +139,7 @@ stdout_body() { ( trap "" PIPE + sleep 1 env 2>stderr echo $? >result ) | true From nobody Thu Nov 14 20:01:54 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xq9z74XlPz5d5f1; Thu, 14 Nov 2024 20: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xq9z66vDjz43kj; Thu, 14 Nov 2024 20: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=1731614515; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pZANJTMSwOEzlXeDQhHa0zj1dJQ4fI4cl8drYHo1bso=; b=c8HWtHFQzmH1ArJTVfnCXjNfXlEBvxFdUmlKcQuVxTZPcC+z70kPUThZ4LueHeB2gi8/xd QfhwxWpDkBqi50gqqjLOnfBrU9mESp3bJFcqoErHZipE+tM7YlOpfEcXIqU45l554Y3eka 6TptWAKO8cZAw9MZYhZ4IbivuLc/ueZwTcSCYqV8NuLPe61k6ag3XZHehBYWJ+VpFfZDzF GE1DCXH8XlJYF8Z75QbYAAUrBob1H8wVn2LdobmBk55X7DhPozrmeoPOrMivd2b2cbk0US nHYnJtcDzI7Ok6OVeCD9WHFDUj6kcVjucC/Grbsp+Mm0O7Gr8fKz50wveg5+ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731614515; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pZANJTMSwOEzlXeDQhHa0zj1dJQ4fI4cl8drYHo1bso=; b=tNuLVKjsKFZ6JEePTkBknfc/40UwPq2E5DkkseGB7oeDMQnBk7uAuh3OvCLue3F5oWqa4a hCV2F8HoNtATpuBqdHRdtqRg4/V0J/nYx11jXGxK3ugHDlo8vDfVouJ+ZKEHpXV6Slypn6 /f8NI8rh+ELD8OYUuybf+rc2x1/5H4L6QUAjFTk+CArHSPqxS77PH5A0T+AlEkQdmUlVtw by7Ljg6f6JmAEjqQSBHNZ+SENgrnqJFC2TiREFlgR5zBvJ+5lzuEy2HaqzOGdiW0nrBbpZ bLQjfUcOo2qoX3FEsH98xwkoIVtn4nhXl93zURxiHRdFGVNjgfh3XUxXMLy7yQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731614515; a=rsa-sha256; cv=none; b=diciqB7JL4yTTua8mKNkZGoebcK8EfxPOJuTEggjZ6NsPwrnqyY6eYAsZL+u0Nni8EcYUB 56wpBK9QMFkXKkChv1YUgoTTWi840rwhVNjhOH3qm6Rb7C/JVUpWcDvD95B8a6Lw5t1Nan xHFSPtGZKNCzERU8F47+Qco0E6C8pqw1L/W0clFIL4osTza6gD5gWsg/OFCH+teSKiLH29 mCVdkc9Snlk8k8UDAGcsTK6krzBa8esRRf6RmVMhAnNiqLGm8lfv8cL9LczQV10dN4mP0k n/mR+g2lMPZPu/vr+A5+KFldUlQB0SUZduwGjdgdfUJCsuv0wRZ/3BVSGC5Ohw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xq9z66WRgzsLj; Thu, 14 Nov 2024 20:01:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AEK1som077776; Thu, 14 Nov 2024 20:01:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AEK1sXQ077773; Thu, 14 Nov 2024 20:01:54 GMT (envelope-from git) Date: Thu, 14 Nov 2024 20:01:54 GMT Message-Id: <202411142001.4AEK1sXQ077773@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 3bb15ffc4ab4 - main - in6: Constify some sockaddr conversion 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 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: 3bb15ffc4ab4bfcd4c1bd700a64b3b5ed95389c3 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3bb15ffc4ab4bfcd4c1bd700a64b3b5ed95389c3 commit 3bb15ffc4ab4bfcd4c1bd700a64b3b5ed95389c3 Author: Mark Johnston AuthorDate: 2024-11-14 19:20:21 +0000 Commit: Mark Johnston CommitDate: 2024-11-14 19:59:04 +0000 in6: Constify some sockaddr conversion functions No functional change intended. MFC after: 1 week Sponsored by: Klara, Inc. Sponsored by: Stormshield --- sys/netinet6/in6.c | 4 ++-- sys/netinet6/in6.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index dba1232fd58d..ffbe64f4de80 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -2653,7 +2653,7 @@ in6_domifdetach(struct ifnet *ifp, void *aux) * v4 mapped addr or v4 compat addr */ void -in6_sin6_2_sin(struct sockaddr_in *sin, struct sockaddr_in6 *sin6) +in6_sin6_2_sin(struct sockaddr_in *sin, const struct sockaddr_in6 *sin6) { bzero(sin, sizeof(*sin)); @@ -2665,7 +2665,7 @@ in6_sin6_2_sin(struct sockaddr_in *sin, struct sockaddr_in6 *sin6) /* Convert sockaddr_in to sockaddr_in6 in v4 mapped addr format. */ void -in6_sin_2_v4mapsin6(struct sockaddr_in *sin, struct sockaddr_in6 *sin6) +in6_sin_2_v4mapsin6(const struct sockaddr_in *sin, struct sockaddr_in6 *sin6) { bzero(sin6, sizeof(*sin6)); sin6->sin6_len = sizeof(struct sockaddr_in6); diff --git a/sys/netinet6/in6.h b/sys/netinet6/in6.h index 082e5f8990c9..effd33787e7e 100644 --- a/sys/netinet6/in6.h +++ b/sys/netinet6/in6.h @@ -677,9 +677,9 @@ extern void in6_if_up(struct ifnet *); struct sockaddr; void in6_sin6_2_sin(struct sockaddr_in *sin, - struct sockaddr_in6 *sin6); -void in6_sin_2_v4mapsin6(struct sockaddr_in *sin, - struct sockaddr_in6 *sin6); + const struct sockaddr_in6 *sin6); +void in6_sin_2_v4mapsin6(const struct sockaddr_in *sin, + struct sockaddr_in6 *sin6); void in6_sin6_2_sin_in_sock(struct sockaddr *nam); extern void addrsel_policy_init(void); From nobody Thu Nov 14 20:01:55 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xq9z81t5Hz5d5Zf; Thu, 14 Nov 2024 20: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xq9z80lNcz43kk; Thu, 14 Nov 2024 20: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=1731614516; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fYzlDnCHmiAAY051SFz/vXcFn+vurZ/BMutcXgkyO/8=; b=OsLQzLwdhYvbBI2t+dtz2T1APjJi8sjxPOBRSSTV7CmI9XGZGIK1e7RHObPIaOS3ztoFp1 fJWgqE8UWE5Lzbqw2KVppTmLBlk5QjdeidpKTdkynG0yNMBG+UX3tQNpaE/ZJPcMevOzA/ KSyw0+CGqA/AS7M6GnlYyTlOxn+Cgqk648QA+D32/2IIXb81Ups6wrL4lpTTluS6EncGTg TmJl37KYVkzG+3hg3tqsoYfzYh2nClXXtqiZLmddraaUkfxjxGiQuqevAm4ITWg+TGE4jA 6uXDnYmm1z3MFUf2hTWSm0YPN3dDewe0A/flLr/ClfSCcFNnO7pIK83j6KkkEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731614516; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fYzlDnCHmiAAY051SFz/vXcFn+vurZ/BMutcXgkyO/8=; b=lOsUV6F/QI8Hsp5u0tgTuHruenlt+sXCUYRgPY8vPobmMfIdQ80KAFYAs/uAshJePxbXU3 V/t3w8vlAw3ffO2VCUzoil1JWxp/FxqE57OSZ1cSn6w8VF3AdMJZWoxOuaymz7x+KY226J Os1yUucfyvt1jwd8bGA6S3heSSO1rNHw73VQ6HkLl0Lov1+BE/Qxsv+CQ3Zc6o9mTByDWR 38RcKXIWKiIALRaxZz0O4KUY95yRv8bj4rwErUk0n0gkJ7b4Sfp0b4y7nK5OESOIkM3+oA 1iBsNFCvQk30ZfBsyisq/7Z/ta8TkgX+CS/P8W5fpBwCruJkg8roABtiXidzjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731614516; a=rsa-sha256; cv=none; b=vwMitKYN819pyKq5wPM/5wSKiv9LeWGnyFvf0FCs20zCc30ztGCIMJBf/5ahCqsMXsurUZ gHI/YGUqPbH2koAIyHiJMxZiVXU4a87GIZ2bE2AKYf48hiJPA9FgnLQWH6dAZdytP61f5D JKmiegkcGkTtH7MU2bBjDDSb+MDgnaD6X8b4dAoSZz3KGB7zcGZE0YQqo00JlWbVyMl4RL dAeDtFztcqJ9DQHqU5U/BQ0CMRSu/2YAoPduQbTw5xa5f7oX/b3/1+z5H4hHFHCcHIarkq 8e1YHiOpVaDK7loCsLuKUOZPfWZigiRu9HeBTLA/Mv7E4Lp1IHrW5IMNX5CH4w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xq9z80M6DzsLk; Thu, 14 Nov 2024 20:01:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AEK1t9K077830; Thu, 14 Nov 2024 20:01:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AEK1t0D077827; Thu, 14 Nov 2024 20:01:55 GMT (envelope-from git) Date: Thu, 14 Nov 2024 20:01:55 GMT Message-Id: <202411142001.4AEK1t0D077827@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 52ef944b0f6f - main - inpcb: Constify address parameters to in6 pcb lookup routines List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 52ef944b0f6f1df8eebe1cb877c6aadb1c247da0 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=52ef944b0f6f1df8eebe1cb877c6aadb1c247da0 commit 52ef944b0f6f1df8eebe1cb877c6aadb1c247da0 Author: Mark Johnston AuthorDate: 2024-11-14 19:28:03 +0000 Commit: Mark Johnston CommitDate: 2024-11-14 19:59:04 +0000 inpcb: Constify address parameters to in6 pcb lookup routines No functional change intended. MFC after: 1 week Sponsored by: Klara, Inc. Sponsored by: Stormshield --- sys/netinet6/in6_pcb.c | 16 ++++++++-------- sys/netinet6/in6_pcb.h | 22 ++++++++-------------- 2 files changed, 16 insertions(+), 22 deletions(-) diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c index 45fdd6541bf7..639ec68e19e2 100644 --- a/sys/netinet6/in6_pcb.c +++ b/sys/netinet6/in6_pcb.c @@ -687,7 +687,7 @@ in6_pcbnotify(struct inpcbinfo *pcbinfo, struct sockaddr_in6 *sa6_dst, * hash lock. No inpcb locks or references are acquired. */ struct inpcb * -in6_pcblookup_local(struct inpcbinfo *pcbinfo, struct in6_addr *laddr, +in6_pcblookup_local(struct inpcbinfo *pcbinfo, const struct in6_addr *laddr, u_short lport, int lookupflags, struct ucred *cred) { struct inpcb *inp; @@ -1148,9 +1148,9 @@ in6_pcblookup_hash(struct inpcbinfo *pcbinfo, const struct in6_addr *faddr, } static struct inpcb * -in6_pcblookup_hash_smr(struct inpcbinfo *pcbinfo, struct in6_addr *faddr, - u_int fport_arg, struct in6_addr *laddr, u_int lport_arg, int lookupflags, - uint8_t numa_domain) +in6_pcblookup_hash_smr(struct inpcbinfo *pcbinfo, const struct in6_addr *faddr, + u_int fport_arg, const struct in6_addr *laddr, u_int lport_arg, + int lookupflags, uint8_t numa_domain) { struct inpcb *inp; const inp_lookup_t lockflags = lookupflags & INPLOOKUP_LOCKMASK; @@ -1210,8 +1210,8 @@ in6_pcblookup_hash_smr(struct inpcbinfo *pcbinfo, struct in6_addr *faddr, * from which a pre-calculated hash value may be extracted. */ struct inpcb * -in6_pcblookup(struct inpcbinfo *pcbinfo, struct in6_addr *faddr, u_int fport, - struct in6_addr *laddr, u_int lport, int lookupflags, +in6_pcblookup(struct inpcbinfo *pcbinfo, const struct in6_addr *faddr, + u_int fport, const struct in6_addr *laddr, u_int lport, int lookupflags, struct ifnet *ifp __unused) { return (in6_pcblookup_hash_smr(pcbinfo, faddr, fport, laddr, lport, @@ -1219,8 +1219,8 @@ in6_pcblookup(struct inpcbinfo *pcbinfo, struct in6_addr *faddr, u_int fport, } struct inpcb * -in6_pcblookup_mbuf(struct inpcbinfo *pcbinfo, struct in6_addr *faddr, - u_int fport, struct in6_addr *laddr, u_int lport, int lookupflags, +in6_pcblookup_mbuf(struct inpcbinfo *pcbinfo, const struct in6_addr *faddr, + u_int fport, const struct in6_addr *laddr, u_int lport, int lookupflags, struct ifnet *ifp __unused, struct mbuf *m) { return (in6_pcblookup_hash_smr(pcbinfo, faddr, fport, laddr, lport, diff --git a/sys/netinet6/in6_pcb.h b/sys/netinet6/in6_pcb.h index b9e1cd38a60f..98a4d27ddb35 100644 --- a/sys/netinet6/in6_pcb.h +++ b/sys/netinet6/in6_pcb.h @@ -74,23 +74,17 @@ int in6_pcbbind(struct inpcb *, struct sockaddr_in6 *, struct ucred *); int in6_pcbconnect(struct inpcb *, struct sockaddr_in6 *, struct ucred *, bool); void in6_pcbdisconnect(struct inpcb *); -struct inpcb * - in6_pcblookup_local(struct inpcbinfo *, - struct in6_addr *, u_short, int, - struct ucred *); -struct inpcb * - in6_pcblookup_hash_locked(struct inpcbinfo *pcbinfo, +struct inpcb *in6_pcblookup_local(struct inpcbinfo *, const struct in6_addr *, + u_short, int, struct ucred *); +struct inpcb *in6_pcblookup_hash_locked(struct inpcbinfo *pcbinfo, const struct in6_addr *faddr, u_int fport_arg, const struct in6_addr *laddr, u_int lport_arg, int lookupflags, uint8_t); -struct inpcb * - in6_pcblookup(struct inpcbinfo *, struct in6_addr *, - u_int, struct in6_addr *, u_int, int, - struct ifnet *); -struct inpcb * - in6_pcblookup_mbuf(struct inpcbinfo *, struct in6_addr *, - u_int, struct in6_addr *, u_int, int, - struct ifnet *ifp, struct mbuf *); +struct inpcb *in6_pcblookup(struct inpcbinfo *, const struct in6_addr *, u_int, + const struct in6_addr *, u_int, int, struct ifnet *); +struct inpcb *in6_pcblookup_mbuf(struct inpcbinfo *, const struct in6_addr *, + u_int, const struct in6_addr *, u_int, int, struct ifnet *ifp, + struct mbuf *); void in6_pcbnotify(struct inpcbinfo *, struct sockaddr_in6 *, u_int, const struct sockaddr_in6 *, u_int, int, void *, struct inpcb *(*)(struct inpcb *, int)); From nobody Thu Nov 14 20:58:13 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqCD52ppXz5d85p; Thu, 14 Nov 2024 20:58: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqCD52M8gz485R; Thu, 14 Nov 2024 20:58:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731617893; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZibCTvmTq/KWvbkz/Z7pzlLf9Ulr43Eg6mLDkwlaHmk=; b=V5dNIknhMFlb2lAVQ+U1g2KSg0Fe7Gvd4P2bbSEmdpnsVi8lkdBAUFqm7m0ybo+GUIQN2G HXshVwf47l1o3PmJtRML32X+gEAnWxnldLYBHZ8dpdt9vHxOpZWtzXzVwfrCFf+JPwOVdG 7DDAk63PcKiY9VoE6q7Da47pgBBWv9seegIhnhwgCpQnGyLRoSUSuYufhO4S5znKROH+t1 sAbP71k/+Uf2XzAdGoCxDYY4ojBJ4u5AX52yZjCdJ3Afa9JyRiHDa9xPcvduZP2coCRikd eAcjr95F6HE9QGVna7UKu+8ZYKblbQk8UP45z7mgxXNYBg9vLofqNEzQJX/Hvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731617893; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZibCTvmTq/KWvbkz/Z7pzlLf9Ulr43Eg6mLDkwlaHmk=; b=q16xIj6DCFNmllMLGmdJRc1uSK+I9LIis3xfi+KyXhainRhO6lUwb8fXE9dEUpXVNILsWO u0+lRt/zqN5nm3tjFNS96Oxulo6KovZBniNTQmRcuBliiH7lOg99WUQcGUFHIAVPAqoNIC Bgo2eO5lSucqSz1blpkxYQTDaXZ30lSFBjuvN/9Tp1gom1Rf54ut35HsbO4feBtVtmJXcj +rPetbGi0P46neexUF9zfINIJpN6x0PO5slOHaKaUqT2328z6PULVCDVag2+uCp8qyRC08 RVAmrRtsJCEr8iSDfytTfiD227BuTzErOfOuVwq+CZjtZ9krX4cRldQ/l2Ud6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731617893; a=rsa-sha256; cv=none; b=bmf+cfKtJ5xH6sWKpKLi+DyDtXtARluz7EuWc4/0/FihNc/mNsCQyi4MO5Oqcz3Mp/sBzt b3hj3vTSk8RHgFPmi+C8CHHbyxDZDxpQMtIXIgEz7T+l979/1sGHcrQD6vFMSAemRs4qIZ RUHyPXe8IFEjO/Ms/R2Y/fOaA9JX/6AJmCu6UJOLL5NDE8d7/Of6/4W94q0YK6rZbSX9le qOwz+nY/jYCclcAUAIGzwRvJ/QJ0zmyUFZg57dCiFFcbi6Tk135WErvXEMnP6F9Yryu6Do I8OIETiLSATrd8YTCFXgHANVS73d59uMYwmsBO0a1wi6TDme2DgLgaw1MO6dow== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqCD51nLdzv5X; Thu, 14 Nov 2024 20:58:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AEKwDY0074343; Thu, 14 Nov 2024 20:58:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AEKwD6S074340; Thu, 14 Nov 2024 20:58:13 GMT (envelope-from git) Date: Thu, 14 Nov 2024 20:58:13 GMT Message-Id: <202411142058.4AEKwD6S074340@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jessica Clarke Subject: git: 125ce840bc93 - stable/14 - bsd.subdir.mk: Drop broken optimisation for realinstall parallelisation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 125ce840bc93f9cd9286c9724bf18f951e17d3fa Auto-Submitted: auto-generated The branch stable/14 has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=125ce840bc93f9cd9286c9724bf18f951e17d3fa commit 125ce840bc93f9cd9286c9724bf18f951e17d3fa Author: Jessica Clarke AuthorDate: 2024-02-02 21:17:23 +0000 Commit: Jessica Clarke CommitDate: 2024-11-14 20:57:41 +0000 bsd.subdir.mk: Drop broken optimisation for realinstall parallelisation Not all of the tree is happy for realinstall to be done in parallel. In particular, Makefile.inc1 uses .WAIT to force etc to be installed after earlier subdirectories, since etc calls into share/man's makedb to run makewhatis on the tree and needs all manpages to have been installed. Also, libexec/Makefile doesn't set SUBDIR_PARALLEL, and the link from ld-elf32.1 to ld-elf.1 relies on rtld-elf having been installed before rtld-elf32, otherwise creating the link will fail. In general, core behavioural differences like this between NO_ROOT and "normal" builds are also dangerous and confusing. If this optimisation is deemed important, it should be reintroduced in a more limited and robust manner that doesn't break the above situations. Until then value correctness over slight efficiency gains on high core count machines, the same machines where you're more likely to encounter issues from this optimisation. This reverts commits cd19ecdbdc87 ("Similar to r296013 for NO_ROOT, force SUBDIR_PARALLEL for buildworld WORLDTMP staging.") and b9c6f3168112 ("Add more STANDALONE_SUBDIR_TARGETS."). Found by: CheriBSD Jenkins Reviewed by: bdrewery, brooks Fixes: cd19ecdbdc87 ("Similar to r296013 for NO_ROOT, force SUBDIR_PARALLEL for buildworld WORLDTMP staging.") Fixes: b9c6f3168112 ("Add more STANDALONE_SUBDIR_TARGETS.") MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43705 (cherry picked from commit fbae308319b7678cd9d879f60b1efd8d4c99b5eb) --- share/mk/bsd.subdir.mk | 5 ----- 1 file changed, 5 deletions(-) diff --git a/share/mk/bsd.subdir.mk b/share/mk/bsd.subdir.mk index 72e835d97730..83cead36ade6 100644 --- a/share/mk/bsd.subdir.mk +++ b/share/mk/bsd.subdir.mk @@ -56,11 +56,6 @@ STANDALONE_SUBDIR_TARGETS+= \ installconfig installdirs installincludes installfiles print-dir \ maninstall manlint obj objlink -# It is safe to install in parallel when staging. -.if defined(NO_ROOT) || !empty(SYSROOT) -STANDALONE_SUBDIR_TARGETS+= realinstall -.endif - .include .if ${MK_META_MODE} == "yes" From nobody Thu Nov 14 20:59:59 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqCG730xXz5d8JB; Thu, 14 Nov 2024 20:59: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqCG71XxLz482H; Thu, 14 Nov 2024 20:59:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731617999; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=He4vqBofULwQrFvSAAntORJJyb/oR1tIJeR7ocygLLE=; b=HAN98d4xPODOHyauURMozO03X/dzmIKkX7Vn7etsKSSBJEbWmj8CzMr6a1vGeAY2OBSvvk TupFGGbt0QHGAWnKydKiORqLNr8O7+pREYSTbn9AMlRyxxWLND4s1C9qseu9d7Z+IzL34C eDqXYFR5TbCIUVPx0KtIblu2/Ly03m8Fp862Y3cRHsO178ZyXoyEWdTtXObsYhgZPD28To wMObTKo2fg/3xDwLYlEb+GCGLmn6v2Y44ZWxTOtf5HHLJ+kL/PmNtliPFQcSSNp/8lJl+T nqvE114ir3QO4Oc9XCoBsITiZ5ZvsdmukXIQ5kL9hrFM+979bHeSBMgjzrYrLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731617999; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=He4vqBofULwQrFvSAAntORJJyb/oR1tIJeR7ocygLLE=; b=RA5lq0NR2MPxRZV5/vjltuQOwxYht5r+oFv5ygmjz6o9LyXiOnnkPclFhErDwHZ02dvgQZ TT/Ivy/OyWhIdwlTY+gpel1/09bvIRpMqTdKYjT+TLC3b2evWREZK/BWEPdraEErbSWfva 79f7zJFbTTTlPsNQJl4Dg53q184+Av6LQ4xkTMFUyGgqCz/CHqVq7QUS8nzKkNGqtIbDZd Iq63BwF8CA298XVzsOzabjfhpVnx3vZEkmh0mgQyXTkWGvjclny4laigfwFlGiOy7Tjhdx bLqrF9SO4tewwo0w1K9vQpkL4kaFjiLEC6D+peyEMiHPUKCh2G7f4+juLt65YQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731617999; a=rsa-sha256; cv=none; b=gE8EawfCggP7r4aA633raCFzBtdHwoiSNwDSH8qiYV9Nsy37EK1Ea/iwM7LIzTsMFuxfNa TbqUCO1QJM1t8E+qUn4hJFO6Xp9Wd+rEawPt8tE7sutjzkowhTqcV/UaEOIRximxcg2KSg WhfAin6KO+4qz1T58C9uAe35GMqjrE5np3mHemaIkZR39TGsAE6gHxQLAfAiV2PtJOUtZX XB5bjZ14oJMTjzxdw93r+JpjAexRL4eF4tK36Xk6x0nJbshfX0RfV2yBckI/MDDu4MREWK AunAau2i6UxPIoy2uf0u3pbRw2QLYPx4J0LWVTeN6knPpp4k6yzeae0GLRnP7Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqCG718T2zthn; Thu, 14 Nov 2024 20:59:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AEKxxr0074998; Thu, 14 Nov 2024 20:59:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AEKxxqN074995; Thu, 14 Nov 2024 20:59:59 GMT (envelope-from git) Date: Thu, 14 Nov 2024 20:59:59 GMT Message-Id: <202411142059.4AEKxxqN074995@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: bc919e81e0b7 - main - man: Misc syntax 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 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: bc919e81e0b7dadf0ef550d83d0ef910cc20c5bf Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=bc919e81e0b7dadf0ef550d83d0ef910cc20c5bf commit bc919e81e0b7dadf0ef550d83d0ef910cc20c5bf Author: Graham Percival AuthorDate: 2024-11-13 18:13:33 +0000 Commit: Mitchell Horne CommitDate: 2024-11-14 20:59:22 +0000 man: Misc syntax fixes - loader.efi.8: use proper way of printing a backslash. - usr.bin/gzip/gzip.1: contained a non-breaking space (in utf-8, 0xC2A0). - lib/libpmc/pmc.*.3: remove two duplicate .Xr lines Signed-off-by: Graham Percival Reviewed by: mhorne, Alexander Ziaee MFC after: 3 days Sponsored by: Tarsnap Backup Inc. Pull Request: https://github.com/freebsd/freebsd-src/pull/1523 --- lib/libpmc/pmc.cmn-600.3 | 1 - lib/libpmc/pmc.dmc-620.3 | 1 - stand/man/loader.efi.8 | 2 +- usr.bin/gzip/gzip.1 | 2 +- 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/libpmc/pmc.cmn-600.3 b/lib/libpmc/pmc.cmn-600.3 index 406209807301..5b2937703105 100644 --- a/lib/libpmc/pmc.cmn-600.3 +++ b/lib/libpmc/pmc.cmn-600.3 @@ -560,7 +560,6 @@ Average latency to form a TX TLP .Xr pmc.corei7 3 , .Xr pmc.corei7uc 3 , .Xr pmc.iaf 3 , -.Xr pmc.iaf 3 , .Xr pmc.soft 3 , .Xr pmc.tsc 3 , .Xr pmc.westmere 3 , diff --git a/lib/libpmc/pmc.dmc-620.3 b/lib/libpmc/pmc.dmc-620.3 index f9054b637c90..1cd455af1330 100644 --- a/lib/libpmc/pmc.dmc-620.3 +++ b/lib/libpmc/pmc.dmc-620.3 @@ -130,7 +130,6 @@ The following PMC events are available: .Xr pmc.corei7 3 , .Xr pmc.corei7uc 3 , .Xr pmc.iaf 3 , -.Xr pmc.iaf 3 , .Xr pmc.soft 3 , .Xr pmc.tsc 3 , .Xr pmc.westmere 3 , diff --git a/stand/man/loader.efi.8 b/stand/man/loader.efi.8 index 1417d994478c..c488ac257804 100644 --- a/stand/man/loader.efi.8 +++ b/stand/man/loader.efi.8 @@ -394,7 +394,7 @@ BootCurrent: 0001 Timeout : 2 seconds BootOrder : 0000, 0001, 0003, 0004, 0005, 0006, 0001, 0008, 000A, 000B, 000C, 000E, 0007 \&... -+Boot0001* FreeBSD ZPOOL HD(1,GPT,b5d0f86b-265d-1e1b-18aa-0ed55e1e73bd,0x28,0x96000)/File(\EFI\FREEBSD\LOADER.EFI) ++Boot0001* FreeBSD ZPOOL HD(1,GPT,b5d0f86b-265d-1e1b-18aa-0ed55e1e73bd,0x28,0x96000)/File(\eEFI\eFREEBSD\eLOADER.EFI) nda0p1:/EFI/FREEBSD/LOADER.EFI /boot/efi//EFI/FREEBSD/LOADER.EFI \&... .Ed diff --git a/usr.bin/gzip/gzip.1 b/usr.bin/gzip/gzip.1 index 6f1a99a15b91..86df53f59669 100644 --- a/usr.bin/gzip/gzip.1 +++ b/usr.bin/gzip/gzip.1 @@ -189,7 +189,7 @@ Options on the command line will override anything in .Sh EXIT STATUS The .Nm -utility exits 0 on success, +utility exits 0 on success, 1 on errors, and 2 if a warning occurs. .Sh SIGNALS From nobody Thu Nov 14 21:00:00 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqCG85FBzz5d86b; Thu, 14 Nov 2024 21:00: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqCG82F1Gz482L; Thu, 14 Nov 2024 21:00:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731618000; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YjmcjtWw2CCUyYsiVkKWoJ4P8JKrvBDKvWbn/VVRouI=; b=Pr0fkii1d6IH096+5z78t4/DuoR7AXsjeM/yE4mJxa2nLt9dSK1h2B+qLicbmXMO2h/HB0 aIp4ZhiChuF/UszDdk5GzJYJ21HqrocjySayd8YL9EF4vtnS1nPsz2K0KTWBt0mpq2kt3l 6JcN09Pip/vXwGM8zK+8meNn7ucE3bPoa0YQR7LfoqhbDHE1+Ny2wXW0cpuJhFgjLk76F0 d/eusjbinru7GIJTAo/+fOYq2qLjUD+MUGSjL1m+FzBmeRZpl4oU88cZYbO/gFw6Ae7y2J 1UygBtXQ0LZ2D33cTrlwBcG9cPQJaWajkFTykwL59anTULbnxa8UlYlu8l6U0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731618000; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YjmcjtWw2CCUyYsiVkKWoJ4P8JKrvBDKvWbn/VVRouI=; b=fTHRmW1eRQam7e+n0m4iBeVVyQmZEwDcnsOLlbuBwZHYSaXT128VOuhzvFo0BbBVGTnxJA /xOtjUILG9zNPVpF35dIhcosvSjKI4kT8UfwQrNAc0tHwJJ7h32pk20rX+JEB1ut8iW/ep rlfVbEOS2UmuXzOSN+ODIPhNaAIDbrL+1sXSkB55YtLvxjbwbQmDc0uvBKonBM0bbSxZhE rdQ8lZ/Xfpecn7o+Lh9jxPffKHvokx2Y6nAtGiosBZWCHPWq6+x0xvBI1SeqLIj2IunGBL diuigh4TP81tbfF3JvS1My3+HjmZ6nG/sheZmMUEZxbUzjrV/QpLclOy5dOf1A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731618000; a=rsa-sha256; cv=none; b=o79CBCNWq2LY57SkSyITJjJFErADon7seY8bBHqAO+Ol33OTu1SYnwU+SUtFtxsQeNUdQN 22KPKBzvkJ1nrGxwd5k3s/0dcCXdr4CPoNcGbxROvsQovpieaYm5wgcH4QLWphMRAjiZSx p6qGhPcaPDjHjMjd699R9IyHV6KJBmZtwwLYP0x/6Yd7njUMLUwWvR1FiDizL+cED1m6q6 yQNmvlQMLrYy2ki3Tea1Sl79ppbPpTlepOiW6KefSChmTe3pZ0/CnDj7FCqlQ4wCC0U/nR MwCLJ9F5EKzNwUeQfMt7Hol9HAnd6N0n7TBTWX767xlYY69JHvh9GkdlvJ/JoQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqCG81rgczvBD; Thu, 14 Nov 2024 21:00:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AEL00fJ075361; Thu, 14 Nov 2024 21:00:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AEL00Qk075307; Thu, 14 Nov 2024 21:00:00 GMT (envelope-from git) Date: Thu, 14 Nov 2024 21:00:00 GMT Message-Id: <202411142100.4AEL00Qk075307@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: e413da135819 - main - manuals: fix "PP after SS | SH" warnings List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org 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: e413da1358194fe2e3c75a914b9192ffbc67dfdd Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=e413da1358194fe2e3c75a914b9192ffbc67dfdd commit e413da1358194fe2e3c75a914b9192ffbc67dfdd Author: Graham Percival AuthorDate: 2024-11-13 01:17:24 +0000 Commit: Mitchell Horne CommitDate: 2024-11-14 20:59:43 +0000 manuals: fix "PP after SS | SH" warnings The full mandoc warnings were: skipping paragraph macro: PP after SS skipping paragraph macro: PP after SH The rendered output (in ascii and html) is not affected by this commit. Fixes made by script in https://github.com/Tarsnap/freebsd-doc-scripts Signed-off-by: Graham Percival Reviewed by: jlduran, mhorne MFC after: 1 week Sponsored by: Tarsnap Backup Inc. Pull Request: https://github.com/freebsd/freebsd-src/pull/1524 --- sbin/ipf/ipf/ipf.4 | 1 - sbin/ipf/ipf/ipf.5 | 37 ------------------------------------- sbin/ipf/ipf/ipf.8 | 3 --- sbin/ipf/ipf/ipfilter.5 | 1 - sbin/ipf/ipfs/ipfs.8 | 3 --- sbin/ipf/ipftest/ipftest.1 | 1 - sbin/ipf/ipmon/ipmon.5 | 3 --- sbin/ipf/ipmon/ipmon.8 | 2 -- sbin/ipf/ipnat/ipnat.1 | 1 - sbin/ipf/ipnat/ipnat.4 | 1 - sbin/ipf/ipnat/ipnat.5 | 9 --------- sbin/ipf/ipnat/ipnat.8 | 1 - sbin/ipf/ippool/ippool.5 | 6 ------ sbin/ipf/ippool/ippool.8 | 1 - sbin/ipf/ipscan/ipscan.5 | 1 - sbin/ipf/ipscan/ipscan.8 | 1 - sbin/ipf/ipsend/ipresend.1 | 3 --- sbin/ipf/ipsend/ipsend.1 | 3 --- sbin/ipf/ipsend/ipsend.5 | 2 -- sbin/ipf/ipsend/iptest.1 | 2 -- 20 files changed, 82 deletions(-) diff --git a/sbin/ipf/ipf/ipf.4 b/sbin/ipf/ipf/ipf.4 index c474d5d895de..c5b3bac34947 100644 --- a/sbin/ipf/ipf/ipf.4 +++ b/sbin/ipf/ipf/ipf.4 @@ -6,7 +6,6 @@ ipf \- packet filtering kernel interface .br #include .SH IOCTLS -.PP To add and delete rules to the filter list, three 'basic' ioctls are provided for use. The ioctl's are called as: .LP diff --git a/sbin/ipf/ipf/ipf.5 b/sbin/ipf/ipf/ipf.5 index 423e0de1b34e..32e9913353a0 100644 --- a/sbin/ipf/ipf/ipf.5 +++ b/sbin/ipf/ipf/ipf.5 @@ -2,7 +2,6 @@ .SH NAME ipf, ipf.conf \- IPFilter firewall rules file format .SH DESCRIPTION -.PP The ipf.conf file is used to specify rules for the firewall, packet authentication and packet accounting components of IPFilter. To load rules specified in the ipf.conf file, the ipf(8) program is used. @@ -29,7 +28,6 @@ the direction of the packet (in or out) address patterns or "all" to match any address information .RE .SS Long lines -.PP For rules lines that are particularly long, it is possible to split them over multiple lines implicitly like this: .PP @@ -45,7 +43,6 @@ pass in on bgeo proto tcp from 1.1.1.1 port > 1000 \\ to 2.2.2.2 port < 5000 flags S keep state .fi .SS Comments -.PP Comments in the ipf.conf file are indicated by the use of the '#' character. This can either be at the start of the line, like this: .PP @@ -60,7 +57,6 @@ Or at the end of a like, like this: pass in proto icmp from any to any # Allow all ICMP packets in .fi .SH Firewall rules -.PP This section goes into detail on how to construct firewall rules that are placed in the ipf.conf file. .PP @@ -69,7 +65,6 @@ firewall rule set or which packets should be blocked or allowed in. Some suggestions will be provided but further reading is expected to fully understand what is safe and unsafe to allow in/out. .SS Filter rule keywords -.PP The first word found in any filter rule describes what the eventual outcome of a packet that matches it will be. Descriptions of the many and various sections that can be used to match on the contents of packet headers will @@ -131,7 +126,6 @@ rule to match a packet is a pass, if there is a later matching rule that is a block and no further rules match the packet, then it will be blocked. .SS Matching Network Interfaces -.PP On systems with more than one network interface, it is necessary to be able to specify different filter rules for each of them. In the first instance, this is because different networks will send us @@ -158,7 +152,6 @@ block in on bge0 all pass out on bge0 all .fi .SS Address matching (basic) -.PP The first and most basic part of matching for filtering rules is to specify IP addresses and TCP/UDP port numbers. The source address information is matched by the "from" information in a filter rule @@ -197,7 +190,6 @@ is processing that part of the configuration file, leading to long delays, if not errors, in loading the filter rules. .RE .SS Protocol Matching -.PP To match packets based on TCP/UDP port information, it is first necessary to indicate which protocol the packet must be. This is done using the "proto" keyword, followed by either the protocol number or a name which @@ -209,7 +201,6 @@ block out proto udp from any to 10.1.1.1 pass in proto icmp from any to 192.168.0.0/16 .fi .SS Sending back error packets -.PP When a packet is just discarded using a block rule, there is no feedback given to the host that sent the packet. This is both good and bad. If this is the desired behaviour and it is not desirable to send any feedback about packets @@ -317,7 +308,6 @@ block return-icmp-as-dest(port-unr) in proto udp \\ from any to 192.168.1.0/24 .fi .SS TCP/UDP Port Matching -.PP Having specified which protocol is being matched, it is then possible to indicate which port numbers a packet must have in order to match the rule. Due to port numbers being used differently to addresses, it is therefore @@ -361,7 +351,6 @@ If there is no desire to mention any specific source or destintion information in a filter rule then the word "all" can be used to indicate that all addresses are considered to match the rule. .SS IPv4 or IPv6 -.PP If a filter rule is constructed without any addresses then IPFilter will attempt to match both IPv4 and IPv6 packets with it. In the next list of rules, each one can be applied to either network protocol @@ -399,13 +388,11 @@ protocol family qualifier: pass in family inet6 proto udp from any to any port = 53 .fi .SS First match vs last match -.PP To change the default behaviour from being the last matched rule decides the outcome to being the first matched rule, the word "quick" is inserted to the rule. .SH Extended Packet Matching .SS Beyond using plain addresses -.PP On firewalls that are working with large numbers of hosts and networks or simply trying to filter discretely against various hosts, it can be an easier administration task to define a pool of addresses and have @@ -475,7 +462,6 @@ with. pass in proto icmp from any to (bge0)/32 .fi .SS Using address pools -.PP Rather than list out multiple rules that either allow or deny specific addresses, it is possible to create a single object, call an address pool, that contains all of those addresses and reference that in the @@ -505,7 +491,6 @@ There are different operational characteristics with each, so there may be some situations where a pool works better than hash and vice versa. .SS Matching TCP flags -.PP The TCP header contains a field of flags that is used to decide if the packet is a connection request, connection termination, data, etc. By matching on the flags in conjunction with port numbers, it is @@ -562,7 +547,6 @@ pass out quick proto tcp from any port = 22 to any flags SA By itself, filtering based on the TCP flags becomes more work but when combined with stateful filtering (see below), the situation changes. .SS Matching on ICMP header information -.PP The TCP and UDP are not the only protocols for which filtering beyond just the IP header is possible, extended matching on ICMP packets is also available. The list of valid ICMP types is different for IPv4 @@ -627,7 +611,6 @@ unreach (unreachable, whoreq (WRU request), whorep (WRU reply). .SH Stateful Packet Filtering -.PP Stateful packet filtering is where IPFilter remembers some information from one or more packets that it has seen and is able to apply it to future packets that it receives from the network. @@ -694,7 +677,6 @@ use of these protocols being more for query-response than for ongoing connections. For all other protocols the timeout is 60 seconds in both directions. .SS Stateful filtering options -.PP The following options can be used with stateful filtering: .HP limit @@ -812,7 +794,6 @@ If there is no IP protocol implied by addresses or other features of the rule, IPFilter will assume that no netmask is an all ones netmask for both IPv4 and IPv6. .SS Tieing down a connection -.PP For any connection that transits a firewall, each packet will be seen twice: once going in and once going out. Thus a connection has 4 flows of packets: @@ -851,7 +832,6 @@ pass in on bge0,bge1 out-via bge1,bge0 proto tcp \\ from any to any port = 22 flags S keep state .fi .SS Working with packet fragments -.PP Fragmented packets result in 1 packet containing all of the layer 3 and 4 header information whilst the data is split across a number of other packets. .PP @@ -883,7 +863,6 @@ An example of how this is done is as follows: pass in proto udp from any port = 2049 to any with frags keep frags .fi .SH Building a tree of rules -.PP Writing your filter rules as one long list of rules can be both inefficient in terms of processing the rules and difficult to understand. To make the construction of filter rules easier, it is possible to place them in groups. @@ -947,7 +926,6 @@ to deliver spam, I could load the following rule to complement the above: block in quick from 10.1.1.1 to any group spammers .fi .SS Decapsulation -.PP Rule groups also form a different but vital role for decapsulation rules. With the following simple rule, if IPFilter receives an IP packet that has an AH header as its layer 4 payload, IPFilter would adjust its view of the @@ -982,7 +960,6 @@ It is possible to construct a decapsulate rule without the group head at the end that ipf(8) will accept but such rules will not result in anything happening. .SS Policy Based Routing -.PP With firewalls being in the position they often are, at the boundary of different networks connecting together and multiple connections that have different properties, it is often desirable to have packets flow @@ -1034,7 +1011,6 @@ pass in on bge0 to bge1:1.1.1.1 reply-to hme1:2.1.1.2 \\ to any port = 80 flags S keep state .fi .SS Matching IPv4 options -.PP The design for IPv4 allows for the header to be upto 64 bytes long, however most traffic only uses the basic header which is 20 bytes long. The other 44 bytes can be used to store IP options. These options are @@ -1115,7 +1091,6 @@ ump (Upstream Multicast Packet), visa (Experimental Access Control) and zsu (Experimental Measurement). .SS Security with CIPSO and IPSO -.PP IPFilter supports filtering on IPv4 packets using security attributes embedded in the IP options part of the packet. These options are usually only used on networks and systems that are using lablled security. Unless you know that @@ -1139,7 +1114,6 @@ block in quick all with opt sec-class unclass pass in all with opt sec-class secret .fi .SS Matching IPv6 extension headers -.PP Just as it is possible to filter on the various IPv4 header options, so too it is possible to filter on the IPv6 extension headers that are placed between the IPv6 header and the transport protocol header. @@ -1153,7 +1127,6 @@ mobility (IP mobility), none, routing. .SS Logging -.PP There are two ways in which packets can be logged with IPFilter. The first is with a rule that specifically says log these types of packets and the second is a qualifier to one of the other keywords. Thus it is @@ -1211,7 +1184,6 @@ pass in log level local1.info proto tcp \\ ipfstat(8) reports how many packets have been successfully logged and how many failed attempts to log a packet there were. .SS Filter rule comments -.PP If there is a desire to associate a text string, be it an administrative comment or otherwise, with an IPFilter rule, this can be achieved by giving the filter rule a comment. The comment is loaded with the rule into the @@ -1224,7 +1196,6 @@ pass out quick proto tcp from any port = 80 \\ to any comment "all web server traffic is ok" .fi .SS Tags -.PP To enable filtering and NAT to correctly match up packets with rules, tags can be added at with NAT (for inbound packets) and filtering (for outbound packets.) This allows a filter to be correctly mated with its @@ -1249,7 +1220,6 @@ such as grep, extracting log records of interest is simplified. block in quick log ... set-tag(log=33) .fi .SH Filter Rule Expiration -.PP IPFilter allows rules to be added into the kernel that it will remove after a specific period of time by specifying rule-ttl at the end of a rule. When listing rules in the kernel using ipfstat(8), rules that are going @@ -1264,7 +1234,6 @@ pass in on fxp0 proto tcp from any \\ to port = 22 flags S keep state rule-ttl 30 .fi .SH Internal packet attributes -.PP In addition to being able to filter on very specific network and transport header fields, it is possible to filter on other attributes that IPFilter attaches to a packet. These attributes are placed in a rule after the @@ -1332,7 +1301,6 @@ block in all pass in all with not bad .fi .SH Tuning IPFilter -.PP The ipf.conf file can also be used to tune the behaviour of IPFilter, allowing, for example, timeouts for the NAT/state table(s) to be set along with their sizes. The presence and names of tunables may change @@ -1543,7 +1511,6 @@ update_ipid when set, turns on changing the IP id field in NAT'd packets to a random number. .SS Table of visible variables -.PP A list of all of the tunables, their minimum, maximum and current values is as follows. .PP @@ -1602,7 +1569,6 @@ udp_timeout 1 MAXINT 240 update_ipid 0 1 0 .fi .SH Calling out to internal functions -.PP IPFilter provides a pair of functions that can be called from a rule that allow for a single rule to jump out to a group rather than walk through a list of rules to find the group. If you've got multiple @@ -1637,7 +1603,6 @@ group-map in role=ipf number=1010 { 1.1.1.1 group = 1020, 3.3.0.0/16 group = 1030; }; .fi .SS IPFilter matching expressions -.PP An experimental feature that has been added to filter rules is to use the same expression matching that is available with various commands to flush and list state/NAT table entries. The use of such an expression @@ -1647,7 +1612,6 @@ precludes the filter rule from using the normal IP header matching. pass in exp { "tcp.sport 23 or tcp.sport 50" } keep state .fi .SS Filter rules with BPF -.PP On platforms that have the BPF built into the kernel, IPFilter can be built to allow BPF expressions in filter rules. This allows for packet matching to be on arbitrary data in the packt. The use of a BPF expression @@ -1665,7 +1629,6 @@ accurately reconstruct the original text filter. The end result is that while ipf.conf() can be easy to read, understanding the output from ipfstat might not be. .SH VARIABLES -.PP This configuration file, like all others used with IPFilter, supports the use of variable substitution throughout the text. .PP diff --git a/sbin/ipf/ipf/ipf.8 b/sbin/ipf/ipf/ipf.8 index 38cac51435d1..fba145b0c785 100644 --- a/sbin/ipf/ipf/ipf.8 +++ b/sbin/ipf/ipf/ipf.8 @@ -22,7 +22,6 @@ ipf \- alters packet filtering lists for IP packet input and output <\fIfilename\fP> [...]] .SH DESCRIPTION -.PP \fBipf\fP opens the filenames listed (treating "\-" as stdin) and parses the file for a set of rules which are to be added or removed from the packet filter rule set. @@ -176,9 +175,7 @@ IPF_PREDEFINED='my_server="10.1.1.1"; my_client="10.1.1.2";' .SH SEE ALSO ipftest(1), mkfilters(1), ipf(4), ipl(4), ipf(5), ipfstat(8), ipmon(8), ipnat(8) .SH DIAGNOSTICS -.PP Needs to be run as root for the packet filtering lists to actually be affected inside the kernel. .SH BUGS -.PP If you find any, please send email to me at darrenr@pobox.com diff --git a/sbin/ipf/ipf/ipfilter.5 b/sbin/ipf/ipf/ipfilter.5 index 0bba0f4bad02..0a1da67d70cd 100644 --- a/sbin/ipf/ipf/ipfilter.5 +++ b/sbin/ipf/ipf/ipfilter.5 @@ -2,7 +2,6 @@ .SH NAME IP Filter .SH DESCRIPTION -.PP IP Filter is a package providing packet filtering capabilities for a variety of operating systems. On a properly setup system, it can be used to build a firewall. diff --git a/sbin/ipf/ipfs/ipfs.8 b/sbin/ipf/ipfs/ipfs.8 index a58d02db078a..cf668cc09400 100644 --- a/sbin/ipf/ipfs/ipfs.8 +++ b/sbin/ipf/ipfs/ipfs.8 @@ -40,7 +40,6 @@ ipfs \- saves and restores information for NAT and state tables. .B \-i , .SH DESCRIPTION -.PP \fBipfs\fP allows state information created for NAT entries and rules using \fIkeep state\fP to be locked (modification prevented) and then saved to disk, allowing for the system to experience a reboot, followed by the restoration @@ -117,10 +116,8 @@ operation and unlocked once complete. .SH SEE ALSO ipf(8), ipl(4), ipmon(8), ipnat(8) .SH DIAGNOSTICS -.PP Perhaps the -W and -R operations should set the locking but rather than undo it, restore it to what it was previously. Fragment table information is currently not saved. .SH BUGS -.PP If you find any, please send email to me at darrenr@pobox.com diff --git a/sbin/ipf/ipftest/ipftest.1 b/sbin/ipf/ipftest/ipftest.1 index 11b64e288600..5c5fe60901a0 100644 --- a/sbin/ipf/ipftest/ipftest.1 +++ b/sbin/ipf/ipftest/ipftest.1 @@ -34,7 +34,6 @@ interface ] .SH DESCRIPTION -.PP \fBipftest\fP is provided for the purpose of being able to test a set of filter rules without having to put them in place, in operation and proceed to test their effectiveness. The hope is that this minimises disruptions diff --git a/sbin/ipf/ipmon/ipmon.5 b/sbin/ipf/ipmon/ipmon.5 index ccca214b26a6..c6a4b6c12a42 100644 --- a/sbin/ipf/ipmon/ipmon.5 +++ b/sbin/ipf/ipmon/ipmon.5 @@ -52,7 +52,6 @@ The lines above would save all ipf log entries to /var/log/ipf-log, send all of the entries for NAT (ipnat related) to syslog and generate an email to root for each log entry from the state tables. .SH SYNTAX - MATCHING -.PP In the above example, the matching segment was confined to matching on the type of log entry generated. The full list of fields that can be used here is: @@ -189,7 +188,6 @@ it can then be used in any .I do statement. .SH EXAMPLES -.PP Some further examples are: .nf @@ -208,7 +206,6 @@ match { dstip 127.0.0.1; } do { local("local options"); }; # .fi .SH MATCHING -.PP All entries of the rules present in the file are compared for matches - there is no first or last rule match. .SH FILES diff --git a/sbin/ipf/ipmon/ipmon.8 b/sbin/ipf/ipmon/ipmon.8 index cb6567e316b0..901d1a2a804e 100644 --- a/sbin/ipf/ipmon/ipmon.8 +++ b/sbin/ipf/ipmon/ipmon.8 @@ -27,7 +27,6 @@ ipmon \- monitors /dev/ipl for logged packets .B ] .SH DESCRIPTION -.LP \fBipmon\fP opens \fB/dev/ipl\fP for reading and awaits data to be saved from the packet filter. The binary data read from the device is reprinted in human readable form, however, IP#'s are not mapped back to hostnames, nor are @@ -191,5 +190,4 @@ recorded data. .SH SEE ALSO ipl(4), ipmon(5), ipf(8), ipfstat(8), ipnat(8) .SH BUGS -.PP If you find any, please send email to me at darrenr@pobox.com diff --git a/sbin/ipf/ipnat/ipnat.1 b/sbin/ipf/ipnat/ipnat.1 index f24141546171..0e41ccc42b2a 100644 --- a/sbin/ipf/ipnat/ipnat.1 +++ b/sbin/ipf/ipnat/ipnat.1 @@ -8,7 +8,6 @@ ipnat \- user interface to the NAT ] .B \-f <\fIfilename\fP> .SH DESCRIPTION -.PP \fBipnat\fP opens the filename given (treating "\-" as stdin) and parses the file for a set of rules which are to be added or removed from the IP NAT. .PP diff --git a/sbin/ipf/ipnat/ipnat.4 b/sbin/ipf/ipnat/ipnat.4 index 2a866d4a8f19..d848378d8e98 100644 --- a/sbin/ipf/ipnat/ipnat.4 +++ b/sbin/ipf/ipnat/ipnat.4 @@ -10,7 +10,6 @@ ipnat \- Network Address Translation kernel interface .br #include .SH IOCTLS -.PP To add and delete rules to the NAT list, two 'basic' ioctls are provided for use. The ioctl's are called as: .LP diff --git a/sbin/ipf/ipnat/ipnat.5 b/sbin/ipf/ipnat/ipnat.5 index b01892f9749d..2b391f119450 100644 --- a/sbin/ipf/ipnat/ipnat.5 +++ b/sbin/ipf/ipnat/ipnat.5 @@ -3,7 +3,6 @@ .SH NAME ipnat, ipnat.conf \- IPFilter NAT file format .SH DESCRIPTION -.PP The .B ipnat.conf file is used to specify rules for the Network Address Translation (NAT) @@ -30,7 +29,6 @@ to text that appears before the "->" and the "right hand side" (RHS) for text that appears after it. In essence, the LHS is the packet matching and the RHS is the new data to be used. .SH VARIABLES -.PP This configuration file, like all others used with IPFilter, supports the use of variable substitution throughout the text. .nf @@ -280,7 +278,6 @@ of (say) 172.192.0.2 wanted 260 simultaneous connections going out, they would be limited to 252 with \fBmap-block\fP but would just \fImove on\fP to the next IP address with the \fBmap\fP command. .SS Extended matching -.PP If it is desirable to match on both the source and destination of a packet before applying an address translation to it, this can be achieved by using the same from-to syntax as is used in \fBipf.conf\fP(5). What follows @@ -322,7 +319,6 @@ the defined pool only has /24's or /32's. Pools may also be used .I wherever the from-to syntax in \fBipnat.conf\fR(5) is allowed. .SH INBOUND DESTINATION TRANSLATION (redirection) -.PP Redirection of packets is used to change the destination fields in a packet and is supported for packets that are moving \fIin\fP on a network interface. While the same general syntax for @@ -465,7 +461,6 @@ rdr le0,ppp0 9.8.7.6/32 port 80 -> 1.1.1.1,1.1.1.2 port 80 tcp round-robin frag age 40/40 sticky mssclamp 1000 tag tagged .fi .SH REWRITING SOURCE AND DESTINATION -.PP Whilst the above two commands provide a lot of flexibility in changing addressing fields in packets, often it can be of benefit to translate \fIboth\fP source \fBand\fR destination at the same time or to change @@ -549,7 +544,6 @@ rewrite from any to any port = 80 -> src 1.1.2.3 - 1.1.2.6 dst 2.2.3.4 - 2.2.3.6; .fi .SH DIVERTING PACKETS -.PP If you'd like to send packets to a UDP socket rather than just another computer to be decapsulated, this can be achieved using a .B divert @@ -598,7 +592,6 @@ are flushed out, it is expected that the operator will similarly flush the NAT table and thus NAT sessions are not removed when the NAT rules are flushed out. .SH RULE ORDERING -.PP .B NOTE: Rules in .B ipnat.conf @@ -655,7 +648,6 @@ rdr le0 from 1.1.1.0/24 to 192.2.2.1 port 80 -> 127.0.0.1 3128 tcp .PP Then no packets will match the 2nd rule, they'll all match the first. .SH IPv6 -.PP In all of the examples above, where an IPv4 address is present, an IPv6 address can also be used. All rules must use either IPv4 addresses with both halves of the NAT rule or IPv6 addresses for both halves. Mixing @@ -667,7 +659,6 @@ For shorthand notations such as "0/32", the equivalent for IPv6 is implicit direction that the address should be IPv6, not IPv4. To be unambiguous with 0/0, for IPv6 use ::0/0. .SH KERNEL PROXIES -.PP IP Filter comes with a few, simple, proxies built into the code that is loaded into the kernel to allow secondary channels to be opened without forcing the packets through a user program. The current state of the proxies is listed diff --git a/sbin/ipf/ipnat/ipnat.8 b/sbin/ipf/ipnat/ipnat.8 index 2ef14a971831..b3893f117709 100644 --- a/sbin/ipf/ipnat/ipnat.8 +++ b/sbin/ipf/ipnat/ipnat.8 @@ -15,7 +15,6 @@ ipnat \- user interface to the NAT subsystem ] .B \-f <\fIfilename\fP> .SH DESCRIPTION -.PP \fBipnat\fP opens the filename given (treating "\-" as stdin) and parses the file for a set of rules which are to be added or removed from the IP NAT. .PP diff --git a/sbin/ipf/ippool/ippool.5 b/sbin/ipf/ippool/ippool.5 index 3b5c4d0f2bf6..d631de355a0e 100644 --- a/sbin/ipf/ippool/ippool.5 +++ b/sbin/ipf/ippool/ippool.5 @@ -38,7 +38,6 @@ heirarchical matching, so it is possible to define a subnet as matching but then exclude specific addresses from it. .SS Evolving Configuration -.PP Over time the configuration syntax used by ippool.conf(5) has evolved. Originally the syntax used was more verbose about what a particular value was being used for, for example: @@ -65,7 +64,6 @@ configuration syntax and all output using "ippool -l" will also be in the new configuration syntax. .SS IPFilter devices and pools -.PP To cater to different administration styles, ipool.conf(5) allows you to tie a pool to a specific role in IPFilter. The recognised role names are: .HP @@ -89,7 +87,6 @@ all pools that are defined for the "all" role are available to all types of rules, be they NAT rules in ipnat.conf(5) or firewall rules in ipf.conf(5). .SH Address Pools -.PP An address pool can be used in ipf.conf(5) and ipnat.conf(5) for matching the source or destination address of packets. They can be referred to either by name or number and can hold an arbitrary number of address patterns to @@ -163,7 +160,6 @@ block in from pool/microsoft to any Note that there are limitations on the output returned by whois servers so be aware that their output may not be 100% perfect for your goal. .SH Destination Lists -.PP Destination lists are provided for use primarily with NAT redirect rules (rdr). Their purpose is to allow more sophisticated methods of selecting which host to send traffic to next than the simple round-robin technique @@ -242,7 +238,6 @@ pool all/dstlist (name servers; policy weighted connection;) { bge0:1.1.1.2; bge0:1.1.1.4; bge1:1.1.1.5; bge1:1.1.1.9; }; .fi .SH Group maps -.PP Group maps are provided to allow more efficient processing of packets where there are a larger number of subnets and groups of rules for those subnets. Group maps are used with "call" rules in ipf.conf(5) that @@ -282,7 +277,6 @@ The limitation with group maps is that only the source address or the destination address can be used to map the packet to the starting group, not both, in your ipf.conf(5) file. .SH Hash Tables -.PP The hash table is operationally similar to the address pool. It is used as a store for a collection of address to match on, saving the need to write a lengthy list of rules. As with address pools, searching diff --git a/sbin/ipf/ippool/ippool.8 b/sbin/ipf/ippool/ippool.8 index 1ff9911a87d8..c879c97b01dd 100644 --- a/sbin/ipf/ippool/ippool.8 +++ b/sbin/ipf/ippool/ippool.8 @@ -28,7 +28,6 @@ ippool \- user interface to the IPFilter pools .B ippool -s [-dtv] .SH DESCRIPTION -.PP .B Ippool is used to manage information stored in the IP pools subsystem of IPFilter. Configuration file information may be parsed and loaded into the kernel, diff --git a/sbin/ipf/ipscan/ipscan.5 b/sbin/ipf/ipscan/ipscan.5 index 72b3f92a25a0..76738b607080 100644 --- a/sbin/ipf/ipscan/ipscan.5 +++ b/sbin/ipf/ipscan/ipscan.5 @@ -3,7 +3,6 @@ .SH NAME ipscan, ipscan.conf \- ipscan file format .SH DESCRIPTION -.PP WARNING: This feature is to be considered experimental and may change significantly until a final implementation is drawn up. .PP diff --git a/sbin/ipf/ipscan/ipscan.8 b/sbin/ipf/ipscan/ipscan.8 index 292d5764519a..da4068a1e8f2 100644 --- a/sbin/ipf/ipscan/ipscan.8 +++ b/sbin/ipf/ipscan/ipscan.8 @@ -10,7 +10,6 @@ ipscan \- user interface to the IPFilter content scanning ] .B \-f <\fIfilename\fP> .SH DESCRIPTION -.PP \fBipscan\fP opens the filename given (treating "\-" as stdin) and parses the file to build up a content scanning configuration to load into the kernel. Currently only the first 16 bytes of a connection can be compared. diff --git a/sbin/ipf/ipsend/ipresend.1 b/sbin/ipf/ipsend/ipresend.1 index 529c1649b756..e7714349e6af 100644 --- a/sbin/ipf/ipsend/ipresend.1 +++ b/sbin/ipf/ipsend/ipresend.1 @@ -20,7 +20,6 @@ ipresend \- resend IP packets out to network <\fIfilename\fP> ] .SH DESCRIPTION -.PP \fBipresend\fP was designed to allow packets to be resent, once captured, back out onto the network for use in testing. \fIipresend\fP supports a number of different file formats as input, including saved snoop/tcpdump @@ -97,10 +96,8 @@ The input file is composed of text descriptions of IP packets. .SH SEE ALSO snoop(1m), tcpdump(8), etherfind(8c), ipftest(1), ipresend(1), iptest(1), bpf(4), dlpi(7p) .SH DIAGNOSTICS -.PP Needs to be run as root. .SH BUGS -.PP Not all of the input formats are sufficiently capable of introducing a wide enough variety of packets for them to be all useful in testing. If you find any, please send email to me at darrenr@pobox.com diff --git a/sbin/ipf/ipsend/ipsend.1 b/sbin/ipf/ipsend/ipsend.1 index d0770c41775e..57d29ba8569a 100644 --- a/sbin/ipf/ipsend/ipsend.1 +++ b/sbin/ipf/ipsend/ipsend.1 @@ -35,7 +35,6 @@ ipsend \- sends IP packets <\fIwindow\fP> ] [TCP-flags] .SH DESCRIPTION -.PP \fBipsend\fP can be compiled in two ways. The first is used to send one-off packets to a destination host, using command line options to specify various attributes present in the headers. The \fIdestination\fP must be given as @@ -103,8 +102,6 @@ enable verbose mode. .SH SEE ALSO ipsend(1), ipresend(1), iptest(1), protocols(4), bpf(4), dlpi(7p) .SH DIAGNOSTICS -.PP Needs to be run as root. .SH BUGS -.PP If you find any, please send email to me at darrenr@pobox.com diff --git a/sbin/ipf/ipsend/ipsend.5 b/sbin/ipf/ipsend/ipsend.5 index 998957a030c9..440cb0a5f23b 100644 --- a/sbin/ipf/ipsend/ipsend.5 +++ b/sbin/ipf/ipsend/ipsend.5 @@ -7,7 +7,6 @@ text file which fits the grammar described below. The purpose of this grammar is to allow IP packets to be described in an arbitary way which also allows encapsulation to be so done to an arbitary level. .SH GRAMMAR -.LP .nf line ::= iface | arp | send | defrouter | ipv4line . @@ -80,7 +79,6 @@ databodyopts ::= "len" number | "value" string | "file" filename . icmpechoopts ::= "icmpseq" number | "icmpid" number . .fi .SH COMMANDS -.PP Before sending any packets or defining any packets, it is necessary to describe the interface(s) which will be used to send packets out. .TP diff --git a/sbin/ipf/ipsend/iptest.1 b/sbin/ipf/ipsend/iptest.1 index afc907042a83..5ccebc681cbc 100644 --- a/sbin/ipf/ipsend/iptest.1 +++ b/sbin/ipf/ipsend/iptest.1 @@ -23,7 +23,6 @@ iptest \- automatically generate a packets to test IP functionality <\fIsource\fP> ] .SH DESCRIPTION -.PP \fBiptest\fP ... .SH OPTIONS .TP @@ -98,5 +97,4 @@ Only one of the numeric test options may be given when \fIiptest\fP is run. .PP Needs to be run as root. .SH BUGS -.PP If you find any, please send email to me at darrenr@pobox.com From nobody Thu Nov 14 21:00:01 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqCG965Xsz5d83k; Thu, 14 Nov 2024 21:00: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqCG94gcmz482P; Thu, 14 Nov 2024 21:00:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731618001; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WIVVWoaVp8REyLPDMWcb1cGbtiSaXAAJdGgAUtYF2xU=; b=u0pMV7R1MAEeTZrOdKtxbQV4S6ONfYAncKsrgv6QucaSjs3+Ew8onPK6PytF43yCqbqQYy OH6ga36zI1lxUZQ0+eYEqFUa4nhzY2GTpfK6vTdmKJ08HkdssZ5qvpimVhiL7MGM1vILUq mW2wHxHzaK27uHWQ4kDECvNmCp0OqfXqKkU6Um4oh8xjwOdRGA2snpVLGoTFLsmASJ0Je5 FGTes7Luu0CZLdDi5V2utr1Evtc5OAZoLdxgLAFP35SlrprrGmt69vcIuW4mVaCsmTIzsd 5jINLe+cMpUo84R+DCqcKSHjvqQsS+vJRna1N/TsNjJH92B+MMjiTI44KWiGbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731618001; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WIVVWoaVp8REyLPDMWcb1cGbtiSaXAAJdGgAUtYF2xU=; b=dZ7Ewh468xI8jy8fIW1F7j+30GqNsO6jv7nJGZu6HHXp0gXI+DXnoeqgBKHxrTawsxlLEI lTs6y4u+3gtKpAGjnTknABU9raJnzaTYrQPLSrmWR7w9qxY1fp5hOlgtDEc2armdtEelpz W9gTAEyZRzxlnVqiUpOJD1sQYz0nrbAA7ik544gYox0Rq7eW+WvQFkUkRgfh0MpN1CV+1R e7DeqGuRxYoqGbdovSmuWQIJOqNw1lgWnr2A3cls2KlyCYlxwLll/c38NXMaMVP9nGnCT8 EyL9KSfIxWVwhUVu49JQCESDMX2R9m9wtnIgy/YHDNy1svZuUCgbYu3QhUSpqQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731618001; a=rsa-sha256; cv=none; b=NSXi84iprLbF5wo/92YRIdE809eBXkxYJh3z+GXZzN8OTLuMKyeXKcFfn9fC/IPQHIRge4 Ai+ljfdBjuWkKXOkLEEWjgqmWFRqkoXYtj8YtNUsZr+WUmzZ/rP2p6R1MxD4KuMKM7H0rB Vdkdp6FVpzUh7TdPqXmAeITKyKfwy1ZRVwJQrpc2nLVWXnYYenjCwaDxvd9xERQ0Kpxzto V5JMoit1h6idn/wi89RuKFSDrgttCEO80+/cRfXSDPuAEEJuj6ltzFzCnvsUGlcuKZFF9y eYQCYkiQZLrr0EUawu0iWrWvfIXiYEwWXthJK48NVy/iVhdeY8L+O4ByPRlGgA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqCG92P9lzvDp; Thu, 14 Nov 2024 21:00:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AEL018P077309; Thu, 14 Nov 2024 21:00:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AEL01u1077302; Thu, 14 Nov 2024 21:00:01 GMT (envelope-from git) Date: Thu, 14 Nov 2024 21:00:01 GMT Message-Id: <202411142100.4AEL01u1077302@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 3ef9e138dd8b - main - lock.1: align options + tag spdx List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org 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: 3ef9e138dd8b70879ba91d84ac623baa0d4b6c91 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=3ef9e138dd8b70879ba91d84ac623baa0d4b6c91 commit 3ef9e138dd8b70879ba91d84ac623baa0d4b6c91 Author: Alexander Ziaee AuthorDate: 2024-11-12 18:49:54 +0000 Commit: Mitchell Horne CommitDate: 2024-11-14 20:59:43 +0000 lock.1: align options + tag spdx Reviewed by: imp, mhorne MFC after: 3 days Pull Request: https://github.com/freebsd/freebsd-src/pull/1522 --- usr.bin/lock/lock.1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/usr.bin/lock/lock.1 b/usr.bin/lock/lock.1 index 9041cd92b0d5..a221d1b33840 100644 --- a/usr.bin/lock/lock.1 +++ b/usr.bin/lock/lock.1 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-3-Clause +.\" .\" Copyright (c) 1987, 1990, 1993 .\" The Regents of the University of California. All rights reserved. .\" @@ -46,7 +49,7 @@ will timeout after some interval of time and it may be killed by someone with the appropriate permission. .Pp The following options are available: -.Bl -tag -width indent +.Bl -tag -width "-t timeout" .It Fl n Do not use a timeout value. Terminal will be locked forever. From nobody Thu Nov 14 22:10:49 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqDqt26bSz5dDCK; Thu, 14 Nov 2024 22:10: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqDqs4l70z4JyZ; Thu, 14 Nov 2024 22:10:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731622249; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/WhR+tkHeXoFsZ5m04LR4+IW/hTERXMQCgSo2JnraMY=; b=TW0DmwZHEl1g5KcZQFuomTIsfMFJqF07wteGXJ3SCJzcep/0c9xLAoWhxry/wuS6OiBDEP PHBbP668mEt0yLZInte2wtkhKv+RCKUXoOWbrbDqTsKyyMhC1U/Uc1EAQbz+7yABiUvYhw oWvZU5+7WOS8ZxLV0pEiC6YQ+Ehf7hpkWqZ2L/NRe2pY0JjUPKGw0kZV2jRPLg3NLVSwsH gjF95TwBBmlkPQMKkgBonaKqLL0/vbudoraCNiZLKktSP1NKdJipvWWD+qfr6UjdYr1Jwf /cYRYW9rq8HoQNIGbNRJ8+AAh8PIi3mm4UF7HSrGFbwFjt/rhC6rpx2aUTuaNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731622249; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/WhR+tkHeXoFsZ5m04LR4+IW/hTERXMQCgSo2JnraMY=; b=Fc5qJ5fuzZyoxI6d5BLroIhu+88EV69IwuIB/x+YQDWEDZQBDyOcdasmk5QQZa5fjUIvyR zLRw5AkDFEzaYb9nig6DMQXPjnvchL45UXoFFpJU+cdmyJVj90bsddOB+bC2hYlpnms1gZ sPa7sSxxIPFMHUJWuTTJKHQEn2INqfdZW/zRDY8DQrhf4SKiCGmffwsKxQhIfiZ5F7R1ze q+DKjNIGRSPihn5QiRp07fUf/vN3gAI2Eq/2nSyAtfg3SaoF9fEQVRkxb5ifbWf48eGEYg GSMZmZhadsiqQAUoj3avNEnxuT2Sdkae7fzQ5saFxfVRhPMbTTbiVUc2YGqnBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731622249; a=rsa-sha256; cv=none; b=vVxp/cW+QJa62O6Gx4VJLcG7ARjvjlq4nUe7DpPJq6RP8iKtOiWwdh2VGhqQd7hq5fD7pN 3NH1rjDLe9T1RzuFUCnDOvHreUg5u/MevdZvP6lKESdTxAgVwrh0+7J9oor3wiqIEjYm4+ xfI75c5xglKNijO2vnfVKT4FeTBhBGnOYkxsppDmuQDYtUJqZ8fh4PrusoA/q5Z/zEr1hT ogEBzj8n2uXtsR4G+q10kxrz6qyN2omo1ihIGIN0ra6AJjQDB0B2c8bU9KJvynZ3GCNtOd mBJIAxyCDFS3ePJabaBzm5LzkuQoWLvcPptn8AwaufX6tK+WwW4BP5SaqeJy8g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqDqs4Lr9zwjf; Thu, 14 Nov 2024 22:10:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AEMAnvr019315; Thu, 14 Nov 2024 22:10:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AEMAnNu019312; Thu, 14 Nov 2024 22:10:49 GMT (envelope-from git) Date: Thu, 14 Nov 2024 22:10:49 GMT Message-Id: <202411142210.4AEMAnNu019312@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Clausecker Subject: git: 007871c35628 - main - lib/libc/string: add memset_explicit() for compliance with C23 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 007871c35628054bbfdb323e1991da872dd0d17d Auto-Submitted: auto-generated The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=007871c35628054bbfdb323e1991da872dd0d17d commit 007871c35628054bbfdb323e1991da872dd0d17d Author: Robert Clausecker AuthorDate: 2024-10-25 15:16:27 +0000 Commit: Robert Clausecker CommitDate: 2024-11-14 22:10:00 +0000 lib/libc/string: add memset_explicit() for compliance with C23 Patterned after explicit_bzero, visible from C23 onwards. Reviewed by: emaste, kevans Differential Revision: https://reviews.freebsd.org/D47286 --- include/string.h | 3 +++ lib/libc/string/Makefile.inc | 4 +++- lib/libc/string/Symbol.map | 4 ++++ lib/libc/string/memset.3 | 18 ++++++++++++++++-- lib/libc/string/memset_explicit.c | 26 ++++++++++++++++++++++++++ 5 files changed, 52 insertions(+), 3 deletions(-) diff --git a/include/string.h b/include/string.h index d9adcf4e0e41..73b675370c58 100644 --- a/include/string.h +++ b/include/string.h @@ -71,6 +71,9 @@ void *(memmove)(void *, const void *, size_t); void *(mempcpy)(void * __restrict, const void * __restrict, size_t); #endif void *(memset)(void *, int, size_t); +#if __BSD_VISIBLE || __ISO_C_VISIBLE >= 2023 +void *memset_explicit(void *, int, size_t); +#endif #if __POSIX_VISIBLE >= 200809 char *(stpcpy)(char * __restrict, const char * __restrict); char *(stpncpy)(char * __restrict, const char * __restrict, size_t); diff --git a/lib/libc/string/Makefile.inc b/lib/libc/string/Makefile.inc index c5ded194c78a..5d4a9a6e3eed 100644 --- a/lib/libc/string/Makefile.inc +++ b/lib/libc/string/Makefile.inc @@ -11,6 +11,7 @@ MISRCS+=bcmp.c bcopy.c bzero.c explicit_bzero.c \ ffs.c ffsl.c ffsll.c fls.c flsl.c flsll.c \ memccpy.c memchr.c memrchr.c memcmp.c \ memcpy.c memmem.c memmove.c mempcpy.c memset.c memset_s.c \ + memset_explicit.c \ stpcpy.c stpncpy.c strcasecmp.c \ strcat.c strcasestr.c strchr.c strchrnul.c strcmp.c strcoll.c strcpy.c\ strcspn.c strdup.c strerror.c strlcat.c strlcpy.c strlen.c strmode.c \ @@ -62,7 +63,8 @@ MLINKS+=ffs.3 ffsl.3 \ MLINKS+=index.3 rindex.3 MLINKS+=memchr.3 memrchr.3 MLINKS+=memcpy.3 mempcpy.3 -MLINKS+=memset.3 memset_s.3 +MLINKS+=memset.3 memset_s.3 \ + memset.3 memset_explicit.3 MLINKS+=strcasecmp.3 strncasecmp.3 \ strcasecmp.3 strcasecmp_l.3 \ strcasecmp.3 strncasecmp_l.3 diff --git a/lib/libc/string/Symbol.map b/lib/libc/string/Symbol.map index fd854d1f9479..6b2c41124adf 100644 --- a/lib/libc/string/Symbol.map +++ b/lib/libc/string/Symbol.map @@ -116,6 +116,10 @@ FBSD_1.7 { wmempcpy; }; +FBSD_1.8 { + memset_explicit; +}; + FBSDprivate_1.0 { __strtok_r; }; diff --git a/lib/libc/string/memset.3 b/lib/libc/string/memset.3 index 3ae485f68a92..f2dba3ec5a48 100644 --- a/lib/libc/string/memset.3 +++ b/lib/libc/string/memset.3 @@ -29,7 +29,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 19, 2018 +.Dd October 24, 2024 .Dt MEMSET 3 .Os .Sh NAME @@ -41,6 +41,8 @@ .In string.h .Ft void * .Fn memset "void *dest" "int c" "size_t len" +.Ft void * +.Fn memset_explicit "void *dest" "int c" "size_t len" .Fd #define __STDC_WANT_LIB_EXT1__ 1 .Ft errno_t .Fn memset_s "void *dest" "rsize_t destsz" "int c" "rsize_t len" @@ -68,6 +70,13 @@ The behaviour is also undefined if is an invalid pointer. .Pp The +.Fn memset_explicit +function behaves the same as +.Fn memset, but will not be removed by a compiler's dead store +optimization pass, making it useful for clearing sensitive memory +such as a password. +.Pp +The .Fn memset_s function behaves the same as .Fn memset @@ -108,7 +117,9 @@ before .Sh RETURN VALUES The .Fn memset -function returns its first argument. +and +.Fn memset_explicit +functions return their first argument. The .Fn memset_s function returns zero on success, non-zero on error. @@ -128,3 +139,6 @@ conforms to conforms to .St -isoC-2011 K.3.7.4.1. +.Fn memset_explicit +conforms to +.St -isoC-2024 . diff --git a/lib/libc/string/memset_explicit.c b/lib/libc/string/memset_explicit.c new file mode 100644 index 000000000000..ee6be0363981 --- /dev/null +++ b/lib/libc/string/memset_explicit.c @@ -0,0 +1,26 @@ +/*- + * SPDF-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2024 Robert Clausecker + */ + +#include + +__attribute__((weak)) void __memset_explicit_hook(void *, int, size_t); + +__attribute__((weak)) void +__memset_explicit_hook(void *buf, int ch, size_t len) +{ + (void)buf; + (void)ch; + (void)len; +} + +void * +memset_explicit(void *buf, int ch, size_t len) +{ + memset(buf, ch, len); + __memset_explicit_hook(buf, ch, len); + + return (buf); +} From nobody Thu Nov 14 22:39:50 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqFTL3J6nz5dFDK; Thu, 14 Nov 2024 22:39: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqFTL2lrWz4NQH; Thu, 14 Nov 2024 22:39:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731623990; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4QuREYRGittyrudJwYDhbKWMl5CMTTQJA6f1/eAuVmQ=; b=skGZcIle2J4ynAFxT3R37kyb/vHPcCtjNx1FSX7+TmlRhPikjS7w+nXQRm4wjHITVcCQos S/PD/JFtmZ8ytMwRthHCKY0tbJNAigGJGOiwBhmIBLbdo+cc22066kmLOGpbQhlZ5zO65C bef0z/lHvUTjsUgBfIa82a9mSzNubnNCXj8WL/XpLonSG30n/5rAoZcaRCwngJmS84Q3nm Xo1jHEiruNNhvyjb2Qy4lKU0EIwv5owf64WpFDXkeDrsKEvWYC9ZBRCCSytwhU3n7GRhI8 RFmfio1OYsk92yDaswFKROs+WtVUpL3rttdB/4Rpa5DBF6ph212NU2FJcyyJLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731623990; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4QuREYRGittyrudJwYDhbKWMl5CMTTQJA6f1/eAuVmQ=; b=VrbQHOQD4bc+KKcx23a8dlrJ43XWDKznMd5TK0JSKFg9PhOBS2IpwzG2F2Tm9+TNOD/ifp BmwsQ6qAHXGh1tiLkwN1dY9nD1cTFysvsDI6xwa0FhkZftm6Nmzk53FsFOxsxPbZ1+O1w9 NB+w96mIIF3iJonTvPkP0kfhRyGkJ537pVhK9FaxFO3GoUtLbSXdbyTt5+aL0oQYa3totn qLSUIU8MOa394013l6rFAs+Xzg+VOAcaCnvKpyB9v1ZFRXPPDzYlFZ5v0YXRXT6+BMVhFv IuMAGGkMp1WBB4pdbJ0mOnafdby12Z+CgD4eJZHnTSXNdsMJWdnAHUAllQO0zA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731623990; a=rsa-sha256; cv=none; b=gs3DB5baJNctN4gr1EbGUjEpyBNqny/Npr13E/oS6G/At/dshOKlQOiAH1mv2hbS2uIzCc RYuXusayB9YaXqbgz1tg18QjbGZqE79bcx1FooTZNOBc6Z/HtlrHhJWMH1+A4LlsrlHFD5 zm+7svCzM/jg4PpvcKvc3GSfN1E4p18Ol5WuhOlZvNTOBxEx6HpUbtzY+KoaBLjliu1mA2 vgNQMJMrCVml2Mybprdjw016wnHszZVzpnLAK+NNuvj0OJSqrv2Dj/V12Zvv2+vGKrTRO7 ZvazmgJlzik9W7I50QZrYtOJL7Sak0Xyv0Efhw1I9qCG+IKLw3DxAXQXzchzXA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqFTL2MDdzxhL; Thu, 14 Nov 2024 22:39:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AEMdogM062447; Thu, 14 Nov 2024 22:39:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AEMdo6Q062444; Thu, 14 Nov 2024 22:39:50 GMT (envelope-from git) Date: Thu, 14 Nov 2024 22:39:50 GMT Message-Id: <202411142239.4AEMdo6Q062444@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 47866cdcc727 - main - release: Exclude container images from globs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 47866cdcc7278faa27250dcea16374231c676050 Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=47866cdcc7278faa27250dcea16374231c676050 commit 47866cdcc7278faa27250dcea16374231c676050 Author: Colin Percival AuthorDate: 2024-11-14 22:30:44 +0000 Commit: Colin Percival CommitDate: 2024-11-14 22:30:44 +0000 release: Exclude container images from globs We use a *.txz glob to get all of the "distributions" which comprise the FreeBSD release, but we now (optionally) also build container images which are .txz files. Grep those out from the distribution lists. A better long-term fix would probably be to generate an explicit list of the .txz files we want rather than using an overbroad glob and filtering out the files we *don't* want. Fixes: d03c82c28da8 ("release: add optional OCI images") MFC after: 1 minute Sponsored by: Amazon --- release/Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/release/Makefile b/release/Makefile index bd130082a9ce..e6b68a61ce2a 100644 --- a/release/Makefile +++ b/release/Makefile @@ -171,12 +171,12 @@ disc1: packagesystem -DDB_FROM_SRC ) # Copy distfiles mkdir -p ${.TARGET}/usr/freebsd-dist - for dist in MANIFEST $$(ls *.txz | grep -vE -- '(${base ${_ALL_libcompats}:L:ts|})-dbg'); \ + for dist in MANIFEST $$(ls *.txz | grep -v container | grep -vE -- '(${base ${_ALL_libcompats}:L:ts|})-dbg'); \ do cp $${dist} ${.TARGET}/usr/freebsd-dist; \ done .if defined(NO_ROOT) echo "./usr/freebsd-dist type=dir uname=root gname=wheel mode=0755" >> ${.TARGET}/METALOG - for dist in MANIFEST $$(ls *.txz | grep -vE -- '(${base ${_ALL_libcompats}:L:ts|})-dbg'); \ + for dist in MANIFEST $$(ls *.txz | grep -v container | grep -vE -- '(${base ${_ALL_libcompats}:L:ts|})-dbg'); \ do echo "./usr/freebsd-dist/$${dist} type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG; \ done .endif @@ -243,12 +243,12 @@ dvd: packagesystem -DDB_FROM_SRC ) # Copy distfiles mkdir -p ${.TARGET}/usr/freebsd-dist - for dist in MANIFEST *.txz; \ + for dist in MANIFEST $$(ls *.txz | grep -v container); \ do cp $${dist} ${.TARGET}/usr/freebsd-dist; \ done .if defined(NO_ROOT) echo "./usr/freebsd-dist type=dir uname=root gname=wheel mode=0755" >> ${.TARGET}/METALOG - for dist in MANIFEST *.txz; \ + for dist in MANIFEST $$(ls *.txz | grep -v container); \ do echo "./usr/freebsd-dist/$${dist} type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG; \ done .endif @@ -297,7 +297,7 @@ mini-memstick.img: bootonly-memstick cd bootonly-memstick && sh ${.CURDIR}/${TARGET}/make-memstick.sh .${NO_ROOT:D/METALOG} ../${.TARGET} packagesystem: ${DISTRIBUTIONS} - sh ${.CURDIR}/scripts/make-manifest.sh *.txz > MANIFEST + sh ${.CURDIR}/scripts/make-manifest.sh $$(ls *.txz | grep -v container) > MANIFEST touch ${.TARGET} pkg-stage: dvd From nobody Thu Nov 14 22:40:16 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqFTs0Q4Tz5dFbq; Thu, 14 Nov 2024 22:40: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqFTr4nKtz4NjN; Thu, 14 Nov 2024 22:40:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731624016; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w39HKgynLjPyRj/eKf6uDs7qprwl8QWcTOuEhVPjwJ4=; b=GQzR7YKGaz66MYfaywQhrMx1Y+GSpPivSp/+jaGT/KNmQBg0qtqExeJ4+/UvVr9phQodcu HWMTGXu8IMtyFFdJIYZXwa44KNZWUrgTTpBSH9Jwx6eJcZobEBMMHsGCU6ii1mSxZVLajC XfLlnZDgvJwMS9PCLVM4OUKRtcPNT8c8OGgHj/Eo9JnorWxDd1gzb2rxwuUDdq+7YWWeIX gVK0DhCNg4bd7GtjNSCKeT+AlKtHB2KihjXZzWwMeDpUkLOrdUAhgP6GJ3On94/s2Qx7g2 LKLzpbStaTK2H+2WI/68VUeh4RjoY78DNGKBZOKp4kux6bvjrRZkQpgXSeKhkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731624016; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w39HKgynLjPyRj/eKf6uDs7qprwl8QWcTOuEhVPjwJ4=; b=X/whp+3QOhNeKPVOm5aNW8CBiFvFs0NR9GCcXtx3J9Vfi1Dwd82S4WQihZiB9tiPWhhQVs RFskYyB+KzMGWfj2C/dhz4NstjB6FhQ1dhE/p7y69/nqfmoEOCjX4bM7z1MeTxgzEyq0Vk pTAsNLLetVBZZ0jDPF8tCseR/iyazDsM2tpDlqQA68jq/L7zOdxwGpbnsgdNAHoLTJZclP 6IQNlG1QjbwXC6lyp3wNzcEnfZUk5rhwOnrg/lZQV5PrPXRjGbP7i09kC9by3mFVr2/b8w FoyKnVp9MacyktTPoFnevFfKcs5aTGl2ZAkexaN6dm1TN+MPEdt2TOgU0VPplg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731624016; a=rsa-sha256; cv=none; b=OjYwUC8m2P1mbQrR+VYzQmIyBaWjSk/wtodHlB5OXH3AZQr59vo/EinO87I6jYDQ9L7vQd x0H+OMntPsGbkBAIgARF3kUYRu1dcXb1RKoTMVcAH++NYerX7WcmSDatIUEIyzbEEiBm9t lbTi/8uwbbyFiPHV9p9DSy/CfDiBQBeSxr//QLU3OASycQzl4BRHWpwhqLEJHV7vIs5mrA jwbah/ysyZ9l78NUy+TXGZtZleoxyIeBZbAeTpl1LiEmqxUeICc1moWClqcq5AKdFljcrW gp+5QNX6szlwmJahU+nPHGGaN+a2loDzoqUDGQx00OQsZQPWOW9ora6oerhXBA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqFTr4NbFzxS1; Thu, 14 Nov 2024 22:40:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AEMeGBu070682; Thu, 14 Nov 2024 22:40:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AEMeGDc070673; Thu, 14 Nov 2024 22:40:16 GMT (envelope-from git) Date: Thu, 14 Nov 2024 22:40:16 GMT Message-Id: <202411142240.4AEMeGDc070673@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 012bb7fdafb3 - stable/14 - release: Exclude container images from globs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 012bb7fdafb30032f7a09212ffd6398eb4230b07 Auto-Submitted: auto-generated The branch stable/14 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=012bb7fdafb30032f7a09212ffd6398eb4230b07 commit 012bb7fdafb30032f7a09212ffd6398eb4230b07 Author: Colin Percival AuthorDate: 2024-11-14 22:30:44 +0000 Commit: Colin Percival CommitDate: 2024-11-14 22:40:07 +0000 release: Exclude container images from globs We use a *.txz glob to get all of the "distributions" which comprise the FreeBSD release, but we now (optionally) also build container images which are .txz files. Grep those out from the distribution lists. A better long-term fix would probably be to generate an explicit list of the .txz files we want rather than using an overbroad glob and filtering out the files we *don't* want. Fixes: d03c82c28da8 ("release: add optional OCI images") MFC after: 1 minute Sponsored by: Amazon (cherry picked from commit 47866cdcc7278faa27250dcea16374231c676050) --- release/Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/release/Makefile b/release/Makefile index 4f95d3ba32ec..36c47e5ad454 100644 --- a/release/Makefile +++ b/release/Makefile @@ -177,12 +177,12 @@ disc1: packagesystem -DDB_FROM_SRC ) # Copy distfiles mkdir -p ${.TARGET}/usr/freebsd-dist - for dist in MANIFEST $$(ls *.txz | grep -vE -- '(${base ${_ALL_libcompats}:L:ts|})-dbg'); \ + for dist in MANIFEST $$(ls *.txz | grep -v container | grep -vE -- '(${base ${_ALL_libcompats}:L:ts|})-dbg'); \ do cp $${dist} ${.TARGET}/usr/freebsd-dist; \ done .if defined(NO_ROOT) echo "./usr/freebsd-dist type=dir uname=root gname=wheel mode=0755" >> ${.TARGET}/METALOG - for dist in MANIFEST $$(ls *.txz | grep -vE -- '(${base ${_ALL_libcompats}:L:ts|})-dbg'); \ + for dist in MANIFEST $$(ls *.txz | grep -v container | grep -vE -- '(${base ${_ALL_libcompats}:L:ts|})-dbg'); \ do echo "./usr/freebsd-dist/$${dist} type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG; \ done .endif @@ -247,12 +247,12 @@ dvd: packagesystem -DDB_FROM_SRC ) # Copy distfiles mkdir -p ${.TARGET}/usr/freebsd-dist - for dist in MANIFEST *.txz; \ + for dist in MANIFEST $$(ls *.txz | grep -v container); \ do cp $${dist} ${.TARGET}/usr/freebsd-dist; \ done .if defined(NO_ROOT) echo "./usr/freebsd-dist type=dir uname=root gname=wheel mode=0755" >> ${.TARGET}/METALOG - for dist in MANIFEST *.txz; \ + for dist in MANIFEST $$(ls *.txz | grep -v container); \ do echo "./usr/freebsd-dist/$${dist} type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG; \ done .endif @@ -300,7 +300,7 @@ mini-memstick.img: bootonly-memstick cd bootonly-memstick && sh ${.CURDIR}/${TARGET}/make-memstick.sh .${NO_ROOT:D/METALOG} ../${.TARGET} packagesystem: ${DISTRIBUTIONS} - sh ${.CURDIR}/scripts/make-manifest.sh *.txz > MANIFEST + sh ${.CURDIR}/scripts/make-manifest.sh $$(ls *.txz | grep -v container) > MANIFEST touch ${.TARGET} pkg-stage: dvd From nobody Thu Nov 14 23:56:40 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqHB05MsNz5dJs1; Thu, 14 Nov 2024 23:56: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqHB04sC6z4TW1; Thu, 14 Nov 2024 23:56:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731628600; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tFqGFv284bWREy3dNPrE1MvUwJywTqxYK5gxJ4wT8dg=; b=q5EDG64GBSCmYUTeV+1RgjFB/zFoe+OxRluTSHmjDPuSSRM6vuhCRCoFwBwSReRXLvW1UY Ud8ktu3I3Ep5zV7nSxl3ap9POUL0y2AOkcqsEIYNZNOKBOflkHsfudXiGI6e4OEkns4ssK r+uLA6GoVGVvOdX00uhqriaXed2M3t8JuU4aZhsBv2gJTxtrpTW/tUZ6e+MuicFr42lT9c os5fXYp5QDRntliJxQMws/EbdOuiqtEDcnu9cT7ZAt9iR7Y9LxZEpt36uLt3nu1cgbCYVy JJ+2XovfDfj3usiIUt7xWP5wHqFYdZ3rarq3rySlHWogs/dF1Vua4qreAqkI7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731628600; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tFqGFv284bWREy3dNPrE1MvUwJywTqxYK5gxJ4wT8dg=; b=DD5tzsSvehKYAJZpy6cxmABumsmynUS+xoPQiokiWbVZTh6t5IoIUcDWFo048vLU8QEXnh byKXw6cvH+TLV3Ry+NsSDDvnmOuvbgQcEiH/7sLScwatIcCU/42fufN2N7VU2dSpovmCfc fSXNiKMdkW4gBtn0D003R3kuwkV1CSndj7rw9lb/DHZ6zJlx6NFKoD86QnA9FoXeosiKjb 9z1jIDgYniudm5C2UKj/LdOGcfL3r2yrNT9XHnQkV1otMOy7rxrZ7mpJhv6Rm/ANMOC0aI ZlftsHzR1SFoEOD7mBxSZa14lnyu0BKsdXxbQW2xSRHND0OH4ZaEnRDxKi0dbQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731628600; a=rsa-sha256; cv=none; b=CU172elEHPSiTf1CgUe/+tsV/LYBP0bdsHuKdmNPSydCrjxSYNGf4UN10r6BaA0cDA7/JX FyqKmY7JrwvRiy+SmYyHWvcy7LapaSQ4Hc4A/uo5lDcZnRe5M4DwYmNYU8LdgDDD+eWTrB G75Q4I3mMgxm+2eTSFtbOHa1OkcJj6gZ2VDTXi/mJefcSVgCGjwGaNrG9f1yNuvxTODLcH UnD2DdL+Q2RpWUIcjqO+1TL+jTGpXSgjJROLqjeribAiaJCPKDoJ8//3cyD/wSB0uIBht2 /eZrxAp7vnW8Y2s5O6j+VqyM9MU+dsoZYrv9ZCmrRRtaxfs9Nj8664gClhUqCw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqHB04SN3z10TT; Thu, 14 Nov 2024 23:56:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AENueik008713; Thu, 14 Nov 2024 23:56:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AENueuH008710; Thu, 14 Nov 2024 23:56:40 GMT (envelope-from git) Date: Thu, 14 Nov 2024 23:56:40 GMT Message-Id: <202411142356.4AENueuH008710@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 13e82893d858 - main - ena.4: optimize apropos and hardware List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 13e82893d8588d09e6d721b38ba5d775b9b96a0e Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=13e82893d8588d09e6d721b38ba5d775b9b96a0e commit 13e82893d8588d09e6d721b38ba5d775b9b96a0e Author: Alexander Ziaee AuthorDate: 2024-11-14 05:45:23 +0000 Commit: Colin Percival CommitDate: 2024-11-14 23:55:55 +0000 ena.4: optimize apropos and hardware Remove "FreeBSD kernel driver for" and "family", and add "AWS EC2" and "driver" to the document description for better search discoveribility and consistency with other driver manuals. Rewrite the introductory sentance to the HARDWARE section with driver name for inclusion in hardware release notes. MFC after: 3 days Reviewed by: osamaabb Sponsored by: Google Sponsored by: Amazon --- share/man/man4/ena.4 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/share/man/man4/ena.4 b/share/man/man4/ena.4 index a3cb9ef5b37a..cb5b9367da43 100644 --- a/share/man/man4/ena.4 +++ b/share/man/man4/ena.4 @@ -27,12 +27,12 @@ .\" (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 June 4, 2021 +.Dd November 14, 2024 .Dt ENA 4 .Os .Sh NAME .Nm ena -.Nd "FreeBSD kernel driver for Elastic Network Adapter (ENA) family" +.Nd AWS EC2 Elastic Network Adapter (ENA) driver .Sh SYNOPSIS To compile this driver into the kernel, place the following line in the @@ -93,7 +93,9 @@ framework is provided by the driver. Kernel must be built with the DEV_NETMAP option to be able to use this feature. .Sh HARDWARE -Supported PCI vendor ID/device IDs: +The +.Nm +driver supports the following PCI vendor ID/device IDs: .Pp .Bl -bullet -compact .It From nobody Fri Nov 15 02:02:06 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqKyk5llwz5dRDT; Fri, 15 Nov 2024 02: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqKyk5DHCz4d6f; Fri, 15 Nov 2024 02: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=1731636126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FT+eGmF4qKVobzFxh9E9cXOabsJ8GTgDeVx1P64Hqh0=; b=JN/gI1JEqFILr0HISt3AxPcY/UID4W+Wkn8OS79i9tqfVEvGsn6w6j6ZZz88kFQlwCb/We Y6zYQDixDBvi8tBLBPQl4PywWQDdBuqSqM5yqdKoBlnsn8AuUfiO+wS1WOqniA/j9u2yBA f37YqBD+Czxsj4WRhVfQVw4zOouWHiOqAGuFWfq/rbg2T25rNRjInOnmb91KsyJtwmsmg4 epw3dKHKVg5+50Rdk4roGvhDgMf9R7QMLJTWYJSnWiEJV05w/0cc7dbI7sDCnnAhiEdqdY sjka2f0ud2BSfZ44sNpjW8v3N3uEyIZ4cnSRW4F9ycKxz+hxrRGbvD1JYaBpMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731636126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FT+eGmF4qKVobzFxh9E9cXOabsJ8GTgDeVx1P64Hqh0=; b=QDhPNW3ZSfYYFi7U/EA/fEyIm6VLkrjclK29Z4dLNrFr0uZo0j2nsrH0xCVFA6pzznPIiQ Qeuh31z80WGcUON3OvRmoiWCYlxIDxOH4WoiRPrZfc/bg+XP6mpd/QZYe8G+RYFfhO98F+ bIx81hu8mro4zZupDPn03yLYHkWrfrEy3lKRyxiWlYJvkEagmks/XYjaGcyf582t3olOxN n7mRPkifTrj/G2jnMvvLu0TgygYE1FQkLvzRzjRNmu8gAsTIzdF5M1kq591Gk/yqTqF3NX vbNBu7o17rUFE1aMezGTE4W0kJuyNYe5BKHqMUq4ebckNcHh6w/G7Z1M5hvU3Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731636126; a=rsa-sha256; cv=none; b=F/bLnbJXOGE4+ueXCOnBsrAacEpAP1ACzMXDTWqFk2oNKL2oMqfM5zAY2UpVuQKbHsYT27 jvUifDV5Y22IGXwTgm1dcRg25JAFaLKiJbiyV3ahPgKbXdsiUC/IvtAoiC/JvjD/6JCrNI Prf3zlLNG+0Wf/lgRkLcYfkNugTH0Cpk3euQsr4zAKiqp6RBZ84TMuUI1fmB2vF+9bMCDy GZCJO/qr1FGR4hLaGvdMlApeIJuRHIkLeM2ZYZ8icvRN/JUY8urGzJDkgjsj/XJy95d91c TSEi0sgfuhvhldJ2cqsS9JIRQ5b2ZOf8DiUQKSfh2bYp7a+3cQ9RuUSqju2Cmg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqKyk4rBjz13Hq; Fri, 15 Nov 2024 02:02:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AF226xx047708; Fri, 15 Nov 2024 02:02:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AF226al047705; Fri, 15 Nov 2024 02:02:06 GMT (envelope-from git) Date: Fri, 15 Nov 2024 02:02:06 GMT Message-Id: <202411150202.4AF226al047705@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 94b666c663d2 - main - cdefs: Allow _XOPEN_SOURCE >= 800 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 94b666c663d2fde93f438e9643e7b510b83ca10b Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=94b666c663d2fde93f438e9643e7b510b83ca10b commit 94b666c663d2fde93f438e9643e7b510b83ca10b Author: Warner Losh AuthorDate: 2024-11-14 23:52:19 +0000 Commit: Warner Losh CommitDate: 2024-11-15 01:57:27 +0000 cdefs: Allow _XOPEN_SOURCE >= 800 When the user asks for XOPEN_SOURCE >= 800, set __XSI_VISIBLE to 800 for POSIX 2024. Sponsored by: Netflix Reviewed by: brooks Differential Revision: https://reviews.freebsd.org/D47574 --- sys/sys/cdefs.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index 6521a34595cb..bafceb8cb9cb 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -515,7 +515,11 @@ /* Deal with various X/Open Portability Guides and Single UNIX Spec. */ #ifdef _XOPEN_SOURCE -#if _XOPEN_SOURCE - 0 >= 700 +#if _XOPEN_SOURCE - 0 >= 800 +#define __XSI_VISIBLE 800 +#undef _POSIX_C_SOURCE +#define _POSIX_C_SOURCE 202405 +#elif _XOPEN_SOURCE - 0 >= 700 #define __XSI_VISIBLE 700 #undef _POSIX_C_SOURCE #define _POSIX_C_SOURCE 200809 From nobody Fri Nov 15 02:02:07 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqKym1d6sz5dQyd; Fri, 15 Nov 2024 02: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqKyl6C7Nz4ckR; Fri, 15 Nov 2024 02: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=1731636127; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LKRe5lH9NZTPIq6fnRRn80QKFC4sFUZ2eZeDKuOefUM=; b=uNZZEDoYuGUl/cJTGy+jpDE1JH+SIktTn2pEAhvUHO/qf0OgeefZGeLOJV+ZTupNphZ918 vzH6++54qD6mP49Fd1QwWABQqJN9xy67dNsXvwkB2MJMGbMZELErMDsTyvZ8HB6eV6IC5h SdEslF44OlELvi+rUlpYyHglLPrxf3QuDYYgc79RJxllLRLH+JusBdX3TICKVaGZQnkHAa 6qszrjuSGgyW1cFsOtHNmHBLLLTQcv8OcONogRYY+YcCnhEFgam4ZODxgxEdmtRT6TLROM Zbe+8iiC4bXvhdqUDznXpHkZc+1yIFiSkZmx2kZOYj77bPNUHe+3mARhhFiyEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731636127; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LKRe5lH9NZTPIq6fnRRn80QKFC4sFUZ2eZeDKuOefUM=; b=OZmX1b//6sxNzKaX0oYxgvlvKWiFocQeqQ2OkhDtdP7jS+SaPQpnX0ZmItyTUma6WGQ4cB PITOGq20tHlkL9yyQhX2KSSiSRpxZHUEdnlpJPj/0XcoAjWp8wjjFcAgWknE0APOTQJ6tp qxUWQ5J9kwHPnEyPBXu6uikYt0MCBLNyToTP6zEEwcPSVSR288m8ImC7F2ET2g+KvHB9CW eD6hhR78y2cRPj4fwrArbZ6T2AR080oL/hJQHMZ5JYNpXZNxp06PpsL3ZFFl8DrkVkeCia ynWSYcFqVu7s7lWIoSZXOGz37TUnRVfCtLqZRBfpTAhZBFbZ52vQW7SXwrLLtw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731636127; a=rsa-sha256; cv=none; b=L5pC5FOSqG9xusTs1FoNt6LC+ji5I9fBmqaUO4WwRFAmwotOVW7Q5YCrbkvQj9E/Rhw3rl B9LuLJ5FtuksdcACTFilJp7kA9Fvs/g8pBEqyFJOVLicJw8YmEw474vshMyMT+Q8/kOqG6 r24k7kq1adkc4Y2iPzoE3iE9PaIyplqjWj0fUfcsmlxQyAq6cenEuBbKS/A562sw0ZaqHZ jnrc3CM7Rc6g05Z9ghlFqt8BFuHnplF6TwPjQ8cBPBabEJnkVqN8jrKtkCDD/X1OUFUPyY asKCRFzc8T5HlAMKtWOL/fN5D03SDb9EeUKPvuHWH2x2twnZrrot7sq2pSdLFw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqKyl5qKrz13SC; Fri, 15 Nov 2024 02:02:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AF227eb047767; Fri, 15 Nov 2024 02:02:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AF227gT047764; Fri, 15 Nov 2024 02:02:07 GMT (envelope-from git) Date: Fri, 15 Nov 2024 02:02:07 GMT Message-Id: <202411150202.4AF227gT047764@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: dfce25edfb69 - main - cdesf: Support _POSIX_C_SOURCE 202405 for POSIX 2024 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dfce25edfb696e19e532f44bcb8002ce21976a3e Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=dfce25edfb696e19e532f44bcb8002ce21976a3e commit dfce25edfb696e19e532f44bcb8002ce21976a3e Author: Warner Losh AuthorDate: 2024-11-14 23:52:27 +0000 Commit: Warner Losh CommitDate: 2024-11-15 01:57:28 +0000 cdesf: Support _POSIX_C_SOURCE 202405 for POSIX 2024 Allow applications to request a strict POSIX 2024 by setting _POSIX_C_SOURCE to 202405 or higher. The rest of the system needs tweaks to be compliant, so this is a work in progress. Sponsored by: Netflix Reviewed by: brooks Differential Revision: https://reviews.freebsd.org/D47575 --- sys/sys/cdefs.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index bafceb8cb9cb..25248bd235b2 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -542,7 +542,10 @@ #define _POSIX_C_SOURCE 198808 #endif #ifdef _POSIX_C_SOURCE -#if _POSIX_C_SOURCE >= 200809 +#if _POSIX_C_SOURCE >= 202405 +#define __POSIX_VISIBLE 202405 +#define __ISO_C_VISIBLE 2017 +#elif _POSIX_C_SOURCE >= 200809 #define __POSIX_VISIBLE 200809 #define __ISO_C_VISIBLE 1999 #elif _POSIX_C_SOURCE >= 200112 From nobody Fri Nov 15 02:02:08 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqKyn1wB3z5dRKH; Fri, 15 Nov 2024 02:02: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqKyn0gknz4dDF; Fri, 15 Nov 2024 02:02:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731636129; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tc/pVhVRk6J+ZpEt8hHsG2T7s70zRzrPI2FRdybVNWo=; b=eCAvWPfuPyDxip+OQzBX6GXESJ62Asqg3Fc3b9RpOJa4XRWPP7fgBDBQtlx0gAF3gTV/VS +iWBGDbN59jj+iAKgigXocl7Jxv8jLswJpNsh4hP27kfn8txvWPzTIsCJxdR9Slg1hIFrJ WiUrivbESXHIUkkCt3j5nPV7lylAsspyMGW6VlJYv0bw+sdHtVZ29K+6wdgIMTmsgSQfUq aT9rdAnlF+YHyfaPZi2ZvH/Zkb9umOz0cHWqGJtkBKfMCG3cyfINydXL1t10t9T0oC4f0i PMBc8soEnuG5WS6rel0nOWzW3tzM431NV5R9RgVj+EdaIXGm7LLH2q5kOUDSUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731636129; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tc/pVhVRk6J+ZpEt8hHsG2T7s70zRzrPI2FRdybVNWo=; b=GTNyIxbW7YBds++ynG4hPuwnG3oCQNAzxW20zRDhOnmN8HxAPwsSlzfNljiNOfMdbQTyw8 pV/OVTeDbM7AYOsJL785LXyrOKxZdJfpA41OnnEiO45xS0RfykuIaUdCJnllaguTHGZwNc bG4/AaD0Phhe7/L9eLELkzrpygkfdSiquca/q951QWE8CoTGBP4F91PBuGmFSSKaufy5Z8 2VVBPk+uCTRC9aGdasTuQzsQxINXXlHrBTXAB30BlRjSRM/v0mduI5tnKnun6lSBQT19/K S23fWmXEhTH9opPvXW4vZTez01wOHXkxDIFwd1CbByqTlQFj13Dytvuu0wmtGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731636129; a=rsa-sha256; cv=none; b=eik6XzCSgafUfnuLuI81nlzvcLnvzwsk/DDDZAaTt282Iji0S+W4Wg7yEVhMFtQzVd3OK6 Q33XpBA7p3F/dn5Y6YxTen5KZn317WVskNS9BRFVskAgm4zJfAK/lWSikcFneTa3Ib320U Hs8G4/qvM4NJ7Hc5hCAVZDnJtwc1nL8Mthjvz9ld0McIYDw9yzk6Ln8/6ScM1zbwLEpzi3 uOgwwjUajxI9Eutd97I6m1DpH9wNBtGqLz4yIvPzJgO1ba8vAGTaor2BUcmgpzNzLBZ75g iOQDJL3NwF7bO9S95YAYj2OdrmfX4ApqT+/pa5b0buOPhnKOH9JZDcGVHoYZHA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqKyn01Q0z13G5; Fri, 15 Nov 2024 02:02:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AF228ER047813; Fri, 15 Nov 2024 02:02:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AF228AN047810; Fri, 15 Nov 2024 02:02:08 GMT (envelope-from git) Date: Fri, 15 Nov 2024 02:02:08 GMT Message-Id: <202411150202.4AF228AN047810@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 4afcb821938f - main - cdefs: Support _ISOC23_SOURCE and --std=c23 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4afcb821938f5e8cb50e3a781f0276c4f5357b1a Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=4afcb821938f5e8cb50e3a781f0276c4f5357b1a commit 4afcb821938f5e8cb50e3a781f0276c4f5357b1a Author: Warner Losh AuthorDate: 2024-11-14 23:52:35 +0000 Commit: Warner Losh CommitDate: 2024-11-15 01:58:17 +0000 cdefs: Support _ISOC23_SOURCE and --std=c23 If either _ISOC23_SOURCE is defined or --std=c23 (or higher) is specified, then default to the making the ISO C visibility to 2023. This mirrors what glibc does, so update the comment for this change to _ISOCxx_SOURCE values. We currently implement xx = 11 or 23. C17 added no new defines or symbols, so we follow glibc's lead and ommit it. However, we don't implement the C95, C99 or C2y versions. These are non-standard and the first two don't seem to be relevant, and the latter is also experimental. Sponsored by: Netflix Reviewed by: brooks Differential Revision: https://reviews.freebsd.org/D47576 --- sys/sys/cdefs.h | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index 25248bd235b2..1a1705129fa6 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -567,14 +567,21 @@ #define __POSIX_VISIBLE 198808 #define __ISO_C_VISIBLE 0 #endif /* _POSIX_C_SOURCE */ + /* - * Both glibc and OpenBSD enable c11 features when _ISOC11_SOURCE is defined, or - * when compiling with -stdc=c11. A strict reading of the standard would suggest - * doing it only for the former. However, a strict reading also requires C99 - * mode only, so building with C11 is already undefined. Follow glibc's and - * OpenBSD's lead for this non-standard configuration for maximum compatibility. + * When we've explicitly asked for a newer C version, make the C variable + * visible by default. Also honor the glibc _ISOC{11,23}_SOURCE macros + * extensions. Both glibc and OpenBSD do this, even when a more strict + * _POSIX_C_SOURCE has been requested, and it makes good sense (especially for + * pre POSIX 2024, since C11 is much nicer than the old C99 base). Continue the + * practice with C23, though don't do older standards. Also, GLIBC doesn't have + * a _ISOC17_SOURCE, so it's not implemented here. glibc has earlier ISOCxx defines, + * but we don't implement those as they are not relevant enough. */ -#if _ISOC11_SOURCE || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) +#if _ISOC23_SOURCE || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L) +#undef __ISO_C_VISIBLE +#define __ISO_C_VISIBLE 2023 +#elif _ISOC11_SOURCE || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) #undef __ISO_C_VISIBLE #define __ISO_C_VISIBLE 2011 #endif From nobody Fri Nov 15 02:02:10 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqKyp4dS0z5dR3y; Fri, 15 Nov 2024 02:02: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqKyp1PNrz4cwT; Fri, 15 Nov 2024 02:02:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731636130; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c0G0NJpDydo2D4hujAyInl5HHD/qsPqrJYfqLXL7/os=; b=mmQoNb8uIhluBkhc6/xnSSuov4aAyujr/V4bWTthzQAjzFrdGNnlmk+E1gs47lMpPycagE o0Fd4lV2d0gcXvPg72dd8Swn/xog4RHmQk3jhNmRVujhZSVILPjvsFr77dEsG3C6xXtc5R XaOx8Apq4XLP0uFbPVCRwT8VyAerz2vXlbeY0EKK1u26Lb7l+MX7QTg4oefVp7kDoCWBwz lSwanIyAzPdtqZk+VDHVqZY3qEurqTMV5EF8lQGH3YlZhiNz27zHkMEt47YmC7NHXderG2 Dz85XY8QVyOFMN9sFz57zHiyDSHqGTDZWNWDK3u6a3JmpB1l+xvvv7TbUMkNLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731636130; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c0G0NJpDydo2D4hujAyInl5HHD/qsPqrJYfqLXL7/os=; b=QbfZ6PZH64nw5IQZJQZVHACyk2IBnDm0W7Vnhrm8nl2fY/QNxCz0cZWka3HzzfD5B+bRoJ qZ4yorqGeudoBM5SH9Iwif39h3dQXEil5fjuu910WuPvdb9DZkT5Q4jeUSpedSEOIkV7rU xxWvplr0YmP0ThXGorrp9+BtkrjKs/IADVUnL6hUorp6jp8EegHgMJ4SqOJwKBr12E0McH x/x9tUusTC4RWeWloWpuzZKv3YjfAMI/Igk/3syQogYB75sUcVfqjOvwD/ZUsBNC5kqoL4 7UNl2PFsj1oH/VGS194rOb2GmAin3aKHyfQVqe1kdRCC3qeoRcp6ILf0q8Az9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731636130; a=rsa-sha256; cv=none; b=ybSyhiKSmcp08ARn3DsvcHGt+Lxz924Wq+BfekQbfv+CnEWqTSCSqxSK8/dD7ztQcLXBg6 nqWaGC+hjsB+W847O+GDAFZS2HMpV4Eyik3FweKO7QnwsgL/+4UFyYF5UeLIHZZxWLOQBr eU87aCk+Fi1WKIvZCse1goqz6LiUnr8GviSOoJllzfPHaFN7NP8UoQDYgNVfVRwTQrPOqd Z3FVYb0O3RVIi2hwsST2IKeH/rqWgJ0VsAyRoo4FB8ufYojgefR6krkvYQzqJ3rOnbL3rs 0Chjgg8CT13NxBzPNJ/2AciNt34Z0lnQCIFaO4cS/xBiu4d6fKy4ilIbKuOUPA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqKyp0zd0z13TR; Fri, 15 Nov 2024 02:02:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AF22APd047871; Fri, 15 Nov 2024 02:02:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AF22ARP047868; Fri, 15 Nov 2024 02:02:10 GMT (envelope-from git) Date: Fri, 15 Nov 2024 02:02:10 GMT Message-Id: <202411150202.4AF22ARP047868@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: aec6c812be63 - main - cdefs: Add FreeBSD _C23_SOURCE extension List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aec6c812be63325e2557a03b5f411965ec50ff6b Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=aec6c812be63325e2557a03b5f411965ec50ff6b commit aec6c812be63325e2557a03b5f411965ec50ff6b Author: Warner Losh AuthorDate: 2024-11-14 23:52:43 +0000 Commit: Warner Losh CommitDate: 2024-11-15 02:01:12 +0000 cdefs: Add FreeBSD _C23_SOURCE extension Add _C23_SOURCE extension to mirror the _C11_SOURCE define. Unsure how useful this is. Sponsored by: Netflix Reviewed by: brooks Differential Revision: https://reviews.freebsd.org/D47577 --- sys/sys/cdefs.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index 1a1705129fa6..64dae39be3af 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -616,6 +616,12 @@ #define __BSD_VISIBLE 0 #define __ISO_C_VISIBLE 2011 #define __EXT1_VISIBLE 0 +#elif defined(_C23_SOURCE) /* Localism to specify strict C23 env. */ +#define __POSIX_VISIBLE 0 +#define __XSI_VISIBLE 0 +#define __BSD_VISIBLE 0 +#define __ISO_C_VISIBLE 2023 +#define __EXT1_VISIBLE 0 #else /* Default environment: show everything. */ #define __POSIX_VISIBLE 200809 #define __XSI_VISIBLE 700 From nobody Fri Nov 15 02:02:11 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqKyr05HXz5dR24; Fri, 15 Nov 2024 02:02: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqKyq2PCSz4dDj; Fri, 15 Nov 2024 02:02:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731636131; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zh1FpFdZZFtUF72j/wUhsDf0g/tzeM1YbR+c8d1uVG0=; b=TqpdiuzrmU9U+tH6RpNXVQg9Jpt5USUGdRyS5XpYJqD5KmAYhL+iyu9S9JxfnlQr9ExQWj cS8FN4jLPpTWwDcs0fmFaYlMC6w8ghBcT1lwG2jyDRZb7VkM0iWgUwc0AkDzrAdzTvIwYD lMHo46pAPMVeDxBNiJg+kw0rSjVlBWZlrJc6w0WVkwTYVwQNgzqYFwhf6XnGuKzo0btVNq rjSQETDKXeEsBsC3vvXmQCA97G1P7D65afn7tPSfmMd2OdsTeg8iyq3lB4a/gxtHEJazcU JAkX32AUnfqf0WQCkn7o0IKXuMWiL7Sqf9flzPbqR5iXlR6KEHu7X/2yiR86LQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731636131; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zh1FpFdZZFtUF72j/wUhsDf0g/tzeM1YbR+c8d1uVG0=; b=wYRt23Qr45P01Gc5OYnhUaQ2DVNkw/g0PSXmcp/I9FgHhdZn1fKvkKoJeHtTmGXdeso6zW FHD1CiirrEtiOjfBkoPoYgc6hvAmQOWt9FuDGBPFyGvu8Q/QUzVGmRxZiIKAVeYnonET3B C68fg3QzXvpv26wyw8kw2A+HqBH+FV0g18q2HeFhSexwEy7rkGkpL6svlbiAt5qbfgmzI+ RZ+YzE7bzCFEM5zn14FLtAzNhnSxslvmquiBLwKg9KknGW2R0er3lx/IG3YATXUI9XHFrZ UkNkLRzPwqV1Y2lGgZgqj3JDWL5Trxjv2eXeHEgROzCK3mMdZC/T811LrjZJfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731636131; a=rsa-sha256; cv=none; b=gtUhLDaxEoEwpnAZk863TR+a5nw4I2ztdP7L4YUf3dosEpzciw6MJAxA2xRrgLg2ZFj0rH aRxKtoFJaj/k5OH0JgYFufbxWyKBfIm/+E4r6Q4od7PAbN5KT2H9I8pv0mw6Bz9e1hEbtJ +cGNDLKix1ol1KcCDlroFQxP9TsQnfntAxoomGu7K6dmKPdYM/o7EzUY7WMLQTrpjshqBD gHLHrRYhDSUyMgUBJiNzCxMKmov/r1enQYlUoJmpcbwYFFLMVkY8LHBa88qdup0kUQz1E7 X3YtOyH6QtYE4f/wDhmS9tKYKik78s5BJ3adzZQNr6gnovsJIj1b0kSpRrOoDA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqKyq1Wf5z13yM; Fri, 15 Nov 2024 02:02:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AF22B9g047949; Fri, 15 Nov 2024 02:02:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AF22BQ4047946; Fri, 15 Nov 2024 02:02:11 GMT (envelope-from git) Date: Fri, 15 Nov 2024 02:02:11 GMT Message-Id: <202411150202.4AF22BQ4047946@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: f95d9ec92122 - main - cdefs: Bump the defaults for 'all' List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f95d9ec92122e6b4ef99c9a258f31b9564d327d3 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=f95d9ec92122e6b4ef99c9a258f31b9564d327d3 commit f95d9ec92122e6b4ef99c9a258f31b9564d327d3 Author: Warner Losh AuthorDate: 2024-11-14 23:52:50 +0000 Commit: Warner Losh CommitDate: 2024-11-15 02:01:12 +0000 cdefs: Bump the defaults for 'all' Bump default to POSIX at 202405, C at 2023 and xopen at 800... Sponsored by: Netflix Reviewed by: brooks Differential Revision: https://reviews.freebsd.org/D47578 --- sys/sys/cdefs.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index 64dae39be3af..4100cc0de7a5 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -623,10 +623,10 @@ #define __ISO_C_VISIBLE 2023 #define __EXT1_VISIBLE 0 #else /* Default environment: show everything. */ -#define __POSIX_VISIBLE 200809 -#define __XSI_VISIBLE 700 +#define __POSIX_VISIBLE 202405 +#define __XSI_VISIBLE 800 #define __BSD_VISIBLE 1 -#define __ISO_C_VISIBLE 2011 +#define __ISO_C_VISIBLE 2023 #define __EXT1_VISIBLE 1 #endif #endif From nobody Fri Nov 15 02:02:12 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqKyr51GTz5dR25; Fri, 15 Nov 2024 02:02: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqKyr2Vtnz4d27; Fri, 15 Nov 2024 02:02:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731636132; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AmX4VdAvuy+YILuYbXpiYRHJeNv0PuMywel1PQ6pbqw=; b=jvWrFaQ7jSFjL3JUk9en/03WAcMjkzDA9sqnYMOl1PmTP+5UgrFDVkzWQqpCifN8yvWkSG tL4cSZqhm1w+i2PlJf3CsG1o6jBpKONfl3/UzfC6iG7lyaRPGzp8vPjY/zV2dZh5bCqrOV zv+dfw3zzuubQLcq7e03AfHGf/jZQ+sIN83AYiul5QTRsE1avF7pL9Pwts+eW9JUN1v/Yu /TxR2pnNPwHiF7brNOaimpJSqveKCDjn2HplZfAHkvlkjNFErEt6p1g50Nrc/zpzl/bhrh sh7blFMmwsNpZdXqJTNJW16ty/CioOgAPsBVe+yV6iiqefj6AicM1a7vLHVsNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731636132; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AmX4VdAvuy+YILuYbXpiYRHJeNv0PuMywel1PQ6pbqw=; b=qeI1Y4udD3rXas5ReuE44Ne7LOA2YgRH10aXp8JnMGXLe8XIBw6pLBI0H6iNKM32xur5Fw 7vByq4e9AR2/183MIS0w029Ujult94Q274UxPsQPH7cq6kWM5T9O4BsGycBPHomBz4iDTo XBCRD04xkCIJBP+xuQGIocDwQZwFokINWC1Ql0TFFC0hiztti9SVMZgvq2KVBGn51+RK2c U8S1VTX8Xa4eNi9YZN8/jK9jqz0+Xzoc6ykw6zJHutDKJBWN3fAOJT+6Rye2EicmV506S0 +MpARvK58gUm9NekmtKO9IgzD+5YIkRbPEG0y0dE8dUwOsbG4z4EFnpM1ieMcw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731636132; a=rsa-sha256; cv=none; b=EOSbyLXD2ib9B3U780NJFG4wScurjwwJNxXeQq8EUk3BlVITe1ZCDBlHt2pr7WXvZ/Tf9y M9MMgRAooGzaaFaE3Q66GsveYJIFzDgqHK83ppMksjfCEjOc+uLfrUZI9Xv2Kf497vwF91 NzFj3jMCygM5OI4TkyLfOt9ufZGv8rRLvLgBLtWip3N7RhKOnpnI4+MXTwo6koxKSknzJU 330S0zKUa9Rq0r3Yl/3IN+1vdIPyY7xnEakR4a3lYu1Ty/VCrHg1KIXCOmayCoJrjgg4Pa ue8rYlNg/K+E8HVUaqo44stHQ+bSxmzyFwoTjvl26Pkx9xJElnYlTWMI+Vf+mQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqKyr23vWz13kB; Fri, 15 Nov 2024 02:02:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AF22Cdf049154; Fri, 15 Nov 2024 02:02:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AF22Cxx049151; Fri, 15 Nov 2024 02:02:12 GMT (envelope-from git) Date: Fri, 15 Nov 2024 02:02:12 GMT Message-Id: <202411150202.4AF22Cxx049151@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 75b635c77443 - main - cdefs: update for C23 and POSIX24 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 75b635c774436d6ced8113e04dadbd5b859fea42 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=75b635c774436d6ced8113e04dadbd5b859fea42 commit 75b635c774436d6ced8113e04dadbd5b859fea42 Author: Warner Losh AuthorDate: 2024-11-14 23:52:56 +0000 Commit: Warner Losh CommitDate: 2024-11-15 02:01:12 +0000 cdefs: update for C23 and POSIX24 Also tweak a few placs where we can now use macros for C23 and POSIX24. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D47580 --- share/man/man9/cdefs.9 | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/share/man/man9/cdefs.9 b/share/man/man9/cdefs.9 index 3d1f6159bc60..38762c22f586 100644 --- a/share/man/man9/cdefs.9 +++ b/share/man/man9/cdefs.9 @@ -303,7 +303,7 @@ to distinguish it from newer standards. Support for this compilation environment is dependent on compilers supporting this configuration. Most of the old forms of C have been deprecated or removed in -ISO/IEC 9899:2024 (“ISO C23”). +.St -isoC-2024 . Compilers make compiling in this mode increasingly difficult and support for it may ultimately be removed from the tree. .It St -ansiC @@ -333,11 +333,11 @@ since there are no new C17 only symbols or macros. .Pp This version of the standard did not introduce any new features, only made minor, technical corrections. -.It ISO/IEC 9899:2024 (“ISO C23”) +.It St -isoC-2024 .Dv __STDC_VERSION__ = 202311L Strict environment selected with .Dv _C23_SOURCE -though this is not yet implemented. +though ISO C23 support is only partially implemented. .El .Pp For more information on C standards, see @@ -356,25 +356,37 @@ However, system headers not defined by that standard may define extensions. .It Dv _POSIX_C_SOURCE = 199506 Ta St -p1003.1c-95 including St -ansiC .It Dv _POSIX_C_SOURCE = 200112 Ta St -p1003.1-2001 including St -isoC-99 .It Dv _POSIX_C_SOURCE = 200809 Ta St -p1003.1-2008 including St -isoC-99 -.It Dv _POSIX_C_SOURCE = 202405 Ta in the future IEEE Std 1003.1-2024 (“POSIX.1”) including ISO/IEC 9899:2024 (“ISO C23”) +.It Dv _POSIX_C_SOURCE = 202405 Ta St -p1003.1-2024 including ISO/IEC 9899:2018 ("ISO C17"), .It Dv _XOPEN_SOURCE = 500 Ta St -p1003.1c-95 and XPG extensions to St -susv2 including St -ansiC .It Dv _XOPEN_SOURCE = 600 Ta St -p1003.1-2001 and XPG extensions to St -susv3 including St -isoC-99 .It Dv _XOPEN_SOURCE = 700 Ta St -p1003.1-2008 and XPG extensions to St -susv4 including St -isoC-99 -.It Dv _XOPEN_SOURCE = 800 Ta in the future IEEE Std 1003.1-2024 (“POSIX.1”) and XPG extensions to Version 5 of the Single UNIX Specification (“SUSv5”) including ISO/IEC 9899:2024 (“ISO C23”) +.It Dv _XOPEN_SOURCE = 800 Ta St -p1003.1-2024 and XPG extensions to Version 5 of the Single UNIX Specification (“SUSv5”) including ISO/IEC 9899:2018 (“ISO C17”) .It Dv _ANSI_SOURCE Ta St -ansiC .It Dv _C99_SOURCE Ta St -isoC-99 .It Dv _C11_SOURCE Ta St -isoC-2011 -.It Dv _C23_SOURCE Ta in the future ISO/IEC 9899:2024 (“ISO C23”) +.It Dv _C23_SOURCE Ta St -isoC-2024 .It Dv _BSD_SOURCE Ta Everything, including Fx extensions .El .Pp +Note: +.St -p1003.1-2024 +and XPG extensions to Version 5 of the Single UNIX Specification ("SUSv5") +support is incomplete. +.Pp When both POSIX and C environments are selected, the POSIX environment selects which C environment is used. However, when C11 dialect is selected with .St -p1003.1-2008 , definitions for .St -isoC-2011 -are included. +are also included. +Likewise, when C23 dialog is selected with +.St -p1003.1-2008 +or +.St -p1003.1-2024 , +definitions for +.St -isoC-2023 +are also included. .Ss Header Visibility Macros These macros are set by .Nm @@ -393,13 +405,13 @@ by convention with 199009 for and 199209 .St -p1003.1-90 . .It Dv __ISO_C_VISIBLE Ta The C level that's visible. -Possible values include 1990, 1999, and 2011 for +Possible values include 1990, 1999, 2011, 2017 and 2023 for .St -isoC-90 , -.St -isoC-99 -and -.St -isoC-2011 +.St -isoC-99 , +.St -isoC-2011 , +ISO/IEC 9899:2018 ("ISO C17"), and +.St -isoC-2024 , respectively. -In the future, 2023 will be used for ISO C2023. .It Dv __BSD_VISIBLE Ta 1 if the .Fx extensions are visible, 0 otherwise. From nobody Fri Nov 15 02:02:13 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqKys49rnz5dRDg; Fri, 15 Nov 2024 02:02: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqKys3Vjdz4dWw; Fri, 15 Nov 2024 02:02:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731636133; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FEwnsG2hi6IJKVYZq0ex8DxxMpIMfI0rSMnL1TebtLA=; b=IcSyzg7qlwOvFMZ5stv1bn0xoy4zUpo8aHqrfLEdVbhzZv3SFvJGJVmdBHLj/ApfsvgC2D o91ATJsN1zCDYuRuZLGPRIPJWkH+ofn/nfmW+j/Us7CULOXi+UBAiWEjZr6XnwMTc/2rPx r4x+wiRI+tKoC6EO8Vw8T/X2TCV9ZnglCxyOo4Kww4/sUoiQEKfJIShaQK98bksWv8WO1R KcomNtHBVOK2sjx0DlZ0KCFEUU0YF/F1E0WWwgv9mFtge4l24CwJY0bI13xOfoqr8m0VM1 OpdlNhHYSXH4aRgfnExLJPSN51WJK6SDK46AH89hAzYbi2hg6YKa0gedr0FzGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731636133; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FEwnsG2hi6IJKVYZq0ex8DxxMpIMfI0rSMnL1TebtLA=; b=Mn1F6Jw6ZcN0ZhZWRm7EsSa9+TWmz3SYaomFDmC/AxNIgTplgQ5jmfUbVJNJDXrEhK/64/ n+LA5sjAe7Ue2wNAfOHG9iWsXF7tDFiBugEBvsEnjgqsqLRVu1x0JjkWaIq8l23y3cKSAn Hm7SFH/ZEhLQSMGMiTLDWfLBcoExxLEzXj8S0O19tLM8fIY+5GdkhwdwrFG6SQP0vXnkuW q+OWq6aqNxMTf5tz4qX7AIAmv+h2NTZO/y8Oyvmm2HJsnhfIQxpMni3bIoamBjgL1URqO7 WrUqENPUf0hL2mqPBan+kI0YXm9GdD7jWkJEFTqn4sm1FQK37wlpLHw5tg70yg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731636133; a=rsa-sha256; cv=none; b=OKPfvyhKd6vNa7jeC1+k/NQjKpG3mvshFrsGUK5IHVi+1sz6UQdRiWBmr37QowJbYZONoP 0fc4n30bOWS8xxgEmxnPgl/ECff36ncMRPsCsu+hsB6WoPZPt9H/0VcGFY9pQBrElgxT+l cegQVL1mKboRy7HQukkUJwGxuMUIliw58kA+lOHAqDb1k+StasIC4xRewbCaLblyGoaKEE L236sh6/hVaNcTF6WpPrb9vD4JXbAJeQkMysCZmZCwkRSIYmfMkFHkRkJWiWED8ELgNAwY GCXZ0VU4tq3qFemnPLdSFYEUMu5g5JtCpfTZY0pUhPnRoG71XIEgQWYVmwRMWA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqKys2q2Lz13XQ; Fri, 15 Nov 2024 02:02:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AF22DWY049276; Fri, 15 Nov 2024 02:02:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AF22DFR049273; Fri, 15 Nov 2024 02:02:13 GMT (envelope-from git) Date: Fri, 15 Nov 2024 02:02:13 GMT Message-Id: <202411150202.4AF22DFR049273@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: f6ed9cd68c28 - main - cdefs.h: Document the _XOPEN_SOURCE - 0 construct List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f6ed9cd68c28b18082773c6f77cee4b8492dcfe6 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=f6ed9cd68c28b18082773c6f77cee4b8492dcfe6 commit f6ed9cd68c28b18082773c6f77cee4b8492dcfe6 Author: Warner Losh AuthorDate: 2024-11-14 23:53:13 +0000 Commit: Warner Losh CommitDate: 2024-11-15 02:01:12 +0000 cdefs.h: Document the _XOPEN_SOURCE - 0 construct Various System V Interface Definition editions, as well as the X/Open group portability guide issue 4, recommend defining _XOPEN_SOURCE and broadly intimating it means the same thing as _POSIX_SOURCE == 2. Starting in X/Open issue 5 (1995), _XOPEN_SOURCE needs to be defined to be 500 to bring in the newer interfaces. However, it is still common hat sources define _XOPEN_SOURCE to be blank. To deal with that, we subtract 0 from _XOPEN_SOURCE to make the other expressions well formed. While here, document that we should define _POSIX_C_SOURCE to be 199209 based on the SVID, the first version of the Single Unix Specification, and X/Open CAE issue 4, version 2. Also document that historically this has been a NOP. Any value of _XOPEN_SOURCE < 500 (including it being blank) was not viewed as a request for a restricted namespace. Reviewed by: brooks (earlier version) Differential Revision: https://reviews.freebsd.org/D47584 Sponsored by: Netflix --- sys/sys/cdefs.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index 4100cc0de7a5..0f53ff816527 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -513,7 +513,16 @@ #define _POSIX_C_SOURCE 199209 #endif -/* Deal with various X/Open Portability Guides and Single UNIX Spec. */ +/* + * Deal with various X/Open Portability Guides and Single UNIX Spec. We use the + * '- 0' construct so software that defines _XOPEN_SOURCE to nothing doesn't + * cause errors. X/Open CAE Specification, August 1994, System Interfaces and + * Headers, Issue 4, Version 2 section 2.2 states an empty definition means the + * same thing as _POSIX_C_SOURCE == 2. This broadly mirrors "System V Interface + * Definition, Fourth Edition", but earlier editions suggest some ambiguity. + * However, FreeBSD has histoically implemented this as a NOP, so we just + * document what it should be for now to not break ports gratuitously. + */ #ifdef _XOPEN_SOURCE #if _XOPEN_SOURCE - 0 >= 800 #define __XSI_VISIBLE 800 @@ -531,6 +540,8 @@ #define __XSI_VISIBLE 500 #undef _POSIX_C_SOURCE #define _POSIX_C_SOURCE 199506 +#else +/* #define _POSIX_C_SOURCE 199209 */ #endif #endif From nobody Fri Nov 15 02:32:43 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqLf33rfBz5dSth; Fri, 15 Nov 2024 02:32: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqLf33GChz4hgV; Fri, 15 Nov 2024 02:32:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731637963; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=32CWkVIuRkapaT9H6NR4CxyIA6xmefJgsRdeVYacL6s=; b=ePIR+TXJLGiVfeAtgdX9x2KbS306Wfd8i5wMUBAVAoJl68Y2eTvZQrIzJ5ZRibFsdJm+y7 YYIlExgrvBirWjzDuF9qN8qmcf3+mt89e17GWNJrRESjqyPI4jof5cvTxB9GJAWEmodCDm ChIrG6TiW+ah5FDSIenX+b50dUX+vBQcI/SOWaHRCjjBwh7EvfYO+Umsf6eDHbM8drB3kK OKJt+MuMN/9IHvMdsEyDnuLBD5vGQrkkJp1WumVbiNTzAPFBe081iq9M7ZFfAlu8OFuA4y gV4sXgGla+apbHYKVPbx6X0AQ5fAJk7CtsFqWkdAVnsf5DzKy8hZ2Lq+8uJpCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731637963; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=32CWkVIuRkapaT9H6NR4CxyIA6xmefJgsRdeVYacL6s=; b=QsnHGmuuWIZbSPBm/eqDAXHurI9kEORlIZwdAmHGu+LqGFSNxFQEbCf5595bPzTbL2RzUG 9y9IFYaI0iDQDl+lyjyEKLwXIkgoIMGbNd6+7xHs/xoYLZHCwDV8RwHKjT0Fidjq7zHB2T M6fImappCkaQTJp6UENNTlJ14EHaaOxxqAWGPpfd0aHAdg/oMTbsB+AXU3iMuaA/KB2Cnc LhLgJ2nwNotONRqUB6zIJengVknJm043BbsvZ/llXvcqeyoxp+fVwCiYjqupy9Q44xAoPI ZSnMrsChZQCne3ZfQ0XMPJqnHU+089crMLg8RQzn1J3uzBkqKPgn2RWVaHvu0w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731637963; a=rsa-sha256; cv=none; b=R0L86498O0wJK2ZKRFHIDKN7sBWxR41Z9sGEzdW/xFEExb20VxqXH8ewyxlhQM4n8UQPI2 ETHt+l99SyN/TYLtZxnzzYfgxXmF5DmfhQEqiff2NYNxcDOCmGnq1pIpErIbwwMA/Ji9qo jzES+NpZ5V25uVAzcfrFIt7RGJjjoIIlhbJvYzl0RvLUINeba63Ao1iNXsw1ayMspa5+6g z6Xvx3wusUq3tlH1KbagdspwpLEmtlwWaBKG15Ah9zUucbjaC7QfQZ1nKzZVoZVUrduAgT iRaxyCumiSweMiJVtViGfsP9hls+viKossSM6nOYxJcY35AIGCkvtQHOGWoguw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqLf32s9mz14Xw; Fri, 15 Nov 2024 02:32:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AF2WhdQ003897; Fri, 15 Nov 2024 02:32:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AF2WhZ3003894; Fri, 15 Nov 2024 02:32:43 GMT (envelope-from git) Date: Fri, 15 Nov 2024 02:32:43 GMT Message-Id: <202411150232.4AF2WhZ3003894@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: dfa0ac74c2fb - main - libc: indicate existing functions that are POSIX 2024 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dfa0ac74c2fbc1cde3e8cdb1ab9fe5cbb90a9b16 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=dfa0ac74c2fbc1cde3e8cdb1ab9fe5cbb90a9b16 commit dfa0ac74c2fbc1cde3e8cdb1ab9fe5cbb90a9b16 Author: Ed Maste AuthorDate: 2024-11-14 19:30:54 +0000 Commit: Ed Maste CommitDate: 2024-11-15 02:32:20 +0000 libc: indicate existing functions that are POSIX 2024 Reviewed by: brooks, imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D47581 --- lib/libc/stdio/mktemp.3 | 5 ++++- lib/libc/stdio/printf.3 | 6 ++++++ lib/libc/stdlib/getenv.3 | 3 ++- lib/libc/stdlib/reallocarray.3 | 4 ++++ lib/libc/string/memmem.3 | 6 +++--- 5 files changed, 19 insertions(+), 5 deletions(-) diff --git a/lib/libc/stdio/mktemp.3 b/lib/libc/stdio/mktemp.3 index 93870f3865de..2b8b2d6c9e44 100644 --- a/lib/libc/stdio/mktemp.3 +++ b/lib/libc/stdio/mktemp.3 @@ -275,7 +275,10 @@ function is expected to conform to and is not specified by .St -p1003.1-2008 . The -.Fn mkostemp , +.Fn mkostemp +function conforms to +.St -p1003.1-2024 . +The .Fn mkstemps , .Fn mkostemps and diff --git a/lib/libc/stdio/printf.3 b/lib/libc/stdio/printf.3 index f2428740b529..b421a2a0985d 100644 --- a/lib/libc/stdio/printf.3 +++ b/lib/libc/stdio/printf.3 @@ -828,6 +828,12 @@ and .Fn vdprintf conform to .St -p1003.1-2008 . +The functions +.Fn asprintf +and +.Fn vasprintf +conform to +.St -p1003.1-2024 . .Sh HISTORY The functions .Fn asprintf diff --git a/lib/libc/stdlib/getenv.3 b/lib/libc/stdlib/getenv.3 index ded7bd61f735..1337ec867237 100644 --- a/lib/libc/stdlib/getenv.3 +++ b/lib/libc/stdlib/getenv.3 @@ -218,7 +218,8 @@ functions conforms to .St -p1003.1-2001 . The .Fn secure_getenv -function is expected to be glibc-compatible. +function conforms to +.St -p1003.1-2024 . .Sh HISTORY The functions .Fn setenv diff --git a/lib/libc/stdlib/reallocarray.3 b/lib/libc/stdlib/reallocarray.3 index d92be7d3f66b..80035c67a497 100644 --- a/lib/libc/stdlib/reallocarray.3 +++ b/lib/libc/stdlib/reallocarray.3 @@ -131,6 +131,10 @@ if ((newp = reallocarray(p, num, size)) == NULL) { .Ed .Sh SEE ALSO .Xr realloc 3 +.Sh STANDARDS +.Fn reallocarray +conforms to +.St -p1003.1-2024 . .Sh HISTORY The .Fn reallocarray diff --git a/lib/libc/string/memmem.3 b/lib/libc/string/memmem.3 index 5d8bcc84e31f..e301a0bd1e0f 100644 --- a/lib/libc/string/memmem.3 +++ b/lib/libc/string/memmem.3 @@ -67,10 +67,10 @@ is returned. .Xr memchr 3 , .Xr strchr 3 , .Xr strstr 3 -.Sh CONFORMING TO +.Sh STANDARDS .Fn memmem -started as a GNU extension but is now available in at least -the GNU, musl, bionic, OpenBSD, NetBSD, macOS, and illumos C runtime libraries. +conforms to +.St -p1003.1-2024 . .Sh HISTORY The .Fn memmem From nobody Fri Nov 15 05:55:36 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqR8872Ssz5cfbp; Fri, 15 Nov 2024 05:55: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqR8862lpz3ytg; Fri, 15 Nov 2024 05:55:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731650136; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gxD/xrZiqvT547LVhOeIHZ40DUYQbwZlEJldT5gYwfQ=; b=pk7VLXlJcBpf7wZIzETFPPnTYhUKmF/8zMeLW3O9x3APXj72e2V7K6kqz2hOrEOpKWH+XO QkjWLrvVDmpFn6dh4kWnzpiD/kZ7ll2e0Lg3kGrKv3IGI1/sNKGuuy9T6OqngzN1SpTgmD Cey2mCUeTyI9E2qmTrHP7ixHhV8OhswPg/XjtBHV636Vp71Zd0zN8PnMSn9E4bsqwvgXGB yISrLEcHBqnEmAaU3yULIfk/UKaRiU3N2iHntO/FK/Tb0n0EL30P+tyqlprTm2ZWMj1XgD ZmXzZxqH4NHwWz46pLdsGrXBKaI3zclieOh7ODXLttyuuEG8pTu2VxpDy2Goiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731650136; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gxD/xrZiqvT547LVhOeIHZ40DUYQbwZlEJldT5gYwfQ=; b=szlBF4oDDBXrBvE/Cpi/lZm+gelrMqeSMpbH9fwoO+phSlKCL2BnKhSrgOgA7CjbCIVXdt ajdo0ycPxpNASlFMRxZdJ3Oj8WyrM6tPPXfzYdVROuwHtQqMMGAlKQJuaJslM8cPPYvlQc Y/pjicEtKsJj43u+ZVcWqFBrZoemE5BeugUHnBOjjPXjS8BJgmSvu3dlbHnZlBQqPHYnAn OJXpvvvuUNxmVFKYWUbYBZSMEG27Jl+CXUDb/26NNRkbINfeMERXw9qmMAqDNdHQabIRad pv2Ji3CmzhfOEUMV9jUt2SBFbzonThGV39nHMf3m6ylVmLnMgnLTGPY0xPFb2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731650136; a=rsa-sha256; cv=none; b=aJDJTi+2Am2r2KOprrh3on8sjhgq8uayPFKr2LXXHN0gufIOsvNMSXE4dwkT2btjs2B8P4 PnPYUr7aJt1iDEHxUhTsE+sGdfkwpTMbPvfGwIklnIKJ4Ct8BCGbLmzqx+p7xlVNgP96/y beWVhQs5LD5uISgdZAnHg0VS8PGR8ClI+lV9HH7aC2R6vICatNiCH4LZh+71P+ZZEjETCt ZqV8HDKJvUuddz+tbhDEa5p7k16+dQlhVqMLY6yA3gQxJR44soMU9ScnupF7XqGjZcjRFH AmGjdaekK9m5kLWQG/1ewSyNCJRgqBZg1/htaRhtsQRGIPdEkIYyYzziwe0loQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqR885WCsz19fm; Fri, 15 Nov 2024 05:55:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AF5taEl075504; Fri, 15 Nov 2024 05:55:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AF5taDG075501; Fri, 15 Nov 2024 05:55:36 GMT (envelope-from git) Date: Fri, 15 Nov 2024 05:55:36 GMT Message-Id: <202411150555.4AF5taDG075501@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 79af8f72b3af - main - gpiospi: Fix module dependencies. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 79af8f72b3aff993703778423e83320df0953a37 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=79af8f72b3aff993703778423e83320df0953a37 commit 79af8f72b3aff993703778423e83320df0953a37 Author: Dag-Erling Smørgrav AuthorDate: 2024-11-15 05:53:30 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-11-15 05:55:14 +0000 gpiospi: Fix module dependencies. MFC after: 3 days Reviewed by: ray Differential Revision: https://reviews.freebsd.org/D47570 --- sys/dev/gpio/gpiospi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/gpio/gpiospi.c b/sys/dev/gpio/gpiospi.c index 1f58e7c79ce3..60307e4328af 100644 --- a/sys/dev/gpio/gpiospi.c +++ b/sys/dev/gpio/gpiospi.c @@ -396,5 +396,5 @@ static driver_t gpio_spi_driver = { DRIVER_MODULE(gpiospi, gpiobus, gpio_spi_driver, 0, 0); DRIVER_MODULE(spibus, gpiospi, spibus_driver, 0, 0); -MODULE_DEPEND(spi, gpiospi, 1, 1, 1); -MODULE_DEPEND(gpiobus, gpiospi, 1, 1, 1); +MODULE_DEPEND(gpiospi, spibus, 1, 1, 1); +MODULE_DEPEND(gpiospi, gpiobus, 1, 1, 1); From nobody Fri Nov 15 10:48:50 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqYfW21Pkz5cykY; Fri, 15 Nov 2024 10: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqYfW1D11z4Wbd; Fri, 15 Nov 2024 10: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=1731667731; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=v46nF8vHp5sycttzce9ceSmumD8xuhSp3QbJxes4mVU=; b=qkeNtbjqNQ2cKfikr6FeONXSgVWk4V4jbpnvq7SplyrnfoB6B7Ox4ByKk+os3y0krtZ9hl 3wp3rhCLgwlRtRKB/E1M1Z9JVUBqbXLbPp2WJYsEL0vNcShlYZ8JWrw35NBedoEiDPMP1N UTgKI7DplTw1TS/Zh8f7JWVeFg4M/nciEZkEAcR22ya1KkB0PSWVf6KyCp+9p2t1mTtA1A MQzUnwHvl+jIpPBVt90OB+neW19LmZEQTUJyaIVUziIVQC7Z51zqIu7RXSRppFq/qiaJam R+/w8n9b+S4VR00zP4KxJcEtUdTvn9U6gSkFeqV3rjmX8J7PLtZPzhGLr4czDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731667731; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=v46nF8vHp5sycttzce9ceSmumD8xuhSp3QbJxes4mVU=; b=pcHUpbRey/FUgVXjfNo2pmPWhajCome7AlGU+BQz+9UvXVMBna5Jwb2NUdrv1r2wbANwbq 4kDVSvzMN01JBobweV+Wzir6Gr8498YZzbyGGz6c9CmHW0e2dxuYtZxa5qc8VnGl/un1TA 2MHBNeZukVJonxef+Z6EbrlK6quuigUujhea4MpXq6a1E+NA66jhZ+9/sSGOSpvnsh6CtG 7/XXmOqacg4Fwg0z2jW/7/9JFOFDdzeohq9xNdSPxoUBbPhmJHfw3/ZumIh7H3xY04h6pi ond+HV8o2QHb1IrvDeOJK94ZRb0AT9fPt+aq6nV0P9twZMtQu/8cTzQyuuLzZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731667731; a=rsa-sha256; cv=none; b=wm6fxQBT3WCeHqErzrMKkqaMgFVPaV1JVKhBANmE8GjfEn5xCTTAXppu2JbIlDdnuiJQMe 2mEd+7YTKQCSv55Evk89XeYchwQaVF0e1UweUXiGQ2fczU3wXttAFhcjz5oVwUVAQPXwAw Il1m0/ZwYOUQocKA1C3JLYbjerGkh+3TOIVH+q4mVBx6wLcV5ZvbKNXdEvh3+4rGpD1+g1 FPzkfT+tJ+vzX6TsHfa0e4hmuoKE/O7cHxkiwJHhoBPic694zKEMbwpvQ5U3KoXL9gtRsi XUl1Fc9UuFKX9aWD8vpZLcATUidQVukG/eaQL48qwvZBggGWdEPi8Or29Vu0/w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqYfW0jr9zKSc; Fri, 15 Nov 2024 10:48:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AFAmpN7017635; Fri, 15 Nov 2024 10:48:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AFAmomp017632; Fri, 15 Nov 2024 10:48:50 GMT (envelope-from git) Date: Fri, 15 Nov 2024 10:48:50 GMT Message-Id: <202411151048.4AFAmomp017632@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: 3db3a7617b82 - stable/14 - cred: supplementary_group_member() => group_is_supplementary() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3db3a7617b82c341c6beaec70123e2b8644c3e1a Auto-Submitted: auto-generated The branch stable/14 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=3db3a7617b82c341c6beaec70123e2b8644c3e1a commit 3db3a7617b82c341c6beaec70123e2b8644c3e1a Author: Olivier Certner AuthorDate: 2024-07-16 20:55:53 +0000 Commit: Olivier Certner CommitDate: 2024-11-15 10:47:35 +0000 cred: supplementary_group_member() => group_is_supplementary() The new name seems more immediately descriptive. While here, constify its signature ('struct ucred' isn't modified). While here, replace "supplemental" => "supplementary" in some comments. No functional change (intended). Reviewed by: mhorne, emaste Approved by: markj (mentor) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D46906 (cherry picked from commit 2e031fd0719b567e66198bc76c8a1c6c9b7f2920) Approved by: markj (mentor) --- sys/kern/kern_prot.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index d7de7deb2c0c..19279742ea81 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1280,13 +1280,13 @@ sys___setugid(struct thread *td, struct __setugid_args *uap) * Returns whether gid designates a supplementary group in cred. */ static bool -supplementary_group_member(gid_t gid, struct ucred *cred) +group_is_supplementary(const gid_t gid, const struct ucred *const cred) { int l, h, m; /* - * Perform a binary search of the supplemental groups. This is possible - * because we sort the groups in crsetgroups(). + * Perform a binary search of the supplementary groups. This is + * possible because we sort the groups in crsetgroups(). */ l = 1; h = cred->cr_ngroups; @@ -1320,7 +1320,7 @@ groupmember(gid_t gid, struct ucred *cred) if (gid == cred->cr_groups[0]) return (true); - return (supplementary_group_member(gid, cred)); + return (group_is_supplementary(gid, cred)); } /* @@ -1333,7 +1333,7 @@ realgroupmember(gid_t gid, struct ucred *cred) if (gid == cred->cr_rgid) return (true); - return (supplementary_group_member(gid, cred)); + return (group_is_supplementary(gid, cred)); } /* @@ -2327,7 +2327,7 @@ crextend(struct ucred *cr, int n) /* * Copy groups in to a credential, preserving any necessary invariants. - * Currently this includes the sorting of all supplemental gids. + * Currently this includes the sorting of all supplementary gids. * crextend() must have been called before hand to ensure sufficient * space is available. */ From nobody Fri Nov 15 10:48:52 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqYfX4cKTz5d073; Fri, 15 Nov 2024 10:48: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqYfX3ccnz4WQG; Fri, 15 Nov 2024 10:48:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731667732; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X46vbDeskr6k5kdNwaOvyQC7yKYitlHWOY07ptu1cwE=; b=S9RVfDTMpKXgSWwIOOEtzt1dUqbZSUum21i9OySAJJ1O1lnX2lrlYnC0J1g7zyJMu1+84Z u7wsnmhO8yw6RihhJ0oNOYY1nM/ELmDs/EZCBdUBqwosSrFuVRdUtP0cei07IfEhtCxxYZ jdp1hBJ6rfwuxcfd5n8nX9JqROld38yTfO/bVtdR4331r43smulfpRm+6yZODJSKP/40m0 +2dSLiL5oHMZvhFRL2ASfWlWVSbBWUKQMg8zTvbRAvXIiHvmK42OZshsopYUpihJo+AP9v QU3ZAXL+5tRI9smi3v6Ces/+rcUl3bYoVnTI417fPgpCGXClR/ZJyaQTNO/S+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731667732; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X46vbDeskr6k5kdNwaOvyQC7yKYitlHWOY07ptu1cwE=; b=HlvS41QEeykJHK9Xdgy9SVWknrvGruiGqytoWHNsCWBajhYJTYdNFg49tHq5lX1jTdb2PH Gly9L44VzVzFLwWNHs/Rg5gHFbJiqdSJuPAwT33xeJmT3KLaZidUrfEgJQQsPRrerqj9Q5 73PyTUt2UCP1QfXQ6RHqDrECPxxP3x+uBDBQnjtmfqCWYcA5qo2Zv0RpNG52i0XK3i5eJ+ rQ82l/tK3skWk/uXBr8AS7vRQtMDplJdL5KkOrXrwQ/7OGfGJDpDI4Lb3sU7yh3V6ENv62 QPIPdLXGEMOQEK4h4UKZbKl/j+2CojBkASXhZrcVZvtbYYZRJemxfq3PX9WO4A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731667732; a=rsa-sha256; cv=none; b=HNGSfJZb80CRoF3tirNytBzkNdULf4/xicA9omB77ToQEdEMXxpoy27TgL9Xn6x6Jw3UH1 BOIAVr3dFBaFxA4U9MKCLjCCSlpQw6nvIHr44jX+tI1at6nZXpsLbH3j+o77dj3bM2IsmY oihJzs1s1nUKpP7T8ypEH80hKvwmk4IS4hVZ0OG4zHrC9oXJVJ2VzRj5usENguwPi0aavx 3Nif0PXYll6Rt0BQuigyAq5EYj5JPRSx6qmjHwdblDbPOYwiHLowUnUbQ4J7HPUkhR1/9c Vic7KUZ41WBlUCoNRdmQHLDP4j5rJ9SrrdFvP/26TTIFvK2f9VySnVK57Md2ng== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqYfX2j66zKVq; Fri, 15 Nov 2024 10:48:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AFAmqJs017685; Fri, 15 Nov 2024 10:48:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AFAmqW6017682; Fri, 15 Nov 2024 10:48:52 GMT (envelope-from git) Date: Fri, 15 Nov 2024 10:48:52 GMT Message-Id: <202411151048.4AFAmqW6017682@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: 11b90b298908 - stable/14 - cred: Constify signature of groupmember() and realgroupmember() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 11b90b298908f418f93923c971f2c0a214f2060e Auto-Submitted: auto-generated The branch stable/14 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=11b90b298908f418f93923c971f2c0a214f2060e commit 11b90b298908f418f93923c971f2c0a214f2060e Author: Olivier Certner AuthorDate: 2024-10-30 10:59:49 +0000 Commit: Olivier Certner CommitDate: 2024-11-15 10:47:40 +0000 cred: Constify signature of groupmember() and realgroupmember() Reviewed by emaste Approved by: markj (mentor) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D47343 (cherry picked from commit b15110fb0dc6f0480482616f22bda3a2a19fbd80) Approved by: markj (mentor) --- share/man/man9/groupmember.9 | 6 +++--- sys/kern/kern_prot.c | 4 ++-- sys/sys/ucred.h | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/share/man/man9/groupmember.9 b/share/man/man9/groupmember.9 index db2138ef088a..e7e28bae3ac9 100644 --- a/share/man/man9/groupmember.9 +++ b/share/man/man9/groupmember.9 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.Dd August 18, 2023 +.Dd October 31, 2024 .Dt GROUPMEMBER 9 .Os .Sh NAME @@ -35,9 +35,9 @@ .In sys/param.h .In sys/ucred.h .Ft bool -.Fn groupmember "gid_t gid" "struct ucred *cred" +.Fn groupmember "gid_t gid" "const struct ucred *cred" .Ft bool -.Fn realgroupmember "gid_t gid" "struct ucred *cred" +.Fn realgroupmember "gid_t gid" "const struct ucred *cred" .Sh DESCRIPTION The .Fn groupmember diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 19279742ea81..be7a71ae6879 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1307,7 +1307,7 @@ group_is_supplementary(const gid_t gid, const struct ucred *const cred) * supplementary groups). */ bool -groupmember(gid_t gid, struct ucred *cred) +groupmember(gid_t gid, const struct ucred *cred) { /* @@ -1328,7 +1328,7 @@ groupmember(gid_t gid, struct ucred *cred) * groups). */ bool -realgroupmember(gid_t gid, struct ucred *cred) +realgroupmember(gid_t gid, const struct ucred *cred) { if (gid == cred->cr_rgid) return (true); diff --git a/sys/sys/ucred.h b/sys/sys/ucred.h index 7c9e46e47774..db38cd99e5bc 100644 --- a/sys/sys/ucred.h +++ b/sys/sys/ucred.h @@ -158,8 +158,8 @@ void crcowfree(struct thread *td); void cru2x(struct ucred *cr, struct xucred *xcr); void cru2xt(struct thread *td, struct xucred *xcr); void crsetgroups(struct ucred *cr, int n, gid_t *groups); -bool groupmember(gid_t gid, struct ucred *cred); -bool realgroupmember(gid_t gid, struct ucred *cred); +bool groupmember(gid_t gid, const struct ucred *cred); +bool realgroupmember(gid_t gid, const struct ucred *cred); #endif /* _KERNEL */ #endif /* !_SYS_UCRED_H_ */ From nobody Fri Nov 15 10:48:54 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqYfb3kRVz5cykc; Fri, 15 Nov 2024 10:48: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqYfZ50mfz4Wkg; Fri, 15 Nov 2024 10:48:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731667734; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vAlciRPseOjYlVMASBB3jOG3bCEgCq5bxJKMx9OTNM4=; b=xy4c+15nt1CUI6NhAzVBd0WBOLggyZhLro34AN6f1nR2UGJSHyTgj3p0MsHOm1QK/wfln6 WdqQQ+mOvZBRizj4P3klnYZqaouNGh9O3xkl3xtnC4atTI1XRg3yquKJPLV3I04jYgG9Uv Z074NVndyYDRZ0wzPHAzLEe7bOTzNa2dwMQ8r9kvLs0rBJ1bP6ifQTdU6FqRqwrZYuqmEL SybZZR8X4o+q+8qNWZ0rcM0x0uJye3o+DLGO/bwD1OUsU110aUt42qs9dYuzfIRbrK17Sm ISgqAzLD/SqOT1c7zGWuMjyTq/DHykzHDWf/Kp0950OBHIMti4HdukTwNoEEeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731667734; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vAlciRPseOjYlVMASBB3jOG3bCEgCq5bxJKMx9OTNM4=; b=X2xpUaorFJkLCksK7lOnYcw9oINk5D+QtGnSl5g1Kkd7Jr549BKk3M4bNnV1NpjoWUIyJV z2UaTv9FjZ+weGhDYZrEeDen4RR6ZawfsT+yplh1gihM5+KaM+GNYTKOy4aeyTtL071GD2 esELAGDKnF2rSmEWN5kngyX4z8Q7dQJUJD8psVldd9Uv15jNx5Ye6PIzt139mgD0QyzUpF /0LsMI4njMoIqoZ026NMNsC1E7G1m8/6PiyfLK3Qlr6LFU+upi6iZtCSEdj/lo8PVIpsL1 6OwLvSwzz5gRlnaf4dj2tXGoiI45Pie4s/blBuzuMuxe9Y2B2n+QSIKiyUIODg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731667734; a=rsa-sha256; cv=none; b=rMMzXPH5SqOfbvqrxzNzVlKzqL4Gh4qqTM6DdZpj+hXmUhmKZAjRxtcdMYEfNmJUWplgyI Wb6FSC/VWC4GwLFbQtl3o+feGRmVLO3FOqHUEEIwcDkwp0Y/lguD7GMbhMcMRUub1QlFRZ D9DnCkpvqhGurqW3m2DQk1tKuVQvJzyQvhfjOu23ATm5nStoGK2jsTaziot7atod+AhDl0 2w7x8HMfagNK242bvio2J+q+jgTbX/JOvafbkmVXnon69A20IESjyldOkSUDh5t85N9A9J esUl+PANfCaUyj7q+x+3+bi1CR4Q03CaEgoF9gpd047s9tBYLy3K8unwhFxUrQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqYfZ3jxqzKlG; Fri, 15 Nov 2024 10:48:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AFAmsBW017777; Fri, 15 Nov 2024 10:48:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AFAmsoH017774; Fri, 15 Nov 2024 10:48:54 GMT (envelope-from git) Date: Fri, 15 Nov 2024 10:48:54 GMT Message-Id: <202411151048.4AFAmsoH017774@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: 923a50140b2b - stable/14 - cred: Make group_is_supplementary() public; New group_is_primary() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 923a50140b2b7e39a51606f27b6fc44e8673aee1 Auto-Submitted: auto-generated The branch stable/14 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=923a50140b2b7e39a51606f27b6fc44e8673aee1 commit 923a50140b2b7e39a51606f27b6fc44e8673aee1 Author: Olivier Certner AuthorDate: 2024-07-19 09:54:35 +0000 Commit: Olivier Certner CommitDate: 2024-11-15 10:47:41 +0000 cred: Make group_is_supplementary() public; New group_is_primary() Reviewed by: mhorne Approved by: markj (mentor) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D46908 (cherry picked from commit 6369544278b2e4fb5203b10dab466ff7c72c0a25) Approved by: markj (mentor) --- sys/kern/kern_prot.c | 2 +- sys/sys/ucred.h | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index ab2adbffa23b..0430464f6899 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1289,7 +1289,7 @@ sys___setugid(struct thread *td, struct __setugid_args *uap) /* * Returns whether gid designates a supplementary group in cred. */ -static bool +bool group_is_supplementary(const gid_t gid, const struct ucred *const cred) { diff --git a/sys/sys/ucred.h b/sys/sys/ucred.h index db38cd99e5bc..21804eb6aa8c 100644 --- a/sys/sys/ucred.h +++ b/sys/sys/ucred.h @@ -158,6 +158,17 @@ void crcowfree(struct thread *td); void cru2x(struct ucred *cr, struct xucred *xcr); void cru2xt(struct thread *td, struct xucred *xcr); void crsetgroups(struct ucred *cr, int n, gid_t *groups); + +/* + * Returns whether gid designates a primary group in cred. + */ +static inline bool +group_is_primary(const gid_t gid, const struct ucred *const cred) +{ + return (gid == cred->cr_groups[0] || gid == cred->cr_rgid || + gid == cred->cr_svgid); +} +bool group_is_supplementary(const gid_t gid, const struct ucred *const cred); bool groupmember(gid_t gid, const struct ucred *cred); bool realgroupmember(gid_t gid, const struct ucred *cred); #endif /* _KERNEL */ From nobody Fri Nov 15 10:48:53 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqYfb1q6Fz5cyq5; Fri, 15 Nov 2024 10:48: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqYfY2ymqz4WYL; Fri, 15 Nov 2024 10:48:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731667733; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cYmSevj93GMj4G7IIgv3A4r8Za7jx2hPvMA0B/6H+9I=; b=nfyu06wpTBtujkUQ2OXxAzx5b046ldk/uyZvKVJhTRCIhTc94+LfxiH89g03G19LSqShpD 7gV7yOVJbvu2hTA8Dan4DoSt/taYbiwFSYlmcsnqtoO87/YMmii7YG/ZoThQ4qBXac11e1 YlxTEHtnSl2mVW150shffSAPX7QpVKU+48xWnWkUiSRVMxi3rYuphw+82TlZn5igbnUraU M2jUNOZrwTE/akZSyJPnA9kvp3oLbYBxoqVtfAdSEl9KjLh3bXQwgknjxQu0nrBiD5CtwV Dgpkg7RHkNwZU0wWZAlkxzWl2XWCUzjJj2AeYgx7ASpus5uXjLy1TXFikBOXpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731667733; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cYmSevj93GMj4G7IIgv3A4r8Za7jx2hPvMA0B/6H+9I=; b=bz65x04VMxtT2OYD3NvmIv2bEmce3W1dBi3lLdqEDvwBcU2493Dj7xIFH6i+j+9V62EzVA ghaXVARQ3FiA8wD70KbUVLpWN+/MbxjGR7iMVxzIhLu102h2td9TG/DRjD1s3D/hF+3TuR YYx+BggehL3USmQeeltTN/F9TWL9I5Z7fieo9lMAha3l2xjUPAdaIUJ4gLwQKsgw9lNf2f wkUBe3+efKpe1WnNjTyXejeOoqQzFqUqTGGaNTZfOof7lj4YukdBslS7d3yigAG9Pz3rTs tr7YuHS5dZgBqz16U2mpIH/94OWVZZAodo9lv8yLdBKEf8okwsK1wMPyIWTv0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731667733; a=rsa-sha256; cv=none; b=FYMQJEuJWsRWIDiTJ94MWiBqv5QIkubViHGw+Gbv+bqtLqiHfa3c2QopeWkOLEjL0mMSv0 R+72saRvO/5PuzrycYg4231SVfNyxivml8p8PtJcxwY7yuPxvvadX1YxQaXeBTw4lS34YY P9yr42b4pDMpaUCaykf0m78g4CgCzBRQcJkNdlPn1RSxBzuQZGCRcWFckAY8Lalp5SuCaA GIgDOeKXXdIk5K1R+obXfdOlQHJAyy6KgotuuUnbhRS4/1X/MD9sEYuJji8Lyc6W5GpJ00 mUHMnCzMFsNPlIl6iPeH2v0658G8oc+goXuDQv5IlqT/v7UjOGbF5u0+KNiONQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqYfY2QF6zKF2; Fri, 15 Nov 2024 10:48:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AFAmrPK017730; Fri, 15 Nov 2024 10:48:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AFAmrOo017727; Fri, 15 Nov 2024 10:48:53 GMT (envelope-from git) Date: Fri, 15 Nov 2024 10:48:53 GMT Message-Id: <202411151048.4AFAmrOo017727@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: 97c0b4e0eacd - stable/14 - cred: group_is_supplementary(): Use bsearch() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 97c0b4e0eacd8d163795c11ce790259db56af935 Auto-Submitted: auto-generated The branch stable/14 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=97c0b4e0eacd8d163795c11ce790259db56af935 commit 97c0b4e0eacd8d163795c11ce790259db56af935 Author: Olivier Certner AuthorDate: 2024-07-19 11:23:19 +0000 Commit: Olivier Certner CommitDate: 2024-11-15 10:47:41 +0000 cred: group_is_supplementary(): Use bsearch() This makes that function use a more efficient version of binary search instead, and removes one more hand-rolled binary search code from the tree (and the kernel binary). Reviewed by: mhorne, emaste Approved by: markj (mentor) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D46907 (cherry picked from commit 372605478c6fe2c628f25428af201f866d7eb015) Approved by: markj (mentor) --- sys/kern/kern_prot.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index be7a71ae6879..ab2adbffa23b 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -52,6 +52,7 @@ #include #include #include +#include #include #include #include @@ -832,6 +833,15 @@ sys_setgroups(struct thread *td, struct setgroups_args *uap) return (error); } +static int +gidp_cmp(const void *p1, const void *p2) +{ + const gid_t g1 = *(const gid_t *)p1; + const gid_t g2 = *(const gid_t *)p2; + + return ((g1 > g2) - (g1 < g2)); +} + int kern_setgroups(struct thread *td, u_int ngrp, gid_t *groups) { @@ -1282,24 +1292,13 @@ sys___setugid(struct thread *td, struct __setugid_args *uap) static bool group_is_supplementary(const gid_t gid, const struct ucred *const cred) { - int l, h, m; /* * Perform a binary search of the supplementary groups. This is * possible because we sort the groups in crsetgroups(). */ - l = 1; - h = cred->cr_ngroups; - - while (l < h) { - m = l + (h - l) / 2; - if (cred->cr_groups[m] < gid) - l = m + 1; - else - h = m; - } - - return (l < cred->cr_ngroups && cred->cr_groups[l] == gid); + return (bsearch(&gid, cred->cr_groups + 1, cred->cr_ngroups - 1, + sizeof(gid), gidp_cmp) != NULL); } /* From nobody Fri Nov 15 10:48:55 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqYfc6f0Yz5d05P; Fri, 15 Nov 2024 10:48: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqYfb59hqz4WmT; Fri, 15 Nov 2024 10:48:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731667735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jrJtVIiL/KwR1ddkyLS63HTzaVPm38hbGLQXpV0MdLE=; b=IWDViOQ8mQyyXcOi9mVnHCnoB1IwpFkRb2rI7iN1Xlll5PYriXMu1sd7WB2JkizSLvWvMd lWGT7khQtKoLuURgiFlF2PRaUBq1XZYMyi1auztJ+kL+ZNLs9De8+uO9ABnbrY3UR6eApU sWTLMim4Rk+q51Mtx4wTzsp0/ENdn5KTehvG2ShqNGSS748Ufz+XVpU387pNtdd8sEg8qx tQR974RcS/TI3CkBUN4MLbGtEImEYX1KsXezvBKjLSLNmFrSpz0iyXGmBNegcP0OhWYVHj SwofqLe8JgMorp0z3Dcvx4tWziQc37CEfu1wwOvtEX9Dz/hJ/KtX0uf9CHAyIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731667735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jrJtVIiL/KwR1ddkyLS63HTzaVPm38hbGLQXpV0MdLE=; b=B1q4lmVEbKdoMokX4bkMoMs0m/jEIFnSO/DOLTQ0hceiQLk2YBTtQy7bf1bbGzq3a44Tto zHw9EToWHq7hSxM9T7U0rgqqc/iHig5rB15I652pPwY5pb8v0NcmEyNkYsCol23nxaBscL 5SBnFnH/iNF+QLDA1wUAyTOc4w5Fu95elMKFK+mrbBuakSTNc2DZ7D9BG3v1mQL2bQQIWX oXvIBwbaP/vZm5ndyuPwTBSd0LDby2XO8++cDsSqKrEY4VRscenwtLnY5Z8wxqwYWeOXmz pE3Y7eEx6AtfNSIsQE4uf2og6NzyHQbRdBKFhxdgtb3ThYx6sje+ElSR14aaww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731667735; a=rsa-sha256; cv=none; b=ybqhHPpBuCNmce0CMlaG1AZNOEB8G57XaveEDOhZRjRtGWfrdgki0gVrq1E6ySFRBHob+U lm+L49GEzYyzwAVvkRm7eYSXAS7Fc/HahPpbHURZGoIJWFI3ac6TtbDaiZJrWAWUuoO3ie nbcdwlLPH0TuKkDPImqtpK3noqKHr8PWxchqmXANu452tnxMq5wE/JbOrhKiLkuUTEMxZl cSZ1aPIeFDl5HAqVudV538VMZOq7lkfl0TNirK1Z7EqTarSPiJnahs3r3cPKGwGoImsdzs HJ/fSy7FcWFhQ1yhVdATlNTNkMqcGsX/ouPNR8+pSX33X7nB9KYjDSQY1f3kCA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqYfb4lKYzKF3; Fri, 15 Nov 2024 10:48:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AFAmtCw017841; Fri, 15 Nov 2024 10:48:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AFAmtIK017838; Fri, 15 Nov 2024 10:48:55 GMT (envelope-from git) Date: Fri, 15 Nov 2024 10:48:55 GMT Message-Id: <202411151048.4AFAmtIK017838@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: 350e2b1940df - stable/14 - cred: Separate constant for the number of inlined groups List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 350e2b1940dfd457abd55bf0ba7c19274491496c Auto-Submitted: auto-generated The branch stable/14 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=350e2b1940dfd457abd55bf0ba7c19274491496c commit 350e2b1940dfd457abd55bf0ba7c19274491496c Author: Olivier Certner AuthorDate: 2024-07-16 20:37:44 +0000 Commit: Olivier Certner CommitDate: 2024-11-15 10:47:41 +0000 cred: Separate constant for the number of inlined groups CRED_SMALLGROUPS_NB now holds the number of inlined groups in field 'cr_smallgroups'. XU_NGROUPS stays the number of groups allowed in 'struct xucred'. The first is an implementation detail, while the second is part of a public interface. All mentions of XU_NGROUPS in the tree have been reviewed and only those concerning the implementation detail have been changed to use CRED_SMALLGROUPS_NB (they were all in 'kern_prot.c'). No functional change, as CRED_SMALLGROUPS_NB is set to 16, the same value as XU_NGROUPS. Reviewed by: mhorne (slightly different version) Approved by: markj (mentor) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D46911 (cherry picked from commit 664b9fcb1c051c17ba11d1e5e8a1db9938d76bd5) Approved by: markj (mentor) --- sys/kern/kern_prot.c | 6 +++--- sys/sys/ucred.h | 12 ++++++++++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 0430464f6899..dc2ab35dc5df 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -811,7 +811,7 @@ struct setgroups_args { int sys_setgroups(struct thread *td, struct setgroups_args *uap) { - gid_t smallgroups[XU_NGROUPS]; + gid_t smallgroups[CRED_SMALLGROUPS_NB]; gid_t *groups; int gidsetsize, error; @@ -819,7 +819,7 @@ sys_setgroups(struct thread *td, struct setgroups_args *uap) if (gidsetsize > ngroups_max + 1 || gidsetsize < 0) return (EINVAL); - if (gidsetsize > XU_NGROUPS) + if (gidsetsize > CRED_SMALLGROUPS_NB) groups = malloc(gidsetsize * sizeof(gid_t), M_TEMP, M_WAITOK); else groups = smallgroups; @@ -828,7 +828,7 @@ sys_setgroups(struct thread *td, struct setgroups_args *uap) if (error == 0) error = kern_setgroups(td, gidsetsize, groups); - if (gidsetsize > XU_NGROUPS) + if (gidsetsize > CRED_SMALLGROUPS_NB) free(groups, M_TEMP); return (error); } diff --git a/sys/sys/ucred.h b/sys/sys/ucred.h index 21804eb6aa8c..5265fa16907b 100644 --- a/sys/sys/ucred.h +++ b/sys/sys/ucred.h @@ -44,6 +44,14 @@ struct loginclass; #define XU_NGROUPS 16 +#if defined(_KERNEL) || defined(_WANT_UCRED) +/* + * Number of groups inlined in 'struct ucred'. It must stay reasonably low as + * it is also used by some functions to allocate an array of this size on the + * stack. + */ +#define CRED_SMALLGROUPS_NB 16 + /* * Credentials. * @@ -57,7 +65,6 @@ struct loginclass; * * See "Credential management" comment in kern_prot.c for more information. */ -#if defined(_KERNEL) || defined(_WANT_UCRED) struct ucred { struct mtx cr_mtx; long cr_ref; /* (c) reference count */ @@ -80,7 +87,8 @@ struct ucred { struct label *cr_label; /* MAC label */ gid_t *cr_groups; /* groups */ int cr_agroups; /* Available groups */ - gid_t cr_smallgroups[XU_NGROUPS]; /* storage for small groups */ + /* storage for small groups */ + gid_t cr_smallgroups[CRED_SMALLGROUPS_NB]; }; #define NOCRED ((struct ucred *)0) /* no credential available */ #define FSCRED ((struct ucred *)-1) /* filesystem credential */ From nobody Fri Nov 15 10:48:56 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqYff43wnz5cygq; Fri, 15 Nov 2024 10:48: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqYfc6BTtz4WYs; Fri, 15 Nov 2024 10:48:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731667736; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/X1gWd9dj90hbnmFheO5gKJaWntPkTUM1f55aqlurWc=; b=xZf5I022kvk+3yCIHurxeMs3UAYmDoutJUyxgzH2sZyjOQbaYo8ncek4F34y+5PlXoryZx 1pTpzcWExiVBN47zq9TX6ep9+QV6XwegHwqY1lp4rbE1B2fcnU+ffdQ4I+mYD3dlcCBsbr WEwkdkVYXwi11FVnx8RVn0WeDt2DXm+ViWIBeoDdG3BALV+7cWkewiHfxz1nMZ1dZiIlxp kXzIukZH7DBoQibIVtTQAs32qKvhMuGgbpefg4jom8I8YH8EfXWHfx73xTvD1Knb27gqff oFhjvWbhEmZ0PFS64peAe96c/Cnzf0UhNDXlgd5D3Gq2SXz0soIOoPD/o0fwGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731667736; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/X1gWd9dj90hbnmFheO5gKJaWntPkTUM1f55aqlurWc=; b=Ynvxgwm/lhRa7UN9RUBGQepz2JBOKoAIlzOSAJHx0VKaVfVzURzGMhtRJgzKWiuy++d919 6nE5EUcpid/K5H0e70i35JO9okdVbak/S4p991Q0LTSebRVsOwaAFOb1K6T+/1+HaTMbhk ZaRFNh0muoXJFqqgbXQDyfxYgTwkaQIP7cemNRW5IjLzQd6J4dvE0XVszo9wo0dBdrzH8L nNrf3opYlOuMg+QvFJVqBCWE5dtRHPIwnUX1zBnDMekXczzhQ9HIQv5w5krkdQx9JITBmg aCDBXBx9b56kAtL4i9xwnGe3juO0yfqvoCHwQGP4KENwJjNpSq7UipukULUi3w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731667736; a=rsa-sha256; cv=none; b=qJ52WFhLj5CMnrG+V69vWi693Nil3w829js0OXhI8/ZhBxCWoCPylOfzQX7GVwvk9lpDx8 gmF2LZcCjng2xZILcr49bE8OyVCzVQbxfZM23osZH26K4QFW1aDDZi+BB6YQXvInvoaBaM 63zrL2lJe1sYTadfko8BuzPJ4gbtMfY3TXBHOPITvQk0/Ojxc3QuVYKOh26mNhGcT3F05v qAJJgUL0W9DpxJ10THaq2SUcfksEwf5PErwboez47MYeJwAr+zpKPwiRUOK1iiVdaGoA/U WUSljTkZGwnWjRl5Fsm2jG9um1A52/HeJkaiS/yr14J6yNunrjx982zSCaWhWA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqYfc5XgTzKSd; Fri, 15 Nov 2024 10:48:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AFAmuJw017898; Fri, 15 Nov 2024 10:48:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AFAmuHm017895; Fri, 15 Nov 2024 10:48:56 GMT (envelope-from git) Date: Fri, 15 Nov 2024 10:48:56 GMT Message-Id: <202411151048.4AFAmuHm017895@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: 5d10a05c6dfa - stable/14 - cred: kern_setgroups(): Internally use int as number of groups' 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 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5d10a05c6dfacd30a2691e92eb68cfabb6e94104 Auto-Submitted: auto-generated The branch stable/14 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=5d10a05c6dfacd30a2691e92eb68cfabb6e94104 commit 5d10a05c6dfacd30a2691e92eb68cfabb6e94104 Author: Olivier Certner AuthorDate: 2024-10-01 16:46:46 +0000 Commit: Olivier Certner CommitDate: 2024-11-15 10:47:41 +0000 cred: kern_setgroups(): Internally use int as number of groups' type sys_setgroups() (and sys_getgroups()) was changed in commit "kern: fail getgroup and setgroup with negative int" (4bc2174a1b48) to take the number of groups as an 'int' (for sys_getgroups(), POSIX mandates this change; for sys_setgroups(), which it does not standardize, it's arguably for consistency). All our internal APIs related to groups on 'struct ucred', as well as related members on the latter, treat that number as an 'int' as well (and not a 'u_int'). Consequently, to avoid surprises, change kern_setgroups() to behave the same, and fix audit_arg_groupset() accordingly. With that change, everything is handled with signed integers internally. Update sanity checks accordingly. Reviewed by: mhorne Approved by: markj (mentor) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D46912 (cherry picked from commit abd39811cd7e4bb928da503f4a5c79364ac8d0f5) Approved by: markj (mentor) --- sys/kern/kern_prot.c | 16 ++++++++++++++-- sys/security/audit/audit.h | 2 +- sys/security/audit/audit_arg.c | 8 ++++---- sys/sys/syscallsubr.h | 2 +- 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index dc2ab35dc5df..3052dc44d828 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -815,6 +815,15 @@ sys_setgroups(struct thread *td, struct setgroups_args *uap) gid_t *groups; int gidsetsize, error; + /* + * Sanity check size now to avoid passing too big a value to copyin(), + * even if kern_setgroups() will do it again. + * + * Ideally, the 'gidsetsize' argument should have been a 'u_int' (and it + * was, in this implementation, for a long time), but POSIX standardized + * getgroups() to take an 'int' and it would be quite entrapping to have + * setgroups() differ. + */ gidsetsize = uap->gidsetsize; if (gidsetsize > ngroups_max + 1 || gidsetsize < 0) return (EINVAL); @@ -843,13 +852,16 @@ gidp_cmp(const void *p1, const void *p2) } int -kern_setgroups(struct thread *td, u_int ngrp, gid_t *groups) +kern_setgroups(struct thread *td, int ngrp, gid_t *groups) { struct proc *p = td->td_proc; struct ucred *newcred, *oldcred; int error; - MPASS(ngrp <= ngroups_max + 1); + /* Sanity check size. */ + if (ngrp < 0 || ngrp > ngroups_max + 1) + return (EINVAL); + AUDIT_ARG_GROUPSET(groups, ngrp); newcred = crget(); crextend(newcred, ngrp); diff --git a/sys/security/audit/audit.h b/sys/security/audit/audit.h index e7a9c83afbb3..b87dd52e0773 100644 --- a/sys/security/audit/audit.h +++ b/sys/security/audit/audit.h @@ -98,7 +98,7 @@ void audit_arg_rgid(gid_t rgid); void audit_arg_ruid(uid_t ruid); void audit_arg_sgid(gid_t sgid); void audit_arg_suid(uid_t suid); -void audit_arg_groupset(gid_t *gidset, u_int gidset_size); +void audit_arg_groupset(gid_t *gidset, int gidset_size); void audit_arg_login(char *login); void audit_arg_ctlname(int *name, int namelen); void audit_arg_mask(int mask); diff --git a/sys/security/audit/audit_arg.c b/sys/security/audit/audit_arg.c index 7b7fe34ccda9..db621db1574f 100644 --- a/sys/security/audit/audit_arg.c +++ b/sys/security/audit/audit_arg.c @@ -264,13 +264,13 @@ audit_arg_suid(uid_t suid) } void -audit_arg_groupset(gid_t *gidset, u_int gidset_size) +audit_arg_groupset(gid_t *gidset, int gidset_size) { - u_int i; + int i; struct kaudit_record *ar; - KASSERT(gidset_size <= ngroups_max + 1, - ("audit_arg_groupset: gidset_size > (kern.ngroups + 1)")); + KASSERT(gidset_size >= 0 && gidset_size <= ngroups_max + 1, + ("audit_arg_groupset: gidset_size < 0 or > (kern.ngroups + 1)")); ar = currecord(); if (ar == NULL) diff --git a/sys/sys/syscallsubr.h b/sys/sys/syscallsubr.h index 87e29f5ca5fc..1b34a3db8223 100644 --- a/sys/sys/syscallsubr.h +++ b/sys/sys/syscallsubr.h @@ -312,7 +312,7 @@ int kern_select(struct thread *td, int nd, fd_set *fd_in, fd_set *fd_ou, fd_set *fd_ex, struct timeval *tvp, int abi_nfdbits); int kern_sendit(struct thread *td, int s, struct msghdr *mp, int flags, struct mbuf *control, enum uio_seg segflg); -int kern_setgroups(struct thread *td, u_int ngrp, gid_t *groups); +int kern_setgroups(struct thread *td, int ngrp, gid_t *groups); int kern_setitimer(struct thread *, u_int, struct itimerval *, struct itimerval *); int kern_setpriority(struct thread *td, int which, int who, int prio); From nobody Fri Nov 15 10:48:58 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqYfg2jFDz5cymp; Fri, 15 Nov 2024 10: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqYfg1DX6z4WyW; Fri, 15 Nov 2024 10: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=1731667739; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HTGMVk8OCTrGW6YMwtawWh8XeDshnKN6tyHeWQ6poxg=; b=cQ4GRC+w5wyl7hRV7ehGN5EQWvHINzTYKLXENRkV5QNamBY8+pv+vCVxTbe8biWjg99Sy9 j8mePAkQZo+PspdfgrjkLHCPpBB/FmJpMXZOkxU2TUt2ly80HKnNY16OxE2sczKfQOGrmG EoG7AnF8rqXIfoB6P7CXJk0F+4LiB4s1hBfAwoWZarJ+X9P29Sc7wIiS0hlUccClMKtdz7 y8OdtKW5m0qYDq8EsAAHGkbrfk30t6em0jZSCzHevusPlIxDFPW9nR7vR8S3E+CcTh3k91 y94Rbqls5T7k2ovIYHLcmw8/0mU/mF318987oBcgkRJ01bJx9exRNWwqrJPLAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731667739; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HTGMVk8OCTrGW6YMwtawWh8XeDshnKN6tyHeWQ6poxg=; b=UJdd6dPCp9WdDZCMGdgTomBDgr4lsizCOMGmovvk8vRxBphEHIJer1USXjTvQyy/o3lx17 p6QpF8MSL841jJRS8mraPdfEyXUcdCz1xECqwCUszjr4lYWIPBYmPVAdKg8kMpi8c9XDRc StkXGcN89tTF9p8bCjszP+2jjqf66IosMZrjWDGiwqqGHYvaYmGEpQCqn8iCfxRyY9zyxD iUXAmreUNc0s2VtNnfmGtumvY6kx+D61OX44JY0M1QyC0NQDxTkU1t+ZA4w1dq4E5SzP+c xxEm+NCfB2nJfUzjy7TYyeg+j5GVBAmwYrbsxK2gqOBRNbChfeNCO6Ksxks06A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731667739; a=rsa-sha256; cv=none; b=JTWVJfG2uJ9Gd08QgsolOy9iPcqSGHjG7zCO2bscWn2canLrcQOlHY0NvQUN+Mw2R+RaPK SInpmMkxDJfpQwrmw76CvGYyNA6YrSe7pSzDU0Z92egefJnEeRoCT3sC+eis77jCnBb5oS LGNMRVNqdv4uP0u7yXIS7cj+1H3nn5wcSr7hfhNtCEb+IZtzy1HhU+7ofjREvQQ2wwB7LV nUrWIW4C0fzJvq2jb2O+tdDTC8NaZVQhk5SshuScvvmZE2jl+1NWIw9etVUWokoDO9aS1Y TCR5eY4V1ojLS/KUPjxR8/D2kkPdGCpDQFQml5fTP9KoawIsoEOI2mokYr/Fyw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqYfg0TpSzKVr; Fri, 15 Nov 2024 10:48:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AFAmwtZ018010; Fri, 15 Nov 2024 10:48:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AFAmwGo018007; Fri, 15 Nov 2024 10:48:58 GMT (envelope-from git) Date: Fri, 15 Nov 2024 10:48:58 GMT Message-Id: <202411151048.4AFAmwGo018007@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: f4455780bf42 - stable/14 - cred: crsetgroups(): Improve and factor out groups normalization List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f4455780bf42fbcab1a5490556448bb2da87e3c8 Auto-Submitted: auto-generated The branch stable/14 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=f4455780bf42fbcab1a5490556448bb2da87e3c8 commit f4455780bf42fbcab1a5490556448bb2da87e3c8 Author: Olivier Certner AuthorDate: 2024-10-02 12:40:27 +0000 Commit: Olivier Certner CommitDate: 2024-11-15 10:47:42 +0000 cred: crsetgroups(): Improve and factor out groups normalization The groups array has been sorted (not including the first element, which is always the effective GID) to enable performing a binary search for determining if some group is part of the supplementary groups set. Factor out this sorting operation into an internal normalization function (groups_normalize()), adding to it the removal of duplicates after the sort. Separating groups normalization code allows to perform it in advance, and in particular before calling MAC hooks which need the groups array to be sorted to perform better. This also enables sorting input arrays ahead of acquiring the process lock (which is not necessary for this operation). kern_setgroups() has been changed accordingly, so MAC modules implementing the mac_cred_check_setgroups() hook now can assume a normalized groups array (and also that it has at least one element, as if kern_setgroups() is passed no groups, the hook is called with an array of one element being the current effective GID, as this is effectively the effect of such a call to kern_setgroups()). Further commits introducing the setcred() system call and associated MAC hooks will also guarantee a normalized groups array to MAC modules implementing these hooks. Rename crsetgroups_locked() into crsetgroups_internal(), as it is no more "locked" than crsetgroups() itself. However, it can be called under any lock (as needed), whereas the second may sleep to allocate memory. Update their herald comments to make that explicit. In passing, using qsort() instead of the old open-coded insertion sort (in crsetgroups_locked()) fixes the performance concern about the latter when using a large number of groups. Also, our qsort() falls back to insertion sort for small arrays and in case the array is likely to be mostly sorted, so this shouldn't cause concerns for the small number of groups common case. While here, add assertions in inner modification routines to check that the passed credentials object has a reference count of exactly 1 (in particular, it must not be shared). Remove a redundant one from some outer routine. Reviewed by: mhorne Approved by: markj (mentor) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D46914 (cherry picked from commit 6d2efbb34fdb59facbe6d83374ef4ab69d395866) Approved by: markj (mentor) --- sys/kern/kern_prot.c | 168 ++++++++++++++++++++++++++++++++++++++------------ sys/sys/syscallsubr.h | 2 +- sys/sys/ucred.h | 2 +- 3 files changed, 131 insertions(+), 41 deletions(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 3052dc44d828..f3d8f2a235d5 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -89,8 +89,22 @@ SYSCTL_NODE(_security, OID_AUTO, bsd, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "BSD security policy"); static void crfree_final(struct ucred *cr); -static void crsetgroups_locked(struct ucred *cr, int ngrp, - gid_t *groups); + +static inline void +groups_check_positive_len(int ngrp) +{ + MPASS2(ngrp >= 0, "negative number of groups"); + MPASS2(ngrp != 0, "at least one group expected (effective GID)"); +} +static inline void +groups_check_max_len(int ngrp) +{ + MPASS2(ngrp <= ngroups_max + 1, "too many groups"); +} + +static void groups_normalize(int *ngrp, gid_t *groups); +static void crsetgroups_internal(struct ucred *cr, int ngrp, + const gid_t *groups); static int cr_canseeotheruids(struct ucred *u1, struct ucred *u2); static int cr_canseeothergids(struct ucred *u1, struct ucred *u2); @@ -835,9 +849,9 @@ sys_setgroups(struct thread *td, struct setgroups_args *uap) error = copyin(uap->gidset, groups, gidsetsize * sizeof(gid_t)); if (error == 0) - error = kern_setgroups(td, gidsetsize, groups); + error = kern_setgroups(td, &gidsetsize, groups); - if (gidsetsize > CRED_SMALLGROUPS_NB) + if (groups != smallgroups) free(groups, M_TEMP); return (error); } @@ -851,25 +865,38 @@ gidp_cmp(const void *p1, const void *p2) return ((g1 > g2) - (g1 < g2)); } +/* + * CAUTION: This function normalizes 'groups', possibly also changing the value + * of '*ngrpp' as a consequence. + */ int -kern_setgroups(struct thread *td, int ngrp, gid_t *groups) +kern_setgroups(struct thread *td, int *ngrpp, gid_t *groups) { struct proc *p = td->td_proc; struct ucred *newcred, *oldcred; - int error; + int ngrp, error; + ngrp = *ngrpp; /* Sanity check size. */ if (ngrp < 0 || ngrp > ngroups_max + 1) return (EINVAL); AUDIT_ARG_GROUPSET(groups, ngrp); + if (ngrp != 0) { + /* We allow and treat 0 specially below. */ + groups_normalize(ngrpp, groups); + ngrp = *ngrpp; + } newcred = crget(); crextend(newcred, ngrp); PROC_LOCK(p); oldcred = crcopysafe(p, newcred); #ifdef MAC - error = mac_cred_check_setgroups(oldcred, ngrp, groups); + error = ngrp == 0 ? + /* If 'ngrp' is 0, we'll keep just the current effective GID. */ + mac_cred_check_setgroups(oldcred, 1, oldcred->cr_groups) : + mac_cred_check_setgroups(oldcred, ngrp, groups); if (error) goto fail; #endif @@ -886,9 +913,9 @@ kern_setgroups(struct thread *td, int ngrp, gid_t *groups) * when running non-BSD software if we do not do the same. */ newcred->cr_ngroups = 1; - } else { - crsetgroups_locked(newcred, ngrp, groups); - } + } else + crsetgroups_internal(newcred, ngrp, groups); + setsugid(p); proc_set_cred(p, newcred); PROC_UNLOCK(p); @@ -1298,6 +1325,32 @@ sys___setugid(struct thread *td, struct __setugid_args *uap) #endif /* REGRESSION */ } +#ifdef INVARIANTS +static void +groups_check_normalized(int ngrp, const gid_t *groups) +{ + gid_t prev_g; + + groups_check_positive_len(ngrp); + groups_check_max_len(ngrp); + + if (ngrp == 1) + return; + + prev_g = groups[1]; + for (int i = 2; i < ngrp; ++i) { + const gid_t g = groups[i]; + + if (prev_g >= g) + panic("%s: groups[%d] (%u) >= groups[%d] (%u)", + __func__, i - 1, prev_g, i, g); + prev_g = g; + } +} +#else +#define groups_check_normalized(...) +#endif + /* * Returns whether gid designates a supplementary group in cred. */ @@ -2158,7 +2211,6 @@ void crcopy(struct ucred *dest, struct ucred *src) { - KASSERT(dest->cr_ref == 1, ("crcopy of shared ucred")); bcopy(&src->cr_startcopy, &dest->cr_startcopy, (unsigned)((caddr_t)&src->cr_endcopy - (caddr_t)&src->cr_startcopy)); @@ -2304,6 +2356,8 @@ crextend(struct ucred *cr, int n) { int cnt; + MPASS2(cr->cr_ref == 1, "'cr_ref' must be 1 (referenced, unshared)"); + /* Truncate? */ if (n <= cr->cr_agroups) return; @@ -2337,52 +2391,88 @@ crextend(struct ucred *cr, int n) } /* - * Copy groups in to a credential, preserving any necessary invariants. - * Currently this includes the sorting of all supplementary gids. - * crextend() must have been called before hand to ensure sufficient - * space is available. + * Normalizes a set of groups to be applied to a 'struct ucred'. + * + * The set of groups is an array that must comprise the effective GID as its + * first element (so its length cannot be 0). + * + * Normalization ensures that elements after the first, which stand for the + * supplementary groups, are sorted in ascending order and do not contain + * duplicates. */ static void -crsetgroups_locked(struct ucred *cr, int ngrp, gid_t *groups) +groups_normalize(int *ngrp, gid_t *groups) { - int i; - int j; - gid_t g; + gid_t prev_g; + int ins_idx; - KASSERT(cr->cr_agroups >= ngrp, ("cr_ngroups is too small")); + groups_check_positive_len(*ngrp); + groups_check_max_len(*ngrp); - bcopy(groups, cr->cr_groups, ngrp * sizeof(gid_t)); - cr->cr_ngroups = ngrp; + if (*ngrp == 1) + return; - /* - * Sort all groups except cr_groups[0] to allow groupmember to - * perform a binary search. - * - * XXX: If large numbers of groups become common this should - * be replaced with shell sort like linux uses or possibly - * heap sort. - */ - for (i = 2; i < ngrp; i++) { - g = cr->cr_groups[i]; - for (j = i-1; j >= 1 && g < cr->cr_groups[j]; j--) - cr->cr_groups[j + 1] = cr->cr_groups[j]; - cr->cr_groups[j + 1] = g; + qsort(groups + 1, *ngrp - 1, sizeof(*groups), gidp_cmp); + + /* Remove duplicates. */ + prev_g = groups[1]; + ins_idx = 2; + for (int i = 2; i < *ngrp; ++i) { + const gid_t g = groups[i]; + + if (g != prev_g) { + if (i != ins_idx) + groups[ins_idx] = g; + ++ins_idx; + prev_g = g; + } } + *ngrp = ins_idx; + + groups_check_normalized(*ngrp, groups); +} + +/* + * Internal function copying groups into a credential. + * + * 'ngrp' must be strictly positive. Either the passed 'groups' array must have + * been normalized in advance (see groups_normalize()), else it must be so + * before the structure is to be used again. + * + * This function is suitable to be used under any lock (it doesn't take any lock + * itself nor sleep, and in particular doesn't allocate memory). crextend() + * must have been called beforehand to ensure sufficient space is available. + * See also crsetgroups(), which handles that. + */ +static void +crsetgroups_internal(struct ucred *cr, int ngrp, const gid_t *groups) +{ + + MPASS2(cr->cr_ref == 1, "'cr_ref' must be 1 (referenced, unshared)"); + MPASS2(cr->cr_agroups >= ngrp, "'cr_agroups' too small"); + groups_check_positive_len(ngrp); + + bcopy(groups, cr->cr_groups, ngrp * sizeof(gid_t)); + cr->cr_ngroups = ngrp; } /* * Copy groups in to a credential after expanding it if required. - * Truncate the list to (ngroups_max + 1) if it is too large. + * + * May sleep in order to allocate memory (except if, e.g., crextend() was called + * before with 'ngrp' or greater). Truncates the list to (ngroups_max + 1) if + * it is too large. Array 'groups' doesn't need to be sorted. 'ngrp' must be + * strictly positive. */ void -crsetgroups(struct ucred *cr, int ngrp, gid_t *groups) +crsetgroups(struct ucred *cr, int ngrp, const gid_t *groups) { if (ngrp > ngroups_max + 1) ngrp = ngroups_max + 1; - crextend(cr, ngrp); - crsetgroups_locked(cr, ngrp, groups); + crsetgroups_internal(cr, ngrp, groups); + groups_normalize(&cr->cr_ngroups, cr->cr_groups); } /* diff --git a/sys/sys/syscallsubr.h b/sys/sys/syscallsubr.h index 1b34a3db8223..b3ba50823e93 100644 --- a/sys/sys/syscallsubr.h +++ b/sys/sys/syscallsubr.h @@ -312,7 +312,7 @@ int kern_select(struct thread *td, int nd, fd_set *fd_in, fd_set *fd_ou, fd_set *fd_ex, struct timeval *tvp, int abi_nfdbits); int kern_sendit(struct thread *td, int s, struct msghdr *mp, int flags, struct mbuf *control, enum uio_seg segflg); -int kern_setgroups(struct thread *td, int ngrp, gid_t *groups); +int kern_setgroups(struct thread *td, int *ngrpp, gid_t *groups); int kern_setitimer(struct thread *, u_int, struct itimerval *, struct itimerval *); int kern_setpriority(struct thread *td, int which, int who, int prio); diff --git a/sys/sys/ucred.h b/sys/sys/ucred.h index 5265fa16907b..8e041bb7bcbd 100644 --- a/sys/sys/ucred.h +++ b/sys/sys/ucred.h @@ -165,7 +165,7 @@ struct ucred *crcowget(struct ucred *cr); void crcowfree(struct thread *td); void cru2x(struct ucred *cr, struct xucred *xcr); void cru2xt(struct thread *td, struct xucred *xcr); -void crsetgroups(struct ucred *cr, int n, gid_t *groups); +void crsetgroups(struct ucred *cr, int ngrp, const gid_t *groups); /* * Returns whether gid designates a primary group in cred. From nobody Fri Nov 15 10:48:57 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqYff4Vmxz5d096; Fri, 15 Nov 2024 10:48: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqYff06H9z4Wmy; Fri, 15 Nov 2024 10:48:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731667738; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wojtemnxgDbAN37Cj1IAiCN/Rw39//2IAhNjJ/yY9TI=; b=FSadsN8gTmJ3a0OW/7cwAsA4dGZ+a3QtoRnUZSLnnlmgXczpuLlVf95a0A8rvY2HWbv9YE RBhZkRLtBKA6zX9H/u1dQzxGQX43vS/gEIi+b7lkxrmptAOYzES5TKL8CbgGnpXCcImo04 jo9wrmGBODD3pBqpzaoN8btm2DvE6X+W+yZXh5DUytFyqc6mbZUlY5moiT/YUiuBAzNf8m +OgKE53BtEq1LscKdfcdvlasXoPeI1IsHnt2ymN5gj1di123RnAPmUoOrDsvmeFAHnmFsQ pwHXA5IJAjCj4PKufFfBymgTnsLLMkuf9Am57UbA9YHEXZFkRu3qcpGGv6cv1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731667738; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wojtemnxgDbAN37Cj1IAiCN/Rw39//2IAhNjJ/yY9TI=; b=NdKtFYaDvZWloTDtllNZpobSZ7KF8ApMG31dErp2GDumyE5AMkMfAK0kViC95BSzij+XWC E/HpLOwWJwYYzErzXiRCEVFvqL0MVSwEHcMgbMrG6oz9rs7E2nHNXvM+AesHmCSBATToG2 Pd61V1lFdbaukqAClYA+IutXvGASsZpXIM7LpZcLZtmu7uI6Hcgy9+7zDqsbRjP0tORvnB 9uWhqWn4tjecLpbflytF0G5gk8u197PZsJ3sLqmYRuznoIfrH21jKwu6lh0PNtr02TjPlv 8AfP0vF0KG88/Ym9nIeCGib8MupIZGSm9WnTdFvfSx7D0TRZjNY/wRpsr4k3+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731667738; a=rsa-sha256; cv=none; b=TTnXlcz1GuH3OgaLGA3i8pjJVTom4sEHAHfyEFFOwoukJG1Tva/CgiDS2msSo5IzceCnae veDXGrQ+eypV//FT7tMfFF94BbO+3SzcuNX8G9w5Mb70tu5NZP+MSD/06Ovv0dswnycrAf vT9aAUSnd7swqAgFe5yVXeY/Uw9XL6qAmcfjPU9p88K6YeGZ8YHWCKIaHHq3QDzGJc5szr AxYjA2RUHhQ7rkz3Ud48+1jetRPkRRMQz8z559HLKR5NKdcG3bChsHWjgddEaCAPXEOX4z XKP5oGaQitZt4mORwjah5oEHhszZi3l/YPlMhA+F/v+6hlvMeJo0CDejpjnJHg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqYfd6YzQzKQr; Fri, 15 Nov 2024 10:48:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AFAmvMN017954; Fri, 15 Nov 2024 10:48:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AFAmvdJ017951; Fri, 15 Nov 2024 10:48:57 GMT (envelope-from git) Date: Fri, 15 Nov 2024 10:48:57 GMT Message-Id: <202411151048.4AFAmvdJ017951@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: e657e1e95062 - stable/14 - cred: 'kern.ngroups' tunable: Limit it to avoid internal overflows List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e657e1e95062c7d06ac6c5dd128a270a4ac0d72a Auto-Submitted: auto-generated The branch stable/14 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=e657e1e95062c7d06ac6c5dd128a270a4ac0d72a commit e657e1e95062c7d06ac6c5dd128a270a4ac0d72a Author: Olivier Certner AuthorDate: 2024-10-01 17:00:43 +0000 Commit: Olivier Certner CommitDate: 2024-11-15 10:47:42 +0000 cred: 'kern.ngroups' tunable: Limit it to avoid internal overflows As the comment introduced with the tunable said (but the code didn't do), make sure that 'ngroups_max' can't be INT_MAX, as this would cause overflow in the usual 'ngroups_max + 1' computations (as we store the effective GID and supplementary groups' IDs in the same array, and 'ngroups_max' only applies to supplementary groups). Further, we limit the maximum number of groups somewhat arbitrarily to ~17M so as to avoid overflow when computing the size in bytes of the groups set's backing array and to avoid obvious configuration errors. We really don't think that more than ~17M groups will ever be needed (if I'm proven wrong one day, please drop me a note about your use case). While here, document more precisely why NGROUPS_MAX needs to be the minimum value for 'ngroups_max'. Reviewed by: mhorne (older version) Approved by: markj (mentor) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D46913 (cherry picked from commit 580904d995d53ccd2492140a37107442d8b36dc0) Approved by: markj (mentor) --- sys/kern/subr_param.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/sys/kern/subr_param.c b/sys/kern/subr_param.c index c0a4ac747d00..cee70a842735 100644 --- a/sys/kern/subr_param.c +++ b/sys/kern/subr_param.c @@ -229,14 +229,32 @@ init_param1(void) TUNABLE_ULONG_FETCH("kern.sgrowsiz", &sgrowsiz); /* - * Let the administrator set {NGROUPS_MAX}, but disallow values - * less than NGROUPS_MAX which would violate POSIX.1-2008 or - * greater than INT_MAX-1 which would result in overflow. + * Let the administrator set {NGROUPS_MAX}. + * + * Values less than NGROUPS_MAX would violate POSIX/SuS (see the + * specification for , paragraph "Runtime Increasable + * Values"). + * + * On the other hand, INT_MAX would result in an overflow for the common + * 'ngroups_max + 1' computation (to obtain the size of the internal + * groups array, its first element being reserved for the effective + * GID). Also, the number of allocated bytes for the group array must + * not overflow on 32-bit machines. For all these reasons, we limit the + * number of supplementary groups to some very high number that we + * expect will never be reached in all practical uses and ensures we + * avoid the problems just exposed, even if 'gid_t' was to be enlarged + * by a magnitude. */ ngroups_max = NGROUPS_MAX; TUNABLE_INT_FETCH("kern.ngroups", &ngroups_max); if (ngroups_max < NGROUPS_MAX) ngroups_max = NGROUPS_MAX; + else { + const int ngroups_max_max = (1 << 24) - 1; + + if (ngroups_max > ngroups_max_max) + ngroups_max = ngroups_max_max; + } /* * Only allow to lower the maximal pid. From nobody Fri Nov 15 10:49:01 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqYfj3Qj5z5cyqD; Fri, 15 Nov 2024 10:49: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqYfj2Lj6z4X27; Fri, 15 Nov 2024 10:49:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731667741; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zsrhTNYxTvtPSepQE7HqpmzLwEbFXcsdlXKthahzS3c=; b=DyWYMpO09zsrVp9Karf+LYSWuUQzpt+MoA2VZ1vLv4bzSCFQb60zYd8H3MCtU5y5uPnULh NIkklGFUWYZd5aIf3RWN83d5a/13r/pbAHjUajKjykyeW/FZovJOk2+xY6upHWHqMziAhE wIVyP41oSAjahe6Ib+yQXel2HB9LmU2uqxMeN1/oeFZGNfe1sA6lKooMJ1YHQpSl7In7Ne l7YjyYY0xMAKy5SL/ssI4p6LNP8xBhF9VzXYwCkLyQiG1yTv/vuq6jJXwCR1tf9pj2uEyX hRzVwtSx3xBuyRlgHCWz/MhL+Eb6e7iM5cKqMDq/rI/Dmvyq+9EKL9PBNLyoew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731667741; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zsrhTNYxTvtPSepQE7HqpmzLwEbFXcsdlXKthahzS3c=; b=VVLPZIOKQ0qgXeoSIXRVcVVeYbhVa/RPh1zU4uyskyQmfpHWKUuu3MNHZGukd04HWwSlar UDzosNCoUqbYYBEUpyp4zPMurK8VsllSD0L7dS6UNzLgxxaD2CdU3ZeWX5PQAgekqHG1wn MUtxPUPGUUZpMNfMtMqJZpaDypLCiO8cLUUKdiV7z7LX6WhFd++WU1wdq7GeDpnVpMon8/ Ppj5gw3lwZmurlbMl54ALYlDbvijroSV3htj+ORMoCBkWFkn03jp+mrYb4MqeSBXOv1dC5 YjYyxIVbu5JFBy2wr/1cjco4dlGyy7+rif42cxTafzfPddey7wLgS867oGAgkw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731667741; a=rsa-sha256; cv=none; b=Zthyw6xHL89dGL6IocQXkacegIkTxJeHdgoh8XpRigvBa1tcAhGxHOrYFPiSYPPj9pRy0a suP+7VCUXWcP/1XiINy6RikHwmkj4O3uUvnu6wLVQVieT6dRAX2KresvukhfeL1aMFCdNb FmfF/r4Pd01siwUEGrekJWFYbyd4E/ap8yJ1C7RfttdCCgzfQ7X0TVAIqwD/A6i4aZVKxK gxPgNb+7TqP3NvC3m9EjdH/7rCPL7oZXH9/uF5fNRE8JNP42xZz6kT988bObMSSMXWqjkt VfLBBQMbmjj7JOYknXbeDnAgwnN7Gj5iqfr6t2Tj5DtQwEZYc5PuQz9j/fT+og== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqYfj1zDgzKVs; Fri, 15 Nov 2024 10:49:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AFAn1Y4018114; Fri, 15 Nov 2024 10:49:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AFAn1Eh018111; Fri, 15 Nov 2024 10:49:01 GMT (envelope-from git) Date: Fri, 15 Nov 2024 10:49:01 GMT Message-Id: <202411151049.4AFAn1Eh018111@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: 847dff4bc6e0 - stable/14 - cred: crextend(): Harden, simplify List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 847dff4bc6e004fd8e8906e4dc55f39bfd0c3281 Auto-Submitted: auto-generated The branch stable/14 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=847dff4bc6e004fd8e8906e4dc55f39bfd0c3281 commit 847dff4bc6e004fd8e8906e4dc55f39bfd0c3281 Author: Olivier Certner AuthorDate: 2024-10-01 14:37:11 +0000 Commit: Olivier Certner CommitDate: 2024-11-15 10:47:42 +0000 cred: crextend(): Harden, simplify Harden by adding more assertions, and a plain panic in case of an unrepresentable size for the groups array (this can never happen after the change of the 'kern.ngroups' computation to impose some not too high maximum value a few commits ago). Fix an impact in kern_setgroups(). Simplify by removing the iterative process whose purpose is actually to determine the closest power of two that is greater than the wanted number of bytes. Using the proper target quantity (number of bytes) incidentally helps with eliminating divisions (and the reliance on sizeof(gid_t) being a power of two). Reviewed by: mhorne (older version) Approved by: markj (mentor) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D46915 (cherry picked from commit ea26c0e797525634dd25dede233ff2ded053cf2d) Approved by: markj (mentor) --- sys/kern/kern_prot.c | 55 +++++++++++++++++++++++++++++++--------------------- sys/sys/ucred.h | 6 +++++- 2 files changed, 38 insertions(+), 23 deletions(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index d6dd71599d86..1cc5ce46c3bf 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -888,7 +888,8 @@ kern_setgroups(struct thread *td, int *ngrpp, gid_t *groups) ngrp = *ngrpp; } newcred = crget(); - crextend(newcred, ngrp); + if (ngrp != 0) + crextend(newcred, ngrp); PROC_LOCK(p); oldcred = crcopysafe(p, newcred); @@ -2226,6 +2227,13 @@ crcopy(struct ucred *dest, struct ucred *src) bcopy(&src->cr_startcopy, &dest->cr_startcopy, (unsigned)((caddr_t)&src->cr_endcopy - (caddr_t)&src->cr_startcopy)); + /* + * Avoids an assertion in crsetgroups() -> crextend(). Ideally, + * 'cr_ngroups' should be moved out of 'struct ucred''s bcopied area, + * but this would break the ABI, so is deferred until there is a real + * need to change the ABI. + */ + dest->cr_ngroups = 0; dest->cr_flags = src->cr_flags; crsetgroups(dest, src->cr_ngroups, src->cr_groups); uihold(dest->cr_uidinfo); @@ -2361,45 +2369,48 @@ crcopysafe(struct proc *p, struct ucred *cr) } /* - * Extend the passed in credential to hold n items. + * Extend the passed-in credentials to hold n groups. + * + * Must not be called after groups have been set. */ void crextend(struct ucred *cr, int n) { - int cnt; + size_t nbytes; MPASS2(cr->cr_ref == 1, "'cr_ref' must be 1 (referenced, unshared)"); + MPASS2(cr->cr_ngroups == 0, "groups on 'cr' already set!"); + groups_check_positive_len(n); + groups_check_max_len(n); - /* Truncate? */ if (n <= cr->cr_agroups) return; + nbytes = n * sizeof(gid_t); + if (nbytes < n) + panic("Too many groups (memory size overflow)! " + "Computation of 'kern.ngroups' should have prevented this, " + "please fix it. In the meantime, reduce 'kern.ngroups'."); + /* - * We extend by 2 each time since we're using a power of two - * allocator until we need enough groups to fill a page. - * Once we're allocating multiple pages, only allocate as many - * as we actually need. The case of processes needing a - * non-power of two number of pages seems more likely than - * a real world process that adds thousands of groups one at a - * time. + * We allocate a power of 2 larger than 'nbytes', except when that + * exceeds PAGE_SIZE, in which case we allocate the right multiple of + * pages. We assume PAGE_SIZE is a power of 2 (the call to roundup2() + * below) but do not need to for sizeof(gid_t). */ - if ( n < PAGE_SIZE / sizeof(gid_t) ) { - if (cr->cr_agroups == 0) - cnt = MAX(1, MINALLOCSIZE / sizeof(gid_t)); - else - cnt = cr->cr_agroups * 2; - - while (cnt < n) - cnt *= 2; + if (nbytes < PAGE_SIZE) { + if (!powerof2(nbytes)) + /* fls*() return a bit index starting at 1. */ + nbytes = 1 << flsl(nbytes); } else - cnt = roundup2(n, PAGE_SIZE / sizeof(gid_t)); + nbytes = roundup2(nbytes, PAGE_SIZE); /* Free the old array. */ if (cr->cr_groups != cr->cr_smallgroups) free(cr->cr_groups, M_CRED); - cr->cr_groups = malloc(cnt * sizeof(gid_t), M_CRED, M_WAITOK | M_ZERO); - cr->cr_agroups = cnt; + cr->cr_groups = malloc(nbytes, M_CRED, M_WAITOK | M_ZERO); + cr->cr_agroups = nbytes / sizeof(gid_t); } /* diff --git a/sys/sys/ucred.h b/sys/sys/ucred.h index 8e041bb7bcbd..cd07ec3be445 100644 --- a/sys/sys/ucred.h +++ b/sys/sys/ucred.h @@ -75,6 +75,10 @@ struct ucred { uid_t cr_uid; /* effective user id */ uid_t cr_ruid; /* real user id */ uid_t cr_svuid; /* saved user id */ + /* + * XXXOC: On the next ABI change, please move 'cr_ngroups' out of the + * copied area (crcopy() already copes with this change). + */ int cr_ngroups; /* number of groups */ gid_t cr_rgid; /* real group id */ gid_t cr_svgid; /* saved group id */ @@ -82,7 +86,7 @@ struct ucred { struct uidinfo *cr_ruidinfo; /* per ruid resource consumption */ struct prison *cr_prison; /* jail(2) */ struct loginclass *cr_loginclass; /* login class */ - void *cr_pspare2[2]; /* general use 2 */ + void *cr_pspare2[2]; /* general use 2 */ #define cr_endcopy cr_label struct label *cr_label; /* MAC label */ gid_t *cr_groups; /* groups */ From nobody Fri Nov 15 10:49:00 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqYfh65q9z5d07H; Fri, 15 Nov 2024 10:49: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqYfh2g2kz4Wyf; Fri, 15 Nov 2024 10:49:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731667740; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ADJM8QDmTx/YG0QEUn6wis41hN8MfW9pVtT9dqWxuK8=; b=P4FbzKe/wNQXVKryL9/TjnGGKz9SBZAXfIWeCE8iDl7av3jQbEayQ7Glj7BjzaBDVg2SI+ 4/Qz3PuSpkeotcbAo+FaO6qDT5yOzckK7eU66wEWJizAjkwCt4PTxAIkwYqDsUrMkiaYZv FUB73Kg5FIqLblBomRBsjCX5SCccLx9lfTjjodb/l7MswoA6FIhdZe+wvMWIzehX3u861/ 3KvRK+ev6CUt5td89tustmmDjzZujEn0gzZ7uf5qR6xRM9aGycsAbfW52rhkYPOPJIyoJ0 VRiEkmo0tBicsavWhKOxm+eKNkcScfhdG9EBTwn8ZCBjPJTIZ95pcerXT4yprg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731667740; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ADJM8QDmTx/YG0QEUn6wis41hN8MfW9pVtT9dqWxuK8=; b=HW7IEv5a/uOC8kJUojRf4/8yjTnK/4eJZHZieo2Pa4A5yc+sRGlQH5YaEv5SsYR8wbBKRe 7i64cH69Y8Lq6iLT1isu2IaTNAY2XmCWs0107ak2uI21l6nlrTX1r6837alF4uNQTOPB4A z4uGHhUhG0mczZbgrD0tXcD6GvR4uCY3Ueg0e88IR9k/1prE/uYY0m3uV3FjOrxeKMrVDV eat2p5FsNQOHfvrgA1NrwROQ4P+tjM7iC1F/Gq9KJ9SA4bBdlql6od7ataBcewpH1IOHnr ks3wCh+mUYiEgPeD0+NcUKn/xDZOW18ZFp0NEfMGANlkr7BNsCdWIGgSkthfmQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731667740; a=rsa-sha256; cv=none; b=CZCYOhaTh7UBEkiDFkOkDyU6Fzo4VdOO6TlrYCJwOXvEA9BkGcsBZrvyrmDx+5ppJvgtN3 1prhtGwmPgCu2WFMZZo7clur5hm6RdHQXKbKcjCMfSj4QGXTI8dbR87SFR1Yx7Nqm64cH5 y1FSqzvgmI4dZLK/5Yg8wzDWiFfNA8tlR9/ZSP0Y/EqpHzeOYwZj4VL4UST/wz6UvorNOq 3UJ48TjYtVmfLzyzaMyNpnLgDHLW/cqTIieMI7U6Yr6xGXzKDjMVnTNK1UgTK10eKDehtM BMlhHkb4tLJb1Hh/c3KIleaQ/N0TMbao7BLo3uYG9bCXZxmHA8dF8jn/ImriaA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqYfh15SyzKQs; Fri, 15 Nov 2024 10:49:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AFAn0lu018075; Fri, 15 Nov 2024 10:49:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AFAn0lJ018072; Fri, 15 Nov 2024 10:49:00 GMT (envelope-from git) Date: Fri, 15 Nov 2024 10:49:00 GMT Message-Id: <202411151049.4AFAn0lJ018072@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: 9deb689a752d - stable/14 - cred: groupmember() and co.: Sanity check cred's groups (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 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9deb689a752ddb6398ea39f06b5ec35756450694 Auto-Submitted: auto-generated The branch stable/14 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=9deb689a752ddb6398ea39f06b5ec35756450694 commit 9deb689a752ddb6398ea39f06b5ec35756450694 Author: Olivier Certner AuthorDate: 2024-11-01 15:11:23 +0000 Commit: Olivier Certner CommitDate: 2024-11-15 10:47:42 +0000 cred: groupmember() and co.: Sanity check cred's groups (INVARIANTS) Leverage the normalization check functions introduced in the previous commit in all public-facing groups search functions to catch programming errors early. Approved by: markj (mentor) MFC after: 3 days (cherry picked from commit 634675067867090e538b08e62ff9b14d3ffae5a3) Approved by: markj (mentor) --- sys/kern/kern_prot.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index f3d8f2a235d5..d6dd71599d86 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1358,6 +1358,8 @@ bool group_is_supplementary(const gid_t gid, const struct ucred *const cred) { + groups_check_normalized(cred->cr_ngroups, cred->cr_groups); + /* * Perform a binary search of the supplementary groups. This is * possible because we sort the groups in crsetgroups(). @@ -1381,6 +1383,8 @@ groupmember(gid_t gid, const struct ucred *cred) if (cred->cr_ngroups == 0) return (false); + groups_check_positive_len(cred->cr_ngroups); + if (gid == cred->cr_groups[0]) return (true); @@ -1394,6 +1398,14 @@ groupmember(gid_t gid, const struct ucred *cred) bool realgroupmember(gid_t gid, const struct ucred *cred) { + /* + * Although the equality test on 'cr_rgid' below doesn't access + * 'cr_groups', we check for the latter's length here as we assume that, + * if 'cr_ngroups' is 0, the passed 'struct ucred' is invalid, and + * 'cr_rgid' may not have been filled. + */ + groups_check_positive_len(cred->cr_ngroups); + if (gid == cred->cr_rgid) return (true); From nobody Fri Nov 15 10:49:02 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqYfl0wp7z5cyqF; Fri, 15 Nov 2024 10:49: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqYfk4h8hz4X08; Fri, 15 Nov 2024 10:49:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731667742; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Tw+vm8OdCtBFbrid/ghRKxcZbKeh2SndpiU8EIQVrGo=; b=VspqJIcWX8AkZGkmxBV9y/fDVRzXVghPSYYf/GC7M6LGyY5YMtc5FfGox89A2ZDc8mrJOZ D5Ghyr8I3OiExShxUGSCvGhb5OC1cSflS5tdvkujSlaSO4uGXFv7FSvRPMOsShhtmemFEV kUUG191iFL3DJ235rCqvdB0M0q5XNowoFFoPQwnKzDvRrakq1t3Ti5ePTzcc83o6YCQ25q VSqUtHJZ5nBWAnw9q7jfyjWng/KbKu9pp9cDY1zhT7JtF/LyVn0tc774ZqP7rm2FqChPyd 9NL5XODGnHURGo8FfdVQG1wdmg10w9Bxdz3NbSqV90+LNG2cfsmQTXZAX8MIGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731667742; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Tw+vm8OdCtBFbrid/ghRKxcZbKeh2SndpiU8EIQVrGo=; b=tVkIjrarVM3tS4Jl4uTZ7gpg2DdbwS9TTap0UVvVVk0XpqfL2X1c6Xcbz6LJ8hIErfwOG4 C2ngMqr+J6Nq1mLWBum5fE63ikoXgtFayUYNwzhBoTqlqbGVgFHkt9vO9jePKhLgT+U6S7 wUXbLuyyruw4dIzaMkB7zYycUlhpcV4aM8ahOAdc3K+MScVtSI5EzpkcOfwy04wHUDCB3J Pyh/8j2jZzFWEMB2ZgWyc4llNiX7SX2lqN+3aMk7z+ig0q2n5h+O+eCeV+ogmq/p29UdeC W6kX8SAjs1WnjXchCqZL46uNG50wKRElwlYGHcqO241sYiA1F5ch2LfzU5Toeg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731667742; a=rsa-sha256; cv=none; b=ojfkKut61GViVf/vfZY5iX268QZsFG3vsaA8uuc6WdRP6WGnmucBg43s7R0etJ8kWTCeQv pg81hw6gXHh0G9q6i0Lfh6DVniycDxCJw44Qodf3qbO9kJ+eXdBEWQ1s8glHQQEYwC/U6P oS7dOdgChjWjddbZjtmr7rc2dxptfy+dCVUtk7TbnFDncOEnKNpJUERzaBtHIMhPIq3aZH B6v5GFTHktHVnnsvnxCZY/noRj9gQL7S/9lufku74L4woqp4YopPvGHkV9JcbvGNa87oH3 O2XokDXaAerIJnC9bJ7kcbXaIepfKxiEBpHBsukceU3wEIwkFpEW351GnBoHHA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqYfk2xy3zKSf; Fri, 15 Nov 2024 10:49:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AFAn2EV018150; Fri, 15 Nov 2024 10:49:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AFAn2F1018147; Fri, 15 Nov 2024 10:49:02 GMT (envelope-from git) Date: Fri, 15 Nov 2024 10:49:02 GMT Message-Id: <202411151049.4AFAn2F1018147@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: 13784bf22df3 - stable/14 - cred: New crsetgroups_fallback() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 13784bf22df357d2b944e719993f2d25d4324dd2 Auto-Submitted: auto-generated The branch stable/14 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=13784bf22df357d2b944e719993f2d25d4324dd2 commit 13784bf22df357d2b944e719993f2d25d4324dd2 Author: Olivier Certner AuthorDate: 2024-10-02 14:16:20 +0000 Commit: Olivier Certner CommitDate: 2024-11-15 10:47:42 +0000 cred: New crsetgroups_fallback() Similar to crsetgroups(), but allows an empty group array in input, treating it like a one-element array containing the passed fallback group. Approved by: markj (mentor) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D46917 (cherry picked from commit d4e0d4d92e010b74404bddc87c1a1e8dbcaa25dd) Approved by: markj (mentor) --- sys/kern/kern_prot.c | 18 ++++++++++++++++++ sys/sys/ucred.h | 2 ++ 2 files changed, 20 insertions(+) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 1cc5ce46c3bf..db07c265dc13 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -2498,6 +2498,24 @@ crsetgroups(struct ucred *cr, int ngrp, const gid_t *groups) groups_normalize(&cr->cr_ngroups, cr->cr_groups); } +/* + * Same as crsetgroups() but accepts an empty groups array. + * + * This function ensures that an effective GID is always present in credentials. + * An empty array is treated as a one-size one holding the passed effective GID + * fallback. + */ +void +crsetgroups_fallback(struct ucred *cr, int ngrp, const gid_t *groups, + const gid_t fallback) +{ + if (ngrp == 0) + /* Shortcut. */ + crsetgroups_internal(cr, 1, &fallback); + else + crsetgroups(cr, ngrp, groups); +} + /* * Get login name, if available. */ diff --git a/sys/sys/ucred.h b/sys/sys/ucred.h index cd07ec3be445..e7f8d7328dda 100644 --- a/sys/sys/ucred.h +++ b/sys/sys/ucred.h @@ -170,6 +170,8 @@ void crcowfree(struct thread *td); void cru2x(struct ucred *cr, struct xucred *xcr); void cru2xt(struct thread *td, struct xucred *xcr); void crsetgroups(struct ucred *cr, int ngrp, const gid_t *groups); +void crsetgroups_fallback(struct ucred *cr, int ngrp, const gid_t *groups, + const gid_t fallback); /* * Returns whether gid designates a primary group in cred. From nobody Fri Nov 15 10:49:03 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqYfm31smz5d07N; Fri, 15 Nov 2024 10:49: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqYfm0Rdcz4X4t; Fri, 15 Nov 2024 10:49:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731667744; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j1YEDJ0nMQ6Ns9VoSredmsouZET+V19+ClXvA3akus4=; b=nGrVSWXVMvM2/fKpdHkVnIKi6QnluFfH0GzaLDEYjU1Q0cuYSunaP7d/psLiAy5lyw1ArA swM6YzQJmKyksjbjK9iEcUrBVG+tat6sIWNL7f3TV+HEreyGDDK6+VFNP6S6+dI0dNMGAp 79B5uIW27nqMInjfnFVyfKh8wKWrArpmaKlK+nysRl2rMjtPT0NCu93AJyfFICgJ3EYlDt JPD3AJbQDqK8+o0hdez9jk/Xua2WC8xvziIpceGOz92mP+woBCXDg5z9iwKxq6uM4teEMf n82Mv9F25PeNjdQLvKSpFJzQETaW06JvSELVTS71AfihwDSj8Jv+KAx2L8NA/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731667744; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j1YEDJ0nMQ6Ns9VoSredmsouZET+V19+ClXvA3akus4=; b=rvJteVJqsrJha/kWxA89S7wb7nt2m8A7Igybba9kK3USCeHu7ALQXOkMRwxJLF7u0hYOdI vA7SZk2SDp5RdUL6NuRwvqHabuhW6UiteosuQafGd93AtfRfTHf5WI3iaUmKCETpXAMRUT PTF7mYKflT6gWS60cFlCOQnsF1bWbEb20A4UGR7jRUL31GhR6ET3D1GhJ6f4UElaeQGHQC tYGW66kARjjNBEGjqeojNwNCdjG7t1SScFhKHNHlDUo8orGl5VZfnniWqazfkm6iwXRDuD eZL2uq95a2qj+80d4Ko3S7Qe6kOX4VDLO8iDNohQfGBFOFhoeaulke7+LPW27A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731667744; a=rsa-sha256; cv=none; b=d5vqPd+tvaUF/13F73oXmodlaw8Mau7ltbC2FBbUfe8vVN92oqNHitwzEI66NfbPoAlE3b b2pw11xIHnCfujvmTlempINPKOsgvMBQgVihO4Z1+vvRjyTOkjDGmP0qjbr1Aoldc2z1vC wLuLdMfyNtyxAxHmXs3uEyF9g/Y3zcFABlRzDB+7gDW/EB5Meu6OSsQL6Gq81vounDVijw 9S/rO+sSPuRBVmzAIM69q6ixk3kcOtVDdcFSXHvuHqszDU7oMthymiQBpjgobskVXhjO0S gQNnD6jeylax8S/WAbJy8CI088RCBATXhgRZWeTbo2+ReZ80vOyvKqWJEe8aTQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqYfl4BQBzKj6; Fri, 15 Nov 2024 10:49:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AFAn35C018207; Fri, 15 Nov 2024 10:49:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AFAn385018204; Fri, 15 Nov 2024 10:49:03 GMT (envelope-from git) Date: Fri, 15 Nov 2024 10:49:03 GMT Message-Id: <202411151049.4AFAn385018204@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: 7b20967a1a17 - stable/14 - nfs, rpc: Ensure kernel credentials have at least one 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 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 7b20967a1a172c6398b7f1a56ec96440d78469d2 Auto-Submitted: auto-generated The branch stable/14 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=7b20967a1a172c6398b7f1a56ec96440d78469d2 commit 7b20967a1a172c6398b7f1a56ec96440d78469d2 Author: Olivier Certner AuthorDate: 2024-10-02 14:28:59 +0000 Commit: Olivier Certner CommitDate: 2024-11-15 10:47:43 +0000 nfs, rpc: Ensure kernel credentials have at least one group This fixes several bugs where some 'struct ucred' in the kernel, constructed from user input (via nmount(2)) or obtained from other servers (e.g., gssd(8)), could have an unfilled 'cr_groups' field and whose 'cr_groups[0]' (or 'cr_gid', which is an alias) was later accessed, causing an uninitialized access giving random access rights. Use crsetgroups_fallback() to enforce a fallback group when possible. For NFS, the chosen fallback group is that of the NFS server in the current VNET (NFSD_VNET(nfsrv_defaultgid)). There does not seem to be any sensible fallback available in rpc code (sys/rpc/svc_auth.c, svc_getcred()) on AUTH_UNIX (TLS or not), so just fail credential retrieval there. Stock NSS sources, rpc.tlsservd(8) or rpc.tlsclntd(8) provide non-empty group lists, so will not be impacted. Discussed with: rmacklem (by mail) Approved by: markj (mentor) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D46918 (cherry picked from commit cfbe7a62dc62e8a5d7520cb5eb8ad7c4a9418e26) Approved by: markj (mentor) --- sys/fs/nfs/nfs_commonport.c | 4 +++- sys/fs/nfs/nfs_commonsubs.c | 5 +++-- sys/fs/nfsserver/nfs_nfsdport.c | 6 +++++- sys/fs/nfsserver/nfs_nfsdsocket.c | 6 ++---- sys/kern/vfs_export.c | 12 ++++++++---- sys/rpc/rpcsec_gss/svc_rpcsec_gss.c | 2 +- sys/rpc/svc_auth.c | 8 ++++++-- 7 files changed, 28 insertions(+), 15 deletions(-) diff --git a/sys/fs/nfs/nfs_commonport.c b/sys/fs/nfs/nfs_commonport.c index 2db9af5b9ea9..11f31d1a0e9f 100644 --- a/sys/fs/nfs/nfs_commonport.c +++ b/sys/fs/nfs/nfs_commonport.c @@ -75,6 +75,7 @@ NFSD_VNET_DEFINE(struct nfsstatsv1 *, nfsstatsv1_p); NFSD_VNET_DECLARE(struct nfssockreq, nfsrv_nfsuserdsock); NFSD_VNET_DECLARE(nfsuserd_state, nfsrv_nfsuserd); +NFSD_VNET_DECLARE(gid_t, nfsrv_defaultgid); int nfs_pnfsio(task_fn_t *, void *); @@ -258,7 +259,8 @@ newnfs_copycred(struct nfscred *nfscr, struct ucred *cr) KASSERT(nfscr->nfsc_ngroups >= 0, ("newnfs_copycred: negative nfsc_ngroups")); cr->cr_uid = nfscr->nfsc_uid; - crsetgroups(cr, nfscr->nfsc_ngroups, nfscr->nfsc_groups); + crsetgroups_fallback(cr, nfscr->nfsc_ngroups, nfscr->nfsc_groups, + NFSD_VNET(nfsrv_defaultgid)); } /* diff --git a/sys/fs/nfs/nfs_commonsubs.c b/sys/fs/nfs/nfs_commonsubs.c index 9f0e98bc93ce..29f5a9569b12 100644 --- a/sys/fs/nfs/nfs_commonsubs.c +++ b/sys/fs/nfs/nfs_commonsubs.c @@ -4037,8 +4037,9 @@ nfssvc_idname(struct nfsd_idargs *nidp) */ cr = crget(); cr->cr_uid = cr->cr_ruid = cr->cr_svuid = nidp->nid_uid; - crsetgroups(cr, nidp->nid_ngroup, grps); - cr->cr_rgid = cr->cr_svgid = cr->cr_groups[0]; + crsetgroups_fallback(cr, nidp->nid_ngroup, grps, + NFSD_VNET(nfsrv_defaultgid)); + cr->cr_rgid = cr->cr_svgid = cr->cr_gid; cr->cr_prison = curthread->td_ucred->cr_prison; prison_hold(cr->cr_prison); #ifdef MAC diff --git a/sys/fs/nfsserver/nfs_nfsdport.c b/sys/fs/nfsserver/nfs_nfsdport.c index 767bdcd80709..84b579def954 100644 --- a/sys/fs/nfsserver/nfs_nfsdport.c +++ b/sys/fs/nfsserver/nfs_nfsdport.c @@ -3293,7 +3293,11 @@ nfsd_excred(struct nfsrv_descript *nd, struct nfsexstuff *exp, NFSVNO_EXPORTANON(exp) || (nd->nd_flag & ND_AUTHNONE) != 0) { nd->nd_cred->cr_uid = credanon->cr_uid; - nd->nd_cred->cr_gid = credanon->cr_gid; + /* + * 'credanon' is already a 'struct ucred' that was built + * internally with calls to crsetgroups_fallback(), so + * we don't need a fallback here. + */ crsetgroups(nd->nd_cred, credanon->cr_ngroups, credanon->cr_groups); } else if ((nd->nd_flag & ND_GSS) == 0) { diff --git a/sys/fs/nfsserver/nfs_nfsdsocket.c b/sys/fs/nfsserver/nfs_nfsdsocket.c index df0c0edd1b59..d1b6198ba0e1 100644 --- a/sys/fs/nfsserver/nfs_nfsdsocket.c +++ b/sys/fs/nfsserver/nfs_nfsdsocket.c @@ -1422,13 +1422,11 @@ static struct ucred * nfsrv_createrootcred(void) { struct ucred *cr; - gid_t grp; cr = crget(); cr->cr_uid = cr->cr_ruid = cr->cr_svuid = UID_ROOT; - grp = GID_WHEEL; - crsetgroups(cr, 1, &grp); - cr->cr_rgid = cr->cr_svgid = cr->cr_groups[0]; + crsetgroups_fallback(cr, 0, NULL, GID_WHEEL); + cr->cr_rgid = cr->cr_svgid = cr->cr_gid; cr->cr_prison = curthread->td_ucred->cr_prison; prison_hold(cr->cr_prison); #ifdef MAC diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c index 3ff9608b0614..4649a05665e5 100644 --- a/sys/kern/vfs_export.c +++ b/sys/kern/vfs_export.c @@ -63,6 +63,10 @@ #include #include +#include + +NFSD_VNET_DECLARE(gid_t, nfsrv_defaultgid); + static MALLOC_DEFINE(M_NETADDR, "export_host", "Export host address structure"); #if defined(INET) || defined(INET6) @@ -135,8 +139,8 @@ vfs_hang_addrlist(struct mount *mp, struct netexport *nep, np->netc_exflags = argp->ex_flags; np->netc_anon = crget(); np->netc_anon->cr_uid = argp->ex_uid; - crsetgroups(np->netc_anon, argp->ex_ngroups, - argp->ex_groups); + crsetgroups_fallback(np->netc_anon, argp->ex_ngroups, + argp->ex_groups, NFSD_VNET(nfsrv_defaultgid)); np->netc_anon->cr_prison = &prison0; prison_hold(np->netc_anon->cr_prison); np->netc_numsecflavors = argp->ex_numsecflavors; @@ -214,8 +218,8 @@ vfs_hang_addrlist(struct mount *mp, struct netexport *nep, np->netc_exflags = argp->ex_flags; np->netc_anon = crget(); np->netc_anon->cr_uid = argp->ex_uid; - crsetgroups(np->netc_anon, argp->ex_ngroups, - argp->ex_groups); + crsetgroups_fallback(np->netc_anon, argp->ex_ngroups, argp->ex_groups, + NFSD_VNET(nfsrv_defaultgid)); np->netc_anon->cr_prison = &prison0; prison_hold(np->netc_anon->cr_prison); np->netc_numsecflavors = argp->ex_numsecflavors; diff --git a/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c b/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c index 89526544639a..64038240ab37 100644 --- a/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c +++ b/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c @@ -538,7 +538,7 @@ rpc_gss_svc_getcred(struct svc_req *req, struct ucred **crp, int *flavorp) cr = client->cl_cred = crget(); cr->cr_uid = cr->cr_ruid = cr->cr_svuid = uc->uid; cr->cr_rgid = cr->cr_svgid = uc->gid; - crsetgroups(cr, uc->gidlen, uc->gidlist); + crsetgroups_fallback(cr, uc->gidlen, uc->gidlist, uc->gid); cr->cr_prison = curthread->td_ucred->cr_prison; prison_hold(cr->cr_prison); *crp = crhold(cr); diff --git a/sys/rpc/svc_auth.c b/sys/rpc/svc_auth.c index 86ce7d9aefd2..edb11426bd72 100644 --- a/sys/rpc/svc_auth.c +++ b/sys/rpc/svc_auth.c @@ -192,10 +192,12 @@ svc_getcred(struct svc_req *rqst, struct ucred **crp, int *flavorp) if ((xprt->xp_tls & (RPCTLS_FLAGS_CERTUSER | RPCTLS_FLAGS_DISABLED)) == RPCTLS_FLAGS_CERTUSER && flavor == AUTH_UNIX) { + if (xprt->xp_ngrps <= 0) + return (FALSE); cr = crget(); cr->cr_uid = cr->cr_ruid = cr->cr_svuid = xprt->xp_uid; crsetgroups(cr, xprt->xp_ngrps, xprt->xp_gidp); - cr->cr_rgid = cr->cr_svgid = xprt->xp_gidp[0]; + cr->cr_rgid = cr->cr_svgid = cr->cr_gid; cr->cr_prison = curthread->td_ucred->cr_prison; prison_hold(cr->cr_prison); *crp = cr; @@ -205,10 +207,12 @@ svc_getcred(struct svc_req *rqst, struct ucred **crp, int *flavorp) switch (flavor) { case AUTH_UNIX: xcr = (struct xucred *) rqst->rq_clntcred; + if (xcr->cr_ngroups <= 0) + return (FALSE); cr = crget(); cr->cr_uid = cr->cr_ruid = cr->cr_svuid = xcr->cr_uid; crsetgroups(cr, xcr->cr_ngroups, xcr->cr_groups); - cr->cr_rgid = cr->cr_svgid = cr->cr_groups[0]; + cr->cr_rgid = cr->cr_svgid = cr->cr_gid; cr->cr_prison = curthread->td_ucred->cr_prison; prison_hold(cr->cr_prison); *crp = cr; From nobody Fri Nov 15 10:49:05 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqYfp2kjbz5cyh0; Fri, 15 Nov 2024 10:49: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqYfn6g8bz4X5D; Fri, 15 Nov 2024 10:49:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731667745; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yMRcoijcmxiyd6++rV97m+Ua4oc8/lX1bqD5yZ1pLbc=; b=lVr1DrnyPi3Ee4HlYRLg+YTxuuqRBdi9TRq1morm8/TBWe7Gznqj7HteOjmtZG8TSIOZ/2 A45Si/cnZV+fDAONdWj81MQ+CG3KMTfeR8bLP4WtcJd5NfUxQot1XtMIo1dKmBO9nvFQgd 4G00XBsNgfs98NpH3OuGMyPscjckZjdrR8PtzSmfKPhO+aWZSX500wTuyvhZzpMbqPOC8Q AupY7qZhKIpQz4aGFdmshzxBN/MXrtGyj/6SrILI22hmnYQTc7f+8Hhq/q98iGZp8SV9lo fihn7soQwF1oJPNWI3/9brqH0LEcLUEgF/NnWTrHxoX5Nj+gY3JY9cDDzO2P8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731667745; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yMRcoijcmxiyd6++rV97m+Ua4oc8/lX1bqD5yZ1pLbc=; b=dnWnF7iJNS44Xj2GzxukmQZ7VCUNOl2X0z9ED0tt79u7irxW4S4/VHeGo3m6O30WdrsMFv T3OZUdNYwMcN2UMNn/6ixF597z69eeGHq/UX07j6/0cKZL7FwitgAnn9wtjNmbmPkFH6m6 sIQHM9mg8p2j8UVqBKK5r+CaviWFT8jJ4QYmVx8lQnB0sqqViMPaAColazASNc0KgFmJ2R YB8Jbj5b3ujpujLjGF+sdjHKubhEfuiqMPzG2/5lIJTAIWeHKehFQxn/xqXcq+oMOQLGCJ D36bdqg9RAwAMnQD0/fPXFyYkLvD/sGFLTizrShqR5RkVsK2FO8sCR8Z3m/FYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731667745; a=rsa-sha256; cv=none; b=oo1I3uKiMf+psUjYVRh2Xf3cFBsmFtePnjy6pysQA83MF4vyliFoQagRCRhC7ytC2L2SXF lqZAm/Lxxf14LPuOLPXhGCC4fCKkOah3otz8LPGyeiT4oVt/1YJwZVEQ4nSFhf3BqZRAFo i/jzUuVsAZcEtrypkY0XFLs6lAfipEUCVQLwWly7g+k7u7za5+0Qoi7SZ1RJ/7duM9quvE rK0G7dFG/seFUhI7k5OLMX1mfeorjwaZIc6OcRAdncHQ5j706cbcPhU7GmCd5nANisunkn ZBFXshWASBhML3gFQYcwF87RQVV9xgn5Z+T/uKe/la51VCpRv9Tb2STERcvLKg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqYfn64XbzKlH; Fri, 15 Nov 2024 10:49:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AFAn5PE018348; Fri, 15 Nov 2024 10:49:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AFAn5KB018345; Fri, 15 Nov 2024 10:49:05 GMT (envelope-from git) Date: Fri, 15 Nov 2024 10:49:05 GMT Message-Id: <202411151049.4AFAn5KB018345@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: 8c767de732e7 - stable/14 - nfs: Fallback to GID_NOGROUP on no groups List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8c767de732e700e62fb5578d91c57f17e1c0a3c1 Auto-Submitted: auto-generated The branch stable/14 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=8c767de732e700e62fb5578d91c57f17e1c0a3c1 commit 8c767de732e700e62fb5578d91c57f17e1c0a3c1 Author: Olivier Certner AuthorDate: 2024-11-03 10:26:37 +0000 Commit: Olivier Certner CommitDate: 2024-11-15 10:47:43 +0000 nfs: Fallback to GID_NOGROUP on no groups We cannot unconditionally access nfsd's VNET variables in 'sys/kern/vfs_export.c' nor 'sys/fs/nfsserver/nfs_nfsdsubs.c', as they may not have been compiled in depending on build options. So, forget about the extra mile of using the configured default group and use the hardcoded GID_NOGROUP (which differs only on systems running nfsuserd(8) and with a non-default GID for their "nogroup" group). Reported by: rpokala, bapt (MINIMAL compile breakup) Reported by: cy, David Wolfskill (panics caused by mountd(8)) Approved by: markj (mentor) Fixes: cfbe7a62dc62 ("nfs, rpc: Ensure kernel credentials have at least one group") (cherry picked from commit 5169d4307eb9c8b7bb0bd46d600012bcc12cbdae) Approved by: markj (mentor) --- sys/fs/nfs/nfs_commonport.c | 3 +-- sys/fs/nfs/nfs_commonsubs.c | 2 +- sys/kern/vfs_export.c | 9 +++------ 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/sys/fs/nfs/nfs_commonport.c b/sys/fs/nfs/nfs_commonport.c index 11f31d1a0e9f..0c94f4e7dc52 100644 --- a/sys/fs/nfs/nfs_commonport.c +++ b/sys/fs/nfs/nfs_commonport.c @@ -75,7 +75,6 @@ NFSD_VNET_DEFINE(struct nfsstatsv1 *, nfsstatsv1_p); NFSD_VNET_DECLARE(struct nfssockreq, nfsrv_nfsuserdsock); NFSD_VNET_DECLARE(nfsuserd_state, nfsrv_nfsuserd); -NFSD_VNET_DECLARE(gid_t, nfsrv_defaultgid); int nfs_pnfsio(task_fn_t *, void *); @@ -260,7 +259,7 @@ newnfs_copycred(struct nfscred *nfscr, struct ucred *cr) ("newnfs_copycred: negative nfsc_ngroups")); cr->cr_uid = nfscr->nfsc_uid; crsetgroups_fallback(cr, nfscr->nfsc_ngroups, nfscr->nfsc_groups, - NFSD_VNET(nfsrv_defaultgid)); + GID_NOGROUP); } /* diff --git a/sys/fs/nfs/nfs_commonsubs.c b/sys/fs/nfs/nfs_commonsubs.c index 29f5a9569b12..84dcf4385f9a 100644 --- a/sys/fs/nfs/nfs_commonsubs.c +++ b/sys/fs/nfs/nfs_commonsubs.c @@ -4038,7 +4038,7 @@ nfssvc_idname(struct nfsd_idargs *nidp) cr = crget(); cr->cr_uid = cr->cr_ruid = cr->cr_svuid = nidp->nid_uid; crsetgroups_fallback(cr, nidp->nid_ngroup, grps, - NFSD_VNET(nfsrv_defaultgid)); + GID_NOGROUP); cr->cr_rgid = cr->cr_svgid = cr->cr_gid; cr->cr_prison = curthread->td_ucred->cr_prison; prison_hold(cr->cr_prison); diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c index 4649a05665e5..96b4464436e3 100644 --- a/sys/kern/vfs_export.c +++ b/sys/kern/vfs_export.c @@ -42,6 +42,7 @@ #include #include +#include #include #include #include @@ -63,10 +64,6 @@ #include #include -#include - -NFSD_VNET_DECLARE(gid_t, nfsrv_defaultgid); - static MALLOC_DEFINE(M_NETADDR, "export_host", "Export host address structure"); #if defined(INET) || defined(INET6) @@ -140,7 +137,7 @@ vfs_hang_addrlist(struct mount *mp, struct netexport *nep, np->netc_anon = crget(); np->netc_anon->cr_uid = argp->ex_uid; crsetgroups_fallback(np->netc_anon, argp->ex_ngroups, - argp->ex_groups, NFSD_VNET(nfsrv_defaultgid)); + argp->ex_groups, GID_NOGROUP); np->netc_anon->cr_prison = &prison0; prison_hold(np->netc_anon->cr_prison); np->netc_numsecflavors = argp->ex_numsecflavors; @@ -219,7 +216,7 @@ vfs_hang_addrlist(struct mount *mp, struct netexport *nep, np->netc_anon = crget(); np->netc_anon->cr_uid = argp->ex_uid; crsetgroups_fallback(np->netc_anon, argp->ex_ngroups, argp->ex_groups, - NFSD_VNET(nfsrv_defaultgid)); + GID_NOGROUP); np->netc_anon->cr_prison = &prison0; prison_hold(np->netc_anon->cr_prison); np->netc_numsecflavors = argp->ex_numsecflavors; From nobody Fri Nov 15 10:49:04 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqYfn2gn0z5cygy; Fri, 15 Nov 2024 10:49: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqYfm68n0z4WwS; Fri, 15 Nov 2024 10:49:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731667744; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4CA9HjNJOAXrT3UeOfqfEgk/0cPfKtrlO3sexfMjoZo=; b=FeFkYnvMFw6ikMoQhzOvvVdPX9eCzFfOny7gdcGT6yZ+Ao6/fOV1vUfhsISzI0lVtwbyop rxOGAzkJ27vlIsMWNdpVtcrAP0NY0xtR3xTCHEr58QOhjtWlyUz91883M6Ml7jOb1bAI3H DljGCiYdG8WuYB3hM4vt3VGBHFZHHMErfBOuwD3fUCFyiBuUo+eWal7ohwAwFK1v5SFVLv HXVu6NtjmhK6GU7m4o9AK+ItIzWT4nJ9tzQHib/qAEVqbVuN2L8nOb251Jjd1GPpnZ5beO ekN4Ru+3KT2IgC+OIUoLx5+fwQjmbhbuk63NiYSw4MT8e/hMw0VIYuUb2XcK1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731667744; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4CA9HjNJOAXrT3UeOfqfEgk/0cPfKtrlO3sexfMjoZo=; b=fBhx3Yz7Be0sCgRHnGvnHbxW6FfFWnrNBIwmKs+I5ief9SnKllRjFAQ8hWVxe188ncAH6t FabkCnHt7JRmtHYAQfFZi7Px728rGcnkfQ13SeK3RT5uQoOqjBVlGXU2/+mZ9FMcRXIezQ dBZ2rbh7wxe8DpxOFHmq+5Xd/m/TKxFDqC+Fi/cztz7Awa8t0HwRMaeiUfZPKbu4ku9Xlg GKJy1jGIfZeDxThrhoNHcvWudrFhZHUJzXvWiGN6naijnoCMlsiORkjbBlAbPSvc8AbqCu su85aRiJ8rvyA0BHVYkeEUN3QYv8eglensyWFhuB15St1PVGphDEqkmHZTM8Gw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731667744; a=rsa-sha256; cv=none; b=FHsLGuvD7qTGEQEhOq5P7pof6wdaIJGbCEzE54YLHEMn3WsRhlqj2jFN9T2GMSWNU1wwiC EjTiosGzVDpP+bIM49P+mv2SfgW7EvnfY/bd97qltLzuEOmmOwUoZCt596WMECIz22q70b SKK84k+PoS/W2ycVbQfnDZFKWTAIwe/0DFqeRd/DILe4METB9eTNWvg33yOeG3yK9pGwmD gMb71HXk2SIjbICT/e0Ht/Q/bkJFpW2v5hJtLeSe3snlTDVNGBDnI19HDR43jo0sCkn5Kl kDWnwJw6S9ObiCPXwi4iuY7CJaZGwJ7EDw4c0vnRRH7R8YbxyWgMWKd7Kq0ltQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqYfm4yK3zKQt; Fri, 15 Nov 2024 10:49:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AFAn4RG018278; Fri, 15 Nov 2024 10:49:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AFAn4B1018275; Fri, 15 Nov 2024 10:49:04 GMT (envelope-from git) Date: Fri, 15 Nov 2024 10:49:04 GMT Message-Id: <202411151049.4AFAn4B1018275@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: 6cd8d025282f - stable/14 - cred: groupmember(): Remove tolerance for empty 'cr_groups' List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6cd8d025282f8c30e5db74806f7e94630ce57d8b Auto-Submitted: auto-generated The branch stable/14 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=6cd8d025282f8c30e5db74806f7e94630ce57d8b commit 6cd8d025282f8c30e5db74806f7e94630ce57d8b Author: Olivier Certner AuthorDate: 2024-11-01 16:12:15 +0000 Commit: Olivier Certner CommitDate: 2024-11-15 10:47:43 +0000 cred: groupmember(): Remove tolerance for empty 'cr_groups' This tolerance had been introduced in commit caa309c8811d ("nfsd: Fix handling of credentials with cr_ngroups == 0", on 2024/10/21). Now that NFS has been modified in the previous commit (cfbe7a62dc62, "nfs, rpc: Ensure kernel credentials have at least one group") to rule out credentials with empty 'cr_groups' (and thus, no 'cr_gid'), remove it back. This basically reverts the above-mentioned commit except for the not directly related modifications it contains, which are still valid. Discussed with: rmacklem (by mail) Approved by: markj (mentor) MFC after: 3 days (cherry picked from commit 3f313682e030f1c99d9b223093e84d0a53a109af) Approved by: markj (mentor) --- sys/kern/kern_prot.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index db07c265dc13..60452ddb6a48 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1377,13 +1377,6 @@ bool groupmember(gid_t gid, const struct ucred *cred) { - /* - * The nfsd server can use a credential with zero groups in it - * when certain mapped export credentials are specified via exports(5). - */ - if (cred->cr_ngroups == 0) - return (false); - groups_check_positive_len(cred->cr_ngroups); if (gid == cred->cr_groups[0]) From nobody Fri Nov 15 10:49:06 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqYfq5GFBz5d07S; Fri, 15 Nov 2024 10:49: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqYfq1NK7z4Wwn; Fri, 15 Nov 2024 10:49:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731667747; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cms8tnsOxLLYsz84NdMJW8EifNHcNly5ILpRHwyDdQ0=; b=HNp9hmpYLAoPWQuEfchpK2wXyV96iGtL9tsWlLi6KVUFNbhg2Vaoa8Sqzf+e9IGiFxsak6 W6DhKBOMiUgKkJhZMAwsYaXLT8kMiB1pfr/3j0LyFvNPqIGVD85WLsbVRvczBbOuFVe4ZF 5Z9wvBap0/WSOLJHb0mIM2VpLvWE8fPmq3qD6qELdz6YTBLd0o+/9/fvF6mQasPZ6yeZ6r uvEoQNiU25dLW0Fu3y8Fl65OpZZA4lRN1pEhjdB3W8moxxvFYpMDVSS/GcbaY3gBV3H6zj HuiK3SQwSQPB8/7sOFkddB2S+B+zh/DDeNxGA/JOVGx+w+sNuOZYBIk81th0Vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731667747; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cms8tnsOxLLYsz84NdMJW8EifNHcNly5ILpRHwyDdQ0=; b=YNLgMsrV0MdLy2xQOt+ko0G66hub/MP6x92yEjawnLNi8UAugpK3YtGZeVqZ7JMGlz+ddI UKgZaN1sMUdQy7NEQZCzcos6VHLxr4KRmppr6lRjgl+D+GJ4YMjEpKXKuyGf3pUtHafZDl zcDPHeHZH2/MDMpsTk5NIy25cfGFJ5RZnUdOlH2mdoXrTDXvvFwvGujcY5Xf9Q1h+HORt7 b2gpjbk7y0HV6R1CRP5w6YTnE5dFBgqGBLY2xTT7mDO0IdqyhZAJGdTYanz7H2nb394wK+ v/QjME7kim6GfhhPJVAkHdZ6Mg8jy/govarDf4M6xzFF82eWNcmC6QyKNMJwOg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731667747; a=rsa-sha256; cv=none; b=DfJd2dSgzdXe9NiWu5qm6sOTybU5gH7Z3UlVm9WjQkCAHBBggULxdRxXtlCKsR7E4M3t8Q pif2XGwYawhggL2NKSiSJuryxljjCvdWk208aTCil5m0UW1gXAMHDWugui8xWUmHTCHH2V f4t2LuSjv83QcRb1c325c/xGayFcyoXbsfsuh0JWeUfrnEGCEpThe/wS4hhdjFtXZYkyuF E13lznchZjkZ0fPBxLSvpiSWsCRgXTgqxt7JTzFJedB7+X1u6pRespE+/MpE0GaWTzPqZY uMlvu4esrp/CRmUuq0IamAXFIPaPGonrxI7wuTQfqRpL/crTqNIAV1mxdLH0AA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqYfq04J7zKlJ; Fri, 15 Nov 2024 10:49:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AFAn66S018406; Fri, 15 Nov 2024 10:49:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AFAn6i9018403; Fri, 15 Nov 2024 10:49:06 GMT (envelope-from git) Date: Fri, 15 Nov 2024 10:49:06 GMT Message-Id: <202411151049.4AFAn6i9018403@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: 9ee0b40e4a51 - stable/14 - cred: crsetgroups(): Throw away old groups before crextend() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9ee0b40e4a5198bd6e17c0d7b4251f5fc9d59add Auto-Submitted: auto-generated The branch stable/14 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=9ee0b40e4a5198bd6e17c0d7b4251f5fc9d59add commit 9ee0b40e4a5198bd6e17c0d7b4251f5fc9d59add Author: Olivier Certner AuthorDate: 2024-11-03 18:04:02 +0000 Commit: Olivier Certner CommitDate: 2024-11-15 10:47:43 +0000 cred: crsetgroups(): Throw away old groups before crextend() Now that crextend() asserts that groups are not set (rightfully so, since it may change the backing storage without copying the content of the old one), have crsetgroups() throw away the old groups before calling it, as it installs an entirely new set anyway. This allows to reuse unshared credentials by resetting their groups set, as NFS exports actually do. Reported by: cy Tested by: cy Fixes: ea26c0e79752 ("cred: crextend(): Harden, simplify") Pointy hat to: olce While here, as I forgot these credits in commit 5169d4307eb9 ("nfs: Fallback to GID_NOGROUP on no groups"): Tested by: cy, David Wolfskill (panics caused by mountd(8)) Tested by: kib (MINIMAL/custom kernel compile breakup) (cherry picked from commit 169a10853a50f9bbb037492e6f2737cce10f6b99) Approved by: markj (mentor) --- sys/kern/kern_prot.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 60452ddb6a48..85c38c474df5 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -2217,16 +2217,14 @@ void crcopy(struct ucred *dest, struct ucred *src) { + /* + * Ideally, 'cr_ngroups' should be moved out of 'struct ucred''s bcopied + * area, but this would break the ABI, so is deferred until there is + * a compelling need to change it. + */ bcopy(&src->cr_startcopy, &dest->cr_startcopy, (unsigned)((caddr_t)&src->cr_endcopy - (caddr_t)&src->cr_startcopy)); - /* - * Avoids an assertion in crsetgroups() -> crextend(). Ideally, - * 'cr_ngroups' should be moved out of 'struct ucred''s bcopied area, - * but this would break the ABI, so is deferred until there is a real - * need to change the ABI. - */ - dest->cr_ngroups = 0; dest->cr_flags = src->cr_flags; crsetgroups(dest, src->cr_ngroups, src->cr_groups); uihold(dest->cr_uidinfo); @@ -2486,6 +2484,13 @@ crsetgroups(struct ucred *cr, int ngrp, const gid_t *groups) if (ngrp > ngroups_max + 1) ngrp = ngroups_max + 1; + /* + * crextend() asserts that groups are not set, as it may allocate a new + * backing storage without copying the content of the old one. Since we + * are going to install a completely new set anyway, signal that we + * consider the old ones thrown away. + */ + cr->cr_ngroups = 0; crextend(cr, ngrp); crsetgroups_internal(cr, ngrp, groups); groups_normalize(&cr->cr_ngroups, cr->cr_groups); From nobody Fri Nov 15 13:00:42 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqcZf3nKtz5d6cR; Fri, 15 Nov 2024 13:00: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqcZf381jz4pJc; Fri, 15 Nov 2024 13:00:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731675642; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4DHMSHr3iGzph+UWxdlgXUP0fir669qhwb0oucsxlQs=; b=dH6LKif7Q7K414KixCzywDWinN7ypvrtX8bhczNUYzpKsy6Qx4rz0qrtnD+rxczWsg7pBd D9/E3BTTsYnFUgvrTYwxZZ1uo+43mzQOgluBmrjH1BUb3s+sQ8u6NIBZsQEFERifzy5+7l vk9aHSADEKADslfp6Xmv+35/hJYxw++EH8/bmaFpMrL2WdsHKgL5RwQgVq32u+WjkB5QcI yu999RNYfCjvXyF3l87pC5O7uiCOLH/7v8p7u9OlmIUUIJ18M7U49MhXTtCjHG6LfFJthl yXGfb7dLQjubYmlteZHzBxDFlyQJLpA9frIQkf+aQmbPkQfoAJphKa6kgrxl8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731675642; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4DHMSHr3iGzph+UWxdlgXUP0fir669qhwb0oucsxlQs=; b=tDWrY0EcklX4IX4CVlluY+eoU0gHtybdr2WX8pJX+YooGAoABTXsLbjSKU4GOctViZk/Pm kvqYypdjjxLZnq+Jr1nUBYdII9e4ookfVs2+24YpBSnU6wTWE1f55NV0s4gQt7IWbnzCoL JUBtth5gyMkMuLOaY/oxz3SMRpnj0Nqz57hxpZ2QqKkjmluJLdJnruU+f+bbHtG4jSxxeJ gVU5BrjNzsxgatT/Fc3BDZyQONKdDHP1veNGTh9+qFHiufQ0ai8/mm1h30PfVLipn6+MVs 35HhcOg8hLzF44XwBeWjmsBT6h1lZOXLredsl9buFzLjTIBq0F3+XeQrmF+mIQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731675642; a=rsa-sha256; cv=none; b=yjEt+Sg6MwR3I/m5ZLlcpQsX8t1UtAISM36OTOuO7WFQcG6MJjL3Q03QTBuu01/qP1TTfD OqxrnTjyH28RHeYEkCZ34VTAVtFX8FpewIPiT8ak10ryfm3bKUcPRIJeSTY1VzmcYY6Dfb a0RlH/1XnBSV2xZQzOrxry1S3nxR1hvcXV8K9Z3y8xy4XPTPJCZnDq8rdjDGdCgaXz9mL1 tN//o09ZthPc6OSqdjLDZUOiHWVCEGBzsXZ15BUp5uBPI8aDngZgGyLd/24VMYcMUpJchK GxoFRI4LSHQb9uomZuxDdVFIF7FFrtxqroFTmSZD6v6k4GryQmCrtdL+NrCcLQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqcZf2cKGzN8r; Fri, 15 Nov 2024 13:00:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AFD0g9M069737; Fri, 15 Nov 2024 13:00:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AFD0gLE069734; Fri, 15 Nov 2024 13:00:42 GMT (envelope-from git) Date: Fri, 15 Nov 2024 13:00:42 GMT Message-Id: <202411151300.4AFD0gLE069734@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: 9d0d6174840a - stable/13 - cred: supplementary_group_member() => group_is_supplementary() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9d0d6174840a124271a11f2cbd22f6664f9f7fcf Auto-Submitted: auto-generated The branch stable/13 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=9d0d6174840a124271a11f2cbd22f6664f9f7fcf commit 9d0d6174840a124271a11f2cbd22f6664f9f7fcf Author: Olivier Certner AuthorDate: 2024-07-16 20:55:53 +0000 Commit: Olivier Certner CommitDate: 2024-11-15 12:59:03 +0000 cred: supplementary_group_member() => group_is_supplementary() The new name seems more immediately descriptive. While here, constify its signature ('struct ucred' isn't modified). While here, replace "supplemental" => "supplementary" in some comments. No functional change (intended). Reviewed by: mhorne, emaste Approved by: markj (mentor) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D46906 (cherry picked from commit 2e031fd0719b567e66198bc76c8a1c6c9b7f2920) Approved by: markj (mentor) --- sys/kern/kern_prot.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index abe989045fb8..c80db8efeee8 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1276,13 +1276,13 @@ sys___setugid(struct thread *td, struct __setugid_args *uap) * Returns whether gid designates a supplementary group in cred. */ static int -supplementary_group_member(gid_t gid, struct ucred *cred) +group_is_supplementary(const gid_t gid, const struct ucred *const cred) { int l, h, m; /* - * Perform a binary search of the supplemental groups. This is possible - * because we sort the groups in crsetgroups(). + * Perform a binary search of the supplementary groups. This is + * possible because we sort the groups in crsetgroups(). */ l = 1; h = cred->cr_ngroups; @@ -1316,7 +1316,7 @@ groupmember(gid_t gid, struct ucred *cred) if (cred->cr_groups[0] == gid) return (1); - return (supplementary_group_member(gid, cred)); + return (group_is_supplementary(gid, cred)); } /* @@ -1329,7 +1329,7 @@ realgroupmember(gid_t gid, struct ucred *cred) if (gid == cred->cr_rgid) return (1); - return (supplementary_group_member(gid, cred)); + return (group_is_supplementary(gid, cred)); } /* @@ -2324,7 +2324,7 @@ crextend(struct ucred *cr, int n) /* * Copy groups in to a credential, preserving any necessary invariants. - * Currently this includes the sorting of all supplemental gids. + * Currently this includes the sorting of all supplementary gids. * crextend() must have been called before hand to ensure sufficient * space is available. */ From nobody Fri Nov 15 13:00:43 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqcZg5LY6z5d6gL; Fri, 15 Nov 2024 13:00: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqcZg4K9kz4ntB; Fri, 15 Nov 2024 13:00:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731675643; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uWooGjbu2FGS+1agvTJQ4MMcDpY7wyAw/IL0npQ5FQU=; b=wTsDp/mIvthdwsb1X9I608Og105F6ky53pSN9JCTHlY1w/6U/gXh/XLTkGS25ubRC+Vg5e IUMqnY+ZYjSK7IqPHf10424swkwDKmzp7AkCdCZnr7VBA1CBrhH8oZ1/5VGVO4r0QZfMqM xJYrW/+jCTiLPbG5f5Anj7lGi7RwxUwKaSf5pMYrHERIAhaH6WSiY3BK9mEP7ffIlDgc+O PbOptVGo4Hi5aZxwTTqJoJHPuw+OfCInWMoJvCi+KaiSsI183rfPzZ0aEB7g7NbUGOgKNL jdTf+ca30kd57quyWgXOEsNDzEEyyTkoyjfWHMzjZq2bnPn5naIOewz4BA3pEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731675643; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uWooGjbu2FGS+1agvTJQ4MMcDpY7wyAw/IL0npQ5FQU=; b=c6oEOTbnshin2Po1HXRCurWm70ol/8mVwpZ1XoxMiemMfWc/lhdPib1pm3gYP1aY9Tu3YE 1op6zMsP/fk2O5T2ZEHrpp5eVd7B4wxwZqKoTEl/jPh7sn+ldO2kRGqNjvElnX04KxOyfx VtjB4HfWRW53vqxABSoBIQrs+pCCJOJmIHhVOUwGFi6aTk5BRDgzqWH/e86lB4cwirCytB UlY4F0VnjwaAL47SfIvuA6mn2jANS/opFvhXGZLdYvufWcZ/nmUV0zne8l7gVaOTwjp3YF MoH1EJWXlDmrDxikyd11fj2UuXuI4chJJJN2MNce0j/NMwSkKjJ2r5gIAM8wqw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731675643; a=rsa-sha256; cv=none; b=eivPYLlykBHRn4mUdgDPv9d9LBaFMi017jyea5f/wNAfA1xFSlol6o0xOCXaG2Nj9boz44 m0oBrcnHIA4aCLPGKW5jklylpTAcN1RQ4SGcRDj+nHD3r/lRfOuyWs5+9oVZHU2ncbF0uG m5MyOs8kOe8BtOsEZpFNFkP7qPZBt9C60+HqhJfE1PLQ/Stlp38zeHQMx46fE5eAsYq2WZ bhOCUeYZBK1aR1/VruG6Irx5AVIkkcaynykiz0jMMmW8+rz/Vbd1AGORRp9RADGx1d15wJ wdKV2k0gJ05iXrOyKilfzf4Vu5oSGP9jjBP8a1/UJzLGS8Mt0q5zvU3PpMHwQg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqcZg3chCzNvM; Fri, 15 Nov 2024 13:00:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AFD0he4069786; Fri, 15 Nov 2024 13:00:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AFD0hqw069783; Fri, 15 Nov 2024 13:00:43 GMT (envelope-from git) Date: Fri, 15 Nov 2024 13:00:43 GMT Message-Id: <202411151300.4AFD0hqw069783@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: 5e0787bf710f - stable/13 - cred: Constify signature of groupmember() and realgroupmember() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 5e0787bf710f1e8c0ae186a32ff39fa2c3ded25d Auto-Submitted: auto-generated The branch stable/13 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=5e0787bf710f1e8c0ae186a32ff39fa2c3ded25d commit 5e0787bf710f1e8c0ae186a32ff39fa2c3ded25d Author: Olivier Certner AuthorDate: 2024-10-30 10:59:49 +0000 Commit: Olivier Certner CommitDate: 2024-11-15 12:59:07 +0000 cred: Constify signature of groupmember() and realgroupmember() Reviewed by emaste Approved by: markj (mentor) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D47343 (cherry picked from commit b15110fb0dc6f0480482616f22bda3a2a19fbd80) Approved by: markj (mentor) --- share/man/man9/groupmember.9 | 6 +++--- sys/kern/kern_prot.c | 4 ++-- sys/sys/ucred.h | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/share/man/man9/groupmember.9 b/share/man/man9/groupmember.9 index ae7ccd477955..ea1a7fdbebd4 100644 --- a/share/man/man9/groupmember.9 +++ b/share/man/man9/groupmember.9 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.Dd August 18, 2023 +.Dd October 31, 2024 .Dt GROUPMEMBER 9 .Os .Sh NAME @@ -35,9 +35,9 @@ .In sys/param.h .In sys/ucred.h .Ft int -.Fn groupmember "gid_t gid" "struct ucred *cred" +.Fn groupmember "gid_t gid" "const struct ucred *cred" .Ft int -.Fn realgroupmember "gid_t gid" "struct ucred *cred" +.Fn realgroupmember "gid_t gid" "const struct ucred *cred" .Sh DESCRIPTION The .Fn groupmember diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index c80db8efeee8..0ec3df305048 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1303,7 +1303,7 @@ group_is_supplementary(const gid_t gid, const struct ucred *const cred) * supplementary groups). */ int -groupmember(gid_t gid, struct ucred *cred) +groupmember(gid_t gid, const struct ucred *cred) { /* @@ -1324,7 +1324,7 @@ groupmember(gid_t gid, struct ucred *cred) * groups). */ int -realgroupmember(gid_t gid, struct ucred *cred) +realgroupmember(gid_t gid, const struct ucred *cred) { if (gid == cred->cr_rgid) return (1); diff --git a/sys/sys/ucred.h b/sys/sys/ucred.h index 837c33757317..74e2d59c57ea 100644 --- a/sys/sys/ucred.h +++ b/sys/sys/ucred.h @@ -158,8 +158,8 @@ void crcowfree(struct thread *td); void cru2x(struct ucred *cr, struct xucred *xcr); void cru2xt(struct thread *td, struct xucred *xcr); void crsetgroups(struct ucred *cr, int n, gid_t *groups); -int groupmember(gid_t gid, struct ucred *cred); -int realgroupmember(gid_t gid, struct ucred *cred); +int groupmember(gid_t gid, const struct ucred *cred); +int realgroupmember(gid_t gid, const struct ucred *cred); #endif /* _KERNEL */ #endif /* !_SYS_UCRED_H_ */ From nobody Fri Nov 15 13:00:44 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqcZj0CFmz5d6ws; Fri, 15 Nov 2024 13:00: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqcZh5T0Xz4pGs; Fri, 15 Nov 2024 13:00:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731675644; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Lh+OQWWjhOAu2jnKsV/yp6WfqGFHpVkN485dpD44Sz8=; b=PT7TzuEIP5wW8fgmhRMki1YCKi/k9+hOoA0SrB1lhVBbyGlSQtbWssS0Xyr0HjHI34IRJp C3CQ0mxnrw4RoqfmNoq0x/NVnWopLk4K54c3i2Q/tFB+peHQ68hduvUGr9/cZ5/4DMvZTU ODRu5rMV6WAl9cpBjabuQvhgUElKYGRkVH3RfzHIit5HaCQ0tVu8Ys/m4Mv897wdVSJO9i H9XwbjJ4yv9mLXEjHheQz5pQIQ5oR8Gr64horyZ0KXJjduPWUKltIJjfAf3lIU94D9B7Qp QD8zOH7P+jxOQoBBYUlCdcuwGKzGt5/2fXXOvl0KzyR64gKxB7+GZ3sos42bOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731675644; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Lh+OQWWjhOAu2jnKsV/yp6WfqGFHpVkN485dpD44Sz8=; b=ePYOlSQjtViH7fVefN5Ko799Vkm4h5FG8j5NalmQQBwSGyxbp8h8LDWARepdTXhTidrVSq nWQJuYF5Z7VD1BYRa51dEXrWSYCZKRKqi5AFG4NuLlrcpsa8wfeY3ckMwKcSDQuBWRSTP3 Atm8W6xi3AvM6lsUusLbrCrsA8Lay5SxHHRZKDLOuVpl0EGs2PmPtUjR278i7k+TQpPE5Q BMmXlLHK3l3M5zgf+B6JETBiWVIULThiNCNnxY2TsUdFzGGmd+NNUx8xF05ijTh0QdasCM T1GOrl++/ooFhjU7o5tRxj9d0azOdAvOx3H/uJnFuau0w7JSiusLBQxPbRNawA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731675644; a=rsa-sha256; cv=none; b=UsXZbd4TyZxsQtdxw1ElSSloruEgk0jrc47j0swhKVffOv7x6mfqRD5WuyMPYHvX6DAYXR tKFUgcq7ka1p5v04mmBX88wBSaGgKjwlyk+gofJzPkQTOleqxknoCvpmwluIw8UPbnpN7b 9RVMgEh0AoLFKGzprRaw+EYpJRhHwUi18FJZTwFoWx81z75q5TIjnPPwGbzi6nFPavaKkH nnw4aTsZVNNOaGtJm62dL95LBN7r3h2DWHnWfhi1JyX4Sxsc+umRCPUc/5cDBV7HnDutn2 wK82e4xpj/nqtmvJ67HneHA73qPH0KuQSUtuTHze/XzyHlNga7Bje4r2r2ey8w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqcZh4ZC8zN8s; Fri, 15 Nov 2024 13:00:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AFD0iI3069837; Fri, 15 Nov 2024 13:00:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AFD0iR5069834; Fri, 15 Nov 2024 13:00:44 GMT (envelope-from git) Date: Fri, 15 Nov 2024 13:00:44 GMT Message-Id: <202411151300.4AFD0iR5069834@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: 0c835785ebe4 - stable/13 - cred: group_is_supplementary(): Use bsearch() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 0c835785ebe48f6033d8f0007b00b659d4dd3a22 Auto-Submitted: auto-generated The branch stable/13 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=0c835785ebe48f6033d8f0007b00b659d4dd3a22 commit 0c835785ebe48f6033d8f0007b00b659d4dd3a22 Author: Olivier Certner AuthorDate: 2024-07-19 11:23:19 +0000 Commit: Olivier Certner CommitDate: 2024-11-15 12:59:07 +0000 cred: group_is_supplementary(): Use bsearch() This makes that function use a more efficient version of binary search instead, and removes one more hand-rolled binary search code from the tree (and the kernel binary). Reviewed by: mhorne, emaste Approved by: markj (mentor) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D46907 (cherry picked from commit 372605478c6fe2c628f25428af201f866d7eb015) Approved by: markj (mentor) --- sys/kern/kern_prot.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 0ec3df305048..eb4910e1591a 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -52,6 +52,7 @@ #include #include #include +#include #include #include #include @@ -828,6 +829,15 @@ sys_setgroups(struct thread *td, struct setgroups_args *uap) return (error); } +static int +gidp_cmp(const void *p1, const void *p2) +{ + const gid_t g1 = *(const gid_t *)p1; + const gid_t g2 = *(const gid_t *)p2; + + return ((g1 > g2) - (g1 < g2)); +} + int kern_setgroups(struct thread *td, u_int ngrp, gid_t *groups) { @@ -1278,24 +1288,13 @@ sys___setugid(struct thread *td, struct __setugid_args *uap) static int group_is_supplementary(const gid_t gid, const struct ucred *const cred) { - int l, h, m; /* * Perform a binary search of the supplementary groups. This is * possible because we sort the groups in crsetgroups(). */ - l = 1; - h = cred->cr_ngroups; - - while (l < h) { - m = l + (h - l) / 2; - if (cred->cr_groups[m] < gid) - l = m + 1; - else - h = m; - } - - return (l < cred->cr_ngroups && cred->cr_groups[l] == gid); + return (bsearch(&gid, cred->cr_groups + 1, cred->cr_ngroups - 1, + sizeof(gid), gidp_cmp) != NULL); } /* From nobody Fri Nov 15 13:00:45 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqcZk1Ml0z5d6gN; Fri, 15 Nov 2024 13:00: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqcZj6DHcz4pPS; Fri, 15 Nov 2024 13:00:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731675645; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7TwaaDC8XGUpgbUpeCBS2sgzfII1NFb/bBh2bQHFMxc=; b=GlW+8cuXcRf1Yv2UxfrdIphDZ9camDHwzKii6J8PaUISb2cHoC6U5Gq4X84oDYs3QqXBzQ dIow14NfeaywufloKHl+NqzYyB9VnphWd/jsjq9SzcW8G7U56X56zkc45e83OIdIXUJQzB 1Xi3YX22ediOW4rNOCSyI9u22awe9oUmU4dXFmg18PR873xC9Y9khjHaaeHwGcyJRJUFd+ lBs3O5svLolwN8rBHix8MBdsxb6pxj9WibNstJVOwVde2CmJ9ZwfxIkL+gYKOmnZiQ+0tS +oFJJ/EMN3MKF7Aurzx9JcDVyBI+KYTZdRnSTZMKiKOP14Nnl11yQapdGJTI5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731675645; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7TwaaDC8XGUpgbUpeCBS2sgzfII1NFb/bBh2bQHFMxc=; b=wQxihQ/czNN35lYGwe5hfzdaBWdwf8zCNQnUyUksu5HEjbFbuROf0XhloiAYqPZ0XPGYCL QHn7v60dt8OZjylr3tv+spsMR+u8ELrZRRiYAfdKiULbqQbgPINHjuiee82mlEtd/9AxCj ORXgVpOEkmGVX/JD82LmBRS3AnNKaf/5CfTh2nPbeDHO5af3Cm1OtTMHf/fHSWDvM65B8N T+mRx9Ac1s5bSaMHOBqcaO8U/ZGrGEgu4YtQUDgGJlUUaaMEgcclCgsHFXPGKstqwKoF5G 3sBSRnp0UZBEcKyHPWIEifS/JdDIGDsJUHZQSfH6RREf5PWPhusYBB3dYaIN9w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731675645; a=rsa-sha256; cv=none; b=egklYFVPhhyDXEI03YSV05VULP7romhIY3XiV5KqxidsthVInuI1sRXo8edzb3VJ47FfPf eoDONxqiriWut3sJghfNsifK6fPAnaX7sKp9zt25qQSM30mWMN+06hc7c5BcOtZnAszb/R AQvwx/j3mRJpLJuryXQ3T2ui3QB3Z8dT2XHwOAbMdE5byAVqZrV8k7Xf09ddN+8rUlg+3P H88mt6F69LP9Mt+q0YFtN+4PRFB7v6mpqrZnFjxCIGaQz7uXdkTx+FZw4NPCoB2QPK9uVo DnfQVa3R9uZS08A5MzoAQ5UzS+XrkjYzkwzupROpI9NRIxtE8CC53+fv2O417g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqcZj5THbzP5w; Fri, 15 Nov 2024 13:00:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AFD0j73069882; Fri, 15 Nov 2024 13:00:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AFD0jWZ069879; Fri, 15 Nov 2024 13:00:45 GMT (envelope-from git) Date: Fri, 15 Nov 2024 13:00:45 GMT Message-Id: <202411151300.4AFD0jWZ069879@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: d43f0394c57e - stable/13 - cred: Make group_is_supplementary() public; New group_is_primary() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d43f0394c57e9119248039b04f063ed6b839e1cd Auto-Submitted: auto-generated The branch stable/13 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=d43f0394c57e9119248039b04f063ed6b839e1cd commit d43f0394c57e9119248039b04f063ed6b839e1cd Author: Olivier Certner AuthorDate: 2024-07-19 09:54:35 +0000 Commit: Olivier Certner CommitDate: 2024-11-15 12:59:08 +0000 cred: Make group_is_supplementary() public; New group_is_primary() Reviewed by: mhorne Approved by: markj (mentor) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D46908 (cherry picked from commit 6369544278b2e4fb5203b10dab466ff7c72c0a25) Approved by: markj (mentor) --- sys/kern/kern_prot.c | 2 +- sys/sys/ucred.h | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index eb4910e1591a..5fdb0a40a425 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1285,7 +1285,7 @@ sys___setugid(struct thread *td, struct __setugid_args *uap) /* * Returns whether gid designates a supplementary group in cred. */ -static int +int group_is_supplementary(const gid_t gid, const struct ucred *const cred) { diff --git a/sys/sys/ucred.h b/sys/sys/ucred.h index 74e2d59c57ea..da0568e9648f 100644 --- a/sys/sys/ucred.h +++ b/sys/sys/ucred.h @@ -158,6 +158,17 @@ void crcowfree(struct thread *td); void cru2x(struct ucred *cr, struct xucred *xcr); void cru2xt(struct thread *td, struct xucred *xcr); void crsetgroups(struct ucred *cr, int n, gid_t *groups); + +/* + * Returns whether gid designates a primary group in cred. + */ +static inline int +group_is_primary(const gid_t gid, const struct ucred *const cred) +{ + return (gid == cred->cr_groups[0] || gid == cred->cr_rgid || + gid == cred->cr_svgid); +} +int group_is_supplementary(const gid_t gid, const struct ucred *const cred); int groupmember(gid_t gid, const struct ucred *cred); int realgroupmember(gid_t gid, const struct ucred *cred); #endif /* _KERNEL */ From nobody Fri Nov 15 13:00:47 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqcZm3BrFz5d6tg; Fri, 15 Nov 2024 13:00: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqcZm0cSFz4pKC; Fri, 15 Nov 2024 13:00:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731675648; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G2f+f8NLeDkpYjvJ3OAYaq27Dz2vCwa2nivgjGVUeBs=; b=RVaKmGRzIoCVHSruPK8eIqPBR8gRKYSfeWke/FrbYpEeQGUIt02m+8/4vgFnQggGD1OJc3 wRkbGmt3CULXAwXTRvAAGLSdB546OIXixnqSsT1+WeyBs2835ZZ5oKkWNr13AW/YG+nN9w wcxRb+25V1C7DWkEfqYRGLM6EfAnFn6fz8PpPcQQS+rJYDPX3j85hAksxSTHZsxR2T4PVp HEmKrTji97B8aiDUvBj4aPIr+6UYuLw9lnmrgfUb75CZwc0CFoC3v7/bSeG7CaQ6SrHAl0 CBVPbTrAq7lZiTz6usr0zqLAKJC5kWpAY2JztSW7+FPMHg4J6YrIIPmz2O/9Mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731675648; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G2f+f8NLeDkpYjvJ3OAYaq27Dz2vCwa2nivgjGVUeBs=; b=D1S6wbEN0NFzI2Y5eXX/E75apWy20hog7cywtV1SO2qM2UVXW0ZA7iqxFGevlqs38CFcOp bKv6DGbtly/7GPYW3SPV+P0DtDuUcQrtASVn0mYxBAknBsxz2UNoxzIR8ucTtz5Ym3bDNQ sbDP8+x7dP3s+kL70B0s2EyFOfOPqSBHzgthWSlKc+k1gJonUwGb7YUHzCUdFr499GK9js k8iuQxyffeS1RYzA3cQKVVNBlU+0h5E6kJSY/ilIwS7h7CLoWxjB3D/eWBa42mUdhrC1Sc gAsCa0xbnX28Ct0cGgFiCgRVZcmiBU1Ui7x8O+46HVwXRpktKJYOalTkyDZTvw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731675648; a=rsa-sha256; cv=none; b=F4VZrzAZs62AsG1WS5aBkNNA5+78zhV7OvKzdkBB9FwXHja0+Ymb2s7Xl5IqDZ9DUkUW6X IaHJw0jIO3sIOROabDrW4IBTBgsQ2OVOPinjE18svBPzrgoACbDXXpwSj8Kd5qASYG+73U QmmGhDJ9dnr4e7G82g3ReJgPBkP51ldFVaGorJAdqsWd4HeGweAnZGRMmL0TZs6zI7kJIE R9bAvxkP9mjrmV97VKtxZ/IFgF+wAEq/R5T46ny0KweiDURFl0L4G08H81BH0AKWaHUlFX jByz2Pbsdh22/crtfMNz7D82LjdzsF0ir8kJ4zuB6x/TuEMTQ9R91FVpmQEMQw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqcZm01M3zPLG; Fri, 15 Nov 2024 13:00:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AFD0lex070926; Fri, 15 Nov 2024 13:00:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AFD0lgd070913; Fri, 15 Nov 2024 13:00:47 GMT (envelope-from git) Date: Fri, 15 Nov 2024 13:00:47 GMT Message-Id: <202411151300.4AFD0lgd070913@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: b8f857922806 - stable/13 - cred: kern_setgroups(): Internally use int as number of groups' 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 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b8f857922806570bef2e366c8d5277bc5260035c Auto-Submitted: auto-generated The branch stable/13 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=b8f857922806570bef2e366c8d5277bc5260035c commit b8f857922806570bef2e366c8d5277bc5260035c Author: Olivier Certner AuthorDate: 2024-10-01 16:46:46 +0000 Commit: Olivier Certner CommitDate: 2024-11-15 12:59:08 +0000 cred: kern_setgroups(): Internally use int as number of groups' type sys_setgroups() (and sys_getgroups()) was changed in commit "kern: fail getgroup and setgroup with negative int" (4bc2174a1b48) to take the number of groups as an 'int' (for sys_getgroups(), POSIX mandates this change; for sys_setgroups(), which it does not standardize, it's arguably for consistency). All our internal APIs related to groups on 'struct ucred', as well as related members on the latter, treat that number as an 'int' as well (and not a 'u_int'). Consequently, to avoid surprises, change kern_setgroups() to behave the same, and fix audit_arg_groupset() accordingly. With that change, everything is handled with signed integers internally. Update sanity checks accordingly. Reviewed by: mhorne Approved by: markj (mentor) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D46912 (cherry picked from commit abd39811cd7e4bb928da503f4a5c79364ac8d0f5) Approved by: markj (mentor) --- sys/kern/kern_prot.c | 16 ++++++++++++++-- sys/security/audit/audit.h | 2 +- sys/security/audit/audit_arg.c | 8 ++++---- sys/sys/syscallsubr.h | 2 +- 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index cb9a2f3c5ae7..901753f1e5b7 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -811,6 +811,15 @@ sys_setgroups(struct thread *td, struct setgroups_args *uap) gid_t *groups; int gidsetsize, error; + /* + * Sanity check size now to avoid passing too big a value to copyin(), + * even if kern_setgroups() will do it again. + * + * Ideally, the 'gidsetsize' argument should have been a 'u_int' (and it + * was, in this implementation, for a long time), but POSIX standardized + * getgroups() to take an 'int' and it would be quite entrapping to have + * setgroups() differ. + */ gidsetsize = uap->gidsetsize; if (gidsetsize > ngroups_max + 1 || gidsetsize < 0) return (EINVAL); @@ -839,13 +848,16 @@ gidp_cmp(const void *p1, const void *p2) } int -kern_setgroups(struct thread *td, u_int ngrp, gid_t *groups) +kern_setgroups(struct thread *td, int ngrp, gid_t *groups) { struct proc *p = td->td_proc; struct ucred *newcred, *oldcred; int error; - MPASS(ngrp <= ngroups_max + 1); + /* Sanity check size. */ + if (ngrp < 0 || ngrp > ngroups_max + 1) + return (EINVAL); + AUDIT_ARG_GROUPSET(groups, ngrp); newcred = crget(); crextend(newcred, ngrp); diff --git a/sys/security/audit/audit.h b/sys/security/audit/audit.h index e7a9c83afbb3..b87dd52e0773 100644 --- a/sys/security/audit/audit.h +++ b/sys/security/audit/audit.h @@ -98,7 +98,7 @@ void audit_arg_rgid(gid_t rgid); void audit_arg_ruid(uid_t ruid); void audit_arg_sgid(gid_t sgid); void audit_arg_suid(uid_t suid); -void audit_arg_groupset(gid_t *gidset, u_int gidset_size); +void audit_arg_groupset(gid_t *gidset, int gidset_size); void audit_arg_login(char *login); void audit_arg_ctlname(int *name, int namelen); void audit_arg_mask(int mask); diff --git a/sys/security/audit/audit_arg.c b/sys/security/audit/audit_arg.c index 7b7fe34ccda9..db621db1574f 100644 --- a/sys/security/audit/audit_arg.c +++ b/sys/security/audit/audit_arg.c @@ -264,13 +264,13 @@ audit_arg_suid(uid_t suid) } void -audit_arg_groupset(gid_t *gidset, u_int gidset_size) +audit_arg_groupset(gid_t *gidset, int gidset_size) { - u_int i; + int i; struct kaudit_record *ar; - KASSERT(gidset_size <= ngroups_max + 1, - ("audit_arg_groupset: gidset_size > (kern.ngroups + 1)")); + KASSERT(gidset_size >= 0 && gidset_size <= ngroups_max + 1, + ("audit_arg_groupset: gidset_size < 0 or > (kern.ngroups + 1)")); ar = currecord(); if (ar == NULL) diff --git a/sys/sys/syscallsubr.h b/sys/sys/syscallsubr.h index 4710c3cf1406..9edd62729c38 100644 --- a/sys/sys/syscallsubr.h +++ b/sys/sys/syscallsubr.h @@ -287,7 +287,7 @@ int kern_select(struct thread *td, int nd, fd_set *fd_in, fd_set *fd_ou, fd_set *fd_ex, struct timeval *tvp, int abi_nfdbits); int kern_sendit(struct thread *td, int s, struct msghdr *mp, int flags, struct mbuf *control, enum uio_seg segflg); -int kern_setgroups(struct thread *td, u_int ngrp, gid_t *groups); +int kern_setgroups(struct thread *td, int ngrp, gid_t *groups); int kern_setitimer(struct thread *, u_int, struct itimerval *, struct itimerval *); int kern_setpriority(struct thread *td, int which, int who, int prio); From nobody Fri Nov 15 13:00:46 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqcZl2sfpz5d6gP; Fri, 15 Nov 2024 13:00: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqcZk6wzrz4pPg; Fri, 15 Nov 2024 13:00:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731675647; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E3w1PMNFtK2EAqgvZe5b+Xzdz9BD6RQ09kv5Bs0eMjc=; b=W2frEA8jQPnwJlzEJbqQETfjzVh1nDpqwYVZ3+iukJC6uBIGVPmEqnuqIKSInXYzYH3zLQ JHgQ+uWqyr799mzkUABtFU/MhcYW9ZyWXuu5TtCLnZMv8+qOLgpBZrwixqKrQLySmLqbyN MPDrKmIWZFp2agKZeQosq/6ht9jZ4y/gtMc14x/J4i6COA0i8sIGxqUUEJP6BLdblE33VL r0BjHiukX96CeqbjazC2bdQX17zQHEYY+93sFMNfLKhQl6VMWK5Qqp6ON0ll4GuK1q1G+K J5hXzl/5wPRrfGgNPnFm2P5MAUtB5N8CJ1mFrB+wqXLPnsuvBuU5okxVcj3lsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731675647; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E3w1PMNFtK2EAqgvZe5b+Xzdz9BD6RQ09kv5Bs0eMjc=; b=VSah2J6DQftTODFQQjUKriwOWV0IWTJKe/qroNm/cyXD1lGfAUoTyOYbLw++Uh9U36scho jMdymsVXSXlIWCLgpbKpFubrpW8zGWndlUyxC7IBlkGOuKIDZwlm0MCxAZex2+EkXtZRlp tlBqenai/lNybVVU57ZwbQz0yI/UBE2bB/xf/XmvC7z5yA0+cQVEIyXMKSICVchAbE0Crr 7E/XNUcC9QBX68d/RoZoder1wO6bXR/TajBxPuc0SrA1T77URURrkVUbNw9TTMJF28XxAe olvA41nJVf0iuzXi7PWeFuJT6eoizot4yniMLFBhwi+Xe1FZDKEmBdZEbYw0/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731675647; a=rsa-sha256; cv=none; b=VQa0Xr/JGIDmyCKs328QWra5La6vJDOxPafrdCmtuVJIbhOWXktkFwK3o2IQ0wDJ1bgnuc 7vJnD7FXpnAL6nbUsBUhJcjmza9fOoM0yQ5ZbQ61c6pvxQ/AYAuvAOrXtZ4zpydriSlbHy 2Igdz1Fy3eGOZNLsOsfGh1MK2mmNFR5xM7G2ybF89SozgqZ2+5fExy/Y1uq6XfE6pBoYb5 nQlkKCjwUSrT/xTimc+4mOxC7BL5Haaf4+O3ke26mZyJJ5nIBI5tN2OKdeKHDNzwz2Ul63 pY5PyHzUcXuTDHleTJtTDDD+XsvDPVShMiU5SmaDaKH1/TmG66RTgeMu8Mo6UQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqcZk6YJ8zP5X; Fri, 15 Nov 2024 13:00:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AFD0kVM069938; Fri, 15 Nov 2024 13:00:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AFD0kvd069934; Fri, 15 Nov 2024 13:00:46 GMT (envelope-from git) Date: Fri, 15 Nov 2024 13:00:46 GMT Message-Id: <202411151300.4AFD0kvd069934@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: 3ce5ef4f7a97 - stable/13 - cred: Separate constant for the number of inlined groups List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3ce5ef4f7a97d3e059fba7d6afc60881e8f3fb9f Auto-Submitted: auto-generated The branch stable/13 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=3ce5ef4f7a97d3e059fba7d6afc60881e8f3fb9f commit 3ce5ef4f7a97d3e059fba7d6afc60881e8f3fb9f Author: Olivier Certner AuthorDate: 2024-07-16 20:37:44 +0000 Commit: Olivier Certner CommitDate: 2024-11-15 12:59:08 +0000 cred: Separate constant for the number of inlined groups CRED_SMALLGROUPS_NB now holds the number of inlined groups in field 'cr_smallgroups'. XU_NGROUPS stays the number of groups allowed in 'struct xucred'. The first is an implementation detail, while the second is part of a public interface. All mentions of XU_NGROUPS in the tree have been reviewed and only those concerning the implementation detail have been changed to use CRED_SMALLGROUPS_NB (they were all in 'kern_prot.c'). No functional change, as CRED_SMALLGROUPS_NB is set to 16, the same value as XU_NGROUPS. Reviewed by: mhorne (slightly different version) Approved by: markj (mentor) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D46911 (cherry picked from commit 664b9fcb1c051c17ba11d1e5e8a1db9938d76bd5) Approved by: markj (mentor) --- sys/kern/kern_prot.c | 6 +++--- sys/sys/ucred.h | 12 ++++++++++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 5fdb0a40a425..cb9a2f3c5ae7 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -807,7 +807,7 @@ struct setgroups_args { int sys_setgroups(struct thread *td, struct setgroups_args *uap) { - gid_t smallgroups[XU_NGROUPS]; + gid_t smallgroups[CRED_SMALLGROUPS_NB]; gid_t *groups; int gidsetsize, error; @@ -815,7 +815,7 @@ sys_setgroups(struct thread *td, struct setgroups_args *uap) if (gidsetsize > ngroups_max + 1 || gidsetsize < 0) return (EINVAL); - if (gidsetsize > XU_NGROUPS) + if (gidsetsize > CRED_SMALLGROUPS_NB) groups = malloc(gidsetsize * sizeof(gid_t), M_TEMP, M_WAITOK); else groups = smallgroups; @@ -824,7 +824,7 @@ sys_setgroups(struct thread *td, struct setgroups_args *uap) if (error == 0) error = kern_setgroups(td, gidsetsize, groups); - if (gidsetsize > XU_NGROUPS) + if (gidsetsize > CRED_SMALLGROUPS_NB) free(groups, M_TEMP); return (error); } diff --git a/sys/sys/ucred.h b/sys/sys/ucred.h index da0568e9648f..243a2431bd0b 100644 --- a/sys/sys/ucred.h +++ b/sys/sys/ucred.h @@ -44,6 +44,14 @@ struct loginclass; #define XU_NGROUPS 16 +#if defined(_KERNEL) || defined(_WANT_UCRED) +/* + * Number of groups inlined in 'struct ucred'. It must stay reasonably low as + * it is also used by some functions to allocate an array of this size on the + * stack. + */ +#define CRED_SMALLGROUPS_NB 16 + /* * Credentials. * @@ -57,7 +65,6 @@ struct loginclass; * * See "Credential management" comment in kern_prot.c for more information. */ -#if defined(_KERNEL) || defined(_WANT_UCRED) struct ucred { struct mtx cr_mtx; u_int cr_ref; /* (c) reference count */ @@ -80,7 +87,8 @@ struct ucred { struct label *cr_label; /* MAC label */ gid_t *cr_groups; /* groups */ int cr_agroups; /* Available groups */ - gid_t cr_smallgroups[XU_NGROUPS]; /* storage for small groups */ + /* storage for small groups */ + gid_t cr_smallgroups[CRED_SMALLGROUPS_NB]; }; #define NOCRED ((struct ucred *)0) /* no credential available */ #define FSCRED ((struct ucred *)-1) /* filesystem credential */ From nobody Fri Nov 15 13:00:48 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqcZn3Z3Wz5d6gQ; Fri, 15 Nov 2024 13:00: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqcZn1Fllz4pXR; Fri, 15 Nov 2024 13:00:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731675649; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=92l7M5PKmk8i+LnGpYqDvRgnxrw3lMlNgzqJah+uW1s=; b=A6E6ChVeT+QM7QABdUzHgJO47DSTakN8MMboMHCpccmaXeq2ocfeyiCA340pPYAdfymjcR E4dVzeVIrV4R+E/9RkG41FcpY1Zu39f91TducGlPnU7xPY606SIK3YON1NAinTOFsnZDpr wLSjBVZQWiZuGkSlbqK5+kKPNkmrqE5Tb/Qxv0RvxT2LmCc0BoL5wj7rsvoNMuXSsQzLTv YIqJ8R3Th6HNy/WgPoonNfV8Gbzje3leIx49UaoLWbqBKy296UUwTV64OXSWbKao/+PMEe LiZ+cfKYUOddO0h5+CfPBkE+IYKoolivNUfSvdn9KsX+4m4Y0L3vtytgg5graQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731675649; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=92l7M5PKmk8i+LnGpYqDvRgnxrw3lMlNgzqJah+uW1s=; b=p4NT/tf/IuuWqtlYFsBEEb6oLrsqxH/YOWSfFMQXmhfbcmwqrcriljx+PYW/5XrAPY2WTx l24r6bwaOtBb94WwqP3djyryz1vCS/qHKfq0oMOyN5XqcjT4t6ya+IodtWtpKzm0XSjTmJ Os6x0g7ZB2NJkDlnbjyBGJK3hQSOnX4DDQ5EWSyPW/P8bS0kGOThw5yF8aK1/yAmeO3ypp FzJUF4XZvR5PhZHHO7JUvjSy+f89YDfZ4pCtcIdKHU3W4695PNr3XUQg1xroaY5bqwp2Ds tNal/YDc0iKvntGUx+RrIqP30j3rlO1IMxZBKq2ugPD9zSbfot2CRUIJSLeBag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731675649; a=rsa-sha256; cv=none; b=x5r1HPzaYk3TuEXftMmARJtInOe4PD+bmpvw5hrjA1cmJZ/jqyGiMhL2rLzEzGoavYS53v eJi0LRvRRZk433rOke3kWK3vl1hDotQkir0xPvRP2tvzKhQYSjecnV4Kgw07+nWYFdeIct j6rvZTJDvkfxkdsIEfhwOzF2T7iInMkQTxpU/6lkCn8wDTTzRGSs8PFBRFH9Uz2M/IhTQb W5cZtDtoW8eWcFL7HMHcdvGUJKmOMILXyc26MaQzl/QCCPuktzo+p/ZYqCh45dnarUD6UN 7kz+TpXkjG+FcIx1loSNyVQ2wUx6+lm8Q5pKbC9N7zprbyiGteISvoveea4DkA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqcZn0b9TzNs7; Fri, 15 Nov 2024 13:00:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AFD0mfd071113; Fri, 15 Nov 2024 13:00:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AFD0mm5071108; Fri, 15 Nov 2024 13:00:48 GMT (envelope-from git) Date: Fri, 15 Nov 2024 13:00:48 GMT Message-Id: <202411151300.4AFD0mm5071108@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: 50e3e905e409 - stable/13 - cred: 'kern.ngroups' tunable: Limit it to avoid internal overflows List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 50e3e905e409a8f6387328326c5dc37a4fbbcdd8 Auto-Submitted: auto-generated The branch stable/13 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=50e3e905e409a8f6387328326c5dc37a4fbbcdd8 commit 50e3e905e409a8f6387328326c5dc37a4fbbcdd8 Author: Olivier Certner AuthorDate: 2024-10-01 17:00:43 +0000 Commit: Olivier Certner CommitDate: 2024-11-15 12:59:08 +0000 cred: 'kern.ngroups' tunable: Limit it to avoid internal overflows As the comment introduced with the tunable said (but the code didn't do), make sure that 'ngroups_max' can't be INT_MAX, as this would cause overflow in the usual 'ngroups_max + 1' computations (as we store the effective GID and supplementary groups' IDs in the same array, and 'ngroups_max' only applies to supplementary groups). Further, we limit the maximum number of groups somewhat arbitrarily to ~17M so as to avoid overflow when computing the size in bytes of the groups set's backing array and to avoid obvious configuration errors. We really don't think that more than ~17M groups will ever be needed (if I'm proven wrong one day, please drop me a note about your use case). While here, document more precisely why NGROUPS_MAX needs to be the minimum value for 'ngroups_max'. Reviewed by: mhorne (older version) Approved by: markj (mentor) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D46913 (cherry picked from commit 580904d995d53ccd2492140a37107442d8b36dc0) Approved by: markj (mentor) --- sys/kern/subr_param.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/sys/kern/subr_param.c b/sys/kern/subr_param.c index 0ea2279ef2e6..c976bd4cc029 100644 --- a/sys/kern/subr_param.c +++ b/sys/kern/subr_param.c @@ -235,14 +235,32 @@ init_param1(void) TUNABLE_ULONG_FETCH("kern.sgrowsiz", &sgrowsiz); /* - * Let the administrator set {NGROUPS_MAX}, but disallow values - * less than NGROUPS_MAX which would violate POSIX.1-2008 or - * greater than INT_MAX-1 which would result in overflow. + * Let the administrator set {NGROUPS_MAX}. + * + * Values less than NGROUPS_MAX would violate POSIX/SuS (see the + * specification for , paragraph "Runtime Increasable + * Values"). + * + * On the other hand, INT_MAX would result in an overflow for the common + * 'ngroups_max + 1' computation (to obtain the size of the internal + * groups array, its first element being reserved for the effective + * GID). Also, the number of allocated bytes for the group array must + * not overflow on 32-bit machines. For all these reasons, we limit the + * number of supplementary groups to some very high number that we + * expect will never be reached in all practical uses and ensures we + * avoid the problems just exposed, even if 'gid_t' was to be enlarged + * by a magnitude. */ ngroups_max = NGROUPS_MAX; TUNABLE_INT_FETCH("kern.ngroups", &ngroups_max); if (ngroups_max < NGROUPS_MAX) ngroups_max = NGROUPS_MAX; + else { + const int ngroups_max_max = (1 << 24) - 1; + + if (ngroups_max > ngroups_max_max) + ngroups_max = ngroups_max_max; + } /* * Only allow to lower the maximal pid. From nobody Fri Nov 15 13:00:50 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqcZp5knpz5d6gT; Fri, 15 Nov 2024 13:00: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqcZp23bhz4pdF; Fri, 15 Nov 2024 13:00:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731675650; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Uhdvajkd0f2A8DpQv32Amr+gd/NCW7jGfbwTEF9vR04=; b=JFeRFqr1FOJM481lraIBXyuMikU4K+eIgMbHZ1sVg5gKMm31VyXUwM4NPDYvMuD6AZqFVO TZk+qllUI9D6QSEgydRTcd9ea+j66ZBeFTr61hkq/KImEsMfmQO1QatWEU2JJ/xrDVefHy Aiyr6GHTqz4zg3O1VVVeoJy9aKKW1LoSgwZseLxJmngkZvt2hnun3ZVkZjJGTqoqB1/B6I hb2ye+L5GvuKjHKjoSJi81RW+M5jbfb2VEf27cxp+aqf+GWImkxkKuaa4UQozSAXsS1cv8 4DZQHOdgEUngwN3JGOxv9AF9h6JFvZy+6e/pZXQiUe+gPEeMZ30+iAJ2kGA3nA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731675650; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Uhdvajkd0f2A8DpQv32Amr+gd/NCW7jGfbwTEF9vR04=; b=AwaMGqoSmxLSdtbaJ0z+1V1zp/o04AYyhCs1WW55BrvukVXhQd1MnN0spJRzSOlY2plue7 66AvaV/E58ibTpf66MiPisV4+L1nti/BlVkW+Zh5cukJHapRZ9DNph6SZzZlVsSBgWDGXQ kjwRMh3gGSeVkEiWyxeic2pUxzuy8psYPYDoAwOlyi60E2Z58xo9JWl6GsbGDmlUyRPmIw rOCfeb4MVgDdzObTFTuHSZHai2TsHdl+v3tyywgm7gtCusSvYwEEkMIdq9jI+rx5Zuc9KN NNno1mFz8vGH59dCndhSUYh6bPQbQxVoubmJHA8n5mWpjMS9qz/btbqo6BLIKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731675650; a=rsa-sha256; cv=none; b=a8QX/GVy8WA5Fc+H579IFBbf/u9U+M51pJN37UvzzYotSzP8H/5yMrluN7b660oieoPa/0 qC/SDYpUvAOJ6JJhdIRHK+TT5unTJDJPdyISYmu1cNGCeu2T4wzo3qZ/Xz1zx1l0acqubn r200Ls4aV0BZSoy6ZeOXoWQmBO0sl3eQPo1cJ0WP12kU9Z/tT7aTvinVoE9RW/Oboz0Z56 uxTz+JMr08QrO6LgcvWzFyz+SpSS+sh6AQA2k7thBQXrGy6Mq1IGAEwA92+twKxGZ2PIGO paYua3unX3iMtcES5M1yAdLbIr07aPRnqH8OugZ/+UVmEREyfZcz12J6mEIIqg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqcZp1bs2zP5c; Fri, 15 Nov 2024 13:00:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AFD0onJ071185; Fri, 15 Nov 2024 13:00:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AFD0oJq071180; Fri, 15 Nov 2024 13:00:50 GMT (envelope-from git) Date: Fri, 15 Nov 2024 13:00:50 GMT Message-Id: <202411151300.4AFD0oJq071180@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: bd3813a8e1cf - stable/13 - cred: crsetgroups(): Improve and factor out groups normalization List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: bd3813a8e1cf3e1766283f4f9e7fe085222cd32a Auto-Submitted: auto-generated The branch stable/13 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=bd3813a8e1cf3e1766283f4f9e7fe085222cd32a commit bd3813a8e1cf3e1766283f4f9e7fe085222cd32a Author: Olivier Certner AuthorDate: 2024-10-02 12:40:27 +0000 Commit: Olivier Certner CommitDate: 2024-11-15 12:59:08 +0000 cred: crsetgroups(): Improve and factor out groups normalization The groups array has been sorted (not including the first element, which is always the effective GID) to enable performing a binary search for determining if some group is part of the supplementary groups set. Factor out this sorting operation into an internal normalization function (groups_normalize()), adding to it the removal of duplicates after the sort. Separating groups normalization code allows to perform it in advance, and in particular before calling MAC hooks which need the groups array to be sorted to perform better. This also enables sorting input arrays ahead of acquiring the process lock (which is not necessary for this operation). kern_setgroups() has been changed accordingly, so MAC modules implementing the mac_cred_check_setgroups() hook now can assume a normalized groups array (and also that it has at least one element, as if kern_setgroups() is passed no groups, the hook is called with an array of one element being the current effective GID, as this is effectively the effect of such a call to kern_setgroups()). Further commits introducing the setcred() system call and associated MAC hooks will also guarantee a normalized groups array to MAC modules implementing these hooks. Rename crsetgroups_locked() into crsetgroups_internal(), as it is no more "locked" than crsetgroups() itself. However, it can be called under any lock (as needed), whereas the second may sleep to allocate memory. Update their herald comments to make that explicit. In passing, using qsort() instead of the old open-coded insertion sort (in crsetgroups_locked()) fixes the performance concern about the latter when using a large number of groups. Also, our qsort() falls back to insertion sort for small arrays and in case the array is likely to be mostly sorted, so this shouldn't cause concerns for the small number of groups common case. While here, add assertions in inner modification routines to check that the passed credentials object has a reference count of exactly 1 (in particular, it must not be shared). Remove a redundant one from some outer routine. Reviewed by: mhorne Approved by: markj (mentor) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D46914 (cherry picked from commit 6d2efbb34fdb59facbe6d83374ef4ab69d395866) Approved by: markj (mentor) --- sys/kern/kern_prot.c | 168 ++++++++++++++++++++++++++++++++++++++------------ sys/sys/syscallsubr.h | 2 +- sys/sys/ucred.h | 2 +- 3 files changed, 131 insertions(+), 41 deletions(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 901753f1e5b7..6cdfea2774c0 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -89,8 +89,22 @@ SYSCTL_NODE(_security, OID_AUTO, bsd, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "BSD security policy"); static void crfree_final(struct ucred *cr); -static void crsetgroups_locked(struct ucred *cr, int ngrp, - gid_t *groups); + +static inline void +groups_check_positive_len(int ngrp) +{ + MPASS2(ngrp >= 0, "negative number of groups"); + MPASS2(ngrp != 0, "at least one group expected (effective GID)"); +} +static inline void +groups_check_max_len(int ngrp) +{ + MPASS2(ngrp <= ngroups_max + 1, "too many groups"); +} + +static void groups_normalize(int *ngrp, gid_t *groups); +static void crsetgroups_internal(struct ucred *cr, int ngrp, + const gid_t *groups); #ifndef _SYS_SYSPROTO_H_ struct getpid_args { @@ -831,9 +845,9 @@ sys_setgroups(struct thread *td, struct setgroups_args *uap) error = copyin(uap->gidset, groups, gidsetsize * sizeof(gid_t)); if (error == 0) - error = kern_setgroups(td, gidsetsize, groups); + error = kern_setgroups(td, &gidsetsize, groups); - if (gidsetsize > CRED_SMALLGROUPS_NB) + if (groups != smallgroups) free(groups, M_TEMP); return (error); } @@ -847,25 +861,38 @@ gidp_cmp(const void *p1, const void *p2) return ((g1 > g2) - (g1 < g2)); } +/* + * CAUTION: This function normalizes 'groups', possibly also changing the value + * of '*ngrpp' as a consequence. + */ int -kern_setgroups(struct thread *td, int ngrp, gid_t *groups) +kern_setgroups(struct thread *td, int *ngrpp, gid_t *groups) { struct proc *p = td->td_proc; struct ucred *newcred, *oldcred; - int error; + int ngrp, error; + ngrp = *ngrpp; /* Sanity check size. */ if (ngrp < 0 || ngrp > ngroups_max + 1) return (EINVAL); AUDIT_ARG_GROUPSET(groups, ngrp); + if (ngrp != 0) { + /* We allow and treat 0 specially below. */ + groups_normalize(ngrpp, groups); + ngrp = *ngrpp; + } newcred = crget(); crextend(newcred, ngrp); PROC_LOCK(p); oldcred = crcopysafe(p, newcred); #ifdef MAC - error = mac_cred_check_setgroups(oldcred, ngrp, groups); + error = ngrp == 0 ? + /* If 'ngrp' is 0, we'll keep just the current effective GID. */ + mac_cred_check_setgroups(oldcred, 1, oldcred->cr_groups) : + mac_cred_check_setgroups(oldcred, ngrp, groups); if (error) goto fail; #endif @@ -882,9 +909,9 @@ kern_setgroups(struct thread *td, int ngrp, gid_t *groups) * when running non-BSD software if we do not do the same. */ newcred->cr_ngroups = 1; - } else { - crsetgroups_locked(newcred, ngrp, groups); - } + } else + crsetgroups_internal(newcred, ngrp, groups); + setsugid(p); proc_set_cred(p, newcred); PROC_UNLOCK(p); @@ -1294,6 +1321,32 @@ sys___setugid(struct thread *td, struct __setugid_args *uap) #endif /* REGRESSION */ } +#ifdef INVARIANTS +static void +groups_check_normalized(int ngrp, const gid_t *groups) +{ + gid_t prev_g; + + groups_check_positive_len(ngrp); + groups_check_max_len(ngrp); + + if (ngrp == 1) + return; + + prev_g = groups[1]; + for (int i = 2; i < ngrp; ++i) { + const gid_t g = groups[i]; + + if (prev_g >= g) + panic("%s: groups[%d] (%u) >= groups[%d] (%u)", + __func__, i - 1, prev_g, i, g); + prev_g = g; + } +} +#else +#define groups_check_normalized(...) +#endif + /* * Returns whether gid designates a supplementary group in cred. */ @@ -2156,7 +2209,6 @@ void crcopy(struct ucred *dest, struct ucred *src) { - KASSERT(dest->cr_ref == 1, ("crcopy of shared ucred")); bcopy(&src->cr_startcopy, &dest->cr_startcopy, (unsigned)((caddr_t)&src->cr_endcopy - (caddr_t)&src->cr_startcopy)); @@ -2301,6 +2353,8 @@ crextend(struct ucred *cr, int n) { int cnt; + MPASS2(cr->cr_ref == 1, "'cr_ref' must be 1 (referenced, unshared)"); + /* Truncate? */ if (n <= cr->cr_agroups) return; @@ -2334,52 +2388,88 @@ crextend(struct ucred *cr, int n) } /* - * Copy groups in to a credential, preserving any necessary invariants. - * Currently this includes the sorting of all supplementary gids. - * crextend() must have been called before hand to ensure sufficient - * space is available. + * Normalizes a set of groups to be applied to a 'struct ucred'. + * + * The set of groups is an array that must comprise the effective GID as its + * first element (so its length cannot be 0). + * + * Normalization ensures that elements after the first, which stand for the + * supplementary groups, are sorted in ascending order and do not contain + * duplicates. */ static void -crsetgroups_locked(struct ucred *cr, int ngrp, gid_t *groups) +groups_normalize(int *ngrp, gid_t *groups) { - int i; - int j; - gid_t g; + gid_t prev_g; + int ins_idx; - KASSERT(cr->cr_agroups >= ngrp, ("cr_ngroups is too small")); + groups_check_positive_len(*ngrp); + groups_check_max_len(*ngrp); - bcopy(groups, cr->cr_groups, ngrp * sizeof(gid_t)); - cr->cr_ngroups = ngrp; + if (*ngrp == 1) + return; - /* - * Sort all groups except cr_groups[0] to allow groupmember to - * perform a binary search. - * - * XXX: If large numbers of groups become common this should - * be replaced with shell sort like linux uses or possibly - * heap sort. - */ - for (i = 2; i < ngrp; i++) { - g = cr->cr_groups[i]; - for (j = i-1; j >= 1 && g < cr->cr_groups[j]; j--) - cr->cr_groups[j + 1] = cr->cr_groups[j]; - cr->cr_groups[j + 1] = g; + qsort(groups + 1, *ngrp - 1, sizeof(*groups), gidp_cmp); + + /* Remove duplicates. */ + prev_g = groups[1]; + ins_idx = 2; + for (int i = 2; i < *ngrp; ++i) { + const gid_t g = groups[i]; + + if (g != prev_g) { + if (i != ins_idx) + groups[ins_idx] = g; + ++ins_idx; + prev_g = g; + } } + *ngrp = ins_idx; + + groups_check_normalized(*ngrp, groups); +} + +/* + * Internal function copying groups into a credential. + * + * 'ngrp' must be strictly positive. Either the passed 'groups' array must have + * been normalized in advance (see groups_normalize()), else it must be so + * before the structure is to be used again. + * + * This function is suitable to be used under any lock (it doesn't take any lock + * itself nor sleep, and in particular doesn't allocate memory). crextend() + * must have been called beforehand to ensure sufficient space is available. + * See also crsetgroups(), which handles that. + */ +static void +crsetgroups_internal(struct ucred *cr, int ngrp, const gid_t *groups) +{ + + MPASS2(cr->cr_ref == 1, "'cr_ref' must be 1 (referenced, unshared)"); + MPASS2(cr->cr_agroups >= ngrp, "'cr_agroups' too small"); + groups_check_positive_len(ngrp); + + bcopy(groups, cr->cr_groups, ngrp * sizeof(gid_t)); + cr->cr_ngroups = ngrp; } /* * Copy groups in to a credential after expanding it if required. - * Truncate the list to (ngroups_max + 1) if it is too large. + * + * May sleep in order to allocate memory (except if, e.g., crextend() was called + * before with 'ngrp' or greater). Truncates the list to (ngroups_max + 1) if + * it is too large. Array 'groups' doesn't need to be sorted. 'ngrp' must be + * strictly positive. */ void -crsetgroups(struct ucred *cr, int ngrp, gid_t *groups) +crsetgroups(struct ucred *cr, int ngrp, const gid_t *groups) { if (ngrp > ngroups_max + 1) ngrp = ngroups_max + 1; - crextend(cr, ngrp); - crsetgroups_locked(cr, ngrp, groups); + crsetgroups_internal(cr, ngrp, groups); + groups_normalize(&cr->cr_ngroups, cr->cr_groups); } /* diff --git a/sys/sys/syscallsubr.h b/sys/sys/syscallsubr.h index 9edd62729c38..78de8876e51b 100644 --- a/sys/sys/syscallsubr.h +++ b/sys/sys/syscallsubr.h @@ -287,7 +287,7 @@ int kern_select(struct thread *td, int nd, fd_set *fd_in, fd_set *fd_ou, fd_set *fd_ex, struct timeval *tvp, int abi_nfdbits); int kern_sendit(struct thread *td, int s, struct msghdr *mp, int flags, struct mbuf *control, enum uio_seg segflg); -int kern_setgroups(struct thread *td, int ngrp, gid_t *groups); +int kern_setgroups(struct thread *td, int *ngrpp, gid_t *groups); int kern_setitimer(struct thread *, u_int, struct itimerval *, struct itimerval *); int kern_setpriority(struct thread *td, int which, int who, int prio); diff --git a/sys/sys/ucred.h b/sys/sys/ucred.h index 243a2431bd0b..8152f962f3cb 100644 --- a/sys/sys/ucred.h +++ b/sys/sys/ucred.h @@ -165,7 +165,7 @@ struct ucred *crcowget(struct ucred *cr); void crcowfree(struct thread *td); void cru2x(struct ucred *cr, struct xucred *xcr); void cru2xt(struct thread *td, struct xucred *xcr); -void crsetgroups(struct ucred *cr, int n, gid_t *groups); +void crsetgroups(struct ucred *cr, int ngrp, const gid_t *groups); /* * Returns whether gid designates a primary group in cred. From nobody Fri Nov 15 13:00:51 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqcZq5mP6z5d6mV; Fri, 15 Nov 2024 13:00: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqcZq2dsTz4pSR; Fri, 15 Nov 2024 13:00:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731675651; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qAHzXa5vkQ2TsYqhFfsk14UDFTP28UUrwv8SfS6yi8c=; b=r0Hmn1J460Nb35AR7yhYA1YyuLnBeZvJ8DEf+wP93SOqNLRXut3LqjFzpzFdQ8419M44SH sPnmC27Q3ouTYN7sbfk00it5RcdVFASovf848tXuxKV7Yi/NmaCEMie1H9d1HOYXknIAId TCare4Lfb+n/nfjVyTiamNe4pUN01HCRgzeW6m+fHSArD1Q2bu3ODETpvpDvgOJrGfdQEP v3cXauteQ+Czb7cBfvA559xqASmBuIbXvrbni0g9KU/Dz6S0JvwFXP2eYqyrGSL/asNMzP YRlPEe3zCYq5Lus/rdOXTDVebPP5nMEJC52MTSBatZh6IvvsPjQrzkHVGKccJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731675651; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qAHzXa5vkQ2TsYqhFfsk14UDFTP28UUrwv8SfS6yi8c=; b=uocGzC9fD9XvSYqChnZRdf1EJUZNTeOFvPykLeobixbNR/3ryMrqaZDb0ss5dEGkEeWqqD u96vOF9HZIXx6RjojqYx2PxAfp33cxWA30PGcz+Dszxk6ZvcX5G2yFJIH6TkIvqv2RVr5e 66TkvS7XDfDl0WcOcQMLNKHi+/H/2Hdt6EahGeBCv6npIQBZwnKvFLH9wwvfLur2VqWxlc jRV/yOQQdICPp3LGIaW1CbeN+6iOx7ixDyh+4vZ2F2ciMq3fdy/8M6An78Vti59SBh4IR2 eiANOHRT309Smfel1ma3CcD3JMuDsbJ2bjAH4197K5AFb6AONW0GDfmdeg6nkQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731675651; a=rsa-sha256; cv=none; b=Nm8Fy70VQBYhWi8kvW4fNJ7zUQKGmbnF6Pr3NkqJJG1G06wG+f8BhMphuUwKaxkZx5pmJ9 TUYfrQmE8zCYXvjXYbvjE1/pnq2YXkAy+fNhCQ/1fyISXCUxQRxeT8EQ0s1j7iv8yyGSVd RCQqc7gM87d3PQuRhTfwgoACpjEp2L55SxPHJl1ymVDWHB7DMgowsEVysDyK26O+D9jYPO SbEERzBA7jAKLQdZgLl0DH3oEhQu5m3B+MZvpsd3cVRjVVx9dPF15P39ajpkvM+e/R2HsP zUOCl36gP2ATUOmk+8Sz27Uh0tc5eoBA2mQ7vw/JqSoFJZwCowDzaKSXNr9qIA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqcZq231pzNnV; Fri, 15 Nov 2024 13:00:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AFD0pWe071241; Fri, 15 Nov 2024 13:00:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AFD0pZq071238; Fri, 15 Nov 2024 13:00:51 GMT (envelope-from git) Date: Fri, 15 Nov 2024 13:00:51 GMT Message-Id: <202411151300.4AFD0pZq071238@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: 5e24f53a2d5d - stable/13 - cred: groupmember() and co.: Sanity check cred's groups (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 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 5e24f53a2d5d3dc7d695ba0a037c1ba66ec75ba9 Auto-Submitted: auto-generated The branch stable/13 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=5e24f53a2d5d3dc7d695ba0a037c1ba66ec75ba9 commit 5e24f53a2d5d3dc7d695ba0a037c1ba66ec75ba9 Author: Olivier Certner AuthorDate: 2024-11-01 15:11:23 +0000 Commit: Olivier Certner CommitDate: 2024-11-15 12:59:09 +0000 cred: groupmember() and co.: Sanity check cred's groups (INVARIANTS) Leverage the normalization check functions introduced in the previous commit in all public-facing groups search functions to catch programming errors early. Approved by: markj (mentor) MFC after: 3 days (cherry picked from commit 634675067867090e538b08e62ff9b14d3ffae5a3) Approved by: markj (mentor) --- sys/kern/kern_prot.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 6cdfea2774c0..ede79f7d6bd2 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1354,6 +1354,8 @@ int group_is_supplementary(const gid_t gid, const struct ucred *const cred) { + groups_check_normalized(cred->cr_ngroups, cred->cr_groups); + /* * Perform a binary search of the supplementary groups. This is * possible because we sort the groups in crsetgroups(). @@ -1377,7 +1379,9 @@ groupmember(gid_t gid, const struct ucred *cred) if (cred->cr_ngroups == 0) return (0); - if (cred->cr_groups[0] == gid) + groups_check_positive_len(cred->cr_ngroups); + + if (gid == cred->cr_groups[0]) return (1); return (group_is_supplementary(gid, cred)); @@ -1390,6 +1394,14 @@ groupmember(gid_t gid, const struct ucred *cred) int realgroupmember(gid_t gid, const struct ucred *cred) { + /* + * Although the equality test on 'cr_rgid' below doesn't access + * 'cr_groups', we check for the latter's length here as we assume that, + * if 'cr_ngroups' is 0, the passed 'struct ucred' is invalid, and + * 'cr_rgid' may not have been filled. + */ + groups_check_positive_len(cred->cr_ngroups); + if (gid == cred->cr_rgid) return (1); From nobody Fri Nov 15 13:00:52 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqcZr6Q9Gz5d70F; Fri, 15 Nov 2024 13:00: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqcZr4KXGz4pKv; Fri, 15 Nov 2024 13:00:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731675652; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hV+AXewl/gjVWCZu3ejTu8rdBZVjjuZpCtsme3KFjdE=; b=AU+a3lpuleQmU7Ms2YC1/KOY10qcl5STbviy79lnuarAfhERS+8cK2BFrB8W7x7MCo6EtJ 6eE2DVef3VLRzM2pWaPuI3DnGUmae/k75jQ492iTjyAnQdVIWb0RjNAc6uGvH6VBvawdxN 765PQ0UVDk+Qqv2SVLUR16QSetmN0GOf1cG930FJuVpQHd3V/FdcgwJ/v0plIVe83WHEU6 omhjQXIi/y+tLoiPH9dxmdyEZnhCBAeOd8sNNhzNwJblxyVKgiqs7nTkOoCiJ+UXTREwg9 V5ZgGn+yU4uoVUige1Ba+zk5r6DxeV4Eb27h0JAwGqv1hSHNCJH2z0W4JaL4tQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731675652; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hV+AXewl/gjVWCZu3ejTu8rdBZVjjuZpCtsme3KFjdE=; b=xuR7fuB2ogz2rtMecSj18K41fOsSS3cQpDdMnesJxZJ6DEcphKxc4kzf7zc+UpZksCGx73 OB6ryT0QAifkcKWQk6vPvnyrLYmkGFcPpLuc2iiZpI+Exw8ZXnne3vB6yUu3maBzN8eQj/ whQILMzw11OIceYWj8UnKlSWGHkTi0GgAZxJPdsesX+F8jkdW25gxdet10bTGAz03Y+WBh Hwc6It8X7nsKrSU99RUklrBvV1uox5RCM41XVR0mX7ko84wtylGd7W3NOd6glU3vsRX7Cc HGlNbB7Rvtj9DoQ1el3DTZDSzKor4RnT/HpgZrMXf486p6en5vnLYo72rQJijw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731675652; a=rsa-sha256; cv=none; b=KGRadkmh4t5oNWFgFsA/+SmrkopNEe1P+Dv+SEjKm6bHu0VOufm9uJqft2hj15BDwNKnVm HNz5mBD7aBzcTjfljb9qxcdyPig6IspHHqVY/Pk20GzmPfxa8Kb5VF3xldchhFBQBLsf5n R1mB8GaJhjneDpzZJCIzPZdUaHRXhUvIF3RKHu8Szpes+6/tzEvZN/d8/gwJ79kudbDo8r ZjXLtOf9eyrCmG0Bdaw863VhO/QiYD3DmrRd+dYwqV9bnuraey8e6lnEhASMXxJFAlN8UT L8pstm17W2dAydpjvsfiu/q+glx8MyE303asF9NOiSLKHDvMfsURTPzkrMhQoA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqcZr3Kw2zNnX; Fri, 15 Nov 2024 13:00:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AFD0qdf071280; Fri, 15 Nov 2024 13:00:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AFD0q98071277; Fri, 15 Nov 2024 13:00:52 GMT (envelope-from git) Date: Fri, 15 Nov 2024 13:00:52 GMT Message-Id: <202411151300.4AFD0q98071277@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: a10de3d1167a - stable/13 - cred: crextend(): Harden, simplify List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a10de3d1167a5e5039dedfa3848afd3158faeb93 Auto-Submitted: auto-generated The branch stable/13 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=a10de3d1167a5e5039dedfa3848afd3158faeb93 commit a10de3d1167a5e5039dedfa3848afd3158faeb93 Author: Olivier Certner AuthorDate: 2024-10-01 14:37:11 +0000 Commit: Olivier Certner CommitDate: 2024-11-15 12:59:09 +0000 cred: crextend(): Harden, simplify Harden by adding more assertions, and a plain panic in case of an unrepresentable size for the groups array (this can never happen after the change of the 'kern.ngroups' computation to impose some not too high maximum value a few commits ago). Fix an impact in kern_setgroups(). Simplify by removing the iterative process whose purpose is actually to determine the closest power of two that is greater than the wanted number of bytes. Using the proper target quantity (number of bytes) incidentally helps with eliminating divisions (and the reliance on sizeof(gid_t) being a power of two). Reviewed by: mhorne (older version) Approved by: markj (mentor) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D46915 (cherry picked from commit ea26c0e797525634dd25dede233ff2ded053cf2d) Approved by: markj (mentor) --- sys/kern/kern_prot.c | 55 +++++++++++++++++++++++++++++++--------------------- sys/sys/ucred.h | 6 +++++- 2 files changed, 38 insertions(+), 23 deletions(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index ede79f7d6bd2..ae3667146519 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -884,7 +884,8 @@ kern_setgroups(struct thread *td, int *ngrpp, gid_t *groups) ngrp = *ngrpp; } newcred = crget(); - crextend(newcred, ngrp); + if (ngrp != 0) + crextend(newcred, ngrp); PROC_LOCK(p); oldcred = crcopysafe(p, newcred); @@ -2224,6 +2225,13 @@ crcopy(struct ucred *dest, struct ucred *src) bcopy(&src->cr_startcopy, &dest->cr_startcopy, (unsigned)((caddr_t)&src->cr_endcopy - (caddr_t)&src->cr_startcopy)); + /* + * Avoids an assertion in crsetgroups() -> crextend(). Ideally, + * 'cr_ngroups' should be moved out of 'struct ucred''s bcopied area, + * but this would break the ABI, so is deferred until there is a real + * need to change the ABI. + */ + dest->cr_ngroups = 0; crsetgroups(dest, src->cr_ngroups, src->cr_groups); uihold(dest->cr_uidinfo); uihold(dest->cr_ruidinfo); @@ -2358,45 +2366,48 @@ crcopysafe(struct proc *p, struct ucred *cr) } /* - * Extend the passed in credential to hold n items. + * Extend the passed-in credentials to hold n groups. + * + * Must not be called after groups have been set. */ void crextend(struct ucred *cr, int n) { - int cnt; + size_t nbytes; MPASS2(cr->cr_ref == 1, "'cr_ref' must be 1 (referenced, unshared)"); + MPASS2(cr->cr_ngroups == 0, "groups on 'cr' already set!"); + groups_check_positive_len(n); + groups_check_max_len(n); - /* Truncate? */ if (n <= cr->cr_agroups) return; + nbytes = n * sizeof(gid_t); + if (nbytes < n) + panic("Too many groups (memory size overflow)! " + "Computation of 'kern.ngroups' should have prevented this, " + "please fix it. In the meantime, reduce 'kern.ngroups'."); + /* - * We extend by 2 each time since we're using a power of two - * allocator until we need enough groups to fill a page. - * Once we're allocating multiple pages, only allocate as many - * as we actually need. The case of processes needing a - * non-power of two number of pages seems more likely than - * a real world process that adds thousands of groups one at a - * time. + * We allocate a power of 2 larger than 'nbytes', except when that + * exceeds PAGE_SIZE, in which case we allocate the right multiple of + * pages. We assume PAGE_SIZE is a power of 2 (the call to roundup2() + * below) but do not need to for sizeof(gid_t). */ - if ( n < PAGE_SIZE / sizeof(gid_t) ) { - if (cr->cr_agroups == 0) - cnt = MAX(1, MINALLOCSIZE / sizeof(gid_t)); - else - cnt = cr->cr_agroups * 2; - - while (cnt < n) - cnt *= 2; + if (nbytes < PAGE_SIZE) { + if (!powerof2(nbytes)) + /* fls*() return a bit index starting at 1. */ + nbytes = 1 << flsl(nbytes); } else - cnt = roundup2(n, PAGE_SIZE / sizeof(gid_t)); + nbytes = roundup2(nbytes, PAGE_SIZE); /* Free the old array. */ if (cr->cr_groups != cr->cr_smallgroups) free(cr->cr_groups, M_CRED); - cr->cr_groups = malloc(cnt * sizeof(gid_t), M_CRED, M_WAITOK | M_ZERO); - cr->cr_agroups = cnt; + cr->cr_groups = malloc(nbytes, M_CRED, M_WAITOK | M_ZERO); + cr->cr_agroups = nbytes / sizeof(gid_t); } /* diff --git a/sys/sys/ucred.h b/sys/sys/ucred.h index 8152f962f3cb..eb5f0ad839e5 100644 --- a/sys/sys/ucred.h +++ b/sys/sys/ucred.h @@ -74,6 +74,10 @@ struct ucred { uid_t cr_uid; /* effective user id */ uid_t cr_ruid; /* real user id */ uid_t cr_svuid; /* saved user id */ + /* + * XXXOC: On the next ABI change, please move 'cr_ngroups' out of the + * copied area (crcopy() already copes with this change). + */ int cr_ngroups; /* number of groups */ gid_t cr_rgid; /* real group id */ gid_t cr_svgid; /* saved group id */ @@ -82,7 +86,7 @@ struct ucred { struct prison *cr_prison; /* jail(2) */ struct loginclass *cr_loginclass; /* login class */ u_int cr_flags; /* credential flags */ - void *cr_pspare2[2]; /* general use 2 */ + void *cr_pspare2[2]; /* general use 2 */ #define cr_endcopy cr_label struct label *cr_label; /* MAC label */ gid_t *cr_groups; /* groups */ From nobody Fri Nov 15 13:00:53 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqcZs5w5Xz5d6gd; Fri, 15 Nov 2024 13:00: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqcZs54WQz4pNV; Fri, 15 Nov 2024 13:00:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731675653; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n59KBt3o6Pe5sKXAGgx859yGXRUttzWwCazmIUt7uSk=; b=OmNOkJ2n0KFX7Ay8lXJMOWfN88YJDnCK4/Rf8golmdzWqbd2tsdF3hIzocleQEa/YqV9pl 8FU0jmP0Dy8hA4V/uXcsTZfDDf4dWNAil5eWkXjB7oQ90sTN3pk6n3WyT6oOLKDeAzKi/G xxZxfh4fCoTQW2DGKBZ0UZgwq8u+wyqxLIY7+LR/URZqfD29saHyLy7kX5Jf5DpUA6xHpa uZGG9m3zdACSeqYgTs2s0XGVYvT4X4Kq2ea8IMuwp784KNZdnX/CmAARY30c34E4g1Sy5i dPxYfkj7fmVYfg0mhZm2Rq3xpOqJZ1fWlSwrAq981clvjaSqenIgKM5UFFaGjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731675653; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n59KBt3o6Pe5sKXAGgx859yGXRUttzWwCazmIUt7uSk=; b=afJ9AoqaT6j11zLaVkGmJKnKEr39ySnQRk91m75rolfBMpljmrKldhhSL8qUR8yP/ZGynZ UpFKot3FZrodDMep4tw6PwEKhMJvpWzP6Z0dHuZlf50gjXCX0vxdvmJoj/Y7ZVwoBkrbIy g2TvRLhAiN2YTqTOTWYEi1+v7pGWqjxNUaAIIruYU8VNyUABhl0IZJPkllyiepsdVYTA2L Ne3DgZIYKwNwxXe+0040XbVePt9LnMK1+glQZizPMuFzygdyxV16Vp8r+zDu7eBdG8JIk3 /PahBadCN2Pm99I6L9UQP8+3UUtv8KPugpV0iQfVWD3lUCSRgM9n5JAtBzdUsw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731675653; a=rsa-sha256; cv=none; b=ggdeBQe4A8WvEmsyjhRG7xxOGC/yMQMoy/ocbDZWrhPGqc8OzNUNrJVwcmniv/Vef7RPs2 Cb6KHSExPn8j/euqvsJf5N25adOSuyuuMfgMYuBPqNYmbjE0sP4g6Rzrw2o032EKWGwKJ3 e0gblrtDFmUBf7EbsQiYcYMPueln3K8OAVgqLX0kPBDLIm5MiYJKaPmz4m4JSU9DZyJweq AFsYOIgEXNRzIobpn1J1uuWHEJ3gOSQk2lePQQRZ76Pu9R6ARo+/KamaGya0b0Szcw1CX6 pMhe7K502Dv2OqEkO2w3bN/gd+Ex+RL1LGknYIqq1VZJqc5Qr38AVOwSD1eD9A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqcZs4GYYzPNl; Fri, 15 Nov 2024 13:00:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AFD0rEa071318; Fri, 15 Nov 2024 13:00:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AFD0rQD071315; Fri, 15 Nov 2024 13:00:53 GMT (envelope-from git) Date: Fri, 15 Nov 2024 13:00:53 GMT Message-Id: <202411151300.4AFD0rQD071315@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: c985effa7d91 - stable/13 - cred: New crsetgroups_fallback() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c985effa7d918a0e3c129613191c7f2307acb4ba Auto-Submitted: auto-generated The branch stable/13 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=c985effa7d918a0e3c129613191c7f2307acb4ba commit c985effa7d918a0e3c129613191c7f2307acb4ba Author: Olivier Certner AuthorDate: 2024-10-02 14:16:20 +0000 Commit: Olivier Certner CommitDate: 2024-11-15 12:59:09 +0000 cred: New crsetgroups_fallback() Similar to crsetgroups(), but allows an empty group array in input, treating it like a one-element array containing the passed fallback group. Approved by: markj (mentor) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D46917 (cherry picked from commit d4e0d4d92e010b74404bddc87c1a1e8dbcaa25dd) Approved by: markj (mentor) --- sys/kern/kern_prot.c | 18 ++++++++++++++++++ sys/sys/ucred.h | 2 ++ 2 files changed, 20 insertions(+) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index ae3667146519..ddd45ef1357b 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -2495,6 +2495,24 @@ crsetgroups(struct ucred *cr, int ngrp, const gid_t *groups) groups_normalize(&cr->cr_ngroups, cr->cr_groups); } +/* + * Same as crsetgroups() but accepts an empty groups array. + * + * This function ensures that an effective GID is always present in credentials. + * An empty array is treated as a one-size one holding the passed effective GID + * fallback. + */ +void +crsetgroups_fallback(struct ucred *cr, int ngrp, const gid_t *groups, + const gid_t fallback) +{ + if (ngrp == 0) + /* Shortcut. */ + crsetgroups_internal(cr, 1, &fallback); + else + crsetgroups(cr, ngrp, groups); +} + /* * Get login name, if available. */ diff --git a/sys/sys/ucred.h b/sys/sys/ucred.h index eb5f0ad839e5..876919f56fb1 100644 --- a/sys/sys/ucred.h +++ b/sys/sys/ucred.h @@ -170,6 +170,8 @@ void crcowfree(struct thread *td); void cru2x(struct ucred *cr, struct xucred *xcr); void cru2xt(struct thread *td, struct xucred *xcr); void crsetgroups(struct ucred *cr, int ngrp, const gid_t *groups); +void crsetgroups_fallback(struct ucred *cr, int ngrp, const gid_t *groups, + const gid_t fallback); /* * Returns whether gid designates a primary group in cred. From nobody Fri Nov 15 13:00:55 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqcZw1XVKz5d6xK; Fri, 15 Nov 2024 13:00: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqcZv6Ytfz4pn3; Fri, 15 Nov 2024 13:00:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731675655; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yZYeu2fXkTrxLTPTlNy5e+YSqDoEEFuKKcNc9NeulOA=; b=izjTZcL4TUTcND1q6ZwOmUeKIsLBnVM+m0lkbDBseKN53YShnsFKeDRIygj5099R3zyMpE +jmRQQTulM0bVRgN9tXGKb3IVZDB+jKOTE2te99sdlmVAbuWBuUsg5ANheGfKp26vawWwK MvW9vXRIapwkFxc/PXvi5ith/lr4QOVsig0cQCzYAe0tQpiX/wP0xkBDWr+It3UxCiGQxK 9TrBI3SDl9afq1xsLlFiv4SJIk9yTAyoWLY5yqhClFZAFi+Zs9+yEnlN34JhL/r6SoS6Wm t6kafLIosBWTn1O78vuCFO6fQcFlRK4+eEryL7koy0HDzuAo0uNkvJ4XKqVcZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731675655; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yZYeu2fXkTrxLTPTlNy5e+YSqDoEEFuKKcNc9NeulOA=; b=USsokt8P23sMKGmrwL8qvMArd0f6qHEezheEQwH2SVh2rFWkvzogsop71e3egaaZWFCWyz PknlWsr9yPE+UcDLybp2koePZYfazONFtVoC2HyiAj8PtuDGA8qHWGtG8QkmKuMCUimkr+ sKTS77kiqrm7uGL6W4BuZhUBx3Wz5+uBJ7lI8S77ZClyumnGiWSS3Wf/m8dlsKOD8Yw5Pp TEB+UTDqy+mKruzoVnwPugX7qunSVsB6HX130l6DR/RJK8XYml3ylMbay+rFhGrCdOQ+DC BlI4Psjoz9vyPJAHnM9z5BqwiET5tnH/Joz38AhMg9TYx8st/JL4PlWWfUsgVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731675655; a=rsa-sha256; cv=none; b=WH6lS9umRgBAHZYHapy2F7DvjLuGin5DHpLb5buiXhbCFjxsCnn5zBtx5SlytabnpqmvtQ Oyp8MkjsA7KgJWrBqXtcv7FpcsDlWz3fwE4ZE3Htp6IhrckMEWOHrTlLpGhR0tvO2v/UwU t2qZ7uERzGp06Lq3MCM8/qEMNZF6fzfB7yei8WRzjEDF/WKkRqDJ9UizhJceLAar+Vb4/0 0j7sHaQoOd1Jjf0lig0kG5+fBs82X9RQpTnOWbrGtfWnL+2hllRq9PhN+C66Ln5SevkR5f GssYOtL3Hc8YsZyCqmQVs4uVPjf861SF+jWX3TfTF1LTf4UJeE6uF/TtSoQnqg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqcZv69tqzNsC; Fri, 15 Nov 2024 13:00:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AFD0tvA071436; Fri, 15 Nov 2024 13:00:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AFD0tXX071433; Fri, 15 Nov 2024 13:00:55 GMT (envelope-from git) Date: Fri, 15 Nov 2024 13:00:55 GMT Message-Id: <202411151300.4AFD0tXX071433@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: e603cc72074a - stable/13 - cred: groupmember(): Remove tolerance for empty 'cr_groups' List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e603cc72074a9ef9226f8e61c7e94a8e8141c322 Auto-Submitted: auto-generated The branch stable/13 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=e603cc72074a9ef9226f8e61c7e94a8e8141c322 commit e603cc72074a9ef9226f8e61c7e94a8e8141c322 Author: Olivier Certner AuthorDate: 2024-11-01 16:12:15 +0000 Commit: Olivier Certner CommitDate: 2024-11-15 12:59:10 +0000 cred: groupmember(): Remove tolerance for empty 'cr_groups' This tolerance had been introduced in commit caa309c8811d ("nfsd: Fix handling of credentials with cr_ngroups == 0", on 2024/10/21). Now that NFS has been modified in the previous commit (cfbe7a62dc62, "nfs, rpc: Ensure kernel credentials have at least one group") to rule out credentials with empty 'cr_groups' (and thus, no 'cr_gid'), remove it back. This basically reverts the above-mentioned commit except for the not directly related modifications it contains, which are still valid. Discussed with: rmacklem (by mail) Approved by: markj (mentor) MFC after: 3 days (cherry picked from commit 3f313682e030f1c99d9b223093e84d0a53a109af) Approved by: markj (mentor) --- sys/kern/kern_prot.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index ddd45ef1357b..e62efb285698 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1373,13 +1373,6 @@ int groupmember(gid_t gid, const struct ucred *cred) { - /* - * The nfsd server can use a credential with zero groups in it - * when certain mapped export credentials are specified via exports(5). - */ - if (cred->cr_ngroups == 0) - return (0); - groups_check_positive_len(cred->cr_ngroups); if (gid == cred->cr_groups[0]) From nobody Fri Nov 15 13:00:54 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqcZv1GkBz5d6rB; Fri, 15 Nov 2024 13:00: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqcZt5kzhz4pgy; Fri, 15 Nov 2024 13: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=1731675654; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1IX7EJ9KA2MJToFTnbQX0wVsiJuozVwuXnFlNA0xT1Y=; b=HofZLo5SolQZoPzwi88gkQ2COAO8086WIXhwduxC0Oo8TQK/sT46lhVrVddLzd25nKyAEc 5t4rlkBcsA+G4if7j9luZx/Dq17kNprTqKpg9VSW5C/VZlsjQa3wXnQbzX5ZzZO4v2YVAr xLtRmhBRWd/I5T6gUuSXsphKhHR/i6oLRzjTXPYvgYDHXUuAOcE5xWB7jqQwlRdRbE9KjP hpTa6wUK5Wc+d5c0YgJzrL8bQGK0jp4xEXuJa6jxAIHK1aKlurrZE4V0Fz9Qvzxw+lSn0p iyh/5izp6eNFuDAVMg9i87lcnuvUzbN890gKbBAaE6u741fsQT3VMXze9L2rWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731675654; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1IX7EJ9KA2MJToFTnbQX0wVsiJuozVwuXnFlNA0xT1Y=; b=c/yglwP6VHp1PAecwq3UNLul7hTlo1KpjaOKaojiF0JX21e5McIehoTmeOPHVJ/uOGEYht kstjyFnHRQDaW2LPdKXa030+I6CgV6kye8c2M4XLLkT3JyoBy3Qp/9pO3O2tGzipSYaxNY nFEyCrz/Hyxnx00s+WR9EtS24TVYP0ZgNe+ptn5nhiw6oTbRoLa+jDF+cU2FrB9g8+Ro1n 2bWQhYd0gFQBWiqRgkirV8QG6JgbHx2LAKg1qBhq0GWxLsTomUk7YVrqs4qxWSuVLC/rKF j+8XEjflff+vRNflCx7SPjPp3ZadMg59ojDQdxCgqzaTfEPJ6ukdgv00NgS9kg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731675654; a=rsa-sha256; cv=none; b=Lf5DLMKEQY5ABlLROKDvobp/PIXCyP3MaNxVi6HOOhaVLpxHXql3HO7BMhPTOzQGe6EX6y F3xtbB22CNs8V+7IoQr2tLFc/eqV2mFzqZYqmgxpY08bmOr52U3DO9Xmn8NMEUT5d478Q7 U8XGkPgI1Ge47fVICfSuuOptRWKzrni57ZUgEoD0sOn2pxf5YiS8GNJQCNv0RSdjLP2iXG rcXVV15u9C+xfWgOAzHhvIv/ka7KbHcxh/DHzlpN7qtUlkFA8OnowB4AojqQW9bUdS02yT LK6z26Ep5m7PW2q+zQTKfhEjEsZcSiCDJpW+td2CvhBNrs64WjiFPZLafa4QUw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqcZt5LgrzPLH; Fri, 15 Nov 2024 13:00:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AFD0sYt071380; Fri, 15 Nov 2024 13:00:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AFD0sjX071377; Fri, 15 Nov 2024 13:00:54 GMT (envelope-from git) Date: Fri, 15 Nov 2024 13:00:54 GMT Message-Id: <202411151300.4AFD0sjX071377@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: fb880a5a119d - stable/13 - nfs, rpc: Ensure kernel credentials have at least one 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 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: fb880a5a119d37d5ca35780235646d56fc21d4aa Auto-Submitted: auto-generated The branch stable/13 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=fb880a5a119d37d5ca35780235646d56fc21d4aa commit fb880a5a119d37d5ca35780235646d56fc21d4aa Author: Olivier Certner AuthorDate: 2024-10-02 14:28:59 +0000 Commit: Olivier Certner CommitDate: 2024-11-15 12:59:09 +0000 nfs, rpc: Ensure kernel credentials have at least one group This fixes several bugs where some 'struct ucred' in the kernel, constructed from user input (via nmount(2)) or obtained from other servers (e.g., gssd(8)), could have an unfilled 'cr_groups' field and whose 'cr_groups[0]' (or 'cr_gid', which is an alias) was later accessed, causing an uninitialized access giving random access rights. Use crsetgroups_fallback() to enforce a fallback group when possible. For NFS, the chosen fallback group is that of the NFS server in the current VNET (NFSD_VNET(nfsrv_defaultgid)). There does not seem to be any sensible fallback available in rpc code (sys/rpc/svc_auth.c, svc_getcred()) on AUTH_UNIX (TLS or not), so just fail credential retrieval there. Stock NSS sources, rpc.tlsservd(8) or rpc.tlsclntd(8) provide non-empty group lists, so will not be impacted. Discussed with: rmacklem (by mail) Approved by: markj (mentor) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D46918 (cherry picked from commit cfbe7a62dc62e8a5d7520cb5eb8ad7c4a9418e26) Approved by: markj (mentor) --- sys/fs/nfs/nfs_commonport.c | 4 +++- sys/fs/nfs/nfs_commonsubs.c | 5 +++-- sys/fs/nfsserver/nfs_nfsdport.c | 6 +++++- sys/kern/vfs_export.c | 12 ++++++++---- sys/rpc/rpcsec_gss/svc_rpcsec_gss.c | 2 +- sys/rpc/svc_auth.c | 8 ++++++-- 6 files changed, 26 insertions(+), 11 deletions(-) diff --git a/sys/fs/nfs/nfs_commonport.c b/sys/fs/nfs/nfs_commonport.c index b8e6bfc170a2..67dd8e14a22c 100644 --- a/sys/fs/nfs/nfs_commonport.c +++ b/sys/fs/nfs/nfs_commonport.c @@ -75,6 +75,7 @@ NFSD_VNET_DEFINE(struct nfsstatsv1 *, nfsstatsv1_p); NFSD_VNET_DECLARE(struct nfssockreq, nfsrv_nfsuserdsock); NFSD_VNET_DECLARE(nfsuserd_state, nfsrv_nfsuserd); +NFSD_VNET_DECLARE(gid_t, nfsrv_defaultgid); int nfs_pnfsio(task_fn_t *, void *); @@ -259,7 +260,8 @@ newnfs_copycred(struct nfscred *nfscr, struct ucred *cr) KASSERT(nfscr->nfsc_ngroups >= 0, ("newnfs_copycred: negative nfsc_ngroups")); cr->cr_uid = nfscr->nfsc_uid; - crsetgroups(cr, nfscr->nfsc_ngroups, nfscr->nfsc_groups); + crsetgroups_fallback(cr, nfscr->nfsc_ngroups, nfscr->nfsc_groups, + NFSD_VNET(nfsrv_defaultgid)); } /* diff --git a/sys/fs/nfs/nfs_commonsubs.c b/sys/fs/nfs/nfs_commonsubs.c index a9659079ed5f..cbac4ee85167 100644 --- a/sys/fs/nfs/nfs_commonsubs.c +++ b/sys/fs/nfs/nfs_commonsubs.c @@ -3978,8 +3978,9 @@ nfssvc_idname(struct nfsd_idargs *nidp) */ cr = crget(); cr->cr_uid = cr->cr_ruid = cr->cr_svuid = nidp->nid_uid; - crsetgroups(cr, nidp->nid_ngroup, grps); - cr->cr_rgid = cr->cr_svgid = cr->cr_groups[0]; + crsetgroups_fallback(cr, nidp->nid_ngroup, grps, + NFSD_VNET(nfsrv_defaultgid)); + cr->cr_rgid = cr->cr_svgid = cr->cr_gid; cr->cr_prison = curthread->td_ucred->cr_prison; prison_hold(cr->cr_prison); #ifdef MAC diff --git a/sys/fs/nfsserver/nfs_nfsdport.c b/sys/fs/nfsserver/nfs_nfsdport.c index 41443a5a79f4..caa63dc20a58 100644 --- a/sys/fs/nfsserver/nfs_nfsdport.c +++ b/sys/fs/nfsserver/nfs_nfsdport.c @@ -3304,7 +3304,11 @@ nfsd_excred(struct nfsrv_descript *nd, struct nfsexstuff *exp, NFSVNO_EXPORTANON(exp) || (nd->nd_flag & ND_AUTHNONE) != 0) { nd->nd_cred->cr_uid = credanon->cr_uid; - nd->nd_cred->cr_gid = credanon->cr_gid; + /* + * 'credanon' is already a 'struct ucred' that was built + * internally with calls to crsetgroups_fallback(), so + * we don't need a fallback here. + */ crsetgroups(nd->nd_cred, credanon->cr_ngroups, credanon->cr_groups); } else if ((nd->nd_flag & ND_GSS) == 0) { diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c index d9686edb3769..6eb20c8ed3a9 100644 --- a/sys/kern/vfs_export.c +++ b/sys/kern/vfs_export.c @@ -63,6 +63,10 @@ #include #include +#include + +NFSD_VNET_DECLARE(gid_t, nfsrv_defaultgid); + static MALLOC_DEFINE(M_NETADDR, "export_host", "Export host address structure"); #if defined(INET) || defined(INET6) @@ -135,8 +139,8 @@ vfs_hang_addrlist(struct mount *mp, struct netexport *nep, np->netc_exflags = argp->ex_flags; np->netc_anon = crget(); np->netc_anon->cr_uid = argp->ex_uid; - crsetgroups(np->netc_anon, argp->ex_ngroups, - argp->ex_groups); + crsetgroups_fallback(np->netc_anon, argp->ex_ngroups, + argp->ex_groups, NFSD_VNET(nfsrv_defaultgid)); np->netc_anon->cr_prison = &prison0; prison_hold(np->netc_anon->cr_prison); np->netc_numsecflavors = argp->ex_numsecflavors; @@ -214,8 +218,8 @@ vfs_hang_addrlist(struct mount *mp, struct netexport *nep, np->netc_exflags = argp->ex_flags; np->netc_anon = crget(); np->netc_anon->cr_uid = argp->ex_uid; - crsetgroups(np->netc_anon, argp->ex_ngroups, - argp->ex_groups); + crsetgroups_fallback(np->netc_anon, argp->ex_ngroups, argp->ex_groups, + NFSD_VNET(nfsrv_defaultgid)); np->netc_anon->cr_prison = &prison0; prison_hold(np->netc_anon->cr_prison); np->netc_numsecflavors = argp->ex_numsecflavors; diff --git a/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c b/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c index f5917a65a7b2..93a41dc045cc 100644 --- a/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c +++ b/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c @@ -510,7 +510,7 @@ rpc_gss_svc_getcred(struct svc_req *req, struct ucred **crp, int *flavorp) cr = client->cl_cred = crget(); cr->cr_uid = cr->cr_ruid = cr->cr_svuid = uc->uid; cr->cr_rgid = cr->cr_svgid = uc->gid; - crsetgroups(cr, uc->gidlen, uc->gidlist); + crsetgroups_fallback(cr, uc->gidlen, uc->gidlist, uc->gid); cr->cr_prison = curthread->td_ucred->cr_prison; prison_hold(cr->cr_prison); *crp = crhold(cr); diff --git a/sys/rpc/svc_auth.c b/sys/rpc/svc_auth.c index 86ce7d9aefd2..edb11426bd72 100644 --- a/sys/rpc/svc_auth.c +++ b/sys/rpc/svc_auth.c @@ -192,10 +192,12 @@ svc_getcred(struct svc_req *rqst, struct ucred **crp, int *flavorp) if ((xprt->xp_tls & (RPCTLS_FLAGS_CERTUSER | RPCTLS_FLAGS_DISABLED)) == RPCTLS_FLAGS_CERTUSER && flavor == AUTH_UNIX) { + if (xprt->xp_ngrps <= 0) + return (FALSE); cr = crget(); cr->cr_uid = cr->cr_ruid = cr->cr_svuid = xprt->xp_uid; crsetgroups(cr, xprt->xp_ngrps, xprt->xp_gidp); - cr->cr_rgid = cr->cr_svgid = xprt->xp_gidp[0]; + cr->cr_rgid = cr->cr_svgid = cr->cr_gid; cr->cr_prison = curthread->td_ucred->cr_prison; prison_hold(cr->cr_prison); *crp = cr; @@ -205,10 +207,12 @@ svc_getcred(struct svc_req *rqst, struct ucred **crp, int *flavorp) switch (flavor) { case AUTH_UNIX: xcr = (struct xucred *) rqst->rq_clntcred; + if (xcr->cr_ngroups <= 0) + return (FALSE); cr = crget(); cr->cr_uid = cr->cr_ruid = cr->cr_svuid = xcr->cr_uid; crsetgroups(cr, xcr->cr_ngroups, xcr->cr_groups); - cr->cr_rgid = cr->cr_svgid = cr->cr_groups[0]; + cr->cr_rgid = cr->cr_svgid = cr->cr_gid; cr->cr_prison = curthread->td_ucred->cr_prison; prison_hold(cr->cr_prison); *crp = cr; From nobody Fri Nov 15 13:00:56 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqcZx2Ln3z5d6pJ; Fri, 15 Nov 2024 13: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqcZx0HRHz4pcH; Fri, 15 Nov 2024 13: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=1731675657; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NhAxr52l2ZUXsher3k48Pw51QmOT/XqZo958b87Lgfo=; b=v5NR6dPi4cKFqeSKgI6t6hNyyMP+pUvJS8DyF6LM2zk3B6wzUHJB4O0AM06DTjEimVVNad PsSL/dbK2gvQMi4AG799hKt7MKXSTeYV85tQoo4sLtUlR07XKOEnzXVNIvMfO9z1FluV41 zkTMmbmnpnuDnpNP+z7L0XxlI3WHtOeXz+GYoYoC8+2gV0lJokybJHF43LKTAH5qoXbvKB ofrbLHxT0319/O79Zm7Hm9QOpzVgrPYKTOmuopXT3P0mUgkwZ5E4c4gvrs7HAWgkDsc7Sv rt1RtWOTNtAxevQJz8PCyuzf239coobR+EI4s+g/1OlBDNgMlf6M/NXxJKscmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731675657; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NhAxr52l2ZUXsher3k48Pw51QmOT/XqZo958b87Lgfo=; b=ZGeL+M4fjMDXHjRUlpEUknfdI62t2J+WR2ZojHuRuapDZ+IYTMKlk9qmCKvCBk69ogYGzu Flpxp+/0vLXbRn3J07kWu3E51gvWt7utwDS7uktCh+tfZ537It8T4wXOfPXXAoDOXrY3kS NcBGSgHliPUtRJhAzIgPUrNmmnEtZc5nEnAG7wCvMxLOM4UUcUKIFY9SUXJW4vHhEI57PX rLg0RjVJGNebqw/aX8C51oFlO1/myHnYSK21IurLFstAFXPhUQwzRjSp+qgqg0TdwTsKzF QRC3X7B2Ez8UWofoNC5ipqB+gQ1PrMMV9fkn3JFwS9XGd2cz4/UdbXLTS7X5qg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731675657; a=rsa-sha256; cv=none; b=AJcPeawSN1c9bPXgog/WK/YUnsgh47i4Wypfc2V+8Wmt8zJ55BZhYQnAz23lmCgsI5FXFp cth3MYASXZmX1g5WJ0BHl+BCBGefdzts777G1lFmr81Cd7cZKbcCAO9lRuNTMH1iee6A1J OOcHMSkxj2iFNUK+BUbdoB8wQ6TQqk7y32M1TcWZVrfUXHE0A0vytSaPg3HLrcKEze0mB6 4RtL0LA3Pvzks4a0GfZO0xKJG+cqLbQIXJQu9Z3RD6YQNg4ktr4WO/kk7gqDrQn7CFeMTp 4IMekQ8mZFLakJgylp0HVVXG0Ro1b6z8X67yga6FrIwbOVPgUBZl3fmPJ7Dovg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqcZw71VLzPHv; Fri, 15 Nov 2024 13:00:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AFD0uXI071493; Fri, 15 Nov 2024 13:00:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AFD0u7X071490; Fri, 15 Nov 2024 13:00:56 GMT (envelope-from git) Date: Fri, 15 Nov 2024 13:00:56 GMT Message-Id: <202411151300.4AFD0u7X071490@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: 4bef138e8d91 - stable/13 - nfs: Fallback to GID_NOGROUP on no groups List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4bef138e8d91cda4d26cb4f20c6f419908b0f7b6 Auto-Submitted: auto-generated The branch stable/13 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=4bef138e8d91cda4d26cb4f20c6f419908b0f7b6 commit 4bef138e8d91cda4d26cb4f20c6f419908b0f7b6 Author: Olivier Certner AuthorDate: 2024-11-03 10:26:37 +0000 Commit: Olivier Certner CommitDate: 2024-11-15 12:59:10 +0000 nfs: Fallback to GID_NOGROUP on no groups We cannot unconditionally access nfsd's VNET variables in 'sys/kern/vfs_export.c' nor 'sys/fs/nfsserver/nfs_nfsdsubs.c', as they may not have been compiled in depending on build options. So, forget about the extra mile of using the configured default group and use the hardcoded GID_NOGROUP (which differs only on systems running nfsuserd(8) and with a non-default GID for their "nogroup" group). Reported by: rpokala, bapt (MINIMAL compile breakup) Reported by: cy, David Wolfskill (panics caused by mountd(8)) Approved by: markj (mentor) Fixes: cfbe7a62dc62 ("nfs, rpc: Ensure kernel credentials have at least one group") (cherry picked from commit 5169d4307eb9c8b7bb0bd46d600012bcc12cbdae) --- sys/fs/nfs/nfs_commonport.c | 3 +-- sys/fs/nfs/nfs_commonsubs.c | 2 +- sys/kern/vfs_export.c | 9 +++------ 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/sys/fs/nfs/nfs_commonport.c b/sys/fs/nfs/nfs_commonport.c index 67dd8e14a22c..c84548b54fc1 100644 --- a/sys/fs/nfs/nfs_commonport.c +++ b/sys/fs/nfs/nfs_commonport.c @@ -75,7 +75,6 @@ NFSD_VNET_DEFINE(struct nfsstatsv1 *, nfsstatsv1_p); NFSD_VNET_DECLARE(struct nfssockreq, nfsrv_nfsuserdsock); NFSD_VNET_DECLARE(nfsuserd_state, nfsrv_nfsuserd); -NFSD_VNET_DECLARE(gid_t, nfsrv_defaultgid); int nfs_pnfsio(task_fn_t *, void *); @@ -261,7 +260,7 @@ newnfs_copycred(struct nfscred *nfscr, struct ucred *cr) ("newnfs_copycred: negative nfsc_ngroups")); cr->cr_uid = nfscr->nfsc_uid; crsetgroups_fallback(cr, nfscr->nfsc_ngroups, nfscr->nfsc_groups, - NFSD_VNET(nfsrv_defaultgid)); + GID_NOGROUP); } /* diff --git a/sys/fs/nfs/nfs_commonsubs.c b/sys/fs/nfs/nfs_commonsubs.c index cbac4ee85167..256342f146f0 100644 --- a/sys/fs/nfs/nfs_commonsubs.c +++ b/sys/fs/nfs/nfs_commonsubs.c @@ -3979,7 +3979,7 @@ nfssvc_idname(struct nfsd_idargs *nidp) cr = crget(); cr->cr_uid = cr->cr_ruid = cr->cr_svuid = nidp->nid_uid; crsetgroups_fallback(cr, nidp->nid_ngroup, grps, - NFSD_VNET(nfsrv_defaultgid)); + GID_NOGROUP); cr->cr_rgid = cr->cr_svgid = cr->cr_gid; cr->cr_prison = curthread->td_ucred->cr_prison; prison_hold(cr->cr_prison); diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c index 6eb20c8ed3a9..f3c11541ceea 100644 --- a/sys/kern/vfs_export.c +++ b/sys/kern/vfs_export.c @@ -42,6 +42,7 @@ #include #include +#include #include #include #include @@ -63,10 +64,6 @@ #include #include -#include - -NFSD_VNET_DECLARE(gid_t, nfsrv_defaultgid); - static MALLOC_DEFINE(M_NETADDR, "export_host", "Export host address structure"); #if defined(INET) || defined(INET6) @@ -140,7 +137,7 @@ vfs_hang_addrlist(struct mount *mp, struct netexport *nep, np->netc_anon = crget(); np->netc_anon->cr_uid = argp->ex_uid; crsetgroups_fallback(np->netc_anon, argp->ex_ngroups, - argp->ex_groups, NFSD_VNET(nfsrv_defaultgid)); + argp->ex_groups, GID_NOGROUP); np->netc_anon->cr_prison = &prison0; prison_hold(np->netc_anon->cr_prison); np->netc_numsecflavors = argp->ex_numsecflavors; @@ -219,7 +216,7 @@ vfs_hang_addrlist(struct mount *mp, struct netexport *nep, np->netc_anon = crget(); np->netc_anon->cr_uid = argp->ex_uid; crsetgroups_fallback(np->netc_anon, argp->ex_ngroups, argp->ex_groups, - NFSD_VNET(nfsrv_defaultgid)); + GID_NOGROUP); np->netc_anon->cr_prison = &prison0; prison_hold(np->netc_anon->cr_prison); np->netc_numsecflavors = argp->ex_numsecflavors; From nobody Fri Nov 15 13:00:58 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqcZy4C5wz5d76g; Fri, 15 Nov 2024 13:00: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqcZy1TJwz4pqX; Fri, 15 Nov 2024 13: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=1731675658; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Nw/MtC0pIaCWRALkSlUvUiKoKvYqqe/vMEFOmG6nR5I=; b=f0K7OOJidbPPP88WPYT6NUkdNmL+/rRCd4uVe+Zmj7+DGEkFsq6ITHaRzcUsz1mty8A1dC N3wXNmco/kRp+YUK2jjwJk8OePzxbw3t3F1QKmXBjKOICqux8+z1zwBTrKmTVGM6XGhiDS 9twtMyEiASBrjnDEzRlT05dZP0rr4wWPI2aD6hyqjKpQgzxbYiCBovyKNd6Yfm2eKcj8mF 27aB5LZkoFmpoXQPnFAP+VriNoQ5KfMY3OgRz9NnNzFEZefbyhUpFjLV1IbINXlP11NW+5 KRxZdXIDFGCytgZMiYm+RNhLxaxuB1frvwyGH0AObBljSSIpSqcEf1dlkNNdtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731675658; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Nw/MtC0pIaCWRALkSlUvUiKoKvYqqe/vMEFOmG6nR5I=; b=XMPFhR6bx+mCt0d2Otpk1M+2COCszNsgZ4/tbvRwRocl30RpLmDlAhUxQq5xCzScqSbMDt fRw2TZdymRdZnt3zRzfSSgjcyrkD+qpvLKslR/DLSEiYJHNY9KljVrTiVy0kl5bxsQp0Ek 5PK86nd9PP3VCBYIEd6+gArAnmoRG3ywy3cz8JYh3RiirjS+GsI6jQMydDMgG6jO/e+T0m DNKWYJtiZMdPiV9hgvYMFOfhf+Oc7TKkz9kV2L8W2SjZSsQ9SjD2nJafDSkKE0yytjPLhc SBXnAfzjgiy90yaH82/RRBSEuXSP9OHxFHnphXsUXy5tKxknIXB5d002wPxzZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731675658; a=rsa-sha256; cv=none; b=eIQUONAh/OA9KX7PfCgEfaKdnzQac4OLCIQl881hQPNgt/Ihtelssos0z68eJgB/dylxWv tpKXCyM2E8tFJ3k/jkyvstC4mcpx9oqBnEhyP4Jwp64RXiXPNgaz2geeeYOQs6uTKVEsnQ 5LmEm0CkQZcsEmZIKbQbJ8pES3HCEsPQVq5Il3q43gHZC9hBpBGefiviHxEcmske9altZ3 gn4iOMQurKZpVbcjXOGDvkPBjZIU8GMdNgTnLAWBRpvxuO59q/vlSZWvkSyXhc2nR133d4 4mBqrdWVM/iGDkVVfDaHsd8LliSrtWFERAKcumwhxTgY5DSeNjvyCV/KItjN1Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqcZy0dGBzP63; Fri, 15 Nov 2024 13:00:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AFD0wAg071545; Fri, 15 Nov 2024 13:00:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AFD0woV071542; Fri, 15 Nov 2024 13:00:58 GMT (envelope-from git) Date: Fri, 15 Nov 2024 13:00:58 GMT Message-Id: <202411151300.4AFD0woV071542@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: dcf34d8a828a - stable/13 - cred: crsetgroups(): Throw away old groups before crextend() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: dcf34d8a828aa2a369a2b738192180b8402ca319 Auto-Submitted: auto-generated The branch stable/13 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=dcf34d8a828aa2a369a2b738192180b8402ca319 commit dcf34d8a828aa2a369a2b738192180b8402ca319 Author: Olivier Certner AuthorDate: 2024-11-03 18:04:02 +0000 Commit: Olivier Certner CommitDate: 2024-11-15 12:59:10 +0000 cred: crsetgroups(): Throw away old groups before crextend() Now that crextend() asserts that groups are not set (rightfully so, since it may change the backing storage without copying the content of the old one), have crsetgroups() throw away the old groups before calling it, as it installs an entirely new set anyway. This allows to reuse unshared credentials by resetting their groups set, as NFS exports actually do. Reported by: cy Tested by: cy Fixes: ea26c0e79752 ("cred: crextend(): Harden, simplify") Pointy hat to: olce While here, as I forgot these credits in commit 5169d4307eb9 ("nfs: Fallback to GID_NOGROUP on no groups"): Tested by: cy, David Wolfskill (panics caused by mountd(8)) Tested by: kib (MINIMAL/custom kernel compile breakup) (cherry picked from commit 169a10853a50f9bbb037492e6f2737cce10f6b99) Approved by: markj (mentor) --- sys/kern/kern_prot.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index e62efb285698..482472025fdd 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -2215,16 +2215,14 @@ void crcopy(struct ucred *dest, struct ucred *src) { + /* + * Ideally, 'cr_ngroups' should be moved out of 'struct ucred''s bcopied + * area, but this would break the ABI, so is deferred until there is + * a compelling need to change it. + */ bcopy(&src->cr_startcopy, &dest->cr_startcopy, (unsigned)((caddr_t)&src->cr_endcopy - (caddr_t)&src->cr_startcopy)); - /* - * Avoids an assertion in crsetgroups() -> crextend(). Ideally, - * 'cr_ngroups' should be moved out of 'struct ucred''s bcopied area, - * but this would break the ABI, so is deferred until there is a real - * need to change the ABI. - */ - dest->cr_ngroups = 0; crsetgroups(dest, src->cr_ngroups, src->cr_groups); uihold(dest->cr_uidinfo); uihold(dest->cr_ruidinfo); @@ -2483,6 +2481,13 @@ crsetgroups(struct ucred *cr, int ngrp, const gid_t *groups) if (ngrp > ngroups_max + 1) ngrp = ngroups_max + 1; + /* + * crextend() asserts that groups are not set, as it may allocate a new + * backing storage without copying the content of the old one. Since we + * are going to install a completely new set anyway, signal that we + * consider the old ones thrown away. + */ + cr->cr_ngroups = 0; crextend(cr, ngrp); crsetgroups_internal(cr, ngrp, groups); groups_normalize(&cr->cr_ngroups, cr->cr_groups); From nobody Fri Nov 15 15:49:09 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqhK21kk3z5dHhr; Fri, 15 Nov 2024 15:49: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqhK21D8Zz47nj; Fri, 15 Nov 2024 15:49:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731685750; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M5+4zMtBlYoGmwmvRQK/BjbnC2Zy+L+mF6er1EzyOyM=; b=v/wNcmSGWHKP+JpZ5CKK/maYjtB05KxiWycpe/o714YJvowZuYSUeNJEU3Avm8Lp1MrLDn nscbdqe6y4ZQLUXNZBJXbZYjYO8F/guRr+P9bB/rGnQ4pg6irDda9ZnweQeioRQDccPL5d moQPFMMdKc5D5b8I8t1tdrzGtezbZr85bUJZom71hyVcBGHPIAWpalhv9cI9Xf45N4tAfn wZ1MrB3YlPHDS1dBXwdL3fopVRi3QlWP188sJKLDJi3MWXQvp1Ya7fE2nKM7M3aakRmjdf O2svtkYfvik4FA1qq+QtRLQoHNWCCiloVC7t4Fqb/k0Mz2yqSE4FPf63zqV4vQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731685750; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M5+4zMtBlYoGmwmvRQK/BjbnC2Zy+L+mF6er1EzyOyM=; b=cgdhDVavmoBCM545mRilUTqPkOQU0a4lbiAuaO0EY+uF7Xz9bjF/0i9S9AVLIbzPN0jMcf P1xGcpsPh6wWqvcjD8wkADmk8NCkSoAJY8X2/crudwwjIEiLzZiT06QU0PsrH8atl/s8T8 cB1RxVyC+SuGWUvm9ykIaKIRnPMtknsdE9/0EiJr1EW+TWrHMXovDdVw3xeUAg2S6ul4tq MuavJptDCOFOxB1AyxpY15ibuKypOhnAe12fvNv4fTc/c3GHFpDj57DJyEGL0GlBc9vRLP aPMHkGkA9w4qU3EkGT8zS81Rm6F4OWKZozeqArDBaIw/c2fZwLPOc2AzNW16IA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731685750; a=rsa-sha256; cv=none; b=iPcuF9fXbztSjSHFtO1crFK+9ykSgvtzz7HAimj1GeGjo6sZZt6w6yI8YsrKIfxzm5Rn4R FoBjDvToki/nJCuVAYaHJzYlMg6oxsqH7C6y5uCmyAxzNw8+dovd6NNdfLF7d/LBkEdpOs G0sHwuZHRduulLG60c8ZR0ObNOeCiy105fgUUnMyID/waMiFNAFMXw+0t86eqzdGCztI36 Vbb08/7gr5bbarC3VVpwHNC5AIUMbLKqg/pwakV7EfDsewYATzs2bswvyMf/VzMtugLpm5 FEbremLSkFwgVKqhACoawyMudlg1aTBMk/rHbhsvqpzFsMXJkNNW7dKCTZdxZA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqhK20mVBzSX4; Fri, 15 Nov 2024 15:49:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AFFn9Fx074857; Fri, 15 Nov 2024 15:49:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AFFn9k3074854; Fri, 15 Nov 2024 15:49:09 GMT (envelope-from git) Date: Fri, 15 Nov 2024 15:49:09 GMT Message-Id: <202411151549.4AFFn9k3074854@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Gallatin Subject: git: 4605a99b51ab - main - aio: remove write-only jobid & kernelinfo List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gallatin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4605a99b51ab72351d7554fbadbb24985f4667b1 Auto-Submitted: auto-generated The branch main has been updated by gallatin: URL: https://cgit.FreeBSD.org/src/commit/?id=4605a99b51ab72351d7554fbadbb24985f4667b1 commit 4605a99b51ab72351d7554fbadbb24985f4667b1 Author: Andrew Gallatin AuthorDate: 2024-11-15 15:41:34 +0000 Commit: Andrew Gallatin CommitDate: 2024-11-15 15:47:46 +0000 aio: remove write-only jobid & kernelinfo The jobid (which was stored in kernelinfo) was used to look up jobs until 1ce9182407f6, where it became essentially write only. Remove it to simplify the code and pave the way for future work to make aio scale better. Note this has been slated for removal "soon" for 18 years. Suggested by: jhb Reviewed by: kib Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D47583 --- sys/kern/vfs_aio.c | 42 +----------------------------------------- sys/sys/aio.h | 2 +- 2 files changed, 2 insertions(+), 42 deletions(-) diff --git a/sys/kern/vfs_aio.c b/sys/kern/vfs_aio.c index e7302f4b7a9e..eb08716fbeda 100644 --- a/sys/kern/vfs_aio.c +++ b/sys/kern/vfs_aio.c @@ -71,12 +71,6 @@ #include #include -/* - * Counter for allocating reference ids to new jobs. Wrapped to 1 on - * overflow. (XXX will be removed soon.) - */ -static u_long jobrefid; - /* * Counter for aio_fsync. */ @@ -297,7 +291,6 @@ struct aiocb_ops { long (*fetch_error)(struct aiocb *ujob); int (*store_status)(struct aiocb *ujob, long status); int (*store_error)(struct aiocb *ujob, long error); - int (*store_kernelinfo)(struct aiocb *ujob, long jobref); int (*store_aiocb)(struct aiocb **ujobp, struct aiocb *ujob); }; @@ -418,7 +411,6 @@ aio_onceonly(void) aiolio_zone = uma_zcreate("AIOLIO", sizeof(struct aioliojob), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); aiod_lifetime = AIOD_LIFETIME_DEFAULT; - jobrefid = 1; p31b_setcfg(CTL_P1003_1B_ASYNCHRONOUS_IO, _POSIX_ASYNCHRONOUS_IO); p31b_setcfg(CTL_P1003_1B_AIO_MAX, MAX_AIO_QUEUE); p31b_setcfg(CTL_P1003_1B_AIO_PRIO_DELTA_MAX, 0); @@ -1455,13 +1447,6 @@ aiocb_store_error(struct aiocb *ujob, long error) return (suword(&ujob->_aiocb_private.error, error)); } -static int -aiocb_store_kernelinfo(struct aiocb *ujob, long jobref) -{ - - return (suword(&ujob->_aiocb_private.kernelinfo, jobref)); -} - static int aiocb_store_aiocb(struct aiocb **ujobp, struct aiocb *ujob) { @@ -1475,7 +1460,6 @@ static struct aiocb_ops aiocb_ops = { .fetch_error = aiocb_fetch_error, .store_status = aiocb_store_status, .store_error = aiocb_store_error, - .store_kernelinfo = aiocb_store_kernelinfo, .store_aiocb = aiocb_store_aiocb, }; @@ -1486,7 +1470,6 @@ static struct aiocb_ops aiocb_ops_osigevent = { .fetch_error = aiocb_fetch_error, .store_status = aiocb_store_status, .store_error = aiocb_store_error, - .store_kernelinfo = aiocb_store_kernelinfo, .store_aiocb = aiocb_store_aiocb, }; #endif @@ -1507,7 +1490,6 @@ aio_aqueue(struct thread *td, struct aiocb *ujob, struct aioliojob *lj, int opcode; int error; int fd, kqfd; - int jid; u_short evflags; if (p->p_aioinfo == NULL) @@ -1517,7 +1499,6 @@ aio_aqueue(struct thread *td, struct aiocb *ujob, struct aioliojob *lj, ops->store_status(ujob, -1); ops->store_error(ujob, 0); - ops->store_kernelinfo(ujob, -1); if (num_queue_count >= max_queue_count || ki->kaio_count >= max_aio_queue_per_proc) { @@ -1630,16 +1611,8 @@ aio_aqueue(struct thread *td, struct aiocb *ujob, struct aioliojob *lj, job->fd_file = fp; mtx_lock(&aio_job_mtx); - jid = jobrefid++; job->seqno = jobseqno++; mtx_unlock(&aio_job_mtx); - error = ops->store_kernelinfo(ujob, jid); - if (error) { - error = EINVAL; - goto err3; - } - job->uaiocb._aiocb_private.kernelinfo = (void *)(intptr_t)jid; - if (opcode == LIO_NOP) { fdrop(fp, td); MPASS(job->uiop == &job->uio || job->uiop == NULL); @@ -2728,7 +2701,7 @@ filt_lio(struct knote *kn, long hint) struct __aiocb_private32 { int32_t status; int32_t error; - uint32_t kernelinfo; + uint32_t spare; }; #ifdef COMPAT_FREEBSD6 @@ -2807,7 +2780,6 @@ aiocb32_copyin_old_sigevent(struct aiocb *ujob, struct kaiocb *kjob, CP(job32, *kcb, aio_reqprio); CP(job32, *kcb, _aiocb_private.status); CP(job32, *kcb, _aiocb_private.error); - PTRIN_CP(job32, *kcb, _aiocb_private.kernelinfo); return (convert_old_sigevent32(&job32.aio_sigevent, &kcb->aio_sigevent)); } @@ -2844,7 +2816,6 @@ aiocb32_copyin(struct aiocb *ujob, struct kaiocb *kjob, int type) CP(job32, *kcb, aio_reqprio); CP(job32, *kcb, _aiocb_private.status); CP(job32, *kcb, _aiocb_private.error); - PTRIN_CP(job32, *kcb, _aiocb_private.kernelinfo); error = convert_sigevent32(&job32.aio_sigevent, &kcb->aio_sigevent); return (error); @@ -2886,15 +2857,6 @@ aiocb32_store_error(struct aiocb *ujob, long error) return (suword32(&ujob32->_aiocb_private.error, error)); } -static int -aiocb32_store_kernelinfo(struct aiocb *ujob, long jobref) -{ - struct aiocb32 *ujob32; - - ujob32 = (struct aiocb32 *)ujob; - return (suword32(&ujob32->_aiocb_private.kernelinfo, jobref)); -} - static int aiocb32_store_aiocb(struct aiocb **ujobp, struct aiocb *ujob) { @@ -2908,7 +2870,6 @@ static struct aiocb_ops aiocb32_ops = { .fetch_error = aiocb32_fetch_error, .store_status = aiocb32_store_status, .store_error = aiocb32_store_error, - .store_kernelinfo = aiocb32_store_kernelinfo, .store_aiocb = aiocb32_store_aiocb, }; @@ -2919,7 +2880,6 @@ static struct aiocb_ops aiocb32_ops_osigevent = { .fetch_error = aiocb32_fetch_error, .store_status = aiocb32_store_status, .store_error = aiocb32_store_error, - .store_kernelinfo = aiocb32_store_kernelinfo, .store_aiocb = aiocb32_store_aiocb, }; #endif diff --git a/sys/sys/aio.h b/sys/sys/aio.h index 919a6180b130..e979e0105e68 100644 --- a/sys/sys/aio.h +++ b/sys/sys/aio.h @@ -97,7 +97,7 @@ struct __aiocb_private { long status; long error; - void *kernelinfo; + void *spare; }; /* From nobody Fri Nov 15 17:16:41 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqkG26jJTz5dMtX; Fri, 15 Nov 2024 17:16:42 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqkG26Dzdz4P1S; Fri, 15 Nov 2024 17:16:42 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731691002; 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=Izucpl5EeaI8J0KotPP6psJnMQYR6mhXGzZ7WMcEhB4=; b=V1cPA2HXiBVcaqrhYP3tDVY+ahAHHuoE7Cxjw1LYv6vnCBpFE3bmWw246hT+BVlqiU15R+ AIF+M/uNmjE9UdwXCpulgVpMc9b5/lSj4+FoFV7NS5f85JzjyoIBvMDOHcXDEh3vM98lVl avlSf4T1iVTR5HASvF7Rmaly1/MdJWoAkhesntDd+1rT+BwC1Jw+jFzwIuNCTd+S1lbB3T FDa+tT8cZu+9vTIq4maVHP4CnNvh+pK9+U+m5HwilUGd9951q9u8ZNUQopfzSThaxU0Iod ifiN5d8vp/rTSbVdf13vSYGnGbbQ5/AqxBpyHw2qFM8BJEuobtAoytydHwRxPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731691002; 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=Izucpl5EeaI8J0KotPP6psJnMQYR6mhXGzZ7WMcEhB4=; b=f4sfQU3MaT6UOE+J7BQU0z2x96xADlZjFw/IHBD3nnjKXpHlmb+PeFIgDqF0barNTah1L+ S7kfKHhJ9opKEPuwWeJtXR4kltuWt1TjKeeDP3zWq5a4+CmJZ+tXDra+CdzFvWW8JcE8wJ j119y/ueGoqvb8XyqUZDJTdI6kzC88AK0WRsoUvi2C+9lZZPGQupMyi2IRmedEbP0zIWTd jjMkXcJD6flPP2AgKoAP9AOl7JoYoZ2Vocr1hxAGkjZFniSUVNoMD460d0VW/1dN3z37gU iX+z1PvqyEt0lsZsFqFD1G5RUr3m+VOvEFo3ZBRef01Q07wcBRkQjrthSvtjzg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731691002; a=rsa-sha256; cv=none; b=qkSWrbpzkxd2Z3HdIuBOpPf3ii+ReEYftcG5qmPkATmGXPM4/+mA1+eodQitk1w7CaXJvK 7+sLD12ui/eTWIhKqKFYM0pZd5se238UsvdywzALE4G4lRb6BeIj7qgGKhcVRI7UZ4awg9 3qsOdN/yklJT+ODRcEd7r/nQvJ+2cLOOWf5We3YqxlbUiTiLTCueOE+elfy5zWTnrShe7J ZxsnrD0p98wO8SwgjimajuqQ0/zTeiXll1N08DU6tv+620nZT/lg2dsv1/6VTwXUnFqCXH T1JIcQOn8hT52/pZaECRdTNQfBrU2HxRy2jIg+9YAdZJtfmXU/b0taDxrmELPg== Received: from [IPV6:2601:5c0:4200:b830:613c:faf4:87f9:d602] (unknown [IPv6:2601:5c0:4200:b830:613c:faf4:87f9:d602]) (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 4XqkG24WZMzJT2; Fri, 15 Nov 2024 17:16:42 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <4654dc16-8236-4f17-bed8-27258cce6120@FreeBSD.org> Date: Fri, 15 Nov 2024 12:16:41 -0500 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: ce4dcb97ca43 - main - zfs: merge openzfs/zfs@9c56b8ec7 Content-Language: en-US To: Martin Matuska , Konstantin Belousov References: <202408101047.47AAlZxm046555@gitrepo.freebsd.org> From: John Baldwin Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org In-Reply-To: <202408101047.47AAlZxm046555@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 8/10/24 03:47, Martin Matuska wrote: > The branch main has been updated by mm: > > URL: https://cgit.FreeBSD.org/src/commit/?id=ce4dcb97ca433b2a2f03fbae957dae0ff16f6f51 > > commit ce4dcb97ca433b2a2f03fbae957dae0ff16f6f51 > Merge: 54a543d5ea3a 9c56b8ec7855 > Author: Martin Matuska > AuthorDate: 2024-08-10 09:15:30 +0000 > Commit: Martin Matuska > CommitDate: 2024-08-10 09:43:43 +0000 > > zfs: merge openzfs/zfs@9c56b8ec7 > > Notable upstream pull request merges: > #15817 5536c0dee Sync AUX label during pool import > #15889 c7ada64bb ddt: dedup table quota enforcement > #15890 62e7d3c89 ddt: add support for prefetching tables into the ARC > #15894 e26b3771e spa_preferred_class: pass the entire zio > #15894 d54d0fff3 dnode: allow storage class to be overridden by object type > #16197 55427add3 Several improvements to ARC shrinking > #16217 -multiple JSON output for various zfs and zpool subcommands > #16248 24e6585e7 libzfs.h: Set ZFS_MAXPROPLEN and ZPOOL_MAXPROPLEN > to ZAP_MAXVALUELEN > #16264 9dfc5c4a0 Fix long_free_dirty accounting for small files > #16268 ed0db1cc8 Make txg_wait_synced conditional in zfsvfs_teardown, > for FreeBSD > #16288 d60debbf5 Fix sa_add_projid to lookup and update SA_ZPL_DXATTR > #16308 ec580bc52 zfs: add bounds checking to zil_parse > #16310 c21dc56ea Fix zdb_dump_block for little endian > #16315 7ddc1f737 zil: add stats for commit failure/fallback > #16326 b0bf14cdb abd: lift ABD zero scan from zio_compress_data() > to abd_cmp_zero() > #16337 c8184d714 Block cloning conditionally destroy ARC buffer > #16338 dbe07928b Add support for multiple lines to the sharenfs property > for FreeBSD > #16374 1a3e32e6a Cleanup DB_DNODE() macros usage > #16374 ed87d456e Skip dnode handles use when not needed > #16346 fb6d8cf22 Add some missing vdev properties > #16364 670147be5 zvol: ensure device minors are properly cleaned up > #16382 dea8fabf7 FreeBSD: Fix RLIMIT_FSIZE handling for block cloning > #16387 aef452f10 Improve zfs_blkptr_verify() > #16395 cbcb52243 Fix the names of some FreeBSD sysctls in > include/tunables.cfg > #16401 5b9f3b766 Soften pruning threshold on not evictable metadata > #16404 cdd53fea1 FreeBSD: Add missing memory reclamation accounting > #16404 1fdcb653b Once more refactor arc_summary output > #16419 1f5bf91a8 Fix memory corruption during parallel zpool import > with -o cachefile > #16426 cf6e8b218 zstream: remove duplicate highbit64 definition > > Obtained from: OpenZFS > OpenZFS commit: 9c56b8ec7855119c8948c551ee28086a11465a56 This merge reverted the changes from: commit b068bb09a1a82d9fef0e939ad6135443a959e290 Author: Konstantin Belousov Date: Mon Jan 8 07:18:40 2024 +0200 Add vnode_pager_clean_{a,}sync(9) Bump __FreeBSD_version for ZFS use. Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D43356 Specifically, it undid this change: diff --git a/sys/contrib/openzfs/include/os/freebsd/spl/sys/vnode.h b/sys/contri b/openzfs/include/os/freebsd/spl/sys/vnode.h index 75c32f221ffd..7a3b38736a58 100644 --- a/sys/contrib/openzfs/include/os/freebsd/spl/sys/vnode.h +++ b/sys/contrib/openzfs/include/os/freebsd/spl/sys/vnode.h @@ -100,11 +101,11 @@ vn_flush_cached_data(vnode_t *vp, boolean_t sync) #else if (vp->v_object->flags & OBJ_MIGHTBEDIRTY) { #endif - int flags = sync ? OBJPC_SYNC : 0; vn_lock(vp, LK_SHARED | LK_RETRY); - zfs_vmobject_wlock(vp->v_object); - vm_object_page_clean(vp->v_object, 0, 0, flags); - zfs_vmobject_wunlock(vp->v_object); + if (sync) + vnode_pager_clean_sync(vp); + else + vnode_pager_clean_async(vp); VOP_UNLOCK1(vp); } } (The addition of the #include from this commit remains as a local diff in main FWIW) It looks like vnode_pager_clean_*sync() are thin wrappers around vm_object_page_clean() still in main, but I'm curious if this change needs to be kept in main and/or upstreamed? -- John Baldwin From nobody Fri Nov 15 17:38:57 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xqklk1q2sz5dP1x; Fri, 15 Nov 2024 17:38: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xqklk1H2Sz4Qfp; Fri, 15 Nov 2024 17:38:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731692338; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uu2WI8IvlMMijOcZINeHjbYfN1qn9mNjZx3L/4+zZWw=; b=mGnd6U+BM6q1xC19gbCX+KORyGKaC1/hR+e+Q+O+Ml2+XdLQWqm0AgByfg2jwjIeGmtrVl RYweR+hM8dnWdAYaor3zw9YVOft91thwtldKc6mjle+U0Rh9T+yRuGrysxUt4Y00z52gZQ iFgg5qi7Mzu91l+vqjfRgu4+aH7obDk72R+PztNT36s91yFXFSdq5Sep05lWMeqlagpk6K RdTidBjosj9hKxSTcoZPMK9yhiqRzPYq/Mb+25V7sOWPwAFU+x+k/AmWU6z+NFI5rECuoq hNNQGftAFirPt0ZITqK2MIndbcNoYT2kI8C5CvDDt05J66vptY4EydfUc1dzcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731692338; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uu2WI8IvlMMijOcZINeHjbYfN1qn9mNjZx3L/4+zZWw=; b=kDxFPwF1UtpnDpE7Hz46f0jqrZlu3GiDut07+RHdCVz26txRPNFFTCtOdq+61h3r8LqvLB 3tufo70fw5ga7Bipw6SPG0APlPckKBCVPxffTtYrVi05UOzahmAWt+5zM1XsiICAS17DLQ VD/mxkANXkK7VOKU8Hix9X8/wm9PZbuGiAxYPcwdoI9nfWybAS2yNPuBTX0kwwlZcawdqc 7zYGGT9QSdHybhGTkBq0PqdI+JOIRk0bGLchi9dR0oqUHshdAUuoeQpJyaoFcIeZRSwpKO 5uo9kV7kxkAL6q/snW2YDTr+eHIjSPxB/4wak5JsuaI7u7VitapkTY8Lv5D6rQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731692338; a=rsa-sha256; cv=none; b=d8cuhBeMFNL+Q8tBWAgmawEYESaPDL9aqJYJQcOlnJvoapPncM8oa0w50BchVM1fAEuNQm M/XCmV9MnWinQZzR0rb6PDY9Xjqim5Zefq38V48l2Oxt05Qi+ja8bLyQMXIJUsxIUBz3Tk X7K6gSVNN5TUCuTG+gTpOkuNlHSvrhjDMQ06PH4d/Qpivwk6jzVQFE5HTnTLr1VhxWgwhn F2nLoro04VrRXlXHBYRHr8U8exilbflA3qDtN/M+iLmnp8/mm/CiQS0Tw6FNK92mj76Yfz jo/0SGkmEqn+jSzHf/sBL3D/q0HhmA4lNZUcAVDAnWcW1QV+RsCmfW8t9+zOQQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xqklk0kcjzXc2; Fri, 15 Nov 2024 17:38:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AFHcvXB082029; Fri, 15 Nov 2024 17:38:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AFHcvTg082026; Fri, 15 Nov 2024 17:38:57 GMT (envelope-from git) Date: Fri, 15 Nov 2024 17:38:57 GMT Message-Id: <202411151738.4AFHcvTg082026@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Randall Stewart Subject: git: 12fc79619aca - main - Change the SOCKBUF_LOCK calls to use the more refined SOCK_XXXBUF_LOCK/UNLOCK. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rrs X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 12fc79619acaa3041f9c032bc9afe7d2005b942e Auto-Submitted: auto-generated The branch main has been updated by rrs: URL: https://cgit.FreeBSD.org/src/commit/?id=12fc79619acaa3041f9c032bc9afe7d2005b942e commit 12fc79619acaa3041f9c032bc9afe7d2005b942e Author: Randall Stewart AuthorDate: 2024-11-15 17:37:05 +0000 Commit: Randall Stewart CommitDate: 2024-11-15 17:37:05 +0000 Change the SOCKBUF_LOCK calls to use the more refined SOCK_XXXBUF_LOCK/UNLOCK. The socket buffer locking used to be standard on SOCKBUF_LOCK/UNLOCK. But we are now moving to a more elegant SOCK_SENDBUF_LOCK/UNLOCK and SOCK_RECVBUF_LOCK/UNLOCK. Lets get BBR and Rack to use these updated macros. Reviewed by:glebius, tuexen, rscheff Differential Revision:https://reviews.freebsd.org/D47542 --- sys/netinet/tcp_stacks/bbr.c | 34 +++++++++++++++++----------------- sys/netinet/tcp_stacks/rack.c | 40 ++++++++++++++++++++-------------------- 2 files changed, 37 insertions(+), 37 deletions(-) diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c index 4ab12884b379..01a864f59bbe 100644 --- a/sys/netinet/tcp_stacks/bbr.c +++ b/sys/netinet/tcp_stacks/bbr.c @@ -7823,7 +7823,7 @@ bbr_process_ack(struct mbuf *m, struct tcphdr *th, struct socket *so, (int)(ticks - tp->t_badrxtwin) < 0) bbr_cong_signal(tp, th, CC_RTO_ERR, NULL); } - SOCKBUF_LOCK(&so->so_snd); + SOCK_SENDBUF_LOCK(so); acked_amount = min(acked, (int)sbavail(&so->so_snd)); tp->snd_wnd -= acked_amount; mfree = sbcut_locked(&so->so_snd, acked_amount); @@ -8295,7 +8295,7 @@ bbr_process_data(struct mbuf *m, struct tcphdr *th, struct socket *so, thflags = tcp_get_flags(th) & TH_FIN; KMOD_TCPSTAT_ADD(tcps_rcvpack, (int)nsegs); KMOD_TCPSTAT_ADD(tcps_rcvbyte, tlen); - SOCKBUF_LOCK(&so->so_rcv); + SOCK_RECVBUF_LOCK(so); if (so->so_rcv.sb_state & SBS_CANTRCVMORE) m_freem(m); else @@ -8528,7 +8528,7 @@ bbr_do_fastnewdata(struct mbuf *m, struct tcphdr *th, struct socket *so, newsize = tcp_autorcvbuf(m, th, so, tp, tlen); /* Add data to socket buffer. */ - SOCKBUF_LOCK(&so->so_rcv); + SOCK_RECVBUF_LOCK(so); if (so->so_rcv.sb_state & SBS_CANTRCVMORE) { m_freem(m); } else { @@ -12138,7 +12138,7 @@ again: len = 0; rsm = NULL; if (flags & TH_RST) { - SOCKBUF_LOCK(sb); + SOCK_SENDBUF_LOCK(so); goto send; } recheck_resend: @@ -12205,7 +12205,7 @@ recheck_resend: } else { /* Retransmitting SYN */ rsm = NULL; - SOCKBUF_LOCK(sb); + SOCK_SENDBUF_LOCK(so); goto send; } } else @@ -12304,7 +12304,7 @@ recheck_resend: kern_prefetch(end_rsm, &prefetch_rsm); prefetch_rsm = 1; } - SOCKBUF_LOCK(sb); + SOCK_SENDBUF_LOCK(so); /* * If snd_nxt == snd_max and we have transmitted a FIN, the * sb_offset will be > 0 even if so_snd.sb_cc is 0, resulting in a @@ -12721,7 +12721,7 @@ recheck_resend: * No reason to send a segment, just return. */ just_return: - SOCKBUF_UNLOCK(sb); + SOCK_SENDBUF_UNLOCK(so); just_return_nolock: if (tot_len) slot = bbr_get_pacing_delay(bbr, bbr->r_ctl.rc_bbr_hptsi_gain, tot_len, cts, 0); @@ -12829,7 +12829,7 @@ send: len--; } } - SOCKBUF_LOCK_ASSERT(sb); + SOCK_SENDBUF_LOCK_ASSERT(so); if (len > 0) { if ((tp->snd_una == tp->snd_max) && (bbr_calc_time(cts, bbr->r_ctl.rc_went_idle_time) >= bbr_rtt_probe_time)) { @@ -12945,7 +12945,7 @@ send: if (tp->t_port) { if (V_tcp_udp_tunneling_port == 0) { /* The port was removed?? */ - SOCKBUF_UNLOCK(&so->so_snd); + SOCK_SENDBUF_UNLOCK(so); return (EHOSTUNREACH); } hdrlen += sizeof(struct udphdr); @@ -13036,7 +13036,7 @@ send: * byte of the payload can be put into the * TCP segment. */ - SOCKBUF_UNLOCK(&so->so_snd); + SOCK_SENDBUF_UNLOCK(so); error = EMSGSIZE; sack_rxmit = 0; goto out; @@ -13106,7 +13106,7 @@ send: if (m == NULL) { BBR_STAT_INC(bbr_failed_mbuf_aloc); bbr_log_enobuf_jmp(bbr, len, cts, __LINE__, len, 0, 0); - SOCKBUF_UNLOCK(sb); + SOCK_SENDBUF_UNLOCK(so); error = ENOBUFS; sack_rxmit = 0; goto out; @@ -13150,7 +13150,7 @@ send: * is the only thing to do. */ BBR_STAT_INC(bbr_offset_drop); - SOCKBUF_UNLOCK(sb); + SOCK_SENDBUF_UNLOCK(so); (void)m_free(m); return (-EFAULT); /* tcp_drop() */ } @@ -13210,7 +13210,7 @@ send: tso = 0; } if (m->m_next == NULL) { - SOCKBUF_UNLOCK(sb); + SOCK_SENDBUF_UNLOCK(so); (void)m_free(m); error = ENOBUFS; sack_rxmit = 0; @@ -13246,9 +13246,9 @@ send: !(flags & TH_SYN)) { flags |= TH_PUSH; } - SOCKBUF_UNLOCK(sb); + SOCK_SENDBUF_UNLOCK(so); } else { - SOCKBUF_UNLOCK(sb); + SOCK_SENDBUF_UNLOCK(so); if (tp->t_flags & TF_ACKNOW) KMOD_TCPSTAT_INC(tcps_sndacks); else if (flags & (TH_SYN | TH_FIN | TH_RST)) @@ -13274,7 +13274,7 @@ send: m->m_data += max_linkhdr; m->m_len = hdrlen; } - SOCKBUF_UNLOCK_ASSERT(sb); + SOCK_SENDBUF_UNLOCK_ASSERT(so); m->m_pkthdr.rcvif = (struct ifnet *)0; #ifdef MAC mac_inpcb_create_mbuf(inp, m); @@ -13766,7 +13766,7 @@ nomore: * Everything else will just have to retransmit with the timer * (no pacer). */ - SOCKBUF_UNLOCK_ASSERT(sb); + SOCK_SENDBUF_UNLOCK_ASSERT(so); BBR_STAT_INC(bbr_saw_oerr); /* Clear all delay/early tracks */ bbr->r_ctl.rc_hptsi_agg_delay = 0; diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index 30b0704ed7d6..9561c957bb00 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -11992,7 +11992,7 @@ rack_process_ack(struct mbuf *m, struct tcphdr *th, struct socket *so, /* Must be non-newreno (cubic) getting too ahead of itself */ tp->snd_cwnd = p_cwnd; } - SOCKBUF_LOCK(&so->so_snd); + SOCK_SENDBUF_LOCK(so); acked_amount = min(acked, (int)sbavail(&so->so_snd)); tp->snd_wnd -= acked_amount; mfree = sbcut_locked(&so->so_snd, acked_amount); @@ -12378,7 +12378,7 @@ rack_process_data(struct mbuf *m, struct tcphdr *th, struct socket *so, thflags = tcp_get_flags(th) & TH_FIN; KMOD_TCPSTAT_ADD(tcps_rcvpack, nsegs); KMOD_TCPSTAT_ADD(tcps_rcvbyte, tlen); - SOCKBUF_LOCK(&so->so_rcv); + SOCK_RECVBUF_LOCK(so); if (so->so_rcv.sb_state & SBS_CANTRCVMORE) { m_freem(m); } else { @@ -12620,7 +12620,7 @@ rack_do_fastnewdata(struct mbuf *m, struct tcphdr *th, struct socket *so, newsize = tcp_autorcvbuf(m, th, so, tp, tlen); /* Add data to socket buffer. */ - SOCKBUF_LOCK(&so->so_rcv); + SOCK_RECVBUF_LOCK(so); if (so->so_rcv.sb_state & SBS_CANTRCVMORE) { m_freem(m); } else { @@ -12779,7 +12779,7 @@ rack_fastack(struct mbuf *m, struct tcphdr *th, struct socket *so, struct mbuf *mfree; rack_ack_received(tp, rack, th->th_ack, nsegs, CC_ACK, 0); - SOCKBUF_LOCK(&so->so_snd); + SOCK_SENDBUF_LOCK(so); mfree = sbcut_locked(&so->so_snd, acked); tp->snd_una = th->th_ack; /* Note we want to hold the sb lock through the sendmap adjust */ @@ -16108,7 +16108,7 @@ rack_do_compressed_ack_processing(struct tcpcb *tp, struct socket *so, struct mb /* Must be non-newreno (cubic) getting too ahead of itself */ tp->snd_cwnd = p_cwnd; } - SOCKBUF_LOCK(&so->so_snd); + SOCK_SENDBUF_LOCK(so); mfree = sbcut_locked(&so->so_snd, acked_amount); tp->snd_una = high_seq; /* Note we want to hold the sb lock through the sendmap adjust */ @@ -19531,9 +19531,9 @@ again: rack->r_fast_output = 0; rack->r_ctl.fsb.left_to_send = 0; /* At the end of fast_output scale up the sb */ - SOCKBUF_LOCK(&rack->rc_inp->inp_socket->so_snd); + SOCK_SENDBUF_LOCK(rack->rc_inp->inp_socket); rack_sndbuf_autoscale(rack); - SOCKBUF_UNLOCK(&rack->rc_inp->inp_socket->so_snd); + SOCK_SENDBUF_UNLOCK(rack->rc_inp->inp_socket); } if (tp->t_rtttime == 0) { tp->t_rtttime = ticks; @@ -20111,7 +20111,7 @@ again: len = 0; rsm = NULL; if (flags & TH_RST) { - SOCKBUF_LOCK(&inp->inp_socket->so_snd); + SOCK_SENDBUF_LOCK(inp->inp_socket); so = inp->inp_socket; sb = &so->so_snd; goto send; @@ -20370,7 +20370,7 @@ again: kern_prefetch(end_rsm, &prefetch_rsm); prefetch_rsm = 1; } - SOCKBUF_LOCK(sb); + SOCK_SENDBUF_LOCK(so); if ((sack_rxmit == 0) && (TCPS_HAVEESTABLISHED(tp->t_state) || (tp->t_flags & TF_FASTOPEN))) { @@ -20880,7 +20880,7 @@ dontupdate: * No reason to send a segment, just return. */ just_return: - SOCKBUF_UNLOCK(sb); + SOCK_SENDBUF_UNLOCK(so); just_return_nolock: { int app_limited = CTF_JR_SENT_DATA; @@ -21139,7 +21139,7 @@ send: rack->r_ctl.rc_agg_early = 0; rack->r_early = 0; rack->r_late = 0; - SOCKBUF_UNLOCK(&so->so_snd); + SOCK_SENDBUF_UNLOCK(so); goto skip_all_send; } } @@ -21356,7 +21356,7 @@ send: if (tp->t_port) { if (V_tcp_udp_tunneling_port == 0) { /* The port was removed?? */ - SOCKBUF_UNLOCK(&so->so_snd); + SOCK_SENDBUF_UNLOCK(so); #ifdef TCP_ACCOUNTING crtsc = get_cyclecount(); if (tp->t_flags2 & TF2_TCP_ACCOUNTING) { @@ -21459,7 +21459,7 @@ send: * byte of the payload can be put into the * TCP segment. */ - SOCKBUF_UNLOCK(&so->so_snd); + SOCK_SENDBUF_UNLOCK(so); error = EMSGSIZE; sack_rxmit = 0; goto out; @@ -21542,7 +21542,7 @@ send: m = m_gethdr(M_NOWAIT, MT_DATA); if (m == NULL) { - SOCKBUF_UNLOCK(sb); + SOCK_SENDBUF_UNLOCK(so); error = ENOBUFS; sack_rxmit = 0; goto out; @@ -21600,7 +21600,7 @@ send: tso = 0; } if (m->m_next == NULL) { - SOCKBUF_UNLOCK(sb); + SOCK_SENDBUF_UNLOCK(so); (void)m_free(m); error = ENOBUFS; sack_rxmit = 0; @@ -21644,9 +21644,9 @@ send: add_flag |= RACK_HAD_PUSH; } - SOCKBUF_UNLOCK(sb); + SOCK_SENDBUF_UNLOCK(so); } else { - SOCKBUF_UNLOCK(sb); + SOCK_SENDBUF_UNLOCK(so); if (tp->t_flags & TF_ACKNOW) KMOD_TCPSTAT_INC(tcps_sndacks); else if (flags & (TH_SYN | TH_FIN | TH_RST)) @@ -21669,7 +21669,7 @@ send: m->m_data += max_linkhdr; m->m_len = hdrlen; } - SOCKBUF_UNLOCK_ASSERT(sb); + SOCK_SENDBUF_UNLOCK_ASSERT(so); m->m_pkthdr.rcvif = (struct ifnet *)0; #ifdef MAC mac_inpcb_create_mbuf(inp, m); @@ -22331,7 +22331,7 @@ out: len = n_len; sb_offset = tp->snd_max - tp->snd_una; /* Re-lock for the next spin */ - SOCKBUF_LOCK(sb); + SOCK_SENDBUF_LOCK(so); goto send; } } else { @@ -22350,7 +22350,7 @@ out: len = n_len; sb_offset = tp->snd_max - tp->snd_una; /* Re-lock for the next spin */ - SOCKBUF_LOCK(sb); + SOCK_SENDBUF_LOCK(so); goto send; } } From nobody Fri Nov 15 20:10:40 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xqp6n206Tz5dWdf; Fri, 15 Nov 2024 20:10: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xqp6n19gvz4dHL; Fri, 15 Nov 2024 20:10:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731701441; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r+xjo5tw2nSX4+eUczI/x9nEseBUD+aZhNaFp91BgnE=; b=ESRUU3yjk/+0/FAkEMd5H4q/7hR/yK3Rufg0ce3q6+Pn/F/lkEgZA2TSlHai7+8T88Dr0v VTBp/ctCNOWQB53FJI6A0kydrC6wH2zYaaI/pB9/XAfbPAN3Zcd5sR/82F+Hsb4EU+5ecD hB7M2LN/VRTC//jxXbcRgp+joOMgMVyD7w1b3KFLwQYoSZKchRExVzwtksg32mhZWKGEJe ew9ZgpxosorDsTcQD5tlZXkR+SkpSvNTTG8Hhz52NEci0vjRDL7LgUSNrkEi67wWWyEYTD dI2IGwJX9VmEwJCCPXBcdT/SrhePDQcAvg+57xzYGBrCFC/R5Rl6gBunJDcSCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731701441; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r+xjo5tw2nSX4+eUczI/x9nEseBUD+aZhNaFp91BgnE=; b=wBK5feOO4LbUIh5z/urcXaAOCz8+UNcEB/Vb1o3QduEk6XGXZ3pC+E0vvjC0ZDLvFgGWol T8Qn2/lCSH8yMLcS2CwoPYBVh/v7WcVd7MZuFGj4qr0q/WWmKaQqFnVuLUSp7KER3i873h TAsItPkD41q8HN1uPN5Mh+mt4TZF7spynXT1j8bNl46V0Rj7eSIZM3EDEPpE3LPQNhbWiy O7RkR6d+1Pfc4ALqLAVj3CE/kyqwjaFVKON/2wKNe1T2Chd+elFF0h/HFPMehPsoRc11pE D2xsbZ7Do9QH3XlF9A0vf2hSwiSy6XjM/lUouUtwmCEwHxuNKN1UeKpmjn0pNQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731701441; a=rsa-sha256; cv=none; b=IRFbFBKzI0r3wJ31ykTllI7mLu0DZTZ7Pom/JZlrm8Mp2L4V36rYIM7Xmg4OKL71qcyEum CWC5md00x5wtpWnyFYtOJVrVFogpWakYZiYBUpZIfehlEOm8Yv6oxdzikJKCHy23FMtNxu 1lvo/jSCFC+3bwGPCyyK+MI2lEUuTIiIXll6zZH4U/gKRjvIZebWnw2IXv15l2e1PwuUd1 B64HpuA+zqem54gcIyZFP5WFJ4ZBibtTpuH0squjuYHN6nvzhTQ0cXI2t95Y+MWDx2cYXu 6rJA5npJ94r+yicFK0Jeh/EyhSjNnH5oB0eY+9bmwftqykO3TP5SzTTN8UzpjA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xqp6n0TFpzcq8; Fri, 15 Nov 2024 20:10:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AFKAeJs069896; Fri, 15 Nov 2024 20:10:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AFKAetQ069893; Fri, 15 Nov 2024 20:10:40 GMT (envelope-from git) Date: Fri, 15 Nov 2024 20:10:40 GMT Message-Id: <202411152010.4AFKAetQ069893@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 48f3fcabea80 - main - mfc-candidates: Convert to Lua List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 48f3fcabea807b243aa73cacbd0cb1d32793b003 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=48f3fcabea807b243aa73cacbd0cb1d32793b003 commit 48f3fcabea807b243aa73cacbd0cb1d32793b003 Author: Ed Maste AuthorDate: 2024-04-16 17:41:27 +0000 Commit: Ed Maste CommitDate: 2024-11-15 20:09:53 +0000 mfc-candidates: Convert to Lua d51c59002367 added a Lua script to process the lists of candidate and completed MFC commits to address sorting issues in the original shell implementation. Instead of having a mix of shell and Lua, just implement the entire tool in Lua. This is more maintainable and gives a reasonable improvement in performace. Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D47416 --- tools/tools/git/candidatematch.lua | 74 ------------- tools/tools/git/mfc-candidates.lua | 218 +++++++++++++++++++++++++++++++++++++ tools/tools/git/mfc-candidates.sh | 138 +---------------------- 3 files changed, 220 insertions(+), 210 deletions(-) diff --git a/tools/tools/git/candidatematch.lua b/tools/tools/git/candidatematch.lua deleted file mode 100755 index 481c1f38fea1..000000000000 --- a/tools/tools/git/candidatematch.lua +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/libexec/flua - --- MFC candidate script utility - $0 from-file to-file --- --- from-file specifies hashes that exist only in the "MFC from" branch and --- to-file specifies the original hashes of commits already merged to the --- "MFC to" branch. - --- SPDX-License-Identifier: BSD-2-Clause --- Copyright 2024 The FreeBSD Foundation - --- Read a file and return its content as a table -local function read_file(filename) - local file = assert(io.open(filename, "r")) - local content = {} - for line in file:lines() do - table.insert(content, line) - end - file:close() - return content -end - --- Remove hashes from 'set1' list that are present in 'set2' list -local function set_difference(set1, set2) - local set2_values = {} - for _, value in ipairs(set2) do - set2_values[value] = true - end - - local result = {} - for _, value in ipairs(set1) do - if not set2_values[value] then - table.insert(result, value) - end - end - return result -end - --- Execute a command and print to stdout -local function exec_command(command) - local handle = io.popen(command) - local output = handle:read("a") - handle:close() - io.write(output) -end - --- Main function -local function main() - local from_file = arg[1] - local to_file = arg[2] - local exclude_file = arg[3] - - if not from_file or not to_file then - print("Usage: flua $0 from-file to-file") - return - end - - local from_hashes = read_file(from_file) - local to_hashes = read_file(to_file) - - local result_hashes = set_difference(from_hashes, to_hashes) - - if exclude_file then - exclude_hashes = read_file(exclude_file) - result_hashes = set_difference(result_hashes, exclude_hashes) - end - - -- Print the result - for _, hash in ipairs(result_hashes) do - exec_command("git show --pretty='%h %s' --no-patch " .. hash) - end -end - -main() diff --git a/tools/tools/git/mfc-candidates.lua b/tools/tools/git/mfc-candidates.lua new file mode 100755 index 000000000000..a8ac89bde327 --- /dev/null +++ b/tools/tools/git/mfc-candidates.lua @@ -0,0 +1,218 @@ +#!/usr/libexec/flua + +-- SPDX-License-Identifier: BSD-2-Clause +-- Copyright 2024 The FreeBSD Foundation + +-- MFC candidate search utility. Identify hashes that exist only in the +-- "MFC from" branch and do not have a corresponding "cherry picked from" +-- commit in the "MFC to" branch. + +-- Execute a command and return its output. A final newline is stripped, +-- similar to sh. +local function exec_command(command) + local handle = assert(io.popen(command)) + local output = handle:read("a") + handle:close() + if output:sub(-1) == "\n" then + return output:sub(1, -2) + end + return output +end + +-- Return a table of cherry-pick (MFC) candidates. +local function read_from(from_branch, to_branch, author, dirspec) + local command = "git rev-list --first-parent --reverse " + command = command .. to_branch .. ".." .. from_branch + if #author > 0 then + command = command .. " --committer \\<" .. author .. "@" + end + if dirspec then + command = command .. " " .. dirspec + end + if verbose > 1 then + print("Obtaining MFC-from commits using command:") + print(command) + end + local handle = assert(io.popen(command)) + local content = {} + for line in handle:lines() do + table.insert(content, line) + end + handle:close() + return content +end + +-- Return a table of original hashes of changes that have already been +-- cherry-picked (MFC'd). +local function read_to(from_branch, to_branch, dirspec) + local command = "git log " .. from_branch .. ".." .. to_branch + command = command .. " --grep 'cherry picked from'" + if dirspec then + command = command .. " " .. dirspec + end + if verbose > 1 then + print("Obtaining MFC-to commits using command:") + print(command) + end + local handle = assert(io.popen(command)) + local content = {} + for line in handle:lines() do + local hash = line:match("%(cherry picked from commit ([0-9a-f]+)%)") + if hash then + table.insert(content, hash) + end + end + handle:close() + return content +end + +-- Read a commit exclude file and return its content as a table. Comments +-- starting with # and text after a hash is ignored. +local function read_exclude(filename) + local file = assert(io.open(filename, "r")) + local content = {} + for line in file:lines() do + local hash = line:match("^%x+") + if hash then + -- Hashes are 40 chars; if less, expand short hash. + if #hash < 40 then + hash = exec_command( + "git show --pretty=%H --no-patch " .. hash) + end + table.insert(content, hash) + end + end + file:close() + return content +end + +--- Remove hashes from 'set1' list that are present in 'set2' list +local function set_difference(set1, set2) + local set2_values = {} + for _, value in ipairs(set2) do + set2_values[value] = true + end + + local result = {} + for _, value in ipairs(set1) do + if not set2_values[value] then + table.insert(result, value) + end + end + return result +end + +-- Global state +verbose = 0 + +local function params(from_branch, to_branch, author) + print("from: " .. from_branch) + print("to: " .. to_branch) + if #author > 0 then + print("author/committer: " .. author) + else + print("author/committer: ") + end +end + +local function usage(from_branch, to_branch, author) + local script_name = arg[0]:match("([^/]+)$") + print(script_name .. " [-ah] [-f from_branch] [-t to_branch] [-u user] [-X exclude_file] [path ...]") + print() + params(from_branch, to_branch, author) +end + +-- Main function +local function main() + local from_branch = "freebsd/main" + local to_branch = "" + local author = os.getenv("USER") or "" + local dirspec = nil + + local url = exec_command("git remote get-url freebsd") + local freebsd_repo = string.match(url, "[^/]+$") + freebsd_repo = string.gsub(freebsd_repo, ".git$", "") + if freebsd_repo == "ports" or freebsd_repo == "freebsd-ports" then + local year = os.date("%Y") + local month = os.date("%m") + local qtr = math.ceil(month / 3) + to_branch = "freebsd/" .. year .. "Q" .. qtr + elseif freebsd_repo == "src" or freebsd_repo == "freebsd-src" then + to_branch = "freebsd/stable/14" + -- If pwd is a stable or release branch tree, default to it. + local cur_branch = exec_command("git symbolic-ref --short HEAD") + if string.match(cur_branch, "^stable/") then + to_branch = cur_branch + elseif string.match(cur_branch, "^releng/") then + to_branch = cur_branch + local major = string.match(cur_branch, "%d+") + from_branch = "freebsd/stable/" .. major + end + else + print("pwd is not under a ports or src repository.") + return + end + + local do_help = false + local exclude_file = nil + local i = 1 + while i <= #arg and arg[i] do + local opt = arg[i] + if opt == "-a" then + author = "" + elseif opt == "-f" then + from_branch = arg[i + 1] + i = i + 1 + elseif opt == "-h" then + do_help = true + i = i + 1 + elseif opt == "-t" then + to_branch = arg[i + 1] + i = i + 1 + elseif opt == "-u" then + author = arg[i + 1] + i = i + 1 + elseif opt == "-v" then + verbose = verbose + 1 + elseif opt == "-X" then + exclude_file = arg[i + 1] + print ("-X not working") + i = i + 1 + else + break + end + i = i + 1 + end + + if do_help then + usage(from_branch, to_branch, author) + return + end + + if arg[i] then + dirspec = arg[i] + --print("dirspec = " .. dirspec) + -- XXX handle multiple dirspecs? + end + + if verbose > 0 then + params(from_branch, to_branch, author) + end + + local from_hashes = read_from(from_branch, to_branch, author, dirspec) + local to_hashes = read_to(from_branch, to_branch, dirspec) + + local result_hashes = set_difference(from_hashes, to_hashes) + + if exclude_file then + exclude_hashes = read_exclude(exclude_file) + result_hashes = set_difference(result_hashes, exclude_hashes) + end + + -- Print the result + for _, hash in ipairs(result_hashes) do + print(exec_command("git show --pretty='%h %s' --no-patch " .. hash)) + end +end + +main() diff --git a/tools/tools/git/mfc-candidates.sh b/tools/tools/git/mfc-candidates.sh index 7af4d29df67e..53fad909c91f 100644 --- a/tools/tools/git/mfc-candidates.sh +++ b/tools/tools/git/mfc-candidates.sh @@ -29,139 +29,5 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. -from_branch=freebsd/main -author="${USER}" - -# Get the FreeBSD repository -repo=$(basename "$(git remote get-url freebsd 2>/dev/null)" .git 2>/dev/null) - -if [ "${repo}" = "ports" -o "${repo}" = "freebsd-ports" ]; then - year=$(date '+%Y') - month=$(date '+%m') - qtr=$(((month-1) / 3 + 1)) - to_branch="freebsd/${year}Q${qtr}" -elif [ "${repo}" = "src" -o "${repo}" = "freebsd-src" ]; then - to_branch=freebsd/stable/14 - # If pwd is a stable or release branch tree, default to it. - cur_branch=$(git symbolic-ref --short HEAD 2>/dev/null) - case $cur_branch in - stable/*) - to_branch=$cur_branch - ;; - releng/*) - to_branch=$cur_branch - major=${cur_branch#releng/} - major=${major%.*} - from_branch=freebsd/stable/$major - esac -else - echo "pwd is not under a ports or src repository." - exit 0 -fi - -params() -{ - echo "from: $from_branch" - echo "to: $to_branch" - if [ -n "$author" ]; then - echo "author/committer: $author" - else - echo "author/committer: " - fi -} - -usage() -{ - echo "usage: $(basename $0) [-ah] [-f from_branch] [-t to_branch] [-u user] [-X exclude_file] [path ...]" - echo - params - exit 0 -} - -while getopts "af:ht:u:vX:" opt; do - case $opt in - a) - # All authors/committers - author= - ;; - f) - from_branch=$OPTARG - ;; - h) - usage - ;; - t) - to_branch=$OPTARG - ;; - u) - author=$OPTARG - ;; - v) - verbose=1 - ;; - X) - if [ ! -r "$OPTARG" ]; then - echo "Exclude file $OPTARG not readable" >&2 - exit 1 - fi - exclude_file=$OPTARG - ;; - esac -done -shift $(($OPTIND - 1)) - -if [ $verbose ]; then - params - echo -fi - -authorarg= -if [ -n "$author" ]; then - # Match user ID in the email portion of author or committer - authorarg="--committer <${author}@" -fi - -# Commits in from_branch after branch point -commits_from() -{ - git rev-list --first-parent --reverse $authorarg $to_branch..$from_branch "$@" -} - -# "cherry picked from" hashes from commits in to_branch after branch point -commits_to() -{ - git log $from_branch..$to_branch --grep 'cherry picked from' "$@" |\ - sed -E -n 's/^[[:space:]]*\(cherry picked from commit ([0-9a-f]+)\)[[:space:]]*$/\1/p' -} - -# Turn a list of short hashes (and optional descriptions) into a list of full -# hashes. -canonicalize_hashes() -{ - while read hash rest; do - case "${hash}" in - "#"*) continue ;; - esac - if ! git show --pretty=%H --no-patch $hash; then - echo "error parsing hash list" >&2 - exit 1 - fi - done | sort -} - -workdir=$(mktemp -d /tmp/find-mfc.XXXXXXXXXX) -from_list=$workdir/commits-from -to_list=$workdir/commits-to - -if [ -n "$exclude_file" ]; then - exclude_list=$workdir/commits-exclude - canonicalize_hashes < $exclude_file > $exclude_list -fi - -commits_from "$@" > $from_list -commits_to "$@" > $to_list - -/usr/libexec/flua $(dirname $0)/candidatematch.lua \ - $from_list $to_list $exclude_list - -rm -rf "$workdir" +# Backwards compatibility wrapper +/usr/libexec/flua $(dirname $0)/mfc-candidates.lua "$@" From nobody Fri Nov 15 21:40:29 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xqr6Q2SFZz5dbKy; Fri, 15 Nov 2024 21:40: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xqr6Q1vwhz4lBM; Fri, 15 Nov 2024 21:40:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731706830; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=13z/KZ+JgrRl9q6ulqp+C90Ck6zko3TDIu3dptoETuM=; b=X/ICjQn/rfmBrasCNZExOP1XzK/YcP7Z8g/3DV6A9FCjBsxQ0Z3rJ7Rfzt9OaiuRYOXk3E AzAJ6TO4Ijp7sEZfOiUt7AjyntAy6kaM/Kq7yjTSYtCcLpaoxthl1SY7gl70svmsyCz3ah G9fFiLBxkpbJ6Lkm0hnniJpj817fREFlDX6UQe9greRo8WcutkNE2ION8bgDypha4rdapO wLL9bhAnpw/mrYRTRdjntEFgWkh39qR6v9vHMnK2/FAlkEK0RIXsg19odpOZXKVZIqDg+q bWA5xELhhPf541nO8rSpYdQ2hILAf3Mv+OkaBXrdPhHMJkYfZxQHS86glgh5AQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731706830; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=13z/KZ+JgrRl9q6ulqp+C90Ck6zko3TDIu3dptoETuM=; b=lE/Xh59fy6JjQR2ASR6oRLlWAeMCLIsCBRUrITRw/4kNTw0BoErh7vTmLQS7djAnKNBW/u sOqIONIllyzjphkJ8Q3LXjqZiSIebC8ATD4dz/5Io4fhOX/AjlfvVUFbBS5oeETJCXD2B+ UkBDSiaM4vb5pSJs/TTC6neS+SikfNKFhGvB5rN3hQfyyEux65cbiZctQoMH83iYfH0W+k nRM5KwHQRuZBhiKecSqq5w5d7BFqBftJeZsUtTObVMupSax4ukY02yipN5lif5QEDACr6B 433mRIImK7ubWVPK4Dybz7txbwvClG92fgcI0UD7oBO4AE9nx2FSxmqqystSFw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731706830; a=rsa-sha256; cv=none; b=uCyeXudGhIq+6GgIIvlLWB+zhxdcR2JpKcORRsJCiUEMtF9qm2XtkT0jDSeCillhN4djVp MI0Ez2z+gkrYEy+IFscJF5kMr+Zlw55IkG1KunufamBikEdKdaKr/Edsc0/5QRLdIHb45Q jGWDXDGCyTd6xqYkh6yNXsOV776d+oVn0iz+QSXTjZNQd6duAR5PrCPOBD8MEiRVF6zEcx v7kUT6XF82Wj4Q7EN0L3JoVWjcoPdIYgwFfiCer37FGqQsVrgcYvCaPcUBidvHNwsJBsSR Y7VlkCUZJBAglV9umTBhKeC3jq2vSolqK8Ap3lrrvMTxx5kY1JklzqCD8Gx4qw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xqr6Q1KxLzfmP; Fri, 15 Nov 2024 21:40:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AFLeT3c034831; Fri, 15 Nov 2024 21:40:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AFLeT1U034828; Fri, 15 Nov 2024 21:40:29 GMT (envelope-from git) Date: Fri, 15 Nov 2024 21:40:29 GMT Message-Id: <202411152140.4AFLeT1U034828@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 586c651f2baa - main - mfc_candidates: remove leftover message List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 586c651f2baa6597e769effd3816bae7c2833448 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=586c651f2baa6597e769effd3816bae7c2833448 commit 586c651f2baa6597e769effd3816bae7c2833448 Author: Ed Maste AuthorDate: 2024-11-15 21:36:44 +0000 Commit: Ed Maste CommitDate: 2024-11-15 21:39:23 +0000 mfc_candidates: remove leftover message When I first converted mfc-candidates to Lua I did not implement -X (exclude file), and just emitted a message that -X wasn't implemented. Support was implemented before I pushed the change but I forgot to remove the message. Fixes: 48f3fcabea80 ("mfc-candidates: Convert to Lua") Sponsored by: The FreeBSD Foundation --- tools/tools/git/mfc-candidates.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/tools/git/mfc-candidates.lua b/tools/tools/git/mfc-candidates.lua index a8ac89bde327..b29f1ad4d121 100755 --- a/tools/tools/git/mfc-candidates.lua +++ b/tools/tools/git/mfc-candidates.lua @@ -176,7 +176,6 @@ local function main() verbose = verbose + 1 elseif opt == "-X" then exclude_file = arg[i + 1] - print ("-X not working") i = i + 1 else break From nobody Fri Nov 15 21:52:03 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqrMl5qBHz5dcMk; Fri, 15 Nov 2024 21:52: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqrMl5F61z4mJG; Fri, 15 Nov 2024 21:52:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731707523; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6LnJaMvsmMrLbPFl/L0E3JXReeyLF+hHh2WT67YbNTU=; b=nMghjuSU5Bptj5sVOG2a1FuLAM/b4onOw9UeupTxDMBCSRjQtS0Dxy6hIk66na1IhXMnTl bqB5/Zx0s+Ine7h9cu17k8g5PRIWIuJU5imQUWPYRAcHrQs0PXps/weA4jsB0wCR3J2bsk 9y2E9vA/LXpGEWsz1LosmLPObB0Dv2zvZakldJ5wvX5QfWPcJll+Hq1cqDOHSG4ZqdzKRQ jlZv+ciRqkMGKjTF6RKPL3gtTFletzCQ9iJBpClmCPALvtcRz2JoMwaGTyPCaFh99S9/ew 90pWr2sT+KJyhAzymkfZ+bovKxML+q8xJudRW48R4nNuGvUfm4UT7y57qXzM3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731707523; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6LnJaMvsmMrLbPFl/L0E3JXReeyLF+hHh2WT67YbNTU=; b=viP6wPZDbuX74egPuWNYcOlWY9RYhY3dXY1sX10V5zirVvChsa7fqGq0QUhMJuslbXgqjT LPB7p1RdESX8ysKC0CpWtHPUlKvD2f1wjVcFOD1z0zAq4i45kpGJW+UjBwBVmeG/wG2lJt 1tDnPJTBxNKwf1eSp+aL9gLvto+u+xzIAcZtSJLC1SsRB/ssXKrVHzqwC0DTqbV0Yce0nW /9sDLj1h2KDfZl+Ri9l83atjBcozFRdq30LzFrn4LZOMGM2MIsew5zsQ6w8r3nvfzj8V4J ryhp2PqtB1F6ILaDys2XcnQYa9QyesJxQcLUavfVI3QoB5eKtqB3Kyn8HPB2zA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731707523; a=rsa-sha256; cv=none; b=Ij3mRnrXOW1dqKYyDBurx0vXc+P5KndaMyIuJRk4+Lt407eOTL9CmrLuYuU0TK/vvHNqu6 dsEIlCYsmHM5QV0afLi1IzaDHsC6R9HC+LU5Id/BXyRaeLAiHZ45AAw9V93ZS823zWyp1U SwqoMgYNoESTkituQqmJMXruJK42VMHdB/VviM1YtjwIMT6o4VOPe05wCH2Xlh0qDWqnYg OSavOysVoMd427mMa8vJ17MmWIVEkuvE2XGEDhNRgIvgohRFOhkLJRp3cl6ZA+Tr5fWtt+ QYxB0oMU/o6OB5HFq9XsnyDcPKjoWFbdjG3frYlf/bsioDKX0sAM4XCcj/5KBA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqrMl4rSszgkR; Fri, 15 Nov 2024 21:52:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AFLq3Sf059529; Fri, 15 Nov 2024 21:52:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AFLq3jB059526; Fri, 15 Nov 2024 21:52:03 GMT (envelope-from git) Date: Fri, 15 Nov 2024 21:52:03 GMT Message-Id: <202411152152.4AFLq3jB059526@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 976e1d36be68 - main - release: Don't copy container images into /ftp/ List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 976e1d36be688166e140cbaded01d433c61e6d47 Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=976e1d36be688166e140cbaded01d433c61e6d47 commit 976e1d36be688166e140cbaded01d433c61e6d47 Author: Colin Percival AuthorDate: 2024-11-15 21:38:06 +0000 Commit: Colin Percival CommitDate: 2024-11-15 21:51:47 +0000 release: Don't copy container images into /ftp/ These are installed into /ociimages/ and stage onto the download site at /OCI-IMAGES/; they don't belong in the same directory as the "distribution" .txz files. Fixes: d03c82c28da8 ("release: add optional OCI images") MFC after: 1 minute Sponsored by: Amazon --- release/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/release/Makefile b/release/Makefile index e6b68a61ce2a..9617df7ffd48 100644 --- a/release/Makefile +++ b/release/Makefile @@ -317,6 +317,7 @@ ftp: packagesystem rm -rf ftp mkdir -p ftp cp *.txz MANIFEST ftp + rm -f ftp/container-*.txz release: real-release vm-release cloudware-release oci-release ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} release-done From nobody Fri Nov 15 21:52:41 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqrNT6vW3z5dcGv; Fri, 15 Nov 2024 21:52: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqrNT6Ctwz4msn; Fri, 15 Nov 2024 21:52:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731707561; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pk9cSYPdMt46e4iGULhwhzWeXF9jGk94WWigu9fbRgg=; b=oNbInp0KTkLVy3bq4zL3NXWFe0/LuHtfHvKlvrgANtOpkw6lU/lZfgmRhn1OkO2EMqeHA5 yUUVK4pTTiGBwfcedW2aehIyMB+lVoE3o1gC/NOvYVDB3I1J13OAd8Um4cThLxAWRdTjUW zcyTl95GzxrfB6BHSzo4+9apsW0Y/LgTsaOphfzWrjC69ofyjfP3GOMw3g6Vjec3qkxwzQ 6LSUYfT+pavcvSopZHB/3I7/8ya2pIqF2lzSf5oFebBETRRKWyptPSfrsSJGD+Cbjqfrat lz+8DUjjTNuAoTfOeFkjzBLBLkwE9+YULDmjqly9hyJFQHGAt/UNMpe/YvKIAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731707561; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pk9cSYPdMt46e4iGULhwhzWeXF9jGk94WWigu9fbRgg=; b=yTqG/8izFvzl8wlbDyo4gEsTE9EPxyarECooAG4rNC1nE4KBCjTTc2X+IKeB1GtGUw1/fL VjaYl9aQApZp8WsmsB31cNIee9Imsc4Nwsuf4GG1zhvHR7nb9ILC6Xk1AnhVHxAAaSpZvi +l2WWQUrO2FS3imS6+DR/W2pCbT1N9t+kkr+0gGfe3kgVo3MBuyKsZiAx8QQUiANAwgoht 9/Si8A0UA52q4ppcMI+in1NPioEYV5pasd8cr9LNhSWDgiCXuHrQOrB1K/qLtTx3E1N2n+ Dd7FtsJ7mYH+cyj+yzROPKBezY7MpD9wKP3VgHOdN3pqv6wUebO3Uxi0jZAbJQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731707561; a=rsa-sha256; cv=none; b=fWZrsnNUxuqSIQCf94EdPnr7fjP7ZEO0PFqthZCjYea2rmeA1SCNw3jhUI/boBvCme8gqz SAbrsuqABUcz8CS+3bCfAyM2Y0SQralBFK5r3ciMet/6x2ARbyBMDMLgAgSjKt2dFWXDB+ nLLnAWuytx4RgfwpOuFSaljgeG0mgTIxmHutJXgmaZ7kdEEogDDElF9dNihpJOXS8YzY5R SNhnLcAaZSmWArU/4l3KVwXaq64Gl9Z9Ox+0A6GXZDJFBnxH+W6pixfLUDCFf3/Tzf5KlI HEsnUKS8OAOvNzLfH7FeJKebbN5HDMh/4MQkXbYqbMgaoQOBgY+AZzFPRHbjQw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqrNT5pjSzgZj; Fri, 15 Nov 2024 21:52:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AFLqfnb061108; Fri, 15 Nov 2024 21:52:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AFLqflp061105; Fri, 15 Nov 2024 21:52:41 GMT (envelope-from git) Date: Fri, 15 Nov 2024 21:52:41 GMT Message-Id: <202411152152.4AFLqflp061105@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: a8bdbdbdba3e - stable/14 - release: Don't copy container images into /ftp/ List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a8bdbdbdba3e7c6e3a330026dcd82e922a4265c8 Auto-Submitted: auto-generated The branch stable/14 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=a8bdbdbdba3e7c6e3a330026dcd82e922a4265c8 commit a8bdbdbdba3e7c6e3a330026dcd82e922a4265c8 Author: Colin Percival AuthorDate: 2024-11-15 21:38:06 +0000 Commit: Colin Percival CommitDate: 2024-11-15 21:52:15 +0000 release: Don't copy container images into /ftp/ These are installed into /ociimages/ and stage onto the download site at /OCI-IMAGES/; they don't belong in the same directory as the "distribution" .txz files. Fixes: d03c82c28da8 ("release: add optional OCI images") MFC after: 1 minute Sponsored by: Amazon (cherry picked from commit 976e1d36be688166e140cbaded01d433c61e6d47) --- release/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/release/Makefile b/release/Makefile index 36c47e5ad454..3d96880d1661 100644 --- a/release/Makefile +++ b/release/Makefile @@ -320,6 +320,7 @@ ftp: packagesystem rm -rf ftp mkdir -p ftp cp *.txz MANIFEST ftp + rm -f ftp/container-*.txz release: real-release vm-release cloudware-release oci-release ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} release-done From nobody Fri Nov 15 22:26:38 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xqs7p6wxPz5ddRp; Fri, 15 Nov 2024 22:26:46 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xqs7p1kfCz4qLD; Fri, 15 Nov 2024 22:26:46 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 4AFMQc1v000805; Sat, 16 Nov 2024 00:26:42 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 4AFMQc1v000805 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 4AFMQc0Y000804; Sat, 16 Nov 2024 00:26:38 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 16 Nov 2024 00:26:38 +0200 From: Konstantin Belousov To: John Baldwin Cc: Martin Matuska , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: ce4dcb97ca43 - main - zfs: merge openzfs/zfs@9c56b8ec7 Message-ID: References: <202408101047.47AAlZxm046555@gitrepo.freebsd.org> <4654dc16-8236-4f17-bed8-27258cce6120@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 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4654dc16-8236-4f17-bed8-27258cce6120@FreeBSD.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on tom.home X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated 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: 4Xqs7p1kfCz4qLD X-Spamd-Bar: ---- On Fri, Nov 15, 2024 at 12:16:41PM -0500, John Baldwin wrote: > On 8/10/24 03:47, Martin Matuska wrote: > > The branch main has been updated by mm: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=ce4dcb97ca433b2a2f03fbae957dae0ff16f6f51 > > > > commit ce4dcb97ca433b2a2f03fbae957dae0ff16f6f51 > > Merge: 54a543d5ea3a 9c56b8ec7855 > > Author: Martin Matuska > > AuthorDate: 2024-08-10 09:15:30 +0000 > > Commit: Martin Matuska > > CommitDate: 2024-08-10 09:43:43 +0000 > > > > zfs: merge openzfs/zfs@9c56b8ec7 > > Notable upstream pull request merges: > > #15817 5536c0dee Sync AUX label during pool import > > #15889 c7ada64bb ddt: dedup table quota enforcement > > #15890 62e7d3c89 ddt: add support for prefetching tables into the ARC > > #15894 e26b3771e spa_preferred_class: pass the entire zio > > #15894 d54d0fff3 dnode: allow storage class to be overridden by object type > > #16197 55427add3 Several improvements to ARC shrinking > > #16217 -multiple JSON output for various zfs and zpool subcommands > > #16248 24e6585e7 libzfs.h: Set ZFS_MAXPROPLEN and ZPOOL_MAXPROPLEN > > to ZAP_MAXVALUELEN > > #16264 9dfc5c4a0 Fix long_free_dirty accounting for small files > > #16268 ed0db1cc8 Make txg_wait_synced conditional in zfsvfs_teardown, > > for FreeBSD > > #16288 d60debbf5 Fix sa_add_projid to lookup and update SA_ZPL_DXATTR > > #16308 ec580bc52 zfs: add bounds checking to zil_parse > > #16310 c21dc56ea Fix zdb_dump_block for little endian > > #16315 7ddc1f737 zil: add stats for commit failure/fallback > > #16326 b0bf14cdb abd: lift ABD zero scan from zio_compress_data() > > to abd_cmp_zero() > > #16337 c8184d714 Block cloning conditionally destroy ARC buffer > > #16338 dbe07928b Add support for multiple lines to the sharenfs property > > for FreeBSD > > #16374 1a3e32e6a Cleanup DB_DNODE() macros usage > > #16374 ed87d456e Skip dnode handles use when not needed > > #16346 fb6d8cf22 Add some missing vdev properties > > #16364 670147be5 zvol: ensure device minors are properly cleaned up > > #16382 dea8fabf7 FreeBSD: Fix RLIMIT_FSIZE handling for block cloning > > #16387 aef452f10 Improve zfs_blkptr_verify() > > #16395 cbcb52243 Fix the names of some FreeBSD sysctls in > > include/tunables.cfg > > #16401 5b9f3b766 Soften pruning threshold on not evictable metadata > > #16404 cdd53fea1 FreeBSD: Add missing memory reclamation accounting > > #16404 1fdcb653b Once more refactor arc_summary output > > #16419 1f5bf91a8 Fix memory corruption during parallel zpool import > > with -o cachefile > > #16426 cf6e8b218 zstream: remove duplicate highbit64 definition > > Obtained from: OpenZFS > > OpenZFS commit: 9c56b8ec7855119c8948c551ee28086a11465a56 > > This merge reverted the changes from: > > commit b068bb09a1a82d9fef0e939ad6135443a959e290 > Author: Konstantin Belousov > Date: Mon Jan 8 07:18:40 2024 +0200 > > Add vnode_pager_clean_{a,}sync(9) > Bump __FreeBSD_version for ZFS use. > Reviewed by: markj > Sponsored by: The FreeBSD Foundation > MFC after: 1 week > Differential revision: https://reviews.freebsd.org/D43356 > > Specifically, it undid this change: > > diff --git a/sys/contrib/openzfs/include/os/freebsd/spl/sys/vnode.h b/sys/contri > b/openzfs/include/os/freebsd/spl/sys/vnode.h > index 75c32f221ffd..7a3b38736a58 100644 > --- a/sys/contrib/openzfs/include/os/freebsd/spl/sys/vnode.h > +++ b/sys/contrib/openzfs/include/os/freebsd/spl/sys/vnode.h > @@ -100,11 +101,11 @@ vn_flush_cached_data(vnode_t *vp, boolean_t sync) > #else > if (vp->v_object->flags & OBJ_MIGHTBEDIRTY) { > #endif > - int flags = sync ? OBJPC_SYNC : 0; > vn_lock(vp, LK_SHARED | LK_RETRY); > - zfs_vmobject_wlock(vp->v_object); > - vm_object_page_clean(vp->v_object, 0, 0, flags); > - zfs_vmobject_wunlock(vp->v_object); > + if (sync) > + vnode_pager_clean_sync(vp); > + else > + vnode_pager_clean_async(vp); > VOP_UNLOCK1(vp); > } > } > > (The addition of the #include from this commit remains as > a local diff in main FWIW) > > It looks like vnode_pager_clean_*sync() are thin wrappers around > vm_object_page_clean() still in main, but I'm curious if this change > needs to be kept in main and/or upstreamed? Better to upstreaam it, of course. It is the simplified KPI brought in mainly for NFS client, but I do not see why other filesystems should be exempt. From nobody Fri Nov 15 23:30:46 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqtYf5TZ1z5dhsR; Fri, 15 Nov 2024 23:30: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqtYf5Jdwz3xh3; Fri, 15 Nov 2024 23:30:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731713446; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hmy+KSGSAlUPBycIgCrS7Un7GQcvOMvK3ZCk8afmNuE=; b=S/m3pzquGGokFLRWbJz1p3Nq2KtQ+muRdnMtDzXj99gIc03IOsBcBDXsRZkm7VIGg4OHPn a5StTzXi2lB4X3PVe2WTboAVPMRHKGFDVSYJBCvStm+q0aGjwFZ56LKU0wHNKyXaLjP8rP y/FkB5+ym02EUNjikL28dHTH69JywQkaViB0zpySOJFxOGwIxGdqt4iIDCBvua5blza730 wBIc6F2R0obeUP4luDqZdnAKb+MPiycDD9dvVY0ciXipJQhRojjGGUhamoFNS/pB7dFeqg TjyZOxZGkpdq0S7AD0AaiHbFB9l1J1Zz8nGh8qzcaAQblyvYra4Jrc868Cw80A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731713446; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hmy+KSGSAlUPBycIgCrS7Un7GQcvOMvK3ZCk8afmNuE=; b=Wb7KycQMJa05xEHtG9rDRPUqghKA4uz12L9ZBSHaCaplvN+3bH8kDDtHu5gNkPB/aoO1YH skv1abJqenUVwpd+pYoiyXxP6RJuFRQZMIO/jjAj+rX6W3infPCV16M6O5jDHOg1RWOPrc 02pvIqWksYL309jJo/HPVy0S2Glm/LDqCMoNVhCr/2cZfDA2OhpILcqLf4ev1MLFPSTn0q 32pvRdUDbeJigObK8gurC/hNKqqAnVumXyQM5Km/DDHuho72wcxJMiWY7BOiyr30+z7XHA 7hVeXW5f4upK5BG0kuwbk3V/bG0YCzWEffxwjobWS3nxIiZr9PzAVCsGDVvCTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731713446; a=rsa-sha256; cv=none; b=KlC75yrouUevCX95KxRmUoZSgpBs5klSPAM0LvwLIV0Nvatq2tR3ZSzm8cZk87RHmxTbiQ 5duzhvD3n1Jk7e0DTYPvVMOLb2VwZcCcP5gyKGfjNjdgLI+TyRv3XJuQ+gMYnF6LezlYcD WcydGoz9osTJoQTbT9cgIsJsiv/nc1Ao9E6pXgE60v9lIp2hsctnKADwOCWzAglKs5OtMP bLMskLmc5H7XNbRHoXupBR8ockcOWFKh9FSFOcGNPx0eE7dlAV/fqjlcFHhbDQxKgBYaLH 7xE0ep0HDD7FAYYq7vinnqvvNUe7l+7GSRexDk72z3Sv8lNplPGd+aOUxrChRA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqtYf4s63zk42; Fri, 15 Nov 2024 23:30:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AFNUkYE041877; Fri, 15 Nov 2024 23:30:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AFNUkE7041874; Fri, 15 Nov 2024 23:30:46 GMT (envelope-from git) Date: Fri, 15 Nov 2024 23:30:46 GMT Message-Id: <202411152330.4AFNUkE7041874@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 8a688fcc242e - releng/14.2 - release: add optional OCI images List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.2 X-Git-Reftype: branch X-Git-Commit: 8a688fcc242e1b4eea32fe97aa0f16a18ed21246 Auto-Submitted: auto-generated The branch releng/14.2 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=8a688fcc242e1b4eea32fe97aa0f16a18ed21246 commit 8a688fcc242e1b4eea32fe97aa0f16a18ed21246 Author: Doug Rabson AuthorDate: 2024-08-14 15:39:24 +0000 Commit: Colin Percival CommitDate: 2024-11-15 23:22:37 +0000 release: add optional OCI images This adds three OCI archive format files to the release containing FreeBSD base images suitable for static linked, dynamic linked and shell workloads. The shell image also contains pkg-bootstrap and can be easily extended by installing packages (including pkgbase packages). Approved by: re (cperciva) Reviewed by: dch, cpersiva, jlduran, zlei Differential Revision: https://reviews.freebsd.org/D46759 MFC after: 2 days (cherry picked from commit d03c82c28da86e0812b98b051d24ae5980804ad7) (cherry picked from commit 6686056ca3547c8280bd2423c59c661c2f501409) --- release/Makefile | 11 ++++--- release/Makefile.oci | 34 +++++++++++++++++++ release/release.conf.sample | 4 +++ release/release.sh | 47 ++++++++++++++++++++++++++- release/scripts/make-oci-image.sh | 63 ++++++++++++++++++++++++++++++++++++ release/tools/oci-image-dynamic.conf | 11 +++++++ release/tools/oci-image-minimal.conf | 19 +++++++++++ release/tools/oci-image-static.conf | 42 ++++++++++++++++++++++++ share/examples/Makefile | 6 ++++ share/examples/oci/Containerfile.pkg | 27 ++++++++++++++++ share/examples/oci/README | 7 ++++ share/man/man7/release.7 | 14 +++++++- 12 files changed, 279 insertions(+), 6 deletions(-) diff --git a/release/Makefile b/release/Makefile index be0abf84de23..4f95d3ba32ec 100644 --- a/release/Makefile +++ b/release/Makefile @@ -7,14 +7,16 @@ # memstick: Builds memory stick image (memstick.img) # mini-memstick: Builds minimal memory stick image (mini-memstick.img) # ftp: Sets up FTP distribution area (ftp) -# release: Invokes real-release, vm-release, and cloudware-release targets +# release: Invokes real-release, vm-release, cloudware-release and oci-release targets # real-release: Build all media and FTP distribution area # vm-release: Build all virtual machine image targets # cloudware-release: Build all cloud hosting provider targets -# install: Invokes the release-install and vm-install targets +# oci-release: Build all OCI container images +# install: Invokes the release-install, vm-install and oci-install targets # release-install: Copies all release installation media into ${DESTDIR} # vm-install: Copies all virtual machine images into ${DESTDIR} # cloud-install: Copies non-uploaded cloud images into ${DESTDIR} +# oci-install: Copies all OCI container images into ${DESTDIR} # # Variables affecting the build process: # WORLDDIR: location of src tree -- must have built world and default kernel @@ -319,7 +321,7 @@ ftp: packagesystem mkdir -p ftp cp *.txz MANIFEST ftp -release: real-release vm-release cloudware-release +release: real-release vm-release cloudware-release oci-release ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} release-done true @@ -330,7 +332,7 @@ real-release: ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} obj ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} ${RELEASE_TARGETS} -install: release-install vm-install .WAIT cloud-install +install: release-install vm-install oci-install .WAIT cloud-install release-install: .if defined(DESTDIR) && !empty(DESTDIR) @@ -350,3 +352,4 @@ release-install: .include "${.CURDIR}/Makefile.inc1" .include "${.CURDIR}/Makefile.vm" +.include "${.CURDIR}/Makefile.oci" diff --git a/release/Makefile.oci b/release/Makefile.oci new file mode 100644 index 000000000000..461c95f49636 --- /dev/null +++ b/release/Makefile.oci @@ -0,0 +1,34 @@ +# +# +# +# Makefile for building OCI container images. +# + +.if defined(WITH_OCIIMAGES) && !empty(WITH_OCIIMAGES) +OCI_IMAGES= static dynamic minimal +.endif + +oci-install: +.if defined(WITH_OCIIMAGES) && !empty(WITH_OCIIMAGES) + mkdir -p ${DESTDIR}/ociimages +. for _IMG in ${OCI_IMAGES} + cp -p ${.OBJDIR}/container-image-${_IMG}.txz ${DESTDIR}/ociimages +. endfor +.endif + +OCI_TARGETS= +OCI_DEPS_static= +OCI_DEPS_dynamic= container-image-static.txz +OCI_DEPS_minimal= container-image-dynamic.txz + +.for _IMG in ${OCI_IMAGES} +OCI_TARGETS+= container-image-${_IMG}.txz +container-image-${_IMG}.txz: ${OCI_DEPS_${_IMG}} + sh ${.CURDIR}/scripts/make-oci-image.sh ${.CURDIR} ${REVISION} ${BRANCH} ${TARGET_ARCH} ${_IMG} + skopeo copy \ + containers-storage:localhost/freebsd${REVISION:R}-${_IMG}:latest \ + oci-archive:${.OBJDIR}/container-image-${_IMG}.tar:freebsd${REVISION:R}-${_IMG}:${REVISION}-${BRANCH}-${TARGET_ARCH} + ${XZ_CMD} < ${.OBJDIR}/container-image-${_IMG}.tar > ${.OBJDIR}/container-image-${_IMG}.txz +.endfor + +oci-release: ${OCI_TARGETS} diff --git a/release/release.conf.sample b/release/release.conf.sample index 351496dcf6a4..1dd2f2504e30 100644 --- a/release/release.conf.sample +++ b/release/release.conf.sample @@ -114,3 +114,7 @@ PORTBRANCH="main" ## If WITH_CLOUDWARE is set to a non-empty value, this is a list of providers ## to create disk images. #CLOUDWARE="EC2 GCE ORACLE VAGRANT-VIRTUALBOX VAGRANT-VMWARE" + +## If WITH_OCIIMAGES is set to a non-empty value, build Open Container +## Initiative (OCI) base images as part of the release. +#WITH_OCIIMAGES= diff --git a/release/release.sh b/release/release.sh index cee0fbd5643d..d6752e016994 100755 --- a/release/release.sh +++ b/release/release.sh @@ -120,6 +120,9 @@ env_setup() { # cloud providers as part of the release. WITH_CLOUDWARE= + # Set to non-empty to build OCI images as part of the release + WITH_OCIIMAGES= + return 0 } # env_setup() @@ -195,7 +198,8 @@ env_check() { RELEASE_RMAKEFLAGS="${ARCH_FLAGS} ${RELEASE_FLAGS} \ KERNCONF=\"${KERNEL}\" ${CONF_FILES} ${SRCPORTS} \ WITH_DVD=${WITH_DVD} WITH_VMIMAGES=${WITH_VMIMAGES} \ - WITH_CLOUDWARE=${WITH_CLOUDWARE} XZ_THREADS=${XZ_THREADS}" + WITH_CLOUDWARE=${WITH_CLOUDWARE} WITH_OCIIMAGES=${WITH_OCIIMAGES} \ + XZ_THREADS=${XZ_THREADS}" return 0 } # env_check() @@ -288,6 +292,44 @@ extra_chroot_setup() { fi fi + if [ ! -z "${WITH_OCIIMAGES}" ]; then + # Install buildah and skopeo from ports if the ports tree is available; + # otherwise install the pkg. + if [ -d ${CHROOTDIR}/usr/ports ]; then + # Trick the ports 'run-autotools-fixup' target to do the right + # thing. + _OSVERSION=$(chroot ${CHROOTDIR} /usr/bin/uname -U) + REVISION=$(chroot ${CHROOTDIR} make -C /usr/src/release -V REVISION) + BRANCH=$(chroot ${CHROOTDIR} make -C /usr/src/release -V BRANCH) + UNAME_r=${REVISION}-${BRANCH} + GITUNSETOPTS="CONTRIB CURL CVS GITWEB GUI HTMLDOCS" + GITUNSETOPTS="${GITUNSETOPTS} ICONV NLS P4 PERL" + GITUNSETOPTS="${GITUNSETOPTS} SEND_EMAIL SUBTREE SVN" + GITUNSETOPTS="${GITUNSETOPTS} PCRE PCRE2" + PBUILD_FLAGS="OSVERSION=${_OSVERSION} BATCH=yes" + PBUILD_FLAGS="${PBUILD_FLAGS} UNAME_r=${UNAME_r}" + PBUILD_FLAGS="${PBUILD_FLAGS} OSREL=${REVISION}" + PBUILD_FLAGS="${PBUILD_FLAGS} WRKDIRPREFIX=/tmp/ports" + PBUILD_FLAGS="${PBUILD_FLAGS} DISTDIR=/tmp/distfiles" + for _PORT in sysutils/buildah sysutils/skopeo; do + eval chroot ${CHROOTDIR} env ${PBUILD_FLAGS} make -C \ + /usr/ports/${_PORT} \ + FORCE_PKG_REGISTER=1 deinstall install clean distclean + done + else + eval chroot ${CHROOTDIR} env ASSUME_ALWAYS_YES=yes \ + pkg install -y sysutils/buildah sysutils/skopeo + eval chroot ${CHROOTDIR} env ASSUME_ALWAYS_YES=yes \ + pkg clean -y + fi + # Use the vfs storage driver so that this works whether or not + # the build directory is on ZFS. The images are small so the + # performance difference is negligible. + eval chroot ${CHROOTDIR} sed -I .bak -e '/^driver/s/zfs/vfs/' /usr/local/etc/containers/storage.conf + # Remove any stray images from previous builds + eval chroot ${CHROOTDIR} buildah rmi -af + fi + if [ ! -z "${EMBEDDEDPORTS}" ]; then _OSVERSION=$(chroot ${CHROOTDIR} /usr/bin/uname -U) REVISION=$(chroot ${CHROOTDIR} make -C /usr/src/release -V REVISION) @@ -323,6 +365,9 @@ chroot_build_target() { fi eval chroot ${CHROOTDIR} make -C /usr/src ${RELEASE_WMAKEFLAGS} buildworld eval chroot ${CHROOTDIR} make -C /usr/src ${RELEASE_KMAKEFLAGS} buildkernel + if [ ! -z "${WITH_OCIIMAGES}" ]; then + eval chroot ${CHROOTDIR} make -C /usr/src ${RELEASE_WMAKEFLAGS} packages + fi return 0 } # chroot_build_target diff --git a/release/scripts/make-oci-image.sh b/release/scripts/make-oci-image.sh new file mode 100644 index 000000000000..a139a38d1930 --- /dev/null +++ b/release/scripts/make-oci-image.sh @@ -0,0 +1,63 @@ +#! /bin/sh + +# Build an Open Container Initiative (OCI) container image + +curdir=$1; shift +rev=$1; shift +branch=$1; shift +arch=$1; shift +image=$1; shift + +major=${rev%.*} +minor=${rev#*.} + +abi=FreeBSD:${major}:${arch} + +echo "Building OCI freebsd${major}-${image} image for ${abi}" + +. ${curdir}/tools/oci-image-${image}.conf + +init_workdir() { + local abi=$1; shift + local workdir=$(mktemp -d -t oci-images) + + mkdir ${workdir}/repos + cat > ${workdir}/repos/base.conf < /dev/null + mtree -deU -p $m/var -f /etc/mtree/BSD.var.dist > /dev/null + mtree -deU -p $m/usr -f /etc/mtree/BSD.usr.dist > /dev/null + mtree -deU -p $m/usr/include -f /etc/mtree/BSD.include.dist > /dev/null + mtree -deU -p $m/usr/lib -f /etc/mtree/BSD.debug.dist > /dev/null + install_packages ${abi} ${workdir} $m FreeBSD-caroot FreeBSD-zoneinfo + cp /etc/master.passwd $m/etc + pwd_mkdb -p -d $m/etc $m/etc/master.passwd || return $? + cp /etc/group $m/etc || return $? + cp /etc/termcap.small $m/etc/termcap.small || return $? + cp /etc/termcap.small $m/usr/share/misc/termcap || return $? + env DESTDIR=$m /usr/sbin/certctl rehash + # Generate a suitable repo config for pkgbase + case ${branch} in + CURRENT|STABLE|BETA*) + repo=base_latest + ;; + *) + repo=base_release_${minor} + ;; + esac + mkdir -p $m/usr/local/etc/pkg/repos + cat > $m/usr/local/etc/pkg/repos/base.conf < To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 2594b7675ade - releng/14.2 - release: Publish OCI images on "ftp" mirrors List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.2 X-Git-Reftype: branch X-Git-Commit: 2594b7675adeae114b329cade3980530d45fed68 Auto-Submitted: auto-generated The branch releng/14.2 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=2594b7675adeae114b329cade3980530d45fed68 commit 2594b7675adeae114b329cade3980530d45fed68 Author: Colin Percival AuthorDate: 2024-11-13 06:36:14 +0000 Commit: Colin Percival CommitDate: 2024-11-15 23:22:58 +0000 release: Publish OCI images on "ftp" mirrors If WITH_OCIIMAGES is set, "make ftp-stage" will now publish those bits into a directory under /OCI-IMAGES/, similar to how we publish CI and VM images. Approved by: re (cperciva) MFC after: 1 minute (cherry picked from commit e95e3e6eb7ef723aa5dd08de48a9ad3fec647c7d) (cherry picked from commit e8c5d6f6b89f38ed7c20ad5537fc82092106d378) --- release/Makefile.mirrors | 53 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/release/Makefile.mirrors b/release/Makefile.mirrors index 1888f86d3002..8af614d9a9bb 100644 --- a/release/Makefile.mirrors +++ b/release/Makefile.mirrors @@ -58,6 +58,11 @@ STAGE_TARGETS+= ci-images-stage CI_DIR= ${TLD}/CI-IMAGES/${REVISION}-${BRANCH}/${TARGET_ARCH} .endif +.if defined(WITH_OCIIMAGES) && !empty(WITH_OCIIMAGES) +STAGE_TARGETS+= oci-images-stage +OCI_DIR= ${TLD}/OCI-IMAGES/${REVISION}-${BRANCH}/${TARGET_ARCH} +.endif + CLEANFILES+= ${STAGE_TARGETS} CHECKSUM_FILES?= SHA512 SHA256 SNAP_SUFFIX!= echo ${_SNAP_SUFFIX:S,^-,,1} | tr -d ' ' @@ -333,5 +338,53 @@ ci-images-stage: . endfor .endif +oci-images-stage: + mkdir -p ${OCI_DIR} +.if defined(SNAPSHOT) && !empty(SNAPSHOT) +. if exists(${OCI_DIR}/Latest) + rm -rf ${OCI_DIR}/Latest +. endif + mkdir -p ${OCI_DIR}/Latest + mkdir -p ${OCI_DIR}/${BUILDDATE} +. for _IMG in ${OCI_IMAGES} + cd ${RELEASEDIR}/ociimages && \ + mv container-image-${_IMG}.txz \ + ${OSRELEASE}-container-image-${SNAP_SUFFIX}-${_IMG}.txz + cp ${RELEASEDIR}/ociimages/${OSRELEASE}-container-image-${SNAP_SUFFIX}-${_IMG}.txz \ + ${OCI_DIR}/${BUILDDATE}/${OSRELEASE}-container-image-${SNAP_SUFFIX}-${_IMG}.txz + cd ${OCI_DIR}/Latest && \ + ln -s ../${BUILDDATE}/${OSRELEASE}-container-image-${SNAP_SUFFIX}-${_IMG}.txz \ + ${OSRELEASE}-container-image-${_IMG}.txz +. endfor + cd ${RELEASEDIR}/ociimages && rm -f CHECKSUM.* +. for CHECKSUM in ${CHECKSUM_FILES} + cd ${RELEASEDIR}/ociimages && \ + ${CHECKSUM:tl} ${OSRELEASE}* > CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} + cp -p ${RELEASEDIR}/ociimages/CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} \ + ${OCI_DIR}/${BUILDDATE}/CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} + cd ${OCI_DIR}/Latest && \ + ln -s ../${BUILDDATE}/CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} \ + CHECKSUM.${CHECKSUM} +. endfor +.else # not snapshot +. if exists(${OCI_DIR}/Latest) + rm -rf ${OCI_DIR}/Latest +. endif + mkdir -p ${OCI_DIR}/Latest +. for _IMG in ${OCI_IMAGES} + cd ${RELEASEDIR}/ociimages && \ + mv container-image-${_IMG}.txz \ + ${OSRELEASE}-container-image-${_IMG}.txz + cp ${RELEASEDIR}/ociimages/${OSRELEASE}-container-image-${_IMG}.txz \ + ${OCI_DIR}/Latest/${OSRELEASE}-container-image-${_IMG}.txz +. endfor +. for CHECKSUM in ${CHECKSUM_FILES} + cd ${RELEASEDIR}/ociimages && \ + ${CHECKSUM:tl} ${OSRELEASE}* > CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} + cp -p ${RELEASEDIR}/ociimages/CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} \ + ${OCI_DIR}/Latest/CHECKSUM.${CHECKSUM} +. endfor +.endif + ftp-stage: remove-old-bits ${STAGE_TARGETS} From nobody Fri Nov 15 23:30:48 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqtYj6QKTz5dhxt; Fri, 15 Nov 2024 23:30: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqtYj16jdz3xhG; Fri, 15 Nov 2024 23:30:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731713449; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8jtWMrhZBWo0tbww3TP4dEbmscdTcLwJxDdrn3a40+w=; b=Mh8W4d62Yo9HEPOco91GVN2dAA/FYj1LE7CII7Kml+Xo3D/zYtbhSSzaDVyn6pFwKYIIyD LMgrrif/KztBp0oLiYxoiOdyUoWusfzrbwroPwTj+qhmnSjVAM7lkLP1dd35nqHEZVBmCs XKWhHW1k2QxGUQ1EYnoKazDxICMN4qFdsOvKwZrYOVGBgrk1ZWWcCI6P5abNcBdBTHG+jP cxvAaZhlSrUswEoSBFS7rKBf+Cq1WYExdM6jJm9vkhSZF4DFw1yoim/LwfDbB2T49p0wi5 kgYzCYMwcAPrkrXPzbMOtBv1Cd5IJWEnLM5n35dLuCvSwbJZ5A7TsSFhQSY/rA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731713449; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8jtWMrhZBWo0tbww3TP4dEbmscdTcLwJxDdrn3a40+w=; b=NEJ/CIIyqTbShihoz9whD6fjfJufz1+fy+COcZ1A4OHJOtRDWWQV9Zd9e3v+CjHbzflymY e3Kd6s1P1XRcnL3MoYYPuXkWaJfU5Okd3QuMiU/cwOb9fvvdGi/wmfs90BT2MSAU2JiayL G88pzXmu4KhZNSSeUn3c7IGH3B8QaupiWbEP2PLpyOY+/vqWJWr3hvZP1crTGTi3HVanfH zjyd3qOlTtraFY8o/hVYwWNxqQxrRxjEIUB7cCVTdAEhlsi3AjDvsKJyBcijz6I1b2D4Nc JMWgKLFhj5c6oKhydQuiZZoFseMfGFawI2JGskYBr/UpKIXIW27JOEEqTvWAeQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731713449; a=rsa-sha256; cv=none; b=gSeCCvyeIAPe1MIeC2k3AjTURsAYxBoepbxiReqt/LEApOTGGdUSw8ZHLNwsBNb000USCS w39tb+025K0a6rW5PBW8gl91QTk06y0hibdQsmnMKDEH54YeUzKthE+gW9MjWwSzWzCrPi 2xklYh5i0W+8UJTfOdctXBpro17ZsqX+btHoJsXtNGsnHsS3UgHXcyF7jj+3PPWajJlJf8 HGIZpePMvGHtFmSehUlcWdlI2xJbjj0w7uS02CHKp2DjxKPPo+PVGfdV5WzfRcm0RNH28v par2caZt82kRG4uQVs4pquy5StnQyNDSW3VgpUdTluhIf+4jyeJ7A0Y4G6tWag== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqtYj0Md0zjYL; Fri, 15 Nov 2024 23:30:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AFNUmZj041979; Fri, 15 Nov 2024 23:30:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AFNUmU1041976; Fri, 15 Nov 2024 23:30:48 GMT (envelope-from git) Date: Fri, 15 Nov 2024 23:30:48 GMT Message-Id: <202411152330.4AFNUmU1041976@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 9513b68501c0 - releng/14.2 - bsd.subdir.mk: Drop broken optimisation for realinstall parallelisation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.2 X-Git-Reftype: branch X-Git-Commit: 9513b68501c0c17be13d27c94a229ca18b297ac3 Auto-Submitted: auto-generated The branch releng/14.2 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=9513b68501c0c17be13d27c94a229ca18b297ac3 commit 9513b68501c0c17be13d27c94a229ca18b297ac3 Author: Jessica Clarke AuthorDate: 2024-02-02 21:17:23 +0000 Commit: Colin Percival CommitDate: 2024-11-15 23:23:02 +0000 bsd.subdir.mk: Drop broken optimisation for realinstall parallelisation Not all of the tree is happy for realinstall to be done in parallel. In particular, Makefile.inc1 uses .WAIT to force etc to be installed after earlier subdirectories, since etc calls into share/man's makedb to run makewhatis on the tree and needs all manpages to have been installed. Also, libexec/Makefile doesn't set SUBDIR_PARALLEL, and the link from ld-elf32.1 to ld-elf.1 relies on rtld-elf having been installed before rtld-elf32, otherwise creating the link will fail. In general, core behavioural differences like this between NO_ROOT and "normal" builds are also dangerous and confusing. If this optimisation is deemed important, it should be reintroduced in a more limited and robust manner that doesn't break the above situations. Until then value correctness over slight efficiency gains on high core count machines, the same machines where you're more likely to encounter issues from this optimisation. This reverts commits cd19ecdbdc87 ("Similar to r296013 for NO_ROOT, force SUBDIR_PARALLEL for buildworld WORLDTMP staging.") and b9c6f3168112 ("Add more STANDALONE_SUBDIR_TARGETS."). Approved by: re (cperciva) Found by: CheriBSD Jenkins Reviewed by: bdrewery, brooks Fixes: cd19ecdbdc87 ("Similar to r296013 for NO_ROOT, force SUBDIR_PARALLEL for buildworld WORLDTMP staging.") Fixes: b9c6f3168112 ("Add more STANDALONE_SUBDIR_TARGETS.") MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43705 (cherry picked from commit fbae308319b7678cd9d879f60b1efd8d4c99b5eb) (cherry picked from commit 125ce840bc93f9cd9286c9724bf18f951e17d3fa) --- share/mk/bsd.subdir.mk | 5 ----- 1 file changed, 5 deletions(-) diff --git a/share/mk/bsd.subdir.mk b/share/mk/bsd.subdir.mk index 72e835d97730..83cead36ade6 100644 --- a/share/mk/bsd.subdir.mk +++ b/share/mk/bsd.subdir.mk @@ -56,11 +56,6 @@ STANDALONE_SUBDIR_TARGETS+= \ installconfig installdirs installincludes installfiles print-dir \ maninstall manlint obj objlink -# It is safe to install in parallel when staging. -.if defined(NO_ROOT) || !empty(SYSROOT) -STANDALONE_SUBDIR_TARGETS+= realinstall -.endif - .include .if ${MK_META_MODE} == "yes" From nobody Fri Nov 15 23:30:49 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqtYk39Zsz5dhdD; Fri, 15 Nov 2024 23:30: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqtYk0nWFz3xbh; Fri, 15 Nov 2024 23:30:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731713450; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b9TjDDddN57nCGB1j/WT4ZCmXOpZ0nrXXE/G8cp54rw=; b=kG+G5zLshUZtYHTGxIzrJ5eCTsDiHmHDcTUR9U3oVsD3dtIzn/i+y+H+yZKnG8f2XDe6kD CiRZu10k0GoQwqRt7ZAO19tpHlkwFWnVuy0QAkCnUR/OBYIocP9Z1HUKw+lc95KtdY52FV xNhqE3/BSoAPG/LF4giZv2tppk/lAiYEmhGVollgPKs+rbi9teUcg2dCYEXNU+ITnpYrpF xAj+PYtX1pJEzJdAafGtxeL7ASz7kFoi/NzBATgFEqz0Byi1E02x9ov8b6YdzsXFmkZV0w jGNAt7WX9d9mGlBYLGtX2yFoMbIzN6lOaWTtOZdwlfI0+N0wxq0uSS/e8VIuow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731713450; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b9TjDDddN57nCGB1j/WT4ZCmXOpZ0nrXXE/G8cp54rw=; b=lcsXf2EfVADslt2K6vqgccvVuNJ4C6Kpn9EXY3BVdko9jLOQIbcVLdtqlcJXWDkuJHhTWb fp3o6vZp5lokLRl5/gpsAQxUzfc2Jbwe8swI6H19v1vlavUM6OlWaEy1ZbEhGQEAYAZfUT CtiM+S/Jz36pyI74QlmcSAR3HdqsbOVuskHQnU+QkwsBICV1TrWbPMx1GXaR3G+xoC34VT tGi9RNzGF/XWJiHr+dh62ubkvo6/lLg5Kk92zGqCFoM8hWln2ZLKvKrTDT1LnYiqBsu5bM ZvzCJ0fZT7fVRP2qm8SnCq1UmhBdCY68xuWw7G3xqvEjXBSzZnwZ+frdBKQ7cw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731713450; a=rsa-sha256; cv=none; b=eRqzS3z9gpdlXMEVkZvRClQY8H2GrZwqhJ1oS9GPTHwT3LhHKJr2gjrg3zHNG2zE6QMnRX WFVewgKe9Yr0zq8KOhaSSE+Dc69dH+3R6ez1vcIqJHPqHRgqjF1rp5y8xtrQJi0Ybknmw3 w7aAhg2kkFXI17araE9zmC254DJjQHUH2sDA5DawdN5JZWXJu6jK8cEGLOFAIRAszjTlAc frwMWm7fmxiwlf2tHjzu9NvZhsGWo/l4BAIXUpAJBvDJykQTBJ2OJL0V7r7AFmx49+5HIk cnKcD4NnqCj/p822jt1YkiKWkgjzleJTtA84JY1zWI+ZSHDCraTXl1eFffhNcw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqtYk0P3VzkGQ; Fri, 15 Nov 2024 23:30:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AFNUnpJ042045; Fri, 15 Nov 2024 23:30:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AFNUnC8042042; Fri, 15 Nov 2024 23:30:49 GMT (envelope-from git) Date: Fri, 15 Nov 2024 23:30:49 GMT Message-Id: <202411152330.4AFNUnC8042042@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 0aeaf495babf - releng/14.2 - release: Exclude container images from globs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.2 X-Git-Reftype: branch X-Git-Commit: 0aeaf495babf9506b3b6ce5e46b13b9c604094b4 Auto-Submitted: auto-generated The branch releng/14.2 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=0aeaf495babf9506b3b6ce5e46b13b9c604094b4 commit 0aeaf495babf9506b3b6ce5e46b13b9c604094b4 Author: Colin Percival AuthorDate: 2024-11-14 22:30:44 +0000 Commit: Colin Percival CommitDate: 2024-11-15 23:23:06 +0000 release: Exclude container images from globs We use a *.txz glob to get all of the "distributions" which comprise the FreeBSD release, but we now (optionally) also build container images which are .txz files. Grep those out from the distribution lists. A better long-term fix would probably be to generate an explicit list of the .txz files we want rather than using an overbroad glob and filtering out the files we *don't* want. Approved by: re (cperciva) Fixes: d03c82c28da8 ("release: add optional OCI images") MFC after: 1 minute Sponsored by: Amazon (cherry picked from commit 47866cdcc7278faa27250dcea16374231c676050) (cherry picked from commit 012bb7fdafb30032f7a09212ffd6398eb4230b07) --- release/Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/release/Makefile b/release/Makefile index 4f95d3ba32ec..36c47e5ad454 100644 --- a/release/Makefile +++ b/release/Makefile @@ -177,12 +177,12 @@ disc1: packagesystem -DDB_FROM_SRC ) # Copy distfiles mkdir -p ${.TARGET}/usr/freebsd-dist - for dist in MANIFEST $$(ls *.txz | grep -vE -- '(${base ${_ALL_libcompats}:L:ts|})-dbg'); \ + for dist in MANIFEST $$(ls *.txz | grep -v container | grep -vE -- '(${base ${_ALL_libcompats}:L:ts|})-dbg'); \ do cp $${dist} ${.TARGET}/usr/freebsd-dist; \ done .if defined(NO_ROOT) echo "./usr/freebsd-dist type=dir uname=root gname=wheel mode=0755" >> ${.TARGET}/METALOG - for dist in MANIFEST $$(ls *.txz | grep -vE -- '(${base ${_ALL_libcompats}:L:ts|})-dbg'); \ + for dist in MANIFEST $$(ls *.txz | grep -v container | grep -vE -- '(${base ${_ALL_libcompats}:L:ts|})-dbg'); \ do echo "./usr/freebsd-dist/$${dist} type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG; \ done .endif @@ -247,12 +247,12 @@ dvd: packagesystem -DDB_FROM_SRC ) # Copy distfiles mkdir -p ${.TARGET}/usr/freebsd-dist - for dist in MANIFEST *.txz; \ + for dist in MANIFEST $$(ls *.txz | grep -v container); \ do cp $${dist} ${.TARGET}/usr/freebsd-dist; \ done .if defined(NO_ROOT) echo "./usr/freebsd-dist type=dir uname=root gname=wheel mode=0755" >> ${.TARGET}/METALOG - for dist in MANIFEST *.txz; \ + for dist in MANIFEST $$(ls *.txz | grep -v container); \ do echo "./usr/freebsd-dist/$${dist} type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG; \ done .endif @@ -300,7 +300,7 @@ mini-memstick.img: bootonly-memstick cd bootonly-memstick && sh ${.CURDIR}/${TARGET}/make-memstick.sh .${NO_ROOT:D/METALOG} ../${.TARGET} packagesystem: ${DISTRIBUTIONS} - sh ${.CURDIR}/scripts/make-manifest.sh *.txz > MANIFEST + sh ${.CURDIR}/scripts/make-manifest.sh $$(ls *.txz | grep -v container) > MANIFEST touch ${.TARGET} pkg-stage: dvd From nobody Fri Nov 15 23:30:51 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqtYl3wWnz5dj1V; Fri, 15 Nov 2024 23:30: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqtYl20V5z3xn3; Fri, 15 Nov 2024 23:30:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731713451; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IT5habeBZzf4vIz+EI5DUMIAW8EtK3gPWvPh9PbflSk=; b=eFXlbbB9Tvl6HT46CL007rON/wguqdGRR1ZRwHcRK7eejTXg3+bn7Qu/mZqnmWSTdL9j6V /kUJ0jcrYsezfFsQJq8rJyPsTsirlepH67zsWYmBzEO2FcGd+r1xDas55e+4m/rFeWBx1P 9J5MaShERZ6YLV9EcullMnpa6eonhqxwkqM6h10OK2skTcltFgv2y/BwLdiPZImwVUC6Hc 4WeX0b/3gIy4LBi4lENd2+t4IOATDAWw4kTGKZ0d9BEkqPVtnfyJxysuLQRroKvvY7xFFE 0abc0UpwA7qOY4XrmXRL4+opvAe4ls5pZNTl+XBOIiGYmxbT0wfFvMt1X2DRnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731713451; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IT5habeBZzf4vIz+EI5DUMIAW8EtK3gPWvPh9PbflSk=; b=A55dl1kEp7W1ksGr5fvzB9kP7ndTEM2SYxwE6mT44dvQbuRSkyxWi676D7+dYgYNkW8DqX mu+jc+wOisxul6weBCbEzsgwNVUkR7stgmTw0pH2Mfbc+t9K4SJn6CgZXQW9qwhghNwwFM JQXYjeG4KAJqe2wT8dnfiMkWMt+NaaCfGJBDTfh4n7EKLP4Ch5v4dHG/qd+GuuI4Wo+rFe U3y9jxq71rFV1+N/buptQfP2ZQXc6XjcnyZrFiuipuVdxLu7djF04sglCWCFTnFrEkR2AP TeWvEL+9J/zKuE+3Nznd6G6p6UFMztryEPEgeuk/PA57GYlA6uooeUpK7Veraw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731713451; a=rsa-sha256; cv=none; b=bXB+uPvqvMAr39xWCT1tWU+kVl/XuRtr1sIIXCwACCNI7ppXgwGCYhEVtBS/+vo2f/jrUj 3ZuYWvnFuAWRWY6VYErsk7z6P21szMER94KlPHRp/9S9mA28OEx7z78mwBLTFIp11ycFOj WzpqsDPOWMz4K4LN++ZpacLdAPCgieqHlSOu4G8qDK4lxu1MU5sx+4q2iXnK5JlxvhZsHf EDxKGeuUnyth7saosu4x9oLoHE+4C6dMc1YyA5jzIj2Ol8khyWk8V5y9/XgnwKFcc8kg78 tfRMyfv1gvUgUX3hLRK3W4LdIYCp9+pW8EOLl9NY3PUIsXa8DEivTYToGiwVXQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqtYl1PqHzjf1; Fri, 15 Nov 2024 23:30:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AFNUpfg042093; Fri, 15 Nov 2024 23:30:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AFNUpIi042090; Fri, 15 Nov 2024 23:30:51 GMT (envelope-from git) Date: Fri, 15 Nov 2024 23:30:51 GMT Message-Id: <202411152330.4AFNUpIi042090@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: f0bfc02cba55 - releng/14.2 - release: Don't copy container images into /ftp/ List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.2 X-Git-Reftype: branch X-Git-Commit: f0bfc02cba55fe37f7f1c097e61179d9406c2a52 Auto-Submitted: auto-generated The branch releng/14.2 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=f0bfc02cba55fe37f7f1c097e61179d9406c2a52 commit f0bfc02cba55fe37f7f1c097e61179d9406c2a52 Author: Colin Percival AuthorDate: 2024-11-15 21:38:06 +0000 Commit: Colin Percival CommitDate: 2024-11-15 23:23:09 +0000 release: Don't copy container images into /ftp/ These are installed into /ociimages/ and stage onto the download site at /OCI-IMAGES/; they don't belong in the same directory as the "distribution" .txz files. Approved by: re (cperciva) Fixes: d03c82c28da8 ("release: add optional OCI images") MFC after: 1 minute Sponsored by: Amazon (cherry picked from commit 976e1d36be688166e140cbaded01d433c61e6d47) (cherry picked from commit a8bdbdbdba3e7c6e3a330026dcd82e922a4265c8) --- release/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/release/Makefile b/release/Makefile index 36c47e5ad454..3d96880d1661 100644 --- a/release/Makefile +++ b/release/Makefile @@ -320,6 +320,7 @@ ftp: packagesystem rm -rf ftp mkdir -p ftp cp *.txz MANIFEST ftp + rm -f ftp/container-*.txz release: real-release vm-release cloudware-release oci-release ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} release-done From nobody Fri Nov 15 23:30:53 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqtYn56y2z5dj8w; Fri, 15 Nov 2024 23:30: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqtYn3dSdz3xnM; Fri, 15 Nov 2024 23:30:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731713453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Dc7KxivTOmjPrbr4POKJwxnrEqjVTd0stKHY973o9eg=; b=NX2gHTq8S3ZpEopiYaOOA2UBraTpc3OZ/tJ7JiG5y8XswUIShOWItDtdjdJEwuv1FBGiup HWm+38ZOShVLKokFCg49CXtSvdqV1eN1MfdAyOKKRbRNialfUEhMqklohoBa0dXfz6HHiD SD1CLVi0pjTX8nPnujb/rwvvYeft/D1HyqDbdMZojDyXmNijZ49sSiJPcLIg2SRh3IiZdL YI0Dry3NzMUl1tdNtmV4Vrg/8F1BoB97CQ9oOg3MQQ8Ns5y460mEiEz4axPBErS22x1nY9 AREmjNIjhS0sSKf1Rf/q4D/zri0DlhJGSZzN+qJLKit2PA8v/bEMaUu65sH3fQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731713453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Dc7KxivTOmjPrbr4POKJwxnrEqjVTd0stKHY973o9eg=; b=haI3AsIyO0S+BQJui0AiFHI6XM/ZWiHlXDjFEZT+PQ9UHYAkUzzdbQL5T+1YU1E0x7dpzT wK8Jm+U/pm7C/3wmktFAlpUK++vn2yBfAMHbKFuPMQmO2hebgRdTCxcckd3Nkl12DDrRZZ REAqr5ESCMWPF02iPiWoYOir2G9fIKc8+ramOqOqVWUy7lfSPXUOfD39eogqNT4yP1d3f0 R5ng0t/6XjzQMsUe8n2RSEsy8Zl/Pf5lr5p13UvXO5rM+gNccywXuMqpn+x0rKvvGYl3vC kg/jc1Z+hD/YOtoRau1Un708rWrPaG1yNiDt88/kZ21c0Xt98kvJi4qusyhm+w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731713453; a=rsa-sha256; cv=none; b=SIrwmoZRFEAXvuVpnANdxOv/Zj1C683tINrepsKIxUNifIYvAxvKsYRfPER2e/0qGVcEVc +mNx5lvPSSrKkqaYSMRWB9Pzp6km7TsMSqFy2ptaNZGUc+eSsDQPVfWNiIyvpnAmZIRxEL odECJ/TM5eDS9x3oVGtz0d06IB5us8rOHDscLtHwtaOrpPpRTm8Z4FyHBh7B/MLmquUOeL KVEdQr31IGZxx8zG7ZbNQeWppMuynut32cdko8gs1gNkmXKIaWy+HBTJ2GZx7SAYJjXf4F Tiusf21XKegOF/ws29vJp1+9OZcgFvke+PZ1d4VpoUIIx8VwYtwiN4QpCo4/ww== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqtYn2xhjzkGS; Fri, 15 Nov 2024 23:30:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AFNUrC0042169; Fri, 15 Nov 2024 23:30:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AFNUr1T042166; Fri, 15 Nov 2024 23:30:53 GMT (envelope-from git) Date: Fri, 15 Nov 2024 23:30:53 GMT Message-Id: <202411152330.4AFNUr1T042166@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: bcd5f9573588 - releng/14.2 - 14.2: Update to BETA3 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.2 X-Git-Reftype: branch X-Git-Commit: bcd5f9573588f3340a0c5a7d8da8ad8fbf2153a3 Auto-Submitted: auto-generated The branch releng/14.2 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=bcd5f9573588f3340a0c5a7d8da8ad8fbf2153a3 commit bcd5f9573588f3340a0c5a7d8da8ad8fbf2153a3 Author: Colin Percival AuthorDate: 2024-11-15 23:22:00 +0000 Commit: Colin Percival CommitDate: 2024-11-15 23:23:22 +0000 14.2: Update to BETA3 Approved by: re (implicit) Sponsored by: Amazon --- 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 60a042f04d04..3da92b81939d 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -53,7 +53,7 @@ TYPE="FreeBSD" REVISION="14.2" -BRANCH="BETA2" +BRANCH="BETA3" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From nobody Fri Nov 15 23:30:52 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqtYm5MFBz5dj0c; Fri, 15 Nov 2024 23:30: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqtYm3Fr4z3xfb; Fri, 15 Nov 2024 23:30:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731713452; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W6rLbe1N5BgFdO0xxoqV7zTeBk1COPVZUDni4PJPR1s=; b=uf1CPRZWr4mT7gjmtN6wsMQG3+6JdbjCYjGz5pqkSPT3/Qd0mWOVs4VboB0Ez7Hv6q/rtg 2g7QUmfGEQYX5EPhI2RL/xc4pcNoT3KPRUYPk0wya0F768OPQQAl/qokaxcR/V2ZLuBiYt BDz/iyz4nGqWAPnFC+aWuCRKI8VrFJjcJ+rdR4LN6rlf/t03KFpqvN/UUhNRRcQsSoeAtI Q2smR4l4cqK+aoYie45eMddLKyHmYlha3fLQUZB/KmGO8mehd3lrj5MjDZpttdEwMZn4Qn +QlIT/zFma98VsnSSKWLaHFGFTG5Kdnz6izYDkUMSppG6kRIPOp0RR11J3Whgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731713452; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W6rLbe1N5BgFdO0xxoqV7zTeBk1COPVZUDni4PJPR1s=; b=IDdJYezovgE1m7VnneDBPS5m/pjdEt1eqQ62djhSvGfVP2WErw4trvY1N4ehFThEvWe3k4 khBSyOSf8yVzPWztKbAeAT/dfFpMIvrluMYwu8teFX0U0Pz/hTyDLjEW8V0Rvv/mKxCcpf /lweHc1sPFHLwvZIaC9hqMttnXUheTjk0sLZ2bxXMMA2APaGm2DgO2rqb35T1pbRXtExRx rs37GWmH1qtS212+TLWcDjAgTtCTG3UDODpYxv9TtJ/1kUZL6r1vqm7/YvCJajxiPUcq4N dGrcuIO0RfMYvdWhIVpnaJkIBH13EoM7tlRRcDKf6eQCNoWSNQe/lKP2PGP9ng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731713452; a=rsa-sha256; cv=none; b=pdITHDDPSXPsdqYFX/QIk0vhx+7bghkFx3ldCts172VV4w34b5vqh0qbNoY7sIkCYTEVQX HOby+DMihvnZayMUBeEGiCBSjcQ9CtwwVxRYOiYDK8/ST4Rjm1szInuZGA9HlOwK+PtMdR PrBrf+NgEuCAsYtE8sWMwmlPDu4DDq43g8N2cU3IvOow5tN3bZTjTJg7n4obX3WizQ3RWU dopK+QeU5fRgGQkLoid0YAhF+W/GO+YKLVZEW9jLE+lUaAeB52okfHL42n/l0o2rijCK/o bkUns2MFyFuXiu2cBuO6QPBlIqeQPY5JKv5ITBqr3AEh/AKnKO0Hkp+maNr09Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqtYm2CfFzjtB; Fri, 15 Nov 2024 23:30:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AFNUqUB042130; Fri, 15 Nov 2024 23:30:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AFNUqiF042127; Fri, 15 Nov 2024 23:30:52 GMT (envelope-from git) Date: Fri, 15 Nov 2024 23:30:52 GMT Message-Id: <202411152330.4AFNUqiF042127@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: c16d0924dbb6 - releng/14.2 - Revert commit 8733bc277a383cf59f38a83956f4f523869cfc90 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.2 X-Git-Reftype: branch X-Git-Commit: c16d0924dbb6c1152c45f85b61894ba5dd61e587 Auto-Submitted: auto-generated The branch releng/14.2 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=c16d0924dbb6c1152c45f85b61894ba5dd61e587 commit c16d0924dbb6c1152c45f85b61894ba5dd61e587 Author: Kirk McKusick AuthorDate: 2024-11-13 19:37:14 +0000 Commit: Colin Percival CommitDate: 2024-11-15 23:23:13 +0000 Revert commit 8733bc277a383cf59f38a83956f4f523869cfc90 Author: Mateusz Guzik Date: Thu Sep 14 16:13:01 2023 +0000 vfs: don't provoke recycling non-free vnodes without a good reason If the total number of free vnodes is at or above target, there is no point creating more of them. This commit was done as a performance optimization but ends up causing slowdowns when doing operations on many files. Approved by: re (cperciva) Requested by: re (cperciva) (cherry picked from commit ab05a1cf321aca0fe632c1ab40f68630b477422c) (cherry picked from commit 2ca9c96dc0cf0d1f91b37346bce8fd0dd1639ddd) --- sys/kern/vfs_subr.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 646339987ba2..747cdf722cc9 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1961,25 +1961,11 @@ vn_alloc_hard(struct mount *mp, u_long rnumvnodes, bool bumped) mtx_lock(&vnode_list_mtx); - if (vn_alloc_cyclecount != 0) { - rnumvnodes = atomic_load_long(&numvnodes); - if (rnumvnodes + 1 < desiredvnodes) { - vn_alloc_cyclecount = 0; - mtx_unlock(&vnode_list_mtx); - goto alloc; - } - - rfreevnodes = vnlru_read_freevnodes(); - if (rfreevnodes < wantfreevnodes) { - if (vn_alloc_cyclecount++ >= rfreevnodes) { - vn_alloc_cyclecount = 0; - vstir = true; - } - } else { - vn_alloc_cyclecount = 0; - } + rfreevnodes = vnlru_read_freevnodes(); + if (vn_alloc_cyclecount++ >= rfreevnodes) { + vn_alloc_cyclecount = 0; + vstir = true; } - /* * Grow the vnode cache if it will not be above its target max * after growing. Otherwise, if the free list is nonempty, try From nobody Sat Nov 16 01:41:22 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqxSL3kHYz5cbss; Sat, 16 Nov 2024 01: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqxSL3115z4HMp; Sat, 16 Nov 2024 01: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=1731721282; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vokEFAeW3pDb3jp736Yn5uYkCj9h25c6zWoL+KCn4Zw=; b=XivLQLLtDUpsed02wKwGWfXJRXxg6YtnvKeKr1aA7NpNzlx8HvNznSC9jdliQZKMM/1NAJ quRUPGHWLsLChUoIxUEX/ygpUytPm/tr9rJdoVLSRDhVqw1Ms587A9dK6Jxtd+/OYUX9xB na0GVfF5woWXco3hGHh4UJiyMR+bUJgz245TCuO1b9YKYA+2rJAsto0GAxajCQM3AJsrHQ VWtR3/JGT7s6X1vkJLvM164LlYDuAn/gSFNRX+GD63f+tpzAlQvC+D9RaiVl8dmLFOH/nh qfhblDSedHISsTAuTIfznNghFuVEtzXRez36AhSaCCcXnPP+mzwsSm3w5wdz1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731721282; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vokEFAeW3pDb3jp736Yn5uYkCj9h25c6zWoL+KCn4Zw=; b=KkmtpkSvsUDjyMybhT69aje4zUTh+69AulbPETcK8HGTOpu4ynlW1vtfVoxh5+YLV+nutg xyUhVKA8BGG86lnmlFavE1cQsg6XSgUyRNBO4ZmZ0c/Z5F+vvM+Y6Yos3+lZ5cCFkJN59i DFb/O52b13vh7JG+LfhJFxOuqvUIfdtx915kYOf0hi7zaIfFnx9pGsrIpCCTKCu+rfW4IU R9G+SJSfswgM8p4PTKOtYYGYdNcqnB122vxRh4IzL1xsCM/BlOo2im1v4Fs2JxOgooSiEM GOyHZ+ZSgBgilljGBi6iI4puHKcRSLaD8QjhUO02gEdAa+sumbV0ouCTB89/DQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731721282; a=rsa-sha256; cv=none; b=nkqZgo8KPiQ3WjT3ok/ictPL+ZOCL5aGR0w6zBBKNT2qIsO5E7kHlfk8277Iy7lKWfdmCP czn/4gWyZqBHucvZbw2A8E+hk5FtG6p+1IrQFy9oBZV+YYJqNnVTUZQJ0vSWJ/MfUmGNMH ThEP2jjO96sSIxdPwFj21W1IFfCylgK9QiX/Joqf4pDJS/vWcG8k9U8C1yxJgPAeX5V+WW qME93aJd4GSe5pyjvrvn3hGwVz4ucFOs6k+qt1K3LfcsUw163FRlESOWhCeML/g/7JSjjX LrAIOJD/TlTUaUAZn0RC3A3gx4oKAgabLJ3Sk+1ke2vi/flY8CXD7EO4X1W1IQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqxSL2cFRznNH; Sat, 16 Nov 2024 01:41:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AG1fMMv084392; Sat, 16 Nov 2024 01:41:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AG1fMZf084389; Sat, 16 Nov 2024 01:41:22 GMT (envelope-from git) Date: Sat, 16 Nov 2024 01:41:22 GMT Message-Id: <202411160141.4AG1fMZf084389@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 9d9a14c5b612 - stable/14 - bufwrite(): style List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9d9a14c5b612f6e63781be47a8428556b9fbee30 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=9d9a14c5b612f6e63781be47a8428556b9fbee30 commit 9d9a14c5b612f6e63781be47a8428556b9fbee30 Author: Konstantin Belousov AuthorDate: 2024-11-12 06:22:06 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-16 01:07:33 +0000 bufwrite(): style (cherry picked from commit c1d93f81e49c5c32262eefcd087b9c5582e0f83c) --- sys/kern/vfs_bio.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 1b55c523c436..7b483b003cac 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -2299,10 +2299,10 @@ breadn_flags(struct vnode *vp, daddr_t blkno, daddr_t dblkno, int size, int bufwrite(struct buf *bp) { - int oldflags; struct vnode *vp; long space; - int vp_md; + int oldflags, retval; + bool vp_md; CTR3(KTR_BUF, "bufwrite(%p) vp %p flags %X", bp, bp->b_vp, bp->b_flags); if ((bp->b_bufobj->bo_flag & BO_DEAD) != 0) { @@ -2311,24 +2311,21 @@ bufwrite(struct buf *bp) brelse(bp); return (ENXIO); } - if (bp->b_flags & B_INVAL) { + if ((bp->b_flags & B_INVAL) != 0) { brelse(bp); return (0); } - if (bp->b_flags & B_BARRIER) + if ((bp->b_flags & B_BARRIER) != 0) atomic_add_long(&barrierwrites, 1); oldflags = bp->b_flags; - KASSERT(!(bp->b_vflags & BV_BKGRDINPROG), + KASSERT((bp->b_vflags & BV_BKGRDINPROG) == 0, ("FFS background buffer should not get here %p", bp)); vp = bp->b_vp; - if (vp) - vp_md = vp->v_vflag & VV_MD; - else - vp_md = 0; + vp_md = vp != NULL && (vp->v_vflag & VV_MD) != 0; /* * Mark the buffer clean. Increment the bufobj write count @@ -2360,19 +2357,19 @@ bufwrite(struct buf *bp) } #endif /* RACCT */ curthread->td_ru.ru_oublock++; - if (oldflags & B_ASYNC) + if ((oldflags & B_ASYNC) != 0) BUF_KERNPROC(bp); bp->b_iooffset = dbtob(bp->b_blkno); buf_track(bp, __func__); bstrategy(bp); if ((oldflags & B_ASYNC) == 0) { - int rtval = bufwait(bp); + retval = bufwait(bp); brelse(bp); - return (rtval); + return (retval); } else if (space > hirunningspace) { /* - * don't allow the async write to saturate the I/O + * Don't allow the async write to saturate the I/O * system. We will not deadlock here because * we are blocking waiting for I/O that is already in-progress * to complete. We do not block here if it is the update From nobody Sat Nov 16 01:41:23 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqxSM4lhHz5cbw4; Sat, 16 Nov 2024 01:41: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqxSM48tPz4HGs; Sat, 16 Nov 2024 01:41:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731721283; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hPntSuPOdmOt7l44SpVSxuKM4akFVSDCvqd6ZDHn4YI=; b=ta0o0nas5nXT47aaM3wRih9Ovjr1yxqzkwNEQSQ+VT7YOZOveCYpKkK+FUwN96ZeKJzd49 elpWo9Wyg3Z7si1LR2pTz4cH6wo6c/rmDWe7Gv4JNPcf8hQFU3PkL0LMeJqhSB/pm0AfZZ jVM5ekmg6dm0ebvlNZduCcMOnaLfKJ4TQpkY/p+s94IvthY/1lE629qiNaJcsdts4lBf/i IyFTCjr+S8/VYm4PLJa6DAy/BGHf60aOJY7XFmkLTRv/RZUYpogbfWAuJzpfKXCpk83ty1 QB/vr2uPoHcr7UZqIKvE3RSjMV7CuhHUqLcQLI1H+nvpcCFqXPc/S71sScAi9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731721283; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hPntSuPOdmOt7l44SpVSxuKM4akFVSDCvqd6ZDHn4YI=; b=E2bEDY3NEUoQzYDHOTqDatEUD2M3M0cO+KScc82FuEfpc1ANRapVieDR2Sqajy3xVYWI70 Y33P+lI2twMSQvnFPR8HmghTpyd/1uaO0zKK5nUb5F2hVXCzYLfPKFeNxxGvnDvnxkgIMv 1RPbQh5tOMSRipGvA9zhS6ts+pfG3XdvcR0Lg+/R0ny7Po2UH5lrjOMnB7EBsfkQsh7PcA MRaKuq3wgk+VL6ytslKfc9LHdI0AmlrXETsE9r7FmCakclDKoyYSQRIFJyO2eaCzz90bJM fyJeNu9ew59HjTJsPWWL0o6RmKOUDEy7p1G9+9ZW1R1AMoHS4Nm3ElIpy2nYnQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731721283; a=rsa-sha256; cv=none; b=KRduhULiULun98p2mPZ8PMEUtZo5A5YLp5Hadfer0VLPfR7sgvJrZeHWqQBB5ym73XXx9x OBoZlwjuUOPou2C82KZN5BvFZi5LTy6Dt4WEtU0xzja+MHaGx01JtUXTqGKcyl+zgP3NAm vhkwCmStWVyxKU1T8kjy/EQXSX7BxOnRzGRG/5hk/Pw58590yRpKx5RfhLjzQppuuqlniJ MY4uTiHjm2glR9H6uN4OZTJJbFcJnfEEGqldDaifowppxDGJ9z6Rb+1WjP197FxZ9LOp09 tRfHJC9WNkL4pLbLcMctGiz9vby8EX8RSvNcpbYfzeTj0h/HyZMlhCZMBqFm3A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqxSM3bY8znKn; Sat, 16 Nov 2024 01:41:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AG1fNs4084443; Sat, 16 Nov 2024 01:41:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AG1fNiL084440; Sat, 16 Nov 2024 01:41:23 GMT (envelope-from git) Date: Sat, 16 Nov 2024 01:41:23 GMT Message-Id: <202411160141.4AG1fNiL084440@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: ff7de7aa49fa - stable/14 - bufwrite(): adjust the 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 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ff7de7aa49fa095ec006c81299845e1bac5d5335 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ff7de7aa49fa095ec006c81299845e1bac5d5335 commit ff7de7aa49fa095ec006c81299845e1bac5d5335 Author: Konstantin Belousov AuthorDate: 2024-11-12 06:24:03 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-16 01:07:33 +0000 bufwrite(): adjust the comment PR: 282449 (cherry picked from commit d0b41249bfbe4481baec8f1659468ffbb30388ab) --- sys/kern/vfs_bio.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 7b483b003cac..c15e2c99fead 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -2370,11 +2370,9 @@ bufwrite(struct buf *bp) } else if (space > hirunningspace) { /* * Don't allow the async write to saturate the I/O - * system. We will not deadlock here because - * we are blocking waiting for I/O that is already in-progress - * to complete. We do not block here if it is the update - * or syncer daemon trying to clean up as that can lead - * to deadlock. + * system. We do not block here if it is the update + * or syncer daemon trying to clean up as that can + * lead to deadlock. */ if ((curthread->td_pflags & TDP_NORUNNINGBUF) == 0 && !vp_md) waitrunningbufspace(); From nobody Sat Nov 16 01:41:24 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqxSP11spz5cbyy; Sat, 16 Nov 2024 01:41: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqxSN5FTxz4GsY; Sat, 16 Nov 2024 01:41:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731721284; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yP+1e5SnljmWK7kIMNJ5M2/8ZXvHzZyBipzZSlhW3IQ=; b=wIyUZ4QP0RwIT2ZjrdbwyjOHYOvYIQCinZI6d6Iia/mjyC/T/fX0JQmZI73VJ960OazU+3 EAeAZzSragnBcpddZ2OumxNEMeXHw+XbMp7d6o+mtc8xrEneh6gl1KK/QqN41q/piUx/3A smXoIgV4tEr0XIOH7u+Br6PS1h2XppaxSs//jxkWJX0EpKHOhLx9aAvoVFKV2AGiqWcHxZ y9BRnwHH0a+nVXQHyj7UK8Lz/MrgVB0WVNTjKGmVsW2elpUV3Fb7LW9z6rKfYMsl5V/mb8 2K2oYJBznhmVvgxBiIqY+LYUrq4RYSXca09XVyv7X5NtodSbGt/JPU3HJ1926Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731721284; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yP+1e5SnljmWK7kIMNJ5M2/8ZXvHzZyBipzZSlhW3IQ=; b=PQigIxl5SKRy1/oxlzYf4sV1gzQcuN4gz276ROHRhkpZ/JYIx7iNSqLDjvdD0e/DF+bzXs 2ezFhA6P0Rh7N5TorxpfBZa0KeXfg/nMXr22N9KLqLIJVIkMatUGUn6CCKz/MrCsDAGspZ Q7Ty/iEXkcNlpf72XBxfS1D1XcxUoqOjl8uDBqx15O5069wqlgbH0iu9fIEX60mOQ9AzqB IeaJzaJ+TGhvK5RWrWLN/wb2h93LKvw/zX4pNzOAP6MTPceLnw8MjygCs5iRjxlBob49Cg pHtST6Skfggv04JPvTV6raOH21n3w1G5pJm1iO17dRkPEJel/efCtxx1NYVncg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731721284; a=rsa-sha256; cv=none; b=lQ06Fly/+skkecm+mHSb0ZqOYxiIzkbEGxe1KXscO6SVhU/n8NEtujvrS0XRUPDY/1JKG1 /ozQsbc9iZCVayMJFkww+BiEAdho010vL26ipciYjiLGjZfBiWs/4b0K5dG4aF+YOYF8MY nsqyXfggAKVVw/Ey6Q9mH1psK2ehLZyZ0ifE6dAXJmXMdHsh+wYEtNiR3BQ9pOZx1yPnip nltZ5Abd3NwBXHEAe/ohDAnZIh8NZ8IQg6r6DMKSKEphWxzDU/HN08FojONWqkin/Ry8PS UmCS0oLePfD5qqESavmqk1TOVzTn0XNXbrxNI2WPtcTsRx0YfdbXtlroWV5S1A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqxSN4SN8znHt; Sat, 16 Nov 2024 01:41:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AG1fOY4084506; Sat, 16 Nov 2024 01:41:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AG1fOlF084503; Sat, 16 Nov 2024 01:41:24 GMT (envelope-from git) Date: Sat, 16 Nov 2024 01:41:24 GMT Message-Id: <202411160141.4AG1fOlF084503@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 9b2226eef29a - stable/14 - SU+J: all writes to SU journal must be exempt from runningbufspace throttling List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9b2226eef29aa6ada92203ead672f124b911df5f Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=9b2226eef29aa6ada92203ead672f124b911df5f commit 9b2226eef29aa6ada92203ead672f124b911df5f Author: Konstantin Belousov AuthorDate: 2024-11-12 06:29:23 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-16 01:07:33 +0000 SU+J: all writes to SU journal must be exempt from runningbufspace throttling PR: 282449 (cherry picked from commit 46f02c4282ff76b66579c83be53ef441ea522536) --- sys/ufs/ffs/ffs_softdep.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c index 3729d67d1eb2..fa2b0bf24366 100644 --- a/sys/ufs/ffs/ffs_softdep.c +++ b/sys/ufs/ffs/ffs_softdep.c @@ -3634,6 +3634,7 @@ softdep_process_journal(struct mount *mp, int cnt; int off; int devbsize; + int savef; ump = VFSTOUFS(mp); if (ump->um_softdep == NULL || ump->um_softdep->sd_jblocks == NULL) @@ -3645,6 +3646,8 @@ softdep_process_journal(struct mount *mp, fs = ump->um_fs; jblocks = ump->softdep_jblocks; devbsize = ump->um_devvp->v_bufobj.bo_bsize; + savef = curthread_pflags_set(TDP_NORUNNINGBUF); + /* * We write anywhere between a disk block and fs block. The upper * bound is picked to prevent buffer cache fragmentation and limit @@ -3863,12 +3866,15 @@ softdep_process_journal(struct mount *mp, */ if (flags == 0 && jblocks->jb_suspended) { if (journal_unsuspend(ump)) - return; + goto out; FREE_LOCK(ump); VFS_SYNC(mp, MNT_NOWAIT); ffs_sbupdate(ump, MNT_WAIT, 0); ACQUIRE_LOCK(ump); } + +out: + curthread_pflags_restore(savef); } /* From nobody Sat Nov 16 04:05:53 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xr0g557Nqz5cldv; Sat, 16 Nov 2024 04:05: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xr0g53dMTz4SHP; Sat, 16 Nov 2024 04:05:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731729953; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Mm4UvbNQmdOvxLl7+iErqdXqwU3n5nI69i/Skts4rbY=; b=KTgQqhnKJcBA1FaGcNJfK9N763c/f9WkOzobz7drEzdqMh5wUlWCwPIi1Vg4/4jPMPe1yP L0VHQhTIFM1ijuUchPaZHmjpLx7eZBOg2Jk/gqn5RrEyYJJZmkEVmmyIHmosLE7yl/Gmtd eXf6jqvOOZp0fpJa+DOAvdIF35yUbZxItVfZTHHY5GC1rsUn7POybIoF3m0AlnxMAaYy/B i1on4VZiuR45tWr6rWZCxgFHWItORWlTkoLEBmpv7yTZ+4WJXY8NeJwWkS6x/yn36+32we iibcJsLlEdE88WdAl0Ff69+CXLlL4rJNERGa4dsuFNh5/BSQEwVTd0fDHkX1cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731729953; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Mm4UvbNQmdOvxLl7+iErqdXqwU3n5nI69i/Skts4rbY=; b=JFFrM1L9seY7fxwcc6+e44YcXu0g1zPMXZMw1LaLV1aJ9H0V8CV1yCXntl9NASyiTf67bv 273GUVcZSDsL2a6Fw7eAIAq0LdfSHTzWnFmSzL6dxUEA7DTqlRb7VnZh32nV+VJK2BTdj3 83Z9ZEV3JyPVf5t/+6OOyJLfkNDG2+nMbWWe49B4jQGkxqawgScm9kuc3ubuu48ZaqZ7Ld UjIzA+qFKnSvz8o1QwERiuMt30xEk/s8vQKxu7JC4J3K0nU8/1NtN1mQjMZsi2TLhHKrn4 cQUg3E8Kp5EAgeOlpuoPbJKmzs1N6tnOG7FgvvoUdajVIM0pwbgbbzNIntTH+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731729953; a=rsa-sha256; cv=none; b=xA3q6kKh9uwVZ5qOGpQ35wHwFjCFrA0EB0cDbiYjctdV8yTOvB9wpdt08vgmaM93FiEjUt 7g4D71AecDtyMAccH11NVwJ3H7J/TFQghgeO+Eoq2lhSY5RegMtvYTnQOLwv8E9SX9Q+kW VB59+qfGfqS2FWCRKxZ84Nvwt15CZloZy3B7PH8zpPtSwnx3EsEzi3pbRZu/MiZ4PLxamw 1A8O5k231ik2sxpjIgSqzrpJ254KPURC5OD3tAFLG/Icr2dE2hROBeP/fv5Ihny/Uw2GYS 93+fOUqcVEA2bHmqplPGwoo8qcMsbyePonbZkVgucvqRiSslCUgoY0RRAHrHHA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xr0g53FsmzrdY; Sat, 16 Nov 2024 04:05:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AG45rZa048933; Sat, 16 Nov 2024 04:05:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AG45rjv048930; Sat, 16 Nov 2024 04:05:53 GMT (envelope-from git) Date: Sat, 16 Nov 2024 04:05:53 GMT Message-Id: <202411160405.4AG45rjv048930@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 566c039d1e75 - main - fork: Document _Fork (and fork) as POSIX 2024 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 566c039d1e7555343fcf6439a10e56f5a632c0fe Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=566c039d1e7555343fcf6439a10e56f5a632c0fe commit 566c039d1e7555343fcf6439a10e56f5a632c0fe Author: Ed Maste AuthorDate: 2024-11-15 14:22:54 +0000 Commit: Ed Maste CommitDate: 2024-11-16 04:05:40 +0000 fork: Document _Fork (and fork) as POSIX 2024 Also remove some information from HISTORY that is no longer needed (and could be confusing), now that _Fork is part of a standard. Reported by: kib Reviewed by: imp, kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D47588 --- lib/libsys/fork.2 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/libsys/fork.2 b/lib/libsys/fork.2 index 32dbc7a39711..7d548a42890d 100644 --- a/lib/libsys/fork.2 +++ b/lib/libsys/fork.2 @@ -250,18 +250,18 @@ There is insufficient swap space for the new process. .Xr vfork 2 , .Xr wait 2 , .Xr pthread_atfork 3 +.Sh STANDARDS +The +.Fn fork +and +.Fn _Fork +functions conform to +.St -p1003.1-2024 . .Sh HISTORY The .Fn fork function appeared in .At v1 . -.Pp -The -.Fn _Fork -function was defined by Austin Group together with the removal -of a requirement that the -.Fn fork -implementation must be async-signal safe. The .Fn _Fork function appeared in From nobody Sat Nov 16 07:23:43 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xr53M3c1Gz5cySN; Sat, 16 Nov 2024 07:23: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xr53M2c7sz4g6S; Sat, 16 Nov 2024 07:23:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731741823; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HmYqcnyoPx0DpAB4UvjBf4qDGaFVdxUUQeLh/wBKuSM=; b=NHAOYLKgH9g3UfRgs+Wk3Rd1gg+Pmt4feWLovmAn5pYatdVhUFRsom83XPlEjWpIp1Zx+k qmBAjeWYHM6T8smiH7daaMNcsv3zQjWFOG+eJa/sbGPWBSYXYcz3B6iLVDWtBRwFn9WfP2 sPbo/CHmW5BOt7hkNyEjxX/ZbQH1BZOnzy4GZNs6hb+Gud0LXz7ERlHtINsTnj0nsGhmQo mTzGUnIBbhdhoOlWNeIdOpszlS2JS9BlNKiYklCE6a8QcbnmvUTt0opY8MDsmC9GmaWk5n EzQWhwHAoruQACuEfVhpNvJl52NkBljfb9ZmHE+kQXj6GSvu+M6VGz70XKAdxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731741823; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HmYqcnyoPx0DpAB4UvjBf4qDGaFVdxUUQeLh/wBKuSM=; b=CMlK9jGKC/ZSqA39wHgFkOcr1QYpl2jNAuacDybRfWs8ehmEfxRK5xRqlEhta83LwswfWA zATTdmF4XMEb4+VBU4S73kT6PClXQ2zcPiMH1a6oFz5Xy0hqoLKtLI4cmE07NNnUtf4TdB uiKLJGMZbX3FAIxmtq0xJwEyo+rUyv248/7mVCSw5Otc0OcQAm5D9kQd0Y6Z9fH/K1YyFh 2w3Gk8oZkT1OmBtuKFZ9qdGf6BAXPQh+OpNpHxP6kSAWs8bdCJz8/Ba7vpKsw7b7hBTtok OxA1OeZLGSt/bcHyCGUcKd1awMzGxv3zGNExLALHp2v5JHcgq8g741IklNUvhg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731741823; a=rsa-sha256; cv=none; b=qb8gpiu48kxbsDxwMcMQ1KAtt5USWZZFlxB0ZApPNgQrwhrI3QVoFfwxflOCeNlmsV8Hyv 4bsjn9rnb5LEZLUcExH0YtGqpwETiouXYvcLbQEVyV45DAIyvlcsZdPgQMukU9S2AGL119 aVjzrbeeuPqIkMMWUFMfwr4KfDIgpH7oYQmXS/gD5IqniZcJw+oWK7M3xnom56d55iHTPo 6YeZEBg0cOYb7LPTmkt1PVVPnO24ORz+flntilwvZMmR7eZ4Ca8bRcm/czhOWHaIcl7quJ GQHdUdOdMkKoXw53gzZGDHN+ncZYjhwtfyBq0oIT5OQYhZsoHjlR2cj+VOhjUQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xr53M2CKqzxKv; Sat, 16 Nov 2024 07:23:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AG7NhpK018293; Sat, 16 Nov 2024 07:23:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AG7NhDl018290; Sat, 16 Nov 2024 07:23:43 GMT (envelope-from git) Date: Sat, 16 Nov 2024 07:23:43 GMT Message-Id: <202411160723.4AG7NhDl018290@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 999f288a0eeb - main - nanobsd: Add missing options to usage() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 999f288a0eeb230d3655da94c1186ca03c0cc404 Auto-Submitted: auto-generated The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=999f288a0eeb230d3655da94c1186ca03c0cc404 commit 999f288a0eeb230d3655da94c1186ca03c0cc404 Author: Jose Luis Duran AuthorDate: 2024-11-07 14:16:50 +0000 Commit: Jose Luis Duran CommitDate: 2024-11-16 06:54:58 +0000 nanobsd: Add missing options to usage() -B suppress installs (both kernel and world) -I build disk image from existing build/install -W suppress installworld PR: 277269 Reviewed by: imp, emaste Approved by: emaste (mentor) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D47475 --- tools/tools/nanobsd/defaults.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/tools/nanobsd/defaults.sh b/tools/tools/nanobsd/defaults.sh index 165c967de807..54e10ba74550 100755 --- a/tools/tools/nanobsd/defaults.sh +++ b/tools/tools/nanobsd/defaults.sh @@ -852,17 +852,20 @@ pprint ( ) ( usage ( ) { ( - echo "Usage: $0 [-bfhiKknqvwX] [-c config_file]" + echo "Usage: $0 [-BbfhIiKknqvWwX] [-c config_file]" + echo " -B suppress installs (both kernel and world)" echo " -b suppress builds (both kernel and world)" echo " -c specify config file" echo " -f suppress code slice extraction (implies -i)" echo " -h print this help summary page" + echo " -I build disk image from existing build/install" echo " -i suppress disk image build" echo " -K suppress installkernel" echo " -k suppress buildkernel" echo " -n add -DNO_CLEAN to buildworld, buildkernel, etc" echo " -q make output more quiet" echo " -v make output more verbose" + echo " -W suppress installworld" echo " -w suppress buildworld" echo " -X make native-xtools" ) 1>&2 From nobody Sat Nov 16 07:23:44 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xr53N6TcFz5cyR6; Sat, 16 Nov 2024 07:23: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xr53N44hJz4g1X; Sat, 16 Nov 2024 07:23:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731741824; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=plKzGWwdOwMCLwwi5bR0O/9v/7IcrMCvjf07/5cPrUQ=; b=KEO0HQxtl2h9XI1Udq2gyl4wOSHjjbhx9+1xEInGuGIJ1LKX6z90UVKWM0ZZNPYCtJNQba ZPtXIVHPv9f+GnTUGZHPZ0wRWyVZGRppx1P4KnxazIf5ZUSjmBZC1AZZsVPL5WWM22a1Pq r4+VkTczDEmSyedYyJpOkhjmvxstzpMDHGrWWqHoNE+PtuWQP1zYMI13tKXmeq4XydrJXv XZ1J9tLk0pLArBZ+NKPFb5a1dkRZpNh8c55bq0RvvIL7H2Rjym2UrcJemBrWXWUtcw4cKh ByYTLcHMsK9+ofVz4zTN4y/VcJyomq+IyirRJt74Bw+5OcBhelKQnbtCUG9C7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731741824; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=plKzGWwdOwMCLwwi5bR0O/9v/7IcrMCvjf07/5cPrUQ=; b=cV4xh5aLxP7XjVjX02TD8idPCQj6h7B24dztmhsLiCzd4Lw2DCdwwRrzcCg8E5SXFOtFR/ agOhWcEdn7HjvQJkfFjFvV5qDqXn/OCM6auhPP5pFEzLkAjF4pV2wb6NHyc0Dy+DzBTMeU ZjMJCCScYVS01xhy7r26Vb47m95i8uO+B35kilavpyFJjDZbVRSwgZ4COP5KFGfx47p6RY j1wfJwWepcPDL1qWGS62uuHvYgKw6DtQRRO/zZv67AWQd76u7mNxQfHDC7q3gohjLqPmni Y6NbOKtDV1WxKrHtXLM0dM8rX9d326HAyrSzxRHngdpH4x74f3Jq3JANNPKeoQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731741824; a=rsa-sha256; cv=none; b=yWb9vKUDoOhIqAleH6VC655r9sZfB1AzBDuNIgVA/gT8KiNH62kFxdvKSKYcLxmoE9xcTF VqoPR9Fq18HQPXr6Yc2yLhVnG5u007oMFmtlwPOiNxb4QPAE2LHz23HvexvaSqcM2DF3IN 2GMqkW4UDn0mYDv1lKMQtN4X3Qo8l0XruF/UM8jsu/oD17il9uBBEZUcC0pY65/bnjJ8Cu CPPZH+hwQwY+lX9S+hl8AohP3IdZG1FZJNMi8aQk3IAs7lsjvyp79tRDY83qZakAkkWtMc /ajKNgxo6eK34tI3t0Yj4t+POGrwWO1spG3DHI9n6jTHaKLlHBXM1/zHdv4vYQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xr53N2q3ZzxbW; Sat, 16 Nov 2024 07:23:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AG7NiLC018343; Sat, 16 Nov 2024 07:23:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AG7NiKp018340; Sat, 16 Nov 2024 07:23:44 GMT (envelope-from git) Date: Sat, 16 Nov 2024 07:23:44 GMT Message-Id: <202411160723.4AG7NiKp018340@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 3c5d19a40de7 - main - nanobsd: Fix parallel make List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3c5d19a40de7273bb478163639dd8532af425595 Auto-Submitted: auto-generated The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=3c5d19a40de7273bb478163639dd8532af425595 commit 3c5d19a40de7273bb478163639dd8532af425595 Author: Jose Luis Duran AuthorDate: 2024-11-07 14:32:01 +0000 Commit: Jose Luis Duran CommitDate: 2024-11-16 06:55:25 +0000 nanobsd: Fix parallel make The NANO_NCPU (number of CPUs) value gets ignored by the build script when setting the NANO_PMAKE (parallel make) value. Fix it by setting the NANO_PMAKE later in the process. PR: 277269 Reviewed by: imp, emaste Approved by: emaste (mentor) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D47476 --- tools/tools/nanobsd/defaults.sh | 5 ++++- tools/tools/nanobsd/nanobsd.sh | 4 ---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tools/tools/nanobsd/defaults.sh b/tools/tools/nanobsd/defaults.sh index 54e10ba74550..910ec69865df 100755 --- a/tools/tools/nanobsd/defaults.sh +++ b/tools/tools/nanobsd/defaults.sh @@ -67,7 +67,6 @@ NANO_PKG_META_BASE=/var/db # Make & parallel Make NANO_MAKE="make" NANO_NCPU=$(sysctl -n hw.ncpu) -NANO_PMAKE="make -j $NANO_NCPU" # The default name for any image we create. NANO_IMGNAME="_.disk.full" @@ -892,6 +891,10 @@ set_defaults_and_export ( ) { : ${NANO_DISKIMGDIR:=${NANO_OBJ}} : ${NANO_WORLDDIR:=${NANO_OBJ}/_.w} : ${NANO_LOG:=${NANO_OBJ}} + : ${NANO_PMAKE:="${NANO_MAKE} -j ${NANO_NCPU}"} + if ! $do_clean; then + NANO_PMAKE="${NANO_PMAKE} -DNO_CLEAN" + fi NANO_MAKE_CONF_BUILD=${MAKEOBJDIRPREFIX}/make.conf.build NANO_MAKE_CONF_INSTALL=${NANO_OBJ}/make.conf.install diff --git a/tools/tools/nanobsd/nanobsd.sh b/tools/tools/nanobsd/nanobsd.sh index af03d89acece..4c390d8ca371 100755 --- a/tools/tools/nanobsd/nanobsd.sh +++ b/tools/tools/nanobsd/nanobsd.sh @@ -156,10 +156,6 @@ if [ ! -d "${NANO_TOOLS}" ]; then exit 1 fi -if ! $do_clean; then - NANO_PMAKE="${NANO_PMAKE} -DNO_CLEAN" -fi - pprint 1 "NanoBSD image ${NANO_NAME} build starting" run_early_customize From nobody Sat Nov 16 07:23:45 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xr53P6wvLz5cygx; Sat, 16 Nov 2024 07:23:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xr53P4S7Yz4fkZ; Sat, 16 Nov 2024 07:23:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731741825; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iyiPKLFxoarBeRLD/cAuRqZM3csDsVqPYasM2v8Ii1I=; b=Xmc5+O53SbFzhYM2J2IZoK0VmuTVKT2i9YL8y9icKdZEoJFUspgRYcOOgMzCWOPkF8U/OS WDmHAQfi2rDLmDYNU21pjll6ekunyFHfcv5rgRyom3EoUNQtt38e1iCyZ5B95N7ozh15o3 QG8ZvGnQ3tMY8M7u6HyVGY0PPMo/P/oIlD3A3nPMznjAaun/kDKUdlAEG1/UnRveLSEqLw c5+RNkd3qAsApcA0u1li6rwrAv2vBFeyz7cIrEIqMy3ciwIlsNQWuqCQTp53AR4i4z8F3F OEiHPY7+bXJmpqZGg7XVpqZB3CepTk1PsZ/gVcIKFn+b1PX60+cSpIQ+PuY6jQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731741825; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iyiPKLFxoarBeRLD/cAuRqZM3csDsVqPYasM2v8Ii1I=; b=ZDGcpY2eAw9THDvj85mmPt9itjKWTwfhA6//+fP41dqPm3/SPv0xtyi61GRzJA7qdnqPeI jtKI9RUBG3HdCl0Cs8NQu8TO6V7A6LajH32O0j3L1mu39HCEa1TwLtu/1gVSkynur3TwFs dfO2PcbwHhoQ4XtM57Qbr23yPaEkcwOCetmuqgttIU5Mq24ZRRASbZkfyxSHyBaIzdNXdb 3lELNcm5V3T6EaxjFIqBZ0oLyZ6PzmgYpLbqxg+oWjNCMCH1aF2HabEQ82xWk6Xnu19AtC lvZbjo/Qn9qQIt4i61f7QYBi3K6F7tfjTNR689oWk4wADe/4xdnfsdXja+N01w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731741825; a=rsa-sha256; cv=none; b=Qec2CzPUObivqZiSA3W0DqRbzvEr9fPB5lqf0ncbTSxYvgNURogdWNni3sdZHpuKIVsK8p 7JTf01I3n8o6pw7xHG8r7QG9KD2wy+bBkatzSI1Guvp5SdlKkZD4jXaeA5MuSkMrBt3nL7 jinSK1Zyc/jRqZFgsKy5rqxfofH0Xirp4yobN7nss2Fo7dOgFRWb+dKLMdtcD2JHJZa0HM dJy/uOxOCiPZfWiZh0PNDwr6Fa0jmaPWi/kKUz+AsG6EkBVGjjmKW7KgqNSJ8hn7rfTzTF F9KUHrMqd1QU6f0dB+rh/28K8qG1uLGyNmAqehUem1l5Seus+qOKkGk3Z8cxvQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xr53P42DJzxbX; Sat, 16 Nov 2024 07:23:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AG7NjLs018391; Sat, 16 Nov 2024 07:23:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AG7NjWF018388; Sat, 16 Nov 2024 07:23:45 GMT (envelope-from git) Date: Sat, 16 Nov 2024 07:23:45 GMT Message-Id: <202411160723.4AG7NjWF018388@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: e5579f98c02f - main - nanobsd: Avoid read-only file system warnings List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e5579f98c02ff64b0c305f6731c3557ba69c2d25 Auto-Submitted: auto-generated The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=e5579f98c02ff64b0c305f6731c3557ba69c2d25 commit e5579f98c02ff64b0c305f6731c3557ba69c2d25 Author: Jose Luis Duran AuthorDate: 2024-11-08 18:13:48 +0000 Commit: Jose Luis Duran CommitDate: 2024-11-16 06:55:57 +0000 nanobsd: Avoid read-only file system warnings The default setting of some loader or rc variables generate warnings because the file system is read-only: Set the following options to avoid printing these warnings: /boot/defaults/loader.conf: - hostuuid_load="NO" to disable loading /etc/hostid early at boot time - entropy_cache_load="NO" to disable loading cached entropy at boot time - kern.random.initial_seeding.disable_bypass_warnings="1" to disable logging a warning if the 'bypass_before_seeding' knob is enabled (enabled by default) and a request is submitted prior to initial seeding /etc/defaults/rc.conf: - kldxref_enable="NO" to disable building linker.hints files with kldxref(8) - entropy_boot_file="NO" to disable very early (used at early boot-time) entropy caching through reboots - entropy_dir="NO" to disable caching entropy via cron While here, move rc.conf options before sourcing vendor.conf, so they can be overridden. PR: 277601 Reviewed by: imp Approved by: emaste (mentor) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D47502 --- tools/tools/nanobsd/defaults.sh | 41 +++++++++++++++++++++++++++++++++++------ 1 file changed, 35 insertions(+), 6 deletions(-) diff --git a/tools/tools/nanobsd/defaults.sh b/tools/tools/nanobsd/defaults.sh index 910ec69865df..0161a8ab8fd3 100755 --- a/tools/tools/nanobsd/defaults.sh +++ b/tools/tools/nanobsd/defaults.sh @@ -570,13 +570,42 @@ setup_nanobsd_etc ( ) ( # create diskless marker file touch etc/diskless - [ -n "${NANO_NOPRIV_BUILD}" ] && chmod 666 etc/defaults/rc.conf - - # Make root filesystem R/O by default - echo "root_rw_mount=NO" >> etc/defaults/rc.conf - # Disable entropy file, since / is read-only /var/db/entropy should be enough? - echo "entropy_file=NO" >> etc/defaults/rc.conf + [ -n "${NANO_NOPRIV_BUILD}" ] && chmod 666 boot/defaults/loader.conf + { + echo + echo '### NanoBSD configuration ##################################' + echo 'hostuuid_load="NO"' + echo 'entropy_cache_load="NO" # Disable loading cached entropy at boot time.' + echo 'kern.random.initial_seeding.disable_bypass_warnings="1" # Do not log a warning' + echo " # if the 'bypass_before_seeding' knob is enabled" + echo " # and a request is submitted prior to initial" + echo " # seeding." + } >> boot/defaults/loader.conf + [ -n "${NANO_NOPRIV_BUILD}" ] && chmod 444 boot/defaults/loader.conf + [ -n "${NANO_NOPRIV_BUILD}" ] && chmod 666 etc/defaults/rc.conf + if ! ed -s etc/defaults/rc.conf <<\EOF +/^### Define source_rc_confs, the mechanism used by \/etc\/rc\.\* ##$/i +### NanoBSD options ######################################## +############################################################## + +kldxref_enable="NO" # Disable building linker.hints files with kldxref(8). +root_rw_mount="NO" # Inhibit remounting root read-write. +entropy_boot_file="NO" # Disable very early (used at early boot time) + # entropy caching through reboots. +entropy_file="NO" # Disable late (used when going multi-user) + # entropy through reboots. +entropy_dir="NO" # Disable caching entropy via cron. + +############################################################## +. +w +q +EOF + then + echo "Regular expression pattern not found" + exit 2 + fi [ -n "${NANO_NOPRIV_BUILD}" ] && chmod 444 etc/defaults/rc.conf # save config file for scripts From nobody Sat Nov 16 07:23:46 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xr53R26D3z5cyhl; Sat, 16 Nov 2024 07:23: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xr53Q65jGz4g4F; Sat, 16 Nov 2024 07:23:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731741826; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zLUTW/mQtofqgMmHVoUs5UeDZde+w/c6RF3ZyrthfYg=; b=ugoLIgL0dJprOFhwR6nn/nvO/wYOmFQ+OYUYRYzAWPFGd+ArL3WlCBqvS+52y2/hpt+AJf uL3XYPkqQLsOnBYm6W03s5Y8LT9Dx2Rbr7+cPbjumA2nyMiMLVdieDARnYcW1m+zGzbDCF nBY7pGyDU8sUTS1bVbnQjxxk9UZXKKv43su6hQOxKsw1VH4zKpsmS4qhj70zsN5hZ91RGi IopknA60h/sWIicz3HE/nB29eVjSAtw/FfbtN6lk+lSpsb61ktLx2RL//HjZzwGV1iFjlV rYevPJ68BtNayAWMxGJD2XelOxaoo1U9rcT5Oy1oUelKNjvPNVNpMw9BU3CFSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731741826; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zLUTW/mQtofqgMmHVoUs5UeDZde+w/c6RF3ZyrthfYg=; b=ok4Eij0m3vKOmCYiZVNIW8dJWkdRSdVx5uxMU0OanSIBALeYgb5FDHbG0IYPcOtNYl2k0C tI1msY0RyDmS3mWK/2T5ocOM7fdGuJRNUvAMfJMWX/1hhd/yGeYBLNu1gcT0bzVQL3KUw+ o92dkX3WGJDfia30gvTR7mNTwtYZtVAURzw3WxUJp/D3cteHFiiv+B1ztpBz6/Uyi82Xng 2oytQbMAgzmaaP4I/nMamnKOV5U/jOUX1B9uBgP+mGHh7H4orutAqkRlo7C+y/zavytepQ qqBv4DC+Wqp4pA20URCd7eOz+KheAH7U343z/lI901mP0txlRhW5vGP6Cz/JWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731741826; a=rsa-sha256; cv=none; b=FNlyWl+be9C/FuMCwJL1GwhnStHcMy69GJmbrkVuSblJDgOIdEqlRJpxcrAZsx5I2XH7eq ATccbF1OZxqGk+kdW5NhMoIVmiXR6Jz5vrdF6xWXRystO/065vbE09y/QUCgzAFALps/ZQ Iej+7D/cMbeZP2KxAep5jOU5yIIcdoT0Age1Wq2RXBZfAl+DYd4pxi84QVv1TJUDbcV+iI v0gAuz0LR0yY1F9tGYOY4hAiHvBVVc4/r2nfekuao8pS8VY1bd05FolNMD4d5a3bPh2Tyl wsq/ajhKKIjfkF/PayFMnaJlBDRm7PF09QW43gMjNZAaFZVHNPCAgOpry9YNKQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xr53Q51T0zxqq; Sat, 16 Nov 2024 07:23:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AG7Nk8S018436; Sat, 16 Nov 2024 07:23:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AG7Nkqo018433; Sat, 16 Nov 2024 07:23:46 GMT (envelope-from git) Date: Sat, 16 Nov 2024 07:23:46 GMT Message-Id: <202411160723.4AG7Nkqo018433@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: f6f311d8cdac - main - nanobsd.8: Chase usage string updates List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f6f311d8cdacdc964967e83c8f6377d8465806d5 Auto-Submitted: auto-generated The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=f6f311d8cdacdc964967e83c8f6377d8465806d5 commit f6f311d8cdacdc964967e83c8f6377d8465806d5 Author: Jose Luis Duran AuthorDate: 2024-11-10 06:50:07 +0000 Commit: Jose Luis Duran CommitDate: 2024-11-16 06:58:41 +0000 nanobsd.8: Chase usage string updates Update the manual page for NanoBSD to match its usage. Reviewed by: emaste, imp Approved by: emaste (mentor) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D47505 --- share/man/man8/nanobsd.8 | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/share/man/man8/nanobsd.8 b/share/man/man8/nanobsd.8 index 140a63b3d2f3..2ba072541ada 100644 --- a/share/man/man8/nanobsd.8 +++ b/share/man/man8/nanobsd.8 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 19, 2016 +.Dd November 10, 2024 .Dt NANOBSD 8 .Os .Sh NAME @@ -31,7 +31,7 @@ applications .Sh SYNOPSIS .Nm -.Op Fl bfhiKknqvwX +.Op Fl BbfhIiKknqvWwX .Op Fl c Ar config-file .Sh DESCRIPTION The @@ -47,6 +47,8 @@ installation and maintenance. .Pp The following options are available: .Bl -tag -width ".Fl c Ar config-file" -offset indent +.It Fl B +Skip the install stages (both for kernel and world). .It Fl b Skip the build stages (both for kernel and world). .It Fl c Ar config-file @@ -55,6 +57,8 @@ Specify the configuration file to use. Skip the code slice extraction. .It Fl h Display usage information. +.It Fl I +Build the disk image from an existing build/install. .It Fl i Skip the disk image build stage. .It Fl K @@ -75,13 +79,17 @@ used for each build stage (world and kernel). Make output more quiet. .It Fl v Make output more verbose. +.It Fl W +Skip the +.Cm installworld +stage of the build. .It Fl w Skip the .Cm buildworld stage of the build. .It Fl X Make -.Cm native-xtools. +.Cm native-xtools . .El .Pp The features of From nobody Sat Nov 16 07:23:47 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xr53S1zMqz5cySW; Sat, 16 Nov 2024 07:23:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xr53R6QzPz4g6p; Sat, 16 Nov 2024 07:23:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731741827; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SimdOCsTO2bfFJDg8M6LBwUDy6ra9DHr8XXtq3rQTU4=; b=yvWJw0IzMHOGq2os5RX0f3iDZzxlpHLSW9lmmhXPnGF6J8blAIxbN9P3hY0aqVWKKFJUYb K7WKnPABRVv/0iGy0Ln/V5sa0+/qdRXU17h2MrgOl0L9oKmB1A4Uynog7OxNL6MFlHMIlw VtiLXbfoFgEK9RwurM+31/hqFwt6CR+ZltE2g8nzYr7NZfsMK81JRedMadzzbsm505DJnV bSdt/KEcY2w97VVSzrgRpeo6XTzWSu6rgUWlN68YJH5pQupZNskILq39IMKCsf8FdZxXSx jvJMlZnAMGDsthb922PVpB6DN0H9swfoYC/jL9XDq/GEe8NIC5JMBbT9WfloCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731741827; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SimdOCsTO2bfFJDg8M6LBwUDy6ra9DHr8XXtq3rQTU4=; b=XXYgknoovEa4nJou2QnMCRSYFOYzcWMl2aiCpDIuHJTVO0gICt//IIMa1aMrdB2DaNm6k/ pzn2mejo0Qa1rxQqd9q5UJ21pg1dFQOiqqM5VW+Uw0fyIG7jsckcyjhg+RwkPNOlYApi93 jHvXbbH1qbYsuIYesrgDwooQmXGK6aJUaFtXQGLthRcm3h8J737AqIUZIgcSw+qlWgK2y3 2SO+O4qlP8kr3lxehSstRThXor0yQy5BV82l8Ar6MW/K33gZ+jqqhpTneOylkgRm9pKVZV SPYHsmGxtO76o1uxE4s3vgTnoorRYMiiDsFVqTu8F8/+z+toAf6kCpkubh4JuA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731741827; a=rsa-sha256; cv=none; b=huQb+coI6lwgnf1HixznMDHdSS3CjO/H6V8o5Yu3T7DUVSIDIwvL5cXQ5adpI/UPE68Q6Z hwH7jwY9iOcAJXYHvrtuYUjqoN2tx9L7lFokoIMQEddAwV97kZ0QW9RV7b6vIBctdCUygW hGP4BX6+B6PvgyqF78ieZT30p2TLnTGj2hlscozBuarFbUTByeBv766k3YQ4ZLTplC3GYE lL2CfXXFUhnu7Id2tpcDXnDrJ1nu/HLhpH/4wpwMl8JXGwLsUbVuW1riU2XYZisSASd/Ho eMBSH8plheMlyAMdERe+i+shaQ4/00aOZ7UIZEvcmRftKM+mbedUfpfNv1fgrg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xr53R60qNzy7V; Sat, 16 Nov 2024 07:23:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AG7NlKP018478; Sat, 16 Nov 2024 07:23:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AG7NlRl018475; Sat, 16 Nov 2024 07:23:47 GMT (envelope-from git) Date: Sat, 16 Nov 2024 07:23:47 GMT Message-Id: <202411160723.4AG7NlRl018475@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 4db04f5e3a9b - main - nanobsd: Update fill_pkg.sh List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4db04f5e3a9bd927ba1173bf8d3b6a70178eab5f Auto-Submitted: auto-generated The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=4db04f5e3a9bd927ba1173bf8d3b6a70178eab5f commit 4db04f5e3a9bd927ba1173bf8d3b6a70178eab5f Author: Jose Luis Duran AuthorDate: 2024-11-12 07:33:12 +0000 Commit: Jose Luis Duran CommitDate: 2024-11-16 07:01:27 +0000 nanobsd: Update fill_pkg.sh fill_pkg.sh is a script that links a package and its dependencies from a "package dump" directory (like /usr/ports/packages/All) to a specified directory (NANO_PACKAGE_DIR), for cust_pkgng()[*]. Update the script by: - Using `make package-name` instead of `make -V pkgname` - Looking for package files with *.pkg instead of *.txz - Adding a -c option that copies the files instead of linking them[*] [*] After 9af130ae8c03 cust_pkgng() cannot be used with a directory populated by fill_pkg.sh, because it uses a nullfs mount, which doesn't follow symlinks, therefore the links inside NANO_PACKAGE_DIR will not work. PR: 269884 Reviewed by: imp Approved by: emaste (mentor) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D47531 --- tools/tools/nanobsd/fill_pkg.sh | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/tools/tools/nanobsd/fill_pkg.sh b/tools/tools/nanobsd/fill_pkg.sh index 2869122c5fbf..6734498350a9 100644 --- a/tools/tools/nanobsd/fill_pkg.sh +++ b/tools/tools/nanobsd/fill_pkg.sh @@ -27,16 +27,16 @@ # # # Usage: -# $0 PACKAGE_DUMP NANO_PACKAGE_DIR /usr/ports/foo/bar [package.txz]... +# $0 [-cv] PACKAGE_DUMP NANO_PACKAGE_DIR /usr/ports/foo/bar [package.pkg]... # -# Will symlink the packages listed, including their runtime dependencies, +# Will symlink/copy the packages listed, including their runtime dependencies, # from the PACKAGE_DUMP to the NANO_PACKAGE_DIR. # : ${PORTSDIR:=/usr/ports} usage () { - echo "Usage: $0 [-v] package-dump-dir nano-package-dir port-dir-or-pkg ..." 1>&2 + echo "Usage: $0 [-cv] package-dump-dir nano-package-dir port-dir-or-pkg ..." 1>&2 exit 2 } @@ -53,29 +53,29 @@ ports_recurse() ( for p do if [ -d "$p" -a -f "$p/Makefile" ] ; then msg 3 "$p: full path to port" - pkgname=`cd "$p" && make -V pkgname` + pkgname=`cd "$p" && make package-name` type=port fullpath=$p elif [ -d "${PORTSDIR}/$p" -a -f "${PORTSDIR}/$p/Makefile" ] ; then msg 3 "$p: path to port relative to ${PORTSDIR}}" - pkgname=`cd "${PORTSDIR}/$p" && make -V pkgname` + pkgname=`cd "${PORTSDIR}/$p" && make package-name` type=port fullpath=${PORTSDIR}/$p - elif [ "${p%.txz}" != "$p" -a -f "$p" ] && pkg info -F "$p" > /dev/null 2>&1 ; then + elif [ "${p%.pkg}" != "$p" -a -f "$p" ] && pkg info -F "$p" > /dev/null 2>&1 ; then msg 3 "$p: full package file name" - pkgname=`basename "$p" | sed 's/\.txz$//I'` + pkgname=`basename "$p" | sed 's/\.pkg$//I'` type=pkg fullpath=$p - elif [ "${p%.txz}" != "$p" -a -f "$dumpdir/$p" ] && pkg info -F "$dumpdir/$p" > /dev/null 2>&1 ; then + elif [ "${p%.pkg}" != "$p" -a -f "$dumpdir/$p" ] && pkg info -F "$dumpdir/$p" > /dev/null 2>&1 ; then msg 3 "$p: package file name relative to $dumpdir" - pkgname=`basename "$p" | sed 's/\.txz$//I'` + pkgname=`basename "$p" | sed 's/\.pkg$//I'` type=pkg fullpath=$dumpdir/$p - elif [ -f "$dumpdir/$p.txz" ] && pkg info -F "$dumpdir/$p.txz" > /dev/null 2>&1 ; then + elif [ -f "$dumpdir/$p.pkg" ] && pkg info -F "$dumpdir/$p.pkg" > /dev/null 2>&1 ; then msg 3 "$p: package name relative to $dumpdir" pkgname=`basename "$p"` type=pkg - fullpath=$dumpdir/$p.txz + fullpath=$dumpdir/$p.pkg else echo "Missing port or package $p" 1>&2 exit 2 @@ -106,7 +106,7 @@ ports_recurse() ( fi deps=`pkg info -dF "$fullpath" | grep -v "$pkgname:"` for dep in $deps ; do - arg=`echo $dep | sed -e "s|^|$dir|" -e 's/$/.txz/'` + arg=`echo $dep | sed -e "s|^|$dir|" -e 's/$/.pkg/'` msg 2 "Check $arg as requirement for package $pkgname" ports_recurse "$outputfile" "$dumpdir" "$arg" done @@ -116,10 +116,12 @@ ports_recurse() ( done ) +COPY="ln -s" VERBOSE=0 -while getopts v opt ; do +while getopts cv opt ; do case "$opt" in + c) COPY="cp -p" ;; v) VERBOSE=$(($VERBOSE + 1)) ;; [?]) usage ;; esac @@ -155,8 +157,8 @@ for p do done for i in `cat "$PL"` ; do - if [ -f "$NANO_PKG_DUMP/$i.txz" ] ; then - ln -s "$NANO_PKG_DUMP/$i.txz" "$NANO_PKG_DIR" + if [ -f "$NANO_PKG_DUMP/$i.pkg" ] ; then + $COPY "$NANO_PKG_DUMP/$i.pkg" "$NANO_PKG_DIR" else echo "Package $i misssing in $NANO_PKG_DUMP" 1>&2 exit 1 From nobody Sat Nov 16 07:23:48 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xr53T2vsbz5cyhm; Sat, 16 Nov 2024 07:23:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xr53T0JMtz4g4m; Sat, 16 Nov 2024 07:23:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731741829; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6wOFUd7Rx0xWdBfjZbIRBqWwCWTBJwtQDlmGvjp+oWk=; b=ZqNMnF31u2d8DmukPwrFR1zkqv27Oc/rlXmnJaU7InGWZNLZqv5TdMpaKVNa4vLscAo9sD 3LzFKdVnGM/UmwStxuhn+KtiRj9xnV7EcBjxcaDjx2x3oYYJnz4X/0vEuJ0FrKHyffn6jC gQMN/sAKYNL0o1aKYWthSdI0JVOx8QiquRGsnOpd1Xif/3dmjtFxLe7z+Cp+/oBUNK3J2a oxn/4lux35g0CkxM4iF/mIOThlkgTzbiGSk6P7Lp1Q/zujSHxZkdOTMztbr2hYFNKA6hW5 fxr+miQnSZrRIQWDUBDv1Mk3YpkOTVoP3GpB/54R/esXGQqyW5VkVpXGPdY5sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731741829; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6wOFUd7Rx0xWdBfjZbIRBqWwCWTBJwtQDlmGvjp+oWk=; b=fPNZOopS7N8qNbo99o35vFr0YxE+FVkGN0kciAfmLIXAYIfgzviS1f636F2vvG5p1wDrme Or8oeiUVxjCGmZdOvZO+1qK46C6ivaQ5Voud9xxzY3Tg7KRi3CKWQVDWpFSXmvR3X475j7 ClKiyp5i/M/MILo5EinbslyuVqGGWTKnRYD9Mvlf0l2aoLPvl4oh+tPk+WoXPYwWXSTz0L zN6XzfkoIlMKD1Kii8IhIyZOBczj/7ZXmeocWR2EkXqAJPdX8ySgGr6cFGXcgXSoNwffne hutOmZJI5PMhfaBJ2q2sRsrg1p6Qt7Ay057kgI+hYV3IDIrDUIcKS/HMSSWYMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731741829; a=rsa-sha256; cv=none; b=S84gzWTSxQnIROULxOzSnOpG07mkV/xX4DHUgNRQhbLUpNNMUGcP1GRcw71hcvxzVRR0Oq HB1E8UNvgEV7rKL6GOkrPUilxpNGeEkqpnf/uxP/Jl9ZV3YU6vMcEqN/06dWCIEPXkUPWl zvXlvyICBPiXCPJBWpRRmYA5aohUb5jM4990a0tFY/kStPNG7EFQJXRNUdcpKwOTrtn0WP WMjSkcok/hY8MITXQSkB/idpKOTfFWUOnhg7MLCwgsLdbQpbpS4Ns42oVE90VjezwMrD6y OrQ/htclu3nGCQA4a/Q+dgeBWVRDSlWYJXsO8fJYrzxlFwdjlNfXYfIlLXVdOQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xr53S72YgzxKw; Sat, 16 Nov 2024 07:23:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AG7Nm1L018541; Sat, 16 Nov 2024 07:23:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AG7NmEf018538; Sat, 16 Nov 2024 07:23:48 GMT (envelope-from git) Date: Sat, 16 Nov 2024 07:23:48 GMT Message-Id: <202411160723.4AG7NmEf018538@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 4223c668e4b9 - main - nanobsd: Use the real path for NANO_PACKAGE_DIR List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4223c668e4b9ba71e2c6cfabbd66795729b7ff8b Auto-Submitted: auto-generated The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=4223c668e4b9ba71e2c6cfabbd66795729b7ff8b commit 4223c668e4b9ba71e2c6cfabbd66795729b7ff8b Author: Jose Luis Duran AuthorDate: 2024-11-12 20:17:14 +0000 Commit: Jose Luis Duran CommitDate: 2024-11-16 07:06:14 +0000 nanobsd: Use the real path for NANO_PACKAGE_DIR As users may have the Pkg directory as a symbolic link to the NanoBSD "package dump directory". In commit 9af130ae8c03, cust_pkgng() was greatly improved, however as a side effect of using a nullfs mount, the directories and files must not be symlinks. Fix it by using NANO_PACKAGE_DIR realpath(). PR: 269884 Reviewed by: imp Approved by: emaste (mentor) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D47532 --- 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 0161a8ab8fd3..1e38a07337c7 100755 --- a/tools/tools/nanobsd/defaults.sh +++ b/tools/tools/nanobsd/defaults.sh @@ -788,6 +788,7 @@ cust_pkgng ( ) ( fi # If the package directory doesn't exist, we're done. + NANO_PACKAGE_DIR="$(realpath $NANO_PACKAGE_DIR)" if [ ! -d ${NANO_PACKAGE_DIR} ]; then echo "DONE 0 packages" return 0 From nobody Sat Nov 16 07:23:49 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xr53V3sMhz5cyRN; Sat, 16 Nov 2024 07:23: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xr53V16Q2z4fym; Sat, 16 Nov 2024 07:23:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731741830; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vq6MtKox6H53kMXRpoEEE4IOzCBlvE28XXTYVOO8d6c=; b=nywrsD28wxoDXZbBBaws/ZWAsy2BY4X3u82ExpNmMtMYJpNqbg8MqJNg5Z6gvUby2g1DQP hOeHqbbtUMRKeiMvmI9d0dedrGXYza8Hy2gsxUlvyi6hzJpXaJB3R6ACJvVyLD2h/ZMWMc BPQMLLGHv5gvrHDetkmOYdQ67YIe/Fxzcc47EPAr9isRjZH9x9YESTvaEcZ4LYHvHzQR/6 6HtXbIpGKIo78LJr4SzKks5M6tnOhjVQTZuTPAs1YVLxQlxC4CvoefNidjhKPXTcCQzBlc TUgXDAEPHcBqQZMIV9DCmfGrO+0xEV9Lypa8DcQWrlpXHg4SfyLwrO8U1abWUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731741830; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vq6MtKox6H53kMXRpoEEE4IOzCBlvE28XXTYVOO8d6c=; b=seDkm0c4JLBLImJTPCYyjCiUZ52F/qg199UoznDytiIvqhCS8l/HrW5Ck8E8HQQT/dzDno Oiq56H9G4hjebEdgMMvi/MMqrpFcIgnMSRZZczGCMvDajei5koRn2w+AQo7RhUqk7c5XUN a5ajNDJzpad/FLTOz34t2cdLxN37LnwaOtyuw2mqeS/u5kpTZ5CJs8QmGiuWAjhShRc8zt hBMicfnev0gRZWVP3gycJ2pcap4KdEf5B6EBr+eNCpaE5MLq0lcE6G4ILGKTkGjKreqiRc iGXh0lFg0QCBf5zsTICoYrxXxL+2On2eqbY9DhknrDRtBX6GtSGv0L4lbg/Zyw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731741830; a=rsa-sha256; cv=none; b=ydJ4v9CqHmrc0NAqFf0NTcECk3S+W8R4be9tAveaPRwwO6l8oi6M35O6K/xLW7etiexOo9 ET3Fkm3KWDXQ4Z1hCsbNllHiPjovZ6FSw+F2Sp6k1+svZayQv1+RVzYMDdsuyl4xygtJ9O kuB+G6/2YJL85GF/mELbPF7YSsR+8slIA0bGpKrLiY+7M/+3UoLVHg0zkTm5RmfdH5hMbm trQqZEk0M26jXJuxgbFdjHkOcGjRU0rU3mUly6t0JKuApWk5kzTjtUtrx1RaaGFft9Xwym IXUlmrzS70Ydm2SsAV0pxji8nJLgZd1TevnUwGomQXYnza3DriNXc96o7hs2vQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xr53V0fZkzxqr; Sat, 16 Nov 2024 07:23:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AG7Nnvi018586; Sat, 16 Nov 2024 07:23:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AG7NnnO018583; Sat, 16 Nov 2024 07:23:49 GMT (envelope-from git) Date: Sat, 16 Nov 2024 07:23:49 GMT Message-Id: <202411160723.4AG7NnnO018583@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 0f7b0db5dd07 - main - nanobsd: Fix cust_comconsole search patterns List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0f7b0db5dd07e7c48285db4cac19e15fc9a42622 Auto-Submitted: auto-generated The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=0f7b0db5dd07e7c48285db4cac19e15fc9a42622 commit 0f7b0db5dd07e7c48285db4cac19e15fc9a42622 Author: Jose Luis Duran AuthorDate: 2024-11-15 04:28:01 +0000 Commit: Jose Luis Duran CommitDate: 2024-11-16 07:08:24 +0000 nanobsd: Fix cust_comconsole search patterns The current patterns are outdated, and may produce "offifexists", after e310437971b8 ("For video consoles, only launch a getty if the device exists."). Fix the expressions to: 1. Disable getty(8) on the virtual syscons(4) or vt(4) terminals (/dev/ttyv*). 2. Enable the use of the first serial port as the system console. Reviewed by: imp Approved by: emaste (mentor) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D47586 --- tools/tools/nanobsd/defaults.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/tools/nanobsd/defaults.sh b/tools/tools/nanobsd/defaults.sh index 1e38a07337c7..5cb137a1db94 100755 --- a/tools/tools/nanobsd/defaults.sh +++ b/tools/tools/nanobsd/defaults.sh @@ -742,10 +742,10 @@ UsbDevice ( ) { cust_comconsole ( ) ( # Enable getty on console - sed -i "" -e /tty[du]0/s/off/on/ ${NANO_WORLDDIR}/etc/ttys + sed -i "" -e '/^tty[du]0/s/off/onifconsole/' ${NANO_WORLDDIR}/etc/ttys - # Disable getty on syscons devices - sed -i "" -e '/^ttyv[0-8]/s/ on/ off/' ${NANO_WORLDDIR}/etc/ttys + # Disable getty on syscons or vt devices + sed -i "" -E '/^ttyv[0-8]/s/\ton(ifexists)?/\toff/' ${NANO_WORLDDIR}/etc/ttys # Tell loader to use serial console early. echo "${NANO_BOOT2CFG}" > ${NANO_WORLDDIR}/boot.config From nobody Sat Nov 16 07:23:51 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xr53W5SCMz5cyRP; Sat, 16 Nov 2024 07:23: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xr53W22M7z4gCv; Sat, 16 Nov 2024 07:23:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731741831; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qH9NReCE1X0TbICp4vs1W9GDUar1c664TwFwp2ciRxI=; b=YaiOsXMzvoC23y1+dI6/COVUNmEaRigyHUVmbOoRjl7YuFlTTzb60vERtg87xFi21vO4ZN DzPstMYsYeRq+tOmjmAirzDCsM/e06nZXAO0jjWlluHuIPxl4lmMBU4jGxf4vUWRuIu/nt XEcjZWBb7RbdYYYiDdayTGo+I5SHPu153F3oyYQ5s/841YFqy2T9uOT4H8BldNa4VDndT/ adLs6tTD/dUWwjXN3rjECoLrnSjqZg5WDdq/GDWBmcBU2uuajwaf3ZJLujBMrUSP0l+fEh +TN7H/IdT5mdT/Kni2d0HCKnyPWLnq1pQ9HG8E3vYBFYMJzX8hlN9RTMxCV5SA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731741831; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qH9NReCE1X0TbICp4vs1W9GDUar1c664TwFwp2ciRxI=; b=mbgbRKtpaPjcb/JBejHSQS5u20SdD/W9YRIouyn/p5uEGojSQ2lesd1wTNsKcwigHxV3Kw 9AcTjYZyCPPR0n5n8QOchrDXDiFVt1vv6DeTjlqclWDwemzeY8yrLAmJ70FqMKxw1An36q Gcv/cmIQhHjsWwhzbnHj/eAkZmPvJjmiaYfrwp4FLDRgYkd5D4cLVnxU3t/fvCjy2MY3FP yk1ohTWYkkobQxm2X0XKBWZkmTamqvHQJhFi1I0WosoyliJQb3oKfWJo/f9Xo0kYROUTmv 01Zxag7YGd/AtPBmqvh+o8vPATbnzwJ51C2UoTRJcD1xA2pNF4gJKILyMBW6UQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731741831; a=rsa-sha256; cv=none; b=PAlV/6yag3IWpBxAhoE6gZCEOKjs+Rac7b7RGDhhuvBYdR3ItsMtlxjngaELqJHY/aZP2K eexnMNkIkiDViGzAN4bcupQQmTbYJBGlWW+YAAVZzg9wKOlXU0ZFjBDUEJi5sR81RDRslU 9WKQzEiLlYX+8cERHZgTdXusKVOLeoxYlzOlmDd9jGFVgTAXwcOdMkXGnEjQvqiK2mji0r OQyOYjLiFXUKe2vXF8ML9COhL8RgYuPOkMqqFTkOcTamGLZ9mSUA0K/wLQ6eIArPwPUCdK U9i/5XEm/+odOiV5KsNg+CzVgxzivR+Z4nnaSX0iET6TTGQUVsHeiR1qqC6dfQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xr53W1fVgzxKx; Sat, 16 Nov 2024 07:23:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AG7NpFj018637; Sat, 16 Nov 2024 07:23:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AG7NpMb018634; Sat, 16 Nov 2024 07:23:51 GMT (envelope-from git) Date: Sat, 16 Nov 2024 07:23:51 GMT Message-Id: <202411160723.4AG7NpMb018634@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 12cbad923dbc - main - nanobsd: Fix typos List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 12cbad923dbcccb3d6f71a77ad3241508f186048 Auto-Submitted: auto-generated The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=12cbad923dbcccb3d6f71a77ad3241508f186048 commit 12cbad923dbcccb3d6f71a77ad3241508f186048 Author: Jose Luis Duran AuthorDate: 2024-11-15 04:54:09 +0000 Commit: Jose Luis Duran CommitDate: 2024-11-16 07:11:16 +0000 nanobsd: Fix typos Fix a number of typos in the code or comments. Files under dhcpd, embedded, pcengines, and rescue were intentionally omitted. These directories will be reviewed at a later date. PR: 269884 Reviewed by: imp, zlei Approved by: emaste (mentor) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D47587 --- tools/tools/nanobsd/Files/root/save_cfg | 2 +- tools/tools/nanobsd/defaults.sh | 10 +++++----- tools/tools/nanobsd/fill_pkg.sh | 2 +- tools/tools/nanobsd/mtree-dedup.awk | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tools/tools/nanobsd/Files/root/save_cfg b/tools/tools/nanobsd/Files/root/save_cfg index 1931e5c79923..24f812197a68 100644 --- a/tools/tools/nanobsd/Files/root/save_cfg +++ b/tools/tools/nanobsd/Files/root/save_cfg @@ -62,7 +62,7 @@ do # Add to cfg (y/n/i)? # y) -> save this file in /cfg # n) -> do not save this file in /cfg for current script invocation ONLY - # i) -> add file to ignore list (/cfg/.ignore hiereachy) and never save + # i) -> add file to ignore list (/cfg/.ignore hierarchy) and never save # try to add this file to /cfg. # # touch is used to add files to /cfg to keep the script flow straight and easy diff --git a/tools/tools/nanobsd/defaults.sh b/tools/tools/nanobsd/defaults.sh index 5cb137a1db94..4ba35ffeb04d 100755 --- a/tools/tools/nanobsd/defaults.sh +++ b/tools/tools/nanobsd/defaults.sh @@ -497,10 +497,10 @@ run_late_customize ( ) ( # a user's cfg file would override this. # fixup_before_diskimage ( ) ( - # Run the deduplication script that takes the matalog journal and + # Run the deduplication script that takes the metalog journal and # combines multiple entries for the same file (see source for # details). We take the extra step of removing the size keywords. This - # script, and many of the user scripts, copies, appeneds and otherwise + # script, and many of the user scripts, copies, appends and otherwise # modifies files in the build, changing their sizes. These actions are # impossible to trap, so go ahead remove the size= keyword. For this # narrow use, it doesn't buy us any protection and just gets in the way. @@ -814,7 +814,7 @@ cust_pkgng ( ) ( CR "${PKGCMD} add /_.p/${_NANO_PKG_PACKAGE}" ( - # Expand any glob characters in pacakge list + # Expand any glob characters in package list cd "${NANO_PACKAGE_DIR}" _PKGS=`find ${NANO_PACKAGE_LIST} -not -name "${_NANO_PKG_PACKAGE}" -print | sort | uniq` @@ -905,7 +905,7 @@ usage ( ) { # Setup and Export Internal variables # -export_var ( ) { # Don't wawnt a subshell +export_var ( ) { # Don't want a subshell var=$1 # Lookup value of the variable. eval val=\$$var @@ -914,7 +914,7 @@ export_var ( ) { # Don't wawnt a subshell } # Call this function to set defaults _after_ parsing options. -# dont want a subshell otherwise variable setting is thrown away. +# don't want a subshell otherwise variable setting is thrown away. set_defaults_and_export ( ) { : ${NANO_OBJ:=/usr/obj/nanobsd.${NANO_NAME}${NANO_LAYOUT:+.${NANO_LAYOUT}}} : ${MAKEOBJDIRPREFIX:=${NANO_OBJ}} diff --git a/tools/tools/nanobsd/fill_pkg.sh b/tools/tools/nanobsd/fill_pkg.sh index 6734498350a9..17d163709f91 100644 --- a/tools/tools/nanobsd/fill_pkg.sh +++ b/tools/tools/nanobsd/fill_pkg.sh @@ -160,7 +160,7 @@ for i in `cat "$PL"` ; do if [ -f "$NANO_PKG_DUMP/$i.pkg" ] ; then $COPY "$NANO_PKG_DUMP/$i.pkg" "$NANO_PKG_DIR" else - echo "Package $i misssing in $NANO_PKG_DUMP" 1>&2 + echo "Package $i missing in $NANO_PKG_DUMP" 1>&2 exit 1 fi done diff --git a/tools/tools/nanobsd/mtree-dedup.awk b/tools/tools/nanobsd/mtree-dedup.awk index e30f3100b4da..8840047f5318 100755 --- a/tools/tools/nanobsd/mtree-dedup.awk +++ b/tools/tools/nanobsd/mtree-dedup.awk @@ -84,7 +84,7 @@ function mtree_from_kvs(path, kvs) return lv; } -# Parse the mtree line into path + KVs. Use a sentinal value +# Parse the mtree line into path + KVs. Use a sentinel value # for a bare keyword, which is extremely unlikely to be used # for real. function line2kv(kvs, str) From nobody Sat Nov 16 13:50:50 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XrFf26xPjz5dPfK; Sat, 16 Nov 2024 13:50:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XrFf26V7Sz40cp; Sat, 16 Nov 2024 13:50:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731765050; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/H8sTvwGnZy+8YOaHpQWXuV9y4piyQvNhaU2qhGrSwU=; b=deKwBVNT2WziPO08k4piTvgpm5mEFbodKysX0foHnhFAfVuMTKZlDXRx35GgeKp57Y3JV2 fHUCWIPhpA+haJNXjS5+e4AAnxcd3OWtK0atQVfgsF8+xHwmUrIpNkkYMplFpZzCz8fq6W z2LdwdbrJds3f1OExDKiiPO5HyoE1nQ2g/SBsCUoA8oGq80HSKuOhJUHqhZM62jVbuuBJl s8ky4FUpIAmDZgQ51fSgpcU4gHnwzYH5U7DPhnq/tUa7g/HXudjyQBun/y9xQr1NX1IpFs rFb5aarFPOtI+PAoB5j9pDIkfFf5PQrwYxgV/R6TxVuTYbzhCHam6T4PL8p5Sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731765050; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/H8sTvwGnZy+8YOaHpQWXuV9y4piyQvNhaU2qhGrSwU=; b=czPVC3TcTGGVYdC67TEG1uwEqaZY3fqWXkEDwFbHdep+i2j/xPyqJjwuuyIBcbgQT8NdJO C8clP/+/JUnHX+/gONZ4ACMUkT2eMnO2+Fjv6flpTcVqnzCInilm/UIJ5J24BYUDGwQZbp +WIDgN4I+WBovqfWDeXHEm8GgqTFmZ286F2YVdlYMXUNeTUzL2C2b090qf+peb7ZpY5s+v NjADRyNVPsS3DJR1ZFADgENPTmETLHy+5NUWVg3Z01AQyeOU6BLlrH0a1oFRDh8zdrdyVm eBxHz3dtuB05nkxvzvdSv7OVgPoQ7PIN/wYEGWyK6dPdDDH57oB4DbuueVlrJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731765050; a=rsa-sha256; cv=none; b=ewjcZtX4u85v6TtUlLTsco8creDRFHgPr5/04Q7f7XkGMBeDO2CmoqEZkRklYkpXzJ0SRq 6+Y9tOI+Y7P4sEdQuwCaaCBeBicN6p1JmzvSbeTbeJ6ETRKbIDuiCUUQ9plsJ6e2+E75Mj Mnv7VgALcj41x1UCHY29N036EKWSoK9ED/U8F5IIfL01idaGE/55bMGX+VawfByhbk9LSt 2u/+L5m45yrqb2tbPFHwZrBvZgDeouve8GwVueUQGp6JBqipBGbHeBAvDGnY16b49cxosZ kGoTuKP2QtctgrL3OHYm01x2gle7AnArnAKB16FCKlEzqco/q1dWe2u8nFV4ew== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XrFf21lFHz18Mx; Sat, 16 Nov 2024 13:50:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AGDooSx035988; Sat, 16 Nov 2024 13:50:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AGDooXV035985; Sat, 16 Nov 2024 13:50:50 GMT (envelope-from git) Date: Sat, 16 Nov 2024 13:50:50 GMT Message-Id: <202411161350.4AGDooXV035985@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 615c9ce250ee - stable/14 - sysctl: Add flags to filter jail prison and vnet variables List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 615c9ce250ee7c92edf403350ed6663c3f54a1f2 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=615c9ce250ee7c92edf403350ed6663c3f54a1f2 commit 615c9ce250ee7c92edf403350ed6663c3f54a1f2 Author: Zhenlei Huang AuthorDate: 2024-10-29 11:26:11 +0000 Commit: Zhenlei Huang CommitDate: 2024-11-16 13:49:45 +0000 sysctl: Add flags to filter jail prison and vnet variables So users do not have to contact the source code to tell whether a variable is a jail prison / vnet one or not. Reviewed by: cy (previous version), markj, jamie (for #jails) MFC after: 2 weeks Relnotes: yes Differential Revision: https://reviews.freebsd.org/D47107 (cherry picked from commit 5ec83c660acaf30c1d6b9417dbd8c80dfa9d56ac) --- sbin/sysctl/sysctl.8 | 9 +++++++-- sbin/sysctl/sysctl.c | 18 ++++++++++++++++-- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/sbin/sysctl/sysctl.8 b/sbin/sysctl/sysctl.8 index 70115fa54318..fadc162b80c6 100644 --- a/sbin/sysctl/sysctl.8 +++ b/sbin/sysctl/sysctl.8 @@ -30,7 +30,7 @@ .\" .\" From: @(#)sysctl.8 8.1 (Berkeley) 6/6/93 .\" -.Dd August 18, 2023 +.Dd October 29, 2024 .Dt SYSCTL 8 .Os .Sh NAME @@ -113,6 +113,8 @@ The purpose is to make use of .Nm for collecting data from a variety of machines (not all of which are necessarily running exactly the same software) easier. +.It Fl J +Display only jail prision sysctl variables (CTLFLAG_PRISON). .It Fl l Show the length of variables along with their values. This option cannot be combined with the @@ -155,6 +157,8 @@ to standard error. Display only variables that are settable via loader (CTLFLAG_TUN). .It Fl t Print the type of the variable. +.It Fl V +Display only VNET sysctl variables (CTLFLAG_VNET). .It Fl W Display only writable variables that are not statistical. Useful for determining the set of runtime tunable sysctls. @@ -327,7 +331,8 @@ option has been deprecated and is silently ignored. .Xr loader.conf 5 , .Xr sysctl.conf 5 , .Xr security 7 , -.Xr loader 8 +.Xr loader 8 , +.Xr jail 8 .Sh HISTORY A .Nm diff --git a/sbin/sysctl/sysctl.c b/sbin/sysctl/sysctl.c index df388e41c560..8ec9089bd2cf 100644 --- a/sbin/sysctl/sysctl.c +++ b/sbin/sysctl/sysctl.c @@ -64,7 +64,7 @@ static const char *conffile; static int aflag, bflag, Bflag, dflag, eflag, hflag, iflag; static int Nflag, nflag, oflag, qflag, tflag, Tflag, Wflag, xflag; -static bool Fflag, lflag; +static bool Fflag, Jflag, lflag, Vflag; static int oidfmt(int *, int, char *, u_int *); static int parsefile(const char *); @@ -137,7 +137,7 @@ main(int argc, char **argv) setbuf(stdout,0); setbuf(stderr,0); - while ((ch = getopt(argc, argv, "AabB:def:FhilNnoqtTwWxX")) != -1) { + while ((ch = getopt(argc, argv, "AabB:def:FhiJlNnoqtTVwWxX")) != -1) { switch (ch) { case 'A': /* compatibility */ @@ -170,6 +170,9 @@ main(int argc, char **argv) case 'i': iflag = 1; break; + case 'J': + Jflag = true; + break; case 'l': lflag = true; break; @@ -191,6 +194,9 @@ main(int argc, char **argv) case 'T': Tflag = 1; break; + case 'V': + Vflag = true; + break; case 'w': /* compatibility */ /* ignored */ @@ -1049,10 +1055,18 @@ show_var(int *oid, int nlen, bool honor_skip) if (Wflag && ((kind & CTLFLAG_WR) == 0 || (kind & CTLFLAG_STATS) != 0)) return (1); + /* if Jflag then only list sysctls that are prison variables. */ + if (Jflag && (kind & CTLFLAG_PRISON) == 0) + return (1); + /* if Tflag then only list sysctls that are tuneables. */ if (Tflag && (kind & CTLFLAG_TUN) == 0) return (1); + /* if Vflag then only list sysctls that are vnet variables. */ + if (Vflag && (kind & CTLFLAG_VNET) == 0) + return (1); + if (Nflag) { printf("%s", name); return (0); From nobody Sat Nov 16 13:50:51 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XrFf35vK5z5dPx2; Sat, 16 Nov 2024 13:50: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XrFf33Kh4z40Zf; Sat, 16 Nov 2024 13:50:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731765051; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a+6Lb9RfHmqCWKjylI6Ujpxgn8Sx71Lsoyulr+iPlqs=; b=gX8htvPKpQ7jZcFHX/x395N5naAj+GyLITTN68SipEzDAKqzEepjsPrVGom49inn8/Kc8q st+kGVvxRRkFh8TfnzYLsg/+ck8/3GLl8iHxXn8/wHH+Ykh2LTZZ0LJCyEON5kl4lhrKGS 1IWU74SCT0OyyYGc6u4md7I+8CjaOAs7srczDj4D0L4vjn5c4J6/5oGilNNhsVpr1jtYDn lDJ/oK8JqTPoTa7LBKR8lXzoWS5jT9wrr3vUjG08n2ffyfUB0QCrf+vDgZ2rjPEQZ7z8zY cZJzL8VH/r6NxSEqMenD/0Hcm/7Avr6E4eqhi/FONmThm5wKxmD5cSIrB6CSog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731765051; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a+6Lb9RfHmqCWKjylI6Ujpxgn8Sx71Lsoyulr+iPlqs=; b=jq6IwQLbfEQeZVTSOAUZbU2X/thWLE/g3D1I4mUi3ZiWLI6ZRYbRPlI1ulhy34H9yGPh02 DIf3B4O0d8A39+X0VweuSOmmUoLGReGDzRcEBnXVXRPWRf/DxlPTwzI8REu1f9B04pwDtm uzcGAtJ9CzYl/sESX8g1z5aDkVuHb5BlCtfb9dK12EmZeTEAXgx0iJMqL13wlCLQhtapIK WdDtyKSLCNr3orP78eD7ZwWrBSF1+fZCdaYr7QXFpyAafaQEJ/9Aa/QgTEZP/VFpaWtL4w TjRIqqginCcQpPue3hqNxNblnFdhPJ3buT2U7BP4EBEq+6UgXYSwaKuWCA4ryg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731765051; a=rsa-sha256; cv=none; b=YjmlGW8yLs0x4Gr8jBD9CtL+lYSDdf8aTMpoZHOmaXaqPqWyJjYXZf+AwykyMlRBcUV38F TL91eOrX3kbARSIxQvXF9UWC/OLeDSKGRQAsldhQ6uK2I3eKKzWHwruKxzoY7ZbY1TE9Pa y/29NwYIn9BMfIXYca4y6I/0mxPIO2JAQuUUtYssDGA0J2FUfsDjRQaVsFKsF4Zs9vWQ6f 7fIpl+7nEONavMShnDfl4VaeMdMWpIz20t98adLoeq7ZHAcZ9cwbaQoHdNfUE4CJzt6XU4 BRvU4onupdDuW8emeCM/9P6eskfvDFWRp+qdnqSpttMvJnzrHwDi5NnaQXsYKQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XrFf32R1Jz18N0; Sat, 16 Nov 2024 13:50:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AGDopeb036032; Sat, 16 Nov 2024 13:50:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AGDopDX036029; Sat, 16 Nov 2024 13:50:51 GMT (envelope-from git) Date: Sat, 16 Nov 2024 13:50:51 GMT Message-Id: <202411161350.4AGDopDX036029@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 834d633498bc - stable/14 - ifnet(9): Document the IFF_PALLMULTI flag List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 834d633498bc5f9ceb7b370391e720afa51353aa Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=834d633498bc5f9ceb7b370391e720afa51353aa commit 834d633498bc5f9ceb7b370391e720afa51353aa Author: Zhenlei Huang AuthorDate: 2024-11-12 14:47:45 +0000 Commit: Zhenlei Huang CommitDate: 2024-11-16 13:49:45 +0000 ifnet(9): Document the IFF_PALLMULTI flag It was introduced by the recent commit [1]. 1. 58f194223ab8 ifnet: Add handling for toggling IFF_ALLMULTI in ifhwioctl() Reviewed by: markj MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D47511 (cherry picked from commit f9f470f72c8718c3503874791d593997c3d751b4) --- share/man/man9/ifnet.9 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/share/man/man9/ifnet.9 b/share/man/man9/ifnet.9 index 41cbfd8dad42..69804a754b3a 100644 --- a/share/man/man9/ifnet.9 +++ b/share/man/man9/ifnet.9 @@ -26,7 +26,7 @@ .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 24, 2022 +.Dd Nov 12, 2024 .Dt IFNET 9 .Os .Sh NAME @@ -608,6 +608,10 @@ This interface is in the permanently promiscuous mode (implies .It Dv IFF_ALLMULTI .Aq D* This interface is in all-multicasts mode (used by multicast routers). +.It Dv IFF_PALLMULTI +.Aq D +This interface is in the permanently all-multicasts mode (implies +.Dv IFF_ALLMULTI) . .It Dv IFF_DRV_OACTIVE .Aq D* The interface's hardware output queue (if any) is full; output packets From nobody Sat Nov 16 14:57:15 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XrH6g36dqz5dT0n; Sat, 16 Nov 2024 14:57: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XrH6g2TLxz44Bm; Sat, 16 Nov 2024 14:57:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731769035; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xEIoltcFe4Ib9Zp/BeiNEIZbwW5MpIfupMw/Czmy09M=; b=MHHkecFh/7udrA2uKr+cAfmv/nF+Aai8N/yGaFFLZBCuTNK0eds58ADfVsGRSqFcEuE8ZK FUc58u5cs1622yeHzd94cIVyeN8nldboSKKJc/QZO7lq2PYcwvmydLEYftn1mn9WzqAI8H ysAKChlfKluZSSXBtKkkNJPPGGIenDqZhl4sYe+BxmsZ1FcGcfp3U8woitsaUzKzVRDM0D i39tDkU5y9khDNZRm/7O5y3onH8GZx6yumU182BhnBHkiJBfeN0QSlossxa/Ebi7iw8NY1 JP5NbsmPUA99ZFbGeWsHPNkgDLqY7nQQ+Ds/UX8onL8sLTuFUo57o1X+eWOOHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731769035; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xEIoltcFe4Ib9Zp/BeiNEIZbwW5MpIfupMw/Czmy09M=; b=bfZouLxZQ5E/yvYMT2jxUWC+X1ERKyYcqti790D2undDw3RbOdLXNO1OSxtqFA9zQBqPQz FC+fgi7t8E7Gr7m3Xmn2x/Ul1JmRVdiuTPZFKzo2l9uZinEgyGtV1GirATSzDUhd1K1DOo yocnrVM3ygs3/yTDiYYW0Vcd8gglmAa6GUvnmPT4+PPKSqNk5Dt43t68ULJmG8/x9ymbFE ajvMEBOuTu+4i/NM3E+2Mrx8ZTLaTC37OBObI5VGlaaTFgmXsznZKr3UmW+G204zWRr2Gq laUwEOx9qZJqRQSy61ktugY1/0N13ZD9vaEf40+G5XgNnrBX8y2DYyY4MFgWng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731769035; a=rsa-sha256; cv=none; b=wemV+S5K+mOdwdYFw2v/RT90mkgvuFJFVJol3N3tKr48i9x+duBYf6pE0VUn42IqHD4MYg Scg+ELtHJ1nx/yMzmtIvSTIb93kJTMi8YwOnstF0YrcdJQWnCLrsJAdn7CWiJHF+yO/T9o ULQ+xOjlFtOXTDDmEVdWi9lzDFl1vPmHhQHYrB0ouNgc5v4y1/I9wvQ7pyzn6vyX6Q2ox5 dm5Ku/EBB4F8L0tSxWghyjxDkqJAcPkmYgM4fzqlLSUc8qpfKUjfHYfbjmqyf4+LDhusv6 TmM1ZkLL8FuhIL5hIkWNIv6TkzG5t2E6EEaLOGPvyZ333u6QS8ovHGkUMLAyTw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XrH6g1ypCz1BBm; Sat, 16 Nov 2024 14:57:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AGEvFum054595; Sat, 16 Nov 2024 14:57:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AGEvFtr054592; Sat, 16 Nov 2024 14:57:15 GMT (envelope-from git) Date: Sat, 16 Nov 2024 14:57:15 GMT Message-Id: <202411161457.4AGEvFtr054592@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 2c2f741363a9 - main - mfc-candidates: Improve hash expansion List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2c2f741363a9dde7b855b05785b36d6d979c97ae Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=2c2f741363a9dde7b855b05785b36d6d979c97ae commit 2c2f741363a9dde7b855b05785b36d6d979c97ae Author: Ed Maste AuthorDate: 2024-11-15 21:29:50 +0000 Commit: Ed Maste CommitDate: 2024-11-16 14:56:07 +0000 mfc-candidates: Improve hash expansion `git rev-parse` is the canonical way to turn a short hash (or other commit-ish) into a full hash. Sponsored by: The FreeBSD Foundation --- tools/tools/git/mfc-candidates.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/tools/git/mfc-candidates.lua b/tools/tools/git/mfc-candidates.lua index b29f1ad4d121..d2865a892971 100755 --- a/tools/tools/git/mfc-candidates.lua +++ b/tools/tools/git/mfc-candidates.lua @@ -77,7 +77,7 @@ local function read_exclude(filename) -- Hashes are 40 chars; if less, expand short hash. if #hash < 40 then hash = exec_command( - "git show --pretty=%H --no-patch " .. hash) + "git rev-parse " .. hash) end table.insert(content, hash) end From nobody Sat Nov 16 15:00:21 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XrHBG1Lsbz5dSsd; Sat, 16 Nov 2024 15:00: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XrHBG0lHYz453L; Sat, 16 Nov 2024 15:00:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731769222; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xhfPI8lIiJOuRSsCjswZKP7irJJJcAjLh4gXZC/DWiY=; b=xL0ZJ3h2Q2R4JLMA15ERfbj0mCABRg60cT30Be0ggPuMgpQw5m+Wu2J2OUUnJayra5jV65 wcF7fwmu6bEtSTkbXpCUs5JFoxa7bWiyAllQC1ELcPASnsSBytl1PZI2fXSAULNnMyLjJh jxlDfkIwPDFOkXytXAmLJPm97vvg57fe239VXEkwmCbH808doPic2LNVtwQ74ggmyjVeuZ VCCJivengZ6CWwKzIjWZeRQWTjP7Yhfnxhdb6qrO3hVI87HZvuJlGyr6HkE/nszx2R2ptv W3e4h8WNBmqZbYE4q5i/a9fzkewv9E3iB4vu5YuHeLGoyqrxk02rALmPgVY06w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731769222; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xhfPI8lIiJOuRSsCjswZKP7irJJJcAjLh4gXZC/DWiY=; b=lCo6Htgghl4j8PCnqZKrgi2rQ1eGVngCG2+/HLPldf0MaPGcJRHLDSsWG73qvhuZgYgFvP 6jNf/wHvT7tYROyX35pUCcQyOX4HRqbE6Kv9jGDriLKXHNMOeIxu0e7ZjZHAhdRohg3gKD LcWddoU2ESBAVOOOr5PQQ6e0zosVDkWcndf3vCQ9nUhHyfXVNFTMzbSNiJjP2WXaYJeoSP SLAmint1peTSAFYm20qmcxC9jeYcOYlfzG+TX5BIokG4kKdWRFXqupAkk33FuSsfEvhal8 MGd+t7xPGTntOBKb/8fUV8goSMevJRwwmf/MQBJ02D2FrnuotVZi/6wx834xUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731769222; a=rsa-sha256; cv=none; b=gPlMulsnNAoY+v/K8DbIGYagSBbDTEKs6HvK6JfGwLaIA9ytdDGAMyTVVGiRDhvNJvL9Gk 0VWosniR54twOhFaR3+m116JZSKmSQav/7CEQWKXMBDDvflDuvgnHMW5uG3BOjkU6xRHzm l2LdARBQ6n2moet9uS8omDFYpcxQe6YsLvvwb7HClipX65MyM58qCYR4xA35YigdamO0tA UsMaryDVSifSh980Y3hv+uQy6pV90GWMGHQYtBU4r5WuMNVUdcOcYgRg69NTrV7+Eh91Bb spq0vNDJneaFuAkTuSQu3MOJ9py2A0eZ7H9pmkqFwe2FITuGIUDrkwrLRJoA1w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XrHBG0Gq7z1BCY; Sat, 16 Nov 2024 15:00:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AGF0Ldo065468; Sat, 16 Nov 2024 15:00:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AGF0Lg5065465; Sat, 16 Nov 2024 15:00:21 GMT (envelope-from git) Date: Sat, 16 Nov 2024 15:00:21 GMT Message-Id: <202411161500.4AGF0Lg5065465@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 54efa38e2551 - stable/14 - build: Note paths that must be absolute List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 54efa38e255184f7f7862294666b017acb093a08 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=54efa38e255184f7f7862294666b017acb093a08 commit 54efa38e255184f7f7862294666b017acb093a08 Author: Ed Maste AuthorDate: 2024-11-13 15:13:51 +0000 Commit: Ed Maste CommitDate: 2024-11-16 14:59:22 +0000 build: Note paths that must be absolute PR: 282711 PR: 282737 Sponsored by: The FreeBSD Foundation (cherry picked from commit 75af1320f4b57fb568ec4f6df6171a0343953f4f) (cherry picked from commit 02dc158215a69c6439e5a0809e5f9c79e62c5fd1) --- share/man/man7/build.7 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/share/man/man7/build.7 b/share/man/man7/build.7 index 427f01e1223d..4bff6164dd56 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 June 4, 2024 +.Dd November 13, 2024 .Dt BUILD 7 .Os .Sh NAME @@ -500,6 +500,9 @@ The directory hierarchy prefix where built objects will be installed. If not set, .Va DESTDIR defaults to the empty string. +If set, +.Va DESTDIR +must specify an absolute path. .It Va MAKEOBJDIRPREFIX Defines the prefix for directory names in the tree of built objects. Defaults to @@ -512,6 +515,8 @@ and not via or .Pa /etc/src.conf or the command line. +.Va MAKEOBJDIRPREFIX +must specify an absolute path. .It Va WITHOUT_WERROR If defined, compiler warnings will not cause the build to halt, even if the makefile says otherwise. From nobody Sat Nov 16 15:01:54 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XrHD25hrjz5dT6K; Sat, 16 Nov 2024 15: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XrHD251GLz467V; Sat, 16 Nov 2024 15: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=1731769314; h=from:from:reply-to:subject:subject: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+o2TUXyI2YRqupQ2V9tqZ+zWfAwZCt0hMfX/KGurEM=; b=FLsaWM092HKIq5S93BncuwAB4leLtsw+FYYJEpPV83F19srv/yXvjLhdQB4nK7Fam7vg98 vOAN7ZaSFLSKan74tqkDHFyQF04t4cCK5SRunqwNbUkExBTL57kTMQV8agHR5k9UEO6kKn 5hubaEawv3unOeFBIX1gMVlr4Yo88/dEGHKicqjzu0ZYgBxfhXZXDMY2lpdbJD3E5A7sfb kuCFsecJdCshvtUUOMSM8hfdxKn9Jilz5Df2fcbse0me9espIb1yuT5211hAdly1Rme2Lo tdVCMBztsYdpcuEytVkOnrcBHDXF9J+3s/vRSSpZsWNT+1lMAfJchX3Dp1JMbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731769314; h=from:from:reply-to:subject:subject: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+o2TUXyI2YRqupQ2V9tqZ+zWfAwZCt0hMfX/KGurEM=; b=sVXTxohMUB+1+igiOmgYr6p2S9pvviBNHlIa+7mDzVA2pETE0FDzVy0fstRBS4dPVC4yof +zDmggXXDwSYWR6SytFUvgmacWuheMG6Wc3qcKlWbj3dA/3IECKigMPAuRw2K4OJwpPk2X KZ1v1tfZHKp8hKS2hlz1yYFIbhWCe4DVjPnuaCgSD/zTsUgYEq6FTVLCWSpLT/3QDyi9pv Su7UU2XBOShYHmFhpYzw4/86Ahu5XeE6ZTSSfXZGLYE+MLfuwvqSsUQSobz2hl+axLZ0Ze CN2zR2fqdOs3lDkYrzjoQenoJlk6SZRGzYp4gVy4SKqPl5Cp8nVLokag51KJpw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731769314; a=rsa-sha256; cv=none; b=yFo87Ih7G+q9znVtSn77d6m4S57eWMlvWUCRd+Yx8foPcJmr/d36tWuRHDDpe3tIn+DBky nuvJvzotPTYylv9RweKq4GvvC8Di8CGXegXFeIXIej5z0Ln6euDZ1N8JrVvuR3wKP35Wnb gFIBlwMU58NZ49F/BuRVvhQ6Q/uCGh46fMcWvm2/8etaamMJ+QIeKmXHAMgX83NKnyGOUT TsNqjZvE97poYSGmCh/cnve0Z+YLp2aCTII7j78ubF+8GOdHBSK47ifYRgzQ21jee+hJCi BMau4yauUONc3NlIaNOsFufX4isCdz45Nfkk4CVfpcoMo1+pQwKmKbDlP6hjuA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XrHD24Y7wz19tP; Sat, 16 Nov 2024 15:01:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AGF1sI1072896; Sat, 16 Nov 2024 15:01:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AGF1sKY072893; Sat, 16 Nov 2024 15:01:54 GMT (envelope-from git) Date: Sat, 16 Nov 2024 15:01:54 GMT Message-Id: <202411161501.4AGF1sKY072893@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 3c113ee25c20 - stable/13 - build: Note paths that must be absolute List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3c113ee25c20bdfc66d310e17451d17f4c1ddb92 Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=3c113ee25c20bdfc66d310e17451d17f4c1ddb92 commit 3c113ee25c20bdfc66d310e17451d17f4c1ddb92 Author: Ed Maste AuthorDate: 2024-11-13 15:13:51 +0000 Commit: Ed Maste CommitDate: 2024-11-16 15:01:41 +0000 build: Note paths that must be absolute PR: 282711 PR: 282737 Sponsored by: The FreeBSD Foundation (cherry picked from commit 75af1320f4b57fb568ec4f6df6171a0343953f4f) (cherry picked from commit 02dc158215a69c6439e5a0809e5f9c79e62c5fd1) (cherry picked from commit 54efa38e255184f7f7862294666b017acb093a08) --- share/man/man7/build.7 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/share/man/man7/build.7 b/share/man/man7/build.7 index 05a82bafbc7e..c6b2f6fd6804 100644 --- a/share/man/man7/build.7 +++ b/share/man/man7/build.7 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 10, 2021 +.Dd November 13, 2024 .Dt BUILD 7 .Os .Sh NAME @@ -480,6 +480,9 @@ The directory hierarchy prefix where built objects will be installed. If not set, .Va DESTDIR defaults to the empty string. +If set, +.Va DESTDIR +must specify an absolute path. .It Va MAKEOBJDIRPREFIX Defines the prefix for directory names in the tree of built objects. Defaults to @@ -492,6 +495,8 @@ and not via or .Pa /etc/src.conf or the command line. +.Va MAKEOBJDIRPREFIX +must specify an absolute path. .It Va WITHOUT_WERROR If defined, compiler warnings will not cause the build to halt, even if the makefile says otherwise. From nobody Sat Nov 16 15:23:11 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XrHhc0KYDz5dV86; Sat, 16 Nov 2024 15: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XrHhb6M7gz49hR; Sat, 16 Nov 2024 15:23:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731770591; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kxLrl5NEwTUUY7km31hnu1v/6SXVPCmEtr9ARX5tn+E=; b=V3Gbm/ypzLz4yqFUsvyXfaqJFBpnEgUdGTu2P39tuVxKwtHt46zcX/lpia06lyIFPXIThA ILTq7riibP60IOKeUGQU6PTtW6DkikWa3dSo8QD1L7L1JYJFxoineJlc4Ydt/+0iFj587y wr2nk1oq38SuNgzOWt50T3r83D0f9hFM5YDuL3Hecs5TxuKboD7wmRFtQULmpgQiyn+ffK J+x1ErSbfPZ4A1kvhOammRf2NA706YkMqTvpmX74DFduellzNinxizAl5lN0SwTAoxj/UG J/oBBe/YCOhUVaZx2BG+OCl1+kKLdIbP+LyS53lZQeKJULd8XxsSR2pZin11KQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731770591; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kxLrl5NEwTUUY7km31hnu1v/6SXVPCmEtr9ARX5tn+E=; b=J4hqWLgzWKrL5Y8giR/3euJiFqw2hOQWvng8jOMuWA9cx4vId69kjoZo+o5pu4ATGBgPGM gFqcLCklXW/Dyg9lccFexhY0r2fiAmZaDqFE+i85Wp9MyN4wxO93deU5UUUo+ZN3VBd8XY tULLP8yCr9ZmtDJR/0U62U07Fc1NQAYo4p9qDAbn27JspF+UF2nlcHFd2kT6A4nHy9Y/HF Rr6vg4GDRvodXOJLFReSSKY+cgt4V70mBDmEDjoZHdfDTzvtqGG/2ChBADIKJ+46VEGsbG ArCaKtbWEVFTqiy7LHR+7L+OMPDOLbby5kmjNR66Z+x7Yiv32HTwTvrLbuoGzA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731770591; a=rsa-sha256; cv=none; b=OYBDCLr/02+MFlx24DivjccJDSWtu0BiDWuPlj3IS+cLrbi2jiF+1MfUXon08I/qADF5HS rHdi3beQ4y722rE9F10Z/sSVuqnQe4pW86KgP81PdY6LPS4aD2QvS2EaECpFbS67UWQa5z kAdyumwIwA3Z4aw+8DuxqD3MyiuW3zBL+8lOCBzlVHuDCbLwSm3Xl85+vgR7eaPbbsaBdN 5ky2FE3dQOyGBa4292h3yYZC/dOPbUoy9TmU3WDcTFSmt78T41oNqDPZPLJPC6UFh4zaOA yEDno62hHC6RZkOTrYOnk81fynCDjNNp4sNP90eQyZ1HkwVUGH7ei/MSC5e1Kw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XrHhb5sXrz1BFF; Sat, 16 Nov 2024 15:23:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AGFNBYT010439; Sat, 16 Nov 2024 15:23:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AGFNBcu010436; Sat, 16 Nov 2024 15:23:11 GMT (envelope-from git) Date: Sat, 16 Nov 2024 15:23:11 GMT Message-Id: <202411161523.4AGFNBcu010436@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 4ef07eb0802a - main - getentropy: Add Git hashes corresponding to SVN references List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4ef07eb0802a6353faf79d58719d8008decabae0 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=4ef07eb0802a6353faf79d58719d8008decabae0 commit 4ef07eb0802a6353faf79d58719d8008decabae0 Author: Ed Maste AuthorDate: 2024-11-16 15:18:16 +0000 Commit: Ed Maste CommitDate: 2024-11-16 15:22:46 +0000 getentropy: Add Git hashes corresponding to SVN references getentropy has a comment about a special case to support kernels between SVN revisions r331280 and r337999. Add the corresponding Git hashes so there's a usable reference after Subversion infrastructure disappears. Sponsored by: The FreeBSD Foundation --- lib/libc/gen/getentropy.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/libc/gen/getentropy.c b/lib/libc/gen/getentropy.c index 40b84af65f83..40debe4ab662 100644 --- a/lib/libc/gen/getentropy.c +++ b/lib/libc/gen/getentropy.c @@ -125,11 +125,11 @@ __ssp_real(getentropy)(void *buf, size_t buflen) switch (errno) { case ECAPMODE: /* - * Kernel >= r331280 and < r337999 - * will return ECAPMODE when the - * caller is already in capability - * mode, fallback to traditional - * method in this case. + * Kernel >= r331280 (4948f7bf1153) + * and < r337999 (ed1fa01ac45a) will + * return ECAPMODE when the caller is + * already in capability mode; fallback + * to traditional method in this case. */ have_getrandom = false; continue; From nobody Sat Nov 16 19:04:28 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XrNbw4lldz5dhZp; Sat, 16 Nov 2024 19:04: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XrNbw3vw9z4Z5N; Sat, 16 Nov 2024 19:04:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731783868; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qNIBiYs3CJqEDf6Rrpcu543g3SbwKXBHATuB4fLx/bw=; b=vIi9aLAC8iCeY9SmRKZNLmmaOmCX+Ld9SBZ9VoUzD/CXaJCKGO1A05sCqnbTKDs+/H8x7T GyyB3BoeQ2jEY1cq1aWJrl41dDN+4Y5+aP1F3Lt/v63Svc+eyKKbz1GY0OLunPRoAcwNRV k1iSkXi0lNZ+5BcBCGCh80CNuYqdyhpMnhrCHjs1VyS4Qu25PU3n6D6l8qEyRTOTjqgWvd Jj5/jnunQB+tQFaRTw8IBPIA6lLe1A8qpfAKYCEyeaYrDf27Ooug5SsmJZ4AQgU/lNFRO0 gvIN/oMbNcdI/2B16rn9+pHOPP9DpNMFlb3Me3dnhHe10m+zMO0YCVwtcG+zlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731783868; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qNIBiYs3CJqEDf6Rrpcu543g3SbwKXBHATuB4fLx/bw=; b=ponJ7zK1MQEPR71luhfZCeTAGpbKt3l/Ge5MY4RPB7T0MW/NVve/zxmxvlm5pG6fRnxC42 bh1MLFdDuB7NS08An5whU0ohL8dgsM56YY9nT9igSsOuE0ydJ0Z2wyfn4DkUec0HV9uWQo TxuuDEZjbqQRwCwX6EwxzKJuVLYbvMqWuQ0XGx6DNSVaOCJ1LTtDleXFDHkr0EcqMp9K63 7eDJnOaZ3gAksEUGcUgaZ4meic4tMXgQy0TCHnApFZo/aZuLzrUIMkw57WYNVJP3QGC3Pt 1SWCUc0LnyLua4EvTanbIjlvhC3DXB/fJvwHTww35ljyyxLwjdIIAgX+eKAzZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731783868; a=rsa-sha256; cv=none; b=uthB00qT7k3vUYEs7gGXHZ6vz1yPspe/VIw+llBw+HtAhJmlJhzl9Xy1n7TL2k8EcR0nUd mUE7WYY4QkjHyHpyqHHNFv8xC96uBzQk0EtAeYX1T3mQPebSpC1Gm0JjFXBo/exyTDEydX 6glWlXC9BP6MmClMFOmZK3kpvdAjQTEGHDKjlja1nKa7aDBBSlxacGcArX4Iy1A270D8x2 39NwD3gecg7BAXGZiNwkq9aloNm3ny7GpmUfc2dfsKbR9rwIXvqDeNEaJVCFyC0BrNFT3n qcssbgbXIdG6ouRioAIqn19Z4j5SdmIyPnEC8GaD+hJRjr3y0dqN6/ZfW2V7sA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XrNbw3W4gzK9W; Sat, 16 Nov 2024 19:04:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AGJ4S05020809; Sat, 16 Nov 2024 19:04:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AGJ4SH6020806; Sat, 16 Nov 2024 19:04:28 GMT (envelope-from git) Date: Sat, 16 Nov 2024 19:04:28 GMT Message-Id: <202411161904.4AGJ4SH6020806@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 9ddd516b8862 - main - riscv: enable allwinner RTC List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org 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: 9ddd516b886218af809dbf40eeda1ed388e2879c Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=9ddd516b886218af809dbf40eeda1ed388e2879c commit 9ddd516b886218af809dbf40eeda1ed388e2879c Author: Mitchell Horne AuthorDate: 2024-11-15 17:20:35 +0000 Commit: Mitchell Horne CommitDate: 2024-11-16 19:04:04 +0000 riscv: enable allwinner RTC For the Allwinner D1 (Nehza) SBC. This RTC driver is also a clock provider, which registers two fixed clocks. In all the devices we currently support, the names of the clocks are present in the "clock-output-names" property of the device tree. This is not the case for the D1 DTS, as this property does not appear in upstream. Therefore the clock definitions are statically assigned a name, which is overridden when specified. Reviewed by: manu Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D47514 --- sys/arm/allwinner/aw_rtc.c | 24 ++++++++++++++++-------- sys/riscv/allwinner/files.allwinner | 1 + sys/riscv/conf/std.allwinner | 1 + 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/sys/arm/allwinner/aw_rtc.c b/sys/arm/allwinner/aw_rtc.c index 9938601f17ce..a13c0e7d926e 100644 --- a/sys/arm/allwinner/aw_rtc.c +++ b/sys/arm/allwinner/aw_rtc.c @@ -134,6 +134,7 @@ static struct ofw_compat_data compat_data[] = { { "allwinner,sun7i-a20-rtc", (uintptr_t) &a20_conf }, { "allwinner,sun6i-a31-rtc", (uintptr_t) &a31_conf }, { "allwinner,sun8i-h3-rtc", (uintptr_t) &h3_conf }, + { "allwinner,sun20i-d1-rtc", (uintptr_t) &h3_conf }, { "allwinner,sun50i-h5-rtc", (uintptr_t) &h3_conf }, { "allwinner,sun50i-h6-rtc", (uintptr_t) &h3_conf }, { NULL, 0 } @@ -147,11 +148,13 @@ struct aw_rtc_softc { static struct clk_fixed_def aw_rtc_osc32k = { .clkdef.id = 0, + .clkdef.name = "osc32k", .freq = 32768, }; static struct clk_fixed_def aw_rtc_iosc = { .clkdef.id = 2, + .clkdef.name = "iosc", }; static void aw_rtc_install_clocks(struct aw_rtc_softc *sc, device_t dev); @@ -249,24 +252,29 @@ aw_rtc_install_clocks(struct aw_rtc_softc *sc, device_t dev) { phandle_t node; int nclocks; + /* + * If the device tree gives us specific output names for the clocks, + * use them. + */ node = ofw_bus_get_node(dev); nclocks = ofw_bus_string_list_to_array(node, "clock-output-names", &clknames); - /* No clocks to export */ - if (nclocks <= 0) - return; + if (nclocks > 0) { + if (nclocks != 3) { + device_printf(dev, + "Found %d clocks instead of 3, aborting\n", + nclocks); + return; + } - if (nclocks != 3) { - device_printf(dev, "Having only %d clocks instead of 3, aborting\n", nclocks); - return; + aw_rtc_osc32k.clkdef.name = clknames[0]; + aw_rtc_iosc.clkdef.name = clknames[2]; } clkdom = clkdom_create(dev); - aw_rtc_osc32k.clkdef.name = clknames[0]; if (clknode_fixed_register(clkdom, &aw_rtc_osc32k) != 0) device_printf(dev, "Cannot register osc32k clock\n"); - aw_rtc_iosc.clkdef.name = clknames[2]; aw_rtc_iosc.freq = sc->conf->iosc_freq; if (clknode_fixed_register(clkdom, &aw_rtc_iosc) != 0) device_printf(dev, "Cannot register iosc clock\n"); diff --git a/sys/riscv/allwinner/files.allwinner b/sys/riscv/allwinner/files.allwinner index ee7ad9be1e70..e4849e53e339 100644 --- a/sys/riscv/allwinner/files.allwinner +++ b/sys/riscv/allwinner/files.allwinner @@ -1,2 +1,3 @@ +arm/allwinner/aw_rtc.c optional aw_rtc fdt arm/allwinner/aw_wdog.c optional aw_wdog diff --git a/sys/riscv/conf/std.allwinner b/sys/riscv/conf/std.allwinner index a781164d0632..2071d15c3b24 100644 --- a/sys/riscv/conf/std.allwinner +++ b/sys/riscv/conf/std.allwinner @@ -2,6 +2,7 @@ # Allwinner SoC support # +device aw_rtc # Allwinner Real-time Clock device aw_wdog # Allwinner Watchdog files "../allwinner/files.allwinner" From nobody Sat Nov 16 19:04:29 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XrNbx4XT7z5dhdJ; Sat, 16 Nov 2024 19:04: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XrNbx40MSz4ZBY; Sat, 16 Nov 2024 19:04:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731783869; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sjdjVNUQi8SqWCuWj7Cub/fstaKk0c6YwojKCQOIh2I=; b=a4tztms2HQ8HgfUd0MRKcOfqlUpJSBDPDvKZjuv8sfEaRCGCqq//paxS43SJsJ6gAc1ZM6 7AMOsJP1paToSNIFw3AtoD+X4fVJRfEjo+X++aHA64EpSrfq16C/zdpRMOXj9H0ifFzOKZ IWdNmpEtAAnjzxvaYZoedLHLaOBx5TPqp/7u2XkoNqqhS28jG0SxkK4kquoRP8LvjDbwSQ KKc9iIxTaHHsM300uRMcyy7Uu94QBxEK1t6/KEl9dtzwZXz1BRqgjaxe7fDY73SdmlsoqS D9ObWiTdd03XYF5EQa29NS6DzftRvnbA/tVxNWnC5syYFU0pIeAUrTq103PkxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731783869; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sjdjVNUQi8SqWCuWj7Cub/fstaKk0c6YwojKCQOIh2I=; b=A3cX/RovWgWaMaPJiw2mZcAwOgMLQknDo+nhbCLDVHHcO67R+ueLTzk/DFZa4Ec0nnHEiN DCEx1t0VRSsjRfA2SkF3N77Wla5I6vQyRm5EirIxqn2OHPgNyY+3ZY24eFnX6DXPXJkz4P cFNCrmossKjbxWkYzUKeh2oPotbRwjkg1qrjHP2QA1Y/3oOfeIWKZd5IJ+bZbYnPX2mPHc ulJIvg+o0EdUYDNdZSkL3ht5ljQa+AXys2gfMBMgGLHHk8Q5UzekFWFDMUO0XcLNp6fk4S JooPcOKtzZjRS0DXKAngNRYt5Z9zDgiwhEhnryK+Aks/yEAyR5l2eKexT3f1QA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731783869; a=rsa-sha256; cv=none; b=Xd/ApFf4So13Va7LGWu3POZZpr9sh4hbK2+2V6AeaUaHF+sAYYJqq4g9zYPCyHIIGxOT8W J61JhByrkHjFgz7Adws0SdDRHGzO8hEtliJyd6/Zwg4QEuokgMj9BhlYjOWvONxkEuclpS Tx/84/wC8Jl7vUVhnY5cd8UOzymYQkk4F9wh7MGIiKMS1KwtFlvmf8n0+5dsJ4skhAX+Ux waA5Y1c8J9RDTL7iQLGn+9L5D7Qx/hPOHi6RusQ8zvvcD6noD0yvQPhnvfqUqC3qZxXUEH K+0Mo519+7SqbkW/xp+A43hTlWjLFjFU3g4Tmf5D7mk2e7ISCPd5xS42LMsf/Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XrNbx3bS3zJc2; Sat, 16 Nov 2024 19:04:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AGJ4Toc020857; Sat, 16 Nov 2024 19:04:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AGJ4T8A020854; Sat, 16 Nov 2024 19:04:29 GMT (envelope-from git) Date: Sat, 16 Nov 2024 19:04:29 GMT Message-Id: <202411161904.4AGJ4T8A020854@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: c5c02a131a0e - main - riscv: Allwinner D1 clock and reset driver List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org 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: c5c02a131a0e2ef52771e683269bc8778fe511f3 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=c5c02a131a0e2ef52771e683269bc8778fe511f3 commit c5c02a131a0e2ef52771e683269bc8778fe511f3 Author: Julien Cassette AuthorDate: 2024-11-16 19:02:03 +0000 Commit: Mitchell Horne CommitDate: 2024-11-16 19:04:04 +0000 riscv: Allwinner D1 clock and reset driver Add the SOC_ALLWINNER_D1 config option, following other platforms. Co-authored-by: mhorne Reviewed by: manu (previous version) Sponsored by: The FreeBSD Foundation (in part) Differential Revision: https://reviews.freebsd.org/D47515 --- sys/conf/options.riscv | 3 + sys/dev/clk/allwinner/ccu_d1.c | 1062 +++++++++++++++++++++++++++++++++++ sys/riscv/allwinner/files.allwinner | 16 +- sys/riscv/conf/std.allwinner | 4 + 4 files changed, 1083 insertions(+), 2 deletions(-) diff --git a/sys/conf/options.riscv b/sys/conf/options.riscv index 5e1b76140ec7..0ad72940db5c 100644 --- a/sys/conf/options.riscv +++ b/sys/conf/options.riscv @@ -1,3 +1,6 @@ RISCV opt_global.h # For cpu RISCV to work INTRNG opt_global.h PV_STATS opt_pmap.h + +# SoC Support +SOC_ALLWINNER_D1 opt_soc.h diff --git a/sys/dev/clk/allwinner/ccu_d1.c b/sys/dev/clk/allwinner/ccu_d1.c new file mode 100644 index 000000000000..29fa3c9e5bd5 --- /dev/null +++ b/sys/dev/clk/allwinner/ccu_d1.c @@ -0,0 +1,1062 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2022 Julien Cassette + * Copyright (c) 2024 The FreeBSD Foundation + * + * Portions of this software were developed by Mitchell Horne + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include +#include +#include +#include +#include + +#include + +#include + +#include +#include + +#include +#include +#include + +#include + +#include +#include + +static struct aw_ccung_reset ccu_d1_resets[] = { + CCU_RESET(RST_MBUS, 0x540, 30) + CCU_RESET(RST_BUS_DE, 0x60C, 16) + CCU_RESET(RST_BUS_DI, 0x62C, 16) + CCU_RESET(RST_BUS_G2D, 0x63C, 16) + CCU_RESET(RST_BUS_CE, 0x68C, 16) + CCU_RESET(RST_BUS_VE, 0x69C, 16) + CCU_RESET(RST_BUS_DMA, 0x70C, 16) + CCU_RESET(RST_BUS_MSGBOX0, 0x71C, 16) + CCU_RESET(RST_BUS_MSGBOX1, 0x71C, 17) + CCU_RESET(RST_BUS_MSGBOX2, 0x71C, 18) + CCU_RESET(RST_BUS_SPINLOCK, 0x72C, 16) + CCU_RESET(RST_BUS_HSTIMER, 0x73C, 16) + CCU_RESET(RST_BUS_DBG, 0x78C, 16) + CCU_RESET(RST_BUS_PWM, 0x7AC, 16) + CCU_RESET(RST_BUS_DRAM, 0x80C, 16) + CCU_RESET(RST_BUS_MMC0, 0x84C, 16) + CCU_RESET(RST_BUS_MMC1, 0x84C, 17) + CCU_RESET(RST_BUS_MMC2, 0x84C, 18) + CCU_RESET(RST_BUS_UART0, 0x90C, 16) + CCU_RESET(RST_BUS_UART1, 0x90C, 17) + CCU_RESET(RST_BUS_UART2, 0x90C, 18) + CCU_RESET(RST_BUS_UART3, 0x90C, 19) + CCU_RESET(RST_BUS_UART4, 0x90C, 20) + CCU_RESET(RST_BUS_UART5, 0x90C, 21) + CCU_RESET(RST_BUS_I2C0, 0x91C, 16) + CCU_RESET(RST_BUS_I2C1, 0x91C, 17) + CCU_RESET(RST_BUS_I2C2, 0x91C, 18) + CCU_RESET(RST_BUS_I2C3, 0x91C, 19) + CCU_RESET(RST_BUS_SPI0, 0x96C, 16) + CCU_RESET(RST_BUS_SPI1, 0x96C, 17) + CCU_RESET(RST_BUS_EMAC, 0x97C, 16) + CCU_RESET(RST_BUS_IR_TX, 0x9CC, 16) + CCU_RESET(RST_BUS_GPADC, 0x9EC, 16) + CCU_RESET(RST_BUS_THS, 0x9FC, 16) + CCU_RESET(RST_BUS_I2S0, 0xA20, 16) + CCU_RESET(RST_BUS_I2S1, 0xA20, 17) + CCU_RESET(RST_BUS_I2S2, 0xA20, 18) + CCU_RESET(RST_BUS_SPDIF, 0xA2C, 16) + CCU_RESET(RST_BUS_DMIC, 0xA4C, 16) + CCU_RESET(RST_BUS_AUDIO, 0xA5C, 16) + CCU_RESET(RST_USB_PHY0, 0xA70, 30) + CCU_RESET(RST_USB_PHY1, 0xA74, 30) + CCU_RESET(RST_BUS_OHCI0, 0xA8C, 16) + CCU_RESET(RST_BUS_OHCI1, 0xA8C, 17) + CCU_RESET(RST_BUS_EHCI0, 0xA8C, 20) + CCU_RESET(RST_BUS_EHCI1, 0xA8C, 21) + CCU_RESET(RST_BUS_OTG, 0xA8C, 24) + CCU_RESET(RST_BUS_LRADC, 0xA9C, 16) + CCU_RESET(RST_BUS_DPSS_TOP, 0xABC, 16) + CCU_RESET(RST_BUS_MIPI_DSI, 0xB4C, 16) + CCU_RESET(RST_BUS_TCON_LCD0, 0xB7C, 16) + CCU_RESET(RST_BUS_TCON_TV, 0xB9C, 16) + CCU_RESET(RST_BUS_LVDS0, 0xBAC, 16) + CCU_RESET(RST_BUS_TVE, 0xBBC, 17) + CCU_RESET(RST_BUS_TVE_TOP, 0xBBC, 16) + CCU_RESET(RST_BUS_TVD, 0xBDC, 17) + CCU_RESET(RST_BUS_TVD_TOP, 0xBDC, 16) + CCU_RESET(RST_BUS_LEDC, 0xBFC, 16) + CCU_RESET(RST_BUS_CSI, 0xC1C, 16) + CCU_RESET(RST_BUS_TPADC, 0xC5C, 16) + CCU_RESET(RST_DSP, 0xC7C, 16) + CCU_RESET(RST_BUS_DSP_CFG, 0xC7C, 17) + CCU_RESET(RST_BUS_DSP_DBG, 0xC7C, 18) + CCU_RESET(RST_BUS_RISCV_CFG, 0xD0C, 16) + CCU_RESET(RST_BUS_CAN0, 0x92C, 16) + CCU_RESET(RST_BUS_CAN1, 0x92C, 17) +}; + +static struct aw_ccung_gate ccu_d1_gates[] = { + CCU_GATE(CLK_BUS_DE, "bus-de", "psi-ahb", 0x60C, 0) + CCU_GATE(CLK_BUS_DI, "bus-di", "psi-ahb", 0x62C, 0) + CCU_GATE(CLK_BUS_G2D, "bus-g2d", "psi-ahb", 0x63C, 0) + CCU_GATE(CLK_BUS_CE, "bus-ce", "psi-ahb", 0x68C, 0) + CCU_GATE(CLK_BUS_VE, "bus-ve", "psi-ahb", 0x690, 0) + CCU_GATE(CLK_BUS_DMA, "bus-dma", "psi-ahb", 0x70C, 0) + CCU_GATE(CLK_BUS_MSGBOX0, "bus-msgbox0", "psi-ahb", 0x71C, 0) + CCU_GATE(CLK_BUS_MSGBOX1, "bus-msgbox1", "psi-ahb", 0x71C, 1) + CCU_GATE(CLK_BUS_MSGBOX2, "bus-msgbox2", "psi-ahb", 0x71C, 2) + CCU_GATE(CLK_BUS_SPINLOCK, "bus-spinlock", "psi-ahb", 0x72C, 0) + CCU_GATE(CLK_BUS_HSTIMER, "bus-hstimer", "psi-ahb", 0x73C, 0) + CCU_GATE(CLK_AVS, "avs", "dcxo", 0x740, 31) + CCU_GATE(CLK_BUS_DBG, "bus-dbg", "psi-ahb", 0x78C, 0) + CCU_GATE(CLK_BUS_PWM, "bus-pwm", "psi-ahb", 0x7AC, 0) + CCU_GATE(CLK_BUS_IOMMU, "bus-iommu", "apb0", 0x7BC, 0) + CCU_GATE(CLK_MBUS_DMA, "mbus-dma", "mbus", 0x804, 0) + CCU_GATE(CLK_MBUS_VE, "mbus-ve", "mbus", 0x804, 1) + CCU_GATE(CLK_MBUS_CE, "mbus-ce", "mbus", 0x804, 2) + CCU_GATE(CLK_MBUS_TVIN, "mbus-tvin", "mbus", 0x804, 7) + CCU_GATE(CLK_MBUS_CSI, "mbus-csi", "mbus", 0x804, 8) + CCU_GATE(CLK_MBUS_G2D, "mbus-g2d", "mbus", 0x804, 10) + CCU_GATE(CLK_MBUS_RISCV, "mbus-riscv", "mbus", 0x804, 11) + CCU_GATE(CLK_BUS_DRAM, "bus-dram", "psi-ahb", 0x80C, 0) + CCU_GATE(CLK_BUS_MMC0, "bus-mmc0", "psi-ahb", 0x84C, 0) + CCU_GATE(CLK_BUS_MMC1, "bus-mmc1", "psi-ahb", 0x84C, 1) + CCU_GATE(CLK_BUS_MMC2, "bus-mmc2", "psi-ahb", 0x84C, 2) + CCU_GATE(CLK_BUS_UART0, "bus-uart0", "apb1", 0x90C, 0) + CCU_GATE(CLK_BUS_UART1, "bus-uart1", "apb1", 0x90C, 1) + CCU_GATE(CLK_BUS_UART2, "bus-uart2", "apb1", 0x90C, 2) + CCU_GATE(CLK_BUS_UART3, "bus-uart3", "apb1", 0x90C, 3) + CCU_GATE(CLK_BUS_UART4, "bus-uart4", "apb1", 0x90C, 4) + CCU_GATE(CLK_BUS_UART5, "bus-uart5", "apb1", 0x90C, 5) + CCU_GATE(CLK_BUS_I2C0, "bus-i2c0", "apb1", 0x91C, 0) + CCU_GATE(CLK_BUS_I2C1, "bus-i2c1", "apb1", 0x91C, 1) + CCU_GATE(CLK_BUS_I2C2, "bus-i2c2", "apb1", 0x91C, 2) + CCU_GATE(CLK_BUS_I2C3, "bus-i2c3", "apb1", 0x91C, 3) + CCU_GATE(CLK_BUS_SPI0, "bus-spi0", "psi-ahb", 0x96C, 0) + CCU_GATE(CLK_BUS_SPI1, "bus-spi1", "psi-ahb", 0x96C, 1) + CCU_GATE(CLK_BUS_EMAC, "bus-emac", "psi-ahb", 0x97C, 0) + CCU_GATE(CLK_BUS_IR_TX, "bus-ir-tx", "apb0", 0x9CC, 0) + CCU_GATE(CLK_BUS_GPADC, "bus-gpadc", "apb0", 0x9EC, 0) + CCU_GATE(CLK_BUS_THS, "bus-ths", "apb0", 0x9FC, 0) + CCU_GATE(CLK_BUS_I2S0, "bus-i2s0", "apb0", 0xA10, 0) + CCU_GATE(CLK_BUS_I2S1, "bus-i2s1", "apb0", 0xA10, 1) + CCU_GATE(CLK_BUS_I2S2, "bus-i2s2", "apb0", 0xA10, 2) + CCU_GATE(CLK_BUS_SPDIF, "bus-spdif", "apb0", 0xA2C, 0) + CCU_GATE(CLK_BUS_DMIC, "bus-dmic", "apb0", 0xA4C, 0) + CCU_GATE(CLK_BUS_AUDIO, "bus-audio", "apb0", 0xA5C, 0) + CCU_GATE(CLK_BUS_OHCI0, "bus-ohci0", "psi-ahb", 0xA8C, 0) + CCU_GATE(CLK_BUS_OHCI1, "bus-ohci1", "psi-ahb", 0xA8C, 1) + CCU_GATE(CLK_BUS_EHCI0, "bus-ehci0", "psi-ahb", 0xA8C, 4) + CCU_GATE(CLK_BUS_EHCI1, "bus-ehci1", "psi-ahb", 0xA8C, 5) + CCU_GATE(CLK_BUS_OTG, "bus-otg", "psi-ahb", 0xA8C, 8) + CCU_GATE(CLK_BUS_LRADC, "bus-lradc", "apb0", 0xA9C, 0) + CCU_GATE(CLK_BUS_DPSS_TOP, "bus-dpss-top", "psi-ahb", 0xABC, 0) + CCU_GATE(CLK_BUS_MIPI_DSI, "bus-mipi-dsi", "psi-ahb", 0xB4C, 0) + CCU_GATE(CLK_BUS_TCON_LCD0, "bus-tcon-lcd0", "psi-ahb", 0xB7C, 0) + CCU_GATE(CLK_BUS_TCON_TV, "bus-tcon-tv", "psi-ahb", 0xB9C, 0) + CCU_GATE(CLK_BUS_TVE_TOP, "bus-tve-top", "psi-ahb", 0xBBC, 0) + CCU_GATE(CLK_BUS_TVE, "bus-tve", "psi-ahb", 0xBBC, 1) + CCU_GATE(CLK_BUS_TVD_TOP, "bus-tvd-top", "psi-ahb", 0xBDC, 0) + CCU_GATE(CLK_BUS_TVD, "bus-tvd", "psi-ahb", 0xBDC, 1) + CCU_GATE(CLK_BUS_LEDC, "bus-ledc", "psi-ahb", 0xBFC, 0) + CCU_GATE(CLK_BUS_CSI, "bus-csi", "psi-ahb", 0xC1C, 0) + CCU_GATE(CLK_BUS_TPADC, "bus-tpadc", "apb0", 0xC5C, 0) + CCU_GATE(CLK_BUS_TZMA, "bus-tzma", "apb0", 0xC6C, 0) + CCU_GATE(CLK_BUS_DSP_CFG, "bus-dsp-cfg", "psi-ahb", 0xC7C, 1) + CCU_GATE(CLK_BUS_RISCV_CFG, "bus-riscv-cfg", "psi-ahb", 0xD0C, 0) + CCU_GATE(CLK_BUS_CAN0, "bus-can0", "apb1", 0x92C, 0) + CCU_GATE(CLK_BUS_CAN1, "bus-can1", "apb1", 0x92C, 1) +}; + +static const char *pll_cpux_parents[] = { "dcxo" }; +NP_CLK(pll_cpux_clk, + CLK_PLL_CPUX, /* id */ + "pll_cpux", /* name */ + pll_cpux_parents, /* parents */ + 0x0, /* offset */ + 8, 8, 0, 0, /* n factor */ + 0, 2, 0, 0, /* p factor */ + 27, /* gate */ + 28, 1000, /* lock */ + AW_CLK_HAS_GATE | AW_CLK_HAS_LOCK); /* flags */ + +static const char *pll_ddr0_parents[] = { "dcxo" }; +NMM_CLK(pll_ddr0_clk, + CLK_PLL_DDR0, /* id */ + "pll_ddr0", /* name */ + pll_ddr0_parents, /* parents */ + 0x10, /* offset */ + 8, 7, 0, 0, /* n factor */ + 0, 1, 0, 0, /* m0 factor */ + 1, 1, 0, 0, /* m1 factor */ + 27, /* gate */ + 28, 1000, /* lock */ + AW_CLK_HAS_GATE | AW_CLK_HAS_LOCK); /* flags */ + +/* PLL_PERIPH(4X) = 24 MHz * N / M1 / M0 */ +static const char *pll_periph0_4x_parents[] = { "dcxo" }; +NMM_CLK(pll_periph0_4x_clk, + CLK_PLL_PERIPH0_4X, /* id */ + "pll_periph0_4x", /* name */ + pll_periph0_4x_parents, /* parents */ + 0x20, /* offset */ + 8, 8, 0, 0, /* n factor */ + 0, 1, 0, 0, /* m0 factor */ + 1, 1, 0, 0, /* m1 factor */ + 27, /* gate */ + 28, 1000, /* lock */ + AW_CLK_HAS_GATE | AW_CLK_HAS_LOCK); /* flags */ + +/* PLL_PERIPH0(2X) = 24 MHz * N / M / P0 */ +static const char *pll_periph0_2x_parents[] = { "pll_periph0_4x" }; +M_CLK(pll_periph0_2x_clk, + CLK_PLL_PERIPH0_2X, /* id */ + "pll_periph0_2x", /* name */ + pll_periph0_2x_parents, /* parents */ + 0x20, /* offset */ + 16, 3, 0, 0, /* m factor */ + 0, 0, /* mux */ + 0, /* gate */ + 0); /* flags */ + +/* PLL_PERIPH0(800M) = 24 MHz * N / M / P1 */ +static const char *pll_periph0_800m_parents[] = { "pll_periph0_4x" }; +M_CLK(pll_periph0_800m_clk, + CLK_PLL_PERIPH0_800M, /* id */ + "pll_periph0_800m", /* name */ + pll_periph0_800m_parents, /* parents */ + 0x20, /* offset */ + 20, 3, 0, 0, /* m factor */ + 0, 0, /* mux */ + 0, /* gate */ + 0); /* flags */ + +/* PLL_PERIPH0(1X) = 24 MHz * N / M / P0 / 2 */ +static const char *pll_periph0_parents[] = { "pll_periph0_2x" }; +FIXED_CLK(pll_periph0_clk, + CLK_PLL_PERIPH0, /* id */ + "pll_periph0", /* name */ + pll_periph0_parents, /* parents */ + 0, /* freq */ + 1, /* mult */ + 2, /* div */ + 0); /* flags */ + +/* For child clocks: InputFreq * N / M */ +static const char *pll_video0_parents[] = { "dcxo" }; +NP_CLK(pll_video0_clk, + CLK_PLL_VIDEO0, /* id */ + "pll_video0", /* name */ + pll_video0_parents, /* parents */ + 0x40, /* offset */ + 8, 7, 0, 0, /* n factor */ + 1, 1, 0, 0, /* p factor */ + 27, /* gate */ + 28, 1000, /* lock */ + AW_CLK_HAS_GATE | AW_CLK_HAS_LOCK); /* flags */ + +/* PLL_VIDEO0(4X) = InputFreq * N / M / D */ +/* D is only for testing */ +static const char *pll_video0_4x_parents[] = { "pll_video0" }; +M_CLK(pll_video0_4x_clk, + CLK_PLL_VIDEO0_4X, /* id */ + "pll_video0_4x", /* name */ + pll_video0_4x_parents, /* parents */ + 0x40, /* offset */ + 0, 1, 0, 0, /* m factor */ + 0, 0, /* mux */ + 0, /* gate */ + 0); /* flags */ + +/* PLL_VIDEO0(2X) = InputFreq * N / M / 2 */ +static const char *pll_video0_2x_parents[] = { "pll_video0" }; +FIXED_CLK(pll_video0_2x_clk, + CLK_PLL_VIDEO0_2X, /* id */ + "pll_video0_2x", /* name */ + pll_video0_2x_parents, /* parents */ + 0, /* freq */ + 1, /* mult */ + 2, /* div */ + 0); /* flags */ + +/* For child clocks: InputFreq * N / M */ +static const char *pll_video1_parents[] = { "dcxo" }; +NP_CLK(pll_video1_clk, + CLK_PLL_VIDEO1, /* id */ + "pll_video1", /* name */ + pll_video1_parents, /* parents */ + 0x48, /* offset */ + 8, 7, 0, 0, /* n factor */ + 1, 1, 0, 0, /* p factor */ + 27, /* gate */ + 28, 1000, /* lock */ + AW_CLK_HAS_GATE | AW_CLK_HAS_LOCK); /* flags */ + +/* PLL_VIDEO1(4X) = InputFreq * N / M / D */ +/* D is only for testing */ +static const char *pll_video1_4x_parents[] = { "pll_video1" }; +M_CLK(pll_video1_4x_clk, + CLK_PLL_VIDEO1_4X, /* id */ + "pll_video1_4x", /* name */ + pll_video1_4x_parents, /* parents */ + 0x48, /* offset */ + 0, 1, 0, 0, /* m factor */ + 0, 0, /* mux */ + 0, /* gate */ + 0); /* flags */ + +/* PLL_VIDEO1(2X) = InputFreq * N / M / 2 */ +static const char *pll_video1_2x_parents[] = { "pll_video1" }; +FIXED_CLK(pll_video1_2x_clk, + CLK_PLL_VIDEO1_2X, /* id */ + "pll_video1_2x", /* name */ + pll_video1_2x_parents, /* parents */ + 0, /* freq */ + 1, /* mult */ + 2, /* div */ + 0); /* flags */ + +static const char *pll_ve_parents[] = { "dcxo" }; +NMM_CLK(pll_ve_clk, + CLK_PLL_VE, /* id */ + "pll_ve", /* name */ + pll_ve_parents, /* parents */ + 0x58, /* offset */ + 8, 7, 0, 0, /* n factor */ + 0, 1, 0, 0, /* m0 factor */ + 1, 1, 0, 0, /* m1 factor */ + 27, /* gate */ + 28, 1000, /* lock */ + AW_CLK_HAS_GATE | AW_CLK_HAS_LOCK); /* flags */ + +/* For child clocks: 24MHz * N / M1 / M0 */ +static const char *pll_audio0_4x_parents[] = { "dcxo" }; +NMM_CLK(pll_audio0_4x_clk, + CLK_PLL_AUDIO0_4X, /* id */ + "pll_audio0_4x", /* name */ + pll_audio0_4x_parents, /* parents */ + 0x78, /* offset */ + 8, 7, 0, 0, /* n factor */ + 0, 1, 0, 0, /* m0 factor */ + 1, 1, 0, 0, /* m1 factor */ + 27, /* gate */ + 28, 1000, /* lock */ + AW_CLK_HAS_GATE | AW_CLK_HAS_LOCK); /* flags */ + +/* PLL_AUDIO0(2X) = (24MHz * N / M1 / M0) / P / 2 */ +static const char *pll_audio0_2x_parents[] = { "pll_audio0_4x" }; +FIXED_CLK(pll_audio0_2x_clk, + CLK_PLL_AUDIO0_2X, /* id */ + "pll_audio0_2x", /* name */ + pll_audio0_2x_parents, /* parents */ + 0, /* freq */ + 1, /* mult */ + 2, /* div */ + 0); /* flags */ + +/* PLL_AUDIO0(1X) = 24MHz * N / M1 / M0 / P / 2 */ +static const char *pll_audio0_parents[] = { "pll_audio0_2x" }; +FIXED_CLK(pll_audio0_clk, + CLK_PLL_AUDIO0, /* id */ + "pll_audio0", /* name */ + pll_audio0_parents, /* parents */ + 0, /* freq */ + 1, /* mult */ + 2, /* div */ + 0); /* flags */ + +/* For child clocks: 24MHz * N / M */ +static const char *pll_audio1_parents[] = { "dcxo" }; +NP_CLK(pll_audio1_clk, + CLK_PLL_AUDIO1, /* id */ + "pll_audio1", /* name */ + pll_audio1_parents, /* parents */ + 0x80, /* offset */ + 8, 7, 0, 0, /* n factor */ + 1, 1, 0, 0, /* p factor */ + 27, /* gate */ + 28, 1000, /* lock */ + AW_CLK_HAS_GATE | AW_CLK_HAS_LOCK); /* flags */ + +/* PLL_AUDIO1(DIV2) = 24MHz * N / M / P0 */ +static const char *pll_audio1_div2_parents[] = { "pll_audio1" }; +M_CLK(pll_audio1_div2_clk, + CLK_PLL_AUDIO1_DIV2, /* id */ + "pll_audio1_div2", /* name */ + pll_audio1_div2_parents, /* parents */ + 0x80, /* offset */ + 16, 3, 0, 0, /* m factor */ + 0, 0, /* mux */ + 0, /* gate */ + 0); /* flags */ + +/* PLL_AUDIO1(DIV5) = 24MHz * N / M / P1 */ +static const char *pll_audio1_div5_parents[] = { "pll_audio1" }; +M_CLK(pll_audio1_div5_clk, + CLK_PLL_AUDIO1_DIV5, /* id */ + "pll_audio1_div5", /* name */ + pll_audio1_div5_parents, /* parents */ + 0x80, /* offset */ + 20, 3, 0, 0, /* m factor */ + 0, 0, /* mux */ + 0, /* gate */ + 0); /* flags */ + +static const char *cpux_parents[] = { "dcxo", "osc32k", "iosc", "pll_cpux", + "pll_periph0", "pll_periph0_2x", "pll_periph0_800m" }; +M_CLK(cpux_clk, + CLK_CPUX, /* id */ + "cpux", /* name */ + cpux_parents, /* parents */ + 0x500, /* offset */ + 16, 2, 0, AW_CLK_FACTOR_POWER_OF_TWO, /* m factor */ + 24, 3, /* mux */ + 0, /* gate */ + AW_CLK_HAS_MUX | AW_CLK_SET_PARENT); /* flags */ + +static const char *cpux_axi_parents[] = { "cpux" }; +M_CLK(cpux_axi_clk, + CLK_CPUX_AXI, /* id */ + "cpux_axi", /* name */ + cpux_axi_parents, /* parents */ + 0x500, /* offset */ + 0, 2, 0, 0, /* m factor */ + 0, 0, /* mux */ + 0, /* gate */ + 0); /* flags */ + +static const char *cpux_apb_parents[] = { "cpux" }; +M_CLK(cpux_apb_clk, + CLK_CPUX_APB, /* id */ + "cpux_apb", /* name */ + cpux_apb_parents, /* parents */ + 0x500, /* offset */ + 8, 2, 0, 0, /* m factor */ + 0, 0, /* mux */ + 0, /* gate */ + 0); /* flags */ + +static const char *psi_ahb_parents[] = { "dcxo", "osc32k", "iosc", + "pll_periph0" }; +NM_CLK(psi_ahb_clk, + CLK_PSI_AHB, "psi-ahb", psi_ahb_parents, /* id, name, parents */ + 0x510, /* offset */ + 8, 2, 0, AW_CLK_FACTOR_POWER_OF_TWO, /* n factor */ + 0, 2, 0, 0, /* m factor */ + 24, 2, /* mux */ + 0, /* gate */ + AW_CLK_HAS_MUX | AW_CLK_REPARENT); /* flags */ + +static const char *apb0_parents[] = { "dcxo", "osc32k", "psi-ahb", "pll_periph0" }; +NM_CLK(apb0_clk, + CLK_APB0, "apb0", apb0_parents, /* id, name, parents */ + 0x520, /* offset */ + 8, 2, 0, AW_CLK_FACTOR_POWER_OF_TWO, /* n factor */ + 0, 2, 0, 0, /* m factor */ + 24, 2, /* mux */ + 0, /* gate */ + AW_CLK_HAS_MUX | AW_CLK_REPARENT); /* flags */ + +static const char *apb1_parents[] = { "dcxo", "osc32k", "psi-ahb", "pll_periph0" }; +NM_CLK(apb1_clk, + CLK_APB1, "apb1", apb1_parents, /* id, name, parents */ + 0x524, /* offset */ + 8, 2, 0, AW_CLK_FACTOR_POWER_OF_TWO, /* n factor */ + 0, 2, 0, 0, /* m factor */ + 24, 2, /* mux */ + 0, /* gate */ + AW_CLK_HAS_MUX | AW_CLK_REPARENT); /* flags */ + +static const char *mbus_parents[] = { "dram" }; +FIXED_CLK(mbus_clk, + CLK_MBUS, "mbus", mbus_parents, /* id, name, parents */ + 0, /* freq */ + 1, /* mult */ + 4, /* div */ + 0); /* flags */ + +static const char *de_parents[] = { "pll_periph0_2x", "pll_video0_4x", + "pll_video1_4x", "pll_audio1_div2" }; +M_CLK(de_clk, + CLK_DE, "de", de_parents, /* id, name, parents */ + 0x600, /* offset */ + 0, 5, 0, 0, /* m factor */ + 24, 3, /* mux */ + 31, /* gate */ + AW_CLK_HAS_GATE | AW_CLK_HAS_MUX | + AW_CLK_REPARENT); /* flags */ + +static const char *di_parents[] = { "pll_periph0_2x", "pll_video0_4x", + "pll_video1_4x", "pll_audio1_div2" }; +M_CLK(di_clk, + CLK_DI, "di", di_parents, /* id, name, parents */ + 0x620, /* offset */ + 0, 5, 0, 0, /* m factor */ + 24, 3, /* mux */ + 31, /* gate */ + AW_CLK_HAS_GATE | AW_CLK_HAS_MUX | + AW_CLK_REPARENT); /* flags */ + +static const char *g2d_parents[] = { "pll_periph0_2x", "pll_video0_4x", + "pll_video1_4x", "pll_audio1_div2" }; +M_CLK(g2d_clk, + CLK_G2D, "g2d", g2d_parents, /* id, name, parents */ + 0x630, /* offset */ + 0, 5, 0, 0, /* m factor */ + 24, 3, /* mux */ + 31, /* gate */ + AW_CLK_HAS_GATE | AW_CLK_HAS_MUX | + AW_CLK_REPARENT); /* flags */ + +static const char *ce_parents[] = { "dcxo", "pll_periph0_2x", "pll_periph0" }; +NM_CLK(ce_clk, + CLK_CE, "ce", ce_parents, /* id, name, parents */ + 0x680, /* offset */ + 8, 2, 0, 0, /* n factor */ + 0, 4, 0, 0, /* m factor */ + 24, 3, /* mux */ + 31, /* gate */ + AW_CLK_HAS_GATE | AW_CLK_HAS_MUX | + AW_CLK_REPARENT); /* flags */ + +static const char *ve_parents[] = { "pll_ve", "pll_periph0_2x" }; +M_CLK(ve_clk, + CLK_VE, "ve", ve_parents, /* id, name, parents */ + 0x690, /* offset */ + 0, 5, 0, 0, /* m factor */ + 24, 1, /* mux */ + 31, /* gate */ + AW_CLK_HAS_GATE | AW_CLK_HAS_MUX | /* flags */ + AW_CLK_REPARENT); + +static const char *dram_parents[] = { "pll_ddr0", "pll_audio1_div2", + "pll_periph0_2x", "pll_periph0_800m" }; +NM_CLK(dram_clk, + CLK_DRAM, "dram", dram_parents, /* id, name, parents */ + 0x800, /* offset */ + 8, 2, 0, AW_CLK_FACTOR_POWER_OF_TWO, /* n factor */ + 0, 2, 0, 0, /* m factor */ + 24, 3, /* mux */ + 31, /* gate */ + AW_CLK_HAS_GATE | AW_CLK_HAS_MUX | /* flags */ + AW_CLK_REPARENT); + +/* SMHC0 */ +static const char *mmc0_parents[] = { "dcxo", "pll_periph0", "pll_periph0_2x", + "pll_audio1_div2" }; +NM_CLK(mmc0_clk, + CLK_MMC0, "mmc0", mmc0_parents, /* id, name, parents */ + 0x830, /* offset */ + 8, 2, 0, AW_CLK_FACTOR_POWER_OF_TWO, /* n factor */ + 0, 4, 0, 0, /* m factor */ + 24, 3, /* mux */ + 31, /* gate */ + AW_CLK_HAS_GATE | AW_CLK_HAS_MUX | + AW_CLK_REPARENT); /* flags */ + +/* SMHC1 */ +static const char *mmc1_parents[] = { "dcxo", "pll_periph0", "pll_periph0_2x", + "pll_audio1_div2" }; +NM_CLK(mmc1_clk, + CLK_MMC1, "mmc1", mmc1_parents, /* id, name, parents */ + 0x834, /* offset */ + 8, 2, 0, AW_CLK_FACTOR_POWER_OF_TWO, /* n factor */ + 0, 4, 0, 0, /* m factor */ + 24, 3, /* mux */ + 31, /* gate */ + AW_CLK_HAS_GATE | AW_CLK_HAS_MUX | + AW_CLK_REPARENT); /* flags */ + +/* SMHC2 */ +static const char *mmc2_parents[] = { "dcxo", "pll_periph0", "pll_periph0_2x", + "pll_periph0_800m", "pll_audio1_div2" }; +NM_CLK(mmc2_clk, + CLK_MMC2, "mmc2", mmc2_parents, /* id, name, parents */ + 0x838, /* offset */ + 8, 2, 0, AW_CLK_FACTOR_POWER_OF_TWO, /* n factor */ + 0, 4, 0, 0, /* m factor */ + 24, 3, /* mux */ + 31, /* gate */ + AW_CLK_HAS_GATE | AW_CLK_HAS_MUX | + AW_CLK_REPARENT); /* flags */ + +static const char *spi0_parents[] = { "dcxo", "pll_periph0", "pll_periph0_2x", + "pll_audio1_div2", "pll_audio1_div5" }; +NM_CLK(spi0_clk, + CLK_SPI0, "spi0", spi0_parents, /* id, name, parents */ + 0x940, /* offset */ + 8, 2, 0, AW_CLK_FACTOR_POWER_OF_TWO, /* n factor */ + 0, 4, 0, 0, /* m factor */ + 24, 3, /* mux */ + 31, /* gate */ + AW_CLK_HAS_GATE | AW_CLK_HAS_MUX | + AW_CLK_REPARENT); /* flags */ + +static const char *spi1_parents[] = { "dcxo", "pll_periph0", "pll_periph0_2x", + "pll_audio1_div2", "pll_audio1_div5" }; +NM_CLK(spi1_clk, + CLK_SPI1, "spi1", spi1_parents, /* id, name, parents */ + 0x944, /* offset */ + 8, 2, 0, AW_CLK_FACTOR_POWER_OF_TWO, /* n factor */ + 0, 4, 0, 0, /* m factor */ + 24, 3, /* mux */ + 31, /* gate */ + AW_CLK_HAS_GATE | AW_CLK_HAS_MUX | + AW_CLK_REPARENT); /* flags */ + +/* Use M_CLK to have gate */ +static const char *emac_25m_parents[] = { "pll_periph0" }; +M_CLK(emac_25m_clk, + CLK_EMAC_25M, /* id */ + "emac_25m", /* name */ + emac_25m_parents, /* parents */ + 0x970, /* offset */ + 0, 0, 24, AW_CLK_FACTOR_FIXED, /* m factor */ + 0, 0, /* mux */ + 31, /* gate */ + AW_CLK_HAS_GATE | AW_CLK_REPARENT); /* flags */ + +static const char *irtx_parents[] = { "dcxo", "pll_periph0" }; +NM_CLK(irtx_clk, + CLK_IR_TX, "irtx", irtx_parents, /* id, name, parents */ + 0x9C0, /* offset */ + 8, 2, 0, AW_CLK_FACTOR_POWER_OF_TWO, /* n factor */ + 0, 4, 0, 0, /* m factor */ + 24, 3, /* mux */ + 31, /* gate */ + AW_CLK_HAS_GATE | AW_CLK_HAS_MUX | + AW_CLK_REPARENT); /* flags */ + +static const char *i2s0_parents[] = { "pll_audio0", "pll_audio0_4x", + "pll_audio1_div2", "pll_audio1_div5" }; +NM_CLK(i2s0_clk, + CLK_I2S0, "i2s0", i2s0_parents, /* id, name, parents */ + 0xA10, /* offset */ + 8, 2, 0, AW_CLK_FACTOR_POWER_OF_TWO, /* n factor */ + 0, 5, 0, 0, /* m factor */ + 24, 3, /* mux */ + 31, /* gate */ + AW_CLK_HAS_GATE | AW_CLK_HAS_MUX | + AW_CLK_REPARENT); /* flags */ + +static const char *i2s1_parents[] = { "pll_audio0", "pll_audio0_4x", + "pll_audio1_div2", "pll_audio1_div5" }; +NM_CLK(i2s1_clk, + CLK_I2S1, "i2s1", i2s1_parents, /* id, name, parents */ + 0xA14, /* offset */ + 8, 2, 0, AW_CLK_FACTOR_POWER_OF_TWO, /* n factor */ + 0, 5, 0, 0, /* m factor */ + 24, 3, /* mux */ + 31, /* gate */ + AW_CLK_HAS_GATE | AW_CLK_HAS_MUX | + AW_CLK_REPARENT); /* flags */ + +static const char *i2s2_parents[] = { "pll_audio0", "pll_audio0_4x", + "pll_audio1_div2", "pll_audio1_div5" }; +NM_CLK(i2s2_clk, + CLK_I2S2, "i2s2", i2s2_parents, /* id, name, parents */ + 0xA18, /* offset */ + 8, 2, 0, AW_CLK_FACTOR_POWER_OF_TWO, /* n factor */ + 0, 5, 0, 0, /* m factor */ + 24, 3, /* mux */ + 31, /* gate */ + AW_CLK_HAS_GATE | AW_CLK_HAS_MUX | + AW_CLK_REPARENT); /* flags */ + +static const char *i2s2_asrc_parents[] = { "pll_audio0_4x", "pll_periph0", + "pll_audio1_div2", "pll_audio1_div5" }; +NM_CLK(i2s2_asrc_clk, + CLK_I2S2_ASRC, /* id */ + "i2s2_asrc", /* name */ + i2s2_asrc_parents, /* parents */ + 0xA1C, /* offset */ + 8, 2, 0, AW_CLK_FACTOR_POWER_OF_TWO, /* n factor */ + 0, 5, 0, 0, /* m factor */ + 24, 3, /* mux */ + 31, /* gate */ + AW_CLK_HAS_GATE | AW_CLK_HAS_MUX | + AW_CLK_REPARENT); /* flags */ + +/* OWA_TX */ +static const char *spdif_tx_parents[] = { "pll_audio0", "pll_audio0_4x", + "pll_audio1_div2", "pll_audio1_div5" }; +NM_CLK(spdif_tx_clk, + CLK_SPDIF_TX, "spdif_tx", spdif_tx_parents, /* id, name, parents */ + 0xA24, /* offset */ + 8, 2, 0, AW_CLK_FACTOR_POWER_OF_TWO, /* n factor */ + 0, 5, 0, 0, /* m factor */ + 24, 3, /* mux */ + 31, /* gate */ + AW_CLK_HAS_GATE | AW_CLK_HAS_MUX | + AW_CLK_REPARENT); /* flags */ + +/* OWA_RX */ +static const char *spdif_rx_parents[] = { "pll_periph0", "pll_audio1_div2", + "pll_audio1_div5" }; +NM_CLK(spdif_rx_clk, + CLK_SPDIF_RX, "spdif_rx", spdif_rx_parents, /* id, name, parents */ + 0xA28, /* offset */ + 8, 2, 0, AW_CLK_FACTOR_POWER_OF_TWO, /* n factor */ + 0, 5, 0, 0, /* m factor */ + 24, 3, /* mux */ + 31, /* gate */ + AW_CLK_HAS_GATE | AW_CLK_HAS_MUX | + AW_CLK_REPARENT); /* flags */ + +static const char *dmic_parents[] = { "pll_audio0", "pll_audio1_div2", + "pll_audio1_div5" }; +NM_CLK(dmic_clk, + CLK_DMIC, "dmic", dmic_parents, /* id, name, parents */ + 0xA40, /* offset */ + 8, 2, 0, AW_CLK_FACTOR_POWER_OF_TWO, /* n factor */ + 0, 5, 0, 0, /* m factor */ + 24, 3, /* mux */ + 31, /* gate */ + AW_CLK_HAS_GATE | AW_CLK_HAS_MUX | + AW_CLK_REPARENT); /* flags */ + +static const char *audio_dac_parents[] = { "pll_audio0", "pll_audio1_div2", + "pll_audio1_div5" }; +NM_CLK(audio_dac_clk, + CLK_AUDIO_DAC, /* id */ + "audio_dac", /* name */ + audio_dac_parents, /* parents */ + 0xA50, /* offset */ + 8, 2, 0, AW_CLK_FACTOR_POWER_OF_TWO, /* n factor */ + 0, 5, 0, 0, /* m factor */ + 24, 3, /* mux */ + 31, /* gate */ + AW_CLK_HAS_GATE | AW_CLK_HAS_MUX | + AW_CLK_REPARENT); /* flags */ + +static const char *audio_adc_parents[] = { "pll_audio0", "pll_audio1_div2", + "pll_audio1_div5" }; +NM_CLK(audio_adc_clk, + CLK_AUDIO_ADC, /* id */ + "audio_adc", /* name */ + audio_adc_parents, /* parents */ + 0xA54, /* offset */ + 8, 2, 0, AW_CLK_FACTOR_POWER_OF_TWO, /* n factor */ + 0, 5, 0, 0, /* m factor */ + 24, 3, /* mux */ + 31, /* gate */ + AW_CLK_HAS_GATE | AW_CLK_HAS_MUX | + AW_CLK_REPARENT); /* flags */ + +/* + * XXX: These USB clocks are unusual, and can't be modeled fully with any of + * our existing clk classes. + * + * The clocks have three parents; they output 12M when assigned to the first + * two, and the third is direct (32K). + * + * Thus a divider table like the following would be needed: + * struct clk_div_table usb_ohci_div_table[] = { + * { .value = 0, .divider = 50 }, + * { .value = 1, .divider = 2 }, + * { .value = 2, .divider = 1 }, + * { }, + * }; + * + * But we also require a gate. + * + * To work around this, model the clocks as if they had only one parent. + */ +static const char *usb_ohci_parents[] = { "pll_periph0", + /*"dcxo", "osc32k"*/ }; +M_CLK(usb_ohci0_clk, + CLK_USB_OHCI0, /* id */ + "usb_ohci0", /* name */ + usb_ohci_parents, /* parents */ + 0xA70, /* offset */ + 0, 0, 50, AW_CLK_FACTOR_FIXED, /* m factor */ + 24, 2, /* mux */ + 31, /* gate */ + AW_CLK_HAS_GATE /* | AW_CLK_HAS_MUX */); /* flags */ + +M_CLK(usb_ohci1_clk, + CLK_USB_OHCI1, /* id */ + "usb_ohci1", /* name */ + usb_ohci_parents, /* parents */ + 0xA74, /* offset */ + 0, 0, 50, AW_CLK_FACTOR_FIXED, /* m factor */ + 24, 2, /* mux */ + 31, /* gate */ + AW_CLK_HAS_GATE /* | AW_CLK_HAS_MUX */); /* flags */ + + +static const char *dsi_parents[] = { "dcxo", "pll_periph0", "pll_video0_2x", + "pll_video1_2x", "pll_audio1_div2" }; +M_CLK(dsi_clk, + CLK_MIPI_DSI, "mipi-dsi", dsi_parents, /* id, name, parents */ + 0xB24, /* offset */ + 0, 4, 0, 0, /* m factor */ + 24, 3, /* mux */ + 31, /* gate */ + AW_CLK_HAS_GATE | AW_CLK_HAS_MUX | + AW_CLK_REPARENT); /* flags */ + +static const char *tconlcd_parents[] = { "pll_video0", "pll_video0_4x", + "pll_video1", "pll_video1_4x", "pll_periph0_2x", "pll_audio1_div2" }; +NM_CLK(tconlcd_clk, + CLK_TCON_LCD0, "tcon-lcd0", tconlcd_parents, /* id, name, parents */ + 0xB60, /* offset */ + 8, 2, 0, AW_CLK_FACTOR_POWER_OF_TWO, /* n factor */ + 0, 4, 0, 0, /* m factor */ + 24, 3, /* mux */ + 31, /* gate */ + AW_CLK_HAS_GATE | AW_CLK_HAS_MUX | + AW_CLK_REPARENT); /* flags */ + +static const char *tcontv_parents[] = { "pll_video0", "pll_video0_4x", + "pll_video1", "pll_video1_4x", "pll_periph0_2x", "pll_audio1_div2" }; +NM_CLK(tcontv_clk, + CLK_TCON_TV, "tcon-tv", tcontv_parents, /* id, name, parents */ + 0xB80, /* offset */ + 8, 2, 0, AW_CLK_FACTOR_POWER_OF_TWO, /* n factor */ + 0, 4, 0, 0, /* m factor */ + 24, 3, /* mux */ + 31, /* gate */ + AW_CLK_HAS_GATE | AW_CLK_HAS_MUX | + AW_CLK_REPARENT); /* flags */ + +static const char *tve_parents[] = { "pll_video0", "pll_video0_4x", + "pll_video1", "pll_video1_4x", "pll_periph0_2x", "pll_audio1_div2" }; +NM_CLK(tve_clk, + CLK_TVE, "tve", tve_parents, /* id, name, parents */ + 0xBB0, /* offset */ + 8, 2, 0, AW_CLK_FACTOR_POWER_OF_TWO, /* n factor */ + 0, 4, 0, 0, /* m factor */ + 24, 3, /* mux */ + 31, /* gate */ + AW_CLK_HAS_GATE | AW_CLK_HAS_MUX | + AW_CLK_REPARENT); /* flags */ + +static const char *tvd_parents[] = { "dcxo", "pll_video0", "pll_video1", + "pll_periph0" }; +M_CLK(tvd_clk, + CLK_TVD, "tvd", tvd_parents, /* id, name, parents */ + 0xBC0, /* offset */ + 0, 5, 0, 0, /* m factor */ + 24, 3, /* mux */ + 31, /* gate */ + AW_CLK_HAS_GATE | AW_CLK_HAS_MUX | + AW_CLK_REPARENT); /* flags */ + +static const char *ledc_parents[] = { "dcxo", "pll_periph0" }; +NM_CLK(ledc_clk, + CLK_LEDC, "ledc", ledc_parents, /* id, name, parents */ + 0xBF0, /* offset */ + 8, 2, 0, AW_CLK_FACTOR_POWER_OF_TWO, /* n factor */ + 0, 4, 0, 0, /* m factor */ + 24, 1, /* mux */ + 31, /* gate */ + AW_CLK_HAS_GATE | AW_CLK_HAS_MUX | + AW_CLK_REPARENT); /* flags */ + +static const char *csi_top_parents[] = { "pll_periph0_2x", "pll_video0_2x", + "pll_video1_2x" }; +M_CLK(csi_top_clk, + CLK_CSI_TOP, "csi-top", csi_top_parents, /* id, name, parents */ + 0xC04, /* offset */ + 0, 4, 0, 0, /* m factor */ + 24, 3, /* mux */ + 31, /* gate */ + AW_CLK_HAS_GATE | AW_CLK_HAS_MUX | + AW_CLK_REPARENT); /* flags */ + +static const char *csi_mclk_parents[] = { "dcxo", "pll_periph0", + "pll_video0", "pll_video1", "pll_audio1_div2", "pll_audio1_div5" }; +M_CLK(csi_mclk, + CLK_CSI_MCLK, /* id */ + "csi-mclk", /* name */ + csi_mclk_parents, /* parents */ + 0xC08, /* offset */ + 0, 5, 0, 0, /* m factor */ + 24, 3, /* mux */ + 31, /* gate */ + AW_CLK_HAS_GATE | AW_CLK_HAS_MUX | + AW_CLK_REPARENT); /* flags */ + +/* Use M_CLK to have mux and gate */ +static const char *tpadc_parents[] = { "dcxo", "pll_audio0" }; +M_CLK(tpadc_clk, + CLK_TPADC, "tpadc", tpadc_parents, /* id, name, parents */ + 0xC50, /* offset */ + 0, 0, 1, AW_CLK_FACTOR_FIXED, /* m factor */ + 24, 2, /* mux */ + 31, /* gate */ + AW_CLK_HAS_GATE | AW_CLK_HAS_MUX | + AW_CLK_REPARENT); /* flags */ + +static const char *dsp_parents[] = { "dcxo", "osc32k", "iosc", + "pll_periph0_2x", "pll_audio1_div2" }; +M_CLK(dsp_clk, + CLK_DSP, "dsp", dsp_parents, /* id, name, parents */ + 0xC70, /* offset */ + 0, 5, 0, 0, /* m factor */ + 24, 3, /* mux */ + 31, /* gate */ + AW_CLK_HAS_GATE | AW_CLK_HAS_MUX | + AW_CLK_REPARENT); /* flags */ + +static const char *riscv_parents[] = { "dcxo", "osc32k", "iosc", + "pll_periph0_800m", "pll_periph0", "pll_cpux", "pll_audio1_div2" }; +M_CLK(riscv_clk, + CLK_RISCV, "riscv", riscv_parents, /* id, name, parents */ + 0xD00, /* offset */ + 0, 5, 0, 0, /* m factor */ + 24, 3, /* mux */ + 0, /* gate */ + AW_CLK_HAS_MUX | AW_CLK_SET_PARENT); /* flags */ + +static const char *riscv_axi_parents[] = { "riscv" }; +static struct clk_div_table riscv_axi_div_table[] = { + { .value = 1, .divider = 2 }, + { .value = 2, .divider = 3 }, + { .value = 3, .divider = 4 }, + { }, *** 155 LINES SKIPPED *** From nobody Sat Nov 16 19:04:30 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XrNc00wK4z5dhdQ; Sat, 16 Nov 2024 19:04: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XrNbz59M5z4Z8P; Sat, 16 Nov 2024 19:04:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731783871; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B4AfYR9FY1GFQOqIRYZckNkNLqFPWFb+UQsJ1YvYTY0=; b=vL4Lfdn4NK2PMhXf4v7yfkV8kI/qwz0rN0AmmgQXyVJ2pYQnlEUZPDIeglfUs7a+dTBPSL 48pqbAaanMPuE3kp4hXcXvxu4TRmtd2udq717o920k2E7RdsLd1nsrTIsl4Ce4vcxsN3bW S0ejOC63v769F1GHvUaAIA6/s0VCHN58O8C4zpDvihpHSXw1ztnBIruHMtTUIe21V7ulnR Jjs+aFy/JS29hpQcw3BB0Bwr9WN5pq7iBd5W9L19IuKBmwzbXhF87Td81KO+7cJWZs/VbC fpMaa/gXfQmckcERCKSWZpYwvCNTG/K7FfZehrEyqQAcGWG1zKyK2kvLSYLAoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731783871; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B4AfYR9FY1GFQOqIRYZckNkNLqFPWFb+UQsJ1YvYTY0=; b=tlTYcWcOTrH0xjGw9WPcCBw2NH5LT6FuNYJjTDRl1iVVp9V9bkQjusu6Dqxa9D59/5TvTW avYoApWkK/fVycKrAgh8bKb8gEn2yghE5PaVW4tfM0/sp2f/RFC1OeVtvUGLC5ND8rUFCw QmX51qeKPPS+hSci5r9WwvBnXcPXmHVPpuXqS8x+ZdeEJ1m1+xe6ILCb7MFtbJ/Nm+JGQ5 o46vIaPsuTv6KJP+UvUHhybkdmjHBLdpAaM4RS7eB9aN8O0fG36gVTNh1P+b3y1bqGOPXP FDYBWr4JPmBSj0ntKG16HCPZaBmbeAAzRAflRE/2D/lSqIrfcZVPsG+HsAXTGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731783871; a=rsa-sha256; cv=none; b=JhaDpMTTGvB37Pss5ZKhoSMOeI8A4HFcp8Xr8V8gWgLsOhZ7hjMlJtNyWS4rtZiHVAMqQZ oFNxFkK8VnPGUwZVXqvfm/asUMLB5wuFBZPPLaUC4Rvt/5VMb/8uQN8OTbzBl8L6pGoY0K uZIM/mtBMmHPJCMoKl2+yrY3TZTe4GQSqZlCZ1b6C9wTgz6AIMx1y2xy1YKhOZXGLOl64a Wy8MMIAIPvnRASHKPAXYlxNkGISbCjM22jD7ETZD75xCr7Ojhf3VoVV8pwCKpnJ3nfYKJe CVedJBxr4wQZ0AqdlXH+Uj0hO3LqEPG54p+T7ciqR48l9U0iOwWgEFD6nL5mqw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XrNby4x2rzJds; Sat, 16 Nov 2024 19:04:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AGJ4Uem020921; Sat, 16 Nov 2024 19:04:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AGJ4Uvc020918; Sat, 16 Nov 2024 19:04:30 GMT (envelope-from git) Date: Sat, 16 Nov 2024 19:04:30 GMT Message-Id: <202411161904.4AGJ4Uvc020918@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 184d0b3fe348 - main - aw_syscon: enable for Allwinner D1 (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 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: 184d0b3fe348a6419794673f9431a290cb32e47b Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=184d0b3fe348a6419794673f9431a290cb32e47b commit 184d0b3fe348a6419794673f9431a290cb32e47b Author: Mitchell Horne AuthorDate: 2024-11-16 19:02:49 +0000 Commit: Mitchell Horne CommitDate: 2024-11-16 19:04:04 +0000 aw_syscon: enable for Allwinner D1 (riscv) Add the relevant compatible string and build glue. Update the man page with relevant compat strings. Reviewed by: manu Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D47516 --- share/man/man4/man4.arm/aw_syscon.4 | 10 +++++++++- sys/arm/allwinner/aw_syscon.c | 1 + sys/riscv/allwinner/files.allwinner | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/share/man/man4/man4.arm/aw_syscon.4 b/share/man/man4/man4.arm/aw_syscon.4 index 034bca716bcf..e32f329e489a 100644 --- a/share/man/man4/man4.arm/aw_syscon.4 +++ b/share/man/man4/man4.arm/aw_syscon.4 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd January 7, 2018 +.Dd November 11, 2024 .Dt AW_SYSCON 4 .Os .Sh NAME @@ -48,9 +48,17 @@ strings: .It allwinner,sun50i-a64-system-controller .It +allwinner,sun50i-a64-system-control +.It allwinner,sun8i-a83t-system-controller .It allwinner,sun8i-h3-system-controller +.It +allwinner,sun8i-h3-system-control +.It +allwinner,sun50i-h5-system-control +.It +allwinner,sun20i-d1-system-control .El .Sh AUTHORS The diff --git a/sys/arm/allwinner/aw_syscon.c b/sys/arm/allwinner/aw_syscon.c index 6a880a9b617e..cd2d3eeb53cd 100644 --- a/sys/arm/allwinner/aw_syscon.c +++ b/sys/arm/allwinner/aw_syscon.c @@ -51,6 +51,7 @@ static struct ofw_compat_data compat_data[] = { {"allwinner,sun8i-h3-system-controller", 1}, {"allwinner,sun8i-h3-system-control", 1}, {"allwinner,sun50i-h5-system-control", 1}, + {"allwinner,sun20i-d1-system-control", 1}, {NULL, 0} }; diff --git a/sys/riscv/allwinner/files.allwinner b/sys/riscv/allwinner/files.allwinner index af6a9a36ee4c..e29300c627a1 100644 --- a/sys/riscv/allwinner/files.allwinner +++ b/sys/riscv/allwinner/files.allwinner @@ -1,5 +1,6 @@ arm/allwinner/aw_rtc.c optional aw_rtc fdt +arm/allwinner/aw_syscon.c optional syscon arm/allwinner/aw_wdog.c optional aw_wdog # Allwinner clock drivers From nobody Sat Nov 16 19:17:03 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XrNtR6rrYz5djN1; Sat, 16 Nov 2024 19:17: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XrNtR6HPzz4bCW; Sat, 16 Nov 2024 19:17:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731784623; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lBCHw95qwkkwBZhzICmXyVVxYRi/FxE/HTti2yw9pZg=; b=Db9+CczPrLlSI0g0u0PuAIhCXyj8KTsw9aFh9zMAlBEaFnhvV7fJeGcnIqHnq8taAlx1zk XUPlsONege2IQiJnZfnCN6aZrkgbJIQmZOjDZZOsTLuf1O+O4fqmyeceMBgvfoi29ZJKdi 7Cik798mkt847k0el0P8tXlXqy+u2K7OnveMsmdAclwaxrF8s9iF966uQHz6DYl/Ttoyep 6a9NInxOCtu4N9x0WGogxDUg9EIGyf1gj2OVUpqDNdNwar4xyKkQsEKt//6rnTwAE9a5XW PGMWU9mNi4JDwyEipHTVwAdg74Ut3DR9UWyUB3A/U6bA+f0+jCSUBhT/PlhHeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731784623; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lBCHw95qwkkwBZhzICmXyVVxYRi/FxE/HTti2yw9pZg=; b=fpLIgVOYgqMKo5uQkGkqny8rLkp21Yp1wLydmTHW3CdVm2MaJcixnYccP4t9/iLoNw9/Z9 UQuJjxR/ZXEh7Uuf7bt8JI9O65/p/5nhVwFB8aMxCvNo4/KVsGqC0LtezygC+UVPFq8F7p ozHolzbglmOgc+i3sptMRPErVQTLjveU8sjFyVWrhddePPYLzT0IzdqkmA5OljbZYW4DjX oZx6VSUpb+sAKk5C3FmyARWd21bDB6RXkgp5IPR13EDOZIMpQp85Padww90+d+ljANwAXM rh+w4C69+mh5u/+Bdh3h1UqasyMaJVfPm+a1fKACzJ2WXzxcpFmBrzHqYMt++w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731784623; a=rsa-sha256; cv=none; b=Xw7fxz4I7PiZ3um+oYYZM8AUZycm1z6hFsNOdT+jBWQQLLJqWC6tCAo7MLCJdaDgjEqsJK T2cafYPiZlm0eH5Wagu/NcHihkTjk1XYXsQSmhPa0uECEaK/3juuMC+yFZZ+Mtd5spLi+c 2Ix4KFpckl+fvbjMjJpyZxXjAMByhKnZNWROOGjguBHxMHr4/bOKbkIEmKLh5R+/9potGY BMcQwyjL5BpyVZylbL9T48GBUaCUbF/OpUyxYQC7+vbxlyNKjZa60OMxgdIPwgbSWyR4MF qMVMEidNcRdKzhkvJAHKad3vDOxAwd2V5FdXpPWTqa66wGlvjOP+C5pNXzaZjw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XrNtR5tDPzKW1; Sat, 16 Nov 2024 19:17:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AGJH3jU040426; Sat, 16 Nov 2024 19:17:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AGJH38Y040423; Sat, 16 Nov 2024 19:17:03 GMT (envelope-from git) Date: Sat, 16 Nov 2024 19:17:03 GMT Message-Id: <202411161917.4AGJH38Y040423@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: f334c0b8b3cb - main - vm_page: use iterators in alloc_contig_domain List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f334c0b8b3cb97ada3d692a1d208b6839cd1d059 Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=f334c0b8b3cb97ada3d692a1d208b6839cd1d059 commit f334c0b8b3cb97ada3d692a1d208b6839cd1d059 Author: Doug Moore AuthorDate: 2024-11-16 19:15:05 +0000 Commit: Doug Moore CommitDate: 2024-11-16 19:15:05 +0000 vm_page: use iterators in alloc_contig_domain Restructure a bit of code to allow vm_page_alloc_contig_domain to use pctrie iterators for lookup and insertion into the object radix tree, to improve performance. Reviewed by: alc Differential Revision: https://reviews.freebsd.org/D47036 --- sys/vm/vm_page.c | 46 +++++++++++++++++++++++++++++++++++++--------- 1 file changed, 37 insertions(+), 9 deletions(-) diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 57e5684b3178..6b49f0745c73 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -1475,16 +1475,17 @@ vm_page_dirty_KBI(vm_page_t m) /* * Insert the given page into the given object at the given pindex. mpred is * used for memq linkage. From vm_page_insert, lookup is true, mpred is - * initially NULL, and this procedure looks it up. From vm_page_insert_after, - * lookup is false and mpred is known to the caller to be valid, and may be - * NULL if this will be the page with the lowest pindex. + * initially NULL, and this procedure looks it up. From vm_page_insert_after + * and vm_page_iter_insert, lookup is false and mpred is known to the caller + * to be valid, and may be NULL if this will be the page with the lowest + * pindex. * * The procedure is marked __always_inline to suggest to the compiler to * eliminate the lookup parameter and the associated alternate branch. */ static __always_inline int vm_page_insert_lookup(vm_page_t m, vm_object_t object, vm_pindex_t pindex, - vm_page_t mpred, bool lookup) + struct pctrie_iter *pages, bool iter, vm_page_t mpred, bool lookup) { int error; @@ -1503,7 +1504,10 @@ vm_page_insert_lookup(vm_page_t m, vm_object_t object, vm_pindex_t pindex, * Add this page to the object's radix tree, and look up mpred if * needed. */ - if (lookup) + if (iter) { + KASSERT(!lookup, ("%s: cannot lookup mpred", __func__)); + error = vm_radix_iter_insert(pages, m); + } else if (lookup) error = vm_radix_insert_lookup_lt(&object->rtree, m, &mpred); else error = vm_radix_insert(&object->rtree, m); @@ -1532,7 +1536,8 @@ vm_page_insert_lookup(vm_page_t m, vm_object_t object, vm_pindex_t pindex, int vm_page_insert(vm_page_t m, vm_object_t object, vm_pindex_t pindex) { - return (vm_page_insert_lookup(m, object, pindex, NULL, true)); + return (vm_page_insert_lookup(m, object, pindex, NULL, false, NULL, + true)); } /* @@ -1549,7 +1554,28 @@ static int vm_page_insert_after(vm_page_t m, vm_object_t object, vm_pindex_t pindex, vm_page_t mpred) { - return (vm_page_insert_lookup(m, object, pindex, mpred, false)); + return (vm_page_insert_lookup(m, object, pindex, NULL, false, mpred, + false)); +} + +/* + * vm_page_iter_insert: + * + * Tries to insert the page "m" into the specified object at offset + * "pindex" using the iterator "pages". Returns 0 if the insertion was + * successful. + * + * The page "mpred" must immediately precede the offset "pindex" within + * the specified object. + * + * The object must be locked. + */ +static int +vm_page_iter_insert(struct pctrie_iter *pages, vm_page_t m, vm_object_t object, + vm_pindex_t pindex, vm_page_t mpred) +{ + return (vm_page_insert_lookup(m, object, pindex, pages, true, mpred, + false)); } /* @@ -2373,6 +2399,7 @@ vm_page_alloc_contig_domain(vm_object_t object, vm_pindex_t pindex, int domain, int req, u_long npages, vm_paddr_t low, vm_paddr_t high, u_long alignment, vm_paddr_t boundary, vm_memattr_t memattr) { + struct pctrie_iter pages; vm_page_t m, m_ret, mpred; u_int busy_lock, flags, oflags; @@ -2391,7 +2418,8 @@ vm_page_alloc_contig_domain(vm_object_t object, vm_pindex_t pindex, int domain, object)); KASSERT(npages > 0, ("vm_page_alloc_contig: npages is zero")); - mpred = vm_page_mpred(object, pindex); + vm_page_iter_init(&pages, object); + mpred = vm_radix_iter_lookup_le(&pages, pindex); KASSERT(mpred == NULL || mpred->pindex != pindex, ("vm_page_alloc_contig: pindex already allocated")); for (;;) { @@ -2440,7 +2468,7 @@ vm_page_alloc_contig_domain(vm_object_t object, vm_pindex_t pindex, int domain, m->ref_count = 1; m->a.act_count = 0; m->oflags = oflags; - if (vm_page_insert_after(m, object, pindex, mpred)) { + if (vm_page_iter_insert(&pages, m, object, pindex, mpred)) { if ((req & VM_ALLOC_WIRED) != 0) vm_wire_sub(npages); KASSERT(m->object == NULL, From nobody Sat Nov 16 19:55:36 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XrPkw4pMKz5dkvL; Sat, 16 Nov 2024 19:55: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XrPkw3vztz4dpq; Sat, 16 Nov 2024 19:55:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731786936; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p2z4E90GMSWBTYnOV76duE07O+vC4oTd5M1nvVExvdo=; b=dHpRnNRxQbj+IQ/7hiw5ieFooUOWQKz0xAfEowiMgfxhXAJvvuW1cp360cH3m9RsCyPDGB 5oI7FdY2Zspi/BBpl1pH5pH0O3UWUpFhz03rFLod2lIMqd3NWN/0ez9MsYQx6V8ewhgyEf sW8ivwPUmUd4O6KsW3pxxvB9T2yN91T5tVLWJ3+6zQVaZZI4MxSz6INd0NaRcmIluEcD4Z O3mEtXEdhB0B8FnljxXDeflgrabnd1vBG9zzWESz49vOu+xdOo1w6v3FRf8sP6n9m8luzm 1/jEI7BZeZAMTGzhhoaaWWmfNb3yxT3eE0BsL26+SkulcdC50D3RcirGB8Q9zQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731786936; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p2z4E90GMSWBTYnOV76duE07O+vC4oTd5M1nvVExvdo=; b=K1LZe5gVY3sEDJZLHWG2JNA4o2qUHAq3CpoWKbFDEmEq6NWmKenE3ooeNxkHJbRACgXQLV BqIWm1FAsAzNf0nExHQzx7KJgYc2aOkkJpq/AX4otVcj4MYy5n3FJxUDTB2e05/igIvBV3 O3+Wjgt9p2/IrEbo46dSitnZsZT1vb/xgOz6gRL3JVagHU2qr4TywzsvicIHwfiaZIgIYG cg3IWeefCgTCs6u5t1aIQe7TQKDpXWg+HbdPAAw9giRhAUKor49gEW0MGaisA+8HMjMlRI aGpRTmVBR7eJf0enev7FaDKdwQxqJ3Eu2dKJxchVF5fRm5Ud+6y5laJcXFZJtA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731786936; a=rsa-sha256; cv=none; b=Mpu1css1dkRcgfNhv8//dyy+pgmLXHi09knOyD/SlYiCRITJ16rX118Ff1nEhQEfiTy/10 9YGMLVWoQv3YBxpoGermjLM/DUlkxvmdIv/WVSHKUeJ7qOai2ytd363/id1+SvHi09sMhf adFTuOUqvVeA5SNAFGLBiJeoaMDFUNKNo0CrkpIrlasVAe7j6smg00RFYi37q0kP8bc1fd UNgtOkqTF2VR86mB8msFhXufio42o9ETYNHNsbjt5Cu+KNIsQ0kCdxpWO/4wtNyGkvOLJM +xqea5/JHGZW1kFB+QxsMuJ6072HRkWszHlfupnhKIrylyOlL+g4FsPkhjqyHg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XrPkw38QvzLSC; Sat, 16 Nov 2024 19:55:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AGJtaq1014015; Sat, 16 Nov 2024 19:55:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AGJtaLl014012; Sat, 16 Nov 2024 19:55:36 GMT (envelope-from git) Date: Sat, 16 Nov 2024 19:55:36 GMT Message-Id: <202411161955.4AGJtaLl014012@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 4b4e88d9425b - main - aw_wdog: disable timer on attach List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org 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: 4b4e88d9425b59a377a71ffeb553376b1c60a80e Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=4b4e88d9425b59a377a71ffeb553376b1c60a80e commit 4b4e88d9425b59a377a71ffeb553376b1c60a80e Author: Mitchell Horne AuthorDate: 2024-11-16 19:54:46 +0000 Commit: Mitchell Horne CommitDate: 2024-11-16 19:55:27 +0000 aw_wdog: disable timer on attach Otherwise it may cause system reset before the watchdog can be pat. This is consistent with other watchdog drivers. Tested on Allwinner D1. Reviewed by: manu Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D47517 --- sys/arm/allwinner/aw_wdog.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/arm/allwinner/aw_wdog.c b/sys/arm/allwinner/aw_wdog.c index 5c087464c9e1..acfbdd8fe6d0 100644 --- a/sys/arm/allwinner/aw_wdog.c +++ b/sys/arm/allwinner/aw_wdog.c @@ -202,6 +202,9 @@ aw_wdog_attach(device_t dev) EVENTHANDLER_REGISTER(shutdown_final, aw_wdog_shutdown_fn, sc, SHUTDOWN_PRI_LAST - 1); + /* Disable watchdog for now. */ + WRITE(sc, sc->wdog_mode, sc->wdog_mode_key); + return (0); } From nobody Sun Nov 17 11:07:45 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XrnzP62LQz5dk8F; Sun, 17 Nov 2024 11:07: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XrnzP5P6Dz497T; Sun, 17 Nov 2024 11:07:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731841665; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NbTPrYQPEZoGrdyr73VApdsjqSjEMP4sq3no+u9auc4=; b=ISOl3ySZT0kbA1yhgvcW1wYjiJw0rOUynT7fOnES/QC1thkoLqyVQILp8zPoDj8a88YMnC IEhq8dNRtg2jpfqLVjydUKSpDzk9zJqsV36sO5Hf4w9+Bk6N836pIo5pTQfOLp6ohKKUCO sTuYOR3whF9kqFU4r85YbXsQtgP5pq+qvV6qFmQsxMQl54eTskCQ7LLtX4zpWbZrP/50oy qhXbDPsCAocvl+WfFuQwKd6xHjSECEkiCxINtqX0O9CLJnOdA57Bz+Jk7+Rth4TDtOvxVE xiM3rBJZtFLFXTWU480Dph2YYhN/B2xoeg4A6Yqfwf5x6+xLmd6YPfjjhQr/mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731841665; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NbTPrYQPEZoGrdyr73VApdsjqSjEMP4sq3no+u9auc4=; b=LO9770O9z5LugiD2nr2riIVOStjqqbMz5/1IJoTL0JwsW1bZs9Te51gODff9h4+gaW+D8a j5q3bgmkXByrfHDyZOnw8ePJFbePnmEJfLJ7HWjvQvo7+cOHU58nAYg4SKf5T+Xd4/T/ly u3kJUBk7UypF0uUebdZLFj216+t9UsXkM5zJKPLVnbKVZF6cA2w9eIogHSyxGM/iRz+I/X UVfQiVPtpQ7ODZtuHZXl16aOYU1Q7FiR98+KGBr67gDIKV+RuAs2rDtxkxk+mi44YNmYj8 QJXF8MPPuLgntO1vv0hX9BfbX4Ipepk7HwLUKTyDQCHdaKKPH4AQHO+bCdT3FA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731841665; a=rsa-sha256; cv=none; b=xT4w7FPs6Z9+pw16mmhaHtgUwsGx3D1m5WU7uDVQB9/tFE1G9COuXBlr27tTCdUuI1uS0P pi+55JbaOUBM22+iP+JDQhNUuZ0dEuY6o4JMaGCOsClNzJKZUfDzZjVJKcyJkfSPgVBa59 dDMIlDMkQOQbfNVWdiVDM/NHRBGXy/bjvHUakfvR0AB1CaqQ8QFruvCx+EtH22b+LYXxTC IANosfhGG482UiaRnv+t3u3eKVgyUvtycWlZaKjs27/a11x6b8M+khA5tYPyuhJpxPxcUS pWtOqLqRn/5/QqzPA/Tk/yN65BnQK5NM+qrSL6V65+pkK0MfxKo4VDb1bWAUGA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XrnzP4vdRzpRk; Sun, 17 Nov 2024 11:07:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AHB7jr4001129; Sun, 17 Nov 2024 11:07:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AHB7jVP001126; Sun, 17 Nov 2024 11:07:45 GMT (envelope-from git) Date: Sun, 17 Nov 2024 11:07:45 GMT Message-Id: <202411171107.4AHB7jVP001126@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michal Meloun Subject: git: 0381f0b63b9a - main - arm: Fix typo in ldscript.arm. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mmel X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0381f0b63b9a5e55d4eca3da5c35ab55e4ce948b Auto-Submitted: auto-generated The branch main has been updated by mmel: URL: https://cgit.FreeBSD.org/src/commit/?id=0381f0b63b9a5e55d4eca3da5c35ab55e4ce948b commit 0381f0b63b9a5e55d4eca3da5c35ab55e4ce948b Author: Michal Meloun AuthorDate: 2024-11-17 10:21:47 +0000 Commit: Michal Meloun CommitDate: 2024-11-17 11:00:45 +0000 arm: Fix typo in ldscript.arm. MFC after: 1 week --- sys/conf/ldscript.arm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/conf/ldscript.arm b/sys/conf/ldscript.arm index e8d2db3f854b..03feae4cfe08 100644 --- a/sys/conf/ldscript.arm +++ b/sys/conf/ldscript.arm @@ -64,7 +64,7 @@ SECTIONS _extab_start = .; PROVIDE(extab_start = .); .ARM.extab : { *(.ARM.extab) } - _extab.end = .; + _extab_end = .; PROVIDE(extab_end = .); _exidx_start = .; From nobody Sun Nov 17 11:07:46 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XrnzQ6gPDz5dk8J; Sun, 17 Nov 2024 11:07: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XrnzQ68Knz494D; Sun, 17 Nov 2024 11:07:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731841666; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mxMKNfu8xc8pvIz/6jMXTlsmu0ZYNqnYlNPCYjR9OS4=; b=ePC48QMYxw5jOh/ZHbuD2Otb5pwJb+LFKoxDqcjFldNaoMA8CaAZ+ZqJESNYu3nXQWpSwv idEqcot4CwCsqQ2BFQmRp6cvsDyIGGSu2XOE2xiAg69Q7nYUhLYhtb8Ca+bsrAsJhXUrrR k2/1mmFxgN7C1xuspzclmn0Mic3DlciuoLKfUL6SZpq+zBJW2/KcTBUENtUU1mK4BBXlFN dbM1YEdyHxKVFsITdV0arSYIJxPPAE2rVh+ixP3gnBbjQDASpdsooCJas9T/AsvjQKvUkT 7Ieu2RLpH4TOC7dwLAED5wPh9hoE7r3ETbb3mqdIxErvMWllgY6MOG9s5zQh1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731841666; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mxMKNfu8xc8pvIz/6jMXTlsmu0ZYNqnYlNPCYjR9OS4=; b=pbhzmhS66Pp2M9WQFa+fVnsZP6oE1GazVeUPli6+tBtfHS/1asIb/1xqNwBT86IburbLAF Jm9QUMb/MOc74fkKUDC82niog7Y6kTJJFm8YNvngsImYYGK6SHekcBRyInuBrHHIp/cfdM 8R0cv0baYmsDpghChHjATARbSZyLQeD6CEgqaxK5qYWGmjJDLVgoLPITpK0D0869pLW5Ao 411imLXW95RhuDET4JBV/YzYjxsCljjikNMV9nTTFXrSC6egX4In7P0NUXf/f0vBI2+VZO wmDbY6oDj3JEzMpiEjes5Qml2swblD2Bv8J3d+C/5OGihCIdkUIuIFl/HYHRug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731841666; a=rsa-sha256; cv=none; b=wI2vnQxzNjgKpOBEl4PPE7bhZ1nI7HZ80zfDg8dUMNlAUJjAOPRV3r444y28mEg0poF2xI PLOjm4JAU5a07EIE0iGILXjT7PE6Qnpeje+Hi065k0G/iQ9TzLrbrJMd1SeeUlIb/TOBh4 it4bpueochiMa2FMEV2bWWzQN8r+kJDKs3xvMnrkhrpTnjsrotebjQx70AoN6OrJY3sY0q Iwrdv0sKvRCeG8wa2GYlHX0zKi/gCmeDzovqeHpoT/LhdpwLRBbOp13Pl0mVchmOt9St+R 8OkW8pcBywT3FOACma1ZTiLp2oSP5z7vfsgZc8qYAiA8YnDU+gs+FJSRjMv2lQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XrnzQ5mh1zpWj; Sun, 17 Nov 2024 11:07:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AHB7kSj001183; Sun, 17 Nov 2024 11:07:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AHB7kAV001180; Sun, 17 Nov 2024 11:07:46 GMT (envelope-from git) Date: Sun, 17 Nov 2024 11:07:46 GMT Message-Id: <202411171107.4AHB7kAV001180@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michal Meloun Subject: git: 1701dfae1be3 - main - arm: fix symbols around the .ARM.exidx section List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mmel X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1701dfae1be3be6f8f1fdd3b6b636d3161b33420 Auto-Submitted: auto-generated The branch main has been updated by mmel: URL: https://cgit.FreeBSD.org/src/commit/?id=1701dfae1be3be6f8f1fdd3b6b636d3161b33420 commit 1701dfae1be3be6f8f1fdd3b6b636d3161b33420 Author: Michal Meloun AuthorDate: 2024-11-17 10:33:32 +0000 Commit: Michal Meloun CommitDate: 2024-11-17 11:00:45 +0000 arm: fix symbols around the .ARM.exidx section Insert a direct assignment to the location counter to ensure that orphaned sections cannot be emitted between the _exidx_start symbol and the .ARM.exidx section. Discussed with: jrtc27 MFC after: 1 week --- sys/conf/ldscript.arm | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/conf/ldscript.arm b/sys/conf/ldscript.arm index 03feae4cfe08..6ccd99d44a77 100644 --- a/sys/conf/ldscript.arm +++ b/sys/conf/ldscript.arm @@ -67,6 +67,7 @@ SECTIONS _extab_end = .; PROVIDE(extab_end = .); + . = ALIGN(4); _exidx_start = .; PROVIDE(exidx_start = .); .ARM.exidx : { *(.ARM.exidx) } From nobody Sun Nov 17 11:07:47 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XrnzS1jM7z5djmQ; Sun, 17 Nov 2024 11:07: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XrnzS0f06z49Bj; Sun, 17 Nov 2024 11:07:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731841668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KQ7ZaTnIDkDPUhl3Tz6sA2HW3LZd/8cbi3e+MCSxYpA=; b=FzO+kv69cjq4FmOAWm1FTAveeksFmpyJAjWbZoROim9sOaniaeqir7jelxMvoIp9OjJ2/2 zv19evSUqRCUWHR5GXImKNB9PLNUMgsz7EZdmYfUgm5PKPKirTIqrYajt/RV21Xjj+Nc8r isNEBuEemcv5tYAiK7q0DRb8vvj6bR+jQzYQAELcEOlFLwgOffeSCOWO8BeRFe03orzIuV 5ppjj5uDTg7N2P+eA2SLKfk5CEOYhFU++SofeUgzp+/WnAMQpYMYNYgCj1WZb9zSEvS2OG IfoAK8OHYet2G24oooA2bH6VSp4G46HTtnLCJ861E2BrIBqiuQTVVImgUC7k7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731841668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KQ7ZaTnIDkDPUhl3Tz6sA2HW3LZd/8cbi3e+MCSxYpA=; b=ynFkGsPLgHNZ3FA5HDeLJOmP9tpg+cc5V11HT3YjwZjEZpAxDNrlFa1VegaKvdvviAORQa 4nDZ7H97sGo3Hz94jMYW2PkHI4yto3cXIx5qppLA1zWCUb2MuoadUCEv1734FzU1vuRAkv R0SVLzyzK/LHFC9AzSofOmgwv63ZkcuJHv/vokr4QoN37HPx7o5E+hZYJMsIyVuCLcd5CJ 4AjrokgOBxWmzNUBcVcBpEQ1nqkhrTBh+7Pt35t0n7U9T9ayy6HAvjtQjl9mglPJeQONF5 7JFUBusvmeJTdCACqashIaNq0bJD8u6IFZyI2DzLg4pEVzSM5P8X9ESOiCOquQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731841668; a=rsa-sha256; cv=none; b=j9TRhB2cfDIgmVlDun6kex0zRaXfaHsgtrPQghV0qotQNmWqIzvSez0/1M/o2H9GZxnYCu x9uVrnCJN5bPhgEl8tGWzz3h8kU1vX2kuY80KkSCJk+ptQTaVpt7bWuT1Poss3EPbDNtid 0kfzDH8++Hy1L6onvSpTNO667amte8GVQGm1ZioxsJLXLTpK55r0Jd6VOroG0okxKM/+k2 QaP5CY6LEpTVCivoZSiuLbg27VevQiqEK7004RMfS6F3txZ9fgdIOKexAnXSK1Uw9RDdOT UmJQJMbxNzWev00Rblzx/FY75Px07B89ovuH9z1ByrSDd8WG9Egmn1G1kYaNvg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XrnzS03yvzp0y; Sun, 17 Nov 2024 11:07:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AHB7ls5001241; Sun, 17 Nov 2024 11:07:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AHB7lVS001238; Sun, 17 Nov 2024 11:07:47 GMT (envelope-from git) Date: Sun, 17 Nov 2024 11:07:47 GMT Message-Id: <202411171107.4AHB7lVS001238@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michal Meloun Subject: git: d98a18d032e6 - main - arm: add read_frequently, read_mostly and exclusive_cache_line sections to linker 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 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mmel X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d98a18d032e6ed3dbae30233d217c6597000e391 Auto-Submitted: auto-generated The branch main has been updated by mmel: URL: https://cgit.FreeBSD.org/src/commit/?id=d98a18d032e6ed3dbae30233d217c6597000e391 commit d98a18d032e6ed3dbae30233d217c6597000e391 Author: Michal Meloun AuthorDate: 2024-11-17 10:39:19 +0000 Commit: Michal Meloun CommitDate: 2024-11-17 11:05:14 +0000 arm: add read_frequently, read_mostly and exclusive_cache_line sections to linker script. MFC after: 1 week --- sys/conf/ldscript.arm | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/sys/conf/ldscript.arm b/sys/conf/ldscript.arm index 6ccd99d44a77..aceaf0bdedb0 100644 --- a/sys/conf/ldscript.arm +++ b/sys/conf/ldscript.arm @@ -82,6 +82,21 @@ SECTIONS *(.data) *(.gnu.linkonce.d*) } + . = ALIGN(64); + .data.read_frequently : + { + *(SORT_BY_ALIGNMENT(.data.read_frequently)) + } + .data.read_mostly : + { + *(.data.read_mostly) + } + . = ALIGN(64); + .data.exclusive_cache_line : + { + *(.data.exclusive_cache_line) + } + . = ALIGN(64); .data1 : { *(.data1) } . = ALIGN(32 / 8); .init_array : From nobody Sun Nov 17 11:07:49 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XrnzT345Cz5djyd; Sun, 17 Nov 2024 11:07: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XrnzT10Btz494F; Sun, 17 Nov 2024 11:07:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731841669; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MUxcaBYnNtzxKwzzRLe5CooovZ5o6DlQ+5KjiQ25eWA=; b=welcXmUkBLvPhvuTqiK2qlHNkVkQ9OJeeKi+4rXJLR6dWKSBt1RB6ogNqr4winD1lILsAD BDhzie/4zgOSTjx35RPs+NMVRPJ5t7dj/QF0t4GS9xc2btmnCJqs99pdakZmntokKelsk3 +6nFJHLJENTmvHXwTptbPtXWqh2+M7TrJ96+eZLztC5FYDVyNtnFOi8tnDZMEC5XjqXTV7 if0WuaVSAG8L4fMLFJBN7nMnBP6xBkZuDZxXHWM47PqKVEqWKTK0Vp0IhDSYG9f+4lbAVW GOU7O138ePghxUHcW6iiZa+y/pP6onChFFlH7PHNrvl81aZ6DxjjprpkeaZyOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731841669; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MUxcaBYnNtzxKwzzRLe5CooovZ5o6DlQ+5KjiQ25eWA=; b=XQ8r2+lABitBt2KmUm7PaxPSLQJEE6VRkapemzjzb04Pn0hIkj+sOzEpVQV1t0hs5zyfGj Z0mh003ndxh+sZaOQl0lbz6LBjNZ4QBkuaSWxhdla2UWr4MMh9eHDjm+lbyJmF5nEayS52 YRYLGzj00K43lEVlEen/spsoxDOFlU67fuXeAUptlmwVCEAdnM5rArymfuHPR+J92KTnR+ b9ssr4VFnBvgrZflPxt6y0fVGb7pxSnJ41egZwn6yAlb3Db6/Ht4melK7SeY/bz75z3Kx9 aZ3bdMnvqs6+bq+6fTqIXKf3Pm/lzfXXJHmhcz/Imr11acVBXUHB25UV7RnehA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731841669; a=rsa-sha256; cv=none; b=DktDxNTXALtRH6oOBsjP+lBZz8NmGokliOc6q53fdYuByg6hWlTwvYRPhqbforTdFOYSnE ptWyIYsv0KxFwQDmUFoBnVF9QyeCoNd7cqmIUfG2zDE6CuU8A7ilC4+pvyTg+teM1Pnda8 RBZaA1yW/I1KkLyCaStLEtebsFgS9le7OH6mE1y6lB/4M8fZSAPFTMnrMXafSnAAhVsN2j nJ8EfNA+3Dk8c4a549QmrmD+OIySQTHhRka8hf3AkfOGv9C38NYDf9ovEyE8NxLc1t/46+ /yD/lFuRc2RmTF/ukUHnfAWMh+2MYZVK0Jd8d8cJM0eEeOpbpiN1fKYc9Zhzcw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XrnzT0YdszpRl; Sun, 17 Nov 2024 11:07:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AHB7nix001301; Sun, 17 Nov 2024 11:07:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AHB7nhg001298; Sun, 17 Nov 2024 11:07:49 GMT (envelope-from git) Date: Sun, 17 Nov 2024 11:07:49 GMT Message-Id: <202411171107.4AHB7nhg001298@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michal Meloun Subject: git: 60e72eb16a08 - main - arm: align data section to the supersection. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mmel X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 60e72eb16a08bdebb40c99cdfcde04e606fe4f3e Auto-Submitted: auto-generated The branch main has been updated by mmel: URL: https://cgit.FreeBSD.org/src/commit/?id=60e72eb16a08bdebb40c99cdfcde04e606fe4f3e commit 60e72eb16a08bdebb40c99cdfcde04e606fe4f3e Author: Michal Meloun AuthorDate: 2024-11-17 10:50:41 +0000 Commit: Michal Meloun CommitDate: 2024-11-17 11:05:42 +0000 arm: align data section to the supersection. Offset based data section alignment is probably not applicable to any system other than i386. MFC after: 4 week --- sys/conf/ldscript.arm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/conf/ldscript.arm b/sys/conf/ldscript.arm index aceaf0bdedb0..d9edcfac9f78 100644 --- a/sys/conf/ldscript.arm +++ b/sys/conf/ldscript.arm @@ -74,9 +74,7 @@ SECTIONS _exidx_end = .; PROVIDE(exidx_end = .); - /* Adjust the address for the data segment. We want to adjust up to - the same address within the page on the next page up. */ - . = ALIGN(0x1000) + (. & (0x1000 - 1)) ; + . = ALIGN(0x10000); .data : { *(.data) From nobody Sun Nov 17 11:36:20 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XrpcN30Rsz5dl4C; Sun, 17 Nov 2024 11:36: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XrpcN2R3Kz4DYC; Sun, 17 Nov 2024 11:36:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731843380; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Hq9ZvbUZiIESSiQQYMKtnwStFsXy5Cgrd4AHQ39wUic=; b=EDU5Ukw0tpZdZjDdtkmN4xYjtN0APYX8OYz47r9qm1N1+wHZ3Vj8ftW6dIlPueUjc6cy1T ZKgOkuBtbzGVPRa7WBHrh0F5tuIPH5GhEX4G59KSjVUdOhxypOMofSuT36joDNWIz7Iys4 dMtvkTvZPwRDzEZVd4khV0jho4fqsExOvY9ZXrCH2yJnNUxWDIMUkM3eJHs75M2TGECL3T FdWGkLABqW0+Dyt/jhI/4JJV5CMlbBscL6VYd7e+D35SNNVI1GnvUStgBKQBEPDQs8aEmK EkOChiifLZxI51rvOaBqXucCsFrMgdDYDi8/0PFB5LQ2D9zNJHwJygd3UCfFMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731843380; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Hq9ZvbUZiIESSiQQYMKtnwStFsXy5Cgrd4AHQ39wUic=; b=wVi+Tfycm2bD/WmBQYoo5ynQ4GzsqDV7bXn/v6E+digiWEebrvcBWmwD4sqwelnZMKKp5h eijER4eCBA6GtqvkIB6eLkIliM+yZRe4vGE46IR827eVbAHHP/VjdR+ZVXgXpxPFzbnf2R cNbg5l33/Lgpuz/tAoER1vUQ3Cs6bukN3X5qmshTx32NxbXDUuwdmD3x3JlyZGD9wsarY8 GsOzbsNpm7Pn9A+Pmp/5znjZsCx4rvL8OA+Eh0VVZscmEcX4PvRDmYMJXG+oi7wLmqwClW quosDgQe64XkzYgo6DPGvfjnni6ivGAWdhSw7xRySt+iQWuUhmNONirkGSdMYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731843380; a=rsa-sha256; cv=none; b=kedlh+7+hzM4zDpmD9vA5Yq/MvYUd1TLK+OZfKEg23+gQp7H3+IKm+LBToMBR2Cm3L1xwg v+GUNNL/fTxw0chm2l5TIpEMB/sgrDecx78mM+P0gCh667M8F7+l4znpJf++OG3QGjcUoC aAPqg5tfKQWIQqzMMVWFfTnPe4xXUiwBIgpohU1bicStgE/MniaoYyQilvsJctGYMig7gS GIz87kuAyN63KWzlvR2g8PL0+hMWS3HbxIYpmxfeC253k2IJMdl/dlczwTqqRgYOmAibRr Rp+W8pBkkG3OykxfGX5EB5K8LZb2zImrOj9NFsTDbRJnBSGHzlSPleUNWGkO+Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XrpcN21xBzqhR; Sun, 17 Nov 2024 11:36:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AHBaKC1056202; Sun, 17 Nov 2024 11:36:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AHBaK2D056199; Sun, 17 Nov 2024 11:36:20 GMT (envelope-from git) Date: Sun, 17 Nov 2024 11:36:20 GMT Message-Id: <202411171136.4AHBaK2D056199@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michal Meloun Subject: git: b882d21558f3 - main - arm: link all .rodata variants into one output section List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mmel X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b882d21558f37e6a565694ac9b8f2a519e5b86fa Auto-Submitted: auto-generated The branch main has been updated by mmel: URL: https://cgit.FreeBSD.org/src/commit/?id=b882d21558f37e6a565694ac9b8f2a519e5b86fa commit b882d21558f37e6a565694ac9b8f2a519e5b86fa Author: Michal Meloun AuthorDate: 2024-11-17 11:28:47 +0000 Commit: Michal Meloun CommitDate: 2024-11-17 11:35:55 +0000 arm: link all .rodata variants into one output section MFC after: 1 week --- sys/conf/ldscript.arm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/conf/ldscript.arm b/sys/conf/ldscript.arm index d9edcfac9f78..7cf904ce39ff 100644 --- a/sys/conf/ldscript.arm +++ b/sys/conf/ldscript.arm @@ -17,7 +17,7 @@ SECTIONS _etext = .; PROVIDE (etext = .); .fini : { *(.fini) } =0x9090 - .rodata : { *(.rodata) *(.gnu.linkonce.r*) } + .rodata : { *(.rodata*) *(.gnu.linkonce.r*) } .rodata1 : { *(.rodata1) } .interp : { *(.interp) } .hash : { *(.hash) } From nobody Sun Nov 17 16:00:29 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XrwT955bLz5d4R6; Sun, 17 Nov 2024 16:00:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XrwT94ZHBz4WwH; Sun, 17 Nov 2024 16:00:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731859229; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uaIo9aVexjzT7o3UOW+q4d7L6nMIRZut39cmqXZ7HPM=; b=yFvp4Q/PMHlpKOgof6z+TqtQIh3etSj/ABiPOpKGkFtUaki00swA5PjAXPMLhKCIC5QZkZ o6c5TfbHycsatZoL9ZYpBE2A9fU7fD4rPZgNBnxoQ1WLbecXHklid8hIyhGpIqicVOoIjv 2mOSep8+ZFXzCvgJ6rcoXEBnxWsJPUSoq1TpdQph6V2k4FoDGH08Uibic1/jpf8Ct11tEG /4vSpwhRswcxFfrppbi3cfQSLokoDMwJR0vCixXIZ02KU6moApfoKzdfnZ4X75Lmda98AR bi5/rYDCPx3CZN4yrrJa87PlFl5FOBMDnh3fCyl89nTweBsFd+nkTgk85b6ENA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731859229; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uaIo9aVexjzT7o3UOW+q4d7L6nMIRZut39cmqXZ7HPM=; b=V8vnDSTs9gPCmM8koko+Ov4q/8FwVwngp/5zhVc6GQkFzd/GGn0nMR1dEh8CcOzmO4hLBM ge5vDc7d7722bcsrHcZTvOFycUcNi+xL3jMHJFeeKEqrMqH6y0iFnYwujlmS4rlvfJkNF6 QifAIrk899Jpmdf8Am1KgBnwEMMZ+wqKpXdtwuIMgvmJPMduwbVkAnaOb/Rs+fGlMotvEj 2YUQmIuQCFR0Rd36UwbZqRpxqHZ1gsDGRX8E9XyRz6wtJb0SGetc7USqgJGqgN2X48lA+1 I/WtJElZ0t5cFAzPQMetegGUIJsWF/VJDgkBOfeivRkPR/SDb1epsMS708veCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731859229; a=rsa-sha256; cv=none; b=tlgNlhkooKRY5wHVwVFsU+g54INR/U/ha/msBE5dxcRkor9FRzQyQA19SpVJsZH8jJcboN 35t6/lNSeytuYd0pVTDOsmmKlE6WLPYGzMeDX8UvZlsyaNHz200BK4RajRaxCD9BJeUtyh Rk7gxrR94TMis9HWkluqo0GTX2wYEOh3JYYSyKH6wGwAL/vvWw8nvwlVqZGOgHg568lCRP s56/2hOSlcz4DcCSfMongdJ91msfVSSvHJBPnun7XWUYePQoN3RqFXuus5DIqxq3hW0WGx jp6lMYK+sdN8M7MQCR8JBjUyoFhzIkhVPzc1wxgU2Xit9qWIq3Kz7+k03uLWnA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XrwT949ZVzxxX; Sun, 17 Nov 2024 16:00:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AHG0TAg047818; Sun, 17 Nov 2024 16:00:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AHG0TOa047815; Sun, 17 Nov 2024 16:00:29 GMT (envelope-from git) Date: Sun, 17 Nov 2024 16:00:29 GMT Message-Id: <202411171600.4AHG0TOa047815@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hajimu UMEMOTO Subject: git: 47db906375b5 - stable/14 - usb: Add support for Brainboxes USB-to-Serial adapters List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ume X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 47db906375b5c58a213bcb1759375bea5aee1e5d Auto-Submitted: auto-generated The branch stable/14 has been updated by ume: URL: https://cgit.FreeBSD.org/src/commit/?id=47db906375b5c58a213bcb1759375bea5aee1e5d commit 47db906375b5c58a213bcb1759375bea5aee1e5d Author: Hajimu UMEMOTO AuthorDate: 2024-11-11 12:14:05 +0000 Commit: Hajimu UMEMOTO CommitDate: 2024-11-17 05:17:55 +0000 usb: Add support for Brainboxes USB-to-Serial adapters PR: 277482 Reported by: Cameron Williams (cherry picked from commit 8eaeaf5c467866cf72701cdc34f7ab2ee3c2f123) --- sys/dev/usb/serial/uftdi.c | 18 ++++++++++++++++++ sys/dev/usb/usbdevs | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/sys/dev/usb/serial/uftdi.c b/sys/dev/usb/serial/uftdi.c index 458c6a740f7c..3b0400d9b353 100644 --- a/sys/dev/usb/serial/uftdi.c +++ b/sys/dev/usb/serial/uftdi.c @@ -289,8 +289,26 @@ static const STRUCT_USB_HOST_ID uftdi_devs[] = { UFTDI_DEV(BBELECTRONICS, USPTL4, 0), UFTDI_DEV(BBELECTRONICS, USTL4, 0), UFTDI_DEV(BBELECTRONICS, ZZ_PROG1_USB, 0), + UFTDI_DEV(BRAINBOXES, US101, 0), + UFTDI_DEV(BRAINBOXES, US159, 0), + UFTDI_DEV(BRAINBOXES, US235, 0), UFTDI_DEV(BRAINBOXES, US257, 0), UFTDI_DEV(BRAINBOXES, US25701, 0), + UFTDI_DEV(BRAINBOXES, US279_12, 0), + UFTDI_DEV(BRAINBOXES, US279_34, 0), + UFTDI_DEV(BRAINBOXES, US279_56, 0), + UFTDI_DEV(BRAINBOXES, US279_78, 0), + UFTDI_DEV(BRAINBOXES, US313, 0), + UFTDI_DEV(BRAINBOXES, US320, 0), + UFTDI_DEV(BRAINBOXES, US324, 0), + UFTDI_DEV(BRAINBOXES, US346_12, 0), + UFTDI_DEV(BRAINBOXES, US346_34, 0), + UFTDI_DEV(BRAINBOXES, US701_12, 0), + UFTDI_DEV(BRAINBOXES, US701_34, 0), + UFTDI_DEV(BRAINBOXES, US842_12, 0), + UFTDI_DEV(BRAINBOXES, US842_34, 0), + UFTDI_DEV(BRAINBOXES, US842_56, 0), + UFTDI_DEV(BRAINBOXES, US842_78, 0), UFTDI_DEV(CONTEC, COM1USBH, 0), UFTDI_DEV(DRESDENELEKTRONIK, SENSORTERMINALBOARD, 0), UFTDI_DEV(DRESDENELEKTRONIK, WIRELESSHANDHELDTERMINAL, 0), diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index 66695c195492..18176fa516a9 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -1420,8 +1420,26 @@ product BILLIONTON USBE100 0x8511 USBE100 product BILLIONTON USB2AR 0x90ff USB2AR Ethernet /* Brainboxes Limited products */ +product BRAINBOXES US101 0x1011 US-101 USB2Serial 1xRS232 +product BRAINBOXES US159 0x1021 US-159 USB2Serial 1xRS232 +product BRAINBOXES US235 0x1017 US-235 USB2Serial 1xRS232 product BRAINBOXES US257 0x5001 US-257 USB2Serial 2xRS232 product BRAINBOXES US25701 0x5002 US-25701 USB2Serial 2xRS232 +product BRAINBOXES US279_12 0x2021 US-279 USB2Serial 8xRS232 (Port 1 and 2) +product BRAINBOXES US279_34 0x2022 US-279 USB2Serial 8xRS232 (Port 3 and 4) +product BRAINBOXES US279_56 0x2023 US-279 USB2Serial 8xRS232 (Port 5 and 6) +product BRAINBOXES US279_78 0x2024 US-279 USB2Serial 8xRS232 (Port 7 and 8) +product BRAINBOXES US313 0x6001 US-313 USB2Serial 2xRS422/485 +product BRAINBOXES US320 0x1019 US-320 USB2Serial 1xRS422/485 +product BRAINBOXES US324 0x1013 US-324 USB2Serial 1xRS422/485 +product BRAINBOXES US346_12 0x3011 US-346 USB2Serial 4xRS422/485 (Port 1 and 2) +product BRAINBOXES US346_34 0x3012 US-346 USB2Serial 4xRS422/485 (Port 3 and 4) +product BRAINBOXES US701_12 0x2011 US-701 USB2Serial 4xRS232 (Port 1 and 2) +product BRAINBOXES US701_34 0x2012 US-701 USB2Serial 4xRS232 (Port 3 and 4) +product BRAINBOXES US842_12 0x8001 US-842 USB2Serial 8xRS-422/485 (Port 1 and 2) +product BRAINBOXES US842_34 0x8002 US-842 USB2Serial 8xRS-422/485 (Port 3 and 4) +product BRAINBOXES US842_56 0x8003 US-842 USB2Serial 8xRS-422/485 (Port 5 and 6) +product BRAINBOXES US842_78 0x8004 US-842 USB2Serial 8xRS-422/485 (Port 7 and 8) /* Broadcom products */ product BROADCOM BCM2033 0x2033 BCM2033 Bluetooth USB dongle From nobody Sun Nov 17 16:00:54 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XrwTf5QBPz5d4Wd; Sun, 17 Nov 2024 16: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XrwTf4mz5z4WpT; Sun, 17 Nov 2024 16: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=1731859254; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CXzQdZ+xlWIhGzw20GG1PvT8C9txGX31ywDRZ3GtKF4=; b=psYS07Zvw4yPDkJJIF+sc5Flczcz69ILBpFsSAeVhz50mGDo9gqEAMmzlFyT/dJV+2KWGb KzSc1YYUAiVTRYW9LMGIpkbR0OEXxqOvAwhXdzz+9gDdI0jYyr7vrswYW/boIKG8jhAm3F wylaobosgywhSFHYxiF8LOiO3+FxIaqNQ4w8WroKeJW2eeDuqLBa7FgWc/NXDQTFi+XQCc jKo2/sS3a4gT2iVYrxCK2EAot55P+rPwTk1TXNlil9S0t1Q1u0GpRfYl2RhugylQZZ0BUY fh9sUzREt2cwmvv3Kq2CwgxHNWzL6P6f7ohTJHgo30inonlgf0tRpBOrAnJqRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731859254; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CXzQdZ+xlWIhGzw20GG1PvT8C9txGX31ywDRZ3GtKF4=; b=RpeHeTBgj5tpH5tCA6gyBLuwg77LIECB8ZUD5m8VSMWiFPp79LZhmWSbk2oxuexQFOQL4l YlCoTqGbCZWXPJQO6vMOZyYX8o856hU6EbT2fF5Uma2Jn4rGH/wZSEabxU6bUrJKAPy5+/ GSdl6TdHUTU7F4cGPtbUWVW2w0m/gXsaHshTsUACzjsbMPAGRQWwlHpZU2Z6MyS3azJmBk KhcfQdEt8PfhFNKfl7r1IciG/zlmPVCwOZErwUocxM04SP3qAJNmy7ercKwgrAuofZyziP G1gBJ4PT/A+hq82oUDCo84UYHPRTHSZu1ha9yhN1ZRhQokIv2TPQemxLl2P8Rg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731859254; a=rsa-sha256; cv=none; b=XBF+DXUtgiUH1urbCjfhCVtWrfvj/HQCF6R7IQI+f+G6JQY52O7EhXrVkZh0RGXg0RZPxS PG6fNssdUEJ1lsFfR5x4Upox/cDIVDMIihtBHX/3DgPv4T1IcK9KwgAybmlfuknuitsIWE BkgntQyNBmXYfUJSq+dvA+7Gh7o/4kxyX9hmK+Ko0gXrVHqDeTkmBY4ah7/EEUDZVE9vUU xx0ALP7uWqsWuQVpv63VX+41kJXLNK1YMvgSeINZ/JiLv3huydO94l5cI2WeEjJIxRi1Ad BJIDE99iZ+A5o9mZMI2uUvx3Soiq/YJHs4QsyyrEXUxWFt/xhAB/2uygx0fmDw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XrwTf4NKnzxxd; Sun, 17 Nov 2024 16:00:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AHG0sgU052470; Sun, 17 Nov 2024 16:00:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AHG0svI052467; Sun, 17 Nov 2024 16:00:54 GMT (envelope-from git) Date: Sun, 17 Nov 2024 16:00:54 GMT Message-Id: <202411171600.4AHG0svI052467@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hajimu UMEMOTO Subject: git: c3a377dbbb87 - stable/13 - usb: Add support for Brainboxes USB-to-Serial adapters List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ume X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c3a377dbbb87413eda18b8581126c215efc931f1 Auto-Submitted: auto-generated The branch stable/13 has been updated by ume: URL: https://cgit.FreeBSD.org/src/commit/?id=c3a377dbbb87413eda18b8581126c215efc931f1 commit c3a377dbbb87413eda18b8581126c215efc931f1 Author: Hajimu UMEMOTO AuthorDate: 2024-11-11 12:14:05 +0000 Commit: Hajimu UMEMOTO CommitDate: 2024-11-17 09:59:26 +0000 usb: Add support for Brainboxes USB-to-Serial adapters PR: 277482 Reported by: Cameron Williams (cherry picked from commit 8eaeaf5c467866cf72701cdc34f7ab2ee3c2f123) --- sys/dev/usb/serial/uftdi.c | 18 ++++++++++++++++++ sys/dev/usb/usbdevs | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/sys/dev/usb/serial/uftdi.c b/sys/dev/usb/serial/uftdi.c index 0a8d27c9e9c3..365e57692b71 100644 --- a/sys/dev/usb/serial/uftdi.c +++ b/sys/dev/usb/serial/uftdi.c @@ -291,8 +291,26 @@ static const STRUCT_USB_HOST_ID uftdi_devs[] = { UFTDI_DEV(BBELECTRONICS, USPTL4, 0), UFTDI_DEV(BBELECTRONICS, USTL4, 0), UFTDI_DEV(BBELECTRONICS, ZZ_PROG1_USB, 0), + UFTDI_DEV(BRAINBOXES, US101, 0), + UFTDI_DEV(BRAINBOXES, US159, 0), + UFTDI_DEV(BRAINBOXES, US235, 0), UFTDI_DEV(BRAINBOXES, US257, 0), UFTDI_DEV(BRAINBOXES, US25701, 0), + UFTDI_DEV(BRAINBOXES, US279_12, 0), + UFTDI_DEV(BRAINBOXES, US279_34, 0), + UFTDI_DEV(BRAINBOXES, US279_56, 0), + UFTDI_DEV(BRAINBOXES, US279_78, 0), + UFTDI_DEV(BRAINBOXES, US313, 0), + UFTDI_DEV(BRAINBOXES, US320, 0), + UFTDI_DEV(BRAINBOXES, US324, 0), + UFTDI_DEV(BRAINBOXES, US346_12, 0), + UFTDI_DEV(BRAINBOXES, US346_34, 0), + UFTDI_DEV(BRAINBOXES, US701_12, 0), + UFTDI_DEV(BRAINBOXES, US701_34, 0), + UFTDI_DEV(BRAINBOXES, US842_12, 0), + UFTDI_DEV(BRAINBOXES, US842_34, 0), + UFTDI_DEV(BRAINBOXES, US842_56, 0), + UFTDI_DEV(BRAINBOXES, US842_78, 0), UFTDI_DEV(CONTEC, COM1USBH, 0), UFTDI_DEV(DRESDENELEKTRONIK, SENSORTERMINALBOARD, 0), UFTDI_DEV(DRESDENELEKTRONIK, WIRELESSHANDHELDTERMINAL, 0), diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index 76270f596295..c08ce9bca1e2 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -1420,8 +1420,26 @@ product BILLIONTON USBE100 0x8511 USBE100 product BILLIONTON USB2AR 0x90ff USB2AR Ethernet /* Brainboxes Limited products */ +product BRAINBOXES US101 0x1011 US-101 USB2Serial 1xRS232 +product BRAINBOXES US159 0x1021 US-159 USB2Serial 1xRS232 +product BRAINBOXES US235 0x1017 US-235 USB2Serial 1xRS232 product BRAINBOXES US257 0x5001 US-257 USB2Serial 2xRS232 product BRAINBOXES US25701 0x5002 US-25701 USB2Serial 2xRS232 +product BRAINBOXES US279_12 0x2021 US-279 USB2Serial 8xRS232 (Port 1 and 2) +product BRAINBOXES US279_34 0x2022 US-279 USB2Serial 8xRS232 (Port 3 and 4) +product BRAINBOXES US279_56 0x2023 US-279 USB2Serial 8xRS232 (Port 5 and 6) +product BRAINBOXES US279_78 0x2024 US-279 USB2Serial 8xRS232 (Port 7 and 8) +product BRAINBOXES US313 0x6001 US-313 USB2Serial 2xRS422/485 +product BRAINBOXES US320 0x1019 US-320 USB2Serial 1xRS422/485 +product BRAINBOXES US324 0x1013 US-324 USB2Serial 1xRS422/485 +product BRAINBOXES US346_12 0x3011 US-346 USB2Serial 4xRS422/485 (Port 1 and 2) +product BRAINBOXES US346_34 0x3012 US-346 USB2Serial 4xRS422/485 (Port 3 and 4) +product BRAINBOXES US701_12 0x2011 US-701 USB2Serial 4xRS232 (Port 1 and 2) +product BRAINBOXES US701_34 0x2012 US-701 USB2Serial 4xRS232 (Port 3 and 4) +product BRAINBOXES US842_12 0x8001 US-842 USB2Serial 8xRS-422/485 (Port 1 and 2) +product BRAINBOXES US842_34 0x8002 US-842 USB2Serial 8xRS-422/485 (Port 3 and 4) +product BRAINBOXES US842_56 0x8003 US-842 USB2Serial 8xRS-422/485 (Port 5 and 6) +product BRAINBOXES US842_78 0x8004 US-842 USB2Serial 8xRS-422/485 (Port 7 and 8) /* Broadcom products */ product BROADCOM BCM2033 0x2033 BCM2033 Bluetooth USB dongle From nobody Sun Nov 17 16:40:40 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XrxMY0g1gz5d6h0; Sun, 17 Nov 2024 16:40: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XrxMY0BYdz4b8T; Sun, 17 Nov 2024 16:40:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731861641; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=54kK701NMqWaqE0LOKoFS5Ou76woFQWpKO1DzGVWkPY=; b=qkH/KnYkaDJwX5U6QdBVKpXfUVXPhfOjCbY2+FZPO648gKGHd2pKkS0rlhZ63jZ1n/QwrC 0ruUm/hxziVUplWbPGcPrVuLX+ygd5Tm3qZDrGMH92oykfDFg4h6MDIvjWQFC5NSylg8Jl NDDuDIzRCnuMIEs9yJPa0Mr9MJrNvgkgUO4omgs1jjPwoa8qz4O9DBcXOjWE2fKZb3xQgi ueDXMk7u9TnqOHNI/qil2sKZDNSKOeVVsTSJi6ffKamVQ4Ge1LDY/cHrItr5aULn3g0E4V ApYMHO7mmzMaSCvtiZSZGLENaEZTNyVO7LIwIjzuMGZLheCCLJ0UKROyi1v20g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731861641; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=54kK701NMqWaqE0LOKoFS5Ou76woFQWpKO1DzGVWkPY=; b=f8vhfurQ2OPlHx7joxoflSr/vcPX9dg09CUZEDvzj7XBat9xhnvVE6y6ueus78m2H6oON9 3BZ6OlYUUlMuezWDiWO2zktt4Fym7TDCzGwE0TL+KIKAv5F+shffU/9tT/w+oBz4GVxcSK yWMh7K4Rs4mPluBM/kaOPtp5fzds763D1EssSt0xmF49LYUqNUp7z85MYKZGLqXRNF2//N iYGEawn4S4aRDfNSQ6Jg/KKQ0gtHGK+bVncJy7AJzublFO9CBCvWQwZwERQBydYGKtitaF dHi7JWfdaY0F+nSwy4Sn42EWHce1gc8KD25+hc4Nx48XadHPgl2O5+RQmZUjBA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731861641; a=rsa-sha256; cv=none; b=x76XPZMFDyuPE9ya9cD11wTpywPlmFG4TcoV8ubYqcRhM+4cY1APSX1vG/C2msuv/seNVt OnBVzwDJviLkpLOOZY3dOtB2tyUAcSAXo+qtl2CyI/WNSYOcT7ul2cBUOWPBryJrpLcV9P 6xodBKHAloBBmkfWZivlnCKg6COy3r3aN8qdRF3NUZkD3aykjU0waJhyYhbSi54G5jbXpX QNStnBRLUf/8KhXWpePNd5AKNBPxZ/xAy4RpecprHbD6jQS2q4+RLjIoOzgQjJpQmeK15M 570o57F5x5LedWBekm9q/fBsIF4+cLsOl1lfzlnEyGo5mno1aIKUR/wIlmktDg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XrxMX6vtlzys1; Sun, 17 Nov 2024 16:40:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AHGeeGW021117; Sun, 17 Nov 2024 16:40:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AHGeeVm021114; Sun, 17 Nov 2024 16:40:40 GMT (envelope-from git) Date: Sun, 17 Nov 2024 16:40:40 GMT Message-Id: <202411171640.4AHGeeVm021114@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 6817f3375b1a - main - conf: Fix KCSAN enablement checking List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6817f3375b1a2dd59239fa8a755e7a9fd0903ab0 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=6817f3375b1a2dd59239fa8a755e7a9fd0903ab0 commit 6817f3375b1a2dd59239fa8a755e7a9fd0903ab0 Author: Mark Johnston AuthorDate: 2024-11-16 17:22:47 +0000 Commit: Mark Johnston CommitDate: 2024-11-17 16:40:33 +0000 conf: Fix KCSAN enablement checking Fixes: 6e3875ebcf0e ("sys: move SAN and COVERAGE options handling to kern.mk") --- sys/conf/kern.pre.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk index 6ad9d209c70a..e6e42b33a9b7 100644 --- a/sys/conf/kern.pre.mk +++ b/sys/conf/kern.pre.mk @@ -93,6 +93,7 @@ ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${CFLAGS} ${ASM_CFLAGS.${.IMPSRC:T}} COMPAT_FREEBSD32_ENABLED!= grep COMPAT_FREEBSD32 opt_global.h || true ; echo KASAN_ENABLED!= grep KASAN opt_global.h || true ; echo +KCSAN_ENABLED!= grep KCSAN opt_global.h || true ; echo KMSAN_ENABLED!= grep KMSAN opt_global.h || true ; echo KUBSAN_ENABLED!= grep KUBSAN opt_global.h || true ; echo COVERAGE_ENABLED!= grep COVERAGE opt_global.h || true ; echo From nobody Sun Nov 17 17:42:19 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xrykh1zRxz5dBXd; Sun, 17 Nov 2024 17:42: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xrykg6HWmz4j0q; Sun, 17 Nov 2024 17:42:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731865339; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5p7nR7vT02DsjUQvYZOqp4yWE+SnPdeyFQbn/BGqyxU=; b=wQeRn1JGTFeDoskqwAQI5WBp0Hsk7Zq7gLoMZxE1WENMLdbRoM2g6dHzMUCU8Vws9YBBv1 K51DBsqJtFa0A0xEEXKnxYex22b4yM2aN40Qa42dOLP5hTMBpt+rtD2PbDIL/a9NwgF0QY sdq3CmOors+QSmrOkF8hS2N6XZgmb7PLMtUfvxuPcAGnZuAw/dcZxtv5izSHcA9UMsXzgc sRalw+/YsbhKetZoYviwQTJXjEnGa1zgRlG7Vd2UiU5Bh4QYCxuFCj1WbT410Dqi0u9qwX xuJyyVpGJpmQrECR4epgFVXeadMlcjW6YOy3chz9F3w2w/Vcw6U8B+QgulySjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731865339; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5p7nR7vT02DsjUQvYZOqp4yWE+SnPdeyFQbn/BGqyxU=; b=DtwViKe7lrjKW657AS6PtESOkEAmgEuxZe26ho2dGvepW/mLe4t0RQ9N8E0BTwK2I+eO1e QIsQVO0IgAXBdnV4iUCCboIpQy7/Zw7kgRcT3y7T2v6qkimj2ztk4/8gmtwRG8mlUNV4Jm qpfTUO4N9U/976Kj1QKaN08rVsdhf7SxFqO4gz55/m7ftqkAj33SZOV9JL4P8zSO9IOSzb u5lEJqVLV0fN9vXZEUiWSV5laoNbvLzeRzbDNuz/RvedTg0mr8mbhlvlMrhjzxMEP9cPpL RmQuI9FmbDIbtu7j9sUyuzuOIE4m9GzIMcV+eKRdjNAaM7E4K5hhk6/fikLmcA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731865339; a=rsa-sha256; cv=none; b=YAVqiIetXzvzHVmuteeAvV1MIp+E3XTW6GfUeXD5lAc6wyCA46rgxZrARGx4KhR7jcBT6J G2KeNoTnuPi8xSFg0dShPs6U4vkv1d14SGnaF3WH8pZuTuEsk9fsOcjMsLUvm9+NMwpmMs i87UTejYxbZk2DCLT8NKNCGeDulkQfI5xHUHhlqBzXmHSykxZ816on39J2/pg5qHWSenJm Mm4iPlzgIzTki+S8+sS6A9h3C35fBzsSjeFdrGDEFeQ7HFgMkPZEg5v3iKnEeLExvcuq1C H6zg7h2tOHMSuY5FxiTtepiIFDDb+dp5U9XQjcbkYK35jmDn9Yt9e/4w7qzNjA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xrykg5nWbz12LP; Sun, 17 Nov 2024 17:42:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AHHgJb0036011; Sun, 17 Nov 2024 17:42:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AHHgJuX036008; Sun, 17 Nov 2024 17:42:19 GMT (envelope-from git) Date: Sun, 17 Nov 2024 17:42:19 GMT Message-Id: <202411171742.4AHHgJuX036008@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: aab7f19974a2 - main - sh tests: Fix ktrace usage now that envvars are traced 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 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: aab7f19974a27cac3c1088f486074c05bf95017a Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=aab7f19974a27cac3c1088f486074c05bf95017a commit aab7f19974a27cac3c1088f486074c05bf95017a Author: Mark Johnston AuthorDate: 2024-11-17 17:37:34 +0000 Commit: Mark Johnston CommitDate: 2024-11-17 17:37:34 +0000 sh tests: Fix ktrace usage now that envvars are traced by default Some sh tests use ktrace to see whether a particular file, specified in the environment, was accessed by the shell. After commit 65a4daeaf324, this test matches the ktrace record generated by execve. Use ktrace to only log name lookups, to avoid such false matches. Fixes: 65a4daeaf324 ("ktrace: log execve(2) arguments and environment") --- bin/sh/tests/parameters/mail1.0 | 2 +- bin/sh/tests/parameters/mail2.0 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/sh/tests/parameters/mail1.0 b/bin/sh/tests/parameters/mail1.0 index 09102d811513..42e712e31ac9 100644 --- a/bin/sh/tests/parameters/mail1.0 +++ b/bin/sh/tests/parameters/mail1.0 @@ -3,7 +3,7 @@ goodfile=/var/empty/sh-test-goodfile mailfile=/var/empty/sh-test-mailfile T=$(mktemp sh-test.XXXXXX) || exit -MAIL=$mailfile ktrace -i -f "$T" ${SH} -c "[ -s $goodfile ]" 2>/dev/null +MAIL=$mailfile ktrace -t n -i -f "$T" ${SH} -c "[ -s $goodfile ]" 3>/dev/null if ! grep -q $goodfile "$T"; then # ktrace problem rc=0 diff --git a/bin/sh/tests/parameters/mail2.0 b/bin/sh/tests/parameters/mail2.0 index d594c4a74356..b1f48e0b29db 100644 --- a/bin/sh/tests/parameters/mail2.0 +++ b/bin/sh/tests/parameters/mail2.0 @@ -3,7 +3,7 @@ goodfile=/var/empty/sh-test-goodfile mailfile=/var/empty/sh-test-mailfile T=$(mktemp sh-test.XXXXXX) || exit -ENV=$goodfile MAIL=$mailfile ktrace -i -f "$T" ${SH} +m -i /dev/null 2>&1 +ENV=$goodfile MAIL=$mailfile ktrace -t n -i -f "$T" ${SH} +m -i /dev/null 2>&1 if ! grep -q $goodfile "$T"; then # ktrace problem rc=0 From nobody Sun Nov 17 18:00:20 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xrz7S1Ncyz5dChx; Sun, 17 Nov 2024 18:00: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xrz7S1DGYz4k4b; Sun, 17 Nov 2024 18:00:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731866420; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LFg7ivz7j7JUXrRZ5N+ekXapA26rwYemCwzge3AZlYA=; b=v4WC/F4rwg8Fh4WdE9OcMEPB4MfkfsJrLrx+o/B8gc1zj/isddDuKC5j8voQsKLbt77OBY QmVhQst+I4k564i2fwO7O9mP5p8nURRTwVR0FNP8sUGH3HWVvP/LfttQ3F2DpDoZK6fr7m 0Nljr7YnCFVUmiYHCEx+KdrxWV6cexyOf8y6Z+Rvhd+RLL7bFbjqmxJ1TTwit5JLOmsY5g f65hY+6Th2ypcbdh1TwApltbelcMLmWEL6aT1TVCw2KfdqUc0qH40+3YRMnk7CMzY4eGEl bd25LA5XHq6Hm5eV2tXF9mqk7lqnwMaGINPIBRv8+9/R8zZ6qOUq9s42iscELw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731866420; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LFg7ivz7j7JUXrRZ5N+ekXapA26rwYemCwzge3AZlYA=; b=uqcvQl7mOX7ZQK3UXoX1vA/am2ptsXqm5pA8XfF/VKgwSKTld1j44/canJxpCcqLnNZ4YU QGlCin3A+hOh/sNOT/sHJx6LNMbgg6Rps0tDq1IbPOgAmghqrHHuD59l5UUhbZ7yNcVLKo of+iDtOMlrnNxQxdibNmw/4E42q1qslwyP8NK7NM5726jG6JudujhlFGCmmr0T/o7p5Bdj n8O2m1jN1j3qj79Lz525CZxIxFsCsb9wpMBYTB5ZPpEjDF/lu6lCZASfcRFkQJ7vrl1fka oGelVrl1sUydq2v2agIUAI5PZzgLeC7t15/ldyPzERSQp8FpMaqbyPCE6P14gw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731866420; a=rsa-sha256; cv=none; b=RvxR8FVShkiLgNR7ZdQtzTUYRSFFeVStr/eLpU78FNckTsctmoF4g3hzTCkay9dJ0Y9VlW kv0HeB3cn0vK3m4Pz6KcGqcpaM/74o2gvoAxqDISaqyarfs03TY321tHK/wJFEe51kpKAI oEGjJezsGlQE1Dvx6VVb8MW+U4LYkBTtLe1nG+Pd5qCz1sUoT9of1uhRU6J628x9LjOpN8 AACm5hX1zXHCnDPHx/JFG48B49JalGrkWMZ1xPvUvMGWGl8Z2JIfc1ZMoBpKAZeKFm2IV9 koT8x4enc7qk70wXiU6SpSI2FcG5/CWo77vYPEEKYzsJFZzJVh4X4OMgmQHucg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xrz7S0rF9z12Ny; Sun, 17 Nov 2024 18:00:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AHI0K9l070667; Sun, 17 Nov 2024 18:00:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AHI0K6p070664; Sun, 17 Nov 2024 18:00:20 GMT (envelope-from git) Date: Sun, 17 Nov 2024 18:00:20 GMT Message-Id: <202411171800.4AHI0K6p070664@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: c249cc3822dc - main - net80211: migrate FC0_TYPE_MASK / FC0_SUBTYPE_MASK frame type checks to macros List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c249cc3822dc002288700ee206cf28c0c6031449 Auto-Submitted: auto-generated The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=c249cc3822dc002288700ee206cf28c0c6031449 commit c249cc3822dc002288700ee206cf28c0c6031449 Author: Adrian Chadd AuthorDate: 2024-11-09 21:44:50 +0000 Commit: Adrian Chadd CommitDate: 2024-11-17 17:53:04 +0000 net80211: migrate FC0_TYPE_MASK / FC0_SUBTYPE_MASK frame type checks to macros * Add macros for the management and control frame type checks that I've come across in the drivers. * Delete some now old code (eg ath's ieee80211_is_action()) as there's now a macro for it. Local testing: * not yet, I have a lot of wifi devices to find and test against Differential Revision: https://reviews.freebsd.org/D47500 --- sys/dev/ath/if_ath_tx.c | 24 ++---------------------- sys/dev/ipw/if_ipw.c | 2 +- sys/dev/iwn/if_iwn.c | 4 +--- sys/dev/malo/if_malo.c | 12 +++--------- sys/dev/mwl/if_mwl.c | 7 ++----- sys/dev/otus/if_otus.c | 3 +-- sys/dev/ral/rt2560.c | 5 +---- sys/dev/ral/rt2661.c | 4 +--- sys/dev/ral/rt2860.c | 8 ++------ sys/dev/usb/wlan/if_rum.c | 4 +--- sys/dev/usb/wlan/if_run.c | 4 +--- sys/dev/usb/wlan/if_upgt.c | 3 +-- sys/dev/usb/wlan/if_ural.c | 5 +---- sys/dev/usb/wlan/if_urtw.c | 7 ++----- sys/dev/usb/wlan/if_zyd.c | 4 +--- sys/net80211/ieee80211.h | 36 ++++++++++++++++++++++++++++++++++++ 16 files changed, 57 insertions(+), 75 deletions(-) diff --git a/sys/dev/ath/if_ath_tx.c b/sys/dev/ath/if_ath_tx.c index 69d0b5c00848..1ec23972f283 100644 --- a/sys/dev/ath/if_ath_tx.c +++ b/sys/dev/ath/if_ath_tx.c @@ -1133,8 +1133,7 @@ ath_tx_calc_duration(struct ath_softc *sc, struct ath_buf *bf) * Calculate duration. This logically belongs in the 802.11 * layer but it lacks sufficient information to calculate it. */ - if ((flags & HAL_TXDESC_NOACK) == 0 && - (wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) != IEEE80211_FC0_TYPE_CTL) { + if ((flags & HAL_TXDESC_NOACK) == 0 && !IEEE80211_IS_CTL(wh)) { u_int16_t dur; if (shortPreamble) dur = rt->info[rix].spAckDuration; @@ -2577,25 +2576,6 @@ badbad: * It's a dirty hack, but someone's gotta do it. */ -/* - * XXX doesn't belong here! - */ -static int -ieee80211_is_action(struct ieee80211_frame *wh) -{ - /* Type: Management frame? */ - if ((wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) != - IEEE80211_FC0_TYPE_MGT) - return 0; - - /* Subtype: Action frame? */ - if ((wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK) != - IEEE80211_FC0_SUBTYPE_ACTION) - return 0; - - return 1; -} - /* * Return an alternate TID for ADDBA request frames. * @@ -2612,7 +2592,7 @@ ath_tx_action_frame_override_queue(struct ath_softc *sc, uint16_t baparamset; /* Not action frame? Bail */ - if (! ieee80211_is_action(wh)) + if (! IEEE80211_IS_MGMT_ACTION(wh)) return 0; /* XXX Not needed for frames we send? */ diff --git a/sys/dev/ipw/if_ipw.c b/sys/dev/ipw/if_ipw.c index 051f046d26ad..68662f378933 100644 --- a/sys/dev/ipw/if_ipw.c +++ b/sys/dev/ipw/if_ipw.c @@ -1119,7 +1119,7 @@ ipw_fix_channel(struct ipw_softc *sc, struct mbuf *m) wh = mtod(m, struct ieee80211_frame *); - if ((wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) != IEEE80211_FC0_TYPE_MGT) + if (!IEEE80211_IS_MGMT(wh)) return; subtype = wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK; diff --git a/sys/dev/iwn/if_iwn.c b/sys/dev/iwn/if_iwn.c index d2d44d93f948..50d50fdc473c 100644 --- a/sys/dev/iwn/if_iwn.c +++ b/sys/dev/iwn/if_iwn.c @@ -4624,9 +4624,7 @@ iwn_tx_data(struct iwn_softc *sc, struct mbuf *m, struct ieee80211_node *ni) IEEE80211_QOS_ACKPOLICY_NOACK) flags |= IWN_TX_NEED_ACK; } - if ((wh->i_fc[0] & - (IEEE80211_FC0_TYPE_MASK | IEEE80211_FC0_SUBTYPE_MASK)) == - (IEEE80211_FC0_TYPE_CTL | IEEE80211_FC0_SUBTYPE_BAR)) + if (IEEE80211_IS_CTL_BAR(wh)) flags |= IWN_TX_IMM_BA; /* Cannot happen yet. */ if (wh->i_fc[1] & IEEE80211_FC1_MORE_FRAG) diff --git a/sys/dev/malo/if_malo.c b/sys/dev/malo/if_malo.c index 56310085ef5f..52419f377bb6 100644 --- a/sys/dev/malo/if_malo.c +++ b/sys/dev/malo/if_malo.c @@ -94,13 +94,9 @@ enum { MALO_DEBUG_FW = 0x00008000, /* firmware */ MALO_DEBUG_ANY = 0xffffffff }; -#define IS_BEACON(wh) \ - ((wh->i_fc[0] & (IEEE80211_FC0_TYPE_MASK | \ - IEEE80211_FC0_SUBTYPE_MASK)) == \ - (IEEE80211_FC0_TYPE_MGT|IEEE80211_FC0_SUBTYPE_BEACON)) #define IFF_DUMPPKTS_RECV(sc, wh) \ (((sc->malo_debug & MALO_DEBUG_RECV) && \ - ((sc->malo_debug & MALO_DEBUG_RECV_ALL) || !IS_BEACON(wh)))) + ((sc->malo_debug & MALO_DEBUG_RECV_ALL) || !IEEE80211_IS_MGMT_BEACON(wh)))) #define IFF_DUMPPKTS_XMIT(sc) \ (sc->malo_debug & MALO_DEBUG_XMIT) #define DPRINTF(sc, m, fmt, ...) do { \ @@ -1025,8 +1021,6 @@ static int malo_tx_start(struct malo_softc *sc, struct ieee80211_node *ni, struct malo_txbuf *bf, struct mbuf *m0) { -#define IS_DATA_FRAME(wh) \ - ((wh->i_fc[0] & (IEEE80211_FC0_TYPE_MASK)) == IEEE80211_FC0_TYPE_DATA) int error, iswep; int hdrlen, pktlen; struct ieee80211_frame *wh; @@ -1150,7 +1144,7 @@ malo_tx_start(struct malo_softc *sc, struct ieee80211_node *ni, ds->pktptr = htole32(bf->bf_segs[0].ds_addr); ds->pktlen = htole16(bf->bf_segs[0].ds_len); /* NB: pPhysNext setup once, don't touch */ - ds->datarate = IS_DATA_FRAME(wh) ? 1 : 0; + ds->datarate = IEEE80211_IS_DATA(wh) ? 1 : 0; ds->sap_pktinfo = 0; ds->format = 0; @@ -1183,7 +1177,7 @@ malo_tx_start(struct malo_softc *sc, struct ieee80211_node *ni, #endif MALO_TXQ_LOCK(txq); - if (!IS_DATA_FRAME(wh)) + if (!IEEE80211_IS_DATA(wh)) ds->status |= htole32(1); ds->status |= htole32(MALO_TXD_STATUS_FW_OWNED); STAILQ_INSERT_TAIL(&txq->active, bf, bf_list); diff --git a/sys/dev/mwl/if_mwl.c b/sys/dev/mwl/if_mwl.c index 49b8b3279c7f..f396ef7256f4 100644 --- a/sys/dev/mwl/if_mwl.c +++ b/sys/dev/mwl/if_mwl.c @@ -226,12 +226,9 @@ enum { MWL_DEBUG_AMPDU = 0x00004000, /* BA stream handling */ MWL_DEBUG_ANY = 0xffffffff }; -#define IS_BEACON(wh) \ - ((wh->i_fc[0] & (IEEE80211_FC0_TYPE_MASK|IEEE80211_FC0_SUBTYPE_MASK)) == \ - (IEEE80211_FC0_TYPE_MGT|IEEE80211_FC0_SUBTYPE_BEACON)) #define IFF_DUMPPKTS_RECV(sc, wh) \ ((sc->sc_debug & MWL_DEBUG_RECV) && \ - ((sc->sc_debug & MWL_DEBUG_RECV_ALL) || !IS_BEACON(wh))) + ((sc->sc_debug & MWL_DEBUG_RECV_ALL) || !IEEE80211_IS_MGMT_BEACON(wh))) #define IFF_DUMPPKTS_XMIT(sc) \ (sc->sc_debug & MWL_DEBUG_XMIT) @@ -2553,7 +2550,7 @@ mwl_anyhdrsize(const void *data) { const struct ieee80211_frame *wh = data; - if ((wh->i_fc[0]&IEEE80211_FC0_TYPE_MASK) == IEEE80211_FC0_TYPE_CTL) { + if (IEEE80211_IS_CTL(wh)) { switch (wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK) { case IEEE80211_FC0_SUBTYPE_CTS: case IEEE80211_FC0_SUBTYPE_ACK: diff --git a/sys/dev/otus/if_otus.c b/sys/dev/otus/if_otus.c index dbb913d83ae8..a620a400bfd6 100644 --- a/sys/dev/otus/if_otus.c +++ b/sys/dev/otus/if_otus.c @@ -1686,8 +1686,7 @@ otus_sub_rxeof(struct otus_softc *sc, uint8_t *buf, int len, struct mbufq *rxq) * with invalid frame control values here. Just toss them * rather than letting net80211 get angry and log. */ - if ((wh->i_fc[0] & IEEE80211_FC0_VERSION_MASK) != - IEEE80211_FC0_VERSION_0) { + if (!IEEE80211_IS_FC0_CHECK_VER(wh, IEEE80211_FC0_VERSION_0)) { OTUS_DPRINTF(sc, OTUS_DEBUG_RXDONE, "%s: invalid 802.11 fc version (firmware bug?)\n", __func__); diff --git a/sys/dev/ral/rt2560.c b/sys/dev/ral/rt2560.c index d7cafe1994c9..aaae1245a9a1 100644 --- a/sys/dev/ral/rt2560.c +++ b/sys/dev/ral/rt2560.c @@ -1558,10 +1558,7 @@ rt2560_tx_mgt(struct rt2560_softc *sc, struct mbuf *m0, *(uint16_t *)wh->i_dur = htole16(dur); /* tell hardware to add timestamp for probe responses */ - if ((wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) == - IEEE80211_FC0_TYPE_MGT && - (wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK) == - IEEE80211_FC0_SUBTYPE_PROBE_RESP) + if (IEEE80211_IS_MGMT_PROBE_RESP(wh)) flags |= RT2560_TX_TIMESTAMP; } diff --git a/sys/dev/ral/rt2661.c b/sys/dev/ral/rt2661.c index 1194ef12189f..4912e1106fa6 100644 --- a/sys/dev/ral/rt2661.c +++ b/sys/dev/ral/rt2661.c @@ -1326,9 +1326,7 @@ rt2661_tx_mgt(struct rt2661_softc *sc, struct mbuf *m0, *(uint16_t *)wh->i_dur = htole16(dur); /* tell hardware to add timestamp in probe responses */ - if ((wh->i_fc[0] & - (IEEE80211_FC0_TYPE_MASK | IEEE80211_FC0_SUBTYPE_MASK)) == - (IEEE80211_FC0_TYPE_MGT | IEEE80211_FC0_SUBTYPE_PROBE_RESP)) + if (IEEE80211_IS_MGMT_PROBE_RESP(wh)) flags |= RT2661_TX_TIMESTAMP; } diff --git a/sys/dev/ral/rt2860.c b/sys/dev/ral/rt2860.c index ab5b32b4e026..e928de084bcb 100644 --- a/sys/dev/ral/rt2860.c +++ b/sys/dev/ral/rt2860.c @@ -1559,9 +1559,7 @@ rt2860_tx(struct rt2860_softc *sc, struct mbuf *m, struct ieee80211_node *ni) *(uint16_t *)wh->i_dur = htole16(dur); } /* ask MAC to insert timestamp into probe responses */ - if ((wh->i_fc[0] & - (IEEE80211_FC0_TYPE_MASK | IEEE80211_FC0_SUBTYPE_MASK)) == - (IEEE80211_FC0_TYPE_MGT | IEEE80211_FC0_SUBTYPE_PROBE_RESP)) + if (IEEE80211_IS_MGMT_PROBE_RESP(wh)) /* NOTE: beacons do not pass through tx_data() */ txwi->flags |= RT2860_TX_TS; @@ -1802,9 +1800,7 @@ rt2860_tx_raw(struct rt2860_softc *sc, struct mbuf *m, *(uint16_t *)wh->i_dur = htole16(dur); } /* ask MAC to insert timestamp into probe responses */ - if ((wh->i_fc[0] & - (IEEE80211_FC0_TYPE_MASK | IEEE80211_FC0_SUBTYPE_MASK)) == - (IEEE80211_FC0_TYPE_MGT | IEEE80211_FC0_SUBTYPE_PROBE_RESP)) + if (IEEE80211_IS_MGMT_PROBE_RESP(wh)) /* NOTE: beacons do not pass through tx_data() */ txwi->flags |= RT2860_TX_TS; diff --git a/sys/dev/usb/wlan/if_rum.c b/sys/dev/usb/wlan/if_rum.c index edf92e2222b4..fc83409543ec 100644 --- a/sys/dev/usb/wlan/if_rum.c +++ b/sys/dev/usb/wlan/if_rum.c @@ -1526,9 +1526,7 @@ rum_tx_mgt(struct rum_softc *sc, struct mbuf *m0, struct ieee80211_node *ni) USETW(wh->i_dur, dur); /* tell hardware to add timestamp for probe responses */ - if (type == IEEE80211_FC0_TYPE_MGT && - (wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK) == - IEEE80211_FC0_SUBTYPE_PROBE_RESP) + if (IEEE80211_IS_MGMT_PROBE_RESP(wh)) flags |= RT2573_TX_TIMESTAMP; } diff --git a/sys/dev/usb/wlan/if_run.c b/sys/dev/usb/wlan/if_run.c index e2ea78f78b13..e709ceff8849 100644 --- a/sys/dev/usb/wlan/if_run.c +++ b/sys/dev/usb/wlan/if_run.c @@ -3595,9 +3595,7 @@ run_tx_mgt(struct run_softc *sc, struct mbuf *m, struct ieee80211_node *ni) wh = mtod(m, struct ieee80211_frame *); /* tell hardware to add timestamp for probe responses */ - if ((wh->i_fc[0] & - (IEEE80211_FC0_TYPE_MASK | IEEE80211_FC0_SUBTYPE_MASK)) == - (IEEE80211_FC0_TYPE_MGT | IEEE80211_FC0_SUBTYPE_PROBE_RESP)) + if (IEEE80211_IS_MGMT_PROBE_RESP(wh)) wflags |= RT2860_TX_TS; else if (!IEEE80211_IS_MULTICAST(wh->i_addr1)) { xflags |= RT2860_TX_ACK; diff --git a/sys/dev/usb/wlan/if_upgt.c b/sys/dev/usb/wlan/if_upgt.c index 55d231e2c655..642631ae34b7 100644 --- a/sys/dev/usb/wlan/if_upgt.c +++ b/sys/dev/usb/wlan/if_upgt.c @@ -2139,8 +2139,7 @@ upgt_tx_start(struct upgt_softc *sc, struct mbuf *m, struct ieee80211_node *ni, mem->addr = htole32(data->addr); txdesc = (struct upgt_lmac_tx_desc *)(mem + 1); - if ((wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) == - IEEE80211_FC0_TYPE_MGT) { + if (IEEE80211_IS_MGMT(wh)) { /* mgmt frames */ txdesc->header1.flags = UPGT_H1_FLAGS_TX_MGMT; /* always send mgmt frames at lowest rate (DS1) */ diff --git a/sys/dev/usb/wlan/if_ural.c b/sys/dev/usb/wlan/if_ural.c index 1acae6d84b53..6e01592da44f 100644 --- a/sys/dev/usb/wlan/if_ural.c +++ b/sys/dev/usb/wlan/if_ural.c @@ -1097,10 +1097,7 @@ ural_tx_mgt(struct ural_softc *sc, struct mbuf *m0, struct ieee80211_node *ni) USETW(wh->i_dur, dur); /* tell hardware to add timestamp for probe responses */ - if ((wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) == - IEEE80211_FC0_TYPE_MGT && - (wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK) == - IEEE80211_FC0_SUBTYPE_PROBE_RESP) + if (IEEE80211_IS_MGMT_PROBE_RESP(wh)) flags |= RAL_TX_TIMESTAMP; } diff --git a/sys/dev/usb/wlan/if_urtw.c b/sys/dev/usb/wlan/if_urtw.c index d08a3237e9b2..1a7a1eba4758 100644 --- a/sys/dev/usb/wlan/if_urtw.c +++ b/sys/dev/usb/wlan/if_urtw.c @@ -1724,8 +1724,7 @@ urtw_tx_start(struct urtw_softc *sc, struct ieee80211_node *ni, struct mbuf *m0, ieee80211_radiotap_tx(vap, m0); } - if (type == IEEE80211_FC0_TYPE_MGT || - type == IEEE80211_FC0_TYPE_CTL || + if (IEEE80211_IS_MGMT(wh) || IEEE80211_IS_CTL(wh) || (m0->m_flags & M_EAPOL) != 0) { rate = tp->mgmtrate; } else { @@ -1803,9 +1802,7 @@ urtw_tx_start(struct urtw_softc *sc, struct ieee80211_node *ni, struct mbuf *m0, } tx->flag = htole32(flags); tx->txdur = txdur; - if (type == IEEE80211_FC0_TYPE_MGT && - (wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK) == - IEEE80211_FC0_SUBTYPE_PROBE_RESP) + if (IEEE80211_IS_MGMT_PROBE_RESP(wh)) tx->retry = 1; else tx->retry = URTW_TX_MAXRETRY; diff --git a/sys/dev/usb/wlan/if_zyd.c b/sys/dev/usb/wlan/if_zyd.c index a4dc6b972c96..76e7d4312040 100644 --- a/sys/dev/usb/wlan/if_zyd.c +++ b/sys/dev/usb/wlan/if_zyd.c @@ -2505,9 +2505,7 @@ zyd_tx_start(struct zyd_softc *sc, struct mbuf *m0, struct ieee80211_node *ni) } } else desc->flags |= ZYD_TX_FLAG_MULTICAST; - if ((wh->i_fc[0] & - (IEEE80211_FC0_TYPE_MASK | IEEE80211_FC0_SUBTYPE_MASK)) == - (IEEE80211_FC0_TYPE_CTL | IEEE80211_FC0_SUBTYPE_PS_POLL)) + if (IEEE80211_IS_CTL_PS_POLL(wh)) desc->flags |= ZYD_TX_FLAG_TYPE(ZYD_TX_TYPE_PS_POLL); /* actual transmit length (XXX why +10?) */ diff --git a/sys/net80211/ieee80211.h b/sys/net80211/ieee80211.h index a2d6b3040032..e9147e028385 100644 --- a/sys/net80211/ieee80211.h +++ b/sys/net80211/ieee80211.h @@ -219,6 +219,42 @@ struct ieee80211_qosframe_addr4 { (IEEE80211_IS_FC0_CHECK_VER_TYPE(wh, IEEE80211_FC0_VERSION_0, \ IEEE80211_FC0_TYPE_EXT)) +/* Management frame types */ + +#define IEEE80211_IS_MGMT_BEACON(wh) \ + (IEEE80211_IS_FC0_CHECK_VER_TYPE_SUBTYPE(wh, \ + IEEE80211_FC0_VERSION_0, \ + IEEE80211_FC0_TYPE_MGT, \ + IEEE80211_FC0_SUBTYPE_BEACON)) + +#define IEEE80211_IS_MGMT_PROBE_RESP(wh) \ + (IEEE80211_IS_FC0_CHECK_VER_TYPE_SUBTYPE(wh, \ + IEEE80211_FC0_VERSION_0, \ + IEEE80211_FC0_TYPE_MGT, \ + IEEE80211_FC0_SUBTYPE_PROBE_RESP)) + +#define IEEE80211_IS_MGMT_ACTION(wh) \ + (IEEE80211_IS_FC0_CHECK_VER_TYPE_SUBTYPE(wh, \ + IEEE80211_FC0_VERSION_0, \ + IEEE80211_FC0_TYPE_MGT, \ + IEEE80211_FC0_SUBTYPE_ACTION)) + +/* Control frame types */ + +#define IEEE80211_IS_CTL_PS_POLL(wh) \ + (IEEE80211_IS_FC0_CHECK_VER_TYPE_SUBTYPE(wh, \ + IEEE80211_FC0_VERSION_0, \ + IEEE80211_FC0_TYPE_CTL, \ + IEEE80211_FC0_SUBTYPE_PS_POLL)) + +#define IEEE80211_IS_CTL_BAR(wh) \ + (IEEE80211_IS_FC0_CHECK_VER_TYPE_SUBTYPE(wh, \ + IEEE80211_FC0_VERSION_0, \ + IEEE80211_FC0_TYPE_CTL, \ + IEEE80211_FC0_SUBTYPE_BAR)) + +/* Data frame types */ + #define IEEE80211_FC0_QOSDATA \ (IEEE80211_FC0_TYPE_DATA|IEEE80211_FC0_SUBTYPE_QOS_DATA|IEEE80211_FC0_VERSION_0) From nobody Sun Nov 17 18:00:21 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xrz7T2pv1z5dCTx; Sun, 17 Nov 2024 18:00: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xrz7T2BQ2z4kG5; Sun, 17 Nov 2024 18:00:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731866421; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yf7w70eZxANio/5zShj9jFC1xL+SXAiluW1xkRbfdA8=; b=DdgSEjOgulA3YtWRiWXOmQUSCoQg1zll7v9C1VZvE4kjNTu+0lrK2tM8YbhN79ntjFyDgw rWNAb1829PHZLHPNnvSL/LJOjpH+pQNEFgGhB1SPfMcYh6JeRacGIXaCCy3fl7efIGOJua 6Sn6ZTYxWW+FBsbZ0BAFlUNmEQuZxL6E4jP4qXPt9bm4NEqEtJuXjA0HEwFKebs7+D6ncm EFD0G3i5yGA3l+2xeRAZ/6ZpmzakRIc2ngcITmwEXmD+TfKIzQIt2i34RrqKKNo4OYv82C twNp+xfrnmN8UCq6t8icU+WpRcmnHTK9fIbNoJ6OoqeeELlyDMEXWozBaovIrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731866421; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yf7w70eZxANio/5zShj9jFC1xL+SXAiluW1xkRbfdA8=; b=U94ZKXDPD6KDLxCKqtZv4YsrHlsRKgNBfz7O0+FWML6qE/ryBUjdvKKuTXZwzNm0lEJy9/ ubNy6GnjpK91NYsxV+op8Ik6dPRQDHEHEAXNgnaxri0HUWm3wqXBmi3EY69sYHnqBlnFeW U1KLXUIAQ1exN/he/IUrbUUs8fb/m8HIXTUsW11bVyJUAtGU/JFvlXr1WsCOIM/8+iIjU2 L9qwwwZiRgVXEypVtdIHq902fcFJNUS2qQnQzMhfo6+hAi2eglZT9DF7C/WK5DeX3/RPEv Cvoy/Gai0D98F+wxaJPreFK99blcuia6snoSrFzCfafXSKWyWj224aaMdk5g2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731866421; a=rsa-sha256; cv=none; b=SJ2uQ0/OC6b6JMiQKu06186bofMftwJdKhoNF5nCJERsNzq4sIAcv0MWnCwTBNjq5bb6D3 goqCgoCEJM02KwZVC6eomDbnysd17f2rveWQgyKiEeSNPrF1zK/lKJu++DWvTrW0nUEmmp yqD4klowBBwPWlzp4VH9K+RDIVvkDbO3L5HgjTYB3wg8+fTomblKOSURP2G9rUQg1BWnmy dv9TP14Ja1HZYcj0WgPvm3Cx2+ScCrM2S/x0ejNWg22xgMO7ROUV3ugCOZhT4YVUV4kptX SyCOocl8ZE3J71qWFhFzqH/QqCBzcUtynnsoB5P9LxwB0+9q05tHD0P2GvNcvA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xrz7T1pDyz11sX; Sun, 17 Nov 2024 18:00:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AHI0L0M070731; Sun, 17 Nov 2024 18:00:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AHI0LcL070728; Sun, 17 Nov 2024 18:00:21 GMT (envelope-from git) Date: Sun, 17 Nov 2024 18:00:21 GMT Message-Id: <202411171800.4AHI0LcL070728@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: 3d0d43d25ac6 - main - net80211: remove IEEE80211_FC0_QOSDATA List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3d0d43d25ac6e4a6157447e3b7307e1b44275b08 Auto-Submitted: auto-generated The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=3d0d43d25ac6e4a6157447e3b7307e1b44275b08 commit 3d0d43d25ac6e4a6157447e3b7307e1b44275b08 Author: Adrian Chadd AuthorDate: 2024-11-10 04:12:57 +0000 Commit: Adrian Chadd CommitDate: 2024-11-17 17:53:16 +0000 net80211: remove IEEE80211_FC0_QOSDATA This is unused by anything in the tree; anything using it should be instead using one of the frame type macros. Differential Revision: https://reviews.freebsd.org/D47503 --- sys/net80211/ieee80211.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/sys/net80211/ieee80211.h b/sys/net80211/ieee80211.h index e9147e028385..eb83d0a40a33 100644 --- a/sys/net80211/ieee80211.h +++ b/sys/net80211/ieee80211.h @@ -255,9 +255,6 @@ struct ieee80211_qosframe_addr4 { /* Data frame types */ -#define IEEE80211_FC0_QOSDATA \ - (IEEE80211_FC0_TYPE_DATA|IEEE80211_FC0_SUBTYPE_QOS_DATA|IEEE80211_FC0_VERSION_0) - /* * Return true if the frame is any of the QOS frame types, not just * data frames. Matching on the IEEE80211_FC0_SUBTYPE_QOS_ANY bit From nobody Sun Nov 17 18:07:43 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XrzHz522Gz5dDCP; Sun, 17 Nov 2024 18:07: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XrzHz4Sqsz4l4C; Sun, 17 Nov 2024 18:07:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731866863; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JFfvXcIw6ONOr5AcpbRCyI+54WLKmt5hWFGIUysOVIw=; b=h+vJdARjXuNVlZC7xjPRzcnyjxSLeMbg/8isIM6XLocR9fdgB6hveWR2a4WzFbKJVztbMp Zx7GP1BQKLC7OAlMrW3EFFxwYK6wckyGLqhVben/S0xIa+NuG2kZ/cvmtabXTg/pathlKn YsigTgYFwpuOl6MsTLSSAfcrnB2EoBV7c0EmqSZX/h/n1G6Nggjc0C59ozBntxRAlqBoVJ mqh/cWNU6z7BzVIFlT6qcV23GQd43rE0S419PgcfmIW3NluXPgz47Vc8jauNkJYK4Yfyil frB5l6/NqQpV421LIuWqgF3E98wcTsOeNVIulAzxwYMHeoi1cKQmBMIZA64kvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731866863; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JFfvXcIw6ONOr5AcpbRCyI+54WLKmt5hWFGIUysOVIw=; b=LMBdiHAdEr4IYhCuSEx4akAeZIOhF+sTcptzqg5E4s0SocNV7Yni8RQE1hJh/q/oy2pAGL YWUo1KYcZt7jl2khLnJCCQf6zgCxYXEwj/x/nqUdV9fi9+KgI6V1BItAND2L/1L2cSLI1q OlD7BmN8Y52l7W0C1V13e0BGpXc8pfDJ4JKQFlOplThebCAzX4dFhoh9rTe31/9V13gTIr Ivy5WswSIN1pTb0tv+8HAoudlQYpmlVXblz1RNyxG13zEy04XMLiOWr/xon4yuzWH/jZRn yxl+NVxZcYKCO0/re0M1jADMbLzSydVOFMPZdZXNrwUsGZs66IkPwVKxifeAzA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731866863; a=rsa-sha256; cv=none; b=iLA8oXhTJ1KW37vbUSPqQrdr/rLPkJEkv28wZ2/aVx/lnZeIYfj53hGelPy99zmz4s0CzB 06nXg4q2zAM/EiswQdZjr8UNVjyQMVbTZYghlBcxA31U9yjBNNLmD9wJ/XhYOSm6y5i0Vp vjXN7M6LXy0VNR7YJBAEqqkFmu9Phs2sR8o33vFpy2CXwDeO/zjFufFix5Sa/7312v3pHA 0ZXtoAd1qpK3XFKaeX7logeJOxyyRLbO8/BoLhvQLWKabNZdpuzjMBdDTfgvDFlZvpYzbJ b8zW/TNy+OsD7GKY2powLWZd/oYT/jaVe8OWHqr9XltIyXbhezdCkXWShgnXFQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XrzHz42hXz12qB; Sun, 17 Nov 2024 18:07:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AHI7hYq079517; Sun, 17 Nov 2024 18:07:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AHI7hIW079514; Sun, 17 Nov 2024 18:07:43 GMT (envelope-from git) Date: Sun, 17 Nov 2024 18:07:43 GMT Message-Id: <202411171807.4AHI7hIW079514@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: 8b51df0d4fad - main - wpa: add support for GCMP-128 and BIP-128. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8b51df0d4fadd2cec40b88b43b7aa5aaf95c7510 Auto-Submitted: auto-generated The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=8b51df0d4fadd2cec40b88b43b7aa5aaf95c7510 commit 8b51df0d4fadd2cec40b88b43b7aa5aaf95c7510 Author: Adrian Chadd AuthorDate: 2024-08-31 16:43:22 +0000 Commit: Adrian Chadd CommitDate: 2024-11-17 18:04:58 +0000 wpa: add support for GCMP-128 and BIP-128. If net80211 announces support for GCMP and/or BIP then configure it appropriately. GCMP will be used by WPA3 in the future, and BIP is required for 802.11w/MFP (which is also required by WPA3.) Differential Revision: https://reviews.freebsd.org/D46499 --- contrib/wpa/src/drivers/driver_bsd.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/contrib/wpa/src/drivers/driver_bsd.c b/contrib/wpa/src/drivers/driver_bsd.c index 1d864e5ceb97..712446a62fe4 100644 --- a/contrib/wpa/src/drivers/driver_bsd.c +++ b/contrib/wpa/src/drivers/driver_bsd.c @@ -378,6 +378,12 @@ bsd_set_key(void *priv, struct wpa_driver_set_key_params *params) case WPA_ALG_CCMP: wk.ik_type = IEEE80211_CIPHER_AES_CCM; break; + case WPA_ALG_GCMP: + wk.ik_type = IEEE80211_CIPHER_AES_GCM_128; + break; + case WPA_ALG_BIP_CMAC_128: + wk.ik_type = IEEE80211_CIPHER_BIP_CMAC_128; + break; default: wpa_printf(MSG_ERROR, "%s: unknown alg=%d", __func__, alg); return -1; @@ -449,6 +455,12 @@ bsd_configure_wpa(void *priv, struct wpa_bss_params *params) case WPA_CIPHER_CCMP: v = IEEE80211_CIPHER_AES_CCM; break; + case WPA_CIPHER_GCMP: + v = IEEE80211_CIPHER_AES_GCM_128; + break; + case WPA_CIPHER_BIP_CMAC_128: + v = IEEE80211_CIPHER_BIP_CMAC_128; + break; case WPA_CIPHER_TKIP: v = IEEE80211_CIPHER_TKIP; break; @@ -485,6 +497,10 @@ bsd_configure_wpa(void *priv, struct wpa_bss_params *params) } v = 0; + if (params->wpa_pairwise & WPA_CIPHER_BIP_CMAC_128) + v |= 1<wpa_pairwise & WPA_CIPHER_GCMP) + v |= 1<wpa_pairwise & WPA_CIPHER_CCMP) v |= 1<wpa_pairwise & WPA_CIPHER_TKIP) @@ -1567,6 +1583,10 @@ static int wpa_driver_bsd_capa(struct bsd_driver_data *drv) drv->capa.enc |= WPA_DRIVER_CAPA_ENC_TKIP; if (devcaps.dc_cryptocaps & IEEE80211_CRYPTO_AES_CCM) drv->capa.enc |= WPA_DRIVER_CAPA_ENC_CCMP; + if (devcaps.dc_cryptocaps & IEEE80211_CRYPTO_AES_GCM_128) + drv->capa.enc |= WPA_DRIVER_CAPA_ENC_GCMP; + if (devcaps.dc_cryptocaps & IEEE80211_CRYPTO_BIP_CMAC_128) + drv->capa.enc |= WPA_DRIVER_CAPA_ENC_BIP; if (devcaps.dc_drivercaps & IEEE80211_C_HOSTAP) drv->capa.flags |= WPA_DRIVER_FLAGS_AP; From nobody Sun Nov 17 18:14:29 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XrzRn5sQFz5dDTm; Sun, 17 Nov 2024 18:14: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XrzRn31kFz4mtf; Sun, 17 Nov 2024 18:14:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731867269; h=from:from:reply-to:subject:subject: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/bb3SiAFaJaQ0yUupmZSu84zUC2LGLDJV/NJxiocW0=; b=eSMjjJinNdFYMSSrsTBgth+JK3NAF2dEPbxvUXeVzWFCtySds4arkJxbrlcMTRR4/vdkbt +8leeKuLcs9toXVF4KJDHsxLzDc0biAq1WH6MwjKo1aIXZAafysOcHNYRUBDiqctKKgp6n hXJV2Lgo4WIQiNJPqDWaJ0wy7nFbLd3wFlyXnSq/bMRSs3juATrgVKbBICmjEk+O25x73S oUvpPxWttMNqZmYC6LJsmT7anNRqE0Phf/GhCtQx2aNHcJBX+zxTWywfbSkpnatZJTINSB l6dmhcXlGFjvb56bC10tstmiV8SHlt4peh39ctfZNJTxeqzFvUM46uu79ADU0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731867269; h=from:from:reply-to:subject:subject: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/bb3SiAFaJaQ0yUupmZSu84zUC2LGLDJV/NJxiocW0=; b=e2113cBJJua1rKdQd9h+tx4da4LVsGw6TnPpF6SP9Q8a1vDVAHe9H+qi0pZS8UpiiT/AZY EvYPNd8QnxNLk9E35sB5ShkBumW2KjC614+1KVeXvJ9ehTnrpNZ8BysYc0a6zTqdb9N0k0 EBkXNG46K4tDxd7CnGVbcRsd4bLbafJ+EqGnX2VhiujefM1bbTndZ79QnnORI/5hNJwbVU eXMDCKAJdwBK1m11oG408M5URB1+FDrLyjCWAMeBbi4EG0iXlAHw8unP+2aNKINyvSglSd zPVIMAkH1XCQv5Ncn5vKOOzv0CBjzgg4ilh2EWuRNjOHwec24zUUjOJ6WPHFGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731867269; a=rsa-sha256; cv=none; b=ioPoSjD4MtEMBgdXoGPqfU5F99j1a+3vT9/QyQM7i8o7t7MAszW3RkvcolzSO9OM7ZuIFY /seh28j9PP8NLucXcsyWLLCOjJno7cl8Zgw+mDwyZiADccLkckV3OwpR0iw1UVYFEZ7w57 dmAF2L2PvrMKHMzdJTh/mirVPoTIK3XdFyjv83O1K4p/L47A3xZlnBkIw6XCLZW7B2VvXN lAtcbZc06DqXaxs7XV/OdW72mbw6nZuPIABtcL+U4kumcQ/10WrDkD5HiKMylTnYuB76vt CDzp5y+zL6ENPKOpVZlCiQL6NRV3ntFTbSkU9zusq05VhX6Sj3BfD3D6Ce6vMg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XrzRn2d0bz12dP; Sun, 17 Nov 2024 18:14:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AHIET02098330; Sun, 17 Nov 2024 18:14:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AHIETKo098327; Sun, 17 Nov 2024 18:14:29 GMT (envelope-from git) Date: Sun, 17 Nov 2024 18:14:29 GMT Message-Id: <202411171814.4AHIETKo098327@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 2a657b4ee900 - main - ktrace.1: Add ARGS and ENVS as default trace points List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2a657b4ee9008207bd099884c1d4697425a67cd1 Auto-Submitted: auto-generated The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=2a657b4ee9008207bd099884c1d4697425a67cd1 commit 2a657b4ee9008207bd099884c1d4697425a67cd1 Author: Jose Luis Duran AuthorDate: 2024-11-17 18:12:06 +0000 Commit: Jose Luis Duran CommitDate: 2024-11-17 18:12:06 +0000 ktrace.1: Add ARGS and ENVS as default trace points After commit 65a4daeaf324 ("ktrace: log execve(2) arguments and environment"), "a" and "e" are part of the default set of trace points. Reviewed by: markj Approved by: emaste (mentor) Fixes: 65a4daeaf324 ("ktrace: log execve(2) arguments and environment") Differential Revision: https://reviews.freebsd.org/D47648 --- usr.bin/ktrace/ktrace.1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/ktrace/ktrace.1 b/usr.bin/ktrace/ktrace.1 index 6d78cb1504b4..6542bb88dffd 100644 --- a/usr.bin/ktrace/ktrace.1 +++ b/usr.bin/ktrace/ktrace.1 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd November 1, 2024 +.Dd November 17, 2024 .Dt KTRACE 1 .Os .Sh NAME @@ -152,7 +152,7 @@ trace environment variables .It Cm + trace the default set of trace points - -.Cm c , i , n , s , t , u , y +.Cm a, c , e, i , n , s , t , u , y .El .It Ar command Execute From nobody Sun Nov 17 18:20:03 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XrzZC6qJSz5dDwy; Sun, 17 Nov 2024 18:20: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XrzZC6BYzz4nJG; Sun, 17 Nov 2024 18:20:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731867603; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JN6Q6S1meaXWm4x0zr1QSqnKysXGaOZ05SFjXA+g264=; b=iliH7o1JmnwSoiZjTnCqvjCMsT/fsFdlmDz1UBwOHJyn2r7YNFi95BVuaqaFNZyUlWQjw8 Mg1YOk8XPlJ58knnhKUaelSNov6I9KBwDeps3CFODWmfYlZqRB7MI/P1PC+sKkuQlpb0Mi wHxbn/xxXKkKeYdrcnHSaVbl03/+kUuOCjvTwy5COgvQUj0+V3cr8+Oi0icO4cA9q3SRdB 4Mx9oYSmjfxQa0lA7LQlAHFmrW5o4UEhsrfDv53h8tHDrm87nn5kxfUCRIHOwZxzfO1sXB Q7is7a+TngvWlAFgsRZm00bersT+CfljkAnYKiIy8zRQ9wzcsz/ONUufbPHGSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731867603; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JN6Q6S1meaXWm4x0zr1QSqnKysXGaOZ05SFjXA+g264=; b=yXSswn5WaMKpdkttrcBKa6VqDPmP/JXh4HyqL4OR7/EFBlPYBF8ZC0zC5KzEMy6NR5nwf8 kBGhVuMxSxQ99cT1PmrUrt19BLL/hULJIa6EOuq5zI87F1D7qsFcoEyZEuf5/9Y5sT14jw YLlmrZ0JZixmGYo0WDWhP8lveG8+dFzFnaOuwCj/8QPTfaC2Dx3v5kNteB7PaOuwvLn7/n +RhLqjts2ssWmVM1cNbHzFkUbEGsky0WVUNJvbcSPM5S1Ff9QDwiPr7QP6POSV31o++3JB xmAUVKs3GCGFK5rflupy2RgH7cgzN1eFUtyVBY6BdZdx72wZXiYFpzQ7dJYthQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731867603; a=rsa-sha256; cv=none; b=SPzq1SkYPQIChFgU+WHC+QmiXseXPg0ulQP/kE93paIYXLyFnzCMd1N+efxO/Uwqd3KzhM 7qgCoFmVJy1i+IQKyGfjTKuwgQ7HvVK6WDb+iJnxRZdliVm+hMbVsFaLdxWI49EMddAfMO RXNiM4sIb8/+rQ/qQTlC4HHxS3dDrHJRka4NAW3zQ3X2o3+7Y2nZW6cGdZCRrDYBh7hhSA s365F3Rw8baCffAfdEoQV7WiXdKlm/pzNKb1dyrK3O51bJHkiMyzfK54QAVpQk8Ji2h/xA 3Ws1G0lOXTc5QOxoy9KTeDZvkGwErruDJGSttYCA7EgJjCX2Ig+Jb+8QKuDEkw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XrzZC5YDLz12qt; Sun, 17 Nov 2024 18:20:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AHIK3qc002401; Sun, 17 Nov 2024 18:20:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AHIK3Xr002396; Sun, 17 Nov 2024 18:20:03 GMT (envelope-from git) Date: Sun, 17 Nov 2024 18:20:03 GMT Message-Id: <202411171820.4AHIK3Xr002396@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Cox Subject: git: 8c8d36b9d172 - main - vm: static-ize vm_page_alloc_after() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: alc X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8c8d36b9d17239dc4e54731b6cf54c9f9fce43a9 Auto-Submitted: auto-generated The branch main has been updated by alc: URL: https://cgit.FreeBSD.org/src/commit/?id=8c8d36b9d17239dc4e54731b6cf54c9f9fce43a9 commit 8c8d36b9d17239dc4e54731b6cf54c9f9fce43a9 Author: Alan Cox AuthorDate: 2024-11-16 22:20:14 +0000 Commit: Alan Cox CommitDate: 2024-11-17 18:19:00 +0000 vm: static-ize vm_page_alloc_after() This function is only intended for the internal use of the VM system. Reviewed by: dougm, kib, markj Differential Revision: https://reviews.freebsd.org/D47644 --- sys/vm/vm_page.c | 4 +++- sys/vm/vm_page.h | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 6b49f0745c73..0b9b55337b52 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -162,6 +162,8 @@ SYSCTL_PROC(_vm, OID_AUTO, page_blacklist, CTLTYPE_STRING | CTLFLAG_RD | static uma_zone_t fakepg_zone; +static vm_page_t vm_page_alloc_after(vm_object_t object, vm_pindex_t pindex, + int req, vm_page_t mpred); static void vm_page_alloc_check(vm_page_t m); static vm_page_t vm_page_alloc_nofree_domain(int domain, int req); static bool _vm_page_busy_sleep(vm_object_t obj, vm_page_t m, @@ -2085,7 +2087,7 @@ vm_page_alloc(vm_object_t object, vm_pindex_t pindex, int req) * the resident page in the object with largest index smaller than the given * page index, or NULL if no such page exists. */ -vm_page_t +static vm_page_t vm_page_alloc_after(vm_object_t object, vm_pindex_t pindex, int req, vm_page_t mpred) { diff --git a/sys/vm/vm_page.h b/sys/vm/vm_page.h index b85342b784de..893608bcacf1 100644 --- a/sys/vm/vm_page.h +++ b/sys/vm/vm_page.h @@ -608,7 +608,6 @@ void vm_page_activate (vm_page_t); void vm_page_advise(vm_page_t m, int advice); vm_page_t vm_page_mpred(vm_object_t, vm_pindex_t); vm_page_t vm_page_alloc(vm_object_t, vm_pindex_t, int); -vm_page_t vm_page_alloc_after(vm_object_t, vm_pindex_t, int, vm_page_t); vm_page_t vm_page_alloc_domain_after(vm_object_t, vm_pindex_t, int, int, vm_page_t); vm_page_t vm_page_alloc_contig(vm_object_t object, vm_pindex_t pindex, int req, From nobody Sun Nov 17 18:21:07 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XrzbS0fQ5z5dDx7; Sun, 17 Nov 2024 18:21:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XrzbS07Vtz4p0J; Sun, 17 Nov 2024 18:21:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731867668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kUJpZBIuxQ6JLT/m/U5R4j5GzKWhvAXLCAH8Wqor9F4=; b=GWdqE7c6l/gmj1FuUBG1tJ2/LZOoIjKsuq0I7iREip0nr3xsm/tPOGmLsPpGqSNIWc5grS QkdYOTCmKLgnbs+g5lo0S3ITE2S0n3xdjFxySUFGG/O2SPOChB0K/QoiGX3mydMsbtLnCN g5ifZzd8v9E10eZVJN4hq6LZCXeNnuIO2hUlD0N/cl9emUoHELTYzG4wyV0LBCrAJKNCl9 1SuoExlUGy4rcrcaG1vW7j5jvilLbSuFC//blhZ3/yKEm/AWEmiI/kOnppMBybpNo4286n yvnTo9Nxyaxs6fvPJCqqqcLfSpDt7CKzJX/yrXG+NhAyGCkVCKVu0AHz0eidxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731867668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kUJpZBIuxQ6JLT/m/U5R4j5GzKWhvAXLCAH8Wqor9F4=; b=bj1q6QeyO/eU8J+gR3U6OzO74ch1rLKfnF6h7uInxJKSJYFCc3xk8Dtu2SBUNIVxX0lqpK y8qffbOX6F2hwbzqf1VBJTSWzRVByyc0+I1nYpPCtmh1m+Zft0F2wObEXQrlQdzE6Bh4n7 Q/hRWQ3/1mZC//YxF36PEtZnHxcqidZiOPAn/ZnWBHWA2OCEakUoZRzzEwFUqm7lS3V394 8+GpJjya8gDvuoDpbK2zCtKj6uhjL16NONvm4qHzWB9JkJSzPL1RHCQyPDvf4SRvdLMTEc Fg9qbeZssqm6M/BdqdFAQM1oyCLrPwp47/ZRUjfafh6gYPAZeIJFw0kUOJoz5g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731867668; a=rsa-sha256; cv=none; b=CXKsmd9ogSJM9ZONcplNxfw3+kaaKDKjgeHFuKtJxWq2DUSWKxLyqcY3QSI2Kt/qaHb1GH jnDnN6FUM5KWjqzGAfj/4/MdM/DGbQBOcpY/1RKGq/Tx0Vbb1HfVKKN10EXaDAslVCPpmm ev+cZ13lPbiaudHpKfyxoQoMxp6MSiTIyW+hJrxv4w4yYhyoY1oZxwF+9arLvPFXnav/QU 3cp/2T7JvD1kdX0nxsOSEeM4rcKyjUsDPRlzWpR5vD+Wgq5OcLhfbv9+mxc5V8hI3CcIZu dKLVF1YTx9H7Sh1GQWiBpyf/dT56/vIcRsNIPrdvoeObvzb+tCfp/Gkr47wFWQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XrzbR6lCmz12bl; Sun, 17 Nov 2024 18:21:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AHIL7b2010030; Sun, 17 Nov 2024 18:21:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AHIL7TM010027; Sun, 17 Nov 2024 18:21:07 GMT (envelope-from git) Date: Sun, 17 Nov 2024 18:21:07 GMT Message-Id: <202411171821.4AHIL7TM010027@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 8caa2f5351de - main - tcp: define tcp_lro_log() only when TCP_BLACKBOX is defined List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8caa2f5351ded559c68ba0cd4713e00136801bd9 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=8caa2f5351ded559c68ba0cd4713e00136801bd9 commit 8caa2f5351ded559c68ba0cd4713e00136801bd9 Author: Michael Tuexen AuthorDate: 2024-11-17 18:16:27 +0000 Commit: Michael Tuexen CommitDate: 2024-11-17 18:21:01 +0000 tcp: define tcp_lro_log() only when TCP_BLACKBOX is defined Reviewed by: rrs, Peter Lei MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D47401 --- sys/netinet/tcp_lro_hpts.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/sys/netinet/tcp_lro_hpts.c b/sys/netinet/tcp_lro_hpts.c index d56967a12809..7e756285da45 100644 --- a/sys/netinet/tcp_lro_hpts.c +++ b/sys/netinet/tcp_lro_hpts.c @@ -62,7 +62,9 @@ #include #include #include +#ifdef TCP_BLACKBOX #include +#endif static void build_ack_entry(struct tcp_ackent *ae, struct tcphdr *th, struct mbuf *m, @@ -148,6 +150,7 @@ tcp_lro_check_wake_status(struct tcpcb *tp) return (false); } +#ifdef TCP_BLACKBOX static void tcp_lro_log(struct tcpcb *tp, const struct lro_ctrl *lc, const struct lro_entry *le, const struct mbuf *m, @@ -197,6 +200,7 @@ tcp_lro_log(struct tcpcb *tp, const struct lro_ctrl *lc, TCP_LOG_LRO, 0, 0, &log, false, &tv); } } +#endif static struct mbuf * tcp_lro_get_last_if_ackcmp(struct lro_ctrl *lc, struct lro_entry *le, @@ -209,7 +213,9 @@ tcp_lro_get_last_if_ackcmp(struct lro_ctrl *lc, struct lro_entry *le, m = STAILQ_LAST(&tp->t_inqueue, mbuf, m_stailqpkt); if (m != NULL && (m->m_flags & M_ACKCMP) != 0) { if (M_TRAILINGSPACE(m) >= sizeof(struct tcp_ackent)) { +#ifdef TCP_BLACKBOX tcp_lro_log(tp, lc, le, NULL, 23, 0, 0, 0, 0); +#endif *new_m = 0; counter_u64_add(tcp_extra_mbuf, 1); return (m); @@ -220,7 +226,9 @@ tcp_lro_get_last_if_ackcmp(struct lro_ctrl *lc, struct lro_entry *le, } } /* Decide mbuf size. */ +#ifdef TCP_BLACKBOX tcp_lro_log(tp, lc, le, NULL, 21, 0, 0, 0, 0); +#endif if (tp->t_flags2 & TF2_MBUF_L_ACKS) m = m_getcl(M_NOWAIT, MT_DATA, M_ACKCMP | M_PKTHDR); else @@ -612,13 +620,19 @@ _tcp_lro_flush_tcphpts(struct lro_ctrl *lc, struct lro_entry *le) * ack will be required. */ cmp = NULL; +#ifdef TCP_BLACKBOX tcp_lro_log(tp, lc, le, NULL, 25, 0, 0, 0, 0); +#endif } else if (mv_to != NULL) { /* We are asked to move pp up */ pp = &mv_to->m_nextpkt; +#ifdef TCP_BLACKBOX tcp_lro_log(tp, lc, le, NULL, 24, 0, 0, 0, 0); } else tcp_lro_log(tp, lc, le, NULL, 26, 0, 0, 0, 0); +#else + } +#endif } /* Update "m_last_mbuf", if any. */ if (pp == &le->m_head) @@ -629,7 +643,9 @@ _tcp_lro_flush_tcphpts(struct lro_ctrl *lc, struct lro_entry *le) /* Check if any data mbufs left. */ if (le->m_head != NULL) { counter_u64_add(tcp_inp_lro_direct_queue, 1); +#ifdef TCP_BLACKBOX tcp_lro_log(tp, lc, le, NULL, 22, 1, tp->t_flags2, 0, 1); +#endif tcp_queue_pkts(tp, le); } if (should_wake) { From nobody Sun Nov 17 23:55:58 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xs71q1dXzz5dZ5c; Sun, 17 Nov 2024 23:55: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xs71q18LHz4Ms4; Sun, 17 Nov 2024 23:55:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731887759; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sNXLwuUPuMXs+uDCSEwzvLA+kMFnAcGcao6qWQidoMo=; b=WmV+uF4gIoUHNSlET5mcs+uDQXhXafDBArtj6nfcv2jyiUZo5WQKYuFD8izeZ49Eax1TCX lXQT2hBLJrug6zbTwalda6RDAqS0XYuhekq2sKWCNHDgLtASfr785uvm0/iYqSIBAZwH6B 1x2nbH7FZg6CYAxFSIEgrTFjMuUIhXnlCD5a9sx8SWgD/PqL3wsuaa992KvixYiMb4TReW IRyftn0FNPkkVvWVe0BwFMYwrCEjOhXlpIgQIwP1XgLXlyOiWbkJsu4GVx6MEiLAQakmRu UJW3OKLKjSr8pxr/NRJMMBbYFO9LXFJl6FLa5LXW0v+xvojjchFsIJoeQhi6vQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731887759; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sNXLwuUPuMXs+uDCSEwzvLA+kMFnAcGcao6qWQidoMo=; b=ZiZtrDtN9uqZNiZSrFxOYo20/mHEVm0NL1gcPNuE+Bh5yvj8TUSu+qkUYcC78kYvDyejHd gld4+zalRwaXM0HAooCzJoCy5cucogIHR9b8z7rXBOhgEmzOkxh6SzwXPA1m4cTAf0KrYy GAld/G7ETj8tbDVZLD1E5aKVfhgXhvmvHHoX4BqnydlT0AwIFdr9aHtFNI+W22OOkWIb5y Aj+pM4SwRExLMZWFwzlCWA44pR8SWY2+JptZvIC1a4ijnh/kpQIb6yEjoBdyLEvLz2Lv1h J8/Qt/Xh8AyTMKGabiojZJbFHDSCkQKK3Xi/nOBmWYqsuP7kYYfJPFhRPrUzzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731887759; a=rsa-sha256; cv=none; b=k7C3830D80mPuEqOEY5Rl8xWf9SofldUeilk19CDtX/zcCGMa8STEoMWkJ/dE4QYW/Nt6w O6oh32HGEGStiJALXS8V5cR5+CTTXLOTztMuEAXyp+BztBWrTswfJJfPp/OT5SicQMgNWb LVbd6ZKG/ZWsyFQrv8isPlWggsm39XdQenoAfWMps/QJMkwwWPUFHxRuwNbk9ih6OrG7mf hJHxV0v+7+j7FCQgC90RU6b+TNU6pShqqJWSQHbNAEfD7C7rjkkqY6VWffDmB0P/kvW2Ga r/PapGjYyWdbxMG2xULaicvpnc0Ixtz89EH3L78ftO6rcVsuq9NhQK0Yg9uDyQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xs71q0dRTz1C2S; Sun, 17 Nov 2024 23:55:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AHNtwS0029075; Sun, 17 Nov 2024 23:55:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AHNtwvi029072; Sun, 17 Nov 2024 23:55:58 GMT (envelope-from git) Date: Sun, 17 Nov 2024 23:55:58 GMT Message-Id: <202411172355.4AHNtwvi029072@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 1bfc84289e52 - main - cdefs.h: Fix bad version List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1bfc84289e524871aac339101d686fd3b49c6782 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=1bfc84289e524871aac339101d686fd3b49c6782 commit 1bfc84289e524871aac339101d686fd3b49c6782 Author: Warner Losh AuthorDate: 2024-11-17 23:55:05 +0000 Commit: Warner Losh CommitDate: 2024-11-17 23:55:58 +0000 cdefs.h: Fix bad version It's -isoC-2024 not -isoC2023. Fix it Noticed by: gperciva@tarsnap.com Sponsored by: Netflix --- share/man/man9/cdefs.9 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man9/cdefs.9 b/share/man/man9/cdefs.9 index 38762c22f586..350e5d773004 100644 --- a/share/man/man9/cdefs.9 +++ b/share/man/man9/cdefs.9 @@ -385,7 +385,7 @@ Likewise, when C23 dialog is selected with or .St -p1003.1-2024 , definitions for -.St -isoC-2023 +.St -isoC-2024 are also included. .Ss Header Visibility Macros These macros are set by