From nobody Mon Jan 16 04:45:15 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NwKFw2BTJz2sf4L; Mon, 16 Jan 2023 04:45:24 +0000 (UTC) (envelope-from zlei@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NwKFw1hJpz3HS3; Mon, 16 Jan 2023 04:45:24 +0000 (UTC) (envelope-from zlei@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673844324; h=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=krDhNhK29BXoLWQ5RN2WSMDmmV/SE+RCHP+156DLAb0=; b=mO0AxPJdTd7tAUUHl4tk8wTBYiVkjWv/VMhAFxBl1L4W8uc3ETWDf7Nnc7v74KlNWz2xuI 8GoApsL0OJAgr6S6NUu/2yTgTtmH1bble7zc94Qh+dE5ynACL7MHwhHxjf0AJcPMS63Ion WHE+O3TUYBxZHjI/VsRy88aYe92IKuhuSkZ5eCK6Y8oNlY0rF6MrjXjOObFVJhMsehkxDt rlkXwGQNBUaFDES01iKxxgUQE1IyGbeEyEGs0Tyru3jHnfQRkNtx4Y2HysyKR1lq4XYD56 ooBHKD1Zx27wWiflNMGaW4RbPTYDEqMNKDNUh788KEkz//ms1xrzg581WUn2RA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673844324; h=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=krDhNhK29BXoLWQ5RN2WSMDmmV/SE+RCHP+156DLAb0=; b=Lfq858pkZ2iEn08DtOYC/SaBEqwgc4ZcrsLtpCuF6pbIBjuyz7k3RfUr8i2ozvMKz+GDp/ jpc0M5t7rcBmcBGZQDhngASvPeJd9v6/rMD7tx8mCgxFY2sXf23ysR8gvY5DtcgmfuJgw/ W370I33prDkYnj1o7Xxq4lWtDGkPAOLLuQQI61o2+b2tx7jCXFgkbJLyzCtyMS4sPlXH7G 62c06PSfLagUXqHGR915KrA+QUMP4coE3DYGNZbBhySBxWY4Eo0p0nQkKba5GsmkGsmPmB qn2dWkm2CimMVVdMt7RA2My8DX/y7bxBzcauypOKiudIiPQ9E/Au7o514oNGjg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1673844324; a=rsa-sha256; cv=none; b=WbfXdMVCmcIFakTNxTgiZqtkhDHO5XS8cQYI8qlVIBwnP0f8fqsbNqTU0ZUjibpVVD8kRL J9X53Yb0ExbfW82dZBB1tYdAgg2T/wUIJcU9jTJ+H8YJo4xdmjPqc6GErFLtUiT2qqypJ5 eIsF+UdIRdnxgHByDA6R5BJbem0SRnKo2ymBiAnpTEHnMKAvTk2RlQQ2yM7h3P8NpKGj2x mAXlpYZugdwctmzxmogzndUpQknIpwh6lZsADKhBUESpLmMFI1X3lRZn3k9h6IT7J19+16 1bfM4rIJJUgES1uun+jU7wndblc6wavzzZcWqrYZDmnDYPeLBogoGBOdLCg/Hg== 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 4NwKFt63zlzFMK; Mon, 16 Jan 2023 04:45:22 +0000 (UTC) (envelope-from zlei@FreeBSD.org) Content-Type: text/plain; charset=us-ascii List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: git: 8bce8d28abe6 - main - jail: Avoid multipurpose return value of function prison_ip_restrict() From: Zhenlei Huang In-Reply-To: Date: Mon, 16 Jan 2023 12:45:15 +0800 Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <58ED512C-BE38-4EB6-A902-2AF3E25D5615@FreeBSD.org> References: <202301131046.30DAkA0F024400@gitrepo.freebsd.org> To: Gleb Smirnoff X-Mailer: Apple Mail (2.3696.120.41.1.1) X-ThisMailContainsUnwantedMimeParts: N Hi Gleb, Sorry for delayed response, I'll check that within days. Best regards, Zhenlei > On Jan 14, 2023, at 3:39 AM, Gleb Smirnoff = wrote: >=20 > Zhenlei, >=20 > a couple concise assignments missed: >=20 > Z> @@ -1876,15 +1871,15 @@ kern_jail_set(struct thread *td, struct uio = *optuio, int flags) > Z> continue; > Z> } > Z> #endif > Z> - if (prison_ip_restrict(tpr, PR_INET, NULL)) { > Z> - redo_ip4 =3D 1; > Z> + if (!prison_ip_restrict(tpr, PR_INET, NULL)) { > Z> + redo_ip4 =3D true; > Z> descend =3D 0; > Z> } > Z> } > Z> } >=20 > redo_ip4 =3D !prison_ip_restrict(tpr, PR_INET, NULL); >=20 > Z> @@ -1896,8 +1891,8 @@ kern_jail_set(struct thread *td, struct uio = *optuio, int flags) > Z> continue; > Z> } > Z> #endif > Z> - if (prison_ip_restrict(tpr, PR_INET6, NULL)) { > Z> - redo_ip6 =3D 1; > Z> + if (!prison_ip_restrict(tpr, PR_INET6, NULL)) { > Z> + redo_ip6 =3D true; > Z> descend =3D 0; > Z> } > Z> } >=20 > redo_ip6 =3D !prison_ip_restrict(tpr, PR_INET6, NULL); >=20 > --=20 > Gleb Smirnoff From nobody Mon Jan 16 10:37:36 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NwT4J2hHwz2p1n5; Mon, 16 Jan 2023 10:37: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NwT4J1zRxz3trV; Mon, 16 Jan 2023 10:37:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673865456; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GkkBTmg9v4uXfN5V+pDhxM24lkgjMPoqa38eivqz9ac=; b=Y9+COVWfs5i/AUPVWLxMvTwRi6QafxcrFJ455RkcDM1naRiCmsl9v67BG2QKTdBt8sjFOl pSsTDam6ykuq4IVlSkWfNkWmwx+b/4gip0x5JmBmy9e8Bb/STgby5D53xf2LRegbSOumBG Qb8h4ciTIYZLEdcuzXsMA0R6e4xMz4AiiKTklROHWmzm1e7usNLW5u02dCdHbO4TsxH4Z0 RqmkjKkJIYkffEDQNzup4+uSaByd7R+l51S+JkAv05cbWtx+EYlA2nR9hDg8FzGEAdx3r+ 1i7rkRyhiXocIFaPp5B8fjqe5K2NFPVHo7uku5nWaC0XOaUWD15+Xu0QkAGENQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673865456; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GkkBTmg9v4uXfN5V+pDhxM24lkgjMPoqa38eivqz9ac=; b=nJVS0hO8BdTHxLTfXaVeWa4AAwhZiWSRyNs2/F8uK1rssjB3HPbsFQDnGbigh5cZM4EnXO YAWLYFf+Yd71B+naAAczlMo2iBF3N7rg+adc4wfNQst6dlvUbCDHPjAog4d7ds6danU1vY fuBkquATEBfnRMFNkKm+4n8WwB5DbbitMe5dGuvKbO2vWtJ1BUMMVbI9pF9MX3KC4pnzMI tAJ+fl0nl/wreR2+xznu+Tc1n55oviGd1M06mcXhG+QETmLjc1fEaTGaYNVe7CAHdzHRuY 5KyDa7nsiLj3sg8RCMKldSaWsmQvaKfQb6VY9Ygs+RNUerWcAwvKQENC7XbNWw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1673865456; a=rsa-sha256; cv=none; b=hwyshvm6Fb0dJ2VQgfdun8/KYjnCypY/pQVndGeh0Ri8+0RclgZKEIhMkYOaMNmid6izsw ij59qW9ppBsgEkISZruJgxuAPge/kXF/P6XzJD0d6AEM49IFzPdGIlA6+dfTDAVZHXpanH 62OnIAhRRN3NL75WyzZSYY3gl975rF97Dbm0HJFJgr1qq33aSofMrYRxMURnpVuGeQZE9b /PMk6cpwc83Z35KihcnlUlSkLWD/JJa/+SxHE8C9K2i1q9JYVskkwqSKDI1V194mUFgGJ9 GzaW+Jq2T86f4GGdEAFUmJUrf/XWeAykEvuO9+ulZtUPwCDj8/dexZSt6hLt0w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NwT4J10xwz140y; Mon, 16 Jan 2023 10:37:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30GAbaSG006054; Mon, 16 Jan 2023 10:37:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30GAba9C006053; Mon, 16 Jan 2023 10:37:36 GMT (envelope-from git) Date: Mon, 16 Jan 2023 10:37:36 GMT Message-Id: <202301161037.30GAba9C006053@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: ddcdb534b766 - main - pf tests: properly destroy renamed interfaces List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: ddcdb534b7669f186184baf164e7647d544f7bd6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=ddcdb534b7669f186184baf164e7647d544f7bd6 commit ddcdb534b7669f186184baf164e7647d544f7bd6 Author: Kajetan Staszkiewicz AuthorDate: 2023-01-16 06:19:41 +0000 Commit: Kristof Provost CommitDate: 2023-01-16 06:23:07 +0000 pf tests: properly destroy renamed interfaces The pfsync:pbr tests leaves lot of interfaces when they finish, making other tests slower due to long time of loading scapy from pft_ping.py when more interfaces are present. When both sides of epair are assigned to jails, they are both removed from created_interfaces.lst and thus won't be removed during cleanup from this file. An interface assigned to jail is stored in created_jails.lst but if it is renamed, it won't be cleaned up either. Furthermore this test uses identical names for multiple interfaces across multiple jails which after destroying those jails adds to overall confusion. To address this issue a new function is provided for renaming interfaces in jails and storing their new names in created_jails.lst for deletion during cleanup. MFC after: 1 week Sponsored by: InnoGames GmbH Differential Revision: https://reviews.freebsd.org/D38024 --- tests/sys/common/vnet.subr | 10 ++++++ tests/sys/netpfil/pf/pfsync.sh | 77 ++++++++++++------------------------------ 2 files changed, 31 insertions(+), 56 deletions(-) diff --git a/tests/sys/common/vnet.subr b/tests/sys/common/vnet.subr index cdd3d3f69709..50abadaec81d 100644 --- a/tests/sys/common/vnet.subr +++ b/tests/sys/common/vnet.subr @@ -73,6 +73,16 @@ vnet_ifmove() sed -i "" "/^${jailname}/s/\$/ ${ifname}/" created_jails.lst } +vnet_ifrename_jail() +{ + jailname=$1 + ifname=$2 + ifnewname=$3 + + jexec ${jailname} ifconfig $ifname name $ifnewname + sed -i "" "/^${jailname}/s/${ifname}/${ifnewname}/" created_jails.lst +} + vnet_cleanup() { if [ -f created_jails.lst ]; then diff --git a/tests/sys/netpfil/pf/pfsync.sh b/tests/sys/netpfil/pf/pfsync.sh index 83e77534a024..75b37516762f 100644 --- a/tests/sys/netpfil/pf/pfsync.sh +++ b/tests/sys/netpfil/pf/pfsync.sh @@ -417,12 +417,11 @@ pbr_common_body() alias 198.18.1.10/32 vhid 11 pass 3WjvVVw7 advskew 50 jexec gw_route_to_master sysctl net.inet.ip.forwarding=1 jexec gw_route_to_master sysctl net.inet.carp.preempt=1 - jexec gw_route_to_master ifconfig ${epair_sync_gw_route_to}a name if_pfsync - sed -i '' -e 's/'${epair_sync_gw_route_to}'a/if_pfsync/g' created_interfaces.lst - jexec gw_route_to_master ifconfig ${epair_gw_route_to_master_bridge0}a name if_br0 - sed -i '' -e 's/'${epair_gw_route_to_master_bridge0}'a/if_br0/g' created_interfaces.lst - jexec gw_route_to_master ifconfig ${epair_gw_route_to_master_bridge1}a name if_br1 - sed -i '' -e 's/'${epair_gw_route_to_master_bridge1}'a/if_br1/g' created_interfaces.lst + + vnet_ifrename_jail gw_route_to_master ${epair_sync_gw_route_to}a if_pfsync + vnet_ifrename_jail gw_route_to_master ${epair_gw_route_to_master_bridge0}a if_br0 + vnet_ifrename_jail gw_route_to_master ${epair_gw_route_to_master_bridge1}a if_br1 + jexec gw_route_to_master ifconfig pfsync0 \ syncpeer 198.19.10.2 \ syncdev if_pfsync \ @@ -451,12 +450,11 @@ pbr_common_body() alias 198.18.1.10/32 vhid 11 pass 3WjvVVw7 advskew 100 jexec gw_route_to_backup sysctl net.inet.ip.forwarding=1 jexec gw_route_to_backup sysctl net.inet.carp.preempt=1 - jexec gw_route_to_backup ifconfig ${epair_sync_gw_route_to}b name if_pfsync - sed -i '' -e 's/'${epair_sync_gw_route_to}'b/if_pfsync/g' created_interfaces.lst - jexec gw_route_to_backup ifconfig ${epair_gw_route_to_backup_bridge0}a name if_br0 - sed -i '' -e 's/'${epair_gw_route_to_backup_bridge0}'a/if_br0/g' created_interfaces.lst - jexec gw_route_to_backup ifconfig ${epair_gw_route_to_backup_bridge1}a name if_br1 - sed -i '' -e 's/'${epair_gw_route_to_backup_bridge1}'a/if_br1/g' created_interfaces.lst + + vnet_ifrename_jail gw_route_to_backup ${epair_sync_gw_route_to}b if_pfsync + vnet_ifrename_jail gw_route_to_backup ${epair_gw_route_to_backup_bridge0}a if_br0 + vnet_ifrename_jail gw_route_to_backup ${epair_gw_route_to_backup_bridge1}a if_br1 + jexec gw_route_to_backup ifconfig pfsync0 \ syncpeer 198.19.10.1 \ syncdev if_pfsync \ @@ -484,12 +482,11 @@ pbr_common_body() alias 198.18.2.20/32 vhid 22 pass 3WjvVVw7 advskew 50 jexec gw_reply_to_master sysctl net.inet.ip.forwarding=1 jexec gw_reply_to_master sysctl net.inet.carp.preempt=1 - jexec gw_reply_to_master ifconfig ${epair_sync_gw_reply_to}a name if_pfsync - sed -i '' -e 's/'${epair_sync_gw_reply_to}'a/if_pfsync/g' created_interfaces.lst - jexec gw_reply_to_master ifconfig ${epair_gw_reply_to_master_bridge1}a name if_br1 - sed -i '' -e 's/'${epair_gw_reply_to_master_bridge1}'a/if_br1/g' created_interfaces.lst - jexec gw_reply_to_master ifconfig ${epair_gw_reply_to_master_bridge2}a name if_br2 - sed -i '' -e 's/'${epair_gw_reply_to_master_bridge2}'a/if_br2/g' created_interfaces.lst + + vnet_ifrename_jail gw_reply_to_master ${epair_sync_gw_reply_to}a if_pfsync + vnet_ifrename_jail gw_reply_to_master ${epair_gw_reply_to_master_bridge1}a if_br1 + vnet_ifrename_jail gw_reply_to_master ${epair_gw_reply_to_master_bridge2}a if_br2 + jexec gw_reply_to_master ifconfig pfsync0 \ syncpeer 198.19.20.2 \ syncdev if_pfsync \ @@ -517,12 +514,11 @@ pbr_common_body() alias 198.18.2.20/32 vhid 22 pass 3WjvVVw7 advskew 100 jexec gw_reply_to_backup sysctl net.inet.ip.forwarding=1 jexec gw_reply_to_backup sysctl net.inet.carp.preempt=1 - jexec gw_reply_to_backup ifconfig ${epair_sync_gw_reply_to}b name if_pfsync - sed -i '' -e 's/'${epair_sync_gw_reply_to}'b/if_pfsync/g' created_interfaces.lst - jexec gw_reply_to_backup ifconfig ${epair_gw_reply_to_backup_bridge1}a name if_br1 - sed -i '' -e 's/'${epair_gw_reply_to_backup_bridge1}'a/if_br1/g' created_interfaces.lst - jexec gw_reply_to_backup ifconfig ${epair_gw_reply_to_backup_bridge2}a name if_br2 - sed -i '' -e 's/'${epair_gw_reply_to_backup_bridge2}'a/if_br2/g' created_interfaces.lst + + vnet_ifrename_jail gw_reply_to_backup ${epair_sync_gw_reply_to}b if_pfsync + vnet_ifrename_jail gw_reply_to_backup ${epair_gw_reply_to_backup_bridge1}a if_br1 + vnet_ifrename_jail gw_reply_to_backup ${epair_gw_reply_to_backup_bridge2}a if_br2 + jexec gw_reply_to_backup ifconfig pfsync0 \ syncpeer 198.19.20.1 \ syncdev if_pfsync \ @@ -584,43 +580,12 @@ pbr_common_body() sleep 1 done - # As cleanup is long and may lead to a timeout, - # it's run directly into the body part. - # (as cleanup timeout is not settable) - jail -r \ - client \ - gw_route_to_master \ - gw_route_to_backup \ - gw_reply_to_master \ - gw_reply_to_backup \ - server - for ifname in $(grep -E -e 'if_' -e 'epair.*a' -e 'bridge' created_interfaces.lst) - do - ifconfig $ifname >/dev/null 2>&1 && ifconfig $ifname destroy - done - atf_check -s exit:0 -e ignore -o ignore grep ', 0.0% packet loss' ping.stdout } pbr_common_cleanup() { - for jailname in client gw_route_to_master gw_route_to_backup gw_reply_to_master gw_reply_to_backup server - do - if $(jls | grep -q $jailname); then - jail -r $jailname - else - echo "$jailname already cleaned" - fi - done - for ifname in $(grep -E -e 'if_' -e 'epair.*a' -e 'bridge' created_interfaces.lst) - do - ifconfig $ifname >/dev/null 2>&1 - if [ "$?" -eq "0" ]; then - ifconfig $ifname destroy - else - echo "$ifname already destroyed" - fi - done + pft_cleanup } atf_init_test_cases() From nobody Mon Jan 16 10:52:02 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NwTNy5zhqz2p3hG; Mon, 16 Jan 2023 10:52: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NwTNy5KdQz3wQw; Mon, 16 Jan 2023 10:52:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673866322; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AmyIM5I1Vac9o+pMFKl2aUbErINnCvn++06QOBUA9lE=; b=P75yPCGPLz4xml6uWGzyMOD/HUvGJ7+hae6WDvKEBrWdnao1JMT98crKQN2WzNTzo1gBYt x9PiibWeUmYL1HPe4GrjA9OFvNNAajIsuo1aDDPcPsPno3TSDvN0ZScvHvj7jJlLGnO3mm XbAlN/Kei2AqbSZPEOR7QbInv30tNhjM63ZJl7DjA+lmkq55a5fMaKVHstjBdTDZOgEQi4 vCqonSkrAnh2SGLodHst7upJ0gGlQwC0LuinuZy06UvGOAqJE9Wn9lFBJj+e90GxNKmUXc Ey1vKLKskZCIhr2J8CbHkzd0aKTNm94XNYDM84SvFINf27tDHe6J6R4Ab5maeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673866322; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AmyIM5I1Vac9o+pMFKl2aUbErINnCvn++06QOBUA9lE=; b=gpIE0MSTWDnOwDKIMCdf6yf4xxSvh+XOsvW/nhFwIMurIR7tTzTMrOkPPCuooTAuh7DexN 2jJwGpmZ2p0UDbsu0YYQ0VU2HfUVy38GpU265LHbAuR+a1mscJe3O+7zYZib62N1nFpkJD oFQHgufjrqOh4iHAJ3lJiv5OFq5O0jZ+mbKKkGAmerO65zeHq383GkB57ZZT89/dr+4i7w xeApohrQqD4KkRK6LzGQwZp+2BbzWaRocAXs9Rz6vUGvlIZz+XPWHgXTt+ror0HxWybmxE wESqh/eEHFQSuBFckKgPena/XbFzTNciebuzQmRxHwH5SkNKtCgefpCYwN+Ohw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1673866322; a=rsa-sha256; cv=none; b=jJTc1rZT8N5C8XdN3efB8N4Y1gAMwsL3zTNgWGixFQPBs3amTJHBjNHKMbGoMWaP+2gXZJ DoH3brgfuWbdB6LQPAC4j2s7mKgz+G/M0/Bz86yv1nzcox5YdhT5aPqykFN2xY7yYWMfSx SySgmSDcsYLLp5WUwwBfyu/iCSMDepu+4kMGRLxDL8qtjvDU21ifAAQN0O9D6L7IXf2t5d gmP0I1WaS1mzNBMVUg2JrHly73H5r9NV+HpH/054y1S2CNEbNr84CXG4Tj0UUlMJ84ycRv j/b2j0UqAsSiRGDXhPC/hDPfpMkj7o8wq75XVQCYtLi1PAIWhHSZFTmvr1MVow== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NwTNy466Xz14Jy; Mon, 16 Jan 2023 10:52:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30GAq2Xt033884; Mon, 16 Jan 2023 10:52:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30GAq25f033883; Mon, 16 Jan 2023 10:52:02 GMT (envelope-from git) Date: Mon, 16 Jan 2023 10:52:02 GMT Message-Id: <202301161052.30GAq25f033883@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: 42904794b804 - main - rtsock: fix socket closure. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 42904794b80489678e8a519ba453993232b11171 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=42904794b80489678e8a519ba453993232b11171 commit 42904794b80489678e8a519ba453993232b11171 Author: Alexander V. Chernikov AuthorDate: 2023-01-15 13:40:28 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-01-16 10:49:45 +0000 rtsock: fix socket closure. Currently `close(2)` erroneously return `EOPNOTSUPP` for `PF_ROUTE` sockets. It happened after making rtsock socket implementation self-contained ( 36b10ac2cd18 ). Rtsock code marks socket as connected in `rts_attach()`. `soclose()` tries to disconnect such socket using `.pr_disconnect` callback. Rtsock does not implement this callback, resulting in the default method being substituted. This default method returns `ENOTSUPP`, failing `soclose()` logic. This diff restores the previous behaviour by adding custom `pr_disconnect()` returning `ENOTCONN`. Reviewed by: glebius Differential Revision: https://reviews.freebsd.org/D38059 --- sys/net/rtsock.c | 8 +++++ tests/sys/net/routing/Makefile | 1 + tests/sys/net/routing/test_rtsock_ops.c | 56 +++++++++++++++++++++++++++++++++ 3 files changed, 65 insertions(+) diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index a67643e724db..4ae5c9559566 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -446,6 +446,13 @@ rts_detach(struct socket *so) so->so_pcb = NULL; } +static int +rts_disconnect(struct socket *so) +{ + + return (ENOTCONN); +} + static int rts_shutdown(struct socket *so) { @@ -2702,6 +2709,7 @@ static struct protosw routesw = { .pr_detach = rts_detach, .pr_send = rts_send, .pr_shutdown = rts_shutdown, + .pr_disconnect = rts_disconnect, .pr_close = rts_close, }; diff --git a/tests/sys/net/routing/Makefile b/tests/sys/net/routing/Makefile index 45034ff211b1..7bd0b9d863f7 100644 --- a/tests/sys/net/routing/Makefile +++ b/tests/sys/net/routing/Makefile @@ -7,6 +7,7 @@ TESTSDIR= ${TESTSBASE}/sys/net/routing ATF_TESTS_C += test_rtsock_l3 ATF_TESTS_C += test_rtsock_lladdr +ATF_TESTS_C += test_rtsock_ops ATF_TESTS_PYTEST += test_routing_l3.py ATF_TESTS_PYTEST += test_rtsock_multipath.py diff --git a/tests/sys/net/routing/test_rtsock_ops.c b/tests/sys/net/routing/test_rtsock_ops.c new file mode 100644 index 000000000000..111b9edf4057 --- /dev/null +++ b/tests/sys/net/routing/test_rtsock_ops.c @@ -0,0 +1,56 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2023 Alexander V. Chernikov + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include + +ATF_TC(socket_rtsock_openclose); +ATF_TC_HEAD(socket_rtsock_openclose, tc) +{ + atf_tc_set_md_var(tc, "descr", "test successful open/close"); +} + +ATF_TC_BODY(socket_rtsock_openclose, tc) +{ + int s = socket(PF_ROUTE, SOCK_RAW, 0); + ATF_CHECK(s >= 0); + ATF_CHECK_ERRNO(0, close(s) == 0); +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, socket_rtsock_openclose); + + return (atf_no_error()); +} From nobody Mon Jan 16 10:57:17 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NwTW144h2z2p4N1; Mon, 16 Jan 2023 10:57: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NwTW13XmTz3xjW; Mon, 16 Jan 2023 10:57:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673866637; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TzB2yqYhx1Ls0x0dClibp9n0PnFGTfuK2ebPmAQAAGs=; b=ptQd66HOZHdwky3jJbE2AA2OtqVsa26P7bStyfHdVOK6mtD6X7ZwluFhRgjbZghi3m7TuS /soku8bWE3JqI7oibLT4FqEInioJVqN83IIXBJ4kynzfS++WwdOlgysW694MaTMD+5IoTY 7KrksyPpKB7wZuwx1tzKAyRujr5X2zc0zYuaaiBe2+QegwKreESP0U3ORXD+ucH8KVkEbS tY0Ba2RW1mWq2lJ+7ttQnzPd39VcpGENKb0QParCiArZT/1yL05K4d47YfkuuPRA9fCfe+ yvv0W3Aa/+Gu3aVkzHSz4lXCVgqyfzGAHpjaGrsoni7Th4PVK/Ux7nz69HxyQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673866637; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TzB2yqYhx1Ls0x0dClibp9n0PnFGTfuK2ebPmAQAAGs=; b=dgWI5eMgx+ieJZw5imi3uAcvZil+6k9FVzN7VXF9hcIVpe2a+Uz9/tNEIhfFTFXm5bMoae TyjuQCIC/30J6U1cdvb76NnYFCI8AgzBuVX34uCVVuCuNvZBPbnl7Fw278nsCVBXJqx82V 9YTSwmRQo30nEl8294y8LI7/063TyoPQGLu9kgs01pmtR4jFNlAPUYXKUL/vSZguxJspna b4DYuvgxxB5tt2S1ieeP9w64IGqBqATS5fX7kJIHq2sZIWnTj/UZ/6Aqt4CycYk2BWegyG 0Y81a/3tTSc7hIQkS0FjOxouyCKH0OLBiZFjG3a2mUzArgpON6OqQc7Xd6kg9w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1673866637; a=rsa-sha256; cv=none; b=O1KD7/4pMRbNwB6k6n7pxrLwKS05ZoGRcV+OR07QaQafbE/VZG2pOl+cU53+o2OpVrl+hP fF2kb3IDQYGSzbgJ6qfFNC6VRrIckp2CKZR808LlEkBHEKan3kUgLJInswznJwnheJmjIB JRzgxMrQ0i9rS2ZgbeqLAm/h5kiTDA6BYdzlswdt7C9ZpAkCmqNCLM3iMZING8H6K+o5k7 RP7A7RiAhEH4LNNbbMSy0R32VK2rXDsSahjb4R69IXbKCrANwmh/n7wAL5J39i56sDTybR teDCZjnYzAmuzxpiDB7PyOQyhLrHZVLQDtu7VunfWGtp9YxT1BrweA2yTtO9SQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NwTW12b13z149k; Mon, 16 Jan 2023 10:57:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30GAvHRx034708; Mon, 16 Jan 2023 10:57:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30GAvHR3034707; Mon, 16 Jan 2023 10:57:17 GMT (envelope-from git) Date: Mon, 16 Jan 2023 10:57:17 GMT Message-Id: <202301161057.30GAvHR3034707@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: a8633361ab71 - main - netlink: fix typo in netlink(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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: a8633361ab71fda3860f6b4ed1a602f9b52b36b8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=a8633361ab71fda3860f6b4ed1a602f9b52b36b8 commit a8633361ab71fda3860f6b4ed1a602f9b52b36b8 Author: Alexander V. Chernikov AuthorDate: 2023-01-16 10:56:10 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-01-16 10:56:10 +0000 netlink: fix typo in netlink(4) Reported by: Ihor Antonov --- share/man/man4/netlink.4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man4/netlink.4 b/share/man/man4/netlink.4 index bbfa55049e2e..2aa4903a4594 100644 --- a/share/man/man4/netlink.4 +++ b/share/man/man4/netlink.4 @@ -328,7 +328,7 @@ or . .El .Sh SEE ALSO -.Xr genetrlink 4 , +.Xr genetlink 4 , .Xr rtnetlink 4 .Rs .%A "J. Salim" From nobody Mon Jan 16 12:22:09 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NwWNy24Vpz2sFxS; Mon, 16 Jan 2023 12:22:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NwWNy1cQ4z457x; Mon, 16 Jan 2023 12:22:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673871730; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0DDzgTtU7tmTTkoO6ujOyWWHSY2erLZB3HBBatD+xb4=; b=nKxyfKfM5pM7tsQZNyxW4OwTKbmFkG7L+gbSVfMIrHKd9N5jp1w8NY5LoNL+KNWtvHCR70 11jj271gMwDosOYvy6BBntSEZRgmO3Db5AySsPipKq5qBEvOllENE9dUO/oG3m3BEJUuIY dD+pfabmShAVxxV41Kkie4wZk/j8vzcivLs7X1MXMG2oV6kq80IV/ZfMKwybaKlsRItmqa 6pgQ1fbBtLvJ9iI9kTuD2OlwZwd0VpTHHrkMjHcLD8+syXTSDu224FiqtAgx2hRnTpRpta 4NQ4RtYfOczAkLCrIlOu0dkxgbhrptDU5zOyU8F3w+LZWLaI4rd1mmheXvRUsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673871730; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0DDzgTtU7tmTTkoO6ujOyWWHSY2erLZB3HBBatD+xb4=; b=PpX5esJSpHGtn4GNyvnGF8StBnDvvV7mcdanX2zF0eLjJzvyTQ+wCCQz1rnlGM7FiMeV0r qJiLlminWB8+nyQBr2poTEfrXu3pVGXm7ansU2W2spea6Ng45nhpYFHfF5JPWK47KJEXul s+A1agnMAUlfRpsuP5qB9czIQQGmSvWqkCtOLAH45rZB2a05Cxx9LiAXmPMBr+tWu97Nqp XL8GGvWLHSvA5scXnHkxQ0PqWncbKzgfp7xdKkwlgHczhd2sihL5RYRO2wryaXF9D/O9P/ o0osh5IREXiezJbuNTJUHoeN48dbKrYxv9cTdfR8O91eLMmaSFLhEUAi5CYBnQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1673871730; a=rsa-sha256; cv=none; b=KcZ3UF45PGwFZ4dTL8MPG+KkUd1OLgw4h2Rgxf7WvhQnZ7x+FvTQ/OUa3gKX3A/W2BqM7M GHBszGOUE1s3a/NgG3cA7rB0bX4d497j8FeNs/97wRfZPGpFN/VfqNKOnZLNG2XN4BGrvg sBMJdQW/a3HTi2efKrDuUgiewwFSFJvn9oKDbTPhGNQCtWNSzaney2HJcqAhJhVezCKyNE BP2IZzqOOzOC2HzuSjJNMihBIXDwOaGNWOHtBDqk6M3Bl/w8UOAj/h5gMwvp/XM7mg43zi /jQPLuarAF7RN6aeD0fWi57lNUpz3ZrFJJ6d8vefIsYuKaixavzQNxVRH40k/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 4NwWNy0fkMz16C5; Mon, 16 Jan 2023 12:22:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30GCM9Xg063275; Mon, 16 Jan 2023 12:22:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30GCM9pm063274; Mon, 16 Jan 2023 12:22:09 GMT (envelope-from git) Date: Mon, 16 Jan 2023 12:22:09 GMT Message-Id: <202301161222.30GCM9pm063274@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: 228c632ab3f6 - main - netlink: fix compatibility with older netlink applications. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 228c632ab3f6245df4a08d8692d49c8e12aacc27 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=228c632ab3f6245df4a08d8692d49c8e12aacc27 commit 228c632ab3f6245df4a08d8692d49c8e12aacc27 Author: Alexander V. Chernikov AuthorDate: 2023-01-16 12:14:35 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-01-16 12:21:40 +0000 netlink: fix compatibility with older netlink applications. Some apps try to provide only the non-zero part of the required message header instead of the full one. It happens when fetching routes or interface addresses, where the first header byte is the family. This behavior is "illegal" under the "strict" Netlink socket option, however there are many applications out there doing things in the "old" way. Support this usecase by copying the provided bytes into the temporary zero-filled header and running the parser on this header instead. Reported by: Goran Mekić --- sys/netlink/netlink_message_parser.h | 16 +++++++++++++--- tests/sys/netlink/test_rtnl_ifaddr.py | 20 ++++++++++++++++++++ 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/sys/netlink/netlink_message_parser.h b/sys/netlink/netlink_message_parser.h index 96fd1c7337b7..3f64c1967f09 100644 --- a/sys/netlink/netlink_message_parser.h +++ b/sys/netlink/netlink_message_parser.h @@ -213,9 +213,19 @@ nl_parse_header(void *hdr, int len, const struct nlhdr_parser *parser, int error; if (__predict_false(len < parser->nl_hdr_off)) { - nlmsg_report_err_msg(npt, "header too short: expected %d, got %d", - parser->nl_hdr_off, len); - return (EINVAL); + if (npt->strict) { + nlmsg_report_err_msg(npt, "header too short: expected %d, got %d", + parser->nl_hdr_off, len); + return (EINVAL); + } + + /* Compat with older applications: pretend there's a full header */ + void *tmp_hdr = npt_alloc(npt, parser->nl_hdr_off); + if (tmp_hdr == NULL) + return (EINVAL); + memcpy(tmp_hdr, hdr, len); + hdr = tmp_hdr; + len = parser->nl_hdr_off; } if (npt->strict && parser->sp != NULL && !parser->sp(hdr, npt)) diff --git a/tests/sys/netlink/test_rtnl_ifaddr.py b/tests/sys/netlink/test_rtnl_ifaddr.py index bd1c55e268e7..ec349fcd6fde 100644 --- a/tests/sys/netlink/test_rtnl_ifaddr.py +++ b/tests/sys/netlink/test_rtnl_ifaddr.py @@ -8,6 +8,7 @@ from atf_python.sys.net.netlink import NetlinkTestTemplate from atf_python.sys.net.netlink import NlConst from atf_python.sys.net.netlink import NlHelper from atf_python.sys.net.netlink import NlmBaseFlags +from atf_python.sys.net.netlink import Nlmsghdr from atf_python.sys.net.netlink import NlMsgType from atf_python.sys.net.netlink import NlRtMsgType from atf_python.sys.net.netlink import Nlsock @@ -68,6 +69,25 @@ class TestRtNlIfaddr(NetlinkTestTemplate, SingleVnetTestTemplate): assert len([r for r in ret if r[0] == ifname and r[1] == socket.AF_INET6]) == 2 assert len(ret) == 3 + def test_46_filter_family_compat(self): + """Tests that family filtering works with the stripped header""" + + hdr = Nlmsghdr( + nlmsg_len=17, + nlmsg_type=NlRtMsgType.RTM_GETADDR.value, + nlmsg_flags=NlmBaseFlags.NLM_F_ACK.value | NlmBaseFlags.NLM_F_REQUEST.value, + nlmsg_seq=self.helper.get_seq() + ) + data = bytes(hdr) + struct.pack("@B", socket.AF_INET) + self.nlsock.write_data(data) + + ret = [] + for rx_msg in self.read_msg_list(hdr.nlmsg_seq, NlRtMsgType.RTM_NEWADDR): + ifname = socket.if_indextoname(rx_msg.base_hdr.ifa_index) + family = rx_msg.base_hdr.ifa_family + ret.append((ifname, family, rx_msg)) + assert len(ret) == 2 + def filter_iface_family(self, family, num_items): """Tests that listing outputs IPv4 for the specific interface""" epair_ifname = self.vnet.iface_alias_map["if1"].name From nobody Mon Jan 16 13:05:08 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NwXLX6MX6z2sLYT; Mon, 16 Jan 2023 13:05: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NwXLX5stYz4CVB; Mon, 16 Jan 2023 13:05:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673874308; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=llF364LaIMdpOyl5I1nEpDmsDbzzA1foApCUxWfbEiw=; b=GLLwq0PdCFIkIDKdywt3coZzkiDVrz8QJ4AA0q3qC3PfaaosZzfl0WyhBR2g/mbbIJ6aGL hqIVz2LQk2Q3dPZ6ZtRPbbXUUxqyUsOHRlMmQ7aEdoGlg5gSKPPB4bF1xXr/0YpBdFry9D t5oQl7ZXqQNWFSXoSJerL/r2qxLG3cGOGA0LNz9JLNBJbGNhvV4OCSiQT/uMNwZq00HG5v krW0uCoebILyxLVb9mOyiF/NqyRmu9ePDKXQCJMH+K9L7oeKQgksjwGrqzuiYhi34SQLwp 97GyMFLVkYdWqNhir8CP595CnYMK8PmH9OS8vmxAViGLQNfW+asPSFNl/aExeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673874308; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=llF364LaIMdpOyl5I1nEpDmsDbzzA1foApCUxWfbEiw=; b=nyVGdINVzLkGpREW+a2csP2i5KVngwrQ1US8FHB2bgcaEYf9rrGAw4EuonvcnLiqzhL6wy QsynDFGeTZcJI97ghl2L2B+qCaHgEKD7ECBkwidHiv4b/sF0wqVHu/s4xtahTOdPOMeU+P Fakzy+epEiT8GTGYF+shjXRvrPGVEoPjmjO6aonqyn/8bpm7VykrJ4o/l3FunTKar5jSuJ sTPaQ+y/KH41uSsD1YxKhg+wqcAJ8Vl3CBHkwz2ewvCM27wLN6xYxyvcUoMQjPKynsW2KY N6zXWT4GwV0VuPqkNUdqm/DBbENlNZy2dUaB6sJvW4Z/Gld5fgmEzaPY510xaQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1673874308; a=rsa-sha256; cv=none; b=uIEkZsL5t8+gL7dDomGo65oNfqOPQM+FYdbAlw01GIPLcjCw0XmfbghUN4vUCxilJxsOIi 39fxvYv3evDgI6WYqG08Rau2FC/witq4CmISLYUUffj63967uHoAQBw0A3umi8mMuTva8q MZq9WjunI9sJRxJh4LQvzCqg05WTGby9b+cKOGNp4NG7eNPhFfPubBh8x3KsqvB90xx82W ZesD+Glq/Ln7Fclu8lIA+4W8DjeRsLPTF2zS4yvH5Z3MzIUrg0aRmDYtUduycNTixAg6qS t0LrKp1N1tK3GRYI+kGvAGbQpqfv2X4VDQHrYMwab/KYijpm6XwizA7IMKg6eA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NwXLX4wS2z17T1; Mon, 16 Jan 2023 13:05:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30GD58gc021172; Mon, 16 Jan 2023 13:05:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30GD58iV021171; Mon, 16 Jan 2023 13:05:08 GMT (envelope-from git) Date: Mon, 16 Jan 2023 13:05:08 GMT Message-Id: <202301161305.30GD58iV021171@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: 5c2b216a1cd8 - main - mixer: Fix default_unit switching with mixers that have no devices List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 5c2b216a1cd8de3aabfa9e76ca8f38774acd591e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=5c2b216a1cd8de3aabfa9e76ca8f38774acd591e commit 5c2b216a1cd8de3aabfa9e76ca8f38774acd591e Author: Mark Johnston AuthorDate: 2023-01-16 13:02:54 +0000 Commit: Mark Johnston CommitDate: 2023-01-16 13:02:54 +0000 mixer: Fix default_unit switching with mixers that have no devices Apparently it's possible for a mixer to have no devices: $ mixer -f /dev/mixer2 pcm2:mixer: at ? kld snd_uaudio (rec) $ If this is the default sound device, an attempt to change the default unit using mixer -d fails with a segfault because mod_dunit is called with a NULL device pointer, which is dereferenced to get the parent mixer. ctl_dunit seems to be a dummy, i.e., we don't actually need it and can simply pass the mixer to mod_dunit() directly. This patch removes that structure and associated indirection to fix the crash. Reviewed by: christos, hselasky MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D38060 --- usr.sbin/mixer/mixer.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/usr.sbin/mixer/mixer.c b/usr.sbin/mixer/mixer.c index e216efe3313c..6095f7550ea8 100644 --- a/usr.sbin/mixer/mixer.c +++ b/usr.sbin/mixer/mixer.c @@ -42,8 +42,8 @@ static void printall(struct mixer *, int); static void printminfo(struct mixer *, int); static void printdev(struct mixer *, int); static void printrecsrc(struct mixer *, int); /* XXX: change name */ +static int set_dunit(struct mixer *, int); /* Control handlers */ -static int mod_dunit(struct mix_dev *, void *); static int mod_volume(struct mix_dev *, void *); static int mod_mute(struct mix_dev *, void *); static int mod_recsrc(struct mix_dev *, void *); @@ -51,14 +51,6 @@ static int print_volume(struct mix_dev *, void *); static int print_mute(struct mix_dev *, void *); static int print_recsrc(struct mix_dev *, void *); -static const mix_ctl_t ctl_dunit = { - .parent_dev = NULL, - .id = -1, - .name = "default_unit", - .mod = mod_dunit, - .print = NULL -}; - int main(int argc, char *argv[]) { @@ -125,7 +117,7 @@ main(int argc, char *argv[]) initctls(m); - if (dflag && ctl_dunit.mod(m->dev, &dunit) < 0) + if (dflag && set_dunit(m, dunit) < 0) goto parse; if (sflag) { printrecsrc(m, oflag); @@ -316,20 +308,19 @@ printrecsrc(struct mixer *m, int oflag) } static int -mod_dunit(struct mix_dev *d, void *p) +set_dunit(struct mixer *m, int dunit) { - int dunit = *((int *)p); int n; if ((n = mixer_get_dunit()) < 0) { warn("cannot get default unit"); return (-1); } - if (mixer_set_dunit(d->parent_mixer, dunit) < 0) { + if (mixer_set_dunit(m, dunit) < 0) { warn("cannot set default unit to: %d", dunit); return (-1); } - printf("%s: %d -> %d\n", ctl_dunit.name, n, dunit); + printf("default_unit: %d -> %d\n", n, dunit); return (0); } From nobody Mon Jan 16 13:05:09 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NwXLZ28zmz2sLNl; Mon, 16 Jan 2023 13:05:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NwXLY6xVbz4CY1; Mon, 16 Jan 2023 13:05:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673874310; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/x6u3YlGG39TwehvXLkkUH+oS9xrPLlAseOJoWBiNy0=; b=S9lzkbKUI9Gy4uu0S2MVg8NxkL3szAw5nmjsa5k7wvzCLB8747cS7S8eaYePGD7fMtGDyJ FEO/MaCwou1hsQA4pw3p/GFSRf8t8sAWDP92RqZvb9jnFWw/I9npKem4JmFbsbUx7HR6BS pLbMFrJlZj+mybGcGNarW3M/3i3vARwn/A3JnYn/DAMNCC5Mg0nuOB51DpiHkBWpcwOU6A AV2I+qN9pHfcSaVU9d4yKOWieQqLERMVtx6zQre9VSYWFujdr0msmdHvnTTZA1232oPvdt ffwzPBBMRXZe4Sv20vEHNtOgiM7sayNXk5uSU6pFGoiukBBnNuE63cd9+yVj8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673874310; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/x6u3YlGG39TwehvXLkkUH+oS9xrPLlAseOJoWBiNy0=; b=bvdsvDDRiWHaJea4nqY4mR6q+QBJ4NrOtvYPbCPZXcGCBwMDt79lrJfOaJ5jCLnqLBWLUZ rEbNKAXVrfMM4UrAaWCABvdPRcZaL4HDNijcc8q8DiEBZJ0WY5e+W9F76XDX9YKuw0PECv qSz2XsyNNKwNVm6Cscymb46PWKxU01gOyxKA0Rm436df6j7ReaA1qePrBwJ1dV2bS+qmxv Fi5dQRMRYUKwFKx9FHUAWiDqhTQ9YrK+IJspl8JyVrQkrsgjQLdCmr2rbxZUIXvRxm/Ql9 vxKcZTRxpS0s4z2rrhvzOe1cV5raDa38iyYU3b7udPtao+RF1g0fGlIMk1Hdqw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1673874310; a=rsa-sha256; cv=none; b=MXX3QZL1WNYi7WQqnLUR974xOHL6v9oqve5dRlXNc+vXT75ZTU7tT95UYNQ81fAqDc7TZJ I/8aKwRHYEd4228m6qIo31RsVcy+I8Uk5bYN00biFLyq/Lk+E20ajLKQNMYmlUOQu7sBWc i+f64clZbkRyVuwS7byQckI6Z+bJ7oJul+MCD+se9D7ToHTsELJd85KULfmEKskXK4sZsc L+FdtOh0DoRGnXtVIdZdfS1P4T2q+THZSAF1jgJ4Bv6691AXsy9xapmU9vLMYK1kve/twi yXuXqgl2OX2tsLaxgObftbPBoun9pjsUMrNjnoDCBO4bQKC7n252s5L4BKt5gg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NwXLY5qrPz175H; Mon, 16 Jan 2023 13:05:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30GD59e9021196; Mon, 16 Jan 2023 13:05:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30GD59ZZ021195; Mon, 16 Jan 2023 13:05:09 GMT (envelope-from git) Date: Mon, 16 Jan 2023 13:05:09 GMT Message-Id: <202301161305.30GD59ZZ021195@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: f7e2f98bffda - main - atomic: Remove cdefs.h includes from atomic_*.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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: f7e2f98bffdafff65012fb02ad838c30b7e3502f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f7e2f98bffdafff65012fb02ad838c30b7e3502f commit f7e2f98bffdafff65012fb02ad838c30b7e3502f Author: Mark Johnston AuthorDate: 2023-01-16 13:03:20 +0000 Commit: Mark Johnston CommitDate: 2023-01-16 13:03:20 +0000 atomic: Remove cdefs.h includes from atomic_*.h Avoid including cdefs.h in system headers. Both headers now include types.h, and we can assume that that pulls in cdefs.h (required for __typeof usage in some of the atomic macro expansions). No functional change intended. Reviewed by: imp, kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D38039 --- sys/sys/atomic_common.h | 1 - sys/sys/atomic_san.h | 1 - 2 files changed, 2 deletions(-) diff --git a/sys/sys/atomic_common.h b/sys/sys/atomic_common.h index a7b0b50512dc..b7bfa151e8ca 100644 --- a/sys/sys/atomic_common.h +++ b/sys/sys/atomic_common.h @@ -36,7 +36,6 @@ #error do not include this header, use machine/atomic.h #endif -#include #include #define __atomic_load_bool_relaxed(p) (*(volatile _Bool *)(p)) diff --git a/sys/sys/atomic_san.h b/sys/sys/atomic_san.h index 9ceea2988db2..beeea82a666b 100644 --- a/sys/sys/atomic_san.h +++ b/sys/sys/atomic_san.h @@ -43,7 +43,6 @@ #error do not include this header, use machine/atomic.h #endif -#include #include #define ATOMIC_SAN_FUNC_1(sp, op, name, type) \ From nobody Mon Jan 16 13:05:10 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NwXLb2zGVz2sLcw; Mon, 16 Jan 2023 13:05: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NwXLb0ZCXz4BsV; Mon, 16 Jan 2023 13:05:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673874311; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7aY3wO5DXBi+0TNBkAqcu7FhbgeEYU9vBdn5przG7L4=; b=I46euY2lu8515MhsIGcv8r49CAb7Ju5jaENVux3K3oCLTRp/Vp4f4qufdfb72rHypeP59+ WHATWUf772J9/AWmqmQFC8k8I0kRZ9FVS3sxXUW4YA2pvQ/VPOABk/mIwkqzcLjGRiyOAh lf5/tPFU2MP03ZEU8IkmF3hUm/mRpkOSczLsXOg+ryXhJi2RbCDjXjJs6hhKuexgvf1u07 Dms4r2337wzOQp+gj1m2Pg3IG6ySpPOeOtpzaqkOs7d0ha0IyeGfY7ohDtEzv+2AHvrojo 6p7gnqXJ60nHAN07+X41AFCrWv1Wp55R8xaatxS9//woGR9Yw6KrQTl+3+TZ6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673874311; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7aY3wO5DXBi+0TNBkAqcu7FhbgeEYU9vBdn5przG7L4=; b=Ug4Tp1VW/30vRetGOEa7AF2/WPensNsxa/PM6AizPp2xvx9+h2oTx4lNR8OKolnCaAjDDf XE0a7BgOseoGO8BgBOEigTuSNsDyM2DSfwQ5L6AKq9IGgzoepy/HZyMncpo3e/FaxxwQwT 0PE6vKQk2kj3RnwNQTACZ/nsoGZunsMdh3+TMwbvWG9YnPPniAzZQwokT1JBZvfwrgL6j3 CF0co4Rf5m5iTwdTSuswVMip8/BDKJcwyEWW5qV2Eodi6Kz/TpTVin7Dee1U9yXZH/KLtp 8eRmsQ+rO4gTgE5/kzyREyD1R5aRvByRuGcFLSf7zkpzNvSgYH9B/sCsqN+smA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1673874311; a=rsa-sha256; cv=none; b=xu5sU2s8WD+PjYPgoj93gHcWFwIqQ3c6lTEM65o1iALZ//Zi8XrWmMj/GmMD4goOnxDcbP aUymyG++kDJkzgmTYr1g3+TN61C7l+Gao30SN9+byic8Ywg22taX2xdZN87h2/F2PWHGu2 Mra4ukIeYOebaUXuJlUYmue2GIF14MuStXdoyObZRMK0zUxVzV+4Kz6btNlhliO25VkpN6 viFjjinIx1Iwd7qG2fYX20O/fcD+lP2D23oo4d8AWXZAZDyYJczGkBtStiBLuG/dH7KSQi b+0QjqUv6G0CE5zFJ7qDIfHLoICtU4qGQHWOPNfVjTy8MLpzjeVfzzmcxRhTKA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NwXLZ6nv1z16tV; Mon, 16 Jan 2023 13:05:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30GD5AFi021220; Mon, 16 Jan 2023 13:05:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30GD5AnC021219; Mon, 16 Jan 2023 13:05:10 GMT (envelope-from git) Date: Mon, 16 Jan 2023 13:05:10 GMT Message-Id: <202301161305.30GD5AnC021219@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: ccffe71ad4d9 - main - atomic.9: Remove the stated dependency on types.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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: ccffe71ad4d9ac01f6bb4efa625ffcaf9fae739f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ccffe71ad4d9ac01f6bb4efa625ffcaf9fae739f commit ccffe71ad4d9ac01f6bb4efa625ffcaf9fae739f Author: Mark Johnston AuthorDate: 2023-01-16 13:04:01 +0000 Commit: Mark Johnston CommitDate: 2023-01-16 13:04:27 +0000 atomic.9: Remove the stated dependency on types.h All machine/atomic.h necessarily include sys/atomic_common.h, which brings in types.h. Reviewed by: imp, kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D38040 --- share/man/man9/atomic.9 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/share/man/man9/atomic.9 b/share/man/man9/atomic.9 index 784a776546de..7513d569c2f1 100644 --- a/share/man/man9/atomic.9 +++ b/share/man/man9/atomic.9 @@ -22,7 +22,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 6, 2021 +.Dd January 16, 2023 .Dt ATOMIC 9 .Os .Sh NAME @@ -40,7 +40,6 @@ .Nm atomic_thread_fence .Nd atomic operations .Sh SYNOPSIS -.In sys/types.h .In machine/atomic.h .Ft void .Fn atomic_add_[acq_|rel_] "volatile *p" " v" From nobody Mon Jan 16 15:57:49 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Nwc9n49D2z2sjCc; Mon, 16 Jan 2023 15:57: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Nwc9n3VSkz3DrD; Mon, 16 Jan 2023 15:57:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673884669; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xBf1gYQJIkj3LdVjgjWFwh//Mw8jEjZQiVFukGSCE3c=; b=ycOXalHhKWVpXwoe86kt4EAxP3JkzcyH8B5XkypaUR0w2zMrNco80j8hsyFDBdMk+2iUcA 8LxXVZoR+lSfGfetPRb2MWaSnHQzV6XO7oJ3/zqLkpwUVL8W5VQWICN2mjcpQFtJUrZKox BH4lnCGfTQ+nza5LZWn/981Rd0sfHMN/QKlLmmMVyqWxW58eIgxVBct5USB+JCDV8FHgPv 6HViyjE5L/0dfLXn6t+16gfk9C25TZMqe0wxfp73FoTaknqCohuCHeG6hpcF3tpxycEmdZ 83eSMa2fIkQI7tkiRLKr0YDQMCh0HmV8X81b5BHtAj0pVjUW7EUC5qJW/XCL3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673884669; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xBf1gYQJIkj3LdVjgjWFwh//Mw8jEjZQiVFukGSCE3c=; b=q0WfRgAqn0qZTyAw17ABgjDWdQAOPnXY7Ah956btDCAGr8Kq+SKD4CAkoDD5Nv0fdERs9y zB+cvmpjwpkoyMMkI/a2yGLwBHKujENLWyXZ299N1l47LDqW7n9veLFNQ2+pYgy9iKnm6u aGgcAk9/SaBmgScm4Ub/LvYqjIlK2uLFlm/hLnOCjcX9UJiwgntTD7+wLvlZyS7tv2J7/6 S1ZEdIsjhDxRarPEKDo8T4IkZUADUsBXUm98gpxnG0idbUMMKAip0HnfIdUtrJwZVLflQq 31Wrm0YuYr//l+vwmPk8cT9OXlCIgI6qFoA5Y7dcVa4fnpxHSX43jTBlVP6plg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1673884669; a=rsa-sha256; cv=none; b=jAFoUnG4XyNgkvotb1Lfg0f73hyCBcs+8aaDFBvF9yfVqP7TH6r/GdMFjrvZJ3v7Iv8Y5V 6ogvU6VWWVR+cCrw4TDLT/nGU6UfApa/T4LLqT4uzKJLCUvACF9JS+V95wixd64HHCqttz aF6LgPNVcmLZrD7NkqX2JhCBW4W+sjNtCU0zOZXAB+CIzQs8Pi/cG2wdcZRXrAingOseod 5dYSXWibWI4CMzA1jLknqLp65YH99h/oAgwh5OJ3sVv67RInsLpoubeLtUOvR/BdyjwpEn c+X3dB8mtRz26RA/HMEL63mfOJsYNR5NxL4PcpecKfbA9LqXT5hmHOIQIJYEWQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Nwc9n2PGgz1CCx; Mon, 16 Jan 2023 15:57:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30GFvnuw063930; Mon, 16 Jan 2023 15:57:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30GFvnMK063929; Mon, 16 Jan 2023 15:57:49 GMT (envelope-from git) Date: Mon, 16 Jan 2023 15:57:49 GMT Message-Id: <202301161557.30GFvnMK063929@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: 9b7eddfeed46 - main - openssh: remove mention of now-unused svn:keywords List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 9b7eddfeed465d4062dbad178261b806e97d6b62 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=9b7eddfeed465d4062dbad178261b806e97d6b62 commit 9b7eddfeed465d4062dbad178261b806e97d6b62 Author: Ed Maste AuthorDate: 2023-01-16 14:52:00 +0000 Commit: Ed Maste CommitDate: 2023-01-16 15:56:27 +0000 openssh: remove mention of now-unused svn:keywords Reported by: gshapiro --- crypto/openssh/FREEBSD-upgrade | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/crypto/openssh/FREEBSD-upgrade b/crypto/openssh/FREEBSD-upgrade index b389f399a040..9f6f3d577e01 100644 --- a/crypto/openssh/FREEBSD-upgrade +++ b/crypto/openssh/FREEBSD-upgrade @@ -73,10 +73,7 @@ $ git diff --diff-filter=M vendor/openssh/X.YpZ HEAD:crypto/openssh - Files that have modifications relative to the vendor code, and - only those files, must have the svn:keywords property set to - FreeBSD=%H and be listed in the 'keywords' file created by the - pre-merge script. + Review the diff for any unexpected changes. 12) Run the configure script: From nobody Mon Jan 16 16:37:18 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Nwd3L5jFHz2snfc; Mon, 16 Jan 2023 16:37: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Nwd3L31mLz3H4t; Mon, 16 Jan 2023 16:37:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673887038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/pEQUNR3tL+ZhFk2sTAH9lC8R6/n3t79H/usfSmUL20=; b=f7ErGNMSip8I7bDI8tTNRnVn3PkrCDfUo60CoR1ffv99HF5x1ua/6IaYUH4ay9b1GDwE4A fZ5utYnny8X4hHS04k/3LAu1bKqEE9/Q6yIQjjybpTa1spT64x9kN6iBzTT9f8vNqCAG+9 W3k3bid9hj7v+WTz5pikPyjMGxJxvv/HUaSyS0eleLN39ndk+N5MuXaDlSMJbs/9dPr84U KJT6o7CAjA/9HZ5JPV8zrjsmvJgbpBDon9QjFyuEtl8wPwKhy29E/DhOfIOmzfEFXVu34/ XAhO55ROiRuYxDxaivalN8yKTeat+r2GSmUNVda9B/teIIL9yXnwWgPzR67/6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673887038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/pEQUNR3tL+ZhFk2sTAH9lC8R6/n3t79H/usfSmUL20=; b=C2/zGSpfaKJBJytj6KrjhQpBDZOe3hh2nc2d+ba3BRKYAXmrI0SwFrk+xZo3ZQ8lAwxNbl t1iw3+t7VVG8qLRxut32ka9nRqiprqVCBIeo7K4UAcfCi8RO3cNvtwCmZSYR+jeGziUOs5 PtyITsomXL2Jv4ulTUB5OlrL1cNdyZVumOUlN0rxckzrwNVouajoGT4s+JGK0Xqas0giPn KYhSk4RkT5Np/32eJg4HnihkhjL5r5IoXPBja06yvEm2+e6/XCyV6d4FqUjSIc4EcLDsJk mOggEivYgN+6+jiRJz/YN7RVEmD0FPJRCoZR4U2mlMLH1MdHoSqGKL8lNLdIhw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1673887038; a=rsa-sha256; cv=none; b=dblTTjCkIh/F3pr15gMK1Qdn1xG6hFSMiHDH8POsVNMKg/AklaveovlyqF0zZQ48112nZj q00qItif++ugaFriTZC2Ykj0AmeiI42jqKGMHwwrYzjNXmkyHpoOxirgpzhel8l2HdyErK eepUjmSuI3hMXjzxzpZN784akIbs+/ExmuzrLgh+DorUtt7mbYILmWr1bkwmhdf636ztYz QVmEAT4bCUP7ORgeNr48irMG+lrgAFA9+8hycBQR1kHQL9/OuUE+p6ia53GEd0fBSoqc7j 9U6UjcCGfFXU2vBDUsdectA722ZxAkk7OaDgJ1qB7ATU/qlRKYlAjy75WMbO8w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Nwd3L1wS3z1CSw; Mon, 16 Jan 2023 16:37:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30GGbIP8021347; Mon, 16 Jan 2023 16:37:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30GGbIXQ021345; Mon, 16 Jan 2023 16:37:18 GMT (envelope-from git) Date: Mon, 16 Jan 2023 16:37:18 GMT Message-Id: <202301161637.30GGbIXQ021345@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: 8a9495517b0a - main - ipsec: Clear pad bytes in PF_KEY messages List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 8a9495517b0ad54da9759a7ba2cc0b56f8e7c8f9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8a9495517b0ad54da9759a7ba2cc0b56f8e7c8f9 commit 8a9495517b0ad54da9759a7ba2cc0b56f8e7c8f9 Author: Mark Johnston AuthorDate: 2023-01-16 15:46:20 +0000 Commit: Mark Johnston CommitDate: 2023-01-16 16:27:54 +0000 ipsec: Clear pad bytes in PF_KEY messages Various handlers for SADB messages will allocate a new mbuf and populate some structures in it. Some of these structures, such as struct sadb_supported, contain small reserved fields that are not initialized and are thus leaked to userspace. Fix the problem by adding a helper to allocate zeroed mbufs. This reduces code duplication and the overhead of zeroing these messages isn't harmful. Reviewed by: zlei, melifaro Reported by: KMSAN Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D38068 --- sys/netipsec/key.c | 69 +++++++++++++++++++++++------------------------------- 1 file changed, 29 insertions(+), 40 deletions(-) diff --git a/sys/netipsec/key.c b/sys/netipsec/key.c index 98bd97f465bf..345c302c2a80 100644 --- a/sys/netipsec/key.c +++ b/sys/netipsec/key.c @@ -818,6 +818,25 @@ key_havesp_any(void) return (V_spd_size != 0); } +/* + * Allocate a single mbuf with a buffer of the desired length. The buffer is + * pre-zeroed to help ensure that uninitialized pad bytes are not leaked. + */ +static struct mbuf * +key_mget(u_int len) +{ + struct mbuf *m; + + KASSERT(len <= MCLBYTES, + ("%s: invalid buffer length %u", __func__, len)); + + m = m_get2(len, M_NOWAIT, MT_DATA, M_PKTHDR); + if (m == NULL) + return (NULL); + memset(mtod(m, void *), 0, len); + return (m); +} + /* %%% IPsec policy management */ /* * Return current SPDB generation. @@ -2353,14 +2372,8 @@ key_spddelete2(struct socket *so, struct mbuf *m, /* create new sadb_msg to reply. */ len = PFKEY_ALIGN8(sizeof(struct sadb_msg)); - MGETHDR(n, M_NOWAIT, MT_DATA); - if (n && len > MHLEN) { - if (!(MCLGET(n, M_NOWAIT))) { - m_freem(n); - n = NULL; - } - } - if (!n) + n = key_mget(len); + if (n == NULL) return key_senderror(so, m, ENOBUFS); n->m_len = len; @@ -3792,14 +3805,8 @@ key_setsadbmsg(u_int8_t type, u_int16_t tlen, u_int8_t satype, u_int32_t seq, len = PFKEY_ALIGN8(sizeof(struct sadb_msg)); if (len > MCLBYTES) return NULL; - MGETHDR(m, M_NOWAIT, MT_DATA); - if (m && len > MHLEN) { - if (!(MCLGET(m, M_NOWAIT))) { - m_freem(m); - m = NULL; - } - } - if (!m) + m = key_mget(len); + if (m == NULL) return NULL; m->m_pkthdr.len = m->m_len = len; m->m_next = NULL; @@ -4979,14 +4986,8 @@ key_getspi(struct socket *so, struct mbuf *m, const struct sadb_msghdr *mhp) len = PFKEY_ALIGN8(sizeof(struct sadb_msg)) + PFKEY_ALIGN8(sizeof(struct sadb_sa)); - MGETHDR(n, M_NOWAIT, MT_DATA); - if (len > MHLEN) { - if (!(MCLGET(n, M_NOWAIT))) { - m_freem(n); - n = NULL; - } - } - if (!n) { + n = key_mget(len); + if (n == NULL) { error = ENOBUFS; goto fail; } @@ -7201,14 +7202,8 @@ key_register(struct socket *so, struct mbuf *m, const struct sadb_msghdr *mhp) if (len > MCLBYTES) return key_senderror(so, m, ENOBUFS); - MGETHDR(n, M_NOWAIT, MT_DATA); - if (n != NULL && len > MHLEN) { - if (!(MCLGET(n, M_NOWAIT))) { - m_freem(n); - n = NULL; - } - } - if (!n) + n = key_mget(len); + if (n == NULL) return key_senderror(so, m, ENOBUFS); n->m_pkthdr.len = n->m_len = len; @@ -7839,14 +7834,8 @@ key_parse(struct mbuf *m, struct socket *so) if (m->m_next) { struct mbuf *n; - MGETHDR(n, M_NOWAIT, MT_DATA); - if (n && m->m_pkthdr.len > MHLEN) { - if (!(MCLGET(n, M_NOWAIT))) { - m_free(n); - n = NULL; - } - } - if (!n) { + n = key_mget(m->m_pkthdr.len); + if (n == NULL) { m_freem(m); return ENOBUFS; } From nobody Mon Jan 16 16:37:19 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Nwd3M4Zjcz2snTD; Mon, 16 Jan 2023 16:37:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Nwd3M3HWDz3HCG; Mon, 16 Jan 2023 16:37:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673887039; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ep13nhtYQPDH17aF7XSmin19TrbCmjYVEbvpEvQKDlE=; b=a9fEgHz4tRJ+nW9A7zJ+OHxxu5zFQ8492PTCa+SAQCbpNcnSMFF47v0eUEVZj7UOhkR6lQ H6XfpAXlPZ3u0nJAwiFQQ2tpoE1b2SymdRZBaUwFZHY3y30l2Iwb21Vgy95qf4vvLivugD f/TeEEFCcplr+e8izv234sZYvtgccz/ci4GkXgU8LPKEcUM60gEqVB7GKVI+EU+wrx70Rq uAiT9CxCR3AEX2Z3eSeahMLOgQDK/rN1BDXQXI2+KUN6Va1fD7Bvc1mXbjNJh5UROWUNr0 aZpPU/5PcWei3uFCOFouy5uIILojUQoP2ylNtjlrdu8GJegm5iM2c4rBMC2gRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673887039; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ep13nhtYQPDH17aF7XSmin19TrbCmjYVEbvpEvQKDlE=; b=FgFrO960WDWHmNvAYYNUGbQ0lntJcIE3RaaD3BGtT17ieB9PaBZMu2EYVY33uBZpCNnJW8 rGxNg9czcSDWqoCx4eNji1V41RfM7BToHK5/Mr7SKFZCiLezDr6zDf5tuPmgmrtJDTtTUx j8MATJs92rCliLqasVYlRLHJSovc2iQcoJP+xvCt4e9KveoEqH3cDFgHo0rnMJdOM+ALEG opA7rIXYwa0rpcSP/lnE4LsW+5efmbuVm4YONqvHqlsleGk5KWDA/nfryxmsuCanX350TP gPeCHI2VHinYF/tNXZ6ozBa8+wI4G+6KKCCMDvTNQOrZSsr86VI9DQTLMHDiWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1673887039; a=rsa-sha256; cv=none; b=AN4upzpL1MEwr8ZlTycguajhh4igYSydtVRxH50a1YoXXyU3IWG+XddykMMHMOzxVO3OoE W9pX7dwudCEXwwedhy6AVKzISZRtOimGFrUf3LUGAEEggsfIn9CK1P2oiKCfR/oa9Y0mVi 2PurH5Mec3Qqw9vl5O1uSn9rB4M5B92rn+4LEAcZrrf6AY0hwCkCStz4LNprEBEmG0fXfY ifxPo3KNTE8st5Su7w1OcEiO9pJ9Ayae7y3yoFpUrryPkmB9zSjDBVflQYDHQr/C9zWXRF C/q86KUs7VGNNDmjJP2ODQ4doeliYUNcdavw+cxi7UYgubDRN8sI+osdTvMD+w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Nwd3M2KpFz1DGp; Mon, 16 Jan 2023 16:37:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30GGbJl3021375; Mon, 16 Jan 2023 16:37:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30GGbJhs021374; Mon, 16 Jan 2023 16:37:19 GMT (envelope-from git) Date: Mon, 16 Jan 2023 16:37:19 GMT Message-Id: <202301161637.30GGbJhs021374@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: b050ee6c97e7 - main - vm_object: Fix a kernel memory disclosure via the vm_object list sysctl List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: b050ee6c97e7f5b6f1e3adec69775fa41afc948f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b050ee6c97e7f5b6f1e3adec69775fa41afc948f commit b050ee6c97e7f5b6f1e3adec69775fa41afc948f Author: Mark Johnston AuthorDate: 2023-01-16 15:53:59 +0000 Commit: Mark Johnston CommitDate: 2023-01-16 16:27:54 +0000 vm_object: Fix a kernel memory disclosure via the vm_object list sysctl Reported by: Chris J-D MFC after: 1 week Sponsored by: The FreeBSD Foundation --- sys/vm/vm_object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index afe1dcb8c25a..99b28d9460a3 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -2523,7 +2523,7 @@ vm_object_list_handler(struct sysctl_req *req, bool swap_only) count * 11 / 10)); } - kvo = malloc(sizeof(*kvo), M_TEMP, M_WAITOK); + kvo = malloc(sizeof(*kvo), M_TEMP, M_WAITOK | M_ZERO); error = 0; /* From nobody Mon Jan 16 16:50:42 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NwdLp5QMwz2spsy; Mon, 16 Jan 2023 16:50: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NwdLp54N4z3JSl; Mon, 16 Jan 2023 16:50:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673887842; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nWyujoEa2G3lt5b1eOSQdqcbGIJwYxPwViEV2zsY5NM=; b=Nw17SSoBbm4/ngUT4MdQqfFQeE6xbOCEtOQHdVLmxVWwVn5xVLEmvCHjnNM5Hgim1H3LeE vN3Dje0/7TvAMHgP22x3uj9dA9xqEM88AhzEMCcFYeoqu44IIFWhEDMs1Uws8pftJ6leoO Xbum6IUL027QaUiHkYPKsDC2SEcvKbSPig6WvblNB1KWY7AZdyVoMQrFlujrH55RhwFSn4 GcN7Ovy6Z5iOGK3pvgrlqt8ZmtrvXIQnw7bKrCXkjHOrFk7BVSPQCcFPmFyRMY01YIEIiO x4EGgdKLdFkBFCVh9RZOcfsbigLXnSoS70ftxCdGISA+Zinz2mAUUxSzcZ3MbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673887842; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nWyujoEa2G3lt5b1eOSQdqcbGIJwYxPwViEV2zsY5NM=; b=qZqlfW8Si8onu4t9Iyff4naZi5v828SA7E8+GOqI709Zn3YeqsOhK3uROen4vyQ39GmWhh 19CeQeM4y33w9HNfEvqpb4e8NQDhmIcpnEVD/rN13rWnSCsSTc9axnFP5/LLODqNiTa4Zn HINPFZEmjbGYMkIGPTXxcA6mBa8Ddexkk9WW4Z3todG1ST8pIAO3oJ3AVHOylIj0lEbeZD UDOyTv4/LkNa7CZZNQ/8x5rNM0RDI2ln7AzVlyc91FOyCCWudrIpcRcdZtHZwe7b8twPXu gWtXi7v12LVgnTAnpJDiEOMcUXPRURWYbtbfhXD1UOLPTX3yvlLEjKc6D08NJA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1673887842; a=rsa-sha256; cv=none; b=CyT1+7ljnQni0b0qSWV78aDr5dMSbp4n2UhwjC3Pl81hDKnab/PNYXYbXM4PtQ2QTJ/LqL tA9bGXLbS+I3Il4qs42sMvQIgxOsMG5tddHroBd3LzLxb1qL9cyJuz8PRL48JhT7tHpOUQ pcT5r3Y+EbYQuOohj/qbySSdS1yOnRfGbuxtfmavRiTY7zZQQOV/Do7Z0LW/RDB/7EZ37b HQximECb/eg3Q9fVoI0/vB//aPTDR+6AFn56CnbRTZ1axGmcSa3pCdbEMtcWCyddhVdOuy d7cHx+GDGV/cJptx2pFUiEpf2dus1dJn+avRNmJpsfc5lKxl7Hn8+ByzLmtjlg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NwdLp478Lz1Dfh; Mon, 16 Jan 2023 16:50:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30GGogWn044065; Mon, 16 Jan 2023 16:50:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30GGogum044064; Mon, 16 Jan 2023 16:50:42 GMT (envelope-from git) Date: Mon, 16 Jan 2023 16:50:42 GMT Message-Id: <202301161650.30GGogum044064@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Danilo G. Baio" Subject: git: 591e29117964 - main - bsdconfig, bsdinstall: Refresh mirrors 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dbaio X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 591e29117964248d4bfea639e973a12e27f96ac9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dbaio (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=591e29117964248d4bfea639e973a12e27f96ac9 commit 591e29117964248d4bfea639e973a12e27f96ac9 Author: Danilo G. Baio AuthorDate: 2023-01-10 01:06:57 +0000 Commit: Danilo G. Baio CommitDate: 2023-01-16 16:48:06 +0000 bsdconfig, bsdinstall: Refresh mirrors list The mirrors list is in sync with the Handbook / Mirrors section [1], which was refreshed a few months ago. Mirrors removed were not responding or had duplicated addresses (aliases) with another mirror. 1 - https://docs.freebsd.org/en/books/handbook/mirrors/ Reviewed by: philip (clusteradm) Approved by: philip MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D38014 --- usr.sbin/bsdconfig/include/messages.subr | 12 ++-- usr.sbin/bsdconfig/share/media/ftp.subr | 118 ++++++++----------------------- usr.sbin/bsdinstall/scripts/mirrorselect | 114 ++++++++--------------------- 3 files changed, 66 insertions(+), 178 deletions(-) diff --git a/usr.sbin/bsdconfig/include/messages.subr b/usr.sbin/bsdconfig/include/messages.subr index 9d910032616d..47ef6876854b 100644 --- a/usr.sbin/bsdconfig/include/messages.subr +++ b/usr.sbin/bsdconfig/include/messages.subr @@ -75,7 +75,6 @@ msg_cant_start_wpa_supplicant="Can't start wpa_supplicant(8). Please create a wl msg_cd_dvd="CD/DVD" msg_cdrom="CDROM" msg_checking_access_to="Checking access to\n %s" -msg_china="China" msg_chinese_desc="Ported software for the Chinese market." msg_choose_a_cd_dvd_type="Choose a CD/DVD type" msg_choose_a_dos_partition="Choose a DOS partition" @@ -200,7 +199,6 @@ msg_ipv6="IPv6" msg_ipv6_desc="IPv6-related software." msg_ipv6_ready="IPv6 ready" msg_irc_desc="Internet Relay Chat utilities." -msg_ireland="Ireland" msg_israel="Israel" msg_japan="Japan" msg_japanese_desc="Ported software for the Japanese market." @@ -222,7 +220,7 @@ msg_looking_for_keymap_files="Looking for keymap files..." msg_looking_up_host="Looking up host %s" msg_mail_desc="Electronic mail packages and utilities." msg_main_menu="Main Menu" -msg_main_site="Main Site" +msg_main_site="Main Site (GeoDNS)" msg_manually_connect="Manually Connect" msg_manually_connect_help="Connect to a wireless network that may be unlisted" msg_math_desc="Mathematical computation software." @@ -310,7 +308,7 @@ msg_please_select_a_freebsd_http_distribution_site="Please select a FreeBSD HTTP msg_please_select_a_usb_drive="You have more than one USB drive. Please choose which drive\nyou would like to use." msg_please_select_dos_partition="FreeBSD can be installed directly from a DOS partition assuming,\nof course, that you have copied the relevant distributions into\nyour DOS partition before starting this installation. If this is\nnot the case then you should reboot DOS at this time and copy the\ndistributions you wish to install into a \"FREEBSD\" subdirectory\non one of your DOS partitions. Otherwise, please select the DOS\npartition containing the FreeBSD distribution files." msg_please_select_ethernet_device_to_configure="Please select the ethernet or PLIP device to configure." -msg_please_select_the_site_closest_to_you_or_other="Please select the site closest to you or \"other\" if you'd like to\nspecify a different choice. Also note that not every site listed here\ncarries more than the base distribution kits. Only Primary sites are\nguaranteed to carry the full range of possible distributions." +msg_please_select_the_site_closest_to_you_or_other="Please select the best suitable site for you or \"other\" if you want to\nspecify a different choice. The \"Main Site\" directs users to the nearest\nproject managed mirror via GeoDNS (they carry the full range of possible\ndistributions and support both IPv4 and IPv6). All other sites are known\nas \"Community Mirrors\"; not every site listed here carries more than the\nbase distribution kits. Select a site!" msg_please_select_ufs_partition="FreeBSD can be installed directly from another FreeBSD partition\nthat is UFS formatted assuming, of course, that you have copied\nthe relevant distributions into said partition before starting\ninstallation." msg_please_specify_a_temporary_directory="Please specify a temporary directory with lots of free space:" msg_please_specify_the_name_of_the_text_editor="Please specify the name of the text editor you wish to use:" @@ -324,7 +322,6 @@ msg_ports_mgmt_desc="Utilities for managing ports and packages." msg_portuguese_desc="Ported software for the Portuguese market." msg_previous_page="Previous page" msg_previous_syntax_errors="%s: Not overwriting \`%s' due to previous syntax errors" -msg_primary="Primary" msg_print_desc="Utilities for dealing with printing." msg_probing_devices_please_wait_this_can_take_a_while="Probing devices, please wait (this can take a while)..." msg_proceed="Proceed" @@ -362,7 +359,7 @@ msg_secure_mode_requires_root="Secure-mode requires root-access!" msg_secure_mode_requires_x11="Secure-mode requires X11 (use \`-X')!" msg_security_desc="System security software." msg_select="Select" -msg_select_a_site_thats_close="Select a site that's close!" +msg_select_a_site_thats_close="Select a site!" msg_select_the_configuration_you_would_like="Select the configuration you would like to edit:\nAddional network information displayed in help line." msg_select_wlan_interfaces_for="Select wlan interfaces for %s:" msg_selected="selected" @@ -375,7 +372,6 @@ msg_show_configured_help="Show networks configured in wpa_supplicants.conf(5)" msg_show_scan_results="Show Scan Results" msg_show_scan_results_help="Show wpa_cli(8) scan results" msg_skip="Skip" -msg_slovak_republic="Slovak Republic" msg_slovenia="Slovenia" msg_sorry_invalid_url="Sorry, %s is an invalid URL!" msg_sorry_package_was_not_found_in_the_index="Sorry, package %s was not found in the INDEX." @@ -386,7 +382,6 @@ msg_spanish_desc="Ported software for the Spanish market." msg_specify_some_other_ftp_site="Specify some other ftp site by URL" msg_specify_some_other_http_site="Specify some other http site by URL" msg_sweden="Sweden" -msg_switzerland="Switzerland" msg_sysutils_desc="Various system utilities." msg_taiwan="Taiwan" msg_tcl_desc="TCL and packages that depend on it." @@ -427,6 +422,7 @@ msg_user_is_using_a_slow_pc_or_ethernet_card="User is using a slow PC or Etherne msg_username_and_password_to_use="Username and password to use instead of anonymous" msg_using_interface="Using interface %s" msg_using_usb_device="Using USB device: %s" +msg_v6="- IPv6" msg_vietnamese_desc="Ported software for the Vietnamese market." msg_view_set_various_media_options="View/Set various media options" msg_warning_no_wireless_devices="WARNING! No wireless devices found." diff --git a/usr.sbin/bsdconfig/share/media/ftp.subr b/usr.sbin/bsdconfig/share/media/ftp.subr index 1f6f216eb0a9..5d6cd37ff38f 100644 --- a/usr.sbin/bsdconfig/share/media/ftp.subr +++ b/usr.sbin/bsdconfig/share/media/ftp.subr @@ -73,110 +73,54 @@ f_dialog_menu_media_ftp() f_dialog_title_restore local prompt="$msg_please_select_the_site_closest_to_you_or_other" local menu_list=" - '$msg_main_site' 'ftp.freebsd.org' - 'URL' '$msg_specify_some_other_ftp_site' - 'IPv6 $msg_main_site' 'ftp.freebsd.org' - ' IPv6 $msg_france' 'ftp4.fr.freebsd.org' - ' IPv6 $msg_france #8' 'ftp8.fr.freebsd.org' - ' IPv6 $msg_ireland' 'ftp3.ie.freebsd.org' - ' IPv6 $msg_japan' 'ftp2.jp.freebsd.org' - ' IPv6 $msg_sweden' 'ftp4.se.freebsd.org' - ' IPv6 $msg_usa' 'ftp4.us.freebsd.org' - '$msg_primary' 'ftp1.freebsd.org' - ' $msg_primary #2' 'ftp2.freebsd.org' - ' $msg_primary #3' 'ftp3.freebsd.org' - ' $msg_primary #4' 'ftp4.freebsd.org' - ' $msg_primary #5' 'ftp5.freebsd.org' - ' $msg_primary #6' 'ftp6.freebsd.org' - ' $msg_primary #7' 'ftp7.freebsd.org' - ' $msg_primary #10' 'ftp10.freebsd.org' - ' $msg_primary #11' 'ftp11.freebsd.org' - ' $msg_primary #12' 'ftp12.freebsd.org' - ' $msg_primary #13' 'ftp13.freebsd.org' - ' $msg_primary #14' 'ftp14.freebsd.org' - '$msg_australia' 'ftp.au.freebsd.org' - ' $msg_australia #2' 'ftp2.au.freebsd.org' + '$msg_main_site' 'download.freebsd.org' + '$msg_australia $msg_v6' 'ftp.au.freebsd.org' ' $msg_australia #3' 'ftp3.au.freebsd.org' - '$msg_austria' 'ftp.at.freebsd.org' - '$msg_brazil' 'ftp2.br.freebsd.org' + '$msg_austria $msg_v6' 'ftp.at.freebsd.org' + '$msg_brazil #2' 'ftp2.br.freebsd.org' ' $msg_brazil #3' 'ftp3.br.freebsd.org' - ' $msg_brazil #4' 'ftp4.br.freebsd.org' - '$msg_bulgaria' 'ftp.bg.freebsd.org' - '$msg_china' 'ftp.cn.freebsd.org' - '$msg_czech_republic' 'ftp.cz.freebsd.org' - '$msg_denmark' 'ftp.dk.freebsd.org' + '$msg_bulgaria $msg_v6' 'ftp.bg.freebsd.org' + '$msg_czech_republic $msg_v6' 'ftp.cz.freebsd.org' + '$msg_denmark $msg_v6' 'ftp.dk.freebsd.org' '$msg_finland' 'ftp.fi.freebsd.org' - '$msg_france' 'ftp.fr.freebsd.org' + '$msg_france $msg_v6' 'ftp.fr.freebsd.org' ' $msg_france #3' 'ftp3.fr.freebsd.org' - ' $msg_france #4' 'ftp4.fr.freebsd.org' - ' $msg_france #5' 'ftp5.fr.freebsd.org' ' $msg_france #6' 'ftp6.fr.freebsd.org' - ' $msg_france #7' 'ftp7.fr.freebsd.org' - ' $msg_france #8' 'ftp8.fr.freebsd.org' - '$msg_germany' 'ftp.de.freebsd.org' - ' $msg_germany #2' 'ftp2.de.freebsd.org' - ' $msg_germany #4' 'ftp4.de.freebsd.org' - ' $msg_germany #5' 'ftp5.de.freebsd.org' - ' $msg_germany #7' 'ftp7.de.freebsd.org' - ' $msg_germany #8' 'ftp8.de.freebsd.org' - '$msg_greece' 'ftp.gr.freebsd.org' - ' $msg_greece #2' 'ftp2.gr.freebsd.org' - '$msg_ireland' 'ftp3.ie.freebsd.org' - '$msg_japan' 'ftp.jp.freebsd.org' + '$msg_germany $msg_v6' 'ftp.de.freebsd.org' + ' $msg_germany #1 $msg_v6' 'ftp1.de.freebsd.org' + ' $msg_germany #2 $msg_v6' 'ftp2.de.freebsd.org' + ' $msg_germany #5 $msg_v6' 'ftp5.de.freebsd.org' + ' $msg_germany #7 $msg_v6' 'ftp7.de.freebsd.org' + '$msg_greece $msg_v6' 'ftp.gr.freebsd.org' + ' $msg_greece #2 $msg_v6' 'ftp2.gr.freebsd.org' + '$msg_japan $msg_v6' 'ftp.jp.freebsd.org' ' $msg_japan #2' 'ftp2.jp.freebsd.org' ' $msg_japan #3' 'ftp3.jp.freebsd.org' ' $msg_japan #4' 'ftp4.jp.freebsd.org' - ' $msg_japan #5' 'ftp5.jp.freebsd.org' - ' $msg_japan #6' 'ftp6.jp.freebsd.org' - ' $msg_japan #7' 'ftp7.jp.freebsd.org' - ' $msg_japan #8' 'ftp8.jp.freebsd.org' - ' $msg_japan #9' 'ftp9.jp.freebsd.org' + ' $msg_japan #6 $msg_v6' 'ftp6.jp.freebsd.org' '$msg_korea' 'ftp.kr.freebsd.org' ' $msg_korea #2' 'ftp2.kr.freebsd.org' '$msg_latvia' 'ftp.lv.freebsd.org' - '$msg_netherlands' 'ftp.nl.freebsd.org' + '$msg_netherlands $msg_v6' 'ftp.nl.freebsd.org' ' $msg_netherlands #2' 'ftp2.nl.freebsd.org' '$msg_new_zealand' 'ftp.nz.freebsd.org' - '$msg_norway' 'ftp.no.freebsd.org' - '$msg_poland' 'ftp.pl.freebsd.org' - '$msg_russia' 'ftp.ru.freebsd.org' + '$msg_norway $msg_v6' 'ftp.no.freebsd.org' + '$msg_poland $msg_v6' 'ftp.pl.freebsd.org' + '$msg_russia $msg_v6' 'ftp.ru.freebsd.org' ' $msg_russia #2' 'ftp2.ru.freebsd.org' - ' $msg_russia #5' 'ftp5.ru.freebsd.org' - ' $msg_russia #6' 'ftp6.ru.freebsd.org' - '$msg_slovak_republic' 'ftp.sk.freebsd.org' - ' $msg_slovak_republic #2' 'ftp2.sk.freebsd.org' - '$msg_slovenia' 'ftp.si.freebsd.org' - '$msg_south_africa' 'ftp.za.freebsd.org' - ' $msg_south_africa #2' 'ftp2.za.freebsd.org' - ' $msg_south_africa #4' 'ftp4.za.freebsd.org' - '$msg_sweden' 'ftp.se.freebsd.org' - ' $msg_sweden #2' 'ftp2.se.freebsd.org' - ' $msg_sweden #4' 'ftp4.se.freebsd.org' - '$msg_switzerland' 'ftp.ch.freebsd.org' - '$msg_taiwan' 'ftp.tw.freebsd.org' - ' $msg_taiwan #2' 'ftp2.tw.freebsd.org' - ' $msg_taiwan #3' 'ftp3.tw.freebsd.org' - ' $msg_taiwan #4' 'ftp4.tw.freebsd.org' - ' $msg_taiwan #6' 'ftp6.tw.freebsd.org' - ' $msg_taiwan #11' 'ftp11.tw.freebsd.org' + '$msg_slovenia $msg_v6' 'ftp.si.freebsd.org' + '$msg_south_africa $msg_v6' 'ftp.za.freebsd.org' + ' $msg_south_africa #2 $msg_v6' 'ftp2.za.freebsd.org' + ' $msg_south_africa #4' 'ftp4.za.freebsd.org' + '$msg_sweden $msg_v6' 'ftp.se.freebsd.org' + '$msg_taiwan #4' 'ftp4.tw.freebsd.org' + ' $msg_taiwan #5' 'ftp5.tw.freebsd.org' '$msg_uk' 'ftp.uk.freebsd.org' ' $msg_uk #2' 'ftp2.uk.freebsd.org' - ' $msg_uk #3' 'ftp3.uk.freebsd.org' - ' $msg_uk #4' 'ftp4.uk.freebsd.org' - ' $msg_uk #5' 'ftp5.uk.freebsd.org' - '$msg_ukraine' 'ftp.ua.freebsd.org' - '$msg_usa #1' 'ftp1.us.freebsd.org' - ' $msg_usa #2' 'ftp2.us.freebsd.org' - ' $msg_usa #3' 'ftp3.us.freebsd.org' - ' $msg_usa #4' 'ftp4.us.freebsd.org' - ' $msg_usa #5' 'ftp5.us.freebsd.org' - ' $msg_usa #6' 'ftp6.us.freebsd.org' - ' $msg_usa #8' 'ftp8.us.freebsd.org' - ' $msg_usa #10' 'ftp10.us.freebsd.org' - ' $msg_usa #11' 'ftp11.us.freebsd.org' - ' $msg_usa #13' 'ftp13.us.freebsd.org' + '$msg_ukraine $msg_v6' 'ftp.ua.freebsd.org' + '$msg_usa #5 $msg_v6' 'ftp5.us.freebsd.org' + ' $msg_usa #11 $msg_v6' 'ftp11.us.freebsd.org' ' $msg_usa #14' 'ftp14.us.freebsd.org' - ' $msg_usa #15' 'ftp15.us.freebsd.org' " # END-QUOTE local hline="$msg_select_a_site_thats_close" diff --git a/usr.sbin/bsdinstall/scripts/mirrorselect b/usr.sbin/bsdinstall/scripts/mirrorselect index a613a097e69a..279c5ef47cb6 100755 --- a/usr.sbin/bsdinstall/scripts/mirrorselect +++ b/usr.sbin/bsdinstall/scripts/mirrorselect @@ -39,108 +39,56 @@ BSDCFG_SHARE="/usr/share/bsdconfig" exec 3>&1 MIRROR=`bsddialog --backtitle "$OSNAME Installer" \ --title "Mirror Selection" --extra-button --extra-label "Other" \ - --menu "Please select the site closest to you or \"other\" if you'd like to specify a different choice. Also note that not every site listed here carries more than the base distribution kits. Only Primary sites are guaranteed to carry the full range of possible distributions. Select a site that's close!" \ + --menu "Please select the best suitable site for you or \"other\" if you want to specify a different choice. The \"Main Site\" directs users to the nearest project managed mirror via GeoDNS (they carry the full range of possible distributions and support both IPv4 and IPv6). All other sites are known as \"Community Mirrors\"; not every site listed here carries more than the base distribution kits. Select a site!" \ 0 0 16 \ - ftp://ftp.freebsd.org "Main Site"\ - ftp://ftp.freebsd.org "IPv6 Main Site"\ - ftp://ftp3.ie.freebsd.org "IPv6 Ireland"\ - ftp://ftp2.jp.freebsd.org "IPv6 Japan"\ - ftp://ftp4.se.freebsd.org "IPv6 Sweden"\ - ftp://ftp4.us.freebsd.org "IPv6 USA"\ - ftp://ftp1.freebsd.org "Primary"\ - ftp://ftp2.freebsd.org "Primary #2"\ - ftp://ftp3.freebsd.org "Primary #3"\ - ftp://ftp4.freebsd.org "Primary #4"\ - ftp://ftp5.freebsd.org "Primary #5"\ - ftp://ftp6.freebsd.org "Primary #6"\ - ftp://ftp7.freebsd.org "Primary #7"\ - ftp://ftp10.freebsd.org "Primary #10"\ - ftp://ftp11.freebsd.org "Primary #11"\ - ftp://ftp12.freebsd.org "Primary #12"\ - ftp://ftp13.freebsd.org "Primary #13"\ - ftp://ftp14.freebsd.org "Primary #14"\ - ftp://ftp.au.freebsd.org "Australia"\ - ftp://ftp2.au.freebsd.org "Australia #2"\ + ftp://download.freebsd.org "Main Site (GeoDNS)"\ + http://ftp.au.freebsd.org "Australia - IPv6"\ ftp://ftp3.au.freebsd.org "Australia #3"\ - ftp://ftp.at.freebsd.org "Austria"\ + ftp://ftp.at.freebsd.org "Austria - IPv6"\ ftp://ftp2.br.freebsd.org "Brazil #2"\ ftp://ftp3.br.freebsd.org "Brazil #3"\ - ftp://ftp4.br.freebsd.org "Brazil #4"\ - ftp://ftp.bg.freebsd.org "Bulgaria"\ - ftp://ftp.cn.freebsd.org "China"\ - ftp://ftp.cz.freebsd.org "Czech Republic"\ - ftp://ftp.dk.freebsd.org "Denmark"\ + ftp://ftp.bg.freebsd.org "Bulgaria - IPv6"\ + ftp://ftp.cz.freebsd.org "Czech Republic - IPv6"\ + ftp://ftp.dk.freebsd.org "Denmark - IPv6"\ ftp://ftp.fi.freebsd.org "Finland"\ - ftp://ftp.fr.freebsd.org "France"\ + ftp://ftp.fr.freebsd.org "France - IPv6"\ ftp://ftp3.fr.freebsd.org "France #3"\ - ftp://ftp4.fr.freebsd.org "IPv6 France #4"\ - ftp://ftp5.fr.freebsd.org "France #5"\ ftp://ftp6.fr.freebsd.org "France #6"\ - ftp://ftp7.fr.freebsd.org "France #7"\ - ftp://ftp8.fr.freebsd.org "IPv6 France #8"\ - ftp://ftp.de.freebsd.org "Germany"\ - ftp://ftp2.de.freebsd.org "Germany #2"\ - ftp://ftp4.de.freebsd.org "Germany #4"\ - ftp://ftp5.de.freebsd.org "Germany #5"\ - ftp://ftp7.de.freebsd.org "Germany #7"\ - ftp://ftp8.de.freebsd.org "Germany #8"\ - ftp://ftp.gr.freebsd.org "Greece"\ - ftp://ftp2.gr.freebsd.org "Greece #2"\ - ftp://ftp3.ie.freebsd.org "Ireland #3"\ - ftp://ftp.jp.freebsd.org "Japan"\ + ftp://ftp.de.freebsd.org "Germany - IPv6"\ + ftp://ftp1.de.freebsd.org "Germany #1 - IPv6"\ + ftp://ftp2.de.freebsd.org "Germany #2 - IPv6"\ + ftp://ftp5.de.freebsd.org "Germany #5 - IPv6"\ + ftp://ftp7.de.freebsd.org "Germany #7 - IPv6"\ + ftp://ftp.gr.freebsd.org "Greece - IPv6"\ + ftp://ftp2.gr.freebsd.org "Greece #2 - IPv6"\ + ftp://ftp.jp.freebsd.org "Japan - IPv6"\ ftp://ftp2.jp.freebsd.org "Japan #2"\ ftp://ftp3.jp.freebsd.org "Japan #3"\ ftp://ftp4.jp.freebsd.org "Japan #4"\ - ftp://ftp5.jp.freebsd.org "Japan #5"\ - ftp://ftp6.jp.freebsd.org "Japan #6"\ - ftp://ftp7.jp.freebsd.org "Japan #7"\ - ftp://ftp8.jp.freebsd.org "Japan #8"\ - ftp://ftp9.jp.freebsd.org "Japan #9"\ + ftp://ftp6.jp.freebsd.org "Japan #6 - IPv6"\ ftp://ftp.kr.freebsd.org "Korea"\ ftp://ftp2.kr.freebsd.org "Korea #2"\ ftp://ftp.lv.freebsd.org "Latvia"\ - ftp://ftp.nl.freebsd.org "Netherlands"\ + ftp://ftp.nl.freebsd.org "Netherlands - IPv6"\ ftp://ftp2.nl.freebsd.org "Netherlands #2"\ ftp://ftp.nz.freebsd.org "New Zealand"\ - ftp://ftp.no.freebsd.org "Norway"\ - ftp://ftp.pl.freebsd.org "Poland"\ - ftp://ftp.ru.freebsd.org "Russia"\ + ftp://ftp.no.freebsd.org "Norway - IPv6"\ + ftp://ftp.pl.freebsd.org "Poland - IPv6"\ + ftp://ftp.ru.freebsd.org "Russia - IPv6"\ ftp://ftp2.ru.freebsd.org "Russia #2"\ - ftp://ftp5.ru.freebsd.org "Russia #5"\ - ftp://ftp6.ru.freebsd.org "Russia #6"\ - ftp://ftp.sk.freebsd.org "Slovak Republic"\ - ftp://ftp2.sk.freebsd.org "Slovak Republic #2"\ - ftp://ftp.si.freebsd.org "Slovenia"\ - ftp://ftp.za.freebsd.org "South Africa"\ - ftp://ftp2.za.freebsd.org "South Africa #2"\ + ftp://ftp.si.freebsd.org "Slovenia - IPv6"\ + ftp://ftp.za.freebsd.org "South Africa - IPv6"\ + ftp://ftp2.za.freebsd.org "South Africa #2 - IPv6"\ ftp://ftp4.za.freebsd.org "South Africa #4"\ - ftp://ftp.se.freebsd.org "Sweden"\ - ftp://ftp4.se.freebsd.org "Sweden #4"\ - ftp://ftp.ch.freebsd.org "Switzerland"\ - ftp://ftp.tw.freebsd.org "Taiwan"\ - ftp://ftp2.tw.freebsd.org "Taiwan #2"\ - ftp://ftp3.tw.freebsd.org "Taiwan #3"\ + ftp://ftp.se.freebsd.org "Sweden - IPv6"\ ftp://ftp4.tw.freebsd.org "Taiwan #4"\ - ftp://ftp6.tw.freebsd.org "Taiwan #6"\ - ftp://ftp11.tw.freebsd.org "Taiwan #11"\ - ftp://ftp.uk.freebsd.org "UK"\ - ftp://ftp2.uk.freebsd.org "UK #2"\ - ftp://ftp3.uk.freebsd.org "UK #3"\ - ftp://ftp4.uk.freebsd.org "UK #4"\ - ftp://ftp5.uk.freebsd.org "UK #5"\ - ftp://ftp.ua.freebsd.org "Ukraine"\ - ftp://ftp1.us.freebsd.org "USA #1"\ - ftp://ftp2.us.freebsd.org "USA #2"\ - ftp://ftp3.us.freebsd.org "USA #3"\ - ftp://ftp4.us.freebsd.org "USA #4"\ - ftp://ftp5.us.freebsd.org "USA #5"\ - ftp://ftp6.us.freebsd.org "USA #6"\ - ftp://ftp8.us.freebsd.org "USA #8"\ - ftp://ftp10.us.freebsd.org "USA #10"\ - ftp://ftp11.us.freebsd.org "USA #11"\ - ftp://ftp13.us.freebsd.org "USA #13"\ + ftp://ftp5.tw.freebsd.org "Taiwan #5"\ + ftp://ftp.uk.freebsd.org "UK - IPv6"\ + ftp://ftp2.uk.freebsd.org "UK #2 - IPv6"\ + ftp://ftp.ua.FreeBSD.org "Ukraine - IPv6"\ + ftp://ftp5.us.freebsd.org "USA #5 - IPv6"\ + ftp://ftp11.us.freebsd.org "USA #11 - IPv6"\ ftp://ftp14.us.freebsd.org "USA #14"\ - ftp://ftp15.us.freebsd.org "USA #15"\ 2>&1 1>&3` MIRROR_BUTTON=$? exec 3>&- From nobody Mon Jan 16 18:27:37 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NwgVf0MNSz2t2CZ; Mon, 16 Jan 2023 18:27:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NwgVd6tpvz3hRF; Mon, 16 Jan 2023 18:27:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673893658; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dmqTaefyZmGX+/7Ta+TLCpE6m27cI6n+ejrDMmvNLMU=; b=DIt2CnftxafUag+CB7aw6WDQY+UJ0OBCbAXDAVUjDf/tTYt6wShtUYBjhFuvtxe2yb2zSn O2kx2SbOzIh6ppwYECWcxcnv8WFLKsa4bP05nmTMPfpXEcwTqeMuj8rYkxSLoSypfvSb5U p+EKi6LCWiUemXisbaDLpO6zEO2oErMR+E9L3/EfX+gAOAhcCaHu8LoUT9KYaEcDjooM1C bTnvkfu0oyRIyEnpKHJGxwi9Cgjvt6LttuJxX/B5Sf6ePGIAm+TaRLxQ4WkaGUZQ31h1BO nbGeaKhsqhYyLNHlscooXS/Dd038OKqOT3zzRozx+DgCeI862Ss0wGypm0ObGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673893658; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dmqTaefyZmGX+/7Ta+TLCpE6m27cI6n+ejrDMmvNLMU=; b=VpQ/ddseeWNuFgmNBc42tl+NnCqiyXaW3eJ6GJuOmj+wmK9NrJtJKzkFtgcMdoxoj5ngqW yZoy4bXiUZPPN6IvxJRPrQU7CNDFAWOhX9Ir5ArPRGnOPX5Ae+k5KA5j4JKan6+nP2s577 1PPtqzylCVJcKymEnxsKZxk8r9p0ZX7H+qfitJfZjz7Jr76gfCFQdT4fGovghMx4hLW9+J vDOYxKPAdmUSelCE9kcybDR9xqhfN8Dq1ShsbS+eFQjbV9Ss65hxbDZsxqqCHshPDLVEMe LPaGPbd4LE3TSFgd5DGdxx/2HEgJpm8MVYMAaDO4gpZ19u5bHDlGSY0VCUY3qw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1673893658; a=rsa-sha256; cv=none; b=wCyqfiNAQHXN8sm6eFIqTtxO06W8NtVkBDUHzCV+mSxGCwtWyM6+Pt/EWVoDNaZhZst6Wu q3CoyWVEoQmPtZWQRAmdAOMvZ9d0tmBUxUok9PawH73ysluGEIbEt2ahkVjXSffSOV3JX5 b6GsOGk5pIpTukGJTJkrBRpp3I5fHoDa8EhFugTV/B9NXGrhdnqhOWonbuFqksgqKZjN78 +piPSwgUd5XM6k7IgjqAnnp+Va2bWOs71uGoMMlcB32E+OpaRAu5hNR5xHxm/3/+dEY3wc PIXtEc+XcE6QWj7fwPKK/yRJm1dNCUK4qwMc9QlwMa5WasCX+VlwEXs4XCaj9Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NwgVd5w1Bz1GpK; Mon, 16 Jan 2023 18:27:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30GIRbYS078432; Mon, 16 Jan 2023 18:27:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30GIRbbn078431; Mon, 16 Jan 2023 18:27:37 GMT (envelope-from git) Date: Mon, 16 Jan 2023 18:27:37 GMT Message-Id: <202301161827.30GIRbbn078431@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: c0c1c599c0ca - main - linuxkpi: Define `GFP_NOFS` in `linux/gfp.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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c0c1c599c0ca7e8a15509503991f8cd97c292bea Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=c0c1c599c0ca7e8a15509503991f8cd97c292bea commit c0c1c599c0ca7e8a15509503991f8cd97c292bea Author: Jean-Sébastien Pédron AuthorDate: 2022-12-30 09:49:08 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-01-16 18:11:52 +0000 linuxkpi: Define `GFP_NOFS` in `linux/gfp.h` Reviewed by: emaste, manu Approved by: emaste, manu Differential Revision: https://reviews.freebsd.org/D37910 --- sys/compat/linuxkpi/common/include/linux/gfp.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/compat/linuxkpi/common/include/linux/gfp.h b/sys/compat/linuxkpi/common/include/linux/gfp.h index a2930b44b0c4..55558500dd30 100644 --- a/sys/compat/linuxkpi/common/include/linux/gfp.h +++ b/sys/compat/linuxkpi/common/include/linux/gfp.h @@ -72,6 +72,7 @@ #define GFP_HIGHUSER_MOVABLE M_WAITOK #define GFP_IOFS M_NOWAIT #define GFP_NOIO M_NOWAIT +#define GFP_NOFS M_NOWAIT #define GFP_DMA32 __GFP_DMA32 #define GFP_TEMPORARY M_NOWAIT #define GFP_NATIVE_MASK (M_NOWAIT | M_WAITOK | M_USE_RESERVE | M_ZERO) From nobody Mon Jan 16 18:27:38 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NwgVg1SL4z2t2QS; Mon, 16 Jan 2023 18:27:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NwgVg1074z3hRZ; Mon, 16 Jan 2023 18:27:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673893659; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xQFK6AyiWfvlvbowweLwqwzouwRJA+QiFO0v3gCRSsY=; b=JB0pXpNcqif+iPOYo7bN5E8Uzh1IGRsC1a7W/Rtazjt4DAhJdqZlNMb7dmFYcyqwpLtXeb MgSArvSzCWfVG9grr3Dezu2kCNwQlZkM84EP45Wk7AyKo3v8k0tXo9HrvlzeGCvqydxzNh eutp3zHdTmfITeHloi3ybA4q2yqsqkda/2SQPqi/aZrCrTOs/8i8SBa3u0J/WU+GMdvn/L EipiTGC+fs/i1gRApSFXQAUDdENkTsTdk4IkjD1g/q4Xkj9pjbO2cEWwW5NUa9xo/ClqXE oan467HLn41e+t7FNUrKlCcCuLhJmTcM/EtjMF6gNAvQihLxh922/JjHkC3WmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673893659; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xQFK6AyiWfvlvbowweLwqwzouwRJA+QiFO0v3gCRSsY=; b=s3yx6GU7Txt08wjEPiXYg1H3LkF05VyI8bEfnYUVFQG8Zpj2THyORFu7RoO13hwWUW0u9+ Cq3lUJKvpotx4XT+CofYIXnybakFmkh9wAwoNNJTTCENjHaC1xha7zYUa6ojIBtn4krpEt m5PiMyAP3wFz5WFcB/cYbNIItAvEpfCI3K9qxmyjqnW+qLbxxpGMivPv7lM/0e0o7jyNft TkHC8JOzb0R4KuRjrcmelz6F29beHByaOOCC49X4BbHuOmA62I6KOyOdzi07S5ZX66CPaZ R85fCedDVV4DVpISX9u/ESv69yYmdo4JuoVskbZojkRzJNyU6U1IUZ0L+lmnCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1673893659; a=rsa-sha256; cv=none; b=b9U9m3qORw6mC7gPKPzw9krDZ6k+3670nWNZZgGPEhEle4tx2EgHMl1X18D0YExfp+YNSF dBHAZDM6ruq0rlmU11FyUv2QuysGXg8qIlHFokfB050qFfqExw/4CXSYEF6OUg841dkpkC kVm58zrDsuk8+3nj1AToj/RTJR0EuRqgqbY6PoaGQjPPGUKjjhyLL1gxjFZzhtLvTOltug BKjgnR++IOwok+T40OZ+LRbv7bBNXMpG4IdVbOkf6ARnPPeVETBOpacr6hzxOsUhrENplB umynMYomYv46E/bXSUGnnCyf8zzTkCkd3Wcv3Ouu/KMFWqSepEMR2Uind3g4MA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NwgVf6qDxz1G9x; Mon, 16 Jan 2023 18:27:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30GIRcYV078468; Mon, 16 Jan 2023 18:27:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30GIRc69078467; Mon, 16 Jan 2023 18:27:38 GMT (envelope-from git) Date: Mon, 16 Jan 2023 18:27:38 GMT Message-Id: <202301161827.30GIRc69078467@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 3aa335d00ac8 - main - linuxkpi: Add `gfp_mask` field to `struct shrink_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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3aa335d00ac860565d106eb47e931206641cd653 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=3aa335d00ac860565d106eb47e931206641cd653 commit 3aa335d00ac860565d106eb47e931206641cd653 Author: Jean-Sébastien Pédron AuthorDate: 2022-12-30 09:56:46 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-01-16 18:11:58 +0000 linuxkpi: Add `gfp_mask` field to `struct shrink_control` bz@ asked if the KBI breakage is a concern here. My answer was that this is the first time in the DRM drivers in Linux 5.13 (the version I'm working on) that this structure is initialized (as a variable local to the function in this case), so it shouldn't be a problem for the DRM drivers. However, I can't speak for other drivers maintained outside of the src tree. Reviewed by: emaste, manu Approved by: emaste, manu Differential Revision: https://reviews.freebsd.org/D37913 --- sys/compat/linuxkpi/common/include/linux/shrinker.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/shrinker.h b/sys/compat/linuxkpi/common/include/linux/shrinker.h index 05f702e62fd5..39ea35f0a862 100644 --- a/sys/compat/linuxkpi/common/include/linux/shrinker.h +++ b/sys/compat/linuxkpi/common/include/linux/shrinker.h @@ -29,8 +29,10 @@ #define _LINUXKPI_LINUX_SHRINKER_H_ #include +#include struct shrink_control { + gfp_t gfp_mask; unsigned long nr_to_scan; unsigned long nr_scanned; }; From nobody Mon Jan 16 18:27:39 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NwgVh1k2vz2t2L2; Mon, 16 Jan 2023 18:27:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NwgVh1F2qz3j0s; Mon, 16 Jan 2023 18:27:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673893660; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/s7C68vQYuqWIhkqXqITxUelsY1qv8AE6073zvQwvPs=; b=DQDK4rPz8QnbBUJkL9VnetSPKFAllDKrAn7vISXr24Efyyok2pTzvD+ufgsmFogQuhV8Vw aobnsDd7G0BmG5lCXaHewIgFOVdFzgRgnxSfRuAn7g84So7qFS0+td/0VnxxNhl+Fqkz1t mkJDwtcI3pDz5kIfGfgt92SY282KKBAXFu84KbmzbaRcYzO5qm9TZTeIdBGznEswnEzTl8 hNhrKyPVnuY+oiOai9wDOzlAYMm1WQGZm9bbrOjg84XNuSAri+a9czcIKsL0issE+W+OSq GucM0Uxb13hbp0EFs5GChOSzQdzF9KOg7ZAaMF56YXa/N/7hg+6SqGUZr/a1ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673893660; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/s7C68vQYuqWIhkqXqITxUelsY1qv8AE6073zvQwvPs=; b=tgYtdEoyJKnt+VAdObXe4ljxtacDHspknY1UU/9u5mr5AWZqcVGWO4fiQDMH7XPbkIHyp6 S7q5aKzAEeD5S9pRL8COe4mZGQVbaIGe5evHVWsuZz4MhvLLKecuRuFwwkNK6w1sUp5Zlf gb4LqRZbuIRE+CSBmoV+cPPRddRPZWv6Q0IbP9NRNKNyE2gbkFdrbVY6tzrBdH63sdPQQY TSMwmNM4wEL9oiB2Ze94lMoc/Rxd8qSFamRJgmKyc4EKY4VFwlayAUAeCGgxzYkulV/3oI V5iasMIAeVKTo3ZAF5zPHBZ7ELCCldot02Q30oor3DMlTe1jwYQjci5c6sAEUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1673893660; a=rsa-sha256; cv=none; b=MxONxHX3iFlzhDvKYxXeLqnK9m8fnk3CtoirofzNeGyJMar9HhK8WJSZGISBHOcgi10icF paJF2sB0P5vHs6wxdwW1G8MXqxxbrjKirwEM699ZsjbE6U3jFQZtt6YBoDUYFWUKiWbBn8 sl0PmIPWDevgOQzyesYKTO6zjZWztXr2wwy1bdSx6KnQyRne3vKSj2eFnSfENLQoKloiPM 1GjVNMDA0LX7bdFDF58m9djCpF0DRAXhK06krksUwCxtbUI9yvIrS/nXUiwCWf4fRYFx5F QIwkrDCu6/E01BtOH61Y6qSUjW3LwKROYRW/bCVJofHWHIQDElhyo3Ob4VEysg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NwgVh0L4Cz1Gq6; Mon, 16 Jan 2023 18:27:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30GIRdtJ078499; Mon, 16 Jan 2023 18:27:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30GIRduF078498; Mon, 16 Jan 2023 18:27:39 GMT (envelope-from git) Date: Mon, 16 Jan 2023 18:27:39 GMT Message-Id: <202301161827.30GIRduF078498@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: ed53e350d703 - main - linuxkpi: Define `ioremap_cache()` List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ed53e350d703b9e3ab78d137fd59a5a9dfef8b3f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=ed53e350d703b9e3ab78d137fd59a5a9dfef8b3f commit ed53e350d703b9e3ab78d137fd59a5a9dfef8b3f Author: Jean-Sébastien Pédron AuthorDate: 2022-12-30 10:36:24 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-01-16 18:11:58 +0000 linuxkpi: Define `ioremap_cache()` It uses the `VM_MEMATTR_WRITE_BACK` flag on FreeBSD. It replaces `ioremap_wb()` which doesn't exist in Linux. Perhaps it existed in the past and was removed. Reviewed by: emaste, manu Approved by: emaste, manu Differential Revision: https://reviews.freebsd.org/D37916 --- sys/compat/linuxkpi/common/include/linux/io.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/io.h b/sys/compat/linuxkpi/common/include/linux/io.h index 64e8b294eeff..598ff8e0376d 100644 --- a/sys/compat/linuxkpi/common/include/linux/io.h +++ b/sys/compat/linuxkpi/common/include/linux/io.h @@ -424,7 +424,7 @@ _ioremap_attr(vm_paddr_t _phys_addr, unsigned long _size, int _attr) #else #define ioremap_wc(addr, size) ioremap_nocache(addr, size) #endif -#define ioremap_wb(addr, size) \ +#define ioremap_cache(addr, size) \ _ioremap_attr((addr), (size), VM_MEMATTR_WRITE_BACK) void iounmap(void *addr); @@ -496,7 +496,7 @@ memremap(resource_size_t offset, size_t size, unsigned long flags) void *addr = NULL; if ((flags & MEMREMAP_WB) && - (addr = ioremap_wb(offset, size)) != NULL) + (addr = ioremap_cache(offset, size)) != NULL) goto done; if ((flags & MEMREMAP_WT) && (addr = ioremap_wt(offset, size)) != NULL) From nobody Mon Jan 16 18:27:41 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NwgVj47Xmz2t2T4; Mon, 16 Jan 2023 18:27:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NwgVj2bZyz3hpx; Mon, 16 Jan 2023 18:27:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673893661; h=from:from:reply-to:subject:subject: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+TGsOOUaKqljBw2Rq9xE9P1nTLQov5u+kJX4H+fQOU=; b=VP3vi1g8V3/2gGwIKLdbZAmo4AsXQdRGPRoZ6ZMaW7t8tGMAEtQEezYBHtgyqDoo49kGBL oiODSaMke6B60ogJdqt+d2fjLYVGpYl2RdZ57noJY/4cmvrc23C0DvTlo+pJ+0chGz7Zmj lMpk7/7KStacf8DWw+NB5eNq6uW5uP/q3sy9azFZWbJAGH+DB8kQroCFa+AOCzEjgmnibw /F5q02LPE2D8ry4SxH1TJHtrKC79CGw51rSMkoNmGeWZwgAQ9bQj5U5h5vXDw0cJ1FvbuO 16F/DwQfjqVCIaMw7X7vZwvUQ2pTJdYWxBeThJ8h36+Bjv7fkopbaX5hlNDNZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673893661; h=from:from:reply-to:subject:subject: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+TGsOOUaKqljBw2Rq9xE9P1nTLQov5u+kJX4H+fQOU=; b=tanGJQgFkL0eN0tDWzjfecIopgjaTIL7j0bepkZ8MjDnnfweJTb7VmQwhx45AltG0VedMR pWNKkmGcNCkJPMU/qBuVIqDGJtSF8n+eUaX+WVJjV9eA+Edle3XgUfr1vvM+JQqJJUwvU2 xDr4vrQy6rKtdYxSjboCRdwqJGcQ1ONxZVrn6K1eogRcHZzNrVLsw6QnEhvIuwrQepHyfS JJ8SS/dWh4Nd2y/FwlI0aly8S7uoMjfgw9Xb0E2ed20QlFVzWEnzL24HA1IRVzbffnQjZs 68oLGq7DerPmWlr13eDpopOTBYZdNLHR4TFUbUHqR9UOu0mVmXVbXFYAWQb4bg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1673893661; a=rsa-sha256; cv=none; b=os5FjNYlATC75V7CYMuRZlKND0nsyhFTGNnLuUb0zSv+mWfTO1wZDcuUFzZtiQMLhcus4n TStKintiB2U7ldD//wa/0ttHLGvDO2W5mIttXWhx0gGIjdpxue9tqc86kMR0Gqrgkpv1sy 7wBuHbj/BcmaQNyTaI72BhHg6ph8OZI5XAclYvd+8Arrj1+qzjdMi9XbuNiMjjBknU4gFa n6ROMuYrw9fvyBfM2AXXRRIiX6w+x0FicWxUbTP1z7sXSx2dwMlOEn4N1fQwPo4wB+QfcN LrO5l+e55Z2C294XfQo1Cf/+NMobtGdQ3xC6oL3CtkBGNYuWlQzmydSEIWrRcw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NwgVj1bBnz1GQP; Mon, 16 Jan 2023 18:27:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30GIRfE1078529; Mon, 16 Jan 2023 18:27:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30GIRfIL078528; Mon, 16 Jan 2023 18:27:41 GMT (envelope-from git) Date: Mon, 16 Jan 2023 18:27:41 GMT Message-Id: <202301161827.30GIRfIL078528@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: cf8f392260bf - main - linuxkpi: Add `memalloc_noreclaim_save()` and `memalloc_noreclaim_restore()` List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cf8f392260bf8e9b4e088f26f81ddb96bd97e91c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=cf8f392260bf8e9b4e088f26f81ddb96bd97e91c commit cf8f392260bf8e9b4e088f26f81ddb96bd97e91c Author: Jean-Sébastien Pédron AuthorDate: 2023-01-02 20:59:17 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-01-16 18:27:16 +0000 linuxkpi: Add `memalloc_noreclaim_save()` and `memalloc_noreclaim_restore()` They are no-ops. Reviewed by: emaste, manu Approved by: emaste, manu Differential Revision: https://reviews.freebsd.org/D37933 --- sys/compat/linuxkpi/common/include/linux/sched/mm.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/sched/mm.h b/sys/compat/linuxkpi/common/include/linux/sched/mm.h index 613473e142a9..c26d99378974 100644 --- a/sys/compat/linuxkpi/common/include/linux/sched/mm.h +++ b/sys/compat/linuxkpi/common/include/linux/sched/mm.h @@ -36,5 +36,8 @@ #define memalloc_nofs_save(x) 0 #define memalloc_nofs_restore(x) do { \ } while (0) +#define memalloc_noreclaim_save(x) 0 +#define memalloc_noreclaim_restore(x) do { \ + } while (0) #endif /* _BSD_LKPI_LINUX_SCHED_MM_H_ */ From nobody Mon Jan 16 18:27:42 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NwgVk42ctz2t2J4; Mon, 16 Jan 2023 18:27:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NwgVk3Pydz3j3x; Mon, 16 Jan 2023 18:27:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673893662; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iVkIIg+KUw7ZzO2WAqE54+yD3CoA4mNvIbPQDacesWU=; b=pisYoV0zRo3qRqTNB7htozHQsu77KpiOAfIMRhMPUmKWYA6+u09BMg2n+3kSxT+sV/Q+0v qSt0QR8EP5nk7+5FadJ6dzSQweRhE3CfetTp2Es/bpKRjCPUXF/MH0tiEaiNQTfBB9iOJS n4diCV4C5DFngEBhAoXR2U16zq530PgkjPxUwiAMUi9+dEofxjjwzuRxr0JoG5S2cjoApS JbmpOQjmeyJPR0IbJAmVtLDjcylExG6mHRDEYvfZzGCXVjrULdCAjxyAdcUhEkYd4rhDWe amaRP4PyvfBi6pZFIeBvPDhAJHEle66Ax6LKPWrD1k43tkMTYvwacKTE2htykw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673893662; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iVkIIg+KUw7ZzO2WAqE54+yD3CoA4mNvIbPQDacesWU=; b=ryk4R63EmvDA9uYrhxxoXQXVtm2CeVWdeM0qFus8JPdpUDYmYpYpbD749dcNV+fJL4P9h/ ZWkBU+YSugMOJjTOtha4oqn8zJrKucDqTAC/0sn9ErRqWyqJDgIXtyHItRACzOznXYIXjF P7oUcZHFj0sGHSM57ytKwyt0nRhPkpgk9oYZOwZ4Qmh9645kri3AUz9+o/06AB48T2Tdn8 /sB4gXnvIBHSRR3s6W6EQCuwNh9HibRK0BNo18yssle98E+mzOHJHfcmPMfFzD6fHExRj/ Lv6u+vWIGsqm7m0x6OorzuB1rAPvXcS+1GM0bkaNcTu+zKo/kxq/8OCKMNZvgQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1673893662; a=rsa-sha256; cv=none; b=HrDzT3y/+3qKnlpfAqyJmEMUu6YZJnjvR4G4xZhMANbElh7oB+cBtnNZ7P1hcepW1vHQsn fi/tWd3ktA48m2NQPyVojAq46jEjArKYFF/MDA2IrRudbXyU6s2Vx5s2/Vr7/0YVn1qFD9 /wG8Dy6+5lYKh8RbrBqm+VTHpGJm1eYgRNMpi7qU4wr4FIISudaUjm4LKCj9htU8pUs57v LvqmB/E5Io6r8XLpM80UwcLEAOkVjDMOIZXhIO5yVGpByBUNBY/7G+r89l8TRgM4oxeANO mCzRN5GN/NasT96MZKYVsP6Y9a+6aFZgTONHcyvSt90ADjoscskm8Oqyw33lSw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NwgVk2X6qz1GKV; Mon, 16 Jan 2023 18:27:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30GIRgO1078560; Mon, 16 Jan 2023 18:27:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30GIRgIZ078559; Mon, 16 Jan 2023 18:27:42 GMT (envelope-from git) Date: Mon, 16 Jan 2023 18:27:42 GMT Message-Id: <202301161827.30GIRgIZ078559@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: e8ce32bea30d - main - linuxkpi: Define EBADSLT to 57 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e8ce32bea30d599b481735a1d1b0a87ac06c5a66 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=e8ce32bea30d599b481735a1d1b0a87ac06c5a66 commit e8ce32bea30d599b481735a1d1b0a87ac06c5a66 Author: Jean-Sébastien Pédron AuthorDate: 2023-01-02 22:48:16 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-01-16 18:27:21 +0000 linuxkpi: Define EBADSLT to 57 This is the same error code as Linux. As emaste@ noted in the review, FreeBSD defines the following errno values in `sys/errno.h`: * 56 is `EISCONN` * 57 is `ENOTCONN` Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D37935 --- sys/compat/linuxkpi/common/include/linux/errno.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/compat/linuxkpi/common/include/linux/errno.h b/sys/compat/linuxkpi/common/include/linux/errno.h index 72d8af6779a5..796203422d23 100644 --- a/sys/compat/linuxkpi/common/include/linux/errno.h +++ b/sys/compat/linuxkpi/common/include/linux/errno.h @@ -34,6 +34,7 @@ #include #define EBADRQC 56 /* Bad request code */ +#define EBADSLT 57 /* Invalid slot */ #define ECHRNG EDOM #define ETIME ETIMEDOUT From nobody Mon Jan 16 19:00:27 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NwhDW3lB8z2t5S9; Mon, 16 Jan 2023 19:00: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NwhDW358Bz3m7W; Mon, 16 Jan 2023 19:00:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673895627; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e+6B4UZrziaz6WFxViTa7jcYr25cc7XnrRRhE22s9QU=; b=W1SltXwjIEIxAhFWa3E5I59q0gHhYMsC8gIRvh+VfIiRRc+WEr33HSAeATems5uLW43CDN 6cxfI00orFaEVKrIId1C+HsryLteLTtCfXx8IZVC1ojBZ1jtBDphsto7dSm4Ku8R+cpimt cFdHlK1j7fRdF/Qkcr7FDywsvHI9ofHHLe/Lv/a6UFGWqyZkkuj0ZLQNIWuKlRjH00iDtY YM9gJBHCzZys6vb4DLc30fW/GW0j2UFHfbAdC+Spkss29a50QmICCoi/QfNUfsnDpThF/l fWZosa6Nhhhm1y/RKEVvvYArISkYnO1iur+qDGeYpZocipG6Flr5WvmHXvQhCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673895627; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e+6B4UZrziaz6WFxViTa7jcYr25cc7XnrRRhE22s9QU=; b=GykDDb5k1yUls+2uHFWB6jzlGXdXGsAPUx+yoNuoyVXLwbkIBxfkMyZOxwjo0r0+qT565x YnO3WHdfsgI5ePTJtlghufT0lxRdkJxh0LvFwFbjK2enogUXjUTuj8x1oSNzsfrs3wgOJv ehhNfPFtR7gaJTiomKnbtm/cQXZeM6SjgrU5w+JQbr5jL26vWz8AJmoBK7PMyRa5P1h9+5 ryXJd6pAWRNXfMmf8L/dPrDhzg3GgwLcL3TjZ3G1R9DMPWlNPH12Eg8iEeOesP+N0Dmpl8 /nivDUAcaJ36BsYFUg7zjoWEoPzDoM00b5Jv6eJiSWFQoEBliUYqlxNx3lxmRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1673895627; a=rsa-sha256; cv=none; b=XLqfotEMkUvJTUfFkjNt4hMXLYJiceVGawMurzUTzAT6MVSuuQY9Kjxx7y7INSOGct1Bhs Kpd19RqV2Nd5ybOWz/ZalxbEa8FYiKoGwfSvDAkmsXupJ2TEAbTOUhT2Rr6v1pMhjpk8bq Bj88yLzWNlRGnFbTJ7rlWfwcHWnaP659PrkS58xXINya9TFzXpwc700BgtslNISI4bUAF+ TVviaMgDTYmxAbNrfmUD3vSCDk2K3NEsVtL+FuRTtgvE7advEKWRIMzxNj9JLZKJzTrNqj 7PW07z1II+mgOQIEzNPEobUhPpuOWz1BZuICbJtcHQ1OjX6fhfC/m7mqGsuDFA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NwhDW27bDz1Gvl; Mon, 16 Jan 2023 19:00:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30GJ0Rjd031138; Mon, 16 Jan 2023 19:00:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30GJ0RDJ031137; Mon, 16 Jan 2023 19:00:27 GMT (envelope-from git) Date: Mon, 16 Jan 2023 19:00:27 GMT Message-Id: <202301161900.30GJ0RDJ031137@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ceri Davies Subject: git: 4a312c21faeb - main - lagg.4: update wireless example, document laggtype List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ceri X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4a312c21faebdbe68c7f99ad17130188e1e23657 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by ceri (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=4a312c21faebdbe68c7f99ad17130188e1e23657 commit 4a312c21faebdbe68c7f99ad17130188e1e23657 Author: Ceri Davies AuthorDate: 2023-01-16 18:53:30 +0000 Commit: Ceri Davies CommitDate: 2023-01-16 18:56:13 +0000 lagg.4: update wireless example, document laggtype The wireless example in lagg(4)'s manpage no longer works, so update. laggtype is not documented in the manpage other than in the example, so add a paragraph about it. While here, move section on rc.conf somewhere it sits more logically. Reviewed by: pauamma Differential Revision: https://reviews.freebsd.org/D31315 --- share/man/man4/lagg.4 | 51 ++++++++++++++++++++++++++++++++------------------- 1 file changed, 32 insertions(+), 19 deletions(-) diff --git a/share/man/man4/lagg.4 b/share/man/man4/lagg.4 index f7d8e1c5e1f5..b46566120050 100644 --- a/share/man/man4/lagg.4 +++ b/share/man/man4/lagg.4 @@ -16,7 +16,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 21, 2020 +.Dd January 16, 2023 .Dt LAGG 4 .Os .Sh NAME @@ -43,6 +43,18 @@ interface allows aggregation of multiple network interfaces as one virtual .Nm interface for the purpose of providing fault-tolerance and high-speed links. .Pp +Each +.Nm +interface is created at runtime using interface cloning. +This is +most easily done with the +.Xr ifconfig 8 +.Cm create +command or using the +.Va cloned_interfaces +variable in +.Xr rc.conf 5 . +.Pp A .Nm interface can be created using the @@ -79,7 +91,7 @@ the next active port is used. The first interface added is the master port; any interfaces added after that are used as failover devices. .Pp -By default, received traffic is only accepted when they are received +By default, received traffic is only accepted when it is received through the active port. This constraint can be relaxed by setting the .Va net.link.lagg.failover_rx_all @@ -123,18 +135,6 @@ disabling the interface itself. .El .Pp -Each -.Nm -interface is created at runtime using interface cloning. -This is -most easily done with the -.Xr ifconfig 8 -.Cm create -command or using the -.Va cloned_interfaces -variable in -.Xr rc.conf 5 . -.Pp The MTU of the first interface to be added is used as the lagg MTU. All additional interfaces are required to have exactly the same value. .Pp @@ -152,6 +152,17 @@ flag. The default for new interfaces is set via the .Va net.link.lagg.default_use_flowid .Xr sysctl 8 . +.Pp +When creating a +.Nm +interface, the +.Ic laggtype +can be specified as either +.Cm ethernet +or +.Cm infiniband . +If neither is specified then the default is +.Cm ethernet . .Sh EXAMPLES Create a link aggregation using LACP with two .Xr bge 4 @@ -182,16 +193,18 @@ between wired and wireless networks using two network devices. Whenever the wired master interface is unplugged, the wireless failover device will be used: .Bd -literal -offset indent -# ifconfig em0 up -# ifconfig ath0 ether 00:11:22:33:44:55 -# ifconfig create wlan0 wlandev ath0 ssid my_net up +# ifconfig em0 ether 00:11:22:33:44:55 up +# ifconfig wlan0 create wlandev ath0 ssid my_net up # ifconfig lagg0 create # ifconfig lagg0 laggproto failover laggport em0 laggport wlan0 \e 192.168.1.1 netmask 255.255.255.0 .Ed .Pp -(Note the mac address of the wireless device is forced to match the wired -device as a workaround.) +(Note the MAC address of the wired device is forced to match that of the +wireless device, +.Sq 00:11:22:33:44:55 +in this example, as some common wireless devices will not allow MAC +addresses to be changed.) .Pp The following example shows how to create an infiniband failover interface. .Bd -literal -offset indent From nobody Mon Jan 16 19:00:28 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NwhDX47SSz2t5SF; Mon, 16 Jan 2023 19:00: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NwhDX3Y6mz3mGf; Mon, 16 Jan 2023 19:00:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673895628; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=41yH3aL57qmKbX8UgQGJd45Dm1Xk1Vr7rhUIUHKRIUw=; b=w1Uk0h1WOhoEQTtRSEaeens977dCTu8Q9yJNfF0rltHOITgwdRQJwYU2vyAsKu2vMEJ8Lz sqNIfLAvgJQWKVSNEkDfwiOGJikbN1ro8uGj7xn0wPNXjE/vfnNM0A2y24tQNN19x50sHe ziQTvKzKYeOlqawHWvUUxKxPO/G+ipFJZPCdKN3fB08K6eHg56ihguQaPvv4HlRvRRE1RE rn7ZzPc6ldiLtOb5MRojlhoX9XN4bBibcjnJMnXj2GPsu0eTxF0hMqRRUrdBJyQiCw8ohs befvovbC5edDdc1/R8iyB2mVNRQh8nxi+2B+NUdjA1mRnwJ5KDhrMeoe2KdMxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673895628; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=41yH3aL57qmKbX8UgQGJd45Dm1Xk1Vr7rhUIUHKRIUw=; b=FJL9on6AFugBd4kcnKS2Cz4p3aAIOMxft1ksmVcAd7WBe+NfoaDRni87qMsPrGHf1izI03 GqcXenhs1VnCsMpLcb8EvAQCUD+h5MCv2JjCwQamP8LbTWHgsHTfcis+4Sc2Qo2lQLqVfX n5UgexHFvODWeHfUKA540OApokXDK7cgWXJVT98r0R6xIDKElhg8dYSHqNy/2nyCecJCWF 7M8rXlx+qpsOCVfX1a00gAYBFD3SWuioBAbtdJ9yPEc2Ia3uRcAGts1kEPf+V73eUryO33 Qndzhw730S6dZU/3mrH82GA92Q3ZeZJhMdpaithqwxHr0PSs66Fo6PerReW0OQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1673895628; a=rsa-sha256; cv=none; b=Ngsl7hk1oUwmXxxIf2kzP+EQj1oY8PiPR4c7Edsh/xatarY0+rCPdaOQcLSYhSf+vNlbkd iEyKS0qrohYqJoL7x5Sd8kOTGaW3E/W85vDYc9WEqxOC5UweFw+yh9rUJNTZVD9F86/pu1 ImusekSbKFfm/rlZsK5Ki9d0Eo1IvJVXMhFfnT/D6TWaaOyXRTdlBiatJlgrBccqr1XS1D aP+SLgJyDV/fPh8O1x2iXGblqVpr4OKWfa/HtFJnJ0iyWUvzY7J50wK3xrBLiMEkxblvke hO9Umi8yrrDkbxqvZ8AzYZxchrYl8Vgk3q4CFR9Oyw364XapgndDFY4s2jP2sw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NwhDX2fXzz1HWQ; Mon, 16 Jan 2023 19:00:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30GJ0SRC031166; Mon, 16 Jan 2023 19:00:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30GJ0S1N031165; Mon, 16 Jan 2023 19:00:28 GMT (envelope-from git) Date: Mon, 16 Jan 2023 19:00:28 GMT Message-Id: <202301161900.30GJ0S1N031165@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ceri Davies Subject: git: d9499d3f47f2 - main - bsdconfig: correct name of the wpa_supplicant config file List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ceri X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d9499d3f47f21d28074e5a82daf82784081a37a4 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by ceri (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=d9499d3f47f21d28074e5a82daf82784081a37a4 commit d9499d3f47f21d28074e5a82daf82784081a37a4 Author: Ceri Davies AuthorDate: 2023-01-16 18:56:45 +0000 Commit: Ceri Davies CommitDate: 2023-01-16 18:56:45 +0000 bsdconfig: correct name of the wpa_supplicant config file Approved by: maintainer timeout (dteske) Differential Revision: https://reviews.freebsd.org/D37750 --- usr.sbin/bsdconfig/include/messages.subr | 6 +++--- usr.sbin/bsdconfig/share/media/wlan.subr | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/usr.sbin/bsdconfig/include/messages.subr b/usr.sbin/bsdconfig/include/messages.subr index 47ef6876854b..de8a374728ea 100644 --- a/usr.sbin/bsdconfig/include/messages.subr +++ b/usr.sbin/bsdconfig/include/messages.subr @@ -67,7 +67,7 @@ msg_canada="Canada" msg_cancel="Cancel" msg_cancel_exit="Cancel/Exit" msg_cannot_create_permission_denied="%s: cannot create %s: Permission denied" -msg_cannot_edit_wireless_ssid="Cannot edit wireless configuration; no matches for\nSSID \`%s' in wpa_supplicants.conf(5)" +msg_cannot_edit_wireless_ssid="Cannot edit wireless configuration; no matches for\nSSID \`%s' in wpa_supplicant.conf(5)" msg_cannot_resolve_hostname="Cannot resolve \`%s'! Are you sure that your\nname server, gateway and network interface are correctly configured?" msg_cant_find_distribution="Warning: Can't find the \`%s' distribution on this\nFTP server. You may need to visit a different server for\nthe release you are trying to fetch or go to the Options\nmenu and set the release name to explicitly match what's\navailable on %s (or set to \"any\").\n\nWould you like to select another FTP server?" msg_cant_seem_to_write_out_resolv_conf="Can't seem to write out %s. Net cannot be used." @@ -144,7 +144,7 @@ msg_finance_desc="Monetary, financial and related applications." msg_finland="Finland" msg_floppy="Floppy" msg_forget_all="Forget All" -msg_forget_all_confirm="WARNING! Are you really sure you want to forget all known networks\nby re-initializing wpa_supplicants.conf(5)? This cannot be undone." +msg_forget_all_confirm="WARNING! Are you really sure you want to forget all known networks\nby re-initializing wpa_supplicant.conf(5)? This cannot be undone." msg_forget_all_help="Reset wpa_supplicant(8) configuration, forgetting all known networks" msg_found="found" msg_france="France" @@ -368,7 +368,7 @@ msg_shells_desc="Various shells (tcsh, bash, etc)." msg_show_all="Show All" msg_show_all_help="Show wireless networks without an SSID and all BSSIDs" msg_show_configured="Show Configured" -msg_show_configured_help="Show networks configured in wpa_supplicants.conf(5)" +msg_show_configured_help="Show networks configured in wpa_supplicant.conf(5)" msg_show_scan_results="Show Scan Results" msg_show_scan_results_help="Show wpa_cli(8) scan results" msg_skip="Skip" diff --git a/usr.sbin/bsdconfig/share/media/wlan.subr b/usr.sbin/bsdconfig/share/media/wlan.subr index f25cddff94cd..55910b77daf2 100644 --- a/usr.sbin/bsdconfig/share/media/wlan.subr +++ b/usr.sbin/bsdconfig/share/media/wlan.subr @@ -781,7 +781,7 @@ f_dialog_scan_wireless() # f_dialog_wireless_edit $ssid # # Display a menu to allow the user to either create a new entry for the -# wpa_supplicants.conf(5) file, or to edit values for an existing entry. +# wpa_supplicant.conf(5) file, or to edit values for an existing entry. # # If more than one wireless network is found to match $ssid, a sub-menu is # presented, allowing the user to select the desired network. @@ -914,7 +914,7 @@ f_dialog_wireless_edit() # # XXXDT Unfinished # This is where we display a menu that edits the entry - # And then we modify the wpa_supplicants.conf(5) config file + # And then we modify the wpa_supplicant.conf(5) config file # XXXDT Unfinished # @@ -1208,7 +1208,7 @@ f_menu_wpa_scan_results() # f_dialog_menu_wireless_edit # -# Display a list of wireless networks configured in wpa_supplicants.conf(5) and +# Display a list of wireless networks configured in wpa_supplicant.conf(5) and # (if wpa_supplicant(8) is running) also displays scan results for unconfigured # wireless networks. # @@ -1247,7 +1247,7 @@ f_dialog_menu_wireless_edit() fi if [ "$do_parse" -a "$DIALOG_MENU_WLAN_SHOW_CONFIGURED" ] then - f_dprintf "$funcname: Parsing wpa_supplicants.conf(5)" + f_dprintf "$funcname: Parsing wpa_supplicant.conf(5)" f_wpa_supplicant_parse "$conf_file" \ WIRELESS_ NWIRELESS_CONFIGS f_dprintf "%s: Parsed %i wireless configurations" \ @@ -1262,7 +1262,7 @@ f_dialog_menu_wireless_edit() # # Add both items scanned from the airwaves and networks - # parsed from wpa_supplicants.conf(5). Latter items are + # parsed from wpa_supplicant.conf(5). Latter items are # marked, sorted, and added to top of list above the # former (which are unmarked and sorted separately). # From nobody Mon Jan 16 20:25:51 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Nwk736F0sz2p4Zx; Mon, 16 Jan 2023 20:25: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Nwk735dY1z3vtS; Mon, 16 Jan 2023 20:25:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673900751; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x6nLepyWpMz843m8LzUUoge0YBH0oRH53Rogn87Udi8=; b=ZxAdcYEk43M1RBZs9iITviTthmoZJj+ZvNJBQmxrIam6+UZ78XnFl2I/r6O37kP0LQ5Sn9 CP6X6+pgFS6iXjIREeqxsdtc2knk0AciL9rTrUdTj1og/gC4xRNeYBKo8F14sEPkz+PVSA 9Keg3d6EtczZ01Pvmcw6EPbc3ZBLShXzmVbeLMSiKOeZblxVAJtXMcdQcORauJQfXU4vyy k2eVey056hoXoSuXT79E7rXwCLO+0h2TUnqRQzxFPPBFFLbCgAukV8v9UvMk8SDibZzen9 01N2bck0iKZij1QchZNdtNfYrvs7HWHJycKHFhoPZK7bcIKwwZlDCy+kt2M7+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673900751; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x6nLepyWpMz843m8LzUUoge0YBH0oRH53Rogn87Udi8=; b=KbOYFQeE/3t28t85unxT+RiPqsUs+mVBhG5jIFgIeOVDfqVt61FiosR3pFfqd54mx95uL5 w6d7npFzNT00Q3B6CC3GKVq1fWPa9wTHLlZj93dKtHd9LVG5H9YlOZR1nrRsQixqpHCGLl H56RdsQGt3VZ55jy7pXr9ChH5bmNyq2+a6WWCikrno1rpLzauI01gKMXWUJCke+HnOG1jV BK1ZwsvK5qeD9Nou8vICDapiipStX1k9+iB2rCIHn6hEBQY/gUwUSuOTjTmxz4AnRus/Yh 9n8Kyy+KUHJ+nW2mSLPZJcKoa8gyi5kzLMVeJumUP9GWMS1zcBj1WT/PCfbCXw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1673900751; a=rsa-sha256; cv=none; b=KRn7hmO/l09rsNQ5G1W2+oQe3RUNxFgHVtVwmwP8pccKvndtci30DZOaoPB4FtmZpTZndL RRWMyB0uDQ0JCFMdSzB7H9/EGElRqUMBEKpagfYjimmaxqODfBhfDWlx0sWq8/g2txAezq NIkUlZBto439k4s2C1e9Rj94AclM9SZ1DQvO91YnGe4n10XNO3XUl5cbcFoe998EkVHzZC cB1ZPWj95oPCJgSNtygStB7WQtcEM7P4oK12wK3zu+d+Z0pczgZcl3jMmLrGB5ChUnkTH3 nxBwweA973d6324LkKR0hdIte6SBBFCiq+9YfSJgXg/zXF1krxL9piF4vC18Ow== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Nwk734gFtz1KbG; Mon, 16 Jan 2023 20:25:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30GKPp13051242; Mon, 16 Jan 2023 20:25:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30GKPpVC051241; Mon, 16 Jan 2023 20:25:51 GMT (envelope-from git) Date: Mon, 16 Jan 2023 20:25:51 GMT Message-Id: <202301162025.30GKPpVC051241@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: 7f2109f240c2 - main - netlink: add snl(3) manpage to the build List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 7f2109f240c2cdb916ca0047422ccfb2a697cee7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=7f2109f240c2cdb916ca0047422ccfb2a697cee7 commit 7f2109f240c2cdb916ca0047422ccfb2a697cee7 Author: Alexander V. Chernikov AuthorDate: 2023-01-16 20:24:49 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-01-16 20:25:44 +0000 netlink: add snl(3) manpage to the build --- share/man/man3/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/share/man/man3/Makefile b/share/man/man3/Makefile index 872aec1e83ab..a72c5ac8c31f 100644 --- a/share/man/man3/Makefile +++ b/share/man/man3/Makefile @@ -27,6 +27,7 @@ MAN= arb.3 \ queue.3 \ sigevent.3 \ siginfo.3 \ + snl.3 \ stats.3 \ stdarg.3 \ sysexits.3 \ From nobody Tue Jan 17 06:51:20 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Nx00m71y9z2pSQq; Tue, 17 Jan 2023 06:51: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Nx00m6c6Sz3HXg; Tue, 17 Jan 2023 06:51:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673938280; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rMliBVkZ43aqlA4es5fQmfiVb/HyBFQc0d11z24cafA=; b=M9ayWz1UBtT+77jxQKAsImxfZG9so5xn6kxUfbHaBia/kX/HNEwUwXIpNUAhlTdSR0niCi mirKB4+MCUoU1WNynsHzJEADZ8+MktjQeWLW+Ep28R7rC25R81112Nn4lstv7vr0uVfUW/ DJUX8PGwNCfDT4cJye6ZOtNeLHPPR7qiOAVFmT+wuTQY5gaFwYRLxEGzIJJnMf1/QvkRUr uCCSSFT0ll7WVUn/Cs+bSd262/OnAnQTP+/ZNmQ+/3HqeHVPoytmKavYGY5DrB34ZNzutG rsTnRAhAyo+Z0xCB8FSG/yGx2qZOtqgCvcHe95fXqp1bPIIrbE2p0eDObXyT+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673938280; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rMliBVkZ43aqlA4es5fQmfiVb/HyBFQc0d11z24cafA=; b=RgzHO3+Gr17jHHigwuvKxRTKJZaKZNCIEsXFURuXKQxS32R1xbnQCNjcgUEgwpgxTYWxjI jr0TKy1Jd8/pHMx5lahHx0kYkbXUCY9F9mJeX7Qr4rN1OWCdBiKZqWjme0WGnt0VM/MN1l CdI1a60OgqN01nUxxx1EzodqINenX+BecyX1gDgJ4kLvtNveu62HmDXEtGMMe9aaNCuFtr /+es3o+i3xjyLLlxem1I4JBNfXnB7KklASJ9i65zqDnPxXHGJbYoNhxELZMB79xklhj3Wc +2pcTlTi96RvTyftBDxS1yebUjGmgacv7M3tEHzU9nLKCMrhTmUfAMf3gli3MQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1673938280; a=rsa-sha256; cv=none; b=KZFVWlvVzbdLEpfS341SC8OItexPbGdr9Zaoa7lmLY+YZpcFEc2P4kDiktFw2+b8lykWGv IEkGoxsM0mmeYM2fkHr0ot92Kr32WyMKke+aAaEL7E+cCmnsajwCDncYlFobPplUcGyH0t Fap3T6R8Opkmv17J0q8+i/i54q4RbuDO+zuh2O3fFnplrfgNaQWnmNfukXn+dyntSpO3b7 sE+c5shLIh9KyVOWw7qvJmMqVq2RS48YR3QgWDNncGdTUGca9n4tioIWUOpUcD1FBrcb2d a3Lk8MMblJGfsJheE3VcfqFhNthg/fg5Ix6ObpeKmDr6B/nfZEVhIay2/wzkEQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Nx00m5fm1zMqW; Tue, 17 Jan 2023 06:51:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30H6pKYA059913; Tue, 17 Jan 2023 06:51:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30H6pKGs059912; Tue, 17 Jan 2023 06:51:20 GMT (envelope-from git) Date: Tue, 17 Jan 2023 06:51:20 GMT Message-Id: <202301170651.30H6pKGs059912@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gregory Neil Shapiro Subject: git: 021562c5020d - main - Sync with vendor sendmail 8.17.1 cf/cf/submit.mc List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gshapiro X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 021562c5020dd63d6b812369a9020b3b8147bfbd Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gshapiro: URL: https://cgit.FreeBSD.org/src/commit/?id=021562c5020dd63d6b812369a9020b3b8147bfbd commit 021562c5020dd63d6b812369a9020b3b8147bfbd Author: Gregory Neil Shapiro AuthorDate: 2023-01-17 06:49:07 +0000 Commit: Gregory Neil Shapiro CommitDate: 2023-01-17 06:49:07 +0000 Sync with vendor sendmail 8.17.1 cf/cf/submit.mc --- etc/sendmail/freebsd.submit.mc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/etc/sendmail/freebsd.submit.mc b/etc/sendmail/freebsd.submit.mc index fabc1118fa21..165c5f8eadf8 100644 --- a/etc/sendmail/freebsd.submit.mc +++ b/etc/sendmail/freebsd.submit.mc @@ -1,6 +1,6 @@ divert(-1) # -# Copyright (c) 2001-2003 Sendmail, Inc. and its suppliers. +# Copyright (c) 2001-2003, 2014 Proofpoint, Inc. and its suppliers. # All rights reserved. # # By using this file, you agree to the terms and conditions set @@ -24,3 +24,6 @@ define(`confBIND_OPTS', `WorkAroundBrokenAAAA')dnl dnl dnl If you use IPv6 only, change [127.0.0.1] to [IPv6:0:0:0:0:0:0:0:1] FEATURE(`msp', `[127.0.0.1]')dnl +dnl enable this for SMTPUTF8 support +dnl LOCAL_CONFIG +dnl O SMTPUTF8=true From nobody Tue Jan 17 06:51:21 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Nx00p0w8Tz2pSLx; Tue, 17 Jan 2023 06:51: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Nx00p0Gq3z3Hmv; Tue, 17 Jan 2023 06:51:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673938282; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W0xc4ytu1tHaINeVwL6e5CG/iXBgpQILxBpLvG/tO+w=; b=c6IjayPmZik1j2esgZhgcZEFSEk6KZ4K680zcTAsXZfvh+9kZDhTgI7eRPmQnatlogpDox gu0ue+E1AHXNZE8RHR6iU3GF19tJH43z8HuCyl8+x1MAktitOMDZw9GXm/zncPw4eV3Qg0 1ud/0SKWihNeaBdu07xeBwq73E7TIifhZ2iDkW+53+uJByzUh4v8B80cdexjFNSEufFXh5 omtIrMF9NPAIcIuMWs0Tmd9FHsOzhXl96jcFWarvbCa1X/7jBAN/EYcjrTtPd0JGUYqK0D WynysECXInuUXRBw/gIkpiFeHG3W2j8RkhNaFnZZWkKBIAyVj3JbAruI1SLoMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673938282; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W0xc4ytu1tHaINeVwL6e5CG/iXBgpQILxBpLvG/tO+w=; b=gN5OCEgc7CfhcBv5+lgSlO+1/YOWKY9ysIR7s295shr1zG7scZX6jINFlCYIW8pOkSMQPk KyYiijMruOWJz2Wf3+TAf8wLkPWNKWl/frpiozEOiwEB/Hd+K4/N9dFqgs4w11iEQXwKpe V0i75xp3i4L1ei0ojjpv1jG2P19Z+bMkU4n8aZ6G8OFaPLhR+yrmW1oCW62583D+gYCAqj O+eYfUqiw72ZqhNvrF8JkMqrLzMUATuV+4sB8ERjkXnBbObTM8Bhg+hzKF0HnLcDeDvCzI U12lba48qHy+RkNU3bkGJ2Xb5fqHxWj3cOvJs6t5wKUQ3pNJnVsvGzNVozZDxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1673938282; a=rsa-sha256; cv=none; b=M3ryk7taMy3p6WAsgVP5m7Zqe6nAhJw/ouG8MwrmwcBxw5xXBV28tmztu9DS0oW/2ya+Ju WvynKPG5DcquXNzmb6C37NKCx+a8aZ9I1QsRcqcApDiLUr7aywnSJUVcQMP4G+DDVrLmTy bbNyH7z2+vr5cPgrUlBwAgFX4uB7d9lyJTsm+a5WF9Vrftjil8FaVproMGcFRilx8F5rbU 2TQuE9Y123nMeLDRif56LtiYiD66LdFmFScUX+wjYz+6j4gDtM74Wp8BzeKUXJjqktCnZ9 jJgktl5/zBuNXfPCdTmyso85qxz9uJsbHBS11lBR7vqwmSQtyWpU7qpA0JDhkw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Nx00n6LqvzMdf; Tue, 17 Jan 2023 06:51:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30H6pLke059937; Tue, 17 Jan 2023 06:51:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30H6pL7h059936; Tue, 17 Jan 2023 06:51:21 GMT (envelope-from git) Date: Tue, 17 Jan 2023 06:51:21 GMT Message-Id: <202301170651.30H6pL7h059936@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gregory Neil Shapiro Subject: git: 431d2a81d421 - main - Minor changes to force commit these files so new freebsd*.cf files are built to use the new sendmail-8.17.1/cf tree. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gshapiro X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 431d2a81d421d4db7a07833b4fd12015cbae5ee7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gshapiro: URL: https://cgit.FreeBSD.org/src/commit/?id=431d2a81d421d4db7a07833b4fd12015cbae5ee7 commit 431d2a81d421d4db7a07833b4fd12015cbae5ee7 Author: Gregory Neil Shapiro AuthorDate: 2023-01-17 06:49:49 +0000 Commit: Gregory Neil Shapiro CommitDate: 2023-01-17 06:49:49 +0000 Minor changes to force commit these files so new freebsd*.cf files are built to use the new sendmail-8.17.1/cf tree. --- etc/sendmail/freebsd.mc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/etc/sendmail/freebsd.mc b/etc/sendmail/freebsd.mc index dbdfdb57ea62..97264805a67f 100644 --- a/etc/sendmail/freebsd.mc +++ b/etc/sendmail/freebsd.mc @@ -73,14 +73,14 @@ dnl NOTE: This can allow sites to use your server as a backup MX without dnl your permission. dnl FEATURE(relay_based_on_MX) -dnl DNS based black hole lists -dnl -------------------------------- -dnl DNS based black hole lists come and go on a regular basis -dnl so this file will not serve as a database of the available servers. +dnl DNS based block lists +dnl --------------------- +dnl DNS based block lists come and go on a regular basis so this +dnl file will not serve as a database of the available servers. dnl For more information, visit dnl http://en.wikipedia.org/wiki/DNSBL -dnl Uncomment to activate your chosen DNS based blacklist +dnl Uncomment to activate your chosen DNS based block list dnl FEATURE(dnsbl, `dnsbl.example.com') dnl Alternatively, you can provide your own server and rejection message: dnl FEATURE(dnsbl, `dnsbl.example.com', ``"550 Mail from " $&{client_addr} " rejected"'') From nobody Tue Jan 17 10:07:02 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Nx4Lb1fW6z2srY5; Tue, 17 Jan 2023 10:07:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Nx4Lb10dyz3mDw; Tue, 17 Jan 2023 10:07:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673950023; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R1tZwZ7n/7Lddf1K770W3Cu/f3NjvQ9j1WeOfz2Uaag=; b=M7nIed/YqFsCr9y0VubdlxWbKExSGjfPu4gGYJbL4IMjF4MZp0zwrVlHi0vb5tH7MplQDd yH5Vs7rQl2Zv0dyW+BsXEHsYIvp2KjPVjR6hqm+9cYNrujsQuGuvrt58zskJS5YE1hPG79 /owrZfHNqZ9f5OVz0uyaIQmM4/gn8mNl7z+eK8CfCnlF4XsM4xO3gjHdmUwhOinAgsurH3 X/9e4D0hT1XGTQDhbo3D5FjxH6r3e4WDS9sVN6kgn1Uwxfsjn0VeQTNj/qdPbP1vBNPSWv znqC//8HNHSp7jswfvGzb6L5OoHQScbWBX03FzqeomV/sj655BvstU6jWbYtAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673950023; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R1tZwZ7n/7Lddf1K770W3Cu/f3NjvQ9j1WeOfz2Uaag=; b=jvLr8Aq0420YzmnCBNoCHxeIjgauHhS11PIGERypwApXfvXE+VB6z6wxNQKaEuSYcgX8PF kEIr1ivWvuwFn4RNu7NZ3dRyMEFQ5IMwgpOzqNltj8Z70+QpqTA/kolyTs1GvJ6yPXAwiC 5gBRA/DaQst1Qhb8hdMPUWodvEapdQ5HHdM8XI/bOyCsHF/7DJg+KM4q0D3gkDNSKuVZ9Z BZIfauy5gpGVlvW24HSokByC8zFrwM/9L7zQr1Ck/2jUA2brMCMP9Kc0JIbHV8h5hjC755 piTGwZ/sBqlVrDCLTQpD6ey8Y1zmnMMA4JVy1ZCiJZLcsYzwExVPCXrlv3mm2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1673950023; a=rsa-sha256; cv=none; b=m4oEndyYFeAXbRk/MbwicjXt7lY/9jow6fRY9/c1sDfElkp5SYE2TI3zxef42fm2zmU4cK BjVKxj1kIBY0gzeAONs6OiglYgWUj8P1ZB+V4WNbJwdJrGCuYypqGtze7bVoojEG8eu7pQ bSfHKXeMJ6Suu7M7dXY7rOtVzabFCB9W72nZmHm0z3dOjLdgY04RMOwUzCuO7BsmtDNvuT qUJUybfdfGqnP6WKMzGMy5D7Ejh5eLIBoBZApfVI87Jp3CcgY+YyvSABYZNKgpiGp9gyYE ZZPDaG9PpIm1DTWdsL2zd9KRCzfOZHrjgerxf++7ObuHOsiSj8nye9o5ejB5+w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Nx4LZ74S0zRkW; Tue, 17 Jan 2023 10:07:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30HA72P7034936; Tue, 17 Jan 2023 10:07:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30HA726I034935; Tue, 17 Jan 2023 10:07:02 GMT (envelope-from git) Date: Tue, 17 Jan 2023 10:07:02 GMT Message-Id: <202301171007.30HA726I034935@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Tom Jones Subject: git: cef7ab70ff44 - main - netcat: Allow nc to be an if_tun tunnel broker List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: thj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cef7ab70ff44955b97e543fd03e664c89ce05bc3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by thj: URL: https://cgit.FreeBSD.org/src/commit/?id=cef7ab70ff44955b97e543fd03e664c89ce05bc3 commit cef7ab70ff44955b97e543fd03e664c89ce05bc3 Author: Tom Jones AuthorDate: 2023-01-17 10:02:06 +0000 Commit: Tom Jones CommitDate: 2023-01-17 10:05:49 +0000 netcat: Allow nc to be an if_tun tunnel broker Reviewed by: kevans Relnotes: yes Sponsored by: Zenarmor Sponsored by: OPNsense Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D37435 --- contrib/netcat/nc.1 | 9 ++++++++- contrib/netcat/netcat.c | 27 +++++++++++++++++++++++---- 2 files changed, 31 insertions(+), 5 deletions(-) diff --git a/contrib/netcat/nc.1 b/contrib/netcat/nc.1 index 2627920cca15..9f8696135f35 100644 --- a/contrib/netcat/nc.1 +++ b/contrib/netcat/nc.1 @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 10, 2020 +.Dd January 17, 2023 .Dt NC 1 .Os .Sh NAME @@ -47,6 +47,7 @@ .Op Fl p Ar source_port .Op Fl s Ar source .Op Fl T Ar toskeyword +.Op Fl -tun Ar tundev .Op Fl V Ar rtable .Op Fl w Ar timeout .Op Fl X Ar proxy_protocol @@ -240,6 +241,12 @@ to send RFC 854 DON'T and WON'T responses to RFC 854 DO and WILL requests. This makes it possible to use .Nm to script telnet sessions. +.It Fl -tun Ar tundev +Causes +.Nm +to use the provided +.Xr tun 4 +for input and output rather than the default of stdin and stdout. .It Fl U Specifies to use .Ux Ns -domain diff --git a/contrib/netcat/netcat.c b/contrib/netcat/netcat.c index eb3c7544be76..65266b99c28e 100644 --- a/contrib/netcat/netcat.c +++ b/contrib/netcat/netcat.c @@ -112,6 +112,7 @@ int rtableid = -1; int timeout = -1; int family = AF_UNSPEC; +int tun_fd = -1; char *portlist[PORT_MAX+1]; char *unix_dg_tmp_socket; @@ -144,6 +145,10 @@ void add_ipsec_policy(int, int, char *); char *ipsec_policy[2]; #endif +enum { + FREEBSD_TUN = CHAR_MAX, /* avoid collision with return values from getopt */ +}; + int main(int argc, char *argv[]) { @@ -156,12 +161,13 @@ main(int argc, char *argv[]) socklen_t len; struct sockaddr_storage cliaddr; char *proxy; - const char *errstr, *proxyhost = "", *proxyport = NULL; + const char *errstr, *proxyhost = "", *proxyport = NULL, *tundev = NULL; struct addrinfo proxyhints; char unix_dg_tmp_socket_buf[UNIX_DG_TMP_SOCKET_SIZE]; struct option longopts[] = { { "no-tcpopt", no_argument, &FreeBSD_Oflag, 1 }, { "sctp", no_argument, &FreeBSD_sctp, 1 }, + { "tun", required_argument, NULL, FREEBSD_TUN }, { NULL, 0, NULL, 0 } }; @@ -326,6 +332,9 @@ main(int argc, char *argv[]) if (Tflag < 0 || Tflag > 255 || errstr || errno) errx(1, "illegal tos value %s", optarg); break; + case FREEBSD_TUN: + tundev = optarg; + break; case 0: /* Long option. */ break; @@ -365,6 +374,13 @@ main(int argc, char *argv[]) if (family == AF_UNIX) errx(1, "cannot use -U and --sctp"); } + if (tundev != NULL) { + if (!uflag) + errx(1, "must use --tun with -u"); + tun_fd = open(tundev, O_RDWR); + if (tun_fd == -1) + errx(1, "unable to open tun device %s", tundev); + } /* Get name of temporary socket for unix datagram client */ if ((family == AF_UNIX) && uflag && !lflag) { @@ -564,6 +580,8 @@ main(int argc, char *argv[]) if (s) close(s); + if (tun_fd != -1) + close(tun_fd); exit(ret); } @@ -840,7 +858,7 @@ readwrite(int net_fd) stdin_fd = -1; /* stdin */ - pfd[POLL_STDIN].fd = stdin_fd; + pfd[POLL_STDIN].fd = (tun_fd != -1) ? tun_fd : stdin_fd; pfd[POLL_STDIN].events = POLLIN; /* network out */ @@ -852,7 +870,7 @@ readwrite(int net_fd) pfd[POLL_NETIN].events = POLLIN; /* stdout */ - pfd[POLL_STDOUT].fd = stdout_fd; + pfd[POLL_STDOUT].fd = (tun_fd != -1) ? tun_fd : stdout_fd; pfd[POLL_STDOUT].events = 0; while (1) { @@ -1440,6 +1458,7 @@ help(void) \t-n Suppress name/port resolutions\n\ \t--no-tcpopt Disable TCP options\n\ \t--sctp\t SCTP mode\n\ + \t--tun tundev Use tun device rather than stdio\n\ \t-O length TCP send buffer length\n\ \t-P proxyuser\tUsername for proxy authentication\n\ \t-p port\t Specify local port for remote connects\n\ @@ -1500,7 +1519,7 @@ usage(int ret) #endif "\t [--no-tcpopt] [--sctp]\n" "\t [-P proxy_username] [-p source_port] [-s source] [-T ToS]\n" - "\t [-V rtable] [-w timeout] [-X proxy_protocol]\n" + "\t [--tun tundev] [-V rtable] [-w timeout] [-X proxy_protocol]\n" "\t [-x proxy_address[:port]] [destination] [port]\n"); if (ret) exit(1); From nobody Tue Jan 17 10:07:03 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Nx4Lc2mlXz2srY8; Tue, 17 Jan 2023 10:07:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Nx4Lc1jJMz3mKW; Tue, 17 Jan 2023 10:07:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673950024; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s5fioCjovvMIxZhycHDvIxJ4TGK7Y+DHGuI5NXEwmF8=; b=QQSZFLjdD8mOBfvxLiRRfgGQq9b0FavS59nbPkppLFKjU387Mh2H26JYQmQLCE0G+j909I w9WMZSWeNh+IkhdzCl+yBaih+szl1J2oSDcr9FuBg8IWFsS1vDEqRAo5yPcyOyW0uP3x5h qDs5rdVQ1+kFYm3mrKcFQVCFUSValdjQ0INLv5aZ9a83IvHjwZfDpNErUlAK/voDCBbU/8 SSXUV51wVVmfFsHJru7xC4AElAoy0JIfNBmwp8uFrzO8zDb9LwmelZjXFECQdHZaO35r8P eeAzeLvgaq44bJWOc2vtQ2XMK6Z+tX5j8YkdF319znTs0LTKYcORq35/8rqqzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673950024; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s5fioCjovvMIxZhycHDvIxJ4TGK7Y+DHGuI5NXEwmF8=; b=VC9u9AzqeGNt4udRM/Te4IukA6czMRgWEib3KJkbVSDxkw/qetF5cfXSyR8pIWz9kJZ4Lf 1TAfm5Q84+0i4l43fM8dbebFD3C0336V4eLwq8jd2jdWdKJvsmqqAT2mRQuVpSYc0szYio zi35cTPFa27GWNUF7RoUXcjqNv83/9FwsGZTn4IQvVd0BBaPwozgfa+NrUmrXoxw0e33KJ W6uUefoGRtLrQf8QVdxm7fklkCdw6H7QlbMKeEsnbc1xYYoGP5qygZ0v5teXWjYOAnB+am GZsfEsqIQdOApi097imtzbfHCMJXCEYRm1jmAlLPQtA9FWn+bW8xJ9NU2rjXGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1673950024; a=rsa-sha256; cv=none; b=EKwKJ3bxaL//RKMkreuvSNwSOjMWwmJOwHneuVTWBcWyQ6yrkA2Q59FDwp0iBYHyN6brG3 qY0UwSKb4l54g9PRZFnGEksJ2jginQTzzIunRhUjppHb4EeaBDeRE9ERrBdd0wG4nMJLIy FsJiiKTnrxTycWKcZ5hnYBiym7LvDwqPIqLqZ6giza3lJ0b+kO9zbS+JyEtPM7cOc5Wt8K 78qJQrnmrKALtEUEhf4r7xPSAumnuAplq8JjiQREme1zhmbv54iCEhnjSbmGU3YOZl6H9S XVf1QDjyttpoJgpXqcQ5nwErQ4gTw/lmb3XX/KnqeRiE6c64SSxeJWDkog9CxQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Nx4Lc0dFKzSKy; Tue, 17 Jan 2023 10:07:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30HA73se034960; Tue, 17 Jan 2023 10:07:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30HA73nD034959; Tue, 17 Jan 2023 10:07:03 GMT (envelope-from git) Date: Tue, 17 Jan 2023 10:07:03 GMT Message-Id: <202301171007.30HA73nD034959@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Tom Jones Subject: git: fe701c39e8aa - main - if_tun: Add basic connectivity test with nc tun support List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: thj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fe701c39e8aa270a71b5010a1eb4b488a80dcae5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by thj: URL: https://cgit.FreeBSD.org/src/commit/?id=fe701c39e8aa270a71b5010a1eb4b488a80dcae5 commit fe701c39e8aa270a71b5010a1eb4b488a80dcae5 Author: Tom Jones AuthorDate: 2023-01-17 10:05:00 +0000 Commit: Tom Jones CommitDate: 2023-01-17 10:05:50 +0000 if_tun: Add basic connectivity test with nc tun support Reviewed by: kevans Sponsored by: Zenarmor Sponsored by: OPNsense Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D37435 --- tests/sys/net/if_tun_test.sh | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/tests/sys/net/if_tun_test.sh b/tests/sys/net/if_tun_test.sh index 64dc004e3a06..5f05ac7c5eff 100755 --- a/tests/sys/net/if_tun_test.sh +++ b/tests/sys/net/if_tun_test.sh @@ -2,7 +2,7 @@ . $(atf_get_srcdir)/../common/vnet.subr -atf_test_case "235704" "cleanup" +atf_test_case "235704" "basic" "cleanup" 235704_head() { atf_set descr "Test PR #235704" @@ -24,7 +24,44 @@ atf_test_case "235704" "cleanup" vnet_cleanup } +basic_head() +{ + atf_set descr "Test if_tun using nc" + atf_set require.user root +} + +basic_body() +{ + vnet_init + + epair=$(vnet_mkepair) + + tun_duke=$(ifconfig tun create) + tun_bass=$(ifconfig tun create) + + vnet_mkjail duke ${epair}a ${tun_duke} + vnet_mkjail bass ${epair}b ${tun_bass} + + jexec duke ifconfig ${epair}a inet 10.0.0.1/24 up + jexec bass ifconfig ${epair}b inet 10.0.0.2/24 up + + jexec duke nc -u -l --tun /dev/${tun_duke} 10.0.0.1 2600 & + jexec bass nc -u --tun /dev/${tun_bass} 10.0.0.1 2600 & + + jexec duke ifconfig ${tun_duke} inet 10.100.0.1/24 10.100.0.2 up + jexec bass ifconfig ${tun_bass} inet 10.100.0.2/24 10.100.0.1 up + + atf_check -s exit:0 -o ignore \ + jexec bass ping -c 1 10.100.0.1 +} + +basic_clean() +{ + vnet_cleanup +} + atf_init_test_cases() { atf_add_test_case "235704" + atf_add_test_case "basic" } From nobody Tue Jan 17 10:46:22 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Nx5Cy2DQ3z2sxF8; Tue, 17 Jan 2023 10:46: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Nx5Cy1ffjz3q6W; Tue, 17 Jan 2023 10:46:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673952382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AhwL6el7tFfHqyHeKVNe/bK6FeMJyi8MBJjo1fMgTms=; b=N0ZSxfux6eR0Tc6KMqIiOoQGa6RU3jj1oGibe6kEr4k6ngR6dyBP5YAYXRSSoVDOrrBvVb 2lOO6eYvaAEN2uJYSS2e3Ziz19uVqZ+dfrpXFl9hwO/5zkgOoyKv+YElzmXs3dyyehsz4z gw6r5kRkuqhv8L6IMH+ZM7YtBgor0fI1AQKOIrBVeuM/nLwhVS6eDa8oaPTmXywcaDGXj1 wQrsOx33hNnUfwt6Q1CKFZ/56yQb2DPEp2+QTsC7Yyg9kSS+Sdn1NCAJHKUZUtnGoou/Cw GGHM78YoApjd3qgeb2ENbRF/duuyPdfK1bq+l7iiqsKZOEe5ZdQxzs+JmcER4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673952382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AhwL6el7tFfHqyHeKVNe/bK6FeMJyi8MBJjo1fMgTms=; b=NlU0mV0yzFlHlJzwdwDKdT9ks70DH/n/V/LuGvgoZJ9hnK3WjeqI1F9dMBgZkdw87auQA9 uY3+WSukltB49+Pq9ZhCje2xYnyq0YKsiW3Wie8flQrpJrW5lXIBPOxzp5RGeLxMe7Ycwt 6w5/M+2tSl6CAywadOSuoeMEr28vBoIoEzaf5I3NqEAHfbyCYfyL4bjjnOCCVaBk6+bYph 8Jgks5aBXBK+2He+mIrn3eXOPoWq5XBD6kcOm2niT3r5w18ArhBh6fQ80zZQEh7GRMejSr VO4CHWrbh30i+R+jMMam2vcqyyCUv1UZ2mmDl8k5OpN3R4vXDkgXXrvh1oDzBA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1673952382; a=rsa-sha256; cv=none; b=qpQlsFcbLdyTh3HUwqImBmr8GzGkZVWhJfSXq/bBy3i3WkhqafWe9szK0RBxQZL+oUZhz8 pJUZKIH0rMeyJtUZJSVQvQHVcZ50Jb9i4nsvSrURDR88OIVWbKFugN26IOX4ODoYdqy9Mu xLayPM7FX4iNXe8craHxZKChz4oGBpFVDBZsJ3sE5fU7kj8XpOTWcCwXRsmYboeAxDzsUx Tco3qODCJsjugh5438dkNpX/3GVM9iq0IgZ/6pv2+/qIbqO6f17t/6SsZV985gpo5jgAKB hL2u1JKmiD7HzHNV6hD8qSy7tK4487WoPHVUaZ8hXdv9lC48mJVHtiedU5wQAA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Nx5Cy0gtZzT7s; Tue, 17 Jan 2023 10:46:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30HAkM3r091457; Tue, 17 Jan 2023 10:46:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30HAkMuB091456; Tue, 17 Jan 2023 10:46:22 GMT (envelope-from git) Date: Tue, 17 Jan 2023 10:46:22 GMT Message-Id: <202301171046.30HAkMuB091456@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Hans Petter Selasky Subject: git: 986c7be472bd - main - uhci(4): Add new USB IDs. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 986c7be472bd8b29bb280e72b57e6cbf1851b26f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=986c7be472bd8b29bb280e72b57e6cbf1851b26f commit 986c7be472bd8b29bb280e72b57e6cbf1851b26f Author: Dmitry Luhtionov AuthorDate: 2023-01-17 10:43:24 +0000 Commit: Hans Petter Selasky CommitDate: 2023-01-17 10:45:35 +0000 uhci(4): Add new USB IDs. MFC after: 1 week Sponsored by: NVIDIA Networking --- sys/dev/usb/controller/uhci_pci.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/dev/usb/controller/uhci_pci.c b/sys/dev/usb/controller/uhci_pci.c index f184713ecd8c..2b38e31208f2 100644 --- a/sys/dev/usb/controller/uhci_pci.c +++ b/sys/dev/usb/controller/uhci_pci.c @@ -82,6 +82,7 @@ __FBSDID("$FreeBSD$"); #define PCI_UHCI_VENDORID_HP 0x103c #define PCI_UHCI_VENDORID_VIA 0x1106 #define PCI_UHCI_VENDORID_VMWARE 0x15ad +#define PCI_UHCI_VENDORID_ZHAOXIN 0x1d17 /* PIIX4E has no separate stepping */ @@ -240,6 +241,10 @@ uhci_pci_match(device_t self) case 0x077415ad: return ("VMware USB controller"); + + case 0x1d173038: + return ("Zhaoxin ZX-100/ZX-200/ZX-E USB controller"); + default: break; } @@ -333,6 +338,9 @@ uhci_pci_attach(device_t self) case PCI_UHCI_VENDORID_VMWARE: sprintf(sc->sc_vendor, "VMware"); break; + case PCI_UHCI_VENDORID_ZHAOXIN: + sprintf(sc->sc_vendor, "Zhaoxin"); + break; default: if (bootverbose) { device_printf(self, "(New UHCI DeviceId=0x%08x)\n", From nobody Tue Jan 17 10:46:23 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Nx5Cz31ktz2sx8v; Tue, 17 Jan 2023 10:46:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Nx5Cz2K2qz3q79; Tue, 17 Jan 2023 10:46:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673952383; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WN8z2KVKXGho/6pM2Q1fPIowfhKYnWkiQcyvFH2bW0E=; b=EjsVmMdZU84orNWLnhcZm/RZ4cU1ajsEDOuvI8C/OKQE3by59/RcESZfGfu4KOuEQ96Ha/ fqZjKBnafxlfedh/jr9FufOn0k870eQbcM8gG7EGATy5DqE+TaF+UaCn1lyr1B1iqS4gn8 68feVqfCphD8mA8qTRei5BD/IFREM9bWQkV7/3eYRym1N9WGI/ux7690NhONu1ws2W2+7u y2B62cvm+Hqzmysfp406jQgdljRZpkiXYcA4aKGFJE7ECubF13+Nr0Z92/dZKQ15/EfGmo cE4tFgkRlm8phUViGfxe4YF0VmykJQ1TJvWykl33szobdOrywoXMZ3ssaJDSKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673952383; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WN8z2KVKXGho/6pM2Q1fPIowfhKYnWkiQcyvFH2bW0E=; b=ZP9+nY4bajQhmhVFj8R+2/BcgAJI6olvxysz2LAw/PqYjIwFv49+/QR1gctQW1UidBRH5d bUE+daMQ6ZCouOVpa6sUuRfN13BK1KwpLhxIpmkz90aJdAgyRT8xeWEthvxvPJEJ4/fQTi 844+s8/sCgJiW+8zZVGclevKjj8Hw2HxO31yfx80Wd2A0qw1qlgaTmfln1W3dWb8qZJBzD Ir0hxxZevba1x4/S0Vdyz9W/bfoC7iyzEfhQiwtYE7zXOXIHa12pppXRgLL6aYPGnfNtAA 5KtLaGxQ31kdgkAse4UOKlHtTm744DOHb7KXmX8jJ0uIsfZXPJjhcKnedidUgg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1673952383; a=rsa-sha256; cv=none; b=sjhQouUoXZ8xqKDwDDhWDodsFsCCkMuzRLZiJo5TlZTE1yl0voDH9cGvW1kTaTNU9SqgOh Cz9XAXg630PeJPAd4MpfdLwwQBW0Zl4SZLpKqxlmGm8IUA1taZUGiUyzSTPr/vzg8bF6+1 AH7HbW2iuFB155NmsmoOObgVuhFGIR6AehbzjvTaAxFt3ALjPT0lIHb45xT7ATfIXiUWXZ x5UvhrYdUqOawXnL6vJg4u0p0OhSEDV1ugTxP3dC0buTEcntO+08fcfohwU5NSM5xr3HPG 4bWeX4wpxc27v7goAQmyBa/0YhHrQ1pRr3sretemkQmKM0i6d3NF06hk5gMokQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Nx5Cz1LHTzSfv; Tue, 17 Jan 2023 10:46:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30HAkNnf091481; Tue, 17 Jan 2023 10:46:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30HAkNNP091480; Tue, 17 Jan 2023 10:46:23 GMT (envelope-from git) Date: Tue, 17 Jan 2023 10:46:23 GMT Message-Id: <202301171046.30HAkNNP091480@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Hans Petter Selasky Subject: git: f9237e1937a4 - main - ehci(4): Add new USB IDs. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f9237e1937a4e399e08ca8e5bd88a60910e74be6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=f9237e1937a4e399e08ca8e5bd88a60910e74be6 commit f9237e1937a4e399e08ca8e5bd88a60910e74be6 Author: Dmitry Luhtionov AuthorDate: 2023-01-17 10:43:33 +0000 Commit: Hans Petter Selasky CommitDate: 2023-01-17 10:45:35 +0000 ehci(4): Add new USB IDs. MFC after: 1 week Sponsored by: NVIDIA Networking --- sys/dev/usb/controller/ehci_pci.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/dev/usb/controller/ehci_pci.c b/sys/dev/usb/controller/ehci_pci.c index bee65e603a15..4ff15a37538c 100644 --- a/sys/dev/usb/controller/ehci_pci.c +++ b/sys/dev/usb/controller/ehci_pci.c @@ -96,6 +96,7 @@ __FBSDID("$FreeBSD$"); #define PCI_EHCI_VENDORID_NVIDIA2 0x10DE #define PCI_EHCI_VENDORID_VIA 0x1106 #define PCI_EHCI_VENDORID_VMWARE 0x15ad +#define PCI_EHCI_VENDORID_ZHAOXIN 0x1d17 static device_probe_t ehci_pci_probe; static device_attach_t ehci_pci_attach; @@ -224,6 +225,10 @@ ehci_pci_match(device_t self) case 0x077015ad: return ("VMware USB 2.0 controller"); + + case 0x1d173104: + return ("Zhaoxin ZX-100/ZX-200/ZX-E USB 2.0 controller"); + default: break; } @@ -409,6 +414,9 @@ ehci_pci_attach(device_t self) case PCI_EHCI_VENDORID_VMWARE: sprintf(sc->sc_vendor, "VMware"); break; + case PCI_EHCI_VENDORID_ZHAOXIN: + sprintf(sc->sc_vendor, "Zhaoxin"); + break; default: if (bootverbose) device_printf(self, "(New EHCI DeviceId=0x%08x)\n", From nobody Tue Jan 17 10:46:24 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Nx5D03TDqz2sx1Y; Tue, 17 Jan 2023 10:46:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Nx5D0333hz3qL9; Tue, 17 Jan 2023 10:46:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673952384; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LDXc/XFS9CuduXuE9CRCqFuF6Wd0jlXW8JolLVEB9oA=; b=Z7hXRFp1lNLu68oDU6+qmAJkLNu3vgB9zmZA2lZVpz/KLVoVL0oGH3a/crn2SukOsuJAPA vgI6nu5Nw50zXCEsleNo/MGZfmZXs05K+ntCvEDRPyWDn3+4rRw3f2jJFm2yCYxE/WLdkr DIyTBY6RL7zBdhONmnzfFH0n6+xoJex63lSX0GTNtalzlFcuhFEiYps+SFGNeiL8Cx46EM LXW6YXqJOKWlxb2ptSY9d5Z5jxq4KiFPPnK7efAGh+ImbU0YuyqCOK5/7hq6bNptxafU7x giqaat3eyE9j/zJnZ8a8B8pP7dkSEzjmPDacYRtJVnpMHlkYvkssH4HCMALSnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673952384; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LDXc/XFS9CuduXuE9CRCqFuF6Wd0jlXW8JolLVEB9oA=; b=TgL/FmvfjhCW5wSe1JytxVkXWq72DgLaYQzUULbyNs+zBSLxytWfF8r+b1xoKBKtNZAII5 BTmsm8hIpwWkze2XhgrOGbdcO9bJxzRzi0PPgLTCfbwm+JKMZ+KjVF4B/7+bRi9lhFINLk IMH8NOFneeXNG8bIpHMAMUPrtRNyr6Q1/OxdOvfIskZdQ7cFrC0SKuljaKApyB2yVl5Nxt evn5ILBRvoBLkHJpqLPMt0ZWvILCceD5RkEN7K38oaDhblXLOVqbjaJVRMt0p7ovP7Ah8b VWjnEHp+F+8cr9EGC03Enidf8Nja+95fgSlYl3vAt/92T3OtqM+E4kNKSm0rGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1673952384; a=rsa-sha256; cv=none; b=eWFx+1spvRJCrcOgAEZV9TIiq4Db/pGpEVleD+rQOBpUbaSJy7143wh+t0s+nazkVbcs8u grO+hNyGlhHk0MNF9cT3a/c1jWVoitav2UXyRz8cAPp2vG4HsMw+aQJphnkEkyXUwDNWla TpbJ/MOBpLOLuKTzCt7K2/l/SXVrsLk+OMxqHtXMh80r8sArhl1/FZ7qX9NRQRK6lbyDXc py1ani+cQjagag+pDCte9hwQavI7I+ZkZw4t/1GuL7tDmyRUcnGVI+9V2ojmRmhrsA+6/x yIXPQXY2aHHXdU9EmlvC+b0tayUt90AhVwVHBWnKOohGhOWEgWi6bjJnlYAv3Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Nx5D026nXzSvk; Tue, 17 Jan 2023 10:46:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30HAkO9R091512; Tue, 17 Jan 2023 10:46:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30HAkOO4091511; Tue, 17 Jan 2023 10:46:24 GMT (envelope-from git) Date: Tue, 17 Jan 2023 10:46:24 GMT Message-Id: <202301171046.30HAkOO4091511@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Hans Petter Selasky Subject: git: 0d7064d58f89 - main - xhci(4): Add new USB IDs. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0d7064d58f897c95c3bd319b497f70c8177e0de6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=0d7064d58f897c95c3bd319b497f70c8177e0de6 commit 0d7064d58f897c95c3bd319b497f70c8177e0de6 Author: Dmitry Luhtionov AuthorDate: 2023-01-17 10:43:40 +0000 Commit: Hans Petter Selasky CommitDate: 2023-01-17 10:45:35 +0000 xhci(4): Add new USB IDs. MFC after: 1 week Sponsored by: NVIDIA Networking --- sys/dev/usb/controller/xhci_pci.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sys/dev/usb/controller/xhci_pci.c b/sys/dev/usb/controller/xhci_pci.c index 890eec4f0169..3fff1ec1db01 100644 --- a/sys/dev/usb/controller/xhci_pci.c +++ b/sys/dev/usb/controller/xhci_pci.c @@ -65,6 +65,7 @@ __FBSDID("$FreeBSD$"); #define PCI_XHCI_VENDORID_AMD 0x1022 #define PCI_XHCI_VENDORID_INTEL 0x8086 #define PCI_XHCI_VENDORID_VMWARE 0x15ad +#define PCI_XHCI_VENDORID_ZHAOXIN 0x1d17 static device_probe_t xhci_pci_probe; static device_detach_t xhci_pci_detach; @@ -205,6 +206,13 @@ xhci_pci_match(device_t self) case 0x1ada10de: return ("NVIDIA TU106 USB 3.1 controller"); + case 0x1d179202: + return ("Zhaoxin ZX-100 USB 3.0 controller"); + case 0x1d179203: + return ("Zhaoxin ZX-200 USB 3.0 controller"); + case 0x1d179204: + return ("Zhaoxin ZX-E USB 3.0 controller"); + default: break; } @@ -393,6 +401,9 @@ xhci_pci_attach(device_t self) case PCI_XHCI_VENDORID_VMWARE: strlcpy(sc->sc_vendor, "VMware", sizeof(sc->sc_vendor)); break; + case PCI_XHCI_VENDORID_ZHAOXIN: + strlcpy(sc->sc_vendor, "Zhaoxin", sizeof(sc->sc_vendor)); + break; default: if (bootverbose) device_printf(self, "(New XHCI DeviceId=0x%08x)\n", From nobody Tue Jan 17 13:10:17 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Nx8Q15RJ7z2p3MW; Tue, 17 Jan 2023 13:10: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Nx8Q14vCwz428m; Tue, 17 Jan 2023 13:10:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673961017; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=awy+Wyg3mq4Yt8FhasOlKAjJtwE6DLY+OvrXJKMJuGg=; b=Lbs0HTJ97dXGv0u00vn8knBvcsS5OSaNvTIxDj9mCVpLrLsyTbqF4TgeRocm1sm1RN2Bv5 nvN1G5p3bY2TzS9rYtU66RSnvhpmJty73mcpcYOqFcE26wHZdil+N4vFUhfsdPtz7Mbq7u q1rUqITY/HbbfLxx3WlM1zaF8dVRdhp46HQLGEfLPXASnkO2dH2jDScobZJYc3sCKltUKr 6o6jrZvLXuMMjznCc377wfOy3OtoTj0Z1k+jenHZv4ZDUNFqfDK++WKyTypKS8mE4V62b0 rma9zeXfYHq3jR1Ve7BUgnm8CdTPurOnv340DAoczpoXSRp7vM/fPYzMHXp9ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673961017; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=awy+Wyg3mq4Yt8FhasOlKAjJtwE6DLY+OvrXJKMJuGg=; b=SOm2gVmVumfY9oLp16NOQnWSfzUwUIlNvTjgn0DNJ+fCAt+hP1+cpQr4zMTEzijAlMMEJy wWn7ZZp3hNmdJYOfKucHhx36Oao1SBKlcwYO7G1+FFAwRlJCHWKlCZO2zP/i1j2cBSby6j CgDrwEA9CsKwCzS/W40YFaOAxfQVjUvheE3iHQM3b0ogzXd1Wr3iyStBjGOY4FEsExCyoI dsnRWXse1MSXaO1HoAma93q6RrBy667MYt12Ugiu97jAE5Sq/YsF8sMKpC4yCcWqejbDD4 vxas8hNSGA5VSl42YyV23BwcDAWprNOysp+ooYVoAL5DR95NxqbSvP5zhUxS8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1673961017; a=rsa-sha256; cv=none; b=LV7jY/i8smUXmEGm+1a+vC27RhSnd5qvtVISoihEgt7sHsjj3vWjurd9M0zBjBhiyjVY5A hE0SjgHFS+DKff5bs99jOX7sdR7BBIe9CwL9J4jek2zTACHsWpy6V6/0v6KvXgtBXcPwyv YtaB2R5ZM7CQ4roBksDzUoagWIxI8f+fbicVOW17ARjGmtHNxkGwS0aBA/0ZBubqkGk9lM 0A4FNzjt7DpPp4uqTtaW/STO/kh/ycJrQrc4/7lndOYn/OLJgbGgFzwL+WVnuFERShQpFP cRZSG6AWIiwJhxK8o3Q2iqJ/nZUrH83nJl/+DUv5W4ep6Lwfer7QXFfWRR+HzA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Nx8Q13xRczXl4; Tue, 17 Jan 2023 13:10:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30HDAHsw000291; Tue, 17 Jan 2023 13:10:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30HDAHaT000290; Tue, 17 Jan 2023 13:10:17 GMT (envelope-from git) Date: Tue, 17 Jan 2023 13:10:17 GMT Message-Id: <202301171310.30HDAHaT000290@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: e5f5ca7fee26 - main - mixer(3): remove redundant argument in _mixer_readvol() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: e5f5ca7fee26179725ab2d66b5500d51fe8ae113 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e5f5ca7fee26179725ab2d66b5500d51fe8ae113 commit e5f5ca7fee26179725ab2d66b5500d51fe8ae113 Author: Christos Margiolis AuthorDate: 2023-01-17 13:08:59 +0000 Commit: Mark Johnston CommitDate: 2023-01-17 13:08:59 +0000 mixer(3): remove redundant argument in _mixer_readvol() There's no reason to pass the mixer as an argument since we can fetch it from mix_dev. No functional change intended. Reviewed by: markj, hselasky MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D38076 --- lib/libmixer/mixer.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/libmixer/mixer.c b/lib/libmixer/mixer.c index 1a448d222bb7..f81f2ff4a66b 100644 --- a/lib/libmixer/mixer.c +++ b/lib/libmixer/mixer.c @@ -37,17 +37,17 @@ #define BASEPATH "/dev/mixer" -static int _mixer_readvol(struct mixer *, struct mix_dev *); +static int _mixer_readvol(struct mix_dev *); /* * Fetch volume from the device. */ static int -_mixer_readvol(struct mixer *m, struct mix_dev *dev) +_mixer_readvol(struct mix_dev *dev) { int v; - if (ioctl(m->fd, MIXER_READ(dev->devno), &v) < 0) + if (ioctl(dev->parent_mixer->fd, MIXER_READ(dev->devno), &v) < 0) return (-1); dev->vol.left = MIX_VOLNORM(v & 0x00ff); dev->vol.right = MIX_VOLNORM((v >> 8) & 0x00ff); @@ -122,7 +122,7 @@ dunit: dp->parent_mixer = m; dp->devno = i; dp->nctl = 0; - if (_mixer_readvol(m, dp) < 0) + if (_mixer_readvol(dp) < 0) goto fail; (void)strlcpy(dp->name, names[i], sizeof(dp->name)); TAILQ_INIT(&dp->ctls); @@ -336,7 +336,7 @@ mixer_set_vol(struct mixer *m, mix_volume_t vol) v = MIX_VOLDENORM(vol.left) | MIX_VOLDENORM(vol.right) << 8; if (ioctl(m->fd, MIXER_WRITE(m->dev->devno), &v) < 0) return (-1); - if (_mixer_readvol(m, m->dev) < 0) + if (_mixer_readvol(m->dev) < 0) return (-1); return (0); From nobody Tue Jan 17 14:45:43 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NxBX758B9z2sTPL; Tue, 17 Jan 2023 14:45: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NxBX74VW5z4CXt; Tue, 17 Jan 2023 14:45:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673966743; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BKcZR8Oghv+NYK0TqOKC6fNRQkzw9wzWjAUyR1bBlMY=; b=AT4IxeBlx0/R32/sdYvMvIjzuWgp1wyoInOVGsdSdnZFp4YzctN1TyM4NyCYzqrx/xMXzF G5oICNImwotLjhxhRMO8MMdyEfidgZnhBJNfiMo1CgdqPh7NpwDjR+SGOZEvaNXfc1MFu6 U/IFGE9CuCcUG51o+ho/5YvhaYGGYDmPieLqMoMjRIGQoWBmHW1ZEytbYEye/cu2oWf3gk VyubT6VeEBZo4U1ns15h0QEPhjnpcLv3gcRyaepDFqtkOioLaWTsmlGjDC/bguP4rYi1o5 zROyXCqWOWC0G/zUURIWxCyVjbCXGMVa4EdlJQhx6iCyDBsjq6CbLsBhN5pcnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673966743; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BKcZR8Oghv+NYK0TqOKC6fNRQkzw9wzWjAUyR1bBlMY=; b=Onhha0ACPhQz65v5t2PseqSejFoFgYJgnzVXLs7P9wArj7OFYb5ImqHkPdUhQBg32HoL/l BTyLkkNai7iQpnXoESHa5NA/tl/CtHREnXBZ3r8lViQNxdU4fLgJKTTvhZdB9UJP3ToMs5 FvEcHS1hYm2RVZ5rknT0GWAGQ5kNIqib2s0x7W8XjzC9+7STRDzV2rkat8aP+hptvY1ihQ xrWvlxwDL5zSyTpM0FCeGae3VrKGB9J/IKjdXR6KCBebhjrwXi79TX+GV2paR6YHzcJBbf HE44iyNu5EHzMLAKquaWW8Hymm6b2C+ejtl7ahanIFM600qXmHvaI2q4feeIYw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1673966743; a=rsa-sha256; cv=none; b=bgwxCc5lu2KsWTqVavH/Bh4NfgA9m3PkwYSCxBFsPZqoJNQpKwYqwLc0BEj3pzGmIgJaSC A/Q7EymLotgJmL1bVPdnxX2JNYuRTaKUm3lricsJEm/PJSTkDcqrHzPGCsFkQewz2MmyFi dtwV2jRZkkWI9clt547QxZUur34Hf0ILVC4aI1rIlbdTvlFwajzgtPs3zEvDKKc9BprYfw K2MqcSAGgRxy/3ys1HxT0CjNbWbH0kqQx1ELOpuOMq6fPSEpN3aS9Qfdw7apnyBAfC9sZg B3JhtU82pNcmAVStBDr9HY2EwimuLmWl3M3RRz3yUC7Il+p5i19d+T45mmLOeQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NxBX73bgyzbPy; Tue, 17 Jan 2023 14:45:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30HEjhFH033641; Tue, 17 Jan 2023 14:45:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30HEjh8P033640; Tue, 17 Jan 2023 14:45:43 GMT (envelope-from git) Date: Tue, 17 Jan 2023 14:45:43 GMT Message-Id: <202301171445.30HEjh8P033640@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: d91be0f1211b - main - netlink: Zero-initialize mbuf messages List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: d91be0f1211b0196a0087cdfa237a6a0d2a43b65 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d91be0f1211b0196a0087cdfa237a6a0d2a43b65 commit d91be0f1211b0196a0087cdfa237a6a0d2a43b65 Author: Mark Johnston AuthorDate: 2023-01-17 14:36:54 +0000 Commit: Mark Johnston CommitDate: 2023-01-17 14:36:54 +0000 netlink: Zero-initialize mbuf messages Some users of nlmsg_reserve_object() and nlmsg_reserve_data() are not careful to fully initialize pad and reserved fields, allowing uninitialized bytes to leak to userspace. For example, dump_nhgrp() doesn't set nhm->resvd = 0. Meanwhile, nlmsg_get_ns_buf() and nlmsg_get_ns_lbuf() zero-initialize the buffer, so nlmsg_get_ns_mbuf() is inconsistent. Let's just make them all behave the same here. Reported by: KMSAN Reviewed by: melifaro Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D38098 --- sys/netlink/netlink_message_writer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/netlink/netlink_message_writer.c b/sys/netlink/netlink_message_writer.c index 37414703c6f6..6573394eb881 100644 --- a/sys/netlink/netlink_message_writer.c +++ b/sys/netlink/netlink_message_writer.c @@ -215,6 +215,7 @@ nlmsg_get_ns_mbuf(struct nl_writer *nw, int size, bool waitok) nw->malloc_flag = mflag; nw->num_messages = 0; nw->enomem = false; + memset(nw->data, 0, size); NL_LOG(LOG_DEBUG2, "alloc mbuf %p req_len %d alloc_len %d data_ptr %p", m, size, nw->alloc_len, nw->data); return (true); From nobody Tue Jan 17 14:45:44 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NxBX868wfz2sTZG; Tue, 17 Jan 2023 14:45: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NxBX85NR1z4CVq; Tue, 17 Jan 2023 14:45:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673966744; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=30n47W6KlxnhgI19vWZr4Uu5639oGKopROhJU+sOIEQ=; b=JD0WdYbjj/6MAm/BARntI5FFVuJx8pXOGJ5gqCn2z6gK/kBMEwzyij4zeQX6Ms7As1qmwB 1e0iDEHTe9VEGAdcAgJ0qogejtLsQGZJQXhagk6wY2Hp+S/xRXLRRABkNvcABNFUqqgOLA 6dDl4XzyUqrsUhn0eF/L9yiSS4eYEJ6IVbRVtBFs9g5ma31YcrpiGKrcsSdZ0jQmFBfO+f Wrsa0DUdD5kLoX+RKpUQ2xs4iKpzeUaLP5BrbvAm3mvTVC1DFV/FSXSk8/Wvc1kTQG0iAE 7QwcfckyZA89HHA4SbmkxWCSri8byNieMpdCeaQib67FBJU+3KF9trUrhsxPNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673966744; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=30n47W6KlxnhgI19vWZr4Uu5639oGKopROhJU+sOIEQ=; b=BlzrmEsOKXz95UOTLDCKRlKP7eI4T3FasYsas2zkl0XWaA7f28Gt14iumgdK4KrTXmdB4t t9Y/9XSPv7aNyoGuiZA0hRQpE/4TbjtVyC5Ey0VT5AHcWu8RdAs8khRJ3mwe380kqGW4Sq JUnXxh0vlrDVIU3x1L6LAn7vCD6IOGvJLaA2EuAFoxEUigDgEnYvGbV6Dis5t1Y/0D6eMy hDzowI6tWSWAHjizVWZsW1xDlyiL7AVRufZ+1ZXXOtKxaI+mMDPgTTebvEZX31x+g0V7S8 Rs44q8U2JhROrKT9mTsC55vsNyEZdValdr2696EVxDa2utwYmYgRClH3U3Kb8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1673966744; a=rsa-sha256; cv=none; b=C0ij22F/Wyh5ES9RclzZ8LDs6+bUSif3zOJ1fDRUyz0kf4Y92tbsfA4uwiSx8pO7bStTFY u55uiAvgvSw+jC13G1405tuO+XaJ5ersaP/MfZ1Nyq1Vb/dqUpZ1kfvUt9zNTKfpDGsJF4 /Kbe5JC+ki6S7XJ3QWcBDk0rtF0vnHReMeq2VOqp9N6gE4kaiHJ9J6enM2qq1gA9opbxvc 4Ktbpj8YTKYtw/hUwdoA7M9Y3lcyq67+irrieN6v5O4QE3var15+rlH+W+pxaWEjH869Kq CnHHxaEJz27lnp39pky5Pamo6p4OfOTqfQKoaIGDxiU4swJxNEcmQ1KKe5qyOQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NxBX84PftzbPr; Tue, 17 Jan 2023 14:45:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30HEjibj033666; Tue, 17 Jan 2023 14:45:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30HEji7c033665; Tue, 17 Jan 2023 14:45:44 GMT (envelope-from git) Date: Tue, 17 Jan 2023 14:45:44 GMT Message-Id: <202301171445.30HEji7c033665@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: e262610007f0 - main - netlink: Make the writers function table static and const List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: e262610007f01398630dc8ce7bf404dbcfd6350c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e262610007f01398630dc8ce7bf404dbcfd6350c commit e262610007f01398630dc8ce7bf404dbcfd6350c Author: Mark Johnston AuthorDate: 2023-01-17 14:37:21 +0000 Commit: Mark Johnston CommitDate: 2023-01-17 14:37:21 +0000 netlink: Make the writers function table static and const No functional change intended. Reviewed by: melifaro Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D38099 --- sys/netlink/netlink_message_writer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netlink/netlink_message_writer.c b/sys/netlink/netlink_message_writer.c index 6573394eb881..0d27d5d0d47c 100644 --- a/sys/netlink/netlink_message_writer.c +++ b/sys/netlink/netlink_message_writer.c @@ -368,7 +368,7 @@ nlmsg_write_group_lbuf(struct nl_writer *nw, void *buf, int datalen, int cnt) return (true); } -struct nlwriter_ops nlmsg_writers[] = { +static const struct nlwriter_ops nlmsg_writers[] = { /* NS_WRITER_TYPE_MBUF */ { .init = nlmsg_get_ns_mbuf, @@ -394,7 +394,7 @@ struct nlwriter_ops nlmsg_writers[] = { static void nlmsg_set_callback(struct nl_writer *nw) { - struct nlwriter_ops *pops = &nlmsg_writers[nw->writer_type]; + const struct nlwriter_ops *pops = &nlmsg_writers[nw->writer_type]; switch (nw->writer_target) { case NS_WRITER_TARGET_SOCKET: From nobody Tue Jan 17 14:45:45 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NxBX96xZqz2sTgc; Tue, 17 Jan 2023 14:45: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NxBX96LMGz4CpK; Tue, 17 Jan 2023 14:45:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673966745; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5RGe2Gty5P/y9loAC7CUIglQopOxgz2XE259/IDom20=; b=AeYseixjEx8eclK2RIPTkoQDM2zGHNnW2p09d9sNwyFM3NEXpan8yzbUHjRasFc8cwHb+S 3jq3zGufuJfeh7O8RrqrzJ92C3EwYkR/BzmEcwYNaVqZg8KjKg210ZaWZXdl0mXYQ9y8Nv kKU33tg7KS3zcFIskN6R3GBUSuQ9NhJ+RwyUG1wTbREObLK+IGjq72YjGxsegJQ2leRTh+ kG7Disn2a1NGpMBLhldphxVvXJEIMUvbdSrHAE/suHWUuUy7LOXQggprgCud3Aa5OwbkcA W1lXGkiiRBtOylIXnHA5LmaFygE4jXC7lG7JRxwgEQSIhxC2+4SkNnNh+wA/nA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673966745; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5RGe2Gty5P/y9loAC7CUIglQopOxgz2XE259/IDom20=; b=aWebsBIsIzD7saizmeR/SYZ4FQooSRGQG5mCGhJ7URcdhb+4RN+Lyh5gZzAyddC+3YUHOu dXjeXGzpjX8d5m00eql4EAw3mNeyv9iHlJYJcw8pudVUguzT0CT5150DQhmM3SdfbYI8l7 Qf5g7mzXKz15CqudbcNEZOrFQ5qKXqbYKGWmDOh4hJ7PgTukGqlCC8LG5YJOxmSG6m+jH4 jKa8OwdcwBz6nkO5aNKGPY7Xdcwh5caw2A7bwsZp4UaFS94w6skRv+8BA/WAakJhV5DErP s1OaVXYsfzf2gezTVosa9cc2LxMRZl/PSWvVFwJVnAz8DfLVV82j+UyGBiz33Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1673966745; a=rsa-sha256; cv=none; b=rZplD9Pl548pAx7Ph6prye7ZHJZL+N/L6egAGX/13d/WxM6pFvnUyXaTRWUGmdPbEiH9pJ 9f63hZQhTx+KFM/QbFm9+ixYblWdoUUnl7pppNH6FhCYj8YQyAQK9iWULkq5d+yna5Dtzy 38Cb3gCnlJl6wAH0tEX3MWSoMfcOgiX2neCMiZMOb8W7GIVHheOApx3wnheEJNC1r1gImg 7opqmC7p1lFhrSShJalE8DiKXBQLvEEwpQdBoGJOvlP9Uyxeowz1YuTpNZ4l/GmK82HieV zKo19DKtMoQPDa4bP2DCea4WxPUU6by5WHHQGb+Fp3mgAPA++dC/zJQ0x5zxlw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NxBX95QJMzbPs; Tue, 17 Jan 2023 14:45:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30HEjjlH033690; Tue, 17 Jan 2023 14:45:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30HEjjj9033689; Tue, 17 Jan 2023 14:45:45 GMT (envelope-from git) Date: Tue, 17 Jan 2023 14:45:45 GMT Message-Id: <202301171445.30HEjjj9033689@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: 35472cb60ab9 - main - netlink: Fix indentation in netlink_message_writer.c List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 35472cb60ab95b4d99981492a87443022181eac2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=35472cb60ab95b4d99981492a87443022181eac2 commit 35472cb60ab95b4d99981492a87443022181eac2 Author: Mark Johnston AuthorDate: 2023-01-17 14:37:33 +0000 Commit: Mark Johnston CommitDate: 2023-01-17 14:37:33 +0000 netlink: Fix indentation in netlink_message_writer.c This file is indented with a mixture of tabs and spaces. No functional change intended. Reviewed by: melifaro Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D38100 --- sys/netlink/netlink_message_writer.c | 135 +++++++++++++++++------------------ 1 file changed, 67 insertions(+), 68 deletions(-) diff --git a/sys/netlink/netlink_message_writer.c b/sys/netlink/netlink_message_writer.c index 0d27d5d0d47c..2187c40f2786 100644 --- a/sys/netlink/netlink_message_writer.c +++ b/sys/netlink/netlink_message_writer.c @@ -130,7 +130,7 @@ nlmsg_write_socket_buf(struct nl_writer *nw, void *buf, int datalen, int cnt) free(buf, M_NETLINK); int io_flags = (nw->ignore_limit) ? NL_IOF_IGNORE_LIMIT : 0; - return (nl_send_one(m, (struct nlpcb *)(nw->arg_ptr), cnt, io_flags)); + return (nl_send_one(m, (struct nlpcb *)(nw->arg_ptr), cnt, io_flags)); } static bool @@ -153,7 +153,7 @@ nlmsg_write_group_buf(struct nl_writer *nw, void *buf, int datalen, int cnt) if (!success) return (false); - nl_send_group(m, cnt, nw->arg_uint >> 16, nw->arg_uint & 0xFFFF); + nl_send_group(m, cnt, nw->arg_uint >> 16, nw->arg_uint & 0xFFFF); return (true); } @@ -182,7 +182,7 @@ nlmsg_write_chain_buf(struct nl_writer *nw, void *buf, int datalen, int cnt) free(buf, M_NETLINK); return (false); } - return (true); + return (true); } @@ -203,12 +203,12 @@ nlmsg_get_ns_mbuf(struct nl_writer *nw, int size, bool waitok) struct mbuf *m; int mflag = waitok ? M_WAITOK : M_NOWAIT; - m = m_get2(size, mflag, MT_DATA, M_PKTHDR); - if (__predict_false(m == NULL)) - return (false); - nw->alloc_len = M_TRAILINGSPACE(m); - nw->offset = 0; - nw->hdr = NULL; + m = m_get2(size, mflag, MT_DATA, M_PKTHDR); + if (__predict_false(m == NULL)) + return (false); + nw->alloc_len = M_TRAILINGSPACE(m); + nw->offset = 0; + nw->hdr = NULL; nw->_storage = (void *)m; nw->data = mtod(m, void *); nw->writer_type = NS_WRITER_TYPE_MBUF; @@ -216,9 +216,9 @@ nlmsg_get_ns_mbuf(struct nl_writer *nw, int size, bool waitok) nw->num_messages = 0; nw->enomem = false; memset(nw->data, 0, size); - NL_LOG(LOG_DEBUG2, "alloc mbuf %p req_len %d alloc_len %d data_ptr %p", - m, size, nw->alloc_len, nw->data); - return (true); + NL_LOG(LOG_DEBUG2, "alloc mbuf %p req_len %d alloc_len %d data_ptr %p", + m, size, nw->alloc_len, nw->data); + return (true); } static bool @@ -235,7 +235,7 @@ nlmsg_write_socket_mbuf(struct nl_writer *nw, void *buf, int datalen, int cnt) m->m_pkthdr.len = datalen; m->m_len = datalen; int io_flags = (nw->ignore_limit) ? NL_IOF_IGNORE_LIMIT : 0; - return (nl_send_one(m, (struct nlpcb *)(nw->arg_ptr), cnt, io_flags)); + return (nl_send_one(m, (struct nlpcb *)(nw->arg_ptr), cnt, io_flags)); } static bool @@ -251,7 +251,7 @@ nlmsg_write_group_mbuf(struct nl_writer *nw, void *buf, int datalen, int cnt) m->m_pkthdr.len = datalen; m->m_len = datalen; - nl_send_group(m, cnt, nw->arg_uint >> 16, nw->arg_uint & 0xFFFF); + nl_send_group(m, cnt, nw->arg_uint >> 16, nw->arg_uint & 0xFFFF); return (true); } @@ -281,7 +281,7 @@ nlmsg_write_chain_mbuf(struct nl_writer *nw, void *buf, int datalen, int cnt) (*m0)->m_pkthdr.len += datalen; } - return (true); + return (true); } /* @@ -317,7 +317,6 @@ nlmsg_get_ns_lbuf(struct nl_writer *nw, int size, bool waitok) return (true); } - static bool nlmsg_write_socket_lbuf(struct nl_writer *nw, void *buf, int datalen, int cnt) { @@ -341,7 +340,7 @@ nlmsg_write_socket_lbuf(struct nl_writer *nw, void *buf, int datalen, int cnt) } int io_flags = (nw->ignore_limit) ? NL_IOF_IGNORE_LIMIT : 0; - return (nl_send_one(m, nlp, cnt, io_flags)); + return (nl_send_one(m, nlp, cnt, io_flags)); } /* Shouldn't be called (maybe except Linux code originating message) */ @@ -364,7 +363,7 @@ nlmsg_write_group_lbuf(struct nl_writer *nw, void *buf, int datalen, int cnt) m_append(m, datalen, data); free(buf, M_NETLINK); - nl_send_group(m, cnt, nw->arg_uint >> 16, nw->arg_uint & 0xFFFF); + nl_send_group(m, cnt, nw->arg_uint >> 16, nw->arg_uint & 0xFFFF); return (true); } @@ -437,36 +436,36 @@ nlmsg_get_buf(struct nl_writer *nw, int size, bool waitok, bool is_linux) bool nlmsg_get_unicast_writer(struct nl_writer *nw, int size, struct nlpcb *nlp) { - if (!nlmsg_get_buf(nw, size, false, nlp->nl_linux)) - return (false); - nw->arg_ptr = (void *)nlp; + if (!nlmsg_get_buf(nw, size, false, nlp->nl_linux)) + return (false); + nw->arg_ptr = (void *)nlp; nw->writer_target = NS_WRITER_TARGET_SOCKET; nlmsg_set_callback(nw); - return (true); + return (true); } bool nlmsg_get_group_writer(struct nl_writer *nw, int size, int protocol, int group_id) { - if (!nlmsg_get_buf(nw, size, false, false)) - return (false); - nw->arg_uint = (uint64_t)protocol << 16 | (uint64_t)group_id; + if (!nlmsg_get_buf(nw, size, false, false)) + return (false); + nw->arg_uint = (uint64_t)protocol << 16 | (uint64_t)group_id; nw->writer_target = NS_WRITER_TARGET_GROUP; nlmsg_set_callback(nw); - return (true); + return (true); } bool nlmsg_get_chain_writer(struct nl_writer *nw, int size, struct mbuf **pm) { - if (!nlmsg_get_buf(nw, size, false, false)) - return (false); + if (!nlmsg_get_buf(nw, size, false, false)) + return (false); *pm = NULL; - nw->arg_ptr = (void *)pm; + nw->arg_ptr = (void *)pm; nw->writer_target = NS_WRITER_TARGET_CHAIN; nlmsg_set_callback(nw); NL_LOG(LOG_DEBUG3, "setup cb %p (need %p)", nw->cb, &nlmsg_write_chain_mbuf); - return (true); + return (true); } void @@ -479,23 +478,23 @@ bool nlmsg_flush(struct nl_writer *nw) { - if (__predict_false(nw->hdr != NULL)) { - /* Last message has not been completed, skip it. */ - int completed_len = (char *)nw->hdr - nw->data; + if (__predict_false(nw->hdr != NULL)) { + /* Last message has not been completed, skip it. */ + int completed_len = (char *)nw->hdr - nw->data; /* Send completed messages */ nw->offset -= nw->offset - completed_len; nw->hdr = NULL; - } + } NL_LOG(LOG_DEBUG2, "OUT"); - bool result = nw->cb(nw, nw->_storage, nw->offset, nw->num_messages); - nw->_storage = NULL; + bool result = nw->cb(nw, nw->_storage, nw->offset, nw->num_messages); + nw->_storage = NULL; - if (!result) { - NL_LOG(LOG_DEBUG, "nw %p offset %d: flush with %p() failed", nw, nw->offset, nw->cb); - } + if (!result) { + NL_LOG(LOG_DEBUG, "nw %p offset %d: flush with %p() failed", nw, nw->offset, nw->cb); + } - return (result); + return (result); } /* @@ -506,8 +505,8 @@ nlmsg_flush(struct nl_writer *nw) bool nlmsg_refill_buffer(struct nl_writer *nw, int required_len) { - struct nl_writer ns_new = {}; - int completed_len, new_len; + struct nl_writer ns_new = {}; + int completed_len, new_len; if (nw->enomem) return (false); @@ -515,7 +514,7 @@ nlmsg_refill_buffer(struct nl_writer *nw, int required_len) NL_LOG(LOG_DEBUG3, "no space at offset %d/%d (want %d), trying to reclaim", nw->offset, nw->alloc_len, required_len); - /* Calculated new buffer size and allocate it s*/ + /* Calculated new buffer size and allocate it s*/ completed_len = (nw->hdr != NULL) ? (char *)nw->hdr - nw->data : nw->offset; if (completed_len > 0 && required_len < MCLBYTES) { /* We already ran out of space, use the largest effective size */ @@ -530,10 +529,10 @@ nlmsg_refill_buffer(struct nl_writer *nw, int required_len) } bool waitok = (nw->malloc_flag == M_WAITOK); bool is_linux = (nw->writer_type == NS_WRITER_TYPE_LBUF); - if (!nlmsg_get_buf(&ns_new, new_len, waitok, is_linux)) { + if (!nlmsg_get_buf(&ns_new, new_len, waitok, is_linux)) { nw->enomem = true; NL_LOG(LOG_DEBUG, "getting new buf failed, setting ENOMEM"); - return (false); + return (false); } if (nw->ignore_limit) nlmsg_ignore_limit(&ns_new); @@ -543,22 +542,22 @@ nlmsg_refill_buffer(struct nl_writer *nw, int required_len) nlmsg_set_callback(&ns_new); ns_new.arg_uint = nw->arg_uint; - /* Copy last (unfinished) header to the new storage */ - int last_len = nw->offset - completed_len; + /* Copy last (unfinished) header to the new storage */ + int last_len = nw->offset - completed_len; if (last_len > 0) { memcpy(ns_new.data, nw->hdr, last_len); ns_new.hdr = (struct nlmsghdr *)ns_new.data; ns_new.offset = last_len; } - NL_LOG(LOG_DEBUG2, "completed: %d bytes, copied: %d bytes", completed_len, last_len); + NL_LOG(LOG_DEBUG2, "completed: %d bytes, copied: %d bytes", completed_len, last_len); - /* Flush completed headers & switch to the new nw */ + /* Flush completed headers & switch to the new nw */ nlmsg_flush(nw); memcpy(nw, &ns_new, sizeof(struct nl_writer)); - NL_LOG(LOG_DEBUG2, "switched buffer: used %d/%d bytes", nw->offset, nw->alloc_len); + NL_LOG(LOG_DEBUG2, "switched buffer: used %d/%d bytes", nw->offset, nw->alloc_len); - return (true); + return (true); } bool @@ -570,23 +569,23 @@ nlmsg_add(struct nl_writer *nw, uint32_t portid, uint32_t seq, uint16_t type, MPASS(nw->hdr == NULL); int required_len = NETLINK_ALIGN(len + sizeof(struct nlmsghdr)); - if (__predict_false(nw->offset + required_len > nw->alloc_len)) { + if (__predict_false(nw->offset + required_len > nw->alloc_len)) { if (!nlmsg_refill_buffer(nw, required_len)) return (false); - } + } - hdr = (struct nlmsghdr *)(&nw->data[nw->offset]); + hdr = (struct nlmsghdr *)(&nw->data[nw->offset]); - hdr->nlmsg_len = len; - hdr->nlmsg_type = type; - hdr->nlmsg_flags = flags; - hdr->nlmsg_seq = seq; - hdr->nlmsg_pid = portid; + hdr->nlmsg_len = len; + hdr->nlmsg_type = type; + hdr->nlmsg_flags = flags; + hdr->nlmsg_seq = seq; + hdr->nlmsg_pid = portid; - nw->hdr = hdr; - nw->offset += sizeof(struct nlmsghdr); + nw->hdr = hdr; + nw->offset += sizeof(struct nlmsghdr); - return (true); + return (true); } bool @@ -600,11 +599,11 @@ nlmsg_end(struct nl_writer *nw) return (false); } - nw->hdr->nlmsg_len = (uint32_t)(nw->data + nw->offset - (char *)nw->hdr); + nw->hdr->nlmsg_len = (uint32_t)(nw->data + nw->offset - (char *)nw->hdr); NL_LOG(LOG_DEBUG2, "wrote msg len: %u type: %d: flags: 0x%X seq: %u pid: %u", nw->hdr->nlmsg_len, nw->hdr->nlmsg_type, nw->hdr->nlmsg_flags, nw->hdr->nlmsg_seq, nw->hdr->nlmsg_pid); - nw->hdr = NULL; + nw->hdr = NULL; nw->num_messages++; return (true); } @@ -612,10 +611,10 @@ nlmsg_end(struct nl_writer *nw) void nlmsg_abort(struct nl_writer *nw) { - if (nw->hdr != NULL) { - nw->offset = (uint32_t)((char *)nw->hdr - nw->data); - nw->hdr = NULL; - } + if (nw->hdr != NULL) { + nw->offset = (uint32_t)((char *)nw->hdr - nw->data); + nw->hdr = NULL; + } } void From nobody Tue Jan 17 15:26:16 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NxCQw4Mhzz2sZNr; Tue, 17 Jan 2023 15:26: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NxCQw3GK6z4K8W; Tue, 17 Jan 2023 15:26:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673969176; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ATwCEDhjfP5mYtVWNLJz0cQlaxEGNe9vK6fctT5OSPM=; b=izbOsSVu0CGx+DlxtYNDpy9ebeiSKy0bG9TAfXT8hvC82YabaGbKf3UL2wT4yABrzv8iJL MZWoqlgGIt3amkuzY0L9TPpalN1Sh/9UJyYf4O+u7akTfej/qjsDkLq/RwLX/GYTErr3ML V5hcXuyWJTXY+2eUNMEe0v42ucvXG9xMRkRKLdNxE164pY/mWUXk6L33QdBKiOopz5UaPN /qQ5R0wFXnjWksmxwUSuf/SMdaFuB/IPM1IilS54ExBp8QtovD6tq98CY8+K8BAxplu8+y eZbymyISYxEpin3c+RIRDgJnraSy3SYu1xk3lkcTNMWpxkSe07a/m+ZrgWvtFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673969176; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ATwCEDhjfP5mYtVWNLJz0cQlaxEGNe9vK6fctT5OSPM=; b=Zv2GloEdvBWNxtSPQuxY9eO/0KXosYM4DLMFHVQiR/4Kufmn7bwkflk1BxaTdxnt/oLdcA VsdGuLkqBfmEaIG7mOaANdZXIeuYRQ3xG+ozIgEmAicDDwAnVnp3AScbWuBH4uJ+nHB+Lp qJfg2sCTYSAC5Gt1REvWLL9zaCRSIz/oJPKlGypdlSOQxaSuaJD4Mv9uV0xsqR3X3sobhj ce1ThpKNTfG1u+VNPmkoITTTcuKCKByizulEcv3wrFmh7cLG3LHHMkcqdPtc02S7MV8jO9 v+pU2c26EvHpe2+UXVpU0KYGF55T/S0+D+kk65v+ekpeZzRc5BHQ7Oo8hH+K1w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1673969176; a=rsa-sha256; cv=none; b=ppjGCo+OUncMZY2NY4fDjeH2b7Z2qgJbFAw4YF/5VWEOiachcwB7UkzTC9X99jgs5BXrkL 5+NMTmbd9atwFA//Qkg7ZRFz7sk+rWPMjv894WiF3rboxUDFXsCz4S8RYSY6zxM0MxpTwI aLmvXmsLW9rnNnP7bz0wZDXwt4Ma2vLp7HqqjXKrqu4chDIvGhtyqaDXmsybFjRubHxrIS 5/wZYyZbAkhBsjfXjt0AMeYq+01NqA2NAh8G0fSz3o7lr+5klcN1+C/SkLOQn1qvEdio3Q PbnRBgGg09/SG32pexhz78I1cmX/eLu9WNNOyhZx52US8+L8unPdG2P24xKKBg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NxCQw2D3WzcGy; Tue, 17 Jan 2023 15:26:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30HFQGpI090703; Tue, 17 Jan 2023 15:26:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30HFQGSB090702; Tue, 17 Jan 2023 15:26:16 GMT (envelope-from git) Date: Tue, 17 Jan 2023 15:26:16 GMT Message-Id: <202301171526.30HFQGSB090702@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Dag-Erling=20Sm=C3=B8rgrav?= Subject: git: c96859847991 - main - df: Return non-zero status on write failure. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: c968598479917f52022b86d0089a9835ddcf2799 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=c968598479917f52022b86d0089a9835ddcf2799 commit c968598479917f52022b86d0089a9835ddcf2799 Author: Dag-Erling Smørgrav AuthorDate: 2023-01-17 13:40:05 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-01-17 15:25:28 +0000 df: Return non-zero status on write failure. While here, complete the libxo conversion and switch return value to standard constants. MFC after: 1 week Sponsored by: Klara, Inc. Differential revision: https://reviews.freebsd.org/D38097 --- bin/df/df.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/bin/df/df.c b/bin/df/df.c index 627d8b1c861d..9f7588a68d4f 100644 --- a/bin/df/df.c +++ b/bin/df/df.c @@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -204,7 +203,7 @@ main(int argc, char *argv[]) argc -= optind; argv += optind; - rv = 0; + rv = EXIT_SUCCESS; if (!*argv) { /* everything (modulo -t) */ mntsize = getmntinfo(&mntbuf, MNT_NOWAIT); @@ -226,14 +225,14 @@ main(int argc, char *argv[]) if (stat(*argv, &stbuf) < 0) { if ((mntpt = getmntpt(*argv)) == NULL) { xo_warn("%s", *argv); - rv = 1; + rv = EXIT_FAILURE; continue; } } else if (S_ISCHR(stbuf.st_mode)) { mntpt = getmntpt(*argv); if (mntpt == NULL) { xo_warnx("%s: not mounted", *argv); - rv = 1; + rv = EXIT_FAILURE; continue; } } else { @@ -246,7 +245,7 @@ main(int argc, char *argv[]) */ if (statfs(mntpt, &statfsbuf) < 0) { xo_warn("%s", mntpt); - rv = 1; + rv = EXIT_FAILURE; continue; } @@ -257,7 +256,7 @@ main(int argc, char *argv[]) * we've been given (-l, -t, etc.). */ if (checkvfsselected(statfsbuf.f_fstypename) != 0) { - rv = 1; + rv = EXIT_FAILURE; continue; } @@ -286,7 +285,8 @@ main(int argc, char *argv[]) prtstat(&totalbuf, &maxwidths); xo_close_container("storage-system-information"); - xo_finish(); + if (xo_finish() < 0) + rv = EXIT_FAILURE; exit(rv); } @@ -322,7 +322,7 @@ makevfslist(char *fslist, int *skip) if (*nextcp == ',') i++; if ((av = malloc((size_t)(i + 2) * sizeof(char *))) == NULL) { - warnx("malloc failed"); + xo_warnx("malloc failed"); return (NULL); } nextcp = fslist; From nobody Tue Jan 17 16:38:24 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NxF284v5Rz2skbP; Tue, 17 Jan 2023 16:38: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NxF284Dpbz3Dnv; Tue, 17 Jan 2023 16:38:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673973504; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dF/RawRwAVpX5NJ8OnT918Hpy9OW0s+M2aq7EOzXLiI=; b=deamlxWXaqQwa+eB1RexTeM5jLLSx6567XLcicAQY4g6SlUt9A7XyAX9eKyv6KBYvcXiLW oojdp/ZQtYUQ24DKMyDHGs/GvaRmNUJCZqJQ2s1qToAmhEBhN5pj0aXL2lVttlgPZUEtAZ BX22sWxpVFwDAH5AuLjFzoYmDOEE4+XOe1vILrxpkBNDAAE/Ci+/o+DkpoN7jz8rBaxcwZ 81Jf4G1Y4BQv/Q+b8GnlNhcXW2GX96YL28aFnj1cbR5lLouCX0ve6M7sQjbu2gCF9170Hk 6v+sB5W9hqI3qAEdt8yB4DA60/k3FvXB3D9QLCXNstrohwYFsvb0rL3HvnJKDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673973504; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dF/RawRwAVpX5NJ8OnT918Hpy9OW0s+M2aq7EOzXLiI=; b=X+PNeCYrOFLHhQ0Na5iayItq3JwwVsstmPYAdZlx1l5CQlApdrgzkO5HiWGOWnIj7djvbJ 47RYvlU7+qwmYP1iwLkw/DBHWOhKtns8j5jZMgmta+xDV340rMEno9i2kuJN/FWA1svBEZ fgUm/R+AES6G2fEIkyb8eD846WerppknpReL7p4tzWO3CgloQYB1Xq98vg1qkX5l6VVk7K g69XncVwyLE5i46mSpbOZ+afuHgSFVkstHIU7rw3g7lhz0fMOGdr+x8Xa+37fIwn/lsC0a BBi25QLvz8lFgm7Xunl6S9G/TzvpDOXBxJIhjiyX54U7Fbc4EnFZIISAeGvK/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1673973504; a=rsa-sha256; cv=none; b=kJLdbD9UjKh7rMj3Ysb9IfbjSF7NqRfOwb18/TzAFXPBrGfvZOHmpLr4NVicCfbI08tcdE JLnr8YZNtqFT3sxyYDAZjFGh4OlJGtYJwL9jNbYAU5E6/GsJOD4HiSJ8ODH3bMboeb/EO5 EYcqKwTiOPA+x9blWKxB4wqwMtnJbJz8NdJLALG3g4pz90zIv0CiMdEkPQedDFrJEGWU3e 2kvItnJmMzbRVkdC6dtV0j6slcGTPvtpP2vSu6aHl3hrgm+LmKH9Tv6weX384znAxiaei6 zrFdDmqobtjpQ78QjeFzjq7OJ1b9SumZN1vIf2aAgDGA70gwxfMP7iJt4k5zGQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NxF2832vPzdv7; Tue, 17 Jan 2023 16:38:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30HGcOqa091161; Tue, 17 Jan 2023 16:38:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30HGcO67091160; Tue, 17 Jan 2023 16:38:24 GMT (envelope-from git) Date: Tue, 17 Jan 2023 16:38:24 GMT Message-Id: <202301171638.30HGcO67091160@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: e1b610f76caa - main - arm64: Fix thread0.td_kstack_pages init List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e1b610f76caa09bbc3910477da878ea5078c6569 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=e1b610f76caa09bbc3910477da878ea5078c6569 commit e1b610f76caa09bbc3910477da878ea5078c6569 Author: Brooks Davis AuthorDate: 2023-01-17 16:35:08 +0000 Commit: Brooks Davis CommitDate: 2023-01-17 16:37:09 +0000 arm64: Fix thread0.td_kstack_pages init Commit 86a994d6537d7b5e1efb1019e466d86a688fd570 initialized thread0.td_kstack_pages to KSTACK_PAGES. Due to the lack of an include of opt_kstack_pages.h it used the fallback value of 4 from machine/param.h. This meant that increasing KSTACK_PAGES in the kernel config resulted in a panic in _epoch_enter_preempt as the following assertion was false during network stack setup: MPASS((vm_offset_t)et >= td->td_kstack && (vm_offset_t)et + sizeof(struct epoch_tracker) <= td->td_kstack + td->td_kstack_pages * PAGE_SIZE); Switch to initializing with kstack_pages following other architectures. Reviewed by: imp, markj Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D38048 --- sys/arm64/arm64/machdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c index b099980634f6..2eaf4ef14390 100644 --- a/sys/arm64/arm64/machdep.c +++ b/sys/arm64/arm64/machdep.c @@ -365,7 +365,7 @@ init_proc0(vm_offset_t kstack) proc_linkup0(&proc0, &thread0); thread0.td_kstack = kstack; - thread0.td_kstack_pages = KSTACK_PAGES; + thread0.td_kstack_pages = kstack_pages; #if defined(PERTHREAD_SSP) thread0.td_md.md_canary = boot_canary; #endif From nobody Tue Jan 17 16:38:25 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NxF294qPNz2skT3; Tue, 17 Jan 2023 16:38: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NxF29472cz3DyW; Tue, 17 Jan 2023 16:38:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673973505; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BId6xlhwqw81vBL8yvAvTE90S0X6x+OmH6l96Q4JHhc=; b=hNc3iqwH71Y1zAVEu+sPPZtQPYfCSq/O0Qg+ZBA2xoZs7gwfmCf35eBcT0PG+lNOUrpbTe 3QG3lPuYfpcy1Mg248RQa9HnDhCwNB6InOXPNZGVZZ/chx+92AunLueVB8KUvCpVnDCWog K7vXFEKpWOARIAbdDfwgrlaukCd2QQ3ER5aRubdiG/2m2dMzDU9/xS/MsZAkrTGueHbPEA jQS1/u+b0QzwdHKcjxlGa1YAYwat/Qk84mfwOJRrtuU1wE7bs+ds3YE7hNcPIN6DWjpwR3 9qFGHt6FPLgF45NBOWlvU0abULEMTXSgK008Jp6PDmyYrQviX/qDHN4D/w+eSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673973505; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BId6xlhwqw81vBL8yvAvTE90S0X6x+OmH6l96Q4JHhc=; b=ePIoDGZ21aWkXVRv7uGC3aPgnsvu+sY1qakq3RU34dG7L+/hmtiSkugg1pvHPv3LVgg2uV hNJ7mhcrLAeDaoEZGuP4KFSK1uI6XoIYOHssVrPDEJwc+EKjJPhGR1vrGhLqt/v7z3aLgY l3CgSWxI1kFwyNp5lGT5Ov0gD8qaFHEHCHMmwbFDl6uMgk5WVh7IJTseUn2HOrJgDFLVcR zK0946qAJF2UWAgfnUyYBpRFWOJWK7CT3kvxdxd1iW19XfBkoc9h35HEogg5YVPbm+IG6l 1PXyVMazaFDK5XcJ10L2ZvrySBr4Leh3kCGusWbwq4gvqm7KwnQUJN5YdwGOKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1673973505; a=rsa-sha256; cv=none; b=mryhDKHUFofhLpwcKW0EYEOfOanZJC6vuKFlQ8OuU8Rf1cQWoDLUrYScuS1tOFAWBHe0Vp br44IJjtf03yEfB7r8HdsQjZgPEDWzY46VxJQ9Mc4krw4r330wsFmyMyNLgQRLpDlaiYEf cbqJf+Tx2UTr8HlMA6SyOYEynlkD5XfGFqHLknohPftzZmnxJE10Vr1C9aFlZoT4Jifil5 Lrt79308yhkvIXZZvAtKZeaLYcPxUsdG6z5aW64OY0Cic9MSrEcqG/AFRlxr3t7+qptNMN Ga1WcgL5D0hK+eOfe55l0NU9aFAtIr2Ci2Ogryd7tokP0nYJMmo7Pjq7hcJD4Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NxF293CRjzfBL; Tue, 17 Jan 2023 16:38:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30HGcPtM091185; Tue, 17 Jan 2023 16:38:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30HGcP3C091184; Tue, 17 Jan 2023 16:38:25 GMT (envelope-from git) Date: Tue, 17 Jan 2023 16:38:25 GMT Message-Id: <202301171638.30HGcP3C091184@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: b75062f23431 - main - riscv: Fix thread0.td_kstack_pages init List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b75062f23431fbabef1e7d665cae270b144f71b1 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=b75062f23431fbabef1e7d665cae270b144f71b1 commit b75062f23431fbabef1e7d665cae270b144f71b1 Author: Brooks Davis AuthorDate: 2023-01-17 16:36:15 +0000 Commit: Brooks Davis CommitDate: 2023-01-17 16:37:42 +0000 riscv: Fix thread0.td_kstack_pages init Commit 0ef3ca7ae37c70e9dc83475dc2e68e98e1c2a418 initialized thread0.td_kstack_pages to KSTACK_PAGES. Due to the lack of an include of opt_kstack_pages.h it used the fallback value of 4 from machine/param.h. This meant that increasing KSTACK_PAGES in the kernel config resulted in a panic in _epoch_enter_preempt as the following assertion was false during network stack setup: MPASS((vm_offset_t)et >= td->td_kstack && (vm_offset_t)et + sizeof(struct epoch_tracker) <= td->td_kstack + td->td_kstack_pages * PAGE_SIZE); Switch to initializing with kstack_pages following other architectures. Reviewed by: imp, markj Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D38049 --- sys/riscv/riscv/machdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/riscv/riscv/machdep.c b/sys/riscv/riscv/machdep.c index b03d45b018ec..0821a29d11c1 100644 --- a/sys/riscv/riscv/machdep.c +++ b/sys/riscv/riscv/machdep.c @@ -291,7 +291,7 @@ init_proc0(vm_offset_t kstack) proc_linkup0(&proc0, &thread0); thread0.td_kstack = kstack; - thread0.td_kstack_pages = KSTACK_PAGES; + thread0.td_kstack_pages = kstack_pages; thread0.td_pcb = (struct pcb *)(thread0.td_kstack + thread0.td_kstack_pages * PAGE_SIZE) - 1; thread0.td_pcb->pcb_fpflags = 0; From nobody Tue Jan 17 20:17:26 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NxKtt5rzFz2ty7g; Tue, 17 Jan 2023 20:17:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NxKtt5Lp0z3sYS; Tue, 17 Jan 2023 20:17:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673986646; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dnOvKWUUJoJ0SPbqxxuWTJdTdOazNbd7CnH//2VbyHw=; b=T6ayRcJv+Lf0Cc7UWLDuARqvaGYNFWVOu5u1oh146yEjWPdeEkMyp6zMWlY8a+QOKQp+A+ NAT/KCDBBR4Vz3C5jH9wNIibzegOMv67R0FTfYRRzOWD1H2hMzT2RTMuQejN5+pJ4OU7bY Q4UJcvJq4x1okLcng13IhGXUBf06N92bavHty6gS4iqYYi4DgilDBBRhdjYUeaJw0e9KxA AZ0Ae6aYp7xaDqveP329t/OHViePX+a+4exjpq4EsG3B4/Tby6R6kAYvN8tti93IUe14HI KwW3RfZuwXLmldBUaJX3iIRlb7eT+bq7xiJfP37a6vRvLhN+vrHM+GhLkgvgTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673986646; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dnOvKWUUJoJ0SPbqxxuWTJdTdOazNbd7CnH//2VbyHw=; b=hs2pQ54dUggh7ui7Ty/s2dLz0vCGCT9EQ78oiRNLOPbLHAs2GrpNjaG8mm4uM3GiOKK91M vdpW1ghVza93ZCWHKM/rN9a8mSngu9SDHwBKASoKKrG3xb74mfQlGs+ct6MePW5DbHIZx/ 81KEbcjGr1c+KZ+IDjR360JJtLSUa7W3HLbJUUHcWRGVo5rPPqtxe5QUwMbojmTestzxZL jeJ/a6kn9LN+/dLw/Bes6V2d67JTU25MzEVaJ4LWvGgCZgB/07bgTMPR0s1oV7JaGcDKgT J8X1UunQeqUCJ6V8AWyaPCSPC8+ZkWf4Um/+zwVaP5V/0ZNAEyKVTXAcyXD+6w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1673986646; a=rsa-sha256; cv=none; b=UqCPdKajUXU4wByA4loHkl01DWyVJOzwUcpbiHFC7G7tCFQCcnkyApDRbvdDiWAyR3agrN 74jZbACFa65RwlreNrlqFAhcUgHSX58f4MzzpoYpJoMhNZpqbMR8oQBr/+DAgJ0lBWuG/e SumSVZAPYhxQp41MjZ/wMsc2ALrK7M92mD3ni2PxQnHfC7crMlHqTU682XBnZKwBnOzwiL XuX0JR1qXu7YbY1hTOw4vDUbKoNdLznOW6Y//+0Hm2zTzqnZ0hZnkishusqd/7DEtNSekf kkbZq6sZYESAeE60vkWqOoZ9HYbl+O2uY0NMzXjTPn+zUKcTcf0n7sTaU42Fng== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NxKtt4MCZzkGP; Tue, 17 Jan 2023 20:17:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30HKHQFx006339; Tue, 17 Jan 2023 20:17:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30HKHQc0006338; Tue, 17 Jan 2023 20:17:26 GMT (envelope-from git) Date: Tue, 17 Jan 2023 20:17:26 GMT Message-Id: <202301172017.30HKHQc0006338@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: 701bb67bc5f8 - main - ifnet: Rename DrvAPI 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 701bb67bc5f8df9929a249265aabd96c3143e222 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=701bb67bc5f8df9929a249265aabd96c3143e222 commit 701bb67bc5f8df9929a249265aabd96c3143e222 Author: Justin Hibbits AuthorDate: 2023-01-17 20:08:43 +0000 Commit: Justin Hibbits CommitDate: 2023-01-17 20:15:51 +0000 ifnet: Rename DrvAPI to "IfAPI" "DrvAPI" is too generic a name. Make the name more specific as "IfAPI" (InterFace API). Sponsored by: Juniper Networks, Inc. --- tools/ifnet/{convert_drvapi.sh => convert_ifapi.sh} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/ifnet/convert_drvapi.sh b/tools/ifnet/convert_ifapi.sh similarity index 98% rename from tools/ifnet/convert_drvapi.sh rename to tools/ifnet/convert_ifapi.sh index 228456dd244d..ac103dc5702c 100755 --- a/tools/ifnet/convert_drvapi.sh +++ b/tools/ifnet/convert_ifapi.sh @@ -235,7 +235,7 @@ then fi IFS= echo -n "Conversion for $file started, please wait: " -FAIL_PAT="XXX - DRVAPI" +FAIL_PAT="XXX - IFAPI" count=0 while read -r line do @@ -272,7 +272,7 @@ echo "" count=`grep $FAIL_PAT $file.tmp | wc -l` if [ $count -gt 0 ] then - echo "$count lines could not be converted to DRVAPI" + echo "$count lines could not be converted to IFAPI" echo "Look for /* $FAIL_PAT */ in the converted file" fi echo "original $file has been moved to $file.orig" From nobody Wed Jan 18 07:54:11 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NxdLr0sHJz2sTgp; Wed, 18 Jan 2023 07:54: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NxdLr0FqRz3pvr; Wed, 18 Jan 2023 07:54:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674028452; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1nZTvt9hKkj5+FTUga+oR5v+7mv7LeNsz3Kky9Fp9/Q=; b=KWJjZl0rIwasfIMxfCOuw0mn37TsTur2twK44Ya6T2nge0ccT/3GgNZJJvFFYNWyK4L9OV SO7agRyFnuxVvwxFRsnvftpY5Ynv3tIXvVutddgr4a1ID6WI6vwAX7im8Gr7lPuE/1DfI7 Pu4dWpyVuhWSN5bSl2xFXhrxvOSQoXdKqCdw0yfS3/NT5uRPs+CSBswPRfPsQ+gPkH3LSA r3VDIDzTLrKmTFPWc4qX+EuBQxGJdxos5P4ncOt+fpCEidONz249G8ykzhf9KhL2Ljy12l YOujGpnHu44GQEvAhobdYf1Yh7e9NIubBKh8ewIbjH0aSfLnty5irR7RexeoRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674028452; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1nZTvt9hKkj5+FTUga+oR5v+7mv7LeNsz3Kky9Fp9/Q=; b=Ze1ID0fSHN4UXx5GlqP402XxgdDwXUu85BxAxCZvJ+Wr7+6oW53qM/Fd4XViMDYJJ3agop 3FMEzl4Xrpo3njOmS0RewZYex0N3nqXPIYy9qsAUqEz03Z1u/+f1QKqLDl9sTRYamnZRGP m1JSq1+1fYYs3VAUKaOJ+ar70D3LovcSboGQYphnefVhQ07XWL1Wto2nOB3v2XVwJ2xicM +KFE0+5BZSOgu5FemS8cndexB078ffoVShkm6+VOAotfWq9wcYkW4quWQOseu0mGj007cV nYfoIoPLFiBJESGGtg3jk+XLxskep84nxPm0kYiC0Vc+fC5uHEhxy4Q0zbmLmg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674028452; a=rsa-sha256; cv=none; b=iVEKW99DzSyjFGRJxf2CFBJNdxyrwf6BlNTULFtH9QHI4h1jn72pHOl1gCW5O3h3nux/hU TwD7t2JBtXLACtXgaFM6yJBHXstLUxsyWrVeJXi5Wg3emjJX1DHkJMaLK96wpGmpudMyAa 5Nn7zZ5qTFf7HevHVw3kSF+y2MToQF2f4kiPO+nsd3s7BVzFDCTq10mVV8BkudrCjmX+B0 9NSnlrKGDPpsUp6XGvhpX6ii3prbFKhvgEXMmGe3AvU4bGFgA6AIzG+Bwu8qv+RufyULv7 5B6DCW25s0B5Com/dWidLehUklvEGlTdSNXqkHwAlN/djwfJZP1kR6RtoHXILA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NxdLq6QMDz13kh; Wed, 18 Jan 2023 07:54:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30I7sBsc008608; Wed, 18 Jan 2023 07:54:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30I7sBnW008607; Wed, 18 Jan 2023 07:54:11 GMT (envelope-from git) Date: Wed, 18 Jan 2023 07:54:11 GMT Message-Id: <202301180754.30I7sBnW008607@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Juraj Lutter Subject: git: 1d577bedbae8 - main - unbound: Fix config file 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: otis X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1d577bedbae80ced38ccb834e6835e5fd98bc411 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by otis (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=1d577bedbae80ced38ccb834e6835e5fd98bc411 commit 1d577bedbae80ced38ccb834e6835e5fd98bc411 Author: Juraj Lutter AuthorDate: 2023-01-17 17:25:47 +0000 Commit: Juraj Lutter CommitDate: 2023-01-18 07:50:07 +0000 unbound: Fix config file path Commit 1838dec31895fd4752fa8631322ab93be0705a66 changed the config file path to /usr/local/etc/unbound/unbound.conf which is wrong for unbound in base. Reported by: Ihor Antonov Reviewed by: zlei Approved by: zlei Differential Revision: https://reviews.freebsd.org/D38106 Fixes: 1838dec31895fd4752fa8631322ab93be0705a66 MFC after: 1 month X-MFC with: 1838dec31895fd4752fa8631322ab93be0705a66 --- usr.sbin/unbound/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/unbound/config.h b/usr.sbin/unbound/config.h index bd36bb7573f8..2068cbfe7295 100644 --- a/usr.sbin/unbound/config.h +++ b/usr.sbin/unbound/config.h @@ -21,7 +21,7 @@ #define CONFCMDLINE "--with-ssl=/usr --with-libexpat=/usr --disable-dnscrypt --disable-dnstap --enable-ecdsa --disable-event-api --enable-gost --with-libevent --disable-subnet --disable-tfo-client --disable-tfo-server --with-pthreads--prefix=/usr --localstatedir=/var/unbound --mandir=/usr/share/man --build=freebsd" /* Pathname to the Unbound configuration file */ -#define CONFIGFILE "/usr/local/etc/unbound/unbound.conf" +#define CONFIGFILE "/var/unbound/unbound.conf" /* Define this if on macOSX10.4-darwin8 and setreuid and setregid do not work */ From nobody Wed Jan 18 09:39:48 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Nxghh3vjRz2sj1s; Wed, 18 Jan 2023 09:39: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Nxghh3RmSz40Nr; Wed, 18 Jan 2023 09:39:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674034788; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WRikmio3G5UWWgq/YfEeCRwPryr1b9xP9tfh7qnUL/w=; b=X+BpgutIB+ARHDgxHLP2BsB5MhKJJ7bfjEMEd4TqGBij34ZodyWg/suNsKkqQF9AL9sUiY TiLZ3YfXjuWANefOkXHlCmr30b0ymfXDDTbhjz5CaAyY19gLScjYQRAO+ME4U7ZJJ6QQLg P5VSc9PNrIkdRSIANxaFLiieFlEmgHth91B+vJJ0NqyUfTTQDi3DdViSwjN5u6vGx88HE4 Y74GBPWMvXaZG5/lCrpMNWAMCcxSNm6mMZ1uSzDlzT4TiM7uAZ65vmyqlAlOYV9hHh2tzd HBiyKPhNfgk1YJl3GRJaJhz7osjP6rmu7m/HTL77pZnzDIAc4snUPcklLlCFzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674034788; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WRikmio3G5UWWgq/YfEeCRwPryr1b9xP9tfh7qnUL/w=; b=NeaHrDsIo05fnOIUA4YVzFb+MBVtJb+qO1uh+lPLOklrLNG+ry/OwBEYNr2FUk1XYoG5g8 CL+7FmcaWfdBVN5ff8nNC1scVToxsNi8FK32bDUw/ulIqGHqHfHDs+fIgyvh18ziW4Mgwy xibvK8A2e46afs9ToRzD0wE7ZrkG+91piEo+B3Hi8XL56d/QSZvCk/MLxsQr3OFOS94IpI Gi0a2OncZ1u38+5CfKjUZDUv8R3E0eXqaTBXooK7dnMXOVcaCT0mA+eYEADlfWvToA0cVX SxbPqKARlbmmWxRpirpNfdEF3J11u0vBFZluRbF9OjK1KUS4pYqyLPsvborjOg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674034788; a=rsa-sha256; cv=none; b=mFcCBTXKJoCf8xy33Eis9WCp+UJ4f4gmYvosPkUHnOz5Vp/OWJGwOpVOicS7fWn44T9jsJ 8saDJTKWY9SrxlWOYHkwDkThFbMcptep3C7zMFhkMNrKgPeLFRkRrEtTiOtdOzJ660kAMG PHSyKr4jx5IHzQMVe1HXdhPPfm5KRt89hFpCF4+m/DIUjpyplqvoIF0WHhRqJoeg5W4iAu Hoe+q1Rhcbt3k6qhLmAXVjnY+AQiGHT1IV+U/6R20D7UcEhg6NhoyLmRtUTu9B2L04G7vf G82ySptDwLMhLZ8boIdKvy6Q7+vwgCy/bS7Z+KCOaxpBxANfla8vIZss8Xka4A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Nxghh2VSyz161c; Wed, 18 Jan 2023 09:39:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30I9dmsQ053045; Wed, 18 Jan 2023 09:39:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30I9dm1k053044; Wed, 18 Jan 2023 09:39:48 GMT (envelope-from git) Date: Wed, 18 Jan 2023 09:39:48 GMT Message-Id: <202301180939.30I9dm1k053044@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 95dd6974b591 - main - Always read the VFP regs in the arm64 fill_fpregs List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 95dd6974b591ce76bf8d29adcc0dd01b4b281ffd Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=95dd6974b591ce76bf8d29adcc0dd01b4b281ffd commit 95dd6974b591ce76bf8d29adcc0dd01b4b281ffd Author: Andrew Turner AuthorDate: 2023-01-18 09:30:20 +0000 Commit: Andrew Turner CommitDate: 2023-01-18 09:31:35 +0000 Always read the VFP regs in the arm64 fill_fpregs The PCB_FP_STARTED is used to indicate that the current VFP context has been used since either 1. the start of the thread, or 2. exiting a kernel FP context. When case 2 was added to the kernel this could cause incorrect results to be returned when a thread exits the kernel FP context and fill_fpregs is called before it has restored the VFP state, e.g. by trappin on a userspace VFP instruction. In both of the cases the base save area is still valid so reduce the use of the PCB_FP_STARTED flag check to help decide if we need to store the current threads VFP state. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D37994 --- sys/arm64/arm64/exec_machdep.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/sys/arm64/arm64/exec_machdep.c b/sys/arm64/arm64/exec_machdep.c index 6109a866a2d0..12c23149ec7f 100644 --- a/sys/arm64/arm64/exec_machdep.c +++ b/sys/arm64/arm64/exec_machdep.c @@ -153,16 +153,17 @@ fill_fpregs(struct thread *td, struct fpreg *regs) */ if (td == curthread) vfp_save_state(td, pcb); + } - KASSERT(pcb->pcb_fpusaved == &pcb->pcb_fpustate, - ("Called fill_fpregs while the kernel is using the VFP")); - memcpy(regs->fp_q, pcb->pcb_fpustate.vfp_regs, - sizeof(regs->fp_q)); - regs->fp_cr = pcb->pcb_fpustate.vfp_fpcr; - regs->fp_sr = pcb->pcb_fpustate.vfp_fpsr; - } else + KASSERT(pcb->pcb_fpusaved == &pcb->pcb_fpustate, + ("Called fill_fpregs while the kernel is using the VFP")); + memcpy(regs->fp_q, pcb->pcb_fpustate.vfp_regs, + sizeof(regs->fp_q)); + regs->fp_cr = pcb->pcb_fpustate.vfp_fpcr; + regs->fp_sr = pcb->pcb_fpustate.vfp_fpsr; +#else + memset(regs, 0, sizeof(*regs)); #endif - memset(regs, 0, sizeof(*regs)); return (0); } From nobody Wed Jan 18 09:39:49 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Nxghk0lgXz2sjG3; Wed, 18 Jan 2023 09: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Nxghj4s0jz40Z2; Wed, 18 Jan 2023 09:39:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674034789; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DTXtpfZAQqmyZIhiUPzcCnpLkavLseTbpRffRv5u4hY=; b=yafLs9qF/1luqUgw5e9Lwnp9iuKYMIXKoAosAN8KPgWuVoKYYyXE5ewe1IPIMsGTO6FjBM kAnSSQgpO3ARqrINmDS8Ok2Gs6rf3BlBl9ZnIFXNS/AYrn2evsHCzTZy2RBaq9OPHAk/Cl hvSY2M0F/J8HUIxNJe/F8Iz4JJZYTOCQ8NcDGrLshePEmOZQH12z6aOmaS2CtHy9Lm65AW ZC83sP3BAp6CIsGl7dSqeNa86bu5Pu/ikLwuXiZLEAOyI1cEDoPF3L8vbqzuautfYJBOB4 UlUKjHaJdjAU3lTqyeTIrKg3XFQUkny7sH8B6LIPu/7T6YtZXA/4LiCN/LZpdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674034789; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DTXtpfZAQqmyZIhiUPzcCnpLkavLseTbpRffRv5u4hY=; b=FO/KOs+BkFrLgre0452fgM/G2o3PYupo2XiKsDGuVH39looSy/eNwGJkk64I2XqQ78ItCG 60q+HEKcGM3soFVhnB83EyMaWE+oiP/E8wFMEardvjtzAIlhuylPrwxdJ/Sf3ufg+ac3px Bl16akII9hqiAKpzKbZryw1cWXDaOFNgTItbdyCO46ZbTr3Km9xV8/XLukXD/DjHoa8a1Y /C702vJML7LUMJSXtBsgAujaex9cNaKeJHexBrn889MsQIueRqx/Ffix7DBbZOUZXNR/Zp Ms5wtDByeXme+6XIXUxE8iVFjz7R6jHYw56oHSOsIzJEIt/fOfV1wzjL2ReziA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674034789; a=rsa-sha256; cv=none; b=nWnt5oSGej2Hwj02JGBREsyvf4Y28mFi9WZA+jCbJgzfoXnkzBThqG9ejqJNrCUgVkhmyS PfvF9BQYc7MML4Lm9wz9BdmZGL8pwgAe/turrdliIe8Vnxceu6I58K4R6JQnQYosROwguE KBUqBM5hD8SJCTqu6I7G5Fv/QGqg1vveS7PJSBn42lJaqqzaBrQ2n7T9+WgPGSQiSsd7pS 45yK2nIgS5E1AwD/0vZLqGRXyxWh13NuqXLayRaM/nFO9/SryNltYXndtIYlLr0KGqWOaZ uSHe56aGmBERv3sfmkjZ+sIsu0Nzrc7Zw20KbYf+33f3Zb4OXAdURgk7DxgXhw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Nxghj3fcmz166M; Wed, 18 Jan 2023 09:39:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30I9dnaF053077; Wed, 18 Jan 2023 09:39:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30I9dnU5053076; Wed, 18 Jan 2023 09:39:49 GMT (envelope-from git) Date: Wed, 18 Jan 2023 09:39:49 GMT Message-Id: <202301180939.30I9dnU5053076@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 61f5462fde6c - main - Always store the arm64 VFP context List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 61f5462fde6c38c1f4f5c34a05fab506b6869375 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=61f5462fde6c38c1f4f5c34a05fab506b6869375 commit 61f5462fde6c38c1f4f5c34a05fab506b6869375 Author: Andrew Turner AuthorDate: 2023-01-18 09:30:32 +0000 Commit: Andrew Turner CommitDate: 2023-01-18 09:31:45 +0000 Always store the arm64 VFP context If a thread enters a kernel FP context the PCB_FP_STARTED may be unset when calling get_fpcontext even if the VFP unit has been used by the current thread. Reduce the use of this flag to just decide when to store the VFP state. While here add an assert to check the assumption that the passed in thread is the current thread and remove the unneeded critical section. The latter is unneeded as the only place we would need it is in vfp_save_state and this already has a critical section when needed. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D37998 --- sys/arm64/arm64/exec_machdep.c | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/sys/arm64/arm64/exec_machdep.c b/sys/arm64/arm64/exec_machdep.c index 12c23149ec7f..258cb5d26b13 100644 --- a/sys/arm64/arm64/exec_machdep.c +++ b/sys/arm64/arm64/exec_machdep.c @@ -489,30 +489,27 @@ get_fpcontext(struct thread *td, mcontext_t *mcp) #ifdef VFP struct pcb *curpcb; - critical_enter(); + MPASS(td == curthread); curpcb = curthread->td_pcb; - if ((curpcb->pcb_fpflags & PCB_FP_STARTED) != 0) { /* * If we have just been running VFP instructions we will * need to save the state to memcpy it below. */ vfp_save_state(td, curpcb); - - KASSERT(curpcb->pcb_fpusaved == &curpcb->pcb_fpustate, - ("Called get_fpcontext while the kernel is using the VFP")); - KASSERT((curpcb->pcb_fpflags & ~PCB_FP_USERMASK) == 0, - ("Non-userspace FPU flags set in get_fpcontext")); - memcpy(mcp->mc_fpregs.fp_q, curpcb->pcb_fpustate.vfp_regs, - sizeof(mcp->mc_fpregs.fp_q)); - mcp->mc_fpregs.fp_cr = curpcb->pcb_fpustate.vfp_fpcr; - mcp->mc_fpregs.fp_sr = curpcb->pcb_fpustate.vfp_fpsr; - mcp->mc_fpregs.fp_flags = curpcb->pcb_fpflags; - mcp->mc_flags |= _MC_FP_VALID; } - critical_exit(); + KASSERT(curpcb->pcb_fpusaved == &curpcb->pcb_fpustate, + ("Called get_fpcontext while the kernel is using the VFP")); + KASSERT((curpcb->pcb_fpflags & ~PCB_FP_USERMASK) == 0, + ("Non-userspace FPU flags set in get_fpcontext")); + memcpy(mcp->mc_fpregs.fp_q, curpcb->pcb_fpustate.vfp_regs, + sizeof(mcp->mc_fpregs.fp_q)); + mcp->mc_fpregs.fp_cr = curpcb->pcb_fpustate.vfp_fpcr; + mcp->mc_fpregs.fp_sr = curpcb->pcb_fpustate.vfp_fpsr; + mcp->mc_fpregs.fp_flags = curpcb->pcb_fpflags; + mcp->mc_flags |= _MC_FP_VALID; #endif } From nobody Wed Jan 18 09:39:50 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Nxghl07Hgz2sjSc; Wed, 18 Jan 2023 09:39: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Nxghk5FFGz40fG; Wed, 18 Jan 2023 09: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=1674034790; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0Q7H+/t2vuQt52/yQ4Ms3g+86eubimeQZjmNTgzrGWo=; b=KO+HZBKyWc4KE0aSP/ZEQDrME1BiUtTp/h8r11LAUnwOluQtUbStDGtoJCNmnNjnhlEegB 8hYCwsS9uuq/f2VscsgCv0GozE1wHgav2eCqwLwn3FO8jUIrKeKYmjMdVM/wrSvMcUndJ7 9wSPbm6XYWZl2GavhmhaC7tk9YiHBE4G45W0oePZfqtsOKlcIHiB4MHq2hP9/yOTd6yhCS OTFlrCFQgtequbkImx4e3IyMB03u76xmU5IikpA8Ae0UBusl9rIhOBrq2S0M1zsENS1a89 xRUenLvgibbYtrboI5cxgLcmjctneqPqyuS3CpKEl/q+niju1wtd6nrfOGo6+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674034790; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0Q7H+/t2vuQt52/yQ4Ms3g+86eubimeQZjmNTgzrGWo=; b=Zch/UDFKg1eU3pseMBxpcvGauEgCKByt0y0x4BFR1wX09x3aJqt+qH1u7vJqYSzTcwR4va iCIbQU0fSm1jiZ3yUJimU/lcAaM7fAyxadgTndyLCT0lcjDjhbkI6+Q7QDv7IuHuqxKFYe zI6G8jS/jeqs0elqIaYEqSDcslPnRazP35sVUEBKqMjfj+bv3Pcj+pq46Oog3wJ/8F4pGs MbdzyyiZPfP/sUY/ERl0ZOphqXwjulm3vQPZfHAhjtzWA8I+yWgL1dirFwXim7eCMwLzY3 K95/ruYly6Ku8yc8bBLskAtuB7yWpoJ65ng8hRtMZn8Upytik9z5DYci1HDjyg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674034790; a=rsa-sha256; cv=none; b=g2asX++4UQn0vmqYsG/AQ3FesLoYuNQY3ZouiwxUu1MfTqbJc0lCh/JhMqZP1gva8uhTvF ZdXRKGXV3C2rQ+YGfGn2xjTYvkW+XSeObV3HOvLHqOSJFiwm5l/2vwh9CfZeVI41VoC6DC P0MEkPm804AN8UWKVWuXU3/RJBy9Ku+KPSwkMZ+GM5xTH1nxBmttMyyUdVdZileyqNfNUK LgLM7dd5Q8jbBchmKG3frG3cXCWqiLa0ixugPMSYW/p9LFlG2iT8Cp6y3dSnvh3vZf3/tI aYOPqW9sH0gYNXdO9GD/icOgeX0Pct7QlXuhA7HfOfk2LYHjspNn0M0bcSKxrg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Nxghk4M2Fz161d; Wed, 18 Jan 2023 09:39:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30I9do6c053101; Wed, 18 Jan 2023 09:39:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30I9doJs053100; Wed, 18 Jan 2023 09:39:50 GMT (envelope-from git) Date: Wed, 18 Jan 2023 09:39:50 GMT Message-Id: <202301180939.30I9doJs053100@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: a85cf421d1bf - main - Reduce an arm64 VFP critical 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a85cf421d1bfec7e753bfee781355785b00d89d4 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=a85cf421d1bfec7e753bfee781355785b00d89d4 commit a85cf421d1bfec7e753bfee781355785b00d89d4 Author: Andrew Turner AuthorDate: 2023-01-18 09:30:36 +0000 Commit: Andrew Turner CommitDate: 2023-01-18 09:31:50 +0000 Reduce an arm64 VFP critical section In set_fpcontext we only need a critical section around vfp_discard. The remainder of the code can run without it. While here add an assert to check the passed in thread is the current thread as the code already this. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D38000 --- sys/arm64/arm64/exec_machdep.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/arm64/arm64/exec_machdep.c b/sys/arm64/arm64/exec_machdep.c index 258cb5d26b13..27ee2f80858d 100644 --- a/sys/arm64/arm64/exec_machdep.c +++ b/sys/arm64/arm64/exec_machdep.c @@ -519,8 +519,7 @@ set_fpcontext(struct thread *td, mcontext_t *mcp) #ifdef VFP struct pcb *curpcb; - critical_enter(); - + MPASS(td == curthread); if ((mcp->mc_flags & _MC_FP_VALID) != 0) { curpcb = curthread->td_pcb; @@ -528,7 +527,9 @@ set_fpcontext(struct thread *td, mcontext_t *mcp) * Discard any vfp state for the current thread, we * are about to override it. */ + critical_enter(); vfp_discard(td); + critical_exit(); KASSERT(curpcb->pcb_fpusaved == &curpcb->pcb_fpustate, ("Called set_fpcontext while the kernel is using the VFP")); @@ -538,8 +539,6 @@ set_fpcontext(struct thread *td, mcontext_t *mcp) curpcb->pcb_fpustate.vfp_fpsr = mcp->mc_fpregs.fp_sr; curpcb->pcb_fpflags = mcp->mc_fpregs.fp_flags & PCB_FP_USERMASK; } - - critical_exit(); #endif } From nobody Wed Jan 18 09:39:51 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Nxghl72zhz2sjCj; Wed, 18 Jan 2023 09:39: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Nxghl64Lxz40Zd; Wed, 18 Jan 2023 09:39:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674034791; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fSDHDYE9QnSKsJGkhZ9BFaSn9WI4yr0+r7esrI75GIA=; b=NnxwlcCZFox3aUX0TsYF+EDIEoln8WDXC6HOUEigZhx92/l3jhqoi1QDbdzBWzhDrpyKY5 U+qqZYRxtMC443ywbiDHERU4lm2sDdJ8mpjSL5bMkvd97YRHqPcWLiiKM10S4RSt0BOkdD E7GJPy4ogjmUfxNPl1E4vJje4GB79KSIvQsyxH7BS/QnG+9H09ALNi+0EtnQTJ+W2c+9C2 NWwT1rwak18gfV6T05SLlqipgcXcROPGGxLsJcOwkdog9aEg4J95YMwY2PuuHrEDJPhCsb AIm2706TrJpWAGc6L6k7GJr8dy974NwcsO13jgZ/O6jBK3dosU9MO7Yv/QoboQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674034791; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fSDHDYE9QnSKsJGkhZ9BFaSn9WI4yr0+r7esrI75GIA=; b=I7f3b00+0DvqIkVmJsJ6xVMk9Bxkzad5WBw2slalJ8u3mI7kQoZs3+G9UHQx73+8aSll42 /ohlDmXx7vgiEW74/kCP/z1MdVPIanwINTn9GdGVnmLvTYs7XCuXSYTkXOcY807viS2k1I Ju3U2F1R0QdGOxXH+kNiGJYaGIvNzeIb8uwPA5nY84nvJQvzlYfc4Smiadu0d5C+7ThkEK mkwJVBhvUYuSZ+7YL+mQutRnqJYe0lC02fgdv7tvR3WjsVGh6LlCYj+Xt5djlZ5k8GoMAH tJ8rAveX+fd7UA6rB3xiXM4XN4oxLYQc09dOoXW4Wl/nLVdcYByOvN3vRO0HLA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674034791; a=rsa-sha256; cv=none; b=CKOFLa4/hl1GlmTP1q5o9IRIrZHejYwoeKnqjAvhjffx83b6vnGrhZPuBtirRF/RZhv1bF ygfj49HvVnkXk01aw/XedcVmEkvw1i1n9jfJrxaQGONDCfMHGUgl6vL6a+VMBoBL4y30b1 XV26rmCxY8ZNPPfCgW8BEwuurcmXnA/rjSOU5idu705M214kX4fbo4+2Pz39Ihwfbwg2QW ay4gp/PZgVJ2Ea70bOeC7ZAOVDtLcr1OCN97ru/d1vXzp6kJA7ZprYXDQ3Et+JtAAy9DCV bQnZJVWr8Tfx+BGw/ksI9CVM7GLl5WLUxBHPnIwQJiKJPpaW5tIyUnFCCKkgTw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Nxghl5BLRz166N; Wed, 18 Jan 2023 09:39:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30I9dpYS053125; Wed, 18 Jan 2023 09:39:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30I9dpJ3053124; Wed, 18 Jan 2023 09:39:51 GMT (envelope-from git) Date: Wed, 18 Jan 2023 09:39:51 GMT Message-Id: <202301180939.30I9dpJ3053124@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 896f556205c8 - main - Add the fixed memory type to the pci ecam 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 896f556205c8d87ef842dc844752daa7d2385336 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=896f556205c8d87ef842dc844752daa7d2385336 commit 896f556205c8d87ef842dc844752daa7d2385336 Author: Andrew Turner AuthorDate: 2023-01-18 09:30:46 +0000 Commit: Andrew Turner CommitDate: 2023-01-18 09:31:50 +0000 Add the fixed memory type to the pci ecam driver Add ACPI_RESOURCE_TYPE_FIXED_MEMORY32 to the PCI ECAM driver. This is used on the Microsoft Dev Kit 2023 and reportedly the Lenovo x13s. Reviewed by: Robert Clausecker (Earlier version) Tested by: Robert Clausecker (Earlier version) Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D38031 --- sys/dev/pci/pci_host_generic_acpi.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/sys/dev/pci/pci_host_generic_acpi.c b/sys/dev/pci/pci_host_generic_acpi.c index 4a565c846339..8ef97a3ae1ae 100644 --- a/sys/dev/pci/pci_host_generic_acpi.c +++ b/sys/dev/pci/pci_host_generic_acpi.c @@ -142,25 +142,42 @@ pci_host_generic_acpi_parse_resource(ACPI_RESOURCE *res, void *arg) device_t dev = (device_t)arg; struct generic_pcie_acpi_softc *sc; rman_res_t min, max, off; - int r; + int r, restype; sc = device_get_softc(dev); r = sc->base.nranges; switch (res->Type) { case ACPI_RESOURCE_TYPE_ADDRESS16: + restype = res->Data.Address16.ResourceType; min = res->Data.Address16.Address.Minimum; max = res->Data.Address16.Address.Maximum; break; case ACPI_RESOURCE_TYPE_ADDRESS32: + restype = res->Data.Address32.ResourceType; min = res->Data.Address32.Address.Minimum; max = res->Data.Address32.Address.Maximum; off = res->Data.Address32.Address.TranslationOffset; break; case ACPI_RESOURCE_TYPE_ADDRESS64: + restype = res->Data.Address64.ResourceType; min = res->Data.Address64.Address.Minimum; max = res->Data.Address64.Address.Maximum; off = res->Data.Address64.Address.TranslationOffset; break; + case ACPI_RESOURCE_TYPE_FIXED_MEMORY32: + /* + * The Microsoft Dev Kit 2023 uses a fixed memory region + * for some PCI controllers. For this memory the + * ResourceType is ACPI_IO_RANGE meaning we create an IO + * resource. As drivers expect it to be a memory resource + * force the type here. + */ + restype = ACPI_MEMORY_RANGE; + min = res->Data.FixedMemory32.Address; + max = res->Data.FixedMemory32.Address + + res->Data.FixedMemory32.AddressLength - 1; + off = 0; + break; default: return (AE_OK); } @@ -171,9 +188,9 @@ pci_host_generic_acpi_parse_resource(ACPI_RESOURCE *res, void *arg) sc->base.ranges[r].pci_base = min; sc->base.ranges[r].phys_base = min + off; sc->base.ranges[r].size = max - min + 1; - if (res->Data.Address.ResourceType == ACPI_MEMORY_RANGE) + if (restype == ACPI_MEMORY_RANGE) sc->base.ranges[r].flags |= FLAG_TYPE_MEM; - else if (res->Data.Address.ResourceType == ACPI_IO_RANGE) + else if (restype == ACPI_IO_RANGE) sc->base.ranges[r].flags |= FLAG_TYPE_IO; sc->base.nranges++; } else if (res->Data.Address.ResourceType == ACPI_BUS_NUMBER_RANGE) { From nobody Wed Jan 18 11:18:29 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NxjtY5DDJz2svbL; Wed, 18 Jan 2023 11:18:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NxjtY4mJ5z49Lq; Wed, 18 Jan 2023 11:18:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674040709; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C31LSDNqXwBraa1oESgbIXDzJjZ4ELQfOVFSqLDHa4Y=; b=nzINegJGFD5tUyIcawGdCmD0opHkLqVJC9nYtnTov/hxMKv477wlByfeKkxFBVL7ah5Y1P ROZcivfBJEOYVG9Ii6/x55VjKY5elvsrbGzJLtoTaSj2q+QJ46rQxo94d4eOfQX+uj9E/o S6yM1Q9OfUuZuQLI6GR5Nm9d+epHQskdLKTn6oJmOOhSXr1X7F3NmelxKJEp5orySiDnXG xCb5XG70bJahvygvxomKeJtDyzl+D2LuyhnI9VE6C67u/E3XGHPvJYJftUzBRAnA7WQwTR BzFtkv5rlB4z8lKD1UgWXY1Bu8nJGDl4iQg8BwrwLWVDltW6C01icsXQShbgJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674040709; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C31LSDNqXwBraa1oESgbIXDzJjZ4ELQfOVFSqLDHa4Y=; b=G/dWpoWfgu2ypyflInNTCcX9nZNPQ2vHD9iU0YlCOthxLHzX7YaMU4AGBmcSSU0b5+ftSQ 6e86QiwYIajWZRWTOsTADlRypjgxKsiX937ZlGRcHlf2EuWbCx4jvW4qRNy4QK6iA6OG7V v59vyTB/Zalfqnjgf9lOYPQFNFRNY4bVSDWOiguj7W/CgVitAPZw/EzybFVwJ7gS/SM6DG cQReJf/RaLrRB6AbHjG0BrcLBM6fHNC5p5PIy2wiV1WfBe0/n938aJgQ3RN4qydWcAtxgC 0vWUN6OpozafIyCmSQS1MTfh+UNXJ1zVOIIW44CKu+zJiMJ6d9VgBz1lT6/byQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674040709; a=rsa-sha256; cv=none; b=QyeUnOXrHF0ALt6LcQlKh6381nOIQ1peU3HxPAALnCP2fwP4T/5B/ct9tKSsDurmPBqlHG dC+v3IlwBE62oYuBDWZUYqo2f0rSDybbP6HYv4glJm2phwHwQzDADsksnQdnQau5YgNpKR cV9lNcdq61xVaYqiJSFRT/iXdoPeW7WgS8/mJ/uaEEckutIf05R/uXHDVG7nHaE0OQFbkp bkjruuqUCEHYc1Jyws1HkHpf+TzxKlcRouFO45zBXt08hV67oaC8Ct+HbCMfTeowoe7g5q Oq46ip8VEgty8UeG10+KKGGT9W7vNkcFNVhRGXiboZ7KL0lQQeUPMnRPtdCxvg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NxjtY3prhz1840; Wed, 18 Jan 2023 11:18:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30IBITsH096267; Wed, 18 Jan 2023 11:18:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30IBIT1J096266; Wed, 18 Jan 2023 11:18:29 GMT (envelope-from git) Date: Wed, 18 Jan 2023 11:18:29 GMT Message-Id: <202301181118.30IBIT1J096266@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Corvin=20K=C3=B6hne?= Subject: git: 73c3e8b1dee6 - main - umodem: add quirk to ignore CDC_CM descriptor List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: corvink X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 73c3e8b1dee6cd42de32287ea8a57762b961d8ee Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by corvink: URL: https://cgit.FreeBSD.org/src/commit/?id=73c3e8b1dee6cd42de32287ea8a57762b961d8ee commit 73c3e8b1dee6cd42de32287ea8a57762b961d8ee Author: Steffen Dirkwinkel AuthorDate: 2023-01-17 07:58:46 +0000 Commit: Corvin Köhne CommitDate: 2023-01-18 11:17:09 +0000 umodem: add quirk to ignore CDC_CM descriptor Some devices have CDC_CM descriptors that would point us to the wrong interfaces. Add a quirk to ignore those (prefering the CDC_UNION descriptor effectively) Reviewed by: manu MFC after: 1 week Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D37942 --- share/man/man4/usb_quirk.4 | 2 ++ sys/dev/usb/quirk/usb_quirk.c | 1 + sys/dev/usb/quirk/usb_quirk.h | 1 + sys/dev/usb/serial/umodem.c | 4 +++- 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/share/man/man4/usb_quirk.4 b/share/man/man4/usb_quirk.4 index c176993bdbc3..892c85aa6fba 100644 --- a/share/man/man4/usb_quirk.4 +++ b/share/man/man4/usb_quirk.4 @@ -100,6 +100,8 @@ select configuration index 4 by default select configuration index 0 by default .It UQ_ASSUME_CM_OVER_DATA assume cm over data feature +.It UQ_IGNORE_CDC_CM +ignore cm descriptor .It UQ_WMT_IGNORE device should be ignored by wmt driver .El diff --git a/sys/dev/usb/quirk/usb_quirk.c b/sys/dev/usb/quirk/usb_quirk.c index 68e4910202b0..3baa3acba187 100644 --- a/sys/dev/usb/quirk/usb_quirk.c +++ b/sys/dev/usb/quirk/usb_quirk.c @@ -662,6 +662,7 @@ static const char *usb_quirk_str[USB_QUIRK_MAX] = { [UQ_CFG_INDEX_4] = "UQ_CFG_INDEX_4", [UQ_CFG_INDEX_0] = "UQ_CFG_INDEX_0", [UQ_ASSUME_CM_OVER_DATA] = "UQ_ASSUME_CM_OVER_DATA", + [UQ_IGNORE_CDC_CM] = "UQ_IGNORE_CDC_CM", [UQ_MSC_NO_TEST_UNIT_READY] = "UQ_MSC_NO_TEST_UNIT_READY", [UQ_MSC_NO_RS_CLEAR_UA] = "UQ_MSC_NO_RS_CLEAR_UA", [UQ_MSC_NO_START_STOP] = "UQ_MSC_NO_START_STOP", diff --git a/sys/dev/usb/quirk/usb_quirk.h b/sys/dev/usb/quirk/usb_quirk.h index 85bec036f84d..755465576684 100644 --- a/sys/dev/usb/quirk/usb_quirk.h +++ b/sys/dev/usb/quirk/usb_quirk.h @@ -66,6 +66,7 @@ enum { UQ_CFG_INDEX_4, /* select configuration index 4 by default */ UQ_CFG_INDEX_0, /* select configuration index 0 by default */ UQ_ASSUME_CM_OVER_DATA, /* assume cm over data feature */ + UQ_IGNORE_CDC_CM, /* ignore cm descriptor */ /* * USB Mass Storage Quirks. See "storage/umass.c" for a diff --git a/sys/dev/usb/serial/umodem.c b/sys/dev/usb/serial/umodem.c index e9de2950fb9d..d059559bd39f 100644 --- a/sys/dev/usb/serial/umodem.c +++ b/sys/dev/usb/serial/umodem.c @@ -359,7 +359,9 @@ umodem_attach(device_t dev) /* get the data interface number */ - cmd = umodem_get_desc(uaa, UDESC_CS_INTERFACE, UDESCSUB_CDC_CM); + cmd = NULL; + if (!usb_test_quirk(uaa, UQ_IGNORE_CDC_CM)) + cmd = umodem_get_desc(uaa, UDESC_CS_INTERFACE, UDESCSUB_CDC_CM); if ((cmd == NULL) || (cmd->bLength < sizeof(*cmd))) { cud = usbd_find_descriptor(uaa->device, NULL, From nobody Wed Jan 18 11:18:30 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NxjtZ6Xxmz2svbQ; Wed, 18 Jan 2023 11:18: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NxjtZ5tklz49df; Wed, 18 Jan 2023 11:18:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674040710; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JatkXbZJFpiWDNm7FqqGRX3SszPNcis2MzKdRCW8WJI=; b=uOyV9nEh411fJOY2nPLZ7x6CrDHrIoRkiSqteenOYjjE/BvvPRJH5FvvOmQKNkP48R980K 1CAJU2osM9ZSIcyvd8bGTdhdlsFj+TtrKudFjLAOlbJDEiH7bugGfvluViKrZJQX4/xf9C PVDabDLOiXuqSe55QPwbScVos7lUMNwkPitDqLdCAyd9FcUfTY/U+uBfTjYtUV062HQSWh RfLr6mXSwRs7rcyF+QgIDyXz9+xNih3u4dCRPv6A7ufk0zgFVlaO4jFTuRDr43oWs7cKjJ 489CLNPuwOfEmLB6bOuEVB3/bcvbcSufbjBsRYlOVxWe6S3Fnf1+fbBCP/r+2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674040710; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JatkXbZJFpiWDNm7FqqGRX3SszPNcis2MzKdRCW8WJI=; b=cTzgs3Siga5cVkJ4BI7AEi/gIzyFZI5PcHHO8sRubEUe2Gd+rUwNa0gFyCnSNR3TIz/qhn g+ZCE0r6lTlgr7pazpMwpPhFLJpAzR/FN1itPos5EKZ0sTlZdHvL6knJQNXNXtk5kUhiLX Tos7/O6PWBgbZJdEG7jmIo/yJjNlefCEatQ7igD5ILA96Xi2qEQ3XXf3R9fowMBz8iXGbQ XR3TpYyIGAzZZlDYw6YDtapg/AHSu9JCYJe26pca8SNlZBRtFrlxaa9icqQJW3t2UUyA1J 5GwHibfX7gsWQM9jTZtejR7vxg0UUqPRCBVUuaxi13lmaQyG/IYzJKzOKC9vXA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674040710; a=rsa-sha256; cv=none; b=xFFAvxaTCgEa0jq0HXnirtxXnvdR7xo71kmCjuAhmAmY5hNnHjOCMvCigTbTXIrBDtKyr1 s+VPHa1QrC87kQgF1DjeZVTsohmUCAH8FMgnmIoEvyPiA1R+L0z8FbevqKXqVoWwILKIRy IwYypLfOUlUrO7XLkfa9NRKoxqnyDZZmJGEr6yOH1lKWMqQqycSyMOrj6NOBERBCIQevt6 sFfL+pIvhkz8sIwpd0Lip6FVg/J+IkSuSGLrjHYGgtbSDyyvr9RXTe5sgsStMAh66/oMJH HY9fB2n+kyoySWAe66r+xMdkgyk1RzyuGlgP7EFvs7WmId/1BNdHafe/hihriQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NxjtZ4m5Rz17q0; Wed, 18 Jan 2023 11:18:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30IBIU4w096303; Wed, 18 Jan 2023 11:18:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30IBIUnO096302; Wed, 18 Jan 2023 11:18:30 GMT (envelope-from git) Date: Wed, 18 Jan 2023 11:18:30 GMT Message-Id: <202301181118.30IBIUnO096302@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Corvin=20K=C3=B6hne?= Subject: git: 8580e334b075 - main - umodem: ignore CDC_CM descriptor for baltech smartcard reader List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: corvink X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8580e334b0757c8d55e51b8dc7fc4051521beedf Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by corvink: URL: https://cgit.FreeBSD.org/src/commit/?id=8580e334b0757c8d55e51b8dc7fc4051521beedf commit 8580e334b0757c8d55e51b8dc7fc4051521beedf Author: Steffen Dirkwinkel AuthorDate: 2022-11-04 14:46:07 +0000 Commit: Corvin Köhne CommitDate: 2023-01-18 11:17:17 +0000 umodem: ignore CDC_CM descriptor for baltech smartcard reader The CDC_CM descriptor points to the wrong interface for serial port use. Ignore it to use the CDC_UNION descriptor. usbconfig dump (spec at: https://usb.org/sites/default/files/CDC1.2_WMC1.1_012011.zip): ugen0.2: at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (300mA) bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0200 bDeviceClass = 0x0000 bDeviceSubClass = 0x0000 bDeviceProtocol = 0x0000 bMaxPacketSize0 = 0x0040 idVendor = 0x13ad idProduct = 0xf019 bcdDevice = 0x0100 iManufacturer = 0x0001 iProduct = 0x0002 iSerialNumber = 0x0003 <45031910> bNumConfigurations = 0x0001 Configuration index 0 bLength = 0x0009 bDescriptorType = 0x0002 wTotalLength = 0x0064 bNumInterfaces = 0x0003 bConfigurationValue = 0x0001 iConfiguration = 0x0000 bmAttributes = 0x0080 bMaxPower = 0x0096 Interface 0 bLength = 0x0009 bDescriptorType = 0x0004 bInterfaceNumber = 0x0000 bAlternateSetting = 0x0000 bNumEndpoints = 0x0001 bInterfaceClass = 0x0003 bInterfaceSubClass = 0x0000 bInterfaceProtocol = 0x0000 iInterface = 0x0000 Additional Descriptor bLength = 0x09 bDescriptorType = 0x21 bDescriptorSubType = 0x11 RAW dump: 0x00 | 0x09, 0x21, 0x11, 0x01, 0x00, 0x01, 0x22, 0xd0, 0x08 | 0x00 Endpoint 0 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0081 bmAttributes = 0x0003 wMaxPacketSize = 0x0040 bInterval = 0x0001 bRefresh = 0x0000 bSynchAddress = 0x0000 Additional Descriptor bLength = 0x08 bDescriptorType = 0x0b bDescriptorSubType = 0x01 RAW dump: 0x00 | 0x08, 0x0b, 0x01, 0x02, 0x02, 0x02, 0x00, 0x00 Interface 1 bLength = 0x0009 bDescriptorType = 0x0004 bInterfaceNumber = 0x0001 bAlternateSetting = 0x0000 bNumEndpoints = 0x0001 bInterfaceClass = 0x0002 bInterfaceSubClass = 0x0002 bInterfaceProtocol = 0x0000 iInterface = 0x0000 Additional Descriptor bLength = 0x05 bDescriptorType = 0x24 bDescriptorSubType = 0x00 RAW dump: 0x00 | 0x05, 0x24, 0x00, 0x10, 0x01 Additional Descriptor bLength = 0x04 bDescriptorType = 0x24 bDescriptorSubType = 0x02 RAW dump: 0x00 | 0x04, 0x24, 0x02, 0x00 Additional Descriptor bLength = 0x05 bDescriptorType = 0x24 bDescriptorSubType = 0x06 RAW dump: 0x00 | 0x05, 0x24, 0x06, 0x01, 0x02 Additional Descriptor bLength = 0x05 bDescriptorType = 0x24 bDescriptorSubType = 0x01 RAW dump: 0x00 | 0x05, 0x24, 0x01, 0x00, 0x01 Endpoint 0 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0085 bmAttributes = 0x0003 wMaxPacketSize = 0x0008 bInterval = 0x0010 bRefresh = 0x0000 bSynchAddress = 0x0000 Interface 2 bLength = 0x0009 bDescriptorType = 0x0004 bInterfaceNumber = 0x0002 bAlternateSetting = 0x0000 bNumEndpoints = 0x0002 bInterfaceClass = 0x000a bInterfaceSubClass = 0x0000 bInterfaceProtocol = 0x0000 iInterface = 0x0000 Endpoint 0 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0086 bmAttributes = 0x0002 wMaxPacketSize = 0x0040 bInterval = 0x0000 bRefresh = 0x0000 bSynchAddress = 0x0000 Endpoint 1 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0006 bmAttributes = 0x0002 wMaxPacketSize = 0x0040 bInterval = 0x0000 bRefresh = 0x0000 bSynchAddress = 0x0000 Reviewed by: manu MFC after: 1 week Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D37942 --- sys/dev/usb/quirk/usb_quirk.c | 1 + sys/dev/usb/usbdevs | 1 + 2 files changed, 2 insertions(+) diff --git a/sys/dev/usb/quirk/usb_quirk.c b/sys/dev/usb/quirk/usb_quirk.c index 3baa3acba187..d67007012251 100644 --- a/sys/dev/usb/quirk/usb_quirk.c +++ b/sys/dev/usb/quirk/usb_quirk.c @@ -188,6 +188,7 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRKS_MAX] = { USB_QUIRK(CURITEL, UM150, 0x0000, 0xffff, UQ_ASSUME_CM_OVER_DATA), USB_QUIRK(CURITEL, UM175, 0x0000, 0xffff, UQ_ASSUME_CM_OVER_DATA), USB_QUIRK(VERTEX, VW110L, 0x0000, 0xffff, UQ_ASSUME_CM_OVER_DATA), + USB_QUIRK(BALTECH, SMARTCARDREADER, 0x0000, 0xffff, UQ_IGNORE_CDC_CM), /* USB Mass Storage Class Quirks */ USB_QUIRK_VP(USB_VENDOR_ASAHIOPTICAL, 0, UQ_MSC_NO_RS_CLEAR_UA, diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index 77a7908d45c3..005a5d9c1037 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -1337,6 +1337,7 @@ product AZUREWAVE RTL8192SU_5 0x3325 RTL8192SU /* Baltech products */ product BALTECH CARDREADER 0x9999 Card reader +product BALTECH SMARTCARDREADER 0xf019 SmartCard reader /* Bayer products */ product BAYER CONTOUR_CABLE 0x6001 FTDI compatible adapter From nobody Wed Jan 18 13:35:34 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Nxmww00HZz2tyB8; Wed, 18 Jan 2023 13:35:44 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Nxmwv2xcvz4NGT; Wed, 18 Jan 2023 13:35:43 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Authentication-Results: mx1.freebsd.org; none Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 30IDZYst009977; Wed, 18 Jan 2023 05:35:34 -0800 (PST) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 30IDZYr6009976; Wed, 18 Jan 2023 05:35:34 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202301181335.30IDZYr6009976@gndrsh.dnsmgr.net> Subject: Re: git: 1d577bedbae8 - main - unbound: Fix config file path In-Reply-To: <202301180754.30I7sBnW008607@gitrepo.freebsd.org> To: Juraj Lutter Date: Wed, 18 Jan 2023 05:35:34 -0800 (PST) CC: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4Nxmwv2xcvz4NGT X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N > The branch main has been updated by otis (ports committer): > > URL: https://cgit.FreeBSD.org/src/commit/?id=1d577bedbae80ced38ccb834e6835e5fd98bc411 > > commit 1d577bedbae80ced38ccb834e6835e5fd98bc411 > Author: Juraj Lutter > AuthorDate: 2023-01-17 17:25:47 +0000 > Commit: Juraj Lutter > CommitDate: 2023-01-18 07:50:07 +0000 > > unbound: Fix config file path > > Commit 1838dec31895fd4752fa8631322ab93be0705a66 changed the > config file path to /usr/local/etc/unbound/unbound.conf which > is wrong for unbound in base. > > Reported by: Ihor Antonov > Reviewed by: zlei > Approved by: zlei > Differential Revision: https://reviews.freebsd.org/D38106 > > Fixes: 1838dec31895fd4752fa8631322ab93be0705a66 > MFC after: 1 month > X-MFC with: 1838dec31895fd4752fa8631322ab93be0705a66 > --- > usr.sbin/unbound/config.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/usr.sbin/unbound/config.h b/usr.sbin/unbound/config.h > index bd36bb7573f8..2068cbfe7295 100644 > --- a/usr.sbin/unbound/config.h > +++ b/usr.sbin/unbound/config.h > @@ -21,7 +21,7 @@ > #define CONFCMDLINE "--with-ssl=/usr --with-libexpat=/usr --disable-dnscrypt --disable-dnstap --enable-ecdsa --disable-event-api --enable-gost --with-libevent --disable-subnet --disable-tfo-client --disable-tfo-server --with-pthreads--prefix=/usr --localstatedir=/var/unbound --mandir=/usr/share/man --build=freebsd" > > /* Pathname to the Unbound configuration file */ > -#define CONFIGFILE "/usr/local/etc/unbound/unbound.conf" > +#define CONFIGFILE "/var/unbound/unbound.conf" Should this redirect through the /etc/unbound symbolic link? For example if I have modified the /etc/unbound -> ../var/unbound symbolic link /etc/unbound -> ../nodedata/etc/unbound your change is going to cause me to scratch my head why unbound is not reading my config file. Further it appears as if local-unbound.conf refers to the /etc/unbound path and does not mention /var/unbound. And an existing bug that may no longer be present is why do all the manpages installed have a local- prefix on them, but the binaries are installed without that? It also appears as if there is some @foo_path@ stuff in the man pages that should of been fixed up by the installer process to use the values compiled in. Thanks, Rod > > /* Define this if on macOSX10.4-darwin8 and setreuid and setregid do not work > */ > -- Rod Grimes rgrimes@freebsd.org From nobody Wed Jan 18 14:53:53 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Nxpg92tD6z2v7FF; Wed, 18 Jan 2023 14:53:57 +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 4Nxpg90bY2z4TVQ; Wed, 18 Jan 2023 14:53:57 +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 ESMTP id I5fPpAou4c9C4I9p6pRdKB; Wed, 18 Jan 2023 14:53:56 +0000 Received: from spqr.komquats.com ([70.66.148.124]) by cmsmtp with ESMTPA id I9p4ph8KoyAOeI9p5pWBML; Wed, 18 Jan 2023 14:53:56 +0000 X-Authority-Analysis: v=2.4 cv=e5oV9Il/ c=1 sm=1 tr=0 ts=63c80804 a=Cwc3rblV8FOMdVN/wOAqyQ==:117 a=Cwc3rblV8FOMdVN/wOAqyQ==:17 a=kj9zAlcOel0A:10 a=RvmDmJFTN0MA:10 a=iKhvJSA4AAAA:8 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=xs_zb_Srkt0rRL9ledgA:9 a=CjuIK1q_8ugA:10 a=odh9cflL3HIXMm4fY7Wr:22 a=IjZwj45LgO3ly-622nXo: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 EFE4510AD; Wed, 18 Jan 2023 06:53:53 -0800 (PST) Received: by slippy.cwsent.com (Postfix, from userid 1000) id DCA42134; Wed, 18 Jan 2023 06:53:53 -0800 (PST) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: rgrimes@freebsd.org cc: Juraj Lutter , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 1d577bedbae8 - main - unbound: Fix config file path In-reply-to: <202301181335.30IDZYr6009976@gndrsh.dnsmgr.net> References: <202301181335.30IDZYr6009976@gndrsh.dnsmgr.net> Comments: In-reply-to "Rodney W. Grimes" message dated "Wed, 18 Jan 2023 05:35:34 -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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 18 Jan 2023 06:53:53 -0800 Message-Id: <20230118145353.DCA42134@slippy.cwsent.com> X-CMAE-Envelope: MS4xfBxEidjHClkzOA3nu4p0jhXLdo9qyf18gY3mKm7hkxajXaKt6YhRjg+sQB4+rVD/dbQJu0JZFZ3FSTznkHB0mA2bDbTH2BEQRsu9bCEHI5fNXlb3qBe9 lWB/WSjuR7RJ7i732NrOql8fK/IV5Pf3rN06Pc747w0c7LGbA4wIPF9I23CKvYLrCLmfav9HTzlMaprXw9LvU09Rh6bWUrORd7FvakjLocwNeuittKyv9nAA VaRrQI17jc3f0G4DUdnum/nIi4v9QpXpagPNhQi9H0FbPKtAXVsfbc6h8cmuNV4LWAKoFIuSZAvmsO714+obeWwmG86m737Sr2nu3iHUFpbrPhLLsbGGnLfF rYnYrk2i X-Rspamd-Queue-Id: 4Nxpg90bY2z4TVQ X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N In message <202301181335.30IDZYr6009976@gndrsh.dnsmgr.net>, "Rodney W. Grimes" writes: > > The branch main has been updated by otis (ports committer): > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=1d577bedbae80ced38ccb834e6835e > 5fd98bc411 > > > > commit 1d577bedbae80ced38ccb834e6835e5fd98bc411 > > Author: Juraj Lutter > > AuthorDate: 2023-01-17 17:25:47 +0000 > > Commit: Juraj Lutter > > CommitDate: 2023-01-18 07:50:07 +0000 > > > > unbound: Fix config file path > > > > Commit 1838dec31895fd4752fa8631322ab93be0705a66 changed the > > config file path to /usr/local/etc/unbound/unbound.conf which > > is wrong for unbound in base. > > > > Reported by: Ihor Antonov > > Reviewed by: zlei > > Approved by: zlei > > Differential Revision: https://reviews.freebsd.org/D38106 > > > > Fixes: 1838dec31895fd4752fa8631322ab93be0705a66 > > MFC after: 1 month > > X-MFC with: 1838dec31895fd4752fa8631322ab93be0705a66 > > --- > > usr.sbin/unbound/config.h | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/usr.sbin/unbound/config.h b/usr.sbin/unbound/config.h > > index bd36bb7573f8..2068cbfe7295 100644 > > --- a/usr.sbin/unbound/config.h > > +++ b/usr.sbin/unbound/config.h > > @@ -21,7 +21,7 @@ > > #define CONFCMDLINE "--with-ssl=/usr --with-libexpat=/usr --disable-dnscry > pt --disable-dnstap --enable-ecdsa --disable-event-api --enable-gost --with-l > ibevent --disable-subnet --disable-tfo-client --disable-tfo-server --with-pth > reads--prefix=/usr --localstatedir=/var/unbound --mandir=/usr/share/man --bui > ld=freebsd" > > > > /* Pathname to the Unbound configuration file */ > > -#define CONFIGFILE "/usr/local/etc/unbound/unbound.conf" > > +#define CONFIGFILE "/var/unbound/unbound.conf" > > Should this redirect through the /etc/unbound symbolic link? > > For example if I have modified the /etc/unbound -> ../var/unbound > symbolic link /etc/unbound -> ../nodedata/etc/unbound your change > is going to cause me to scratch my head why unbound is not reading > my config file. > > Further it appears as if local-unbound.conf refers to the > /etc/unbound path and does not mention /var/unbound. > > And an existing bug that may no longer be present is why do all > the manpages installed have a local- prefix on them, but the > binaries are installed without that? It also appears as if there > is some @foo_path@ stuff in the man pages that should of been > fixed up by the installer process to use the values compiled in. That was my mistake I missed changing it back after generating a new config.h and fixed by otis@ in 1d577bedbae8. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0 From nobody Wed Jan 18 15:34:09 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NxqYj2f93z2y9gB; Wed, 18 Jan 2023 15:34:17 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4NxqYj0S7lz4XLy; Wed, 18 Jan 2023 15:34:16 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Authentication-Results: mx1.freebsd.org; none Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 30IFY9TK010385; Wed, 18 Jan 2023 07:34:09 -0800 (PST) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 30IFY9Au010384; Wed, 18 Jan 2023 07:34:09 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202301181534.30IFY9Au010384@gndrsh.dnsmgr.net> Subject: Re: git: 1d577bedbae8 - main - unbound: Fix config file path In-Reply-To: <20230118145353.DCA42134@slippy.cwsent.com> To: Cy Schubert Date: Wed, 18 Jan 2023 07:34:09 -0800 (PST) CC: rgrimes@freebsd.org, Juraj Lutter , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4NxqYj0S7lz4XLy X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N > In message <202301181335.30IDZYr6009976@gndrsh.dnsmgr.net>, "Rodney W. > Grimes" > writes: > > > The branch main has been updated by otis (ports committer): > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=1d577bedbae80ced38ccb834e6835e > > 5fd98bc411 > > > > > > commit 1d577bedbae80ced38ccb834e6835e5fd98bc411 > > > Author: Juraj Lutter > > > AuthorDate: 2023-01-17 17:25:47 +0000 > > > Commit: Juraj Lutter > > > CommitDate: 2023-01-18 07:50:07 +0000 > > > > > > unbound: Fix config file path > > > > > > Commit 1838dec31895fd4752fa8631322ab93be0705a66 changed the > > > config file path to /usr/local/etc/unbound/unbound.conf which > > > is wrong for unbound in base. > > > > > > Reported by: Ihor Antonov > > > Reviewed by: zlei > > > Approved by: zlei > > > Differential Revision: https://reviews.freebsd.org/D38106 > > > > > > Fixes: 1838dec31895fd4752fa8631322ab93be0705a66 > > > MFC after: 1 month > > > X-MFC with: 1838dec31895fd4752fa8631322ab93be0705a66 > > > --- > > > usr.sbin/unbound/config.h | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/usr.sbin/unbound/config.h b/usr.sbin/unbound/config.h > > > index bd36bb7573f8..2068cbfe7295 100644 > > > --- a/usr.sbin/unbound/config.h > > > +++ b/usr.sbin/unbound/config.h > > > @@ -21,7 +21,7 @@ > > > #define CONFCMDLINE "--with-ssl=/usr --with-libexpat=/usr --disable-dnscry > > pt --disable-dnstap --enable-ecdsa --disable-event-api --enable-gost --with-l > > ibevent --disable-subnet --disable-tfo-client --disable-tfo-server --with-pth > > reads--prefix=/usr --localstatedir=/var/unbound --mandir=/usr/share/man --bui > > ld=freebsd" > > > > > > /* Pathname to the Unbound configuration file */ > > > -#define CONFIGFILE "/usr/local/etc/unbound/unbound.conf" > > > +#define CONFIGFILE "/var/unbound/unbound.conf" > > > > Should this redirect through the /etc/unbound symbolic link? > > > > For example if I have modified the /etc/unbound -> ../var/unbound > > symbolic link /etc/unbound -> ../nodedata/etc/unbound your change > > is going to cause me to scratch my head why unbound is not reading > > my config file. > > > > Further it appears as if local-unbound.conf refers to the > > /etc/unbound path and does not mention /var/unbound. > > > > And an existing bug that may no longer be present is why do all > > the manpages installed have a local- prefix on them, but the > > binaries are installed without that? It also appears as if there > > is some @foo_path@ stuff in the man pages that should of been > > fixed up by the installer process to use the values compiled in. > > That was my mistake I missed changing it back after generating a new > config.h and fixed by > otis@ in 1d577bedbae8. No, otis fixed it thus: -#define CONFIGFILE "/usr/local/etc/unbound/unbound.conf" +#define CONFIGFILE "/var/unbound/unbound.conf" I am suggesting that it should be #define CONFIGFILE "/etc/unbound/unbound.conf" ALL base system configuration files *should* be relative to /etc, not /var. > -- > Cheers, > Cy Schubert > FreeBSD UNIX: Web: https://FreeBSD.org > NTP: Web: https://nwtime.org > > e^(i*pi)+1=0 > > > > -- Rod Grimes rgrimes@freebsd.org From nobody Wed Jan 18 15:36:33 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NxqcQ36dRz2yBcG; Wed, 18 Jan 2023 15:36:38 +0000 (UTC) (envelope-from otis@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NxqcQ2ZPmz4Y6y; Wed, 18 Jan 2023 15:36:38 +0000 (UTC) (envelope-from otis@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674056198; h=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=0jdRbcgZKG3AWk/PWd9Jpbz9MDgEb92ceuuXWAJuCVQ=; b=No4mPSFnO8wiZ1EeLL0OD3IWWA1nJCTCG40Gf4Ku4w3UagDcChyWZhYwtx7HN7Z0t5Vzmq g3+/3pwlSMCADK00xP9iXXnQUfrWaHLI5wBD1OgAIA1bcDVZa2ULWK7WYq5RBe14+2u8L5 Y8+4LetlGaN6vJ8etVG5RgFEtonGAhPraZL9EEThP5OQcyXW3sCImvQ3pfSOXN85kwRead zpSrUt4g+9TNptPZd6R/zgeogloElgUJWtzYq6k33QpJZmpDpAcN0QbQHc7RoFLPiumJk2 eiWjBnQzDqN/7IC+0yx6gi/hlV0fIXB4dY8Wk7YcgRof6JsPFyhgobkHaykqAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674056198; h=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=0jdRbcgZKG3AWk/PWd9Jpbz9MDgEb92ceuuXWAJuCVQ=; b=Z3Z8uEvgCtshAGBtWHb3lOIzF1XEFrYR9POZVDy/bOvaXEp4KL/hGaxg5OhQ3oioYllKis 6smXRb+zNlz4mW+9KdtBV/eXL2YofmWaZ8kUgExqyq5Q0a0BKAZdKctds42ivhz1rRZxwG 0b30pDGiEoZsQKA1WuX69MHxAJlDEDbq8BvFltWMSBV4B05zKaEMFYNdtrClneCcVzP3vq 961OVSj/7xCzAPXDGqzW6vqUuZjNxXoVslVV4PnAg4zNpogKAe3wRa/KCcdGLm/zqVTJrl Ce03yE+VPdG5gSJUIbPdT/zuKcFQte5Bz0e9eCbaYF/NtH6iSStq1vEyM96Kqw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674056198; a=rsa-sha256; cv=none; b=aMvkjzg48sq71aSI7Z1Cau8H5XHF1nsbe4Eok5CEVXMEQKa1/2EK9mFd4P+Dv/liW1BVQk ZNRrxvsNAkBg5E0TDmVnWaMk/j5brEtyuabgGZDvhdc4p8fk7XHD8B1WBFgbNOT3Quw/+S LBjP+YbxjjRhMe9t9oRESHa7nZLg0Ts0YpxMyJBt3jZg5c/sLooIxNqmdSIEl6+WXh7vod BpsI8Ww8RnjuOGIBKMp4kNMZpa1jy82nhuGuRQV3pnHd59BfsgrXxzli7SvgCYgYMNF3CK 4OUgHJd8krdxfF0W0/UYbnDRKlSwAPu/xkTNDkcr4epIbpBQZgDTK5QHlB+Kmw== Received: from ns2.wilbury.net (ns2.wilbury.net [IPv6:2a01:b200:0:1:f816:3eff:fecd:13e6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "svc.wilbury.net", Issuer "R3" (verified OK)) (Authenticated sender: otis) by smtp.freebsd.org (Postfix) with ESMTPSA id 4NxqcQ0sDbzMCZ; Wed, 18 Jan 2023 15:36:38 +0000 (UTC) (envelope-from otis@FreeBSD.org) Received: from smtpclient.apple (unknown [86.110.242.24]) (Authenticated sender: juraj@lutter.sk) by svc.wilbury.net (Postfix) with ESMTPSA id 3641745CE84; Wed, 18 Jan 2023 16:36:35 +0100 (CET) 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: git: 1d577bedbae8 - main - unbound: Fix config file path From: Juraj Lutter In-Reply-To: <202301181534.30IFY9Au010384@gndrsh.dnsmgr.net> Date: Wed, 18 Jan 2023 16:36:33 +0100 Cc: Cy Schubert , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <459C4261-C860-4761-98AC-8F9B867BA918@FreeBSD.org> References: <202301181534.30IFY9Au010384@gndrsh.dnsmgr.net> To: "Rodney W. Grimes" X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_00,MAY_BE_FORGED, RDNS_NONE,SPF_HELO_NONE,SPF_SOFTFAIL autolearn=no autolearn_force=no version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) on ns2.wilbury.net X-ThisMailContainsUnwantedMimeParts: N > On 18 Jan 2023, at 16:34, Rodney W. Grimes = wrote: >=20 > No, otis fixed it thus: > -#define CONFIGFILE "/usr/local/etc/unbound/unbound.conf" > +#define CONFIGFILE "/var/unbound/unbound.conf" >=20 > I am suggesting that it should be > #define CONFIGFILE "/etc/unbound/unbound.conf" >=20 > ALL base system configuration files *should* be relative to /etc, not = /var. >=20 Would this need any mtree changes or similar? =E2=80=94 Juraj Lutter otis@FreeBSD.org From nobody Wed Jan 18 15:51:37 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Nxqxn1J64z2yD2X; Wed, 18 Jan 2023 15:51:41 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Nxqxm4CKVz4bRs; Wed, 18 Jan 2023 15:51:40 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Authentication-Results: mx1.freebsd.org; none Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 30IFpb3Y010475; Wed, 18 Jan 2023 07:51:37 -0800 (PST) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 30IFpbRu010474; Wed, 18 Jan 2023 07:51:37 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202301181551.30IFpbRu010474@gndrsh.dnsmgr.net> Subject: Re: git: 1d577bedbae8 - main - unbound: Fix config file path In-Reply-To: <459C4261-C860-4761-98AC-8F9B867BA918@FreeBSD.org> To: Juraj Lutter Date: Wed, 18 Jan 2023 07:51:37 -0800 (PST) CC: "Rodney W. Grimes" , Cy Schubert , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4Nxqxm4CKVz4bRs X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N [ Charset UTF-8 unsupported, converting... ] > > > > On 18 Jan 2023, at 16:34, Rodney W. Grimes wrote: > > > > No, otis fixed it thus: > > -#define CONFIGFILE "/usr/local/etc/unbound/unbound.conf" > > +#define CONFIGFILE "/var/unbound/unbound.conf" > > > > > > I am suggesting that it should be > > #define CONFIGFILE "/etc/unbound/unbound.conf" > > > > ALL base system configuration files *should* be relative to /etc, not /var. > > > > Would this need any mtree changes or similar? No, /etc/unbound is a symbolic link already installed by the build system, and /var/unbound is already a directory, again, installed by the build system. This is a one line change that actually makes the /etc/unbound link work correctly, without this change the binary has a hard coded path that ignores the /etc/unbound symbolic link and requires a recompile if I want to move things around, or maintanance of 2 symbolic links. Personally I dont see *why* unbound has a /var/unbound directory, can someone tell me why that was done? Is this some attempt and maintaining read only root? Does unbound scribble in the config directory, or is this simply mirroring some of the stuff that bind did? > ? > Juraj Lutter > otis@FreeBSD.org -- Rod Grimes rgrimes@freebsd.org From nobody Wed Jan 18 15:56:23 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Nxr3H6Cnzz2yF2s; Wed, 18 Jan 2023 15:56:27 +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 4Nxr3H40Gpz4c9J; Wed, 18 Jan 2023 15:56:27 +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 ESMTP id HzdOpGLK0l2xSIAnapRKRh; Wed, 18 Jan 2023 15:56:26 +0000 Received: from spqr.komquats.com ([70.66.148.124]) by cmsmtp with ESMTPA id IAnYpqgQKcyvuIAnZpyKIg; Wed, 18 Jan 2023 15:56:26 +0000 X-Authority-Analysis: v=2.4 cv=VbHkgXl9 c=1 sm=1 tr=0 ts=63c816aa a=Cwc3rblV8FOMdVN/wOAqyQ==:117 a=Cwc3rblV8FOMdVN/wOAqyQ==:17 a=kj9zAlcOel0A:10 a=RvmDmJFTN0MA:10 a=iKhvJSA4AAAA:8 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=iQT5K8H0XoTOApLSRvMA:9 a=CjuIK1q_8ugA:10 a=odh9cflL3HIXMm4fY7Wr:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 5763311C0; Wed, 18 Jan 2023 07:56:24 -0800 (PST) Received: by slippy.cwsent.com (Postfix, from userid 1000) id F3FFD298; Wed, 18 Jan 2023 07:56:23 -0800 (PST) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: rgrimes@freebsd.org cc: Juraj Lutter , Cy Schubert , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 1d577bedbae8 - main - unbound: Fix config file path In-reply-to: <202301181551.30IFpbRu010474@gndrsh.dnsmgr.net> References: <202301181551.30IFpbRu010474@gndrsh.dnsmgr.net> Comments: In-reply-to "Rodney W. Grimes" message dated "Wed, 18 Jan 2023 07:51:37 -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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 18 Jan 2023 07:56:23 -0800 Message-Id: <20230118155623.F3FFD298@slippy.cwsent.com> X-CMAE-Envelope: MS4xfJeV5qQNXQ5bez02nJAUiCRWtcDvLicmwgzwwdr86P0aCLKc+qlBS6dLn1NrzRxWBaxWNL/3urcfX41MDZ5+q8b5xCAsRoSovi+zQWqUZJJV0Num3jkC igEq43TN0oEQU6VAe7EUnXuHuhwIBOAA75itzUXwwqPYJafhbJgg6SXqEIoWi1JBwcxMly8+yYh20rlq6xO/rJGnO+Pbi9itgvKzrkWV87HFhL3PcJc0P1Lg E17n+vePto06YEvaHeKFAHnhY28j6SltFWCIAb14ZXSZgY+1522ZauiAMBy0xNa4PLAecdQmg/vkpR1Z8bRcpeQyoXdew5FYgWFw32nFKd9XgNMIAUT1mMx4 2xD5iDVJ X-Rspamd-Queue-Id: 4Nxr3H40Gpz4c9J X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N In message <202301181551.30IFpbRu010474@gndrsh.dnsmgr.net>, "Rodney W. Grimes" writes: > [ Charset UTF-8 unsupported, converting... ] > > > > > > > On 18 Jan 2023, at 16:34, Rodney W. Grimes wr > ote: > > > > > > No, otis fixed it thus: > > > -#define CONFIGFILE "/usr/local/etc/unbound/unbound.conf" > > > +#define CONFIGFILE "/var/unbound/unbound.conf" > > > > > > > > > > I am suggesting that it should be > > > #define CONFIGFILE "/etc/unbound/unbound.conf" > > > > > > ALL base system configuration files *should* be relative to /etc, not /va > r. > > > > > > > Would this need any mtree changes or similar? > > No, /etc/unbound is a symbolic link already installed by the build system, > and /var/unbound is already a directory, again, installed by the build system > . > > This is a one line change that actually makes the /etc/unbound link work > correctly, without this change the binary has a hard coded path that ignores > the > /etc/unbound symbolic link and requires a recompile if I want to move > things around, or maintanance of 2 symbolic links. > > Personally I dont see *why* unbound has a /var/unbound directory, can > someone tell me why that was done? Is this some attempt and maintaining > read only root? Does unbound scribble in the config directory, or > is this simply mirroring some of the stuff that bind did? I don't know why it was done but it should be in /etc. I'll submit a review to change it. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0 From nobody Wed Jan 18 16:08:21 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NxrK43jkbz2yGPN; Wed, 18 Jan 2023 16:08:24 +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 4NxrK42bmJz4kqn; Wed, 18 Jan 2023 16:08:24 +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 ESMTP id I9oIpBAnmc9C4IAz9pRv3p; Wed, 18 Jan 2023 16:08:23 +0000 Received: from spqr.komquats.com ([70.66.148.124]) by cmsmtp with ESMTPA id IAz7pqkcpcyvuIAz8pyMR5; Wed, 18 Jan 2023 16:08:23 +0000 X-Authority-Analysis: v=2.4 cv=VbHkgXl9 c=1 sm=1 tr=0 ts=63c81977 a=Cwc3rblV8FOMdVN/wOAqyQ==:117 a=Cwc3rblV8FOMdVN/wOAqyQ==:17 a=kj9zAlcOel0A:10 a=RvmDmJFTN0MA:10 a=iKhvJSA4AAAA:8 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=m0upQfrsCj9ja754TEkA:9 a=CjuIK1q_8ugA:10 a=odh9cflL3HIXMm4fY7Wr:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id BE23911DD; Wed, 18 Jan 2023 08:08:21 -0800 (PST) Received: by slippy.cwsent.com (Postfix, from userid 1000) id AACA6227; Wed, 18 Jan 2023 08:08:21 -0800 (PST) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: rgrimes@freebsd.org cc: Juraj Lutter , Cy Schubert , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 1d577bedbae8 - main - unbound: Fix config file path In-reply-to: <202301181551.30IFpbRu010474@gndrsh.dnsmgr.net> References: <202301181551.30IFpbRu010474@gndrsh.dnsmgr.net> Comments: In-reply-to "Rodney W. Grimes" message dated "Wed, 18 Jan 2023 07:51:37 -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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 18 Jan 2023 08:08:21 -0800 Message-Id: <20230118160821.AACA6227@slippy.cwsent.com> X-CMAE-Envelope: MS4xfKT3KDYRgU3MAkLMsU2ikbcc4I08xmGVsTtehAowQfG4GghHxqSybRV0Ag+DHuY1fDulf4YLjp13zMO/cT5eTSyVeewSyg1flXmqwtrgtKmRVMBqRhtf Zei/v3XgijhCOhk7cM31h12wRo3eOI6LUWLJMfHK5uMkPS3/DVDIXTIUJN0Rm+dEXWjjkUpJQzA2f4/E6nYT+CqRNQniTcnXZDdaHwWEdhMEDDx7H/A1IjRl DyRC7pFLAQMss921WTJvOgLyU+I7vvWDAcZHz3GrMDYBwNNjzS3p915SK6Vu3OEyOmYG7bRqDYaeTc4KpAShcwoV6NR9EL4dqhIlWcT3unF5F+vMApPgXG8j o/SIMgaE X-Rspamd-Queue-Id: 4NxrK42bmJz4kqn X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N In message <202301181551.30IFpbRu010474@gndrsh.dnsmgr.net>, "Rodney W. Grimes" writes: > [ Charset UTF-8 unsupported, converting... ] > > > > > > > On 18 Jan 2023, at 16:34, Rodney W. Grimes wr > ote: > > > > > > No, otis fixed it thus: > > > -#define CONFIGFILE "/usr/local/etc/unbound/unbound.conf" > > > +#define CONFIGFILE "/var/unbound/unbound.conf" > > > > > > > > > > I am suggesting that it should be > > > #define CONFIGFILE "/etc/unbound/unbound.conf" > > > > > > ALL base system configuration files *should* be relative to /etc, not /va > r. > > > > > > > Would this need any mtree changes or similar? > > No, /etc/unbound is a symbolic link already installed by the build system, > and /var/unbound is already a directory, again, installed by the build system > . > > This is a one line change that actually makes the /etc/unbound link work > correctly, without this change the binary has a hard coded path that ignores > the > /etc/unbound symbolic link and requires a recompile if I want to move > things around, or maintanance of 2 symbolic links. > > Personally I dont see *why* unbound has a /var/unbound directory, can > someone tell me why that was done? Is this some attempt and maintaining > read only root? Does unbound scribble in the config directory, or > is this simply mirroring some of the stuff that bind did? I see why it does this. Looking at usr.sbin/unbound/setup/local-unbound-setu p.sh, it installs its config files in $workdir. Looking at git log 49cede74eecf4 (SVN r255809), the last paragraph in the commit log entry says: Note that these scripts place the unbound configuration files in /var/unbound rather than /etc/unbound. This is necessary so that unbound can reload its configuration while chrooted. We should probably provide symlinks in /etc. Providing symlinks in /etc/unbound appears to be the correct solution. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0 From nobody Wed Jan 18 16:40:29 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Nxs2941tFz2yLGy; Wed, 18 Jan 2023 16:40:33 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Nxs291gRdz3Njc; Wed, 18 Jan 2023 16:40:33 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Authentication-Results: mx1.freebsd.org; none Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 30IGeTJn010752; Wed, 18 Jan 2023 08:40:29 -0800 (PST) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 30IGeTbo010751; Wed, 18 Jan 2023 08:40:29 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202301181640.30IGeTbo010751@gndrsh.dnsmgr.net> Subject: Re: git: 1d577bedbae8 - main - unbound: Fix config file path In-Reply-To: <20230118160821.AACA6227@slippy.cwsent.com> To: Cy Schubert Date: Wed, 18 Jan 2023 08:40:29 -0800 (PST) CC: rgrimes@freebsd.org, Juraj Lutter , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4Nxs291gRdz3Njc X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N > In message <202301181551.30IFpbRu010474@gndrsh.dnsmgr.net>, "Rodney W. > Grimes" > writes: > > [ Charset UTF-8 unsupported, converting... ] > > > > > > > > > > On 18 Jan 2023, at 16:34, Rodney W. Grimes wr > > ote: > > > > > > > > No, otis fixed it thus: > > > > -#define CONFIGFILE "/usr/local/etc/unbound/unbound.conf" > > > > +#define CONFIGFILE "/var/unbound/unbound.conf" > > > > > > > > > > > > > > I am suggesting that it should be > > > > #define CONFIGFILE "/etc/unbound/unbound.conf" > > > > > > > > ALL base system configuration files *should* be relative to /etc, not /va > > r. > > > > > > > > > > Would this need any mtree changes or similar? > > > > No, /etc/unbound is a symbolic link already installed by the build system, > > and /var/unbound is already a directory, again, installed by the build system > > . > > > > This is a one line change that actually makes the /etc/unbound link work > > correctly, without this change the binary has a hard coded path that ignores > > the > > /etc/unbound symbolic link and requires a recompile if I want to move > > things around, or maintanance of 2 symbolic links. > > > > Personally I dont see *why* unbound has a /var/unbound directory, can > > someone tell me why that was done? Is this some attempt and maintaining > > read only root? Does unbound scribble in the config directory, or > > is this simply mirroring some of the stuff that bind did? > > I see why it does this. Looking at usr.sbin/unbound/setup/local-unbound-setu > p.sh, it installs its config files in $workdir. Looking at git log > 49cede74eecf4 (SVN r255809), the last paragraph in the commit log entry > says: > > Note that these scripts place the unbound configuration files in > /var/unbound rather than /etc/unbound. This is necessary so that > unbound can reload its configuration while chrooted. We should > probably provide symlinks in /etc. > > Providing symlinks in /etc/unbound appears to be the correct solution. For the forth or fith time, there already IS a symbolic link etc/unbound -> ../var/unbound. Just make the change I suggested and all is fine... -- Rod Grimes rgrimes@freebsd.org From nobody Wed Jan 18 16:45:04 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Nxs7S3WJWz2yMBH; Wed, 18 Jan 2023 16:45:08 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Nxs7S11mRz3PjT; Wed, 18 Jan 2023 16:45:08 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Authentication-Results: mx1.freebsd.org; none Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 30IGj49o010784; Wed, 18 Jan 2023 08:45:04 -0800 (PST) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 30IGj4Ra010783; Wed, 18 Jan 2023 08:45:04 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202301181645.30IGj4Ra010783@gndrsh.dnsmgr.net> Subject: Re: git: 1d577bedbae8 - main - unbound: Fix config file path In-Reply-To: <202301181640.30IGeTbo010751@gndrsh.dnsmgr.net> To: rgrimes@freebsd.org Date: Wed, 18 Jan 2023 08:45:04 -0800 (PST) CC: Cy Schubert , Juraj Lutter , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4Nxs7S11mRz3PjT X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N > > In message <202301181551.30IFpbRu010474@gndrsh.dnsmgr.net>, "Rodney W. > > Grimes" > > writes: > > > [ Charset UTF-8 unsupported, converting... ] > > > > > > > > > > > > > On 18 Jan 2023, at 16:34, Rodney W. Grimes wr > > > ote: > > > > > > > > > > No, otis fixed it thus: > > > > > -#define CONFIGFILE "/usr/local/etc/unbound/unbound.conf" > > > > > +#define CONFIGFILE "/var/unbound/unbound.conf" > > > > > > > > > > > > > > > > > > I am suggesting that it should be > > > > > #define CONFIGFILE "/etc/unbound/unbound.conf" > > > > > > > > > > ALL base system configuration files *should* be relative to /etc, not /va > > > r. > > > > > > > > > > > > > Would this need any mtree changes or similar? > > > > > > No, /etc/unbound is a symbolic link already installed by the build system, > > > and /var/unbound is already a directory, again, installed by the build system > > > . > > > > > > This is a one line change that actually makes the /etc/unbound link work > > > correctly, without this change the binary has a hard coded path that ignores > > > the > > > /etc/unbound symbolic link and requires a recompile if I want to move > > > things around, or maintanance of 2 symbolic links. > > > > > > Personally I dont see *why* unbound has a /var/unbound directory, can > > > someone tell me why that was done? Is this some attempt and maintaining > > > read only root? Does unbound scribble in the config directory, or > > > is this simply mirroring some of the stuff that bind did? > > > > I see why it does this. Looking at usr.sbin/unbound/setup/local-unbound-setu > > p.sh, it installs its config files in $workdir. Looking at git log > > 49cede74eecf4 (SVN r255809), the last paragraph in the commit log entry > > says: > > > > Note that these scripts place the unbound configuration files in > > /var/unbound rather than /etc/unbound. This is necessary so that > > unbound can reload its configuration while chrooted. We should > > probably provide symlinks in /etc. Hang on a second... where is unbound chrooted to? If it is chrooted to /var/unbound would it not then look for /var/unbound/var/unbound/unbound.conf? I got a feeling something is not well thought out here... -- Rod Grimes rgrimes@freebsd.org From nobody Wed Jan 18 16:46:13 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Nxs8l6kN6z2yMHM; Wed, 18 Jan 2023 16:46:15 +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 4Nxs8l5QPwz3PyW; Wed, 18 Jan 2023 16:46:15 +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 ESMTP id I7eKpAyUBc9C4IBZnpS8Hr; Wed, 18 Jan 2023 16:46:15 +0000 Received: from spqr.komquats.com ([70.66.148.124]) by cmsmtp with ESMTPA id IBZlphjR2yAOeIBZmpWU9W; Wed, 18 Jan 2023 16:46:15 +0000 X-Authority-Analysis: v=2.4 cv=e5oV9Il/ c=1 sm=1 tr=0 ts=63c82257 a=Cwc3rblV8FOMdVN/wOAqyQ==:117 a=Cwc3rblV8FOMdVN/wOAqyQ==:17 a=kj9zAlcOel0A:10 a=RvmDmJFTN0MA:10 a=iKhvJSA4AAAA:8 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=C4B0vsJxOSi1_OTPh5EA:9 a=CjuIK1q_8ugA:10 a=PaZFhfb9_QoA:10 a=odh9cflL3HIXMm4fY7Wr:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id A0F4B12F4; Wed, 18 Jan 2023 08:46:13 -0800 (PST) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 82F2B23D; Wed, 18 Jan 2023 08:46:13 -0800 (PST) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: rgrimes@freebsd.org cc: Cy Schubert , Juraj Lutter , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 1d577bedbae8 - main - unbound: Fix config file path In-reply-to: <202301181640.30IGeTbo010751@gndrsh.dnsmgr.net> References: <202301181640.30IGeTbo010751@gndrsh.dnsmgr.net> Comments: In-reply-to "Rodney W. Grimes" message dated "Wed, 18 Jan 2023 08:40:29 -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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 18 Jan 2023 08:46:13 -0800 Message-Id: <20230118164613.82F2B23D@slippy.cwsent.com> X-CMAE-Envelope: MS4xfLP7Owybg8kfDnLvGbXkUAAy0OqKAfuXORRM0ZyiLybm0cgFdkIxl3YD5w18q3gKo5SNTa/3vX1C5KfZbLA+eF9luhwDsU11befxbgxQL7I9bg35IUOF rfOAhMePHBGgSVp8lbXBM08GeeWE5oQHT6fUJt6FSv48F9bQA8DSVJZhWnruEVy9yrhE0Xa3vjynRaqCl5c/8obA97bVAuM1CvmJRBXyAEToyoyAiTwZPYJg 356KWeiC0bOj9HJrUnODR8JNH/86FF4MzNhTmHR4N8UAIw25hqTdPegDHiTvn5Yz9Zws3T6CFrQYAnXHiNTGAsa+ojtpbMWgp0BNBmaTryIuUwY6k+QdSkiK 9oVfQblP X-Rspamd-Queue-Id: 4Nxs8l5QPwz3PyW X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N In message <202301181640.30IGeTbo010751@gndrsh.dnsmgr.net>, "Rodney W. Grimes" writes: > > In message <202301181551.30IFpbRu010474@gndrsh.dnsmgr.net>, "Rodney W. > > Grimes" > > writes: > > > [ Charset UTF-8 unsupported, converting... ] > > > > > > > > > > > > > On 18 Jan 2023, at 16:34, Rodney W. Grimes > wr > > > ote: > > > > > > > > > > No, otis fixed it thus: > > > > > -#define CONFIGFILE "/usr/local/etc/unbound/unbound.conf" > > > > > +#define CONFIGFILE "/var/unbound/unbound.conf" > > > > > > > > > > > > > > > > > > I am suggesting that it should be > > > > > #define CONFIGFILE "/etc/unbound/unbound.conf" > > > > > > > > > > ALL base system configuration files *should* be relative to /etc, not > /va > > > r. > > > > > > > > > > > > > Would this need any mtree changes or similar? > > > > > > No, /etc/unbound is a symbolic link already installed by the build system > , > > > and /var/unbound is already a directory, again, installed by the build sy > stem > > > . > > > > > > This is a one line change that actually makes the /etc/unbound link work > > > correctly, without this change the binary has a hard coded path that igno > res > > > the > > > /etc/unbound symbolic link and requires a recompile if I want to move > > > things around, or maintanance of 2 symbolic links. > > > > > > Personally I dont see *why* unbound has a /var/unbound directory, can > > > someone tell me why that was done? Is this some attempt and maintaining > > > read only root? Does unbound scribble in the config directory, or > > > is this simply mirroring some of the stuff that bind did? > > > > I see why it does this. Looking at usr.sbin/unbound/setup/local-unbound-set > u > > p.sh, it installs its config files in $workdir. Looking at git log > > 49cede74eecf4 (SVN r255809), the last paragraph in the commit log entry > > says: > > > > Note that these scripts place the unbound configuration files in > > /var/unbound rather than /etc/unbound. This is necessary so that > > unbound can reload its configuration while chrooted. We should > > probably provide symlinks in /etc. > > > > Providing symlinks in /etc/unbound appears to be the correct solution. > > For the forth or fith time, there already IS a symbolic link > etc/unbound -> ../var/unbound. Hmm. slippy$ lh /etc/unbound ls: /etc/unbound: No such file or directory slippy$ cwsys# lh /etc/unbound ls: /etc/unbound: No such file or directory cwsys# Seems it got deleted on two of my systems and never recreated. > > Just make the change I suggested and all is fine... On second thought, if the comment in the commit log is correct, the change you suggested would break running unbound chroot. Or do I misunderstand? -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0 From nobody Wed Jan 18 16:47:56 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NxsBm0DHDz2yMXj; Wed, 18 Jan 2023 16:48:00 +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 4NxsBl4ydzz3Qg8; Wed, 18 Jan 2023 16:47:59 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4004a.ext.cloudfilter.net ([10.228.9.227]) by cmsmtp with ESMTP id HyeqpADtVc9C4IBbTpS94Y; Wed, 18 Jan 2023 16:47:59 +0000 Received: from spqr.komquats.com ([70.66.148.124]) by cmsmtp with ESMTPA id IBbRpNx3W3fOSIBbSpXxIF; Wed, 18 Jan 2023 16:47:59 +0000 X-Authority-Analysis: v=2.4 cv=J8G5USrS c=1 sm=1 tr=0 ts=63c822bf a=Cwc3rblV8FOMdVN/wOAqyQ==:117 a=Cwc3rblV8FOMdVN/wOAqyQ==:17 a=kj9zAlcOel0A:10 a=RvmDmJFTN0MA:10 a=iKhvJSA4AAAA:8 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=extXo1mnNIs0al6sDOMA:9 a=CjuIK1q_8ugA:10 a=PaZFhfb9_QoA:10 a=odh9cflL3HIXMm4fY7Wr:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id AE9B2130E; Wed, 18 Jan 2023 08:47:56 -0800 (PST) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 84556148; Wed, 18 Jan 2023 08:47:56 -0800 (PST) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: rgrimes@freebsd.org cc: Cy Schubert , Juraj Lutter , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 1d577bedbae8 - main - unbound: Fix config file path In-reply-to: <202301181645.30IGj4Ra010783@gndrsh.dnsmgr.net> References: <202301181645.30IGj4Ra010783@gndrsh.dnsmgr.net> Comments: In-reply-to "Rodney W. Grimes" message dated "Wed, 18 Jan 2023 08:45:04 -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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 18 Jan 2023 08:47:56 -0800 Message-Id: <20230118164756.84556148@slippy.cwsent.com> X-CMAE-Envelope: MS4xfNONaaCev5zztMqnOLIpMJrlvUGk295vgaTWslpqVtducjW8KzAIgKg8W/j38eAJvNj0S/Dnse4J8f/NksFqaObMA2R1oAqs7XyrYjLq3iaChOW2aWjU uUDuJhLDehWu9T9EcOnfyd9Kd18KSkXTsyoQc0/L/CzWc34UFsWiDR8X7OCdXQbX9+qzJMjOIa8ZtUluS3uYemdm4pk0Whk50KCJbgleDUxCBkU8rPuSk8+g KbJPATSqTY93K1yQ7KCyHglZ/smQbmxbXRGPynThKFHAYeeG2bWChlWsEr2gg9rc5e2JZ5UmQINlw1J53ghXwCe0ahFp9Gnz3TUYOSZnGOG7SH01sxFRyxx+ 6XgJ9Hi0 X-Rspamd-Queue-Id: 4NxsBl4ydzz3Qg8 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N In message <202301181645.30IGj4Ra010783@gndrsh.dnsmgr.net>, "Rodney W. Grimes" writes: > > > In message <202301181551.30IFpbRu010474@gndrsh.dnsmgr.net>, "Rodney W. > > > Grimes" > > > writes: > > > > [ Charset UTF-8 unsupported, converting... ] > > > > > > > > > > > > > > > > On 18 Jan 2023, at 16:34, Rodney W. Grimes et> wr > > > > ote: > > > > > > > > > > > > No, otis fixed it thus: > > > > > > -#define CONFIGFILE "/usr/local/etc/unbound/unbound.conf" > > > > > > +#define CONFIGFILE "/var/unbound/unbound.conf" > > > > > > > > > > > > > > > > > > > > > > I am suggesting that it should be > > > > > > #define CONFIGFILE "/etc/unbound/unbound.conf" > > > > > > > > > > > > ALL base system configuration files *should* be relative to /etc, n > ot /va > > > > r. > > > > > > > > > > > > > > > > Would this need any mtree changes or similar? > > > > > > > > No, /etc/unbound is a symbolic link already installed by the build syst > em, > > > > and /var/unbound is already a directory, again, installed by the build > system > > > > . > > > > > > > > This is a one line change that actually makes the /etc/unbound link wor > k > > > > correctly, without this change the binary has a hard coded path that ig > nores > > > > the > > > > /etc/unbound symbolic link and requires a recompile if I want to move > > > > things around, or maintanance of 2 symbolic links. > > > > > > > > Personally I dont see *why* unbound has a /var/unbound directory, can > > > > someone tell me why that was done? Is this some attempt and maintainin > g > > > > read only root? Does unbound scribble in the config directory, or > > > > is this simply mirroring some of the stuff that bind did? > > > > > > I see why it does this. Looking at usr.sbin/unbound/setup/local-unbound-s > etu > > > p.sh, it installs its config files in $workdir. Looking at git log > > > 49cede74eecf4 (SVN r255809), the last paragraph in the commit log entry > > > says: > > > > > > Note that these scripts place the unbound configuration files in > > > /var/unbound rather than /etc/unbound. This is necessary so that > > > unbound can reload its configuration while chrooted. We should > > > probably provide symlinks in /etc. > > Hang on a second... where is unbound chrooted to? If it is chrooted > to /var/unbound would it not then look for /var/unbound/var/unbound/unbound.c > onf? > > I got a feeling something is not well thought out here... Probably and it needs someone to investigate and possibly fix. I can put this on my todo list. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0 From nobody Wed Jan 18 17:02:55 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NxsX35rrcz2sSF3; Wed, 18 Jan 2023 17:02:59 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4NxsX33m7Dz3hlD; Wed, 18 Jan 2023 17:02:59 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Authentication-Results: mx1.freebsd.org; none Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 30IH2u0P010891; Wed, 18 Jan 2023 09:02:56 -0800 (PST) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 30IH2toO010890; Wed, 18 Jan 2023 09:02:55 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202301181702.30IH2toO010890@gndrsh.dnsmgr.net> Subject: Re: git: 1d577bedbae8 - main - unbound: Fix config file path In-Reply-To: <20230118164756.84556148@slippy.cwsent.com> To: Cy Schubert Date: Wed, 18 Jan 2023 09:02:55 -0800 (PST) CC: rgrimes@freebsd.org, Juraj Lutter , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4NxsX33m7Dz3hlD X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N > In message <202301181645.30IGj4Ra010783@gndrsh.dnsmgr.net>, "Rodney W. > Grimes" > writes: > > > > In message <202301181551.30IFpbRu010474@gndrsh.dnsmgr.net>, "Rodney W. > > > > Grimes" > > > > writes: > > > > > [ Charset UTF-8 unsupported, converting... ] > > > > > > > > > > > > > > > > > > > On 18 Jan 2023, at 16:34, Rodney W. Grimes > et> wr > > > > > ote: > > > > > > > > > > > > > > No, otis fixed it thus: > > > > > > > -#define CONFIGFILE "/usr/local/etc/unbound/unbound.conf" > > > > > > > +#define CONFIGFILE "/var/unbound/unbound.conf" > > > > > > > > > > > > > > > > > > > > > > > > > > I am suggesting that it should be > > > > > > > #define CONFIGFILE "/etc/unbound/unbound.conf" > > > > > > > > > > > > > > ALL base system configuration files *should* be relative to /etc, n > > ot /va > > > > > r. > > > > > > > > > > > > > > > > > > > Would this need any mtree changes or similar? > > > > > > > > > > No, /etc/unbound is a symbolic link already installed by the build syst > > em, > > > > > and /var/unbound is already a directory, again, installed by the build > > system > > > > > . > > > > > > > > > > This is a one line change that actually makes the /etc/unbound link wor > > k > > > > > correctly, without this change the binary has a hard coded path that ig > > nores > > > > > the > > > > > /etc/unbound symbolic link and requires a recompile if I want to move > > > > > things around, or maintanance of 2 symbolic links. > > > > > > > > > > Personally I dont see *why* unbound has a /var/unbound directory, can > > > > > someone tell me why that was done? Is this some attempt and maintainin > > g > > > > > read only root? Does unbound scribble in the config directory, or > > > > > is this simply mirroring some of the stuff that bind did? > > > > > > > > I see why it does this. Looking at usr.sbin/unbound/setup/local-unbound-s > > etu > > > > p.sh, it installs its config files in $workdir. Looking at git log > > > > 49cede74eecf4 (SVN r255809), the last paragraph in the commit log entry > > > > says: > > > > > > > > Note that these scripts place the unbound configuration files in > > > > /var/unbound rather than /etc/unbound. This is necessary so that > > > > unbound can reload its configuration while chrooted. We should > > > > probably provide symlinks in /etc. > > > > Hang on a second... where is unbound chrooted to? If it is chrooted > > to /var/unbound would it not then look for /var/unbound/var/unbound/unbound.c > > onf? > > > > I got a feeling something is not well thought out here... > > Probably and it needs someone to investigate and possibly fix. I can put > this on my todo list. I've read a few of the linux how to's on running unbound chrooted and it leads me to belive that /etc/unbound/unbound.conf is the correct value of the path to the config file. I'll also spend some ENOTIME idle cycles looking closer at what has happened here. My gut says that if unbound is running chroot to /var/unbound then the config file should live in /var/unbound/etc/unbound/unbound.conf This would mimic what I am seeing done with /var/lib/unbound on linux systems. Then the symlink at /etc would need to be updated to point to /etc/unbound -> ../var/unbound/etc/unbound -- Rod Grimes rgrimes@freebsd.org From nobody Wed Jan 18 17:07:32 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NxsdM28Ctz2sStt; Wed, 18 Jan 2023 17:07:35 +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 4NxsdM175Fz3jHd; Wed, 18 Jan 2023 17:07:35 +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 ESMTP id IBdKpHOull2xSIBuQpRlke; Wed, 18 Jan 2023 17:07:34 +0000 Received: from spqr.komquats.com ([70.66.148.124]) by cmsmtp with ESMTPA id IBuOpr6TZcyvuIBuPpyaHm; Wed, 18 Jan 2023 17:07:34 +0000 X-Authority-Analysis: v=2.4 cv=VbHkgXl9 c=1 sm=1 tr=0 ts=63c82756 a=Cwc3rblV8FOMdVN/wOAqyQ==:117 a=Cwc3rblV8FOMdVN/wOAqyQ==:17 a=kj9zAlcOel0A:10 a=RvmDmJFTN0MA:10 a=iKhvJSA4AAAA:8 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=JZogqisxDOvIRNnNG9cA:9 a=CjuIK1q_8ugA:10 a=_fOGpDza7iMA:10 a=PaZFhfb9_QoA:10 a=odh9cflL3HIXMm4fY7Wr:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 88A7D132C; Wed, 18 Jan 2023 09:07:32 -0800 (PST) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 6E5A714E; Wed, 18 Jan 2023 09:07:32 -0800 (PST) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: rgrimes@freebsd.org cc: Cy Schubert , Juraj Lutter , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 1d577bedbae8 - main - unbound: Fix config file path In-reply-to: <202301181702.30IH2toO010890@gndrsh.dnsmgr.net> References: <202301181702.30IH2toO010890@gndrsh.dnsmgr.net> Comments: In-reply-to "Rodney W. Grimes" message dated "Wed, 18 Jan 2023 09:02:55 -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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 18 Jan 2023 09:07:32 -0800 Message-Id: <20230118170732.6E5A714E@slippy.cwsent.com> X-CMAE-Envelope: MS4xfBSkrZ+5aWdf00amlArqmersBzrLYfho2HDwACrBBFyZ01gHJ8l90bLmnEbEXGjJvZouXGnZVZSGgIOIeqWy4dFLu+H8bD4avFc40tBuqzbYiz/Wujaz cROCLAigExQ5nLStAovpDDYPwTPdUCTE6HT01PL3Ga5zTyOuYJbu+sUX3zEuX8Lf4QZrIAIOkrftrhaQ5MPO5dXXyZThFCvmoqe4xf0nPZJ3wuqM4nHcfoef Epww8mufAWhS2eDz01adDxrLn0hqKcmt7CiDrGldR+L8iXsRGLBQYY5CgPscl2DwrPzHq2jx3ZECJc5YTm1GxXKdMbydeb6f/+mXOQJyDf5WA2PcIsT703LZ Pe5iKPVo X-Rspamd-Queue-Id: 4NxsdM175Fz3jHd X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N In message <202301181702.30IH2toO010890@gndrsh.dnsmgr.net>, "Rodney W. Grimes" writes: > > In message <202301181645.30IGj4Ra010783@gndrsh.dnsmgr.net>, "Rodney W. > > Grimes" > > writes: > > > > > In message <202301181551.30IFpbRu010474@gndrsh.dnsmgr.net>, "Rodney W > . > > > > > Grimes" > > > > > writes: > > > > > > [ Charset UTF-8 unsupported, converting... ] > > > > > > > > > > > > > > > > > > > > > > On 18 Jan 2023, at 16:34, Rodney W. Grimes gr.n > > > et> wr > > > > > > ote: > > > > > > > > > > > > > > > > No, otis fixed it thus: > > > > > > > > -#define CONFIGFILE "/usr/local/etc/unbound/unbound.conf" > > > > > > > > +#define CONFIGFILE "/var/unbound/unbound.conf" > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > I am suggesting that it should be > > > > > > > > #define CONFIGFILE "/etc/unbound/unbound.conf" > > > > > > > > > > > > > > > > ALL base system configuration files *should* be relative to /et > c, n > > > ot /va > > > > > > r. > > > > > > > > > > > > > > > > > > > > > > Would this need any mtree changes or similar? > > > > > > > > > > > > No, /etc/unbound is a symbolic link already installed by the build > syst > > > em, > > > > > > and /var/unbound is already a directory, again, installed by the bu > ild > > > system > > > > > > . > > > > > > > > > > > > This is a one line change that actually makes the /etc/unbound link > wor > > > k > > > > > > correctly, without this change the binary has a hard coded path tha > t ig > > > nores > > > > > > the > > > > > > /etc/unbound symbolic link and requires a recompile if I want to mo > ve > > > > > > things around, or maintanance of 2 symbolic links. > > > > > > > > > > > > Personally I dont see *why* unbound has a /var/unbound directory, c > an > > > > > > someone tell me why that was done? Is this some attempt and mainta > inin > > > g > > > > > > read only root? Does unbound scribble in the config directory, or > > > > > > is this simply mirroring some of the stuff that bind did? > > > > > > > > > > I see why it does this. Looking at usr.sbin/unbound/setup/local-unbou > nd-s > > > etu > > > > > p.sh, it installs its config files in $workdir. Looking at git log > > > > > 49cede74eecf4 (SVN r255809), the last paragraph in the commit log ent > ry > > > > > says: > > > > > > > > > > Note that these scripts place the unbound configuration files in > > > > > /var/unbound rather than /etc/unbound. This is necessary so that > > > > > unbound can reload its configuration while chrooted. We should > > > > > probably provide symlinks in /etc. > > > > > > Hang on a second... where is unbound chrooted to? If it is chrooted > > > to /var/unbound would it not then look for /var/unbound/var/unbound/unbou > nd.c > > > onf? > > > > > > I got a feeling something is not well thought out here... > > > > Probably and it needs someone to investigate and possibly fix. I can put > > this on my todo list. > > I've read a few of the linux how to's on running unbound chrooted and > it leads me to belive that /etc/unbound/unbound.conf is the correct > value of the path to the config file. > > I'll also spend some ENOTIME idle cycles looking closer at what has > happened here. My gut says that if unbound is running chroot to > /var/unbound then the config file should live in > /var/unbound/etc/unbound/unbound.conf If you have more ENOTIME than I do, the help would be appreciated. Otherwise I'll just add it to my multitasking list. > > This would mimic what I am seeing done with /var/lib/unbound on > linux systems. This also mimics how one would run named chrooted. > > Then the symlink at /etc would need to be updated to point to > /etc/unbound -> ../var/unbound/etc/unbound -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0 From nobody Wed Jan 18 17:50:02 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NxtZN3KyPz2sYTf; Wed, 18 Jan 2023 17:50:04 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NxtZN2tQ6z3mTD; Wed, 18 Jan 2023 17:50:04 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674064204; h=from:from:reply-to:subject: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=8HBj0laqcaZbo+PMier8lLQDoX7EXR4wqPDZvF4YJAk=; b=SsQFFkdtAI7dIAyvaks7QxnVcrrnAytjv+oSn3XpGp1lkjnHBc2gglAYNuIRWOVDv3oO1Q u/MYtzFveRMjU/zvrne39tXhUKGQS23EurwBmQXTOKOCFJtre6Po4BkZAbgwdk/LDqN141 t/vnmL2YT7MhtHzmciO6XmBrryaqrwKL2H/eGZvSineY/cOOXEgHNCNZzzQxF7K1HK3sLn 9YDZghiz/AfbNNJnxsCwWPuQkfz6OHM/xSHnWlw3ataigsc3i5dZvF/MasvFu4TGT4p9YW 3RulBxWO6mqI0mg9UmMX0jh4UAaZWh4fR2p5PMvvqLXSnpI6oFgUgR13wBR9Nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674064204; h=from:from:reply-to:subject: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=8HBj0laqcaZbo+PMier8lLQDoX7EXR4wqPDZvF4YJAk=; b=rI5z0BPc4dEqx58rwjtLzs+1MEcZscTQFr7iHzteyhJal1vAH63jPv9nzs68nGORH+ya5E 6LU6pmhSvcc5csxWKmr0vhKDpHgeIG9H9k0YHiEbOYdOWddnpu4/wuI2RcSf50PjJVhUx1 dWxlFJEc5fkJ7/FOf87hEWis0/3ojLJU7cnzO+0Z02+crCMDTy/7va1tdRX6daMO4ZOPvo wGJ3nqxWffo6XqyojxOU09uMTcfr2NGknYKdw3e1jLUU1WIN5iFT68O/FghUiJ0Nk1r9Q7 jPqchFH2/OoTJag3KXP+9z9pEjGwBwNofgWpe+AI4J5RKsfYazJqiROT+reARQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674064204; a=rsa-sha256; cv=none; b=ZnLPi8UvYY3AQkhyEr7OrLh7lTcwwu8X/wle9FeVBnbpT74n0eXCkI07+5O60nXevXq1Aw +BvCFwdDjj1rayX/RzPSD5lW2psWTmTJ7C01MStstEW73h8ynmxfYNPhVT6wRAXv/CZI5m +dfSZ56Py/oWaqIIl0WWHZXmqrZ8aXcnzNSEecZvXIAtXtiTalmLYvY5UDseiJEo7sib27 CrJ1akbscmaLqjS6e3k1VoOl1BVtIT4oShDc0LYjxKNcNCxFeny54sU99/0COA5SOGvVmT Alsspm/7cYDvPOv/66FUPTBflR3h120nuhaT3685Zh5HiQmpldvJV2aNdvqUkw== Received: from [10.0.1.4] (ralph.baldwin.cx [66.234.199.215]) (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 4NxtZM5jJ2zNXJ; Wed, 18 Jan 2023 17:50:03 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: Date: Wed, 18 Jan 2023 09:50:02 -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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Content-Language: en-US To: Hans Petter Selasky , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202301131019.30DAJXWf081968@gitrepo.freebsd.org> From: John Baldwin Subject: Re: git: e0d8add4af0b - main - tcp_lro: Fix for undefined behaviour. In-Reply-To: <202301131019.30DAJXWf081968@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ThisMailContainsUnwantedMimeParts: N On 1/13/23 2:19 AM, Hans Petter Selasky wrote: > The branch main has been updated by hselasky: > > URL: https://cgit.FreeBSD.org/src/commit/?id=e0d8add4af0be1d37ede9a16f46424dc08f0d95e > > commit e0d8add4af0be1d37ede9a16f46424dc08f0d95e > Author: Hans Petter Selasky > AuthorDate: 2022-11-28 22:56:16 +0000 > Commit: Hans Petter Selasky > CommitDate: 2023-01-13 10:18:19 +0000 > > tcp_lro: Fix for undefined behaviour. > > Make sure the size of the raw[] array in the lro_address union is > correctly set at compile time, so that static code analysis tools > do not report undefined behaviour. > > MFC after: 1 week > Sponsored by: NVIDIA Networking > --- > sys/netinet/tcp_lro.h | 14 ++++++++++---- > 1 file changed, 10 insertions(+), 4 deletions(-) > > diff --git a/sys/netinet/tcp_lro.h b/sys/netinet/tcp_lro.h > index 427657df47e7..e01e451c1e77 100644 > --- a/sys/netinet/tcp_lro.h > +++ b/sys/netinet/tcp_lro.h > @@ -34,6 +34,8 @@ > #define _TCP_LRO_H_ > > #include > +#include param.h should always be the first header, and it also sorts before time.h. > + > #include > > #ifndef TCP_LRO_ENTRIES > @@ -65,8 +67,12 @@ > > struct inpcb; > > +/* Precompute the LRO_RAW_ADDRESS_MAX value: */ > +#define LRO_RAW_ADDRESS_MAX \ > + howmany(12 + 2 * sizeof(struct in6_addr), sizeof(u_long)) > + > union lro_address { > - u_long raw[1]; > + u_long raw[LRO_RAW_ADDRESS_MAX]; In OFED this anti-pattern uses 'u_long raw[0]' which I think is probably at least better than '[1]'. My worry is that LRO_RAW_ADDRESS_MAX is fairly fragile and gross, though the static assertion at least catches if it is wrong. In general though for both OFED and this, I think is is actually cleaner to remove the weird aliasing 'raw' member and just use a plain (u_long *) cast. If you did that, you could revert this commit and have the simpler definition of LRO_RAW_ADDRESS_MAX derived from the sizeof() the type. -- John Baldwin From nobody Wed Jan 18 20:51:55 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NxycC5jZYz2syM7; Wed, 18 Jan 2023 20:51: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NxycC5Bltz424K; Wed, 18 Jan 2023 20:51:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674075115; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z/QqVkTk67vYDzXqV7D3HDbMVC5hMprZqYMmyvSDjdE=; b=a2fGE+4yY+8N3fTIkILPPaplXZI6RvUYtBN8cJ/+wVQIetLW/W+ZVw/FShI2P+tKAw9QSM JFVqF4nrL+QRl6/chXkVnMzKiezPPrNzDKBb0uWqKLmzMp3D1FoagJy2ZsEyOyp32QkCpn EtU29idq9lZ6Qcgz7BIkDBvJRo1RMyuaEtG5SA9kxkLdBO6GS1VKCWRZK0cIIGZQ7QEA6A IU3d2F1haIqU0yebZJ0/GTd9VP2PM3ENIxxXQ42bChTReF8C4WUdK9x8WuAJC/HC/M17uO u4BUyr/6kSZ/aO+arK9RfzNoT9ds6N+wpMycgjsKgj3icrZZVwnmOeFRZtAWzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674075115; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z/QqVkTk67vYDzXqV7D3HDbMVC5hMprZqYMmyvSDjdE=; b=sxa2wDkR7Lhm5dbzdIUcP3S04mvBtM34POsnqxgunm01LVlOTxvrLKbcG0Lvx87B+JLubB RLfopYhCGq/UTEdR4gk7MrshdSj9lbVB3ulE0RjR2mYAd71Ydk0bYdk2wqazbMTPWdp7WB R9eoUH36UJeAua8lJMWln1fXRvHMDe3ECwGJ3KAfwNBu+Zxyh5aZ1PzQBlybTDCbiL9FUn K2AtMqSqXCBREHdISB8r3HKUrFn3gl7/W9619LpIMd7u5qN+0WnOhFDKwGt+4VVHHqvqIf hMNmJlY6h3496ztsoAGqhWNGI4DLVkwfvZZHDPOxvh2CPdccOGVtTFfN93aUCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674075115; a=rsa-sha256; cv=none; b=EgsRy3/Jy/Ri+HEyx13CVhfg756bgJ7RR0fOTgP4edwg2wzf4jTmVS7BU+6y3qv7LN9Okg mS21jStAO8dHJVUoEm2kS6HFXuT5pOVn3SbTDc7ZYWqSvzhSMfzwLaa0vHFBKB7crHUlhS h4WtsBejDiHkelOdVt2AZJMV8qkiPX0HnwkkIlT7AL7pLU83aKjS8ZhLiVacZIbdN/UqSq 9KnCq2Ez1zsMtNnAmfWeZq9v2uDxgLueioOkku/sGfo7lz6T0tvCkVGz9SlksPe0tIyqcx fqOcmjDgbCnv7zgqYoCG7vaoFC0Czk2fxqYqHYByVSD5UxeO1PK0uDbZwsqXlQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NxycC4GFGzPxm; Wed, 18 Jan 2023 20:51:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30IKptjO025025; Wed, 18 Jan 2023 20:51:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30IKptvY025024; Wed, 18 Jan 2023 20:51:55 GMT (envelope-from git) Date: Wed, 18 Jan 2023 20:51:55 GMT Message-Id: <202301182051.30IKptvY025024@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Pau Amma Subject: git: 5faf9f4dff8d - main - Refresh CPU types and classes from sys/sys/pmc.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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pauamma X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5faf9f4dff8da11e3893c9fd1d7c15a02c4b5b78 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by pauamma (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=5faf9f4dff8da11e3893c9fd1d7c15a02c4b5b78 commit 5faf9f4dff8da11e3893c9fd1d7c15a02c4b5b78 Author: Pau Amma AuthorDate: 2022-05-28 18:49:17 +0000 Commit: Pau Amma CommitDate: 2023-01-18 20:50:49 +0000 Refresh CPU types and classes from sys/sys/pmc.h. While here, fix a few nits. Inspired by reviewing D35342. Sources for trademark info - https://www.arm.com/company/policies/trademarks (no Arm8, curiously) - https://www.ibm.com/legal/copytrade?mhsrc=ibmsearch_a&mhq=trademark Reviewed by: carlavilla, luporl, mhorne Approved by: carlavilla (mentor), mhorne (src) Differential Revision: https://reviews.freebsd.org/D35344 --- lib/libpmc/pmc.3 | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 72 insertions(+), 8 deletions(-) diff --git a/lib/libpmc/pmc.3 b/lib/libpmc/pmc.3 index abe9f3208030..68fa46a5c337 100644 --- a/lib/libpmc/pmc.3 +++ b/lib/libpmc/pmc.3 @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 28, 2022 +.Dd June 3, 2022 .Dt PMC 3 .Os .Sh NAME @@ -131,7 +131,7 @@ The CPUs known to the PMC library are named by the enumeration. Supported CPUs include: .Pp -.Bl -tag -width "Li PMC_CPU_INTEL_CORE2" -compact +.Bl -tag -width "Li PMC_CPU_ARMV7_CORTEX_A15" -compact .It Li PMC_CPU_AMD_K7 .Tn "AMD Athlon" CPUs. @@ -161,14 +161,66 @@ and CPUs, and other CPUs conforming to version 2 of the .Tn Intel performance measurement architecture. +.It Li PMC_CPU_PPC_7450 +.Tn PowerPC +MPC7450 CPUs. +.It Li PMC_CPU_PPC_E500 +.Tn PowerPC +e500 Core CPUs. +.It Li PMC_CPU_PPC_970 +.Tn IBM +.Tn PowerPC +970 CPUs. +.It Li PMC_CPU_PPC_POWER8 +.Tn IBM +.Tn POWER8 and +.Tn POWER9 +CPUs. +.It Li GENERIC +Generic +.It Li PMC_CPU_ARMV7_CORTEX_A5 +.Tn ARMv7 +.Tn Cortex A5 +CPUs. +.It Li PMC_CPU_ARMV7_CORTEX_A7 +.Tn ARMv7 +.Tn Cortex A7 +CPUs. +.It Li PMC_CPU_ARMV7_CORTEX_A8 +.Tn ARMv7 +.Tn Cortex A8 +CPUs. +.It Li PMC_CPU_ARMV7_CORTEX_A9 +.Tn ARMv7 +.Tn Cortex A9 +CPUs. +.It Li PMC_CPU_ARMV7_CORTEX_A15 +.Tn ARMv7 Cortex A15 +CPUs. +.It Li PMC_CPU_ARMV7_CORTEX_A17 +.Tn ARMv7 +.Tn Cortex A17 +CPUs. +.It Li PMC_CPU_ARMV8_CORTEX_A53 +ARMv8 +.Tn Cortex A53 +CPUs. +.It Li PMC_CPU_ARMV8_CORTEX_A57 +ARMv8 +.Tn Cortex A57 +CPUs. +.It Li PMC_CPU_ARMV8_CORTEX_A76 +ARMv8 +.Tn Cortex A76 +CPUs. .El .Ss Supported PMCs -PMC supported by this library are named by the +PMCs supported by this library are named by the .Vt enum pmc_class enumeration. -Supported PMC kinds include: +Supported PMC classes include: .Pp -.Bl -tag -width "Li PMC_CLASS_IAF" -compact +.Bl -tag -width "Li PMC_CLASS_POWER8" -compact .It Li PMC_CLASS_IAF Fixed function hardware counters presents in CPUs conforming to the .Tn Intel @@ -187,6 +239,18 @@ Programmable hardware counters present in CPUs. .It Li PMC_CLASS_TSC The timestamp counter on i386 and amd64 architecture CPUs. +.It Li PMC_CLASS_ARMV7 +.Tn ARMv7 +.It Li PMC_CLASS_ARMV8 +.Tn ARMv8 +.It Li PMC_CLASS_PPC970 +.Tn IBM +.Tn PowerPC +970 class. +.It Li PMC_CLASS_POWER8 +.Tn IBM +.Tn POWER8 +class. .It Li PMC_CLASS_SOFT Software events. .El @@ -361,10 +425,10 @@ driver will send a PMC owning process a signal if: .Bl -bullet .It -If any process-mode PMC allocated by it loses all its +any process-mode PMC allocated by it loses all its target processes. .It -If the driver encounters an error when writing log data to a +the driver encounters an error when writing log data to a configured log file. This error may be retrieved by a subsequent call to .Fn pmc_flush_logfile . @@ -409,7 +473,7 @@ and process scope PMCs are detached from their targets using function .Fn pmc_detach . .It -Before the process exits, its may release its PMCs using function +Before the process exits, it may release its PMCs using function .Fn pmc_release . Any configured log file may be closed using function .Fn pmc_configure_logfile . From nobody Wed Jan 18 21:05:41 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Nxyw61VQLz2t0fW; Wed, 18 Jan 2023 21:05: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Nxyw60nfXz42tx; Wed, 18 Jan 2023 21:05:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674075942; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=baH/tLL2tyLXBQxvdzwD5IdYTMTmCojMVybPSP65aUU=; b=ibuxUsF/Q+tSVcrbj7zOequnKYKh/z4YWywGzGqSbjZM54hpA1+nRFh7F9MO3TYrBynCxM nG+Zq6hJMNGJaZaYNOXv0na+boGZKrX3yeTKSA3PfkYdDNCgKfvajGUUc4F2+tO0ViGzhj 7zvh8U7Om+kh0OslAjcrAbwqEsVuJsz9G5ZZ9Tz99BuBuTBfx4EFZ8cUmsmacpLBC1mFrL xNNShEq+WpSWYym2UFjuJBCRAEZ8Ya0D1SsqdzD5nv4X97Dt/7l2TB+Pk4fiqfNoUonN16 wW6Pp9PmHb6tiDrvwUXj7Jx+cGc1IXVfXjipWmZA0vSi9/X0J6gr7GRiMejbeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674075942; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=baH/tLL2tyLXBQxvdzwD5IdYTMTmCojMVybPSP65aUU=; b=EI9WEvRASJ9k6yGmwhCOWLc/7aSWErTxuLTKCTMSbETy+3XyLYzfJcAzc940qtbIQ7iCdt vTlXLQlwjimlccsglLvt7cwtqvKtjfeKsrZ/lsEhPGhqp7DKXMEqUNqspZ+o3rlnLoUVqU obGcq2o7KwjxRtdpnGnFlsk1oW7xMRQL1nSMKTlGVDvZZ6XQRZntaFHpW0oV8nlevavGFP Q85yk18TdqgYlQkYU243k/smKUO26m8W5QiZ89R4ZjH7pvgU7m1cjk+mKhij2e9NG0Vsp9 eq7hJkfAJt9sBsHUwM0NB7rpFUyiJuz7+8Uz4WqifD7qprzE3raYIqfqsBXGYw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674075942; a=rsa-sha256; cv=none; b=E1ILFA/F4jqSjRPfjJrIFL+lRXazih6c3UCe21gppv3+pclgmpOln6pY+P0wmwnVtQuerD 2wbOSBRYaiG0ZyHD4RsK0K5S7OazgaR/fCD+72b0qnJxkLxdRRgfhJkRiBttzj+BubU69x e6HHyIPNVmRrHm+/ZVi7dwPnbhN5TT1G2o8zCYrsxvicIOGpZv9Q/GPRsdaEmHnfUsOc9x Le9xl7DTN4Zaa9+d6g62kg7u5ejKHcAsSgbJIoYKi5E8+lfgRAC1VM/uHSuV4afW86VShO vSec0vHeM3w5X57Tqc7Mm+CKal+KPR8uXVGlLcBtafZhuNR2I6M4NI580MrKuA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Nxyw56hqyzQ6d; Wed, 18 Jan 2023 21:05:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30IL5fns040366; Wed, 18 Jan 2023 21:05:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30IL5fig040365; Wed, 18 Jan 2023 21:05:41 GMT (envelope-from git) Date: Wed, 18 Jan 2023 21:05:41 GMT Message-Id: <202301182105.30IL5fig040365@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Allan Jude Subject: git: fd5e9210598c - main - Add CPU Ident for Qualcomm Kryo 400 (used in MS Dev Kit) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: allanjude X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fd5e9210598cfafbecc05b5ec03da25483833f90 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by allanjude: URL: https://cgit.FreeBSD.org/src/commit/?id=fd5e9210598cfafbecc05b5ec03da25483833f90 commit fd5e9210598cfafbecc05b5ec03da25483833f90 Author: Allan Jude AuthorDate: 2022-12-20 21:31:38 +0000 Commit: Allan Jude CommitDate: 2023-01-18 21:04:49 +0000 Add CPU Ident for Qualcomm Kryo 400 (used in MS Dev Kit) Reviewed by: imp Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D37767 --- sys/arm64/arm64/identcpu.c | 10 +++++++++- sys/arm64/include/cpu.h | 5 +++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/sys/arm64/arm64/identcpu.c b/sys/arm64/arm64/identcpu.c index 4f176ceef0b8..dadb589e9294 100644 --- a/sys/arm64/arm64/identcpu.c +++ b/sys/arm64/arm64/identcpu.c @@ -199,6 +199,7 @@ static const struct cpu_parts cpu_parts_arm[] = { { CPU_PART_NEOVERSE_N1, "Neoverse-N1" }, { CPU_PART_NEOVERSE_N2, "Neoverse-N2" }, { CPU_PART_NEOVERSE_V1, "Neoverse-V1" }, + { CPU_PART_NEOVERSE_V2, "Neoverse-V2" }, CPU_PART_NONE, }; @@ -215,6 +216,13 @@ static const struct cpu_parts cpu_parts_apm[] = { CPU_PART_NONE, }; +/* Qualcomm */ +static const struct cpu_parts cpu_parts_qcom[] = { + { CPU_PART_KRYO400_GOLD, "Kryo 400 Gold" }, + { CPU_PART_KRYO400_SILVER, "Kryo 400 Silver" }, + CPU_PART_NONE, +}; + /* Unknown */ static const struct cpu_parts cpu_parts_none[] = { CPU_PART_NONE, @@ -237,7 +245,7 @@ const struct cpu_implementers cpu_implementers[] = { { CPU_IMPL_INTEL, "Intel", cpu_parts_none }, { CPU_IMPL_MARVELL, "Marvell", cpu_parts_none }, { CPU_IMPL_NVIDIA, "NVIDIA", cpu_parts_none }, - { CPU_IMPL_QUALCOMM, "Qualcomm", cpu_parts_none }, + { CPU_IMPL_QUALCOMM, "Qualcomm", cpu_parts_qcom }, CPU_IMPLEMENTER_NONE, }; diff --git a/sys/arm64/include/cpu.h b/sys/arm64/include/cpu.h index 2318c9d54cf3..280a759a4f06 100644 --- a/sys/arm64/include/cpu.h +++ b/sys/arm64/include/cpu.h @@ -111,6 +111,7 @@ #define CPU_PART_CORTEX_X1C 0xD4C #define CPU_PART_CORTEX_A715 0xD4D #define CPU_PART_CORTEX_X3 0xD4E +#define CPU_PART_NEOVERSE_V2 0xD4F /* Cavium Part numbers */ #define CPU_PART_THUNDERX 0x0A1 @@ -126,6 +127,10 @@ /* APM / Ampere Part Number */ #define CPU_PART_EMAG8180 0x000 +/* Qualcomm */ +#define CPU_PART_KRYO400_GOLD 0x804 +#define CPU_PART_KRYO400_SILVER 0x805 + #define CPU_IMPL(midr) (((midr) >> 24) & 0xff) #define CPU_PART(midr) (((midr) >> 4) & 0xfff) #define CPU_VAR(midr) (((midr) >> 20) & 0xf) From nobody Wed Jan 18 21:10:50 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Nxz254ZDHz2t1Cb for ; Wed, 18 Jan 2023 21:10:53 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (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 "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Nxz252V47z43cw for ; Wed, 18 Jan 2023 21:10:53 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f50.google.com with SMTP id c4-20020a1c3504000000b003d9e2f72093so2301282wma.1 for ; Wed, 18 Jan 2023 13:10:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=dqJtMbgcnlhC67gdMHi6/DpMdEHJ1ZMQzd8tUX7uL0o=; b=56cEyIT9cFSQLEOG8Phupvtw1gr+iZtESpp9JPPeZTRyEbiTjd+0beQzhQRBlF55R+ DoqkBdSKBvbjvY/lDEej3QKkxyOhMo50up2ygWy7HeBO9v7anQVUm4fE7iz00yum7gze zxSlzq89FSZln8SO709JVapQCHOZBrXs5BX97XUAWIM5dd3ds55WwUPKcUhElLQ7X1fL VkBcgXFrCV1Tsnd1Ya48ArxR4NYyrqmeFsRI8UbF4xgFCO0nCgAhdJ4TvWdDHP05QbGj 1/lVLq9KKYN1OBYsRM0cklSeSzwZlbyof6Do/OVGf4b+GmtnMiVe5bQzsopM4nZDr9ew KJCw== X-Gm-Message-State: AFqh2kpC2OjktnxvFhbPWZfktjsBn0ojC3DYFAbipatkuteU3xxh8r/q WGpq/xnTD3RLKsu7iv54CBxDfJL2alsNashqTfY= X-Google-Smtp-Source: AMrXdXuKgTh84/ukYhiXJhBwtTLQ7Xg9bt5mlnudCCfgYDE73V1o3OgtkRlQRw9k2TMlF8Qro94qlA== X-Received: by 2002:a05:600c:3ac8:b0:3da:f67c:aca6 with SMTP id d8-20020a05600c3ac800b003daf67caca6mr7983411wms.34.1674076251503; Wed, 18 Jan 2023 13:10:51 -0800 (PST) Received: from smtpclient.apple (global-5-143.n-2.net.cam.ac.uk. [131.111.5.143]) by smtp.gmail.com with ESMTPSA id hu29-20020a05600ca29d00b003db0f4e12c8sm2704739wmb.34.2023.01.18.13.10.50 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Jan 2023 13:10:51 -0800 (PST) Content-Type: text/plain; charset=us-ascii List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: git: fd5e9210598c - main - Add CPU Ident for Qualcomm Kryo 400 (used in MS Dev Kit) From: Jessica Clarke In-Reply-To: <202301182105.30IL5fig040365@gitrepo.freebsd.org> Date: Wed, 18 Jan 2023 21:10:50 +0000 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <85B5BFC4-C076-4959-B214-1ECA1975CA6D@freebsd.org> References: <202301182105.30IL5fig040365@gitrepo.freebsd.org> To: Allan Jude X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Rspamd-Queue-Id: 4Nxz252V47z43cw X-Spamd-Bar: ---- 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-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 18 Jan 2023, at 21:05, Allan Jude wrote: >=20 > The branch main has been updated by allanjude: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Dfd5e9210598cfafbecc05b5ec03da254= 83833f90 >=20 > commit fd5e9210598cfafbecc05b5ec03da25483833f90 > Author: Allan Jude > AuthorDate: 2022-12-20 21:31:38 +0000 > Commit: Allan Jude > CommitDate: 2023-01-18 21:04:49 +0000 >=20 > Add CPU Ident for Qualcomm Kryo 400 (used in MS Dev Kit) >=20 > Reviewed by: imp > Sponsored by: Klara, Inc. > Differential Revision: https://reviews.freebsd.org/D37767 > --- > sys/arm64/arm64/identcpu.c | 10 +++++++++- > sys/arm64/include/cpu.h | 5 +++++ > 2 files changed, 14 insertions(+), 1 deletion(-) >=20 > diff --git a/sys/arm64/arm64/identcpu.c b/sys/arm64/arm64/identcpu.c > index 4f176ceef0b8..dadb589e9294 100644 > --- a/sys/arm64/arm64/identcpu.c > +++ b/sys/arm64/arm64/identcpu.c > @@ -199,6 +199,7 @@ static const struct cpu_parts cpu_parts_arm[] =3D = { > { CPU_PART_NEOVERSE_N1, "Neoverse-N1" }, > { CPU_PART_NEOVERSE_N2, "Neoverse-N2" }, > { CPU_PART_NEOVERSE_V1, "Neoverse-V1" }, > + { CPU_PART_NEOVERSE_V2, "Neoverse-V2" }, This (and the #define) isn't for a Qualcomm core... Jess > CPU_PART_NONE, > }; >=20 > @@ -215,6 +216,13 @@ static const struct cpu_parts cpu_parts_apm[] =3D = { > CPU_PART_NONE, > }; >=20 > +/* Qualcomm */ > +static const struct cpu_parts cpu_parts_qcom[] =3D { > + { CPU_PART_KRYO400_GOLD, "Kryo 400 Gold" }, > + { CPU_PART_KRYO400_SILVER, "Kryo 400 Silver" }, > + CPU_PART_NONE, > +}; > + > /* Unknown */ > static const struct cpu_parts cpu_parts_none[] =3D { > CPU_PART_NONE, > @@ -237,7 +245,7 @@ const struct cpu_implementers cpu_implementers[] =3D= { > { CPU_IMPL_INTEL, "Intel", cpu_parts_none }, > { CPU_IMPL_MARVELL, "Marvell", cpu_parts_none }, > { CPU_IMPL_NVIDIA, "NVIDIA", cpu_parts_none }, > - { CPU_IMPL_QUALCOMM, "Qualcomm", cpu_parts_none }, > + { CPU_IMPL_QUALCOMM, "Qualcomm", cpu_parts_qcom }, > CPU_IMPLEMENTER_NONE, > }; >=20 > diff --git a/sys/arm64/include/cpu.h b/sys/arm64/include/cpu.h > index 2318c9d54cf3..280a759a4f06 100644 > --- a/sys/arm64/include/cpu.h > +++ b/sys/arm64/include/cpu.h > @@ -111,6 +111,7 @@ > #define CPU_PART_CORTEX_X1C 0xD4C > #define CPU_PART_CORTEX_A715 0xD4D > #define CPU_PART_CORTEX_X3 0xD4E > +#define CPU_PART_NEOVERSE_V2 0xD4F >=20 > /* Cavium Part numbers */ > #define CPU_PART_THUNDERX 0x0A1 > @@ -126,6 +127,10 @@ > /* APM / Ampere Part Number */ > #define CPU_PART_EMAG8180 0x000 >=20 > +/* Qualcomm */ > +#define CPU_PART_KRYO400_GOLD 0x804 > +#define CPU_PART_KRYO400_SILVER 0x805 > + > #define CPU_IMPL(midr) (((midr) >> 24) & 0xff) > #define CPU_PART(midr) (((midr) >> 4) & 0xfff) > #define CPU_VAR(midr) (((midr) >> 20) & 0xf) From nobody Wed Jan 18 21:19:02 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NxzCV5NTTz2t23Y; Wed, 18 Jan 2023 21:19: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NxzCV4vGXz44qF; Wed, 18 Jan 2023 21:19:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674076742; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U/k6hEkQcS3omuM8JcgCek6q6E9BV9pJwCbTb3yuXEo=; b=QgqeSHlovzvRZhx7MjjviXci+h/ghH0uq5vLuJl41pcGzNnOzMqTut6bkdlvplnkzyzKmY C4U9+1s6eNvDvH1ua/51dSuCqh/LvmFoER8jbMr+lmSGhp2/FPj4mtNpJh5XghTvYug6FI zqbzuqjOS0a4HCs+b8GCPOgrr+Ucxil1E6qinj73uzJy94QJsXzDiliZcsVw74JLd01K3r XU/QMlMyVck9oUke4f1f811t2+szIOcLDfJ88AvQ9q0XpIgOrVZQBPBEd4zHqB3viwqa3J vbtfMHP7DchbaFit1PnQtFd+Pv7/sdkxah74afFXG6zbLIjZCVVGomXM/IbAmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674076742; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U/k6hEkQcS3omuM8JcgCek6q6E9BV9pJwCbTb3yuXEo=; b=xlinOR9TQix56UY609dc47rw1Rp2WcgE/q+oRsdDsCT5q5b+K7xHE6K2uqljyDnSDaEkxr CS3cF8s3mlpq7OmN8lKEdSd7E5he9qItA6si0qO3CXUthszLdLdMADXUMQiL46L9vbN8AQ SwBf6/U7IYK/r5mjDzBNxGTAummKEXpQH6smxryk92DzEj793drBOi/sPHdp/z62pns6F7 a53ya7LhsBTBD8cBB5i8hvLwygvdoGJh6f+fBmx5FFbApGgcxzRh9x8WslP7B8EER+ldin pOjDQd/03KQXYJK9xYZY54C0Zepbp9efFMmCEeCjX+S7rTMxXZiUgeRB2JG01Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674076742; a=rsa-sha256; cv=none; b=UIsr7bEfHXn8xysXv0GPGAKSFo/dWTKSLKqcRWX3fBikgQvGCnbUNu+V0tfg4bTpsqDXTg DLB8DW/ChqO4P+7sNYpSNgt5Wn5YtSxHpsu8apDcM+tgMOFpDlDI7A9NP147wWtUufrpe6 e6rRNhaN/ZRVDnv0BmiUR9F+pk5kdjUkfx8Fh57t5XsPVtrWN0xA7UPW+XkB1rV+l3+sX/ VQwDNDQqtGQaSWwdy+LOD0JT49BL57h1zqBvdk9X53r3u5QzXQV47xAP3jR18NtSi8Kwr0 r39+DVgcHPHxlCtQM099sBquDStgNvXU+KMZUVFR0DSCi4/yQ/NETu6VPC8x5w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NxzCV3xN2zQhF; Wed, 18 Jan 2023 21:19:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30ILJ2AW055115; Wed, 18 Jan 2023 21:19:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30ILJ2cw055114; Wed, 18 Jan 2023 21:19:02 GMT (envelope-from git) Date: Wed, 18 Jan 2023 21:19:02 GMT Message-Id: <202301182119.30ILJ2cw055114@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: eac971545baa - main - if_ipsec(4): protect against user supplying unknown address family List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: eac971545baa3857903e0107439f00d8438c5847 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=eac971545baa3857903e0107439f00d8438c5847 commit eac971545baa3857903e0107439f00d8438c5847 Author: Konstantin Belousov AuthorDate: 2023-01-17 01:37:45 +0000 Commit: Konstantin Belousov CommitDate: 2023-01-18 21:18:39 +0000 if_ipsec(4): protect against user supplying unknown address family Reviewed by: ae, hselasky Sponsored by: NVIDIA Networking MFC after: 1 week Differential revision: https://reviews.freebsd.org/D38093 --- sys/net/if_ipsec.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/sys/net/if_ipsec.c b/sys/net/if_ipsec.c index b170ac177a64..3952b5edb681 100644 --- a/sys/net/if_ipsec.c +++ b/sys/net/if_ipsec.c @@ -813,13 +813,17 @@ ipsec_srcaddr(void *arg __unused, const struct sockaddr *sa, { struct ipsec_softc *sc; struct secasindex *saidx; + struct ipsec_iflist *iflist; /* Check that VNET is ready */ if (V_ipsec_idhtbl == NULL) return; NET_EPOCH_ASSERT(); - CK_LIST_FOREACH(sc, ipsec_srchash(sa), srchash) { + iflist = ipsec_srchash(sa); + if (iflist == NULL) + return; + CK_LIST_FOREACH(sc, iflist, srchash) { if (sc->family == 0) continue; saidx = ipsec_getsaidx(sc, IPSEC_DIR_OUTBOUND, sa->sa_family); @@ -1015,12 +1019,18 @@ ipsec_set_tunnel(struct ipsec_softc *sc, struct sockaddr *src, struct sockaddr *dst, uint32_t reqid) { struct epoch_tracker et; + struct ipsec_iflist *iflist; struct secpolicy *sp[IPSEC_SPCOUNT]; int i; sx_assert(&ipsec_ioctl_sx, SA_XLOCKED); /* Allocate SP with new addresses. */ + iflist = ipsec_srchash(src); + if (iflist == NULL) { + sc->ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + return (EAFNOSUPPORT); + } if (ipsec_newpolicies(sc, sp, src, dst, reqid) == 0) { /* Add new policies to SPDB */ if (key_register_ifnet(sp, IPSEC_SPCOUNT) != 0) { @@ -1033,7 +1043,7 @@ ipsec_set_tunnel(struct ipsec_softc *sc, struct sockaddr *src, for (i = 0; i < IPSEC_SPCOUNT; i++) sc->sp[i] = sp[i]; sc->family = src->sa_family; - CK_LIST_INSERT_HEAD(ipsec_srchash(src), sc, srchash); + CK_LIST_INSERT_HEAD(iflist, sc, srchash); } else { sc->ifp->if_drv_flags &= ~IFF_DRV_RUNNING; return (ENOMEM); From nobody Wed Jan 18 21:20:24 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NxzF52G1kz2t2Hc; Wed, 18 Jan 2023 21:20: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NxzF51QJgz45SG; Wed, 18 Jan 2023 21:20:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674076825; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=niM/hyAWbme3ihsBSHxqWvN2lsTHagrnuBylqNfKag4=; b=GuWM1JgCzZdQB2/X9al4/oJXjOK00OHHr9jm3BkPHlDZ9rEoq7JQtVy3k+DOuMNZVZ6esm woUK3U9KWeNTHwRkMbiS6W+D8kOQNsQ3Mxl0lHyNQvv2xu8OIFZ2iIhkerYnIs55r6T1rQ usEUMU1cmEfVjJJ4ZqXdFUO8NeXf9XxIjUyI6/Yc4ANppLCUxtF09uvbuQ+68qf7tlZGoC BdVK/EDkrfl3sVL5Y3zJpmG1+M8GaX3VEXPlictgfpnT3a7bSJIZn1aH5zlwtu/oKA2QZn 1lbAVC6VXEDuDy9tZ0x8MU+fUHAB4B84Z7J3z0G1vekLGbMjoigsyNV2xy+ozQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674076825; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=niM/hyAWbme3ihsBSHxqWvN2lsTHagrnuBylqNfKag4=; b=ogIMRPQ4L6admDTo+n8OgfcjWWnx6Rx3tt1YNtwt7zOsJGt3a5OK6E8aSU6ActhhLk0y0n gxxAs0sLnuya4Iu89iphzYS7N5CY9/on7LReyR5SPsN8x4Efj+re5p2dADmxSFH76NRy0b YsnwHL/7JfsQbdpCKRWJ13rh/rg3wKMnKOUjf4Ld+X2Iw6s9gCcZ9s8uASNvGsRJXBZGvw goWY7fJzJTu72ToVvNlI45M5c9Bn7S+hCyt+o2b+kR64BMN/sLuK6/IhnkLUIu7AzIhC61 C9S+TrxM4+olHiCQnMt5azteY691LflL6lyFZ6u4Wmci9Tuj0r+2t1FSJBmWZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674076825; a=rsa-sha256; cv=none; b=EMn4f/ikDiTTHKcW7UVh/1xDYLwd84/ppb4Li/XogZD0+blhmuF6RGLoKEdvQqDhyoToL5 +EpkMUb0EwRGcasnEueLKMBZhVzbS2HV039Ro0QKT6K0XMe5xGcKuK9NfHmnbRcPv3LMNT J27n1OM+x14zsrZTzLEkxAf17DMW+w6JA5jVw39fbr/tZ7jsk7ROMkrrkBrlkp44u2xR5L YbtitirjBq5GSl9qpMVzL2XRD0jQUUa+l3ikc+9sF70aEVfr7zss9xG1lHlh3sKdgKUbtc YTzeCQkbBIiI1d6p0z2K6qtL/bxUAQBsl1SqfEJ+Pt6OoXD/5ouW0BRkaFf36w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NxzF50T5szR46; Wed, 18 Jan 2023 21:20:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30ILKOJP063784; Wed, 18 Jan 2023 21:20:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30ILKOqS063783; Wed, 18 Jan 2023 21:20:24 GMT (envelope-from git) Date: Wed, 18 Jan 2023 21:20:24 GMT Message-Id: <202301182120.30ILKOqS063783@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: b1d10b49e24a - main - if_ipsec(4): handle situations where there are no policy or SADB entry for if List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: b1d10b49e24a4fd3af80f8491cd95bd0766ca1f1 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b1d10b49e24a4fd3af80f8491cd95bd0766ca1f1 commit b1d10b49e24a4fd3af80f8491cd95bd0766ca1f1 Author: Konstantin Belousov AuthorDate: 2023-01-17 01:59:56 +0000 Commit: Konstantin Belousov CommitDate: 2023-01-18 21:18:39 +0000 if_ipsec(4): handle situations where there are no policy or SADB entry for if Reviewed by: ae, hselasky Sponsored by: NVIDIA Networking MFC after: 1 week Differential revision: https://reviews.freebsd.org/D38093 --- sys/net/if_ipsec.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/net/if_ipsec.c b/sys/net/if_ipsec.c index 3952b5edb681..a2f690b4cffb 100644 --- a/sys/net/if_ipsec.c +++ b/sys/net/if_ipsec.c @@ -666,6 +666,10 @@ ipsec_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) break; } saidx = ipsec_getsaidx(sc, IPSEC_DIR_OUTBOUND, sc->family); + if (saidx == NULL) { + error = ENXIO; + break; + } switch (cmd) { #ifdef INET case SIOCGIFPSRCADDR: @@ -783,6 +787,8 @@ ipsec_set_running(struct ipsec_softc *sc) int localip; saidx = ipsec_getsaidx(sc, IPSEC_DIR_OUTBOUND, sc->family); + if (saidx == NULL) + return; localip = 0; switch (sc->family) { #ifdef INET From nobody Wed Jan 18 21:23:46 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NxzJz0pHWz2t2tD; Wed, 18 Jan 2023 21: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NxzJz0Grjz45yw; Wed, 18 Jan 2023 21: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=1674077027; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0P9lShW6HGboYSyKWqZKSex4U7BjP1OZ7ZfGdqaNIbs=; b=DYKRiRCKPqqHVvKfUpoT6ZunpVobsX5Rjlm9liiKPbjrMdFVdGm/2vz31h8EpQ16FLTHPq FnopSx9g5r9kIzqs5RvDqjXD5bOQApTFWIMBs8c60x43XbI50x+6cfveMUmHDHe3gD6rPA N8p4dpi17RKPUJADyNRLOqUyrlM+TmOzCmdZvAQ8SEQvqJNei40nr3CQ5Ieg5U2it8Ymao vVqKR4Xh2br3CUkX6jBaRk0jldwsnyOdbUB+eMgbWFhdikGgeOFjcZQ+yI3mH6Jp/HnOyv DIoTwH1/ZoHNVbcbKCoWZwrSjAU37nwHoGFZ2NJv+jKDOQSKBMJe3lxnBn3R7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674077027; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0P9lShW6HGboYSyKWqZKSex4U7BjP1OZ7ZfGdqaNIbs=; b=qU0IUQSW5IU4jOrv2IGr9HA1AaoXmRjS0eDRbQ/jQDofwNjhtOWqH7v+85evOP9X+278uY 8zoxz0ZAN7Q2ThoBb5a0dVCgr45Vwgm1WQz0KspaF8fRHzwuKkDNHpBPjnXpHxcdPHwJJV s+RUcdkherXrqoN5CEc5LTGpz6l82ep4NZATS81lWl2hrSpYqoiQNwi0OYPlhsvdzF1C0+ Q0h7G1EB0LiyWE494AMfEJvwAVhNmOVKAHrGR9NbX1WoVrlxyB176feDnoaYaU03z3WwUA krzAPN+a8pX6IK/+3iVxhpdgHtAOgyXAEyGViL9nc68EPqvUyr7SBJDJpXI2dg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674077027; a=rsa-sha256; cv=none; b=OpJ6a9CouyfhOW1Sc0sTiMFgpv59PnSH9fMou3iTAwU1BBtYs/M+HqlCrW+LAQ6KrBkfNi 3EFw+nh7ULc227kgndIdlQiLcfIpfJQ7K5O6no3pTiNXTG7yhMHtepYnyuCYtbn3Eeqx6g SUidlj5RHgEvx0Y/Gs6IMTDPjy8vMJ/n1eJAUgmOa4+Pg6XsaGzMcECcDoFvqc5FtCtK+2 0oARFqZrkv7gFLuLhuOShqFs7farU6eeGcSLbap9Zqr3l8tEKNVPlW/yh0IVwl6PS6W2ti E2cHrERqyC2/ITRPUoZjXzmoRgTVHQ2Hr4jPw2qZxBCRoFAYKQ88bl+V1Xgq4g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NxzJy6S3CzQyn; Wed, 18 Jan 2023 21:23:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30ILNks5069238; Wed, 18 Jan 2023 21:23:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30ILNk7g069237; Wed, 18 Jan 2023 21:23:46 GMT (envelope-from git) Date: Wed, 18 Jan 2023 21:23:46 GMT Message-Id: <202301182123.30ILNk7g069237@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: 424f1296bd73 - main - ipsec.c: typos in 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 424f1296bd73f2661b556ddfdfb4bcc8f9df898a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=424f1296bd73f2661b556ddfdfb4bcc8f9df898a commit 424f1296bd73f2661b556ddfdfb4bcc8f9df898a Author: Konstantin Belousov AuthorDate: 2021-09-04 13:42:33 +0000 Commit: Konstantin Belousov CommitDate: 2023-01-18 21:22:35 +0000 ipsec.c: typos in the comment Sponsored by: NVIDIA Networking MFC after: 3 days --- sys/netipsec/ipsec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netipsec/ipsec.c b/sys/netipsec/ipsec.c index 94eb68658e30..08a226b1123a 100644 --- a/sys/netipsec/ipsec.c +++ b/sys/netipsec/ipsec.c @@ -1011,7 +1011,7 @@ ipsec_check_history(const struct mbuf *m, struct secpolicy *sp, u_int idx) /* * Check security policy requirements against the actual * packet contents. Return one if the packet should be - * reject as "invalid"; otherwiser return zero to have the + * rejected as "invalid"; otherwise return zero to have the * packet treated as "valid". * * OUT: From nobody Wed Jan 18 22:07:16 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ny0H84Lktz2t8mM; Wed, 18 Jan 2023 22:07:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ny0H83jjKz4CWF; Wed, 18 Jan 2023 22:07:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674079636; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z8EKZs65nn9BJljAEx8MxI/21hmwZ2rRKIls7YvsFe8=; b=jofMpkCcAvzVHvSwSUFDCICFrVyJ2QhiCX5tLQwTLvNkSNF7fBQb0tUEZuJRVOQXr+dBSa z7ghQWvDktHqW9MYjaYrQFauoZbm92o+YWKpa3I5T+TsjcvgCgbOlHeJYbM8wvZectbj8G AwG0PdgulWsLNXBke3bCuWeX2201SeE0NmxrS6pCRGQxyX5KNiCQSoVF2OIwiIhHs8R5VL EcRPGC9/PTXq+DcbhLy++OdtjOGBOPNZZQKNek+hqtVfFu43e6dl+LkwRsrUtIYBWgNmvH hBMZJ2Ho0DRqf8xISZZroq9vKELMFabDcQm4rv4eX/EkKamh2yKnOfgyjW31Gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674079636; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z8EKZs65nn9BJljAEx8MxI/21hmwZ2rRKIls7YvsFe8=; b=dnnDcr46pGGyWwWqj/w0D6AY0BxFmjJur7S1ghGuct9Wy7cF2+wrtnjdddlABQ+UXU/I2R qgfrBBDnFPDmf2b9ZQ8sY4g5VEXDd470q60j+pFFuca+U73/0epeXmpHGTYQ3t6QRQAjLo 2zeInqBN8Kwml+jSSGSzWQTlT3sYguLIF61xdAIIkVrA3noh2+R1ng0QosWNqElMxV5Tbn Hh0v9bX+wvK4mTCnDhXFM4LwAT3XqQ2eZcXpv0CkkPgxAzTSFXvbOxZE8fySkFTwM+Jbi2 rXoFoinm7Lq6/PfAqCjUC5ne9Bd21bWaVGlhrJeMHTfhN79kPx2D07BbjBAkhg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674079636; a=rsa-sha256; cv=none; b=A5MH6jOj9LXQE3KGdwHtbCJG62rZ9FqCyPmoPsaa8wNUqy+1kiRaKS5iUcQAE+2dgKh5eF Jiwyu3Ztos2cYsiARXiRztcItSwsdf/71w1ymyaydTLvWAW/5+ut/osPT0ool7EfA9sB34 s4fY29gr1cnO9a/mUyWWWH0j+r0fNAM+/WubJbEJYFybK6sLRKqA8P0OQYq0wmvpgda/j5 ZJKfhN17B9K52fvsntBRAFVmMyAqsWJ3j65vQx7/c6U1/OEMt5LT3KYvj6htE09kZXKTX9 wxljlJvyJiEcDWm2HNFWlXSfeDRAgZS7oSl7Hncl2Ru9POper8nJXtb9Kr3wsw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ny0H82m8WzRj3; Wed, 18 Jan 2023 22:07:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30IM7Gea027365; Wed, 18 Jan 2023 22:07:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30IM7Gvf027364; Wed, 18 Jan 2023 22:07:16 GMT (envelope-from git) Date: Wed, 18 Jan 2023 22:07:16 GMT Message-Id: <202301182207.30IM7Gvf027364@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: bb651c77f5f7 - main - linuxkpi: Define `hrtimer_try_to_cancel()` List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bb651c77f5f71a38dd90b2eee214e7a2224421a7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=bb651c77f5f71a38dd90b2eee214e7a2224421a7 commit bb651c77f5f71a38dd90b2eee214e7a2224421a7 Author: Jean-Sébastien Pédron AuthorDate: 2023-01-11 01:00:57 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-01-18 22:02:24 +0000 linuxkpi: Define `hrtimer_try_to_cancel()` It is the same as callout_stop(9) but the return values are different. Reviewed by: hselasky Approved by: hselasky Differential Revision: https://reviews.freebsd.org/D38081 --- sys/compat/linuxkpi/common/include/linux/hrtimer.h | 2 ++ sys/compat/linuxkpi/common/src/linux_hrtimer.c | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/hrtimer.h b/sys/compat/linuxkpi/common/include/linux/hrtimer.h index 23e707d906b4..4a63db80cc12 100644 --- a/sys/compat/linuxkpi/common/include/linux/hrtimer.h +++ b/sys/compat/linuxkpi/common/include/linux/hrtimer.h @@ -53,6 +53,7 @@ struct hrtimer { }; #define hrtimer_active(hrtimer) linux_hrtimer_active(hrtimer) +#define hrtimer_try_to_cancel(hrtimer) linux_hrtimer_try_to_cancel(hrtimer) #define hrtimer_cancel(hrtimer) linux_hrtimer_cancel(hrtimer) #define hrtimer_init(hrtimer, clock, mode) do { \ @@ -79,6 +80,7 @@ struct hrtimer { } while (0) bool linux_hrtimer_active(struct hrtimer *); +int linux_hrtimer_try_to_cancel(struct hrtimer *); int linux_hrtimer_cancel(struct hrtimer *); void linux_hrtimer_init(struct hrtimer *); void linux_hrtimer_set_expires(struct hrtimer *, ktime_t); diff --git a/sys/compat/linuxkpi/common/src/linux_hrtimer.c b/sys/compat/linuxkpi/common/src/linux_hrtimer.c index a56485512a14..5d9b376f9561 100644 --- a/sys/compat/linuxkpi/common/src/linux_hrtimer.c +++ b/sys/compat/linuxkpi/common/src/linux_hrtimer.c @@ -65,6 +65,28 @@ linux_hrtimer_active(struct hrtimer *hrtimer) return (ret); } +/* + * Try to cancel active hrtimer. + * Return 1 if timer was active and cancellation succeeded, 0 if timer was + * inactive, or -1 if the timer is being serviced and can't be cancelled. + */ +int +linux_hrtimer_try_to_cancel(struct hrtimer *hrtimer) +{ + int ret; + + mtx_lock(&hrtimer->mtx); + ret = callout_stop(&hrtimer->callout); + mtx_unlock(&hrtimer->mtx); + if (ret > 0) { + return (1); + } else if (ret < 0) { + return (0); + } else { + return (-1); + } +} + /* * Cancel active hrtimer. * Return 1 if timer was active and cancellation succeeded, or 0 otherwise. From nobody Wed Jan 18 22:07:47 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ny0Hn0hHbz2t91f; Wed, 18 Jan 2023 22:07:49 +0000 (UTC) (envelope-from mhorne@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ny0Hm6LrJz4D8K; Wed, 18 Jan 2023 22:07:48 +0000 (UTC) (envelope-from mhorne@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674079668; h=from:from:reply-to:subject: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=0z39l9jrtcycb1/9hiFXgdt3zQYtY7X/ARSg0z5ZDX8=; b=t/I7k8GWakr6ynZO5W8pipe3W8lEAAWVBEjGeBZi9zXCc0xoQTFHMfJiY6atTYAHrJFhsU qw2CuLvS+jjICjX2VVLBdchBCVeVMR4CtOA7AnAt/Wc1RLYobXAqbArBUpqxAHBwSUis22 Xi11dBEIM3DnhKj6xdTM3ZelqIPWXFGu4NqNbJ7TGei4NGmGFE3ohG/CiFRhuBxyn6yTjt gDcztNWWoRCPKQOBrqit6FQKkTuomJn66iyETwRIgGJZcdolxV2l+pDwzk79IbBNxbAdkU 5u1+AJ6jiJQROLkBHY8nQshVr610F4b8e971xsca1xRjiIARY3Hz0SR72VfASw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674079668; h=from:from:reply-to:subject: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=0z39l9jrtcycb1/9hiFXgdt3zQYtY7X/ARSg0z5ZDX8=; b=XFtUW59m2YLTAPeki85/kaedcYzEIsn7Gxeg44nG2FcONJ+3X3+TsWnnxYH07QLMcGj8oV IAgsHPi+FJTsioLoaQEDkckohYcPAnWDc2UYY8beCfScABKmHxKBiywCb/yWQeIzYWFg+l brQloe4f/IbDjFCyqTkN0Hl8S8cy+Fx0t/qA2Dun84WLuxrpB+1DNdp9R2WGie07hzgbXm FEILuQVqMBtoyDDp13AM8wc8pkuBZ4Zp400Oh9VsB/Th41dKPliRaJ1mre1I40vth3O/vJ pMTjeLaqRwJ+zizEZmbn5HTiox4/nr+44vlWx4y1vVY5caT8xHG10RluB5Nnxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674079668; a=rsa-sha256; cv=none; b=pGBMyNztWVbkjE8EytSydyOWP0H8/+30woJeE6abBzM+VOISlgUfD+jtGgrGJb46ntvoUB 7HwMNuLY9W4FDS3JGgVqc4CNttLdZMuk5t/Z/goBY/3QD6eiX+CC9TG06jxyAHrv3P3YVz /zCVGRMQ1Bhym2A8BKNBnLNJljX7XdKLFTjIZmaG2yZZnJXXI1ayuvIljQOi3jYeHFwCM5 axrMOogg93CN3O03jAVQjq29/FNK8mL9h3oTcxYA2MZwqeCBVhA7W0IVBGFl7acScrKVqJ 6WugtkPMSapm+GB61BzCl/YUs0jKehFbkGguphx4ky0qTZKX+Zzhk5HYeJ5m2g== Received: from [192.168.1.151] (host-173-212-76-127.public.eastlink.ca [173.212.76.127]) (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: mhorne) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Ny0Hm3WrDzSt9; Wed, 18 Jan 2023 22:07:48 +0000 (UTC) (envelope-from mhorne@freebsd.org) Message-ID: Date: Wed, 18 Jan 2023 18:07:47 -0400 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: git: b75062f23431 - main - riscv: Fix thread0.td_kstack_pages init Content-Language: en-CA To: Brooks Davis , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202301171638.30HGcP3C091184@gitrepo.freebsd.org> From: Mitchell Horne In-Reply-To: <202301171638.30HGcP3C091184@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ThisMailContainsUnwantedMimeParts: N On 1/17/23 12:38, Brooks Davis wrote: > The branch main has been updated by brooks: > > URL: https://cgit.FreeBSD.org/src/commit/?id=b75062f23431fbabef1e7d665cae270b144f71b1 > > commit b75062f23431fbabef1e7d665cae270b144f71b1 > Author: Brooks Davis > AuthorDate: 2023-01-17 16:36:15 +0000 > Commit: Brooks Davis > CommitDate: 2023-01-17 16:37:42 +0000 > > riscv: Fix thread0.td_kstack_pages init > > Commit 0ef3ca7ae37c70e9dc83475dc2e68e98e1c2a418 initialized > thread0.td_kstack_pages to KSTACK_PAGES. Due to the lack of an > include of opt_kstack_pages.h it used the fallback value of 4 from > machine/param.h. Does this mean that we could/should include opt_kstack_pages.h within machine/param.h (under #ifdef _KERNEL)? This header is both a consumer and provider of the KSTACK_PAGES definition, by virtue of the #ifndef. I think the hidden dependency should be avoided, if possible. Of course, the problem at hand has been fixed and we want to keep direct consumers of KSTACK_PAGES to a minimum, but I think the point still stands. Mitchell > This meant that increasing KSTACK_PAGES in the kernel > config resulted in a panic in _epoch_enter_preempt as the following > assertion was false during network stack setup: > > MPASS((vm_offset_t)et >= td->td_kstack && > (vm_offset_t)et + sizeof(struct epoch_tracker) <= > td->td_kstack + td->td_kstack_pages * PAGE_SIZE); > > Switch to initializing with kstack_pages following other architectures. > > Reviewed by: imp, markj > Sponsored by: DARPA, AFRL > Differential Revision: https://reviews.freebsd.org/D38049 > --- > sys/riscv/riscv/machdep.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/sys/riscv/riscv/machdep.c b/sys/riscv/riscv/machdep.c > index b03d45b018ec..0821a29d11c1 100644 > --- a/sys/riscv/riscv/machdep.c > +++ b/sys/riscv/riscv/machdep.c > @@ -291,7 +291,7 @@ init_proc0(vm_offset_t kstack) > > proc_linkup0(&proc0, &thread0); > thread0.td_kstack = kstack; > - thread0.td_kstack_pages = KSTACK_PAGES; > + thread0.td_kstack_pages = kstack_pages; > thread0.td_pcb = (struct pcb *)(thread0.td_kstack + > thread0.td_kstack_pages * PAGE_SIZE) - 1; > thread0.td_pcb->pcb_fpflags = 0; From nobody Wed Jan 18 23:16:02 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ny1pd1SfHz2v2yC; Wed, 18 Jan 2023 23:16:09 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.3 with cipher TLS_AES_256_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 4Ny1pc63KDz4M7b; Wed, 18 Jan 2023 23:16:08 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Authentication-Results: mx1.freebsd.org; none Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id D20B63C0199; Wed, 18 Jan 2023 23:16:02 +0000 (UTC) Date: Wed, 18 Jan 2023 23:16:02 +0000 From: Brooks Davis To: Mitchell Horne Cc: Brooks Davis , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: b75062f23431 - main - riscv: Fix thread0.td_kstack_pages init Message-ID: References: <202301171638.30HGcP3C091184@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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: X-Rspamd-Queue-Id: 4Ny1pc63KDz4M7b X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:36236, ipnet:199.48.128.0/22, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Wed, Jan 18, 2023 at 06:07:47PM -0400, Mitchell Horne wrote: >=20 >=20 > On 1/17/23 12:38, Brooks Davis wrote: > > The branch main has been updated by brooks: > >=20 > > URL: https://cgit.FreeBSD.org/src/commit/?id=3Db75062f23431fbabef1e7d66= 5cae270b144f71b1 > >=20 > > commit b75062f23431fbabef1e7d665cae270b144f71b1 > > Author: Brooks Davis > > AuthorDate: 2023-01-17 16:36:15 +0000 > > Commit: Brooks Davis > > CommitDate: 2023-01-17 16:37:42 +0000 > >=20 > > riscv: Fix thread0.td_kstack_pages init > > =20 > > Commit 0ef3ca7ae37c70e9dc83475dc2e68e98e1c2a418 initialized > > thread0.td_kstack_pages to KSTACK_PAGES. Due to the lack of an > > include of opt_kstack_pages.h it used the fallback value of 4 from > > machine/param.h.=20 >=20 > Does this mean that we could/should include opt_kstack_pages.h within=20 > machine/param.h (under #ifdef _KERNEL)? This header is both a consumer=20 > and provider of the KSTACK_PAGES definition, by virtue of the #ifndef. I= =20 > think the hidden dependency should be avoided, if possible. It's possible we should be doing it in that case, but it's not something we normally do (the only header I can find that does this is sys/terminal.h). If we wanted to do this I'd be tempted to make machine/param.h define some sort of _KSTACK_PAGES_DEFAULT and move the definition of KSTACK_PAGES to sys/param.h. It's a bit unfortunate that the kernel config system means KSTACK_PAGES is only defined if set explicitly and there's no way to tell the opt_ header has been included since it doesn't include guards. -- Brooks From nobody Wed Jan 18 23:39:20 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ny2KP0JNBz2v5JN; Wed, 18 Jan 2023 23:39: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ny2KN6sf7z4Q2r; Wed, 18 Jan 2023 23:39:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674085161; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5hop1fx2g2nGTwOr9tIhtm5QDp1ezkj4qb+oUmDSuN0=; b=XpMwpxpjMIpUe+inF/LbpPcU8qMCibcyFEcrkjLzS4MQB14rpXnxdg2S3Zu27drsm3tCMr Au27fazpidGU26BbElYArnoXokk3X0p43tof0sGM1Dpui61GKBFsihx9vJVB9ioxKy1hBV Tc9wwEuXo6c5WcXvcTgHrPSh9zA24Elxm9O5VoE1eCiwS80r3sy+Zca+DuZJTPyqlxeQFt h1RQh2O+ErgyMjD+36TDvzgNvEOxtQdo9R9zJy6GE2b0FaTmXKBma+eXtako8G8g6ujLqr u6B5g3MFIpqmmGV7irlA+Ybsz7lchEO6AitCYJx3kvLDNC7DgNL53orBgJJ/zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674085161; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5hop1fx2g2nGTwOr9tIhtm5QDp1ezkj4qb+oUmDSuN0=; b=pcFadtb6m7YK9b63ZHyTwqjMrBTSumXfy5CvMuXhUc68wKC9QDZ9U2lyblIttSP9O0ypA4 PLLchgBz3vPjd9/IkerxsUuRSUj9SH8Fbap6VArcBwiBbsq9wh6lEU//ubTHKYLfQKkHdS I5iqTHUHcOiOfdNNEz72TAWmZUcsDgPVHobX0EPUK48w7uWqgFbCVewTy8j8f3BrOrY4vb JjrzDjf/nTjnn5sSYYGzY1+SNIbV+IWyliWnoKxNxx/C1Ffuli5c9Xq27XHGzMtWTtRcSA glmeVMF8Nw8NcZ5SZ7+TZ7Eq12SaQm44EKhjcxrgVi/BbyqlNmYDJdQXRvY3rw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674085161; a=rsa-sha256; cv=none; b=ARmjYCYPB/OWYZHN1wNPKbMEiPpqmyxqWWy0g3oeyhhiBYlAVqhuAFAe/JGXEXoa9LhK7D ANUM+yihRQpV6STgbYYCckGl8aucRB41/NWswd/fjypfwTHN9pr3Y1pkPPny5I0y5njjfh umRN38nLQqhOiGWDG7l2NPkP8Za7kOUPdDXYvl7qBa/68fwqgoeGfc5hy+IxSfLWDCdU4G /W75dzsEAHGgigEhKr06gq0A+RhYIwgVkpU1l6QP2uSVSa87WtyPvdl9bdOGdWtr8zW1hJ tv0SrLuu3Ykjm7dDBZlcveZn83XRusu6yAhzGfts+5QNRKYc8jTJDYCjwR4jmQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ny2KN5v7TzVKr; Wed, 18 Jan 2023 23:39:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30INdKpT056679; Wed, 18 Jan 2023 23:39:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30INdK04056678; Wed, 18 Jan 2023 23:39:20 GMT (envelope-from git) Date: Wed, 18 Jan 2023 23:39:20 GMT Message-Id: <202301182339.30INdK04056678@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: 846e4a206fab - main - ktls_disable_ifnet_help: Set curvnet around sorele(). List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 846e4a206fabf18b7ace01f6a41f65252da3dd95 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=846e4a206fabf18b7ace01f6a41f65252da3dd95 commit 846e4a206fabf18b7ace01f6a41f65252da3dd95 Author: John Baldwin AuthorDate: 2023-01-18 23:39:04 +0000 Commit: John Baldwin CommitDate: 2023-01-18 23:39:04 +0000 ktls_disable_ifnet_help: Set curvnet around sorele(). This is required in kernels with VIMAGE such as GENERIC. MFC after: 1 week Sponsored by: Chelsio Communications --- sys/kern/uipc_ktls.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/kern/uipc_ktls.c b/sys/kern/uipc_ktls.c index 330a7a2dbdcd..ac55268728e9 100644 --- a/sys/kern/uipc_ktls.c +++ b/sys/kern/uipc_ktls.c @@ -3210,7 +3210,9 @@ ktls_disable_ifnet_help(void *context, int pending __unused) } out: + CURVNET_SET(so->so_vnet); sorele(so); + CURVNET_RESTORE(); if (!in_pcbrele_wlocked(inp)) INP_WUNLOCK(inp); ktls_free(tls); From nobody Wed Jan 18 23:53:51 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ny2dx252bz2v6WP for ; Wed, 18 Jan 2023 23:53:41 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ny2dx0Wcmz3Clc for ; Wed, 18 Jan 2023 23:53:41 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-x631.google.com with SMTP id mp20so1417760ejc.7 for ; Wed, 18 Jan 2023 15:53:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=J1NDRvETvwLioi3nQN1oKSQuoOaUSYkmvq1RsNR8k+A=; b=zIyH+WzKoS8il5G8qyGnXIxfog+jKYnHgYxefwiWTEPS4pjkX2Ccn33hjkEuiNSmI3 zq9l+HeEkOUVT9gbK6r0jmvkqU7dHw44QoYG/b+ufXqDuJNic27FQz6P9xuKD4JnsluY TQY1F8o7l5iBV4UVlyx7NYjaeylvC7VPV1VXSlj5IJd8HgGgLl4rgS5vi6uP8yFdtItV +77Ri3MJmtBhE+5IKdM/gb2q7t8Vm4dzy9RDeceDE7oHprDWeouoVq/wAOPyxmUN11nK diw5z7rBxHWpEnRXgG9CEjwZxvDUIZxbLtTQKwEt7UNhPxybLX1iwJ5TC85MMMdzBV7X +quw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=J1NDRvETvwLioi3nQN1oKSQuoOaUSYkmvq1RsNR8k+A=; b=4PtkofFGC39XHSxMmdrNbWsuuCm/5SUTRzqlFF6sdHgrEl3CWbpbuwlg6iP347qJhP /StF99fLvbdET1F6XjM2zib6IQeKDL2p2ZvCL3AM96i0/DXS4JzbtS71xcpR7iu1K3lo MhPd8Cil7p7QU+yNgGQFpvQZCv+cUJTktXcJCwpyeesu66UtQ+pWFyfa4X0v5iCyozbj +CNW77lMkprSFYNHc7CREyFBaAI1qW/+dYLydwTJRmhgd7Sayv94PHKIW3Ememo+mqGN AIQ4/QoeiALmJqaU/tMqiFmR9Bb43IVtLFhABw16DXy25xo0fNS4LyFUEK1y9JmO/gGP I7hw== X-Gm-Message-State: AFqh2kq9Y/0WbhirzSjjghSH3lmKCIB24U1is1SFXVD0gOuI3SZJQamt IDCC9wbJQMGjVynTeHAyVXg4SDI2fHoTqryY2EArzg== X-Google-Smtp-Source: AMrXdXtn/Gmgg/qEecyfteKzkSzUDnE4xd8HV+SnnT/dEls+roXOGRe9yBS6fT1U4651a+Tg5KJOmX1OcYCzNY71sXA= X-Received: by 2002:a17:906:a3c3:b0:870:7c88:466e with SMTP id ca3-20020a170906a3c300b008707c88466emr600413ejb.140.1674086019751; Wed, 18 Jan 2023 15:53:39 -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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <202301171638.30HGcP3C091184@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Wed, 18 Jan 2023 16:53:51 -0700 Message-ID: Subject: Re: git: b75062f23431 - main - riscv: Fix thread0.td_kstack_pages init To: Mitchell Horne Cc: Brooks Davis , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="00000000000087f81c05f292864d" X-Rspamd-Queue-Id: 4Ny2dx0Wcmz3Clc X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --00000000000087f81c05f292864d Content-Type: text/plain; charset="UTF-8" On Wed, Jan 18, 2023 at 3:07 PM Mitchell Horne wrote: > > > On 1/17/23 12:38, Brooks Davis wrote: > > The branch main has been updated by brooks: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=b75062f23431fbabef1e7d665cae270b144f71b1 > > > > commit b75062f23431fbabef1e7d665cae270b144f71b1 > > Author: Brooks Davis > > AuthorDate: 2023-01-17 16:36:15 +0000 > > Commit: Brooks Davis > > CommitDate: 2023-01-17 16:37:42 +0000 > > > > riscv: Fix thread0.td_kstack_pages init > > > > Commit 0ef3ca7ae37c70e9dc83475dc2e68e98e1c2a418 initialized > > thread0.td_kstack_pages to KSTACK_PAGES. Due to the lack of an > > include of opt_kstack_pages.h it used the fallback value of 4 from > > machine/param.h. > > Does this mean that we could/should include opt_kstack_pages.h within > machine/param.h (under #ifdef _KERNEL)? This header is both a consumer > and provider of the KSTACK_PAGES definition, by virtue of the #ifndef. I > think the hidden dependency should be avoided, if possible. > No. Including opt_XXXX.h is never OK in our .h files. They are used in too many places, some of which "cheat" and define _KERNEL becuse, well, they need to get to the kernel bits.... That will break... I do agree, however, that the current interface is less than ideal... > Of course, the problem at hand has been fixed and we want to keep direct > consumers of KSTACK_PAGES to a minimum, but I think the point still stands. > I think it's a good point, but the current way is likely the least-bad way to accomplish things. It would be much better if we could remove it from machine/param.h and opt_XXX.h always defines it, even the default value when it's not otherwise specified. However, we don't (currently) have a way to set default values in config(8). We could add it, since the efforts at config++ have thus far fallen flat.... Warner > Mitchell > > > This meant that increasing KSTACK_PAGES in the kernel > > config resulted in a panic in _epoch_enter_preempt as the following > > assertion was false during network stack setup: > > > > MPASS((vm_offset_t)et >= td->td_kstack && > > (vm_offset_t)et + sizeof(struct epoch_tracker) <= > > td->td_kstack + td->td_kstack_pages * PAGE_SIZE); > > > > Switch to initializing with kstack_pages following other > architectures. > > > > Reviewed by: imp, markj > > Sponsored by: DARPA, AFRL > > Differential Revision: https://reviews.freebsd.org/D38049 > > --- > > sys/riscv/riscv/machdep.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/sys/riscv/riscv/machdep.c b/sys/riscv/riscv/machdep.c > > index b03d45b018ec..0821a29d11c1 100644 > > --- a/sys/riscv/riscv/machdep.c > > +++ b/sys/riscv/riscv/machdep.c > > @@ -291,7 +291,7 @@ init_proc0(vm_offset_t kstack) > > > > proc_linkup0(&proc0, &thread0); > > thread0.td_kstack = kstack; > > - thread0.td_kstack_pages = KSTACK_PAGES; > > + thread0.td_kstack_pages = kstack_pages; > > thread0.td_pcb = (struct pcb *)(thread0.td_kstack + > > thread0.td_kstack_pages * PAGE_SIZE) - 1; > > thread0.td_pcb->pcb_fpflags = 0; > --00000000000087f81c05f292864d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Wed, Jan 18, 2023 at 3:07 PM Mitch= ell Horne <mhorne@freebsd.org&= gt; wrote:


On 1/17/23 12:38, Brooks Davis wrote:
> The branch main has been updated by brooks:
>
> URL: https://= cgit.FreeBSD.org/src/commit/?id=3Db75062f23431fbabef1e7d665cae270b144f71b1<= /a>
>
> commit b75062f23431fbabef1e7d665cae270b144f71b1
> Author:=C2=A0 =C2=A0 =C2=A0Brooks Davis <brooks@FreeBSD.org>
> AuthorDate: 2023-01-17 16:36:15 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0Brooks Davis <brooks@FreeBSD.org>
> CommitDate: 2023-01-17 16:37:42 +0000
>
>=C2=A0 =C2=A0 =C2=A0 riscv: Fix thread0.td_kstack_pages init
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0 Commit 0ef3ca7ae37c70e9dc83475dc2e68e98e1c2a418 in= itialized
>=C2=A0 =C2=A0 =C2=A0 thread0.td_kstack_pages to KSTACK_PAGES.=C2=A0 Due= to the lack of an
>=C2=A0 =C2=A0 =C2=A0 include of opt_kstack_pages.h it used the fallback= value of 4 from
>=C2=A0 =C2=A0 =C2=A0 machine/param.h.

Does this mean that we could/should include opt_kstack_pages.h within
machine/param.h (under #ifdef _KERNEL)? This header is both a consumer
and provider of the KSTACK_PAGES definition, by virtue of the #ifndef. I think the hidden dependency should be avoided, if possible.

No. Including opt_XXXX.h is never OK in our .h files. = They are used in too many places, some of which "cheat" and defin= e _KERNEL becuse, well, they need to get to the kernel bits....=C2=A0 That = will break...

I do agree, however, that the curren= t interface is less than ideal...
=C2=A0
Of course, the problem at hand has been fixed and we want to keep direct consumers of KSTACK_PAGES to a minimum, but I think the point still stands.=

I think it's a good point, but the= current way is likely the least-bad way to accomplish things.
It would be much better if we could remove it from machine/par= am.h and opt_XXX.h always defines it, even the default value when it's = not otherwise specified. However, we don't (currently) have a way to se= t default values in config(8). We could add it, since the efforts at config= ++ have thus far fallen flat....

Warner
=C2=A0
Mitchell

>=C2=A0 =C2=A0 =C2=A0 This meant that increasing KSTACK_PAGES in the ker= nel
>=C2=A0 =C2=A0 =C2=A0 config resulted in a panic in _epoch_enter_preempt= as the following
>=C2=A0 =C2=A0 =C2=A0 assertion was false during network stack setup: >=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 MPASS((vm_offset_t)et = >=3D td->td_kstack &&
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (vm_offs= et_t)et + sizeof(struct epoch_tracker) <=3D
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 td->t= d_kstack + td->td_kstack_pages * PAGE_SIZE);
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0 Switch to initializing with kstack_pages following= other architectures.
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0 Reviewed by:=C2=A0 =C2=A0 imp, markj
>=C2=A0 =C2=A0 =C2=A0 Sponsored by:=C2=A0 =C2=A0DARPA, AFRL
>=C2=A0 =C2=A0 =C2=A0 Differential Revision:=C2=A0
https://revi= ews.freebsd.org/D38049
> ---
>=C2=A0 =C2=A0sys/riscv/riscv/machdep.c | 2 +-
>=C2=A0 =C2=A01 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sys/riscv/riscv/machdep.c b/sys/riscv/riscv/machdep.c
> index b03d45b018ec..0821a29d11c1 100644
> --- a/sys/riscv/riscv/machdep.c
> +++ b/sys/riscv/riscv/machdep.c
> @@ -291,7 +291,7 @@ init_proc0(vm_offset_t kstack)
>=C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0 =C2=A0proc_linkup0(&proc0, &thread0);
>=C2=A0 =C2=A0 =C2=A0 =C2=A0thread0.td_kstack =3D kstack;
> -=C2=A0 =C2=A0 =C2=A0thread0.td_kstack_pages =3D KSTACK_PAGES;
> +=C2=A0 =C2=A0 =C2=A0thread0.td_kstack_pages =3D kstack_pages;
>=C2=A0 =C2=A0 =C2=A0 =C2=A0thread0.td_pcb =3D (struct pcb *)(thread0.td= _kstack +
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0thread0.td_kstack_pages * PAGE= _SIZE) - 1;
>=C2=A0 =C2=A0 =C2=A0 =C2=A0thread0.td_pcb->pcb_fpflags =3D 0;
--00000000000087f81c05f292864d-- From nobody Thu Jan 19 00:57:28 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ny43Y0KdYz2sX7y; Thu, 19 Jan 2023 00:57:29 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.3 with cipher TLS_AES_256_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 4Ny43X72sNz3HFD; Thu, 19 Jan 2023 00:57:28 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Authentication-Results: mx1.freebsd.org; none Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 89C453C0199; Thu, 19 Jan 2023 00:57:28 +0000 (UTC) Date: Thu, 19 Jan 2023 00:57:28 +0000 From: Brooks Davis To: Warner Losh Cc: Mitchell Horne , Brooks Davis , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: b75062f23431 - main - riscv: Fix thread0.td_kstack_pages init Message-ID: References: <202301171638.30HGcP3C091184@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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: X-Rspamd-Queue-Id: 4Ny43X72sNz3HFD X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:36236, ipnet:199.48.128.0/22, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Wed, Jan 18, 2023 at 04:53:51PM -0700, Warner Losh wrote: > On Wed, Jan 18, 2023 at 3:07 PM Mitchell Horne wrote: >=20 > > > > > > On 1/17/23 12:38, Brooks Davis wrote: > > > The branch main has been updated by brooks: > > > > > > URL: > > https://cgit.FreeBSD.org/src/commit/?id=3Db75062f23431fbabef1e7d665cae2= 70b144f71b1 > > > > > > commit b75062f23431fbabef1e7d665cae270b144f71b1 > > > Author: Brooks Davis > > > AuthorDate: 2023-01-17 16:36:15 +0000 > > > Commit: Brooks Davis > > > CommitDate: 2023-01-17 16:37:42 +0000 > > > > > > riscv: Fix thread0.td_kstack_pages init > > > > > > Commit 0ef3ca7ae37c70e9dc83475dc2e68e98e1c2a418 initialized > > > thread0.td_kstack_pages to KSTACK_PAGES. Due to the lack of an > > > include of opt_kstack_pages.h it used the fallback value of 4 fr= om > > > machine/param.h. > > > > Does this mean that we could/should include opt_kstack_pages.h within > > machine/param.h (under #ifdef _KERNEL)? This header is both a consumer > > and provider of the KSTACK_PAGES definition, by virtue of the #ifndef. I > > think the hidden dependency should be avoided, if possible. > > >=20 > No. Including opt_XXXX.h is never OK in our .h files. They are used in too > many places, some of which "cheat" and define _KERNEL becuse, well, they > need to get to the kernel bits.... That will break... We could potentially use the __has_include extension. I don't think we care about building the kernel with a compiler that isn't clang or gcc and the usage pattern defined by gcc is safe for compilers that don't define it. We could do something like: #ifdef _KERNEL #ifndef KSTACK_PAGES #ifdef __has_include #if __has_include("opt_kstack_pages.h") #include "opt_kstack_pages.h" #endif #endif #endif #endif >=20 > I do agree, however, that the current interface is less than ideal... >=20 >=20 > > Of course, the problem at hand has been fixed and we want to keep direct > > consumers of KSTACK_PAGES to a minimum, but I think the point still sta= nds. > > >=20 > I think it's a good point, but the current way is likely the least-bad way > to accomplish things. >=20 > It would be much better if we could remove it from machine/param.h and > opt_XXX.h always defines it, even the default value when it's not otherwi= se > specified. However, we don't (currently) have a way to set default values > in config(8). We could add it, since the efforts at config++ have thus far > fallen flat.... I think this is probably the better direction to move. There aren't any in-tree uses of KSTACK_PAGES so removing the definition should be fine. -- Brooks From nobody Thu Jan 19 03:58:45 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ny84k0L3Mz2sw0R; Thu, 19 Jan 2023 03:58: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ny84j6qm5z3mjB; Thu, 19 Jan 2023 03:58:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674100726; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fgp013iOt5LF2YGvOKFySbrTIJIG20uFEYk7Yf/PjW0=; b=ZP38X5JYQCgAx2B7KKFgnEQEh2WjsmFDPB1tXtBYOKJ+HWX+8CJete3BbiN7a1u3qtm3NC IPX/tJAIs2SMSI6begnLUufuiRW2U/l3n/HxCoKbtsj1HAVTAyvzymz0ZAR8Ozl1PmNc/F L0kK1rQnyAdcLQQAKhP+JY4sYN5Jad099aqjpDXYrbivsqwtvZmEBeua4ImLObWYN4gg0/ 8jD+GAEA91q5ClrRtY0advY4W5lcdxzW3UWu3NSFDYh43MEhUyyHI9XzvHt7UNoikRbzHd EHsgZWA5NF2iIuZJtyuazCCsNLod1W6r9jmXBiVSb19ifnsCpKEcjv72xb/uRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674100726; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fgp013iOt5LF2YGvOKFySbrTIJIG20uFEYk7Yf/PjW0=; b=f9Y+EVf6zk9eFaYsP7shWOv8rTR7ec7KNvoxkB8v8II/4YMRpxM/H+rJSRShk2u4q4lTDT TZR9eafeXm4p4K5Jp2+1k/wWJ1LQJbLHDyW4car6ujg0+8lmQRqgbvyDjRtUaUXO8dMMaf Tr7mqEHJsSd1rL/TRjwYXlAB6vLxjmlNwt/Ul1mMmUhTGJ89YFGtVfaJ1KiwtwGZvoIhMs L7I6pq0BGo5jWtib8JchrA3gzuCES68sMshfeBC2qhSzz9rL2T/Jkuw6A6k+cu3CiDfG4Y 2lIFUndDMC+ejIhgkjtcws7nkXQ840ATivVfdrGCxM9P8dB3ZTJ6N+CNLgn8rQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674100726; a=rsa-sha256; cv=none; b=qI70tXQJCy5uVbarp/q1pgYoC57/ORzUY5SqcrjmDqIOhRsrgjfJNnY3FYnaHFh8YL78BA e8/+bzoueYsmxOebR6vT2TFmCW1Pj8q6Iio1HOO6bvPKGzw+g4nnZlr7jezZvzoeIDkhpT 2roqbrC9a8bfaRMgF7xiNHoy0hovdKNxI3j0nYxnyjGW4fiCHvPfcGlwgoYxUD+964dmGi iSgbPwW3e51FKX4iLv4IYtxlgn4IYMnmVMypooiWpYYelqDmZjJBfVd6rWNwyAjs5f0hzm BLOp2LPTN9Qdb3JleDSacrbzdbUQR9wfSG3g/JHx+A4/mnKM/khcr23AnmdwDA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ny84j5sqDzcg1; Thu, 19 Jan 2023 03:58:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30J3wjkI027821; Thu, 19 Jan 2023 03:58:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30J3wjwW027820; Thu, 19 Jan 2023 03:58:45 GMT (envelope-from git) Date: Thu, 19 Jan 2023 03:58:45 GMT Message-Id: <202301190358.30J3wjwW027820@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Jason A. Harmening" Subject: git: 5a4a83fd0e67 - main - Improve debuggability of VOP_* locking assertions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jah X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5a4a83fd0e67a0d7787d2f3e09ef0e5552a1ffb6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jah: URL: https://cgit.FreeBSD.org/src/commit/?id=5a4a83fd0e67a0d7787d2f3e09ef0e5552a1ffb6 commit 5a4a83fd0e67a0d7787d2f3e09ef0e5552a1ffb6 Author: Jason A. Harmening AuthorDate: 2023-01-16 20:07:19 +0000 Commit: Jason A. Harmening CommitDate: 2023-01-19 04:11:05 +0000 Improve debuggability of VOP_* locking assertions Include the phase and argument field to make it easier to determine at a glance where the failure originated. Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D38091 --- sys/tools/vnode_if.awk | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/tools/vnode_if.awk b/sys/tools/vnode_if.awk index 486f0e6b2ce1..415c33c52420 100644 --- a/sys/tools/vnode_if.awk +++ b/sys/tools/vnode_if.awk @@ -73,14 +73,14 @@ function add_debug_code(name, arg, pos, ind) else star = ""; if (lockdata[name, arg, pos] && (lockdata[name, arg, pos] != "-")) { - printc(ind"ASSERT_VI_UNLOCKED("star"a->a_"arg", \""uname"\");"); + printc(ind"ASSERT_VI_UNLOCKED("star"a->a_"arg", \""uname" "pos" ("arg")\");"); # Add assertions for locking if (lockdata[name, arg, pos] == "L") - printc(ind"ASSERT_VOP_LOCKED(" star "a->a_"arg", \""uname"\");"); + printc(ind"ASSERT_VOP_LOCKED(" star "a->a_"arg", \""uname" "pos" ("arg")\");"); else if (lockdata[name, arg, pos] == "U") - printc(ind"ASSERT_VOP_UNLOCKED(" star "a->a_"arg", \""uname"\");"); + printc(ind"ASSERT_VOP_UNLOCKED(" star "a->a_"arg", \""uname" "pos" ("arg")\");"); else if (lockdata[name, arg, pos] == "E") - printc(ind"ASSERT_VOP_ELOCKED(" star "a->a_"arg", \""uname"\");"); + printc(ind"ASSERT_VOP_ELOCKED(" star "a->a_"arg", \""uname" "pos" ("arg")\");"); else if (0) { # XXX More checks! } From nobody Thu Jan 19 13:11:15 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NyNLC3PmZz2stCJ; Thu, 19 Jan 2023 13:11: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NyNLC2ghWz3FHs; Thu, 19 Jan 2023 13:11:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674133875; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HUaLMXFcolU38BU7uQbo43yRU67D3uki+KBQ46HnZLk=; b=yLirf95cFJyKz9Lt9BfJdnr5dIA1zyB7jNgH3elO8NP3BnQkLAhJvjEQFh2f3RGbIm9HUQ 2UJT7ofFDA1l4du17qU+HWhkxw3oh5NtAwxtGJVPjavw7HN1ffvLwZ6YgSU53lTit0pFYn ykzc3jVBQW+D+tz156jMGeVSNm6AN9nuV7PmPeSwGyTBm4cRFqb7ot+gwzEbYkb+NcN3zh iGGmuzYZe7SCsKNCPh16PvukCn+ypV4hLGLE6bcJCw+mFfs/RrHsE0fYiwY3kfuQwjMA97 Gtgd8qFjPTUAI0R8IkPdVnGnR+Y0H5wOdR9y3mElw/aqyOUnyw/mlcXWTfNhfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674133875; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HUaLMXFcolU38BU7uQbo43yRU67D3uki+KBQ46HnZLk=; b=SiI969QZ0F7P0MsmV6lOY6WleiS8jGL0WW5xkJfsH4MUUi7vsHIm68xVKKIR91xwZ9fs8f XLSbd58N6Yo+GcwlqQ4/DCGE1NufCKvBZWD6oimZpBmuQbn2S8vpok94gyqZmWGcbMw00P Qkp756Y0l5S0dHxg7DPVtgLv62zMWGBCa4a1oAUGB8qPEOGVbfjSr/NlqMA6xOzAT1wxdN BLYJ+YBg46Dk9SO135B7oGAXbJZeCp6KCs9fPI4aIzJwsyFTI7CyO30DMALz/wKyX8ErM+ gMUNymTOLyka8Mkq+gZmpfRzIPp/ZsJjWqXQH9ozR1a5NTSmEk4JXZNaHaSyrg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674133875; a=rsa-sha256; cv=none; b=c5XfOmBxgZE3GWeG7q/GbgPdxSAyIGrGkHGgS3eVYct6E8grizJm+t8SNOQMMkLw1gQY1Q X1TlsalK3XUYJQYBONUSzSA8OTtr8vjI2MtI80kTmddBBdhyRaXsYcYYe0/xaT9H5g2/1w /Fb81LneuCbrKjZut4vqiEV7TTs4lvRL5RdeMlYm02IUSIksvTYY8KCkPyWabXAJCZM/JT UgjsmXM3IE5NSm+dTIL4VviqrDGl2CdXPCthmz2Vnmwn/SvQXXw5sftMdkgGrFHIoPi7tF Vm9bxlGYEOjre1y9aNL8EgcVrVd/dU33PMc6xwlkhWNqBBYQcJ+2Ba7wdcMG4A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NyNLC1lxGzrbx; Thu, 19 Jan 2023 13:11:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30JDBFb8020217; Thu, 19 Jan 2023 13:11:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30JDBFTx020216; Thu, 19 Jan 2023 13:11:15 GMT (envelope-from git) Date: Thu, 19 Jan 2023 13:11:15 GMT Message-Id: <202301191311.30JDBFTx020216@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 73e994a99810 - main - extra_tcp_stacks: Fix a common typo in source code comments List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 73e994a99810edf519d85e96dcb4a56e57be25cc Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=73e994a99810edf519d85e96dcb4a56e57be25cc commit 73e994a99810edf519d85e96dcb4a56e57be25cc Author: Gordon Bergling AuthorDate: 2023-01-19 13:11:00 +0000 Commit: Gordon Bergling CommitDate: 2023-01-19 13:11:00 +0000 extra_tcp_stacks: Fix a common typo in source code comments - s/orginal/original/ MFC after: 3 days --- sys/netinet/tcp_stacks/bbr.c | 2 +- sys/netinet/tcp_stacks/rack.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c index 4f74fdd1dd76..1080d53116b4 100644 --- a/sys/netinet/tcp_stacks/bbr.c +++ b/sys/netinet/tcp_stacks/bbr.c @@ -6924,7 +6924,7 @@ bbr_log_sack_passed(struct tcpcb *tp, TAILQ_FOREACH_REVERSE_FROM(nrsm, &bbr->r_ctl.rc_tmap, bbr_head, r_tnext) { if (nrsm == rsm) { - /* Skip orginal segment he is acked */ + /* Skip original segment he is acked */ continue; } if (nrsm->r_flags & BBR_ACKED) { diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index a9eccfac1878..25a4f8dd3197 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -5659,7 +5659,7 @@ rack_start_hpts_timer(struct tcp_rack *rack, struct tcpcb *tp, uint32_t cts, * (or now) pacing time set. We want to * slow down the processing of sacks by some * amount (if it is an attacker). Set the default - * slot for attackers in place (unless the orginal + * slot for attackers in place (unless the original * interval is longer). Its stored in * micro-seconds, so lets convert to msecs. */ @@ -7974,7 +7974,7 @@ rack_log_sack_passed(struct tcpcb *tp, TAILQ_FOREACH_REVERSE_FROM(nrsm, &rack->r_ctl.rc_tmap, rack_head, r_tnext) { if (nrsm == rsm) { - /* Skip orginal segment he is acked */ + /* Skip original segment he is acked */ continue; } if (nrsm->r_flags & RACK_ACKED) { From nobody Thu Jan 19 13:13:18 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NyNNZ4DrFz2stpM; Thu, 19 Jan 2023 13:13: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NyNNZ3fj8z3FV3; Thu, 19 Jan 2023 13:13:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674133998; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4QmG5+t+7sFuRGUaXxTZUv1B5196ByqEqlonSh6zSBE=; b=U4duBuxwVZi8535hLD2Y7L0DlbL+VLcSQbizvrnaadFY/N/eXFXc19fSr3eOENfNEKb9zC QuMOB5lDxIRjBQR/PQh4n7E86MP8G3L/MAYp4TDIO02sLTt9RDuT+yRX/BKI23z2ppL8St QI1E0sdokH2GiPT+WTI5FzR+Ute5mWcf8YbpqoLQksbryYXFbgva6wtZtpar9bOCocrR8f 2VHINpkLgfTqpn87puOOOAXtvvYSgkGqCfNXTKd7ALD6HMRMibZfOH+i8ML7cze1XdTzgP odJJN3I2WrHMaT5l4ihjQc38yn2hlmdEDPZ8KV8qq9DLUtTk1t40tgAXyMLK1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674133998; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4QmG5+t+7sFuRGUaXxTZUv1B5196ByqEqlonSh6zSBE=; b=TGuKIbfK60SDJelk2KkKlLiapCcXfwVYuNHZs6j9k1FGYSxV9eU8DlCIh6a5rumWk9poL+ UyzjTqh3+VrVKQv58Zt5l0767Bw3jHgaDnhIf4DBgS/2ngPPrvsooXLWs4ENWvWc0V/7Lh tfQU4r0ktwHZzps41q5hPJF/Nkb+ozfYAfbZbrfpuyf6J2QPe2sDqmcanZTUqV+0KlWOjC oaAb/u8WB+aXr9qD6Pjme3EY6BYQ5CzUCeZVUxI5HujBiE2BdevL39jmwzxu7PRwTLVLR8 +Aix8hHqzoM2o/YvVsmlSxcycZbar73QzKwGGJWXwl6vI112jMTwTN8aay0R/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674133998; a=rsa-sha256; cv=none; b=LgLJf1WhEkS+Besk8BFGo8FZ7/wVbEavlfFWKxFv3uDGHaPjQFwD3LyP/+0pNjhUsNtHBl 4JNEiJGgO7LB3qaFpoqs0PCavFQAH0k9hr2vyvtjoYlQSGnqwnvswg+lKwrdjHa4bfhlF3 gNrboV0EEjCtmvC4ZFQZ/tOP1CKFXnv6CaJScYIeJadQHH3ackFyfLb1Je422bHBKUf/JB j676Lq6BlGB5AmWklveO3MQClugDpanvdhAdcF9uyrcYsZvuq6W2E/C3isJ/AfT3Ejrey3 niFgKhv6NKHQYVfu7vzRF+n865uQHs3h+kMZdrtQ05hRAeeX++T9VJQDssktiQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NyNNZ2g1pzs6t; Thu, 19 Jan 2023 13:13:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30JDDIEY025373; Thu, 19 Jan 2023 13:13:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30JDDICM025372; Thu, 19 Jan 2023 13:13:18 GMT (envelope-from git) Date: Thu, 19 Jan 2023 13:13:18 GMT Message-Id: <202301191313.30JDDICM025372@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: fa7de6dcb9b7 - main - ip_gre: Fix a common typo in source code comments List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fa7de6dcb9b7314d4736f1fc21b3fdceefe34173 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=fa7de6dcb9b7314d4736f1fc21b3fdceefe34173 commit fa7de6dcb9b7314d4736f1fc21b3fdceefe34173 Author: Gordon Bergling AuthorDate: 2023-01-19 13:13:02 +0000 Commit: Gordon Bergling CommitDate: 2023-01-19 13:13:02 +0000 ip_gre: Fix a common typo in source code comments - s/addres/address/ MFC after: 3 days --- sys/netinet/ip_gre.c | 2 +- sys/netinet6/ip6_gre.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netinet/ip_gre.c b/sys/netinet/ip_gre.c index 93261a094a36..12c13cbce2e7 100644 --- a/sys/netinet/ip_gre.c +++ b/sys/netinet/ip_gre.c @@ -258,7 +258,7 @@ in_gre_setup_socket(struct gre_softc *sc) * NOTE: we are protected with gre_ioctl_sx lock. * * First check that socket is already configured. - * If so, check that source addres was not changed. + * If so, check that source address was not changed. * If address is different, check that there are no other tunnels * and close socket. */ diff --git a/sys/netinet6/ip6_gre.c b/sys/netinet6/ip6_gre.c index 9057a95e109b..2bae6d754a03 100644 --- a/sys/netinet6/ip6_gre.c +++ b/sys/netinet6/ip6_gre.c @@ -254,7 +254,7 @@ in6_gre_setup_socket(struct gre_softc *sc) * NOTE: we are protected with gre_ioctl_sx lock. * * First check that socket is already configured. - * If so, check that source addres was not changed. + * If so, check that source address was not changed. * If address is different, check that there are no other tunnels * and close socket. */ From nobody Thu Jan 19 13:16:18 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NyNS3153Vz2stxT; Thu, 19 Jan 2023 13:16:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NyNS3011Hz3G02; Thu, 19 Jan 2023 13:16:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674134179; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DXF6Qi4u6szi6muaBiu5EXthg0yy4IQraqEd3QQAh3I=; b=ghsTzu7sc+TMm6zCuw8cdgb560obWzEGNDDk5ocNGlW/iQkmDjzsB6Eny1wCdXNxU1ASMS H167DO0XGJHNvyeasZSAQd1e8UXKS56vACRjcF2VvvjW+cFqxFemb/ePP9/6w4Mpflbtrk SU4lJGUDY9LBbPJXZ7U58pvnU1OdPJKd9sdsudpvSDd/A97QVV10xGmQafeDhMRnp9+vwp ktgGxcCodYi7ie1Ym7i+zZhIDL9vibffkHDYidl22hAXT136f83l09bIcPoxEAnA2NQohm b+fVyAWmxjo5SrahizHNeaE2652gt1k/S66g5Q8Al52JSgb7ae6UQSZ+WS2dqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674134179; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DXF6Qi4u6szi6muaBiu5EXthg0yy4IQraqEd3QQAh3I=; b=xCVS1sPJZRtTs4UWaHHj5EA0jvpS5/sDBilobRR+Hf8PSaqRhWFctWFH+zXD2Xhh7sW7i2 zXuENeN5L14c0Lf8wChVO0i9iG+7XYMaaUMVEHwLuStSrm3WQFAIA5LYN396ye5R8COIdJ vSgJJKHecToKTL2grFwAFs6xfNToaUlz4Pm7edlzTMjGDo7whNtedZN+hIHHK1yc6FgFF/ u1Y+PE04ls3u61Pjd7j61TY7CSNTaaGeiImLfUSuMw/taakkJ0z2s+ITcZJj1xiAxkXAKo V7vg46W67TUEL1xZSnbLqSyLe/FBOgCRKupxe8/siFZdJb3HHFKBYysYJyypiw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674134179; a=rsa-sha256; cv=none; b=pjdmHDjXM3Van8cC7oCh1ullXIulW8Bv8Oi+jGHDlMfbL3jtL9E0zBeNUnD0lKuawP1FV7 /DyQ/ZuA76B2dWmhB868/1+4sDelzJyCzRmsJAbxPxpTNYlOeI6vPlU5Rn1vyOsbV81+cs EoRv8OGM6beUcISCtCObbSH1McqjoNeOD6/VgjCqNhH/k726+QhCFz7Bperw+m+LNiv9h5 xEDoxNZ9UWk7OY8IoP5oKo6tUdLsQLkvCjbA1GnA5wQeY0YMDJEjIrSmN2uob5zeVpWdkC 6vxq19mGQrAtF2Iwc0dN+kVA8eBIByzVWBL0p2poCcR/12IEB1DwhKmENJR/5Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NyNS26CkfzrfN; Thu, 19 Jan 2023 13:16:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30JDGIm8025848; Thu, 19 Jan 2023 13:16:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30JDGISk025847; Thu, 19 Jan 2023 13:16:18 GMT (envelope-from git) Date: Thu, 19 Jan 2023 13:16:18 GMT Message-Id: <202301191316.30JDGISk025847@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: e4b7980c5ca9 - main - ath(4): Fix a sysctl description and a typo in a 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e4b7980c5ca9c701242f3c395a042360db0ad7a7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=e4b7980c5ca9c701242f3c395a042360db0ad7a7 commit e4b7980c5ca9c701242f3c395a042360db0ad7a7 Author: Gordon Bergling AuthorDate: 2023-01-19 13:16:05 +0000 Commit: Gordon Bergling CommitDate: 2023-01-19 13:16:05 +0000 ath(4): Fix a sysctl description and a typo in a comment - s/delimeter/delimiter/ MFC after: 7 days --- sys/dev/ath/if_ath_sysctl.c | 2 +- sys/dev/ath/if_ath_tx_ht.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/ath/if_ath_sysctl.c b/sys/dev/ath/if_ath_sysctl.c index de852158f991..b095dad2488f 100644 --- a/sys/dev/ath/if_ath_sysctl.c +++ b/sys/dev/ath/if_ath_sysctl.c @@ -1237,7 +1237,7 @@ ath_sysctl_stats_attach(struct ath_softc *sc) SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_rx_2040", CTLFLAG_RD, &sc->sc_stats.ast_rx_2040, 0, "number of HT/40 frames received"); SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_rx_pre_crc_err", CTLFLAG_RD, - &sc->sc_stats.ast_rx_pre_crc_err, 0, "number of delimeter-CRC errors detected"); + &sc->sc_stats.ast_rx_pre_crc_err, 0, "number of delimiter-CRC errors detected"); SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_rx_post_crc_err", CTLFLAG_RD, &sc->sc_stats.ast_rx_post_crc_err, 0, "number of post-delimiter CRC errors detected"); SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_rx_decrypt_busy_err", CTLFLAG_RD, diff --git a/sys/dev/ath/if_ath_tx_ht.c b/sys/dev/ath/if_ath_tx_ht.c index 7c7a5ac493f6..1af1ec9120c7 100644 --- a/sys/dev/ath/if_ath_tx_ht.c +++ b/sys/dev/ath/if_ath_tx_ht.c @@ -457,7 +457,7 @@ ath_compute_num_delims(struct ath_softc *sc, struct ath_buf *first_bf, ndelim += ATH_AGGR_ENCRYPTDELIM; /* - * For AR9380, there's a minimum number of delimeters + * For AR9380, there's a minimum number of delimiters * required when doing RTS. * * XXX TODO: this is only needed if (a) RTS/CTS is enabled for From nobody Thu Jan 19 13:17:48 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NyNTm6MT5z2sv8J; Thu, 19 Jan 2023 13:17: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NyNTm5tzqz3GRw; Thu, 19 Jan 2023 13:17:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674134268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4+36RRCOQLdbutIR90DHS1wQWa1k5NJM4ILmCfbum/c=; b=m14TTQRhkSWc1gWO94IXFiSmL6cXxMzpdg7FzhtaPEcMRrFpAEANl39XsOu3s8Qn3SfEPU pD8Z4mJzgMQWqYzfV245AwgfAgE7/yShHjKZUGDIc9bik5XjJp48k6gQbdevBIKBVsEfnI 60EtbKbEpIotFM6+2h1ezvvsfvohL6l2T56rSbvI5Ho9lmB6/pRk1kYPyh59nyubkygydl M9kbckafP1v0eSrNywmO29GiQu2kUbcpgiK7H4VKYuGLakq52zk3FKYm6KOhJVvDFj161m OnavndhgMUERXnn0FMWYhjPPb1SKdj5RagDNXtl7/17uO40gko2PoXoYCRSVaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674134268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4+36RRCOQLdbutIR90DHS1wQWa1k5NJM4ILmCfbum/c=; b=gHTGC8+plEa9iO+vrp/dcb6D0YXIfpgMbzEC2gkFkpilY5QJOWxDUZ00TYgpsoZ8sxLm5x x9n9UxM6pBukDcR8r0eIChwf+B1cJykiIZp01yguRmtDsNUkuQeWPyzUK6jDStmexE7W6K 4jFQhdYLBC/s8IAAPqhjbS9E+o/B6X09IKI9GdPcYaYn7Z4b+2hrXMm1pqg85At7qzk6tK mLroR1G5VL9HR7AX/SC93PewuNdzxPhBuOfzUVgv4hIZRqlwRzJsL19+cFl981vnnCuPvi mHyf1wDBdZsJEpMSWWyliRPHyX8CYorocASLEN4xnmtTShpGRj4A6mB5neNQeQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674134268; a=rsa-sha256; cv=none; b=OJ/ELX/ER1pQNsRqKr/Q/eqCb0Cgyppw7de4ejdPwxtE7TD29L2Qm5aG7jm2V+1xjX5rsd n9zCWA5BjEN+AaQJSdsgN22xkr+CXuPw1Wkz8xTLhvqlF/RuOCTS0wGyukMRSIkROCD1U5 15q/swdAuLmY7ETiv+zV3uWb/I0hYtWPC5jFiLEkKDIrW40ia0GVWE6Nusg3Mxu2LbhOeo bGQKlOz43T1cTQ+31WgSyRYkirIvLCLnQwpNAfNdHmpJiefxArXWCb54hUFxaCjXSxJ1oP VKjraS8UETKNJ6Qqs/WxPOWbgz32wDNB1y/RqJ+alwD7gKHn7OJgqbttV1SOhw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NyNTm4xL9zsG8; Thu, 19 Jan 2023 13:17:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30JDHmGL026159; Thu, 19 Jan 2023 13:17:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30JDHmhQ026158; Thu, 19 Jan 2023 13:17:48 GMT (envelope-from git) Date: Thu, 19 Jan 2023 13:17:48 GMT Message-Id: <202301191317.30JDHmhQ026158@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 30985d19b00d - main - rc.initdiskless: Fix a typo in a 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 30985d19b00da3ea3ba808b57e5a46ce6403b8d7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=30985d19b00da3ea3ba808b57e5a46ce6403b8d7 commit 30985d19b00da3ea3ba808b57e5a46ce6403b8d7 Author: Gordon Bergling AuthorDate: 2023-01-19 13:17:37 +0000 Commit: Gordon Bergling CommitDate: 2023-01-19 13:17:37 +0000 rc.initdiskless: Fix a typo in a comment - s/attemping/attempting/ MFC after:5 days --- libexec/rc/rc.initdiskless | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/rc/rc.initdiskless b/libexec/rc/rc.initdiskless index 60cfa8b174f8..164e89e9e78c 100644 --- a/libexec/rc/rc.initdiskless +++ b/libexec/rc/rc.initdiskless @@ -306,7 +306,7 @@ handle_remount /conf # be sure to export those filesystems -alldirs, however. # If the diskless_remount file contains a string beginning with a # '/' it is assumed that the local nfsroot should be prepended to -# it before attemping to the remount. This allows the root to be +# it before attempting to the remount. This allows the root to be # relocated without needing to change the remount files. # log "templates are ${templates}" From nobody Thu Jan 19 13:19:01 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NyNW9483Gz2svHv; Thu, 19 Jan 2023 13:19: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NyNW93YL7z3GTp; Thu, 19 Jan 2023 13:19:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674134341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hRlPBdEnU1Se7yHKHiFpgVw8hfD9ZNJ77kf2vVNkJRU=; b=GA4jFpGZ1DWuQBlgzBZ+VII/r3Ka6JrU1w4op6UyEoYHFxC5S2YJ73br9XwwDl7HzqCcHb EsZ3afgIooBbOCL+G9ROI+K221mgT3BcJQouSgEo56y51c6IXuexqXW7vA3Wo8ZVZePyfy KDiL8Gd2oVTCXkOOm+kIIKoODy4mK+icw+P6oM3id3oodjFLqudmtbNRDufSVaLL2GRrLU tj3ZC8nGwbpxqnGVaBrKP6ims+vTViaRkv1DqtntrTQMyfZx5w4qXXeJPeDqzjy9/gIFAC jhnzNO+OME+0qa3q5ufIthBrP7nISQldA6UaYH+o0wB89FGuWzf5Y/wlhi0Law== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674134341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hRlPBdEnU1Se7yHKHiFpgVw8hfD9ZNJ77kf2vVNkJRU=; b=ExLVSGXG8UmbzduRLhDhViV+lnvOBAWqWLx0H/En9Q/5kNyaXn80GEH8fhl6FwYudhEn12 TrEAX6qutlNP/DC8OJ9sVxEeaZnu4EoEUum7x0NZ4s+ZPSnnBiMtA/u0NgyHYHO5WU8OQ/ y8OHJZc3d8CmLhUq/wBPd6FG/Tpiixu3Eb3Iiw2LI+Ty3MH/mSdSFHeLyAEjWA9cwd7oG5 MRDqxIvUvlkjfTQI6TsZRtfARYgoo8UfLMTswYMCHW8b5vetzAxxLc+TWN/mtjIP+7hDIK r72AKapQHCjYiOaCzIwbmnhNh5q1p/2x1O0HcGNFKV84MM3N0lenNcQuLC+Lhw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674134341; a=rsa-sha256; cv=none; b=pCzBviFocOJbzobNMW+6RLFX4dXkawekS1xRvI0mmcK8K3Oic2M19NeeC1mLJcaL1w6ykl tSjc3O5+4OATsKust9BxD+tLWw/pa4w+8yT4rr48gZMvDKBV0rEmrzQqPV0ZHXAshOTEuI NhVyefvJKOx25krbWQx3u/8dxg5eSGuY4S89rTuqX7ODOOwruS/BIAesZk4wjdAK8xPySz u34zjPtl7MRzRLrvjoZGSu1Z5akCUy3ezI+NO7ZZWKyfHhLUw2lGuGRCI7YXioHNOy9tlz Mf86dTJeEh06K69rGnPN2Tnx4fhYSimZzQX8QBAT0Hpth/GO10pHQLge5qUSXA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NyNW92bThzrrX; Thu, 19 Jan 2023 13:19:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30JDJ1jC026424; Thu, 19 Jan 2023 13:19:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30JDJ1Gh026423; Thu, 19 Jan 2023 13:19:01 GMT (envelope-from git) Date: Thu, 19 Jan 2023 13:19:01 GMT Message-Id: <202301191319.30JDJ1Gh026423@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 7a184a41c6a3 - main - bsnmpget.1: Fix a typo in the 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7a184a41c6a31a1dcf82c2e35446f96dde78dbce Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=7a184a41c6a31a1dcf82c2e35446f96dde78dbce commit 7a184a41c6a31a1dcf82c2e35446f96dde78dbce Author: Gordon Bergling AuthorDate: 2023-01-19 13:18:52 +0000 Commit: Gordon Bergling CommitDate: 2023-01-19 13:18:52 +0000 bsnmpget.1: Fix a typo in the man page - s/ingore/ignore/ MFC after: 3 days --- usr.sbin/bsnmpd/tools/bsnmptools/bsnmpget.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bsnmpd/tools/bsnmptools/bsnmpget.1 b/usr.sbin/bsnmpd/tools/bsnmptools/bsnmpget.1 index 95abc87a5720..ea3a2c5ce189 100644 --- a/usr.sbin/bsnmpd/tools/bsnmptools/bsnmpget.1 +++ b/usr.sbin/bsnmpd/tools/bsnmptools/bsnmpget.1 @@ -136,7 +136,7 @@ digest. By default SNMPv3 PDUs are sent unauthenticated. .It Fl a Skip any sanity checks when adding OIDs to a Protocol Data Unit (PDU): -ingore syntax/access type, allow adding of non-leaf objects for GetPdu and +ignore syntax/access type, allow adding of non-leaf objects for GetPdu and read-only objects to a SetPDU. .It Fl b Ar buffersize Tune the size of buffers used to send and receive packets. From nobody Thu Jan 19 13:22:18 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NyNZy46t2z2svpn; Thu, 19 Jan 2023 13:22:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NyNZy3gZHz3H9C; Thu, 19 Jan 2023 13:22:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674134538; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xp56jgAR7gssfo3MnllxNqyYw86AiEohwfgIRv5IEb8=; b=p5OSVL3omhCEHQBBcVJAyLzN5XQLzH/PPGi46vLSPfk5CehinLpVyZ6Lh8o+8av9xA1lsP of1v30z1J7pY9S8vidApcDCVjYficoG6xfrTg3sDTz/AbKW8Onxz1j8nwfvTYJolJQICl2 prBH8pf2zSrgP65+wFehA+Kd6yxG354IVBOqKmYFByOPCgo682S9B/jOdPgnQvJb9ifsiw tt5chxvvnEyljNg1U4Gl+qO45E83hcAOhkgEm+h5UG2O8sFUAlD5qoJrccZy0KGa/x4ee4 aVDSscrZ77r4ik6H1X3JD06NGIs/ljCl1+79VbYPPRlfSwjGINgOJlKG9GTcFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674134538; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xp56jgAR7gssfo3MnllxNqyYw86AiEohwfgIRv5IEb8=; b=S8GaqXrp0bcfmuYG7KLoBawr3WORI6GkFr3eKzRkXEl915kIr4gegYNIpaJp7NsmiJYMrT r077TFRib5CSdGvz5XEIBYh8nto2hJfVmopHijD6iUgkYbagHnzmXomH3prFRVAmF3QNx0 vNZBc0PBdZ8Sr4THP9Xvt9jHVJiH4a+H57NMO2tyvyUe5kNdwrT+HhdxHGrdICDc9jJoEA XEhJlrGLiag41mEWY8XtpMGfFvxJb6O6TFSHiSuE9oRQTlP1tFjGK6PS6hidSuluHQBKAZ iqAmIJrjIIQnJL4wTJnDgd0xH2noHBJbWcyO7CoJtnqVaO1AIL9l0wbwfd+oFA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674134538; a=rsa-sha256; cv=none; b=T02NxJt2u76lO5TOvaKgzuTpFyFzNW2Q3IOpT1H/XOLk+14aoIMr7KPcBORe9onlyEyVpq R8NBf7mMmdtZxOaHsmlGiH7Y9+oq2T78dDM5ym8p5OUTlan9fbMjaA16Z6t48CdIBzbYiZ 1ehAVNqk6EB27pf8dtSXNPleIsjObd0huqwdEL4QcVcABlc/EzPTZByACt0umflcChcPui OIjpTf9yZNh/jF99XO0LHie2+51ZzMnO987LHdDDkQNgaubgB93hC6QdLIYbLysoMHCiD2 3CtQmXkdcyntM6pv/5Ea7D5jlk78tFrCIwSwtnjpDeyf1+OLXQHWmFp/Ts8Big== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NyNZy2kvHzs7Q; Thu, 19 Jan 2023 13:22:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30JDMIwM039483; Thu, 19 Jan 2023 13:22:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30JDMI1w039482; Thu, 19 Jan 2023 13:22:18 GMT (envelope-from git) Date: Thu, 19 Jan 2023 13:22:18 GMT Message-Id: <202301191322.30JDMI1w039482@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 74d2a3c16d74 - main - cxgbetool(8): Fix common typos in sysctl 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 74d2a3c16d74376f594162ee622ba470d631b386 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=74d2a3c16d74376f594162ee622ba470d631b386 commit 74d2a3c16d74376f594162ee622ba470d631b386 Author: Gordon Bergling AuthorDate: 2023-01-19 13:22:00 +0000 Commit: Gordon Bergling CommitDate: 2023-01-19 13:22:00 +0000 cxgbetool(8): Fix common typos in sysctl descriptions - s/addres/address/ MFC after: 5 days --- usr.sbin/cxgbetool/tcbinfot4.c | 2 +- usr.sbin/cxgbetool/tcbinfot5.c | 2 +- usr.sbin/cxgbetool/tcbinfot6.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.sbin/cxgbetool/tcbinfot4.c b/usr.sbin/cxgbetool/tcbinfot4.c index 9daff0af3338..9ee72458d38d 100644 --- a/usr.sbin/cxgbetool/tcbinfot4.c +++ b/usr.sbin/cxgbetool/tcbinfot4.c @@ -872,7 +872,7 @@ _TCBVAR g_tcb_info4[]={ NULL , 0, 0, /* faka,flo,fhi */ "rq_start" , /* aka */ COMP_NONE , /* comp */ - "DW aligned starting addres of RQ", /*desc*/ + "DW aligned starting address of RQ", /*desc*/ NULL, /*akadesc */ }, {"rq_MSN" , 2, 986, 998, /* name,aux,lo,hi */ diff --git a/usr.sbin/cxgbetool/tcbinfot5.c b/usr.sbin/cxgbetool/tcbinfot5.c index b4baa31a82e2..e15dc998c683 100644 --- a/usr.sbin/cxgbetool/tcbinfot5.c +++ b/usr.sbin/cxgbetool/tcbinfot5.c @@ -879,7 +879,7 @@ _TCBVAR g_tcb_info5[]={ NULL , 0, 0, /* faka,flo,fhi */ "rq_start" , /* aka */ COMP_NONE , /* comp */ - "DW aligned starting addres of RQ", /*desc*/ + "DW aligned starting address of RQ", /*desc*/ NULL, /*akadesc */ }, {"rq_MSN" , 2, 986, 998, /* name,aux,lo,hi */ diff --git a/usr.sbin/cxgbetool/tcbinfot6.c b/usr.sbin/cxgbetool/tcbinfot6.c index 81499136807a..d1f2c24ae7a6 100644 --- a/usr.sbin/cxgbetool/tcbinfot6.c +++ b/usr.sbin/cxgbetool/tcbinfot6.c @@ -879,7 +879,7 @@ _TCBVAR g_tcb_info6[]={ NULL , 0, 0, /* faka,flo,fhi */ "rq_start" , /* aka */ COMP_NONE , /* comp */ - "DW aligned starting addres of RQ", /*desc*/ + "DW aligned starting address of RQ", /*desc*/ NULL, /*akadesc */ }, {"rq_MSN" , 2, 986, 998, /* name,aux,lo,hi */ From nobody Thu Jan 19 13:24:00 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NyNcw4g1sz2svtW; Thu, 19 Jan 2023 13:24: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NyNcw4CLXz3HfM; Thu, 19 Jan 2023 13:24:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674134640; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4m1yiiOiw8f33XjF5qHnLpJKy+8/nd+oJGEh36GK3uY=; b=Y7J9SXf5l9m7VCiOAhp5+WLxPMWrPsePFRaN9E99EmDW3j5Vo8NkuQTxob3T9rKD7knulH CmxF9NSeCXejZtsZoc+D4OTNhZ+4LS56W+O8xZ9VpVvDHxBa/2Ad2s+Igtjbdo2g3tm6M6 cM9sw4GEspR/dTaNlWKw09slxFbBG+83dF+RERq25G8whbWbPnUG8YIZkly17P05GskZUb /licfogp0jocMs7g+0E2KJo11/F7CyMHgtKgJVG3ZYbcmcxBmq/ZvEQz5TS5sOMndchCO4 c3vR7kOCjqgctufJ93K7aBecH+NSaio3j0BXCbolhWl8EuKamiqO/GBQLCSm7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674134640; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4m1yiiOiw8f33XjF5qHnLpJKy+8/nd+oJGEh36GK3uY=; b=IMs+KUB44IIHCO9uPJ01N4EgL6r/F9wCgs+6eGSFXYjN3aYgRpYcZtX5KCZ1g3FTDeIeUF yNQfqPu+kKn4Bre1MigVco8prJT3Kr5+hjIKBKFx5CW9dPFUBATgniJYXcnxnjMsshWsI6 zr7UMYrc90tnUs2ELEngStJAYl/016moZ+SECCzR2WwWI14swvp7gcbQrhVyoUwLiYW9Ki MIBRIsfiwETbF1Dpyq5zGDLPfT/yaKTgh7fB+dgi+vGoOiXUYvmItBYqVrTvWivzAs+lpN IHpefvlQkdmUy3g748sM9610GHSBw35OFfEWo6/Q9hK7hVt4ycNV3ohTn+Iniw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674134640; a=rsa-sha256; cv=none; b=qK+ZQNuzp1/wgiYFs+tbAVBW+jI/9YJ6z4izIOENMlNve5v6GsnjTzAeuLRQ1Pzsbxs8nf 6Fa2bXAKWCR3cxJtzEDYHYwxsv8uTnkfP8BisVkmqy5oVDQj940zp9Gao4ktVaxLkoVT/F cYxrx6ARZhoG0Q+zDLSMRK0VBE2pOdNCc+HRcte8Jeh0RodFz3H03DtentV4nka1ZxL5kX SmzSE3rDGea1jOSwA5Vj3cP1/qmmM1gdl3malhhXgC2jqPQNe+xGPd8OjjZTrW1WeaA0ea 2cPk/8K3ttzKpzedMFR4KfLFFxioGW7gbShMtaQbpLoU+6+hjGBYC4kxNqudIQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NyNcw3FkRzsN1; Thu, 19 Jan 2023 13:24:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30JDO0tU039812; Thu, 19 Jan 2023 13:24:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30JDO08f039811; Thu, 19 Jan 2023 13:24:00 GMT (envelope-from git) Date: Thu, 19 Jan 2023 13:24:00 GMT Message-Id: <202301191324.30JDO08f039811@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: afc55510b117 - main - mountd(8): Fix a typo in a source code 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: afc55510b1178ba94d2bdcef0eb666b10abcfc42 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=afc55510b1178ba94d2bdcef0eb666b10abcfc42 commit afc55510b1178ba94d2bdcef0eb666b10abcfc42 Author: Gordon Bergling AuthorDate: 2023-01-19 13:23:51 +0000 Commit: Gordon Bergling CommitDate: 2023-01-19 13:23:51 +0000 mountd(8): Fix a typo in a source code comment - s/ingore/ignore/ MFC after: 3 days --- usr.sbin/mountd/mountd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/mountd/mountd.c b/usr.sbin/mountd/mountd.c index 569ea0fbf707..d985dd00acf8 100644 --- a/usr.sbin/mountd/mountd.c +++ b/usr.sbin/mountd/mountd.c @@ -779,7 +779,7 @@ main(int argc, char **argv) /* * This routine creates and binds sockets on the appropriate * addresses. It gets called one time for each transport. - * It returns 0 upon success, 1 for ingore the call and -1 to indicate + * It returns 0 upon success, 1 for ignore the call and -1 to indicate * bind failed with EADDRINUSE. * Any file descriptors that have been created are stored in sock_fd and * the total count of them is maintained in sock_fdcnt. From nobody Thu Jan 19 13:26:15 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NyNgX21Rqz2swBP; Thu, 19 Jan 2023 13:26: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NyNgX0drfz3J5c; Thu, 19 Jan 2023 13:26:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674134776; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Yile6BhGmBHRQhSE/w9hVVU0S/N2BI+1BFwGlCFNhwk=; b=nMx0NUYHIbsqSs3E7DjjMr82lQdCxlfczhqayxYS/1Wola2HCkESKwHaLVpupqHz5IyAKI r0fHVok+7mrfX5KBQ6Q07ipQVVT8JcNmaewCZOYJ0kQEl/f1VsYoCptvEIyUR7RHnptCAu CPYVu0GbOESjNLUPuidQhnnSe78KW5tiK3VvCctO5rFBZCWEvFVVGqUxcLC2yoF2cuKalc 62iI/Y+lDu+7N2ta+s8DA/DzAbxCGUG3rZys76yPC7pMVlEI7Gbhqu7ecGBMr/VJJoaIVw mTUK/eOtst3CCeTdaH+4KsdOQOPCkLR3bH6OTBR2A3to7mLfnAAMo2hHfaw+Fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674134776; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Yile6BhGmBHRQhSE/w9hVVU0S/N2BI+1BFwGlCFNhwk=; b=uRLBPc1iw3aItpYvILFDHxg98HmfEyxBK2zTLSqXeNjaoaXG/fmKWLVXK1vfsA2W3n1+7G Pj6uQXYTrTjWw4IGpgwvNcGl29v864NtlkT6vnOBNzRMtRX7ael1rL/bGKScnnEIBPJP+m pKOzMLwja5nGC0XAdHW5rzduI6B4UDcqHRSs456q8kiXyX6g9HQRaev8AjmU5b/ADRatFz Vsz5+ZKqDr9z4SDV+kNws2G4tPOnsFTUSfTS/LO2LjqsAOxmw3TvyZcStgKd/cdgLCLe7u 3/dAu253WkxGlSnIbZd9e2X/cU1HUZwIxFoUpTR8TPj+IFqypneTPziUC/LLOg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674134776; a=rsa-sha256; cv=none; b=KyREMRoeTjBGd125fph9gSMUwvI6aU7KJ7QgHg6e2Cb3fU/lUENTtkHKXSsQfGQFSkcCLq FcShUmimWSn88pNbaMv5DMGSZZzjWLN+wVKzCN3ChVZ7vvNR29WOyTaTkkVZhWy7eCChNf +I6b79mAr6pPmp0fMi4TRfPePsd8LGwEKKzwGnTDTgPo0nNVxdYeYot3+SNp3eN1DxkUxG iNozJcJts7TuVR+rkdM/+XD17/ewdg0CY6YBr/vRJNfU8W3PSc3CS8CKkg7wVQrEo4q55v 41vIM+lBDGWI3R5KUasrhDTGsQnbto8iS/z13xiBB+KnKc0HV0csijn53U+8Fw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NyNgW6nD8zsbp; Thu, 19 Jan 2023 13:26:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30JDQFMe040194; Thu, 19 Jan 2023 13:26:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30JDQFWR040193; Thu, 19 Jan 2023 13:26:15 GMT (envelope-from git) Date: Thu, 19 Jan 2023 13:26:15 GMT Message-Id: <202301191326.30JDQFWR040193@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 72e709040f36 - main - nfs: Fix a common typo in source code comments List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 72e709040f3691911c7b58d5a14b4d19b276f478 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=72e709040f3691911c7b58d5a14b4d19b276f478 commit 72e709040f3691911c7b58d5a14b4d19b276f478 Author: Gordon Bergling AuthorDate: 2023-01-19 13:26:06 +0000 Commit: Gordon Bergling CommitDate: 2023-01-19 13:26:06 +0000 nfs: Fix a common typo in source code comments - s/ingore/ignore/ MFC after: 3 days --- usr.sbin/rpc.lockd/lockd.c | 2 +- usr.sbin/rpc.statd/statd.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/rpc.lockd/lockd.c b/usr.sbin/rpc.lockd/lockd.c index e25cef9993bb..24dacc81a37a 100644 --- a/usr.sbin/rpc.lockd/lockd.c +++ b/usr.sbin/rpc.lockd/lockd.c @@ -489,7 +489,7 @@ main(int argc, char **argv) * * It gets called one time for each transport. * - * It returns 0 upon success, 1 for ingore the call and -1 to indicate + * It returns 0 upon success, 1 for ignore the call and -1 to indicate * bind failed with EADDRINUSE. * * Any file descriptors that have been created are stored in sock_fd and diff --git a/usr.sbin/rpc.statd/statd.c b/usr.sbin/rpc.statd/statd.c index ecd31b8ddf68..a1cd8582e7a6 100644 --- a/usr.sbin/rpc.statd/statd.c +++ b/usr.sbin/rpc.statd/statd.c @@ -319,7 +319,7 @@ main(int argc, char **argv) /* * This routine creates and binds sockets on the appropriate * addresses. It gets called one time for each transport. - * It returns 0 upon success, 1 for ingore the call and -1 to indicate + * It returns 0 upon success, 1 for ignore the call and -1 to indicate * bind failed with EADDRINUSE. * Any file descriptors that have been created are stored in sock_fd and * the total count of them is maintained in sock_fdcnt. From nobody Thu Jan 19 13:27:28 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NyNhw5L3rz2swWC; Thu, 19 Jan 2023 13:27:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NyNhw4qhzz3JFX; Thu, 19 Jan 2023 13:27:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674134848; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GcHwelOc/7Aky1lRvJX4BD9XXInxB0qFa9vk11ef7GY=; b=OnHuCnNVJmf4mPdjo3+FJoMXxXOdENMSjxqMWW+1vqC0NvklukICwfGVDDTrEfjnMrKnPB tG5pfyuAGLMQGUTOmNztLCyOPj5ub40gC6EazSspB3xtdXXfM139GlsZJmWTzhNEfH96iR X+gZ6W/X4B0p7ua7966mtxtGMaQn3I6sPP5lvkeLoHNNaW8vAP0iRmxYV/9ffCRhZvIOJf MSgCgycqCLmT82q1kjfqZQpI6RyfUhiOfWTrEl+PMww524TLFWpCVRnUkhYatIFU7D63cn Nz5TKwMRnft2dDEbiMGZY4EJsmNA004XlNKtUemks9dzkZTpkvjQLSTocr0b2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674134848; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GcHwelOc/7Aky1lRvJX4BD9XXInxB0qFa9vk11ef7GY=; b=OFPdXGuhPxZF/RqClWhGn7t8o+m9QM5UR5c0erhnDvH2gonTWLOFsXaVYlPv30nqvJHKkZ OPUxDgMZYHsQMSzGWFLsC7GSTT4u8xQS97nmIhb9rNYOXOAijcV4VYJJ+uWOFAoSEm8i72 72llGtHd3vNzrWEfl9SLQzEkJLoyCGGLQwzdskgA1loTAh1G9fEtWwzmfE/IN3NCsezsKi cOa6Zi75k7MOM0++x/a8ME+cHpegYrQ5W/YR9Hi8W5aRpaNNbK7/nlIDVM3sUZF5jXJEGV L4ND/KZ8un1+ty+rywLwB8ttRYt4ryNgPXKUDBrTSyhjJLaW52fmbp/3iQdG2A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674134848; a=rsa-sha256; cv=none; b=HFi13VVnlh0GSDxWRGn06OYr4cA/jX3k2rLkhg9p7NGCnff7n6uQsYLWlBOaIFeZILD8e/ kzNk/ibYkH+h9prqvkisDmjUIoQxu0V3Ls9C02jb2/WBRaBVQgDgHp3YMBzgVRE47GsuWw T17PyT6LaWXhpPumaX6dhNSQ1Uv6QMFyQolhq/SXAx6GcxyH8RToPVF0zTyIIhGiaQtV8a xFebxUk5U8Ocs0pUbW2gEnkQvGNlTks86b+qGzGN4cbW6xAciVSi6fRhZhCzfanEVtELpa irvi62/KdtquMAV/LLPrAVk8cQ3OZFQupG09n2+2reicKHLKNQ9U3LSZCQwdWw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NyNhw3vFlzsN2; Thu, 19 Jan 2023 13:27:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30JDRScv040469; Thu, 19 Jan 2023 13:27:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30JDRSL3040467; Thu, 19 Jan 2023 13:27:28 GMT (envelope-from git) Date: Thu, 19 Jan 2023 13:27:28 GMT Message-Id: <202301191327.30JDRSL3040467@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 05187f2ffc79 - main - amd64: Fix a common typo in source code comments List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 05187f2ffc79e5959762ab8ce7067b7b8a1cdfd9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=05187f2ffc79e5959762ab8ce7067b7b8a1cdfd9 commit 05187f2ffc79e5959762ab8ce7067b7b8a1cdfd9 Author: Gordon Bergling AuthorDate: 2023-01-19 13:27:18 +0000 Commit: Gordon Bergling CommitDate: 2023-01-19 13:27:18 +0000 amd64: Fix a common typo in source code comments - s/comparision/comparison/ MFC after: 3 days --- sys/amd64/amd64/support.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/amd64/amd64/support.S b/sys/amd64/amd64/support.S index 223a9cc7f444..d8958cda430a 100644 --- a/sys/amd64/amd64/support.S +++ b/sys/amd64/amd64/support.S @@ -922,7 +922,7 @@ copy_fault: /* * casueword32. Compare and set user integer. Returns -1 on fault, - * 0 if access was successful, and 1 when comparision failed. + * 0 if access was successful, and 1 when comparison failed. * Old value is written to *oldp. * dst = %rdi, old = %esi, oldp = %rdx, new = %ecx */ @@ -1002,7 +1002,7 @@ END(casueword32_smap) /* * casueword. Compare and set user long. Returns -1 on fault, - * 0 if access was successful, and 1 when comparision failed. + * 0 if access was successful, and 1 when comparison failed. * Old value is written to *oldp. * dst = %rdi, old = %rsi, oldp = %rdx, new = %rcx */ From nobody Thu Jan 19 16:49:12 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NyT9k3K3vz2v68g; Thu, 19 Jan 2023 16:49:14 +0000 (UTC) (envelope-from mhorne@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NyT9k2q7xz3rhm; Thu, 19 Jan 2023 16:49:14 +0000 (UTC) (envelope-from mhorne@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674146954; h=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=9It0UWgx15zW1E2apS7Ke/XSQeYt8uCUU9/OsyoO33I=; b=ZJwzY4fZd/dl150fvX4jUrAJkNsCHcCV4QW5V7FVIIH4F9BMuAWfg+zs/BmT8bgvnCnNVp /FniRK+wyETe+vI5ZqBKcXjlapOR2V12T4ZCHLuQIxSGmYuJo0dHnurBffBe1mT3WWvDQl nG1Vs0cAwnVISE6o1a3oTE3QPf+XtKchsZwUDthS8J4h2fDeF/Br8gQ2uwUqT5Vq+AIPKY FsqzQc3wMbJnto4NiKMXxjSMC/OeZ+EvX0VgRyCDxE2QlgVtr/tdasHptD3wMJwlBH+SFy aEHRS0p44GkOvHXplSJISA457VtyMTKv0xD6FurHZ8cVZqpJp9yru4hePiA62A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674146954; h=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=9It0UWgx15zW1E2apS7Ke/XSQeYt8uCUU9/OsyoO33I=; b=C0jRVhcAjuQlqIOgLrWPFn2zgXSIr0Fdc3w0TubyoX31doJr2mYYbyjXWFOaMsNkRFGomc eYzCbys2L3AocSOq5VvvpdOPqZxAjtJMiyNJ+BQM0R9KWepqI1cw4p8I/X0hAsLk4N7VFv 3zsHAbeVhTksFp9Mq/9vm3MIZUgiujaH+JhUkB4YGYLSWeTVhLPUJ4UBLMfd75bIfFMLlS /oAX1iTxP3GFBPBr990v6Lo1hBARcMhcAawljTWm+kFh/wSdK/YzS+LTd8CL8zmQauP8NP MyFtuxemteizYkRuPKxVsZM8hx4Ha7PneLwiyMhW+/XwCIWlJ92cOxMLccmb/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674146954; a=rsa-sha256; cv=none; b=vxCfDkvVmp+v9q/+tVDGEX1t+TxrQ1rdsdJSz+DOC+eSJPPXB7W8F9Zasqb/LeCfe5eJUf h1bz+BREWBL0eCUjQJk/hwXFZi2VZk5tW8E8fOYeUIJyOyP5mfA6ot2bahhu45chNdueMf eKRGN0aOFT/b+X+nMeZvX1Mbj+Dul8Lr5TYph6WJlz9bbcnKd4Cof4VNN74k9Q5xt6uPZJ uCfusdGSfw3mtPFJFDDfCoJ/nGOE84SWJZoZypYq3iPOxtmemEbrblu+0PB0fT3hhZ5aI/ s8o84KWp7uGriellZWtOgHNmGVtcXHW01rJI/BsRLMKpNSQS96zcz9jFWZl27Q== Received: from [192.168.1.151] (host-173-212-76-127.public.eastlink.ca [173.212.76.127]) (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: mhorne) by smtp.freebsd.org (Postfix) with ESMTPSA id 4NyT9j6p3gznk8; Thu, 19 Jan 2023 16:49:13 +0000 (UTC) (envelope-from mhorne@freebsd.org) Message-ID: Date: Thu, 19 Jan 2023 12:49:12 -0400 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: git: b75062f23431 - main - riscv: Fix thread0.td_kstack_pages init To: Brooks Davis , Warner Losh Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202301171638.30HGcP3C091184@gitrepo.freebsd.org> Content-Language: en-CA From: Mitchell Horne In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ThisMailContainsUnwantedMimeParts: N On 1/18/23 20:57, Brooks Davis wrote: > On Wed, Jan 18, 2023 at 04:53:51PM -0700, Warner Losh wrote: >> On Wed, Jan 18, 2023 at 3:07 PM Mitchell Horne wrote: >> >>> >>> >>> On 1/17/23 12:38, Brooks Davis wrote: >>>> The branch main has been updated by brooks: >>>> >>>> URL: >>> https://cgit.FreeBSD.org/src/commit/?id=b75062f23431fbabef1e7d665cae270b144f71b1 >>>> >>>> commit b75062f23431fbabef1e7d665cae270b144f71b1 >>>> Author: Brooks Davis >>>> AuthorDate: 2023-01-17 16:36:15 +0000 >>>> Commit: Brooks Davis >>>> CommitDate: 2023-01-17 16:37:42 +0000 >>>> >>>> riscv: Fix thread0.td_kstack_pages init >>>> >>>> Commit 0ef3ca7ae37c70e9dc83475dc2e68e98e1c2a418 initialized >>>> thread0.td_kstack_pages to KSTACK_PAGES. Due to the lack of an >>>> include of opt_kstack_pages.h it used the fallback value of 4 from >>>> machine/param.h. >>> >>> Does this mean that we could/should include opt_kstack_pages.h within >>> machine/param.h (under #ifdef _KERNEL)? This header is both a consumer >>> and provider of the KSTACK_PAGES definition, by virtue of the #ifndef. I >>> think the hidden dependency should be avoided, if possible. >>> >> >> No. Including opt_XXXX.h is never OK in our .h files. They are used in too >> many places, some of which "cheat" and define _KERNEL becuse, well, they >> need to get to the kernel bits.... That will break... > Riiiiiight, I was forgetting the _KERNEL liars always ruin the fun. You are right, and the "never include opt_ headers in a header" rule is a good one. > We could potentially use the __has_include extension. I don't think we > care about building the kernel with a compiler that isn't clang or gcc > and the usage pattern defined by gcc is safe for compilers that don't > define it. We could do something like: > > #ifdef _KERNEL > #ifndef KSTACK_PAGES > #ifdef __has_include > #if __has_include("opt_kstack_pages.h") > #include "opt_kstack_pages.h" > #endif > #endif > #endif > #endif > > Yeah this would work, but I think we can agree it's one step more complicated than necessary for this edge-case which is unlikely to show up again often, if at all. I say let's just add a comment to each machine/param.h explaining the situation and that will be enough. Mitchell >> >> I do agree, however, that the current interface is less than ideal... >> >> >>> Of course, the problem at hand has been fixed and we want to keep direct >>> consumers of KSTACK_PAGES to a minimum, but I think the point still stands. >>> >> >> I think it's a good point, but the current way is likely the least-bad way >> to accomplish things. >> >> It would be much better if we could remove it from machine/param.h and >> opt_XXX.h always defines it, even the default value when it's not otherwise >> specified. However, we don't (currently) have a way to set default values >> in config(8). We could add it, since the efforts at config++ have thus far >> fallen flat.... > > I think this is probably the better direction to move. There aren't any > in-tree uses of KSTACK_PAGES so removing the definition should be fine. > > -- Brooks From nobody Thu Jan 19 18:22:10 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NyWDy5mFKz310PX; Thu, 19 Jan 2023 18:22:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NyWDy5Mnmz42ZW; Thu, 19 Jan 2023 18:22:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674152530; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cqjsaOtPFFdHsN8DI73HxfgX5h6bhC1FEiNB9Hzvgdo=; b=v/1rWx9hHo/ZaCaCLOh+AZxr/IRM4PAZljotkdW+g07C77F4dqeqAERm9/un0coOwxwNaZ Ul3GVTqaWAsxIipK0HSSJZypR/NFwlkMffcUDskNpCIvp3W5kCLEhzOcuzkr8cFboq0HWP tUWFdS5p5mhMMLgFty1GiKrfkPdpIFD2XpZ/lSceV1x5IjpFZDUCgM0LnJfoOewHekVJKJ eEFpVMYrCCtJq/hD3PsRG0YpdSYoEZDDATLG2214WEVxE2MPXW6dLWM3rzvG3Ckgq9jc0e BPVEfOqzadwXS1VjapewyPHvJzlDDyQQe27QBoA2USf7urLxXoLj4at5E+Y2EQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674152530; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cqjsaOtPFFdHsN8DI73HxfgX5h6bhC1FEiNB9Hzvgdo=; b=NOsZ+60/4Zw++APhjcSTpNaathq2wD1qkzmkFV2XJgDRUpvmARN/H2SHU/+fYV/rSVYFzv j4mrpV1F8pCoj7UW0Bd5LWNfOMvNoEYAFhglsSqbeNfFvGfJddB0ygxYNa2btOFcF0lA3r 0wMGG2l92fxyByYngK/zPNxe6ZYh5v1dYW0NiUfntNETUMbh68YCGV2DyW+MewzPD+rMlM wNq7XlpdVsK9ieEXbiwHYiAxADbXHvAiy9yf2GVRLupLWuVVTih6i5NC69KCF7Il6tSx6z 3GW3brs36/WGDzLx5NMb7+fbkzwUug2Vb92dOkn0gcXKatdsEydJ+kLMQhYnEg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674152530; a=rsa-sha256; cv=none; b=m6QxXXRMkEhEk7avQk4R8ZcEUWXRoM+ySivtFfHwAg/2XiI1JgvBF5cLUcLJNLDF10VLgy VQBz+vC2duQM3sb0GmzfsSL6knCJ2JvDJDdwbCXuPu2tmQIaUWmmFy0mK/HskxuBq+0EG5 rSUyGSoaSncM3xLdAMmADCoCrb5b2qpZfVhmGadFkqnc9UNLiOdGjhEusZuGNxN/RDCUrH kes8/JxAZpseWhNZ9UhMXr97S1nmbs/waLti4GzQ/NLfq9tcC7SvhhKHJ5yhfBHVqoSJK/ jLUWDhRLaqti6pX/FEOoCymisAss9VTkMBQS1o9s5q0sKdin/gTtxwAZFFuoLQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NyWDy49Jcz116b; Thu, 19 Jan 2023 18:22:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30JIMAE5067445; Thu, 19 Jan 2023 18:22:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30JIMAIT067444; Thu, 19 Jan 2023 18:22:10 GMT (envelope-from git) Date: Thu, 19 Jan 2023 18:22:10 GMT Message-Id: <202301191822.30JIMAIT067444@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: b36b14beda4f - main - bhyve: Avoid triggering false -Wfree-nonheap-object 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: b36b14beda4ff7ecbb906ada756141f76fcb81aa Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=b36b14beda4ff7ecbb906ada756141f76fcb81aa commit b36b14beda4ff7ecbb906ada756141f76fcb81aa Author: John Baldwin AuthorDate: 2023-01-19 18:21:50 +0000 Commit: John Baldwin CommitDate: 2023-01-19 18:21:50 +0000 bhyve: Avoid triggering false -Wfree-nonheap-object warnings. XHCI port and slot numbers are 1-based rather than 0-based. To handle this, bhyve was subtracting one item from the pointers saved in the softc so that index 1 accessed index 0 of the allocated array. However, this is UB and confused GCC 12. The compiler noticed that the calls to free() were using an offset and emitted a warning. Rather than storing UB pointers in the softc, push the decrement operation into the existing macros that wrap accesses to the relevant arrays. Reviewed by: corvink, markj Differential Revision: https://reviews.freebsd.org/D36829 --- usr.sbin/bhyve/pci_xhci.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/usr.sbin/bhyve/pci_xhci.c b/usr.sbin/bhyve/pci_xhci.c index 5bc9498a4eb4..1eceb6fe0fd3 100644 --- a/usr.sbin/bhyve/pci_xhci.c +++ b/usr.sbin/bhyve/pci_xhci.c @@ -290,10 +290,10 @@ struct pci_xhci_softc { }; -/* portregs and devices arrays are set up to start from idx=1 */ -#define XHCI_PORTREG_PTR(x,n) &(x)->portregs[(n)] -#define XHCI_DEVINST_PTR(x,n) (x)->devices[(n)] -#define XHCI_SLOTDEV_PTR(x,n) (x)->slots[(n)] +/* port and slot numbering start from 1 */ +#define XHCI_PORTREG_PTR(x,n) &((x)->portregs[(n) - 1]) +#define XHCI_DEVINST_PTR(x,n) ((x)->devices[(n) - 1]) +#define XHCI_SLOTDEV_PTR(x,n) ((x)->slots[(n) - 1]) #define XHCI_HALTED(sc) ((sc)->opregs.usbsts & XHCI_STS_HCH) @@ -2738,10 +2738,6 @@ pci_xhci_parse_devices(struct pci_xhci_softc *sc, nvlist_t *nvl) sc->devices = calloc(XHCI_MAX_DEVS, sizeof(struct pci_xhci_dev_emu *)); sc->slots = calloc(XHCI_MAX_SLOTS, sizeof(struct pci_xhci_dev_emu *)); - /* port and slot numbering start from 1 */ - sc->devices--; - sc->slots--; - ndevices = 0; slots_nvl = find_relative_config_node(nvl, "slot"); @@ -2835,7 +2831,6 @@ pci_xhci_parse_devices(struct pci_xhci_softc *sc, nvlist_t *nvl) portsfinal: sc->portregs = calloc(XHCI_MAX_DEVS, sizeof(struct pci_xhci_portregs)); - sc->portregs--; if (ndevices > 0) { for (i = 1; i <= XHCI_MAX_DEVS; i++) { @@ -2851,8 +2846,8 @@ bad: free(XHCI_DEVINST_PTR(sc, i)); } - free(sc->devices + 1); - free(sc->slots + 1); + free(sc->devices); + free(sc->slots); return (-1); } From nobody Thu Jan 19 18:30:40 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NyWQm5nG5z311PQ; Thu, 19 Jan 2023 18:30: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NyWQm5bqNz42xv; Thu, 19 Jan 2023 18:30:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674153040; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TRWIZ31pDlzJLBAJli7tQn14vkPxCO6dMXd93gjkHcc=; b=Hl/XfZaXmczAIKB2hxjk/F6XRfSniGVO5u9yJ/B7mFisyv38Z82c6qe3bWROcItQvv5vO7 xh/YDfaf7eUGPtI0XeloQv/MN7jbZ6xRFTw5aEZoMwFcvR2deZLMA2JyIwIeUSMQd/uT5O uZKFscu+0kZnq9YqfpJW+K76auHDd5UMbwCW85gpn1eHmZfIWMqaLZo4hu17AQwvjJUL6U DwJ3cxo5tIvDvLLvFAxDB73c9A2C5n7oIasB5sC7qXXyaE1MRWaSOgYacmVgnFPOPbbLWs nOi+diJqSAmEhU1Zd5WHBClN9llNDNTyFCw97QXo1/6LsY/LVXojGKBNAFanBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674153040; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TRWIZ31pDlzJLBAJli7tQn14vkPxCO6dMXd93gjkHcc=; b=aRL8kGuQ4zdA7lzYxXrn3JazqtD9GMqmcwKuzRSc0p182XMKwppKxeCJjDdiQWtGGJh52z KySNU3F2rNxS6d2kJ3eWVaZ+TeZ7e+j++et042gYMvfciW7DA6bvFjHLklC7nSKU35W3BF En4XA0k9pFeq7lAZhvLGTigW+kEZrlGu2EU8+ZS1ZTsBx7pJ3lMryLTDomsSmZq8KFEJTA apkX7wRKGtPRlJ8ejpBRZqlIM3QlEO3svuSIEXU4xC/pYonUjHJeTHyTc6SxBWD+xyGQ6P DWsj8cWvioxe9SVG/V2aUOEASDnAM44aUiJJtHmm2GQdRtv7WGUv02qopnrq4A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674153040; a=rsa-sha256; cv=none; b=I1FDCQu0wQyqYhZYtQo+qHbIMyLXxjawVhek2LgcBKtcRbXl6al9byeeSRPWVdyoSOYS/+ XePw0F/3N1Oso0Lw7tWc5m9YFsiEDnfhHuOgmfXzEJE+xctPQlXUUqJpQqI9TxkTcgtgQ9 p1FF2gr+aphtNGSPZ1Y/oa9/Mqix5aJ+INkp9mtDmbXR8n6E8JQ0h3XvdXFiJrmixinSkb qItPvIPlhhc3KPjiW9x3RxN3LA8KF36d8z5RdLNkn+PYpqigEUqS2iTWqyyX813qeKfXFu VdxOYqmu3eT2rBrGU0UW/3FWY8hh9wM6DXT4hrHE4/JDDED7/dl1OS/3RcRYjQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NyWQm4h92z116q; Thu, 19 Jan 2023 18:30:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30JIUed6077821; Thu, 19 Jan 2023 18:30:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30JIUeNW077820; Thu, 19 Jan 2023 18:30:40 GMT (envelope-from git) Date: Thu, 19 Jan 2023 18:30:40 GMT Message-Id: <202301191830.30JIUeNW077820@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: 6a284cacb1e5 - main - bhyve: Remove vmctx argument from PCI device model methods. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 6a284cacb1e56a81dff7f5c34bbbd7ed1a0b6cb1 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=6a284cacb1e56a81dff7f5c34bbbd7ed1a0b6cb1 commit 6a284cacb1e56a81dff7f5c34bbbd7ed1a0b6cb1 Author: John Baldwin AuthorDate: 2023-01-19 18:30:18 +0000 Commit: John Baldwin CommitDate: 2023-01-19 18:30:18 +0000 bhyve: Remove vmctx argument from PCI device model methods. Most of these arguments were unused. Device models which do need access to the vmctx in one of these methods can obtain it from the pi_vmctx member of the pci_devinst argument instead. Reviewed by: corvink, markj Differential Revision: https://reviews.freebsd.org/D38096 --- usr.sbin/bhyve/bhyverun.c | 4 +- usr.sbin/bhyve/pci_ahci.c | 12 +++--- usr.sbin/bhyve/pci_e82545.c | 10 ++--- usr.sbin/bhyve/pci_emul.c | 66 ++++++++++++++--------------- usr.sbin/bhyve/pci_emul.h | 25 +++++------ usr.sbin/bhyve/pci_fbuf.c | 21 +++++----- usr.sbin/bhyve/pci_hda.c | 19 ++++----- usr.sbin/bhyve/pci_hostbridge.c | 3 +- usr.sbin/bhyve/pci_lpc.c | 17 ++++---- usr.sbin/bhyve/pci_nvme.c | 27 ++++++------ usr.sbin/bhyve/pci_passthru.c | 84 ++++++++++++++++++------------------- usr.sbin/bhyve/pci_uart.c | 8 ++-- usr.sbin/bhyve/pci_virtio_9p.c | 2 +- usr.sbin/bhyve/pci_virtio_block.c | 3 +- usr.sbin/bhyve/pci_virtio_console.c | 3 +- usr.sbin/bhyve/pci_virtio_input.c | 3 +- usr.sbin/bhyve/pci_virtio_net.c | 3 +- usr.sbin/bhyve/pci_virtio_rnd.c | 3 +- usr.sbin/bhyve/pci_virtio_scsi.c | 5 +-- usr.sbin/bhyve/pci_xhci.c | 10 ++--- usr.sbin/bhyve/snapshot.c | 12 +++--- usr.sbin/bhyve/snapshot.h | 8 ++-- usr.sbin/bhyve/virtio.c | 10 ++--- usr.sbin/bhyve/virtio.h | 13 +++--- 24 files changed, 167 insertions(+), 204 deletions(-) diff --git a/usr.sbin/bhyve/bhyverun.c b/usr.sbin/bhyve/bhyverun.c index aeafed1d0c69..caa284a8dd63 100644 --- a/usr.sbin/bhyve/bhyverun.c +++ b/usr.sbin/bhyve/bhyverun.c @@ -1491,7 +1491,7 @@ main(int argc, char *argv[]) #ifdef BHYVE_SNAPSHOT if (restore_file != NULL) { fprintf(stdout, "Pausing pci devs...\r\n"); - if (vm_pause_user_devs(ctx) != 0) { + if (vm_pause_user_devs() != 0) { fprintf(stderr, "Failed to pause PCI device state.\n"); exit(1); } @@ -1515,7 +1515,7 @@ main(int argc, char *argv[]) } fprintf(stdout, "Resuming pci devs...\r\n"); - if (vm_resume_user_devs(ctx) != 0) { + if (vm_resume_user_devs() != 0) { fprintf(stderr, "Failed to resume PCI device state.\n"); exit(1); } diff --git a/usr.sbin/bhyve/pci_ahci.c b/usr.sbin/bhyve/pci_ahci.c index 700170885a13..9c023d93cab9 100644 --- a/usr.sbin/bhyve/pci_ahci.c +++ b/usr.sbin/bhyve/pci_ahci.c @@ -2197,8 +2197,7 @@ pci_ahci_host_write(struct pci_ahci_softc *sc, uint64_t offset, uint64_t value) } static void -pci_ahci_write(struct vmctx *ctx __unused, - struct pci_devinst *pi, int baridx, uint64_t offset, int size, +pci_ahci_write(struct pci_devinst *pi, int baridx, uint64_t offset, int size, uint64_t value) { struct pci_ahci_softc *sc = pi->pi_arg; @@ -2292,8 +2291,7 @@ pci_ahci_port_read(struct pci_ahci_softc *sc, uint64_t offset) } static uint64_t -pci_ahci_read(struct vmctx *ctx __unused, - struct pci_devinst *pi, int baridx, uint64_t regoff, int size) +pci_ahci_read(struct pci_devinst *pi, int baridx, uint64_t regoff, int size) { struct pci_ahci_softc *sc = pi->pi_arg; uint64_t offset; @@ -2420,7 +2418,7 @@ pci_ahci_hd_legacy_config(nvlist_t *nvl, const char *opts) } static int -pci_ahci_init(struct vmctx *ctx __unused, struct pci_devinst *pi, nvlist_t *nvl) +pci_ahci_init(struct pci_devinst *pi, nvlist_t *nvl) { char bident[sizeof("XXX:XXX:XXX")]; char node_name[sizeof("XX")]; @@ -2668,7 +2666,7 @@ done: } static int -pci_ahci_pause(struct vmctx *ctx __unused, struct pci_devinst *pi) +pci_ahci_pause(struct pci_devinst *pi) { struct pci_ahci_softc *sc; struct blockif_ctxt *bctxt; @@ -2688,7 +2686,7 @@ pci_ahci_pause(struct vmctx *ctx __unused, struct pci_devinst *pi) } static int -pci_ahci_resume(struct vmctx *ctx __unused, struct pci_devinst *pi) +pci_ahci_resume(struct pci_devinst *pi) { struct pci_ahci_softc *sc; struct blockif_ctxt *bctxt; diff --git a/usr.sbin/bhyve/pci_e82545.c b/usr.sbin/bhyve/pci_e82545.c index 49c5f986a341..bec8edb17caf 100644 --- a/usr.sbin/bhyve/pci_e82545.c +++ b/usr.sbin/bhyve/pci_e82545.c @@ -2112,8 +2112,7 @@ e82545_read_register(struct e82545_softc *sc, uint32_t offset) } static void -e82545_write(struct vmctx *ctx __unused, - struct pci_devinst *pi, int baridx, uint64_t offset, int size, +e82545_write(struct pci_devinst *pi, int baridx, uint64_t offset, int size, uint64_t value) { struct e82545_softc *sc; @@ -2163,8 +2162,7 @@ e82545_write(struct vmctx *ctx __unused, } static uint64_t -e82545_read(struct vmctx *ctx __unused, - struct pci_devinst *pi, int baridx, uint64_t offset, int size) +e82545_read(struct pci_devinst *pi, int baridx, uint64_t offset, int size) { struct e82545_softc *sc; uint64_t retval; @@ -2307,7 +2305,7 @@ e82545_reset(struct e82545_softc *sc, int drvr) } static int -e82545_init(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl) +e82545_init(struct pci_devinst *pi, nvlist_t *nvl) { char nstr[80]; struct e82545_softc *sc; @@ -2319,7 +2317,7 @@ e82545_init(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl) pi->pi_arg = sc; sc->esc_pi = pi; - sc->esc_ctx = ctx; + sc->esc_ctx = pi->pi_vmctx; pthread_mutex_init(&sc->esc_mtx, NULL); pthread_cond_init(&sc->esc_rx_cond, NULL); diff --git a/usr.sbin/bhyve/pci_emul.c b/usr.sbin/bhyve/pci_emul.c index cca0932180d6..93411751d635 100644 --- a/usr.sbin/bhyve/pci_emul.c +++ b/usr.sbin/bhyve/pci_emul.c @@ -140,8 +140,8 @@ SYSRES_MEM(PCI_EMUL_ECFG_BASE, PCI_EMUL_ECFG_SIZE); static struct pci_devemu *pci_emul_finddev(const char *name); static void pci_lintr_route(struct pci_devinst *pi); static void pci_lintr_update(struct pci_devinst *pi); -static void pci_cfgrw(struct vmctx *ctx, int in, int bus, int slot, - int func, int coff, int bytes, uint32_t *val); +static void pci_cfgrw(int in, int bus, int slot, int func, int coff, + int bytes, uint32_t *val); static __inline void CFGWRITE(struct pci_devinst *pi, int coff, uint32_t val, int bytes) @@ -447,7 +447,7 @@ pci_msix_pba_bar(struct pci_devinst *pi) } static int -pci_emul_io_handler(struct vmctx *ctx, int in, int port, +pci_emul_io_handler(struct vmctx *ctx __unused, int in, int port, int bytes, uint32_t *eax, void *arg) { struct pci_devinst *pdi = arg; @@ -464,10 +464,10 @@ pci_emul_io_handler(struct vmctx *ctx, int in, int port, pdi->pi_bar[i].addr + pdi->pi_bar[i].size) { offset = port - pdi->pi_bar[i].addr; if (in) - *eax = (*pe->pe_barread)(ctx, pdi, i, + *eax = (*pe->pe_barread)(pdi, i, offset, bytes); else - (*pe->pe_barwrite)(ctx, pdi, i, offset, + (*pe->pe_barwrite)(pdi, i, offset, bytes, *eax); return (0); } @@ -476,7 +476,7 @@ pci_emul_io_handler(struct vmctx *ctx, int in, int port, } static int -pci_emul_mem_handler(struct vmctx *ctx, int vcpu __unused, int dir, +pci_emul_mem_handler(struct vmctx *ctx __unused, int vcpu __unused, int dir, uint64_t addr, int size, uint64_t *val, void *arg1, long arg2) { struct pci_devinst *pdi = arg1; @@ -494,22 +494,22 @@ pci_emul_mem_handler(struct vmctx *ctx, int vcpu __unused, int dir, if (dir == MEM_F_WRITE) { if (size == 8) { - (*pe->pe_barwrite)(ctx, pdi, bidx, offset, + (*pe->pe_barwrite)(pdi, bidx, offset, 4, *val & 0xffffffff); - (*pe->pe_barwrite)(ctx, pdi, bidx, offset + 4, + (*pe->pe_barwrite)(pdi, bidx, offset + 4, 4, *val >> 32); } else { - (*pe->pe_barwrite)(ctx, pdi, bidx, offset, + (*pe->pe_barwrite)(pdi, bidx, offset, size, *val); } } else { if (size == 8) { - *val = (*pe->pe_barread)(ctx, pdi, bidx, + *val = (*pe->pe_barread)(pdi, bidx, offset, 4); - *val |= (*pe->pe_barread)(ctx, pdi, bidx, + *val |= (*pe->pe_barread)(pdi, bidx, offset + 4, 4) << 32; } else { - *val = (*pe->pe_barread)(ctx, pdi, bidx, + *val = (*pe->pe_barread)(pdi, bidx, offset, size); } } @@ -563,7 +563,7 @@ modify_bar_registration(struct pci_devinst *pi, int idx, int registration) } else error = unregister_inout(&iop); if (pe->pe_baraddr != NULL) - (*pe->pe_baraddr)(pi->pi_vmctx, pi, idx, registration, + (*pe->pe_baraddr)(pi, idx, registration, pi->pi_bar[idx].addr); break; case PCIBAR_MEM32: @@ -581,13 +581,13 @@ modify_bar_registration(struct pci_devinst *pi, int idx, int registration) } else error = unregister_mem(&mr); if (pe->pe_baraddr != NULL) - (*pe->pe_baraddr)(pi->pi_vmctx, pi, idx, registration, + (*pe->pe_baraddr)(pi, idx, registration, pi->pi_bar[idx].addr); break; case PCIBAR_ROM: error = 0; if (pe->pe_baraddr != NULL) - (*pe->pe_baraddr)(pi->pi_vmctx, pi, idx, registration, + (*pe->pe_baraddr)(pi, idx, registration, pi->pi_bar[idx].addr); break; default: @@ -993,7 +993,7 @@ pci_emul_init(struct vmctx *ctx, struct pci_devemu *pde, int bus, int slot, pci_set_cfgdata8(pdi, PCIR_COMMAND, PCIM_CMD_BUSMASTEREN); - err = (*pde->pe_init)(ctx, pdi, fi->fi_config); + err = (*pde->pe_init)(pdi, fi->fi_config); if (err == 0) fi->fi_devi = pdi; else @@ -1294,7 +1294,7 @@ pci_emul_fallback_handler(struct vmctx *ctx __unused, int vcpu __unused, } static int -pci_emul_ecfg_handler(struct vmctx *ctx, int vcpu __unused, int dir, +pci_emul_ecfg_handler(struct vmctx *ctx __unused, int vcpu __unused, int dir, uint64_t addr, int bytes, uint64_t *val, void *arg1 __unused, long arg2 __unused) { @@ -1307,7 +1307,7 @@ pci_emul_ecfg_handler(struct vmctx *ctx, int vcpu __unused, int dir, in = (dir == MEM_F_READ); if (in) *val = ~0UL; - pci_cfgrw(ctx, in, bus, slot, func, coff, bytes, (uint32_t *)val); + pci_cfgrw(in, bus, slot, func, coff, bytes, (uint32_t *)val); return (0); } @@ -2054,8 +2054,8 @@ pci_emul_cmdsts_write(struct pci_devinst *pi, int coff, uint32_t new, int bytes) } static void -pci_cfgrw(struct vmctx *ctx, int in, int bus, int slot, int func, - int coff, int bytes, uint32_t *eax) +pci_cfgrw(int in, int bus, int slot, int func, int coff, int bytes, + uint32_t *eax) { struct businfo *bi; struct slotinfo *si; @@ -2108,7 +2108,7 @@ pci_cfgrw(struct vmctx *ctx, int in, int bus, int slot, int func, if (in) { /* Let the device emulation override the default handler */ if (pe->pe_cfgread != NULL) { - needcfg = pe->pe_cfgread(ctx, pi, coff, bytes, eax); + needcfg = pe->pe_cfgread(pi, coff, bytes, eax); } else { needcfg = 1; } @@ -2120,7 +2120,7 @@ pci_cfgrw(struct vmctx *ctx, int in, int bus, int slot, int func, } else { /* Let the device emulation override the default handler */ if (pe->pe_cfgwrite != NULL && - (*pe->pe_cfgwrite)(ctx, pi, coff, bytes, *eax) == 0) + (*pe->pe_cfgwrite)(pi, coff, bytes, *eax) == 0) return; /* @@ -2247,7 +2247,7 @@ pci_emul_cfgaddr(struct vmctx *ctx __unused, int in, INOUT_PORT(pci_cfgaddr, CONF1_ADDR_PORT, IOPORT_F_INOUT, pci_emul_cfgaddr); static int -pci_emul_cfgdata(struct vmctx *ctx, int in, int port, +pci_emul_cfgdata(struct vmctx *ctx __unused, int in, int port, int bytes, uint32_t *eax, void *arg __unused) { int coff; @@ -2256,8 +2256,7 @@ pci_emul_cfgdata(struct vmctx *ctx, int in, int port, coff = cfgoff + (port - CONF1_DATA_PORT); if (cfgenable) { - pci_cfgrw(ctx, in, cfgbus, cfgslot, cfgfunc, coff, bytes, - eax); + pci_cfgrw(in, cfgbus, cfgslot, cfgfunc, coff, bytes, eax); } else { /* Ignore accesses to cfgdata if not enabled by cfgaddr */ if (in) @@ -2395,7 +2394,7 @@ pci_snapshot(struct vm_snapshot_meta *meta) } int -pci_pause(struct vmctx *ctx, const char *dev_name) +pci_pause(const char *dev_name) { struct pci_devemu *pde; struct pci_devinst *pdi; @@ -2420,11 +2419,11 @@ pci_pause(struct vmctx *ctx, const char *dev_name) return (0); } - return (*pde->pe_pause)(ctx, pdi); + return (*pde->pe_pause)(pdi); } int -pci_resume(struct vmctx *ctx, const char *dev_name) +pci_resume(const char *dev_name) { struct pci_devemu *pde; struct pci_devinst *pdi; @@ -2449,7 +2448,7 @@ pci_resume(struct vmctx *ctx, const char *dev_name) return (0); } - return (*pde->pe_resume)(ctx, pdi); + return (*pde->pe_resume)(pdi); } #endif @@ -2469,8 +2468,7 @@ struct pci_emul_dsoftc { #define PCI_EMUL_MSIX_MSGS 16 static int -pci_emul_dinit(struct vmctx *ctx __unused, struct pci_devinst *pi, - nvlist_t *nvl __unused) +pci_emul_dinit(struct pci_devinst *pi, nvlist_t *nvl __unused) { int error; struct pci_emul_dsoftc *sc; @@ -2499,8 +2497,7 @@ pci_emul_dinit(struct vmctx *ctx __unused, struct pci_devinst *pi, } static void -pci_emul_diow(struct vmctx *ctx __unused, - struct pci_devinst *pi, int baridx, uint64_t offset, int size, +pci_emul_diow(struct pci_devinst *pi, int baridx, uint64_t offset, int size, uint64_t value) { int i; @@ -2567,8 +2564,7 @@ pci_emul_diow(struct vmctx *ctx __unused, } static uint64_t -pci_emul_dior(struct vmctx *ctx __unused, - struct pci_devinst *pi, int baridx, uint64_t offset, int size) +pci_emul_dior(struct pci_devinst *pi, int baridx, uint64_t offset, int size) { struct pci_emul_dsoftc *sc = pi->pi_arg; uint32_t value; diff --git a/usr.sbin/bhyve/pci_emul.h b/usr.sbin/bhyve/pci_emul.h index 8a7bcb7cc83a..117fc78898a2 100644 --- a/usr.sbin/bhyve/pci_emul.h +++ b/usr.sbin/bhyve/pci_emul.h @@ -54,8 +54,7 @@ struct pci_devemu { const char *pe_emu; /* Name of device emulation */ /* instance creation */ - int (*pe_init)(struct vmctx *, struct pci_devinst *, - nvlist_t *); + int (*pe_init)(struct pci_devinst *, nvlist_t *); int (*pe_legacy_config)(nvlist_t *, const char *); const char *pe_alias; @@ -63,28 +62,24 @@ struct pci_devemu { void (*pe_write_dsdt)(struct pci_devinst *); /* config space read/write callbacks */ - int (*pe_cfgwrite)(struct vmctx *ctx, - struct pci_devinst *pi, int offset, + int (*pe_cfgwrite)(struct pci_devinst *pi, int offset, int bytes, uint32_t val); - int (*pe_cfgread)(struct vmctx *ctx, - struct pci_devinst *pi, int offset, + int (*pe_cfgread)(struct pci_devinst *pi, int offset, int bytes, uint32_t *retval); /* BAR read/write callbacks */ - void (*pe_barwrite)(struct vmctx *ctx, - struct pci_devinst *pi, int baridx, + void (*pe_barwrite)(struct pci_devinst *pi, int baridx, uint64_t offset, int size, uint64_t value); - uint64_t (*pe_barread)(struct vmctx *ctx, - struct pci_devinst *pi, int baridx, + uint64_t (*pe_barread)(struct pci_devinst *pi, int baridx, uint64_t offset, int size); - void (*pe_baraddr)(struct vmctx *ctx, struct pci_devinst *pi, + void (*pe_baraddr)(struct pci_devinst *pi, int baridx, int enabled, uint64_t address); /* Save/restore device state */ int (*pe_snapshot)(struct vm_snapshot_meta *meta); - int (*pe_pause)(struct vmctx *ctx, struct pci_devinst *pi); - int (*pe_resume)(struct vmctx *ctx, struct pci_devinst *pi); + int (*pe_pause)(struct pci_devinst *pi); + int (*pe_resume)(struct pci_devinst *pi); }; #define PCI_EMUL_SET(x) DATA_SET(pci_devemu_set, x); @@ -266,8 +261,8 @@ uint64_t pci_ecfg_base(void); int pci_bus_configured(int bus); #ifdef BHYVE_SNAPSHOT int pci_snapshot(struct vm_snapshot_meta *meta); -int pci_pause(struct vmctx *ctx, const char *dev_name); -int pci_resume(struct vmctx *ctx, const char *dev_name); +int pci_pause(const char *dev_name); +int pci_resume(const char *dev_name); #endif static __inline void diff --git a/usr.sbin/bhyve/pci_fbuf.c b/usr.sbin/bhyve/pci_fbuf.c index 4cfe872bd934..91215a124c59 100644 --- a/usr.sbin/bhyve/pci_fbuf.c +++ b/usr.sbin/bhyve/pci_fbuf.c @@ -117,8 +117,7 @@ static struct pci_fbuf_softc *fbuf_sc; #define PCI_FBUF_MSI_MSGS 4 static void -pci_fbuf_write(struct vmctx *ctx __unused, - struct pci_devinst *pi, int baridx, uint64_t offset, int size, +pci_fbuf_write(struct pci_devinst *pi, int baridx, uint64_t offset, int size, uint64_t value) { struct pci_fbuf_softc *sc; @@ -172,8 +171,7 @@ pci_fbuf_write(struct vmctx *ctx __unused, } static uint64_t -pci_fbuf_read(struct vmctx *ctx __unused, - struct pci_devinst *pi, int baridx, uint64_t offset, int size) +pci_fbuf_read(struct pci_devinst *pi, int baridx, uint64_t offset, int size) { struct pci_fbuf_softc *sc; uint8_t *p; @@ -218,8 +216,8 @@ pci_fbuf_read(struct vmctx *ctx __unused, } static void -pci_fbuf_baraddr(struct vmctx *ctx, struct pci_devinst *pi, int baridx, - int enabled, uint64_t address) +pci_fbuf_baraddr(struct pci_devinst *pi, int baridx, int enabled, + uint64_t address) { struct pci_fbuf_softc *sc; int prot; @@ -229,12 +227,13 @@ pci_fbuf_baraddr(struct vmctx *ctx, struct pci_devinst *pi, int baridx, sc = pi->pi_arg; if (!enabled) { - if (vm_munmap_memseg(ctx, sc->fbaddr, FB_SIZE) != 0) + if (vm_munmap_memseg(pi->pi_vmctx, sc->fbaddr, FB_SIZE) != 0) EPRINTLN("pci_fbuf: munmap_memseg failed"); sc->fbaddr = 0; } else { prot = PROT_READ | PROT_WRITE; - if (vm_mmap_memseg(ctx, address, VM_FRAMEBUFFER, 0, FB_SIZE, prot) != 0) + if (vm_mmap_memseg(pi->pi_vmctx, address, VM_FRAMEBUFFER, 0, + FB_SIZE, prot) != 0) EPRINTLN("pci_fbuf: mmap_memseg failed"); sc->fbaddr = address; } @@ -371,7 +370,7 @@ pci_fbuf_render(struct bhyvegc *gc, void *arg) } static int -pci_fbuf_init(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl) +pci_fbuf_init(struct pci_devinst *pi, nvlist_t *nvl) { int error; struct pci_fbuf_softc *sc; @@ -391,8 +390,8 @@ pci_fbuf_init(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl) pci_set_cfgdata8(pi, PCIR_CLASS, PCIC_DISPLAY); pci_set_cfgdata8(pi, PCIR_SUBCLASS, PCIS_DISPLAY_VGA); - sc->fb_base = vm_create_devmem( - ctx, VM_FRAMEBUFFER, "framebuffer", FB_SIZE); + sc->fb_base = vm_create_devmem(pi->pi_vmctx, VM_FRAMEBUFFER, + "framebuffer", FB_SIZE); if (sc->fb_base == MAP_FAILED) { error = -1; goto done; diff --git a/usr.sbin/bhyve/pci_hda.c b/usr.sbin/bhyve/pci_hda.c index a85935a5cae8..9b0d4bd02ba0 100644 --- a/usr.sbin/bhyve/pci_hda.c +++ b/usr.sbin/bhyve/pci_hda.c @@ -209,11 +209,11 @@ static uint64_t hda_get_clock_ns(void); /* * PCI HDA function declarations */ -static int pci_hda_init(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl); -static void pci_hda_write(struct vmctx *ctx, struct pci_devinst *pi, - int baridx, uint64_t offset, int size, uint64_t value); -static uint64_t pci_hda_read(struct vmctx *ctx, struct pci_devinst *pi, - int baridx, uint64_t offset, int size); +static int pci_hda_init(struct pci_devinst *pi, nvlist_t *nvl); +static void pci_hda_write(struct pci_devinst *pi, int baridx, uint64_t offset, + int size, uint64_t value); +static uint64_t pci_hda_read(struct pci_devinst *pi, int baridx, + uint64_t offset, int size); /* * HDA global data */ @@ -1223,11 +1223,10 @@ static uint64_t hda_get_clock_ns(void) * PCI HDA function definitions */ static int -pci_hda_init(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl) +pci_hda_init(struct pci_devinst *pi, nvlist_t *nvl) { struct hda_softc *sc = NULL; - assert(ctx != NULL); assert(pi != NULL); pci_set_cfgdata16(pi, PCIR_VENDOR, INTEL_VENDORID); @@ -1256,8 +1255,7 @@ pci_hda_init(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl) } static void -pci_hda_write(struct vmctx *ctx __unused, - struct pci_devinst *pi, int baridx, uint64_t offset, int size, +pci_hda_write(struct pci_devinst *pi, int baridx, uint64_t offset, int size, uint64_t value) { struct hda_softc *sc = pi->pi_arg; @@ -1274,8 +1272,7 @@ pci_hda_write(struct vmctx *ctx __unused, } static uint64_t -pci_hda_read(struct vmctx *ctx __unused, - struct pci_devinst *pi, int baridx, uint64_t offset, int size) +pci_hda_read(struct pci_devinst *pi, int baridx, uint64_t offset, int size) { struct hda_softc *sc = pi->pi_arg; uint64_t value = 0; diff --git a/usr.sbin/bhyve/pci_hostbridge.c b/usr.sbin/bhyve/pci_hostbridge.c index 50c334d8e408..f0878d97a77e 100644 --- a/usr.sbin/bhyve/pci_hostbridge.c +++ b/usr.sbin/bhyve/pci_hostbridge.c @@ -37,8 +37,7 @@ __FBSDID("$FreeBSD$"); #include "pci_emul.h" static int -pci_hostbridge_init(struct vmctx *ctx __unused, struct pci_devinst *pi, - nvlist_t *nvl) +pci_hostbridge_init(struct pci_devinst *pi, nvlist_t *nvl) { const char *value; u_int vendor, device; diff --git a/usr.sbin/bhyve/pci_lpc.c b/usr.sbin/bhyve/pci_lpc.c index e275946d9621..548726e27d0d 100644 --- a/usr.sbin/bhyve/pci_lpc.c +++ b/usr.sbin/bhyve/pci_lpc.c @@ -398,8 +398,7 @@ pci_lpc_uart_dsdt(void) LPC_DSDT(pci_lpc_uart_dsdt); static int -pci_lpc_cfgwrite(struct vmctx *ctx, struct pci_devinst *pi, - int coff, int bytes, uint32_t val) +pci_lpc_cfgwrite(struct pci_devinst *pi, int coff, int bytes, uint32_t val) { int pirq_pin; @@ -410,7 +409,7 @@ pci_lpc_cfgwrite(struct vmctx *ctx, struct pci_devinst *pi, if (coff >= 0x68 && coff <= 0x6b) pirq_pin = coff - 0x68 + 5; if (pirq_pin != 0) { - pirq_write(ctx, pirq_pin, val); + pirq_write(pi->pi_vmctx, pirq_pin, val); pci_set_cfgdata8(pi, coff, pirq_read(pirq_pin)); return (0); } @@ -419,16 +418,14 @@ pci_lpc_cfgwrite(struct vmctx *ctx, struct pci_devinst *pi, } static void -pci_lpc_write(struct vmctx *ctx __unused, - struct pci_devinst *pi __unused, int baridx __unused, +pci_lpc_write(struct pci_devinst *pi __unused, int baridx __unused, uint64_t offset __unused, int size __unused, uint64_t value __unused) { } static uint64_t -pci_lpc_read(struct vmctx *ctx __unused, - struct pci_devinst *pi __unused, int baridx __unused, uint64_t offset __unused, - int size __unused) +pci_lpc_read(struct pci_devinst *pi __unused, int baridx __unused, + uint64_t offset __unused, int size __unused) { return (0); } @@ -437,7 +434,7 @@ pci_lpc_read(struct vmctx *ctx __unused, #define LPC_VENDOR 0x8086 static int -pci_lpc_init(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl __unused) +pci_lpc_init(struct pci_devinst *pi, nvlist_t *nvl __unused) { /* * Do not allow more than one LPC bridge to be configured. @@ -457,7 +454,7 @@ pci_lpc_init(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl __unused) return (-1); } - if (lpc_init(ctx) != 0) + if (lpc_init(pi->pi_vmctx) != 0) return (-1); /* initialize config space */ diff --git a/usr.sbin/bhyve/pci_nvme.c b/usr.sbin/bhyve/pci_nvme.c index 75e6f247501a..cf1c815096d3 100644 --- a/usr.sbin/bhyve/pci_nvme.c +++ b/usr.sbin/bhyve/pci_nvme.c @@ -1100,7 +1100,7 @@ pci_nvme_reset(struct pci_nvme_softc *sc) } static int -pci_nvme_init_controller(struct vmctx *ctx, struct pci_nvme_softc *sc) +pci_nvme_init_controller(struct pci_nvme_softc *sc) { uint16_t acqs, asqs; @@ -1119,8 +1119,8 @@ pci_nvme_init_controller(struct vmctx *ctx, struct pci_nvme_softc *sc) return (-1); } sc->submit_queues[0].size = asqs; - sc->submit_queues[0].qbase = vm_map_gpa(ctx, sc->regs.asq, - sizeof(struct nvme_command) * asqs); + sc->submit_queues[0].qbase = vm_map_gpa(sc->nsc_pi->pi_vmctx, + sc->regs.asq, sizeof(struct nvme_command) * asqs); if (sc->submit_queues[0].qbase == NULL) { EPRINTLN("%s: ASQ vm_map_gpa(%lx) failed", __func__, sc->regs.asq); @@ -1140,8 +1140,8 @@ pci_nvme_init_controller(struct vmctx *ctx, struct pci_nvme_softc *sc) return (-1); } sc->compl_queues[0].size = acqs; - sc->compl_queues[0].qbase = vm_map_gpa(ctx, sc->regs.acq, - sizeof(struct nvme_completion) * acqs); + sc->compl_queues[0].qbase = vm_map_gpa(sc->nsc_pi->pi_vmctx, + sc->regs.acq, sizeof(struct nvme_completion) * acqs); if (sc->compl_queues[0].qbase == NULL) { EPRINTLN("%s: ACQ vm_map_gpa(%lx) failed", __func__, sc->regs.acq); @@ -2930,8 +2930,8 @@ pci_nvme_bar0_reg_dumps(const char *func, uint64_t offset, int iswrite) } static void -pci_nvme_write_bar_0(struct vmctx *ctx, struct pci_nvme_softc* sc, - uint64_t offset, int size, uint64_t value) +pci_nvme_write_bar_0(struct pci_nvme_softc *sc, uint64_t offset, int size, + uint64_t value) { uint32_t ccreg; @@ -3014,7 +3014,7 @@ pci_nvme_write_bar_0(struct vmctx *ctx, struct pci_nvme_softc* sc, /* transition 1-> causes controller reset */ pci_nvme_reset_locked(sc); else - pci_nvme_init_controller(ctx, sc); + pci_nvme_init_controller(sc); } /* Insert the iocqes, iosqes and en bits from the write */ @@ -3062,8 +3062,8 @@ pci_nvme_write_bar_0(struct vmctx *ctx, struct pci_nvme_softc* sc, } static void -pci_nvme_write(struct vmctx *ctx, struct pci_devinst *pi, - int baridx, uint64_t offset, int size, uint64_t value) +pci_nvme_write(struct pci_devinst *pi, int baridx, uint64_t offset, int size, + uint64_t value) { struct pci_nvme_softc* sc = pi->pi_arg; @@ -3078,7 +3078,7 @@ pci_nvme_write(struct vmctx *ctx, struct pci_devinst *pi, switch (baridx) { case 0: - pci_nvme_write_bar_0(ctx, sc, offset, size, value); + pci_nvme_write_bar_0(sc, offset, size, value); break; default: @@ -3125,8 +3125,7 @@ static uint64_t pci_nvme_read_bar_0(struct pci_nvme_softc* sc, static uint64_t -pci_nvme_read(struct vmctx *ctx __unused, - struct pci_devinst *pi, int baridx, uint64_t offset, int size) +pci_nvme_read(struct pci_devinst *pi, int baridx, uint64_t offset, int size) { struct pci_nvme_softc* sc = pi->pi_arg; @@ -3276,7 +3275,7 @@ pci_nvme_resized(struct blockif_ctxt *bctxt __unused, void *arg, } static int -pci_nvme_init(struct vmctx *ctx __unused, struct pci_devinst *pi, nvlist_t *nvl) +pci_nvme_init(struct pci_devinst *pi, nvlist_t *nvl) { struct pci_nvme_softc *sc; uint32_t pci_membar_sz; diff --git a/usr.sbin/bhyve/pci_passthru.c b/usr.sbin/bhyve/pci_passthru.c index 3dbb80eec9fa..f42bbbda655f 100644 --- a/usr.sbin/bhyve/pci_passthru.c +++ b/usr.sbin/bhyve/pci_passthru.c @@ -386,8 +386,8 @@ msix_table_read(struct passthru_softc *sc, uint64_t offset, int size) } static void -msix_table_write(struct vmctx *ctx, struct passthru_softc *sc, - uint64_t offset, int size, uint64_t data) +msix_table_write(struct passthru_softc *sc, uint64_t offset, int size, + uint64_t data) { struct pci_devinst *pi; struct msix_table_entry *entry; @@ -445,7 +445,7 @@ msix_table_write(struct vmctx *ctx, struct passthru_softc *sc, /* If the entry is masked, don't set it up */ if ((entry->vector_control & PCIM_MSIX_VCTRL_MASK) == 0 || (vector_control & PCIM_MSIX_VCTRL_MASK) == 0) { - (void)vm_setup_pptdev_msix(ctx, 0, + (void)vm_setup_pptdev_msix(sc->psc_pi->pi_vmctx, 0, sc->psc_sel.pc_bus, sc->psc_sel.pc_dev, sc->psc_sel.pc_func, index, entry->addr, entry->msg_data, entry->vector_control); @@ -454,7 +454,7 @@ msix_table_write(struct vmctx *ctx, struct passthru_softc *sc, } static int -init_msix_table(struct vmctx *ctx __unused, struct passthru_softc *sc) +init_msix_table(struct passthru_softc *sc) { struct pci_devinst *pi = sc->psc_pi; struct pci_bar_mmap pbm; @@ -515,7 +515,7 @@ init_msix_table(struct vmctx *ctx __unused, struct passthru_softc *sc) } static int -cfginitbar(struct vmctx *ctx __unused, struct passthru_softc *sc) +cfginitbar(struct passthru_softc *sc) { int i, error; struct pci_devinst *pi; @@ -596,7 +596,7 @@ cfginitbar(struct vmctx *ctx __unused, struct passthru_softc *sc) } static int -cfginit(struct vmctx *ctx, struct pci_devinst *pi, int bus, int slot, int func) +cfginit(struct pci_devinst *pi, int bus, int slot, int func) { int error; struct passthru_softc *sc; @@ -615,7 +615,7 @@ cfginit(struct vmctx *ctx, struct pci_devinst *pi, int bus, int slot, int func) goto done; } - if (cfginitbar(ctx, sc) != 0) { + if (cfginitbar(sc) != 0) { warnx("failed to initialize BARs for PCI %d/%d/%d", bus, slot, func); goto done; @@ -629,7 +629,7 @@ cfginit(struct vmctx *ctx, struct pci_devinst *pi, int bus, int slot, int func) * a BAR was enabled, as otherwise the PCIOCBARMMAP might fail on us. */ if (pci_msix_table_bar(pi) >= 0) { - error = init_msix_table(ctx, sc); + error = init_msix_table(sc); if (error != 0) { warnx( "failed to initialize MSI-X table for PCI %d/%d/%d: %d", @@ -682,8 +682,7 @@ passthru_legacy_config(nvlist_t *nvl, const char *opts) } static int -passthru_init_rom(struct vmctx *const ctx __unused, - struct passthru_softc *const sc, const char *const romfile) +passthru_init_rom(struct passthru_softc *const sc, const char *const romfile) { if (romfile == NULL) { return (0); @@ -799,7 +798,7 @@ passthru_lookup_pptdev(const char *name, int *bus, int *slot, int *func) } static int -passthru_init(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl) +passthru_init(struct pci_devinst *pi, nvlist_t *nvl) { int bus, slot, func, error, memflags; struct passthru_softc *sc; @@ -808,7 +807,7 @@ passthru_init(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl) sc = NULL; error = 1; - memflags = vm_get_memflags(ctx); + memflags = vm_get_memflags(pi->pi_vmctx); if (!(memflags & VM_MEM_F_WIRED)) { warnx("passthru requires guest memory to be wired"); return (error); @@ -837,7 +836,7 @@ passthru_init(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl) GET_INT_CONFIG(func, "func"); } - if (vm_assign_pptdev(ctx, bus, slot, func) != 0) { + if (vm_assign_pptdev(pi->pi_vmctx, bus, slot, func) != 0) { warnx("PCI device at %d/%d/%d is not using the ppt(4) driver", bus, slot, func); goto done; @@ -849,11 +848,11 @@ passthru_init(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl) sc->psc_pi = pi; /* initialize config space */ - if ((error = cfginit(ctx, pi, bus, slot, func)) != 0) + if ((error = cfginit(pi, bus, slot, func)) != 0) goto done; /* initialize ROM */ - if ((error = passthru_init_rom(ctx, sc, + if ((error = passthru_init_rom(sc, get_config_value_node(nvl, "rom"))) != 0) goto done; @@ -861,7 +860,7 @@ passthru_init(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl) done: if (error) { free(sc); - vm_unassign_pptdev(ctx, bus, slot, func); + vm_unassign_pptdev(pi->pi_vmctx, bus, slot, func); } return (error); } @@ -903,8 +902,7 @@ msixcap_access(struct passthru_softc *sc, int coff) } static int -passthru_cfgread(struct vmctx *ctx __unused, struct pci_devinst *pi, int coff, - int bytes, uint32_t *rv) +passthru_cfgread(struct pci_devinst *pi, int coff, int bytes, uint32_t *rv) { struct passthru_softc *sc; @@ -948,8 +946,7 @@ passthru_cfgread(struct vmctx *ctx __unused, struct pci_devinst *pi, int coff, } static int -passthru_cfgwrite(struct vmctx *ctx, struct pci_devinst *pi, int coff, - int bytes, uint32_t val) +passthru_cfgwrite(struct pci_devinst *pi, int coff, int bytes, uint32_t val) { int error, msix_table_entries, i; struct passthru_softc *sc; @@ -969,7 +966,7 @@ passthru_cfgwrite(struct vmctx *ctx, struct pci_devinst *pi, int coff, if (msicap_access(sc, coff)) { pci_emul_capwrite(pi, coff, bytes, val, sc->psc_msi.capoff, PCIY_MSI); - error = vm_setup_pptdev_msi(ctx, 0, sc->psc_sel.pc_bus, + error = vm_setup_pptdev_msi(pi->pi_vmctx, 0, sc->psc_sel.pc_bus, sc->psc_sel.pc_dev, sc->psc_sel.pc_func, pi->pi_msi.addr, pi->pi_msi.msg_data, pi->pi_msi.maxmsgnum); @@ -984,7 +981,7 @@ passthru_cfgwrite(struct vmctx *ctx, struct pci_devinst *pi, int coff, if (pi->pi_msix.enabled) { msix_table_entries = pi->pi_msix.table_count; for (i = 0; i < msix_table_entries; i++) { - error = vm_setup_pptdev_msix(ctx, 0, + error = vm_setup_pptdev_msix(pi->pi_vmctx, 0, sc->psc_sel.pc_bus, sc->psc_sel.pc_dev, sc->psc_sel.pc_func, i, pi->pi_msix.table[i].addr, @@ -995,8 +992,9 @@ passthru_cfgwrite(struct vmctx *ctx, struct pci_devinst *pi, int coff, err(1, "vm_setup_pptdev_msix"); } } else { - error = vm_disable_pptdev_msix(ctx, sc->psc_sel.pc_bus, - sc->psc_sel.pc_dev, sc->psc_sel.pc_func); + error = vm_disable_pptdev_msix(pi->pi_vmctx, + sc->psc_sel.pc_bus, sc->psc_sel.pc_dev, + sc->psc_sel.pc_func); if (error) err(1, "vm_disable_pptdev_msix"); } @@ -1029,8 +1027,8 @@ passthru_cfgwrite(struct vmctx *ctx, struct pci_devinst *pi, int coff, } static void -passthru_write(struct vmctx *ctx, struct pci_devinst *pi, int baridx, - uint64_t offset, int size, uint64_t value) +passthru_write(struct pci_devinst *pi, int baridx, uint64_t offset, int size, + uint64_t value) { struct passthru_softc *sc; struct pci_bar_ioreq pio; @@ -1038,7 +1036,7 @@ passthru_write(struct vmctx *ctx, struct pci_devinst *pi, int baridx, sc = pi->pi_arg; if (baridx == pci_msix_table_bar(pi)) { - msix_table_write(ctx, sc, offset, size, value); + msix_table_write(sc, offset, size, value); } else { assert(pi->pi_bar[baridx].type == PCIBAR_IO); assert(size == 1 || size == 2 || size == 4); @@ -1057,8 +1055,7 @@ passthru_write(struct vmctx *ctx, struct pci_devinst *pi, int baridx, } static uint64_t -passthru_read(struct vmctx *ctx __unused, struct pci_devinst *pi, int baridx, - uint64_t offset, int size) +passthru_read(struct pci_devinst *pi, int baridx, uint64_t offset, int size) { struct passthru_softc *sc; struct pci_bar_ioreq pio; @@ -1089,8 +1086,8 @@ passthru_read(struct vmctx *ctx __unused, struct pci_devinst *pi, int baridx, } static void -passthru_msix_addr(struct vmctx *ctx, struct pci_devinst *pi, int baridx, - int enabled, uint64_t address) +passthru_msix_addr(struct pci_devinst *pi, int baridx, int enabled, + uint64_t address) { struct passthru_softc *sc; size_t remaining; @@ -1100,13 +1097,14 @@ passthru_msix_addr(struct vmctx *ctx, struct pci_devinst *pi, int baridx, table_offset = rounddown2(pi->pi_msix.table_offset, 4096); if (table_offset > 0) { if (!enabled) { - if (vm_unmap_pptdev_mmio(ctx, sc->psc_sel.pc_bus, + if (vm_unmap_pptdev_mmio(pi->pi_vmctx, + sc->psc_sel.pc_bus, sc->psc_sel.pc_dev, sc->psc_sel.pc_func, address, table_offset) != 0) warnx("pci_passthru: unmap_pptdev_mmio failed"); } else { - if (vm_map_pptdev_mmio(ctx, sc->psc_sel.pc_bus, + if (vm_map_pptdev_mmio(pi->pi_vmctx, sc->psc_sel.pc_bus, sc->psc_sel.pc_dev, *** 398 LINES SKIPPED *** From nobody Thu Jan 19 18:33:28 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NyWV04wtzz31205; Thu, 19 Jan 2023 18:33:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NyWV03rrPz43bN; Thu, 19 Jan 2023 18:33:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674153208; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lQ5TFdocosVWewQ5Qyf7vVZW4AptGQ6va2im6xf2cDM=; b=AOc8/jNwAssER5jC18QRnhE1+8mcaZWWpmI5Gc39yLdLJ45YJQd7IDEiKgdQbixrBEK8L9 l8haD/UKwk8USb7X1c8UFnGAM0a1dsZWdBoRHfC2TtD3FpiUQAex2Nmg2N6Cv+VHrM4MoC flGZmOew9c9Nl9QtdU8+wTHet9/MEubek9Dve3VMrvcQ/pEbzX3Y5R8zHxrez5sxQC4XNj iHkznAt6g6vFcwAe3XfTJ+wvUYakLhB0Z2kczf6GJIHGKwIxY62uLpmYWUaFRWGS9r7pyw /BM81K3YhNcoD8Gt8W0To11hxmDJdIRlXnelUzLGs8Vl0EdBEZJGuTB5PMl7SQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674153208; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lQ5TFdocosVWewQ5Qyf7vVZW4AptGQ6va2im6xf2cDM=; b=QUyYp5FMpO6Oy+A4OchGDgf2fMTvxw7caUWd42iHnJcUEKiRGpPVF4rCfl2xxfKbbDSzuX 46z/AyhCM+IPc8sAZgIwAECDZrfTcYP8J9XJHw2IiPMUsP3bp5JV51UWwiVmQ7r6dlUCU1 o6ksfS+cNwXuQVpcjdWy42mIe1gV9j8pRjPkRnVFO7hK3lpVW0A0mVYVubZmrObkuGrK0/ /OGHquocUyZXPvmkVrPz9bP5xQpXsA8wo4hYlXZf9MUPTs2hWRwgD1FqnJZd9yy0oInlGj jkznVmEawrN2RDwElg26vlEYLWI6IHPlqgr4gkhK7LOo6QU5mLNWvt0s8g8JjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674153208; a=rsa-sha256; cv=none; b=wf/k+7CyUoDaqPUmuODtcU5P2CBVDR4zepgXpjO6ep600gWp5TJtFdhx9FvfNcW/CL8bnu wCpLI6fbJxc3hTvz+IWkPfo61UV3Llbv9jS96QvDgQeOgp+XwBis7mmwjJ5HBXdfBU1F7u l1R9lNDh/9owYS3KkKQkLQh9dCBJ1myYJbbgcPOmWjIuuNAumOR6p7LxxJ05tNAfNGIHwI jbcw7yPJlftZmf00RLSIiUC4rUVl/wxSA40bu83A8vaJrbr/HL9657KFLSerlOd59UWscb LSo8K+0s25dJoM28CceMZ9Gz2LXhm9sge+q3wxYUJ1D3qI9eQkZTwmre4EKhZw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NyWV02wKWz11Jx; Thu, 19 Jan 2023 18:33:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30JIXSg5083097; Thu, 19 Jan 2023 18:33:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30JIXSf8083096; Thu, 19 Jan 2023 18:33:28 GMT (envelope-from git) Date: Thu, 19 Jan 2023 18:33:28 GMT Message-Id: <202301191833.30JIXSf8083096@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: fc1901abcfa9 - main - : Reduce overly broad header pollution. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: fc1901abcfa95bbdf985ee86ce24fa73c30d5076 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=fc1901abcfa95bbdf985ee86ce24fa73c30d5076 commit fc1901abcfa95bbdf985ee86ce24fa73c30d5076 Author: John Baldwin AuthorDate: 2023-01-19 18:32:45 +0000 Commit: John Baldwin CommitDate: 2023-01-19 18:32:45 +0000 : Reduce overly broad header pollution. Commit d3f96f661050e9bd21fe29931992a8b9e67ff189 removed and replaced it with the very broad . However, none of the changes to sysctl.h in that commit require anything defined in . On the other hand, does still make use of queue macros. Drop the include of and re-add . Reviewed by: imp, kib, asomers Obtained from: CheriBSD Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D37950 --- sys/sys/sysctl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/sysctl.h b/sys/sys/sysctl.h index 207ffe4a62e7..79da4772615f 100644 --- a/sys/sys/sysctl.h +++ b/sys/sys/sysctl.h @@ -39,8 +39,8 @@ #define _SYS_SYSCTL_H_ #ifdef _KERNEL +#include #include -#include #endif /* From nobody Thu Jan 19 22:25:41 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Nycdx6n84z2srFQ; Thu, 19 Jan 2023 22:25:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Nycdx6HZrz4LbY; Thu, 19 Jan 2023 22:25:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674167141; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mK1mny0hRRjLks7CyGJ3nsedMyPNCeJNh6kZcYhypTk=; b=sBO/aODWw/zjkTLR44qa5g09NPiSoTDlmfdVFlH6nXEcFSVSgJLCR165wTVgTTlAOkOslg auV72iX4KFxZRGFZOa+GjL+7NPyg+slVcSj25OrRnLJt0P0fpRuLqyqmHQy9AH7t0024KC 00qSJtQjj7GeHifXjQgKtVKo/WbA8bP1TF2FtAomMnw6t42Lba+zZLhvfDFv9fs1b5Q4Bm Fyyxf8JNC8tdVbtY9pomQqCf/kIBSe6swCKEnKyMr1gB4L+gNqxrL+Tx3fCeRdt38FERI7 0/OHrtSVYYiguExGdLsgmyD0ErDJYgbjNmsao6aRcbXUk36hC7/Gom5qlSwJhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674167141; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mK1mny0hRRjLks7CyGJ3nsedMyPNCeJNh6kZcYhypTk=; b=MSKdwL3y8Jr2NNIVLlZf4WgB8MNw/Kz+AXyVrPFUsEj/JsKSnSksI/gUWqCNyId2YJBk6g WyX2HuTtiOiO4zl5lwHjyI8YLDcY8Kt312U6xGIvzZj6eBcvop9Jt9jgdBZoFXn6D/LU9D QxKZaNAJNb8ENATgQXXqHzc1tn1AlBuBBzO3fIIw4axbOOaw8n+V59CvEtkw+ln+6Obs+S dLfH/2JuybGdVzl6Gbfu9rVMjoYFC9j4M0snTggzcvWNwiQLqD6VQwTUpkBBbeZ9IcgBUI qPeQc0peW0Ovme/MgkkloNlMYqgx2mNS9JXrBCTzu22UBNqWFHOteAnz+1HD0g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674167141; a=rsa-sha256; cv=none; b=tWAOItmbPfR91XBPK+8Lzg35JPiBD0B7Dqs//fCUXiT7bHJ2brruglI4XiuxNBXGm8LRJ5 abUK2LEKmF/TB/TDtsCjruVKcV/iSvcdgwHXQ8LTe86OeJB0q7hCL+mbKSNbVf8CC/eMJI Auv1+G5BMCobmXMhr5fBT3cW8vqlGJFqX0jsHM+kJEy895tQIQfWBIW5MV2peyCF29meoX mdVpsVtgc1mZAN684brOH+J2mfHQWCdGi7VijEZhou39ACbA5cXIKiy8rpLY3o6yh7l/AR EnGUIkIW629TE7SJ1u2/keth2e67f9jF8oYvdphP+4tv1BFXAOOltHiW04opJQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Nycdx5LCkz16Qy; Thu, 19 Jan 2023 22:25:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30JMPf2j011701; Thu, 19 Jan 2023 22:25:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30JMPfqW011700; Thu, 19 Jan 2023 22:25:41 GMT (envelope-from git) Date: Thu, 19 Jan 2023 22:25:41 GMT Message-Id: <202301192225.30JMPfqW011700@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: 16fbf0191243 - main - Makefile: Avoid sanitizing PATH on non-FreeBSD systems List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 16fbf0191243e7c9dff6615b1424b5d39186b36c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=16fbf0191243e7c9dff6615b1424b5d39186b36c commit 16fbf0191243e7c9dff6615b1424b5d39186b36c Author: Jake Freeland AuthorDate: 2023-01-19 22:24:44 +0000 Commit: Jessica Clarke CommitDate: 2023-01-19 22:24:44 +0000 Makefile: Avoid sanitizing PATH on non-FreeBSD systems Allow the build process to find host binaries during the host-symlinks target when cross-building on non-FreeBSD systems. Whilst most non-FreeBSD systems have all the needed tools in /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin (the final path added by host-symlinks itself), Homebrew for macOS on Arm defaults to /opt/homebrew/bin, other more niche systems may also deviate and users may expect tools in a customised PATH to be picked up, unlike on FreeBSD where we want to ensure everything comes from base. In particular, (un)xz are needed from Homebrew on macOS, and thus cannot be found on Arm without this. Note that non-FreeBSD builds enforce BUILD_WITH_STRICT_TMPPATH, and so the actual main build steps will still use a sanitised PATH. Reviewed by: jrtc27, arichardson MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D37991 --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index 7ca6d5d9c218..62d2869bfc03 100644 --- a/Makefile +++ b/Makefile @@ -217,7 +217,12 @@ META_TGT_WHITELIST+= \ .ORDER: buildkernel reinstallkernel .ORDER: buildkernel reinstallkernel.debug +# Only sanitize PATH on FreeBSD. +# PATH may include tools that are required to cross-build +# on non-FreeBSD systems. +.if ${.MAKE.OS} == "FreeBSD" PATH= /sbin:/bin:/usr/sbin:/usr/bin +.endif MAKEOBJDIRPREFIX?= /usr/obj _MAKEOBJDIRPREFIX!= /usr/bin/env -i PATH=${PATH} ${MAKE} MK_AUTO_OBJ=no \ ${.MAKEFLAGS:MMAKEOBJDIRPREFIX=*} __MAKE_CONF=${__MAKE_CONF} \ From nobody Thu Jan 19 22:49:12 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Nyd9452Rtz2svPS; Thu, 19 Jan 2023 22:49: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Nyd944VN6z4PBR; Thu, 19 Jan 2023 22:49:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674168552; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0f28niiw2d7uqRnSGieiAW1txXQcMDXUnq9ngYLMTt4=; b=y3vB6MT+GBQnh8CSiM6H4jCef/7YlLkriMfYpdqApt7vDlZPwLuLQ3m2yx3+3B8AXfuS0V 8URkxrbcKVYnBe2QYvcj/wfecmgsOsKq1prHqhZ5FEfKzuZlBEWnwDkHBYDVAF34zuLEcz LlOcFOe4TKB/+BFO3r+dtoA8wzBHNuqEbU46OSmeWVwB8nbJG3Qp4w44Uasi5gwnM/nrgx VrYUClVpIm9VLgTz8C+GCVa44nYF6iTyqkEhnrJYG7z8DmKNAx5Hz98OUk4nlXXltciKj2 ZukPr21jzWbHfuQHYWEGxxSD83J786SFsp7O+dB9Z1DxtX/ZLU59ynE/BLPifw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674168552; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0f28niiw2d7uqRnSGieiAW1txXQcMDXUnq9ngYLMTt4=; b=VAytz0axJROd3lRRVNGjPDu87wtW2AD96DTCRBJKuT60n820VeyMmQqXe80BL6VruqHCsY DInV+SwezpiR7lX1I/v0rcjz/bcZf/k+q7RrnMXO5pqX3D3Wh6ut1Qo+n191QQ3qJSNWdk QDxxp6h2DLSHwCAtOdcBrcI+zBadrZBcM0lP/CVkoY/yuMaSDaycS83fK/55ILsld1Kg5j kuAOGEhwrW5EQrC3pylLlAKoVuen70idZ3epjq6u8OVyxZ0KeN8aOb9lTBrT323+hfRJ9T H4OQem23Ze29LEhVw6HRArmuXOZZSYXDL5bifmHnxbkSN+g3i7yVefaAm0dUhQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674168552; a=rsa-sha256; cv=none; b=llnoqqDX1HyDM6i4NqgvBvhrhnF3xOcUaIgm3zGn4a17Xb2Botvwdo2q9bcn6Bgz7yPnGe dJZc7Y+PBtpD03vZdMWOH16qS6xCy1fHl5pPMUT4YUt/6NbcTXTHtnt26uTGCH5+ReB/Kg JTjAlgep0Sb1W5kGl8U19kUXFa4w7TjZvRKgVYiF5PgIypaQTzFyxzZv5uf8zYKBem0QSa a2TKDpI8lwjYoaHy595nAC5YKyx7TciyOKq02CZEAH4d/cWE2Ny23iZOF0kW6dmRq/5LdC bTN+7nzHHuw5pHvKCPUUAd4S056dUmJsypRvn7tsaSVq0OVIo8M3O3BKbssWRg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Nyd943XVPz172P; Thu, 19 Jan 2023 22:49:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30JMnCl4040411; Thu, 19 Jan 2023 22:49:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30JMnCXf040410; Thu, 19 Jan 2023 22:49:12 GMT (envelope-from git) Date: Thu, 19 Jan 2023 22:49:12 GMT Message-Id: <202301192249.30JMnCXf040410@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: 43703bc489ec - main - stdlib.h: Fix qsort_r compatibility with GCC 12. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 43703bc489ec504b947b869045c492ed38c1a69c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=43703bc489ec504b947b869045c492ed38c1a69c commit 43703bc489ec504b947b869045c492ed38c1a69c Author: John Baldwin AuthorDate: 2023-01-19 22:48:52 +0000 Commit: John Baldwin CommitDate: 2023-01-19 22:48:52 +0000 stdlib.h: Fix qsort_r compatibility with GCC 12. GCC 12 (unlike GCC 9) does not match a function argument passed to the old qsort_r() API (as is used in the qsort_r_compat test) to a function pointer type via __generic. It treats the function type as a distinct type from a function pointer. As a workaround, add a second definition of qsort_r for GCC 12 which uses the bare function type. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D37410 --- include/stdlib.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/stdlib.h b/include/stdlib.h index 754e8f5f5fd4..30d24aea1c10 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -352,9 +352,15 @@ void __qsort_r_compat(void *, size_t, size_t, void *, __sym_compat(qsort_r, __qsort_r_compat, FBSD_1.0); #endif #if defined(__generic) && !defined(__cplusplus) +#if __GNUC__ == 12 +#define qsort_r(base, nel, width, arg4, arg5) \ + __generic(arg5, int (void *, const void *, const void *), \ + __qsort_r_compat, qsort_r)(base, nel, width, arg4, arg5) +#else #define qsort_r(base, nel, width, arg4, arg5) \ __generic(arg5, int (*)(void *, const void *, const void *), \ __qsort_r_compat, qsort_r)(base, nel, width, arg4, arg5) +#endif #elif defined(__cplusplus) __END_DECLS extern "C++" { From nobody Thu Jan 19 23:11:13 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NydfX4gFbz2sy7D for ; Thu, 19 Jan 2023 23:11:16 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (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 "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NydfX31jXz4Qdy for ; Thu, 19 Jan 2023 23:11:16 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f45.google.com with SMTP id l41-20020a05600c1d2900b003daf986faaeso2454732wms.3 for ; Thu, 19 Jan 2023 15:11:16 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=hNyihUG+xqV0Jr16I7HNSjlPlaecKCo3MYRwsLarIfc=; b=7dw9IY3xFMZh3Qhp1EaVUdp3W2TbRQKsBoGkrpHPDCNHin2O2k6mSEHTqloMP83xdJ /QlBQ2poxB1G48Lms/P+/AC7cL/8jVWY+C3LEGuje3xY1navPD6EQqPzaDUYiY5VscKn /sBrIdCKJs935vFccuynYQccmFkzilcsNvQW6Oa8uzNpf2ptzImw5XvJyaH/kb3b65x/ 3ebug7OEM5BxDa5vWQc3qIGXzKdSspPuUUIXqgoKP9EDDOM3Kt55Q1JHFhvFxOi7xOzu m3lvV1vJ/VTTW2gtrcspikBESFciNItbrlrXveOGBJe2ROwxMKyQJFWpFCnhxe3pMXV7 Tbzw== X-Gm-Message-State: AFqh2krG2Uw/sXG+PWAOxlY0/2IwGpsk1Uy3FBX7zI1Jst8jvH9AjnCT 7bgHlvAdTPvRBGjMh3xibyjZjw== X-Google-Smtp-Source: AMrXdXsgYNhPQkKfBv4Ico8VFslQe9fCTflxBQnYq6AWOARVAYHPHiYow/IqzyrTcQnTzp8xMPWVhg== X-Received: by 2002:a05:600c:600e:b0:3c6:e62e:2e74 with SMTP id az14-20020a05600c600e00b003c6e62e2e74mr8200340wmb.15.1674169874533; Thu, 19 Jan 2023 15:11:14 -0800 (PST) Received: from smtpclient.apple (global-5-143.n-2.net.cam.ac.uk. [131.111.5.143]) by smtp.gmail.com with ESMTPSA id v7-20020a05600c444700b003db06493ee7sm456472wmn.47.2023.01.19.15.11.13 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Jan 2023 15:11:14 -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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: git: 43703bc489ec - main - stdlib.h: Fix qsort_r compatibility with GCC 12. From: Jessica Clarke In-Reply-To: <202301192249.30JMnCXf040410@gitrepo.freebsd.org> Date: Thu, 19 Jan 2023 23:11:13 +0000 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <202301192249.30JMnCXf040410@gitrepo.freebsd.org> To: John Baldwin X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Rspamd-Queue-Id: 4NydfX31jXz4Qdy X-Spamd-Bar: ---- 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-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 19 Jan 2023, at 22:49, John Baldwin wrote: >=20 > The branch main has been updated by jhb: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D43703bc489ec504b947b869045c492ed= 38c1a69c >=20 > commit 43703bc489ec504b947b869045c492ed38c1a69c > Author: John Baldwin > AuthorDate: 2023-01-19 22:48:52 +0000 > Commit: John Baldwin > CommitDate: 2023-01-19 22:48:52 +0000 >=20 > stdlib.h: Fix qsort_r compatibility with GCC 12. >=20 > GCC 12 (unlike GCC 9) does not match a function argument passed to = the > old qsort_r() API (as is used in the qsort_r_compat test) to a > function pointer type via __generic. It treats the function type = as a > distinct type from a function pointer. As a workaround, add a = second > definition of qsort_r for GCC 12 which uses the bare function type. As far as I can tell both versions of GCC behave the same. The difference is whether __generic is using _Generic or __builtin_choose_expr with __builtin_types_compatible_p, since function and function pointer types are not compatible. Clang will take the __has_extension path, but GCC will take the builtins path, and so Clang works but GCC doesn=E2=80=99t. As a result of this change you=E2=80=99ve likely broken code that does qsort_r(..., &f) as that will have the opposite problem. The right fix is to force arg5 to decay, such as by (ab)using the comma operator with __generic((0, arg5), ...). I guess that probably belongs in the fallback implementation of __generic though, not here, which would give the following real fix: diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index 83ba7584e5b9..f7eff4768151 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -312,6 +312,9 @@ * __generic(). Unlike _Generic(), this macro can only distinguish * between a single type, so it requires nested invocations to * distinguish multiple cases. + * + * Note that the comma operator is used to force expr to decay in order = to + * match _Generic. */ =20 #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >=3D 201112L) || \ @@ -321,7 +324,7 @@ #elif __GNUC_PREREQ__(3, 1) && !defined(__cplusplus) #define __generic(expr, t, yes, no) = \ __builtin_choose_expr( = \ - __builtin_types_compatible_p(__typeof(expr), t), yes, no) + __builtin_types_compatible_p(__typeof((0, expr)), t), yes, = no) #endif =20 /* Does that work instead for you after reverting this commit? Jess > Reviewed by: emaste > Differential Revision: https://reviews.freebsd.org/D37410 > --- > include/stdlib.h | 6 ++++++ > 1 file changed, 6 insertions(+) >=20 > diff --git a/include/stdlib.h b/include/stdlib.h > index 754e8f5f5fd4..30d24aea1c10 100644 > --- a/include/stdlib.h > +++ b/include/stdlib.h > @@ -352,9 +352,15 @@ void __qsort_r_compat(void *, size_t, size_t, = void *, > __sym_compat(qsort_r, __qsort_r_compat, FBSD_1.0); > #endif > #if defined(__generic) && !defined(__cplusplus) > +#if __GNUC__ =3D=3D 12 > +#define qsort_r(base, nel, width, arg4, arg5) = \ > + __generic(arg5, int (void *, const void *, const void *), = \ > + __qsort_r_compat, qsort_r)(base, nel, width, arg4, arg5) > +#else > #define qsort_r(base, nel, width, arg4, arg5) = \ > __generic(arg5, int (*)(void *, const void *, const void *), = \ > __qsort_r_compat, qsort_r)(base, nel, width, arg4, arg5) > +#endif > #elif defined(__cplusplus) > __END_DECLS > extern "C++" { From nobody Thu Jan 19 23:31:30 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Nyf5y07ptz2t1L7 for ; Thu, 19 Jan 2023 23:31:34 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.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 "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Nyf5x1Q6Sz3D2G for ; Thu, 19 Jan 2023 23:31:33 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of jrtc27@jrtc27.com designates 209.85.221.42 as permitted sender) smtp.mailfrom=jrtc27@jrtc27.com; dmarc=none Received: by mail-wr1-f42.google.com with SMTP id q10so3405695wrs.2 for ; Thu, 19 Jan 2023 15:31:33 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=9XHDxxph9npO1ci8/XwVp8KvjPPWrleqGDgxEhFaCTI=; b=YS6aJCNcsWzbdORlDdOJ4Lvd5K3fLHd9U8gP1YjTBiu71oGB/BYZ27GJxKlML6xH7z p8JocgaiagCgH+i6WkajjWPD5cOGvsz9tsgier+v7AskA2D3VYU9p++dDSOmhUOzUVDf zbYIH0AihxFVUmfSsILRvND+fT9o66XrOmUewFKB4sQB4alKS/ei8qJ5nB7GUip3+PTw oh27i+5Ai6haYKaFqJTzGcQw+nJQu6klwJY4aDixsMzJvLkKItg161qAyisk10zjlwgW PJwcYFkGVLTv9//j1vU85zhZ42BCC2W516am6RiVR3oTUXwdMosWPev8p5lnGnO3Etb9 yEYA== X-Gm-Message-State: AFqh2koW5CRZeSMccpLiGR6/JIRPzUUNPnsc9qC9z08QnfXgxFIJv9ey AALWWohzStJ89QeqkaXrEWZu8A== X-Google-Smtp-Source: AMrXdXvJenTA5AayZFD4lpbH6aHgPW89ikniVCpM1QTO9CvD93/KT0EebwayKSwWYnpKIqqE1RNy1g== X-Received: by 2002:adf:e6cc:0:b0:2be:53d1:51ce with SMTP id y12-20020adfe6cc000000b002be53d151cemr884355wrm.37.1674171091671; Thu, 19 Jan 2023 15:31:31 -0800 (PST) Received: from smtpclient.apple (global-5-143.n-2.net.cam.ac.uk. [131.111.5.143]) by smtp.gmail.com with ESMTPSA id r9-20020adff709000000b00291f1a5ced6sm13911907wrp.53.2023.01.19.15.31.30 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Jan 2023 15:31:31 -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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: git: 43703bc489ec - main - stdlib.h: Fix qsort_r compatibility with GCC 12. From: Jessica Clarke In-Reply-To: Date: Thu, 19 Jan 2023 23:31:30 +0000 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <8C902ED3-D9F8-4F88-8D43-F8E4809C9D44@freebsd.org> References: <202301192249.30JMnCXf040410@gitrepo.freebsd.org> To: John Baldwin X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Spamd-Result: default: False [-2.50 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.998]; MV_CASE(0.50)[]; FORGED_SENDER(0.30)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_THREE(0.00)[4]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; TO_DN_EQ_ADDR_SOME(0.00)[]; DMARC_NA(0.00)[freebsd.org]; FROM_HAS_DN(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.221.42:from]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FREEFALL_USER(0.00)[jrtc27]; MIME_TRACE(0.00)[0:+]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; R_DKIM_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; MID_RHS_MATCH_FROM(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.221.42:from] X-Rspamd-Queue-Id: 4Nyf5x1Q6Sz3D2G X-Spamd-Bar: -- X-ThisMailContainsUnwantedMimeParts: N On 19 Jan 2023, at 23:11, Jessica Clarke wrote: >=20 > On 19 Jan 2023, at 22:49, John Baldwin wrote: >>=20 >> The branch main has been updated by jhb: >>=20 >> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D43703bc489ec504b947b869045c492ed= 38c1a69c >>=20 >> commit 43703bc489ec504b947b869045c492ed38c1a69c >> Author: John Baldwin >> AuthorDate: 2023-01-19 22:48:52 +0000 >> Commit: John Baldwin >> CommitDate: 2023-01-19 22:48:52 +0000 >>=20 >> stdlib.h: Fix qsort_r compatibility with GCC 12. >>=20 >> GCC 12 (unlike GCC 9) does not match a function argument passed to = the >> old qsort_r() API (as is used in the qsort_r_compat test) to a >> function pointer type via __generic. It treats the function type = as a >> distinct type from a function pointer. As a workaround, add a = second >> definition of qsort_r for GCC 12 which uses the bare function type. >=20 > As far as I can tell both versions of GCC behave the same. The > difference is whether __generic is using _Generic or > __builtin_choose_expr with __builtin_types_compatible_p, since = function > and function pointer types are not compatible. Clang will take the > __has_extension path, but GCC will take the builtins path, and so = Clang > works but GCC doesn=E2=80=99t. >=20 > As a result of this change you=E2=80=99ve likely broken code that does > qsort_r(..., &f) as that will have the opposite problem. The right fix > is to force arg5 to decay, such as by (ab)using the comma operator = with > __generic((0, arg5), ...). I guess that probably belongs in the > fallback implementation of __generic though, not here, which would = give > the following real fix: >=20 > diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h > index 83ba7584e5b9..f7eff4768151 100644 > --- a/sys/sys/cdefs.h > +++ b/sys/sys/cdefs.h > @@ -312,6 +312,9 @@ > * __generic(). Unlike _Generic(), this macro can only distinguish > * between a single type, so it requires nested invocations to > * distinguish multiple cases. > + * > + * Note that the comma operator is used to force expr to decay in = order to > + * match _Generic. > */ >=20 > #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >=3D 201112L) || \ > @@ -321,7 +324,7 @@ > #elif __GNUC_PREREQ__(3, 1) && !defined(__cplusplus) > #define __generic(expr, t, yes, no) = \ > __builtin_choose_expr( = \ > - __builtin_types_compatible_p(__typeof(expr), t), yes, no) > + __builtin_types_compatible_p(__typeof((0, expr)), t), yes, = no) With (expr) instead of expr, of course... Jess > #endif >=20 > /* >=20 > Does that work instead for you after reverting this commit? >=20 > Jess >=20 >> Reviewed by: emaste >> Differential Revision: https://reviews.freebsd.org/D37410 >> --- >> include/stdlib.h | 6 ++++++ >> 1 file changed, 6 insertions(+) >>=20 >> diff --git a/include/stdlib.h b/include/stdlib.h >> index 754e8f5f5fd4..30d24aea1c10 100644 >> --- a/include/stdlib.h >> +++ b/include/stdlib.h >> @@ -352,9 +352,15 @@ void __qsort_r_compat(void *, size_t, size_t, = void *, >> __sym_compat(qsort_r, __qsort_r_compat, FBSD_1.0); >> #endif >> #if defined(__generic) && !defined(__cplusplus) >> +#if __GNUC__ =3D=3D 12 >> +#define qsort_r(base, nel, width, arg4, arg5) = \ >> + __generic(arg5, int (void *, const void *, const void *), = \ >> + __qsort_r_compat, qsort_r)(base, nel, width, arg4, arg5) >> +#else >> #define qsort_r(base, nel, width, arg4, arg5) = \ >> __generic(arg5, int (*)(void *, const void *, const void *), = \ >> __qsort_r_compat, qsort_r)(base, nel, width, arg4, arg5) >> +#endif >> #elif defined(__cplusplus) >> __END_DECLS >> extern "C++" { From nobody Thu Jan 19 23:36:05 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NyfCD5cdTz2t1yK for ; Thu, 19 Jan 2023 23:36:08 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) (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 "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NyfCD0QJZz3Dt7 for ; Thu, 19 Jan 2023 23:36:08 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of jrtc27@jrtc27.com designates 209.85.128.54 as permitted sender) smtp.mailfrom=jrtc27@jrtc27.com; dmarc=none Received: by mail-wm1-f54.google.com with SMTP id e19-20020a05600c439300b003db1cac0c1fso3236976wmn.5 for ; Thu, 19 Jan 2023 15:36:08 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=0E5blZrwouTbMzb5jg+vbAyiqrzXujdiKqNsy19G0Mk=; b=yTyw/fUI34jDcDxEqHI7CMPcGpUZwN0NSx9OomespDCfrl16i77yd1iE99nHnQ94bQ CrI23wTQckwaW3sgml2b6XDw1hrsj2lwXV6XZ7qr1jKPT/vbcRBRYC/b3TWrF2DJ9fX3 4+NImufmH0dk9sXUYoS+tUQG8gNbAsi4MoGM+4DYfUvXJ2pjWY5nZqO00zQhrl4AQFwK xQPavvsY5Zg/rtexAebGWjZ4UXS2k70bd8j/wBxtPOZzMyxodijR3HUXHugxq6ZjNHkM BCsdOj6VzC5CNmVCCXrnltJrid3CevvRlbtI0FXrB/dbQmjw50ep3hQoSz3gwpZp46BS 53cw== X-Gm-Message-State: AFqh2ko2bBwrpQKf26lUNEbkbYAQE+uyrNvINlts9wfhiNgk+CAk+JYc TF8GIHMKoaVfduQOQnud8Upha+Tvg85FvExw+x6w2Q== X-Google-Smtp-Source: AMrXdXuVKkC+sxHkt9mdoKLVkUY/atpqdKmCsmZ79pR9KGZHC/cWb8qcvYv/LJh2JO7pzBObF1R+uw== X-Received: by 2002:a05:600c:33a8:b0:3d9:ed3b:5b3e with SMTP id o40-20020a05600c33a800b003d9ed3b5b3emr11567466wmp.19.1674171366754; Thu, 19 Jan 2023 15:36:06 -0800 (PST) Received: from smtpclient.apple (global-5-143.n-2.net.cam.ac.uk. [131.111.5.143]) by smtp.gmail.com with ESMTPSA id g10-20020a05600c310a00b003d99da8d30asm527240wmo.46.2023.01.19.15.36.06 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Jan 2023 15:36:06 -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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: git: 43703bc489ec - main - stdlib.h: Fix qsort_r compatibility with GCC 12. From: Jessica Clarke In-Reply-To: <8C902ED3-D9F8-4F88-8D43-F8E4809C9D44@freebsd.org> Date: Thu, 19 Jan 2023 23:36:05 +0000 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <0F50986C-BC29-4A7A-89F0-DAB3863BF51B@freebsd.org> References: <202301192249.30JMnCXf040410@gitrepo.freebsd.org> <8C902ED3-D9F8-4F88-8D43-F8E4809C9D44@freebsd.org> To: John Baldwin X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Spamd-Result: default: False [-2.50 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.998]; MV_CASE(0.50)[]; FORGED_SENDER(0.30)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_THREE(0.00)[4]; FROM_HAS_DN(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; TO_DN_EQ_ADDR_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[freebsd.org]; RCVD_IN_DNSWL_NONE(0.00)[209.85.128.54:from]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FREEFALL_USER(0.00)[jrtc27]; ARC_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; R_DKIM_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.128.54:from] X-Rspamd-Queue-Id: 4NyfCD0QJZz3Dt7 X-Spamd-Bar: -- X-ThisMailContainsUnwantedMimeParts: N On 19 Jan 2023, at 23:31, Jessica Clarke wrote: >=20 > On 19 Jan 2023, at 23:11, Jessica Clarke wrote: >>=20 >> On 19 Jan 2023, at 22:49, John Baldwin wrote: >>>=20 >>> The branch main has been updated by jhb: >>>=20 >>> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D43703bc489ec504b947b869045c492ed= 38c1a69c >>>=20 >>> commit 43703bc489ec504b947b869045c492ed38c1a69c >>> Author: John Baldwin >>> AuthorDate: 2023-01-19 22:48:52 +0000 >>> Commit: John Baldwin >>> CommitDate: 2023-01-19 22:48:52 +0000 >>>=20 >>> stdlib.h: Fix qsort_r compatibility with GCC 12. >>>=20 >>> GCC 12 (unlike GCC 9) does not match a function argument passed to = the >>> old qsort_r() API (as is used in the qsort_r_compat test) to a >>> function pointer type via __generic. It treats the function type = as a >>> distinct type from a function pointer. As a workaround, add a = second >>> definition of qsort_r for GCC 12 which uses the bare function type. >>=20 >> As far as I can tell both versions of GCC behave the same. The >> difference is whether __generic is using _Generic or >> __builtin_choose_expr with __builtin_types_compatible_p, since = function >> and function pointer types are not compatible. Clang will take the >> __has_extension path, but GCC will take the builtins path, and so = Clang >> works but GCC doesn=E2=80=99t. >>=20 >> As a result of this change you=E2=80=99ve likely broken code that = does >> qsort_r(..., &f) as that will have the opposite problem. The right = fix >> is to force arg5 to decay, such as by (ab)using the comma operator = with >> __generic((0, arg5), ...). I guess that probably belongs in the >> fallback implementation of __generic though, not here, which would = give >> the following real fix: >>=20 >> diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h >> index 83ba7584e5b9..f7eff4768151 100644 >> --- a/sys/sys/cdefs.h >> +++ b/sys/sys/cdefs.h >> @@ -312,6 +312,9 @@ >> * __generic(). Unlike _Generic(), this macro can only distinguish >> * between a single type, so it requires nested invocations to >> * distinguish multiple cases. >> + * >> + * Note that the comma operator is used to force expr to decay in = order to >> + * match _Generic. >> */ >>=20 >> #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >=3D 201112L) || \ >> @@ -321,7 +324,7 @@ >> #elif __GNUC_PREREQ__(3, 1) && !defined(__cplusplus) >> #define __generic(expr, t, yes, no) = \ >> __builtin_choose_expr( = \ >> - __builtin_types_compatible_p(__typeof(expr), t), yes, no) >> + __builtin_types_compatible_p(__typeof((0, expr)), t), yes, = no) >=20 > With (expr) instead of expr, of course... And as for why GCC 9 works: It doesn=E2=80=99t. The tests just aren=E2=80=99t built because = MK_CXX=3Dno disables MK_TESTS. GCC 12 only hits it because it=E2=80=99s new enough to be able = to build libc++ and not force MK_CXX=3Dno. It would be nice to unpick that... Jess > Jess >=20 >> #endif >>=20 >> /* >>=20 >> Does that work instead for you after reverting this commit? >>=20 >> Jess >>=20 >>> Reviewed by: emaste >>> Differential Revision: https://reviews.freebsd.org/D37410 >>> --- >>> include/stdlib.h | 6 ++++++ >>> 1 file changed, 6 insertions(+) >>>=20 >>> diff --git a/include/stdlib.h b/include/stdlib.h >>> index 754e8f5f5fd4..30d24aea1c10 100644 >>> --- a/include/stdlib.h >>> +++ b/include/stdlib.h >>> @@ -352,9 +352,15 @@ void __qsort_r_compat(void *, size_t, size_t, = void *, >>> __sym_compat(qsort_r, __qsort_r_compat, FBSD_1.0); >>> #endif >>> #if defined(__generic) && !defined(__cplusplus) >>> +#if __GNUC__ =3D=3D 12 >>> +#define qsort_r(base, nel, width, arg4, arg5) = \ >>> + __generic(arg5, int (void *, const void *, const void *), = \ >>> + __qsort_r_compat, qsort_r)(base, nel, width, arg4, arg5) >>> +#else >>> #define qsort_r(base, nel, width, arg4, arg5) = \ >>> __generic(arg5, int (*)(void *, const void *, const void *), = \ >>> __qsort_r_compat, qsort_r)(base, nel, width, arg4, arg5) >>> +#endif >>> #elif defined(__cplusplus) >>> __END_DECLS >>> extern "C++" { From nobody Thu Jan 19 23:50:06 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NyfWM4YS1z2t3Kk; Thu, 19 Jan 2023 23:50:07 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NyfWM43fPz3GFn; Thu, 19 Jan 2023 23:50:07 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674172207; h=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=yOdS/3pe1JMneN6kDKnXBxqPe2bAulXPrwv853sHWmo=; b=yFJ90uCAPmj+vdQWFKr9iYtgvwMZzkchGsgeAOc1qNw1gEqd4Mz4Q2oQSS1HA5D3ji9K/Q Vehcj9BGRmmz7kK4xcEiIlOYogpietny+HfeOLbb24twucQDNRD6DW+kiag1BDoXEYCBCl 5kLFrYytrDfguai0+Jp42+f5zJrkrlkugDQihcF8SHLUbKX4H6ezFTvn0kAMHgTafaTyvC svFKOEL4ZWGwFn18F48IzhtCfa0jm1Q5u8CCMn4xgrJgl6cv/RWIq/EfEGoLIJQYNXUDpI nbF4ib9WNP8doq2BdYJH2SSayw2UhOhXnlyHiyyPdIi6N4YPjh8wsqovi01MsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674172207; h=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=yOdS/3pe1JMneN6kDKnXBxqPe2bAulXPrwv853sHWmo=; b=sSzQ3YJTIrX5dzs/jjFeZpvYPmYT1buBUJL7fbY3MoVvfz042rDp+vdSWk3Zy6x3qlg5sD XEaUYK/0GqVb5BEebr4MzhTOFQXrmzeeRBW+V/4lXy9nvxLJOl7YrENsIBmBF3kAsLKGnD Aks3AfuppNFs9FjOSIKc26AHLwZCVeudcmpe4Ms2YZyPLa/Y66iCS6QbaSBZpvlRhrTt/c AubEMzaZqAEYGtT6f2BH8mfWGlmn9to8J12tpATV9zuckNgVyTr0jmXhjlmSixCKctmmvp tIrGscqAH+V0aW+j8a72x3o6TndHP7398MOos5Rw/i6fmK4WzN4HFf2j+SBkvg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674172207; a=rsa-sha256; cv=none; b=nuDcGKXFozYk95Mdly/3OIuEozd03+NUtcXk+SH76QjHZUNVeBZW71QoAymNB5g+NH5+jP tCqwE/refEYL79ofniJlMt7EinuuIYWGuzIbjCnnEhhl3ek5oyuBFBO8O7yfXk1NHQCE5w OfL8WhoByy3+tpU77vhsMRaBHVKCXo0mtESWK2ipLwj4Twrvkk/BRxVfOYqG8mzt9P5mi3 sOj5+29QFAUk/18eNVgW0VQ0yVU4FgITvORaZdD1Fggcu9CbRso3C7yvu1dgfL36MsRen1 1xrqn+DU1jaTuygjV7KDeehIY6W76WjdDl7WVKbRAW15Bp3rP7O70GxKTq6XpQ== Received: from [10.0.1.4] (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4NyfWL6sfkzxpZ; Thu, 19 Jan 2023 23:50:06 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <343ea0b5-28fa-efa6-b3d3-4126570e40f2@FreeBSD.org> Date: Thu, 19 Jan 2023 15:50:06 -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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: git: 43703bc489ec - main - stdlib.h: Fix qsort_r compatibility with GCC 12. Content-Language: en-US To: Jessica Clarke Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" References: <202301192249.30JMnCXf040410@gitrepo.freebsd.org> <8C902ED3-D9F8-4F88-8D43-F8E4809C9D44@freebsd.org> <0F50986C-BC29-4A7A-89F0-DAB3863BF51B@freebsd.org> From: John Baldwin In-Reply-To: <0F50986C-BC29-4A7A-89F0-DAB3863BF51B@freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ThisMailContainsUnwantedMimeParts: N On 1/19/23 3:36 PM, Jessica Clarke wrote: > On 19 Jan 2023, at 23:31, Jessica Clarke wrote: >> >> On 19 Jan 2023, at 23:11, Jessica Clarke wrote: >>> >>> On 19 Jan 2023, at 22:49, John Baldwin wrote: >>>> >>>> The branch main has been updated by jhb: >>>> >>>> URL: https://cgit.FreeBSD.org/src/commit/?id=43703bc489ec504b947b869045c492ed38c1a69c >>>> >>>> commit 43703bc489ec504b947b869045c492ed38c1a69c >>>> Author: John Baldwin >>>> AuthorDate: 2023-01-19 22:48:52 +0000 >>>> Commit: John Baldwin >>>> CommitDate: 2023-01-19 22:48:52 +0000 >>>> >>>> stdlib.h: Fix qsort_r compatibility with GCC 12. >>>> >>>> GCC 12 (unlike GCC 9) does not match a function argument passed to the >>>> old qsort_r() API (as is used in the qsort_r_compat test) to a >>>> function pointer type via __generic. It treats the function type as a >>>> distinct type from a function pointer. As a workaround, add a second >>>> definition of qsort_r for GCC 12 which uses the bare function type. >>> >>> As far as I can tell both versions of GCC behave the same. The >>> difference is whether __generic is using _Generic or >>> __builtin_choose_expr with __builtin_types_compatible_p, since function >>> and function pointer types are not compatible. Clang will take the >>> __has_extension path, but GCC will take the builtins path, and so Clang >>> works but GCC doesn’t. >>> >>> As a result of this change you’ve likely broken code that does >>> qsort_r(..., &f) as that will have the opposite problem. The right fix >>> is to force arg5 to decay, such as by (ab)using the comma operator with >>> __generic((0, arg5), ...). I guess that probably belongs in the >>> fallback implementation of __generic though, not here, which would give >>> the following real fix: >>> >>> diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h >>> index 83ba7584e5b9..f7eff4768151 100644 >>> --- a/sys/sys/cdefs.h >>> +++ b/sys/sys/cdefs.h >>> @@ -312,6 +312,9 @@ >>> * __generic(). Unlike _Generic(), this macro can only distinguish >>> * between a single type, so it requires nested invocations to >>> * distinguish multiple cases. >>> + * >>> + * Note that the comma operator is used to force expr to decay in order to >>> + * match _Generic. >>> */ >>> >>> #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \ >>> @@ -321,7 +324,7 @@ >>> #elif __GNUC_PREREQ__(3, 1) && !defined(__cplusplus) >>> #define __generic(expr, t, yes, no) \ >>> __builtin_choose_expr( \ >>> - __builtin_types_compatible_p(__typeof(expr), t), yes, no) >>> + __builtin_types_compatible_p(__typeof((0, expr)), t), yes, no) >> >> With (expr) instead of expr, of course... > > And as for why GCC 9 works: > > It doesn’t. The tests just aren’t built because MK_CXX=no disables > MK_TESTS. GCC 12 only hits it because it’s new enough to be able to > build libc++ and not force MK_CXX=no. > > It would be nice to unpick that... Hmm, ok I thought I had managed to build this test with GCC 9 previously, but perhaps not. I will give the cdefs.h change a go locally though and see what happens. -- John Baldwin From nobody Fri Jan 20 01:55:23 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NyjHv2Dvlz2v2w7; Fri, 20 Jan 2023 01:55:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NyjHv1jXYz3QP6; Fri, 20 Jan 2023 01:55:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674179723; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U3JTqyi98sIRhlYfpcx+gp6S9grWtBtPBbD3zBLLZ2E=; b=XkFw6Q7/u83psOi9lkjZESHRrynZ520/7K25V3i9/hOoW0sp9z3FrLz4TrcHtRvbLguugf GqNEQKIBBj7IqQIaauo7wmNv3xBgz2fK1Bp4HKo4rZHLFyn/YGUVgDCYMHLP61UeLIWiax JAJaF2c6AoUlPFuVdVaiPoJtpUPZMMfID59xD5VXrKsCTb+H7BAOmQAot78oClI9YXHgO4 LyXAB1Fh6q2bSNaN0Nn8DrzJ8qcNwPaEsoiVOIYQTXBaTNdZr7mSEyDmkVsMDgNe+shDjq AXlwZ1j7Xu12AQ3lE6XhVIn2BjfCHBRCjqVnyoXFLeoN8sI4ZFjHsxMRyEOPhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674179723; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U3JTqyi98sIRhlYfpcx+gp6S9grWtBtPBbD3zBLLZ2E=; b=EKzM3jYBCGT/3QbwfCyHxfyPC+6lMveqwzPLKIA7ynX6dcIkf6qIpyLEWSKxtl4hZ/qQNk QNd92+Vw1I7n3xzIMc+x1fkHqczttWs9BH5kFRwqOYlKuIb8ArYg3CgnvNyqSVNt6s66AE gO74qxWyDAx9pH7cRf3SLVTlqYEjF+sH8ZjqGgwfuUhCjy9OAIbwrD20mSGsDXZN6+CgPh mO6ejFCkVNEDnoYdDq1R7XEQLSsw9vWV7wFp5r74WGpt7aYc6Y54KwkiIQGptekCbL7Wtx 8tir22nLrwk98FkeSjOsGuPg7ulUShy/iCgPV6qrYSc+ZntnbvX9rG+q77smaQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674179723; a=rsa-sha256; cv=none; b=TRrAZ5sxdR+fAMeQq9AOMRoQD6d0tTK+K477PPcgaNeVguJ9cRNsHbVZ2xYT4gMy25fyMG EBrjmUxmN0F+t4pJndi5ODateNaKfshpD39+z4UENdg6JnPslzDv384JFAjrUHhgDAR8PR mEYsPqY6Y36pBfSQyXnPG//XVHJFM+La464OMzgLNJcgcEYc14I+vsSMCwVpseQsxTS2T/ ZjjaTphBl4clVGC0J3v2Gn/mGgbVsE9YcNGc0fTDHhP8CAr+vhLtlRCqPpn+t/ebqBQZSK CCDmrvjanLzFsklQu/tNSCQKUTOEu6+GPfmpTG8lYcGXQi/EXct5SbZ/mDnApw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NyjHv0mz0z1CdQ; Fri, 20 Jan 2023 01:55:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30K1tN8v011553; Fri, 20 Jan 2023 01:55:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30K1tNZk011552; Fri, 20 Jan 2023 01:55:23 GMT (envelope-from git) Date: Fri, 20 Jan 2023 01:55:23 GMT Message-Id: <202301200155.30K1tNZk011552@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: 70e1b11216c4 - main - vm_object.c: minor 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 70e1b11216c43e95118728f3684a1b8abc7034a1 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=70e1b11216c43e95118728f3684a1b8abc7034a1 commit 70e1b11216c43e95118728f3684a1b8abc7034a1 Author: Konstantin Belousov AuthorDate: 2023-01-19 18:32:16 +0000 Commit: Konstantin Belousov CommitDate: 2023-01-20 01:54:42 +0000 vm_object.c: minor style Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/vm/vm_object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index 99b28d9460a3..8e146318f0dc 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -1212,7 +1212,7 @@ vm_object_sync(vm_object_t object, vm_ooffset_t offset, vm_size_t size, vm_object_mightbedirty(object) != 0 && ((vp = object->handle)->v_vflag & VV_NOSYNC) == 0) { VM_OBJECT_WUNLOCK(object); - (void) vn_start_write(vp, &mp, V_WAIT); + (void)vn_start_write(vp, &mp, V_WAIT); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); if (syncio && !invalidate && offset == 0 && atop(size) == object->size) { From nobody Fri Jan 20 01:55:24 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NyjHw3QTZz2v3C7; Fri, 20 Jan 2023 01:55: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NyjHw2yNGz3QgK; Fri, 20 Jan 2023 01:55:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674179724; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7647YPsQmPeQOTs2URXEgmQSPqmJ7/yO5tfN4V7IDBs=; b=Vg/6bsBGnvaU3LiuMNy8vsrGYVZsYg1SPM7lFO9tzRDRAi+9GkechmfZDJ0iRJl94ZQZ75 bQzRHHUUd2seZcSmT7KV62rlBHF3L+IB7RvvA5UBodbQg7D1b89XXRdKrvx9K05+ZdyKmp kAKoxO/Q2K2p7bFpIqI8ij6O+cKPcnmrR1jZlx8RX7851vKPj9G2c9ZV0gdt8jiJYfvVva emYWXNOTFghlJY4OVhj17ENdV1h1/XBvCVaPrEn4XCwQtlrutNPCf4uXnDsRzkc/aielbV kwopLdJTy3Ve6ZIwV5IXK8xvuH8NU9xj/rtK8wDWkaVUfoxtrCgtDW1y1EpIFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674179724; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7647YPsQmPeQOTs2URXEgmQSPqmJ7/yO5tfN4V7IDBs=; b=wZqePfDPVUtjZhL72zYF050kRARL76Z60udpfc2VkeH4hIUGKKQlYij6udbSzDsmwmqVyV NRs+lF0bDMOyGVmZaid+9xPIa31qUqjQTfAdS0EBfK9G2m6bXVbqlGg+HHZI5t+tN4fox6 iSjA01VGdVenj6sVnoaDFnwMtri5NHx52Q4m4pz4CtmtwWgL+i6EEFdQFGUg8060m+he4z O/ZnIQ2iB5Y+54n5gZGFI03TOa+x+smiOZqSOP9tjT4Veo212ZlEpc0VWELS7z836m5Xzh xpSvWI/6xA1SHUqk7POvWueQK7herVU3XESHZdDQ47ZzBUOZnITwPUhwxOPTwg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674179724; a=rsa-sha256; cv=none; b=sNvfhTMpPxa9kCRUXBkSANylGQ5LcfiC1sRztnaNI5pOSzN0tuN1MafghJyHRxc3T2LKBS aZMFY8PZ0F9IyG+XcaWOSmwDScAuCk5Po63PYW1KlBGOBF2Vfk/Kkc8ynFn3eALkSgs4mk x3XSSdd4Z1jNo9gfK7tOeBCYdL88w6kqyXFHfA07cwDeALpUys14la7Pe/yJ3Yfu9tg0f0 LBCQ1upQL4qEWdLwDHZmccgRncmbeNeNLqj19mrinlPRjzoNww1Iim4zbciVYheTO8uAwH QJXswP5O1R7GIcCQBysyr3oQM18blE4niJrgOfftsoBqtN3/fXIMuXragX2t+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 4NyjHw1kCDz1CbP; Fri, 20 Jan 2023 01:55:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30K1tOIo011578; Fri, 20 Jan 2023 01:55:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30K1tO9Q011577; Fri, 20 Jan 2023 01:55:24 GMT (envelope-from git) Date: Fri, 20 Jan 2023 01:55:24 GMT Message-Id: <202301200155.30K1tO9Q011577@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: 6189672e6008 - main - Handle ERELOOKUP from VOP_FSYNC() in several other 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 6189672e600814fec4cc165d25ae050fb2f3a999 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=6189672e600814fec4cc165d25ae050fb2f3a999 commit 6189672e600814fec4cc165d25ae050fb2f3a999 Author: Konstantin Belousov AuthorDate: 2023-01-18 21:09:10 +0000 Commit: Konstantin Belousov CommitDate: 2023-01-20 01:54:56 +0000 Handle ERELOOKUP from VOP_FSYNC() in several other places We need to repeat the operation if the vnode was relocked. Reported and reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D38114 --- sys/dev/md/md.c | 12 +++++++----- sys/vm/vm_object.c | 19 +++++++++++++++++-- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c index 9b8773fc3c91..44358278a237 100644 --- a/sys/dev/md/md.c +++ b/sys/dev/md/md.c @@ -917,11 +917,13 @@ mdstart_vnode(struct md_s *sc, struct bio *bp) */ if (bp->bio_cmd == BIO_FLUSH) { - (void) vn_start_write(vp, &mp, V_WAIT); - vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); - error = VOP_FSYNC(vp, MNT_WAIT, td); - VOP_UNLOCK(vp); - vn_finished_write(mp); + do { + (void) vn_start_write(vp, &mp, V_WAIT); + vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); + error = VOP_FSYNC(vp, MNT_WAIT, td); + VOP_UNLOCK(vp); + vn_finished_write(mp); + } while (error == ERELOOKUP); return (error); } else if (bp->bio_cmd == BIO_DELETE) { error = vn_deallocate(vp, &off, &len, 0, diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index 8e146318f0dc..341c8aaec01a 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -1233,8 +1233,23 @@ vm_object_sync(vm_object_t object, vm_ooffset_t offset, vm_size_t size, res = vm_object_page_clean(object, offset, offset + size, flags); VM_OBJECT_WUNLOCK(object); - if (fsync_after) - error = VOP_FSYNC(vp, MNT_WAIT, curthread); + if (fsync_after) { + for (;;) { + error = VOP_FSYNC(vp, MNT_WAIT, curthread); + if (error != ERELOOKUP) + break; + + /* + * Allow SU/bufdaemon to handle more + * dependencies in the meantime. + */ + VOP_UNLOCK(vp); + vn_finished_write(mp); + + (void)vn_start_write(vp, &mp, V_WAIT); + vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); + } + } VOP_UNLOCK(vp); vn_finished_write(mp); if (error != 0) From nobody Fri Jan 20 02:40:25 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NykHs70G0z2v7S7; Fri, 20 Jan 2023 02:40: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NykHs6Fmtz3k0M; Fri, 20 Jan 2023 02:40:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674182425; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f3/3h7Qjr579FiUeW1JXH1ktTlLdFUBdZWUBzUn/ylA=; b=afBMTbfeRO45hlvxsN3CSznSdpgLbBEmgXcCwxZY7OtaVWOEKExI0zcsA/EaCeBHLVj9+S iSdAhB0V+t7sqI70lv4fScjYLNvIYsKm7DZjNu31p/cyRXM5emH5aR4v6jkH9p8DmMiWE6 NWbaB5Rq86bxr3ah/edinSdrq2qj4DkyDTHLb0weM+ATLna9bfahpjQkeqbDilmyVon1Ct jog+unx67RFlWODYJHzc+UKf2mOTHO7QCv1mDrVsAIu0Ha3w8wdjbmQtFv0MYIXRXsk18T TgMLYB3M8nT2/tF4kYjqevB3Ld0S2SDKUj6tDszo0F5cRBs/EMmaQWDU8sTdsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674182425; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f3/3h7Qjr579FiUeW1JXH1ktTlLdFUBdZWUBzUn/ylA=; b=qK04VP70aKB3xwNMlz5iOJY7GDdM0VeL+3fh3Kc+0/vDAALiJjoJNF+Bv9Cb4pk4khMquR CRPID5nTllRrwOFVtKHSOGsPIJqdyaaZYFj/cjjj2Mq/Fl6uQO/TtoiGigMxuoeuKpVn7D oPR33AZ3cdDxjmZaEsomCco+SgOOF25E29FABj0K5wGL4Nru4TcBDDYHRNX+0QVqjCCB4Z MU+QhgXXZrLr5s+Ttjhpovj2+Cnx204XHogyrKnhzw17dIfpAp+B+Fj3pypTxlxAzZTLP1 W/CH/w29t456jp6TpaLZB0c7Rjv3T5/OGbNFEK7zkuH8chCv3T7tHF3jPiKy7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674182425; a=rsa-sha256; cv=none; b=K6SkP5hRWkuEIcl1bHKHQDyF/9BA5pIHmLNGXD6eg/g529Z7kIUDEadKl6QlJeIk+1CIqT 6Dm5dAhWrLkhk7KbZKsPctxLb4Wjh6Ws1f5d2/gu+EEAmT6M/e04cRjeiSYkTIN3ZzRUdW p5IN0WhJzbijhtVg6ruA23hxXDu+lcwyApLY6YBBf+Z5BpfbXgf2p39OhltJYexJx9Pxdw TZEIRzyy3pcdB1LqpzqnZCapr/TyHmYziUefh/mrUDZEa84+zVk2LMWtYHB76tKGloCjoN ftRnQ0K5pl6mYeKEpnk8q5VDAfX3+7AYYAjDPkOME2aU8v3mDV36DG8aJQ51bQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NykHs5KsWzDrX; Fri, 20 Jan 2023 02:40:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30K2eP60077959; Fri, 20 Jan 2023 02:40:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30K2ePhl077958; Fri, 20 Jan 2023 02:40:25 GMT (envelope-from git) Date: Fri, 20 Jan 2023 02:40:25 GMT Message-Id: <202301200240.30K2ePhl077958@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: ad8feb1ed999 - main - md.c: another style fix List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: ad8feb1ed9996593df8b4b7259057c6e263aa130 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ad8feb1ed9996593df8b4b7259057c6e263aa130 commit ad8feb1ed9996593df8b4b7259057c6e263aa130 Author: Konstantin Belousov AuthorDate: 2023-01-20 02:39:36 +0000 Commit: Konstantin Belousov CommitDate: 2023-01-20 02:39:36 +0000 md.c: another style fix Noted by: jkim Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/dev/md/md.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c index 44358278a237..bb4b61783c93 100644 --- a/sys/dev/md/md.c +++ b/sys/dev/md/md.c @@ -918,7 +918,7 @@ mdstart_vnode(struct md_s *sc, struct bio *bp) if (bp->bio_cmd == BIO_FLUSH) { do { - (void) vn_start_write(vp, &mp, V_WAIT); + (void)vn_start_write(vp, &mp, V_WAIT); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); error = VOP_FSYNC(vp, MNT_WAIT, td); VOP_UNLOCK(vp); From nobody Fri Jan 20 02:53:04 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NykZT1Hy6z2v8W0; Fri, 20 Jan 2023 02:53:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NykZT0WhNz3ksm; Fri, 20 Jan 2023 02:53:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674183185; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kH/QdqziyEKu5XQeLqTjZ19wp43T6RbViFYDrMqLjHU=; b=aMMlp6WAXk6/Z25OCBTAlru1eHSdSPq0hRUef+Hho3f/Tdt5NSPER8zhOsFEJdzkyMpus2 yvhZ7KsXAQ0A2NZBunn2FrzUvyYDQiv7JtUGn3Lbg1YjIT1jWH6RgKL1lPGB//yyoamEyy Cdp4d3LQlyy/0R9ncRkpHhgYiH5j/cwOvWe001tMw7XDWNkZ7ct3hXINZSQciMACpQSU4j 0ZjxUmDGl3DD7tjGPuSUhaP3vaLZAPhAzoLQ6jvHLu+gtHIlZgdqHONY9kJNfXcYyBrmGl fGD70LYkSPoKhjrItUSWhLZ0JxfitedXl8rECZyVE4mSj1ivMTsbT5bfUgZGRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674183185; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kH/QdqziyEKu5XQeLqTjZ19wp43T6RbViFYDrMqLjHU=; b=o3xZqxCfDukSDmP0ewqWR/akjTJyNTPbtaUXLDkno5OsteEDYCX3E456Mb89YvLvMQtQjb z+u7tUPA1TH+90GeNDXYVU/9Us5d/6VsZDtsDUuUWAGYWWiVuGNvqDJ53CPkr9zyDz18no Te/DiPXqzhwuqM58bqH+4++C+4yFdxH1zzF9j5mZnWVws+thX0mwqLE81ibP96mlLL/iUm IFRD/Eday/c26vV35aCU7rE2+verl61wNZv+Naa3mI7mvbpCPntuBlfJsO/biBLwhpxjGV JQ7FYRHg2QfugERQIHxJd+U797OtSfPIYN9Id//Id/fjZRjGRNJQvvN1HAAygQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674183185; a=rsa-sha256; cv=none; b=QLVYiAyBK7khNJMBrknqv0mkiROmM+6ql7v4KqsEHKM/6wg0XlnOBr4zVJWIBgsj8dAby4 OI5Rm9KfZan1shImotqyGPP1K0rQMIvxkVt8XRCs2nWLj4gyFQTPaiepq53jI66RQfNZkq 0LZ6ioOtdVMnNlDZiBiZU525dT9lGMP1OEm7hfQ8zbKYX/MWHgDAIW/TQ8WjMOSOsvWJmT i3FFPp5Fq8D9ohnlgMmUz9It1a2KpYom7lkUW+9NrQvUm4uMlyR6IbujYK7HHdQm97FVHb zH03EZPOQ+7x0RseZztQgH8+lZnScXd8STXbP8xPlecVlNI7KJmv+ElIkj8qTg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NykZS6ZT8zDmK; Fri, 20 Jan 2023 02:53:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30K2r4Vc097286; Fri, 20 Jan 2023 02:53:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30K2r4Tb097285; Fri, 20 Jan 2023 02:53:04 GMT (envelope-from git) Date: Fri, 20 Jan 2023 02:53:04 GMT Message-Id: <202301200253.30K2r4Tb097285@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: d4d797184967 - main - vmstat: remove shadow variables List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: d4d79718496753493f059cb8f2b2e87e0b7019b0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=d4d79718496753493f059cb8f2b2e87e0b7019b0 commit d4d79718496753493f059cb8f2b2e87e0b7019b0 Author: Elliott Mitchell AuthorDate: 2022-09-21 02:18:23 +0000 Commit: Konstantin Belousov CommitDate: 2023-01-20 02:51:12 +0000 vmstat: remove shadow variables These appear to simply be the style of arguments are left untouched and only local variables are modified. While some may prefer that style this simply serves to complicate things as they're perfectly writeable. Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D36628 --- usr.bin/vmstat/vmstat.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/usr.bin/vmstat/vmstat.c b/usr.bin/vmstat/vmstat.c index 674ae2ab6728..07988da9d99d 100644 --- a/usr.bin/vmstat/vmstat.c +++ b/usr.bin/vmstat/vmstat.c @@ -1284,29 +1284,26 @@ static void print_intrcnts(unsigned long *intrcnts, unsigned long *old_intrcnts, char *intrnames, unsigned int nintr, size_t istrnamlen, long long period_ms) { - unsigned long *intrcnt, *old_intrcnt; - char *intrname; uint64_t inttotal, old_inttotal, total_count, total_rate; unsigned long count, rate; unsigned int i; inttotal = 0; old_inttotal = 0; - intrname = intrnames; xo_open_list("interrupt"); - for (i = 0, intrcnt=intrcnts, old_intrcnt=old_intrcnts; i < nintr; i++) { - if (intrname[0] != '\0' && (*intrcnt != 0 || aflag)) { - count = *intrcnt - *old_intrcnt; + for (i = 0; i < nintr; i++) { + if (intrnames[0] != '\0' && (*intrcnts != 0 || aflag)) { + count = *intrcnts - *old_intrcnts; rate = ((uint64_t)count * 1000 + period_ms / 2) / period_ms; xo_open_instance("interrupt"); xo_emit("{d:name/%-*s}{ket:name/%s} " "{:total/%20lu} {:rate/%10lu}\n", - (int)istrnamlen, intrname, intrname, count, rate); + (int)istrnamlen, intrnames, intrnames, count, rate); xo_close_instance("interrupt"); } - intrname += strlen(intrname) + 1; - inttotal += *intrcnt++; - old_inttotal += *old_intrcnt++; + intrnames += strlen(intrnames) + 1; + inttotal += *intrcnts++; + old_inttotal += *old_intrcnts++; } total_count = inttotal - old_inttotal; total_rate = (total_count * 1000 + period_ms / 2) / period_ms; From nobody Fri Jan 20 02:53:05 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NykZV1PFpz2v8xh; Fri, 20 Jan 2023 02:53: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NykZV0mYxz3l75; Fri, 20 Jan 2023 02:53:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674183186; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bSWmR+qFmWfEwEF8BXelR36msw9UZ2zpDxvOSjNABTQ=; b=h9NZ6VNRHuwCt4H+0vq2gBEeNJfe+5m1TuT2ns88/UdC1RU1CkprqipkiH6MuChQQBq4oW Kyx/o5x0L7KPQjqF1grNEP/aaSbQij8UryWdDEJfXvwRXSTnUE24hMptrigOKwymiCsM+q 1bzcR5BndF7jKyDnJdx4E9HbIohmMC3tCLKfLJBp5U9X7/64CZoy3NNUIaA3HLQ7aivdWe SB2LHg62ZsyT0VckH0qFYJGbjpljPcE/JZUI1ELfXWkyGVngbnT43NpslWyNTOhRt30m24 xt29hoXQsZBgmecJcyZyUJMiELIe2eGseUj9c3wg4qrOIXJFVtuR0HTed2Y3VQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674183186; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bSWmR+qFmWfEwEF8BXelR36msw9UZ2zpDxvOSjNABTQ=; b=LhP6R/jWDLrueWxeMmpakwbSaByM7Q823LtVQbLJzye9lhdqnrt4ao8aFWHbHScE75cJGl mJWH94fYwQYxpWvc+NybP5KM8V/BOu6FXIJG1Rmmv2lSRaEU+td4UzfcXBebWYkexZFrXT Y9OBpKLy0Wnz0iIurusy3QAvXV0gNbtacFlG4UZJ0y8w6yBmTg6sLg6IvG4WAPqYm9hra7 6VbdpNK82zIr3V20o8SfR6La6uAl3g026C69dykQWdhAiVA+PzOg370wodL0BN07Q2bmhD ehgxbDsW5SH0VXQBZhyp3xd8XFIZaEq3lv7OKHHcppGLrXcS1F9nQaru+8HmLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674183186; a=rsa-sha256; cv=none; b=HYsyat+kDMk4dnU6EDmF9G//7wnOnGYXCBhvDKZfllyIgdBogT2p4NxwkP3S8uoB69e66U i5cx2jkJyRGBizUG1MxlwN+GQWKjLEu0PrEf86m8vFRwfFaH9ybjhsY5/iDdgkZhZOhkl0 Zir6SUoZrvXYMAa9hf6RsQkOzlKRWhrqpnAhnNZLa0MS5930BiDcol6aCB43TlhiynahZL t+PAaP+xn9ZLyjBVShQ2Gr0bBMdXMK/9sSe4QWrAxeRhYTlGk68Bw3DpyHf5U7ltuJ+Fwo BiRQyIp8jp2hEkJY+j7PHwERJ0piPE+s+AyZVOpfe98rDo3ANnrrv2af55FNmg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NykZT6z5CzFPV; Fri, 20 Jan 2023 02:53:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30K2r5Da097311; Fri, 20 Jan 2023 02:53:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30K2r5Fx097310; Fri, 20 Jan 2023 02:53:05 GMT (envelope-from git) Date: Fri, 20 Jan 2023 02:53:05 GMT Message-Id: <202301200253.30K2r5Fx097310@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: e5c30ac93055 - main - vmstat: fix overflow of interrupt name 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: e5c30ac93055e708e26e075937263608b3eeb17d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e5c30ac93055e708e26e075937263608b3eeb17d commit e5c30ac93055e708e26e075937263608b3eeb17d Author: Elliott Mitchell AuthorDate: 2022-11-26 16:21:33 +0000 Commit: Konstantin Belousov CommitDate: 2023-01-20 02:51:13 +0000 vmstat: fix overflow of interrupt name buffer sysctl() provides a count of number of bytes in the buffer. That is the actual buffer length. Whereas looking for an interrupt entry with an empty name could terminate too early, or overflow the end of the buffer. The overflow will occur if the table of interrupt names is full. Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D36628 --- usr.bin/vmstat/vmstat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/vmstat/vmstat.c b/usr.bin/vmstat/vmstat.c index 07988da9d99d..d007d4f6098f 100644 --- a/usr.bin/vmstat/vmstat.c +++ b/usr.bin/vmstat/vmstat.c @@ -1349,7 +1349,7 @@ dointr(unsigned int interval, int reps) /* Determine the length of the longest interrupt name */ intrname = intrnames; istrnamlen = strlen("interrupt"); - while(*intrname != '\0') { + while (intrname < intrnames + inamlen) { clen = strlen(intrname); if (clen > istrnamlen) istrnamlen = clen; From nobody Fri Jan 20 10:48:06 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Nyx6Z66pqz2twr4; Fri, 20 Jan 2023 10:48: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Nyx6Z5MrGz3HgB; Fri, 20 Jan 2023 10:48:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674211686; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T1pWYdqcY0Xs8tF6nJ+4s+2AbPgxvD1rvzrG7YIVFJ0=; b=NSzrbN2YAkCfrgv2+1efbDvOLxUA5Zovh8MculUjgWLlQdHxcpqTVhcf6daNE4iBP2ab79 z7D1uAxy7yRoBheHZhip/FqU22mf6lYD1BUJh8jL5cbeHU0OCxCCaXsgCaGYlEQZM3DkV3 MLLjAE/VKdmvvuE7sbiHxm1PI6p18LTZ6+/DSjpUpatMJvgrfZ35VfBP8grW3XY8teAgsE 9YBli4mxAdj2KxgoCyJ380TGp36pwil7I/FC+G3LZE8nKE/jueJMO1FBFQMaawMIyixCoi t2ulT+DQAGsMhV6xOL/rO8neBlPeICBbDy/PxVEDWQU9x/n0buLobQ5Y91hnhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674211686; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T1pWYdqcY0Xs8tF6nJ+4s+2AbPgxvD1rvzrG7YIVFJ0=; b=ciwRV9S74I6HpITLXNcpaWCEFYENc7c9jznz1IkBewzHfHFxSXB4KWw7lT9TKiGoxLAflD 4nhMaIb7g2W1irD5eKhF3fco1MBcUK3xSm2AlqW1WGCdRz8/APOnPbh7EYXs1p/92rBqWy +OWzVne0fvLzvzOkbE3AspP6LsE64PnxfJMuFt679E7hsHQOiPLDZekMUMYlt6uMem+TKw znUV3GWNG/8/+45V4IfQ4/OSrLj+52r4i046LfUILQlrha0nE4LgMgP8Vn6JYBIgFcdPBB MaOxeDlpKeaj4Og/ijuWaeUIknQmlJPAlxvYPXyWLn7+vnQ8xf9R8fI6ctqEIQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674211686; a=rsa-sha256; cv=none; b=abjKBZST6+Nf8J/BtM11lUIkP2fr/jw3nxu/z1SyLB0cThIQ9GUbUb4DN/AmUciwTRZQ1p a/2sEMIBjMFm8krtXZYrxLT2FI03WjW+YiofBdLtCvH7dRYRMq6Jpe1KstVhmTGviigutx Wq9t9ytI/40KBwAA3MuV+LECaDIEz1WUULVo8s+FIKlOfVt+oNrDYjptTbjy4QRi5kdg/L 18amqXMVCQV1pQZEPg4vVSTP5m2ALMR7dE//XGmbqi0KtQyR7Gv4EYSzWn+qxn0iPaPai7 jxKy29SybxtKE86nIbqffD7QrynZ1JrbpM1XxSi4Vvv4ER5Hk55yryHLtXnFUg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Nyx6Z4K4TzSQn; Fri, 20 Jan 2023 10:48:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30KAm6rk070888; Fri, 20 Jan 2023 10:48:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30KAm6lx070887; Fri, 20 Jan 2023 10:48:06 GMT (envelope-from git) Date: Fri, 20 Jan 2023 10:48:06 GMT Message-Id: <202301201048.30KAm6lx070887@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: 34ac629b40e6 - main - Shell-escape assignments to PATH in the top-level makefiles List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 34ac629b40e68e5394fe0a27e47c73a875d9f8cb Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=34ac629b40e68e5394fe0a27e47c73a875d9f8cb commit 34ac629b40e68e5394fe0a27e47c73a875d9f8cb Author: Alex Richardson AuthorDate: 2023-01-20 10:47:17 +0000 Commit: Alex Richardson CommitDate: 2023-01-20 10:47:17 +0000 Shell-escape assignments to PATH in the top-level makefiles Since 16fbf0191243e7c9dff6615b1424b5d39186b36c PATH is no longer set to a hardcoded value on non-FreeBSD build hosts, so we can end up with spaces in $PATH. Instead of only escaping PATH I updated all `env PATH=` uses in the toplevel makefile. While many of these currently can't contain any special characters (since the build would have failed already), in theory this gets us closer to allowing build/source directory to contain e.g. spaces. --- Makefile | 6 +++--- Makefile.inc1 | 46 +++++++++++++++++++++++----------------------- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/Makefile b/Makefile index 62d2869bfc03..2860b31a043c 100644 --- a/Makefile +++ b/Makefile @@ -224,7 +224,7 @@ META_TGT_WHITELIST+= \ PATH= /sbin:/bin:/usr/sbin:/usr/bin .endif MAKEOBJDIRPREFIX?= /usr/obj -_MAKEOBJDIRPREFIX!= /usr/bin/env -i PATH=${PATH} ${MAKE} MK_AUTO_OBJ=no \ +_MAKEOBJDIRPREFIX!= /usr/bin/env -i PATH=${PATH:Q} ${MAKE} MK_AUTO_OBJ=no \ ${.MAKEFLAGS:MMAKEOBJDIRPREFIX=*} __MAKE_CONF=${__MAKE_CONF} \ SRCCONF=${SRCCONF} SRC_ENV_CONF= \ -f /dev/null -V MAKEOBJDIRPREFIX dummy @@ -267,7 +267,7 @@ SUB_MAKE= `test -x ${MYMAKE} && echo ${MYMAKE} || echo ${MAKE}` \ SUB_MAKE= ${MAKE} -m ${.CURDIR}/share/mk .endif -_MAKE= PATH=${PATH} MAKE_CMD="${MAKE}" ${SUB_MAKE} -f Makefile.inc1 \ +_MAKE= PATH=${PATH:Q} MAKE_CMD="${MAKE}" ${SUB_MAKE} -f Makefile.inc1 \ TARGET=${_TARGET} TARGET_ARCH=${_TARGET_ARCH} ${_MAKEARGS} .if defined(MK_META_MODE) && ${MK_META_MODE} == "yes" @@ -595,7 +595,7 @@ universe-toolchain: .PHONY universe_prologue @echo "> Toolchain bootstrap started on `LC_ALL=C date`" @echo "--------------------------------------------------------------" ${_+_}@cd ${.CURDIR}; \ - env PATH=${PATH} ${SUB_MAKE} ${JFLAG} kernel-toolchain \ + env PATH=${PATH:Q} ${SUB_MAKE} ${JFLAG} kernel-toolchain \ TARGET=${MACHINE} TARGET_ARCH=${MACHINE_ARCH} \ OBJTOP="${HOST_OBJTOP}" \ WITHOUT_SYSTEM_COMPILER=yes \ diff --git a/Makefile.inc1 b/Makefile.inc1 index 112f335d7c11..1396a8e7a172 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -697,7 +697,7 @@ BOOTSTRAPPING_OSRELDATE?=${OSRELDATE} # bootstrap-tools stage BMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \ TOOLS_PREFIX=${TOOLS_PREFIX_UNDEF:U${WORLDTMP}} \ - PATH=${BPATH}:${PATH} \ + PATH=${BPATH:Q}:${PATH:Q} \ WORLDTMP=${WORLDTMP} \ MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}" # need to keep this in sync with targets/pseudo/bootstrap-tools/Makefile @@ -765,7 +765,7 @@ XMAKE= ${BMAKE} \ # kernel-tools stage KTMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \ - PATH=${BPATH}:${PATH} \ + PATH=${BPATH:Q}:${PATH:Q} \ WORLDTMP=${WORLDTMP} \ MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}" @@ -792,13 +792,13 @@ KTMAKE= ${TIME_ENV} \ # world stage WMAKEENV= ${CROSSENV} \ INSTALL="${INSTALL_CMD} -U" \ - PATH=${TMPPATH} \ + PATH=${TMPPATH:Q} \ SYSROOT=${WORLDTMP} # make hierarchy -HMAKE= PATH=${TMPPATH} ${MAKE} LOCAL_MTREE=${LOCAL_MTREE:Q} +HMAKE= PATH=${TMPPATH:Q} ${MAKE} LOCAL_MTREE=${LOCAL_MTREE:Q} .if defined(NO_ROOT) -HMAKE+= PATH=${TMPPATH} METALOG=${METALOG} -DNO_ROOT +HMAKE+= PATH=${TMPPATH:Q} METALOG=${METALOG} -DNO_ROOT .endif CROSSENV+= CC="${XCC} ${XCFLAGS}" CXX="${XCXX} ${XCXXFLAGS} ${XCFLAGS}" \ @@ -909,12 +909,12 @@ IMAKEENV= ${CROSSENV} IMAKE= ${TIME_ENV} ${IMAKEENV} ${MAKE} -f Makefile.inc1 \ ${IMAKE_INSTALL} ${IMAKE_MTREE} .if empty(.MAKEFLAGS:M-n) -IMAKEENV+= PATH=${STRICTTMPPATH}:${INSTALLTMP} \ - LD_LIBRARY_PATH=${INSTALLTMP} \ +IMAKEENV+= PATH=${STRICTTMPPATH:Q}:${INSTALLTMP:Q} \ + LD_LIBRARY_PATH=${INSTALLTMP:Q} \ PATH_LOCALE=${INSTALLTMP}/locale IMAKE+= __MAKE_SHELL=${INSTALLTMP}/sh .else -IMAKEENV+= PATH=${TMPPATH}:${INSTALLTMP} +IMAKEENV+= PATH=${TMPPATH:Q}:${INSTALLTMP:Q} .endif # When generating install media, do not allow user and group information from @@ -1023,7 +1023,7 @@ _worldtmp: .PHONY # so we remove that assingnment from $WMAKE and prepend the new $PATH ${_+_}@if [ -e "${WORLDTMP}" ]; then \ echo ">>> Deleting stale files in build tree..."; \ - cd ${.CURDIR}; env PATH=${TMPPATH}:${PATH} ${WMAKE:NPATH=*} \ + cd ${.CURDIR}; env PATH=${TMPPATH:Q}:${PATH:Q} ${WMAKE:NPATH=*} \ -DBATCH_DELETE_OLD_FILES delete-old \ delete-old-libs >/dev/null; \ fi @@ -1367,7 +1367,7 @@ MTREE_MAGIC?= mtree 2.0 distributeworld installworld stageworld: _installcheck_world .PHONY mkdir -p ${INSTALLTMP} progs=$$(for prog in ${ITOOLS}; do \ - if progpath=`env PATH=${TMPPATH} which $$prog`; then \ + if progpath=`env PATH=${TMPPATH:Q} which $$prog`; then \ echo $$progpath; \ else \ echo "Required tool $$prog not found in PATH ($$PATH)." >&2; \ @@ -1442,7 +1442,7 @@ distributeworld installworld stageworld: _installcheck_world .PHONY .endif .endfor -mkdir ${DESTDIR}/${DISTDIR}/base - ${_+_}cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} \ + ${_+_}cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH:Q} ${MAKE} \ METALOG=${METALOG} ${IMAKE_INSTALL} ${IMAKE_MTREE} \ DISTBASE=/base DESTDIR=${DESTDIR}/${DISTDIR}/base \ LOCAL_MTREE=${LOCAL_MTREE:Q} distrib-dirs @@ -1452,7 +1452,7 @@ distributeworld installworld stageworld: _installcheck_world .PHONY ${IMAKEENV} rm -rf ${INSTALLTMP} .if !make(packageworld) && ${MK_CAROOT} != "no" @if which openssl>/dev/null; then \ - PATH=${TMPPATH}:${PATH} \ + PATH=${TMPPATH:Q}:${PATH:Q} \ sh ${SRCTOP}/usr.sbin/certctl/certctl.sh ${CERTCTLFLAGS} rehash; \ else \ echo "No openssl on the host, not rehashing certificates target -- /etc/ssl may not be populated."; \ @@ -1537,7 +1537,7 @@ sysent: .PHONY .for _dir in ${_sysent_dirs} sysent-${_dir}: .PHONY @echo "${MAKE} -C ${.CURDIR}/${_dir} sysent" - ${_+_}@env PATH=${_sysent_PATH} ${MAKE} -C ${.CURDIR}/${_dir} sysent + ${_+_}@env PATH=${_sysent_PATH:Q} ${MAKE} -C ${.CURDIR}/${_dir} sysent sysent: sysent-${_dir} .endfor @@ -1585,10 +1585,10 @@ redistribute: .MAKE .PHONY .endif distrib-dirs distribution: .MAKE .PHONY - ${_+_}cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} \ + ${_+_}cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH:Q} ${MAKE} \ ${IMAKE_INSTALL} ${IMAKE_MTREE} METALOG=${METALOG} ${.TARGET} .if make(distribution) - ${_+_}cd ${.CURDIR}; ${CROSSENV} PATH=${TMPPATH} \ + ${_+_}cd ${.CURDIR}; ${CROSSENV} PATH=${TMPPATH:Q} \ ${MAKE} -f Makefile.inc1 ${IMAKE_INSTALL} \ METALOG=${METALOG} MK_TESTS=no \ MK_TESTS_SUPPORT=${MK_TESTS_SUPPORT} installconfig @@ -1696,7 +1696,7 @@ buildkernel: .MAKE .PHONY @echo ">>> stage 1: configuring the kernel" @echo "--------------------------------------------------------------" cd ${KRNLCONFDIR}; \ - PATH=${TMPPATH} \ + PATH=${TMPPATH:Q} \ config ${CONFIGARGS} -d ${KRNLOBJDIR}/${_kernel} \ -I '${KERNCONFDIR}' -I '${KRNLCONFDIR}' \ '${KERNCONFDIR}/${_kernel}' @@ -1763,7 +1763,7 @@ reinstallkernel reinstallkernel.debug: _installcheck_kernel .PHONY @echo ">>> Installing kernel ${INSTALLKERNEL} on $$(LC_ALL=C date)" @echo "--------------------------------------------------------------" ${_+_}cd ${KRNLOBJDIR}/${INSTALLKERNEL}; \ - ${CROSSENV} PATH=${TMPPATH} \ + ${CROSSENV} PATH=${TMPPATH:Q} \ ${MAKE} ${IMAKE_INSTALL} KERNEL=${INSTKERNNAME} ${.TARGET:S/kernel//} @echo "--------------------------------------------------------------" @echo ">>> Installing kernel ${INSTALLKERNEL} completed on $$(LC_ALL=C date)" @@ -1775,7 +1775,7 @@ reinstallkernel reinstallkernel.debug: _installcheck_kernel .PHONY @echo ">>> Installing kernel ${_kernel} $$(LC_ALL=C date)" @echo "--------------------------------------------------------------" ${_+_}cd ${KRNLOBJDIR}/${_kernel}; \ - ${CROSSENV} PATH=${TMPPATH} \ + ${CROSSENV} PATH=${TMPPATH:Q} \ ${MAKE} ${IMAKE_INSTALL} KERNEL=${INSTKERNNAME}.${_kernel} ${.TARGET:S/kernel//} @echo "--------------------------------------------------------------" @echo ">>> Installing kernel ${_kernel} completed on $$(LC_ALL=C date)" @@ -1795,7 +1795,7 @@ distributekernel distributekernel.debug: .PHONY .endif ${_+_}cd ${KRNLOBJDIR}/${INSTALLKERNEL}; \ ${IMAKEENV} ${IMAKE_INSTALL:S/METALOG/kernel.premeta/} \ - ${IMAKE_MTREE} PATH=${TMPPATH} ${MAKE} KERNEL=${INSTKERNNAME} \ + ${IMAKE_MTREE} PATH=${TMPPATH:Q} ${MAKE} KERNEL=${INSTKERNNAME} \ DESTDIR=${INSTALL_DDIR}/kernel \ ${.TARGET:S/distributekernel/install/} .if defined(NO_ROOT) @@ -1810,7 +1810,7 @@ distributekernel distributekernel.debug: .PHONY .endif ${_+_}cd ${KRNLOBJDIR}/${_kernel}; \ ${IMAKEENV} ${IMAKE_INSTALL:S/METALOG/kernel.${_kernel}.premeta/} \ - ${IMAKE_MTREE} PATH=${TMPPATH} ${MAKE} \ + ${IMAKE_MTREE} PATH=${TMPPATH:Q} ${MAKE} \ KERNEL=${INSTKERNNAME}.${_kernel} \ DESTDIR=${INSTALL_DDIR}/kernel.${_kernel} \ ${.TARGET:S/distributekernel/install/} @@ -3405,7 +3405,7 @@ DTBOUTPUTPATH= ${.CURDIR} # Build 'standalone' Device Tree Blob # builddtb: .PHONY - @PATH=${TMPPATH} MACHINE=${TARGET} \ + @PATH=${TMPPATH:Q} MACHINE=${TARGET} \ sh ${.CURDIR}/sys/tools/fdt/make_dtb.sh ${.CURDIR}/sys \ "${FDT_DTS_FILE}" ${DTBOUTPUTPATH} @@ -3502,8 +3502,8 @@ CD2ENV=${CDENV} CC="${CC} ${CD2CFLAGS}" CXX="${CXX} ${CD2CXXFLAGS} ${CD2CFLAGS}" MACHINE=${TARGET} MACHINE_ARCH=${TARGET_ARCH} CDTMP= ${OBJTOP}/${XDDIR}/tmp -CDMAKE=${CDENV} PATH=${CDTMP}/usr/bin:${PATH} ${MAKE} ${CDMAKEARGS} ${NOFUN} -CD2MAKE=${CD2ENV} PATH=${CDTMP}/usr/bin:${XDDESTDIR}/usr/bin:${PATH} \ +CDMAKE=${CDENV} PATH=${CDTMP:Q}/usr/bin:${PATH:Q} ${MAKE} ${CDMAKEARGS} ${NOFUN} +CD2MAKE=${CD2ENV} PATH=${CDTMP:Q}/usr/bin:${XDDESTDIR:Q}/usr/bin:${PATH:Q} \ ${MAKE} ${CD2MAKEARGS} ${NOFUN} .if ${MK_META_MODE} != "no" # Don't rebuild build-tools targets during normal build. From nobody Fri Jan 20 17:24:45 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Nz5wF2W5jz2t4jw; Fri, 20 Jan 2023 17:24: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Nz5wF21Y6z4Gpr; Fri, 20 Jan 2023 17:24:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674235485; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8B7SwqTTWP/VbhSHre2F0kEErZm6ast5+6Vn/wpli6U=; b=ljDW60ui9U5GYVfgvjUGSlMmMH0yF7+rFxmyd6pSLJh+j0iFuw8VxAKOBHgGz2m4eN863I zEAE1qa+5hF4s3ba1IseAcoN7eKfnIX7+rR/AyojVyDoP1/Uh7LhlReU5kmbQD+O6xhOc5 jT9nFnssGRUdOllO5niJ/EgYaqdIatGQDzIV7qzYDWBhGRXLWxqI7acNHLykSM2g9AYMrB SAqxw+vzwZyD88J1f3a9OrDVqE4WnxCAr7ToOpTXifZA7wufiQxDAYt0sSYBZMwr+GFCB6 1Pm2r/LOqmAvj7MC7voR9fbhCdoCzwUGW7gu++zCYIZrosdnJMfc6a9YCBz/zA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674235485; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8B7SwqTTWP/VbhSHre2F0kEErZm6ast5+6Vn/wpli6U=; b=v2SUYzfBj4wCNlQVV9jDpSFxO4vSUyjFEtEr2+P+yNlig4jq727qqLctOvKPY40/bgJMim Z5NLzEALo7ow5LdSRPSWiQXTR7ksvVbknusbd0FANegXoQP3ND6mSr+sySrHPHOG71a72b UTj0Pxap2TpmzedcDZoOLsRSWHNs8H9TIoV0h27ZH/o+AGEfrmzq2zN6rsoTqp22qaSKzN AyFj5DwlBxBOydcocZm4hz+7p6JbDqbEWax7smgscq4sGj1tWrn3zwfo/ptnPLs6rbx1Iz 6+hJk78wIgWLo9Z3HTIJMyf2XeoFhuabvY6wC1lDhViz8i4SanAm1CaQeFsduw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674235485; a=rsa-sha256; cv=none; b=Ug6tWT9n+0Kcq+r0uKQkMO7SCEURGx3/D78fdDEFXz7KA8SESbNO17Qw5kHP1diiuGSdKU wWVLdJpb66tyB3zZXCIaK47lMhQm/6NDCxMuS9bKTr0ig0QU81QCjs0Y/lyBqVOGHcNenu skWNrXDfi/cFnLmxpuO7TlODRaogwBGJ1+uidQiJa7Gdiv4f9wRiHtsSijKhNFYt7wX/K6 2+E3ujuZrdggMZxJdfMwGOAL024E4bdtYqu9++BKrqIZ1EyfWGWweXZtn21UbdxSxeQnbG utgDPkChfJkoov2GSFkaDW7/nlFBso+ofuhY06MEto7x++ARgsPxi7sYwiMdWg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Nz5wF14ckzf5m; Fri, 20 Jan 2023 17:24:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30KHOj4b041593; Fri, 20 Jan 2023 17:24:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30KHOjEu041592; Fri, 20 Jan 2023 17:24:45 GMT (envelope-from git) Date: Fri, 20 Jan 2023 17:24:45 GMT Message-Id: <202301201724.30KHOjEu041592@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: 520590881667 - main - Revert "ifconfig: abort if loading a module fails other than for ENOENT" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 520590881667b4536e6861c710a80353a0564334 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=520590881667b4536e6861c710a80353a0564334 commit 520590881667b4536e6861c710a80353a0564334 Author: Alan Somers AuthorDate: 2023-01-20 17:17:21 +0000 Commit: Alan Somers CommitDate: 2023-01-20 17:17:21 +0000 Revert "ifconfig: abort if loading a module fails other than for ENOENT" This reverts commit 2c24ad3377a6f584e484656db8390e4eb7cfc119. This change causes some commands to fail, for example when working with renamed interfaces or when trying to list a nonexistent interface by name. PR: 269042 Reported by: dbaio, Michael Paepcke MFC with: 2c24ad3377a6f584e484656db8390e4eb7cfc119 --- sbin/ifconfig/ifconfig.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c index 120207a6927e..462d543125c4 100644 --- a/sbin/ifconfig/ifconfig.c +++ b/sbin/ifconfig/ifconfig.c @@ -1719,19 +1719,11 @@ ifmaybeload(const char *name) } } - /* Try to load the module. */ - if (kldload(ifkind) < 0) { - switch (errno) { - case ENOENT: - /* - * Ignore ENOENT, because ifconfig can't infer the - * names of all drivers (eg mlx4en(4)). - */ - break; - default: - err(1, "kldload(%s)", ifkind); - } - } + /* + * Try to load the module. But ignore failures, because ifconfig can't + * infer the names of all drivers (eg mlx4en(4)). + */ + (void) kldload(ifkind); } static struct cmd basic_cmds[] = { From nobody Fri Jan 20 17:59:15 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Nz6h32GWYz2t8WN; Fri, 20 Jan 2023 17:59: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Nz6h31nrsz4Ky8; Fri, 20 Jan 2023 17:59:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674237555; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0XuSXjl5B9cN+RUnZIfNx4FVkXjaYQzt9TfBp2KSBFg=; b=fIWbm6ETGExW9DCQbJ1GoWCpgicgBxYYF+MPfADc0Ors5IkkktpK+Y4ZeX0ZnjXu5i3XeV O4vs6Z9lrOv9cIkv0+fPBiucSj4pxUUlNEKPftYZvsH6r16TQVEBZnz+ic8lDpNAqODI4m 8jrkFiUxGgh4u2wmF2bNm/6CzFXbvnEBTom/BtKAcCn1/TxMyBlEpzypaspz/nzO8pnaT2 Yn8u05Ryum5cCcS2D5fI4CqMc4IRjwci3uNy/BV30n88DWrISw1znn9Co4f/5FsfLpQt1Q Faarr3EyxErK5bKY9p4Eddk8wuKM0mY3R8/cxB7lo0xryPswyWa2KB1JxQB50g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674237555; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0XuSXjl5B9cN+RUnZIfNx4FVkXjaYQzt9TfBp2KSBFg=; b=NiGgxHbMsNt4SqZjALmbRcQ+WN+/GjNIBJpraOUPxNY7fdzRIbIDt0PVZiAt+rBTLaBg9q 9ADBbPOEnLJDtNJ2s8DtZxPdSozKbeUgQSbTIVPA+/DgpepW1ak7QTaEZC5VyGj8cldE0w Bd6E5Q9lTIqcOxy7L/IyFfGb9DJfNZwH0EOfKu+wT/mh6I4iwFjJw/Bs1TkdnjHu9mbsAu RAVvdacbAGe8wZuBQnGNYzzz4UBHSHzOE0flu0yb4514giC5gC0xadm9xjJgbfjiyMYfnU tNjLCgXOwgjhNhBOI09+Frp9hd2rkUZnDbDnTlqinuQXDw+fY4YTrKJyhkKkbA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674237555; a=rsa-sha256; cv=none; b=NyUsi3UyqgnZnEPEhfY1ghBKK5Q5Xq59MyAZqPD4XRTFcoawC2TsUi/yCTotCjMja/XcGC bzfMn5Cv4tTkEk6LrC6TTRso+qbEXZMu2MMz4E1ozie6AaWNo/+gxbALHCF7TnYEbT7FSA J4FOsbI8hDW2yGzvnkXkT3xLhArVbis7sxSrrOFlKgblDM8kO04ET7Dy/P2ci71xtnn/AI Cs3sjvFoL2bKiE5UfHQ7euT0wpXcHEqNI/oguHLM09SleqmAiUDAmvA/HQcVRV/hEZmpaK 6XDGAAHSSyry0ACyu0LZiv4dG2fZvxTrtTCsBRHwcV6JjUMsn+rvmObWKE5Mmw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Nz6h30rsWzfps; Fri, 20 Jan 2023 17:59:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30KHxFvo084671; Fri, 20 Jan 2023 17:59:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30KHxFAS084670; Fri, 20 Jan 2023 17:59:15 GMT (envelope-from git) Date: Fri, 20 Jan 2023 17:59:15 GMT Message-Id: <202301201759.30KHxFAS084670@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: bfe8e339eb77 - main - bhyve: Fix a global buffer overread in the PCI hda device model. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: bfe8e339eb77910c2eb739b45aaa936148b33897 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=bfe8e339eb77910c2eb739b45aaa936148b33897 commit bfe8e339eb77910c2eb739b45aaa936148b33897 Author: John Baldwin AuthorDate: 2023-01-20 17:57:45 +0000 Commit: John Baldwin CommitDate: 2023-01-20 17:57:45 +0000 bhyve: Fix a global buffer overread in the PCI hda device model. hda_write did not validate the relative register offset before using it as an index into the hda_set_reg_table array to lookup a function pointer to execute after updating the register's value. PR: 264435 Reported by: Robert Morris Reviewed by: corvink, markj, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D38127 --- usr.sbin/bhyve/pci_hda.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/usr.sbin/bhyve/pci_hda.c b/usr.sbin/bhyve/pci_hda.c index 9b0d4bd02ba0..bb8fba1a54bb 100644 --- a/usr.sbin/bhyve/pci_hda.c +++ b/usr.sbin/bhyve/pci_hda.c @@ -30,6 +30,7 @@ #include __FBSDID("$FreeBSD$"); +#include #include #include "pci_hda.h" @@ -51,8 +52,6 @@ __FBSDID("$FreeBSD$"); #define HDA_CODEC_MAX 0x0f #define HDA_LAST_OFFSET \ (0x2084 + ((HDA_ISS_NO) * 0x20) + ((HDA_OSS_NO) * 0x20)) -#define HDA_SET_REG_TABLE_SZ \ - (0x80 + ((HDA_ISS_NO) * 0x20) + ((HDA_OSS_NO) * 0x20)) #define HDA_CORB_ENTRY_LEN 0x04 #define HDA_RIRB_ENTRY_LEN 0x08 #define HDA_BDL_ENTRY_LEN 0x10 @@ -246,8 +245,6 @@ static const hda_set_reg_handler hda_set_reg_table[] = { HDAC_OSTREAM(1, HDA_ISS_NO, HDA_OSS_NO) HDAC_OSTREAM(2, HDA_ISS_NO, HDA_OSS_NO) HDAC_OSTREAM(3, HDA_ISS_NO, HDA_OSS_NO) - - [HDA_SET_REG_TABLE_SZ] = NULL, }; static const uint16_t hda_corb_sizes[] = { @@ -714,7 +711,10 @@ hda_write(struct hda_softc *sc, uint32_t offset, uint8_t size, uint32_t value) uint32_t old = hda_get_reg_by_offset(sc, offset); uint32_t masks[] = {0x00000000, 0x000000ff, 0x0000ffff, 0x00ffffff, 0xffffffff}; - hda_set_reg_handler set_reg_handler = hda_set_reg_table[offset]; + hda_set_reg_handler set_reg_handler = NULL; + + if (offset < nitems(hda_set_reg_table)) + set_reg_handler = hda_set_reg_table[offset]; hda_set_field_by_offset(sc, offset, masks[size], value); From nobody Fri Jan 20 17:59:16 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Nz6h43BMWz2t8YZ; Fri, 20 Jan 2023 17:59: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Nz6h42kGqz4LF4; Fri, 20 Jan 2023 17:59:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674237556; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ygPwe9XvrQTc6yeUmLb/rcOQ5W+aO50Cj+5WSHnPesk=; b=oWbM+G0PxmoBbvgarTH5A/04+InkDtHM81y0UuuXodYqt6n1LzNLx8kral55hc6HNm6E5n 0pAIxOygSUS6T9G+wmjP4RstUKjPVKEgB4mIG/4Yu7fRT7P71E/O+OnhoDmcyTAMCb1J7P /0+jls2gFB6THP6kj7KSHVT6PfOIcbWCGskzh8cScFY05YRUwLylgXAnxFCfMHLpewhggm tG1NENBgmjbkZRl2kUl8FTXgM0pxO90nWGw4mytCyDTKiDq17/SsmM1YEMpYQmC6YbZJgK 57kC9rivhh+NHNW1j9uu7SM1Qs6CZMDhNbBzwWlfSnbPEfw2VJNIcGm7tQ2QaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674237556; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ygPwe9XvrQTc6yeUmLb/rcOQ5W+aO50Cj+5WSHnPesk=; b=GT3h35pNMtviEigjrQfoKa0F61kcXeJYN0684UDhYxxX+dwJC/RJtO8Q+7F1T5bnFP5O80 JYYpE7wQ/YcesRT0X6AO+Pst1vojmun1nyI+QI61FyqZbzRSDhHWkyBC1XczlwDwKxKPiO pQKBbZOgGYjefNbSLaCZmbzl/Xdn8qMPUVFTVuF+ELOqsKx7UadcB6iFg/rhZ05vuUCrb9 rxviqqNyYG6ICLdkrVhS2XVz7SRhjDOkWq092N09iCMogIgZxq9l6v00zzp7Ak+SAAyxVl hHo23HHwvAyyvMF9C+jyPHgBJPNOcSpYAzE9sjz9q1AA5JyuKg+k27rvu4vIlQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674237556; a=rsa-sha256; cv=none; b=PnUEZpu2r5n6rudU31V717HE0wHPBncsYmYA+lBvg5EOhHLc6ShDfG6edHZiWKuOpBuvLd 1LA94tHyaynNKI1rY250vGdJG4fGmqI1IBzDdEPsew+aKiSCw7yJtBGyqQVHV1KMinvOki by+KpgI5Ibis34odvlthdqrxwEoV25XQfmAyBV09sN2oWmxG/0FpEP/Ru/HRgVFODBEFUW 1d2PQZQNLS6Sb9yl3lwLgXIhfwnIRBj7iajyHr2VgTiOq+Qrh71OEAdpX4CL4J2O4cMgz6 XBVxhAdQlNlyqHFLcVSRRX1YpMX4daRpyR9/WSD2w/fQt6aoJpz4Qc/bl44AtA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Nz6h41n1rzfc4; Fri, 20 Jan 2023 17:59:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30KHxGsv084697; Fri, 20 Jan 2023 17:59:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30KHxGD9084696; Fri, 20 Jan 2023 17:59:16 GMT (envelope-from git) Date: Fri, 20 Jan 2023 17:59:16 GMT Message-Id: <202301201759.30KHxGD9084696@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: cf57f20edcf9 - main - bhyve: Fix a buffer overread in the PCI hda device model. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: cf57f20edcf9c75f0f9f1ac1c44729184970b9d9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=cf57f20edcf9c75f0f9f1ac1c44729184970b9d9 commit cf57f20edcf9c75f0f9f1ac1c44729184970b9d9 Author: John Baldwin AuthorDate: 2023-01-20 17:58:38 +0000 Commit: John Baldwin CommitDate: 2023-01-20 17:58:38 +0000 bhyve: Fix a buffer overread in the PCI hda device model. The sc->codecs array contains HDA_CODEC_MAX (15) entries. The guest-supplied cad field in the verb provided to hda_send_command is a 4-bit field that was used as an index into sc->codecs without any bounds checking. The highest value (15) would overflow the array. Other uses of sc->codecs in the device model used sc->codecs_no to determine which array indices have been initialized, so use a similar check to reject requests for uninitialized or invalid cad indices in hda_send_command. PR: 264582 Reported by: Robert Morris Reviewed by: corvink, markj, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D38128 --- usr.sbin/bhyve/pci_hda.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bhyve/pci_hda.c b/usr.sbin/bhyve/pci_hda.c index bb8fba1a54bb..9e9d7ab5a626 100644 --- a/usr.sbin/bhyve/pci_hda.c +++ b/usr.sbin/bhyve/pci_hda.c @@ -475,12 +475,14 @@ hda_send_command(struct hda_softc *sc, uint32_t verb) struct hda_codec_class *codec = NULL; uint8_t cad = (verb >> HDA_CMD_CAD_SHIFT) & 0x0f; - hci = sc->codecs[cad]; - if (!hci) + if (cad >= sc->codecs_no) return (-1); DPRINTF("cad: 0x%x verb: 0x%x", cad, verb); + hci = sc->codecs[cad]; + assert(hci); + codec = hci->codec; assert(codec); From nobody Fri Jan 20 18:05:17 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Nz6q12Yr5z2t9HH; Fri, 20 Jan 2023 18:05: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Nz6q123bzz4Mn3; Fri, 20 Jan 2023 18:05:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674237917; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qp3AF9QUyQAZVIgyKhzoaswnhnVpEK+NUzo/Os/TDCk=; b=pIAkZY3vW9iWKLw8A98+1RnCLyOHM8+MBQgM/d0zCmu6MNROYjFp2yOF21gc2J/d1lf4P7 FKK1im55VuYW/ZEioe99WCpisbJA7epOgCPSpYFCVR+TwWB1kzs0kaIBTep1tG1kWj/tMZ xzaFwdHrVzlS71as4JzjXqBX44UXYrI5onJxu1YqbShQHpF8U6xlitHPjTSFX4sKRz7Rir hBBXiT5ZV7ZvYJyyAYQOcvokl4IdLscdlXrdMKU8kd2XjDyUPK7gbf4umwqksjU538aR3f l04OTnzI9xMItDv08frYsFglklzNOXiNyK7+0Bn4l7ygJZ2mFTi5bsS0LGynUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674237917; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qp3AF9QUyQAZVIgyKhzoaswnhnVpEK+NUzo/Os/TDCk=; b=ArrFOyVWZ6Kl0yvgrlSSmDGx3QCxKYztgPooyCHCovcQl/RBfQ2xOMh+kCvD9mLzLtvKPM fYJH633Nu2m/fpt0luqEmp1TM9YdJeHf9Ga5v8sL1JIu+kA+ihNdesfG+H8m3a/h+k/6XA tK5hU58yLTR42AXhODykq7aVsGrRHYBjaziIMrvRN68+RtZ+9dhPVMYkZvALd7s2d2e96U eBXfXi2tD05R3vUqWCDwwfQu3yQnFviN9Wj3WHKjlDFtl9bs7I3VUJOED2C0cgFE6g3qOG G5D7TxNi+6RjfyRKwBDvQxwEV4ewTrXj3ABFLLnH3Al0MGJDdQfRCO5DNPH1Og== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674237917; a=rsa-sha256; cv=none; b=rovQNFxyNOJ+r+wvndqGXaeBvizpUB7KAhPvacH33c7s4ts0QywRdynlVUaD3J/yf9rMTn QhSKy/nlurU8Ne1wWKwpV9tXZQz9/vp1IVfAUkVflSt084w27oQ5szcPHSb3c41eMD/yGp jxHqcdbLG5p3sAm3J6dayVNfaUmilCA5/HAIu1fooBoPYpxWRs9sJgBs+Y8Ew653e4jg7g 9RaAFvgvB4TzDvmf7Q6+nkYYGR/sU8LWVZvoQTaCXqK/51A8FK16siMeTDwQABwdx9IbRv 1u08nsGL12TY23ih5CSamHaJXeDZw51HY2U8ZGGKHFQOHhxqRq9t1DrY1ED2sg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Nz6q116lhzfgH; Fri, 20 Jan 2023 18:05:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30KI5HCI099188; Fri, 20 Jan 2023 18:05:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30KI5Ht0099187; Fri, 20 Jan 2023 18:05:17 GMT (envelope-from git) Date: Fri, 20 Jan 2023 18:05:17 GMT Message-Id: <202301201805.30KI5Ht0099187@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: fa1d803c0f65 - main - epoch: replace hand coded 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fa1d803c0f652d72840a3c59139baf9d30792860 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=fa1d803c0f652d72840a3c59139baf9d30792860 commit fa1d803c0f652d72840a3c59139baf9d30792860 Author: Brooks Davis AuthorDate: 2023-01-20 18:03:39 +0000 Commit: Brooks Davis CommitDate: 2023-01-20 18:04:40 +0000 epoch: replace hand coded assertion The assertion is equivalent to kstack_contains() so use that rather than spelling it out. Suggested by: jhb Reviewed by: jhb MFC after: 1 week Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D38107 --- sys/kern/subr_epoch.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/kern/subr_epoch.c b/sys/kern/subr_epoch.c index 100221cd62f9..98a560e44c9d 100644 --- a/sys/kern/subr_epoch.c +++ b/sys/kern/subr_epoch.c @@ -468,9 +468,7 @@ _epoch_enter_preempt(epoch_t epoch, epoch_tracker_t et EPOCH_FILE_LINE) MPASS(cold || epoch != NULL); td = curthread; - MPASS((vm_offset_t)et >= td->td_kstack && - (vm_offset_t)et + sizeof(struct epoch_tracker) <= - td->td_kstack + td->td_kstack_pages * PAGE_SIZE); + MPASS(kstack_contains(td, (vm_offset_t)et, sizeof(*et))); INIT_CHECK(epoch); MPASS(epoch->e_flags & EPOCH_PREEMPT); From nobody Fri Jan 20 19:04:44 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Nz87c5MDNz2v20S; Fri, 20 Jan 2023 19:04:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Nz87c4pSLz3DK2; Fri, 20 Jan 2023 19:04:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674241484; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y2sIX6Vq8RWXqvy415piBIbJOPUvNwTlWkmL4NTTTdM=; b=lPEVG6lo5A4M8Oe6mG8+k7gZ9kGGD/MrrsezMp6RQBJjqK/aouLMTbllJnkxffN6+WSD8/ WN3LhXboPFJA+X0VpWn0IPsFftKrzuNEHuvAtDdSnDqkUo7fmV4jx3qKCduji2jylLZvkX ooh1baoBNU85amDbfEtMe6CXAJvBnZMJb8RzjGoJV9fyg/Ko4IRb3BgSORWvQkdrPqhVdW MqCbVnhvVhHYjhMWneja9u3x2lSI0mKE2mNJXP/dbbxblKbkHcdzWiCeMy5aLLr3pXr/1g 4Aa/pXkld2eRZZbF4jnRO0+wfUbsMtFCoNlFIUwlYetsb8IERq2DeepRla2bPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674241484; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y2sIX6Vq8RWXqvy415piBIbJOPUvNwTlWkmL4NTTTdM=; b=g1uYwIwak1MVxTLCn6eX4dcEX7PI6XxUYwO3LbxkaXNZUTdMa71S8s7rwtatFYlwDMqpji NCJ/m20ApwhgoxIrm2uqwTNJPjuNBJ4aZ7McTe9ADwDiCk3TWaYF8oZP/IO1u8/O7uGK6L xvCPaauDhvQKlPN4XP/Vjl2VPcsyJArTxLLI6r32l2QceoZyI02+taiZn+GZrjJa5Hu5bI 8PLchI/6LSf3s1sZzAXSsq92WSL4ttWc9GrJfkfiNEDukgr0PiVPdTptYSVu10dL6ZegC5 KaQjW22MN6pT6bUsVRe3Br+r9kUbo2NpyFo7QtV/PCvs+R+JvULRt3I1gY77wA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674241484; a=rsa-sha256; cv=none; b=VLMib1KFgaAkULO2gcu2Imy7RAqKuFswJqWEgr9kJlvyUjIEqNjkce+WeSMAZsZWfpHbaW NhVcdZxxV9q15DS0AE/5+Ne+Iimo3NXtDTrueFte/+L/88vrXXsJl5IcQ2ZMI85X9J1R9r OOgxMWuJIKadaxx2KO5+zaHo+bOD6aSY2HQK2G7Oa6tVyMfQ4OSIy//YGaUS0KzKp3QBgl rW9odPcSDben5LxVpI3bG7bHVD5+4TDpvXwPR6HBVsP6m4n5NveXmhKuOcQ0sgCwOPU+sw excuIztBUmf3n1Gw+Jzex1B7aqLLpPqbCdzm9nHbBGYFLvG10AM69rYd+H99rA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Nz87c3qTDzhXs; Fri, 20 Jan 2023 19:04:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30KJ4ic6084873; Fri, 20 Jan 2023 19:04:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30KJ4iOV084872; Fri, 20 Jan 2023 19:04:44 GMT (envelope-from git) Date: Fri, 20 Jan 2023 19:04:44 GMT Message-Id: <202301201904.30KJ4iOV084872@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Wing Subject: git: ccf32a68f821 - main - vmm: take exclusive mem_segs_lock when (un)assigning ppt dev List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ccf32a68f821c5c724fb9a5b4b9576925122292f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rew: URL: https://cgit.FreeBSD.org/src/commit/?id=ccf32a68f821c5c724fb9a5b4b9576925122292f commit ccf32a68f821c5c724fb9a5b4b9576925122292f Author: Robert Wing AuthorDate: 2023-01-20 10:03:59 +0000 Commit: Robert Wing CommitDate: 2023-01-20 10:03:59 +0000 vmm: take exclusive mem_segs_lock when (un)assigning ppt dev PR: 268744 Reported by: mmatalka@gmail.com Reviewed by: corvink, markj, jhb Fixes: 67b69e76e8ee ("vmm: Use an sx lock to protect the memory map.") Differential Revision: https://reviews.freebsd.org/D37962 --- sys/amd64/vmm/vmm_dev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/amd64/vmm/vmm_dev.c b/sys/amd64/vmm/vmm_dev.c index 98738b1f0692..2d8ff43a74dd 100644 --- a/sys/amd64/vmm/vmm_dev.c +++ b/sys/amd64/vmm/vmm_dev.c @@ -479,6 +479,8 @@ vmmdev_ioctl(struct cdev *cdev, u_long cmd, caddr_t data, int fflag, case VM_ALLOC_MEMSEG_FBSD12: #endif case VM_ALLOC_MEMSEG: + case VM_BIND_PPTDEV: + case VM_UNBIND_PPTDEV: case VM_MMAP_MEMSEG: case VM_MUNMAP_MEMSEG: case VM_REINIT: @@ -491,8 +493,6 @@ vmmdev_ioctl(struct cdev *cdev, u_long cmd, caddr_t data, int fflag, /* FALLTHROUGH */ case VM_MAP_PPTDEV_MMIO: case VM_UNMAP_PPTDEV_MMIO: - case VM_BIND_PPTDEV: - case VM_UNBIND_PPTDEV: #ifdef BHYVE_SNAPSHOT case VM_SNAPSHOT_REQ: case VM_RESTORE_TIME: From nobody Fri Jan 20 20:11:11 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Nz9cH61Gkz2vB4K; Fri, 20 Jan 2023 20:11: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Nz9cH5ZSGz3Jwp; Fri, 20 Jan 2023 20:11:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674245471; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BhDlCJKrcohLtMeUBWSbAeT+eul5O6Fs9M6NWljFtsw=; b=D0GpmDPVBEsliQmIOcGs9JP2OSehf8GdmIW0TmA07tfdiyD6ZWxVG/1YGAVyeVpSwY08NT xuNIv6xbwWyJfXEteexXNr9Vl2f4Hzi4flX1KJS9MXpy6YpqB9UnQxfuIcePFuEARBxRGB kBC0bNqM1CJistgFyttxmWW2+lrvjgYlawP0YzzvRI5bUUmM8xDFjNqE6+4VmE8WU7qSDL oMjnpKkk3WjpXoFvrXBqbFTNyTmZqXfUjd0hcgiykKXsthqay2sPqT6fLwsJUB+esNJR5w /tWT4gU8llRt41w93x106vynKuCSCFStaAo1dqcl5XWOANF1vmHfk7OuWogh2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674245471; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BhDlCJKrcohLtMeUBWSbAeT+eul5O6Fs9M6NWljFtsw=; b=mrpzQXrw8KMgpwByr5IHa8yvezR4D90KsuvrsTH1Lm61np446iAOjg4VfW/soo/gvo200O jWYzcrIwLAvr74XWaElljssuSRmhCOVZFwfB6K8C+P/mETloaRaIFoQsg6qG2+yJOkH57s c6WlnOzHf+0SgtNpKpYAaZTmtynCW47NIIJ8t3jzAOgS5GgET8t782U+x5XxHRFnWPzucs a1BM50fi+gy1A4/mW1NedLwTj4W8Jq0Jzo1ZY/w/TniBeIKbwUAZy6sl013ae3/Ew8LaqD QeJ64XkPS8wXt/rfZg+yCkmP10KjFlOseoCSDJkiMFbqBwBdUsKw4PWKJrOymA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674245471; a=rsa-sha256; cv=none; b=BCUVtKeKa8aZyFjk5/DJJW04oqiuhOEhRT/fNFM8/UzOyD+2VPaqcjlshZwZy0ZNHkaXfZ /ROAZnBW5nN2XOJMSLeMYgzmMGYDSqkukluLfopBgtZornRfPGpgyLQ8I/3Nl3uoEDQuKq 5XrNnp+3gwfVukSZLsdwySxDBg+Vzbe8auQf+Td3Ezw3SxdpqpuDB/xL+/Jwx46e1oSB4r LDKMt3g2b7mJHudBSdZ9VVx90GmBU52VkN9EzrV74mufecBT6DkOrLxFpyJtLMKPjjGyhw AlZjE+1WPSEPdDx6ZtFntJYo4d0kqyJVGRYUIoQXTbl2CmURm9YyhU4S1QgJTA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Nz9cH4f3RzjqJ; Fri, 20 Jan 2023 20:11:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30KKBBjj082543; Fri, 20 Jan 2023 20:11:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30KKBBCi082542; Fri, 20 Jan 2023 20:11:11 GMT (envelope-from git) Date: Fri, 20 Jan 2023 20:11:11 GMT Message-Id: <202301202011.30KKBBCi082542@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Wing Subject: git: c668e8173a8f - main - vmm: take exclusive mem_segs_lock in vm_cleanup() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c668e8173a8fc047b54a5c51b0fe4637e87836b6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rew: URL: https://cgit.FreeBSD.org/src/commit/?id=c668e8173a8fc047b54a5c51b0fe4637e87836b6 commit c668e8173a8fc047b54a5c51b0fe4637e87836b6 Author: Robert Wing AuthorDate: 2023-01-20 11:10:53 +0000 Commit: Robert Wing CommitDate: 2023-01-20 11:10:53 +0000 vmm: take exclusive mem_segs_lock in vm_cleanup() The consumers of vm_cleanup() are vm_reinit() and vm_destroy(). The vm_reinit() call path is, here vmmdev_ioctl() takes mem_segs_lock: vmmdev_ioctl() vm_reinit() vm_cleanup(destroy=false) The call path for vm_destroy() is (mem_segs_lock not taken): sysctl_vmm_destroy() vmmdev_destroy() vm_destroy() vm_cleanup(destroy=true) Fix this by taking mem_segs_lock in vm_cleanup() when destroy == true. Reviewed by: corvink, markj, jhb Fixes: 67b69e76e8ee ("vmm: Use an sx lock to protect the memory map.") Differential Revision: https://reviews.freebsd.org/D38071 --- sys/amd64/vmm/vmm.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/amd64/vmm/vmm.c b/sys/amd64/vmm/vmm.c index 169109e8df6e..24f97a9244f0 100644 --- a/sys/amd64/vmm/vmm.c +++ b/sys/amd64/vmm/vmm.c @@ -651,6 +651,9 @@ vm_cleanup(struct vm *vm, bool destroy) struct mem_map *mm; int i; + if (destroy) + vm_xlock_memsegs(vm); + ppt_unassign_all(vm); if (vm->iommu != NULL) @@ -690,6 +693,7 @@ vm_cleanup(struct vm *vm, bool destroy) if (destroy) { for (i = 0; i < VM_MAX_MEMSEGS; i++) vm_free_memseg(vm, i); + vm_unlock_memsegs(vm); vmmops_vmspace_free(vm->vmspace); vm->vmspace = NULL; From nobody Fri Jan 20 20:25:32 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Nz9wr5P81z30tQ3; Fri, 20 Jan 2023 20:25:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Nz9wr4sSjz3LGk; Fri, 20 Jan 2023 20:25:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674246332; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gyGMabOUuJ4Hw7d/yY45Uk/rDHuAW5bcQmXA8X1kdTA=; b=XMdazZhqOcbQH2Ar7zJkw3uG0+C4prGWgM2XWNRqHqkBEt/VBEM47WEJMqVueAUJbyuRzL zxlD8eq+0xC3VNVeYGdKBKjgYt1GosM8O8CJz+j1qaC4BVuxShwCDIGTbdG6eaUhDxfmV9 liXIWKWtFKIgovBBk/oB/SCHxU1VDdsqOcAnrgyB7WXrD51f/R6jwPMOEPSAl6XvZQBxcB /PNhocM0W4b0+ov5PkorakClroJFa/tR3QNwZ9aSlnikBO3igX2MpG9pQ6XPSHwgFXb/z/ eRH03inSv1K0Fzugh6k2WPJA0ARtjhpsWvU0MoCergiTr8REM6On2+NRPnDufA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674246332; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gyGMabOUuJ4Hw7d/yY45Uk/rDHuAW5bcQmXA8X1kdTA=; b=V0if0gttV3s0MRXXAV0p3DP/yvx8dBBz3NYQAznneslWZjf72q3kDfZVKS/ZatPbF7Z/iG KpE3WTqQeAbHOdBvV277QrUlnDLtAU/CgSeOYc4hj2LkYqY8twh9R5gTred3afSGYFs9Vy ZwoAbrwVQhMbz6zeITMzZCvkCfchpuRmYah4XpTONF+3SJWviQUYqHF1+ZcGwK1xkLjuRx 1I286e2oKFuboP90Es8ZCkEqcNJM4GUrNI9CaM3R2CzEp+BGqJ7n7+uCTv9QGMUQK4PpRU UpQWOY9hHVChnx1Gj6irh/FliaAjDIpM4V05sZTaLGZ1IuMQNGw5ElqTsY3JCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674246332; a=rsa-sha256; cv=none; b=Vh5JhwsHUYUN9fc7i1IoOSYgSJB6UyH3GL8/E4mYZ44MUSEY70/sCZvAo2MoJ1sBAAFxbm CzX2h3ujTxQWL755pXY8GKMtcln73xAKx3WVPrHu2xc+GGllM+8d09SNwRTxJMczlxemg3 pNVXy9zclb1ppNRL5+fwCxyihUo1Mn5rCqYaeVAhCJjhnEp49k1ZmecFgbPXSM89aljv0q xD2bcPEHdsRRj5C8yhCPAHZ61dIysgt2nDYEft87CZugrZUWd0kydXUwDmo5kUDpFlCdQt C9QuHXGL5xQz4lugzpwqfBu/qicRWczsWbamga4q5USYSKgwdYR/dhQc3LUTXQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Nz9wr3wCmzkMf; Fri, 20 Jan 2023 20:25:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30KKPW06000565; Fri, 20 Jan 2023 20:25:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30KKPWfv000564; Fri, 20 Jan 2023 20:25:32 GMT (envelope-from git) Date: Fri, 20 Jan 2023 20:25:32 GMT Message-Id: <202301202025.30KKPWfv000564@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Wing Subject: git: 27029bc08f1d - main - vmm: fix use after free in ppt_detach() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 27029bc08f1d7fdb39b2aee6ff8263f68dd93495 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rew: URL: https://cgit.FreeBSD.org/src/commit/?id=27029bc08f1d7fdb39b2aee6ff8263f68dd93495 commit 27029bc08f1d7fdb39b2aee6ff8263f68dd93495 Author: Robert Wing AuthorDate: 2023-01-20 11:25:27 +0000 Commit: Robert Wing CommitDate: 2023-01-20 11:25:27 +0000 vmm: fix use after free in ppt_detach() The vmm module destroys the host_domain before unloading the ppt module causing a use after free. This can happen when kldunload'ing vmm. Reviewed by: markj, jhb Differential Revision: https://reviews.freebsd.org/D38072 --- sys/amd64/vmm/intel/vtd.c | 2 ++ sys/amd64/vmm/io/iommu.c | 1 + sys/amd64/vmm/io/ppt.c | 4 +++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/sys/amd64/vmm/intel/vtd.c b/sys/amd64/vmm/intel/vtd.c index 8f06dc823364..21e81223f6ee 100644 --- a/sys/amd64/vmm/intel/vtd.c +++ b/sys/amd64/vmm/intel/vtd.c @@ -446,6 +446,8 @@ vtd_add_device(void *arg, uint16_t rid) struct vtdmap *vtdmap; uint8_t bus; + KASSERT(dom != NULL, ("domain is NULL")); + bus = PCI_RID2BUS(rid); ctxp = ctx_tables[bus]; pt_paddr = vtophys(dom->ptp); diff --git a/sys/amd64/vmm/io/iommu.c b/sys/amd64/vmm/io/iommu.c index 6a589f153815..01ce29539ec2 100644 --- a/sys/amd64/vmm/io/iommu.c +++ b/sys/amd64/vmm/io/iommu.c @@ -258,6 +258,7 @@ iommu_cleanup(void) } IOMMU_DISABLE(); IOMMU_DESTROY_DOMAIN(host_domain); + host_domain = NULL; IOMMU_CLEANUP(); } diff --git a/sys/amd64/vmm/io/ppt.c b/sys/amd64/vmm/io/ppt.c index edb65a3ac07b..26dad1832b10 100644 --- a/sys/amd64/vmm/io/ppt.c +++ b/sys/amd64/vmm/io/ppt.c @@ -182,7 +182,9 @@ ppt_detach(device_t dev) num_pptdevs--; TAILQ_REMOVE(&pptdev_list, ppt, next); pci_disable_busmaster(dev); - iommu_add_device(iommu_host_domain(), pci_get_rid(dev)); + + if (iommu_host_domain() != NULL) + iommu_add_device(iommu_host_domain(), pci_get_rid(dev)); return (0); } From nobody Fri Jan 20 20:32:21 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NzB4k24hkz30vfL; Fri, 20 Jan 2023 20:32:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NzB4k1fbVz3M1L; Fri, 20 Jan 2023 20:32:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674246742; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sEDybYUcjAf8nxtgYTaTSozs9oRXdoENE4hdIwQVFVU=; b=xaaoHR2p5x9q7A3WmsTcd9EfrEYKDYOlKbPY48hZtP2fABgYbO8lZcFUxOcCrJkD785KdS CzzNQePeAYqVONEdJVEju/IcX8EQqr45W5CbtSCW0gMNG20Spt0PfYysJy5Wm5uvUuEZkY jfea1c03oCSD594Dorp6ewA4K2WJFay1DDMemMWbl6U2iBCVNvChqbfFNsHdSKSRP6VW0t 4xdRTEMDSJCFUzr0U8+NkbexJgrsArIiV0elqioN5XGiVTguC1a3w5IPsSgYjxzqVlOWFe 3Er/rzM7FMY7nxsKj3MATn9wuqLqJZrdxISbZv8jzka3lQj4IxTySoiN8N2TBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674246742; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sEDybYUcjAf8nxtgYTaTSozs9oRXdoENE4hdIwQVFVU=; b=kpb7QYTi77NiLknyPj56PgtdBe6q5+Vt/TOq+KBU7NDXpt5kCB1nYpJu0MwDJzayAC8aoV nw4INQmQusNSbRHbHcaiStMbNDo8uTd5Jr2U8lMBG86xN3ovBU3Xd5iMTrgWdtVKAvWtfH 7/o9GZLJxLCfkgZXB4VhlOiYBsR9o+Sz0nSX2p8aubXEZQMz6tCe8zHsJcKYxmWdzS8c2h F9/f+YmgCvqJtChnuPGzmhmOIdXeorpbjIM74S1nh0jk8AYUcl/6H2uUoC8Wqn0nE8NQ4e +AF9vUXj5pQQGWmyBpqfUs0V8rHXn/KIuHMUrqSYZvtLGHkKyIgYDgNjfygYqg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674246742; a=rsa-sha256; cv=none; b=X5tqq7wEN2xaJVVF4cpa2BhO9/44ghEHR9xS36UXlJxYn6+tvVZq5RjCf2zFTPchYY2JRZ 27Y/qHk63SCu0BixUgHRWBRPZdAmF4gnGip3OAgQio1iGmgUMxCo9mmdzKwdqQpe4gykzo EloVtt1oaNS2OSTp8TP4VbXqJWD4iOckZuaLh2UpmtyrxHXgvznMDTezx1+73gR1n94qR7 nd0SqzE3FttNdXBWNrRrEylHyLINJgWpMHWlN4NibKyZQm1lUAf68F9/zEcXUeiOw04TqJ /TR38dw5L7R+YrGAoyV1yh0LbmsnV5vu7diSCrHkD6qvDajhsmr7qEmcTOWtyg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NzB4k0fmPzk8N; Fri, 20 Jan 2023 20:32:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30KKWLuG014925; Fri, 20 Jan 2023 20:32:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30KKWL2F014924; Fri, 20 Jan 2023 20:32:21 GMT (envelope-from git) Date: Fri, 20 Jan 2023 20:32:21 GMT Message-Id: <202301202032.30KKWL2F014924@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: 6f7b5d5d3c2e - main - hms(4): Fix a copy/paste issue and check both _X and _Y List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6f7b5d5d3c2e4704985723d5a23a2494050d8b6b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=6f7b5d5d3c2e4704985723d5a23a2494050d8b6b commit 6f7b5d5d3c2e4704985723d5a23a2494050d8b6b Author: Yuri AuthorDate: 2023-01-20 20:25:17 +0000 Commit: Vladimir Kondratyev CommitDate: 2023-01-20 20:29:53 +0000 hms(4): Fix a copy/paste issue and check both _X and _Y instead of checking _X 2 times. Reviewed by: wulf MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D38135 --- sys/dev/hid/hms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/hid/hms.c b/sys/dev/hid/hms.c index 87d207cc3f6b..f32760f60c4d 100644 --- a/sys/dev/hid/hms.c +++ b/sys/dev/hid/hms.c @@ -219,7 +219,7 @@ hms_probe(device_t dev) /* There should be at least one X or Y axis */ if (!hidmap_test_cap(sc->caps, HMS_REL_X) && - !hidmap_test_cap(sc->caps, HMS_REL_X) && + !hidmap_test_cap(sc->caps, HMS_REL_Y) && !hidmap_test_cap(sc->caps, HMS_ABS_X) && !hidmap_test_cap(sc->caps, HMS_ABS_Y)) return (ENXIO); From nobody Fri Jan 20 21:37:45 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NzCX96l5Lz313ZG; Fri, 20 Jan 2023 21:37:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NzCX96D3vz3jZl; Fri, 20 Jan 2023 21:37:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674250665; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Hk8Z59PVcc4fWPPY70z+psvVVbyuwfS9MXfvRimS5BU=; b=LTeQJLDlWyg71EwRX+8yiotUAyPqS5lloOegxdshTLGMaSXmZGg3EO2Ql5T5BHBhnBnLPQ lt+6eX3ZH08JXJenYpgjeHGRrHvErccnqtJX8oP7baGz8/EuMkZJop7Q2pYGTP+/UKzJvr pqy1wutCpo546yO8fgylyKV0sBdZ+ADCbRi0wV6B2qJQ/A1phKXHjipU3wP7tedmZxdGw4 sn4XL3AWG7bUiqw3OQnQ1jJQCYsOnLTuDDR1e85uBmonMno8YKD03xwLobw+zwMYmwLf7i 7IUv+iaTo5ULWhTIdZHoUbfgId4G78rPZfZUyENuYwpQeB9MypaM2VeFAxqyKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674250665; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Hk8Z59PVcc4fWPPY70z+psvVVbyuwfS9MXfvRimS5BU=; b=t28tH3gY26WKhN3etiWgVgekoG1He3Wx9zv3Knp09VzXx22x7/weUp6v8X/ToswmmEhUmx WypyQtk2trPOItN+qHDG/m5nUjt+BYBp7H/kf5NV7RiSwkr8H+/THb08lS2w1r9p9bJ2OA UQOq+G2Hn1r+raAGCJDAoRIqAKaWioHaYFegwZVk4mK4LHc8EFwfTkuhFWPlWjFkmvcIW7 DI6uBuGvpQbdAhcY/9vhJvDqxAvgm6bdkaxfzsu7AL9IucCY08waJL6wS+WSK7o8iS2Ucw N8oMxZFTolYsUZ5sG1xENUWxjwFKts81l5eVokpejzoxQ+A6G3nb1h+RjPHzQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674250665; a=rsa-sha256; cv=none; b=LttSWJeKUcxB77DE6isZPoX4mUCLgq/gMb9BUGuyNFu969GgAgWJ442bzIpGpk2hj/981f wbFd4pWSpoDt51hYLwJxoe8UkhT2il7MHZXdY7/m/FzJEooFIQOXwr8frHfugbMqtlsmmg h9ecXBHHqQ9nyynoDAdJ7CBXIw+uQ2hTQDTx97vgV5kjGyWFHBU7XNyejRoAbLI91VZT7X 6K38aeZ2QaCgrPK6SBOmX03FvoQC/EQVZID49dsyBPlU54dpogDGpm+8RD9uFsxk91llCu +WBYQCB1ndZZBuazYiv31bxSYEvEuRjqIIeaIcXKNCN0XPeKkqyXj9MEMU2j2g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NzCX95Ft5zl8K; Fri, 20 Jan 2023 21:37:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30KLbj0V001273; Fri, 20 Jan 2023 21:37:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30KLbjNm001272; Fri, 20 Jan 2023 21:37:45 GMT (envelope-from git) Date: Fri, 20 Jan 2023 21:37:45 GMT Message-Id: <202301202137.30KLbjNm001272@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: 5657f49ef33b - main - kern_umtx.c do_wait(): correct confusing indent List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 5657f49ef33b13934ccdc36e3990fdd71376baed Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=5657f49ef33b13934ccdc36e3990fdd71376baed commit 5657f49ef33b13934ccdc36e3990fdd71376baed Author: Konstantin Belousov AuthorDate: 2023-01-20 21:32:27 +0000 Commit: Konstantin Belousov CommitDate: 2023-01-20 21:33:11 +0000 kern_umtx.c do_wait(): correct confusing indent Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/kern/kern_umtx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_umtx.c b/sys/kern/kern_umtx.c index 75ce1dc43f81..86d644c835c7 100644 --- a/sys/kern/kern_umtx.c +++ b/sys/kern/kern_umtx.c @@ -1268,7 +1268,7 @@ do_wait(struct thread *td, void *addr, u_long id, uq = td->td_umtxq; if ((error = umtx_key_get(addr, TYPE_SIMPLE_WAIT, - is_private ? THREAD_SHARE : AUTO_SHARE, &uq->uq_key)) != 0) + is_private ? THREAD_SHARE : AUTO_SHARE, &uq->uq_key)) != 0) return (error); if (timeout != NULL) From nobody Fri Jan 20 21:56:41 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NzCy21XRQz316FP; Fri, 20 Jan 2023 21:56: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NzCy204nWz3lMd; Fri, 20 Jan 2023 21:56:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674251802; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GR0oOb2Fu3clWqrLFfJHP7OC7tC2NZq/D4Brz+lTeLE=; b=IOX7buIFHRP95oHPhaBIPHVX66/L28zvJWoPJ9IV8l1u5TJ4f9I+fkuHr3G9X3mGpG00JH JuIpEcQpAr86Ha0cBk1fQZ/+Ct+HCuSCA2vqQgpjTKLZm0ZxmDR/9FCKBv2L6DyG/PqUsk Fo0SPNB8TUcy6JrcmTrJ72KAL7oYYdtD98AJo4yF9MXF/+GKwlanDrkdpAARzW1aYr5t7V o14dkY51fFelq6npEi8kZSKjk7RivqZg92RPgJIuLjbOJTcfIu0aFriBVlnq6ygIuP7GDB eDSI364bXwW5cFFzK8gZ1YAOhS4X/v0inW7Fii6StDcEU34026k+I+5FW7jguQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674251802; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GR0oOb2Fu3clWqrLFfJHP7OC7tC2NZq/D4Brz+lTeLE=; b=EZeJkYeIn+BxodcYReMxH8X3iPsF8z5GaFQ60Jp88Z3IgS2Q/B6qJOYMQc3ByY8E5vEpFo um0KpJUzwNK7G8FyqJObnyHAtJPuRmi8cC/t4W6SK3EUbraPsENxU/02zI1wgSALBuAXtf bLaqozRSLtDsRyG3AC5lTa4mpwB0zJ8x1E1dhL3AiHGJUhzttV2aMGdNJgZScwULBD3+3l bzHb6Wcdo4zKpGOxbGhZHGv80VbMviHR/6mOpuaIuWvy08KYre0I7exwMyxsDZyjnBT5ts zYneqKa6Q3GmkKc/QbG9QwOEBDyK+Ng5D0ApHnLyEouU/OWC2yZZdAMkSkLgiA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674251802; a=rsa-sha256; cv=none; b=ZWEI7IG8I3eJEIqbPhHlkxUHX+ZCJR+UqKkMMcprjWw20PLtRhhbJfEj4u1I/nknLNHt4g l0d4g/VC9UNQEkHApVXdoHWm/1LERfqKvyMaTAEhI99DQ2sc7SCDzRMZG031xSCImfOWhw cZd1upUMDYHo/i7AZPzGkpAO0z8hysxU8H6BeeCUETsW12CjtW+FnjC9A3t2I0cYzs65cw 7MQU0RHDqpKVGgdkgBXPYBk4ayC9C6lI5eolON4RaJIwAQ/tV8N4M8cKdVBIIY6OYseFkv 37126lHuf+cU2Suk5lPM9/LZ8rIJuB3xb9Y5U4+lvZZfEixaXLMVKmDWVuRV7g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NzCy16Dm6zlyD; Fri, 20 Jan 2023 21:56:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30KLufhW030559; Fri, 20 Jan 2023 21:56:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30KLufOn030558; Fri, 20 Jan 2023 21:56:41 GMT (envelope-from git) Date: Fri, 20 Jan 2023 21:56:41 GMT Message-Id: <202301202156.30KLufOn030558@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: 456f05756bbd - main - Handle int rank issues in in vn_getsize_locked() and vn_seek() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 456f05756bbdd818f7b2474faeef0d4d7baecd69 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=456f05756bbdd818f7b2474faeef0d4d7baecd69 commit 456f05756bbdd818f7b2474faeef0d4d7baecd69 Author: Konstantin Belousov AuthorDate: 2023-01-20 06:45:35 +0000 Commit: Konstantin Belousov CommitDate: 2023-01-20 21:56:29 +0000 Handle int rank issues in in vn_getsize_locked() and vn_seek() In vn_getsize_locked(), when storing vattr.va_size of type u_quad_t into off_t size, we must avoid overflow. Then, the check for fsize < 0, introduced in the commit f45feecfb27ca51067d6789eaa43547cadc4990b 'vfs: add vn_getsize', is nop [1]. Reported and reviewed by: jhb Coverity CID: 1502346 Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D38133 --- sys/kern/vfs_subr.c | 9 +++++++-- sys/kern/vfs_vnops.c | 4 +--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index a1a73f2ddf38..008e646f2b7f 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -66,6 +66,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -7128,8 +7129,12 @@ vn_getsize_locked(struct vnode *vp, off_t *size, struct ucred *cred) ASSERT_VOP_LOCKED(vp, __func__); error = VOP_GETATTR(vp, &vattr, cred); - if (__predict_true(error == 0)) - *size = vattr.va_size; + if (__predict_true(error == 0)) { + if (vattr.va_size <= OFF_MAX) + *size = vattr.va_size; + else + error = EFBIG; + } return (error); } diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index f3a6360eb250..48d15ce6ab25 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -2656,9 +2656,7 @@ vn_seek(struct file *fp, off_t offset, int whence, struct thread *td) if (fsize == 0 && vp->v_type == VCHR && fo_ioctl(fp, DIOCGMEDIASIZE, &size, cred, td) == 0) fsize = size; - if (noneg && - (fsize > OFF_MAX || - (offset > 0 && fsize > OFF_MAX - offset))) { + if (noneg && offset > 0 && fsize > OFF_MAX - offset) { error = EOVERFLOW; break; } From nobody Fri Jan 20 23:17:31 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NzFlH3gd7z2srDJ; Fri, 20 Jan 2023 23:17: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NzFlH32X8z3qv9; Fri, 20 Jan 2023 23:17:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674256651; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+RDb+kPgwlEVw9iD88qwXfezhSZS+JALmIuSoZcLhSc=; b=LLc9Vp0THD+jyggZdNxYAOba7WKPt77zBnLNhoZesjyctFo600PwaHpBoJQB9Bc1QwXpkP OX1OYlT9tghgdWC7lkT5XuhqZC8nY1tQ2AaAFa/FzydE5r2Gs3GMJPqTn7IijUOL5kvy0H C4pSCppaWDA4X6DYl5r1/hM+m7acuJJnAUESoXALKWVZcHCzKGrCZYNYlVTlb1qMdctbLF CMn9uQxv2N0EclOLdGzB800AN+HVSAVyjjqOdvAC7KWxadc11KJ3+0k3SYC5oiTYHOoWvC Kt2d2KD1lWOhM46RTzQG4+0cYfo7NX4D+/uXAMyqqyamd4ynLNlXHVohnDXCxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674256651; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+RDb+kPgwlEVw9iD88qwXfezhSZS+JALmIuSoZcLhSc=; b=ZerEPLH7GdnV6mt7TzRmXbaLOq3oKLcrpAvjIsuy+B7hJJXFjNgij6BKCwQcjHrXq3eXn9 ZBocTkjJqcEPoyz8w+nRBppV/BngUj7J5ybLHj4IlFR36fZVMxs+fun2vHw5jEgFgLGsr6 cG4KdxFNk5Ap5PrbInk/E18xqcHi3Isjj1jUW2HAO25hZtG5lcVDSKI36SuoQ/44Cq+LTQ +IkXCFmj+dZx/H7nUW6lSoJByf3E5TLZLCLNnUKwG/R+Dumq5rxRFOpg0R94JgpfjiWq6D u6agrInAOa7XX4KHqR15eWrgzk4tiBhvQyZnuiU0oeXNTQArcL839h5+tdDkyw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674256651; a=rsa-sha256; cv=none; b=ChvOoADTDmJ0FBz97vFtCr8KbF++5UJqrH4UbR7aAI8Jhr79kszNU53L9HMjNs0yT7rAgG nt7GG7nxcIt14PC+TVf3gLoRkjwfaUkjlVsKqbeC27kyqpC7iyEpQxEj3gHvLkUuLA+GNQ uEwpdWtyaI91EIZLYy7nvcpnINVLNv+iPQgyFM0sM4EPu+lKrzMCiChrkuS0Je76Daisoz PY9kASlE7gKTBJE4msBU5A6uL8uitBxL2K+97okOHUUzOWw9jJpbPvQv6lcfK8RT+2/Enh Q7+Td2aFFvf6nNOqTpyPYzl3mOvgtf1Lb5x04bwlMnBaBurIUMC810UGm8YK9g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NzFlH20Sxzp92; Fri, 20 Jan 2023 23:17:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30KNHVoF045195; Fri, 20 Jan 2023 23:17:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30KNHVqb045194; Fri, 20 Jan 2023 23:17:31 GMT (envelope-from git) Date: Fri, 20 Jan 2023 23:17:31 GMT Message-Id: <202301202317.30KNHVqb045194@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: 0cd612664eba - main - UPDATING: update notes on EFI booting List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 0cd612664ebaeaf960ffc8ebe4d3ff44be2a8eef Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=0cd612664ebaeaf960ffc8ebe4d3ff44be2a8eef commit 0cd612664ebaeaf960ffc8ebe4d3ff44be2a8eef Author: Warner Losh AuthorDate: 2023-01-20 23:13:54 +0000 Commit: Warner Losh CommitDate: 2023-01-20 23:13:54 +0000 UPDATING: update notes on EFI booting The notes on EFI booting and updating for ZFS had become dated and only partially updated. Expand the notes with a few more details and a pointer to laoder.efi(8) and uefi(8). Sponsored by: Netflix Discussed with: pauamma, karels Differential Revision: https://reviews.freebsd.org/D36629 --- UPDATING | 46 +++++++++++++++++++++++++++++++++++++--------- 1 file changed, 37 insertions(+), 9 deletions(-) diff --git a/UPDATING b/UPDATING index a0fdb839f668..689ddfedf6d3 100644 --- a/UPDATING +++ b/UPDATING @@ -2528,22 +2528,50 @@ COMMON ITEMS: ZFS notes --------- - When upgrading the boot ZFS pool to a new version, always follow - these two steps: + When upgrading the boot ZFS pool to a new version (via zpool upgrade), + always follow these three steps: - 1.) recompile and reinstall the ZFS boot loader and boot block + 1) recompile and reinstall the ZFS boot loader and boot block (this is part of "make buildworld" and "make installworld") - 2.) update the ZFS boot block on your boot drive + 2) update the ZFS boot block on your boot drive (only required when + doing a zpool upgrade): - The following example updates the ZFS boot block on the - freebsd-boot partition of a GPT partitioned drive ada0: - "gpart bootcode -p /boot/gptzfsboot -i $N ada0" - The value $N will typically be 1 (if booting from BIOS) or 2 (if - booting from EFI). + When booting on x86 via BIOS, use the following to update the ZFS boot + block on the freebsd-boot partition of a GPT partitioned drive ada0: + gpart bootcode -p /boot/gptzfsboot -i $N ada0 + The value $N will typically be 1. For EFI booting, see EFI notes. + + 3) zpool upgrade the root pool. New bootblocks will work with old + pools, but not vice versa, so they need to be updated before any + zpool upgrade. Non-boot pools do not need these updates. + EFI notes + --------- + + There are two locations the boot loader can be installed into. The + current location (and the default) is \efi\freebsd\loader.efi and using + efibootmgr(8) to configure it. The old location, that must be used on + deficient systems that don't honor efibootmgr(8) protocols, is the + fallback location of \EFI\BOOT\BOOTxxx.EFI. Generally, you will copy + /boot/loader.efi to this location, but on systems installed a long time + ago the ESP may be too small and /boot/boot1.efi may be needed unless + the ESP has been expanded in the meantime. + + Recent systems will have the ESP mounted on /boot/efi, but older ones + may not have it mounted at all, or mounted in a different + location. Older arm SD images with MBR used /boot/msdos as the + mountpoint. The ESP is a MSDOS filesystem. + + The EFI boot loader rarely needs to be updated. For ZFS booting, + however, you must update loader.efi before you do 'zpool upgrade' the + root zpool, otherwise the old loader.efi may reject the upgraded zpool + since it does not automatically understand some new features. + + See loader.efi(8) and uefi(8) for more details. + To build a kernel ----------------- If you are updating from a prior version of FreeBSD (even one just From nobody Fri Jan 20 23:17:32 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NzFlJ4Qyvz2srGf; Fri, 20 Jan 2023 23:17:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NzFlJ3q4Zz3rFW; Fri, 20 Jan 2023 23:17:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674256652; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wZR5alIsLT7fVXz/8c8+6HaDWnLJGCa7pvnJFUGLKkw=; b=RYa0XmM7wYiNFjBiIvEHC9B+AZRDpiGmrPkTj0hDuZyAhJVfii/Hpv1tcrCtm2kcaFOXO6 gFzNxhMrHOUJduTGfJwe8T3pVVqhoKzsGgLgl6UWw52kUnPOjO0q+yYEFwP2fQTQBeOyeD Ni88D+EuiHbxvX3nfeIlngq4DdiX8iFBLjMcR7jpen1A3EZke5f+j0Ll8fvOcpS0LI7gsJ GX9zULllar7UcV0dOaDqirU0Rr8IfpGrTVhQAfTLuxx65j2wq2j7qgKJmbXiF3Tr3fuLVs 9HVYzfaseYddD6LkHKEBCW1gZ9kiIZuRemJxUpPJTrvadHNEG7jMU29nOLBNog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674256652; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wZR5alIsLT7fVXz/8c8+6HaDWnLJGCa7pvnJFUGLKkw=; b=fCyraGhdoNq7vnn6bBDTDEBSM2PTKenGkvFGuzCLCvvLw5qFXCWAl9R4T6jCLOoUvs7grl +pkjNVVYKrT3Yy/KFZb/Rf3vLjAqCr5DgfjBTVMDh+FXvYuWjmiG6jK5cR497cfCMk1sfD hucKQDRmmaCCMFl7bB3eKbqSr5FvjzrPWn7eOS0oc1HJ9SobhAW4WQ7g2vRHXECu/vON3y iYDk/50pPst/X2c96dNUnsZou3gf/pCEwRM4JDr/nNItKul41oy3m/5gWdldFkBOBx/09a 9wR1zcrMGMF7nFIeAy1ZpnBv95H57Q7L+4KM44vTzaT3jKA0upg/2gvRG7RLGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674256652; a=rsa-sha256; cv=none; b=h2S0DZyv2mopA7ViDyn0GFS4kE0/v+lwuR+v4jz46qBVkI1f+BcgOLOUFBeBaMSv7sUgIJ MzvK1/qiU3t8McI4Ji5W2YSAQTpqoGm5C9oTr/fxn4OA6giLjtH3ca+2LUAha2HNCJw3GS PUwxxFDpGt3in0JMXyc1RP52sG0QAki0rCNSYrmd/TihGb5ocq6ffWfy5UZsz0NET4H68L 84Q7rfmH0rId6KbHUl86DYi0dEZ8zvQnUD96cuL28P7E/axQUOiM2xcvi3Pd1aKKwfmhD2 oH2mkdjQ0/siqiG8XhKO+SAU0EyV2G+YvsNLdPGrpLeSgG6MrAZcUAbYmy+ABg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NzFlJ2fZlzp42; Fri, 20 Jan 2023 23:17:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30KNHWP4045219; Fri, 20 Jan 2023 23:17:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30KNHWgV045218; Fri, 20 Jan 2023 23:17:32 GMT (envelope-from git) Date: Fri, 20 Jan 2023 23:17:32 GMT Message-Id: <202301202317.30KNHWgV045218@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: 2c6b910716e9 - main - elf_common.h: define EF_ARM_EABI_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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 2c6b910716e93ebc1a2e24b63781419982edbd30 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=2c6b910716e93ebc1a2e24b63781419982edbd30 commit 2c6b910716e93ebc1a2e24b63781419982edbd30 Author: Warner Losh AuthorDate: 2023-01-20 23:15:04 +0000 Commit: Warner Losh CommitDate: 2023-01-20 23:15:04 +0000 elf_common.h: define EF_ARM_EABI_VERSION The Linux distributions have had the EF_ARM_EABI_VERSION macro for a while now. The kernel of arm* targets build depends on it being in the host's elf.h environment. Add it here so it gets pulled in so there's one fewer hack required to build a Linux kernel on a FreeBSD host. Sponsored by: Netflix Reviewed by: jrtc27, kib, jhb Differential Revision: https://reviews.freebsd.org/D38139 --- sys/sys/elf_common.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/sys/elf_common.h b/sys/sys/elf_common.h index 9366593b24bd..87b6d1fbaedd 100644 --- a/sys/sys/elf_common.h +++ b/sys/sys/elf_common.h @@ -332,6 +332,7 @@ typedef struct { #define EF_ARM_EABI_VER3 0x03000000 #define EF_ARM_EABI_VER4 0x04000000 #define EF_ARM_EABI_VER5 0x05000000 +#define EF_ARM_EABI_VERSION(x) (x & EF_ARM_EABIMASK) #define EF_ARM_INTERWORK 0x00000004 #define EF_ARM_APCS_26 0x00000008 #define EF_ARM_APCS_FLOAT 0x00000010 From nobody Fri Jan 20 23:19:23 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NzFnR3dthz2srQ8; Fri, 20 Jan 2023 23:19:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NzFnR3Kxgz3rl8; Fri, 20 Jan 2023 23:19:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674256763; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8AWvToi9IevfKJDfI34Pia8tLVbkQaoqF6k9U8qvKwM=; b=xkTpPE4mvKpXQ0egsK6aQZOmORxHcXRMAVkN3eSTyCjnI6ts57YpPfGjxPNFtyAlplwIut mF35LbrZ0glf42Qs+OoEiPlyXnr0K/FYu6NSFQoCcj9jOt654mp9G/T24OrqS6DJOKpKpb 9EPBzUqLeyPMbxOuGoYTApPc+OvcRvbuQVI1z2IYchq5bolU7pnI3b2UzQd6VgpO+EUUM+ R3XMUrA/gPmdyuoCqVRZeUvTBfYFq6jqTAJJwcJsHTqEYq7/8VgTjlfyHUn8XTuA8rcw4a o8D4W+ku5rQR9UsZxY4nfeQ6zV2xt8QNN7XQiJXEyrnpGYo5771N2vs0TpeGLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674256763; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8AWvToi9IevfKJDfI34Pia8tLVbkQaoqF6k9U8qvKwM=; b=BXU4baQwyXLmsy6pGj4IMgyijs6q1RvkN4JBObz428RuoKxekcCdU/HmWY4L14R+kdcW0x RVgchMQgXZoiFLtgOpx4C4nqanxr87lBtR+QGYcw3fQn2IfZ9gWsHgThUSKdGDnJb3DbQN Tbmj0d4onZNyBixGnnXrLYhAyfMkB6FoRJm8CrgVhCE2wPcahAqGN8jpRuWZdpEU/mwW6L JJStwhESpPrpW00X4dnRBi4eaYXJnFH4KLVcsL4Pa9SHbYzAKI1urOXxCylSPuPLZTyyU2 eRLlpGD+30QiVjfGt/Tj46IHrCDwT5CRhv7JY17PH28swxFwbIbFxeFk5S3F8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674256763; a=rsa-sha256; cv=none; b=yPu2D7X1jCbmePZ/p22N8jzuTykHrwxpujoAmCKTi3y3tFjQO4oxr4zMs6hSICnHpFHGvc f//z4zi4t5SDBNVGVaE0dRnBJJ9eTQ2AtKorq8uL8HpmIt/59BKUQ6/OQNxBLIKgCQXaBR Debl/mgkucNXTOvJWpirj5FkGzPGhnRYHmDmtJZ22twLrYDMWm9B1UXnAnhJqXkGna6H4t v757fcWUE9XQEcjCgbwv7lj4HN9rdIVMM4iZBd45iHmgaDPO9Q3Qmce+fsmhOXoni+iBZV M4i4YiWn5uPI0sQIpdzV+1Ys951wrV4ukb25W7UjnqVLccGISny1DU/vAaCcvg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NzFnR2Mrjzp45; Fri, 20 Jan 2023 23:19:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30KNJNNc045548; Fri, 20 Jan 2023 23:19:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30KNJN6A045547; Fri, 20 Jan 2023 23:19:23 GMT (envelope-from git) Date: Fri, 20 Jan 2023 23:19:23 GMT Message-Id: <202301202319.30KNJN6A045547@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: e8c1bd7257bf - main - UPDATING: Remove old entries List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: e8c1bd7257bf0ec1f2315376e707b2171000502e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=e8c1bd7257bf0ec1f2315376e707b2171000502e commit e8c1bd7257bf0ec1f2315376e707b2171000502e Author: Warner Losh AuthorDate: 2023-01-20 23:17:45 +0000 Commit: Warner Losh CommitDate: 2023-01-20 23:17:45 +0000 UPDATING: Remove old entries Belatedly remove the entries older than the stable/11 branch point after stable/13 was created. This should be done shortly after the branch, not well after the branch point. Document this policy in UPDATING, though other checklists should likely be updated as well. Sponsored by: Netflix Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D37514 --- UPDATING | 854 +-------------------------------------------------------------- 1 file changed, 4 insertions(+), 850 deletions(-) diff --git a/UPDATING b/UPDATING index 689ddfedf6d3..970365c0fed3 100644 --- a/UPDATING +++ b/UPDATING @@ -1634,856 +1634,10 @@ https://lists.freebsd.org/archives/freebsd-current/2021-June/000153.html 20160708: The stable/11 branch has been created from head@r302406. -20160622: - The libc stub for the pipe(2) system call has been replaced with - a wrapper that calls the pipe2(2) system call and the pipe(2) - system call is now only implemented by the kernels that include - "options COMPAT_FREEBSD10" in their config file (this is the - default). Users should ensure that this option is enabled in - their kernel or upgrade userspace to r302092 before upgrading their - kernel. - -20160527: - CAM now strips the leading spaces from each SCSI disk's serial number. - This will affect users who create UFS filesystems on SCSI disks using - those disk's diskid device nodes. For example, if /etc/fstab - previously contained a line like - "/dev/diskid/DISK-%20%20%20%20%20%20%20ABCDEFG0123456", you should - change it to "/dev/diskid/DISK-ABCDEFG0123456". Users of geom - transforms like gmirror may also be affected. ZFS users should - generally be fine. - -20160523: - The bitstring(3) API has been updated with new functionality and - improved performance. But it is binary-incompatible with the old API. - Objects built with the new headers may not be linked against objects - built with the old headers. - -20160520: - The brk and sbrk functions have been removed from libc on arm64. - Binutils from ports has been updated to not link to these - functions and should be updated to the latest version before - installing a new libc. - -20160517: - The armv6 port now defaults to hard float ABI. Limited support - for running both hardfloat and soft float on the same system - is available using the libraries installed with -DWITH_LIBSOFT. - This has only been tested as an upgrade path for installworld - and packages may fail or need manual intervention to run. New - packages will be needed. - - To update an existing self-hosted armv6hf system, you must add - TARGET_ARCH=armv6 on the make command line for both the build - and the install steps. - -20160510: - Kernel modules compiled outside of a kernel build now default to - installing to /boot/modules instead of /boot/kernel. Many kernel - modules built this way (such as those in ports) already overrode - KMODDIR explicitly to install into /boot/modules. However, - manually building and installing a module from /sys/modules will - now install to /boot/modules instead of /boot/kernel. - -20160414: - The CAM I/O scheduler has been committed to the kernel. There should be - no user visible impact. This does enable NCQ Trim on ada SSDs. While the - list of known rogues that claim support for this but actually corrupt - data is believed to be complete, be on the lookout for data - corruption. The known rogue list is believed to be complete: - - o Crucial MX100, M550 drives with MU01 firmware. - o Micron M510 and M550 drives with MU01 firmware. - o Micron M500 prior to MU07 firmware - o Samsung 830, 840, and 850 all firmwares - o FCCT M500 all firmwares - - Crucial has firmware http://www.crucial.com/usa/en/support-ssd-firmware - with working NCQ TRIM. For Micron branded drives, see your sales rep for - updated firmware. Black listed drives will work correctly because these - drives work correctly so long as no NCQ TRIMs are sent to them. Given - this list is the same as found in Linux, it's believed there are no - other rogues in the market place. All other models from the above - vendors work. - - To be safe, if you are at all concerned, you can quirk each of your - drives to prevent NCQ from being sent by setting: - kern.cam.ada.X.quirks="0x2" - in loader.conf. If the drive requires the 4k sector quirk, set the - quirks entry to 0x3. - -20160330: - The FAST_DEPEND build option has been removed and its functionality is - now the one true way. The old mkdep(1) style of 'make depend' has - been removed. See 20160311 for further details. - -20160317: - Resource range types have grown from unsigned long to uintmax_t. All - drivers, and anything using libdevinfo, need to be recompiled. - -20160311: - WITH_FAST_DEPEND is now enabled by default for in-tree and out-of-tree - builds. It no longer runs mkdep(1) during 'make depend', and the - 'make depend' stage can safely be skipped now as it is auto ran - when building 'make all' and will generate all SRCS and DPSRCS before - building anything else. Dependencies are gathered at compile time with - -MF flags kept in separate .depend files per object file. Users should - run 'make cleandepend' once if using -DNO_CLEAN to clean out older - stale .depend files. - -20160306: - On amd64, clang 3.8.0 can now insert sections of type AMD64_UNWIND into - kernel modules. Therefore, if you load any kernel modules at boot time, - please install the boot loaders after you install the kernel, but before - rebooting, e.g.: - - make buildworld - make buildkernel KERNCONF=YOUR_KERNEL_HERE - make installkernel KERNCONF=YOUR_KERNEL_HERE - make -C sys/boot install - - - Then follow the usual steps, described in the General Notes section, - below. - -20160305: - Clang, llvm, lldb and compiler-rt have been upgraded to 3.8.0. Please - see the 20141231 entry below for information about prerequisites and - upgrading, if you are not already using clang 3.5.0 or higher. - -20160301: - The AIO subsystem is now a standard part of the kernel. The - VFS_AIO kernel option and aio.ko kernel module have been removed. - Due to stability concerns, asynchronous I/O requests are only - permitted on sockets and raw disks by default. To enable - asynchronous I/O requests on all file types, set the - vfs.aio.enable_unsafe sysctl to a non-zero value. - -20160226: - The ELF object manipulation tool objcopy is now provided by the - ELF Tool Chain project rather than by GNU binutils. It should be a - drop-in replacement, with the addition of arm64 support. The - (temporary) src.conf knob WITHOUT_ELFCOPY_AS_OBJCOPY knob may be set - to obtain the GNU version if necessary. - -20160129: - Building ZFS pools on top of zvols is prohibited by default. That - feature has never worked safely; it's always been prone to deadlocks. - Using a zvol as the backing store for a VM guest's virtual disk will - still work, even if the guest is using ZFS. Legacy behavior can be - restored by setting vfs.zfs.vol.recursive=1. - -20160119: - The NONE and HPN patches has been removed from OpenSSH. They are - still available in the security/openssh-portable port. - -20160113: - With the addition of ypldap(8), a new _ypldap user is now required - during installworld. "mergemaster -p" can be used to add the user - prior to installworld, as documented in the handbook. - -20151216: - The tftp loader (pxeboot) now uses the option root-path directive. As a - consequence it no longer looks for a pxeboot.4th file on the tftp - server. Instead it uses the regular /boot infrastructure as with the - other loaders. - -20151211: - The code to start recording plug and play data into the modules has - been committed. While the old tools will properly build a new kernel, - a number of warnings about "unknown metadata record 4" will be produced - for an older kldxref. To avoid such warnings, make sure to rebuild - the kernel toolchain (or world). Make sure that you have r292078 or - later when trying to build 292077 or later before rebuilding. - -20151207: - Debug data files are now built by default with 'make buildworld' and - installed with 'make installworld'. This facilitates debugging but - requires more disk space both during the build and for the installed - world. Debug files may be disabled by setting WITHOUT_DEBUG_FILES=yes - in src.conf(5). - -20151130: - r291527 changed the internal interface between the nfsd.ko and - nfscommon.ko modules. As such, they must both be upgraded to-gether. - __FreeBSD_version has been bumped because of this. - -20151108: - Add support for unicode collation strings leads to a change of - order of files listed by ls(1) for example. To get back to the old - behaviour, set LC_COLLATE environment variable to "C". - - Databases administrators will need to reindex their databases given - collation results will be different. - - Due to a bug in install(1) it is recommended to remove the ancient - locales before running make installworld. - - rm -rf /usr/share/locale/* - -20151030: - The OpenSSL has been upgraded to 1.0.2d. Any binaries requiring - libcrypto.so.7 or libssl.so.7 must be recompiled. - -20151020: - Qlogic 24xx/25xx firmware images were updated from 5.5.0 to 7.3.0. - Kernel modules isp_2400_multi and isp_2500_multi were removed and - should be replaced with isp_2400 and isp_2500 modules respectively. - -20151017: - The build previously allowed using 'make -n' to not recurse into - sub-directories while showing what commands would be executed, and - 'make -n -n' to recursively show commands. Now 'make -n' will recurse - and 'make -N' will not. - -20151012: - If you specify SENDMAIL_MC or SENDMAIL_CF in make.conf, mergemaster - and etcupdate will now use this file. A custom sendmail.cf is now - updated via this mechanism rather than via installworld. If you had - excluded sendmail.cf in mergemaster.rc or etcupdate.conf, you may - want to remove the exclusion or change it to "always install". - /etc/mail/sendmail.cf is now managed the same way regardless of - whether SENDMAIL_MC/SENDMAIL_CF is used. If you are not using - SENDMAIL_MC/SENDMAIL_CF there should be no change in behavior. - -20151011: - Compatibility shims for legacy ATA device names have been removed. - It includes ATA_STATIC_ID kernel option, kern.cam.ada.legacy_aliases - and kern.geom.raid.legacy_aliases loader tunables, kern.devalias.* - environment variables, /dev/ad* and /dev/ar* symbolic links. - -20151006: - Clang, llvm, lldb, compiler-rt and libc++ have been upgraded to 3.7.0. - Please see the 20141231 entry below for information about prerequisites - and upgrading, if you are not already using clang 3.5.0 or higher. - -20150924: - Kernel debug files have been moved to /usr/lib/debug/boot/kernel/, - and renamed from .symbols to .debug. This reduces the size requirements - on the boot partition or file system and provides consistency with - userland debug files. - - When using the supported kernel installation method the - /usr/lib/debug/boot/kernel directory will be renamed (to kernel.old) - as is done with /boot/kernel. - - Developers wishing to maintain the historical behavior of installing - debug files in /boot/kernel/ can set KERN_DEBUGDIR="" in src.conf(5). - -20150827: - The wireless drivers had undergone changes that remove the 'parent - interface' from the ifconfig -l output. The rc.d network scripts - used to check presence of a parent interface in the list, so old - scripts would fail to start wireless networking. Thus, etcupdate(3) - or mergemaster(8) run is required after kernel update, to update your - rc.d scripts in /etc. - -20150827: - pf no longer supports 'scrub fragment crop' or 'scrub fragment drop-ovl' - These configurations are now automatically interpreted as - 'scrub fragment reassemble'. - -20150817: - Kernel-loadable modules for the random(4) device are back. To use - them, the kernel must have - - device random - options RANDOM_LOADABLE - - kldload(8) can then be used to load random_fortuna.ko - or random_yarrow.ko. Please note that due to the indirect - function calls that the loadable modules need to provide, - the build-in variants will be slightly more efficient. - - The random(4) kernel option RANDOM_DUMMY has been retired due to - unpopularity. It was not all that useful anyway. - -20150813: - The WITHOUT_ELFTOOLCHAIN_TOOLS src.conf(5) knob has been retired. - Control over building the ELF Tool Chain tools is now provided by - the WITHOUT_TOOLCHAIN knob. - -20150810: - The polarity of Pulse Per Second (PPS) capture events with the - uart(4) driver has been corrected. Prior to this change the PPS - "assert" event corresponded to the trailing edge of a positive PPS - pulse and the "clear" event was the leading edge of the next pulse. - - As the width of a PPS pulse in a typical GPS receiver is on the - order of 1 millisecond, most users will not notice any significant - difference with this change. - - Anyone who has compensated for the historical polarity reversal by - configuring a negative offset equal to the pulse width will need to - remove that workaround. - -20150809: - The default group assigned to /dev/dri entries has been changed - from 'wheel' to 'video' with the id of '44'. If you want to have - access to the dri devices please add yourself to the video group - with: - - # pw groupmod video -m $USER - -20150806: - The menu.rc and loader.rc files will now be replaced during - upgrades. Please migrate local changes to menu.rc.local and - loader.rc.local instead. - -20150805: - GNU Binutils versions of addr2line, c++filt, nm, readelf, size, - strings and strip have been removed. The src.conf(5) knob - WITHOUT_ELFTOOLCHAIN_TOOLS no longer provides the binutils tools. - -20150728: - As ZFS requires more kernel stack pages than is the default on some - architectures e.g. i386, it now warns if KSTACK_PAGES is less than - ZFS_MIN_KSTACK_PAGES (which is 4 at the time of writing). - - Please consider using 'options KSTACK_PAGES=X' where X is greater - than or equal to ZFS_MIN_KSTACK_PAGES i.e. 4 in such configurations. - -20150706: - sendmail has been updated to 8.15.2. Starting with FreeBSD 11.0 - and sendmail 8.15, sendmail uses uncompressed IPv6 addresses by - default, i.e., they will not contain "::". For example, instead - of ::1, it will be 0:0:0:0:0:0:0:1. This permits a zero subnet - to have a more specific match, such as different map entries for - IPv6:0:0 vs IPv6:0. This change requires that configuration - data (including maps, files, classes, custom ruleset, etc.) must - use the same format, so make certain such configuration data is - upgrading. As a very simple check search for patterns like - 'IPv6:[0-9a-fA-F:]*::' and 'IPv6::'. To return to the old - behavior, set the m4 option confUSE_COMPRESSED_IPV6_ADDRESSES or - the cf option UseCompressedIPv6Addresses. - -20150630: - The default kernel entropy-processing algorithm is now - Fortuna, replacing Yarrow. - - Assuming you have 'device random' in your kernel config - file, the configurations allow a kernel option to override - this default. You may choose *ONE* of: - - options RANDOM_YARROW # Legacy /dev/random algorithm. - options RANDOM_DUMMY # Blocking-only driver. - - If you have neither, you get Fortuna. For most people, - read no further, Fortuna will give a /dev/random that works - like it always used to, and the difference will be irrelevant. - - If you remove 'device random', you get *NO* kernel-processed - entropy at all. This may be acceptable to folks building - embedded systems, but has complications. Carry on reading, - and it is assumed you know what you need. - - *PLEASE* read random(4) and random(9) if you are in the - habit of tweaking kernel configs, and/or if you are a member - of the embedded community, wanting specific and not-usual - behaviour from your security subsystems. - - NOTE!! If you use RANDOM_DUMMY and/or have no 'device - random', you will NOT have a functioning /dev/random, and - many cryptographic features will not work, including SSH. - You may also find strange behaviour from the random(3) set - of library functions, in particular sranddev(3), srandomdev(3) - and arc4random(3). The reason for this is that the KERN_ARND - sysctl only returns entropy if it thinks it has some to - share, and with RANDOM_DUMMY or no 'device random' this - will never happen. - -20150623: - An additional fix for the issue described in the 20150614 sendmail - entry below has been committed in revision 284717. - -20150616: - FreeBSD's old make (fmake) has been removed from the system. It is - available as the devel/fmake port or via pkg install fmake. - -20150615: - The fix for the issue described in the 20150614 sendmail entry - below has been committed in revision 284436. The work - around described in that entry is no longer needed unless the - default setting is overridden by a confDH_PARAMETERS configuration - setting of '5' or pointing to a 512 bit DH parameter file. - -20150614: - ALLOW_DEPRECATED_ATF_TOOLS/ATFFILE support has been removed from - atf.test.mk (included from bsd.test.mk). Please upgrade devel/atf - and devel/kyua to version 0.20+ and adjust any calling code to work - with Kyuafile and kyua. - -20150614: - The import of openssl to address the FreeBSD-SA-15:10.openssl - security advisory includes a change which rejects handshakes - with DH parameters below 768 bits. sendmail releases prior - to 8.15.2 (not yet released), defaulted to a 512 bit - DH parameter setting for client connections. To work around - this interoperability, sendmail can be configured to use a - 2048 bit DH parameter by: - - 1. Edit /etc/mail/`hostname`.mc - 2. If a setting for confDH_PARAMETERS does not exist or - exists and is set to a string beginning with '5', - replace it with '2'. - 3. If a setting for confDH_PARAMETERS exists and is set to - a file path, create a new file with: - openssl dhparam -out /path/to/file 2048 - 4. Rebuild the .cf file: - cd /etc/mail/; make; make install - 5. Restart sendmail: - cd /etc/mail/; make restart - - A sendmail patch is coming, at which time this file will be - updated. - -20150604: - Generation of legacy formatted entries have been disabled by default - in pwd_mkdb(8), as all base system consumers of the legacy formatted - entries were converted to use the new format by default when the new, - machine independent format have been added and supported since FreeBSD - 5.x. - - Please see the pwd_mkdb(8) manual page for further details. - -20150525: - Clang and llvm have been upgraded to 3.6.1 release. Please see the - 20141231 entry below for information about prerequisites and upgrading, - if you are not already using 3.5.0 or higher. - -20150521: - TI platform code switched to using vendor DTS files and this update - may break existing systems running on Beaglebone, Beaglebone Black, - and Pandaboard: - - - dtb files should be regenerated/reinstalled. Filenames are the - same but content is different now - - GPIO addressing was changed, now each GPIO bank (32 pins per bank) - has its own /dev/gpiocX device, e.g. pin 121 on /dev/gpioc0 in old - addressing scheme is now pin 25 on /dev/gpioc3. - - Pandaboard: /etc/ttys should be updated, serial console device is - now /dev/ttyu2, not /dev/ttyu0 - -20150501: - soelim(1) from gnu/usr.bin/groff has been replaced by usr.bin/soelim. - If you need the GNU extension from groff soelim(1), install groff - from package: pkg install groff, or via ports: textproc/groff. - -20150423: - chmod, chflags, chown and chgrp now affect symlinks in -R mode as - defined in symlink(7); previously symlinks were silently ignored. - -20150415: - The const qualifier has been removed from iconv(3) to comply with - POSIX. The ports tree is aware of this from r384038 onwards. - -20150416: - Libraries specified by LIBADD in Makefiles must have a corresponding - DPADD_ variable to ensure correct dependencies. This is now - enforced in src.libnames.mk. - -20150324: - From legacy ata(4) driver was removed support for SATA controllers - supported by more functional drivers ahci(4), siis(4) and mvs(4). - Kernel modules ataahci and ataadaptec were removed completely, - replaced by ahci and mvs modules respectively. - -20150315: - Clang, llvm and lldb have been upgraded to 3.6.0 release. Please see - the 20141231 entry below for information about prerequisites and - upgrading, if you are not already using 3.5.0 or higher. - -20150307: - The 32-bit PowerPC kernel has been changed to a position-independent - executable. This can only be booted with a version of loader(8) - newer than January 31, 2015, so make sure to update both world and - kernel before rebooting. - -20150217: - If you are running a -CURRENT kernel since r273872 (Oct 30th, 2014), - but before r278950, the RNG was not seeded properly. Immediately - upgrade the kernel to r278950 or later and regenerate any keys (e.g. - ssh keys or openssl keys) that were generated w/ a kernel from that - range. This does not affect programs that directly used /dev/random - or /dev/urandom. All userland uses of arc4random(3) are affected. - -20150210: - The autofs(4) ABI was changed in order to restore binary compatibility - with 10.1-RELEASE. The automountd(8) daemon needs to be rebuilt to work - with the new kernel. - -20150131: - The powerpc64 kernel has been changed to a position-independent - executable. This can only be booted with a new version of loader(8), - so make sure to update both world and kernel before rebooting. - -20150118: - Clang and llvm have been upgraded to 3.5.1 release. This is a bugfix - only release, no new features have been added. Please see the 20141231 - entry below for information about prerequisites and upgrading, if you - are not already using 3.5.0. - -20150107: - ELF tools addr2line, elfcopy (strip), nm, size, and strings are now - taken from the ELF Tool Chain project rather than GNU binutils. They - should be drop-in replacements, with the addition of arm64 support. - The WITHOUT_ELFTOOLCHAIN_TOOLS= knob may be used to obtain the - binutils tools, if necessary. See 20150805 for updated information. - -20150105: - The default Unbound configuration now enables remote control - using a local socket. Users who have already enabled the - local_unbound service should regenerate their configuration - by running "service local_unbound setup" as root. - -20150102: - The GNU texinfo and GNU info pages have been removed. - To be able to view GNU info pages please install texinfo from ports. - -20141231: - Clang, llvm and lldb have been upgraded to 3.5.0 release. - - As of this release, a prerequisite for building clang, llvm and lldb is - a C++11 capable compiler and C++11 standard library. This means that to - be able to successfully build the cross-tools stage of buildworld, with - clang as the bootstrap compiler, your system compiler or cross compiler - should either be clang 3.3 or later, or gcc 4.8 or later, and your - system C++ library should be libc++, or libdstdc++ from gcc 4.8 or - later. - - On any standard FreeBSD 10.x or 11.x installation, where clang and - libc++ are on by default (that is, on x86 or arm), this should work out - of the box. - - On 9.x installations where clang is enabled by default, e.g. on x86 and - powerpc, libc++ will not be enabled by default, so libc++ should be - built (with clang) and installed first. If both clang and libc++ are - missing, build clang first, then use it to build libc++. - - On 8.x and earlier installations, upgrade to 9.x first, and then follow - the instructions for 9.x above. - - Sparc64 and mips users are unaffected, as they still use gcc 4.2.1 by - default, and do not build clang. - - Many embedded systems are resource constrained, and will not be able to - build clang in a reasonable time, or in some cases at all. In those - cases, cross building bootable systems on amd64 is a workaround. - - This new version of clang introduces a number of new warnings, of which - the following are most likely to appear: - - -Wabsolute-value - - This warns in two cases, for both C and C++: - * When the code is trying to take the absolute value of an unsigned - quantity, which is effectively a no-op, and almost never what was - intended. The code should be fixed, if at all possible. If you are - sure that the unsigned quantity can be safely cast to signed, without - loss of information or undefined behavior, you can add an explicit - cast, or disable the warning. - - * When the code is trying to take an absolute value, but the called - abs() variant is for the wrong type, which can lead to truncation. - If you want to disable the warning instead of fixing the code, please - make sure that truncation will not occur, or it might lead to unwanted - side-effects. - - -Wtautological-undefined-compare and - -Wundefined-bool-conversion - - These warn when C++ code is trying to compare 'this' against NULL, while - 'this' should never be NULL in well-defined C++ code. However, there is - some legacy (pre C++11) code out there, which actively abuses this - feature, which was less strictly defined in previous C++ versions. - - Squid and openjdk do this, for example. The warning can be turned off - for C++98 and earlier, but compiling the code in C++11 mode might result - in unexpected behavior; for example, the parts of the program that are - unreachable could be optimized away. - -20141222: - The old NFS client and server (kernel options NFSCLIENT, NFSSERVER) - kernel sources have been removed. The .h files remain, since some - utilities include them. This will need to be fixed later. - If "mount -t oldnfs ..." is attempted, it will fail. - If the "-o" option on mountd(8), nfsd(8) or nfsstat(1) is used, - the utilities will report errors. - -20141121: - The handling of LOCAL_LIB_DIRS has been altered to skip addition of - directories to top level SUBDIR variable when their parent - directory is included in LOCAL_DIRS. Users with build systems with - such hierarchies and without SUBDIR entries in the parent - directory Makefiles should add them or add the directories to - LOCAL_DIRS. - -20141109: - faith(4) and faithd(8) have been removed from the base system. Faith - has been obsolete for a very long time. - -20141104: - vt(4), the new console driver, is enabled by default. It brings - support for Unicode and double-width characters, as well as - support for UEFI and integration with the KMS kernel video - drivers. - - You may need to update your console settings in /etc/rc.conf, - most probably the keymap. During boot, /etc/rc.d/syscons will - indicate what you need to do. - - vt(4) still has issues and lacks some features compared to - syscons(4). See the wiki for up-to-date information: - https://wiki.freebsd.org/Newcons - - If you want to keep using syscons(4), you can do so by adding - the following line to /boot/loader.conf: - kern.vty=sc - -20141102: - pjdfstest has been integrated into kyua as an opt-in test suite. - Please see share/doc/pjdfstest/README for more details on how to - execute it. - -20141009: - gperf has been removed from the base system for architectures - that use clang. Ports that require gperf will obtain it from the - devel/gperf port. - -20140923: - pjdfstest has been moved from tools/regression/pjdfstest to - contrib/pjdfstest . - -20140922: - At svn r271982, The default linux compat kernel ABI has been adjusted - to 2.6.18 in support of the linux-c6 compat ports infrastructure - update. If you wish to continue using the linux-f10 compat ports, - add compat.linux.osrelease=2.6.16 to your local sysctl.conf. Users are - encouraged to update their linux-compat packages to linux-c6 during - their next update cycle. - -20140729: - The ofwfb driver, used to provide a graphics console on PowerPC when - using vt(4), no longer allows mmap() of all physical memory. This - will prevent Xorg on PowerPC with some ATI graphics cards from - initializing properly unless x11-servers/xorg-server is updated to - 1.12.4_8 or newer. - -20140723: - The xdev targets have been converted to using TARGET and - TARGET_ARCH instead of XDEV and XDEV_ARCH. - -20140719: - The default unbound configuration has been modified to address - issues with reverse lookups on networks that use private - address ranges. If you use the local_unbound service, run - "service local_unbound setup" as root to regenerate your - configuration, then "service local_unbound reload" to load the - new configuration. - -20140709: - The GNU texinfo and GNU info pages are not built and installed - anymore, WITH_INFO knob has been added to allow to built and install - them again. - UPDATE: see 20150102 entry on texinfo's removal - -20140708: - The GNU readline library is now an INTERNALLIB - that is, it is - statically linked into consumers (GDB and variants) in the base - system, and the shared library is no longer installed. The - devel/readline port is available for third party software that - requires readline. - -20140702: - The Itanium architecture (ia64) has been removed from the list of - known architectures. This is the first step in the removal of the - architecture. - -20140701: - Commit r268115 has added NFSv4.1 server support, merged from - projects/nfsv4.1-server. Since this includes changes to the - internal interfaces between the NFS related modules, a full - build of the kernel and modules will be necessary. - __FreeBSD_version has been bumped. - -20140629: - The WITHOUT_VT_SUPPORT kernel config knob has been renamed - WITHOUT_VT. (The other _SUPPORT knobs have a consistent meaning - which differs from the behaviour controlled by this knob.) - -20140619: - Maximal length of the serial number in CTL was increased from 16 to - 64 chars, that breaks ABI. All CTL-related tools, such as ctladm - and ctld, need to be rebuilt to work with a new kernel. - -20140606: - The libatf-c and libatf-c++ major versions were downgraded to 0 and - 1 respectively to match the upstream numbers. They were out of - sync because, when they were originally added to FreeBSD, the - upstream versions were not respected. These libraries are private - and not yet built by default, so renumbering them should be a - non-issue. However, unclean source trees will yield broken test - programs once the operator executes "make delete-old-libs" after a - "make installworld". - - Additionally, the atf-sh binary was made private by moving it into - /usr/libexec/. Already-built shell test programs will keep the - path to the old binary so they will break after "make delete-old" - is run. - - If you are using WITH_TESTS=yes (not the default), wipe the object - tree and rebuild from scratch to prevent spurious test failures. - This is only needed once: the misnumbered libraries and misplaced - binaries have been added to OptionalObsoleteFiles.inc so they will - be removed during a clean upgrade. - -20140512: - Clang and llvm have been upgraded to 3.4.1 release. - -20140508: - We bogusly installed src.opts.mk in /usr/share/mk. This file should - be removed to avoid issues in the future (and has been added to - ObsoleteFiles.inc). - -20140505: - /etc/src.conf now affects only builds of the FreeBSD src tree. In the - past, it affected all builds that used the bsd.*.mk files. The old - behavior was a bug, but people may have relied upon it. To get this - behavior back, you can .include /etc/src.conf from /etc/make.conf - (which is still global and isn't changed). This also changes the - behavior of incremental builds inside the tree of individual - directories. Set MAKESYSPATH to ".../share/mk" to do that. - Although this has survived make universe and some upgrade scenarios, - other upgrade scenarios may have broken. At least one form of - temporary breakage was fixed with MAKESYSPATH settings for buildworld - as well... In cases where MAKESYSPATH isn't working with this - setting, you'll need to set it to the full path to your tree. - - One side effect of all this cleaning up is that bsd.compiler.mk - is no longer implicitly included by bsd.own.mk. If you wish to - use COMPILER_TYPE, you must now explicitly include bsd.compiler.mk - as well. - -20140430: - The lindev device has been removed since /dev/full has been made a - standard device. __FreeBSD_version has been bumped. - -20140424: - The knob WITHOUT_VI was added to the base system, which controls - building ex(1), vi(1), etc. Older releases of FreeBSD required ex(1) - in order to reorder files share/termcap and didn't build ex(1) as a - build tool, so building/installing with WITH_VI is highly advised for - build hosts for older releases. - - This issue has been fixed in stable/9 and stable/10 in r277022 and - r276991, respectively. - -20140418: - The YES_HESIOD knob has been removed. It has been obsolete for - a decade. Please move to using WITH_HESIOD instead or your builds - will silently lack HESIOD. - -20140405: - The uart(4) driver has been changed with respect to its handling - of the low-level console. Previously the uart(4) driver prevented - any process from changing the baudrate or the CLOCAL and HUPCL - control flags. By removing the restrictions, operators can make - changes to the serial console port without having to reboot. - However, when getty(8) is started on the serial device that is - associated with the low-level console, a misconfigured terminal - line in /etc/ttys will now have a real impact. - Before upgrading the kernel, make sure that /etc/ttys has the - serial console device configured as 3wire without baudrate to - preserve the previous behaviour. E.g: - ttyu0 "/usr/libexec/getty 3wire" vt100 on secure - -20140306: - Support for libwrap (TCP wrappers) in rpcbind was disabled by default - to improve performance. To re-enable it, if needed, run rpcbind - with command line option -W. - -20140226: - Switched back to the GPL dtc compiler due to updates in the upstream - dts files not being supported by the BSDL dtc compiler. You will need - to rebuild your kernel toolchain to pick up the new compiler. Core dumps - may result while building dtb files during a kernel build if you fail - to do so. Set WITHOUT_GPL_DTC if you require the BSDL compiler. - -20140216: - Clang and llvm have been upgraded to 3.4 release. - -20140216: - The nve(4) driver has been removed. Please use the nfe(4) driver - for NVIDIA nForce MCP Ethernet adapters instead. - -20140212: - An ABI incompatibility crept into the libc++ 3.4 import in r261283. - This could cause certain C++ applications using shared libraries built - against the previous version of libc++ to crash. The incompatibility - has now been fixed, but any C++ applications or shared libraries built - between r261283 and r261801 should be recompiled. - -20140204: - OpenSSH will now ignore errors caused by kernel lacking of Capsicum - capability mode support. Please note that enabling the feature in - kernel is still highly recommended. - -20140131: - OpenSSH is now built with sandbox support, and will use sandbox as - the default privilege separation method. This requires Capsicum - capability mode support in kernel. - -20140128: - The libelf and libdwarf libraries have been updated to newer - versions from upstream. Shared library version numbers for - these two libraries were bumped. Any ports or binaries - requiring these two libraries should be recompiled. - __FreeBSD_version is bumped to 1100006. - -20140110: - If a Makefile in a tests/ directory was auto-generating a Kyuafile - instead of providing an explicit one, this would prevent such - Makefile from providing its own Kyuafile in the future during - NO_CLEAN builds. This has been fixed in the Makefiles but manual - intervention is needed to clean an objdir if you use NO_CLEAN: - # find /usr/obj -name Kyuafile | xargs rm -f - -20131213: - The behavior of gss_pseudo_random() for the krb5 mechanism - has changed, for applications requesting a longer random string - than produced by the underlying enctype's pseudo-random() function. - In particular, the random string produced from a session key of - enctype aes256-cts-hmac-sha1-96 or aes256-cts-hmac-sha1-96 will - be different at the 17th octet and later, after this change. - The counter used in the PRF+ construction is now encoded as a - big-endian integer in accordance with RFC 4402. - __FreeBSD_version is bumped to 1100004. - -20131108: - The WITHOUT_ATF build knob has been removed and its functionality - has been subsumed into the more generic WITHOUT_TESTS. If you were - using the former to disable the build of the ATF libraries, you - should change your settings to use the latter. - -20131025: - The default version of mtree is nmtree which is obtained from - NetBSD. The output is generally the same, but may vary - slightly. If you found you need identical output adding - "-F freebsd9" to the command line should do the trick. For the - time being, the old mtree is available as fmtree. - -20131014: - libbsdyml has been renamed to libyaml and moved to /usr/lib/private. - This will break ports-mgmt/pkg. Rebuild the port, or upgrade to pkg - 1.1.4_8 and verify bsdyml not linked in, before running "make - delete-old-libs": - # make -C /usr/ports/ports-mgmt/pkg build deinstall install clean - or - # pkg install pkg; ldd /usr/local/sbin/pkg | grep bsdyml - -20131010: - The stable/10 branch has been created in subversion from head - revision r256279. +After branch N is created, entriels older than the N-2 branch point are removed +from this file. After stable/14 is branched and current becomes FreeBSD 15, +entries older than stable/12 branch point will be removed from current's +UPDATING file. COMMON ITEMS: From nobody Fri Jan 20 23:49:54 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NzGSg1jQCz2sw5J; Fri, 20 Jan 2023 23:49: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NzGSg19vKz3tpJ; Fri, 20 Jan 2023 23:49:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674258595; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ahgFH1vg8fHv3wZbL7lxOUY3jOV1nYDW04nKcfS7/TU=; b=bxw3XWqqOqWyvoKPMy/S0jt2CP73mt/FCueIXcal7X+E/fuaVhyq7bjMTYLKirvs+D9Qrv 5wRJ0B8uKrhYp34qZlcOdIlQhm1F9R/+ZdJmIL8Dy9j5Cl7vmwgiBU/RcX/Wj9ygz/u0JD 0o3RNkUJ2sY63NHyGxl5rSCQhxkNJCnDV40DsNTMwCwN99CWOK3gL53oumkbYqwzs3Onzu f+CRx0SkuMmEfIz1MstrT0XVgMe7EdvyK9eMIl63QPmFSb5QD+VN8nkFsat7DF4JrDTeA5 csJ5obfTAplOVxWHc7sfvE/swB3lOYE94x6hAJbsPWXzUx35t+y+X7AddDplTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674258595; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ahgFH1vg8fHv3wZbL7lxOUY3jOV1nYDW04nKcfS7/TU=; b=pyQ2MX1D+TPQGvl8E5TUkXAwoQ5m0uy9GdSVwS7gL/7ZAjm0Wgi81SSJDSWWNbnR66l19h vMZdFVVKEBeLCWmwEAJcgoKifDeBPjVff2TTi7b9M4fq1ag69hQLXzbV5LdKzSSzk33O3k Qc4SVPcDteCbBhJ68vG7zZdr4D7WblG3Sq7ZtynZYNFsINOeef6iSzV3Qkwoo8+DaxEGYj giMIcnJRJ4aNzh/ugyuunZ8r5GY2snwqBZe52RkkLJy5HhQTLni7es1AD9NS/datAWSmx3 oy0kszuXfudfftelbMlAaG5OhHDkrs7PLKUigHAy/GXrUGTpbpLf47ozLo0qfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674258595; a=rsa-sha256; cv=none; b=SprZaRxR9p38cF+//Jkjw3pz8MIpYHjThqFypqEh3JfYOu2d7MEeNHJbxnnZa10bvTMHT8 6fwUBgNa041+7o+8Vk1mqPNjS1N4QwluU8Blr2LjNC+RgcUPw5Hl/QkXEn97ccZi7cfo3o fkJJ1arzabIwb1/QPqbOC3em886nIqWc6oC5V9+gUr9FevJhtMUoF+FONcbpzuruHqaoH7 xHKLBzjlxKkBRThJNwrx0ILdw2b0U530ZyFQpSLeb1R/EupVp9lPNRv6xRH6+BI9w+EUd9 aXa/jAqdZODrZrjFc3VWq8cguEWHcUkuJQj2KpXxl7JeDCswt1RwBBtTqqlOnA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NzGSg0FG1zpkm; Fri, 20 Jan 2023 23:49:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30KNnsci088177; Fri, 20 Jan 2023 23:49:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30KNnsBc088176; Fri, 20 Jan 2023 23:49:54 GMT (envelope-from git) Date: Fri, 20 Jan 2023 23:49:54 GMT Message-Id: <202301202349.30KNnsBc088176@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: 30e0d2a51026 - main - linux: For better compatibility, provide compatible endian.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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 30e0d2a51026830e5141ce3dd43854819bba910c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=30e0d2a51026830e5141ce3dd43854819bba910c commit 30e0d2a51026830e5141ce3dd43854819bba910c Author: Warner Losh AuthorDate: 2023-01-20 23:32:45 +0000 Commit: Warner Losh CommitDate: 2023-01-20 23:32:45 +0000 linux: For better compatibility, provide compatible endian.h Add endian.h. This includes sys/endian.h and then adds extra defines that glibc defines with double underscores for our _{BIG,BYTE,LITTLE,PDP}_ENDIAN macros. We also define __FLOAT_WORD_ORDER to be the same as _BYTE_ENDIAN since FreeBSD doesn't currently define this, and the default with glibc is exactly this for our platforms. Move common parts of endian.h and sys/endian.h into sys/_endian.h to limit namespace pollution from endian.h All this gives us good compatibility with Linux. There may be one or two upstreams that haven't integrated the patches I tried to send up. There are some minor differences: o The extra glibc macros are not defined. These are all controlled with either __ at the start, or only defined when glibc is being built. We also don't define macros that are used internally in glibc that would pollute the namespace. o For complete compatibility, this change must also be paired with providing a glibc-compatible byteswap.h. Sponsored by: Netflix Reviewed by: mhorne, markj, jhb Differential Revision: https://reviews.freebsd.org/D31962 --- include/Makefile | 4 ++-- include/endian.h | 43 +++++++++++++++++++++++++++++++++++++++++++ sys/sys/_endian.h | 36 +++++++++++++++++++++++++++++++++++- sys/sys/endian.h | 42 ++++++------------------------------------ 4 files changed, 86 insertions(+), 39 deletions(-) diff --git a/include/Makefile b/include/Makefile index 643451367b1b..aa4c115a3931 100644 --- a/include/Makefile +++ b/include/Makefile @@ -14,8 +14,8 @@ SUBDIR+= i386 SUBDIR_PARALLEL= INCS= a.out.h ar.h assert.h bitstring.h complex.h cpio.h _ctype.h ctype.h \ db.h \ - dirent.h dlfcn.h elf.h elf-hints.h err.h fmtmsg.h fnmatch.h fstab.h \ - fts.h ftw.h getopt.h glob.h grp.h \ + dirent.h dlfcn.h elf.h elf-hints.h endian.h err.h fmtmsg.h fnmatch.h \ + fstab.h fts.h ftw.h getopt.h glob.h grp.h \ ieeefp.h ifaddrs.h \ inttypes.h iso646.h kenv.h langinfo.h libgen.h limits.h link.h \ locale.h malloc.h malloc_np.h memory.h monetary.h mpool.h mqueue.h \ diff --git a/include/endian.h b/include/endian.h new file mode 100644 index 000000000000..c7b78217cedd --- /dev/null +++ b/include/endian.h @@ -0,0 +1,43 @@ +/*- + * Copyright (c) 2021 M. Warner Losh + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +/* + * A mostly Linux/glibc-compatible endian.h + */ + +#ifndef _ENDIAN_H_ +#define _ENDIAN_H_ + +/* + * FreeBSD's sys/_endian.h is very close to the interface provided on Linux by + * glibc's endian.h. + */ +#include + +/* + * glibc uses double underscore for these symbols. Define these unconditionally. + * The compiler defines __BYTE_ORDER__ these days, so we don't do anything + * with that since sys/endian.h defines _BYTE_ORDER based on it. + */ +#define __BIG_ENDIAN _BIG_ENDIAN +#define __BYTE_ORDER _BYTE_ORDER +#define __LITTLE_ENDIAN _LITTLE_ENDIAN +#define __PDP_ENDIAN _PDP_ENDIAN + +/* + * FreeBSD's sys/endian.h and machine/endian.h doesn't define a separate + * byte order for floats. Use the host non-float byte order. + */ +#define __FLOAT_WORD_ORDER _BYTE_ORDER + +/* + * We don't define BIG_ENDI, LITTLE_ENDI, HIGH_HALF and LOW_HALF macros that + * glibc's endian.h defines since those appear to be internal to internal to + * glibc. We also don't try to emulate the various helper macros that glibc + * uses to limit namespace visibility. + */ + +#endif /* _ENDIAN_H_ */ diff --git a/sys/sys/_endian.h b/sys/sys/_endian.h index 936962cc729f..72e1a40a8deb 100644 --- a/sys/sys/_endian.h +++ b/sys/sys/_endian.h @@ -32,7 +32,7 @@ #ifndef _SYS__ENDIAN_H_ #define _SYS__ENDIAN_H_ -#ifndef _MACHINE_ENDIAN_H_ +#if !defined(_MACHINE_ENDIAN_H_) && !defined(_ENDIAN_H_) #error "sys/_endian.h should not be included directly" #endif @@ -89,4 +89,38 @@ #define __ntohs(x) ((__uint16_t)(x)) #endif +/* + * Host to big endian, host to little endian, big endian to host, and little + * endian to host byte order functions as detailed in byteorder(9). + */ +#if _BYTE_ORDER == _LITTLE_ENDIAN +#define htobe16(x) __bswap16((x)) +#define htobe32(x) __bswap32((x)) +#define htobe64(x) __bswap64((x)) +#define htole16(x) ((uint16_t)(x)) +#define htole32(x) ((uint32_t)(x)) +#define htole64(x) ((uint64_t)(x)) + +#define be16toh(x) __bswap16((x)) +#define be32toh(x) __bswap32((x)) +#define be64toh(x) __bswap64((x)) +#define le16toh(x) ((uint16_t)(x)) +#define le32toh(x) ((uint32_t)(x)) +#define le64toh(x) ((uint64_t)(x)) +#else /* _BYTE_ORDER != _LITTLE_ENDIAN */ +#define htobe16(x) ((uint16_t)(x)) +#define htobe32(x) ((uint32_t)(x)) +#define htobe64(x) ((uint64_t)(x)) +#define htole16(x) __bswap16((x)) +#define htole32(x) __bswap32((x)) +#define htole64(x) __bswap64((x)) + +#define be16toh(x) ((uint16_t)(x)) +#define be32toh(x) ((uint32_t)(x)) +#define be64toh(x) ((uint64_t)(x)) +#define le16toh(x) __bswap16((x)) +#define le32toh(x) __bswap32((x)) +#define le64toh(x) __bswap64((x)) +#endif /* _BYTE_ORDER == _LITTLE_ENDIAN */ + #endif /* _SYS__ENDIAN_H_ */ diff --git a/sys/sys/endian.h b/sys/sys/endian.h index faac0458ae2c..d91c442e9238 100644 --- a/sys/sys/endian.h +++ b/sys/sys/endian.h @@ -55,6 +55,12 @@ typedef __uint64_t uint64_t; #define _UINT64_T_DECLARED #endif +/* + * Note: While tempting to try to avoid namespace pollution from this file, + * several software packages assume these marcos are defined, even when it + * defines _POSIX_C_SOURCE to request an unpolluted namespace. + */ + /* * General byte order swapping functions. */ @@ -62,42 +68,7 @@ typedef __uint64_t uint64_t; #define bswap32(x) __bswap32(x) #define bswap64(x) __bswap64(x) -/* - * Host to big endian, host to little endian, big endian to host, and little - * endian to host byte order functions as detailed in byteorder(9). - */ -#if _BYTE_ORDER == _LITTLE_ENDIAN -#define htobe16(x) __bswap16((x)) -#define htobe32(x) __bswap32((x)) -#define htobe64(x) __bswap64((x)) -#define htole16(x) ((uint16_t)(x)) -#define htole32(x) ((uint32_t)(x)) -#define htole64(x) ((uint64_t)(x)) - -#define be16toh(x) __bswap16((x)) -#define be32toh(x) __bswap32((x)) -#define be64toh(x) __bswap64((x)) -#define le16toh(x) ((uint16_t)(x)) -#define le32toh(x) ((uint32_t)(x)) -#define le64toh(x) ((uint64_t)(x)) -#else /* _BYTE_ORDER != _LITTLE_ENDIAN */ -#define htobe16(x) ((uint16_t)(x)) -#define htobe32(x) ((uint32_t)(x)) -#define htobe64(x) ((uint64_t)(x)) -#define htole16(x) __bswap16((x)) -#define htole32(x) __bswap32((x)) -#define htole64(x) __bswap64((x)) - -#define be16toh(x) ((uint16_t)(x)) -#define be32toh(x) ((uint32_t)(x)) -#define be64toh(x) ((uint64_t)(x)) -#define le16toh(x) __bswap16((x)) -#define le32toh(x) __bswap32((x)) -#define le64toh(x) __bswap64((x)) -#endif /* _BYTE_ORDER == _LITTLE_ENDIAN */ - /* Alignment-agnostic encode/decode bytestream to/from little/big endian. */ - static __inline uint16_t be16dec(const void *pp) { @@ -203,5 +174,4 @@ le64enc(void *pp, uint64_t u) le32enc(p, (uint32_t)(u & 0xffffffffU)); le32enc(p + 4, (uint32_t)(u >> 32)); } - #endif /* _SYS_ENDIAN_H_ */ From nobody Fri Jan 20 23:49:56 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NzGSh31yxz2swV3; Fri, 20 Jan 2023 23:49:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NzGSh2DcGz3tjv; Fri, 20 Jan 2023 23:49:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674258596; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6sKFanVV68JxMpeS8vy+yX1MJ4pGL6qZ8BavUFD4iqE=; b=SaTwnBWXf31Mys4RHvquwW5YFN4BgrI8zHY+68wb3iUCKsjuUuryVaSkVzNu+/EnsgYHdm U1FyYxfxSkc78hMfGM1Gpie+FJN4aKidW62+Uaf4N8v1MBkK0ShrQwHXiPCt4xqq6QCceK T4GFWMDgn/cPG0b9JC2X4L7N9ACHAXLJp8GLQgE4M4WlOgxlV6yXBxe7TJWAhQWYYFl1oD bKpZC7P06Vtk+Bvz1LysYYueJVxqwiIVUUai0PCRjeGce1AOxDRAhtq2zgWAjFCNYptP7k j9FfZrpdwJf6PywXzvH0snJpLpJk0Y/77/IVKOxuD2QmgLMyF5c6r+YMFGxmvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674258596; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6sKFanVV68JxMpeS8vy+yX1MJ4pGL6qZ8BavUFD4iqE=; b=hPk0ZGpEAc2TwzkS15ODus66cjv5kHugbQGk8M3i7X43BeViPjo2k9f65XKCONJZvUCd/R p829Z1qqANllpRf0khNwSCePpi8fR7THahseYhhW30jJ4F5hfybMIk0oLa9XundMq2TPE5 c0lErTJfpzTdWESzuSIipchlQg8vV94t5ewNpFQs0xMAQbB7uV6xirKQT3vunPS/bYt7C3 1JZNrX9DBiD0vYC8KocmaL+mNdhnL8W9tJk/mna68l925fttPoY9NeJhID6sRRrWOcf1w0 GYij7C1MDL/BhXBDEdEMW1BegIZezIVTWVw46i3kvQRlmBSQIPp6vVfei4mdtQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674258596; a=rsa-sha256; cv=none; b=gpUxZAk6DqbXbJQRsK6F+HELCyoBa3h2wHPWvKnErntDCXvF3tylTbgf9gZO3a5V0aLfXM WrzWSaZ+BUED8OFlNNYkPY/yCFviMgH0XFphRYRAj+X2KkWGYSl6aWgHWMRL8Ud1/9ovhX OkJDRbAoOhiR97WPGkKQHupsiccQBYtHMXWa64Zx85pz/xKplgcV26wLmRSWM0mX1xcLHa VoSislYx9n5MwWd4Xm4Yyzkzwhol6FDV49cjQFzclb7lwRNQLmyz9H8GhoYHXaUijlEyZ7 OHqWrSD1lCLawBMCUyKLkCjyRM+e61TblZMI7QaSdsuOviZ2F90CKje2OEGVqg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NzGSh1L74zplP; Fri, 20 Jan 2023 23:49:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30KNnucu088206; Fri, 20 Jan 2023 23:49:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30KNnunt088205; Fri, 20 Jan 2023 23:49:56 GMT (envelope-from git) Date: Fri, 20 Jan 2023 23:49:56 GMT Message-Id: <202301202349.30KNnunt088205@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: 1761b09bf42d - main - byteswap.h: Add a glibc/linux compatible byteswap.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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 1761b09bf42d2842e82c1ac614c23d31c4d4c0dc Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=1761b09bf42d2842e82c1ac614c23d31c4d4c0dc commit 1761b09bf42d2842e82c1ac614c23d31c4d4c0dc Author: Warner Losh AuthorDate: 2023-01-20 23:33:37 +0000 Commit: Warner Losh CommitDate: 2023-01-20 23:37:39 +0000 byteswap.h: Add a glibc/linux compatible byteswap.h For endian.h to work instead of sys/endian.h, some software needs byteswap.h available. It must define {__,}byteswap_{16,32,64}. Included sys/_endian.h to get an appropriate __byteswap16, etc and defines the new macros in terms of them. Enhance _endian.h to allow it to be included from here too. Sponsored by: Netflix Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D32051 --- include/Makefile | 3 ++- include/byteswap.h | 41 +++++++++++++++++++++++++++++++++++++++++ sys/sys/_endian.h | 2 +- 3 files changed, 44 insertions(+), 2 deletions(-) diff --git a/include/Makefile b/include/Makefile index aa4c115a3931..24124a1f366b 100644 --- a/include/Makefile +++ b/include/Makefile @@ -12,7 +12,8 @@ SUBDIR= arpa protocols rpcsvc rpc xlocale SUBDIR+= i386 .endif SUBDIR_PARALLEL= -INCS= a.out.h ar.h assert.h bitstring.h complex.h cpio.h _ctype.h ctype.h \ +INCS= a.out.h ar.h assert.h bitstring.h byteswap.h \ + complex.h cpio.h _ctype.h ctype.h \ db.h \ dirent.h dlfcn.h elf.h elf-hints.h endian.h err.h fmtmsg.h fnmatch.h \ fstab.h fts.h ftw.h getopt.h glob.h grp.h \ diff --git a/include/byteswap.h b/include/byteswap.h new file mode 100644 index 000000000000..a7b816ee82b0 --- /dev/null +++ b/include/byteswap.h @@ -0,0 +1,41 @@ +/*- + * Copyright (c) 2021 M. Warner Losh + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +/* + * A mostly Linux/glibc-compatible byteswap.h + */ + +#ifndef _BYTESWAP_H_ +#define _BYTESWAP_H_ + +/* + * sys/_endian.h brings in the shared interfaces between BSD's sys/endian.h, and + * glibc's endian.h. However, we need to include it here to get the + * __bswap{16,32,64} definitions that we use. sys/_endian.h has been consturcted to + * be compatible with including , or both in either order, + * as well as providing the BSD the bulk of sys/endian.h functionality. + */ +#include + +/* + * glibc's defines the bswap_* and __bswap_* macros below. Most + * software uses either just , or both and + * . However, one can't define bswap16, etc in because + * several software packages will define them only when they detect + * is included (but not when sys/endian.h is included). Defining bswap16, etc + * here causes compilation errors for those packages. and + * need to be paired together, with the below defines here, for + * the highest level of glibc compatibility. + */ +#define __bswap_16(x) __bswap16(x) +#define __bswap_32(x) __bswap32(x) +#define __bswap_64(x) __bswap64(x) + +#define bswap_16(x) __bswap16(x) +#define bswap_32(x) __bswap32(x) +#define bswap_64(x) __bswap64(x) + +#endif /* _BYTESWAP_H_ */ diff --git a/sys/sys/_endian.h b/sys/sys/_endian.h index 72e1a40a8deb..ff909f532663 100644 --- a/sys/sys/_endian.h +++ b/sys/sys/_endian.h @@ -32,7 +32,7 @@ #ifndef _SYS__ENDIAN_H_ #define _SYS__ENDIAN_H_ -#if !defined(_MACHINE_ENDIAN_H_) && !defined(_ENDIAN_H_) +#if !defined(_MACHINE_ENDIAN_H_) && !defined(_BYTESWAP_H_) && !defined(_ENDIAN_H_) #error "sys/_endian.h should not be included directly" #endif From nobody Fri Jan 20 23:49:57 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NzGSj3f9Sz2swP7; Fri, 20 Jan 2023 23:49:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NzGSj38H2z3vBL; Fri, 20 Jan 2023 23:49:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674258597; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d/3KiZGf/mHLOky/RjALo4Jw7/WbtoXh6xEj8shEiys=; b=QXZjTIVsXS9ubSBsoiPOGL8R+kYQ9+/jM2NaPpHH3FwGDalr5vlBp5yke4H4jQzGoqBfd3 of+W2p8Yo25pNUUtKNxj1WyiIYbklfl7DSHT+yLZPtSc+Rh6WyGhhdLtooNM4KhmeEEHwu o8OgFO9KDrh6mgM4zaA0f5jYfcCd/mEqlQXwlm33FW7Zupi3RGHKdEbySpIeTOjJ97E+kC M9hYXBOo/QBZl4l7/r1SvxCkOT0NQkWfJ3oQk9sLNlarwBDYx74CIRvBAUhVOiEj1juxGZ 1dem4T5HzVp5UAPPauCViEBna8dcf/qEzwVeYBy7UJrcYv6AI1QgUBQK2lS4LQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674258597; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d/3KiZGf/mHLOky/RjALo4Jw7/WbtoXh6xEj8shEiys=; b=UTNZPQdrRyaC3KtXEPgctNoj0+dbO1Otlaeu5IsODDioA3E+y0ujc4euFEGd1rZ8pdJHmg WkPxaRN4KtqVdPQ8B1+NGFaQZASP/A9dNPBbNtKK5N/e/jFe7Uj1e7kFFUOASHz2dvjqTt IxWUUN8j9R8TrEfMxu5aDUGn/iJdPdOQSN9ReiDUJfbcqN3Go0dFZ6xvnn3zQSUbDH+2ek tlOd1aFu36teqerSv9+9kHRhHNs3/IL0mr4IXbhrIOFxjbs4daZbGkhgKnWSixDFCii/CM IG//aVJHSSD0vj1rGKWKQJHYY4SWjefJ7XkNbI6o4B7mYKi7HtxmbyxiKXIXXA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674258597; a=rsa-sha256; cv=none; b=RozBh/6+fMGOjYo18GHHSUvq0WQYdgShuP9bEzXEVlgdNCf51USThksU7Gw0CjpWbM+dEu wzCFoEpcaUxQgCewKkOtYH3X0z+eJuooc90reZKfmXDwid+bYUPc6nPcnJh2/+PSmPeirl YKFA5a0BLKArFXzK/74qS8303b2C61hOk9jijKkOOYSeBWhNDvj1tTPPfFjHUCeLiLBXUY gqvu1ntPfpf5nBjasVb3Myu1sbg/TqQWdOWmVL/D/kv0SNA8/P1DqMxEmLLqA81tWBBnWX TFhGO+w3OZCZrgRYd1DWsjln5VBWqd2rGJOG3yb3M2k7aU/RlQ979c+11a1O4w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NzGSj2FgzzpLS; Fri, 20 Jan 2023 23:49:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30KNnvpf088230; Fri, 20 Jan 2023 23:49:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30KNnvPw088229; Fri, 20 Jan 2023 23:49:57 GMT (envelope-from git) Date: Fri, 20 Jan 2023 23:49:57 GMT Message-Id: <202301202349.30KNnvPw088229@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: c52c98e69a2e - main - elf_common.h: Add parens to EF_ARM_EABI_VERSION macro List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: c52c98e69a2e19879c20d3011eb1785de143dd5f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=c52c98e69a2e19879c20d3011eb1785de143dd5f commit c52c98e69a2e19879c20d3011eb1785de143dd5f Author: Warner Losh AuthorDate: 2023-01-20 23:46:05 +0000 Commit: Warner Losh CommitDate: 2023-01-20 23:46:05 +0000 elf_common.h: Add parens to EF_ARM_EABI_VERSION macro Due to my haste, I missed John's suggestion in the review that I add () here. Belatedly add them. It didn't matter for my test case, but there's some pathological uses where it might matter. Suggested by: jrtc23, jhb Sponsored by: Netflix --- sys/sys/elf_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/elf_common.h b/sys/sys/elf_common.h index 87b6d1fbaedd..657846d80111 100644 --- a/sys/sys/elf_common.h +++ b/sys/sys/elf_common.h @@ -332,7 +332,7 @@ typedef struct { #define EF_ARM_EABI_VER3 0x03000000 #define EF_ARM_EABI_VER4 0x04000000 #define EF_ARM_EABI_VER5 0x05000000 -#define EF_ARM_EABI_VERSION(x) (x & EF_ARM_EABIMASK) +#define EF_ARM_EABI_VERSION(x) ((x) & EF_ARM_EABIMASK) #define EF_ARM_INTERWORK 0x00000004 #define EF_ARM_APCS_26 0x00000008 #define EF_ARM_APCS_FLOAT 0x00000010 From nobody Sat Jan 21 02:20:11 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NzKp41fZrz2v0VY; Sat, 21 Jan 2023 02:20: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NzKp41Dhrz4GLh; Sat, 21 Jan 2023 02:20:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674267612; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RA3SY6mqGzIzDpe9sMq4Ct7ODhl8IwL0tL3A0OEJycs=; b=J0N1Xkt5BcqplRNpPJGK7tlKwElcysoj5QWqJv00KhB8IxrfXatg4vY4MhVni3r0aQfyLq Vv45pc/TrXcAT1uFEaV1E4WQHDlXfXGzkCTtr4Fcpk2xUdfaCGDsELu0ruI537fOCAIGPa n0o1wFv9dvor6Orc47qW82an3LT2L8oTTQySTKSs8SkvLbnGX9N0XcU/BPiUZBu1ICo6BK xosGj5kXiAg4lJRSbt1fUyEN0JSZNiaZ4N7jVRe/hsg/PpMmjfJzoPuSFcl9bc/kqAlTE0 I5raGb3ZLPJKKu2PjWPVfTC+AerxxRc1mqQ8ssBPdk8UHlG8rclBreT9S7Co+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674267612; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RA3SY6mqGzIzDpe9sMq4Ct7ODhl8IwL0tL3A0OEJycs=; b=a9vHc7D0w8MhHuNIPW2jy4fxjzoPM6zYSuG/9cQbbm7ev5F1g/CtBNijDVrn1c9QJicRqN u82D8LwUv9phmNZ7fhZgvh4FKxYlz2BcJcUyAakNPMr6QruUsWEMneJp7t+H9aPvC1CGnh ACfSY6dSmIvA0UR+WQdM0cRKN6IE7vPAuQxnb5zMTvunPoDe1lf/OAXfmQ8SUrC8IMVQi2 f3cWRTioPDQ/umpsEZiQ8rCOCb2Uegz79WOqK92OD6166n+lTIIkEfsyjPgA5vviETIbX0 Zm+t/KXPpalH7C59quD2ZJeg/BQj2iSYZDbyPuleDTDNiMSJvsep9aN3L4yBHA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674267612; a=rsa-sha256; cv=none; b=ORalqpckSAugr+yDFpYsB/2SouJlA0xMyfrMTrHTjcDkNmPXiZnGPDf//fPqJsL+EEAAC8 9PqmpS6VOXWp6u3WVWUlFbexEmjdI1QvimYu2gZVA3bhs+gK7MLzAcy4K2YSgrzL8pkqy3 fhMdi72io6Pp/lu9lOMj6ORm/4obMbZLVhGtMMRjjoEijbxgfug6OA8WGccui9vlG64rlS Vf8WHxIyg0plevxRXt5kY8sSw9p9AP26reDMJtNHhHzUFtU4MgmVEJ+lfWkFn539DvEadO 408YayVOb1VwsRrXRwgL0vU8uVxwyUSHJkWsHvQk0s7RhNdC5EVh15NHrVh5+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 4NzKp40J7RzsnB; Sat, 21 Jan 2023 02:20:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30L2KBeE006869; Sat, 21 Jan 2023 02:20:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30L2KBQv006863; Sat, 21 Jan 2023 02:20:11 GMT (envelope-from git) Date: Sat, 21 Jan 2023 02:20:11 GMT Message-Id: <202301210220.30L2KBQv006863@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: 34784d17eb2b - main - elf: Catch up with defining EF_ARM_EABI_VERSION in elf_common.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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 34784d17eb2bcdcfaee39f570bff613b4055912d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=34784d17eb2bcdcfaee39f570bff613b4055912d commit 34784d17eb2bcdcfaee39f570bff613b4055912d Author: Warner Losh AuthorDate: 2023-01-21 02:15:52 +0000 Commit: Warner Losh CommitDate: 2023-01-21 02:18:15 +0000 elf: Catch up with defining EF_ARM_EABI_VERSION in elf_common.h FreeBSD defines EF_ARM_EABI_VERSION in a non-standard way (at least differently than everybody else). We use this only in elf*machdep.c to make sure the image is new enough. Switch to the more standard way of defining this and adjust other constants to match. Fixes: c52c98e69a2e Sponsored by: Netflix --- sys/arm/include/elf.h | 3 +-- sys/arm64/arm64/elf32_machdep.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/arm/include/elf.h b/sys/arm/include/elf.h index 35d0fa55ca1a..2ea60e8f10ee 100644 --- a/sys/arm/include/elf.h +++ b/sys/arm/include/elf.h @@ -74,9 +74,8 @@ __ElfType(Auxinfo); #define ELF_TARG_VER 1 /* Defines specific for arm headers */ -#define EF_ARM_EABI_VERSION(x) (((x) & EF_ARM_EABIMASK) >> 24) #define EF_ARM_EABI_VERSION_UNKNOWN 0 -#define EF_ARM_EABI_FREEBSD_MIN 4 +#define EF_ARM_EABI_FREEBSD_MIN EF_ARM_EABI_VER4 #define ET_DYN_LOAD_ADDR 0x01001000 diff --git a/sys/arm64/arm64/elf32_machdep.c b/sys/arm64/arm64/elf32_machdep.c index f637c5a65c05..627973ecfd3d 100644 --- a/sys/arm64/arm64/elf32_machdep.c +++ b/sys/arm64/arm64/elf32_machdep.c @@ -152,8 +152,7 @@ elf32_arm_abi_supported(struct image_params *imgp, int32_t *osrel __unused, ID_AA64PFR0_EL0_64_32) return (FALSE); -#define EF_ARM_EABI_VERSION(x) (((x) & EF_ARM_EABIMASK) >> 24) -#define EF_ARM_EABI_FREEBSD_MIN 4 +#define EF_ARM_EABI_FREEBSD_MIN EF_ARM_EABI_VER4 hdr = (const Elf32_Ehdr *)imgp->image_header; if (EF_ARM_EABI_VERSION(hdr->e_flags) < EF_ARM_EABI_FREEBSD_MIN) { if (bootverbose) From nobody Sat Jan 21 02:21:59 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NzKrB4dt1z2v0wM for ; Sat, 21 Jan 2023 02:22:02 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (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 "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NzKrB31XXz4GlG for ; Sat, 21 Jan 2023 02:22:02 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f47.google.com with SMTP id m15so5336539wms.4 for ; Fri, 20 Jan 2023 18:22:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=fa22s5uaCzPukrVsXGSLc/lGjcfjey/dzjBGJ2Wi9R4=; b=xTRVpD6DUJokpmDhbs0mnKQTZ+P/IFg8A8qiV5wITbxpXq1sTqLUVnhdRpJqwlGKLO IN9zW9qN7zINHv9w8alOEP1bWv6xqH0r/9XN7lYxJapLATiNs9x9Pa32yuMwl/WxRuTX rhR3EbqpCrHu4VNpzPtBIwiwzz3L+d2ojE5hBtx2FZzdagp7vrdXp/Xrtso9b3zcx9Y3 GPddtUfupuvxstmTgaS9BYgrMuXzpC82s5pQgu/bjFCdgKh362xYOqMWrblZSjtRNAdb tGoTQAHy4w7X2u8IwJI9N5dkUpA1CEtvQIRLn8OVh8/gri/6dBwgJ8Q5o6WXj786sTVu YLjw== X-Gm-Message-State: AFqh2krWV4M1jJFCMXsPzcS1+hnTlgP++80qTA3Qjm4IB2kV5dIG1Aee m3hRwOPdPIvRbioXBGQ37zIReg== X-Google-Smtp-Source: AMrXdXsJcGBjcPk+ejaDO3A8H8pvTbcoWMsMa7JgOR9B9vD6BLwrQoTLQrZbi9dXCUciDNCFAffjpw== X-Received: by 2002:a05:600c:1695:b0:3da:f502:83b5 with SMTP id k21-20020a05600c169500b003daf50283b5mr16413586wmn.2.1674267720719; Fri, 20 Jan 2023 18:22:00 -0800 (PST) Received: from smtpclient.apple (global-5-143.n-2.net.cam.ac.uk. [131.111.5.143]) by smtp.gmail.com with ESMTPSA id az41-20020a05600c602900b003dab77aa911sm3952701wmb.23.2023.01.20.18.22.00 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Jan 2023 18:22:00 -0800 (PST) Content-Type: text/plain; charset=us-ascii List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: git: 34784d17eb2b - main - elf: Catch up with defining EF_ARM_EABI_VERSION in elf_common.h From: Jessica Clarke In-Reply-To: <202301210220.30L2KBQv006863@gitrepo.freebsd.org> Date: Sat, 21 Jan 2023 02:21:59 +0000 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <202301210220.30L2KBQv006863@gitrepo.freebsd.org> To: Warner Losh X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Rspamd-Queue-Id: 4NzKrB31XXz4GlG X-Spamd-Bar: ---- 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-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 21 Jan 2023, at 02:20, Warner Losh wrote: >=20 > The branch main has been updated by imp: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D34784d17eb2bcdcfaee39f570bff613b= 4055912d >=20 > commit 34784d17eb2bcdcfaee39f570bff613b4055912d > Author: Warner Losh > AuthorDate: 2023-01-21 02:15:52 +0000 > Commit: Warner Losh > CommitDate: 2023-01-21 02:18:15 +0000 >=20 > elf: Catch up with defining EF_ARM_EABI_VERSION in elf_common.h >=20 > FreeBSD defines EF_ARM_EABI_VERSION in a non-standard way (at least > differently than everybody else). We use this only in elf*machdep.c = to > make sure the image is new enough. Switch to the more standard way = of > defining this and adjust other constants to match. >=20 > Fixes: c52c98e69a2e > Sponsored by: Netflix > --- > sys/arm/include/elf.h | 3 +-- > sys/arm64/arm64/elf32_machdep.c | 3 +-- > 2 files changed, 2 insertions(+), 4 deletions(-) >=20 > diff --git a/sys/arm/include/elf.h b/sys/arm/include/elf.h > index 35d0fa55ca1a..2ea60e8f10ee 100644 > --- a/sys/arm/include/elf.h > +++ b/sys/arm/include/elf.h > @@ -74,9 +74,8 @@ __ElfType(Auxinfo); > #define ELF_TARG_VER 1 >=20 > /* Defines specific for arm headers */ > -#define EF_ARM_EABI_VERSION(x) (((x) & EF_ARM_EABIMASK) >> 24) > #define EF_ARM_EABI_VERSION_UNKNOWN 0 Can also use EF_ARM_EABI_UNKNOWN in its place? Jess > -#define EF_ARM_EABI_FREEBSD_MIN 4 > +#define EF_ARM_EABI_FREEBSD_MIN EF_ARM_EABI_VER4 >=20 > #define ET_DYN_LOAD_ADDR 0x01001000 >=20 > diff --git a/sys/arm64/arm64/elf32_machdep.c = b/sys/arm64/arm64/elf32_machdep.c > index f637c5a65c05..627973ecfd3d 100644 > --- a/sys/arm64/arm64/elf32_machdep.c > +++ b/sys/arm64/arm64/elf32_machdep.c > @@ -152,8 +152,7 @@ elf32_arm_abi_supported(struct image_params *imgp, = int32_t *osrel __unused, > ID_AA64PFR0_EL0_64_32) > return (FALSE); >=20 > -#define EF_ARM_EABI_VERSION(x) (((x) & EF_ARM_EABIMASK) >> 24) > -#define EF_ARM_EABI_FREEBSD_MIN 4 > +#define EF_ARM_EABI_FREEBSD_MIN EF_ARM_EABI_VER4 > hdr =3D (const Elf32_Ehdr *)imgp->image_header; > if (EF_ARM_EABI_VERSION(hdr->e_flags) < EF_ARM_EABI_FREEBSD_MIN) = { > if (bootverbose) From nobody Sat Jan 21 02:27:40 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NzKyx0WfJz2v1FL for ; Sat, 21 Jan 2023 02:27:53 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) (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 "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NzKyw49ywz4HCD for ; Sat, 21 Jan 2023 02:27:52 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-x62d.google.com with SMTP id v6so18317693ejg.6 for ; Fri, 20 Jan 2023 18:27:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=IpG7zkG9Kpcv2CsHPJTi1g8vc3hDj4S9+r7HB/weC5c=; b=YFUI1wT6mwpTDFrCrTaP2DwPD19HULfVQWvtTP7Ue00zlZV4v39weyycvfP4IjhNLr i7FnbFaMpBJeJrZOfO+Q9FV/eSZuObWE47Bt6aQe8hXNnY5Ih4fvdW/eVifSO8b+D3XY gGw7SCfuCeIsAkcNSeOlfo++3oYzBxcc7MM7+ZH0c94I26jNCszw+V0ANuKY9ZDp4sMs K4xZv7cyZfSsM075TgAEgEpPvdE+YkvUhg6hCNkkfkZGStAyZBDejSjp5SptNks9/e2B I0chdDZHpGioakgW3N2GcrnIZ4z4iRumh9eRiYVNfG3ff5h+HRvet7ietZiH+9CeDV+x jc6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=IpG7zkG9Kpcv2CsHPJTi1g8vc3hDj4S9+r7HB/weC5c=; b=oiI6VaVuU75iaqBK/rDu9diGdKiwFsFOp1pKz0sFBD1MnADPRbjILEVQJD/Cp8drG0 RTOdENMsq/2vG+ht6qn1ceuEFPsEbaFDvR42VZdN0PgdBKaZpFH0PFtTbNJRkF5H6NiG dEBbi3txW2qAlQvXsQ+5SwrNyrF6X9TE5dQB3IOTKuEY3QMIqcpx5D5BosP+ZaWtNhAK 25GYRZLuNgeq9hs5mb8rdosCSm9f23zpNU6tkP+Ah6BvGAK28+T8t8Gno8DWi1nAg420 laCzPbs2Mq2b/FIJd7jX1GTLSAPNzyfeQL/vAp/2/X8UOxJ2TnoJc/oqvlGvWHNssyMO BW7w== X-Gm-Message-State: AFqh2koVP6qQgL1vtL3VNju8jbMBwDvEE4ZNeSjbIZ3j8fcBMbN2GHgv icm/A7t0RE24SnHpg6x9cjjKzPUPRv0ITm9sZlGY0A== X-Google-Smtp-Source: AMrXdXviWer7M3rueLZrsxei6coCjPGo/MNadvrihM2DG6WqsUT/8HePXvlR8XpVlZl0DjgptZuvLrdhIdot5orHAgI= X-Received: by 2002:a17:906:961a:b0:872:8cb:3d87 with SMTP id s26-20020a170906961a00b0087208cb3d87mr1675655ejx.350.1674268071293; Fri, 20 Jan 2023 18:27:51 -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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <202301210220.30L2KBQv006863@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Fri, 20 Jan 2023 19:27:40 -0700 Message-ID: Subject: Re: git: 34784d17eb2b - main - elf: Catch up with defining EF_ARM_EABI_VERSION in elf_common.h To: Jessica Clarke Cc: Warner Losh , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Type: multipart/alternative; boundary="000000000000a608e705f2bce91e" X-Rspamd-Queue-Id: 4NzKyw49ywz4HCD X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --000000000000a608e705f2bce91e Content-Type: text/plain; charset="UTF-8" On Fri, Jan 20, 2023 at 7:22 PM Jessica Clarke wrote: > On 21 Jan 2023, at 02:20, Warner Losh wrote: > > > > The branch main has been updated by imp: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=34784d17eb2bcdcfaee39f570bff613b4055912d > > > > commit 34784d17eb2bcdcfaee39f570bff613b4055912d > > Author: Warner Losh > > AuthorDate: 2023-01-21 02:15:52 +0000 > > Commit: Warner Losh > > CommitDate: 2023-01-21 02:18:15 +0000 > > > > elf: Catch up with defining EF_ARM_EABI_VERSION in elf_common.h > > > > FreeBSD defines EF_ARM_EABI_VERSION in a non-standard way (at least > > differently than everybody else). We use this only in elf*machdep.c to > > make sure the image is new enough. Switch to the more standard way of > > defining this and adjust other constants to match. > > > > Fixes: c52c98e69a2e > > Sponsored by: Netflix > > --- > > sys/arm/include/elf.h | 3 +-- > > sys/arm64/arm64/elf32_machdep.c | 3 +-- > > 2 files changed, 2 insertions(+), 4 deletions(-) > > > > diff --git a/sys/arm/include/elf.h b/sys/arm/include/elf.h > > index 35d0fa55ca1a..2ea60e8f10ee 100644 > > --- a/sys/arm/include/elf.h > > +++ b/sys/arm/include/elf.h > > @@ -74,9 +74,8 @@ __ElfType(Auxinfo); > > #define ELF_TARG_VER 1 > > > > /* Defines specific for arm headers */ > > -#define EF_ARM_EABI_VERSION(x) (((x) & EF_ARM_EABIMASK) >> 24) > > #define EF_ARM_EABI_VERSION_UNKNOWN 0 > > Can also use EF_ARM_EABI_UNKNOWN in its place? > I'm not sure I understand the question... In what's place? Warner > Jess > > > -#define EF_ARM_EABI_FREEBSD_MIN 4 > > +#define EF_ARM_EABI_FREEBSD_MIN EF_ARM_EABI_VER4 > > > > #define ET_DYN_LOAD_ADDR 0x01001000 > > > > diff --git a/sys/arm64/arm64/elf32_machdep.c > b/sys/arm64/arm64/elf32_machdep.c > > index f637c5a65c05..627973ecfd3d 100644 > > --- a/sys/arm64/arm64/elf32_machdep.c > > +++ b/sys/arm64/arm64/elf32_machdep.c > > @@ -152,8 +152,7 @@ elf32_arm_abi_supported(struct image_params *imgp, > int32_t *osrel __unused, > > ID_AA64PFR0_EL0_64_32) > > return (FALSE); > > > > -#define EF_ARM_EABI_VERSION(x) (((x) & EF_ARM_EABIMASK) >> 24) > > -#define EF_ARM_EABI_FREEBSD_MIN 4 > > +#define EF_ARM_EABI_FREEBSD_MIN EF_ARM_EABI_VER4 > > hdr = (const Elf32_Ehdr *)imgp->image_header; > > if (EF_ARM_EABI_VERSION(hdr->e_flags) < EF_ARM_EABI_FREEBSD_MIN) { > > if (bootverbose) > > --000000000000a608e705f2bce91e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Fri, Jan 20, 2023 at 7:22 PM Jessi= ca Clarke <jrtc27@freebsd.org&= gt; wrote:
On 21= Jan 2023, at 02:20, Warner Losh <imp@FreeBSD.org> wrote:
>
> The branch main has been updated by imp:
>
> URL: https://= cgit.FreeBSD.org/src/commit/?id=3D34784d17eb2bcdcfaee39f570bff613b4055912d<= /a>
>
> commit 34784d17eb2bcdcfaee39f570bff613b4055912d
> Author:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> AuthorDate: 2023-01-21 02:15:52 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> CommitDate: 2023-01-21 02:18:15 +0000
>
>=C2=A0 =C2=A0 elf: Catch up with defining EF_ARM_EABI_VERSION in elf_co= mmon.h
>
>=C2=A0 =C2=A0 FreeBSD defines EF_ARM_EABI_VERSION in a non-standard way= (at least
>=C2=A0 =C2=A0 differently than everybody else). We use this only in elf= *machdep.c to
>=C2=A0 =C2=A0 make sure the image is new enough. Switch to the more sta= ndard way of
>=C2=A0 =C2=A0 defining this and adjust other constants to match.
>
>=C2=A0 =C2=A0 Fixes:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 c52c98e69a2e
>=C2=A0 =C2=A0 Sponsored by:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Net= flix
> ---
> sys/arm/include/elf.h=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0| 3 +--<= br> > sys/arm64/arm64/elf32_machdep.c | 3 +--
> 2 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/sys/arm/include/elf.h b/sys/arm/include/elf.h
> index 35d0fa55ca1a..2ea60e8f10ee 100644
> --- a/sys/arm/include/elf.h
> +++ b/sys/arm/include/elf.h
> @@ -74,9 +74,8 @@ __ElfType(Auxinfo);
> #define=C2=A0 =C2=A0 =C2=A0 =C2=A0ELF_TARG_VER=C2=A0 =C2=A0 1
>
> /* Defines specific for arm headers */
> -#define=C2=A0 =C2=A0 =C2=A0 EF_ARM_EABI_VERSION(x) (((x) & EF_ARM= _EABIMASK) >> 24)
> #define=C2=A0 =C2=A0 =C2=A0 =C2=A0EF_ARM_EABI_VERSION_UNKNOWN 0

Can also use EF_ARM_EABI_UNKNOWN in its place?

I'm not sure I understand the question...=C2=A0=C2=A0 In what&#= 39;s place?

Warner
=C2=A0
Jess

> -#define=C2=A0 =C2=A0 =C2=A0 EF_ARM_EABI_FREEBSD_MIN 4
> +#define=C2=A0 =C2=A0 =C2=A0 EF_ARM_EABI_FREEBSD_MIN EF_ARM_EABI_VER4<= br> >
> #define=C2=A0 =C2=A0 =C2=A0 =C2=A0ET_DYN_LOAD_ADDR 0x01001000
>
> diff --git a/sys/arm64/arm64/elf32_machdep.c b/sys/arm64/arm64/elf32_m= achdep.c
> index f637c5a65c05..627973ecfd3d 100644
> --- a/sys/arm64/arm64/elf32_machdep.c
> +++ b/sys/arm64/arm64/elf32_machdep.c
> @@ -152,8 +152,7 @@ elf32_arm_abi_supported(struct image_params *imgp,= int32_t *osrel __unused,
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ID_AA64PFR0_EL0_64_32)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return (FALSE);<= br> >
> -#define=C2=A0 =C2=A0 =C2=A0 EF_ARM_EABI_VERSION(x)=C2=A0 (((x) & = EF_ARM_EABIMASK) >> 24)
> -#define=C2=A0 =C2=A0 =C2=A0 EF_ARM_EABI_FREEBSD_MIN 4
> +#define=C2=A0 =C2=A0 =C2=A0 EF_ARM_EABI_FREEBSD_MIN EF_ARM_EABI_VER4<= br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0hdr =3D (const Elf32_Ehdr *)imgp->image_h= eader;
>=C2=A0 =C2=A0 =C2=A0 =C2=A0if (EF_ARM_EABI_VERSION(hdr->e_flags) <= ; EF_ARM_EABI_FREEBSD_MIN) {
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (bootverbose)=

--000000000000a608e705f2bce91e-- From nobody Sat Jan 21 02:29:59 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NzL1c6s31z2v1kG for ; Sat, 21 Jan 2023 02:30:12 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) (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 "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NzL1c01PJz4Hk3 for ; Sat, 21 Jan 2023 02:30:12 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20210112.gappssmtp.com header.s=20210112 header.b=wFQQzxe+; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2a00:1450:4864:20::62e) smtp.mailfrom=wlosh@bsdimp.com; dmarc=none Received: by mail-ej1-x62e.google.com with SMTP id kt14so18355006ejc.3 for ; Fri, 20 Jan 2023 18:30:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=OmLs98obyvjBaRnOQOURshGG8gyUsiRijuYqB6ZFVOY=; b=wFQQzxe+KpusEfzUGikfIkyeufnE4gYspXuTkXRwa7STrlMuXoJQ052vwH9HWw5Bq+ b/VFkbvkDLmqrfYUIdzPoegbvxGCl/yo6wb3yud1/OOkXGSL7PLPaMS4HbRknphNmd71 g7Qf/KKMZXA02YrYfIDPnraI58iCFEU6bkYIyCT266ZXg6dNFfLB2NMFLfE/MGPPH+e2 GPqNd/TcShhobKXL2Ph0eqLwGFyVZrEFIanoNWuEMjsLyu07dJAXXU3RM7B75b9vsNz+ A9psQTVo6n9ez+X0tjE4wnDFG69lParuk8ZyQqDicC3aHvkEN7zh5jIxP729vH5N1np3 WcEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=OmLs98obyvjBaRnOQOURshGG8gyUsiRijuYqB6ZFVOY=; b=YLqk9aPc/KmBcVHXOO3Cg4d9rhMFgKQcQ5jNbNB/8tyVwTxQzKsMqs5KRWl7DwvhEU 9lbY33Kx+MyyIaLK5rFYfwNLLkbcGdMKvqVgCcvu3+7bQ67Hcl+4N/3tR/vICdTdNLLQ /m7TmlUloGVUVnB7ieIp16ZHYrFvkny+4e/RbT6URo8HAoEHCJHDdO3Rdc0RMlxttGKy DS93LOEmB/gsJgBm5Ee7FCn/XPnH0ZfwKq3WfLvzDLJv7L52uGvGEwF/YNLTBKDm08eQ R9Gm29wRkqKzy0LzdcHlKyUxS68YnAT1nIh/wOMgn2F207VgitypL9TDSOFnvtGY8wum Wcsg== X-Gm-Message-State: AFqh2kpE2QtFdpbyKHgVS4Y46H71bbfpDuvX2LxvyEdxg3spWOQwY9FB 5UBo0Akzdgtq6BLlMu+Lqg7PoSZAGJxhpM/bu5d13A== X-Google-Smtp-Source: AMrXdXtgjrxf5AvRUvpK4CVhGObG3NMvYTDW4HRtxt9Ko1vUiG/KGinUJy4Gf0+DfaXtvWdnP7esgZRYtLErVvJZfPI= X-Received: by 2002:a17:906:d8b5:b0:7c0:f5e7:af76 with SMTP id qc21-20020a170906d8b500b007c0f5e7af76mr1710834ejb.432.1674268210695; Fri, 20 Jan 2023 18:30:10 -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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <202301210220.30L2KBQv006863@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Fri, 20 Jan 2023 19:29:59 -0700 Message-ID: Subject: Re: git: 34784d17eb2b - main - elf: Catch up with defining EF_ARM_EABI_VERSION in elf_common.h To: Jessica Clarke Cc: Warner Losh , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Type: multipart/alternative; boundary="000000000000f52e1905f2bcf1de" X-Spamd-Result: default: False [-3.00 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20210112.gappssmtp.com:s=20210112]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; R_SPF_NA(0.00)[no SPF record]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::62e:from]; RCVD_TLS_LAST(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20210112.gappssmtp.com:+]; TO_DN_SOME(0.00)[]; DMARC_NA(0.00)[bsdimp.com]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Queue-Id: 4NzL1c01PJz4Hk3 X-Spamd-Bar: -- X-ThisMailContainsUnwantedMimeParts: N --000000000000f52e1905f2bcf1de Content-Type: text/plain; charset="UTF-8" On Fri, Jan 20, 2023 at 7:27 PM Warner Losh wrote: > > > On Fri, Jan 20, 2023 at 7:22 PM Jessica Clarke wrote: > >> On 21 Jan 2023, at 02:20, Warner Losh wrote: >> > >> > The branch main has been updated by imp: >> > >> > URL: >> https://cgit.FreeBSD.org/src/commit/?id=34784d17eb2bcdcfaee39f570bff613b4055912d >> > >> > commit 34784d17eb2bcdcfaee39f570bff613b4055912d >> > Author: Warner Losh >> > AuthorDate: 2023-01-21 02:15:52 +0000 >> > Commit: Warner Losh >> > CommitDate: 2023-01-21 02:18:15 +0000 >> > >> > elf: Catch up with defining EF_ARM_EABI_VERSION in elf_common.h >> > >> > FreeBSD defines EF_ARM_EABI_VERSION in a non-standard way (at least >> > differently than everybody else). We use this only in elf*machdep.c >> to >> > make sure the image is new enough. Switch to the more standard way of >> > defining this and adjust other constants to match. >> > >> > Fixes: c52c98e69a2e >> > Sponsored by: Netflix >> > --- >> > sys/arm/include/elf.h | 3 +-- >> > sys/arm64/arm64/elf32_machdep.c | 3 +-- >> > 2 files changed, 2 insertions(+), 4 deletions(-) >> > >> > diff --git a/sys/arm/include/elf.h b/sys/arm/include/elf.h >> > index 35d0fa55ca1a..2ea60e8f10ee 100644 >> > --- a/sys/arm/include/elf.h >> > +++ b/sys/arm/include/elf.h >> > @@ -74,9 +74,8 @@ __ElfType(Auxinfo); >> > #define ELF_TARG_VER 1 >> > >> > /* Defines specific for arm headers */ >> > -#define EF_ARM_EABI_VERSION(x) (((x) & EF_ARM_EABIMASK) >> 24) >> > #define EF_ARM_EABI_VERSION_UNKNOWN 0 >> >> Can also use EF_ARM_EABI_UNKNOWN in its place? >> > > I'm not sure I understand the question... In what's place? > Oh, I see... Yea... We can just delete EF_ARM_EABI_VERSION_UNKNOWN since it's unused. It was added for the OABI -> EABI transition... Warner > Warner > > >> Jess >> >> > -#define EF_ARM_EABI_FREEBSD_MIN 4 >> > +#define EF_ARM_EABI_FREEBSD_MIN EF_ARM_EABI_VER4 >> > >> > #define ET_DYN_LOAD_ADDR 0x01001000 >> > >> > diff --git a/sys/arm64/arm64/elf32_machdep.c >> b/sys/arm64/arm64/elf32_machdep.c >> > index f637c5a65c05..627973ecfd3d 100644 >> > --- a/sys/arm64/arm64/elf32_machdep.c >> > +++ b/sys/arm64/arm64/elf32_machdep.c >> > @@ -152,8 +152,7 @@ elf32_arm_abi_supported(struct image_params *imgp, >> int32_t *osrel __unused, >> > ID_AA64PFR0_EL0_64_32) >> > return (FALSE); >> > >> > -#define EF_ARM_EABI_VERSION(x) (((x) & EF_ARM_EABIMASK) >> 24) >> > -#define EF_ARM_EABI_FREEBSD_MIN 4 >> > +#define EF_ARM_EABI_FREEBSD_MIN EF_ARM_EABI_VER4 >> > hdr = (const Elf32_Ehdr *)imgp->image_header; >> > if (EF_ARM_EABI_VERSION(hdr->e_flags) < EF_ARM_EABI_FREEBSD_MIN) { >> > if (bootverbose) >> >> --000000000000f52e1905f2bcf1de Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=


On Fri, Jan 20, 2023 at 7:22 PM Jessica Clarke <jrtc27@freebsd.org> wrote:
On = 21 Jan 2023, at 02:20, Warner Losh <imp@FreeBSD.org> wrote:
>
> The branch main has been updated by imp:
>
> URL: https://= cgit.FreeBSD.org/src/commit/?id=3D34784d17eb2bcdcfaee39f570bff613b4055912d<= /a>
>
> commit 34784d17eb2bcdcfaee39f570bff613b4055912d
> Author:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> AuthorDate: 2023-01-21 02:15:52 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> CommitDate: 2023-01-21 02:18:15 +0000
>
>=C2=A0 =C2=A0 elf: Catch up with defining EF_ARM_EABI_VERSION in elf_co= mmon.h
>
>=C2=A0 =C2=A0 FreeBSD defines EF_ARM_EABI_VERSION in a non-standard way= (at least
>=C2=A0 =C2=A0 differently than everybody else). We use this only in elf= *machdep.c to
>=C2=A0 =C2=A0 make sure the image is new enough. Switch to the more sta= ndard way of
>=C2=A0 =C2=A0 defining this and adjust other constants to match.
>
>=C2=A0 =C2=A0 Fixes:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 c52c98e69a2e
>=C2=A0 =C2=A0 Sponsored by:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Net= flix
> ---
> sys/arm/include/elf.h=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0| 3 +--<= br> > sys/arm64/arm64/elf32_machdep.c | 3 +--
> 2 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/sys/arm/include/elf.h b/sys/arm/include/elf.h
> index 35d0fa55ca1a..2ea60e8f10ee 100644
> --- a/sys/arm/include/elf.h
> +++ b/sys/arm/include/elf.h
> @@ -74,9 +74,8 @@ __ElfType(Auxinfo);
> #define=C2=A0 =C2=A0 =C2=A0 =C2=A0ELF_TARG_VER=C2=A0 =C2=A0 1
>
> /* Defines specific for arm headers */
> -#define=C2=A0 =C2=A0 =C2=A0 EF_ARM_EABI_VERSION(x) (((x) & EF_ARM= _EABIMASK) >> 24)
> #define=C2=A0 =C2=A0 =C2=A0 =C2=A0EF_ARM_EABI_VERSION_UNKNOWN 0

Can also use EF_ARM_EABI_UNKNOWN in its place?


--000000000000f52e1905f2bcf1de-- From nobody Sat Jan 21 04:43:49 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NzNzp0K4dz30yw2; Sat, 21 Jan 2023 04:43:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NzNzn6Q5Pz3DD8; Sat, 21 Jan 2023 04:43:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674276229; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=56DF2E2BN0TxLyCZX5AYJLZahMUI8qzkEMOX0FnUQnM=; b=b1q50SznWUYnZgEj6ZQ6swtlUFmnbxLKfVcnpTh3MI30i63wDDH+yKNoix08QypHIBI83K lzMR4HlL68SuJpZc9jn1DswQVTu++sSXxQTuHABsWaRA9Xg7twUIm1eVAEq++DZxj4EUTD WukjGc45TsSDHQRVlYgWornVhugEVeiTnJIrLptfFwERkZeVO5P1Y9AcBgxGPl2TfZCAOY dcgfVEr8cin5rHYwGnUKBb5U1W81jslobj9eHFwbbJZHhDmmy6YXdPpnMojr0j+5DEzAlY IvkK4Lvy//aGcH5rTvXecrnnsX/cD3rjewRlFhz8+wIEMoEmnbSMQc18/9/C8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674276229; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=56DF2E2BN0TxLyCZX5AYJLZahMUI8qzkEMOX0FnUQnM=; b=YoXlVURgSHkgj6AbF5zFiO6Cz3zMrzoASa6h+fKw5kKtp+1aBiiA3QjrKAx0mFxTBZBwe2 g54zE12xctKVJ30RhU/8JVenY7CXwpEmBzSBVJdI5IXn8Cox+l8KfmgGZMhWrMtFWD8K6U VZ50FkcaDtniV9eXZhhmisyFgsdHFEkLlIH7Rjz6sKMVhatn2CWzZ98spLjLk/n7QwkDzC /sNhKAt2khiXqTatGSMPcKp9h27pU3GyakvtcpxTN/Gt9qcYO7wu/Bahe0hBU8+KkTD2zV Am5mHeEN9yNORMNn5dAZBEI2UcApUFwxMMCe9OjGbTDGRqyRKQ7vbzz/+a3kiw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674276229; a=rsa-sha256; cv=none; b=kte8tDm4LQ67BxpUxsM1cx5BlkEKdM6YZo+AQa/a7RfkOIAC2vCjwpC1MWQmZntGUVEJbY OGlWMmcLMqRgqzkdzIXopf7dMQtHyreXja31yfhdIQUWrsFsZ6k/30GIEcOMlD0/20eD4y 63QWf2VcPxz5L0NmNguuoYhOyJ49wx5OTGBMWEdoq0u9lA4UEvJ7CxnIS3IvutVuwcwVQP w0CB3avFK482iIfPu3w8PFKCk9lTFw7s7vWDb3ywtqfMLsyF4/ar3skU22ibEKk0jzi7fd a2SHCd6mavMiwsvaWSAhVR+Ab0rym6mh7DATelVUmjardkWfaScy/t3jFE4dRw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NzNzn5TD3zxmp; Sat, 21 Jan 2023 04:43:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30L4hntg015212; Sat, 21 Jan 2023 04:43:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30L4hnw4015211; Sat, 21 Jan 2023 04:43:49 GMT (envelope-from git) Date: Sat, 21 Jan 2023 04:43:49 GMT Message-Id: <202301210443.30L4hnw4015211@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: ffc58e2ca365 - main - asmc: Add MacbookAir6,2 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: ffc58e2ca36546d866bb6bd36a3aa8f762a01663 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=ffc58e2ca36546d866bb6bd36a3aa8f762a01663 commit ffc58e2ca36546d866bb6bd36a3aa8f762a01663 Author: Adrian Chadd AuthorDate: 2023-01-21 04:34:31 +0000 Commit: Adrian Chadd CommitDate: 2023-01-21 04:34:31 +0000 asmc: Add MacbookAir6,2 Add in the zones for my MacbookAir6,2, a 2013 Macbook Air. Tested - said Macbook Air 2013. Thermal Zones and keyboard backlight control works fine. Differential Revision: https://reviews.freebsd.org/D38073 Approved by: jrtc27 --- sys/dev/asmc/asmc.c | 9 +++++++-- sys/dev/asmc/asmcvar.h | 25 +++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/sys/dev/asmc/asmc.c b/sys/dev/asmc/asmc.c index bec0054e2dd7..337f641e4513 100644 --- a/sys/dev/asmc/asmc.c +++ b/sys/dev/asmc/asmc.c @@ -427,7 +427,13 @@ static const struct asmc_model asmc_models[] = { ASMC_LIGHT_FUNCS, ASMC_MBA5_TEMPS, ASMC_MBA5_TEMPNAMES, ASMC_MBA5_TEMPDESCS }, - + { + "MacBookAir6,2", "Apple SMC MacBook Air 13-inch (Early 2013)", + ASMC_SMS_FUNCS_DISABLED, + ASMC_FAN_FUNCS2, + ASMC_LIGHT_FUNCS, + ASMC_MBA6_TEMPS, ASMC_MBA6_TEMPNAMES, ASMC_MBA6_TEMPDESCS + }, { "MacBookAir7,1", "Apple SMC MacBook Air 11-inch (Early 2015)", ASMC_SMS_FUNCS_DISABLED, @@ -435,7 +441,6 @@ static const struct asmc_model asmc_models[] = { ASMC_LIGHT_FUNCS, ASMC_MBA7_TEMPS, ASMC_MBA7_TEMPNAMES, ASMC_MBA7_TEMPDESCS }, - { "MacBookAir7,2", "Apple SMC MacBook Air 13-inch (Early 2015)", ASMC_SMS_FUNCS_DISABLED, diff --git a/sys/dev/asmc/asmcvar.h b/sys/dev/asmc/asmcvar.h index a594710f1cbe..9db544a1450d 100644 --- a/sys/dev/asmc/asmcvar.h +++ b/sys/dev/asmc/asmcvar.h @@ -773,6 +773,31 @@ struct asmc_softc { "Ta0P", "Heatpipe", "Mainboard Proximity 1", "Mainboard Proximity 2", \ "Palm Rest", "Memory Proximity" } +/* + * TODO: validate the temp zones for MBA 6.x ! + */ +#define ASMC_MBA6_TEMPS { "TB0T", "TB1T", "TB2T", \ + "TC0E", "TC0F", "TC0P", \ + "TC1C", "TC2C", "TCGC", "TCSA", \ + "TCXC", "THSP", "TM0P", "TPCD", \ + "Ta0P", "Th1H", "Tm0P", \ + "Ts0P", "Ts0S", NULL } + +#define ASMC_MBA6_TEMPNAMES { "enclosure1", "enclosure2", "enclosure3", \ + "cputemp1", "cputemp2", "cpuproximity", \ + "cpucore1", "cpucore2", "cpupeci", "pecisa", \ + "TCXC", "THSP", "memorybank", "pchdie", \ + "Ta0P", "heatpipe", "mainboardproximity1", \ + "palmrest", "memoryproximity" } + +#define ASMC_MBA6_TEMPDESCS { "Enclosure Bottom 1", "Enclosure Bottom 2", "Enclosure Bottom 3", \ + "CPU Temp 1", "CPU Temp 2", "CPU Proximity", \ + "CPU Core 1", "CPU Core 2", "CPU Peci Core", "PECI SA", \ + "TCXC", "THSP", "Memory Bank A", "PCH Die", \ + "Ta0P", "Heatpipe", "Mainboard Proximity 1", \ + "Palm Rest", "Memory Proximity" } + + #define ASMC_MBA7_TEMPS { "TB0T", "TB1T", "TB2T", \ "TC0E", "TC0F", "TC0P", \ "TC1C", "TC2C", \ From nobody Sat Jan 21 05:14:31 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NzPgC5RqPz313Pm; Sat, 21 Jan 2023 05:14: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NzPgC4tVxz3Grk; Sat, 21 Jan 2023 05:14:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674278071; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jnromNKVXJqepXtEAeNUnJqaysifC4J/CTAhpZh4Sys=; b=PsDa8y0iqW6/QAVCAmmp+m/N1LyAmEPZRWI8jUJRMBsN8CL3r3yN95tLuniywSXCsg5gJD Qr07SXkE2DomZfWSVZ2mUUpuSWD1spHEPA6rdHj3XSqT5/BqD/UqH1F3v0FPT4XdTdD17V WazH9Gl4h28bwfmzBTvYEDlVsBuvCIG9mztIcwe6gdUudgMUTjsvfVGXDTneIgTfJlMtYY C3TbBiF9C5Vk9niydsv1gQFp4+4WuLmiThpRr38LCShh58DEEoVOoQcvtyTupneOwHASbH gRndIXSKMBCk20LVTCqfMZBB50HLdC9bFOgGAYAJxTRgAOhvYU/gWmgmwadJxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674278071; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jnromNKVXJqepXtEAeNUnJqaysifC4J/CTAhpZh4Sys=; b=N1LY1pAjAZKv2vHC1K+z/NiTfF13UZpK7m+7N8h+cXtNxEB+JOUS9Duqd+F7rSMzGxTQD9 xbLfQJL3zhvk3m5p1+irVglNFbL+OX2yx4ftrtcDezmudh+6yIv086ezHKV7m1EgLw+kY2 vsfeAeEcQ8RKbGwUUES1s24d/iKKTkS0dIG9oMGSljr+NU49WsNA8O6jrc0ImDhaRHkT8Z iOFRNQcPhgHBJJFRRkb0iNVRpPJnr1aZa8TYgCSF8lQ2aCQF3/x8/iJeilkHv6q2By5va2 1OneMGc1FqWAfx9g2juo6dZ8BBdT2jUqNSAhQbYOiZOzTuvuGo7P99xePaR5KA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674278071; a=rsa-sha256; cv=none; b=vgR6fU3YgF7EwfVv9RUA49MRYKOzVmFumBJQ7s9F2vxUc+cRSgVkPGiYP3dZY12REOI7AU yKsx79FVTSS1+sePKUPNRZeIbapjRQh7VZflKP4c4lQ2WWCokFHK0HdCJUMpEneryJomlq 8wpk4Ksmch3yRWAG7EBPtOe9COmL8kX78Y0cxe/Nszpc8iHv5Wva663Eq8ZY09jirH99E7 6f3WW2VShCryykw3/nzGM4MPKY2sVRBJxVIA61Eqlg6TW0e/DjmksJ2iisZybiUJQ7C5iB SIIhR4aWDUwIfam0HfrkEp75TcgIPro3wSJr5ERnK1P64Ngy3du4GaUUI8LziA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NzPgC3y17zy16; Sat, 21 Jan 2023 05:14:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30L5EV6l058424; Sat, 21 Jan 2023 05:14:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30L5EVqm058423; Sat, 21 Jan 2023 05:14:31 GMT (envelope-from git) Date: Sat, 21 Jan 2023 05:14:31 GMT Message-Id: <202301210514.30L5EVqm058423@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: 03a1b75950c9 - main - elf: EF_ARM_EABI_VERSION_UNKNOWN is no longer used, retire List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 03a1b75950c95cd9360e5c283219b886d36afb53 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=03a1b75950c95cd9360e5c283219b886d36afb53 commit 03a1b75950c95cd9360e5c283219b886d36afb53 Author: Warner Losh AuthorDate: 2023-01-21 05:11:00 +0000 Commit: Warner Losh CommitDate: 2023-01-21 05:12:32 +0000 elf: EF_ARM_EABI_VERSION_UNKNOWN is no longer used, retire EF_ARM_EABI_VERSION_UNKNOWN was used when we could run either eabi or oabi. That was armv[45] only, and went away when we migrated to eabi many major releases ago. No standard defines this symbol, so retire it. Pointed out by: jrtc27 Sponsored by: Netflix --- sys/arm/include/elf.h | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/arm/include/elf.h b/sys/arm/include/elf.h index 2ea60e8f10ee..d8c0887ee773 100644 --- a/sys/arm/include/elf.h +++ b/sys/arm/include/elf.h @@ -74,7 +74,6 @@ __ElfType(Auxinfo); #define ELF_TARG_VER 1 /* Defines specific for arm headers */ -#define EF_ARM_EABI_VERSION_UNKNOWN 0 #define EF_ARM_EABI_FREEBSD_MIN EF_ARM_EABI_VER4 #define ET_DYN_LOAD_ADDR 0x01001000 From nobody Sat Jan 21 05:55:45 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NzQZr5Vgjz328ZR for ; Sat, 21 Jan 2023 05:55:48 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) (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 "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NzQZr3Wndz3Kc4 for ; Sat, 21 Jan 2023 05:55:48 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wr1-f49.google.com with SMTP id r2so6495935wrv.7 for ; Fri, 20 Jan 2023 21:55:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=PJ1KorNOrt/Aac3z8OVKQ+DlSg9gf/kYsnKl3/NbKGI=; b=ImHU3PYNNcJ4DrNFC6MDnSv2I3A3dXRDtkFZZOHfjwpgYil8EXDi58Uyp98G4DLY+l p9NfsmLosuccbhoNIWl8VgsqkCuG1xFIOjrD3uEPG5AEqMPIA6/L38liBvfrac1kcy/L +7FgbfqJxpXO4oCi+SCYBY+WWjpXZu6onsU9tbf1RCfOfYfWrINoIh+9IV1WwtN9Z3A9 DvzFEzSzXv8lREDqYvsSb5akjdKbEsAsDxHQhrBgE4aj3mxGk826dyhwR6ebf2pNMUFV pbQFcjGsOVLkZaUXDCqkWpb+my8BhW4nHFP7xNhw5JF2aNyLXI4LgBIThDxLLvUo5b3a xdzw== X-Gm-Message-State: AFqh2kqgc6shhV6+j1XD17b7IyVGjfzyK7NRlD9XUMvZdJRp1ppWHMJI 7WFRolDIYoj9MfWxiZerb2ZP5Q== X-Google-Smtp-Source: AMrXdXtTQ9+sgIbSk8wXX3vXPckbt+VzsDfPOihT+jk7jJlvC570QkbESNR9klk6oAdjHdMjYNxq5w== X-Received: by 2002:a5d:6ac6:0:b0:29f:7c87:74ab with SMTP id u6-20020a5d6ac6000000b0029f7c8774abmr13410402wrw.10.1674280546663; Fri, 20 Jan 2023 21:55:46 -0800 (PST) Received: from smtpclient.apple (global-5-143.n-2.net.cam.ac.uk. [131.111.5.143]) by smtp.gmail.com with ESMTPSA id m13-20020adfe94d000000b002714b3d2348sm37424169wrn.25.2023.01.20.21.55.46 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Jan 2023 21:55:46 -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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: git: ffc58e2ca365 - main - asmc: Add MacbookAir6,2 From: Jessica Clarke In-Reply-To: <202301210443.30L4hnw4015211@gitrepo.freebsd.org> Date: Sat, 21 Jan 2023 05:55:45 +0000 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <202301210443.30L4hnw4015211@gitrepo.freebsd.org> To: Adrian Chadd X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Rspamd-Queue-Id: 4NzQZr3Wndz3Kc4 X-Spamd-Bar: ---- 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-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 21 Jan 2023, at 04:43, Adrian Chadd wrote: >=20 > The branch main has been updated by adrian: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Dffc58e2ca36546d866bb6bd36a3aa8f7= 62a01663 >=20 > commit ffc58e2ca36546d866bb6bd36a3aa8f762a01663 > Author: Adrian Chadd > AuthorDate: 2023-01-21 04:34:31 +0000 > Commit: Adrian Chadd > CommitDate: 2023-01-21 04:34:31 +0000 >=20 > asmc: Add MacbookAir6,2 >=20 > Add in the zones for my MacbookAir6,2, a 2013 Macbook Air. >=20 > Tested - said Macbook Air 2013. Thermal Zones and keyboard = backlight > control works fine. >=20 > Differential Revision: https://reviews.freebsd.org/D38073 > Approved by: jrtc27 Uh this is the first I=E2=80=99m hearing of this patch? Jess > --- > sys/dev/asmc/asmc.c | 9 +++++++-- > sys/dev/asmc/asmcvar.h | 25 +++++++++++++++++++++++++ > 2 files changed, 32 insertions(+), 2 deletions(-) >=20 > diff --git a/sys/dev/asmc/asmc.c b/sys/dev/asmc/asmc.c > index bec0054e2dd7..337f641e4513 100644 > --- a/sys/dev/asmc/asmc.c > +++ b/sys/dev/asmc/asmc.c > @@ -427,7 +427,13 @@ static const struct asmc_model asmc_models[] =3D = { > ASMC_LIGHT_FUNCS, > ASMC_MBA5_TEMPS, ASMC_MBA5_TEMPNAMES, ASMC_MBA5_TEMPDESCS > }, > - > + { > + "MacBookAir6,2", "Apple SMC MacBook Air 13-inch (Early 2013)", > + ASMC_SMS_FUNCS_DISABLED, > + ASMC_FAN_FUNCS2, > + ASMC_LIGHT_FUNCS, > + ASMC_MBA6_TEMPS, ASMC_MBA6_TEMPNAMES, ASMC_MBA6_TEMPDESCS > + }, > { > "MacBookAir7,1", "Apple SMC MacBook Air 11-inch (Early 2015)", > ASMC_SMS_FUNCS_DISABLED, > @@ -435,7 +441,6 @@ static const struct asmc_model asmc_models[] =3D { > ASMC_LIGHT_FUNCS, > ASMC_MBA7_TEMPS, ASMC_MBA7_TEMPNAMES, ASMC_MBA7_TEMPDESCS > }, > - > { > "MacBookAir7,2", "Apple SMC MacBook Air 13-inch (Early 2015)", > ASMC_SMS_FUNCS_DISABLED, > diff --git a/sys/dev/asmc/asmcvar.h b/sys/dev/asmc/asmcvar.h > index a594710f1cbe..9db544a1450d 100644 > --- a/sys/dev/asmc/asmcvar.h > +++ b/sys/dev/asmc/asmcvar.h > @@ -773,6 +773,31 @@ struct asmc_softc { > "Ta0P", "Heatpipe", "Mainboard = Proximity 1", "Mainboard Proximity 2", \ > "Palm Rest", "Memory Proximity" } >=20 > +/* > + * TODO: validate the temp zones for MBA 6.x ! > + */ > +#define ASMC_MBA6_TEMPS { "TB0T", "TB1T", "TB2T", \ > + "TC0E", "TC0F", "TC0P", \ > + "TC1C", "TC2C", "TCGC", "TCSA", \ > + "TCXC", "THSP", "TM0P", "TPCD", \ > + "Ta0P", "Th1H", "Tm0P", \ > + "Ts0P", "Ts0S", NULL } > + > +#define ASMC_MBA6_TEMPNAMES { "enclosure1", "enclosure2", = "enclosure3", \ > + "cputemp1", "cputemp2", = "cpuproximity", \ > + "cpucore1", "cpucore2", "cpupeci", = "pecisa", \ > + "TCXC", "THSP", "memorybank", = "pchdie", \ > + "Ta0P", "heatpipe", = "mainboardproximity1", \ > + "palmrest", "memoryproximity" } > + > +#define ASMC_MBA6_TEMPDESCS { "Enclosure Bottom 1", = "Enclosure Bottom 2", "Enclosure Bottom 3", \ > + "CPU Temp 1", "CPU Temp 2", "CPU = Proximity", \ > + "CPU Core 1", "CPU Core 2", "CPU Peci = Core", "PECI SA", \ > + "TCXC", "THSP", "Memory Bank A", "PCH = Die", \ > + "Ta0P", "Heatpipe", "Mainboard = Proximity 1", \ > + "Palm Rest", "Memory Proximity" } > + > + > #define ASMC_MBA7_TEMPS { "TB0T", "TB1T", "TB2T", \ > "TC0E", "TC0F", "TC0P", \ > "TC1C", "TC2C", \ From nobody Sat Jan 21 14:59:07 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Nzfdm0NCPz314Nr; Sat, 21 Jan 2023 14:59: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Nzfdl6zq8z4Dfx; Sat, 21 Jan 2023 14:59:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674313148; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kzewv1bhXM19iSEqLQ93tUMlMxX+FzAGsLvN/yzinxs=; b=Nb+rsUgO8qFEq9kvlIYAqdHjopvSnaF9hGdbeC6RhnDMC+N6OgqbyIP7N7+mY5gD53V9Xs ZyLYQ8i53MMBeilyjc9Gl7XJci7bZaDUZkC3VRmznTnxrmoXmnx36QFhVg4SJRdI4OBKxg NlbLCbaXxwNtK+yp+MX3D+qym1mz0qDDR3KzOV094DUpc/fZ07/SRAZYDV+nehQoUPN90X DjQR5QO3BrT2lbyaE9OUsbOmkkYNc4XWY4BW0eic3YK9/cpJxa5R6Ib92MVavRfdEuQqDy a29nkU+d3bGWlTqDxeu6sWOrXxV2ybyO6ytHWLkz/wkHSK+sRxQVYm7rW0nbwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674313148; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kzewv1bhXM19iSEqLQ93tUMlMxX+FzAGsLvN/yzinxs=; b=rJRZZNJ+I9UBkrfWNKpkUFX7aVwIUR83ZUREd11LJJy7zvQIz9J7IE3VPy8vEizLEubDT+ ho9agbrUbV1N0sz8vb7kHBZIRVJ2bNkofJrZg+rKIzIFQjwgKxrcF6bOB2q/OARHdmunyu V9QXPYcgMPLGLD1zdrJpLPwpm8WodtWR+jgKby2SSadU1YDC6Hd1HWaHjrwyg1awIAajCu U24ZkUtrPe7VJzR1rsbSceJWNDtnV0BcEd7CAoBbisGKlTaOuJhhPSiJZkVQ79UL+AzOZ6 iViOFrpi3h6qOdac+C7cmh1hjzvXdMGdNrq+hrpRolydsvO3SBIvudUgj3AOlQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674313148; a=rsa-sha256; cv=none; b=TbKCcmy3/NLe3WuhoDR71gkVskkob9mBpbQfCRBWHWrgFFUB9+4OsamcSSErfibUQhzJIH wd2KVnKnmhI2jP4XvlJU3afGbj1dE+aIYWsJSOaHcNk8KWgE91I2S+lHZTZlbxFbPBHCXx wLER7KbMvIg4MJfIzSvm2kLqzv5ph6u0ezuQEj7ufaPFAHDNSV2MJoKcYo9CllAQsYynwr AILPgDt7zNU/K63w5OokzKdirirvwzf5Cb5sqvtNUxWKVnC4cT8vTRZktw4j518QztN8MV qmvZs60pDKgbhsOG4ZPr/Sm/Yln57zXv3CSwGbfjbOcKSVorTrDqTAlGbA1EVw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Nzfdl5xQCz1Cv6; Sat, 21 Jan 2023 14:59:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30LEx7CS084457; Sat, 21 Jan 2023 14:59:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30LEx7Vo084456; Sat, 21 Jan 2023 14:59:07 GMT (envelope-from git) Date: Sat, 21 Jan 2023 14:59:07 GMT Message-Id: <202301211459.30LEx7Vo084456@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: 0079d177ab69 - main - netlink: allow creating sockets with SOCK_DGRAM. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 0079d177ab69168df5e103128a2b15bd8e74d4eb Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=0079d177ab69168df5e103128a2b15bd8e74d4eb commit 0079d177ab69168df5e103128a2b15bd8e74d4eb Author: Alexander V. Chernikov AuthorDate: 2023-01-21 14:36:23 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-01-21 14:58:19 +0000 netlink: allow creating sockets with SOCK_DGRAM. Some existing applications setup Netlink socket with SOCK_DGRAM instead of SOCK_RAW. Update the manpage to clarify that the default way of creating the socket should be with SOCK_RAW. Update the code to support both SOCK_RAW and SOCK_DGRAM. Reviewed By: pauamma Differential Revision: https://reviews.freebsd.org/D38075 --- share/man/man4/netlink.4 | 4 ++-- share/man/man4/rtnetlink.4 | 2 +- sys/netlink/netlink_domain.c | 44 +++++++++++++++++++++++---------------- tests/sys/netlink/Makefile | 1 + tests/sys/netlink/test_nl_core.py | 33 +++++++++++++++++++++++++++++ 5 files changed, 63 insertions(+), 21 deletions(-) diff --git a/share/man/man4/netlink.4 b/share/man/man4/netlink.4 index 2aa4903a4594..1894de5841fe 100644 --- a/share/man/man4/netlink.4 +++ b/share/man/man4/netlink.4 @@ -34,7 +34,7 @@ .In netlink/netlink.h .In netlink/netlink_route.h .Ft int -.Fn socket AF_NETLINK SOCK_DGRAM int family +.Fn socket AF_NETLINK SOCK_RAW "int family" .Sh DESCRIPTION Netlink is a user-kernel message-based communication protocol primarily used for network stack configuration. @@ -293,7 +293,7 @@ This is the default level, not impacting production performance. Socket events such as groups memberships, privilege checks, commands and dumps are logged. This level does not incur significant performance overhead. -.It Dv LOG_DEBUG9(9) +.It Dv LOG_DEBUG3(9) All socket events, each dumped or modified entities are logged. Turning it on may result in significant performance overhead. .El diff --git a/share/man/man4/rtnetlink.4 b/share/man/man4/rtnetlink.4 index dc40b277d934..5849508b74c2 100644 --- a/share/man/man4/rtnetlink.4 +++ b/share/man/man4/rtnetlink.4 @@ -34,7 +34,7 @@ .In netlink/netlink.h .In netlink/netlink_route.h .Ft int -.Fn socket AF_NETLINK SOCK_DGRAM NETLINK_ROUTE +.Fn socket AF_NETLINK SOCK_RAW NETLINK_ROUTE .Sh DESCRIPTION The .Dv NETLINK_ROUTE diff --git a/sys/netlink/netlink_domain.c b/sys/netlink/netlink_domain.c index f35cc7f09991..4d34fd381c39 100644 --- a/sys/netlink/netlink_domain.c +++ b/sys/netlink/netlink_domain.c @@ -698,31 +698,39 @@ nl_setsbopt(struct socket *so, struct sockopt *sopt) return (result ? 0 : ENOBUFS); } -static struct protosw netlinksw = { - .pr_type = SOCK_RAW, - .pr_flags = PR_ATOMIC | PR_ADDR | PR_WANTRCVD, - .pr_ctloutput = nl_ctloutput, - .pr_setsbopt = nl_setsbopt, - .pr_abort = nl_pru_abort, - .pr_attach = nl_pru_attach, - .pr_bind = nl_pru_bind, - .pr_connect = nl_pru_connect, - .pr_detach = nl_pru_detach, - .pr_disconnect = nl_pru_disconnect, - .pr_peeraddr = nl_pru_peeraddr, - .pr_send = nl_pru_send, - .pr_rcvd = nl_pru_rcvd, - .pr_shutdown = nl_pru_shutdown, - .pr_sockaddr = nl_pru_sockaddr, +#define NETLINK_PROTOSW \ + .pr_flags = PR_ATOMIC | PR_ADDR | PR_WANTRCVD, \ + .pr_ctloutput = nl_ctloutput, \ + .pr_setsbopt = nl_setsbopt, \ + .pr_abort = nl_pru_abort, \ + .pr_attach = nl_pru_attach, \ + .pr_bind = nl_pru_bind, \ + .pr_connect = nl_pru_connect, \ + .pr_detach = nl_pru_detach, \ + .pr_disconnect = nl_pru_disconnect, \ + .pr_peeraddr = nl_pru_peeraddr, \ + .pr_send = nl_pru_send, \ + .pr_rcvd = nl_pru_rcvd, \ + .pr_shutdown = nl_pru_shutdown, \ + .pr_sockaddr = nl_pru_sockaddr, \ .pr_close = nl_pru_close + +static struct protosw netlink_raw_sw = { + .pr_type = SOCK_RAW, + NETLINK_PROTOSW +}; + +static struct protosw netlink_dgram_sw = { + .pr_type = SOCK_DGRAM, + NETLINK_PROTOSW }; static struct domain netlinkdomain = { .dom_family = PF_NETLINK, .dom_name = "netlink", .dom_flags = DOMF_UNLOADABLE, - .dom_nprotosw = 1, - .dom_protosw = { &netlinksw }, + .dom_nprotosw = 2, + .dom_protosw = { &netlink_raw_sw, &netlink_dgram_sw }, }; DOMAIN_SET(netlink); diff --git a/tests/sys/netlink/Makefile b/tests/sys/netlink/Makefile index 87cee15c9d33..880e5e6e4007 100644 --- a/tests/sys/netlink/Makefile +++ b/tests/sys/netlink/Makefile @@ -6,6 +6,7 @@ WARNS?= 1 TESTSDIR= ${TESTSBASE}/sys/netlink ATF_TESTS_C += test_snl +ATF_TESTS_PYTEST += test_nl_core.py ATF_TESTS_PYTEST += test_rtnl_iface.py ATF_TESTS_PYTEST += test_rtnl_ifaddr.py diff --git a/tests/sys/netlink/test_nl_core.py b/tests/sys/netlink/test_nl_core.py new file mode 100644 index 000000000000..7af421a929dc --- /dev/null +++ b/tests/sys/netlink/test_nl_core.py @@ -0,0 +1,33 @@ +import errno +import socket + +import pytest +from atf_python.sys.net.netlink import NetlinkTestTemplate +from atf_python.sys.net.netlink import NlConst +from atf_python.sys.net.vnet import SingleVnetTestTemplate + + +class TestNlCore(NetlinkTestTemplate, SingleVnetTestTemplate): + @pytest.mark.parametrize( + "params", + [ + pytest.param({"type": socket.SOCK_RAW}, id="SOCK_RAW"), + pytest.param({"type": socket.SOCK_DGRAM}, id="SOCK_DGRAM"), + ], + ) + def test_socket_type(self, params): + s = socket.socket(NlConst.AF_NETLINK, params["type"], NlConst.NETLINK_ROUTE) + s.close() + + @pytest.mark.parametrize( + "params", + [ + pytest.param({"type": socket.SOCK_STREAM}, id="SOCK_STREAM"), + pytest.param({"type": socket.SOCK_RDM}, id="SOCK_RDM"), + pytest.param({"type": socket.SOCK_SEQPACKET}, id="SOCK_SEQPACKET"), + ], + ) + def test_socket_type_unsup(self, params): + with pytest.raises(OSError) as exc_info: + socket.socket(NlConst.AF_NETLINK, params["type"], NlConst.NETLINK_ROUTE) + assert exc_info.value.errno == errno.EPROTOTYPE From nobody Sat Jan 21 18:06:30 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Nzknz23M8z2spp7; Sat, 21 Jan 2023 18:06: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Nzknz1XgJz4T0r; Sat, 21 Jan 2023 18:06:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674324391; h=from:from:reply-to:subject:subject: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+mj1vOuOlzXtxBT4ELtG/LK4MtY1OMhvbDXOUeRFyU=; b=j9v0LcwiR3FEwuWjsHtRshIYsj9XF0LFX+tjdxFEmG3q7uifapCFuePopPMD100thTCjL4 QmbaiPoUsgVa7iB7uTwFs5+HWUGWfJtlDF6tPMOGRNjR6y82032z2CJdRyrlyQtFJylnSB z8D06kpKde+F9k9reJcOCCXTN/jDDtmLgRz1JfBuT948mFme34kLHCHKtDRFAUqEYnhkSR nX1G9Ln7u6NHj+NG1yMy+EfkDLA+JXCgiGv3+8sPcaQtTszKOIT3W3KvJ8UIUYoJ/QmC/b Ab3QJVI+3O8mYMgUkL2+Fw13nOiSVaMtDoRLAV3T2hpLEsxUAvDIj83I12SjCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674324391; h=from:from:reply-to:subject:subject: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+mj1vOuOlzXtxBT4ELtG/LK4MtY1OMhvbDXOUeRFyU=; b=ETnw5uyqNapITc+B3bhdZupk9n2Bv8atLpY+Nq1DyXfWoYMT7YRe2m43KUWcx89pKGqhSD XOyX0d9CiSu16FecD1AgEmySOGRPCCdJ0yy7sDjsNC4FSStVbEMa0VMizdOLNAIpCFPoqZ HDA5R+iHSk37DC+SPC0ZxIGVk0GkvVeYWXwTjMwQ/N8dAorgFRe1UQ45RMWD5lY8n7XtZz GLSgXdGK363anmufPh8xQDIemd48TN6n+zulO8fPZE5E+n8wABiij9OwoJyW6G3BVdwA4r /WVWjtC2tT1Nm+NYalmP12vScASpEbvg17U8lKq0LVrLFmNQCHup/WOm6Q4wRA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674324391; a=rsa-sha256; cv=none; b=G9vHfyFicLCyzxtRUHb541HZ5DJqYuYlmyGnYNoGVcJg1c/S7yh5cUOPKw0zwLdO3b1q0A iThm3r1Rq26nc3noGPDBoVeL+PxCA8CWJ803fk6Veb7PobiOrEjeDFV0VauwoPNlg6TCEf dZ7iazZ7VWRKgIwpVM4DNppzCP086w9/oPDFrEOG/AiigaqJC8vQJnWOtIjA/hPt73efGN GV2mDXVakvpvQ+sdeBLiup/VoKF8rGoiscBChzZAZzXhg3K/JWu5YHDF1QDaS9jd65UUpQ 6CXnDNae+tqZjTBxOFdxwm3WyKUUMrahxRNnqKUvXj+gYkueTZKpavgncmYC9A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Nzknz0bh8zKFP; Sat, 21 Jan 2023 18:06:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30LI6Uhc053722; Sat, 21 Jan 2023 18:06:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30LI6UYY053721; Sat, 21 Jan 2023 18:06:30 GMT (envelope-from git) Date: Sat, 21 Jan 2023 18:06:30 GMT Message-Id: <202301211806.30LI6UYY053721@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: 10f2a38769c7 - main - netlink: fix OOB write when creating attribute bitmask. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 10f2a38769c7b2fa210a3ea077d3185448479013 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=10f2a38769c7b2fa210a3ea077d3185448479013 commit 10f2a38769c7b2fa210a3ea077d3185448479013 Author: Alexander V. Chernikov AuthorDate: 2023-01-21 18:03:47 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-01-21 18:03:47 +0000 netlink: fix OOB write when creating attribute bitmask. Fix wrong arithmetics by moving to the standard bitset(9) functions. Reported by: markj, KASAN --- sys/netlink/netlink_message_parser.c | 16 +++++++++++++--- sys/netlink/netlink_message_parser.h | 16 ++++++---------- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/sys/netlink/netlink_message_parser.c b/sys/netlink/netlink_message_parser.c index 451d9d497491..dc0c38712613 100644 --- a/sys/netlink/netlink_message_parser.c +++ b/sys/netlink/netlink_message_parser.c @@ -152,17 +152,27 @@ nl_get_attrs_bmask_raw(struct nlattr *nla_head, int len, struct nlattr_bmask *bm { struct nlattr *nla = NULL; - bzero(bm->mask, sizeof(bm->mask)); + BIT_ZERO(NL_ATTR_BMASK_SIZE, bm); NLA_FOREACH(nla, nla_head, len) { if (nla->nla_len < sizeof(struct nlattr)) return; int nla_type = nla->nla_type & NLA_TYPE_MASK; - if (nla_type <= sizeof(bm->mask) * 8) - bm->mask[nla_type / 8] |= 1 << (nla_type % 8); + if (nla_type < NL_ATTR_BMASK_SIZE) + BIT_SET(NL_ATTR_BMASK_SIZE, nla_type, bm); + else + NL_LOG(LOG_DEBUG2, "Skipping type %d in the mask: too short", + nla_type); } } +bool +nl_has_attr(const struct nlattr_bmask *bm, unsigned int nla_type) +{ + MPASS(nla_type < NL_ATTR_BMASK_SIZE); + + return (BIT_ISSET(NL_ATTR_BMASK_SIZE, nla_type, bm)); +} int nlattr_get_flag(struct nlattr *nla, struct nl_pstate *npt, const void *arg, void *target) diff --git a/sys/netlink/netlink_message_parser.h b/sys/netlink/netlink_message_parser.h index 3f64c1967f09..94f0ca5260d7 100644 --- a/sys/netlink/netlink_message_parser.h +++ b/sys/netlink/netlink_message_parser.h @@ -29,6 +29,9 @@ #define _NETLINK_NETLINK_MESSAGE_PARSER_H_ #ifdef _KERNEL + +#include + /* * It is not meant to be included directly */ @@ -152,18 +155,11 @@ static const struct nlhdr_parser _name = { \ .np_size = NL_ARRAY_LEN(_np), \ } -struct nlattr_bmask { - uint64_t mask[2]; -}; - -static inline bool -nl_has_attr(const struct nlattr_bmask *bm, unsigned int attr_type) -{ - MPASS(attr_type < sizeof(bm->mask) * 8); +#define NL_ATTR_BMASK_SIZE 128 +BITSET_DEFINE(nlattr_bmask, NL_ATTR_BMASK_SIZE); - return ((bm->mask[attr_type / 8] & (1 << (attr_type % 8)))); -} void nl_get_attrs_bmask_raw(struct nlattr *nla_head, int len, struct nlattr_bmask *bm); +bool nl_has_attr(const struct nlattr_bmask *bm, unsigned int nla_type); int nl_parse_attrs_raw(struct nlattr *nla_head, int len, const struct nlattr_parser *ps, int pslen, struct nl_pstate *npt, void *target); From nobody Sat Jan 21 19:30:55 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NzmgM51HPz2t27V; Sat, 21 Jan 2023 19:30: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NzmgM4Wpxz4ch2; Sat, 21 Jan 2023 19:30:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674329455; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Gd1A2cKJqfOyfR7xtmMNJLOGCfK75RWAg8BYWzS5bBc=; b=jXok7vVrhj9Jo4hZQCD+IRF4r53/pMMWRlXHw/QFkYfM6Xk/C4OaPrwWawu7Oxhd6t9dyU 3A+zsOxOKPzK76Vyd+odjtCX6omJWFlklDXizsXY6G6y0GcxnLVdBmw2ye1rUFt7Dh9cal kKNPeP/DyZ7v8JWJoGtwe8uG3eCrq8ScvW0gDBv32Li7F7RPGNf/O0ocG3vPa/o9bY7v2m auRBTO2SfRu8w8cwkIO8+zpMhMI3HIFvN7iTcfldKgds8xDWLtW9uMFhRkN5Et1/uEnR8p UxQHa2J2rdDaS3HnFk9rIrk7M0W6TsdNNrldrcpq/paalVemaGCGuoERnYKlKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674329455; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Gd1A2cKJqfOyfR7xtmMNJLOGCfK75RWAg8BYWzS5bBc=; b=jLhRtwL3f0T81izGPSCOBb0IrMdC/fGbxdna2RXX+PieCiN6dcI1HVU7wke6S1PLvq8u87 Vc+OsNqzRO9LzcWEKReWaJMCWc+7BPiVH0QiSlSoSIUUweLdZMWtZ8ViJykLm91TjxjAVq 9Im78kJCRyUZCmRd2ooyvxy4b3t0A0fSfN4Dh+CuRpvOvrg13k1hNGl/+boo3IE49WPHOm ykPa2lw+CS8Ip8YQFssmTemEEXlvztZaAnNj2Hx3dvrk9SfKJnTqcaDEUuz6J9uA7yKQ1H z4cnpUf5uIKJLq0UApb6SSKNrENhj1NByk/fPVmzzV+Hefcq66ex8Hnre4ryeg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674329455; a=rsa-sha256; cv=none; b=rvdG94aSvilI+qz//MUxzxct0T3mA/dlvSXnby9y2TAWeLLGFIPXQIVhhumCB+p0liW46s ribUn/mwAkykRoj1FplzbY5qPomufzFtVMDmnEuwCCoLMk8ijZ7pCJ2r1LQKF/CZ1tSgj7 rs8UzIcZ7QJ3Oi24nQoZOnZzWrFcEFtwyJho46KEGZW8SWcN86qLaMWo+hhAgBT3ZdoCs5 aJ7bwgPr/mN5H+G/JNio5ohw3Ar6oK9O2Uttu7/XQ6Nlkx1i68IAZqmzCJ4DaG9uxApIXI yf6skx4XOEDY6s5Ovh7ZT3ZgxtWVjbaGSaWw+kjuiW76FnsSAZR60KEJSelI/w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NzmgM3Vf7zLYd; Sat, 21 Jan 2023 19:30:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30LJUtTu075618; Sat, 21 Jan 2023 19:30:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30LJUt1l075617; Sat, 21 Jan 2023 19:30:55 GMT (envelope-from git) Date: Sat, 21 Jan 2023 19:30:55 GMT Message-Id: <202301211930.30LJUt1l075617@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: 9cb6ba29cb70 - main - vm: centralize VM_BATCHQUEUE_SIZE definition List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 9cb6ba29cb704c180d5b82f409e280377a641a28 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gallatin: URL: https://cgit.FreeBSD.org/src/commit/?id=9cb6ba29cb704c180d5b82f409e280377a641a28 commit 9cb6ba29cb704c180d5b82f409e280377a641a28 Author: Andrew Gallatin AuthorDate: 2023-01-21 19:26:25 +0000 Commit: Andrew Gallatin CommitDate: 2023-01-21 19:30:00 +0000 vm: centralize VM_BATCHQUEUE_SIZE definition Remove the platform-specific definitions of VM_BATCHQUEUE_SIZE for amd64 and powerpc64, and instead treat all 64-bit platforms identically. This has the effect of increasing the arm64 and riscv VM_BATCHQUEUE_SIZE to match that of other platforms. Reviewed by: jhb, markj Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D37707 --- sys/amd64/include/vmparam.h | 6 ------ sys/powerpc/include/vmparam.h | 8 -------- sys/vm/vm_pagequeue.h | 4 +++- 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/sys/amd64/include/vmparam.h b/sys/amd64/include/vmparam.h index 205848489644..880c46bba84d 100644 --- a/sys/amd64/include/vmparam.h +++ b/sys/amd64/include/vmparam.h @@ -289,12 +289,6 @@ #define ZERO_REGION_SIZE (2 * 1024 * 1024) /* 2MB */ -/* - * Use a fairly large batch size since we expect amd64 systems to have lots of - * memory. - */ -#define VM_BATCHQUEUE_SIZE 63 - /* * The pmap can create non-transparent large page mappings. */ diff --git a/sys/powerpc/include/vmparam.h b/sys/powerpc/include/vmparam.h index 1b9873aede4a..0f3321379b47 100644 --- a/sys/powerpc/include/vmparam.h +++ b/sys/powerpc/include/vmparam.h @@ -258,14 +258,6 @@ extern int vm_level_0_order; #define ZERO_REGION_SIZE (64 * 1024) /* 64KB */ #endif -/* - * Use a fairly large batch size since we expect ppc64 systems to have lots of - * memory. - */ -#ifdef __powerpc64__ -#define VM_BATCHQUEUE_SIZE 63 -#endif - /* * On 32-bit OEA, the only purpose for which sf_buf is used is to implement * an opaque pointer required by the machine-independent parts of the kernel. diff --git a/sys/vm/vm_pagequeue.h b/sys/vm/vm_pagequeue.h index 268d53a391db..9624d31a75b7 100644 --- a/sys/vm/vm_pagequeue.h +++ b/sys/vm/vm_pagequeue.h @@ -74,7 +74,9 @@ struct vm_pagequeue { uint64_t pq_pdpages; } __aligned(CACHE_LINE_SIZE); -#ifndef VM_BATCHQUEUE_SIZE +#if __SIZEOF_LONG__ == 8 +#define VM_BATCHQUEUE_SIZE 63 +#else #define VM_BATCHQUEUE_SIZE 15 #endif