From nobody Mon Nov 11 01:12:20 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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 12:15:22 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xn7mB4tvJz5dD9L; Mon, 11 Nov 2024 12:15: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 4Xn7mB4MqGz4mdZ; Mon, 11 Nov 2024 12:15:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731327322; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NBdqo4rU/AzLcb6nwgL9cE/iETBIGVNmSAGPvqXNzgk=; b=ZXTAtyRTdVFEe/jsJjCDEssldCJgmQmIx9Y/X41tD6uQkNMaAro0sB1LllftP0FKUIWpib qUnqsyAbo9dTnV2DGb679AN+F64rBVp6KcfyTww5eOeZdJa/rqIxCgqYHx6ycpuqTTMYeQ 7UXAF+7yOFdIYQ2aSCeZvBf5ClhFUg9uE+LhHiS7I8ojfo2PPlFlAQ3QwJKrsUHQG2OPiE QAdXY9ZSR69MJq2tSnMvolcsj06hNDL7Bkpag6QYy92bwvqyJnkDFpXJMCYt2GuvXVYOy0 uk7PSagesoDTCS+fFdRmSYbYRZnWQ9NU+8sic+haJ58anyfnIXD0gqx8r8kUIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731327322; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NBdqo4rU/AzLcb6nwgL9cE/iETBIGVNmSAGPvqXNzgk=; b=k/cTGUfncsk9Sx54mlgqX2ZsGxzpRFChrCREktJT/sUc5CzsNUdJI0ajlSZcQB+WMCzLrV hCPMB3PTG1poUyjc4N95He/B5M3uscVO9rDDTDmU8homfOJKo8RCy7y/ECECjXFkNgiDUo SN+z6xc3r/k3963XFfQSor/hKZqMw8mxQwUcgzdo2iGPnEbkltRsNjXWaadEs0uyZY3n93 p7uv0TNmTzvdYuU+VRcwUdTHI6vSusb+40AZp2MFv/CvDdb2uvdb7OPcRknw6dneD9NAQt Elky2Zv2kehok6i3bJjHbfkXIIrqbTk+RpjAGGlY2Ju2v/BwWPJMcYswLK+IKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731327322; a=rsa-sha256; cv=none; b=ncuGVj655xnFTp2c5UNsTpWo6/AtMoQdCcRFyw/B951nEytdiqowP8CoMCKMQ1AwekyAP5 WOgJKkOi1Y5QX0/U/BQ635vyGd71e1jSMQCWrgCezWE/1dvbPXTyzgfJsEk5Y5IbJkwgzi RoKMdedJq8zbYnFk14MEGsWKuvPy5o4/1iLe1lPUMseXjyuDm4YljSMnYYpLrr26UmzS7Y xdRtMSQwJq2SgnAR5ny7b6zZocYgFZKfBbJaW7Xk+xZEOkZ8wiT/YP4u8eXIQxhT4epl+R oWXhF5sn4poN6NAs06NQ+QcADJ1WgWs8DYLX119gxH6jMBT8nEqY5ap2xa/iUA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xn7mB3ymmzQG5; Mon, 11 Nov 2024 12:15: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 4ABCFMDb086523; Mon, 11 Nov 2024 12:15:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ABCFMeT086520; Mon, 11 Nov 2024 12:15:22 GMT (envelope-from git) Date: Mon, 11 Nov 2024 12:15:22 GMT Message-Id: <202411111215.4ABCFMeT086520@gitrepo.freebsd.org> 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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:10:30 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-Spamd-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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 19:59:54 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed On 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 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:52:50 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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:47:25 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 06:07:07 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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:59:06 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_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:56:43 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.10\)) Subject: Re: git: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.10\)) Subject: Re: git: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xnsc04vS3z5cmsG for ; Tue, 12 Nov 2024 16:40:48 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-il1-x129.google.com (mail-il1-x129.google.com [IPv6:2607:f8b0:4864:20::129]) (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 4Xnsc01Wtdz4g2x 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-x129.google.com with SMTP id e9e14a558f8ab-3a3b7442db5so23057245ab.2 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=s2ei1iN0lRupTDukGz7JMkmqWkOek9jGhYLMpHvRzJhiLiqsLe87N4MplTX2RpNcsj J9LBJHjobqP08UaVWXY8mmoti1SrB1ojR7Kzu5XHttiBIVRCSGWl2161xirD2ORvN1bt yUgGQwMpAebuVSRVBcewEQ/aV4Hsfv2Tas09jGcdmMotDHJSnyZEt3pZjQpSHq6TvM7m P1i+nfyAhH8614z/BEzVO9MLRY+9U1WI+guWCgYr7jW/T2cSjlRvW/nVLWPfnA2URNow HBpifdF8FdB5pi/dJeShEl7PUfOJxK3qYUZ9kbyfLp5ph3Fm4e4d1iecvnXVeYFDzuHP Wf2g== X-Forwarded-Encrypted: i=1; AJvYcCUstda2i7/lio3z+PlPXYusBpcHPBx9Yj0JAhiHYISl+9324XeUXaYxZ7QNguC+eJNsarn6yAmjHk6fBbEg4OuEjNkRzQ==@freebsd.org X-Gm-Message-State: AOJu0Yy6ql/Ddx/bGFqQta4j1I4wh5bsrI2RLQjFG1M10jp0RqzFjw8c Xg1OjlhRc2CX/un9VGHYtWwKsMhlhfH5jpe63bn9M+RuT2JbR+USlC3FZXaK2xQ= 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-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: 4Xnsc01Wtdz4g2x 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 Wed Nov 13 05:05:59 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 08:15:14 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 10:29:02 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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:49:49 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 17:11:29 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 19:29:31 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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 20:10:53 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpZDB30cZz5cWSN for ; Wed, 13 Nov 2024 20:11:06 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (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 4XpZDB1Fd0z4HBg 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-f42.google.com with SMTP id 5b1f17b1804b1-43193678216so69521705e9.0 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=o4Gv7uJu/yWF7kbqjxYdNViCI4ggdZkaeqdAc1ERlMf2IGvB+4kdz3E6MosB7x8o94 vB8ipULaon/3XdNTfihn0wG9KPE+Y/Zr7juQHcequHFoIeCsXnJquMSnndCDRnXlCjur MPpnFT9bfjIzo/BnXRPihw/az1KzQj8flTTss5z33FmHtcTWUKa4kUDiYSTI12uUCpiW vgRMM7u9Rcl+96Rnitrfno038K9iFdmsLXWBq7g3ngmHrjSVNaZSwF2Vi8lKiaPICiZ7 vL0HoSrM9q/vJeQsBbMxOnbjCQ6zXQAAVs23/5u0tOx/+J5vPZY3nKq5zB/rYJCUflzq y0SA== X-Forwarded-Encrypted: i=1; AJvYcCXn8yyg+RI2r/cF16NgCQ2TDgu+uVJ2f4neOxZ9p07QrLweH/28vedN3/A8fStYAVTxh2NrY25d84DlGmhe2Qxom/pOtQ==@freebsd.org X-Gm-Message-State: AOJu0Yzt1V/RUaGjNcv7X4Z+cvlU3qS+DwIO9Of02AASrv0tPGBC6xb5 3nzdX37QVlimDPdYpCdWjcg/9RflHMJUzMPil1SUnu8lgU8KU4+HJtLuy1tZnyg= 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.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: 4XpZDB1Fd0z4HBg 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-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpZDB33TFz5cWSQ for ; Wed, 13 Nov 2024 20:11:06 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (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 4XpZDB1s71z4H5x 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-f42.google.com with SMTP id 5b1f17b1804b1-4315e62afe0so69415085e9.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=gFZ1ofdye61tX2ig0zwaMS+C9Vun1ilPE02u7+H8rNhMrOsvYGfCl6k+Cnr4CNrIs9 m/VVAah7ximE9MIzBlRnJVxTb4S+vtJ4mxQdxZ2VljgPPKL3ciJggng3Fw/A/ys/gCuc GBoNf5r52DWwQdzYZYyzEg3lyXxfhaV32OGfyaLp+fuqJtGU0xLO8jURQvqcBMi62xxk yZY3d3jp2riysOxTnfNTCwIulzL5tzXl5ugL8WnTuKazAWA/tv2TxqPCawqbtlBWhngM dcQeiHI6gCnUiuC0JOb4hChzMfgkFj3+eM4I2VKwtkNGb/oq7PhEC7IPfJxvg6hyrvws mp5g== X-Forwarded-Encrypted: i=1; AJvYcCXRs8k3HCVAqZ2ckveDX73ICwXaCCZyOqoBIcovP0M2FjHvjlrywoRV8thAPocPvGd09AhzmgnbqJlDP9oIA0Rhzc1M1Q==@freebsd.org X-Gm-Message-State: AOJu0YwG0SFzII1QQ8j/IaJljuSA1JtGg/o5wi48aNfaUjZ/rLjoXuEy ftnPEW768GykaILWepyXZHELOJRgBhp5l8YMhcBiOYH+kYZ/TehnOfB85C9PY7k= 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.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: 4XpZDB1s71z4H5x 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed On 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 01:34:25 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 02:21:24 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 04:58:22 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 17:15:09 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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:59:59 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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:50 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqDqv25cfz5dD2D; Thu, 14 Nov 2024 22:10: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 4XqDqt5nVwz4Jsq; Thu, 14 Nov 2024 22:10:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731622250; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B6H9g62+wcOwUmSMlYT3CoAMpA2RrFN0yG5gH8a5O3g=; b=fYaXVWHyehVyL19Q/XDmcIRVbI3lEvqXx4qZVcqueO37Yb8hQQtoJ4pIFaBGrdxZP03aMJ u9qDjgO693bom2QCUueroeSRLcaUoWqNVlH9Wv3maShuQBHGQqNMiLwTx/PBEW7IxmUKUH WL3zk8aIe3rFNFQQ+oA55T4EdG8BVb0capAgYCUKNrucNsE8b5xPL2wbrF5jVXo0/ez0F6 ciIr/VP5oP/AUCPongmZm1a81PSCxmx86KzWyY9XqQ8KQSgOQg1740EsBMWNTnWyR1r16c MSfyrtBGvr5p6bzT/Lbn3L+xx/qUSR/zCmC3gNCYaMIGhIjCry00KcL2Isyknw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731622250; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B6H9g62+wcOwUmSMlYT3CoAMpA2RrFN0yG5gH8a5O3g=; b=r8nfNoHat2F3LarMsM83+WCRtaI4e5+T7Sg8KdQ2N1YleXneeGn2x29RR+EbAzaEeUmMGv 5SucbLvOXQmq79K4Zcw7c+GNRjfRP4UBpNW3nKu3zZ7OyMbwezAtq20YxTGOTO7kh5fJrC KCwx/q/0A95rQmNtqxYVzDrUa8iLQSrm1+6QH5qcflZbQ39j/aZCyNndec0LbQqH18YXml zynGwr1yDohP9foD9ILVpKMzJ08ms7sIewG08t0fTvWd/lUcjUxB9IrqGA8IkVQTVBIsGT p7RmeS8AibsWHZNEYk8loTi0wIchco/dVzxWyOe6BXEOz70k4ub1c5F/QmLmaQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731622250; a=rsa-sha256; cv=none; b=Kb9T2MgDb2IQhD+gtlXsJxkco/VoYJRc+D2Enuj1otWeQZsiqFmQIWpfpxg7RXrSF1DfSK akXt7I4nDNx6X4eSlA2oOvLe0FrJuDTo0UDRXdl7vjN2yb/Q2m2TH5TKv+nav+JyJpI8KC rJDKvcsbUL2B0wxGBRvrbOXYMn5ThcNNjIF2LGTbcC+boL3GPddxxiRHMSUTjzgb7eTlSa LEw7UjKj3II/p/tmvzLYHFfoSOz8S+4luZRPhPrHHaTAb1WXySlMmoIscxAt5OvsmJDBKZ M8qnos5XmGofzX7F5LV6ewrYx+vAI9GSFKVUkD5DPV0sUOGO9f1nZZmceAsJAQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqDqt5PbHzwgF; Thu, 14 Nov 2024 22:10: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 4AEMAo7i019368; Thu, 14 Nov 2024 22:10:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AEMAoLf019365; Thu, 14 Nov 2024 22:10:50 GMT (envelope-from git) Date: Thu, 14 Nov 2024 22:10:50 GMT Message-Id: <202411142210.4AEMAoLf019365@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: 8983acc8dee5 - main - lib/libc/string: apply SSP hardening and tests to memset_explicit List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8983acc8dee56533f5281ca912e09a51dfacc35b Auto-Submitted: auto-generated The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=8983acc8dee56533f5281ca912e09a51dfacc35b commit 8983acc8dee56533f5281ca912e09a51dfacc35b Author: Robert Clausecker AuthorDate: 2024-10-25 16:00:44 +0000 Commit: Robert Clausecker CommitDate: 2024-11-14 22:10:00 +0000 lib/libc/string: apply SSP hardening and tests to memset_explicit Reviewed by: emaste, kevans Differential Revision: https://reviews.freebsd.org/D47286 --- include/ssp/string.h | 2 + lib/libc/string/memset_explicit.c | 3 +- lib/libc/tests/secure/fortify_string_test.c | 132 +++++++++++++++++++++++ lib/libc/tests/secure/generate-fortify-tests.lua | 9 ++ 4 files changed, 145 insertions(+), 1 deletion(-) diff --git a/include/ssp/string.h b/include/ssp/string.h index 9f24254d9c01..2999aed13cb1 100644 --- a/include/ssp/string.h +++ b/include/ssp/string.h @@ -109,6 +109,8 @@ __ssp_bos_icheck3_restrict(memcpy, void *, const void *) __ssp_bos_icheck3_restrict(mempcpy, void *, const void *) __ssp_bos_icheck3(memmove, void *, const void *) __ssp_bos_icheck3(memset, void *, int) +__ssp_redirect(void *, memset_explicit, (void *__buf, int __ch, size_t __len), + (__buf, __ch, __len)); __ssp_bos_icheck2_restrict(stpcpy, char *, const char *) __ssp_bos_icheck3_restrict(stpncpy, char *, const char *) __ssp_bos_icheck2_restrict(strcpy, char *, const char *) diff --git a/lib/libc/string/memset_explicit.c b/lib/libc/string/memset_explicit.c index ee6be0363981..b2b9a79c40c8 100644 --- a/lib/libc/string/memset_explicit.c +++ b/lib/libc/string/memset_explicit.c @@ -5,6 +5,7 @@ */ #include +#include __attribute__((weak)) void __memset_explicit_hook(void *, int, size_t); @@ -17,7 +18,7 @@ __memset_explicit_hook(void *buf, int ch, size_t len) } void * -memset_explicit(void *buf, int ch, size_t len) +__ssp_real(memset_explicit)(void *buf, int ch, size_t len) { memset(buf, ch, len); __memset_explicit_hook(buf, ch, len); diff --git a/lib/libc/tests/secure/fortify_string_test.c b/lib/libc/tests/secure/fortify_string_test.c index cc87ae56488d..ae68c4b89a38 100644 --- a/lib/libc/tests/secure/fortify_string_test.c +++ b/lib/libc/tests/secure/fortify_string_test.c @@ -685,6 +685,133 @@ monitor: } +ATF_TC_WITHOUT_HEAD(memset_explicit_before_end); +ATF_TC_BODY(memset_explicit_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + + memset_explicit(__stack.__buf, 0, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(memset_explicit_end); +ATF_TC_BODY(memset_explicit_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + + memset_explicit(__stack.__buf, 0, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(memset_explicit_heap_before_end); +ATF_TC_BODY(memset_explicit_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + + __stack.__buf = malloc(__bufsz); + + memset_explicit(__stack.__buf, 0, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(memset_explicit_heap_end); +ATF_TC_BODY(memset_explicit_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + + __stack.__buf = malloc(__bufsz); + + memset_explicit(__stack.__buf, 0, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(memset_explicit_heap_after_end); +ATF_TC_BODY(memset_explicit_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + + memset_explicit(__stack.__buf, 0, __len); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + ATF_TC_WITHOUT_HEAD(stpcpy_before_end); ATF_TC_BODY(stpcpy_before_end, tc) { @@ -1899,6 +2026,11 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, memset_heap_before_end); ATF_TP_ADD_TC(tp, memset_heap_end); ATF_TP_ADD_TC(tp, memset_heap_after_end); + ATF_TP_ADD_TC(tp, memset_explicit_before_end); + ATF_TP_ADD_TC(tp, memset_explicit_end); + ATF_TP_ADD_TC(tp, memset_explicit_heap_before_end); + ATF_TP_ADD_TC(tp, memset_explicit_heap_end); + ATF_TP_ADD_TC(tp, memset_explicit_heap_after_end); ATF_TP_ADD_TC(tp, stpcpy_before_end); ATF_TP_ADD_TC(tp, stpcpy_end); ATF_TP_ADD_TC(tp, stpcpy_heap_before_end); diff --git a/lib/libc/tests/secure/generate-fortify-tests.lua b/lib/libc/tests/secure/generate-fortify-tests.lua index eec5f7253f73..0e46b8867862 100755 --- a/lib/libc/tests/secure/generate-fortify-tests.lua +++ b/lib/libc/tests/secure/generate-fortify-tests.lua @@ -630,6 +630,15 @@ local all_tests = { }, exclude = excludes_stack_overflow, }, + { + func = "memset_explicit", + arguments = { + "__buf", + "0", + "__len", + }, + exclude = excludes_stack_overflow, + }, { func = "stpcpy", arguments = { From nobody Thu Nov 14 22:10:49 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 23:56:40 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 15:49:09 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gallatin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 22:26:38 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <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 Sat Nov 16 04:05:53 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 14:57:15 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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:23:11 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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:40:40 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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