From nobody Mon Mar 25 14:58:41 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V3GKF32hGz5F5sT; Mon, 25 Mar 2024 14:58: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 4V3GKF2GGKz4MGX; Mon, 25 Mar 2024 14:58:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711378721; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QWwAC/IXieTAym6x3hylPmL6QtIOHq9sWuzTSYJryC4=; b=PF/VOorKAm93OszW86qKhoQ7Y5B2M8wteBPjl3eP0PzL+Wsfv5MY1gNVCOCX351Hmkox2F Yjh9tIgNB0xqWCrh7tIO7sf+p34nobltU5TLLmXktC0ROs1aUv+d94R3CwlCERyNIY8jDT MFVIqsdzYGUR/CustzFfVQWpa/sbCsY0VueUzzU/+DHAeH4H4oe7tgTyqclzGcGnElK8QA 3xztW6MRyGxRUddCHhmx+0HVS0IluFPEFcy/jSPdcZ7eMCaSDb53XfdL5eh8CszgvFHtM5 d7mSvtjjRaNCiKrCVIeXZRKcE9EdFozb6z9eofP8AyQUobwXzImnIsoIGMuDTA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711378721; a=rsa-sha256; cv=none; b=O4HDTN48kmH/OxDO4BU5JOXgedcJ2nfmd+SXVQkmC19HEMcUqsFwaXUzGUHrg5xFl5zhpV ssHns0rYOkGm5CdLalVxAMxn5S0S162AuPjiigDzUEWZbEt7iYhWctl615d5lvVqcbcmvk 3LW8xKYlZy5PAZqbEWrhHx2uVnxcHNxr39KMaPJctd1MFczrCfMkmQTvRPMll+fRA5SkUZ RAy98+0PLnNGiPwELxJid2ovCJ0F1MWmSUVXQXyqdrIQxLfs92sy+xz8LBXb1FrjxPt4R1 +vtj0CU+oRTRJ5i42b98SV0X6M3IDM7oO5BmKNBk5wqzdgfY2Pi1Kf2dR9Knmg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711378721; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QWwAC/IXieTAym6x3hylPmL6QtIOHq9sWuzTSYJryC4=; b=UMdBoFRpKoB8fs5pd2awvXnSTSqNhG2pHF7B8EmtnVNozEKJ1FYGMuZNcF4y7F1QP7OoBt vcCSnFlQ1C9TsrB3aSU3WsyPh55arNgp49KM8Mt4wCKfs3Fd860pZRvHukT9pL0RdKtlL3 lh69IelE9J3KnESaPcB5aklqkatFWDdko3pV8n/BXsetGSh3vXwofGmFj4VkXVx3GDfnX7 FxkJz9LVqilOoCaP0ByxKbHXKS1S0k0FNTuNhBuBcg0ZIVgFFJuOBPdgoyLcpuEOR+DvQG Zk+l/ReAAvPgcDW1RAsiEiL4s+WWNRKBdSMboC2zcmUYrwN0SSGmcHx42o1Mbw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V3GKF1nXLzLJM; Mon, 25 Mar 2024 14:58:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42PEwfaa080829; Mon, 25 Mar 2024 14:58:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42PEwf9j080827; Mon, 25 Mar 2024 14:58:41 GMT (envelope-from git) Date: Mon, 25 Mar 2024 14:58:41 GMT Message-Id: <202403251458.42PEwf9j080827@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 8dd42c55ecb5 - stable/14 - tcp_rack.4: Update the SEE ALSO section List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8dd42c55ecb52b752d410a0eee29ea6eef3e5894 Auto-Submitted: auto-generated The branch stable/14 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=8dd42c55ecb52b752d410a0eee29ea6eef3e5894 commit 8dd42c55ecb52b752d410a0eee29ea6eef3e5894 Author: Gordon Bergling AuthorDate: 2024-03-18 18:25:11 +0000 Commit: Gordon Bergling CommitDate: 2024-03-25 14:58:22 +0000 tcp_rack.4: Update the SEE ALSO section Correct the surname of one of authors of RFC 8985 and add RFC 5681 and RFC 6937 (PRR: Proportional Rate Reduction for TCP). Reviewed by: tuexen Differential Revision: https://reviews.freebsd.org/D44399 (cherry picked from commit e29be07861173f87b2dd46db1d0c7cbcf72d4ad0) --- share/man/man4/tcp_rack.4 | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/share/man/man4/tcp_rack.4 b/share/man/man4/tcp_rack.4 index 2ebffca08e26..73995d930a9a 100644 --- a/share/man/man4/tcp_rack.4 +++ b/share/man/man4/tcp_rack.4 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd March 5, 2024 +.Dd March 18, 2024 .Dt TCP_RACK 4 .Os .Sh NAME @@ -124,12 +124,28 @@ What method should we use for rate sampling 0=high, 1=low .Rs .%A "Neal Cardwell" .%A "Yuchung Cheng" -.%A "Nandita Dukkipat" +.%A "Nandita Dukkipati" .%A "Priyaranjan Jha" .%T "The RACK-TLP Loss Detection Algorithm for TCP" .%O "RFC 8985" .%D "February 2021" .Re +.Rs +.%A "M. Allman" +.%A "V. Paxson" +.%A "E. Blanton" +.%T "TCP Congestion Control" +.%O "RFC 5681" +.%D "September 2009" +.Re +.Rs +.%A "M. Mathis" +.%A "Nandita Dukkipati" +.%A "Yuchung Cheng" +.%T "Proportional Rate Reduction for TCP" +.%O "RFC 6937" +.%D "May 2013" +.Re .Sh HISTORY The .Nm From nobody Mon Mar 25 14:58:59 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V3GKb28hXz5F5vZ; Mon, 25 Mar 2024 14:58:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4V3GKb1HTLz4Mbh; Mon, 25 Mar 2024 14:58:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711378739; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1Cj4hY8ya4LMeGOSd8u/tmN/ixQHdRj6k3UW2FbHfjQ=; b=UXlyoOJwLHJmGdX/PvxuQRYCn0qNbui9bthpIyiRK2IIvA9Aa959wGm49VDWT7+Tezaofn ItM2w2kYjztfOYaMR55znNsgf+3L5vaYJWiFq4lHk6Vn0rB46XBvf/QcgYW1ASgtszV7JH Tonx2rpFH6XHDagDpOuyZ5RKCsAiIbcVti8nH1Lf/XilSMTErHPfoITplbW8Zc9h15Zx0U 0VjVBTXRwlMCr5AyBlnqy0MVSthH27pvykR/e79Wjxyty6HvuKU8r5PxFetRhbQ9Oi9xZm Nr92tLBfXAYZF0HA78PRgyImOSANvGkeKysfsrmqTeyA9JA3B9PMgL6X26YmLA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711378739; a=rsa-sha256; cv=none; b=hNzz3D2N9H55umHJr77PnkuIARKDmvO3W/qotMGB26VpREYPJ4YTltebCSGDg6aP/3Dufm NaqTePdl8xpRx7GYJy8nS1fuVvnsQkoDE8qr4uR7LpqCfAzJP8Nnx0GY0DMZj7beU2ZEsO HEZd4oR/ZlgnVsIcQp4mZrVuOZxfgORXLbpqz/ErNrue/7aQQkntaQ6J8CmrrDAy3lbLxu 0ZpZYAdHwpC0ThTvfCxepH2LbfY4Uq6r1BvPzwOeau76axQPnlilL5q+50beWnr14E6k9n ldJcNtKCKwYpYhhsG90K5Y184IxoMtpJLBYdc+QokvB83SXgS0a3xfLZ62GA0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711378739; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1Cj4hY8ya4LMeGOSd8u/tmN/ixQHdRj6k3UW2FbHfjQ=; b=iIcjzG+Z3pwJjRDZEoxt06Xt/jfEeq8dvG0wmBDBbNDITtMjVI5NxmqkFdV1s8Y+lXTmAa OrGMFMZnXD6wqlK2YQsjEFPRcjjCPriL5Kc0BNbGomKT+n1pavSIkH9KuPgntqqXoemIlJ etGQvlkbg+OTXafeEMbQOA/GUEWleAqCG5atSG/sN1O2UZn+7FGD7mDDG7Dd/SUZoqHJen 3HDC4QUJOD4C6UajE7N+1BMjZh2iA9eYXYGoKshL1evHn3C7a2I6oSF1VEY74g7MCD7QWx aeWWxXy6BHVn5sh74/bt/dD1ufNgnW52Lx+Hb91+ebozduf7x0mtjkHWeGMiNg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V3GKb0tfNzLVc; Mon, 25 Mar 2024 14:58:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42PEwxiY080995; Mon, 25 Mar 2024 14:58:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42PEwxBd080992; Mon, 25 Mar 2024 14:58:59 GMT (envelope-from git) Date: Mon, 25 Mar 2024 14:58:59 GMT Message-Id: <202403251458.42PEwxBd080992@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 3b5a0cbf6ab8 - stable/13 - tcp_rack.4: Update the SEE ALSO section List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3b5a0cbf6ab8ee267610396776c48adceb306ece Auto-Submitted: auto-generated The branch stable/13 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=3b5a0cbf6ab8ee267610396776c48adceb306ece commit 3b5a0cbf6ab8ee267610396776c48adceb306ece Author: Gordon Bergling AuthorDate: 2024-03-18 18:25:11 +0000 Commit: Gordon Bergling CommitDate: 2024-03-25 14:58:49 +0000 tcp_rack.4: Update the SEE ALSO section Correct the surname of one of authors of RFC 8985 and add RFC 5681 and RFC 6937 (PRR: Proportional Rate Reduction for TCP). Reviewed by: tuexen Differential Revision: https://reviews.freebsd.org/D44399 (cherry picked from commit e29be07861173f87b2dd46db1d0c7cbcf72d4ad0) --- share/man/man4/tcp_rack.4 | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/share/man/man4/tcp_rack.4 b/share/man/man4/tcp_rack.4 index 496b7d9cc496..8243f7c8b036 100644 --- a/share/man/man4/tcp_rack.4 +++ b/share/man/man4/tcp_rack.4 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd March 5, 2024 +.Dd March 18, 2024 .Dt TCP_RACK 4 .Os .Sh NAME @@ -130,12 +130,28 @@ What method should we use for rate sampling 0=high, 1=low .Rs .%A "Neal Cardwell" .%A "Yuchung Cheng" -.%A "Nandita Dukkipat" +.%A "Nandita Dukkipati" .%A "Priyaranjan Jha" .%T "The RACK-TLP Loss Detection Algorithm for TCP" .%O "RFC 8985" .%D "February 2021" .Re +.Rs +.%A "M. Allman" +.%A "V. Paxson" +.%A "E. Blanton" +.%T "TCP Congestion Control" +.%O "RFC 5681" +.%D "September 2009" +.Re +.Rs +.%A "M. Mathis" +.%A "Nandita Dukkipati" +.%A "Yuchung Cheng" +.%T "Proportional Rate Reduction for TCP" +.%O "RFC 6937" +.%D "May 2013" +.Re .Sh HISTORY The .Nm From nobody Mon Mar 25 22:27:30 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V3SH64yNwz5FRQR; Mon, 25 Mar 2024 22:27:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4V3SH64S88z49ph; Mon, 25 Mar 2024 22:27:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711405650; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W0sSloBhYCOlMmChykv00b9iby6EQtpfvmwiY8UEeZQ=; b=X+4ofTOXUF2iVUdEV/vUV+kHBgll+UH1cWhm6JipJusq1eHTe5rwwRqngd6gYRs3gB75bD GJMhcoOyEWCqDRVpWbN+0aCPzTZhvFxf499dwG6ckb2VFSLn3QtBqybnGDOesi23RuqxAd CnQ8Et129zeIK8cJj1BEMxGKByFW/gZUhoY7cAR8YRxZ1sapLE7eZ9iN/1Z22hrDAnagmx kXEXRZ83DaOu0tKvykbsWGzmve2gArhS4UWs8yAgWZOx784bSYJxHOUzYSU1KzGyFPtEi+ hX36PPqgg8lxo6e6KlAMNLiLT7FhGnUmXx9JsF0rpiHRLh2N19iF3t50ikZXLg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711405650; a=rsa-sha256; cv=none; b=NZBWTxuKeHbetSzIPOsW1Zo2Hr8moQ7KANMll1rvavWUHvsljJMVnDDeBYvnhnEZpDI3J7 UTc+0xiUwLt3y8rdkghk9u/cYjzoOtaQdtm40y6cQmWEJbpLOkksCI9bh7QZzBqz2f1RFy xC7VAkaPNqk++Zt+8WzENRR1vbIJiXob7q81Q8SrbnyJl9jprL1MwcBR16P5fyqUVCzvNt Q8dKQe/dnYo/iN4FU/Z3oBF6NoFhvb+1fN88jaDL4jsLSsvHK0qcPKAN+lnh2rEvq91a4B vi0K20gp9CBYpsnis65l/cll8pfY5utOfu7odu87ukaxK8fZLzt6tBTpA2iA7w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711405650; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W0sSloBhYCOlMmChykv00b9iby6EQtpfvmwiY8UEeZQ=; b=pJqqkCudKT4URxJLvDKjIuWn19CaWI++b3Y0qncm7ppBA8BPytSxFLB4rXN1FR4TLT4sYr IVASWk2Zs0eYHmRumEo+oAQpD49kjQkcQD6tAuf4WICt32oklKYXqR3ymWoq46fZ4P84nj 5a9FDrLmk2r0yy/VFxL2GvXXKVBlQ6BT524thutVFoN6fXlsM7r+OnKaHFMkLpY1j9iizw QXOw3DWjqDWI3v0ZppKGWaC18hMkTM+oJbi2jVBx77I92E/7vx/csZc9SKpMfTVrOr03nv 23urSJAKXIBcL3bVSOfYic+MB46tJUQdqwHl2IhMfMSqitbcPiqQz044jkuWLg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V3SH643XFzYtr; Mon, 25 Mar 2024 22:27:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42PMRUWj043326; Mon, 25 Mar 2024 22:27:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42PMRU4D043323; Mon, 25 Mar 2024 22:27:30 GMT (envelope-from git) Date: Mon, 25 Mar 2024 22:27:30 GMT Message-Id: <202403252227.42PMRU4D043323@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 49e126a03b6b - stable/14 - ctfmerge: demote "No ctf sections found" to a warning List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 49e126a03b6bebb17855fd830b2206c86f5eaa9a Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=49e126a03b6bebb17855fd830b2206c86f5eaa9a commit 49e126a03b6bebb17855fd830b2206c86f5eaa9a Author: Ed Maste AuthorDate: 2024-02-14 14:48:42 +0000 Commit: Ed Maste CommitDate: 2024-03-25 22:27:08 +0000 ctfmerge: demote "No ctf sections found" to a warning If there are no CTF sections then ctfmerge just has nothing to do; it should not be an error. Note that ctfmerge has an option to require CTF: -t Make sure that all object files have a CTF section. Before this change, this option explicitly exited without error if none of the object files have CTF sections, with the comment: If we're verifying that C files have CTF, it's safe to assume that in this case, we're building only from assembly inputs. PR: 276930 Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D43878 (cherry picked from commit 95ca89cda1a6c4e0ef0b3f765c6563f1db0d23fa) --- cddl/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/cddl/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c b/cddl/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c index 27aa4d01b03d..c5be22ecfa1b 100644 --- a/cddl/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c +++ b/cddl/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c @@ -912,14 +912,8 @@ main(int argc, char **argv) */ if (read_ctf(ifiles, nifiles, NULL, merge_ctf_cb, &wq, require_ctf) == 0) { - /* - * If we're verifying that C files have CTF, it's safe to - * assume that in this case, we're building only from assembly - * inputs. - */ - if (require_ctf) - exit(0); - terminate("No ctf sections found to merge\n"); + warning("No ctf sections found to merge\n"); + exit(0); } pthread_mutex_lock(&wq.wq_queue_lock); From nobody Mon Mar 25 22:28:54 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V3SJl13nTz5FRWf; Mon, 25 Mar 2024 22:28: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 4V3SJl0VbZz4Bdf; Mon, 25 Mar 2024 22:28:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711405735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u3q9q0YSWkrScazbKEzeron80YEjBYrx7W36kS3KREg=; b=EbVZ/TeT5z/jBDa17gQSgNKrk6OSevHK20Wx5BH4KLKX+VS6kyhuIvosbQX1WXzbaVQhIZ PlctbYNG1veh8uayQ1NodbMwsCe/bCCAB4DEO1oqIKsEeF9fEgHuwESq5etx7JNHB71do+ /nbXh2fgjFh2zUo+TJ386j5VTuOfVYL9l9zXLEXBTS7RxTPlwNWoX4JmWYXWY58BhlOA5E aaK/oOUyl8kEcJg4eUpTP62s7oTh8kmhBxWYYfyBm+LL+Ag3YUS7sFOp1eOfzS/ZF4AAJC LCEkkvdxhkjglA6eakj4UTCT+44Mx0f8eIvQRHrtWUMdZBoZGHtNud51IEpo7w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711405735; a=rsa-sha256; cv=none; b=emky7g1+DHdYR6JOX9pnPpac1kXpkk/UyuiJDJZKFc7ZyEBuVZX5OGv5NFd8ly8NpM3fIn Qgfw6HAA+I9pmXTWTADBVOwXWQueFTa+r/wH41zxfafjPNHR4+1ZH/9aHUaUqT0XFDtTuL QYHwtb66t6UJtctl+irG/i+F5/fZgr4ptiooURBB29Mdy3eme/D7sj2fpH++ZWsEKYPzYG cU4PftjNy8fM8hIesG9ReAda3YNXTauLCtdKuan7RNwi1j4p/fNTzDdJ/OqMVsXDd0IT8P fQvzV0T2f6YCbuzVkCmuCOEIzAfX71yq0WEE3brhBkdSpxV3+77I9JB2OkAnlg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711405735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u3q9q0YSWkrScazbKEzeron80YEjBYrx7W36kS3KREg=; b=RWwKHY6eGsdOC1+OtmqKDfBeBoVHhK7Ji9c6vXKEI1S5dnOljlFx/kvI5OzSpjVl9XzfFW mxxKdc5yijLgK5WRBHXaBjMDUKqQXz6yD4pJLTM+vsJftCZpRNEY5jJFyTTEShH31Xd+BF N1v95zQdTyvS7aiGsRc+0cLfPQWORXQe6SWLeKgoYWvHPYeZJcImSU3jZ3JEtLyAL6Nul7 acI7uyNMDHcVS3sqgZikqc4hcP5aR7VKD5AOWLjx4pwBM64pqe12PfZ46WzuclRHzyEuVT U6JOC6RxnGhGGHOdAP71AiN9wPTd/y52w/grTQr5htaVuSH6wWg54QLWPuK3pA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V3SJl01t9zZtw; Mon, 25 Mar 2024 22:28:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42PMSsc5043666; Mon, 25 Mar 2024 22:28:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42PMSsd5043663; Mon, 25 Mar 2024 22:28:54 GMT (envelope-from git) Date: Mon, 25 Mar 2024 22:28:54 GMT Message-Id: <202403252228.42PMSsd5043663@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 602ea0ced129 - stable/14 - sound: Fix OSS API requests for more than 8 channels List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 602ea0ced129b89c972b6ce6fe5242d0a379c33b Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=602ea0ced129b89c972b6ce6fe5242d0a379c33b commit 602ea0ced129b89c972b6ce6fe5242d0a379c33b Author: Florian Walpen AuthorDate: 2023-11-25 00:04:34 +0000 Commit: Ed Maste CommitDate: 2024-03-25 22:28:30 +0000 sound: Fix OSS API requests for more than 8 channels Audio devices with more than 8 channels need bitperfect mode to operate, the vchan processing chain is limited to 8 channels. For these devices, let applications properly select a certain number of channels supported by the driver, instead of mapping the request to a vchan format. Reviewed by: emaste Pull Request: https://github.com/freebsd/freebsd-src/pull/914 (cherry picked from commit 61c831679615d2a03a494bd7f3627fb945f2795c) --- sys/dev/sound/pcm/dsp.c | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index 5aa7979b98c9..9040c77893d4 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -1502,24 +1502,31 @@ dsp_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, case SOUND_PCM_WRITE_CHANNELS: /* case SNDCTL_DSP_CHANNELS: ( == SOUND_PCM_WRITE_CHANNELS) */ - if (*arg_i < 0) { + if (*arg_i < 0 || *arg_i > AFMT_CHANNEL_MAX) { *arg_i = 0; ret = EINVAL; break; } if (*arg_i != 0) { - struct pcmchan_matrix *m; - uint32_t ext; + uint32_t ext = 0; tmp = 0; - if (*arg_i > SND_CHN_MAX) - *arg_i = SND_CHN_MAX; + /* + * Map channel number to surround sound formats. + * Devices that need bitperfect mode to operate + * (e.g. more than SND_CHN_MAX channels) are not + * subject to any mapping. + */ + if (!(dsp_get_flags(i_dev) & SD_F_BITPERFECT)) { + struct pcmchan_matrix *m; - m = feeder_matrix_default_channel_map(*arg_i); - if (m != NULL) - ext = m->ext; - else - ext = 0; + if (*arg_i > SND_CHN_MAX) + *arg_i = SND_CHN_MAX; + + m = feeder_matrix_default_channel_map(*arg_i); + if (m != NULL) + ext = m->ext; + } PCM_ACQUIRE_QUICK(d); if (wrch) { From nobody Mon Mar 25 22:28:56 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V3SJm3F6Mz5FRfD; Mon, 25 Mar 2024 22:28: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 4V3SJm2ddMz49ty; Mon, 25 Mar 2024 22:28:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711405736; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b05uBCDZNzgBtuzJjWOb/0D6dqTlQN9cnBGZDBz+InY=; b=qflUNQ+ZopXdsX//qDUf+c1023eZB9izKbOzGxm68Z0ndjLwL9jwnsNIPSPtoOUY87dUR1 geKdCnM/kDNnRmGhqeGIrMBaGO4YOTObL2+c7HCAx+PvAvjBeuhbQi3OtvRgIqz/GjreDD 1yYBaGI8EHEx+tYFXqmLLHSPb3iPc5FhjlcV4KSx2HmVKbglJFu/CArzKEWw5Ju1ziwdye z9HmZcY2LxDvLkuayU7ZxZUS4ZcaJRBRSGMY3NqqZ6UMSXWRKu4SnKYZF6P0DFFtbUvivk fUk/kFUIHqSK192KVhx2upYBzjqGoyVB2JwQY970BSy8mlUdnqhKX+XyjCD5Fg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711405736; a=rsa-sha256; cv=none; b=wXl3+tiJlfqto9AslR+ixphDXW1W4ku2bLwnDcljr/e6JF5Ms0Fg75cIstgjYmvEYa40PD 65wK3OJZMwHQMgkKXVVoo+hV0M9IyyUfioc3F1hhqxPexg8UX0UnzyeewGryYRa916gKk8 zNyxGFII/c9v9tsb/34GEu1FlgExMtia/wWlMsqLPHXmbsfu37tegRWyUcc6U2CLvFl4br r64RH+KJfWS2z1bb0LZhjCrbYxQKAYsfxVk1/lcEEXZpWydcgTsMN9QFGQ7KYgOVT8tSR4 8LJKd9uDc6h3+ju8Eil1rIaPtoASgLVY5xTIfxzD31oMCAyZTuEJp2XHceK3MA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711405736; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b05uBCDZNzgBtuzJjWOb/0D6dqTlQN9cnBGZDBz+InY=; b=BCPU08ppQsgdeu88rhIFg/4H/oJP/vVfQ7elbjzPoD+owkHzVventzSEHEVxemCrRjEjMf V6pP8jImwKuAwFwyidNlRIf1FFfCOr9qIDwlRzXL9eKjsi1TmbaHFhoq0UPHjlc5yTKECj 724pvVu4GIiAzvCSzKMlEI+7qR5ZgAZZwLMaKO8izVODCGNOeFix7xpftFvA3ocE+z7Bih 1b9Wsyc3ZJXNi9oxw8HghjEkKcc3zK4wpFqychrmkxQOnLgEjB+fc7ofZugiHuWEXhUply 73KfVGgvH/HXDBh5LmwizgMmvkPx/6ZK6bmOPWpU1Hp4bMCyHVoaQHPdJ3dt8Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V3SJm1P0jzZYm; Mon, 25 Mar 2024 22:28:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42PMSulW043720; Mon, 25 Mar 2024 22:28:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42PMSuDI043717; Mon, 25 Mar 2024 22:28:56 GMT (envelope-from git) Date: Mon, 25 Mar 2024 22:28:56 GMT Message-Id: <202403252228.42PMSuDI043717@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 3f8927179476 - stable/14 - blacklistd: Handle fds that are pointing to routing sockets List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3f89271794763da1200ee4182b5fe030570f72ba Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=3f89271794763da1200ee4182b5fe030570f72ba commit 3f89271794763da1200ee4182b5fe030570f72ba Author: Jose Luis Duran AuthorDate: 2022-10-12 16:14:44 +0000 Commit: Ed Maste CommitDate: 2024-03-25 22:28:30 +0000 blacklistd: Handle fds that are pointing to routing sockets If the fd has access to make changes via the routing socket, grant full permission to make filter changes. Obtained from: https://github.com/zoulasc/blocklist/commit/1b9475b2c8e0be2b9adc4d88e521ed488ac3c43c (cherry picked from commit b73612a34259a478c53eab408362d7bf879fefa6) --- contrib/blocklist/bin/conf.c | 113 ++++++++++++++++++++++++++++++++++++------- 1 file changed, 95 insertions(+), 18 deletions(-) diff --git a/contrib/blocklist/bin/conf.c b/contrib/blocklist/bin/conf.c index 6eadf6b2ac8c..8f7e75a56be1 100644 --- a/contrib/blocklist/bin/conf.c +++ b/contrib/blocklist/bin/conf.c @@ -46,6 +46,7 @@ __RCSID("$NetBSD: conf.c,v 1.24 2016/04/04 15:52:56 christos Exp $"); #include #include #include +#include #include #include #include @@ -55,6 +56,7 @@ __RCSID("$NetBSD: conf.c,v 1.24 2016/04/04 15:52:56 christos Exp $"); #include #include #include +#include #include #include "bl.h" @@ -1000,32 +1002,72 @@ confset_match(const struct confset *cs, struct conf *c, return i; } -const struct conf * -conf_find(int fd, uid_t uid, const struct sockaddr_storage *rss, - struct conf *cr) +#ifdef AF_ROUTE +static int +conf_route_perm(int fd) { +#if defined(RTM_IFANNOUNCE) && defined(SA_SIZE) + /* + * Send a routing message that is not supported to check for access + * We expect EOPNOTSUPP for having access, since we are sending a + * request the system does not understand and EACCES if we don't have + * access. + */ + static struct sockaddr_in sin = { +#ifdef HAVE_STRUCT_SOCKADDR_SA_LEN + .sin_len = sizeof(sin), +#endif + .sin_family = AF_INET, + }; + char buf[4096]; + struct rt_msghdr *rtm = (void *)buf; + char *cp = (char *)(rtm + 1); + size_t l; + +#define NEXTADDR(s) \ + l = SA_SIZE(sizeof(*s)); memmove(cp, s, l); cp += l; + memset(buf, 0, sizeof(buf)); + rtm->rtm_type = RTM_IFANNOUNCE; + rtm->rtm_flags = 0; + rtm->rtm_addrs = RTA_DST|RTA_GATEWAY; + rtm->rtm_version = RTM_VERSION; + rtm->rtm_seq = 666; + NEXTADDR(&sin); + NEXTADDR(&sin); + rtm->rtm_msglen = (u_short)((char *)cp - (char *)rtm); + if (write(fd, rtm, rtm->rtm_msglen) != -1) { + (*lfun)(LOG_ERR, "Writing to routing socket succeeded!"); + return 0; + } + switch (errno) { + case EACCES: + return 0; + case EOPNOTSUPP: + return 1; + default: + (*lfun)(LOG_ERR, + "Unexpected error writing to routing socket (%m)"); + return 0; + } +#else + return 0; +#endif +} +#endif + +static int +conf_handle_inet(int fd, const void *lss, struct conf *cr) { - int proto; - socklen_t slen; - struct sockaddr_storage lss; - size_t i; char buf[BUFSIZ]; + int proto; + socklen_t slen = sizeof(proto); - memset(cr, 0, sizeof(*cr)); - slen = sizeof(lss); - memset(&lss, 0, slen); - if (getsockname(fd, (void *)&lss, &slen) == -1) { - (*lfun)(LOG_ERR, "getsockname failed (%m)"); - return NULL; - } - - slen = sizeof(proto); if (getsockopt(fd, SOL_SOCKET, SO_TYPE, &proto, &slen) == -1) { (*lfun)(LOG_ERR, "getsockopt failed (%m)"); - return NULL; + return -1; } if (debug) { - sockaddr_snprintf(buf, sizeof(buf), "%a:%p", (void *)&lss); + sockaddr_snprintf(buf, sizeof(buf), "%a:%p", lss); (*lfun)(LOG_DEBUG, "listening socket: %s", buf); } @@ -1038,16 +1080,51 @@ conf_find(int fd, uid_t uid, const struct sockaddr_storage *rss, break; default: (*lfun)(LOG_ERR, "unsupported protocol %d", proto); + return -1; + } + return 0; +} + +const struct conf * +conf_find(int fd, uid_t uid, const struct sockaddr_storage *rss, + struct conf *cr) +{ + socklen_t slen; + struct sockaddr_storage lss; + size_t i; + char buf[BUFSIZ]; + + memset(cr, 0, sizeof(*cr)); + slen = sizeof(lss); + memset(&lss, 0, slen); + if (getsockname(fd, (void *)&lss, &slen) == -1) { + (*lfun)(LOG_ERR, "getsockname failed (%m)"); return NULL; } switch (lss.ss_family) { case AF_INET: cr->c_port = ntohs(((struct sockaddr_in *)&lss)->sin_port); + if (conf_handle_inet(fd, &lss, cr) == -1) + return NULL; break; case AF_INET6: cr->c_port = ntohs(((struct sockaddr_in6 *)&lss)->sin6_port); + if (conf_handle_inet(fd, &lss, cr) == -1) + return NULL; break; +#ifdef AF_ROUTE + case AF_ROUTE: + if (!conf_route_perm(fd)) { + (*lfun)(LOG_ERR, + "permission denied to routing socket (%m)"); + return NULL; + } + cr->c_proto = FSTAR; + cr->c_port = FSTAR; + memcpy(&lss, rss, sizeof(lss)); + break; +#endif default: (*lfun)(LOG_ERR, "unsupported family %d", lss.ss_family); return NULL; From nobody Mon Mar 25 22:29:31 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V3SKS17gWz5FS0p; Mon, 25 Mar 2024 22:29:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4V3SKS0PkQz4Cnp; Mon, 25 Mar 2024 22:29:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711405772; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1aMfAD9s4XfOHOtOiSK6nbekenT4+HnDZ0hUau1VPso=; b=rKvxyedkadTjvlYT+lGOQSdVZ9qsRMab0Q22eRuqpT5nKuIRqf8iFH5NIVC5zWsxEvIqIh DBwG3NrUeG1AjjzTjbUA+dXjurTeFg5fISAw22MADKAJolnd8GbOFbevs2qHv43fp3zRA6 BiwO3WfG8egkGxuqIO/jZ6AKqdWEVTt/JNNYm9WhhFuVX2MhOK//H6MZ7zhxwXggrtVfl6 mQD6D0jT0vIhBakvrmVgtK74KXYyxLx7i0yFgW5f9Ramdt4RMrA7AeYCgmW4GO/NEijtu3 kEZC+Gu4safwfQhRuGyGkaC62Iq87OPn2sVv+SQKKTicEyhN+Lt6iyxxpYtbuA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711405772; a=rsa-sha256; cv=none; b=aTKL17rcpUToLOHafFVH7dhNUBr4ABn4GPaRncY8S4z9WZ2MYr/D7pxy6MvrRgXL/Qs+b5 b/O51R1EBh/cpdrGf4uWG5LM1Qoez6pqSl3ohv5X+3mJ8S2BUonE5fDHLslX45F8PuSNsE twpendryRrdVjV36y1C6cHtLSHZSik+BpvOMG/SRzp/6ClqYOrSXqOIoVDiunFHtCuihnm 4jrsO96K7B2tiYb8QozbqefhPGb3c2dlvMfudQu4nfJb8xRAThtKjyCSbzOA6jKE2JFaZd zWsMmWQckHp7HaoAJiD5GrGrdFYSjDLS8waWEGTlxYyidItqYZKvWs63LjDJFw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711405772; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1aMfAD9s4XfOHOtOiSK6nbekenT4+HnDZ0hUau1VPso=; b=WoTrnIqbSDomdj0K2KWa1/e7ib/tPPBL6Wbdmg7KEI0FhSwQFMNa4uVty8dyaUp3isAsX+ ULcnwhJFjRA4p0PhXy4SDp6hxLszZ2DBK1KmdN+jlaEihNkCUS6pEmGwengQjIBMacLSd1 lzDmPNQcAjpRiybptWd5l8Zq4JajX/vze6fDprSEoDzRyc/O2FbptaGpYf6QlHYISw2uKX 6Jpi2xxRBv6VU7ex/M4+TEYTM0y0al0kEqsGW5jn+YPBSOOYezXJT6MurEdKGYrNAQkYyg z7ZMMUr5g9ZEFtE36AhqBNR+WhP8+c3mCmNRnheE8I1tcJHkdNRwG7YCh9Vtaw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V3SKS00nVzb59; Mon, 25 Mar 2024 22:29:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42PMTV8Y043926; Mon, 25 Mar 2024 22:29:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42PMTViq043923; Mon, 25 Mar 2024 22:29:31 GMT (envelope-from git) Date: Mon, 25 Mar 2024 22:29:31 GMT Message-Id: <202403252229.42PMTViq043923@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: c9bd948da3c8 - stable/14 - arm64: Save an instruction in locore.S List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c9bd948da3c80726cffef37a31a5aac8fe06ef8b Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=c9bd948da3c80726cffef37a31a5aac8fe06ef8b commit c9bd948da3c80726cffef37a31a5aac8fe06ef8b Author: Alfonso Gregory AuthorDate: 2023-07-04 19:10:19 +0000 Commit: Ed Maste CommitDate: 2024-03-25 22:29:12 +0000 arm64: Save an instruction in locore.S We can move and sub at the same time, so let's do that. Reviewed by: andrew, kevans Pull Request: https://github.com/freebsd/freebsd-src/pull/794 (cherry picked from commit e1fe34707a60b0f6cf47397c6eea0a39d675e3ac) --- sys/arm64/arm64/locore.S | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/arm64/arm64/locore.S b/sys/arm64/arm64/locore.S index f7e0b4023aed..a87d7add4149 100644 --- a/sys/arm64/arm64/locore.S +++ b/sys/arm64/arm64/locore.S @@ -116,8 +116,7 @@ virtdone: /* Set up the stack */ adrp x25, initstack_end add x25, x25, :lo12:initstack_end - mov sp, x25 - sub sp, sp, #PCB_SIZE + sub sp, x25, #PCB_SIZE /* Zero the BSS */ ldr x15, .Lbss From nobody Mon Mar 25 22:32:19 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V3SNg2xgQz5FSDW; Mon, 25 Mar 2024 22:32: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 4V3SNg2WZbz4D0s; Mon, 25 Mar 2024 22:32:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711405939; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yrZof3cFgj2MQB8VHPS2xyIUw/jl+afKFpDnoRSFZrI=; b=v6b4Pt6gUj80ZJhwvqmhjxsFUtfFXkx6xXad8DO1VO6rM/bijzuQCr1jR9GJ2FMuhK4sPl vk75rg5Ev1uO9NGyMfImM9ahKP+G0NxKrFXLnj6tJlWCWZkDIAsJ/2X+dyoR7M8XK3Ctsc pMUj/mMX8lZ8m0NURPioqolRRBYGv77mkDAiIGJORft3fa7Tz9TlXa2bjolH20vtg9z0mi xGrLIymUbmRT/v3cPJjnuRRBJd0eT0LXPrxggqm+fMjo6uFQsTTKV67a3551DUS/vNQpHW IqgOLeFGPQz5q7W+6+jix6iWC+Ik7u6pa0osc0TaBwk7zAosDJalwuuDKH9Zpg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711405939; a=rsa-sha256; cv=none; b=ew3eyWif0ihBa3Y//DPkPHjU6br8SEfZJT77q+FfxklAmSNiZxZgPC4yZiFu46ObCFF2Ui IVIze+rwbHNhH997dO0YCn7JA4f7dHFLA7eiUkN6VXsAIM1mdc092iWIY+t2XQVdetjilL hiSf10GCWxINneuA3Z6q9nMsDZIDQGrebyaCTgUBSYyxh8UuYbtcNHRS9qeP0nn5FB6u9R fCLwWCWEvse99FRK5fqllthBCa5k83q4JO5ExYzTJQuCUZ4s94knHdKwrSWJSbfQ6hptJa i+EEqFU7eczht4bduV7Fbw/6JOdGgaI/kk33Qi9uQxwhJrfEdleswPVjn0Ft7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711405939; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yrZof3cFgj2MQB8VHPS2xyIUw/jl+afKFpDnoRSFZrI=; b=Jr+4rYyY1b3osPZa1s72pn6fUbJlP31QYvd3Wp3h86NB849EuNzF/26mm2QN7QB12Ylh9a jnuM49YHETXffNVQuM/+2o9hWiZ0KMGPNAd/IkxiY4jcAQM1epXr1dwdvBx828sjy42Z31 QJ98x3okRuLb6CDqMB37pzkvG7+swCePl4coq+p/1IMs+wmvw/KN4C5o2Xb11s0bmGSSIk fD4XVp7uA7QBfnElxjD27SAIo5QujstWpP7QhhQUDK1nLVI6RIY8CDIVZ6FQ39MGDwSddM FHgqwyotuliOXvnV4mFzpTHI2T8tIXXz0W7ZSOzbzaBzjaxqwAOk4a5hmBocqQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V3SNg27CRzZvc; Mon, 25 Mar 2024 22:32:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42PMWJUo057535; Mon, 25 Mar 2024 22:32:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42PMWJHD057532; Mon, 25 Mar 2024 22:32:19 GMT (envelope-from git) Date: Mon, 25 Mar 2024 22:32:19 GMT Message-Id: <202403252232.42PMWJHD057532@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 464fa66f639b - stable/14 - ssh: Update to OpenSSH 9.7p1 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 464fa66f639bdc8e340dd3f640af4309530d48ca Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=464fa66f639bdc8e340dd3f640af4309530d48ca commit 464fa66f639bdc8e340dd3f640af4309530d48ca Author: Ed Maste AuthorDate: 2024-03-18 14:00:57 +0000 Commit: Ed Maste CommitDate: 2024-03-25 22:31:44 +0000 ssh: Update to OpenSSH 9.7p1 This release contains mostly bugfixes. It also makes support for the DSA signature algorithm a compile-time option, with plans to disable it upstream later this year and remove support entirely in 2025. Full release notes at https://www.openssh.com/txt/release-9.7 Relnotes: Yes Sponsored by: The FreeBSD Foundation (cherry picked from commit a91a246563dffa876a52f53a98de4af9fa364c52) --- crypto/openssh/.github/configs | 21 +- crypto/openssh/.github/setup_ci.sh | 26 + crypto/openssh/.github/workflows/c-cpp.yml | 20 +- crypto/openssh/.github/workflows/selfhosted.yml | 1 + crypto/openssh/.gitignore | 2 + crypto/openssh/.skipped-commit-ids | 2 + crypto/openssh/ChangeLog | 11979 +++++++++---------- crypto/openssh/PROTOCOL | 22 +- crypto/openssh/PROTOCOL.agent | 4 +- crypto/openssh/PROTOCOL.mux | 4 +- crypto/openssh/README | 2 +- crypto/openssh/README.platform | 9 +- crypto/openssh/channels.c | 79 +- crypto/openssh/clientloop.c | 4 +- crypto/openssh/config.h | 3 + crypto/openssh/configure.ac | 50 +- crypto/openssh/contrib/redhat/openssh.spec | 2 +- crypto/openssh/contrib/suse/openssh.spec | 2 +- crypto/openssh/gss-genr.c | 8 +- crypto/openssh/kex.c | 31 +- crypto/openssh/kex.h | 10 +- crypto/openssh/m4/openssh.m4 | 12 +- crypto/openssh/misc.c | 15 +- crypto/openssh/misc.h | 3 +- crypto/openssh/nchan.c | 4 +- crypto/openssh/openbsd-compat/getopt.h | 12 +- crypto/openssh/openbsd-compat/openbsd-compat.h | 10 +- crypto/openssh/readconf.c | 165 +- crypto/openssh/readconf.h | 8 +- crypto/openssh/regress/Makefile | 77 +- crypto/openssh/regress/channel-timeout.sh | 74 +- crypto/openssh/regress/dynamic-forward.sh | 9 +- crypto/openssh/regress/misc/fuzz-harness/Makefile | 8 +- .../regress/misc/fuzz-harness/agent_fuzz_helper.c | 7 + crypto/openssh/regress/multiplex.sh | 3 +- crypto/openssh/regress/putty-ciphers.sh | 51 +- crypto/openssh/regress/putty-kex.sh | 40 +- crypto/openssh/regress/putty-transfer.sh | 13 +- crypto/openssh/regress/test-exec.sh | 28 +- crypto/openssh/regress/unittests/Makefile.inc | 7 +- .../regress/unittests/hostkeys/test_iterate.c | 11 +- crypto/openssh/regress/unittests/kex/test_kex.c | 4 +- .../openssh/regress/unittests/sshkey/test_file.c | 4 +- .../openssh/regress/unittests/sshkey/test_fuzz.c | 8 +- .../openssh/regress/unittests/sshkey/test_sshkey.c | 23 +- crypto/openssh/regress/unittests/sshsig/tests.c | 4 +- crypto/openssh/servconf.c | 168 +- crypto/openssh/session.c | 4 +- crypto/openssh/sftp.c | 44 +- crypto/openssh/ssh-add.1 | 14 +- crypto/openssh/ssh-add.c | 10 +- crypto/openssh/ssh-agent.c | 48 +- crypto/openssh/ssh-dss.c | 7 +- crypto/openssh/ssh-keygen.c | 26 +- crypto/openssh/ssh-keyscan.c | 8 +- crypto/openssh/ssh-keysign.c | 7 +- crypto/openssh/ssh-pkcs11-client.c | 2 + crypto/openssh/ssh.c | 6 +- crypto/openssh/ssh_api.c | 14 +- crypto/openssh/ssh_config.5 | 24 +- crypto/openssh/ssh_namespace.h | 1 + crypto/openssh/sshbuf-getput-crypto.c | 4 +- crypto/openssh/sshconnect.c | 4 +- crypto/openssh/sshconnect2.c | 21 +- crypto/openssh/sshd.c | 4 +- crypto/openssh/sshd_config | 2 +- crypto/openssh/sshd_config.5 | 59 +- crypto/openssh/sshkey.c | 12 +- crypto/openssh/sshsig.c | 4 +- crypto/openssh/version.h | 6 +- crypto/openssh/xmss_hash.c | 4 +- 71 files changed, 6362 insertions(+), 7022 deletions(-) diff --git a/crypto/openssh/.github/configs b/crypto/openssh/.github/configs index df82faf5046b..370fe29a3ee4 100755 --- a/crypto/openssh/.github/configs +++ b/crypto/openssh/.github/configs @@ -164,6 +164,11 @@ case "$config" in libressl-*) LIBCRYPTOFLAGS="--with-ssl-dir=/opt/libressl --with-rpath=-Wl,-rpath," ;; + putty-*) + CONFIGFLAGS="--with-plink=/usr/local/bin/plink --with-puttygen=/usr/local/bin/puttygen" + # We don't need to rerun the regular tests, just the interop ones. + TEST_TARGET=interop-tests + ;; openssl-*) LIBCRYPTOFLAGS="--with-ssl-dir=/opt/openssl --with-rpath=-Wl,-rpath," # OpenSSL 1.1.1 specifically has a bug in its RNG that breaks reexec @@ -269,20 +274,22 @@ case "${TARGET_HOST}" in ;; minix3) CONFIGFLAGS="${CONFIGFLAGS} --disable-security-key" + # Unix domain sockets don't work quite like we expect, so also + # disable FD passing (and thus multiplexing). + CONFIGFLAGS="${CONFIGFLAGS} --disable-fd-passing" LIBCRYPTOFLAGS="--without-openssl" + # Minix does not have a loopback interface so we have to skip any # test that relies on one. # Also, Minix seems to be very limited in the number of select() # calls that can be operating concurrently, so prune additional tests for that. T="addrmatch agent-restrict brokenkeys cfgmatch cfgmatchlisten cfgparse - connect connect-uri exit-status forwarding hostkey-agent - key-options keyscan knownhosts-command login-timeout + connect connect-uri dynamic-forward exit-status forwarding + forward-control + hostkey-agent key-options keyscan knownhosts-command login-timeout reconfigure reexec rekey scp scp-uri scp3 sftp sftp-badcmds sftp-batch sftp-cmds sftp-glob sftp-perm sftp-uri stderr-data transfer" - # Unix domain sockets don't work quite like we expect, so also skip any tests - # that use multiplexing. - T="$T connection-timeout dynamic-forward forward-control multiplex" SKIP_LTESTS="$(echo $T)" TEST_TARGET=t-exec SUDO="" @@ -320,6 +327,10 @@ case "$host" in # modern versions don't ship with libcrypto. LIBCRYPTOFLAGS="--without-openssl" TEST_TARGET=t-exec + + # On some OS X runners we can't write to /var/empty. + CONFIGFLAGS="${CONFIGFLAGS} --with-privsep-path=/usr/local/empty" + case "$host" in *-darwin22.*) # sudo -S nobody doesn't work on macos 13 for some reason. diff --git a/crypto/openssh/.github/setup_ci.sh b/crypto/openssh/.github/setup_ci.sh index d0ba7b4724e9..f0f2761c7107 100755 --- a/crypto/openssh/.github/setup_ci.sh +++ b/crypto/openssh/.github/setup_ci.sh @@ -142,6 +142,10 @@ for TARGET in $TARGETS; do INSTALL_BORINGSSL=1 PACKAGES="${PACKAGES} cmake ninja-build" ;; + putty-*) + INSTALL_PUTTY=$(echo "${TARGET}" | cut -f2 -d-) + PACKAGES="${PACKAGES} cmake" + ;; valgrind*) PACKAGES="$PACKAGES valgrind" ;; @@ -241,3 +245,25 @@ if [ ! -z "${INSTALL_ZLIB}" ]; then cd ${HOME}/zlib && ./configure && make && sudo make install prefix=/opt/zlib) fi + +if [ ! -z "${INSTALL_PUTTY}" ]; then + ver="${INSTALL_PUTTY}" + case "${INSTALL_PUTTY}" in + snapshot) + tarball=putty.tar.gz + (cd /tmp && wget https://tartarus.org/~simon/putty-snapshots/${tarball}) + ;; + *) + tarball=putty-${ver}.tar.gz + (cd /tmp && wget https://the.earth.li/~sgtatham/putty/${ver}/${tarball}) + ;; + esac + (cd ${HOME} && tar xfz /tmp/${tarball} && cd putty-* + if [ -f CMakeLists.txt ]; then + cmake . && cmake --build . && sudo cmake --build . --target install + else + ./configure && make && sudo make install + fi + ) + /usr/local/bin/plink -V +fi diff --git a/crypto/openssh/.github/workflows/c-cpp.yml b/crypto/openssh/.github/workflows/c-cpp.yml index 8f624d21016c..edb88f23c0fb 100644 --- a/crypto/openssh/.github/workflows/c-cpp.yml +++ b/crypto/openssh/.github/workflows/c-cpp.yml @@ -62,20 +62,32 @@ jobs: - { target: ubuntu-latest, config: libressl-3.5.3 } - { target: ubuntu-latest, config: libressl-3.6.1 } - { target: ubuntu-latest, config: libressl-3.7.2 } - - { target: ubuntu-latest, config: libressl-3.8.2 } + - { target: ubuntu-latest, config: libressl-3.8.3 } + - { target: ubuntu-latest, config: libressl-3.9.0 } - { target: ubuntu-latest, config: openssl-master } - { target: ubuntu-latest, config: openssl-noec } - { target: ubuntu-latest, config: openssl-1.1.1 } - { target: ubuntu-latest, config: openssl-1.1.1t } - { target: ubuntu-latest, config: openssl-1.1.1w } - { target: ubuntu-latest, config: openssl-3.0.0 } - - { target: ubuntu-latest, config: openssl-3.0.12 } + - { target: ubuntu-latest, config: openssl-3.0.13 } - { target: ubuntu-latest, config: openssl-3.1.0 } - - { target: ubuntu-latest, config: openssl-3.1.4 } - - { target: ubuntu-latest, config: openssl-3.2.0 } + - { target: ubuntu-latest, config: openssl-3.1.5 } + - { target: ubuntu-latest, config: openssl-3.2.1 } - { target: ubuntu-latest, config: openssl-1.1.1_stable } - { target: ubuntu-latest, config: openssl-3.0 } # stable branch - { target: ubuntu-latest, config: openssl-3.2 } # stable branch + - { target: ubuntu-latest, config: putty-0.71 } + - { target: ubuntu-latest, config: putty-0.72 } + - { target: ubuntu-latest, config: putty-0.73 } + - { target: ubuntu-latest, config: putty-0.74 } + - { target: ubuntu-latest, config: putty-0.75 } + - { target: ubuntu-latest, config: putty-0.76 } + - { target: ubuntu-latest, config: putty-0.77 } + - { target: ubuntu-latest, config: putty-0.78 } + - { target: ubuntu-latest, config: putty-0.79 } + - { target: ubuntu-latest, config: putty-0.80 } + - { target: ubuntu-latest, config: putty-snapshot } - { target: ubuntu-latest, config: zlib-develop } - { target: ubuntu-22.04, config: pam } - { target: ubuntu-22.04, config: krb5 } diff --git a/crypto/openssh/.github/workflows/selfhosted.yml b/crypto/openssh/.github/workflows/selfhosted.yml index be0b4ffec580..4f1c587a5779 100644 --- a/crypto/openssh/.github/workflows/selfhosted.yml +++ b/crypto/openssh/.github/workflows/selfhosted.yml @@ -73,6 +73,7 @@ jobs: - { target: fbsd14, config: pam, host: libvirt } - { target: nbsd8, config: pam, host: libvirt } - { target: nbsd9, config: pam, host: libvirt } + - { target: nbsd10, config: pam, host: libvirt } # VMs with persistent disks that have their own runner. - { target: win10, config: default, host: win10 } - { target: win10, config: cygwin-release, host: win10 } diff --git a/crypto/openssh/.gitignore b/crypto/openssh/.gitignore index 5e4ae5a60d06..7fccc6fe3dc3 100644 --- a/crypto/openssh/.gitignore +++ b/crypto/openssh/.gitignore @@ -18,6 +18,8 @@ survey.sh **/*.so **/*.out **/*.a +**/*.un~ +**/.*.swp autom4te.cache/ scp sftp diff --git a/crypto/openssh/.skipped-commit-ids b/crypto/openssh/.skipped-commit-ids index 59e80518acf2..06303955c566 100644 --- a/crypto/openssh/.skipped-commit-ids +++ b/crypto/openssh/.skipped-commit-ids @@ -1,3 +1,4 @@ +509bb19bb9762a4b3b589af98bac2e730541b6d4 clean sshd random relinking kit 5317f294d63a876bfc861e19773b1575f96f027d remove libssh from makefiles a337e886a49f96701ccbc4832bed086a68abfa85 Makefile changes f2c9feb26963615c4fece921906cf72e248b61ee more Makefile @@ -27,6 +28,7 @@ cc12a9029833d222043aecd252d654965c351a69 moduli-gen Makefile f9a0726d957cf10692a231996a1f34e7f9cdfeb0 moduli update 1e0a2692b7e20b126dda60bf04999d1d30d959d8 sshd relinking makefile changes e1dc11143f83082e3154d6094f9136d0dc2637ad more relinking makefile tweaks +5a636f6ca7f25bfe775df4952f7aac90a7fcbbee moduli update Old upstream tree: diff --git a/crypto/openssh/ChangeLog b/crypto/openssh/ChangeLog index 981b7ecd94b6..3bbccf5ea3eb 100644 --- a/crypto/openssh/ChangeLog +++ b/crypto/openssh/ChangeLog @@ -1,9505 +1,8300 @@ -commit 8241b9c0529228b4b86d88b1a6076fb9f97e4a99 +commit 86bdd3853f4d32c85e295e6216a2fe0953ad93f0 Author: Damien Miller -Date: Tue Dec 19 01:59:50 2023 +1100 +Date: Mon Mar 11 16:20:49 2024 +1100 - crank versions + version number in README -commit 2f2c65cb5f1518a9c556d3e8efa27ea0ca305c6b +commit 282721418e6465bc39ccfd39bb0133e670ee4423 Author: Damien Miller -Date: Tue Dec 19 01:59:06 2023 +1100 +Date: Mon Mar 11 16:20:08 2024 +1100 - depend + crank RPM spec versions -commit e48cdee8e19059203b1aeeabec2350b8375fa61f +commit 3876a3bbd2ca84d23ba20f8b69ba83270c04ce3a Author: djm@openbsd.org -Date: Mon Dec 18 14:50:08 2023 +0000 +Date: Mon Mar 11 04:59:47 2024 +0000 - upstream: regress test for agent PKCS#11-backed certificates + upstream: openssh-9.7 - OpenBSD-Regress-ID: 38f681777cb944a8cc3bf9d0ad62959a16764df9 + OpenBSD-Commit-ID: 618ececf58b8cdae016b149787af06240f7b0cbc -commit 2f512f862df1d5f456f82a0334c9e8cc7208a2a1 -Author: djm@openbsd.org -Date: Mon Dec 18 14:49:39 2023 +0000 +commit 8fc109cc614954a8eb2738c48c0db36a62af9a06 +Author: Darren Tucker +Date: Mon Mar 11 12:59:26 2024 +1100 - upstream: regress test for constrained PKCS#11 keys + Test against current OpenSSL and LibreSSL releases. - OpenBSD-Regress-ID: b2f26ae95d609d12257b43aef7cd7714c82618ff + Add LibreSSL 3.9.0, bump older branches to their respective current + releases. -commit cdddd66412ca5920ed4d3ebbfa6ace12dbd9b82f -Author: djm@openbsd.org -Date: Mon Dec 18 14:48:44 2023 +0000 +commit 26b09b45fec7b88ba09042c09be4157e58e231e2 +Author: Damien Miller +Date: Sun Mar 10 16:24:57 2024 +1100 - upstream: openssh-9.6 + quote regexes used to test for algorithm support - OpenBSD-Commit-ID: 21759837cf0e0092d9a2079f8fb562071c11016b + Fixes test failures on Solaris 8 reported by Tom G. Christensen -commit 6d51feab157cedf1e7ef5b3f8781ca8ff9c4ab1b +commit a6a740a4948d10a622b505135bb485c10f21db5e Author: djm@openbsd.org -Date: Mon Dec 18 14:48:08 2023 +0000 +Date: Sat Mar 9 05:12:13 2024 +0000 - upstream: ssh-agent: record failed session-bind attempts - - Record failed attempts to session-bind a connection and refuse signing - operations on that connection henceforth. - - Prevents a future situation where we add a new hostkey type that is not - recognised by an older ssh-agent, that consequently causes session-bind - to fail (this situation is only likely to arise when people mix ssh(1) - and ssh-agent(1) of different versions on the same host). Previously, - after such a failure the agent socket would be considered unbound and - not subject to restriction. + upstream: avoid logging in signal handler by converting mainloop to - Spotted by Jann Horn + ppoll() bz3670, reported by Ben Hamilton; ok dtucker@ - OpenBSD-Commit-ID: b0fdd023e920aa4831413f640de4c5307b53552e + OpenBSD-Commit-ID: e58f18042b86425405ca09e6e9d7dfa1df9f5f7f -commit 7ef3787c84b6b524501211b11a26c742f829af1a +commit cd82f7526e0481720567ae41db7849ab1c27e27b Author: djm@openbsd.org -Date: Mon Dec 18 14:47:44 2023 +0000 +Date: Fri Mar 8 22:16:32 2024 +0000 - upstream: ban user/hostnames with most shell metacharacters + upstream: skip more whitespace, fixes find-principals on - This makes ssh(1) refuse user or host names provided on the - commandline that contain most shell metacharacters. - - Some programs that invoke ssh(1) using untrusted data do not filter - metacharacters in arguments they supply. This could create - interactions with user-specified ProxyCommand and other directives - that allow shell injection attacks to occur. + allowed_signers files with blank lines; reported by Wiktor Kwapisiewicz - It's a mistake to invoke ssh(1) with arbitrary untrusted arguments, - but getting this stuff right can be tricky, so this should prevent - most obvious ways of creating risky situations. It however is not - and cannot be perfect: ssh(1) has no practical way of interpreting - what shell quoting rules are in use and how they interact with the - user's specified ProxyCommand. + OpenBSD-Commit-ID: b3a22a2afd753d70766f34bc7f309c03706b5298 + +commit 2f9d2af5cb19905d87f37d1e11c9f035ac5daf3b +Author: dtucker@openbsd.org +Date: Fri Mar 8 11:34:10 2024 +0000 + + upstream: Invoke ProxyCommand that uses stderr redirection via - To allow configurations that use strange user or hostnames to - continue to work, this strictness is applied only to names coming - from the commandline. Names specified using User or Hostname - directives in ssh_config(5) are not affected. + $TEST_SHELL. Fixes test when run by a user whose login shell is tcsh. + Found by vinschen at redhat.com. - feedback/ok millert@ markus@ dtucker@ deraadt@ + OpenBSD-Regress-ID: f68d79e7f00caa8d216ebe00ee5f0adbb944062a + +commit 9b3f0beb4007a7e01dfedabb429097fb593deae6 +Author: Darren Tucker +Date: Thu Mar 7 17:18:14 2024 +1100 + + Prefer openssl binary from --with-ssl-dir directory. - OpenBSD-Commit-ID: 3b487348b5964f3e77b6b4d3da4c3b439e94b2d9 + Use openssl in the directory specified by --with-ssl-dir as long + as it's functional. Reported by The Doctor. -commit 0cb50eefdd29f0fec31d0e71cc4b004a5f704e67 +commit c47e1c9c7911f38b2fc2fb01b1f6ae3a3121a838 Author: djm@openbsd.org -Date: Mon Dec 18 14:47:20 2023 +0000 +Date: Wed Mar 6 02:59:59 2024 +0000 - upstream: stricter handling of channel window limits - - This makes ssh/sshd more strict in handling non-compliant peers that - send more data than the advertised channel window allows. Previously - the additional data would be silently discarded. This change will - cause ssh/sshd to terminate the connection if the channel window is - exceeded by more than a small grace allowance. + upstream: fix memory leak in mux proxy mode when requesting forwarding. - ok markus@ + found by RASU JSC, reported by Maks Mishin in GHPR#467 - OpenBSD-Commit-ID: 811e21b41831eba3dd7f67b3d409a438f20d3037 + OpenBSD-Commit-ID: 97d96a166b1ad4b8d229864a553e3e56d3116860 -commit 4448a2938abc76e6bd33ba09b2ec17a216dfb491 +commit 242742827fea4508e68097c128e802edc79addb5 Author: djm@openbsd.org -Date: Mon Dec 18 14:46:56 2023 +0000 +Date: Wed Mar 6 00:31:04 2024 +0000 - upstream: Make it possible to load certs from PKCS#11 tokens - - Adds a protocol extension to allow grafting certificates supplied by - ssh-add to keys loaded from PKCS#11 tokens in the agent. - - feedback/ok markus@ + upstream: wrap a few PKCS#11-specific bits in ENABLE_PKCS11 - OpenBSD-Commit-ID: bb5433cd28ede2bc910996eb3c0b53e20f86037f + OpenBSD-Commit-ID: 463e4a69eef3426a43a2b922c4e7b2011885d923 -commit 881d9c6af9da4257c69c327c4e2f1508b2fa754b -Author: djm@openbsd.org -Date: Mon Dec 18 14:46:12 2023 +0000 +commit d52b6509210e2043f33e5a1de58dd4a0d5d48c2a +Author: Damien Miller +Date: Wed Mar 6 11:31:36 2024 +1100 - upstream: apply destination constraints to all p11 keys + disable RSA tests when algorithm is not supported - Previously applied only to the first key returned from each token. + Unbreaks "make test" when compiled --without-openssl. - ok markus@ + Similar treatment to how we do DSA and ECDSA. + +commit 668d270a6c77e8b5a1da26ecad2e6de9f62c8fe4 +Author: Damien Miller +Date: Wed Mar 6 10:33:20 2024 +1100 + + add a --without-retpoline configure option - OpenBSD-Commit-ID: 36df3afb8eb94eec6b2541f063d0d164ef8b488d + discussed with deraadt and dtucker a while ago -commit a7ed931caeb68947d30af8a795f4108b6efad761 +commit 3deb501f86fc47e175ef6a3eaba9b9846a80d444 Author: djm@openbsd.org -Date: Mon Dec 18 14:45:49 2023 +0000 +Date: Mon Mar 4 04:13:18 2024 +0000 - upstream: add "ext-info-in-auth@openssh.com" extension - - This adds another transport protocol extension to allow a sshd to send - SSH2_MSG_EXT_INFO during user authentication, after the server has - learned the username that is being logged in to. - - This lets sshd to update the acceptable signature algoritms for public - key authentication, and allows these to be varied via sshd_config(5) - "Match" directives, which are evaluated after the server learns the - username being authenticated. + upstream: fix leak of CanonicalizePermittedCNAMEs on error path; - Full details in the PROTOCOL file + spotted by Coverity (CID 438039) - OpenBSD-Commit-ID: 1de7da7f2b6c32a46043d75fcd49b0cbb7db7779 + OpenBSD-Commit-ID: 208839699939721f452a4418afc028a9f9d3d8af -commit 1edb00c58f8a6875fad6a497aa2bacf37f9e6cd5 +commit 65a44a8a4f7d902a64d4e60eda84384b2e2a24a2 Author: djm@openbsd.org -Date: Mon Dec 18 14:45:17 2023 +0000 +Date: Mon Mar 4 02:16:11 2024 +0000 - upstream: implement "strict key exchange" in ssh and sshd + upstream: Separate parsing of string array options from applying them - This adds a protocol extension to improve the integrity of the SSH - transport protocol, particular in and around the initial key exchange - (KEX) phase. + to the active configuration. This fixes the config parser from erroneously + rejecting cases like: - Full details of the extension are in the PROTOCOL file. + AuthenticationMethods password + Match User ivy + AuthenticationMethods any - with markus@ + bz3657 ok markus@ - OpenBSD-Commit-ID: 2a66ac962f0a630d7945fee54004ed9e9c439f14 + OpenBSD-Commit-ID: 7f196cba634c2a3dba115f3fac3c4635a2199491 -commit 59d691b886c79e70b1d1c4ab744e81fd176222fd +commit 6886e1b1f55c90942e4e6deed930f8ac32e0f938 +Author: Darren Tucker +Date: Thu Feb 22 17:59:35 2024 +1100 + + Add nbsd10 test target. + +commit d86bf8a3f6ea4fa7887406c2aa9959db71fa41be Author: Damien Miller -Date: Mon Dec 18 14:49:11 2023 +1100 +Date: Thu Feb 22 12:06:10 2024 +1100 - better detection of broken -fzero-call-used-regs + more descriptive configure test name + +commit 9ee335aacc9f5bdc4cc2c19fafb45e27be7d234e +Author: djm@openbsd.org +Date: Wed Feb 21 06:17:29 2024 +0000 + + upstream: explain arguments of internal-sftp GHPR#454 from Niklas - Use OSSH_CHECK_CFLAG_LINK() for detection of these flags and extend - test program to exercise varargs, which seems to catch more stuff. + Hambüchen + MIME-Version: 1.0 + Content-Type: text/plain; charset=UTF-8 + Content-Transfer-Encoding: 8bit - ok dtucker@ + OpenBSD-Commit-ID: 0335d641ae6b5b6201b9ffd5dd06345ebbd0a3f3 -commit aa7b21708511a6d4aed3839fc9f6e82e849dd4a1 +commit d1164cb1001dd208fee88aaa9b43d5e6fd917274 Author: djm@openbsd.org -Date: Wed Dec 13 03:28:19 2023 +0000 +Date: Wed Feb 21 06:06:43 2024 +0000 - upstream: when invoking KnownHostsCommand to determine the order of - - host key algorithms to request, ensure that the hostname passed to the - command is decorated with the port number for ports other than 22. + upstream: clarify permissions requirements for ChrootDirectory Part - This matches the behaviour of KnownHostsCommand when invoked to look - up the actual host key. + of GHPR#454 from Niklas Hambüchen + MIME-Version: 1.0 + Content-Type: text/plain; charset=UTF-8 + Content-Transfer-Encoding: 8bit - bz3643, ok dtucker@ + OpenBSD-Commit-ID: d37bc8786317a11649c62ff5e2936441186ef7a0 + +commit d410e17d186552d0717f18217d0d049486754365 +Author: djm@openbsd.org +Date: Wed Feb 21 06:05:06 2024 +0000 + + upstream: .Cm for a keyword. Part of GHPR#454 from Niklas Hambüchen - OpenBSD-Commit-ID: 5cfabc0b7c6c7ab473666df314f377b1f15420b1 + OpenBSD-Commit-ID: d59c52559f926fa82859035d79749fbb4a3ce18a -commit 4086bd6652c0badccc020218a62190a7798fb72c -Author: markus@openbsd.org -Date: Fri Dec 8 09:18:39 2023 +0000 +commit ab73f9678ebf06b32d6361b88b50b42775e0565b +Author: djm@openbsd.org +Date: Wed Feb 21 06:01:13 2024 +0000 - upstream: prevent leak in sshsig_match_principals; ok djm@ + upstream: fix typo in match directive predicate (s/tagged/tag) GHPR#462 - OpenBSD-Commit-ID: 594f61ad4819ff5c72dfe99ba666a17f0e1030ae + from Tobias Manske + + OpenBSD-Commit-ID: 05b23b772677d48aa82eefd7ebebd369ae758908 -commit 19d3ee2f3adf7d9a606ff015c1e153744702c4c9 +commit 9844aa2521ccfb1a2d73745680327b79e0574445 Author: djm@openbsd.org -Date: Wed Dec 6 21:06:48 2023 +0000 +Date: Wed Feb 21 05:57:34 2024 +0000 - upstream: short circuit debug log processing early if we're not going + upstream: fix proxy multiplexing mode, broken when keystroke timing - to log anything. From Kobe Housen + obfuscation was added. GHPR#463 from montag451 - OpenBSD-Commit-ID: 2bcddd695872a1bef137cfff7823044dcded90ea + OpenBSD-Commit-ID: 4e412d59b3f557d431f1d81c715a3bc0491cc677 -commit 947affad4831df015c498c00c6351ea6f13895d5 -Author: Darren Tucker -Date: Mon Nov 27 09:37:28 2023 +1100 +commit ee6d932acb532f80b11bb7cf161668c70ec8a117 +Author: djm@openbsd.org +Date: Tue Feb 20 04:10:03 2024 +0000 - Add tests for OpenSSL 3.2.0 and 3.2 stable branch. + upstream: don't append a gratuitous space to the end of subsystem + + arguments; bz3667 + + OpenBSD-Commit-ID: e11023aeb3f30b77a674e37b8292c862926d5dc6 -commit 747dce36206675ca6b885010a835733df469351b -Author: Darren Tucker -Date: Sat Nov 25 09:03:38 2023 +1100 +commit e27f032aa8fcbae9b2e7c451baaf4b8ac6fa3d45 +Author: dtucker@openbsd.org +Date: Mon Feb 19 09:25:52 2024 +0000 - Use non-zero arg in compiler test program. + upstream: Always define puttysetup function. - Now that we're running the test program, passing zero to the test function - can cause divide-by-zero exceptions which might show up in logs. + OpenBSD-Regress-ID: b4c0ccfa4006a1bc5dfd99ccf21c854d3ce2aee0 -commit 3d44a5c56585d1c351dbc006240a591b6da502b1 +commit 84046f9991abef5f46b040b10cf3d494f933a17b Author: dtucker@openbsd.org -Date: Fri Nov 24 00:31:30 2023 +0000 +Date: Fri Feb 9 08:56:59 2024 +0000 - upstream: Plug mem leak of msg when processing a quit message. + upstream: Exapnd PuTTY test coverage. - Coverity CID#427852, ok djm@ + Expand the set of ciphers, MACs and KEX methods in the PuTTY interop + tests. - OpenBSD-Commit-ID: bf85362addbe2134c3d8c4b80f16601fbff823b7 + OpenBSD-Regress-ID: dd28d97d48efe7329a396d0d505ee2907bf7fc57 -commit 1d7f9b6e297877bd00973e6dc5c0642dbefc3b5f +commit bbf541ee2afe07b08a8b56fa0dc6f38fcfceef2a Author: dtucker@openbsd.org -Date: Thu Nov 23 03:37:05 2023 +0000 +Date: Fri Feb 9 08:47:42 2024 +0000 - upstream: Include existing mux path in debug message. + upstream: Factor out PuTTY setup. - OpenBSD-Commit-ID: 1c3641be10c2f4fbad2a1b088a441d072e18bf16 + Factor out PuTTY and call only when needed. + + This allows us to avoid PuTTY key setup when it's not needed, which + speeds up the overall test run by a couple of percent. + + OpenBSD-Regress-ID: c25eaccc3c91bc874400f7c85ce40e9032358c1c -commit f29934066bd0e561a2e516b7e584fb92d2eedee0 -Author: Darren Tucker -Date: Thu Nov 23 19:41:27 2023 +1100 +commit d31c21c57fb4245271680a1e5043cf6470a96766 +Author: naddy@openbsd.org +Date: Sat Feb 10 11:28:52 2024 +0000 - Add an Ubuntu 22.04 test VM. + upstream: clean sshd random relinking kit; ok miod@ - This is the same version as Github's runners so most of the testing on - it is over there, but having a local VM makes debugging much easier. + OpenBSD-Commit-ID: 509bb19bb9762a4b3b589af98bac2e730541b6d4 -commit a93284a780cd3972afe5f89086b75d564ba157f3 -Author: Darren Tucker -Date: Thu Nov 23 19:36:22 2023 +1100 +commit 4dbc5a363ff53a2fcecf6bc3bcc038badc12f118 +Author: djm@openbsd.org +Date: Fri Feb 2 00:13:34 2024 +0000 - Add gcc-12 -Werror test on Ubuntu 22.04. + upstream: whitespace - Explictly specify gcc-11 on Ubuntu 22.04 (it's the system compiler). + OpenBSD-Commit-ID: b24680bc755b621ea801ff8edf6f0f02b68edae1 -commit 670f5a647e98b6fd95ad64f789f87ee3274b481b +commit efde85dda2130272af24cc346f6c3cd326182ff1 Author: Darren Tucker -Date: Thu Nov 23 19:34:57 2023 +1100 +Date: Mon Feb 19 17:29:31 2024 +1100 - Check return value from write to prevent warning. + Improve error message for OpenSSL header check. - ... and since we're testing for flags with -Werror, this caused - configure to mis-detect compiler flags. + bz#3668, ok djm@ -commit cea007d691cfedfa07a5b8599f97ce0511f53fc9 +commit cbbdf868bce431a59e2fa36ca244d5739429408d Author: Darren Tucker -Date: Wed Nov 22 21:18:55 2023 +1100 +Date: Wed Feb 7 13:45:02 2024 +1100 - Run compiler test program when compiling natively. - - ok djm@ + Interop test against PuTTY snapshot and releases. -commit ee0d305828f13536c0a416bbf9c3e81039d9ea55 +commit 91898bf786b0f149f962c4c96c08a46f29888c10 Author: Darren Tucker -Date: Wed Nov 22 21:18:07 2023 +1100 +Date: Tue Feb 6 16:21:05 2024 +1100 - Factor out compiler test program into a macro. + Put privsep dir on OS X on /usr/local. - ok djm@ + On some runners we can't create /var/empty, so put it some place we can + write. Should fix test breakage on Max OS X 11. -commit de304c76316b029df460673725a9104224b9959b +commit be5ed8ebed8388c5056bfde4688308cc873c18b9 Author: Darren Tucker -Date: Wed Nov 22 08:55:36 2023 +1100 +Date: Tue Feb 6 11:19:42 2024 +1100 - Add fbsd14 VM to test pool. + Add --disable-fd-passing option. + + .. and enable for the minix3 test VM. This will cause it to more reliably + skip tests that need FD passing and should fix the current test breakage. -commit 99a2df5e1994cdcb44ba2187b5f34d0e9190be91 +commit 0f6a8a0d0a518fd78c4cbebfdac990a57a1c4e41 Author: Darren Tucker -Date: Tue Nov 21 16:19:29 2023 +1100 +Date: Tue Feb 6 11:18:44 2024 +1100 - Expand -fzero-call-used-regs test to cover gcc 11. - - It turns out that gcc also has some problems with -fzero-call-used-regs, - at least v11 on mips. Previously the test in OSSH_CHECK_CFLAG_COMPILE - was sufficient to catch it with "=all", but not sufficient for "=used". - Expand the testcase and include it in the other tests for good measure. - See bz#3629. ok djm@. + Use "skip" function instead doing it ourselves. -commit ff220d4010717f7bfbbc02a2400666fb9d24f250 -Author: Darren Tucker -Date: Tue Nov 21 14:04:34 2023 +1100 +commit 3ad669f81aabbd2ba9fbd472903f680f598e1e99 +Author: Damien Miller +Date: Thu Feb 1 14:01:18 2024 +1100 - Stop using -fzero-call-used-regs=all + ignore some vim droppings + +commit c283f29d23611a06bbee06bcf458f2fffad721d9 +Author: djm@openbsd.org +Date: Thu Feb 1 02:37:33 2024 +0000 + + upstream: whitespace - ... since it seems to be problematic with several different versions of - clang. Only use -fzero-call-used-regs=used which is less - problematic, except with Apple's clang where we don't use it at all. - bz#3629, ok djm@ + OpenBSD-Commit-ID: bf9e4a1049562ee4322684fbdce07142f04fdbb7 -commit 2a19e02f36b16f0f6cc915f7d1e60ead5e36303b -Author: Darren Tucker -Date: Tue Nov 21 14:02:18 2023 +1100 +commit 0d96b1506b2f4757fefa5d1f884d49e96a6fd4c3 +Author: Damien Miller +Date: Tue Jan 16 14:40:18 2024 +1100 - Allow for vendor prefix on clang version numbers. + skip tests that use multiplexing on Windows - Correctly detects the version of OpenBSD's native clang, as well as - Apple's. Spotted tb@, ok djm@. + Some tests here use multiplexing, skip these if DISABLE_FD_PASSING + is set. Should unbreak tests on Windows. -commit c52db0114826d73eff6cdbf205e9c1fa4f7ca6c6 +commit 50080fa42f5f744b798ee29400c0710f1b59f50e Author: djm@openbsd.org -Date: Mon Nov 20 02:50:00 2023 +0000 +Date: Thu Jan 11 04:50:28 2024 +0000 - upstream: set errno=EAFNOSUPPORT when filtering addresses that don't + upstream: don't disable RSA test when DSA is disabled; bug introduced - match AddressFamily; yields slightly better error message if no address - matches. bz#3526 + in last commit - OpenBSD-Commit-ID: 29cea900ddd8b04a4d1968da5c4a893be2ebd9e6 + OpenBSD-Regress-ID: 8780a7250bf742b33010e9336359a1c516f2d7b5 -commit 26f3f3bbc69196d908cad6558c8c7dc5beb8d74a +commit 415c94ce17288e0cdcb9e58cc91fba78d33c8457 Author: djm@openbsd.org -Date: Wed Nov 15 23:03:38 2023 +0000 +Date: Thu Jan 11 01:45:58 2024 +0000 - upstream: when connecting via socket (the default case), filter + upstream: make DSA testing optional, defaulting to on - addresses by AddressFamily if one was specified. Fixes the case where, if - CanonicalizeHostname is enabled, ssh may ignore AddressFamily. bz5326; ok - dtucker + ok markus - OpenBSD-Commit-ID: 6c7d7751f6cd055126b2b268a7b64dcafa447439 + OpenBSD-Regress-ID: dfc27b5574e3f19dc4043395594cea5f90b8572a -commit 050c335c8da43741ed0df2570ebfbd5d1dfd0a31 +commit f9311e8921d92c5efca767227a497ab63280ac39 Author: djm@openbsd.org -Date: Wed Nov 15 22:51:49 2023 +0000 +Date: Thu Jan 11 01:51:16 2024 +0000 - upstream: when deciding whether to enable keystroke timing - - obfuscation, only consider enabling it when a channel with a tty is open. + upstream: ensure key_fd is filled when DSA is disabled; spotted by - Avoids turning on the obfucation when X11 forwarding only is in use, - which slows it right down. Reported by Roger Marsh + tb@ - OpenBSD-Commit-ID: c292f738db410f729190f92de100c39ec931a4f1 + OpenBSD-Commit-ID: 9dd417b6eec3cf67e870f147464a8d93f076dce7 -commit 676377ce67807a24e08a54cd60ec832946cc6cae -Author: tobhe@openbsd.org -Date: Mon Nov 13 09:18:19 2023 +0000 +commit 4e838120a759d187b036036610402cbda33f3203 +Author: djm@openbsd.org +Date: Thu Jan 11 01:45:36 2024 +0000 - upstream: Make sure sftp_get_limits() only returns 0 if 'limits' + upstream: make DSA key support compile-time optional, defaulting to - was initialized. This fixes a potential uninitialized use of 'limits' in - sftp_init() if sftp_get_limits() returned early because of an unexpected - message type. + on - ok djm@ + ok markus@ - OpenBSD-Commit-ID: 1c177d7c3becc1d71bc8763eecf61873a1d3884c + OpenBSD-Commit-ID: 4f8e98fc1fd6de399d0921d5b31b3127a03f581d -commit 64e0600f23c6dec36c3875392ac95b8a9100c2d6 -Author: Darren Tucker -Date: Mon Nov 13 20:03:31 2023 +1100 +commit afcc9028bfc411bc26d20bba803b83f90cb84e26 +Author: jmc@openbsd.org +Date: Wed Jan 10 06:33:13 2024 +0000 - Test current releases of LibreSSL and OpenSSL. + upstream: fix incorrect capitalisation; - Retire some of the older releases. + OpenBSD-Commit-ID: cb07eb06e15fa2334660ac73e98f29b6a1931984 -commit c8ed7cc545879ac15f6ce428be4b29c35598bb2a -Author: dtucker@openbsd.org -Date: Wed Nov 1 02:08:38 2023 +0000 +commit 9707c8170c0c1baeb1e06e5a53f604498193885f +Author: djm@openbsd.org +Date: Tue Jan 9 22:19:36 2024 +0000 - upstream: Specify ssh binary to use + upstream: extend ChannelTimeout regression test to exercise multiplexed - ... instead of relying on installed one. Fixes test failures in -portable - when running tests prior to installation. + connections and the new "global" timeout type. ok dtucker@ - OpenBSD-Regress-ID: b6d6ba71c23209c616efc805a60d9a445d53a685 + OpenBSD-Regress-ID: f10d19f697024e9941acad7c2057f73d6eacb8a2 -commit e9fc2c48121cada1b4dcc5dadea5d447fe0093c3 -Author: Darren Tucker -Date: Wed Nov 1 13:11:31 2023 +1100 +commit b31b12d28de96e1d43581d32f34da8db27e11c03 +Author: djm@openbsd.org +Date: Tue Jan 9 22:19:00 2024 +0000 - Put long-running test targets on hipri runners. + upstream: add a "global" ChannelTimeout type to ssh(1) and sshd(8) - Some of the selfhosted test targets take a long time to run for various - reasons, so label them for "libvirt-hipri" runners so that they can - start immediately. This should reduce the time to complete all tests. + that watches all open channels and will close all open channels if there is + no traffic on any of them for the specified interval. This is in addition to + the existing per-channel timeouts added a few releases ago. + + This supports use-cases like having a session + x11 forwarding channel + open where one may be idle for an extended period but the other is + actively used. The global timeout would allow closing both channels when + both have been idle for too long. + + ok dtucker@ + + OpenBSD-Commit-ID: 0054157d24d2eaa5dc1a9a9859afefc13d1d7eb3 -commit 7ddf27668f0e21233f08c0ab2fe9ee3fdd6ab1e2 +commit 602f4beeeda5bb0eca181f8753d923a2997d0a51 Author: djm@openbsd.org -Date: Wed Nov 1 00:29:46 2023 +0000 +Date: Tue Jan 9 21:39:14 2024 +0000 - upstream: add some tests of forced commands overriding Subsystem + upstream: adapt ssh_api.c code for kex-strict - directives + from markus@ ok me - OpenBSD-Regress-ID: eb48610282f6371672bdf2a8b5d2aa33cfbd322b + OpenBSD-Commit-ID: 4d9f256852af2a5b882b12cae9447f8f00f933ac -commit fb06f9b5a065dfbbef5916fc4accc03c0bf026dd -Author: dtucker@openbsd.org -Date: Tue Oct 31 04:15:40 2023 +0000 +commit 42ba34aba8708cf96583ff52975d95a8b47d990d +Author: Damien Miller +Date: Mon Jan 8 16:26:37 2024 +1100 - upstream: Don't try to use sudo inside sshd log wrapper. - - We still need to check if we're using sudo since we don't want to chown - unecessarily, as on some platforms this causes an error which pollutes - stderr. We also don't want to unnecessarily invoke sudo, since it's - running in the context of the proxycommand, on *other* platforms it - may not be able to authenticate, and if we're using SUDO then it should - already be privileged. - - OpenBSD-Regress-ID: 70d58df7503db699de579a9479300e5f3735f4ee + nite that recent OSX tun/tap is unsupported -commit fc3cc33e88c242c704781c6c48087838f1dcfa2a -Author: dtucker@openbsd.org -Date: Tue Oct 31 02:58:45 2023 +0000 +commit 690bc125f9a3b20e47745fa8f5b5e1fd5820247f +Author: Sevan Janiyan +Date: Wed Dec 27 04:57:49 2023 +0000 - upstream: Only try to chmod logfile if we have sudo. If we don't have - - sudo then we won't need to chmod. + README.platform: update tuntap url + +commit 6b8be2ccd7dd091808f86af52066b0c2ec30483a +Author: Rose <83477269+AtariDreams@users.noreply.github.com> *** 17604 LINES SKIPPED *** From nobody Mon Mar 25 22:32:20 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V3SNh5H8Nz5FRqw; Mon, 25 Mar 2024 22:32: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 4V3SNh3z44z4D3l; Mon, 25 Mar 2024 22:32:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711405940; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jh2vnTJS43rcgGmhMT582GCYALCv8jVUNTKz8yiwMVA=; b=W3KcCd80SJhdYrojdsIJFe/tKt+6N3xL6sybtw9SA+HYfAHuV6CWtXqG0kGIquUUm3zrO6 ti/c3m2WfL2iwKl6SW8PMpJrQaCNum3+orZcGnD2IIDNmdHQZuphDe+wDZ5VZ98PvUCqPl CrAE7q3bIo78glbTtPzpsKv5YCkaFLu3tGdBNdux4rCv5FjJHiU1LHm8y+qIX8fFKk5Rpe Sg/dwBc0WOtQCLHu0lb9Cis8nB4t4CyYjgvW359UfxeXYunbXVQz7QpmnqPqcrb96W6fzw 7WAJB/HtiBRLBj2PgfFid4y6N/0uiuDjgXTG9IX7krqQc7bPbzHPwRoPUmDIZg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711405940; a=rsa-sha256; cv=none; b=g/FHO1TqS6u01erahnjRe54cXrVCdxFS7eaexNyc/QcrMTlNdRByYY/Y+umxk/QYE5A/8Q GfcTdD9tPyOq7DdutpTEAdIPN5jix5kqSkb7dRMrKCAfHr9m5PKpBxA1NN3MbOHmJGjszk VhKzjXmHQskvWQL1IB/db7QaP/mvqMWTWfze8Tf5bppXOqnuVL7ef73thfeLeOjSUY/KiW 4+kbOgvxcp1bDH9W51DHdNxFzabBFtV/oAEd3wTLEuBuZcrLMGCYjhXeqYJTP3sZvjZai3 iZsLkFpSYfjq0kT6V6RxAZu7f22xlI8hBIWEvAc9YE+0aj+jcSO+1bjj5FNfYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711405940; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jh2vnTJS43rcgGmhMT582GCYALCv8jVUNTKz8yiwMVA=; b=fTdJoENhYACPDi7gIGBQNO8/2RTNInqjLNw/mB2cF9XbYC9QBarI2plkKbTnEX+iUnKK4n 1XMEqRfgpvjBDylRH9GC0WzfLki/czA77FCJSJmI1TZeZCetBYXqLzkHkyEy60W8cFV5zV X/Gby85bL3VI0ZhwVVY3Ej1ndlUq5BjSzXMTsSO5fvDhbMbbnpY/0CCLUzXHEeoR999LyO AlH/VKvGCpLVVQ3gquc0bJu7G0NHArqfTcrexAP2GCDM3Au5M0RSR9klcdFM6cXbgJiXt1 2C3Pm9tUPXyVHo3stgIelJhf+8JkETIxgRSQaXe9CogRzM+P7ay2kDDKys8k+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 4V3SNh2ktmzb6F; Mon, 25 Mar 2024 22:32:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42PMWKUw057581; Mon, 25 Mar 2024 22:32:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42PMWKOQ057578; Mon, 25 Mar 2024 22:32:20 GMT (envelope-from git) Date: Mon, 25 Mar 2024 22:32:20 GMT Message-Id: <202403252232.42PMWKOQ057578@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 495bdd698e42 - stable/14 - linuxkpi: remove invalid KASSERT from hash_add_rcu List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 495bdd698e426a5f19ed13a73062c2158618f7b7 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=495bdd698e426a5f19ed13a73062c2158618f7b7 commit 495bdd698e426a5f19ed13a73062c2158618f7b7 Author: Ed Maste AuthorDate: 2024-01-29 14:25:40 +0000 Commit: Ed Maste CommitDate: 2024-03-25 22:31:44 +0000 linuxkpi: remove invalid KASSERT from hash_add_rcu hash_add_rcu asserted that the node's prev pointer was NULL in an attempt to detect addition of a node already on a list, but the caller is not required to provide a zeroed node. Reported in https://github.com/freebsd/drm-kmod/issues/282 Reviewed by: bz, manu Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D43645 (cherry picked from commit 7e77089dccd702eb767350a8bd3d20102c4fb591) --- sys/compat/linuxkpi/common/include/linux/hashtable.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/hashtable.h b/sys/compat/linuxkpi/common/include/linux/hashtable.h index 5703d6282ad7..55755c354959 100644 --- a/sys/compat/linuxkpi/common/include/linux/hashtable.h +++ b/sys/compat/linuxkpi/common/include/linux/hashtable.h @@ -92,8 +92,6 @@ __hash_node_type_assert(struct hlist_node *node) #define hash_add_rcu(ht, node, key) do { \ struct lkpi_hash_head *__head = &(ht)[hash_min(key, HASH_BITS(ht))]; \ __hash_node_type_assert(node); \ - KASSERT(((struct lkpi_hash_entry *)(node))->entry.cle_prev == NULL, \ - ("node is already on list or was not zeroed")); \ CK_LIST_INSERT_HEAD(&__head->head, \ (struct lkpi_hash_entry *)(node), entry); \ } while (0) From nobody Mon Mar 25 22:39:24 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V3SXs0Plmz5FSrN; Mon, 25 Mar 2024 22:39: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 4V3SXs01Gnz4Dws; Mon, 25 Mar 2024 22:39:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711406365; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q5QsZ3c12ngcEKw7uByCbjIdZln3W0IIZ0+vCgZYu8E=; b=YF7ZH4n9cYbTOMkpQVphp0NXgLXbxSwv11va5JTn4riAABQfkZkpy+RK4iM3VXYtw+g84p 1KU2chfElMB5o6lN/RkoCWhAPt9Oy+Gl4h32X+/Wu/7JVUvRP9Rtc61peynMcxj/80uymN H5yzh0ik3tuqOgDiYinlxEyRpEruIOjUqhe8/+GHts5iko86YPjLQ5ZNZPFkdEh2F0putj cHVW3CvVtZEAlW7p+afbkkxHN9AuvS7jCKoxer0Hcee5CQwEucd8YitRHF5MFclu2alPmW n3Ej4QwCdfBL3xRfRf/yVmkBzBBkoilJ2sXPO0MvF/G3lpACOftyiIMKLsUfZA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711406365; a=rsa-sha256; cv=none; b=lU+BAS8Ab/P11sRZDUlAWunCvr3e3l8rxvksE440GQcgSV/ZR655xFJuc0RQoSMzoMV7Oj gPiUZUsyt9jDZLFaMBUuKdX+j9pl+eCzSw+bm1K+W4Ife+Ms4kWZopuYrqp16FHOv/0/4M bhrhk2jddbvBdT495XuHphKbFjjVRkrPsdaCwMfIgs0l/jSFjq2NFRkTMDzWZUXZ9dK2Ec 1jUWZT1IBHy4i9H7aIFQZF3jEmomnwNaxuv6r2NCNaFxJUYgyuN9GjqNAO3w4Ekylmk6+2 AWJBEXDC10qbBvSl2VSr37WB4l1teZH4oBWiHYG4KS9pGTi4mH+yxDMWZDJjEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711406365; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q5QsZ3c12ngcEKw7uByCbjIdZln3W0IIZ0+vCgZYu8E=; b=AgPzObpV+Oh4qeOaB96jClTwco1U9LeQaxM0O3mwMTTE35EFgvoy43x73P/otD4FI1Xx18 B58FhCqCUviDOCk0V+zYzNLoA3oo1kml7b02j1Upvyom+tkcFQkz2UlbbDBKexSxTfJpH1 oyZS2nJV1FQSf7uY60gM3pp/m5pDdzikxxztCK1/uLsQn9ErzIIKICBhPUvDrgRCVCydud FGH5PkXxr5VAmrBd9dN662avSB6qoOVWRcS5aFig7sWC8GKBLK3+xbWI2mf1WQyT5DWHmT 17nP0Tn1XnuVfUWquwFOWjw8gn5DvDUUSRLxgVIVQyPM9HNjPoyVWfHGgzFG3Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V3SXr6jxvzZjX; Mon, 25 Mar 2024 22:39:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42PMdO8W060698; Mon, 25 Mar 2024 22:39:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42PMdOHH060695; Mon, 25 Mar 2024 22:39:24 GMT (envelope-from git) Date: Mon, 25 Mar 2024 22:39:24 GMT Message-Id: <202403252239.42PMdOHH060695@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: b16cb28aca00 - stable/13 - ssh: Update to OpenSSH 9.7p1 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b16cb28aca00112db2a7b5c070ee019c100cbc20 Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=b16cb28aca00112db2a7b5c070ee019c100cbc20 commit b16cb28aca00112db2a7b5c070ee019c100cbc20 Author: Ed Maste AuthorDate: 2024-03-18 14:00:57 +0000 Commit: Ed Maste CommitDate: 2024-03-25 22:39:14 +0000 ssh: Update to OpenSSH 9.7p1 This release contains mostly bugfixes. It also makes support for the DSA signature algorithm a compile-time option, with plans to disable it upstream later this year and remove support entirely in 2025. Full release notes at https://www.openssh.com/txt/release-9.7 Relnotes: Yes Sponsored by: The FreeBSD Foundation (cherry picked from commit a91a246563dffa876a52f53a98de4af9fa364c52) (cherry picked from commit 464fa66f639bdc8e340dd3f640af4309530d48ca) --- crypto/openssh/.github/configs | 21 +- crypto/openssh/.github/setup_ci.sh | 26 + crypto/openssh/.github/workflows/c-cpp.yml | 20 +- crypto/openssh/.github/workflows/selfhosted.yml | 1 + crypto/openssh/.gitignore | 2 + crypto/openssh/.skipped-commit-ids | 2 + crypto/openssh/ChangeLog | 11979 +++++++++---------- crypto/openssh/PROTOCOL | 22 +- crypto/openssh/PROTOCOL.agent | 4 +- crypto/openssh/PROTOCOL.mux | 4 +- crypto/openssh/README | 2 +- crypto/openssh/README.platform | 9 +- crypto/openssh/channels.c | 79 +- crypto/openssh/clientloop.c | 4 +- crypto/openssh/config.h | 3 + crypto/openssh/configure.ac | 50 +- crypto/openssh/contrib/redhat/openssh.spec | 2 +- crypto/openssh/contrib/suse/openssh.spec | 2 +- crypto/openssh/gss-genr.c | 8 +- crypto/openssh/kex.c | 31 +- crypto/openssh/kex.h | 10 +- crypto/openssh/m4/openssh.m4 | 12 +- crypto/openssh/misc.c | 15 +- crypto/openssh/misc.h | 3 +- crypto/openssh/nchan.c | 4 +- crypto/openssh/openbsd-compat/getopt.h | 12 +- crypto/openssh/openbsd-compat/openbsd-compat.h | 10 +- crypto/openssh/packet.c | 2 +- crypto/openssh/packet.h | 2 +- crypto/openssh/readconf.c | 165 +- crypto/openssh/readconf.h | 8 +- crypto/openssh/regress/Makefile | 77 +- crypto/openssh/regress/channel-timeout.sh | 74 +- crypto/openssh/regress/dynamic-forward.sh | 9 +- crypto/openssh/regress/misc/fuzz-harness/Makefile | 8 +- .../regress/misc/fuzz-harness/agent_fuzz_helper.c | 7 + crypto/openssh/regress/multiplex.sh | 3 +- crypto/openssh/regress/putty-ciphers.sh | 51 +- crypto/openssh/regress/putty-kex.sh | 40 +- crypto/openssh/regress/putty-transfer.sh | 13 +- crypto/openssh/regress/test-exec.sh | 28 +- crypto/openssh/regress/unittests/Makefile.inc | 7 +- .../regress/unittests/hostkeys/test_iterate.c | 11 +- crypto/openssh/regress/unittests/kex/test_kex.c | 4 +- .../openssh/regress/unittests/sshkey/test_file.c | 4 +- .../openssh/regress/unittests/sshkey/test_fuzz.c | 8 +- .../openssh/regress/unittests/sshkey/test_sshkey.c | 23 +- crypto/openssh/regress/unittests/sshsig/tests.c | 4 +- crypto/openssh/servconf.c | 168 +- crypto/openssh/session.c | 4 +- crypto/openssh/sftp.c | 44 +- crypto/openssh/ssh-add.1 | 14 +- crypto/openssh/ssh-add.c | 10 +- crypto/openssh/ssh-agent.c | 48 +- crypto/openssh/ssh-dss.c | 7 +- crypto/openssh/ssh-keygen.c | 26 +- crypto/openssh/ssh-keyscan.c | 8 +- crypto/openssh/ssh-keysign.c | 7 +- crypto/openssh/ssh-pkcs11-client.c | 2 + crypto/openssh/ssh.c | 6 +- crypto/openssh/ssh_api.c | 14 +- crypto/openssh/ssh_config | 2 +- crypto/openssh/ssh_config.5 | 26 +- crypto/openssh/ssh_namespace.h | 1 + crypto/openssh/sshbuf-getput-crypto.c | 4 +- crypto/openssh/sshconnect.c | 4 +- crypto/openssh/sshconnect2.c | 21 +- crypto/openssh/sshd.c | 4 +- crypto/openssh/sshd_config | 2 +- crypto/openssh/sshd_config.5 | 59 +- crypto/openssh/sshkey.c | 12 +- crypto/openssh/sshsig.c | 4 +- crypto/openssh/version.h | 6 +- crypto/openssh/xmss_hash.c | 4 +- 74 files changed, 6366 insertions(+), 7026 deletions(-) diff --git a/crypto/openssh/.github/configs b/crypto/openssh/.github/configs index df82faf5046b..370fe29a3ee4 100755 --- a/crypto/openssh/.github/configs +++ b/crypto/openssh/.github/configs @@ -164,6 +164,11 @@ case "$config" in libressl-*) LIBCRYPTOFLAGS="--with-ssl-dir=/opt/libressl --with-rpath=-Wl,-rpath," ;; + putty-*) + CONFIGFLAGS="--with-plink=/usr/local/bin/plink --with-puttygen=/usr/local/bin/puttygen" + # We don't need to rerun the regular tests, just the interop ones. + TEST_TARGET=interop-tests + ;; openssl-*) LIBCRYPTOFLAGS="--with-ssl-dir=/opt/openssl --with-rpath=-Wl,-rpath," # OpenSSL 1.1.1 specifically has a bug in its RNG that breaks reexec @@ -269,20 +274,22 @@ case "${TARGET_HOST}" in ;; minix3) CONFIGFLAGS="${CONFIGFLAGS} --disable-security-key" + # Unix domain sockets don't work quite like we expect, so also + # disable FD passing (and thus multiplexing). + CONFIGFLAGS="${CONFIGFLAGS} --disable-fd-passing" LIBCRYPTOFLAGS="--without-openssl" + # Minix does not have a loopback interface so we have to skip any # test that relies on one. # Also, Minix seems to be very limited in the number of select() # calls that can be operating concurrently, so prune additional tests for that. T="addrmatch agent-restrict brokenkeys cfgmatch cfgmatchlisten cfgparse - connect connect-uri exit-status forwarding hostkey-agent - key-options keyscan knownhosts-command login-timeout + connect connect-uri dynamic-forward exit-status forwarding + forward-control + hostkey-agent key-options keyscan knownhosts-command login-timeout reconfigure reexec rekey scp scp-uri scp3 sftp sftp-badcmds sftp-batch sftp-cmds sftp-glob sftp-perm sftp-uri stderr-data transfer" - # Unix domain sockets don't work quite like we expect, so also skip any tests - # that use multiplexing. - T="$T connection-timeout dynamic-forward forward-control multiplex" SKIP_LTESTS="$(echo $T)" TEST_TARGET=t-exec SUDO="" @@ -320,6 +327,10 @@ case "$host" in # modern versions don't ship with libcrypto. LIBCRYPTOFLAGS="--without-openssl" TEST_TARGET=t-exec + + # On some OS X runners we can't write to /var/empty. + CONFIGFLAGS="${CONFIGFLAGS} --with-privsep-path=/usr/local/empty" + case "$host" in *-darwin22.*) # sudo -S nobody doesn't work on macos 13 for some reason. diff --git a/crypto/openssh/.github/setup_ci.sh b/crypto/openssh/.github/setup_ci.sh index d0ba7b4724e9..f0f2761c7107 100755 --- a/crypto/openssh/.github/setup_ci.sh +++ b/crypto/openssh/.github/setup_ci.sh @@ -142,6 +142,10 @@ for TARGET in $TARGETS; do INSTALL_BORINGSSL=1 PACKAGES="${PACKAGES} cmake ninja-build" ;; + putty-*) + INSTALL_PUTTY=$(echo "${TARGET}" | cut -f2 -d-) + PACKAGES="${PACKAGES} cmake" + ;; valgrind*) PACKAGES="$PACKAGES valgrind" ;; @@ -241,3 +245,25 @@ if [ ! -z "${INSTALL_ZLIB}" ]; then cd ${HOME}/zlib && ./configure && make && sudo make install prefix=/opt/zlib) fi + +if [ ! -z "${INSTALL_PUTTY}" ]; then + ver="${INSTALL_PUTTY}" + case "${INSTALL_PUTTY}" in + snapshot) + tarball=putty.tar.gz + (cd /tmp && wget https://tartarus.org/~simon/putty-snapshots/${tarball}) + ;; + *) + tarball=putty-${ver}.tar.gz + (cd /tmp && wget https://the.earth.li/~sgtatham/putty/${ver}/${tarball}) + ;; + esac + (cd ${HOME} && tar xfz /tmp/${tarball} && cd putty-* + if [ -f CMakeLists.txt ]; then + cmake . && cmake --build . && sudo cmake --build . --target install + else + ./configure && make && sudo make install + fi + ) + /usr/local/bin/plink -V +fi diff --git a/crypto/openssh/.github/workflows/c-cpp.yml b/crypto/openssh/.github/workflows/c-cpp.yml index 8f624d21016c..edb88f23c0fb 100644 --- a/crypto/openssh/.github/workflows/c-cpp.yml +++ b/crypto/openssh/.github/workflows/c-cpp.yml @@ -62,20 +62,32 @@ jobs: - { target: ubuntu-latest, config: libressl-3.5.3 } - { target: ubuntu-latest, config: libressl-3.6.1 } - { target: ubuntu-latest, config: libressl-3.7.2 } - - { target: ubuntu-latest, config: libressl-3.8.2 } + - { target: ubuntu-latest, config: libressl-3.8.3 } + - { target: ubuntu-latest, config: libressl-3.9.0 } - { target: ubuntu-latest, config: openssl-master } - { target: ubuntu-latest, config: openssl-noec } - { target: ubuntu-latest, config: openssl-1.1.1 } - { target: ubuntu-latest, config: openssl-1.1.1t } - { target: ubuntu-latest, config: openssl-1.1.1w } - { target: ubuntu-latest, config: openssl-3.0.0 } - - { target: ubuntu-latest, config: openssl-3.0.12 } + - { target: ubuntu-latest, config: openssl-3.0.13 } - { target: ubuntu-latest, config: openssl-3.1.0 } - - { target: ubuntu-latest, config: openssl-3.1.4 } - - { target: ubuntu-latest, config: openssl-3.2.0 } + - { target: ubuntu-latest, config: openssl-3.1.5 } + - { target: ubuntu-latest, config: openssl-3.2.1 } - { target: ubuntu-latest, config: openssl-1.1.1_stable } - { target: ubuntu-latest, config: openssl-3.0 } # stable branch - { target: ubuntu-latest, config: openssl-3.2 } # stable branch + - { target: ubuntu-latest, config: putty-0.71 } + - { target: ubuntu-latest, config: putty-0.72 } + - { target: ubuntu-latest, config: putty-0.73 } + - { target: ubuntu-latest, config: putty-0.74 } + - { target: ubuntu-latest, config: putty-0.75 } + - { target: ubuntu-latest, config: putty-0.76 } + - { target: ubuntu-latest, config: putty-0.77 } + - { target: ubuntu-latest, config: putty-0.78 } + - { target: ubuntu-latest, config: putty-0.79 } + - { target: ubuntu-latest, config: putty-0.80 } + - { target: ubuntu-latest, config: putty-snapshot } - { target: ubuntu-latest, config: zlib-develop } - { target: ubuntu-22.04, config: pam } - { target: ubuntu-22.04, config: krb5 } diff --git a/crypto/openssh/.github/workflows/selfhosted.yml b/crypto/openssh/.github/workflows/selfhosted.yml index be0b4ffec580..4f1c587a5779 100644 --- a/crypto/openssh/.github/workflows/selfhosted.yml +++ b/crypto/openssh/.github/workflows/selfhosted.yml @@ -73,6 +73,7 @@ jobs: - { target: fbsd14, config: pam, host: libvirt } - { target: nbsd8, config: pam, host: libvirt } - { target: nbsd9, config: pam, host: libvirt } + - { target: nbsd10, config: pam, host: libvirt } # VMs with persistent disks that have their own runner. - { target: win10, config: default, host: win10 } - { target: win10, config: cygwin-release, host: win10 } diff --git a/crypto/openssh/.gitignore b/crypto/openssh/.gitignore index 5e4ae5a60d06..7fccc6fe3dc3 100644 --- a/crypto/openssh/.gitignore +++ b/crypto/openssh/.gitignore @@ -18,6 +18,8 @@ survey.sh **/*.so **/*.out **/*.a +**/*.un~ +**/.*.swp autom4te.cache/ scp sftp diff --git a/crypto/openssh/.skipped-commit-ids b/crypto/openssh/.skipped-commit-ids index 59e80518acf2..06303955c566 100644 --- a/crypto/openssh/.skipped-commit-ids +++ b/crypto/openssh/.skipped-commit-ids @@ -1,3 +1,4 @@ +509bb19bb9762a4b3b589af98bac2e730541b6d4 clean sshd random relinking kit 5317f294d63a876bfc861e19773b1575f96f027d remove libssh from makefiles a337e886a49f96701ccbc4832bed086a68abfa85 Makefile changes f2c9feb26963615c4fece921906cf72e248b61ee more Makefile @@ -27,6 +28,7 @@ cc12a9029833d222043aecd252d654965c351a69 moduli-gen Makefile f9a0726d957cf10692a231996a1f34e7f9cdfeb0 moduli update 1e0a2692b7e20b126dda60bf04999d1d30d959d8 sshd relinking makefile changes e1dc11143f83082e3154d6094f9136d0dc2637ad more relinking makefile tweaks +5a636f6ca7f25bfe775df4952f7aac90a7fcbbee moduli update Old upstream tree: diff --git a/crypto/openssh/ChangeLog b/crypto/openssh/ChangeLog index 981b7ecd94b6..3bbccf5ea3eb 100644 --- a/crypto/openssh/ChangeLog +++ b/crypto/openssh/ChangeLog @@ -1,9505 +1,8300 @@ -commit 8241b9c0529228b4b86d88b1a6076fb9f97e4a99 +commit 86bdd3853f4d32c85e295e6216a2fe0953ad93f0 Author: Damien Miller -Date: Tue Dec 19 01:59:50 2023 +1100 +Date: Mon Mar 11 16:20:49 2024 +1100 - crank versions + version number in README -commit 2f2c65cb5f1518a9c556d3e8efa27ea0ca305c6b +commit 282721418e6465bc39ccfd39bb0133e670ee4423 Author: Damien Miller -Date: Tue Dec 19 01:59:06 2023 +1100 +Date: Mon Mar 11 16:20:08 2024 +1100 - depend + crank RPM spec versions -commit e48cdee8e19059203b1aeeabec2350b8375fa61f +commit 3876a3bbd2ca84d23ba20f8b69ba83270c04ce3a Author: djm@openbsd.org -Date: Mon Dec 18 14:50:08 2023 +0000 +Date: Mon Mar 11 04:59:47 2024 +0000 - upstream: regress test for agent PKCS#11-backed certificates + upstream: openssh-9.7 - OpenBSD-Regress-ID: 38f681777cb944a8cc3bf9d0ad62959a16764df9 + OpenBSD-Commit-ID: 618ececf58b8cdae016b149787af06240f7b0cbc -commit 2f512f862df1d5f456f82a0334c9e8cc7208a2a1 -Author: djm@openbsd.org -Date: Mon Dec 18 14:49:39 2023 +0000 +commit 8fc109cc614954a8eb2738c48c0db36a62af9a06 +Author: Darren Tucker +Date: Mon Mar 11 12:59:26 2024 +1100 - upstream: regress test for constrained PKCS#11 keys + Test against current OpenSSL and LibreSSL releases. - OpenBSD-Regress-ID: b2f26ae95d609d12257b43aef7cd7714c82618ff + Add LibreSSL 3.9.0, bump older branches to their respective current + releases. -commit cdddd66412ca5920ed4d3ebbfa6ace12dbd9b82f -Author: djm@openbsd.org -Date: Mon Dec 18 14:48:44 2023 +0000 +commit 26b09b45fec7b88ba09042c09be4157e58e231e2 +Author: Damien Miller +Date: Sun Mar 10 16:24:57 2024 +1100 - upstream: openssh-9.6 + quote regexes used to test for algorithm support - OpenBSD-Commit-ID: 21759837cf0e0092d9a2079f8fb562071c11016b + Fixes test failures on Solaris 8 reported by Tom G. Christensen -commit 6d51feab157cedf1e7ef5b3f8781ca8ff9c4ab1b +commit a6a740a4948d10a622b505135bb485c10f21db5e Author: djm@openbsd.org -Date: Mon Dec 18 14:48:08 2023 +0000 +Date: Sat Mar 9 05:12:13 2024 +0000 - upstream: ssh-agent: record failed session-bind attempts - - Record failed attempts to session-bind a connection and refuse signing - operations on that connection henceforth. - - Prevents a future situation where we add a new hostkey type that is not - recognised by an older ssh-agent, that consequently causes session-bind - to fail (this situation is only likely to arise when people mix ssh(1) - and ssh-agent(1) of different versions on the same host). Previously, - after such a failure the agent socket would be considered unbound and - not subject to restriction. + upstream: avoid logging in signal handler by converting mainloop to - Spotted by Jann Horn + ppoll() bz3670, reported by Ben Hamilton; ok dtucker@ - OpenBSD-Commit-ID: b0fdd023e920aa4831413f640de4c5307b53552e + OpenBSD-Commit-ID: e58f18042b86425405ca09e6e9d7dfa1df9f5f7f -commit 7ef3787c84b6b524501211b11a26c742f829af1a +commit cd82f7526e0481720567ae41db7849ab1c27e27b Author: djm@openbsd.org -Date: Mon Dec 18 14:47:44 2023 +0000 +Date: Fri Mar 8 22:16:32 2024 +0000 - upstream: ban user/hostnames with most shell metacharacters + upstream: skip more whitespace, fixes find-principals on - This makes ssh(1) refuse user or host names provided on the - commandline that contain most shell metacharacters. - - Some programs that invoke ssh(1) using untrusted data do not filter - metacharacters in arguments they supply. This could create - interactions with user-specified ProxyCommand and other directives - that allow shell injection attacks to occur. + allowed_signers files with blank lines; reported by Wiktor Kwapisiewicz - It's a mistake to invoke ssh(1) with arbitrary untrusted arguments, - but getting this stuff right can be tricky, so this should prevent - most obvious ways of creating risky situations. It however is not - and cannot be perfect: ssh(1) has no practical way of interpreting - what shell quoting rules are in use and how they interact with the - user's specified ProxyCommand. + OpenBSD-Commit-ID: b3a22a2afd753d70766f34bc7f309c03706b5298 + +commit 2f9d2af5cb19905d87f37d1e11c9f035ac5daf3b +Author: dtucker@openbsd.org +Date: Fri Mar 8 11:34:10 2024 +0000 + + upstream: Invoke ProxyCommand that uses stderr redirection via - To allow configurations that use strange user or hostnames to - continue to work, this strictness is applied only to names coming - from the commandline. Names specified using User or Hostname - directives in ssh_config(5) are not affected. + $TEST_SHELL. Fixes test when run by a user whose login shell is tcsh. + Found by vinschen at redhat.com. - feedback/ok millert@ markus@ dtucker@ deraadt@ + OpenBSD-Regress-ID: f68d79e7f00caa8d216ebe00ee5f0adbb944062a + +commit 9b3f0beb4007a7e01dfedabb429097fb593deae6 +Author: Darren Tucker +Date: Thu Mar 7 17:18:14 2024 +1100 + + Prefer openssl binary from --with-ssl-dir directory. - OpenBSD-Commit-ID: 3b487348b5964f3e77b6b4d3da4c3b439e94b2d9 + Use openssl in the directory specified by --with-ssl-dir as long + as it's functional. Reported by The Doctor. -commit 0cb50eefdd29f0fec31d0e71cc4b004a5f704e67 +commit c47e1c9c7911f38b2fc2fb01b1f6ae3a3121a838 Author: djm@openbsd.org -Date: Mon Dec 18 14:47:20 2023 +0000 +Date: Wed Mar 6 02:59:59 2024 +0000 - upstream: stricter handling of channel window limits - - This makes ssh/sshd more strict in handling non-compliant peers that - send more data than the advertised channel window allows. Previously - the additional data would be silently discarded. This change will - cause ssh/sshd to terminate the connection if the channel window is - exceeded by more than a small grace allowance. + upstream: fix memory leak in mux proxy mode when requesting forwarding. - ok markus@ + found by RASU JSC, reported by Maks Mishin in GHPR#467 - OpenBSD-Commit-ID: 811e21b41831eba3dd7f67b3d409a438f20d3037 + OpenBSD-Commit-ID: 97d96a166b1ad4b8d229864a553e3e56d3116860 -commit 4448a2938abc76e6bd33ba09b2ec17a216dfb491 +commit 242742827fea4508e68097c128e802edc79addb5 Author: djm@openbsd.org -Date: Mon Dec 18 14:46:56 2023 +0000 +Date: Wed Mar 6 00:31:04 2024 +0000 - upstream: Make it possible to load certs from PKCS#11 tokens - - Adds a protocol extension to allow grafting certificates supplied by - ssh-add to keys loaded from PKCS#11 tokens in the agent. - - feedback/ok markus@ + upstream: wrap a few PKCS#11-specific bits in ENABLE_PKCS11 - OpenBSD-Commit-ID: bb5433cd28ede2bc910996eb3c0b53e20f86037f + OpenBSD-Commit-ID: 463e4a69eef3426a43a2b922c4e7b2011885d923 -commit 881d9c6af9da4257c69c327c4e2f1508b2fa754b -Author: djm@openbsd.org -Date: Mon Dec 18 14:46:12 2023 +0000 +commit d52b6509210e2043f33e5a1de58dd4a0d5d48c2a +Author: Damien Miller +Date: Wed Mar 6 11:31:36 2024 +1100 - upstream: apply destination constraints to all p11 keys + disable RSA tests when algorithm is not supported - Previously applied only to the first key returned from each token. + Unbreaks "make test" when compiled --without-openssl. - ok markus@ + Similar treatment to how we do DSA and ECDSA. + +commit 668d270a6c77e8b5a1da26ecad2e6de9f62c8fe4 +Author: Damien Miller +Date: Wed Mar 6 10:33:20 2024 +1100 + + add a --without-retpoline configure option - OpenBSD-Commit-ID: 36df3afb8eb94eec6b2541f063d0d164ef8b488d + discussed with deraadt and dtucker a while ago -commit a7ed931caeb68947d30af8a795f4108b6efad761 +commit 3deb501f86fc47e175ef6a3eaba9b9846a80d444 Author: djm@openbsd.org -Date: Mon Dec 18 14:45:49 2023 +0000 +Date: Mon Mar 4 04:13:18 2024 +0000 - upstream: add "ext-info-in-auth@openssh.com" extension - - This adds another transport protocol extension to allow a sshd to send - SSH2_MSG_EXT_INFO during user authentication, after the server has - learned the username that is being logged in to. - - This lets sshd to update the acceptable signature algoritms for public - key authentication, and allows these to be varied via sshd_config(5) - "Match" directives, which are evaluated after the server learns the - username being authenticated. + upstream: fix leak of CanonicalizePermittedCNAMEs on error path; - Full details in the PROTOCOL file + spotted by Coverity (CID 438039) - OpenBSD-Commit-ID: 1de7da7f2b6c32a46043d75fcd49b0cbb7db7779 + OpenBSD-Commit-ID: 208839699939721f452a4418afc028a9f9d3d8af -commit 1edb00c58f8a6875fad6a497aa2bacf37f9e6cd5 +commit 65a44a8a4f7d902a64d4e60eda84384b2e2a24a2 Author: djm@openbsd.org -Date: Mon Dec 18 14:45:17 2023 +0000 +Date: Mon Mar 4 02:16:11 2024 +0000 - upstream: implement "strict key exchange" in ssh and sshd + upstream: Separate parsing of string array options from applying them - This adds a protocol extension to improve the integrity of the SSH - transport protocol, particular in and around the initial key exchange - (KEX) phase. + to the active configuration. This fixes the config parser from erroneously + rejecting cases like: - Full details of the extension are in the PROTOCOL file. + AuthenticationMethods password + Match User ivy + AuthenticationMethods any - with markus@ + bz3657 ok markus@ - OpenBSD-Commit-ID: 2a66ac962f0a630d7945fee54004ed9e9c439f14 + OpenBSD-Commit-ID: 7f196cba634c2a3dba115f3fac3c4635a2199491 -commit 59d691b886c79e70b1d1c4ab744e81fd176222fd +commit 6886e1b1f55c90942e4e6deed930f8ac32e0f938 +Author: Darren Tucker +Date: Thu Feb 22 17:59:35 2024 +1100 + + Add nbsd10 test target. + +commit d86bf8a3f6ea4fa7887406c2aa9959db71fa41be Author: Damien Miller -Date: Mon Dec 18 14:49:11 2023 +1100 +Date: Thu Feb 22 12:06:10 2024 +1100 - better detection of broken -fzero-call-used-regs + more descriptive configure test name + +commit 9ee335aacc9f5bdc4cc2c19fafb45e27be7d234e +Author: djm@openbsd.org +Date: Wed Feb 21 06:17:29 2024 +0000 + + upstream: explain arguments of internal-sftp GHPR#454 from Niklas - Use OSSH_CHECK_CFLAG_LINK() for detection of these flags and extend - test program to exercise varargs, which seems to catch more stuff. + Hambüchen + MIME-Version: 1.0 + Content-Type: text/plain; charset=UTF-8 + Content-Transfer-Encoding: 8bit - ok dtucker@ + OpenBSD-Commit-ID: 0335d641ae6b5b6201b9ffd5dd06345ebbd0a3f3 -commit aa7b21708511a6d4aed3839fc9f6e82e849dd4a1 +commit d1164cb1001dd208fee88aaa9b43d5e6fd917274 Author: djm@openbsd.org -Date: Wed Dec 13 03:28:19 2023 +0000 +Date: Wed Feb 21 06:06:43 2024 +0000 - upstream: when invoking KnownHostsCommand to determine the order of - - host key algorithms to request, ensure that the hostname passed to the - command is decorated with the port number for ports other than 22. + upstream: clarify permissions requirements for ChrootDirectory Part - This matches the behaviour of KnownHostsCommand when invoked to look - up the actual host key. + of GHPR#454 from Niklas Hambüchen + MIME-Version: 1.0 + Content-Type: text/plain; charset=UTF-8 + Content-Transfer-Encoding: 8bit - bz3643, ok dtucker@ + OpenBSD-Commit-ID: d37bc8786317a11649c62ff5e2936441186ef7a0 + +commit d410e17d186552d0717f18217d0d049486754365 +Author: djm@openbsd.org +Date: Wed Feb 21 06:05:06 2024 +0000 + + upstream: .Cm for a keyword. Part of GHPR#454 from Niklas Hambüchen - OpenBSD-Commit-ID: 5cfabc0b7c6c7ab473666df314f377b1f15420b1 + OpenBSD-Commit-ID: d59c52559f926fa82859035d79749fbb4a3ce18a -commit 4086bd6652c0badccc020218a62190a7798fb72c -Author: markus@openbsd.org -Date: Fri Dec 8 09:18:39 2023 +0000 +commit ab73f9678ebf06b32d6361b88b50b42775e0565b +Author: djm@openbsd.org +Date: Wed Feb 21 06:01:13 2024 +0000 - upstream: prevent leak in sshsig_match_principals; ok djm@ + upstream: fix typo in match directive predicate (s/tagged/tag) GHPR#462 - OpenBSD-Commit-ID: 594f61ad4819ff5c72dfe99ba666a17f0e1030ae + from Tobias Manske + + OpenBSD-Commit-ID: 05b23b772677d48aa82eefd7ebebd369ae758908 -commit 19d3ee2f3adf7d9a606ff015c1e153744702c4c9 +commit 9844aa2521ccfb1a2d73745680327b79e0574445 Author: djm@openbsd.org -Date: Wed Dec 6 21:06:48 2023 +0000 +Date: Wed Feb 21 05:57:34 2024 +0000 - upstream: short circuit debug log processing early if we're not going + upstream: fix proxy multiplexing mode, broken when keystroke timing - to log anything. From Kobe Housen + obfuscation was added. GHPR#463 from montag451 - OpenBSD-Commit-ID: 2bcddd695872a1bef137cfff7823044dcded90ea + OpenBSD-Commit-ID: 4e412d59b3f557d431f1d81c715a3bc0491cc677 -commit 947affad4831df015c498c00c6351ea6f13895d5 -Author: Darren Tucker -Date: Mon Nov 27 09:37:28 2023 +1100 +commit ee6d932acb532f80b11bb7cf161668c70ec8a117 +Author: djm@openbsd.org +Date: Tue Feb 20 04:10:03 2024 +0000 - Add tests for OpenSSL 3.2.0 and 3.2 stable branch. + upstream: don't append a gratuitous space to the end of subsystem + + arguments; bz3667 + + OpenBSD-Commit-ID: e11023aeb3f30b77a674e37b8292c862926d5dc6 -commit 747dce36206675ca6b885010a835733df469351b -Author: Darren Tucker -Date: Sat Nov 25 09:03:38 2023 +1100 +commit e27f032aa8fcbae9b2e7c451baaf4b8ac6fa3d45 +Author: dtucker@openbsd.org +Date: Mon Feb 19 09:25:52 2024 +0000 - Use non-zero arg in compiler test program. + upstream: Always define puttysetup function. - Now that we're running the test program, passing zero to the test function - can cause divide-by-zero exceptions which might show up in logs. + OpenBSD-Regress-ID: b4c0ccfa4006a1bc5dfd99ccf21c854d3ce2aee0 -commit 3d44a5c56585d1c351dbc006240a591b6da502b1 +commit 84046f9991abef5f46b040b10cf3d494f933a17b Author: dtucker@openbsd.org -Date: Fri Nov 24 00:31:30 2023 +0000 +Date: Fri Feb 9 08:56:59 2024 +0000 - upstream: Plug mem leak of msg when processing a quit message. + upstream: Exapnd PuTTY test coverage. - Coverity CID#427852, ok djm@ + Expand the set of ciphers, MACs and KEX methods in the PuTTY interop + tests. - OpenBSD-Commit-ID: bf85362addbe2134c3d8c4b80f16601fbff823b7 + OpenBSD-Regress-ID: dd28d97d48efe7329a396d0d505ee2907bf7fc57 -commit 1d7f9b6e297877bd00973e6dc5c0642dbefc3b5f +commit bbf541ee2afe07b08a8b56fa0dc6f38fcfceef2a Author: dtucker@openbsd.org -Date: Thu Nov 23 03:37:05 2023 +0000 +Date: Fri Feb 9 08:47:42 2024 +0000 - upstream: Include existing mux path in debug message. + upstream: Factor out PuTTY setup. - OpenBSD-Commit-ID: 1c3641be10c2f4fbad2a1b088a441d072e18bf16 + Factor out PuTTY and call only when needed. + + This allows us to avoid PuTTY key setup when it's not needed, which + speeds up the overall test run by a couple of percent. + + OpenBSD-Regress-ID: c25eaccc3c91bc874400f7c85ce40e9032358c1c -commit f29934066bd0e561a2e516b7e584fb92d2eedee0 -Author: Darren Tucker -Date: Thu Nov 23 19:41:27 2023 +1100 +commit d31c21c57fb4245271680a1e5043cf6470a96766 +Author: naddy@openbsd.org +Date: Sat Feb 10 11:28:52 2024 +0000 - Add an Ubuntu 22.04 test VM. + upstream: clean sshd random relinking kit; ok miod@ - This is the same version as Github's runners so most of the testing on - it is over there, but having a local VM makes debugging much easier. + OpenBSD-Commit-ID: 509bb19bb9762a4b3b589af98bac2e730541b6d4 -commit a93284a780cd3972afe5f89086b75d564ba157f3 -Author: Darren Tucker -Date: Thu Nov 23 19:36:22 2023 +1100 +commit 4dbc5a363ff53a2fcecf6bc3bcc038badc12f118 +Author: djm@openbsd.org +Date: Fri Feb 2 00:13:34 2024 +0000 - Add gcc-12 -Werror test on Ubuntu 22.04. + upstream: whitespace - Explictly specify gcc-11 on Ubuntu 22.04 (it's the system compiler). + OpenBSD-Commit-ID: b24680bc755b621ea801ff8edf6f0f02b68edae1 -commit 670f5a647e98b6fd95ad64f789f87ee3274b481b +commit efde85dda2130272af24cc346f6c3cd326182ff1 Author: Darren Tucker -Date: Thu Nov 23 19:34:57 2023 +1100 +Date: Mon Feb 19 17:29:31 2024 +1100 - Check return value from write to prevent warning. + Improve error message for OpenSSL header check. - ... and since we're testing for flags with -Werror, this caused - configure to mis-detect compiler flags. + bz#3668, ok djm@ -commit cea007d691cfedfa07a5b8599f97ce0511f53fc9 +commit cbbdf868bce431a59e2fa36ca244d5739429408d Author: Darren Tucker -Date: Wed Nov 22 21:18:55 2023 +1100 +Date: Wed Feb 7 13:45:02 2024 +1100 - Run compiler test program when compiling natively. - - ok djm@ + Interop test against PuTTY snapshot and releases. -commit ee0d305828f13536c0a416bbf9c3e81039d9ea55 +commit 91898bf786b0f149f962c4c96c08a46f29888c10 Author: Darren Tucker -Date: Wed Nov 22 21:18:07 2023 +1100 +Date: Tue Feb 6 16:21:05 2024 +1100 - Factor out compiler test program into a macro. + Put privsep dir on OS X on /usr/local. - ok djm@ + On some runners we can't create /var/empty, so put it some place we can + write. Should fix test breakage on Max OS X 11. -commit de304c76316b029df460673725a9104224b9959b +commit be5ed8ebed8388c5056bfde4688308cc873c18b9 Author: Darren Tucker -Date: Wed Nov 22 08:55:36 2023 +1100 +Date: Tue Feb 6 11:19:42 2024 +1100 - Add fbsd14 VM to test pool. + Add --disable-fd-passing option. + + .. and enable for the minix3 test VM. This will cause it to more reliably + skip tests that need FD passing and should fix the current test breakage. -commit 99a2df5e1994cdcb44ba2187b5f34d0e9190be91 +commit 0f6a8a0d0a518fd78c4cbebfdac990a57a1c4e41 Author: Darren Tucker -Date: Tue Nov 21 16:19:29 2023 +1100 +Date: Tue Feb 6 11:18:44 2024 +1100 - Expand -fzero-call-used-regs test to cover gcc 11. - - It turns out that gcc also has some problems with -fzero-call-used-regs, - at least v11 on mips. Previously the test in OSSH_CHECK_CFLAG_COMPILE - was sufficient to catch it with "=all", but not sufficient for "=used". - Expand the testcase and include it in the other tests for good measure. - See bz#3629. ok djm@. + Use "skip" function instead doing it ourselves. -commit ff220d4010717f7bfbbc02a2400666fb9d24f250 -Author: Darren Tucker -Date: Tue Nov 21 14:04:34 2023 +1100 +commit 3ad669f81aabbd2ba9fbd472903f680f598e1e99 +Author: Damien Miller +Date: Thu Feb 1 14:01:18 2024 +1100 - Stop using -fzero-call-used-regs=all + ignore some vim droppings + +commit c283f29d23611a06bbee06bcf458f2fffad721d9 +Author: djm@openbsd.org +Date: Thu Feb 1 02:37:33 2024 +0000 + + upstream: whitespace - ... since it seems to be problematic with several different versions of - clang. Only use -fzero-call-used-regs=used which is less - problematic, except with Apple's clang where we don't use it at all. - bz#3629, ok djm@ + OpenBSD-Commit-ID: bf9e4a1049562ee4322684fbdce07142f04fdbb7 -commit 2a19e02f36b16f0f6cc915f7d1e60ead5e36303b -Author: Darren Tucker -Date: Tue Nov 21 14:02:18 2023 +1100 +commit 0d96b1506b2f4757fefa5d1f884d49e96a6fd4c3 +Author: Damien Miller +Date: Tue Jan 16 14:40:18 2024 +1100 - Allow for vendor prefix on clang version numbers. + skip tests that use multiplexing on Windows - Correctly detects the version of OpenBSD's native clang, as well as - Apple's. Spotted tb@, ok djm@. + Some tests here use multiplexing, skip these if DISABLE_FD_PASSING + is set. Should unbreak tests on Windows. -commit c52db0114826d73eff6cdbf205e9c1fa4f7ca6c6 +commit 50080fa42f5f744b798ee29400c0710f1b59f50e Author: djm@openbsd.org -Date: Mon Nov 20 02:50:00 2023 +0000 +Date: Thu Jan 11 04:50:28 2024 +0000 - upstream: set errno=EAFNOSUPPORT when filtering addresses that don't + upstream: don't disable RSA test when DSA is disabled; bug introduced - match AddressFamily; yields slightly better error message if no address - matches. bz#3526 + in last commit - OpenBSD-Commit-ID: 29cea900ddd8b04a4d1968da5c4a893be2ebd9e6 + OpenBSD-Regress-ID: 8780a7250bf742b33010e9336359a1c516f2d7b5 -commit 26f3f3bbc69196d908cad6558c8c7dc5beb8d74a +commit 415c94ce17288e0cdcb9e58cc91fba78d33c8457 Author: djm@openbsd.org -Date: Wed Nov 15 23:03:38 2023 +0000 +Date: Thu Jan 11 01:45:58 2024 +0000 - upstream: when connecting via socket (the default case), filter + upstream: make DSA testing optional, defaulting to on - addresses by AddressFamily if one was specified. Fixes the case where, if - CanonicalizeHostname is enabled, ssh may ignore AddressFamily. bz5326; ok - dtucker + ok markus - OpenBSD-Commit-ID: 6c7d7751f6cd055126b2b268a7b64dcafa447439 + OpenBSD-Regress-ID: dfc27b5574e3f19dc4043395594cea5f90b8572a -commit 050c335c8da43741ed0df2570ebfbd5d1dfd0a31 +commit f9311e8921d92c5efca767227a497ab63280ac39 Author: djm@openbsd.org -Date: Wed Nov 15 22:51:49 2023 +0000 +Date: Thu Jan 11 01:51:16 2024 +0000 - upstream: when deciding whether to enable keystroke timing - - obfuscation, only consider enabling it when a channel with a tty is open. + upstream: ensure key_fd is filled when DSA is disabled; spotted by - Avoids turning on the obfucation when X11 forwarding only is in use, - which slows it right down. Reported by Roger Marsh + tb@ - OpenBSD-Commit-ID: c292f738db410f729190f92de100c39ec931a4f1 + OpenBSD-Commit-ID: 9dd417b6eec3cf67e870f147464a8d93f076dce7 -commit 676377ce67807a24e08a54cd60ec832946cc6cae -Author: tobhe@openbsd.org -Date: Mon Nov 13 09:18:19 2023 +0000 +commit 4e838120a759d187b036036610402cbda33f3203 +Author: djm@openbsd.org +Date: Thu Jan 11 01:45:36 2024 +0000 - upstream: Make sure sftp_get_limits() only returns 0 if 'limits' + upstream: make DSA key support compile-time optional, defaulting to - was initialized. This fixes a potential uninitialized use of 'limits' in - sftp_init() if sftp_get_limits() returned early because of an unexpected - message type. + on - ok djm@ + ok markus@ - OpenBSD-Commit-ID: 1c177d7c3becc1d71bc8763eecf61873a1d3884c + OpenBSD-Commit-ID: 4f8e98fc1fd6de399d0921d5b31b3127a03f581d -commit 64e0600f23c6dec36c3875392ac95b8a9100c2d6 -Author: Darren Tucker -Date: Mon Nov 13 20:03:31 2023 +1100 +commit afcc9028bfc411bc26d20bba803b83f90cb84e26 +Author: jmc@openbsd.org +Date: Wed Jan 10 06:33:13 2024 +0000 - Test current releases of LibreSSL and OpenSSL. + upstream: fix incorrect capitalisation; - Retire some of the older releases. + OpenBSD-Commit-ID: cb07eb06e15fa2334660ac73e98f29b6a1931984 -commit c8ed7cc545879ac15f6ce428be4b29c35598bb2a -Author: dtucker@openbsd.org -Date: Wed Nov 1 02:08:38 2023 +0000 +commit 9707c8170c0c1baeb1e06e5a53f604498193885f +Author: djm@openbsd.org +Date: Tue Jan 9 22:19:36 2024 +0000 - upstream: Specify ssh binary to use + upstream: extend ChannelTimeout regression test to exercise multiplexed - ... instead of relying on installed one. Fixes test failures in -portable - when running tests prior to installation. + connections and the new "global" timeout type. ok dtucker@ - OpenBSD-Regress-ID: b6d6ba71c23209c616efc805a60d9a445d53a685 + OpenBSD-Regress-ID: f10d19f697024e9941acad7c2057f73d6eacb8a2 -commit e9fc2c48121cada1b4dcc5dadea5d447fe0093c3 -Author: Darren Tucker -Date: Wed Nov 1 13:11:31 2023 +1100 +commit b31b12d28de96e1d43581d32f34da8db27e11c03 +Author: djm@openbsd.org +Date: Tue Jan 9 22:19:00 2024 +0000 - Put long-running test targets on hipri runners. + upstream: add a "global" ChannelTimeout type to ssh(1) and sshd(8) - Some of the selfhosted test targets take a long time to run for various - reasons, so label them for "libvirt-hipri" runners so that they can - start immediately. This should reduce the time to complete all tests. + that watches all open channels and will close all open channels if there is + no traffic on any of them for the specified interval. This is in addition to + the existing per-channel timeouts added a few releases ago. + + This supports use-cases like having a session + x11 forwarding channel + open where one may be idle for an extended period but the other is + actively used. The global timeout would allow closing both channels when + both have been idle for too long. + + ok dtucker@ + + OpenBSD-Commit-ID: 0054157d24d2eaa5dc1a9a9859afefc13d1d7eb3 -commit 7ddf27668f0e21233f08c0ab2fe9ee3fdd6ab1e2 +commit 602f4beeeda5bb0eca181f8753d923a2997d0a51 Author: djm@openbsd.org -Date: Wed Nov 1 00:29:46 2023 +0000 +Date: Tue Jan 9 21:39:14 2024 +0000 - upstream: add some tests of forced commands overriding Subsystem + upstream: adapt ssh_api.c code for kex-strict - directives + from markus@ ok me - OpenBSD-Regress-ID: eb48610282f6371672bdf2a8b5d2aa33cfbd322b + OpenBSD-Commit-ID: 4d9f256852af2a5b882b12cae9447f8f00f933ac -commit fb06f9b5a065dfbbef5916fc4accc03c0bf026dd -Author: dtucker@openbsd.org -Date: Tue Oct 31 04:15:40 2023 +0000 +commit 42ba34aba8708cf96583ff52975d95a8b47d990d +Author: Damien Miller +Date: Mon Jan 8 16:26:37 2024 +1100 - upstream: Don't try to use sudo inside sshd log wrapper. - - We still need to check if we're using sudo since we don't want to chown - unecessarily, as on some platforms this causes an error which pollutes - stderr. We also don't want to unnecessarily invoke sudo, since it's - running in the context of the proxycommand, on *other* platforms it - may not be able to authenticate, and if we're using SUDO then it should - already be privileged. - - OpenBSD-Regress-ID: 70d58df7503db699de579a9479300e5f3735f4ee + nite that recent OSX tun/tap is unsupported -commit fc3cc33e88c242c704781c6c48087838f1dcfa2a -Author: dtucker@openbsd.org -Date: Tue Oct 31 02:58:45 2023 +0000 +commit 690bc125f9a3b20e47745fa8f5b5e1fd5820247f +Author: Sevan Janiyan +Date: Wed Dec 27 04:57:49 2023 +0000 - upstream: Only try to chmod logfile if we have sudo. If we don't have - - sudo then we won't need to chmod. *** 17647 LINES SKIPPED *** From nobody Tue Mar 26 05:56:08 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V3fDm3gffz5G7qw; Tue, 26 Mar 2024 05:56:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4V3fDm38VKz4vkF; Tue, 26 Mar 2024 05:56:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711432568; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7LKUwGFyLZRwYzrWeQ+HOiQ6XH+eogZZNJb0px5F6XM=; b=ORY1xozTX1d+VK3OLr/IMebMIIKExDw1PQQB/DV3qjg2FnVJMkSLc5cS/0Z69+SMOZtMyF i/Rwcnx4+uxX4NbW/OHuIea6AYnJNqiiT6xheCQJfTuzjIqqUhHUH5ISUlOFxrqvqfky7A sM6rQbK04taNYT0Ml1eMGp65fSt9X3dbP733edNtycpPdRbD30RYJWvfNO7m6diNwv/sDg SKcSCmlkeLrNSB2oD4AQ2uWCfmwSzBiQSml51fPPYQaN+Zbnex/GGGJVDrQlIZ/M1jefUN h7IobwNFmMtWZJy+8IB6Gp1OUfO3rzaZNLvenJhhNaklm8/7/Q3uJDWKjcJK/w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711432568; a=rsa-sha256; cv=none; b=oNMQpfVosQQ32zYSastrOPvOpmBfEy3mskHUpzmOEFcT2BC/bwiESrsOrkxrbjn0Q2GpU7 bEEmBb/0r3DAgfaiRglV+xUt5vzyXmSzcmm0j6Nt0tGRPeRZGjEY8V5pk2FTfIc4LN6Uig G46wFtyI0ToUY+m1z6dNVrhIsHO26M8FYtOG9l1FcueSdIkm0fEGFDKpZ82v5CK3+wyWnS dd5jUBhAsv5duQFfsqBXetfi9MAKbXRY2tZVjHtRPgICrx+1yR7WKpOsqYS0lWxRYxGB/0 F8D+LyhRQ2uBgLtDUdGHZd4BnVs6pdzIWIZnMa0Zu5/3y5N+ro1BKhW+aUyWKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711432568; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7LKUwGFyLZRwYzrWeQ+HOiQ6XH+eogZZNJb0px5F6XM=; b=gfrQ6tn4H3P+YuNxTv8aWdzSPJpRG2j3VjbW2YX+XUWvltOKQ81OApdBgHEDjxBKlSXdfG k4b7aT9HxdbjUIybK4CT1v4balfaaUOZw7a5BMkWsD4Mxl3XyUS/k8xjXHdk7le/0X/Az5 kYaIVc5vOMi2zo1Ipk9T0l3wRakm2OlaFF810ebd0MrHNmuQIN4csQQYGpMPROUjDK47DS qq+ewco6M4h94mseiWugXdVtctks40kH+9p+BR4Xv3F352Rn9YVEVxD4eiVxQKdWdYQFV9 ENben7/Q/jE8Jq8L32z9GoIau6hSqWd6ICkcrMRTUEHu4e3dI+fNepIEAQqJ/A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V3fDm2l45zpCr; Tue, 26 Mar 2024 05:56:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42Q5u8Yh002657; Tue, 26 Mar 2024 05:56:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42Q5u8EF002654; Tue, 26 Mar 2024 05:56:08 GMT (envelope-from git) Date: Tue, 26 Mar 2024 05:56:08 GMT Message-Id: <202403260556.42Q5u8EF002654@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 13a74b477d2a - stable/14 - cxgbe.4: Remove double word List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 13a74b477d2a6f9829a4b1c71f063b0cd05fa5ab Auto-Submitted: auto-generated The branch stable/14 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=13a74b477d2a6f9829a4b1c71f063b0cd05fa5ab commit 13a74b477d2a6f9829a4b1c71f063b0cd05fa5ab Author: Gordon Bergling AuthorDate: 2024-03-23 17:00:57 +0000 Commit: Gordon Bergling CommitDate: 2024-03-26 05:55:18 +0000 cxgbe.4: Remove double word - s/of of/of/ (cherry picked from commit 619e6f1f9288ffb6844a6bdf371c9549873cdab7) --- share/man/man4/cxgbe.4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man4/cxgbe.4 b/share/man/man4/cxgbe.4 index 3b5a2d8b4d3c..bfba202d1fec 100644 --- a/share/man/man4/cxgbe.4 +++ b/share/man/man4/cxgbe.4 @@ -261,7 +261,7 @@ The default is 1. Number of padding bytes inserted before the beginning of an Ethernet frame in the receive buffer. The default value is 0. -A value of of 2 would ensure that the Ethernet payload (usually the IP header) +A value of 2 would ensure that the Ethernet payload (usually the IP header) is at a 4 byte aligned address. 0-7 are all valid values. .It Va hw.cxgbe.fl_pad From nobody Tue Mar 26 05:56:09 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V3fDn4sgYz5G7hw; Tue, 26 Mar 2024 05:56:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4V3fDn43v2z4vkK; Tue, 26 Mar 2024 05:56:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711432569; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WXgBUMRdj0QPlYA6cx8F8PWvNSLi5JaSqSrmNEzDHoo=; b=gr7zfx4z27oOU7Ky80ZwKGFUP8RndHnjiDl0Ag+qu5J+GccxPVnjqVih9L0ltpdladvA4Z D/af+k0j1O6gcjqL85RMzbwQA4o1TwvRqnUb16YdbCW2VUfdAErvuP9ggtziFzthNL4O3t DqFPWZi1SHmNZUdeTR0bdptpTSqfSaz/VtcwOxN8YuPOQ5wVRdBlJw/lPBnVXSIX+J0O9i a8w9Wh2IJmfisSkqYHJaG0Hs9mfVvWmzhxWLCqz5T4/2m84dwpPtlWCpqm7bwNOonLzsII ij+BQLjqRjpbH/vk5IyzO88iN5HfI6rOyFW2sDOihtiBLc6XEz6HHd1i9bj5mQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711432569; a=rsa-sha256; cv=none; b=j7zlH+0KKDSg9k1uxHh+siZUxPgvcNoEuAP5KekXiosd1goLa+xuj4SomAxO4hlBwaSh3Q ADwt5TVMW/fsfr2UPpypGRAl2QgA7ZMvTbahFC/ckWxTIz3/JAVwd9laAvfD0JB8LWBIpm f9XjoReBhYqao1G2onExAkhv42a5OP+p571OXK7mzg11LtXRzvKG/aQIfp/YHiXY10CYuN WVWwYaeZvK462FXU5RvaktTid9jdOU74Ies3fkwFRVvU3PM3MDhUaY8Bdb8w4L6SQl0WMn zy6X6vJAbZP97OMU/NgsTwx/QH0JaTA7SvqQ/jvsmcsp+vvDwQsAi7J43jq/MQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711432569; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WXgBUMRdj0QPlYA6cx8F8PWvNSLi5JaSqSrmNEzDHoo=; b=cY2IB804l2Sm0zP0A/xNLcsotvSoz7O+//7FaVQXT3f8x3FoqsaI73fef9I0e7abM+TbO7 36zNi6H0+GhxsraZbt5/3YxWVAjpaGDJYBkF3+GlKn4/gPTTGjKk6kVfiGOuF+lfGOeKI6 IcPNCMEjcU4GZrywrSm4pDH65JPhQCPb4jbZBbzXfOG+WNjOhfnBg4rVTf0+yUwJf9mtDA 0p7CCj1Tk1qq0vUvKtmHLbHdjl8zV5dgbNqDdNZSf/uibaA1RL8RG7WqtzHDb+/d3eXcLr gzji9rPOqKgdpdN2dEEDYtcqdCRPRD7P1ibaill41H22lpAB8mJgMb3nfqXYPQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V3fDn3fYjzp9T; Tue, 26 Mar 2024 05:56:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42Q5u9aq002696; Tue, 26 Mar 2024 05:56:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42Q5u9uW002693; Tue, 26 Mar 2024 05:56:09 GMT (envelope-from git) Date: Tue, 26 Mar 2024 05:56:09 GMT Message-Id: <202403260556.42Q5u9uW002693@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: caf8d5c88439 - stable/14 - intr_event.9: Remove double word List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: caf8d5c88439cedd70e1c835f4d9f1c2c020c1b9 Auto-Submitted: auto-generated The branch stable/14 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=caf8d5c88439cedd70e1c835f4d9f1c2c020c1b9 commit caf8d5c88439cedd70e1c835f4d9f1c2c020c1b9 Author: Gordon Bergling AuthorDate: 2024-03-23 16:57:37 +0000 Commit: Gordon Bergling CommitDate: 2024-03-26 05:55:38 +0000 intr_event.9: Remove double word - s/of of/of/ (cherry picked from commit 2c3466172ac655dbc030aac7c6d7bf58d76efc0e) --- share/man/man9/intr_event.9 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man9/intr_event.9 b/share/man/man9/intr_event.9 index 2ad92c96bdc7..d1964ce289a5 100644 --- a/share/man/man9/intr_event.9 +++ b/share/man/man9/intr_event.9 @@ -230,7 +230,7 @@ argument specifies the priority of this handler, corresponding to the values defined in .In sys/priority.h . It determines the order this handler is called relative to the other handlers -for this event, as well as the scheduling priority of of the backing kernel +for this event, as well as the scheduling priority of the backing kernel thread. .Fa flags argument can be used to specify properties of this handler as defined in From nobody Tue Mar 26 05:56:10 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V3fDq1TVFz5G7fs; Tue, 26 Mar 2024 05:56: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 4V3fDp5QW3z3wfd; Tue, 26 Mar 2024 05:56:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711432570; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OQtpW23ul5LdrUJxNj1yk5V9kS1GHs1zuAibOqwrebg=; b=bwzxA3isDcO/iOZbZ6sK6+xT7mVQoTi4xF7sX9aeO1wfsBemyOPs8vZP8ahpTTz8HiXybu HgRKxSAm1O1tzvsMaRYwVBkY64+Jq/udPa7zlCAE/6ePxAnvDHy3e2ikoRfgnfiYUw1hJ+ ng4SJHj0zimX10cdz0SFOQNRABDsJVDip9tX8rQb4nlOHUUHQDN4X6ekj7n3ZfUy4kxmby 5a3Sm5e4/BT8fxFfXGCtbXfbMYXk8dJi9otIEoyE95rpjdpZJEJWBGE7w8ZSnrOdZX+BjT bHTyQnsRp8xPN/iQsxx98bKX4lJ77GV7Q4yvguZJjo7kJwZHDL0dujjf2Uwnng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711432570; a=rsa-sha256; cv=none; b=fMcCULYq9mApwyn5nS6mj49azL+HePV+PH810nqhlVKaJ8iRhhAyB7a6mRmlF8z4ij/69x xiutN0I4urYf7Ohhl6+WgcQ/sSCklGIFnlcQTPWBdAr4zbEDBfhiVAYoRzi5ivP72QkiWM ZgXo9mAwhfB/MA/YhJ6/a9iMtP/1XrfHuUWI5KAYFPUC1kHZ1U3U8GaWuzQgL8q0zyUCBk wyZ4fpdc/nM21/s08SUWW/dKT9voyxEdWmk01NmB9qMosT2+x5+13A1jdq8tsezwm+kf3+ Chb+KTZDUESQY0TCqJ9OI+FXdd0zJocD5Kxr0v3meCNtR16DCBLfcZI2YAu8Kg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711432570; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OQtpW23ul5LdrUJxNj1yk5V9kS1GHs1zuAibOqwrebg=; b=yIs9wlLzL7HbRQzW9v1tz8xZiYIwsT7VFlaqxOOK5M2ZJwKyKvj8FFf0jppqLkVaLP2d0v kC4jzJI0BJbcPEoQu6Kr2zUoOp5eNvuDtO37o2kE5/JpYUJtB09WkdQDQsWlFiY7pwn9j7 T/b/74eCRpalHKUkdzen7eMnkXb38rEbUH8Iw6I5qbfdeuPCoz3Vpy/RuLPK8KyQiuiBlx 4POSbYEOrP82tGhL/PKFSpefV5mNCGZvqRJZPY2sgOj3Z4yP+oe3ISfBr9DIpPPWMf0vV5 8BIBfVn56VktqzxeAJR/YOBKrvkmlwIHVGyM+CnYqEBgtMsF7twd4n4+5p1IQA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V3fDp4zmfzp2J; Tue, 26 Mar 2024 05:56:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42Q5uAlH002757; Tue, 26 Mar 2024 05:56:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42Q5uApn002754; Tue, 26 Mar 2024 05:56:10 GMT (envelope-from git) Date: Tue, 26 Mar 2024 05:56:10 GMT Message-Id: <202403260556.42Q5uApn002754@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 87aff051642a - stable/14 - xdr(3): Fix a few typos in source code comments List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 87aff051642a51fccbb503f430c9bff0f823fdb4 Auto-Submitted: auto-generated The branch stable/14 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=87aff051642a51fccbb503f430c9bff0f823fdb4 commit 87aff051642a51fccbb503f430c9bff0f823fdb4 Author: Gordon Bergling AuthorDate: 2024-03-23 07:43:41 +0000 Commit: Gordon Bergling CommitDate: 2024-03-26 05:55:55 +0000 xdr(3): Fix a few typos in source code comments - s/reoutines/routines/ - s/paraemters/parameters/ Obtained from: NetBSD (cherry picked from commit 577a721d05aa20f38a615ad1cd5089a51c8571c1) --- lib/libc/xdr/xdr_rec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libc/xdr/xdr_rec.c b/lib/libc/xdr/xdr_rec.c index 3f0dc6ec3cba..ee5f1d1d929f 100644 --- a/lib/libc/xdr/xdr_rec.c +++ b/lib/libc/xdr/xdr_rec.c @@ -226,7 +226,7 @@ xdrrec_create(XDR *xdrs, u_int sendsize, u_int recvsize, void *tcp_handle, /* - * The reoutines defined below are the xdr ops which will go into the + * The routines defined below are the xdr ops which will go into the * xdr handle filled in by xdrrec_create. */ @@ -488,7 +488,7 @@ xdrrec_eof(XDR *xdrs) /* * The client must tell the package when an end-of-record has occurred. - * The second paraemters tells whether the record should be flushed to the + * The second parameters tells whether the record should be flushed to the * (output) tcp stream. (This let's the package support batched or * pipelined procedure calls.) TRUE => immmediate flush to tcp connection. */ From nobody Tue Mar 26 05:56:29 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V3fFB0Ql9z5G7nQ; Tue, 26 Mar 2024 05:56: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 4V3fF96zQsz3xF2; Tue, 26 Mar 2024 05:56:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711432590; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w2AejCmNNzwzb+o3ktsCrY2vAAhyGsMrekJv5yBH+Og=; b=FCRLNaKCf9hQZCJEtdWRj2QShZtLHh2YFclTVBgszs/ScTCkk6cm/ibfbYbYEGPaiu1sL5 8+qlkX/wOzPdcAGGjRsIgi02paoYWuwQNr5IZW8+77YMKjD7t1Y9r5VP6r1fFoJzn7OH11 X1ke8xWNoG/C7KL5lLlPzSHkoZrBdTExn8P3iIvE4hlgJHNAngg27eYHl0nvOWAP3RhjHb 16b1AiM5zgjmjaoKxL4kpY35n7rB/rovMiSpV25J7NyboCqyWXXnrVAoPd2g/HkkzCrxiI n6scFW36KsHMVHr4JwW0O7v8Ip7kvcFMTSyDx6JJlWDo9MYwO5YvnkpKfxBzGg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711432590; a=rsa-sha256; cv=none; b=Bv0z5X9lfYE3/hwzSnE0FLPXcepseS75nGw2vfcvRghyWas/VsaS9unhLviZLeCOGrTCsb 7M+9uX+Ml0mVYRofn75RnArGFkUs3Rci69o0kT410/ijAAJxFQstXTj01Yq79A6FOwowwd Pl3Sgl4tmhXPDGQ5tZ/oqIx0tOCCx8DpaKPflFPYiYA38F4DnuG32KlZ7smeSCWHbOKzUj 5It2vgBSGgLYkWXAlNyR+oG8nDzbxtOOE5duHGfkq3L+Nackf67pCIBR2ursdPRhHCL8tY v2HRZgDbc6Df66PyNtDwjfFzP+bpDHAihF0fyNev3dT107CJ1/dJOlBoVPoRvQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711432590; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w2AejCmNNzwzb+o3ktsCrY2vAAhyGsMrekJv5yBH+Og=; b=LIfEDT/QIIB/pDZHrAiVX3fd4nsTeri0GTZY1DM2FzwjPra2SY+520iPFtR3bn+eEdQgn1 tQ7ssHdgbtDlAVSHFmTmd9hmMFVnuwfLYu58qpKPZPKCVVstY3o65lwWI/hxVBFO8twZrD OQLkWA1GgvrNmpxU35VFTf2UoPUlbRkxnhbCMoI8IOIrCenF/1vOfgeZKeJ+8aU047Lvwr NXaWuujXR5+F/VC/cpYmABHqPmCGKSycjIMgP/CWeOEefBsKAx9c7UI3pVpMW///0Wn0nb G/O/C0QWLnWdTCio7SGpPiZOq1Eina8fSVPuWAk2QqBGdq6XBrcT9MguhLiyGQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V3fF96XxXzpPZ; Tue, 26 Mar 2024 05:56:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42Q5uTXQ002927; Tue, 26 Mar 2024 05:56:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42Q5uTnf002924; Tue, 26 Mar 2024 05:56:29 GMT (envelope-from git) Date: Tue, 26 Mar 2024 05:56:29 GMT Message-Id: <202403260556.42Q5uTnf002924@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 23b482210612 - stable/13 - cxgbe.4: Remove double word List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 23b482210612c01851ea4786f0c6f9de1109ab2d Auto-Submitted: auto-generated The branch stable/13 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=23b482210612c01851ea4786f0c6f9de1109ab2d commit 23b482210612c01851ea4786f0c6f9de1109ab2d Author: Gordon Bergling AuthorDate: 2024-03-23 17:00:57 +0000 Commit: Gordon Bergling CommitDate: 2024-03-26 05:56:21 +0000 cxgbe.4: Remove double word - s/of of/of/ (cherry picked from commit 619e6f1f9288ffb6844a6bdf371c9549873cdab7) --- share/man/man4/cxgbe.4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man4/cxgbe.4 b/share/man/man4/cxgbe.4 index a9143a9b331c..712628b74f1b 100644 --- a/share/man/man4/cxgbe.4 +++ b/share/man/man4/cxgbe.4 @@ -261,7 +261,7 @@ The default is 1. Number of padding bytes inserted before the beginning of an Ethernet frame in the receive buffer. The default value is 0. -A value of of 2 would ensure that the Ethernet payload (usually the IP header) +A value of 2 would ensure that the Ethernet payload (usually the IP header) is at a 4 byte aligned address. 0-7 are all valid values. .It Va hw.cxgbe.fl_pad From nobody Tue Mar 26 05:56:44 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V3fFS2RWGz5G7r8; Tue, 26 Mar 2024 05:56: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 4V3fFS1yXBz3xSc; Tue, 26 Mar 2024 05:56:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711432604; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2fcSGk/0kdRz9hmKVtcjsbgBOmuBM91HT9AE6nMMcLk=; b=JfveOzbtanaqtsqgUCVtEMYtg2BUC7sLXzuD0Q/6pkL2eCkIbCgpdlxx8MNv/tSnMs2s6a 5arWhU0+eCogBRJslR4L8jwJCyMez/i50zo+Y53L0hX1WKf+ie6zmvzutfdPnSwMhnC8cL 18L+I+EDCBkZa9uusmrcnBEaOb/oybm3fHYRYNwAHxRGEXfjF9/4xd/Xipyz7ARXlv2XzY +N6NbGtmojrngxPENG/ukfbFnnH/zjQNEMk/R/lN8P4akRrMPTiVOA4vAqpCT8FiyFeiyw K+dndIdRWtODweyM0+nJ+p0P/P68mb3Wtce3BThZPue3OsrCGOWgbqKSyg198g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711432604; a=rsa-sha256; cv=none; b=RUXnkn8wUcilvabuRe1juXI9/DK3mqIT2vEdh3ff3OH89VsjDJap6JeVXep5jG/959u+4T 3KpHRfWRmCV+22H06heSny8a9VFTy10evwSwbXBmQL2KAS6kEyTBNcdX4p7Qy9mO7Q8Bik 2FMn/CUl1+qUwDTFyuMFxjmXfo7g611PIEydUi8JFc5yVND6qBTKj7JZgBDCEDfpa/3FzY iIw4uKgT8vA6jYBp3VRWyaxW6lVJWAuu+S+dP/vyTsXGLaNkzACAfHr/s7JESMfXl8eUsG cN/53P6Zb+n4HrY7SjK+JTaNz7RBcrlBV+bvOfInfPSk403DFs8FSIq0UpNIxQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711432604; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2fcSGk/0kdRz9hmKVtcjsbgBOmuBM91HT9AE6nMMcLk=; b=uQXZ7lji5LNCjHdnaGmsSrZ7F+RcXnVtdnX4EsswRVfMIKjWteCIOoqiUmjZ+10p5AeMNy cdCKXg+KAzWXh+SgUjBEVRnTojNF99pyXkIDVjlJV8XjR2c2cGLkcSwPPd6r3YM3ovnluM Xm2SsBB++Flm0UaL2lE60dN409sFv1pdc4bc8x4oSmS1cNEibr6ye+hN52k6QIn7hT43wT xBhN6rRM4KIxkDNDId90mTqLpr0GFq8mbi3wyAuFfQx7FFAjfLAEkqLa0hbNn94WIjZwVJ ZNYQlyqN+y2qE0Bwh9kZyw1i5WsqIyVBGMJGQ7wn8pi3wK+e/0km3vgFH/fPgw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V3fFS1XqGzp70; Tue, 26 Mar 2024 05:56:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42Q5uigi003084; Tue, 26 Mar 2024 05:56:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42Q5uiS0003081; Tue, 26 Mar 2024 05:56:44 GMT (envelope-from git) Date: Tue, 26 Mar 2024 05:56:44 GMT Message-Id: <202403260556.42Q5uiS0003081@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: b65d1eb9ff26 - stable/13 - intr_event.9: Remove double word List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b65d1eb9ff2684211a0d2d899e188bbb0a69f1bf Auto-Submitted: auto-generated The branch stable/13 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=b65d1eb9ff2684211a0d2d899e188bbb0a69f1bf commit b65d1eb9ff2684211a0d2d899e188bbb0a69f1bf Author: Gordon Bergling AuthorDate: 2024-03-23 16:57:37 +0000 Commit: Gordon Bergling CommitDate: 2024-03-26 05:56:35 +0000 intr_event.9: Remove double word - s/of of/of/ (cherry picked from commit 2c3466172ac655dbc030aac7c6d7bf58d76efc0e) --- share/man/man9/intr_event.9 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man9/intr_event.9 b/share/man/man9/intr_event.9 index 2ad92c96bdc7..d1964ce289a5 100644 --- a/share/man/man9/intr_event.9 +++ b/share/man/man9/intr_event.9 @@ -230,7 +230,7 @@ argument specifies the priority of this handler, corresponding to the values defined in .In sys/priority.h . It determines the order this handler is called relative to the other handlers -for this event, as well as the scheduling priority of of the backing kernel +for this event, as well as the scheduling priority of the backing kernel thread. .Fa flags argument can be used to specify properties of this handler as defined in From nobody Tue Mar 26 05:56:56 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V3fFh2krmz5G7d9; Tue, 26 Mar 2024 05:56: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 4V3fFh2GWnz3xls; Tue, 26 Mar 2024 05:56:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711432616; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yHpPMeTbepfMwH1YgTti9JMzE4ZEX7TPAKq5tw1boQ4=; b=eyAV5wEhNIqenmXkg3B+dhMYQc5x3IFiH4BRfmIW3PFRC7rn0dgeXBnvzHK+y1G933OxWz JvaevwfH8uSfOteO0cocGDuNEhNOoqolrFJn7z0yg1Y9mmQmfA4u2bWSJ/2+Z7I0O7Vp1S gasq1fAth6ipio9FveaMbKgsbNWCQFbR+K3HOib0/NMsuLh3t+PEqRCDbB6sL1bzjSHv5a /irEelP/Xq2xC5r2FdljSjPhunb8uYVMS5HFzStHX5ohUf2s6+yJoHs7+u8O12jgkiI1tG hQB0wF31tzgVM61zv0fPXxlYzYsa32A0KK9QTYQaNo6/1ZsoEqB9hFLtAQwo5A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711432616; a=rsa-sha256; cv=none; b=loVmgkzc2q843I/HeLqG1he7A5a7P1UiwVtecTjLr7J2vl3z6fOxh0A/xwjL6+6rCSfkDd YSfgI4+r9u+x242x5xxKIRN5dyCfxvKpzjXgRCW7XHoHkQfz15Etz8x8woRygSM9sykJBN zRs12TQGf7ahoA/JdzQwRd944g3zIigmj9poC63C09ikJlNv00NP27tl5XY2InRmkeyzEG pNjHvR0nWlhRcrNOCK/7XH1qnh+Ev7rj+/HYMZXFdsAgbKDoNzMYAmmkRFfysYdevemxfg o2Of/FrDRUnx2TFRXhy7XojA4o+2BIcK68fN/JUJD8NoisnN32wTfDN/LznzOg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711432616; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yHpPMeTbepfMwH1YgTti9JMzE4ZEX7TPAKq5tw1boQ4=; b=L5GqVIecZ/d8cfa8HQ/UdMrC/UrN1JYSMLypYOhoOGTn8PDSAOd8c+MZ/6noevC7bFpJD4 9UYl4Me+zj2QxH9ZQO4gHHjaMzTfnF/VQShbouId1vdc1znves3O4xLnTbCQDiGrb5/u5l y0eLn5L0Z/zoKJ2fb8EIfSUVZo/UbMYatNklv3VhJI34sb1SDrOsw6bG9fG4bAQCLFnqT2 WUWE3hgAkdH2t5YxtLT4hisG9Hsi+SVElOyoja6o3rSnKfDSED210bUKiSDdysgEsAGt3b L5fG/m/+eYnpcYF1R15bNqxUu7UB/6m7C3aqUVsjMItVut7kP0Ak4R+Badbqsw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V3fFh1thTzp72; Tue, 26 Mar 2024 05:56:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42Q5uuvS003264; Tue, 26 Mar 2024 05:56:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42Q5uuMu003261; Tue, 26 Mar 2024 05:56:56 GMT (envelope-from git) Date: Tue, 26 Mar 2024 05:56:56 GMT Message-Id: <202403260556.42Q5uuMu003261@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 285f941478d8 - stable/13 - xdr(3): Fix a few typos in source code comments List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 285f941478d83b04fbbc53ee4003705cd41199b3 Auto-Submitted: auto-generated The branch stable/13 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=285f941478d83b04fbbc53ee4003705cd41199b3 commit 285f941478d83b04fbbc53ee4003705cd41199b3 Author: Gordon Bergling AuthorDate: 2024-03-23 07:43:41 +0000 Commit: Gordon Bergling CommitDate: 2024-03-26 05:56:48 +0000 xdr(3): Fix a few typos in source code comments - s/reoutines/routines/ - s/paraemters/parameters/ Obtained from: NetBSD (cherry picked from commit 577a721d05aa20f38a615ad1cd5089a51c8571c1) --- lib/libc/xdr/xdr_rec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libc/xdr/xdr_rec.c b/lib/libc/xdr/xdr_rec.c index cd99eecf6108..ddad84ff86d6 100644 --- a/lib/libc/xdr/xdr_rec.c +++ b/lib/libc/xdr/xdr_rec.c @@ -227,7 +227,7 @@ xdrrec_create(XDR *xdrs, u_int sendsize, u_int recvsize, void *tcp_handle, /* - * The reoutines defined below are the xdr ops which will go into the + * The routines defined below are the xdr ops which will go into the * xdr handle filled in by xdrrec_create. */ @@ -489,7 +489,7 @@ xdrrec_eof(XDR *xdrs) /* * The client must tell the package when an end-of-record has occurred. - * The second paraemters tells whether the record should be flushed to the + * The second parameters tells whether the record should be flushed to the * (output) tcp stream. (This let's the package support batched or * pipelined procedure calls.) TRUE => immmediate flush to tcp connection. */ From nobody Wed Mar 27 08:26:40 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V4KX047b7z5Gj6J; Wed, 27 Mar 2024 08:26: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 4V4KX03fnGz4DXS; Wed, 27 Mar 2024 08:26:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711528000; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MVaqqRS8f9WAVL0e1NFouVY66qHzwpfl8+r2eauFP4A=; b=pdwk5O+C6oYktN0YxqLO7WiXjR5cup3gawoLEjD7XmbQ4E5o0MabRDf5cBjWwK92kraWRi T2tr5f0KXP5ZOTjQytC9hwQ/3eicWM6egF1/aN/McwQB2q01xyFqeuO56c83ORjHkPCd5M 6zf7igy6m3+O810IfdwISHKHBerWoFiAaEgCWumfTskINK2bWFx/HULaRIi/ATqlkWa1Dh vcxwmuuIw5LbVB6OQFngwUGX+wDSGfpRmbhGaAo3tI56n/hmz2meI6/QGcYtvlTrpxp/SZ dLDSHN0Bk9Dkq44tP63AqRp5fepdB4f8+7158rOE5F7qAyuoxt7B6yGx9T6AGg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711528000; a=rsa-sha256; cv=none; b=f0hu9pPtZICEpB1ozWeFWvrfHyJCZTkzTEacIhjBEWHFSPfYjorc9POizDo3CIUYNOxxD1 jPAlykvrIBRkBj7BpN6VDX4eYwKCRV4vFhcPvfmwRhIPhCucqCeqRAtakXqH/a5C27cdnX stL2h0xBmTFa/p5KVzhPsVQyB/8IS+Yn9dTPJcjIS4vL+YLuRp5Ipteb6bDsO/EPD1TU3M ORu/fL5d5B+RJyTTRjle4ROkK5L8nxoyzPua66Rn+Wn9cTwiVNrALrsq2ojp+BTDZt1Ula RX4i3WMKG8Ca1IHWYJ7Y3aP71ebXK3qL/szT7S4OZNFIASNt2QoX1sFcVpyA/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711528000; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MVaqqRS8f9WAVL0e1NFouVY66qHzwpfl8+r2eauFP4A=; b=UI9smyFfb8W1yrD0OkbUTfsANUVqU9L2uDwfaqbHrgEIxoujAJHyYvV2CAXptdBw5vUUDL jZwDGzabfsN3MAgjmHWYO6Bq8CU+n7Hjjky/WtO3z7RaBpqz2oU6RaOBdKw/qRLEVyvTiK bRAiwPrjy9wldCX9dIehYvu8DO24kbLrGRQK+2vuYLMAAhglAZXvL81+j4UT+wVjg9SIh3 sWF1CdhTwwPt70YSRcssKlAm4A4YVuu3o/o+fFIs8OMjB6uL1ubDoKSEVjmAHfLxuXrm4M GtVt3dDK+onvjxrdvrRJMmacIlfBuQMnHH9LPIPhsdwCxs7x9nWnup/oPEHSCw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V4KX03G6GzcFX; Wed, 27 Mar 2024 08:26:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42R8QecQ096080; Wed, 27 Mar 2024 08:26:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42R8Qeh8096077; Wed, 27 Mar 2024 08:26:40 GMT (envelope-from git) Date: Wed, 27 Mar 2024 08:26:40 GMT Message-Id: <202403270826.42R8Qeh8096077@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Baptiste Daroussin Subject: git: ad8c850830f3 - stable/14 - libucl: import snapshot 2024-02-06 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ad8c850830f3b8044ec162c30420509764ba21a1 Auto-Submitted: auto-generated The branch stable/14 has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=ad8c850830f3b8044ec162c30420509764ba21a1 commit ad8c850830f3b8044ec162c30420509764ba21a1 Author: Baptiste Daroussin AuthorDate: 2024-02-29 12:27:03 +0000 Commit: Baptiste Daroussin CommitDate: 2024-03-27 08:18:47 +0000 libucl: import snapshot 2024-02-06 (cherry picked from commit ddca081d382c7275bb6328c730182a007334c939) --- contrib/libucl/libucl.pc | 11 ++++ contrib/libucl/python/ucl.pyi | 15 +++++ .../libucl/tests/schema/definitions.json.disabled | 32 +++++++++ .../libucl/tests/schema/refRemote.json.disabled | 76 ++++++++++++++++++++++ 4 files changed, 134 insertions(+) diff --git a/contrib/libucl/libucl.pc b/contrib/libucl/libucl.pc new file mode 100644 index 000000000000..4878bebafcdd --- /dev/null +++ b/contrib/libucl/libucl.pc @@ -0,0 +1,11 @@ +prefix=/usr/local +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: LibUCL +Description: Universal configuration library +Version: 0.9.0 +Libs: -L${libdir} -lucl +Libs.private: +Cflags: -I${includedir}/ diff --git a/contrib/libucl/python/ucl.pyi b/contrib/libucl/python/ucl.pyi new file mode 100644 index 000000000000..79fa2901ba9f --- /dev/null +++ b/contrib/libucl/python/ucl.pyi @@ -0,0 +1,15 @@ +# Stubs for ucl (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +UCL_EMIT_CONFIG = ... # type: int +UCL_EMIT_JSON = ... # type: int +UCL_EMIT_JSON_COMPACT = ... # type: int +UCL_EMIT_MSGPACK = ... # type: int +UCL_EMIT_YAML = ... # type: int + +def dump(*args, **kwargs): ... +def load(*args, **kwargs): ... +def validate(*args, **kwargs): ... + +class SchemaError(Exception): ... diff --git a/contrib/libucl/tests/schema/definitions.json.disabled b/contrib/libucl/tests/schema/definitions.json.disabled new file mode 100644 index 000000000000..1ab9b2163c44 --- /dev/null +++ b/contrib/libucl/tests/schema/definitions.json.disabled @@ -0,0 +1,32 @@ +[ + { + "description": "valid definition", + "schema": {"$ref": "http://highsecure.ru/ucl-schema/schema#"}, + "tests": [ + { + "description": "valid definition schema", + "data": { + "definitions": { + "foo": {"type": "integer"} + } + }, + "valid": true + } + ] + }, + { + "description": "invalid definition", + "schema": {"$ref": "http://highsecure.ru/ucl-schema/schema#"}, + "tests": [ + { + "description": "invalid definition schema", + "data": { + "definitions": { + "foo": {"type": 1} + } + }, + "valid": false + } + ] + } +] diff --git a/contrib/libucl/tests/schema/refRemote.json.disabled b/contrib/libucl/tests/schema/refRemote.json.disabled new file mode 100644 index 000000000000..067c666b0ec8 --- /dev/null +++ b/contrib/libucl/tests/schema/refRemote.json.disabled @@ -0,0 +1,76 @@ +[ + { + "description": "remote ref", + "schema": {"$ref": "http://highsecure.ru/ucl-schema/remotes/integer.json"}, + "tests": [ + { + "description": "remote ref valid", + "data": 1, + "valid": true + }, + { + "description": "remote ref invalid", + "data": "a", + "valid": false + } + ] + }, + { + "description": "fragment within remote ref", + "schema": {"$ref": "http://highsecure.ru/ucl-schema/remotes/subSchemas.json#/integer"}, + "tests": [ + { + "description": "remote fragment valid", + "data": 1, + "valid": true + }, + { + "description": "remote fragment invalid", + "data": "a", + "valid": false + } + ] + }, + { + "description": "ref within remote ref", + "schema": { + "$ref": "http://highsecure.ru/ucl-schema/remotes/subSchemas.json#/refToInteger" + }, + "tests": [ + { + "description": "ref within ref valid", + "data": 1, + "valid": true + }, + { + "description": "ref within ref invalid", + "data": "a", + "valid": false + } + ] + } +/* + { + "description": "change resolution scope", + "schema": { + "id": "http://highsecure.ru/ucl-schema/remotes/", + "items": { + "id": "folder/", + "items": {"$ref": "folderInteger.json"} + } + }, + "tests": [ + { + "description": "changed scope ref valid", + "data": [[1]], + "valid": true + }, + { + "description": "changed scope ref invalid", + "data": [["a"]], + "valid": false + } + ] + } +*/ +] From nobody Wed Mar 27 08:26:41 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V4KX16Ghpz5Gj93; Wed, 27 Mar 2024 08:26: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 4V4KX14d1Wz4DmD; Wed, 27 Mar 2024 08:26:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711528001; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l/7SybXpdQcPIebF9GWr95JwCkbWMgjrAZnbOSi/evA=; b=YQpCjdvIYh9OiFHuz+ZRhHeHQi/Ft274xJDMQ0llZkI2AJDIb/+z5kQfoWAIqRGsboDhQ/ mfqaVtNq7Fy5crMHI26IRrdfhHwYHH6bH4KEr2gR+L7LQmiv1dbrLWILitmb09GDWpVjkW poUugNwc2gWyUMWjFYVooXe2nC5cuCQIsATZhE+XEF5lqHFHSpPXV4ZY65FEARBVt80UXd LVBHWWOS+h6HcJUdAIo+XcmX4uGdw3k+NZkPNJ8T52UzeAeZRSN+1MDTvSMP4mnz//vN1/ DTes2kwD+RKyQzoKDvJ2XonMiJg4HlzEIRo+Pfu45TyUdD0C4wU2OKNGb7VQFA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711528001; a=rsa-sha256; cv=none; b=Z6NVZJoZ+A1yU+NhmZndtV89glaYnVIYpLBd2RQyKGIpY6V5QG4bfQ53RVeyFB/IOiQgDU Crh6dyPZ7gUsze1tBbsFfJ4jDWriPy6o771imr6hdVX3bQUx2rSOEgtS5BdZZFoOGxhQ6h 1XJ4j8oyVdabEPn6TxOwWh+pgFp28L7M7pSTswuqiVseK4DvX2pMlHilXrd/39ycjAhdfl IL1iXvBsqmSz2eY19eZxhe7as/6ovp6kONYJQiXYunHoqVPqq/dlD5gKlKJsdMq/Hu2qcg GbRB4XbJBezUs3IRFPpMmuyQ/rgmgxurWqvmaSRauhaeJLlBbJyt10g/ys5Bhg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711528001; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l/7SybXpdQcPIebF9GWr95JwCkbWMgjrAZnbOSi/evA=; b=cg8m1gZxSXvL5DvGI4JqeY61JZE0I9iIHTFc0N6h9Ra9W6XrVrqjGvWxhc+a3U6sDbpNSM nmpzbhC1zyFkD5hEcg2/gOv9rRHJkwrwJ4qmVmEIsYt6iJliOJMZBauFaqUuhFWTe5KRC7 /GEhYEYsTsblm3BmIkTEHdWQcX3QUt2Iyc03ppvC3s50AqK8hb/kGevV0Gia4qfWQuI6sN nkgdOUs1ebb0Z52KA0SEYFq4sSwePYUiSydSc5BiO7yFqKMy4iSNYw2VLGGCYOHrM7fwQ4 pryfdcVer5hVf+7F9C6U6DiPR9USi9rrRAMIKpuRlwKJiDz8ltXBQIR84+vuiw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V4KX14DsWzcKW; Wed, 27 Mar 2024 08:26:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42R8QfEE096145; Wed, 27 Mar 2024 08:26:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42R8QfHc096142; Wed, 27 Mar 2024 08:26:41 GMT (envelope-from git) Date: Wed, 27 Mar 2024 08:26:41 GMT Message-Id: <202403270826.42R8QfHc096142@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Baptiste Daroussin Subject: git: 7b9a772f9f64 - stable/14 - usbconfig: allow to get usb vendors and products from the usb.ids database List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 7b9a772f9f648c44d0c09963726a0dd7014d0f80 Auto-Submitted: auto-generated The branch stable/14 has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=7b9a772f9f648c44d0c09963726a0dd7014d0f80 commit 7b9a772f9f648c44d0c09963726a0dd7014d0f80 Author: Baptiste Daroussin AuthorDate: 2024-02-27 17:12:38 +0000 Commit: Baptiste Daroussin CommitDate: 2024-03-27 08:19:49 +0000 usbconfig: allow to get usb vendors and products from the usb.ids database Reviewed by: emaste, manu Differential Revision: https://reviews.freebsd.org/D3392 (cherry picked from commit 8fe86d923f83ffdfed44f3b67b55287bf7cf3ce1) --- usr.sbin/usbconfig/dump.c | 150 ++++++++++++++++++++++++++++++++++++++++- usr.sbin/usbconfig/pathnames.h | 4 ++ 2 files changed, 153 insertions(+), 1 deletion(-) diff --git a/usr.sbin/usbconfig/dump.c b/usr.sbin/usbconfig/dump.c index d7ea8b93011a..36f026bfc2fb 100644 --- a/usr.sbin/usbconfig/dump.c +++ b/usr.sbin/usbconfig/dump.c @@ -2,6 +2,7 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. + * Copyright (c) 2024 Baptiste Daroussin * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -25,6 +26,8 @@ * SUCH DAMAGE. */ +#include + #include #include #include @@ -38,12 +41,28 @@ #include #include "dump.h" +#include "pathnames.h" #define DUMP0(n,type,field,...) dump_field(pdev, " ", #field, n->field); #define DUMP1(n,type,field,...) dump_field(pdev, " ", #field, n->field); #define DUMP2(n,type,field,...) dump_field(pdev, " ", #field, n->field); #define DUMP3(n,type,field,...) dump_field(pdev, " ", #field, n->field); +struct usb_product_info { + STAILQ_ENTRY(usb_product_info) link; + int id; + char *desc; +}; + +struct usb_vendor_info { + STAILQ_ENTRY(usb_vendor_info) link; + STAILQ_HEAD(,usb_product_info) devs; + int id; + char *desc; +}; + +STAILQ_HEAD(usb_vendors, usb_vendor_info); + const char * dump_mode(uint8_t value) { @@ -293,22 +312,151 @@ dump_iface(struct libusb20_device *pdev, } } +static struct usb_vendors * +load_vendors(void) +{ + const char *dbf; + FILE *db = NULL; + struct usb_vendor_info *cv; + struct usb_product_info *cd; + struct usb_vendors *usb_vendors; + char buf[1024], str[1024]; + char *ch; + int id; + + usb_vendors = malloc(sizeof(*usb_vendors)); + if (usb_vendors == NULL) + err(1, "out of memory"); + STAILQ_INIT(usb_vendors); + if ((dbf = getenv("USB_VENDOR_DATABASE")) != NULL) + db = fopen(dbf, "r"); + if (db == NULL) { + dbf = _PATH_LUSBVDB; + if ((db = fopen(dbf, "r")) == NULL) { + dbf = _PATH_USBVDB; + if ((db = fopen(dbf, "r")) == NULL) + return (usb_vendors); + } + } + cv = NULL; + cd = NULL; + + for (;;) { + if (fgets(buf, sizeof(buf), db) == NULL) + break; + + if ((ch = strchr(buf, '#')) != NULL) + *ch = '\0'; + if (ch == buf) + continue; + ch = strchr(buf, '\0') - 1; + while (ch > buf && isspace(*ch)) + *ch-- = '\0'; + if (ch <= buf) + continue; + + /* Can't handle subvendor / subdevice entries yet */ + if (buf[0] == '\t' && buf[1] == '\t') + continue; + + /* Check for vendor entry */ + if (buf[0] != '\t' && sscanf(buf, "%04x %[^\n]", &id, str) == 2) { + if ((id == 0) || (strlen(str) < 1)) + continue; + if ((cv = malloc(sizeof(struct usb_vendor_info))) == NULL) + err(1, "out of memory"); + if ((cv->desc = strdup(str)) == NULL) + err(1, "out of memory"); + cv->id = id; + STAILQ_INIT(&cv->devs); + STAILQ_INSERT_TAIL(usb_vendors, cv, link); + continue; + } + + /* Check for device entry */ + if (buf[0] == '\t' && sscanf(buf + 1, "%04x %[^\n]", &id, str) == 2) { + if ((id == 0) || (strlen(str) < 1)) + continue; + if (cv == NULL) + continue; + if ((cd = malloc(sizeof(struct usb_product_info))) == NULL) + err(1, "out of memory"); + if ((cd->desc = strdup(str)) == NULL) + err(1, "out of memory"); + cd->id = id; + STAILQ_INSERT_TAIL(&cv->devs, cd, link); + continue; + } + } + if (ferror(db)) + err(1, "error reading the usb id db"); + + fclose(db); + /* cleanup */ + return (usb_vendors); +} + +static char * +_device_desc(struct libusb20_device *pdev) +{ + static struct usb_vendors *usb_vendors = NULL; + char *desc = NULL; + const char *vendor = NULL, *product = NULL; + uint16_t vid = libusb20_dev_get_device_desc(pdev)->idVendor; + uint16_t pid = libusb20_dev_get_device_desc(pdev)->idProduct; + struct usb_vendor_info *vi; + struct usb_product_info *pi; + + if (usb_vendors == NULL) + usb_vendors = load_vendors(); + + STAILQ_FOREACH(vi, usb_vendors, link) { + if (vi->id == vid) { + vendor = vi->desc; + break; + } + } + if (vi != NULL) { + STAILQ_FOREACH(pi, &vi->devs, link) { + if (pi->id == pid) { + product = pi->desc; + break; + } + } + } + if (vendor == NULL || product == NULL) + return (NULL); + + asprintf(&desc, "ugen%u.%u: <%s %s> at usbus%u", + libusb20_dev_get_bus_number(pdev), + libusb20_dev_get_address(pdev), + product, vendor, + libusb20_dev_get_bus_number(pdev)); + + + return (desc); +} + void dump_device_info(struct libusb20_device *pdev, uint8_t show_ifdrv) { char buf[128]; uint8_t n; unsigned int usage; + char *desc; usage = libusb20_dev_get_power_usage(pdev); + desc = _device_desc(pdev); + printf("%s, cfg=%u md=%s spd=%s pwr=%s (%umA)\n", - libusb20_dev_get_desc(pdev), + desc ? desc : libusb20_dev_get_desc(pdev), libusb20_dev_get_config_index(pdev), dump_mode(libusb20_dev_get_mode(pdev)), dump_speed(libusb20_dev_get_speed(pdev)), dump_power_mode(libusb20_dev_get_power_mode(pdev)), usage); + free(desc); if (!show_ifdrv) return; diff --git a/usr.sbin/usbconfig/pathnames.h b/usr.sbin/usbconfig/pathnames.h new file mode 100644 index 000000000000..66053a9a87c5 --- /dev/null +++ b/usr.sbin/usbconfig/pathnames.h @@ -0,0 +1,4 @@ +#include + +#define _PATH_USBVDB "/usr/share/misc/usb_vendors" +#define _PATH_LUSBVDB _PATH_LOCALBASE "/share/usbids/usb.ids" From nobody Wed Mar 27 08:26:42 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V4KX32J2Kz5GjTd; Wed, 27 Mar 2024 08:26: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 4V4KX26XzMz4DkP; Wed, 27 Mar 2024 08:26:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711528002; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=67k3hBbU3lMIjPDk+Uq8t8MGTN+Xirs0Vh4D6REJC68=; b=rbTmq4ASMXPryKL6K1XLG05k9i08f7+drOan8vwUT9hLzxeFpXF7U/bEK2phYGxa7qSdG3 CeAIp/nnqZM8fHRdQmo0l7lqC3lg82BptQ3A2LoFozszEsJvrJNsW+D0DVO/FFuLcZV6rz U1AAX1jM5f8Bkhet3kX+YUxMYY1JVBEj3p3zD0Dkf1XmxDw+6bb9c7DT/eyExFp1skeDC4 lWo2a7lVGs0Tzuy9BXHGnMwnKn+HMLumoBvjSpnE1FYsvdzEaMyk6k8Xnvxu3VSVC/lMrk 22N/0jbg4AzqJElC7JdVUewqME6DJUBn92LB+wO5Cxy7a77YAm9rf5LIL3DmIA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711528002; a=rsa-sha256; cv=none; b=nopsHclUabFGnvoRCkCxMV0xQZTw7bQ+hmqFMQqJmfRgHR1/iVrhCPwD4E5Qo1q5NlokLK BrExqCBalN+rJH4bepAGK3v4cmUgsDe/xVXIXa+q0IuLRTau2Ta18bDZjbhcQS0c4EiSnu j5LzLpPrJaf9XHf6aG4lUa1xdChBMxCf2XRaEFqqHJoA3YocHmhzSmM7zQhg1V801/xDdu z8QqGmuEZ46b2lymQCN75J7FNVRt7jcQgNbAj6pYakLGdgtb/TyzFZui7eXOhJngNES52n K+GIakobM7qL4RBmJI8atGyzm8p7Fh8vKDtMZlwvXWYCcuHkmwHAFrHEeBpA6A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711528002; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=67k3hBbU3lMIjPDk+Uq8t8MGTN+Xirs0Vh4D6REJC68=; b=OY33IE0rFwTtWUnVAyOP/Rv9LWL8/DIlc5ucm2kveNPgcngz+luSR7TURWyBSQB4kiSXu2 uKzdV4fjOFHs3a2e+iGYqp8FK71SF31R+jjHP672TjcLxJFOHTNFZXA5bEq/SYccj1Ckt/ hh63FzK44VYU2apc+ia3MRnu1lwuK9yporFDOgs+nuIoteoC0+KL29pua8//Pman0N65+/ g4bF/JUQVtd2iZN1t6xL5ISxi91qltZri3fbp1K6nhTJCbQHO2TBLAZkp28SSxqBiR99vK 6ZL58QLL9fRgbcrhqC16ktWCADajb/K6oO7SwYdqCnp8tuAL19mwCgzs8RKxQA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V4KX2682qzcGs; Wed, 27 Mar 2024 08:26:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42R8QgRD096187; Wed, 27 Mar 2024 08:26:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42R8Qgg0096184; Wed, 27 Mar 2024 08:26:42 GMT (envelope-from git) Date: Wed, 27 Mar 2024 08:26:42 GMT Message-Id: <202403270826.42R8Qgg0096184@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Baptiste Daroussin Subject: git: 2464e5cfd27a - stable/14 - usb_vendors: add new usb_vendors List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 2464e5cfd27ae61783b0457ce5a49441352a0596 Auto-Submitted: auto-generated The branch stable/14 has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=2464e5cfd27ae61783b0457ce5a49441352a0596 commit 2464e5cfd27ae61783b0457ce5a49441352a0596 Author: Baptiste Daroussin AuthorDate: 2024-02-29 12:02:46 +0000 Commit: Baptiste Daroussin CommitDate: 2024-03-27 08:20:19 +0000 usb_vendors: add new usb_vendors usb_vendors is a local copy of usb.ids (similar to pci_vendors) It is now used by usbconfig(1) when listing the devices. (cherry picked from commit db1d086b7372d1d3f4e7a475d8e92642e698c25d) --- share/misc/Makefile | 2 +- share/misc/usb_vendors | 25585 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 25586 insertions(+), 1 deletion(-) diff --git a/share/misc/Makefile b/share/misc/Makefile index ed4cac718cbd..dc0d5f619240 100644 --- a/share/misc/Makefile +++ b/share/misc/Makefile @@ -7,7 +7,7 @@ FILES= ascii birthtoken bsd-family-tree committers-doc.dot committers-ports.dot \ committers-src.dot flowers init.ee \ iso3166 iso639 latin1 mdoc.template operator pci_vendors \ - scsi_modes \ + scsi_modes usb_vendors \ organization.dot FILESDIR= ${BINDIR}/misc diff --git a/share/misc/usb_vendors b/share/misc/usb_vendors new file mode 100644 index 000000000000..74a0cef04aa3 --- /dev/null +++ b/share/misc/usb_vendors @@ -0,0 +1,25585 @@ +# +# List of USB ID's +# +# Maintained by Stephen J. Gowdy +# If you have any new entries, please submit them via +# http://www.linux-usb.org/usb-ids.html +# or send entries as patches (diff -u old new) in the +# body of your email (a bot will attempt to deal with it). +# The latest version can be obtained from +# http://www.linux-usb.org/usb.ids +# +# Version: 2024.01.30 +# Date: 2024-01-30 20:34:02 +# + +# Vendors, devices and interfaces. Please keep sorted. + +# Syntax: +# vendor vendor_name +# device device_name <-- single tab +# interface interface_name <-- two tabs + +0001 Fry's Electronics + 7778 Counterfeit flash drive [Kingston] +0002 Ingram + 0002 passport00 + 7007 HPRT XT300 +0003 Club Mac +0004 Nebraska Furniture Mart +0011 Unknown + 7788 counterfeit flash drive +001f Walmart + 0b21 AB13X Headset Adapter +0040 Anyware Corporation + 073d Mini Multimedia 2.4GHz Wireless Keyboard with Touch Pad +0042 DMT +0053 Planex + 5301 GW-US54ZGL 802.11bg +0078 Microntek + 0006 Joystick +0079 DragonRise Inc. + 0006 PC TWIN SHOCK Gamepad + 0011 Gamepad + 1800 Mayflash Wii U Pro Game Controller Adapter [DirectInput] + 181b Venom Arcade Joystick + 1843 Mayflash GameCube Controller Adapter + 1844 Mayflash GameCube Controller +0080 Unknown + a001 JMS578 based SATA bridge +0085 Boeye Technology Co., Ltd. + 0600 eBook Reader +0102 miniSTREAK +0105 Trust International B.V. + 145f NW-3100 802.11b/g 54Mbps Wireless Network Adapter [zd1211] +0127 IBP + 0002 HDM Interface + 0127 ibp +0145 Unknown + 0112 Card Reader +017c MLK + 145f Trust Deskset +0200 TP-Link + 0201 MA180 UMTS Modem +0204 Chipsbank Microelectronics Co., Ltd + 6025 CBM2080 / CBM2090 Flash drive controller + 6026 CBM1180 Flash drive controller +0218 Hangzhou Worlde + 0301 MIDI Port +0231 Sonuus Limited +02ad HUMAX Co., Ltd. + 138c PVR Mass Storage +0303 Mini Automation Controller +0324 OCZ Technology Inc + bc06 OCZ ATV USB 2.0 Flash Drive + bc08 OCZ Rally2/ATV USB 2.0 Flash Drive +0325 OCZ Technology Inc + ac02 ATV Turbo / Rally2 Dual Channel USB 2.0 Flash Drive +0386 LTS + 0001 PSX for USB Converter +03c3 ZWO + 120e ASI120MC-S Planetary Camera + 1f10 EFF + 294f ASI294MC Pro +03d9 Shenzhen Sinote Tech-Electron Co., Ltd + 0499 SE340D PC Remote Control +03da Bernd Walter Computer Technology + 0002 HD44780 LCD interface +03e7 Intel + 2150 Myriad VPU [Movidius Neural Compute Stick] + 2485 Movidius MyriadX + f63b Myriad VPU [Movidius Neural Compute Stick] +03e8 EndPoints, Inc. + 0004 SE401 Webcam + 0008 101 Ethernet [klsi] + 0015 ATAPI Enclosure + 2123 SiPix StyleCam Deluxe + 8004 Aox 99001 +03e9 Thesys Microelectronics +03ea Data Broadcasting Corp. +03eb Atmel Corp. + 0902 4-Port Hub + 2002 Mass Storage Device + 2015 at90usbkey sample firmware (HID keyboard) + 2018 at90usbkey sample firmware (CDC ACM) + 2019 stk525 sample firmware (microphone) + 201c at90usbkey sample firmware (HID mouse) + 201d at90usbkey sample firmware (HID generic) + 2022 at90usbkey sample firmware (composite device) + 2040 LUFA Test PID + 2041 LUFA Mouse Demo Application + 2042 LUFA Keyboard Demo Application + 2043 LUFA Joystick Demo Application + 2044 LUFA CDC Demo Application + 2045 LUFA Mass Storage Demo Application + 2046 LUFA Audio Output Demo Application + 2047 LUFA Audio Input Demo Application + 2048 LUFA MIDI Demo Application + 2049 Stripe Snoop Magnetic Stripe Reader + 204a LUFA CDC Class Bootloader + 204b LUFA USB to Serial Adapter Project + 204c LUFA RNDIS Demo Application + 204d LUFA Combined Mouse and Keyboard Demo Application + 204e LUFA Dual CDC Demo Application + 204f LUFA Generic HID Demo Application + 2060 Benito Programmer Project + 2061 LUFA Combined Mass Storage and Keyboard Demo Application + 2062 LUFA Combined CDC and Mouse Demo Application + 2063 LUFA Datalogger Device + 2064 Interfaceless Control-Only LUFA Devices + 2065 LUFA Test and Measurement Demo Application + 2066 LUFA Multiple Report HID Demo + 2067 LUFA HID Class Bootloader + 2068 LUFA Virtual Serial/Mass Storage Demo + 2069 LUFA Webserver Project + 2103 JTAG ICE mkII + 2104 AVR ISP mkII + 2105 AVRONE! + 2106 STK600 development board + 2107 AVR Dragon + 2109 STK541 ZigBee Development Board + 210a AT86RF230 [RZUSBSTICK] transceiver + 210d XPLAIN evaluation kit (CDC ACM) + 2110 AVR JTAGICE3 Debugger and Programmer + 2111 Xplained Pro board debugger and programmer + 2122 XMEGA-A1 Explained evaluation kit + 2140 AVR JTAGICE3 (v3.x) Debugger and Programmer + 2141 ICE debugger + 2145 ATMEGA328P-XMINI (CDC ACM) + 2310 EVK11xx evaluation board + 2404 The Micro + 2fe4 ATxmega32A4U DFU bootloader + 2fe6 Cactus V6 (DFU) + 2fea Cactus RF60 (DFU) + 2fee atmega8u2 DFU bootloader + 2fef atmega16u2 DFU bootloader + 2ff0 atmega32u2 DFU bootloader + 2ff1 at32uc3a3 DFU bootloader + 2ff3 atmega16u4 DFU bootloader + 2ff4 atmega32u4 DFU bootloader + 2ff6 at32uc3b0/1 DFU bootloader + 2ff7 at90usb82 DFU bootloader + 2ff8 at32uc3a0/1 DFU bootloader + 2ff9 at90usb646/647 DFU bootloader + 2ffa at90usb162 DFU bootloader + 2ffb at90usb AVR DFU bootloader + 2ffd at89c5130/c5131 DFU bootloader + 2fff at89c5132/c51snd1c DFU bootloader + 3301 at43301 4-Port Hub + 3312 4-Port Hub + 4102 AirVast W-Buddie WN210 + 5601 at76c510 Prism-II 802.11b Access Point + 5603 Cisco 7920 WiFi IP Phone + 6119 AT91SAM CDC Demo Application + 6124 at91sam SAMBA bootloader + 6127 AT91SAM HID Keyboard Demo Application + 6129 AT91SAM Mass Storage Demo Application + 6200 AT91SAM HID Mouse Demo Application + 7603 D-Link DWL-120 802.11b Wireless Adapter [Atmel at76c503a] + 7604 at76c503a 802.11b Adapter + 7605 at76c503a 802.11b Adapter + 7606 at76c505 802.11b Adapter + 7611 at76c510 rfmd2948 802.11b Access Point + 7613 WL-1130 USB + 7614 AT76c505a Wireless Adapter + 7615 AT76C505AMX Wireless Adapter + 7617 AT76C505AS Wireless Adapter + 7800 Mini Album + 800c Airspy HF+ + ff01 WootingOne + ff02 WootingTwo + ff07 Tux Droid fish dongle +03ec Iwatsu America, Inc. +03ed Mitel Corp. +03ee Mitsumi + 0000 CD-R/RW Drive + 2501 eHome Infrared Receiver + 2502 eHome Infrared Receiver + 5609 Japanese Keyboard + 641f WIF-0402C Bluetooth Adapter + 6438 Bluetooth Device + 6440 WML-C52APR Bluetooth Adapter + 6901 SmartDisk FDD + 6902 Floppy Disk Drive + 7500 CD-R/RW + ffff Dongle with BlueCore in DFU mode +03f0 HP, Inc + 0004 DeskJet 895c + 0011 OfficeJet G55 + 0012 DeskJet 1125C Printer Port + 0024 KU-0316 Keyboard + 002a LaserJet P1102 + 0053 DeskJet 2620 All-in-One Printer + 0101 ScanJet 4100c + 0102 PhotoSmart S20 + 0104 DeskJet 880c/970c + 0105 ScanJet 4200c + 0107 CD-Writer Plus + 010c Multimedia Keyboard Hub + 0111 G55xi Printer/Scanner/Copier + 0117 LaserJet 3200 + 011c hn210w 802.11b Adapter + 011d Bluetooth 1.2 Interface [Broadcom BCM2035] + 0121 HP 39g+ [F2224A], 39gs [F2223A], 40gs [F2225A], 48gII [F2226A], 49g+ [F2228A], 50g [F2229A, NW240AA] + 0122 HID Internet Keyboard + 0125 DAT72 Tape + 0139 Barcode Scanner 4430 + 0201 ScanJet 6200c + 0202 PhotoSmart S20 + 0204 DeskJet 815c + 0205 ScanJet 3300c + 0207 CD-Writer Plus 8200e + 020c Multimedia Keyboard + 0211 OfficeJet G85 + 0212 DeskJet 1220C + 0217 LaserJet 2200 + 0218 APOLLO P2500/2600 + 0221 StreamSmart 400 [F2235AA] + 0223 Digital Drive Flash Reader + 022a LaserJet CP1525nw/x + 0241 Link-5 micro dongle + 0304 DeskJet 810c/812c + 0305 ScanJet 4300c + 0307 CD-Writer+ CD-4e + 0311 OfficeJet G85xi + 0312 Color Inkjet CP1700 + 0314 designjet 30/130 series + 0317 LaserJet 1200 + 0324 SK-2885 keyboard + 034a Elite Keyboard + 0401 ScanJet 5200c + 0404 DeskJet 830c/832c + 0405 ScanJet 3400cse + 0411 OfficeJet G95 + 0412 Printing Support + 0417 LaserJet 1200 series + 0423 HS-COMBO Cardreader + 042a LaserJet M1132 MFP + 0441 Prime [NW280AA, G8X92AA] + 0504 DeskJet 885c + 0505 ScanJet 2100c + 0507 DVD+RW + 050c 5219 Wireless Keyboard + 0511 OfficeJet K60 + 0512 DeskJet 450 + 0517 LaserJet 1000 + 051d Bluetooth Interface + 052a LaserJet M1212nf MFP + 0601 ScanJet 6300c + 0604 DeskJet 840c + 0605 ScanJet 2200c + 0610 Z24i Monitor Hub + 0611 OfficeJet K60xi + 0612 business inkjet 3000 + 0624 Bluetooth Dongle + 0641 X1200 Optical Mouse + 0653 DeskJet 3700 series + 0701 ScanJet 5300c/5370c + 0704 DeskJet 825c + 0705 ScanJet 4400c + 070c Personal Media Drive + 0711 OfficeJet K80 + 0712 DeskJet 1180c + 0714 Printing Support + 0741 Prime Wireless Kit [FOK65AA] + 0801 ScanJet 7400c + 0804 DeskJet 816c + 0805 HP4470C + 0811 OfficeJet K80xi + 0817 LaserJet 3300 + 0853 ENVY 5000 series + 0901 ScanJet 2300c + 0904 DeskJet 845c + 0912 Printing Support + 0917 LaserJet 3330 + 0924 Modular Smartcard Keyboard + 0941 X500 Optical Mouse + 094a Optical Mouse [672662-001] + 0a01 ScanJet 2400c + 0a17 color LaserJet 3700 + 0b01 ScanJet 82x0C + 0b0c Wireless Keyboard and Optical Mouse receiver + 0b17 LaserJet 2300d + 0c17 LaserJet 1010 + 0c24 Bluetooth Dongle + 0d12 OfficeJet 9100 series + 0d17 LaserJet 1012 + 0d4a SK-2025 Keyboard + 0e17 LaserJet 1015 + 0f0c Wireless Keyboard and Optical Mouse receiver + 0f11 OfficeJet V40 + 0f12 Printing Support + 0f17 LaserJet 1150 + 0f2a LaserJet 400 color M451dn + 1001 Photo Scanner 1000 + 1002 PhotoSmart 140 series + 1004 DeskJet 970c/970cse + 1005 ScanJet 5400c + 1011 OfficeJet V40xi + 1016 Jornada 548 / iPAQ HW6515 Pocket PC + 1017 LaserJet 1300 + 1024 Smart Card Keyboard + 1027 Virtual keyboard and mouse + 102a LaserJet Professional P 1102w + 1102 PhotoSmart 240 series + 1104 DeskJet 959c + 1105 ScanJet 5470c/5490c + 1111 OfficeJet v60 + 1116 Jornada 568 Pocket PC + 1117 LaserJet 1300n + 1151 PSC-750xi Printer/Scanner/Copier + 1198 HID-compliant mouse + 1202 PhotoSmart 320 series + 1204 DeskJet 930c + 1205 ScanJet 4500C/5550C + 1211 OfficeJet v60xi + 1217 LaserJet 2300L + 1227 Virtual CD-ROM + 1302 PhotoSmart 370 series + 1305 ScanJet 4570c + 1311 OfficeJet V30 + 1312 DeskJet 460 + 1317 LaserJet 1005 + 1327 iLO Virtual Hub + 134a Optical Mouse + 1405 ScanJet 3670 + 1411 PSC 750 + 1424 f2105 Monitor Hub + 1502 PhotoSmart 420 series + 1504 DeskJet 920c + 150c Mood Lighting (Microchip Technology Inc.) + 1511 PSC 750xi + 1512 Printing Support + 1517 color LaserJet 3500 + 1524 Smart Card Keyboard - KR + 1539 Mini Magnetic Stripe Reader + 1541 Prime [G8X92AA] + 154a Laser Mouse + 1602 PhotoSmart 330 series + 1604 DeskJet 940c + 1605 ScanJet 5530C PhotoSmart + 1611 psc 780 + 1617 LaserJet 3015 + 161d Wireless Rechargeable Optical Mouse (HID) + 1624 Smart Card Keyboard - JP + 1647 Z27n G2 Monitor Hub + 1702 PhotoSmart 380 series + 1704 DeskJet 948C + 1705 ScanJet 5590 + 1711 psc 780xi + 1712 Printing Support + 1717 LaserJet 3020 + 171d Bluetooth 2.0 Interface [Broadcom BCM2045] + 1801 Inkjet P-2000U + 1802 PhotoSmart 470 series + 1804 DeskJet 916C + 1805 ScanJet 7650 + 1811 PSC 720 + 1812 OfficeJet Pro K550 + 1817 LaserJet 3030 + 181d Bluetooth 2.0 Interface + 1902 PhotoSmart A430 series + 1904 DeskJet 3820 + 1911 OfficeJet V45 + 1917 LaserJet 3380 + 1a02 PhotoSmart A510 series + 1a11 OfficeJet 5100 series + 1a17 color LaserJet 4650 + 1b02 PhotoSmart A610 series + 1b04 DeskJet 3810 + 1b05 ScanJet 4850C/4890C + 1b07 Premium Starter Webcam + 1c02 PhotoSmart A710 series + 1c17 Color LaserJet 2550l + 1d02 PhotoSmart A310 series + 1d17 LaserJet 1320 + 1d24 Barcode scanner + 1e02 PhotoSmart A320 Printer series + 1e11 PSC-950 + 1e17 LaserJet 1160 series + 1f02 PhotoSmart A440 Printer series + 1f11 PSC 920 + 1f12 OfficeJet Pro K5300 + 1f17 color LaserJet 5550 + 1f1d un2400 Gobi Wireless Modem + 2001 Floppy + 2002 Hub + 2004 DeskJet 640c + 2005 ScanJet 3570c + 2012 OfficeJet Pro K5400 + 201d un2400 Gobi Wireless Modem (QDL mode) + 2039 Cashdrawer + 2102 PhotoSmart 7345 + 2104 DeskJet 630c + 2112 OfficeJet Pro L7500 + 211d Sierra MC5725 [ev2210] + 2202 PhotoSmart 7600 series + 2205 ScanJet 3500c + 2212 OfficeJet Pro L7600 + 2217 color LaserJet 9500 MFP + 222a LaserJet Pro MFP M125nw + 2302 PhotoSmart 7600 series + 2304 DeskJet 656c + 2305 ScanJet 3970c + 2311 OfficeJet d series + 2312 OfficeJet Pro L7700 + 2317 LaserJet 4350 + 231d Broadcom 2070 Bluetooth Combo + 2402 PhotoSmart 7700 series + 2404 Deskjet F2280 series + 2405 ScanJet 4070 PhotoSmart + 2417 LaserJet 4250 + 241d Gobi 2000 Wireless Modem (QDL mode) + 2424 LP1965 19" Monitor Hub + 2441 Prime G2 [2AP18AA] + 2502 PhotoSmart 7700 series + 2504 DeskJet F4200 series + 2505 ScanJet 3770 + 2512 OfficeJet Pro L7300 / Compaq LA2405 series monitor + 2514 4-port hub + 2517 LaserJet 2410 + 251d Gobi 2000 Wireless Modem + 2524 LP3065 30" Monitor Hub + 2602 PhotoSmart A520 series + 2605 ScanJet 3800c + 2611 OfficeJet 7100 series + 2617 Color LaserJet 2820 series + 2624 Pole Display (HP522 2 x 20 Line Display) + 2702 PhotoSmart A620 series + 2704 DeskJet 915 + 2717 Color LaserJet 2830 + 2724 Magnetic Stripe Reader IDRA-334133-HP + 2805 Scanjet G2710 + 2811 PSC-2100 + 2817 Color LaserJet 2840 + 2841 OMEN MINDFRAME [3XT27AA] + 2902 PhotoSmart A820 series + 2911 PSC 2200 + 2917 LaserJet 2420 + 2a11 PSC 2150 series + 2a17 LaserJet 2430 + 2a1d Integrated Module with Bluetooth 2.1 Wireless technology + 2b11 PSC 2170 series + 2b17 LaserJet 1020 + 2b4a Business Slim Keyboard + 2c12 Officejet J4680 + 2c17 LaserJet 1022 + 2c24 Logitech M-UAL-96 Mouse + 2d05 Scanjet 7000 + 2d11 OfficeJet 6110 + 2d17 Printing Support + 2d2a LaserJet Pro MFP M225dw + 2e11 PSC 1000 + 2e17 LaserJet 2600n + 2e24 LP2275w Monitor Hub + 2f11 PSC 1200 + 2f17 Color LaserJet 2605dn + 2f24 LP2475w Monitor Hub + 3002 PhotoSmart P1000 + 3004 DeskJet 980c + 3005 ScanJet 4670v + 3011 PSC 1100 series + 3017 Printing Support + 304a Slim Keyboard + 3102 PhotoSmart P1100 Printer w/ Card Reader + 3104 DeskJet 960c + 3111 OfficeJet 4100 series + 3117 EWS 2605dtn + 311d Atheros AR9285 Malbec Bluetooth Adapter + 312a LaserJet Pro M701n + 3202 PhotoSmart 1215 + 3207 4 GB flash drive + 3211 OfficeJet 4105 series + 3217 LaserJet 3050 + 3302 PhotoSmart 1218 + 3304 DeskJet 990c + 3307 v125w Stick + 3312 OfficeJet J6410 + 3317 LaserJet 3052 + 3402 PhotoSmart 1115 + 3404 DeskJet 6122 + 3417 LaserJet 3055 + 3502 PhotoSmart 230 + 3504 DeskJet 6127c + 3511 PSC 2300 + 3517 LaserJet 3390 + 354a Slim Keyboard + 3602 PhotoSmart 1315 + 3611 PSC 2410 PhotoSmart + 3612 Officejet Pro 8000 A809 + 3617 Color LaserJet 2605 + 3711 PSC 2500 + 3717 EWS UPD + 3724 Webcam + 3802 PhotoSmart 100 + 3807 c485w Flash Drive + 3817 LaserJet P2015 series + 3902 PhotoSmart 130 + 3912 Officejet Pro 8500 + 3917 LaserJet P2014 + 3a02 PhotoSmart 7150 + 3a11 OfficeJet 5500 series + 3a17 Printing Support + 3a1d hs2340 HSPA+ mobile broadband + 3b02 PhotoSmart 7150~ + 3b05 Scanjet N8460 + 3b11 PSC 1300 series + 3b17 LaserJet M1005 MFP + 3b2a Color LaserJet MFP M277dw + 3c02 PhotoSmart 7350 + 3c05 Scanjet Professional 1000 Mobile Scanner + 3c11 PSC 1358 + 3c17 EWS UPD + 3d02 PhotoSmart 7350~ + 3d11 OfficeJet 4215 + 3d17 LaserJet P1005 + 3e02 PhotoSmart 7550 + 3e07 x755w Flash Drive + 3e17 LaserJet P1006 + 3f02 PhotoSmart 7550~ + 3f11 PSC-1315/PSC-1317 + 3f17 Laserjet P1505 + 4002 PhotoSmart 635/715/720/735/935/E337 (storage) + 4004 CP1160 + 4102 PhotoSmart 618 + 4105 ScanJet 4370 + 4111 OfficeJet 7200 series + 4117 LaserJet 1018 + 4202 PhotoSmart 812 + 4205 ScanJet G3010 + 4211 OfficeJet 7300 series + 4217 EWS CM1015 + 4302 PhotoSmart 850 (ptp) + 4305 ScanJet G3110 + 4311 OfficeJet 7400 series + 4317 Color LaserJet CM1017 + 4402 PhotoSmart 935 (ptp) + 4417 EWS UPD + 4502 PhotoSmart 945 (PTP mode) + 4505 ScanJet G4010 + 4507 External HDD + 4511 PhotoSmart 2600 + 4512 E709n [Officejet 6500 Wireless] + 4517 EWS UPD + 4605 ScanJet G4050 + 4611 PhotoSmart 2700 + 4717 Color LaserJet CP1215 + 4811 PSC 1600 + 484a Elite Dock G4 + 4911 PSC 2350 + 4b11 OfficeJet 6200 + 4c11 PSC 1500 series + 4c17 EWS UPD + 4d11 PSC 1400 + 4d17 EWS UPD + 4e11 PhotoSmart 2570 series + 4f11 OfficeJet 5600 (USBHUB) + 4f17 Color LaserJet CM1312 MFP + 5004 DeskJet 995c + 5011 PhotoSmart 3100 series + 5017 EWS UPD + 5111 PhotoSmart 3200 series + 5211 PhotoSmart 3300 series + 5307 v165w Stick + 5311 OfficeJet 6300 + 5312 Officejet Pro 8500A + 5317 Color LaserJet CP2025 series + 5411 OfficeJet 4300 + 5511 DeskJet F300 series + 5611 PhotoSmart C3180 + 5617 LaserJet M1120 MFP + 5711 PhotoSmart C4100 series + 5717 LaserJet M1120n MFP + 5811 PhotoSmart C5100 series + 5817 LaserJet M1319f MFP + 581d lt4112 Gobi 4G Module Network Device + 5911 PhotoSmart C6180 + 5912 Officejet Pro 8600 + 5a11 PhotoSmart C7100 series + 5b11 OfficeJet J2100 series + 5b12 Officejet Pro 8100 + 5c11 PhotoSmart C4200 Printer series + 5c12 OfficeJet 6700 + 5c17 LaserJet P2055 series + 5d11 PhotoSmart C5200 series + 5e11 PhotoSmart D7400 series + 6004 DeskJet 5550 + 6102 Hewlett Packard Digital Camera + 6104 DeskJet 5650c + 6117 color LaserJet 3550 + 6202 PhotoSmart 215 + 6204 DeskJet 5150c + 6217 Color LaserJet 4700 + 6302 PhotoSmart 318/612 + 6317 Color LaserJet 4730mfp + 632a LaserJet M203-M206 + 6402 PhotoSmart 715 (ptp) + 6411 PhotoSmart C8100 series + 6417 LaserJet 5200 + 6502 PhotoSmart 120 (ptp) + 6511 PhotoSmart C7200 series + 6602 PhotoSmart 320 + 6611 PhotoSmart C4380 series + 6617 LaserJet 5200L + 6702 PhotoSmart 720 (ptp) + 6717 Color LaserJet 3000 + 6802 PhotoSmart 620 (ptp) + 6811 PhotoSmart D5300 series + 6817 Color LaserJet 3800 + 6911 PhotoSmart D7200 series + 6917 Color LaserJet 3600 + 6a02 PhotoSmart 735 (ptp) + 6a11 PhotoSmart C6200 series + 6a17 LaserJet 4240 + 6b02 PhotoSmart R707 (PTP mode) + 6b11 Photosmart C4500 series + 6c11 Photosmart C4480 + 6c17 Color LaserJet 4610 + 6f17 Color LaserJet CP6015 series + 7004 DeskJet 3320c + 7102 PhotoSmart 635 (PTP mode) + 7104 DeskJet 3420c + 7117 CM8060 Color MFP with Edgeline Technology + 7202 PhotoSmart 43x (ptp) + 7204 DeskJet 36xx + 7217 LaserJet M5035 MFP + 7302 PhotoSmart M307 (PTP mode) + 7304 DeskJet 35xx + 7311 Photosmart Premium C309 + 7317 LaserJet P3005 + 7404 Printing Support + 7417 LaserJet M4345 MFP + 7504 Printing Support + 7517 LaserJet M3035 MFP + 7604 DeskJet 3940 + 7611 DeskJet F2492 All-in-One + 7617 LaserJet P3004 + 7702 PhotoSmart R817 (PTP mode) + 7704 DeskJet D4100 + 7717 CM8050 Color MFP with Edgeline Technology + 7804 DeskJet D1360 + 7817 Color LaserJet CP3505 + 7917 LaserJet M5025 MFP + 7a02 PhotoSmart M415 (PTP mode) + 7a04 DeskJet D2460 + 7a11 Photosmart B109 + 7a17 LaserJet M3027 MFP + 7b02 PhotoSmart M23 (PTP mode) + 7b17 Color LaserJet CP4005 + 7c17 Color LaserJet CM6040 series + 7d04 DeskJet F2100 Printer series + 7d17 Color LaserJet CM4730 MFP + 7e04 DeskJet F4100 Printer series + 8017 LaserJet P4515 + 8104 Printing Support + 8117 LaserJet P4015 + 811c Ethernet HN210E + 8204 Printing Support + 8207 FHA-3510 2.4GHz Wireless Optical Mobile Mouse + 8217 LaserJet P4014 + 8317 LaserJet M9050 MFP + 8404 DeskJet 6800 series + 8417 LaserJet M9040 MFP + 8504 DeskJet 6600 series + 8604 DeskJet 5440 + 8607 Optical Mobile Mouse + 8704 DeskJet 5940 + 8711 Deskjet 2050 J510 + 8804 DeskJet 6980 series + 8904 DeskJet 6940 series + 8911 Deskjet 1050 J410 + 8c07 Digital Stereo Headset + 8c11 Deskjet F4500 series + 9002 PhotoSmart M437 + 9102 PhotoSmart M537 + 9207 HD-4110 Webcam + 9302 PhotoSmart R930 series + 9402 PhotoSmart R837 + 942a LaserJet Pro M12a + 9502 PhotoSmart R840 series + 952a LaserJet Pro M12w + 9602 PhotoSmart M730 series + 9702 PhotoSmart R740 series + 9802 PhotoSmart Mz60 series + 9902 PhotoSmart M630 series + 9a02 PhotoSmart E330 series + 9b02 PhotoSmart M540 series + 9b07 Portable Drive + 9c02 PhotoSmart M440 series + a004 DeskJet 5850c + a011 Deskjet 3050A + a407 Wireless Optical Comfort Mouse + b002 PhotoSmart 7200 series + b102 PhotoSmart 7200 series + b107 v255w/c310w Flash Drive + b116 Webcam + b202 PhotoSmart 7600 series + b302 PhotoSmart 7600 series + b402 PhotoSmart 7700 series + b502 PhotoSmart 7700 series + b602 PhotoSmart 7900 series + b702 PhotoSmart 7900 series + b802 PhotoSmart 7400 series + b902 PhotoSmart 7800 series + ba02 PhotoSmart 8100 series + bb02 PhotoSmart 8400 series + bc02 PhotoSmart 8700 series + bc11 Photosmart 7520 series + bd02 PhotoSmart Pro B9100 series + bef4 NEC Picty760 + c002 PhotoSmart 7800 series + c102 PhotoSmart 8000 series + c111 Deskjet 1510 + c202 PhotoSmart 8200 series + c211 Deskjet 2540 series + c302 DeskJet D2300 + c402 PhotoSmart D5100 series + c502 PhotoSmart D6100 series + c602 PhotoSmart D7100 series + c702 PhotoSmart D7300 series + c802 PhotoSmart D5060 Printer + d104 Bluetooth Dongle + d507 39gII [NW249AA] + efbe NEC Picty900 + f0be NEC Picty920 + f1be NEC Picty800 +03f1 Genoa Technology +03f2 Oak Technology, Inc. +03f3 Adaptec, Inc. + 0020 AWN-8020 WLAN [Intersil PRISM 2.5] + 0080 AVC-1100 Audio Capture + 0083 AVC-2200 Device + 0087 AVC-2210 Loader + 0088 AVC-2210 Device + 008b AVC-2310 Loader + 008c AVC-2310 Device + 0094 eHome Infrared Receiver + 009b AVC-1410 GameBridge TV NTSC + 2000 USBXchange Firmware Loader + 2001 USBXchange Adapter + 2002 USB2-Xchange Firmware Loader + 2003 USB2-Xchange Adapter + 4000 4-port hub + adcc Composite Device Support +03f4 Diebold, Inc. +03f5 Siemens Electromechanical +03f8 Epson Imaging Technology Center +03f9 KeyTronic Corp. + 0100 KT-2001 Keyboard + 0101 Keyboard + 0102 Keyboard Mouse +03fb OPTi, Inc. +03fc Elitegroup Computer Systems +03fd Xilinx, Inc. + 0008 Platform Cable USB II + 0050 dfu downloader +03fe Farallon Comunications +0400 National Semiconductor Corp. + 05dc Rigol Technologies DS1000USB Oscilloscope + 0807 Bluetooth Dongle + 080a Bluetooth Device + 09c4 Rigol Technologies DG1022 Arbitrary Waveform Generator + 1000 Mustek BearPaw 1200 Scanner + 1001 Mustek BearPaw 2400 Scanner + 1237 Hub + a000 Smart Display Reference Device + c359 Logitech Harmony + c35b Printing Support + c55d Rigol Technologies DS5000USB Oscilloscope +0401 National Registry, Inc. +0402 ALi Corp. + 5462 M5462 IDE Controller + 5602 M5602 Video Camera Controller + 5603 M5603 Video Camera Controller + 5606 M5606 Video Camera Controller [UVC] + 5621 M5621 High-Speed IDE Controller + 5623 M5623 Scanner Controller + 5627 Welland ME-740PS USB2 3.5" Power Saving Enclosure + 5632 M5632 Host-to-Host Link + 5635 M5635 Flash Card Reader + 5636 USB 2.0 Storage Device + 5637 M5637 IDE Controller + 5642 Storage Device + 5661 M5661 MP3 player + 5667 M5667 MP3 player + 8841 Newmine Camera + 9665 Gateway Webcam +0403 Future Technology Devices International, Ltd + 0000 H4SMK 7 Port Hub / Bricked Counterfeit FT232 Serial (UART) IC + 0232 Serial Converter + 1060 JTAG adapter + 1234 IronLogic RFID Adapter [Z-2 USB] + 1235 Iron Logic Z-397 RS-485/422 converter + 6001 FT232 Serial (UART) IC + 6002 Lumel PD12 + 6007 Serial Converter + 6008 Serial Converter + 6009 Serial Converter + 6010 FT2232C/D/H Dual UART/FIFO IC + 6011 FT4232H Quad HS USB-UART/FIFO IC + 6014 FT232H Single HS USB-UART/FIFO IC + 6015 Bridge(I2C/SPI/UART/FIFO) + 601e FT600 16-bit FIFO IC + 601f FT601 32-bit FIFO IC + 6ee0 EZO Carrier Board + 6f70 HB-RF-USB + 7150 FT2232x wired for MPSSE+UART + 7151 FT2232x wired for MPSSE+UART + 7152 FreeCalypso dual UART with boot control + 7be8 FT232R + 8028 Dev board JTAG (FT232H based) + 8040 4 Port Hub + 8070 7 Port Hub + 8140 Vehicle Explorer Interface + 8210 MGTimer - MGCC (Vic) Timing System + 8348 FT232BM [SIENNA Serial Interface] + 8370 7 Port Hub + 8371 PS/2 Keyboard And Mouse + 8372 FT8U100AX Serial Port + 8508 Selectronic SP PRO + 87d0 Cressi Dive Computer Interface + 8a28 Rainforest Automation ZigBee Controller + 8a98 TIAO Multi-Protocol Adapter + 8b28 Alpermann+Velte TCI70 + 8b29 Alpermann+Velte TC60 CLS + 8b2a Alpermann+Velte Rubidium Q1 + 8b2b Alpermann+Velte TCD + 8b2c Alpermann+Velte TCC70 + 9090 SNAP Stick 200 + 9132 LCD and Temperature Interface + 9133 CallerID + 9134 Virtual keyboard + 9135 Rotary Pub alarm + 9136 Pulsecounter + 9137 Ledbutton interface + 9e90 Marvell OpenRD Base/Client + 9f08 CIB-1894 Conclusion SmartLink Box: + 9f80 Ewert Energy Systems CANdapter + a6d0 Texas Instruments XDS100v2 JTAG / BeagleBone A3 + a951 HCP HIT GSM/GPRS modem [Cinterion MC55i] + a9a0 FT2232D - Dual UART/FIFO IC - FTDI + abb8 Lego Mindstorms NXTCam + b0c0 microSensys RFID device + b0c1 microSensys RFID device + b0c2 iID contactless RFID device + b0c3 iID contactless RFID device + b0c4 RFID device + b0c5 RFID device + b810 US Interface Navigator (CAT and 2nd PTT lines) + b811 US Interface Navigator (WKEY and FSK lines) + b812 US Interface Navigator (RS232 and CONFIG lines) + b9b0 Fujitsu SK-16FX-100PMC V1.1 + baf8 Amontec JTAGkey + bcd8 Stellaris Development Board + bcd9 Stellaris Evaluation Board + bcda Stellaris ICDI Board + bd90 PICAXE Download Cable [AXE027] + bdc8 Egnite GmbH - JTAG/RS-232 adapter + bfd8 OpenDCC + bfd9 OpenDCC (Sniffer) + bfda OpenDCC (Throttle) + bfdb OpenDCC (Gateway) + bfdc OpenDCC (GBM) + c580 HID UNIKEY dongle [F-Response] + c630 lcd2usb interface + c631 i2c-tiny-usb interface + c632 xu1541 c64 floppy drive interface + c633 TinyCrypt dongle + c634 glcd2usb interface + c7d0 RR-CirKits LocoBuffer-USB + c8b8 Alpermann+Velte MTD TCU + c8b9 Alpermann+Velte MTD TCU 1HE + c8ba Alpermann+Velte Rubidium H1 + c8bb Alpermann+Velte Rubidium H3 + c8bc Alpermann+Velte Rubidium S1 + c8bd Alpermann+Velte Rubidium T1 + c8be Alpermann+Velte Rubidium D1 + c8bf Alpermann+Velte TC60 RLV + cc48 Tactrix OpenPort 1.3 Mitsubishi + cc49 Tactrix OpenPort 1.3 Subaru + cc4a Tactrix OpenPort 1.3 Universal + cff8 Amontec JTAGkey + d010 SCS PTC-IIusb + d011 SCS Position-Tracker/TNC + d012 SCS DRAGON 1 + d013 SCS DRAGON 1 + d388 Xsens converter + d389 Xsens Wireless Receiver + d38a Xsens serial converter + d38b Xsens serial converter + d38c Xsens Wireless Receiver + d38d Xsens Awinda Station + d38e Xsens serial converter + d38f Xsens serial converter + d491 Zolix Omni 1509 monochromator + d578 Accesio USB-COM-4SM + d678 GammaScout + d6f8 UNI Black BOX + d738 Propox JTAGcable II + d739 Propox ISPcable III + d9a9 Actisense USG-1 NMEA Serial Gateway + d9aa Actisense NGT-1 NMEA2000 PC Interface + d9ab Actisense NGT-1 NMEA2000 Gateway + daf4 Qundis Serial Infrared Head + e0d0 Total Phase Aardvark I2C/SPI Host Adapter + e518 IBR IMB-usb + e521 EVER Sinline XL Series UPS + e6c8 PYRAMID Computer GmbH LCD + e700 Elster Unicom III Optical Probe + e729 Segway Robotic Mobility Platforms 200 + e888 Expert ISDN Control USB + e889 USB-RS232 OptoBridge + e88a Expert mouseCLOCK USB II + e88b Precision Clock MSF USB + e88c Expert mouseCLOCK USB II HBG + e8d8 Aaronia AG Spectran Spectrum Analyzer + e8dc Aaronia AG UBBV Preamplifier + ea90 Eclo 1-Wire Adapter + ecd9 miControl miCan-Stick + ed71 HAMEG HO870 Serial Port + ed72 HAMEG HO720 Serial Port + ed73 HAMEG HO730 Serial Port + ed74 HAMEG HO820 Serial Port + eea2 PCStage Lite 32 channel DMX512 Interface + ef10 FT1245BL + f070 Serial Converter 422/485 [Vardaan VEUSB422R3] + f0c8 SPROG Decoder Programmer *** 24639 LINES SKIPPED *** From nobody Wed Mar 27 08:26:43 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V4KX42nz1z5GjWZ; Wed, 27 Mar 2024 08:26: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 4V4KX40j6Bz4DS8; Wed, 27 Mar 2024 08:26:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711528004; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yt3NoQnhakLDmJL3m4ica0L3sAisMA88Io2UatdeFbQ=; b=s29OOtC5XL5R1Y8iC9HexbQLIY1YjqXX2U9NSCrHNqDk4fqlE0bdlnRAfBARdjfMcoSmeA yUqcvqLMlcH+RGekXaPuHNn7snwdPtXuVO65t2UxPQ5LjKUS7X61hyOvqDx2F/L3By+o8S lvbvVPmZgl0bFMuPgHWRSEaemiISwTwlxy82g8lPti3lzQPnbhe3qsjRGRzwBNVOPk5k90 GuH3oguytj814EZIclfQiHMHDc84Ly5xw7ZztTt8TRQnWXJhCVYlJE/BBd06kGmeiGUA5w Xnw6Oot3Wb/80TJyGZJSNbBkqNcJ/sw/gl/X3i1iUGOv3+7U+XnDQo/Il6IYMw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711528004; a=rsa-sha256; cv=none; b=ZusQBI38tkLIpfj5B8sS1qDFvFxGB8/rT81d9O4SPVdA1F9sF5CBccjhwxiYcaqMqveH6B uCyaD3ddbg4aY1r9WsEQVpzWvwOrXrbtA2e2QVHuZG23wgJeTDB0ZytxS+XCu5HRgP8G1l bc4SaX4SvVs8I/r8F/ThtgXQvYM66jpA1cqG4gjF5lyHGN026W86OI27nUAdms81fKsxKq 8kotKvt2Ow26IBG6xqnRXf6gPkuc2CFcgT4MgIRbmBJXYsHJWSHKF6SaxA+P5teTh3G6+b u5F46W0sBXDNPb8WSY9TNRlLeyjanz0XaIXTLA6RSTeA4Ib0wmWnmdqbjopdjw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711528004; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yt3NoQnhakLDmJL3m4ica0L3sAisMA88Io2UatdeFbQ=; b=utpj/SIeqv0TWxh8gcVyi14+pv4UYQOx4JVe2TKS/o3HjKkx7SFAfa5eFAZD+ni3X0Gj4m w2GjSiEjSW/S8nt8orjdZ3Fftmp3t8oC0KK+Wf+72t3EuOv7RWYWubR110VgpsL2iaZ9mF UNAk+YZ9zqdxcv/q+atF+h/V1dDzS7tMuPZBSwJ8yojPBQ8WyZGnyVhcD5ObAoXqIqPZQI DgzCB4x7S2ThszVMtV1iO33jLtREBUpp8p63fk1rTp6j+dzgWxdJO9ap37xHykWVbYkJnO CwSVZ6dtGycxPs1WR3mJYy66XltUd5ZSAMelOBFD3Iruy+sxrr5JCVOhrSg6vw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V4KX40KbFzcGt; Wed, 27 Mar 2024 08:26:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42R8Qhg2096226; Wed, 27 Mar 2024 08:26:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42R8QhAI096223; Wed, 27 Mar 2024 08:26:43 GMT (envelope-from git) Date: Wed, 27 Mar 2024 08:26:43 GMT Message-Id: <202403270826.42R8QhAI096223@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Baptiste Daroussin Subject: git: 365887828521 - stable/14 - RELNOTES: document usbconfig(8) changes List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 365887828521752217bf19e8ab095da8cde0632e Auto-Submitted: auto-generated The branch stable/14 has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=365887828521752217bf19e8ab095da8cde0632e commit 365887828521752217bf19e8ab095da8cde0632e Author: Baptiste Daroussin AuthorDate: 2024-03-27 08:26:30 +0000 Commit: Baptiste Daroussin CommitDate: 2024-03-27 08:26:30 +0000 RELNOTES: document usbconfig(8) changes --- RELNOTES | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/RELNOTES b/RELNOTES index 6a32876351ea..31abd2c7845d 100644 --- a/RELNOTES +++ b/RELNOTES @@ -10,6 +10,10 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. +7b9a772f9f64: + usbconfig(8) now reads the descriptions of the usb vendor and products + from usb.ids when available, similarly to what pciconf(8) does. + daf917daba9c: One True Awk updated to 2nd Edition with new -csv support and UTF-8 support. See https://awk.dev for more details. From nobody Wed Mar 27 08:27:40 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V4KY90pMpz5GjBZ; Wed, 27 Mar 2024 08: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 4V4KY86v8kz4FgV; Wed, 27 Mar 2024 08: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=1711528061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EPxwrr7wlq4sWr2wlA3T1ks18drSxz/UkmPdGO4ta3M=; b=hvXZ+I/7xYcL546v8QvvntfqARqORk2uja9DljSiQ9nA9V/fXfuJBNqxcE/qhLvIkEYN+v xD5IL41+JBOdQrp7z1nTGx9f0hhMInDtSFlFQ5zev03i7I53mP5E/AFe2VgpM3qRkRWM2t 1owpsfyHgkZR5dT8gvQdVqsBShJCWpJt4qQk6kAyaWf+4lzxJ0Ty8Ku1Xh2pyp/1QbV3e0 PQlnhGG97yaHmI3cQSLQQBs8dTzptG/SQA4zYiEFwiYeoejnpl+Qj89oKkFdb9qAogr4yJ 3QPM6HpmrHxCHgjAhyzucfIDRWI3z9kKfUY5Thnmb3DDFO2uFDCN0B1kPq45Xg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711528061; a=rsa-sha256; cv=none; b=JNIhHto/lvIb7tsxZE+YZKqIvKIfMfjf01d6yXx6u98zApFP7OyWebLIblQpC6RsTd1X0p v3A1oa3+W/XnRniZ7eVe8SABnj27UB+Ub1v+ZB5w2MvKmdL9ScVPBZHbcpUuqa84yhtcRI 2nPnwssDea3miBMAnj1GZMqC0DqtnET0BQDnmcM+puIMZRE585Y0YMTCqgikoa8mngva8n slUV/Cp/x+4HfpIUPjMQFmbxJtr5R+UZqSdThHmPSOOVX+JFgxatMLfm5GQJUxJS5Bj+uj gx+PndluZlNkhT5dkL5gEr8xvHMGRhw7UtpQ40Ioy9djfLpuH1fa7lf/0tjcIw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711528061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EPxwrr7wlq4sWr2wlA3T1ks18drSxz/UkmPdGO4ta3M=; b=iO9yagPqV+KMHAPKmVj9fi0dmcna2drLux53aq35pxPzACQ3lFPIKX8lGVXionXs0TdGZN 3a0s3+XiIBGjMu84yaSrcQ0iU4mVV1zvB1IuZTmr9hHVmM5bfKk9qBCQqY+8khLq/tzUDY GRYhUoKXdWSYhTUO9w4CPu0zkeraQFCqvGJIqYsBpxtPfDqWS+h3uWMFonXe16vz4zPfZ5 XRBWqm3i5YRyJL4pQYU7hY1BTgfXBIOK4moS/gUx+H8YflBmt44fZ6h7cECoMP+/YKWxl4 zdPw96/S1Ht6ZdcjbOcX7iZGjG9DI37eEZiw7sCe6c4go4W7AehVj1uFIGS/1Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V4KY86W0Jzc3H; Wed, 27 Mar 2024 08:27:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42R8Re8Y096571; Wed, 27 Mar 2024 08:27:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42R8RerZ096568; Wed, 27 Mar 2024 08:27:40 GMT (envelope-from git) Date: Wed, 27 Mar 2024 08:27:40 GMT Message-Id: <202403270827.42R8RerZ096568@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: daefc4bda7c5 - stable/14 - daemon(8): handle case of waitpid() returning without exited child List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: daefc4bda7c5a9728ec62eddcfd9af492531a7f8 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=daefc4bda7c5a9728ec62eddcfd9af492531a7f8 commit daefc4bda7c5a9728ec62eddcfd9af492531a7f8 Author: Konstantin Belousov AuthorDate: 2024-03-18 08:44:39 +0000 Commit: Konstantin Belousov CommitDate: 2024-03-27 08:27:23 +0000 daemon(8): handle case of waitpid() returning without exited child PR: 277764 (cherry picked from commit 8eaa6be80d6aef6a118fa854a860bfdaeb7ed753) --- usr.sbin/daemon/daemon.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/usr.sbin/daemon/daemon.c b/usr.sbin/daemon/daemon.c index 65e6bb7ca190..da8e4895e19b 100644 --- a/usr.sbin/daemon/daemon.c +++ b/usr.sbin/daemon/daemon.c @@ -743,18 +743,22 @@ daemon_terminate(struct daemon_state *state) } /* - * Returns true if SIGCHILD came from state->pid - * This function could hang if SIGCHILD was emittied for a reason other than - * child dying (e.g., ptrace attach). + * Returns true if SIGCHILD came from state->pid due to its exit. */ static bool daemon_is_child_dead(struct daemon_state *state) { + int status; + for (;;) { - int who = waitpid(-1, NULL, WNOHANG); - if (state->pid == who) { + int who = waitpid(-1, &status, WNOHANG); + if (state->pid == who && (WIFEXITED(status) || + WIFSIGNALED(status))) { return true; } + if (who == 0) { + return false; + } if (who == -1 && errno != EINTR) { warn("waitpid"); return false; From nobody Wed Mar 27 08:27:41 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V4KYB1g3zz5Gj9K; Wed, 27 Mar 2024 08: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 4V4KYB0Z1fz4FjX; Wed, 27 Mar 2024 08: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=1711528062; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T/0IhGjCyZGvj1obStuEUEIE8J8KuFancorn1Bytuus=; b=m8nbKgYmkzeP4swqxfidQrJY5WVZ42oqRX9B566NTNLaaxjiiZZZlEtI5LwwEo5K5hpPe5 18MWBhRh2b6W54q8+5f2ANr40xjhTZrSl6lMeq68pgdDz6TlzpwACzXUMsxyeVUyYhHutH rSYrhefQpYhP8yKbSk2kU6deQysw8aXI94X+FQiauCxscKKahCyuJ4gvX3H602ACg3XeRt VeavQiCAnJCsCbaUDoCB8brJxZIgekb5H0E336v9mHPMkujn7DMjn6pe+GZwOiZc5rvy8i zDFFqw0kGfIwkZrbTdQjUq1xqXneey7oyPY8GCZ99G3d/zUVuEnsC2u/3Bl0uw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711528062; a=rsa-sha256; cv=none; b=hdIgJq0p6YP2TPDbb8XMyiDQngLWLAD27oU2nrq1NLOLndv4sWJLnRQxrdnz5zNhSP9q/f 3ylHVN6MJbh2v47kN85e4Xnp9O5X55Ob7dNXuWLUl/nCeYQr8KQf0SRvcv+TwwwTin8D9M O/so3cdW9W+KI6VbW+gE3tYn8hSvZBqCU/w7lC3RrJYPNme977QXUdcAkiW+xgbR8JCQSl PzEYNNN7MaifwpZ5NUFnTHhWI7hVewyBjWLZWeqCCi0aJTPEbgkWEg6Q+Myuw3znnsoPip kcdhwac/YjXGXsFy1RnyGGnBji1DjnXr9nTZq7iceHAdcDeCJ8aY58ldiN28Ag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711528062; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T/0IhGjCyZGvj1obStuEUEIE8J8KuFancorn1Bytuus=; b=ltuA7Vd146nNoXvk74+RC025D8gd+lEFlgwiKCxYiz+CRQHINzUowVVe/iLFtrB02NOOTE vIrism4ntA1+SkwUpLWnXfxhpCnCmt7O3+wiRwWT37NxLQbpbBBtvvcQBU7HPzLh5qIYD1 wmKYXDWXsX5ctq9ZT3WjpnU8fsYjlsRyP7FpKh45D8qIfThBlLHiRBzmSXqy87ZOCg9At3 qTen4tziibIMChVB4zTWhgx26Y+JvOLMIIq9GaAGHR5hZLC13Mlr/hRHywofbRlf+boODP ASufTZ65BmX/hFSqs9sGPZHDRc0U6eqXWqfiJLuhB2OwPxse/Jh6Zao/2LrKQg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V4KYB0BPgzcFY; Wed, 27 Mar 2024 08:27:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42R8Rfuk096616; Wed, 27 Mar 2024 08:27:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42R8RfMw096613; Wed, 27 Mar 2024 08:27:41 GMT (envelope-from git) Date: Wed, 27 Mar 2024 08:27:41 GMT Message-Id: <202403270827.42R8RfMw096613@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 8e3bd18c37f2 - stable/14 - Translate linux_newlstat name argument List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8e3bd18c37f2f77988b2819f6c4b493dfa42370d Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=8e3bd18c37f2f77988b2819f6c4b493dfa42370d commit 8e3bd18c37f2f77988b2819f6c4b493dfa42370d Author: John F. Carr AuthorDate: 2024-03-20 22:44:23 +0000 Commit: Konstantin Belousov CommitDate: 2024-03-27 08:27:23 +0000 Translate linux_newlstat name argument PR: 277847 (cherry picked from commit 55e2187a091b7c397b3682b5ded2143c43e31a18) --- usr.bin/truss/syscalls.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.bin/truss/syscalls.c b/usr.bin/truss/syscalls.c index f9763d10c1b4..47d6aef8f6ff 100644 --- a/usr.bin/truss/syscalls.c +++ b/usr.bin/truss/syscalls.c @@ -615,6 +615,8 @@ static const struct syscall_decode decoded_syscalls[] = { .args = { { Name | IN, 0 }, { Int, 1 } } }, { .name = "linux_newfstat", .ret_type = 1, .nargs = 2, .args = { { Int, 0 }, { Ptr | OUT, 1 } } }, + { .name = "linux_newlstat", .ret_type = 1, .nargs = 2, + .args = { { Name | IN, 0 }, { Ptr | OUT, 1 } } }, { .name = "linux_newstat", .ret_type = 1, .nargs = 2, .args = { { Name | IN, 0 }, { Ptr | OUT, 1 } } }, { .name = "linux_open", .ret_type = 1, .nargs = 3, From nobody Wed Mar 27 08:28:13 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V4KYn5c7tz5Gj6Y; Wed, 27 Mar 2024 08:28:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4V4KYn2yHYz4GfV; Wed, 27 Mar 2024 08:28:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711528093; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KllbveJeUr54WlLagTpVO0aFLWUfumTMeFj/NLgX/r0=; b=vwpztTQ2oVn+09xhFqbUjamA7W++FGeRedrpAvUOC1ZpeT6XjixBh69XGdj6F4zYcjPZ7h QdYtZZPZbBRTYGND2wabsDyZlnZLi8tgvazxYEImZaAyUcXUkOqtycl5t44TKDqHFEaUcI kTYKag2VeZWjwNNgIRL+zhAXMzOhir1q4h/EIgIhNzrY8qbeLKS4U4eWAt8SWyE1qFHj6N l9REv4v1K4Rj4Xa1ipi6JRZfv0OquJUGbXVpbvrFPp6+VBIwJE+vtGOvhsXL2q34xMc3QI e1qzYIDYG2n5lCfXp4AiQdJrnL2tIX8AOmZFoXqKbJr/olQ8JPnCtbveMb5WTg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711528093; a=rsa-sha256; cv=none; b=Nwqap4/wMn5W4Pql4kwW4Kn8d8EwB8mPytI+f60yBLnyLsJsx9tlqjMbFPc67GkIMZ+WVF VfPeK+A6VT8DjLqj+AGvHn41mzIXx/+bgJWEU4HzgXMSNcTwk16R4TAr8IBrPGEMEv8hci tMVF/l6bBwoU2wHAurAM77+t/L9lFGHOzd+961wuCqVZBT/oRFnZnPC4Tmk9LaWQPPPZcf DiaA/OPNhex77/wrY1Y38yn629/NFeYULM/e8j+1h1e66Y8vZNIVatkOAfsT4qKaLtbqLu hMG88MxyNzK1mfRaYuC7E5WU+lMXko2Gkl4qCVWX45XRec5HynAyiEKKOek0hg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711528093; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KllbveJeUr54WlLagTpVO0aFLWUfumTMeFj/NLgX/r0=; b=kNYFcQ7XKdxHamUDU8FEPJ+PMixHsFMKxO4XawSrkQzFnSu2GrqEB/MY3ZTS5+rThu+66i 0oLmZWEbFMTKUmww9NguadB7azeqR2ZWeQON19rTthLeRTJ/FDZkrbCdgitPBp/mMvqPlA NaY1epqSZZd0Jd6dT3s0nxsf/0gJ8miSnaPoVNfCcrUBQtCXVMx3hPjKCuvwUCkP3hCqOv 3Wa1SpxsWWQlUhQsgzNJnFqyWSFfjRAeOVDTfvcQPUL4rvNgu1CFkp3hhHU/WPptPHEZa2 X6ZMRsxQhCFPDp/CoLjYFnbz9WqymL63IhwYZBsA4jUVlaxTAHZYB7/YgkhVqg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V4KYn2YfKzcFb; Wed, 27 Mar 2024 08:28:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42R8SDNi096876; Wed, 27 Mar 2024 08:28:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42R8SDdN096873; Wed, 27 Mar 2024 08:28:13 GMT (envelope-from git) Date: Wed, 27 Mar 2024 08:28:13 GMT Message-Id: <202403270828.42R8SDdN096873@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 1d2a587ef9f8 - stable/13 - daemon(8): handle case of waitpid() returning without exited child List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 1d2a587ef9f8310da6a9203bd1fff43d61ca66f7 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=1d2a587ef9f8310da6a9203bd1fff43d61ca66f7 commit 1d2a587ef9f8310da6a9203bd1fff43d61ca66f7 Author: Konstantin Belousov AuthorDate: 2024-03-18 08:44:39 +0000 Commit: Konstantin Belousov CommitDate: 2024-03-27 08:27:52 +0000 daemon(8): handle case of waitpid() returning without exited child PR: 277764 (cherry picked from commit 8eaa6be80d6aef6a118fa854a860bfdaeb7ed753) --- usr.sbin/daemon/daemon.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/usr.sbin/daemon/daemon.c b/usr.sbin/daemon/daemon.c index 65e6bb7ca190..da8e4895e19b 100644 --- a/usr.sbin/daemon/daemon.c +++ b/usr.sbin/daemon/daemon.c @@ -743,18 +743,22 @@ daemon_terminate(struct daemon_state *state) } /* - * Returns true if SIGCHILD came from state->pid - * This function could hang if SIGCHILD was emittied for a reason other than - * child dying (e.g., ptrace attach). + * Returns true if SIGCHILD came from state->pid due to its exit. */ static bool daemon_is_child_dead(struct daemon_state *state) { + int status; + for (;;) { - int who = waitpid(-1, NULL, WNOHANG); - if (state->pid == who) { + int who = waitpid(-1, &status, WNOHANG); + if (state->pid == who && (WIFEXITED(status) || + WIFSIGNALED(status))) { return true; } + if (who == 0) { + return false; + } if (who == -1 && errno != EINTR) { warn("waitpid"); return false; From nobody Wed Mar 27 08:28:14 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V4KYp5PNrz5GjZ0; Wed, 27 Mar 2024 08:28:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4V4KYp3WHwz4GZC; Wed, 27 Mar 2024 08:28:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711528094; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=96CcT8fFTmc9UbVr2asEu0FYJsnwTLzK5HQ0yDNIUtk=; b=GQFyh72CHfKmeLVB0fjMJFF/7qgmRJreeuQRYdGr2kyiD8p+yTMplQ121B3waRkBCJq4bv Zvim/k+yYqB9CVraSBm8ZX1RNkGaRvy0Ji2JBv3r4v09nfX38quU7gLW33z+BGsF3OYGrB RNWiof9NahQ3RDlVEHkcnYhbn0tBEgplazU+1gawx7FB7tI/9i3n7SqAhEaPxv+2PiTNw5 QXrKouYebvUL6TH4aHBs2Z0CKbqAEMsqQKOJz25cyU7FNq7LMQbpMoDUd5JhduAWP8Dr8/ W5TIImJkp7ICykdDV+kUEUT23h2qLoC8XQ4pySiyC3D8ZuPJFfS/wKefF2w8Sw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711528094; a=rsa-sha256; cv=none; b=IaJvm+Sz0sQz3ceHIII4zXRKEJVMEyDhed0gaoVliD69ZPNbEfbKkseB2gx5ntbGI60xGe jXWe3jU+EqMCeGOKrvSpkvI/FARN8uKYNagD2P6wdhBI26w05EPOXkt8NsYGtNu3fJNidt g0KrDZ8QQ5yuCUzSdFYXDw+4xHMTlGIdHoSztIwpWhMlp7FhLc5Y29p7sZY4uPsNn0mdum PNiibFic4KMcr+3OgeheOf0VmY4VQiuat7Xez6oG6xf8mVN0DlVLRhPyQrISLmSjCZ9uiS DkJ+tNvBcwsvKckLXvqPpiWHVY/cH2lp06XYIRwtv5oLqdtYDvDclxUFmcto3Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711528094; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=96CcT8fFTmc9UbVr2asEu0FYJsnwTLzK5HQ0yDNIUtk=; b=XS5gjDElBCICe69O5PFXgI/oTQ523HN4X9KZ/VTwfDYeF8ohj5v2/36d+2a31uwAmGUKmX WVzWUFP1HfyxvYFFPk5ZMmbmFgD5Yl5XiY0/5xhOcNYAWeHPIL9sNHlAUPi9Y/z25Dx2mq x/Id+Ju+9dl0y1dPiyQ+A7Uf5tGUyDk0hDZ5jFypUCfDIbE6vBlz7gh2xxyjz8ARS3m+FX gXNC5hc6HXPjHTh4tHZQZc7WIgVi9NMsP33TADY9ZLcN9/pFm4Y6onEuYzhrQWPe1DPHBu 7ts7WDFuButhLe/GRmsEj4nzHy1+YDlvpdEBCjmbzekYe50nPEewrpOqCEpGkg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V4KYp35HHzcYd; Wed, 27 Mar 2024 08:28:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42R8SEbo096915; Wed, 27 Mar 2024 08:28:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42R8SE4i096912; Wed, 27 Mar 2024 08:28:14 GMT (envelope-from git) Date: Wed, 27 Mar 2024 08:28:14 GMT Message-Id: <202403270828.42R8SE4i096912@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: b5e7969b239f - stable/13 - Translate linux_newlstat name argument List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b5e7969b239f3fc2d221159aabb5bc0532ba3949 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b5e7969b239f3fc2d221159aabb5bc0532ba3949 commit b5e7969b239f3fc2d221159aabb5bc0532ba3949 Author: John F. Carr AuthorDate: 2024-03-20 22:44:23 +0000 Commit: Konstantin Belousov CommitDate: 2024-03-27 08:27:53 +0000 Translate linux_newlstat name argument PR: 277847 (cherry picked from commit 55e2187a091b7c397b3682b5ded2143c43e31a18) --- usr.bin/truss/syscalls.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.bin/truss/syscalls.c b/usr.bin/truss/syscalls.c index 010308beae3e..e7b937c78cbc 100644 --- a/usr.bin/truss/syscalls.c +++ b/usr.bin/truss/syscalls.c @@ -615,6 +615,8 @@ static const struct syscall_decode decoded_syscalls[] = { .args = { { Name | IN, 0 }, { Int, 1 } } }, { .name = "linux_newfstat", .ret_type = 1, .nargs = 2, .args = { { Int, 0 }, { Ptr | OUT, 1 } } }, + { .name = "linux_newlstat", .ret_type = 1, .nargs = 2, + .args = { { Name | IN, 0 }, { Ptr | OUT, 1 } } }, { .name = "linux_newstat", .ret_type = 1, .nargs = 2, .args = { { Name | IN, 0 }, { Ptr | OUT, 1 } } }, { .name = "linux_open", .ret_type = 1, .nargs = 3, From nobody Wed Mar 27 08:31:07 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V4Kd75cw2z5GjfD; Wed, 27 Mar 2024 08:31:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4V4Kd754vsz4Htw; Wed, 27 Mar 2024 08:31:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711528267; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NxlfYtZfKV7fEyHEx6qeap5Qj9uTXt0RYENtGowRH3k=; b=W1FuUoLZIx1qZNF4ApLtLOOrT69mQ4352vzzon1RvlGjikPH183FeeQPqixRLUYgl9CPKI geQgdw+vxWlg9ulr86jPfI70nc+NZQsunmYNhnvze7MLvWnYYfkJVC9bCyx7wFwaOIEaIv t9G6RAtaKzbXZlsBSpi/KsF0YHfRYw8QfRqLhxXzhsvv6SiBfLIUNZX/s4rzxwu/2A+Unf 1x14SZpO/GPQ57x4VAeQvzcc4lW7OT1SovcHzR6UO0NDTYCL9P9kiPbltJOWigXZt2CjYw sGJqJeZtSYDqVc3o4Nt3ZXYQXYHyVWI9BZSpR8GmP3ZCfeINoKt09NcBqFj7wQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711528267; a=rsa-sha256; cv=none; b=eVuLzmhTrFAURgENC+s0cTAieTttqwZvLKy0Rze/vMqhAAIMVWLwBSUeAOklhuOuVNN8Q3 vT2Y/XoTsHe5WVl+jAQCwDpcv15szEx7q1SqZbVE7WjyyJUOddjgQX2C2s3r3Tcuuyly5C le9bxq6+mnkstPC20JYfRO+RGJpdA3dOTSF6+9sr5/YnSuuqfLPmO/Q377LYPggRGPrSS4 sPx1eIkedUiMcemaNMbTsnt5Q8weCA66+efuESQ+bjO4IXP6EvI5bEBKIBFJ/qt6QbkJNw xt2NogrAOqJ48qhmbpUDYbvs24dkZSX2maHUbpMF/WO7balM4PXuQLCy+37FmQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711528267; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NxlfYtZfKV7fEyHEx6qeap5Qj9uTXt0RYENtGowRH3k=; b=hLMBeiYYZ7WU7O7urRhhpYw2so/BjJt08fwJ+D7ZENLG3e/G1RentVvocbT2OPOoaeQy/z aNZT/O+bEPlYH+3sPgb73A3KXUvIJ2qdIX5DXNSqfMtersOeee4OACIKMTg8D2B4ZL9m/2 4o/X5vAAsSpgL96NgQZkSia2bV4sjwfcbL9YGHeBaAyGbPYHO06pUx+5Fk1hfSG8Ku3FHk Lmj/FSrDMAGf4kAVTHte79SunRa+2gsMvyA6LOsD6KaYu6tnWWIdzsU8lkja0Cm4VDAhPh uwkWrSarTWo6TjxiQc+1Wwy+ROT/NNCKS9KseI0gyQR0cin9J79vrKSVJKh0eQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V4Kd74hSLzcKm; Wed, 27 Mar 2024 08:31:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42R8V7bp006254; Wed, 27 Mar 2024 08:31:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42R8V73j006251; Wed, 27 Mar 2024 08:31:07 GMT (envelope-from git) Date: Wed, 27 Mar 2024 08:31:07 GMT Message-Id: <202403270831.42R8V73j006251@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Baptiste Daroussin Subject: git: cd6e93e7a9fc - stable/14 - pkgbase: remove packages which do not exists anymore List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: cd6e93e7a9fc217884448d427146d296f31fe069 Auto-Submitted: auto-generated The branch stable/14 has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=cd6e93e7a9fc217884448d427146d296f31fe069 commit cd6e93e7a9fc217884448d427146d296f31fe069 Author: Baptiste Daroussin AuthorDate: 2024-03-15 13:50:40 +0000 Commit: Baptiste Daroussin CommitDate: 2024-03-27 08:30:44 +0000 pkgbase: remove packages which do not exists anymore (cherry picked from commit 5c318f5ce3e293d8479d686da25c1a4460c09388) --- release/packages/Makefile.package | 6 ------ release/packages/gdb.ucl | 17 ----------------- release/packages/groff.ucl | 17 ----------------- release/packages/svn.ucl | 17 ----------------- 4 files changed, 57 deletions(-) diff --git a/release/packages/Makefile.package b/release/packages/Makefile.package index 255ef648329d..d9f202a602d1 100644 --- a/release/packages/Makefile.package +++ b/release/packages/Makefile.package @@ -73,14 +73,10 @@ fwget_COMMENT= FWGET Utility fwget_DESC= FWGET Utility games_COMMENT= Games games_DESC= Games -gdb_COMMENT= GDB Utilities -gdb_DESC= GDB Utilities geom_COMMENT= GEOM Utilitites geom_DESC= GEOM Utilitites ggate_COMMENT= GEOM Gate Utilities ggate_DESC= GEOM Gate Utilities -groff_COMMENT= Groff Utilities -groff_DESC= Groff Utilities hast_COMMENT= Highly Available Storage daemon hast_DESC= Highly Available Storage daemon hostapd_COMMENT= 802.11 Access Point Daemon an Utilities @@ -151,8 +147,6 @@ smbutils_COMMENT= SMB Utilities smbutils_DESC= SMB Utilities ssh_COMMENT= Secure Shell Utilities ssh_DESC= Secure Shell Utilities -svn_COMMENT= Subversion Version Control System -svn_DESC= Subversion Version Control System syscons_COMMENT= Syscons Console syscons_DESC= Syscons Console syslogd_COMMENT= Syslog Daemon diff --git a/release/packages/gdb.ucl b/release/packages/gdb.ucl deleted file mode 100644 index ff2710862e03..000000000000 --- a/release/packages/gdb.ucl +++ /dev/null @@ -1,17 +0,0 @@ -# -# - -name = "%PKG_NAME_PREFIX%-%PKGNAME%" -origin = "base" -version = "%VERSION%" -comment = "%COMMENT%" -categories = [ base ] -maintainer = "%PKG_MAINTAINER%" -www = "%PKG_WWW%" -prefix = "/" -licenselogic = "single" -licenses = [ GPLv2 ] -desc = < To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Baptiste Daroussin Subject: git: 0c66d02e63e5 - stable/14 - pkgbase: separate /etc/mail/aliases from the sendmail package List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0c66d02e63e5bfb5f76bdc3069700e960e3dde77 Auto-Submitted: auto-generated The branch stable/14 has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=0c66d02e63e5bfb5f76bdc3069700e960e3dde77 commit 0c66d02e63e5bfb5f76bdc3069700e960e3dde77 Author: Baptiste Daroussin AuthorDate: 2024-03-20 15:39:39 +0000 Commit: Baptiste Daroussin CommitDate: 2024-03-27 08:30:44 +0000 pkgbase: separate /etc/mail/aliases from the sendmail package move /etc/aliases and /etc/mail/aliases into the runtime package this file is used by both sendmail and dma. While here mark this file as a config file so 3way merge is performed (cherry picked from commit 8cd7841d84356adb91450e3daf2c25454a102221) --- etc/Makefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/etc/Makefile b/etc/Makefile index a680572f66bf..ddef82f64510 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -21,7 +21,7 @@ SUBDIR+=sendmail ETCMAIL=aliases .if ${MK_SENDMAIL} != "no" -ETCMAIL+=Makefile README access.sample virtusertable.sample \ +ETCMAIL_SENDMAIL+=Makefile README access.sample virtusertable.sample \ mailertable.sample .endif @@ -78,13 +78,17 @@ distribution: .if ${MK_MAIL} != "no" cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ - -T "package=sendmail" ${ETCMAIL} ${DESTDIR}/etc/mail + -T "package=runtime,config" ${ETCMAIL} ${DESTDIR}/etc/mail if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \ ! -f ${DESTDIR}/etc/aliases ]; then \ - ${INSTALL_SYMLINK} -T "package=sendmail" \ + ${INSTALL_SYMLINK} -T "package=runtime" \ mail/aliases ${DESTDIR}/etc/aliases; \ fi .endif +.if ${MK_SENDMAIL} != "no" + cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ + -T "package=sendmail" ${ETCMAIL_SENDMAIL} ${DESTDIR}/etc/mail +.endif .if ${MK_LOCATE} != "no" ${INSTALL} -o nobody -g ${BINGRP} -m 644 -T "package=runtime"\ /dev/null ${DESTDIR}/var/db/locate.database From nobody Wed Mar 27 08:31:09 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V4KdB18Chz5Gjc2; Wed, 27 Mar 2024 08:31: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 4V4Kd96hYWz4HlV; Wed, 27 Mar 2024 08:31:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711528269; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RaHuU6cSVQngPZCzyj1xLw7uHxb/mIxGblgELQpZPLM=; b=XOKMdPUTeGz+bGU3hiAeCA0X9r2UHCi36ZaCNpGvlhGxkmFSqV42C1lrPa3tXCUmCFQIrP nUl/3K2yTfHWF01N+LHk+Z8AfCHVbGWocU2cCre2NR8Nph1sHMO7I2NkuJpOjHCDi5TmzL lu2v3zaH2yToKD1sZU2c/r2woM5Ivepq3qibMlXniqVJy80CTPD7S0C2lQVGi/y+nBJYS2 IggQzKpNPP3ZNUw0A5X00Jh6OUmH6tF+x3jpR0xlXy7zqUged+lvhEbu/j0eJrPIEb6C5I 5pD4GEhJENFFX1mVKhgASb8ulHDsvY/OQjMFmx8tTUuM/QtEc8bMWJyoDwpWcg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711528269; a=rsa-sha256; cv=none; b=XZoVpsmcuH2I+e8c78dMyJptD6CU9fVoeqs3jKJBC9qJtbUCblgqTGfLGO4yTA8QX+agkF 6T3LXoQcOpU+VmGewaGJ9RDwBzWLMSz60EkNVZtrEOL7mH0Gb/TdRK2j3I6YSINP91mFJb 249bCG7EhcM2rMN05Lx+xRGSofw8STEXCbYqIXJciehwrJyB02rmWA3YWGhyZjIGBFCJEq leG3fN6LbOCFoNeP8PkBybEtf+4HsJmgRLC6TL6MIJfgU32RH9oOR+2bJTrzKURXSO2puE y6N+wT6oqn1IWSjZkf1c+WbIlAdePYXJW3mXg0e8IAyKV/ZsDF6Fs/E7S+/D4Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711528269; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RaHuU6cSVQngPZCzyj1xLw7uHxb/mIxGblgELQpZPLM=; b=yq6SDAs8HCgI1O3WUc0bYiZdLEwqwFv+/f91wRyu94GZySl9vBIcUw3ZDvN9BX8vAt2uJ0 j17lXGFzsjK7y2RZuPkvfMyWWXAy/q1uf2Fb7F5bQ3V4rxB4wqbRXKS2SBwcYiHhYfO8LI 1jfooLBWyYs3C2xl1Hes1UkH5IgkDpp3rbhb2014qYhEMEGF6AE6GmkC6oTv5Z10xSD5gD 70R/NsV1W08tui8kahoMA5xZEst82rSGequdaclkXa/G9wgqybwCL3lvOu7WatrTPEcOfS aTjt7hh6rbJGx29Wby808pS8LDxokBmmy+48uR8tPrgqSv52QEsycK/3N6JeCQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V4Kd96Hgpzc1h; Wed, 27 Mar 2024 08:31:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42R8V9rk006369; Wed, 27 Mar 2024 08:31:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42R8V9iJ006366; Wed, 27 Mar 2024 08:31:09 GMT (envelope-from git) Date: Wed, 27 Mar 2024 08:31:09 GMT Message-Id: <202403270831.42R8V9iJ006366@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Baptiste Daroussin Subject: git: 2f3069cde726 - stable/14 - pkgbase: make sendmail config files as config List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 2f3069cde726d7b6c6a0212a081dc3108ad94bf3 Auto-Submitted: auto-generated The branch stable/14 has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=2f3069cde726d7b6c6a0212a081dc3108ad94bf3 commit 2f3069cde726d7b6c6a0212a081dc3108ad94bf3 Author: Baptiste Daroussin AuthorDate: 2024-03-20 15:44:35 +0000 Commit: Baptiste Daroussin CommitDate: 2024-03-27 08:30:44 +0000 pkgbase: make sendmail config files as config (cherry picked from commit 8c3a85eaeb0552569e81be43091a18b9e702cc41) --- etc/sendmail/Makefile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/etc/sendmail/Makefile b/etc/sendmail/Makefile index 065e9ffe3f0e..893a37483967 100644 --- a/etc/sendmail/Makefile +++ b/etc/sendmail/Makefile @@ -63,29 +63,29 @@ ${mc:T:R}.cf: ${mc} all: ${ALL} distribution: - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 -T "package=sendmail" \ + ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 -T "package=sendmail,config" \ ${.CURDIR}/freebsd.mc freebsd.cf ${DESTDIR}/etc/mail - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 -T "package=sendmail" \ + ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 -T "package=sendmail,config" \ ${.CURDIR}/freebsd.submit.mc freebsd.submit.cf ${DESTDIR}/etc/mail - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 -T "package=sendmail" \ + ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 -T "package=sendmail,config" \ ${SMDIR}/helpfile ${DESTDIR}/etc/mail .if defined(INSTALL_CF) - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 -T "package=sendmail" \ + ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 -T "package=sendmail,config" \ ${INSTALL_CF} ${DEST_CF} .else - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 -T "package=sendmail" \ + ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 -T "package=sendmail,config" \ freebsd.cf ${DEST_CF} .endif .if defined(SENDMAIL_ADDITIONAL_CF) - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 -T "package=sendmail" \ + ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 -T "package=sendmail,config" \ ${SENDMAIL_ADDITIONAL_CF} ${DESTDIR}/etc/mail .endif .if !defined(SENDMAIL_SET_USER_ID) .if defined(INSTALL_SUBMIT_CF) - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 -T "package=sendmail" \ + ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 -T "package=sendmail,config" \ ${INSTALL_SUBMIT_CF} ${DEST_SUBMIT_CF} .else - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 -T "package=sendmail" \ + ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 -T "package=sendmail,config" \ freebsd.submit.cf ${DEST_SUBMIT_CF} .endif .endif From nobody Wed Mar 27 08:35:41 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V4KkP1VFrz5GkDt; Wed, 27 Mar 2024 08:35: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 4V4KkP18nQz4KD7; Wed, 27 Mar 2024 08:35:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711528541; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TTUDSU8sRwAdLSM+OQWH0Mvt1VN03ehCpE9IDyELm4E=; b=geeXpuAohgFg0HM75sNVxKKNevtw9NWmwLpWgF9It16dYWBkclfOzPVzAZBrCc8kSXatkx BPZVofpqS27jdv5aCoT2nta/CAgep7YMUUqOrFc8/iZfvJEkZQCJL4ne3EG2x6O0w1vlT6 CsGvkoYFQnM3GBFsJgVFEAecxW/y3UKMVyp2dD8mAUU5VvAalTXbmmMI9SOYho/MwX9eje +NqFeqPFRjjmUJXuT4poqY+aECqYzgCeR0HdGJi9IIoJVRWvt6hlmPwlaor5djo9wQ11/V 4WrZ8RG14RYHfy/wDOWAyvZ7QBbCd2drjNn1IFeU5JCh1gshLW+7TVcFz5WtWw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711528541; a=rsa-sha256; cv=none; b=My6U7swyr51coqW/j/KZJYZJER0Zg1lMQ9JLw6q6ZQzNOqInHcgnt+2XEIO6hAnYwgQwIa TnVucxDbH3k4+I6rhJnSej0qktDRj21sgTLRkaio7YM8j1XIp9cFuCxK0zIOy/UpvRlOH2 IF2ZzFsZi2NEGQsYRwKuwmG2FV/UguoalhQ+rabP14F1g7PS0rQWyJ5wZT6rnWx3H7VDZd +KqFXinu0z/i68GKPR3IlzpISthvv8Qn9kJxfxGWRO4/fLxIIG+qTe6ez/nbj+5Jr0vMgS cpF7gYAC7w89piNhqds/siuhLS+sssRZ+2Z+V/BrhHmLp6H+6mXYqFcayqL1Iw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711528541; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TTUDSU8sRwAdLSM+OQWH0Mvt1VN03ehCpE9IDyELm4E=; b=dFBCMCG/HNE9H7C54nPkEnO9okHn/UE6P2ZTMvErAmqvU1LbtM+qJFo5l4yTS7DcHZTa77 jhJ7buzAxVZRzclqiOxWCG3rrg4vMA/Q31UKJJnXXR7f7pQ7XxkgtYcxsy+KPswXX5MItF jka3n5N97O9gchj8muNCH7k+mqwaU2sP0iKdj6NNqUHQ7g3Ij0q2mj5/+oDQ5olyGbZmA6 IB8mLgoOzrut/QLoMw1OVztgq5hV/XASl4WfRWeaQyGfCle6YY8usIhw1gHmEnuQezNqtD Wm0oGmienONxexjU/y3azHSoQDcMw4ApwnYDPuivucgWQCY42ZIRRQWPYGz2Yw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V4KkP0ls2zcHM; Wed, 27 Mar 2024 08:35:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42R8ZffB014904; Wed, 27 Mar 2024 08:35:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42R8Zfdc014901; Wed, 27 Mar 2024 08:35:41 GMT (envelope-from git) Date: Wed, 27 Mar 2024 08:35:41 GMT Message-Id: <202403270835.42R8Zfdc014901@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Baptiste Daroussin Subject: git: 099bd9e6ab8f - stable/14 - pkgbase: rework certctl package to only run rehash on the main package List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 099bd9e6ab8fd563587ccff84f33349a193f208e Auto-Submitted: auto-generated The branch stable/14 has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=099bd9e6ab8fd563587ccff84f33349a193f208e commit 099bd9e6ab8fd563587ccff84f33349a193f208e Author: Baptiste Daroussin AuthorDate: 2024-01-31 12:42:16 +0000 Commit: Baptiste Daroussin CommitDate: 2024-03-27 08:31:47 +0000 pkgbase: rework certctl package to only run rehash on the main package Rework how ucl manifest are generated leveraging ucl features and flua now the ucl generation is done via a lua script which uses libucl to ingest the template and use variables as defined in its command line. the template will include only if it exist a ucl file named after the package name which will complement the template or overwrite what was defined in the template if defined in this specific ucl file this allows to overwrite license, but add script only to the packages who actually needs them. As a results the post install scripts are now only added to the right package and not also added to the subpackages like -man or -dev Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D44374 (cherry picked from commit f8e46fd61e055fcc767c2038d867f58c38e43ec3) --- Makefile.inc1 | 60 +++++++++++++++++++++------------------ release/packages/certctl.ucl | 16 ----------- release/packages/clang-all.ucl | 1 + release/packages/clang.ucl | 17 ----------- release/packages/clibs.ucl | 1 + release/packages/generate-ucl.lua | 35 +++++++++++++++++++++++ release/packages/generate-ucl.sh | 36 +++++++++-------------- release/packages/jail.ucl | 18 ------------ release/packages/kernel.ucl | 18 +----------- release/packages/lld-all.ucl | 1 + release/packages/lld.ucl | 17 ----------- release/packages/lldb-all.ucl | 1 + release/packages/lldb.ucl | 17 ----------- release/packages/runtime.ucl | 26 ++++------------- release/packages/src-sys.ucl | 17 ----------- release/packages/src.ucl | 17 ----------- release/packages/ssh-all.ucl | 1 + release/packages/ssh.ucl | 17 ----------- release/packages/template.ucl | 15 +++++----- release/packages/unbound-all.ucl | 1 + release/packages/unbound.ucl | 17 ----------- release/packages/utilities.ucl | 21 ++------------ 22 files changed, 104 insertions(+), 266 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 2c3d96360129..0cf5bc1dec6e 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2098,22 +2098,28 @@ create-source-packages: _pkgbootstrap .PHONY ( echo "@override_prefix /usr/src" ; \ ${GIT_CMD} ls-files --recurse-submodules "sys/" ) \ > ${SSTAGEDIR}/src-sys.plist - sed -e "s/%VERSION%/${PKG_VERSION}/" \ - -e "s/%DESC%/FreeBSD sources/" \ - -e "s/ %VCS_REVISION%/${VCS_REVISION}/" \ - -e "s/%PKG_NAME_PREFIX%/${PKG_NAME_PREFIX}/" \ - -e "s/%PKG_MAINTAINER%/${PKG_MAINTAINER}/" \ - -e "s|%PKG_WWW%|${PKG_WWW}|" \ - ${SRCDIR}/release/packages/src.ucl \ - > ${SSTAGEDIR}/src.ucl - sed -e "s/%VERSION%/${PKG_VERSION}/" \ - -e "s/%DESC%/FreeBSD Kernel sources/" \ - -e "s/ %VCS_REVISION%/${VCS_REVISION}/" \ - -e "s/%PKG_NAME_PREFIX%/${PKG_NAME_PREFIX}/" \ - -e "s/%PKG_MAINTAINER%/${PKG_MAINTAINER}/" \ - -e "s|%PKG_WWW%|${PKG_WWW}|" \ - ${SRCDIR}/release/packages/src-sys.ucl \ - > ${SSTAGEDIR}/src-sys.ucl + ${SRCDIR}/release/packages/generate-ucl.lua \ + PKGNAME "src" \ + PKGGENNAME "src" \ + VERSION "${PKG_VERSION}" \ + DESC "FreeBSD Kernel Sources" \ + COMMENT "FreeBSD Userland Sources" \ + PKG_NAME_PREFIX "${PKG_NAME_PREFIX}" \ + PKG_MAINTAINER "${PKG_MAINTAINER}" \ + PKG_WWW "${PKG_WWW}" \ + ${SRCDIR}/release/packages/template.ucl \ + ${SSTAGEDIR}/src.ucl + ${SRCDIR}/release/packages/generate-ucl.lua \ + PKGNAME "src-sys" \ + PKGGENNAME "src" \ + VERSION "${PKG_VERSION}" \ + DESC "FreeBSD Kernel Sources" \ + COMMENT "FreeBSD Kernel Sources" \ + PKG_NAME_PREFIX "${PKG_NAME_PREFIX}" \ + PKG_MAINTAINER "${PKG_MAINTAINER}" \ + PKG_WWW "${PKG_WWW}" \ + ${SRCDIR}/release/packages/template.ucl \ + ${SSTAGEDIR}/src-sys.ucl ${PKG_CMD} -o ABI=${PKG_ABI} \ -o OSVERSION="${SRCRELDATE}" \ create -f ${PKG_FORMAT} \ @@ -2183,17 +2189,17 @@ create-kernel-packages-flavor${flavor:C,^""$,${_default_flavor},}: _pkgbootstrap ${METALOG_SORT_CMD} ${KSTAGEDIR}/kernel.meta | \ awk -f ${SRCDIR}/release/scripts/mtree-to-plist.awk \ -v kernel=yes -v _kernconf=${INSTALLKERNEL} ; \ - sed -e "s/%VERSION%/${PKG_VERSION}/" \ - -e "s/%PKGNAME%/kernel-${INSTALLKERNEL:tl}${flavor}/" \ - -e "s/%KERNELDIR%/kernel/" \ - -e "s/%COMMENT%/FreeBSD ${INSTALLKERNEL} kernel ${flavor}/" \ - -e "s/%DESC%/FreeBSD ${INSTALLKERNEL} kernel ${flavor}/" \ - -e "s/ %VCS_REVISION%/${VCS_REVISION}/" \ - -e "s/%PKG_NAME_PREFIX%/${PKG_NAME_PREFIX}/" \ - -e "s/%PKG_MAINTAINER%/${PKG_MAINTAINER}/" \ - -e "s|%PKG_WWW%|${PKG_WWW}|" \ - ${SRCDIR}/release/packages/kernel.ucl \ - > ${KSTAGEDIR}/${DISTDIR}/kernel.${INSTALLKERNEL}${flavor}.ucl ; \ + ${SRCDIR}/release/packages/generate-ucl.lua \ + PKGNAME "kernel-${INSTALLKERNEL:tl}${flavor}" \ + VERSION "${PKG_VERSION}" \ + KERNELDIR "kernel" \ + COMMENT "FreeBSD ${INSTALLKERNEL} kernel ${flavor}" \ + DESC "FreeBSD ${INSTALLKERNEL} kernel ${flavor}" \ + PKG_NAME_PREFIX "${PKG_NAME_PREFIX}" \ + PKG_MAINTAINER "${PKG_MAINTAINER}" \ + PKG_WWW "${PKG_WWW}" \ + ${SRCDIR}/release/packages/template.ucl \ + ${KSTAGEDIR}/${DISTDIR}/kernel.${INSTALLKERNEL}${flavor}.ucl ; \ awk -F\" ' \ /name/ { printf("===> Creating %s-", $$2); next } \ /version/ {print $$2; next } ' \ diff --git a/release/packages/certctl.ucl b/release/packages/certctl.ucl index f6dbb012ce64..664a6d139585 100644 --- a/release/packages/certctl.ucl +++ b/release/packages/certctl.ucl @@ -1,19 +1,3 @@ -# -# - -name = "%PKG_NAME_PREFIX%-%PKGNAME%" -origin = "base" -version = "%VERSION%" -comment = "%COMMENT%" -categories = [ base ] -maintainer = %PKG_MAINTAINER% -www = "%PKG_WWW%" -prefix = "/" -licenselogic = "single" -licenses = [ BSD2CLAUSE ] -desc = < ]... + +In the files the variable (in the form ${variablename} +in the ) will be expanded to . + +The undefined variables will reamin unmofifier "${variablename}" +]]-- + +local ucl = require("ucl") + +if #arg < 2 or #arg % 2 ~= 0 then + io.stderr:write(arg[0] .. ": expected an even number of arguments, got " .. #arg) + os.exit(1) +end + +local parser = ucl.parser() +for i = 2, #arg - 2, 2 do + parser:register_variable(arg[i - 1], arg[i]) +end +local res,err = parser:parse_file(arg[#arg - 1]) +if not res then + io.stderr:write(arg[0] .. ": fail to parse("..arg[#arg - 1].."): "..err) + os.exit(1) +end +local f,err = io.open(arg[#arg], "w") +if not f then + io.stderr:write(arg[0] .. ": fail to open("..arg[#arg].."): ".. err) + os.exit(1) +end +local obj = parser:get_object() +f:write(ucl.to_format(obj, 'ucl')) +f:close() diff --git a/release/packages/generate-ucl.sh b/release/packages/generate-ucl.sh index e5563c51a4cd..c7147a97a868 100755 --- a/release/packages/generate-ucl.sh +++ b/release/packages/generate-ucl.sh @@ -30,17 +30,10 @@ main() { shift $(( ${OPTIND} - 1 )) - vital="false" - case "${outname}" in bootloader) pkgdeps="" ;; - clibs) - vital="true" - # clibs should not have any dependencies or anything - # else imposed on it. - ;; certctl) pkgdeps="caroot openssl" ;; @@ -68,7 +61,6 @@ main() { runtime) outname="runtime" _descr="$(make -C ${srctree}/release/packages -f Makefile.package -V ${outname}_DESCR)" - vital="true" ;; *-lib32_dev) outname="${outname%%-lib32_dev}" @@ -111,10 +103,7 @@ main() { desc="$(make -C ${srctree}/release/packages -f Makefile.package -V ${outname}_DESC)" comment="$(make -C ${srctree}/release/packages -f Makefile.package -V ${outname}_COMMENT)" - uclsource="${srctree}/release/packages/${outname}.ucl" - if [ ! -e "${uclsource}" ]; then - uclsource="${srctree}/release/packages/template.ucl" - fi + uclsource="${srctree}/release/packages/template.ucl" if [ ! -z "${debug}" ]; then echo "" @@ -153,16 +142,19 @@ EOF echo '}' >> ${uclfile} fi cap_arg="$( make -f ${srctree}/share/mk/bsd.endian.mk -VCAP_MKDB_ENDIAN )" - sed -i '' -e "s/%VERSION%/${PKG_VERSION}/" \ - -e "s/%PKGNAME%/${origname}/" \ - -e "s/%COMMENT%/${comment}/" \ - -e "s/%DESC%/${desc}/" \ - -e "s/%VITAL%/${vital}/" \ - -e "s/%CAP_MKDB_ENDIAN%/${cap_arg}/g" \ - -e "s/%PKG_NAME_PREFIX%/${PKG_NAME_PREFIX}/" \ - -e "s|%PKG_WWW%|${PKG_WWW}|" \ - -e "s/%PKG_MAINTAINER%/${PKG_MAINTAINER}/" \ - ${uclfile} + ${srctree}/release/packages/generate-ucl.lua \ + VERSION "${PKG_VERSION}" \ + PKGNAME "${origname}" \ + PKGGENNAME "${outname}" \ + PKG_NAME_PREFIX "${PKG_NAME_PREFIX}" \ + COMMENT "${comment}" \ + DESC "${desc}" \ + CAP_MKDB_ENDIAN "${cap_arg}" \ + PKG_WWW "${PKG_WWW}" \ + PKG_MAINTAINER "${PKG_MAINTAINER}" \ + UCLFILES "${srctree}/release/packages/" \ + ${uclsource} ${uclfile} + return 0 } diff --git a/release/packages/jail.ucl b/release/packages/jail.ucl deleted file mode 100644 index bc137f009db9..000000000000 --- a/release/packages/jail.ucl +++ /dev/null @@ -1,18 +0,0 @@ -# -# - -name = "%PKG_NAME_PREFIX%-%PKGNAME%" -origin = "base" -version = "%VERSION%" -comment = "%COMMENT%" -categories = [ base ] -maintainer = "%PKG_MAINTAINER%" -www = "%PKG_WWW%" -prefix = "/" -vital = %VITAL% -licenselogic = "single" -licenses = [ BSD2CLAUSE ] -desc = < To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Baptiste Daroussin Subject: git: 69cd13d49c04 - stable/14 - pkgbase: fix kernel packing after switch ucl rework List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 69cd13d49c049846088f3fe6c8b48c2467e13dd0 Auto-Submitted: auto-generated The branch stable/14 has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=69cd13d49c049846088f3fe6c8b48c2467e13dd0 commit 69cd13d49c049846088f3fe6c8b48c2467e13dd0 Author: Baptiste Daroussin AuthorDate: 2024-03-19 09:00:15 +0000 Commit: Baptiste Daroussin CommitDate: 2024-03-27 08:31:48 +0000 pkgbase: fix kernel packing after switch ucl rework (cherry picked from commit 76229061601f495d3c80fdca5914e394e71ec07a) --- Makefile.inc1 | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 0cf5bc1dec6e..43fb226a0af7 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2226,17 +2226,18 @@ create-kernel-packages-extra-flavor${flavor:C,^""$,${_default_flavor},}-${_kerne ${METALOG_SORT_CMD} ${KSTAGEDIR}/kernel.${_kernel}.meta | \ awk -f ${SRCDIR}/release/scripts/mtree-to-plist.awk \ -v kernel=yes -v _kernconf=${_kernel} ; \ - sed -e "s/%VERSION%/${PKG_VERSION}/" \ - -e "s/%PKGNAME%/kernel-${_kernel:tl}${flavor}/" \ - -e "s/%KERNELDIR%/kernel.${_kernel}/" \ - -e "s/%COMMENT%/FreeBSD ${_kernel} kernel ${flavor}/" \ - -e "s/%DESC%/FreeBSD ${_kernel} kernel ${flavor}/" \ - -e "s/ %VCS_REVISION%/${VCS_REVISION}/" \ - -e "s/%PKG_NAME_PREFIX%/${PKG_NAME_PREFIX}/" \ - -e "s/%PKG_MAINTAINER%/${PKG_MAINTAINER}/" \ - -e "s|%PKG_WWW%|${PKG_WWW}|" \ - ${SRCDIR}/release/packages/kernel.ucl \ - > ${KSTAGEDIR}/kernel.${_kernel}/kernel.${_kernel}${flavor}.ucl ; \ + ${SRCDIR}/release/packages/generate-ucl.lua \ + PKGNAME "kernel-${_kernel:tl}${flavor}/" \ + PKGGENNAME "kernel" \ + VERSION "${PKG_VERSION}" \ + KERNELDIR "kernel.${_kernel}" \ + DESC "FreeBSD ${_kernel} kernel ${flavor}" \ + COMMENT "FreeBSD ${_kernel} kernel ${flavor}" \ + PKG_NAME_PREFIX "${PKG_NAME_PREFIX}" \ + PKG_MAINTAINER "${PKG_MAINTAINER}" \ + PKG_WWW "${PKG_WWW}" \ + ${SRCDIR}/release/packages/template.ucl \ + ${KSTAGEDIR}/kernel.${_kernel}/kernel.${_kernel}${flavor}.ucl ; \ awk -F\" ' \ /name/ { printf("===> Creating %s-", $$2); next } \ /version/ {print $$2; next } ' \ From nobody Wed Mar 27 08:35:43 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V4KkR55L0z5Gk86; Wed, 27 Mar 2024 08:35: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 4V4KkR3TyXz4KV4; Wed, 27 Mar 2024 08:35:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711528543; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vOnqiIfWiuPWOSBJpfq4hl2Mqhd5sSODVO4NV0NE8w0=; b=ggdf61FMVGjIILHpOdx6fMCK+ZNwKUX3qrNhaPPSAJsDYa+8J/6xPumiCa/s0f0Jnrxgss Avv8OXmgpOfRbQkzhdulDPBcIGcYIfXob1JHWvYzuc640Vy3XGDyVWWiijvknPY5V8bkmw a+O57IuXmzRjIebNNssGdDGyllF3Bo43EDFcNwa+nqBO7NExxFQiT/LIYiiKPPjWzAP4iw LWLYMOzsKcxrNvW4WWxY9PWKAT5jLeO6qoWYNfyuarKLN+cIb9Hd5gzoPUl5HB5vdE4IJq QSIqr4zFhiytRq8EMQ0AVqFFF54rf3toiF2wRpm6GZcfF4evLc9fYEKZel7n0Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711528543; a=rsa-sha256; cv=none; b=GeYXtTmyVUf/JHPbKbO4/oxu1DzztBXazUl+dXvPkgW8UEjUELYyJ6ew16Ki+2Op5dIgiW Flq1J/nZ2oQFotVe4IgSvt48REga4w66/YVh87wBiBTadXBn3J4uMgUAT48zGWUr1gQ6MK DX1edPSofumC0RggwVA/lNCI03mLE8nx/sp9wfwlEP8be9Kt+QcHwpHiiga2kh9hZN7JTe mbXXWlW2huLaqJAYFFQyTWTylX/B3NG5Rq/2H3wevz+rAzunh7jgPjIhWC9kVcWEKoc+h2 o4PI1nMnkHPRI1xkwyh6A27vyN4Iqs80y2bgwW0lgJFzL5nxhvB0QC/w4phK5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711528543; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vOnqiIfWiuPWOSBJpfq4hl2Mqhd5sSODVO4NV0NE8w0=; b=t6RwQkxtBStZ7I+DpHkiXlKmnDNoZjqeTicYSbT01EB28p3ycd1rPEzB3H08/FTefNc2JI VC+xnrQzIrH/nN4Ujf9/SBZ4O8U/RuqwemEHzOzKv/KBIZNqhg7+xAeWtd9jd5zOAe9AS8 Q9snxWeaw9j6icWaRhTn9GCmPAFYpRlX+lPrEPG+UEFXKcH1d8GUq2Z4BurOeeX4+qwoaR IpFZYKpKaSjCiy6IWHWqf49BzTo2XeYyfUuoo5+TOIkd0HfSEQR9FJJIqhPPexxfqo6Xtu UOFawRbfcr+LdgQTd2HQnbr2cBUiqApFvRRQFU+1dAWlXgdjIZJoYeAOmSPItA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V4KkR35dczcLP; Wed, 27 Mar 2024 08:35:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42R8Zhul015003; Wed, 27 Mar 2024 08:35:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42R8Zhvd015000; Wed, 27 Mar 2024 08:35:43 GMT (envelope-from git) Date: Wed, 27 Mar 2024 08:35:43 GMT Message-Id: <202403270835.42R8Zhvd015000@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Baptiste Daroussin Subject: git: fa0d9893484e - stable/14 - pkgbase: fix typo preventing packaging kernels List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: fa0d9893484eb126de0b988491cc3549c79f1cea Auto-Submitted: auto-generated The branch stable/14 has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=fa0d9893484eb126de0b988491cc3549c79f1cea commit fa0d9893484eb126de0b988491cc3549c79f1cea Author: Baptiste Daroussin AuthorDate: 2024-03-19 13:05:12 +0000 Commit: Baptiste Daroussin CommitDate: 2024-03-27 08:31:48 +0000 pkgbase: fix typo preventing packaging kernels (cherry picked from commit 2addba5caf92b78d5d32835e60ec28df7eb05aef) --- Makefile.inc1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 43fb226a0af7..d304dc47010b 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2227,7 +2227,7 @@ create-kernel-packages-extra-flavor${flavor:C,^""$,${_default_flavor},}-${_kerne awk -f ${SRCDIR}/release/scripts/mtree-to-plist.awk \ -v kernel=yes -v _kernconf=${_kernel} ; \ ${SRCDIR}/release/packages/generate-ucl.lua \ - PKGNAME "kernel-${_kernel:tl}${flavor}/" \ + PKGNAME "kernel-${_kernel:tl}${flavor}" \ PKGGENNAME "kernel" \ VERSION "${PKG_VERSION}" \ KERNELDIR "kernel.${_kernel}" \ From nobody Wed Mar 27 08:35:44 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V4KkS5TD4z5Gk87; Wed, 27 Mar 2024 08:35:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4V4KkS4szDz4KLy; Wed, 27 Mar 2024 08:35:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711528544; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wR1m8FSQWVs6doBAGvwbpqfGRECYGPCtcJrD1oe3WAg=; b=oDod8nRKveeip7wBWNGbNt6fcFkwhNM3i+UVE3KVs607dheQmpWDZ6zE208LhmMc8KcjJB 3f/D7MerxS2TlOMWrdYuhtMRy6xTOiAdTE09Gp+cIAbAeqW+bA3fdjngVhj1KxxpMPUWAQ VJEt6c8Eoqnw29pqNUoXS6YgprE5pq/vMorxap4eAgVWmSNrnL2Z1wFY+BK+IawMQg2Uxi +neJnCmSz64y5W94PNc5Sye+w7DeFRq67hMX38YpaMMmzU510IOkPDn31YspkIOja93IgE fnWvOHWmKOjFWoRY6qr5KZD18tjnJDx6Wt89EMBbjvtJEPv1WmjWRxmGgK555A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711528544; a=rsa-sha256; cv=none; b=p7EAbpYgv6eFMwWDBn1X4S4lyvSfBq4bDXuPlmlEmRYrJAYfnE1/GGrKMsE4IEmAwaTWui kR6pHl1mbf+f/ZzBUTM1zNYxujs7rSudFocZeeuKeM1Jk+MSLEthT+yOXk2vWvnU+io//G QWpig+8wDnwNFLZ74i1NZWXeZlt3juUKZHek29W85ERLBQsa5apgcwpBZm6zOQ6ANyrX/H cFb50P9KBQ8FNeBHe/FpXVDsJvDWSCmLkZO+OjNaFGF+SHx4UgPksT+gCncsmKkaoMYExh F5JXAlCpcVMpVWyz8PQ8VyGQLAlIpZcWc5EuyxWv3ik2l2BXvrrS3xbwNSW1tA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711528544; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wR1m8FSQWVs6doBAGvwbpqfGRECYGPCtcJrD1oe3WAg=; b=K+AU4zTiqw1MolS6CHt2JJODPJfu/e51dBbK9HsMOX3pkL+dKanbNZT2hkVDdo9lf1iuPY VQJpxVwV5fzBxOJ/aYnEDWwE++w6UDT1klzJUvVhUB4Ugdz0LgP1u1Ee4oAEqYdjAQX206 j2o0Zf9BiAl2hS/UA/3B7l53CiVuGA34OE10Xez//Hc+PlkL8cpSpxRLxT9bDqQu1GSo40 1reV+6c46/5i/7j3qjDhx+j0eoFjtNpJw7kHvYP1CCW8zwHPTQi1FPjxvpoXzQtSIsPbkK q+NuYUopFP0g6MCIYMwoyVljCtjdl+dsZHpX5mjWwhsNj/fS81pnaKR95UfbPA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V4KkS47gCzccQ; Wed, 27 Mar 2024 08:35:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42R8Zigo015069; Wed, 27 Mar 2024 08:35:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42R8Zi9e015066; Wed, 27 Mar 2024 08:35:44 GMT (envelope-from git) Date: Wed, 27 Mar 2024 08:35:44 GMT Message-Id: <202403270835.42R8Zi9e015066@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Baptiste Daroussin Subject: git: 0e3acd57984a - stable/14 - pkgbase: add a mechanism to be able to force a give ucl include List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0e3acd57984ab13270612cf5ea17227ec45f55e7 Auto-Submitted: auto-generated The branch stable/14 has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=0e3acd57984ab13270612cf5ea17227ec45f55e7 commit 0e3acd57984ab13270612cf5ea17227ec45f55e7 Author: Baptiste Daroussin AuthorDate: 2024-03-20 08:35:47 +0000 Commit: Baptiste Daroussin CommitDate: 2024-03-27 08:34:50 +0000 pkgbase: add a mechanism to be able to force a give ucl include This is made in order to be able to find add the post-install scripts for the kernel, where PKGNAME varies for each KERNCONF but we don't want to dynamically duplicated the kernel.ucl file. At the same time we don't want the *-dbg* packages to actually include those post-install scripts (cherry picked from commit 45d83c39262d9e2727c6f409e19c653f19a5d7cc) --- Makefile.inc1 | 2 ++ release/packages/template.ucl | 1 + 2 files changed, 3 insertions(+) diff --git a/Makefile.inc1 b/Makefile.inc1 index d304dc47010b..58a9b1fd4f3e 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2229,6 +2229,8 @@ create-kernel-packages-extra-flavor${flavor:C,^""$,${_default_flavor},}-${_kerne ${SRCDIR}/release/packages/generate-ucl.lua \ PKGNAME "kernel-${_kernel:tl}${flavor}" \ PKGGENNAME "kernel" \ + FORCEINCLUDE "kernel${flavor}" \ + UCLFILES "${SRCDIR}/release/packages/" \ VERSION "${PKG_VERSION}" \ KERNELDIR "kernel.${_kernel}" \ DESC "FreeBSD ${_kernel} kernel ${flavor}" \ diff --git a/release/packages/template.ucl b/release/packages/template.ucl index 2e325e623336..a65f58868118 100644 --- a/release/packages/template.ucl +++ b/release/packages/template.ucl @@ -16,3 +16,4 @@ ${DESC} EOD .include(try=true,duplicate=rewrite) "${UCLFILES}/${PKGGENNAME}-all.ucl" .include(try=true,duplicate=rewrite) "${UCLFILES}/${PKGNAME}.ucl" +.include(try=true,duplicate=rewrite) "${UCLFILES}/${FORCEINCLUDE}.ucl" From nobody Wed Mar 27 08:37:16 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V4KmD3pY9z5Gk8S; Wed, 27 Mar 2024 08:37: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 4V4KmD2yHXz4L6r; Wed, 27 Mar 2024 08:37:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711528636; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GhOagpVVTflgq5zbIG8dcubXbJA/nVawNLzd1yoI/KY=; b=tlWzgjKXT0aQt+NURZFHgxL/f9ZKbvrwdqZbP1ViYgQPAW2quFHBHSjIHd8TdB9fn3y1Dn JUNwwMDUEIh5/g7ZWfoSigAOY0N8WrP60tUo/tcJCWFLIDF25WOC24t9fBkyiOVp8NQxUd limSZiAKSGGG1RVez/R4ZAfof3Jmn8Z3rx1Wk6TDuzPgw0Cb+XBuTG/8lieobh+sbJk2E1 6hn0j1mExyNN7zWGZuwuAzW+k1kaVDytQQj+zHSQZyd0Lw57SPZ6XmTgTyvFrijUPCvPDd Gg++sA5tVWGuUwrZT5BjKzK1Ypo0+QMbe7ZNgpIkUvVZuNyDnyVN3VzeZfj/Dg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711528636; a=rsa-sha256; cv=none; b=GDzVe8bFy183yww/+FktQJmFoc+eYE6miTzV3W2HKIj0/e81r1AVYSc+4Y7tdZPR6IvKXs bG6Zki3VABIYJQMjnQTr6IQYTdhCThmWeSRv0yHlC6PvInnejX/+eC93r+czXFxfEtwcpo +92j8JGHyD3fFMaSZydMO6hLWpC6Qh6j+WQ3gmH+Gg8g+aa61wTRU2GhlWPSdFkToSpnNj yvE8S5mI8Pjlf6BC+zf/wFIlocr7tpWZgHZtd6A8dibV+MU35eJMXM6FWotKN5TyZkSiKI Fb7imHBRDonWpyRztEpDZ6/NX2RJoxSbd5Q6NbZ6cP/WoUevR4G6xLbHmTu5xA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711528636; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GhOagpVVTflgq5zbIG8dcubXbJA/nVawNLzd1yoI/KY=; b=xaq+UZ1smAyBhV39/GahcMPJyLS3KwjOIzscvZUrtwxtTqqobBemkeLxtc43qyhYedCPIE mfeAfSrbyOgAgNCg76ufczAm02yfFbzctzZowRP8G/DGczg1kYzQiyF4bIh/zPThFzcNTt f2MTD//02m1Az2P9hpFrYaVFJ69SEibKkns6w0OBBr7iAW5TivIE0Hig7VVAxGHbKw9W6J FYP7uSxWBJrAXpJxFsHjtHOzrpGRli7Ok2am/4mNXxsy7oiqfwUC4/Xd3SCbyXkgaJLgIH 9dBU+OvUrpzB9rtcgZHorEN1vmMcxlwMkNNNJAqdq8xBXAAbBWF//IKoek+ppA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V4KmD2YrkzcHN; Wed, 27 Mar 2024 08:37:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42R8bGrQ015408; Wed, 27 Mar 2024 08:37:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42R8bG9a015405; Wed, 27 Mar 2024 08:37:16 GMT (envelope-from git) Date: Wed, 27 Mar 2024 08:37:16 GMT Message-Id: <202403270837.42R8bG9a015405@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Baptiste Daroussin Subject: git: 77205dbc1397 - stable/14 - pkgbase: install all libc test files into the tests package List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 77205dbc1397acbe415dad26732dfdb6f62b0def Auto-Submitted: auto-generated The branch stable/14 has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=77205dbc1397acbe415dad26732dfdb6f62b0def commit 77205dbc1397acbe415dad26732dfdb6f62b0def Author: Baptiste Daroussin AuthorDate: 2024-03-20 16:13:56 +0000 Commit: Baptiste Daroussin CommitDate: 2024-03-27 08:37:10 +0000 pkgbase: install all libc test files into the tests package (cherry picked from commit 3a9ddfa1ab46b492c861022ea254b3277ef74dde) --- lib/libc/tests/stdlib/dynthr_mod/Makefile | 1 + lib/libc/tests/tls/dso/Makefile | 1 + lib/libc/tests/tls_dso/Makefile | 1 + 3 files changed, 3 insertions(+) diff --git a/lib/libc/tests/stdlib/dynthr_mod/Makefile b/lib/libc/tests/stdlib/dynthr_mod/Makefile index 3c6330cb712f..1db3a3c9d571 100644 --- a/lib/libc/tests/stdlib/dynthr_mod/Makefile +++ b/lib/libc/tests/stdlib/dynthr_mod/Makefile @@ -3,6 +3,7 @@ SHLIB_NAME= dynthr_mod.so SHLIBDIR= ${TESTSDIR} SRCS= dynthr_mod.c LIBADD= pthread +PACKAGE= tests TESTSDIR:= ${TESTSBASE}/${RELDIR:C/libc\/tests/libc/:H} diff --git a/lib/libc/tests/tls/dso/Makefile b/lib/libc/tests/tls/dso/Makefile index ec996105f4d3..2e08d6899d63 100644 --- a/lib/libc/tests/tls/dso/Makefile +++ b/lib/libc/tests/tls/dso/Makefile @@ -6,6 +6,7 @@ SHLIB_NAME= h_tls_dlopen.so SRCS= h_tls_dlopen.c MAN= +PACKAGE= tests LIBDIR= ${TESTSBASE}/lib/libc/tls SHLIB_MAJOR= 1 diff --git a/lib/libc/tests/tls_dso/Makefile b/lib/libc/tests/tls_dso/Makefile index 403d789a01f7..bae78739708d 100644 --- a/lib/libc/tests/tls_dso/Makefile +++ b/lib/libc/tests/tls_dso/Makefile @@ -7,6 +7,7 @@ SRCS= h_tls_dynamic.c LIBDIR= ${TESTSBASE}/lib/libc/tls SHLIBDIR= ${TESTSBASE}/lib/libc/tls SHLIB_MAJOR= 1 +PACKAGE= tests WITHOUT_STATIC= WITHOUT_PROFILE= From nobody Thu Mar 28 05:06:21 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V4s2P3ZF4z5GCwm; Thu, 28 Mar 2024 05:06: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 4V4s2P2xtsz4V04; Thu, 28 Mar 2024 05:06:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711602381; h=from:from:reply-to:subject:subject: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/xryZyWk8OWPxaShTKV0jOGBJj4e0QjncTQKKWKx5U=; b=U4/OYk29vevX+szc65cCc0cJfa8G0kQXAAa+HuUS+oiTryBfWou44hPWZIHrUJMiGsHqTI Y+d4lP/yJR9Duu+zZsGodx51xl5TFhuiv00NdFPa9ceFqgIb3mF5Xt5zhfxnxb+sqS0frs CVrwQwU8Xwue255RlOMxAQFZDxI6jzCJfnAMftP1GwL735O1aF6q7e5+2mZsF6m6rqy46r IkzfC/4qVv+5mEKds/snfRL3S6GYCUUuePoPqQEMX9LFyKGp/liKpSBnpODNe1K44wQ6x+ b1uN+Zxk0KvRlMo491dyDOAca+2IZhhw8TBqqNj11NjMLOKdkV5fUF+EzSbVcg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711602381; a=rsa-sha256; cv=none; b=EYaCa6LptR2WUxE2zAkGaVBgeYZy0eWlDkPhUi7wvb5XDX2kP0B86/DIlW697/AOZXZhCu 0I43j3islFv9dtc3OXVpS0Xl+8kXspV6sidsNv9TlWjSCL8oJRgp14NFhNzD+9v78+pexY ZayTVm+tM3XXYTQlwR/rs1f7VOqpsWQezI3shML72AXm3hjoB+836U7++W25iukc37hVjp 3SMvlwbH9YCDcV5Uz/pF1wsZsgvwD+GwxAzqSg8v7Bh6/a1uwFZvvQ0km1wE2o/tISTK3y 7DX+SH3psAZkD4aK1zMtPerODwBU3EDuKrz4i9J24RERoDfVSZ6Iy+gti5ukLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711602381; h=from:from:reply-to:subject:subject: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/xryZyWk8OWPxaShTKV0jOGBJj4e0QjncTQKKWKx5U=; b=Z5gyAkHKEqPkydq88r6vFkhc6T0IiDeHScB+BOWDASgJr/xXC3rxjeTkCRCYm/30KUDNfu Zaupfgi/n1X+jLL+HLoKyrovmEFMyoRpfDc2Cl7mR1ti+ZGGk2pSbVrO1eAn6a5zDSC7QL b8BS3clojwT6JkHgMV9gqIEYHkMtZCwQ2ENtqlzBzQaz+vDq4h/ouOfq2NsfCkr09re9Gw efFRcvqpeIC6SvR7plwTEVsNkD4wM6A8SGsY7pwXz4B37Z6QG23ZRJLmpYZji90MXLGTiR 7uz0yUXbBM3R9QIxMBCYC0pNLXoCkpODThZRuyyxhbxGL49gwXrhO1Md0m0gPg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V4s2P2XpKzF4f; Thu, 28 Mar 2024 05:06:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42S56LB9098980; Thu, 28 Mar 2024 05:06:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42S56La8098977; Thu, 28 Mar 2024 05:06:21 GMT (envelope-from git) Date: Thu, 28 Mar 2024 05:06:21 GMT Message-Id: <202403280506.42S56La8098977@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Tetlow Subject: git: a3ec3054762f - releng/14.0 - kern: fix panic with disabled ttys List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gordon X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: a3ec3054762f0e7bf2381a7939e62c5e43fde935 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by gordon: URL: https://cgit.FreeBSD.org/src/commit/?id=a3ec3054762f0e7bf2381a7939e62c5e43fde935 commit a3ec3054762f0e7bf2381a7939e62c5e43fde935 Author: Ed Maste AuthorDate: 2024-02-26 15:38:45 +0000 Commit: Gordon Tetlow CommitDate: 2024-03-28 03:12:16 +0000 kern: fix panic with disabled ttys PR: 277240, 277329 Reviewed by: kib (earlier version) Fixes: f1d0a0cbecf2 ("jail: Fix information leak.") MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D44086 Approved by: so Security: FreeBSD-EN-24:05.tty (cherry picked from commit 975d7730828a8bde28c2a0092b6e95c4c4e22f34) (cherry picked from commit 8d22744f5be165a2a82a2a204789e44bbdc5a2ee) --- sys/kern/tty.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 673904570b86..df42c08d949e 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -1312,7 +1312,8 @@ sysctl_kern_ttys(SYSCTL_HANDLER_ARGS) struct xtty *xtlist, *xt; struct tty *tp; struct proc *p; - int cansee, error; + int error; + bool cansee; sx_slock(&tty_list_sx); lsize = tty_list_count * sizeof(struct xtty); @@ -1325,8 +1326,8 @@ sysctl_kern_ttys(SYSCTL_HANDLER_ARGS) TAILQ_FOREACH(tp, &tty_list, t_list) { tty_lock(tp); - if (tp->t_session != NULL) { - p = tp->t_session->s_leader; + if (tp->t_session != NULL && + (p = atomic_load_ptr(&tp->t_session->s_leader)) != NULL) { PROC_LOCK(p); cansee = (p_cansee(td, p) == 0); PROC_UNLOCK(p); From nobody Thu Mar 28 05:06:22 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V4s2Q5jLPz5GCj5; Thu, 28 Mar 2024 05:06: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 4V4s2Q3mcMz4TtQ; Thu, 28 Mar 2024 05:06:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711602382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1WNByDuwO571aG/lLu5ZYJJZ3HC9MeDOFFChb+ZPz58=; b=qlb+aBLaGliCxgzW21Yb1+4WPVreZjOWCUfMk3bowNTQTBC/qf1Gi1Tt7veyRDoUIdK6gi GcpCO0I72eJuHIky4eeTtNE1I77da0WKG16yd4sc9vvz0n0SXBtMZlOfBf8q3U3CdhJ0Mv Tf+a11WjJtSH0I6zmOP/ucMxyXfuEeFT/PkVoZx27CSm6dK2EyJm1q6bQfUgQnvkvEiGni hAmyhdhzg15+RpDYxtP/weF+V/BbqaWw2HkGkK20dCZ+HXiEW+3u12ctlHEhn/u/Nwf8LS 7OEE7YVBM6O9M3h2Mwg5bsbLGJEJ1ueGATurbNudGtJl8FBKmTVCw3+EmCG0vQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711602382; a=rsa-sha256; cv=none; b=b4f/FaeT8Jnfe/AUAdQ5WtiQKuOCfGiK1IcRxetrFTVzj3lwaD6CSkWa+ldXGVQGlKoHtV r3lgb+ByGZ/1PzWc/Dh9SnRPtioj8YGZ3RXwelTMJJrCqZYGesW8aXeOVk63QLe1YJydBZ fY2dHwvPUNUHZxnbOeANVmUw6ZOaJlD95msuekHacNBYUZ/Wyd6ih54npGt6+bGScikFfE 3V5jQf3D/Gwy67HxYhmhV1NZz8BeMM+GRPru1HIoSE5zIrKTYufCZzHguu+eKAjKooCSGS yY6c35Q8uXQlaLPjZQ8mVbcUJlkMIBJlifkQrc7Jiy6CgKr2AG2qgRy69L/1dg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711602382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1WNByDuwO571aG/lLu5ZYJJZ3HC9MeDOFFChb+ZPz58=; b=v+pxaLutP19DUkfJ2S67DcgqcN3/17pzSMSOX9i7OKapXcfea5VlGMdx8A4+e/dcnUzx93 ZYRzYYqx46d/rodGTrkLerWgXYDg8CdvPoOp93ALdY+KlZBfpZyMQSp6S85PHKSy2bikK1 Yq8euI2aRj2OTSGs3DjjN+J7bQ2A/jyZiAmwIzGeIO8Fw0YfX1f5cw7qe375py8rWICdhj xdLmlg7Xxih0aU+R58PkWQ7t+DR+V70/Q1d0rdM4lapZNDJf2Dj5Sg6OdBQej/to6tcjib y/6Te/MfwGkvNCmRngmZNJq3p1OciaDxjZxY0apv2vKc+9K2Fe1vgyknz/HSgA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V4s2Q3NJPzDt2; Thu, 28 Mar 2024 05:06:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42S56M08099029; Thu, 28 Mar 2024 05:06:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42S56MQh099027; Thu, 28 Mar 2024 05:06:22 GMT (envelope-from git) Date: Thu, 28 Mar 2024 05:06:22 GMT Message-Id: <202403280506.42S56MQh099027@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Tetlow Subject: git: 56be7cd84447 - releng/14.0 - if_wg: use proper barriers around pkt->p_state List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gordon X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 56be7cd84447d9bc18b5b9e467eb976044194bbe Auto-Submitted: auto-generated The branch releng/14.0 has been updated by gordon: URL: https://cgit.FreeBSD.org/src/commit/?id=56be7cd84447d9bc18b5b9e467eb976044194bbe commit 56be7cd84447d9bc18b5b9e467eb976044194bbe Author: Kyle Evans AuthorDate: 2024-03-15 01:19:18 +0000 Commit: Gordon Tetlow CommitDate: 2024-03-28 03:12:41 +0000 if_wg: use proper barriers around pkt->p_state Without appropriate load-synchronization to pair with store barriers in wg_encrypt() and wg_decrypt(), the compiler and hardware are often allowed to reorder these loads in wg_deliver_out() and wg_deliver_in() such that we end up with a garbage or intermediate mbuf that we try to pass on. The issue is particularly prevalent with the weaker memory models of !x86 platforms. Switch from the big-hammer wmb() to more explicit acq/rel atomics to both make it obvious what we're syncing up with, and to avoid somewhat hefty fences on platforms that don't necessarily need this. With this patch, my dual-iperf3 reproducer is dramatically more stable than it is without on aarch64. PR: 264115 Reviewed by: andrew, zlei Approved by: so Security: FreeBSD-EN-24:06.wireguard (cherry picked from commit 3705d679a6344c957cae7a1b6372a8bfb8c44f0e) (cherry picked from commit 590e02d3c088b220c19d53ce40a5aecc6fa099e4) --- sys/dev/wg/if_wg.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sys/dev/wg/if_wg.c b/sys/dev/wg/if_wg.c index 4a21afe82eb5..6748539bff3e 100644 --- a/sys/dev/wg/if_wg.c +++ b/sys/dev/wg/if_wg.c @@ -1511,8 +1511,7 @@ wg_encrypt(struct wg_softc *sc, struct wg_packet *pkt) state = WG_PACKET_CRYPTED; out: pkt->p_mbuf = m; - wmb(); - pkt->p_state = state; + atomic_store_rel_int(&pkt->p_state, state); GROUPTASK_ENQUEUE(&peer->p_send); noise_remote_put(remote); } @@ -1584,8 +1583,7 @@ wg_decrypt(struct wg_softc *sc, struct wg_packet *pkt) state = WG_PACKET_CRYPTED; out: pkt->p_mbuf = m; - wmb(); - pkt->p_state = state; + atomic_store_rel_int(&pkt->p_state, state); GROUPTASK_ENQUEUE(&peer->p_recv); noise_remote_put(remote); } @@ -1641,7 +1639,7 @@ wg_deliver_out(struct wg_peer *peer) wg_peer_get_endpoint(peer, &endpoint); while ((pkt = wg_queue_dequeue_serial(&peer->p_encrypt_serial)) != NULL) { - if (pkt->p_state != WG_PACKET_CRYPTED) + if (atomic_load_acq_int(&pkt->p_state) != WG_PACKET_CRYPTED) goto error; m = pkt->p_mbuf; @@ -1683,7 +1681,7 @@ wg_deliver_in(struct wg_peer *peer) struct epoch_tracker et; while ((pkt = wg_queue_dequeue_serial(&peer->p_decrypt_serial)) != NULL) { - if (pkt->p_state != WG_PACKET_CRYPTED) + if (atomic_load_acq_int(&pkt->p_state) != WG_PACKET_CRYPTED) goto error; m = pkt->p_mbuf; From nobody Thu Mar 28 05:06:23 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V4s2R5g59z5GCgM; Thu, 28 Mar 2024 05:06: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 4V4s2R4pS4z4TtV; Thu, 28 Mar 2024 05:06:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711602383; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j8TqMkAAsqOuNNpRgxzicCPR1fXfXKZkvxE/iJ1lZfA=; b=iftH853KTYHDVJ75T1vyYyvd7417nYuLiMZkA3BKtfXNKtG3ba/LbCFF4e8Dxh8mWXttkl x4dqOBdYF/i0f0pALwP5dRA85MatF/91GXsitKQJ1naZ0BwQis9svv65dZRlimeZC7eVLk b3sS9CxtXLnbmk0tY/UIyspao0KAWI2pcFI33M6spgoaiATfjqLki6nzZhFNCjwwX8e/8g yVnIKzl7a9F4Bv9H0jhruBhsyXVFVW3F1oXUqwAtBNrPHSzc0ZV+vHSgD1lswg4o9hZ1iY /nBVx3jzJZdbPfL9sv3IEkfpzipZf3IkufjFpORMEEHl3vXlchw3SYMB4osjTg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711602383; a=rsa-sha256; cv=none; b=mOH1wwuMjwMa3t++LLFm1xJrO/j/kFnvBtD7fGWsXSd4CNhhRTaCl8ASwuxLTrBcgzKi1V QF7jzRHCK18OaNoEuKIxGUl2vlOTtByDeQLuUf9Pily5Nvq/JlpXcH7ybN+VvTDGrZbiZJ 4bvmps7IE0e3vjeDBzZCRssV5rMBZy5xhMBl8E1fubazS1X0U5EucoAijNhVf8eEiPVMuC JiaGYhgmGm/6ysdTHng3Oz+5i1oiIPAL0BkglvogCjfdkfCuSo+hXAmKjKbtMALU5NOyMs XRRVBZdyGJLN9gegY5FPbdZsNy4nk/PW9xlR1E8LNlJnwRxcclNTeXc/nPEMuw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711602383; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j8TqMkAAsqOuNNpRgxzicCPR1fXfXKZkvxE/iJ1lZfA=; b=tHyYodHGt0TO1kxAnXBAa4J/QIzQux2q6+tRo/bIBSjJcaMCXSf6S5gHAvDu7NbyK67D0Y aVslZbJVSHEYMKGghyp1Ab1aj3NLpLUDN+oCZldYfO2xUAH2X2/EHWcttb9MtCOP1I8ZBc ngzlN0rSQqyqOqOUGIysB4p78VXrIjzQ3v+LMKWkf30ySPTj8odqNO8TklHYMV/zkMhfVa z+i7bneDT/SgN8/SCEQZozJZ0LtPg3WgRZvuer6Wu0hTEJ/z3vceszQeWc+rPxlerHfp7W EM7UGVwqnguu0Lmfvqe4Wpqtsf0SyC+XYrB98OQLPDWlQMytlLMz5mnHKRseqw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V4s2R4NpVzF4g; Thu, 28 Mar 2024 05:06:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42S56NVX099083; Thu, 28 Mar 2024 05:06:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42S56Nmb099080; Thu, 28 Mar 2024 05:06:23 GMT (envelope-from git) Date: Thu, 28 Mar 2024 05:06:23 GMT Message-Id: <202403280506.42S56Nmb099080@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Tetlow Subject: git: 711422d54795 - releng/14.0 - Merge commit f800c1f3b207 from llvm-project (by Arthur Eubanks): List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gordon X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 711422d54795fb4fbef16fd1f1afcee6ed4510f4 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by gordon: URL: https://cgit.FreeBSD.org/src/commit/?id=711422d54795fb4fbef16fd1f1afcee6ed4510f4 commit 711422d54795fb4fbef16fd1f1afcee6ed4510f4 Author: Dimitry Andric AuthorDate: 2024-03-04 20:30:54 +0000 Commit: Gordon Tetlow CommitDate: 2024-03-28 03:13:14 +0000 Merge commit f800c1f3b207 from llvm-project (by Arthur Eubanks): [PEI] Don't zero out noreg operands A tail call may have $noreg operands. Fixes a crash. Reviewed By: xgupta Differential Revision: https://reviews.llvm.org/D156485 This should fix an assertion failure building qemu, specifically those parts using -fzero-call-used-regs. Reported by: Daniel Berrangé PR: 277474 MFC after: 3 days Approved by: so Security: FreeBSD-EN-24:07.clang (cherry picked from commit a39b3aa463f3474fabb3aedb5aecf943b54b4357) (cherry picked from commit fc31d474c40a50066310b3d03a8eb0724a00609d) --- contrib/llvm-project/llvm/lib/CodeGen/PrologEpilogInserter.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/contrib/llvm-project/llvm/lib/CodeGen/PrologEpilogInserter.cpp b/contrib/llvm-project/llvm/lib/CodeGen/PrologEpilogInserter.cpp index cc70ec477650..f4e7b57e9284 100644 --- a/contrib/llvm-project/llvm/lib/CodeGen/PrologEpilogInserter.cpp +++ b/contrib/llvm-project/llvm/lib/CodeGen/PrologEpilogInserter.cpp @@ -1289,6 +1289,8 @@ void PEI::insertZeroCallUsedRegs(MachineFunction &MF) { continue; MCRegister Reg = MO.getReg(); + if (!Reg) + continue; // This picks up sibling registers (e.q. %al -> %ah). for (MCRegUnitIterator Unit(Reg, &TRI); Unit.isValid(); ++Unit) @@ -1312,8 +1314,11 @@ void PEI::insertZeroCallUsedRegs(MachineFunction &MF) { if (!MO.isReg()) continue; - for (const MCPhysReg &Reg : - TRI.sub_and_superregs_inclusive(MO.getReg())) + MCRegister Reg = MO.getReg(); + if (!Reg) + continue; + + for (const MCPhysReg Reg : TRI.sub_and_superregs_inclusive(Reg)) RegsToZero.reset(Reg); } } From nobody Thu Mar 28 05:06:24 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V4s2T3JNPz5GCwp; Thu, 28 Mar 2024 05:06: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 4V4s2S5W7Qz4V5B; Thu, 28 Mar 2024 05:06:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711602384; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rPQ/7rgkTq5pKCVOICL1+aHDBCovQ2r+3wmHVaKQRlg=; b=SaXs6yswGf18t6z3V15szSbH+MSjjjGTFjseNPNmweotzMw+covwmhn06fbMEwDMW4dOQf VQKeG6G2QCliBBRM6uuWPFZtOjOUpQD1UmMJTcjSTVzwpbq81QYGX0Kiyp6VXa+DgdeqJ9 9k4EKrWaGgyxQg02mf0JeJE+M4VqIauUsAATvffInJ2nkn/YOLfovSNx1T6qIFjaFph2oa F/X1PLM8H8asapuQUI4RSeGBF8Qjw7i5IDDXyKAHNpzNGywGHCfuY9T/+sSzWxxs7MtQp1 IY73831+b90Yp9yT1hQE7bn/vzM3MeCl7QEADXbhkdsKKVk720Y9NCj4OmkEHg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711602384; a=rsa-sha256; cv=none; b=I3r6RY0uzjZNp76mUCz6nghm0GXpruZc0XiHnUhGCIkAvKdhKU7IVI06MYy9TBAAJUcKI1 cazERl3sxcJV2RBZ0gheD0j8gJCgahNMWlJA3P8qd65IixJa5vaYyvHnS5DLF11+jlO6jR Pkj/ga/XYqWHZtHamnK9nxJrmRfAEbACWXNUA7k/k2EnNoyjGG4fsJ3XqLPUGJxPIjGJhj EKUCfscqzJt3cD5oXbOenjOKrHHQ1B5vU9X+3dnIE7mJrySdb986r1HNui8uM0kNpmlDKU nyVHWl/5JJZmmheRD2eIW16KiKeemUR0uSYUZ/SAnx99y3NotmOrC+SYI5A41Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711602384; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rPQ/7rgkTq5pKCVOICL1+aHDBCovQ2r+3wmHVaKQRlg=; b=NheLO47hTw4eaMktyWOiOIhA4H6BatfYKEoLY4B2mwfZRXt23HR5Y55ziWctLWE827++Vm RRJgbVlqRQxMh7OaXx9hRwQuoifGJWvBS8VqexHBXSbR3dFwJUmkeKpXKyiIhPSlxhKPS1 mY9jbvX3OAjpPnulHxY9JQL24cQGGv5Qr3u6L1MRbVKUzWnEi+aPnLT1Np9MuNkMVgpL+T pGp/cKsAgUe1SvVQ/TIewyu1WxH53zzbMYV/JU3ghxXfAH1uAH6C34EJy6UeAm1fvUElgr gdPOcI8GPpAeddDs5VR8mUIeC9CXIkAkuyiJULcngN5W4Sa4ed9DjMt+2Gnm4g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V4s2S57FrzDcV; Thu, 28 Mar 2024 05:06:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42S56OMm099134; Thu, 28 Mar 2024 05:06:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42S56Og7099131; Thu, 28 Mar 2024 05:06:24 GMT (envelope-from git) Date: Thu, 28 Mar 2024 05:06:24 GMT Message-Id: <202403280506.42S56Og7099131@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Tetlow Subject: git: aaf2c7fdb81a - releng/14.0 - kerberos: Fix numerous segfaults when using weak crypto List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gordon X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: aaf2c7fdb81a1dd9de9fc77c9313f4e60e68fa76 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by gordon: URL: https://cgit.FreeBSD.org/src/commit/?id=aaf2c7fdb81a1dd9de9fc77c9313f4e60e68fa76 commit aaf2c7fdb81a1dd9de9fc77c9313f4e60e68fa76 Author: Cy Schubert AuthorDate: 2023-12-06 15:30:05 +0000 Commit: Gordon Tetlow CommitDate: 2024-03-28 03:14:44 +0000 kerberos: Fix numerous segfaults when using weak crypto Weak crypto is provided by the openssl legacy provider which is not load by default. Load the legacy providers as needed. When the legacy provider is loaded into the default context the default provider will no longer be automatically loaded. Without the default provider the various kerberos applicaions and functions will abort(). This is the second attempt at this patch. Instead of linking secure/lib/libcrypto at build time we now link it at runtime, avoiding buildworld failures under Linux and MacOS. This is because TARGET_ENDIANNESS is undefined at pre-build time. PR: 272835 Tested by: netchild Joerg Pulz (previous version) Approved by: so Security: FreeBSD-EN-24:08.kerberos (cherry picked from commit 476d63e091c2e663b51d18acf6acb282e1f22bbc) (cherry picked from commit c7db2e15e4045e1daba939bb151fc5878f791c7b) --- crypto/heimdal/lib/kadm5/create_s.c | 4 ++ crypto/heimdal/lib/kadm5/kadm5_locl.h | 1 + crypto/heimdal/lib/krb5/context.c | 4 ++ crypto/heimdal/lib/krb5/crypto.c | 3 + crypto/heimdal/lib/krb5/salt.c | 5 ++ crypto/heimdal/lib/roken/version-script.map | 1 + kerberos5/include/crypto-headers.h | 4 ++ kerberos5/include/fbsd_ossl_provider.h | 4 ++ kerberos5/lib/libroken/Makefile | 8 ++- kerberos5/lib/libroken/fbsd_ossl_provider_load.c | 77 ++++++++++++++++++++++++ 10 files changed, 109 insertions(+), 2 deletions(-) diff --git a/crypto/heimdal/lib/kadm5/create_s.c b/crypto/heimdal/lib/kadm5/create_s.c index 1033ca103239..267e9bbda2a0 100644 --- a/crypto/heimdal/lib/kadm5/create_s.c +++ b/crypto/heimdal/lib/kadm5/create_s.c @@ -169,6 +169,10 @@ kadm5_s_create_principal(void *server_handle, ent.entry.keys.len = 0; ent.entry.keys.val = NULL; + ret = fbsd_ossl_provider_load(); + if (ret) + goto out; + ret = _kadm5_set_keys(context, &ent.entry, password); if (ret) goto out; diff --git a/crypto/heimdal/lib/kadm5/kadm5_locl.h b/crypto/heimdal/lib/kadm5/kadm5_locl.h index 68b6a5ebf024..63b367ab7e21 100644 --- a/crypto/heimdal/lib/kadm5/kadm5_locl.h +++ b/crypto/heimdal/lib/kadm5/kadm5_locl.h @@ -79,5 +79,6 @@ #include #include #include "private.h" +#include "fbsd_ossl_provider.h" #endif /* __KADM5_LOCL_H__ */ diff --git a/crypto/heimdal/lib/krb5/context.c b/crypto/heimdal/lib/krb5/context.c index 86bfe539b974..681bc9a0982f 100644 --- a/crypto/heimdal/lib/krb5/context.c +++ b/crypto/heimdal/lib/krb5/context.c @@ -392,6 +392,10 @@ krb5_init_context(krb5_context *context) } HEIMDAL_MUTEX_init(p->mutex); + ret = fbsd_ossl_provider_load(); + if(ret) + goto out; + p->flags |= KRB5_CTX_F_HOMEDIR_ACCESS; ret = krb5_get_default_config_files(&files); diff --git a/crypto/heimdal/lib/krb5/crypto.c b/crypto/heimdal/lib/krb5/crypto.c index 67ecef62e875..6ee22609a4d5 100644 --- a/crypto/heimdal/lib/krb5/crypto.c +++ b/crypto/heimdal/lib/krb5/crypto.c @@ -2054,6 +2054,9 @@ krb5_crypto_init(krb5_context context, *crypto = NULL; return ret; } + ret = fbsd_ossl_provider_load(); + if (ret) + return ret; (*crypto)->key.schedule = NULL; (*crypto)->num_key_usage = 0; (*crypto)->key_usage = NULL; diff --git a/crypto/heimdal/lib/krb5/salt.c b/crypto/heimdal/lib/krb5/salt.c index 5e4c8a1c8572..2b1fbee80ab6 100644 --- a/crypto/heimdal/lib/krb5/salt.c +++ b/crypto/heimdal/lib/krb5/salt.c @@ -43,6 +43,8 @@ krb5_salttype_to_string (krb5_context context, struct _krb5_encryption_type *e; struct salt_type *st; + (void) fbsd_ossl_provider_load(); + e = _krb5_find_enctype (etype); if (e == NULL) { krb5_set_error_message(context, KRB5_PROG_ETYPE_NOSUPP, @@ -75,6 +77,8 @@ krb5_string_to_salttype (krb5_context context, struct _krb5_encryption_type *e; struct salt_type *st; + (void) fbsd_ossl_provider_load(); + e = _krb5_find_enctype (etype); if (e == NULL) { krb5_set_error_message(context, KRB5_PROG_ETYPE_NOSUPP, @@ -196,6 +200,7 @@ krb5_string_to_key_data_salt_opaque (krb5_context context, enctype); return KRB5_PROG_ETYPE_NOSUPP; } + (void) fbsd_ossl_provider_load(); for(st = et->keytype->string_to_key; st && st->type; st++) if(st->type == salt.salttype) return (*st->string_to_key)(context, enctype, password, diff --git a/crypto/heimdal/lib/roken/version-script.map b/crypto/heimdal/lib/roken/version-script.map index 72d2ea7e4f7c..bb2139ed74cc 100644 --- a/crypto/heimdal/lib/roken/version-script.map +++ b/crypto/heimdal/lib/roken/version-script.map @@ -13,6 +13,7 @@ HEIMDAL_ROKEN_1.0 { ct_memcmp; err; errx; + fbsd_ossl_provider_load; free_getarg_strings; get_default_username; get_window_size; diff --git a/kerberos5/include/crypto-headers.h b/kerberos5/include/crypto-headers.h index 3ae0d9624ffd..2cc870642964 100644 --- a/kerberos5/include/crypto-headers.h +++ b/kerberos5/include/crypto-headers.h @@ -17,5 +17,9 @@ #include #include #include +#if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3) +#include +#include "fbsd_ossl_provider.h" +#endif #endif /* __crypto_headers_h__ */ diff --git a/kerberos5/include/fbsd_ossl_provider.h b/kerberos5/include/fbsd_ossl_provider.h new file mode 100644 index 000000000000..013983ca9f83 --- /dev/null +++ b/kerberos5/include/fbsd_ossl_provider.h @@ -0,0 +1,4 @@ +#ifndef __fbsd_ossl_provider_h +#define __fbsd_ossl_provider_h +int fbsd_ossl_provider_load(void); +#endif diff --git a/kerberos5/lib/libroken/Makefile b/kerberos5/lib/libroken/Makefile index 0c46ba6c4cb5..ca6d090e64f0 100644 --- a/kerberos5/lib/libroken/Makefile +++ b/kerberos5/lib/libroken/Makefile @@ -74,9 +74,13 @@ SRCS= base64.c \ vis.c \ warnerr.c \ write_pid.c \ - xfree.c + xfree.c \ + fbsd_ossl_provider_load.c -CFLAGS+=-I${KRB5DIR}/lib/roken -I. +CFLAGS+=-I${KRB5DIR}/lib/roken \ + -I${SRCTOP}/kerberos5/include \ + -I${KRB5DIR}/lib/krb5 \ + -I${SRCTOP}/crypto/openssl/include -I. CLEANFILES= roken.h diff --git a/kerberos5/lib/libroken/fbsd_ossl_provider_load.c b/kerberos5/lib/libroken/fbsd_ossl_provider_load.c new file mode 100644 index 000000000000..497b32124f96 --- /dev/null +++ b/kerberos5/lib/libroken/fbsd_ossl_provider_load.c @@ -0,0 +1,77 @@ +#include +#include +#include +#include +#include + +#if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3) +static void fbsd_ossl_provider_unload(void); +static void print_dlerror(char *); +static OSSL_PROVIDER *legacy; +static OSSL_PROVIDER *deflt; +static int providers_loaded = 0; +static OSSL_PROVIDER * (*ossl_provider_load)(OSSL_LIB_CTX *, const char*) = NULL; +static int (*ossl_provider_unload)(OSSL_PROVIDER *) = NULL; +static void *crypto_lib_handle = NULL; + +static void +fbsd_ossl_provider_unload(void) +{ + if (ossl_provider_unload == NULL) { + if (!(ossl_provider_unload = (int (*)(OSSL_PROVIDER*)) dlsym(crypto_lib_handle, "OSSL_PROVIDER_unload"))) { + print_dlerror("Unable to link OSSL_PROVIDER_unload"); + return; + } + } + if (providers_loaded == 1) { + (*ossl_provider_unload)(legacy); + (*ossl_provider_unload)(deflt); + providers_loaded = 0; + } +} + +static void +print_dlerror(char *message) +{ + char *errstr; + + if ((errstr = dlerror()) != NULL) + fprintf(stderr, "%s: %s\n", + message, errstr); +} +#endif + +int +fbsd_ossl_provider_load(void) +{ +#if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3) + if (crypto_lib_handle == NULL) { + if (!(crypto_lib_handle = dlopen("/usr/lib/libcrypto.so", + RTLD_LAZY|RTLD_GLOBAL))) { + print_dlerror("Unable to load libcrypto.so"); + return (EINVAL); + } + } + if (ossl_provider_load == NULL) { + if (!(ossl_provider_load = (OSSL_PROVIDER * (*)(OSSL_LIB_CTX*, const char *)) dlsym(crypto_lib_handle, "OSSL_PROVIDER_load"))) { + print_dlerror("Unable to link OSSL_PROVIDER_load"); + return(ENOENT); + } + } + + if (providers_loaded == 0) { + if ((legacy = (*ossl_provider_load)(NULL, "legacy")) == NULL) + return (EINVAL); + if ((deflt = (*ossl_provider_load)(NULL, "default")) == NULL) { + (*ossl_provider_unload)(legacy); + return (EINVAL); + } + if (atexit(fbsd_ossl_provider_unload)) { + fbsd_ossl_provider_unload(); + return (errno); + } + providers_loaded = 1; + } +#endif + return (0); +} From nobody Thu Mar 28 05:06:25 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V4s2V3d4lz5GCcd; Thu, 28 Mar 2024 05:06:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4V4s2T73y4z4V5X; Thu, 28 Mar 2024 05:06:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711602386; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bdPMIvCoGVQ7/u8AJWfmjCxUowLtam52UDaebRRmQeY=; b=ickgkrBzztp9krghMpONYyBHccbTRMnNi+7jACj0i+FBYb4nNylDgEDyJXIoGg21s2FjLF VHcrwWXIzknxUtxJOZfRPvZpq+l02cYo9V1zY6PQGUdLsGHARDfzYMpqC6XXlRU8SqZw7I ElnU6N2wFW55Q2cPRDQWPoxVvc0PxlP65DKcgHU7k+EKtRimn9jhQGjkWCajsht2THOkLM zzC5pDx53UvzWGi9iwSWZt+2sDBeHZ+zzhF8xIptWReFBkYpt7YUMOui83BkRYGLjPdf/i R57bEk66ITBBPqOy7RaU5Iv4DLhIkO+s/9Mk7Syqcwfuzw8PSC5UQqNxI4x4IA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711602386; a=rsa-sha256; cv=none; b=LL6Nt+R7wMx0tWtcdHRproMcEzDdudIbPNfW/40M8EfCz2K67Tm515YmdVZwUujwXXSCxx aZDdeOVSilJY+K8jmrEngXzEIWAZvc27Q9JOmmjRsqH6hg5tlqzKcRbPAaemq3tchmjZqE GIR4iVudBJsZyYLEIxVatynhQte+GNuZuK6Px3sgLQMe0qMLG+YEIvrnmdu4XFfsDtGTpA AUAQWDun5DShNfdoGmLJ8dFWC3EdC9j9SI3kN4OgT9Ho0M/ozqw7bB4oyLunTbeFZm/nnC 2Gg0yk6GWLcIeidpDj2SCarLkor2fAQJ7TfJr0EUGUWi9dIf8aT2lv9+6lRPzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711602386; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bdPMIvCoGVQ7/u8AJWfmjCxUowLtam52UDaebRRmQeY=; b=XnkTM3UlpS1Af2+DjIry7jMa+RJ1LE/m3V6nYK9YROovSbGyX82hjVgx6tWtrIc0kMkBsa 9Wy5fqUTmBusgeExazTlRRPc04FS2xj9jeB07NWZ9E/sLOpy4QZY3k9TQw8KeYWfM7bveN GNFqk7ZgQwS2bbpTD4euvUC/PtzKNggEP4k8y89dTjGBuXnLiioHKyAuKgwD22asNlgfj+ Y8bWpU1jDr6AzvaCzOXpqhwCtFcjlKS9idi5u9dZAh72579UB4pvHYMduZ+JTXYpfIWrKt VYfiizow/MczZnMizwarPTjy2GBV+xrPXsG2zsJosnvpphgHdy1VKLsdcynK5g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V4s2T6Sl9zDqx; Thu, 28 Mar 2024 05:06:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42S56P05099188; Thu, 28 Mar 2024 05:06:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42S56Po6099185; Thu, 28 Mar 2024 05:06:25 GMT (envelope-from git) Date: Thu, 28 Mar 2024 05:06:25 GMT Message-Id: <202403280506.42S56Po6099185@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Tetlow Subject: git: c48fe39ad139 - releng/14.0 - kerberos5: Mitigate the possibility of using an old libcrypto List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gordon X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: c48fe39ad13906f9425ec36bf42c2725e8e31979 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by gordon: URL: https://cgit.FreeBSD.org/src/commit/?id=c48fe39ad13906f9425ec36bf42c2725e8e31979 commit c48fe39ad13906f9425ec36bf42c2725e8e31979 Author: Cy Schubert AuthorDate: 2024-01-18 08:22:20 +0000 Commit: Gordon Tetlow CommitDate: 2024-03-28 03:15:14 +0000 kerberos5: Mitigate the possibility of using an old libcrypto By using the full library name (libcrypto.so.30) we avoid the exposure of using an old, possibly vulnerable, library. Reported by: jrtc27 Fixes: 476d63e091c2 Approved by: so Security: FreeBSD-EN-24:08.kerberos (cherry picked from commit 0990136ed1753ac7837206f9c5f4b83ccff6c405) (cherry picked from commit 17e941a0c88cac2d8cd28d6614448adbd65d4b72) --- kerberos5/lib/libroken/fbsd_ossl_provider_load.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kerberos5/lib/libroken/fbsd_ossl_provider_load.c b/kerberos5/lib/libroken/fbsd_ossl_provider_load.c index 497b32124f96..2328041bc166 100644 --- a/kerberos5/lib/libroken/fbsd_ossl_provider_load.c +++ b/kerberos5/lib/libroken/fbsd_ossl_provider_load.c @@ -5,6 +5,7 @@ #include #if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3) +#define CRYPTO_LIBRARY "/lib/libcrypto.so.30" static void fbsd_ossl_provider_unload(void); static void print_dlerror(char *); static OSSL_PROVIDER *legacy; @@ -46,7 +47,7 @@ fbsd_ossl_provider_load(void) { #if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3) if (crypto_lib_handle == NULL) { - if (!(crypto_lib_handle = dlopen("/usr/lib/libcrypto.so", + if (!(crypto_lib_handle = dlopen(CRYPTO_LIBRARY, RTLD_LAZY|RTLD_GLOBAL))) { print_dlerror("Unable to load libcrypto.so"); return (EINVAL); From nobody Thu Mar 28 05:06:26 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V4s2W6jcmz5GCnV; Thu, 28 Mar 2024 05:06: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 4V4s2W2g7nz4VG6; Thu, 28 Mar 2024 05:06:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711602387; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IGlHI8Q6AI6EYqfrN51iJjkyHsAoyvYc0fxZR4v0Nts=; b=OHq4J2pY4RAwT26c0a0UDcEskynl045zmce2We3RaRtR6CDepPmsXpj6QaCZTx5Nu2REec Fg5MwhOb+/ThL4RfP72qDYNxGbI5OjrXMrb1K1YZ/mz3RYHrbckWJGMPLH8lKy2LV3BLZG v54z3ta/xJ2Z5lH4M0IupCRrmu1r69ZKLHGFkPd3HoF7zN8jRXU8lBAytilg77PdkblBrE i2pz5rPTQj7JmznZl0G0qW15MiHMe8lolX0+D25eBfoSk8i/1hwy+R4icj2RKk1Hl/HWD2 Ydbtd8QNtXqDiaFL/U6YjTg4wmfqkDW3MYD5F+sIYukaplJ1xHxTDwhWMKOBHA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711602387; a=rsa-sha256; cv=none; b=laUTWAu6CF1QAnEWKX5o3JEWJLCPBARPgSHAZm/Ya77NFmXp5sLCEN8HYAboC4zv1RCuJy n1S2N3uPQnzzbOBvyMTEhTH7jSW0mQfdP7O+2wGzfTyE+VVwJZxuusw4GZ63xD2n0q0ZyG h/W0XKZz1crnIRmWQc0Y/ehsX1Qa0SdCA1H6iHyX5vUNVr2Y4j5vd0GBHoGgeYLAx6h3qq 3bZtVzgre2Z/NSd+tVLtOiDehtaMtiieOsZZcLfieQez0ceYGkcGCP3DyWBLcIaNKYbhca H9a1a0sA9/12m4nk1fqin5uofGCVXdFNMKWGE+IXpQuHjct0qjUGnXRYCeECqw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711602387; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IGlHI8Q6AI6EYqfrN51iJjkyHsAoyvYc0fxZR4v0Nts=; b=F1Dvkm8CBOB/MUqTP83n+ronbxmEBTSjrAbdh2OsRqFiLIKg6dSmgHOiEituyuf5ZsJPhZ tB15LEmRYBJZeEbJythwLc9lMCP+izjcxzWHCbfrQ1FDdx1lFkcZmpCanWYhGRdVPM0jA6 ZhOmLd/elODE7hhfHr5nKRGjWn+WbEOvfNwayttA4hjOIA4wJV9Pn3zi0Lqh/Z0oYeOLp3 O55dDZe+FLCGJaMJx7SPFwtcgpFzY/SIK+C2LIA6lyHGnjDem/s6h9+d5LUJkRjeOp/WPV 3oY1mwNzSwL6hgXTc+QDDYS/XEr+M0CYOTlOMacUqCE1vNyi+faKRDK8ulBOhg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V4s2W2CrFzF4C; Thu, 28 Mar 2024 05:06:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42S56RwM099227; Thu, 28 Mar 2024 05:06:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42S56QPn099224; Thu, 28 Mar 2024 05:06:26 GMT (envelope-from git) Date: Thu, 28 Mar 2024 05:06:26 GMT Message-Id: <202403280506.42S56QPn099224@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Tetlow Subject: git: c189b94f8a22 - releng/14.0 - unbound: Vendor import 1.19.1 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gordon X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: c189b94f8a22883b086e1908917d97bc79c2b879 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by gordon: URL: https://cgit.FreeBSD.org/src/commit/?id=c189b94f8a22883b086e1908917d97bc79c2b879 commit c189b94f8a22883b086e1908917d97bc79c2b879 Author: Cy Schubert AuthorDate: 2023-09-19 04:17:09 +0000 Commit: Gordon Tetlow CommitDate: 2024-03-28 04:59:50 +0000 unbound: Vendor import 1.19.1 Release notes at https://www.nlnetlabs.nl/news/2024/Feb/13/unbound-1.19.1-released/ Security: CVE-2023-50387, CVE-2023-50868 Security: FreeBSD-SA-24:03.unbound Approved by: so (cherry picked from commit 8f76bb7dad48538c6832c2fb466a433d2a3f8cd5) (cherry picked from commit 1b5982339ced0f39ef588a07a3e960954e87c65e) (cherry picked from commit 948e11aaf420cd7d493cc2e118cacc06d18653fe) (cherry picked from commit 9afc0c849e6e0436351fbdaf6157d1c822793d80) (cherry picked from commit 6e71235e558ef579605e7f35b02f983b9a246a4a) (cherry picked from commit 8a9416b18f8a894c4bb0c3a284746d5e0bc81152) (cherry picked from commit 103ba509e72e3949d22485666949e9705d4af8cd) (cherry picked from commit 4631a5104763c01123dad62546b1325cb16bf44c) (cherry picked from commit 5aab39b24ce7437265b94461ffdd9b12c0723658) (cherry picked from commit a118088ff3741023c24caeff1a4fff7b660817fd) (cherry picked from commit 67267734315c6a48db31697f0a0669fa1f985969) (cherry picked from commit 1318715277325a508ad5b76c8cd9c17c8146693b) (cherry picked from commit b76ef9a7cb8a7c62d10ae8101f41014f34819174) (cherry picked from commit e2b44c401cc2a59da8c4c0515c6bcb533d09cc73) --- contrib/unbound/Makefile.in | 47 +- contrib/unbound/README.md | 8 +- contrib/unbound/acx_nlnetlabs.m4 | 36 +- contrib/unbound/acx_python.m4 | 61 +- contrib/unbound/cachedb/cachedb.c | 68 +- contrib/unbound/cachedb/redis.c | 96 ++- contrib/unbound/compat/getentropy_solaris.c | 2 +- contrib/unbound/config.guess | 62 +- contrib/unbound/config.h.in | 25 +- contrib/unbound/config.sub | 232 +++--- contrib/unbound/configure | 777 ++++++++------------- contrib/unbound/configure.ac | 111 +-- contrib/unbound/contrib/Dockerfile.tests | 4 +- contrib/unbound/contrib/README | 3 + contrib/unbound/contrib/aaaa-filter-iterator.patch | 4 +- contrib/unbound/contrib/unbound.init_yocto | 139 ++++ contrib/unbound/daemon/acl_list.c | 2 + contrib/unbound/daemon/acl_list.h | 8 +- contrib/unbound/daemon/cachedump.c | 28 +- contrib/unbound/daemon/remote.c | 271 ++++--- contrib/unbound/daemon/remote.h | 2 +- contrib/unbound/daemon/stats.c | 53 +- contrib/unbound/daemon/stats.h | 7 + contrib/unbound/daemon/worker.c | 479 ++++++++----- contrib/unbound/dns64/dns64.c | 103 +-- contrib/unbound/dnstap/dnstap.c | 7 +- contrib/unbound/dnstap/dnstap.h | 4 +- contrib/unbound/dnstap/dnstap.m4 | 2 +- contrib/unbound/dnstap/dtstream.c | 8 +- contrib/unbound/dnstap/unbound-dnstap-socket.c | 47 +- contrib/unbound/doc/Changelog | 475 ++++++++++++- contrib/unbound/doc/README | 2 +- contrib/unbound/doc/README.DNS64 | 20 + contrib/unbound/doc/example.conf.in | 41 +- contrib/unbound/doc/libunbound.3.in | 4 +- contrib/unbound/doc/unbound-anchor.8.in | 2 +- contrib/unbound/doc/unbound-checkconf.8.in | 2 +- contrib/unbound/doc/unbound-control.8.in | 58 +- contrib/unbound/doc/unbound-host.1.in | 2 +- contrib/unbound/doc/unbound.8.in | 4 +- contrib/unbound/doc/unbound.conf.5.in | 177 ++++- contrib/unbound/dynlibmod/dynlibmod.c | 3 +- contrib/unbound/edns-subnet/subnetmod.c | 57 +- contrib/unbound/edns-subnet/subnetmod.h | 7 + contrib/unbound/ipset/ipset.c | 4 +- contrib/unbound/iterator/iter_delegpt.c | 39 ++ contrib/unbound/iterator/iter_delegpt.h | 25 + contrib/unbound/iterator/iter_priv.c | 26 +- contrib/unbound/iterator/iter_resptype.c | 20 +- contrib/unbound/iterator/iter_resptype.h | 4 +- contrib/unbound/iterator/iter_scrub.c | 110 ++- contrib/unbound/iterator/iter_scrub.h | 5 +- contrib/unbound/iterator/iter_utils.c | 43 +- contrib/unbound/iterator/iter_utils.h | 7 +- contrib/unbound/iterator/iterator.c | 331 ++++++--- contrib/unbound/iterator/iterator.h | 30 +- contrib/unbound/libunbound/libworker.c | 20 +- contrib/unbound/libunbound/unbound-event.h | 6 +- contrib/unbound/libunbound/unbound.h | 116 +-- contrib/unbound/services/authzone.c | 24 +- contrib/unbound/services/cache/dns.c | 72 +- contrib/unbound/services/cache/dns.h | 9 + contrib/unbound/services/cache/infra.c | 75 +- contrib/unbound/services/cache/infra.h | 5 +- contrib/unbound/services/listen_dnsport.c | 161 +++-- contrib/unbound/services/localzone.c | 20 +- contrib/unbound/services/localzone.h | 2 + contrib/unbound/services/mesh.c | 394 +++++------ contrib/unbound/services/mesh.h | 14 +- contrib/unbound/services/modstack.c | 10 +- contrib/unbound/services/outside_network.c | 28 + contrib/unbound/services/rpz.c | 240 ++++++- contrib/unbound/services/rpz.h | 16 +- contrib/unbound/sldns/rrdef.c | 12 +- contrib/unbound/sldns/rrdef.h | 7 +- contrib/unbound/sldns/str2wire.c | 115 +-- contrib/unbound/sldns/str2wire.h | 4 +- contrib/unbound/sldns/wire2str.c | 101 ++- contrib/unbound/sldns/wire2str.h | 13 + contrib/unbound/smallapp/unbound-anchor.c | 3 +- contrib/unbound/smallapp/unbound-checkconf.c | 19 +- contrib/unbound/smallapp/unbound-control.c | 54 +- contrib/unbound/smallapp/unbound-host.c | 5 +- contrib/unbound/testdata/00-lint.tdir/00-lint.pre | 14 + contrib/unbound/testdata/cachedb_cached_ede.crpl | 91 +++ .../cachedb_no_store.tdir/cachedb_no_store.conf | 29 + .../cachedb_no_store.tdir/cachedb_no_store.dsc | 16 + .../cachedb_no_store.tdir/cachedb_no_store.post | 20 + .../cachedb_no_store.tdir/cachedb_no_store.pre | 36 + .../cachedb_no_store.servfail.testns | 8 + .../cachedb_no_store.tdir/cachedb_no_store.test | 132 ++++ .../cachedb_no_store.tdir/cachedb_no_store.testns | 9 + contrib/unbound/testdata/disable_edns_do.rpl | 164 +++++ .../unbound/testdata/edns_downstream_cookies.rpl | 235 +++++++ .../testdata/ip_ratelimit.tdir/ip_ratelimit.conf | 28 + .../testdata/ip_ratelimit.tdir/ip_ratelimit.dsc | 16 + .../testdata/ip_ratelimit.tdir/ip_ratelimit.post | 13 + .../testdata/ip_ratelimit.tdir/ip_ratelimit.pre | 24 + .../testdata/ip_ratelimit.tdir/ip_ratelimit.test | 165 +++++ .../testdata/ip_ratelimit.tdir/unbound_control.key | 39 ++ .../testdata/ip_ratelimit.tdir/unbound_control.pem | 22 + .../testdata/ip_ratelimit.tdir/unbound_server.key | 39 ++ .../testdata/ip_ratelimit.tdir/unbound_server.pem | 22 + .../unbound/testdata/iter_cname_minimise_nx.rpl | 246 +++++++ contrib/unbound/testdata/iter_failreply.rpl | 132 ++++ contrib/unbound/testdata/iter_ignore_empty.rpl | 248 +++++++ contrib/unbound/testdata/iter_nat64.rpl | 117 ++++ contrib/unbound/testdata/iter_nat64_prefix.rpl | 119 ++++ contrib/unbound/testdata/iter_nat64_prefix48.rpl | 118 ++++ contrib/unbound/testdata/iter_scrub_rr_length.rpl | 298 ++++++++ .../testdata/root_zonemd.tdir/root_zonemd.conf | 34 + .../testdata/root_zonemd.tdir/root_zonemd.dsc | 16 + .../testdata/root_zonemd.tdir/root_zonemd.post | 14 + .../testdata/root_zonemd.tdir/root_zonemd.pre | 50 ++ .../testdata/root_zonemd.tdir/root_zonemd.test | 51 ++ .../testdata/root_zonemd.tdir/root_zonemd.testns | 9 + contrib/unbound/testdata/rpz_cached_cname.rpl | 122 ++++ .../unbound/testdata/serve_expired_0ttl_nodata.rpl | 154 ++++ .../testdata/serve_expired_0ttl_nxdomain.rpl | 154 ++++ .../testdata/serve_expired_0ttl_servfail.rpl | 129 ++++ .../serve_expired_cached_servfail_refresh.rpl | 145 ++++ .../stat_values.tdir/stat_values_cachedb.conf | 36 + .../stat_values_downstream_cookies.conf | 32 + contrib/unbound/testdata/subnet_cached_ede.crpl | 114 +++ .../unbound/testdata/subnet_global_prefetch.crpl | 236 +++++++ .../subnet_global_prefetch_always_forward.crpl | 167 +++++ .../testdata/subnet_global_prefetch_expired.crpl | 241 +++++++ contrib/unbound/testdata/subnet_prezero.crpl | 155 ++++ contrib/unbound/testdata/val_any_negcache.rpl | 243 +++++++ contrib/unbound/testdata/val_scrub_rr_length.rpl | 164 +++++ contrib/unbound/util/config_file.c | 163 +++-- contrib/unbound/util/config_file.h | 71 +- contrib/unbound/util/configlexer.lex | 18 +- contrib/unbound/util/configparser.y | 187 ++++- contrib/unbound/util/data/msgencode.c | 150 +++- contrib/unbound/util/data/msgencode.h | 42 +- contrib/unbound/util/data/msgparse.c | 123 +++- contrib/unbound/util/data/msgparse.h | 36 +- contrib/unbound/util/data/msgreply.c | 95 ++- contrib/unbound/util/data/msgreply.h | 30 +- contrib/unbound/util/edns.c | 59 ++ contrib/unbound/util/edns.h | 59 ++ contrib/unbound/util/fptr_wlist.c | 11 + contrib/unbound/util/iana_ports.inc | 4 + contrib/unbound/util/log.c | 2 +- contrib/unbound/util/module.c | 34 +- contrib/unbound/util/module.h | 24 +- contrib/unbound/util/net_help.c | 176 ++++- contrib/unbound/util/net_help.h | 41 ++ contrib/unbound/util/netevent.c | 425 +++++++---- contrib/unbound/util/netevent.h | 70 +- contrib/unbound/util/proxy_protocol.c | 162 +++-- contrib/unbound/util/proxy_protocol.h | 66 +- contrib/unbound/util/regional.c | 2 +- contrib/unbound/util/rfc_1982.c | 75 ++ contrib/unbound/util/rfc_1982.h | 63 ++ contrib/unbound/util/siphash.c | 192 +++++ contrib/unbound/util/siphash.h | 43 ++ contrib/unbound/util/storage/lruhash.c | 25 +- contrib/unbound/util/storage/lruhash.h | 5 +- contrib/unbound/util/storage/slabhash.c | 18 + contrib/unbound/util/storage/slabhash.h | 9 + contrib/unbound/util/timehist.c | 44 +- contrib/unbound/util/timeval_func.c | 113 +++ contrib/unbound/util/timeval_func.h | 53 ++ contrib/unbound/validator/autotrust.c | 2 + contrib/unbound/validator/val_anchor.c | 21 + contrib/unbound/validator/val_anchor.h | 8 + contrib/unbound/validator/val_kcache.c | 10 +- contrib/unbound/validator/val_kcache.h | 4 +- contrib/unbound/validator/val_kentry.c | 48 +- contrib/unbound/validator/val_kentry.h | 37 +- contrib/unbound/validator/val_neg.c | 7 +- contrib/unbound/validator/val_nsec.c | 20 +- contrib/unbound/validator/val_nsec.h | 5 +- contrib/unbound/validator/val_nsec3.c | 316 +++++++-- contrib/unbound/validator/val_nsec3.h | 60 +- contrib/unbound/validator/val_sigcrypt.c | 80 +-- contrib/unbound/validator/val_sigcrypt.h | 3 +- contrib/unbound/validator/val_utils.c | 41 +- contrib/unbound/validator/val_utils.h | 4 +- contrib/unbound/validator/validator.c | 645 +++++++++++++---- contrib/unbound/validator/validator.h | 18 + lib/libunbound/Makefile | 6 +- lib/libunbound/config.h | 6 +- 185 files changed, 11832 insertions(+), 2604 deletions(-) diff --git a/contrib/unbound/Makefile.in b/contrib/unbound/Makefile.in index bc021aa1eb00..22fb75c123bd 100644 --- a/contrib/unbound/Makefile.in +++ b/contrib/unbound/Makefile.in @@ -122,15 +122,15 @@ iterator/iter_delegpt.c iterator/iter_donotq.c iterator/iter_fwd.c \ iterator/iter_hints.c iterator/iter_priv.c iterator/iter_resptype.c \ iterator/iter_scrub.c iterator/iter_utils.c services/listen_dnsport.c \ services/localzone.c services/mesh.c services/modstack.c services/view.c \ -services/rpz.c \ +services/rpz.c util/rfc_1982.c \ services/outbound_list.c services/outside_network.c util/alloc.c \ util/config_file.c util/configlexer.c util/configparser.c \ util/shm_side/shm_main.c services/authzone.c \ util/fptr_wlist.c util/locks.c util/log.c util/mini_event.c util/module.c \ util/netevent.c util/net_help.c util/random.c util/rbtree.c util/regional.c \ -util/rtt.c util/edns.c util/storage/dnstree.c util/storage/lookup3.c \ +util/rtt.c util/siphash.c util/edns.c util/storage/dnstree.c util/storage/lookup3.c \ util/storage/lruhash.c util/storage/slabhash.c util/tcp_conn_limit.c \ -util/timehist.c util/tube.c util/proxy_protocol.c \ +util/timehist.c util/tube.c util/proxy_protocol.c util/timeval_func.c \ util/ub_event.c util/ub_event_pluggable.c util/winsock_event.c \ validator/autotrust.c validator/val_anchor.c validator/validator.c \ validator/val_kcache.c validator/val_kentry.c validator/val_neg.c \ @@ -145,14 +145,14 @@ as112.lo msgparse.lo msgreply.lo packed_rrset.lo iterator.lo iter_delegpt.lo \ iter_donotq.lo iter_fwd.lo iter_hints.lo iter_priv.lo iter_resptype.lo \ iter_scrub.lo iter_utils.lo localzone.lo mesh.lo modstack.lo view.lo \ outbound_list.lo alloc.lo config_file.lo configlexer.lo configparser.lo \ -fptr_wlist.lo edns.lo locks.lo log.lo mini_event.lo module.lo net_help.lo \ +fptr_wlist.lo siphash.lo edns.lo locks.lo log.lo mini_event.lo module.lo net_help.lo \ random.lo rbtree.lo regional.lo rtt.lo dnstree.lo lookup3.lo lruhash.lo \ slabhash.lo tcp_conn_limit.lo timehist.lo tube.lo winsock_event.lo \ -autotrust.lo val_anchor.lo rpz.lo proxy_protocol.lo \ +autotrust.lo val_anchor.lo rpz.lo rfc_1982.lo proxy_protocol.lo \ validator.lo val_kcache.lo val_kentry.lo val_neg.lo val_nsec3.lo val_nsec.lo \ val_secalgo.lo val_sigcrypt.lo val_utils.lo dns64.lo $(CACHEDB_OBJ) authzone.lo \ $(SUBNET_OBJ) $(PYTHONMOD_OBJ) $(CHECKLOCK_OBJ) $(DNSTAP_OBJ) $(DNSCRYPT_OBJ) \ -$(IPSECMOD_OBJ) $(IPSET_OBJ) $(DYNLIBMOD_OBJ) respip.lo +$(IPSECMOD_OBJ) $(IPSET_OBJ) $(DYNLIBMOD_OBJ) respip.lo timeval_func.lo COMMON_OBJ_WITHOUT_UB_EVENT=$(COMMON_OBJ_WITHOUT_NETCALL) netevent.lo listen_dnsport.lo \ outside_network.lo COMMON_OBJ=$(COMMON_OBJ_WITHOUT_UB_EVENT) ub_event.lo @@ -198,7 +198,7 @@ CHECKCONF_OBJ=unbound-checkconf.lo worker_cb.lo CHECKCONF_OBJ_LINK=$(CHECKCONF_OBJ) $(COMMON_OBJ_ALL_SYMBOLS) $(SLDNS_OBJ) \ $(COMPAT_OBJ) @WIN_CHECKCONF_OBJ_LINK@ CONTROL_SRC=smallapp/unbound-control.c -CONTROL_OBJ=unbound-control.lo +CONTROL_OBJ=unbound-control.lo CONTROL_OBJ_LINK=$(CONTROL_OBJ) worker_cb.lo $(COMMON_OBJ_ALL_SYMBOLS) \ $(SLDNS_OBJ) $(COMPAT_OBJ) @WIN_CONTROL_OBJ_LINK@ HOST_SRC=smallapp/unbound-host.c @@ -455,6 +455,7 @@ unbound-dnstap-socket.lo unbound-dnstap-socket.o: $(srcdir)/dnstap/unbound-dnsta dynlibmod.lo dynlibdmod.o: $(srcdir)/dynlibmod/dynlibmod.c config.h $(srcdir)/dynlibmod/dynlibmod.h cachedb.lo cachedb.o: $(srcdir)/cachedb/cachedb.c config.h $(srcdir)/cachedb/cachedb.h redis.lo redis.o: $(srcdir)/cachedb/redis.c config.h $(srcdir)/cachedb/redis.h +timeval_func.lo timeval_func.o: $(srcdir)/util/timeval_func.c $(srcdir)/util/timeval_func.h # dnscrypt dnscrypt.lo dnscrypt.o: $(srcdir)/dnscrypt/dnscrypt.c config.h \ @@ -498,6 +499,7 @@ util/configlexer.c: $(srcdir)/util/configlexer.lex util/configparser.h echo "#include \"util/configyyrename.h\"" >> $@ ;\ $(LEX) -t $(srcdir)/util/configlexer.lex >> $@ ;\ fi + @if test ! -f $@; then echo "No $@ : need flex and bison to compile from source repository"; exit 1; fi util/configparser.c util/configparser.h: $(srcdir)/util/configparser.y @-if test ! -d util; then $(INSTALL) -d util; fi @@ -516,7 +518,7 @@ distclean: clean rm -f doc/example.conf doc/libunbound.3 doc/unbound-anchor.8 doc/unbound-checkconf.8 doc/unbound-control.8 doc/unbound.8 doc/unbound.conf.5 doc/unbound-host.1 rm -f smallapp/unbound-control-setup.sh dnstap/dnstap_config.h dnscrypt/dnscrypt_config.h contrib/libunbound.pc contrib/unbound.socket contrib/unbound.service rm -f $(TEST_BIN) - rm -f Makefile + rm -f Makefile maintainer-clean: distclean rm -f util/configlexer.c util/configparser.c util/configparser.h @@ -649,7 +651,7 @@ uninstall: $(PYTHONMOD_UNINSTALL) $(PYUNBOUND_UNINSTALL) $(UNBOUND_EVENT_UNINSTA iana_update: curl -o port-numbers.tmp https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xml --compressed - if file port-numbers.tmp | grep 'gzip' >/dev/null; then zcat port-numbers.tmp; else cat port-numbers.tmp; fi | awk '// {p=0;} /udp/ {p=1;} /[^u]/ {p=0;} /Decomissioned|Decommissioned|Removed|De-registered|unassigned|Unassigned|Reserved/ {u=1;} // { if(u==1) {u=0;} else { if(p==1) { match($$0,/[0-9]+/); print substr($$0, RSTART, RLENGTH) ","}}}' | sort -nu > util/iana_ports.inc + if file port-numbers.tmp | grep 'gzip' >/dev/null; then zcat port-numbers.tmp; else cat port-numbers.tmp; fi | awk '// {p=0;} /udp/ {p=1;} /[^u]/ {p=0;} /Decomissioned|Decommissioned|Removed|De-registered|unassigned|Unassigned|Reserved/ {u=1;} // { if(u==1) {u=0;} else { if(p==1) { match($$0,/[0-9]+/); print substr($$0, RSTART, RLENGTH) ","}}}' | sort -nu > util/iana_ports.inc rm -f port-numbers.tmp # dependency generation @@ -736,7 +738,7 @@ msgencode.lo msgencode.o: $(srcdir)/util/data/msgencode.c config.h $(srcdir)/uti msgparse.lo msgparse.o: $(srcdir)/util/data/msgparse.c config.h $(srcdir)/util/data/msgparse.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/sldns/pkthdr.h \ $(srcdir)/sldns/rrdef.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ - $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lookup3.h $(srcdir)/util/regional.h $(srcdir)/sldns/sbuffer.h \ + $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lookup3.h $(srcdir)/util/regional.h $(srcdir)/util/net_help.h $(srcdir)/sldns/sbuffer.h \ $(srcdir)/sldns/parseutil.h $(srcdir)/sldns/wire2str.h msgreply.lo msgreply.o: $(srcdir)/util/data/msgreply.c config.h $(srcdir)/util/data/msgreply.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/packed_rrset.h \ @@ -791,7 +793,7 @@ iter_priv.lo iter_priv.o: $(srcdir)/iterator/iter_priv.c config.h $(srcdir)/iter $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/net_help.h \ $(srcdir)/util/storage/dnstree.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/sbuffer.h iter_resptype.lo iter_resptype.o: $(srcdir)/iterator/iter_resptype.c config.h \ - $(srcdir)/iterator/iter_resptype.h $(srcdir)/iterator/iter_delegpt.h $(srcdir)/util/log.h \ + $(srcdir)/iterator/iter_resptype.h $(srcdir)/iterator/iter_delegpt.h $(srcdir)/iterator/iterator.h $(srcdir)/util/log.h \ $(srcdir)/services/cache/dns.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/net_help.h \ $(srcdir)/util/data/dname.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/pkthdr.h @@ -877,7 +879,7 @@ rpz.lo rpz.o: $(srcdir)/services/rpz.c config.h $(srcdir)/services/rpz.h $(srcdi outbound_list.lo outbound_list.o: $(srcdir)/services/outbound_list.c config.h \ $(srcdir)/services/outbound_list.h $(srcdir)/services/outside_network.h $(srcdir)/util/rbtree.h \ $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - + outside_network.lo outside_network.o: $(srcdir)/services/outside_network.c config.h \ $(srcdir)/services/outside_network.h $(srcdir)/util/rbtree.h $(srcdir)/util/netevent.h \ $(srcdir)/dnscrypt/dnscrypt.h \ @@ -915,7 +917,8 @@ config_file.lo config_file.o: $(srcdir)/util/config_file.c config.h $(srcdir)/ut configlexer.lo configlexer.o: util/configlexer.c config.h $(srcdir)/util/configyyrename.h \ $(srcdir)/util/config_file.h util/configparser.h configparser.lo configparser.o: util/configparser.c config.h $(srcdir)/util/configyyrename.h \ - $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/util/log.h + $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/util/log.h $(srcdir)/sldns/str2wire.h \ + $(srcdir)/sldns/rrdef.h shm_main.lo shm_main.o: $(srcdir)/util/shm_side/shm_main.c config.h $(srcdir)/util/shm_side/shm_main.h \ $(srcdir)/libunbound/unbound.h $(srcdir)/daemon/daemon.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h \ @@ -928,7 +931,7 @@ shm_main.lo shm_main.o: $(srcdir)/util/shm_side/shm_main.c config.h $(srcdir)/ut $(srcdir)/services/view.h $(srcdir)/util/config_file.h $(srcdir)/services/authzone.h $(srcdir)/respip/respip.h \ $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/infra.h \ $(srcdir)/util/rtt.h $(srcdir)/validator/validator.h $(srcdir)/validator/val_utils.h $(srcdir)/util/fptr_wlist.h \ - $(srcdir)/util/tube.h + $(srcdir)/util/tube.h $(srcdir)/util/timeval_func.h authzone.lo authzone.o: $(srcdir)/services/authzone.c config.h $(srcdir)/services/authzone.h \ $(srcdir)/util/rbtree.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/services/mesh.h $(srcdir)/util/netevent.h \ $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/util/data/msgparse.h \ @@ -983,7 +986,7 @@ netevent.lo netevent.o: $(srcdir)/util/netevent.c config.h $(srcdir)/util/neteve $(srcdir)/services/modstack.h $(srcdir)/services/rpz.h $(srcdir)/services/localzone.h $(srcdir)/services/view.h \ $(srcdir)/sldns/sbuffer.h $(srcdir)/util/config_file.h $(srcdir)/services/authzone.h $(srcdir)/daemon/stats.h \ $(srcdir)/util/timehist.h $(srcdir)/libunbound/unbound.h $(srcdir)/respip/respip.h $(srcdir)/sldns/str2wire.h \ - $(srcdir)/dnstap/dnstap.h $(srcdir)/services/listen_dnsport.h + $(srcdir)/dnstap/dnstap.h $(srcdir)/services/listen_dnsport.h $(srcdir)/util/timeval_func.h proxy_protocol.lo proxy_protocol.o: $(srcdir)/util/proxy_protocol.c config.h \ $(srcdir)/util/proxy_protocol.h $(srcdir)/sldns/sbuffer.h net_help.lo net_help.o: $(srcdir)/util/net_help.c config.h $(srcdir)/util/net_help.h $(srcdir)/util/log.h \ @@ -1006,6 +1009,8 @@ rtt.lo rtt.o: $(srcdir)/util/rtt.c config.h $(srcdir)/util/rtt.h $(srcdir)/itera $(srcdir)/services/outbound_list.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/module.h \ $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h +siphash.lo siphash.o: $(srcdir)/util/siphash.c +rfc_1982.lo rfc_1982.o: $(srcdir)/util/rfc_1982.c edns.lo edns.o: $(srcdir)/util/edns.c config.h $(srcdir)/util/edns.h $(srcdir)/util/storage/dnstree.h \ $(srcdir)/util/rbtree.h $(srcdir)/util/config_file.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ $(srcdir)/util/net_help.h $(srcdir)/util/log.h $(srcdir)/util/regional.h \ @@ -1186,7 +1191,7 @@ unitmain.lo unitmain.o: $(srcdir)/testcode/unitmain.c config.h $(srcdir)/sldns/r $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ $(srcdir)/util/random.h $(srcdir)/respip/respip.h \ $(srcdir)/services/localzone.h $(srcdir)/services/view.h $(srcdir)/sldns/sbuffer.h \ - $(srcdir)/services/outside_network.h + $(srcdir)/services/outside_network.h unitmsgparse.lo unitmsgparse.o: $(srcdir)/testcode/unitmsgparse.c config.h $(srcdir)/util/log.h \ $(srcdir)/testcode/unitmain.h $(srcdir)/util/data/msgparse.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/locks.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/data/msgreply.h \ @@ -1321,7 +1326,7 @@ unbound.lo unbound.o: $(srcdir)/daemon/unbound.c config.h $(srcdir)/util/log.h $ worker.lo worker.o: $(srcdir)/daemon/worker.c config.h $(srcdir)/util/log.h $(srcdir)/util/net_help.h \ $(srcdir)/util/random.h $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ - $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ + $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/util/timeval_func.h \ $(srcdir)/util/alloc.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ $(srcdir)/sldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/libunbound/unbound.h \ $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/daemon.h \ @@ -1343,7 +1348,7 @@ testbound.lo testbound.o: $(srcdir)/testcode/testbound.c config.h $(srcdir)/test $(srcdir)/daemon/remote.h $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/config_file.h $(srcdir)/sldns/keyraw.h $(srcdir)/daemon/unbound.c $(srcdir)/daemon/daemon.h \ - $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h \ + $(srcdir)/util/alloc.h $(srcdir)/util/timeval_func.h $(srcdir)/services/modstack.h \ $(srcdir)/util/storage/slabhash.h $(srcdir)/services/listen_dnsport.h $(srcdir)/services/cache/rrset.h \ $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rtt.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/module.h \ @@ -1357,7 +1362,7 @@ testpkts.lo testpkts.o: $(srcdir)/testcode/testpkts.c config.h $(srcdir)/testcod worker.lo worker.o: $(srcdir)/daemon/worker.c config.h $(srcdir)/util/log.h $(srcdir)/util/net_help.h \ $(srcdir)/util/random.h $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ - $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ + $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/util/timeval_func.h \ $(srcdir)/util/alloc.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ $(srcdir)/sldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/libunbound/unbound.h \ $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/daemon.h \ @@ -1409,7 +1414,7 @@ stats.lo stats.o: $(srcdir)/daemon/stats.c config.h $(srcdir)/daemon/stats.h $(s $(srcdir)/validator/val_kcache.h $(srcdir)/validator/val_neg.h replay.lo replay.o: $(srcdir)/testcode/replay.c config.h $(srcdir)/util/log.h $(srcdir)/util/net_help.h \ $(srcdir)/util/config_file.h $(srcdir)/testcode/replay.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/testcode/testpkts.h $(srcdir)/util/rbtree.h \ + $(srcdir)/testcode/testpkts.h $(srcdir)/util/rbtree.h $(srcdir)/util/timeval_func.h \ $(srcdir)/testcode/fake_event.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/rrdef.h fake_event.lo fake_event.o: $(srcdir)/testcode/fake_event.c config.h $(srcdir)/testcode/fake_event.h \ $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ @@ -1417,7 +1422,7 @@ fake_event.lo fake_event.o: $(srcdir)/testcode/fake_event.c config.h $(srcdir)/t $(srcdir)/util/locks.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/data/msgreply.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgencode.h $(srcdir)/util/data/dname.h \ $(srcdir)/util/edns.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/config_file.h \ - $(srcdir)/services/listen_dnsport.h $(srcdir)/services/outside_network.h \ + $(srcdir)/services/listen_dnsport.h $(srcdir)/services/outside_network.h $(srcdir)/util/timeval_func.h \ $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h \ $(srcdir)/testcode/replay.h $(srcdir)/testcode/testpkts.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/module.h \ $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h $(srcdir)/services/rpz.h \ diff --git a/contrib/unbound/README.md b/contrib/unbound/README.md index c3d9bc2492ef..3bbd38b3b78b 100644 --- a/contrib/unbound/README.md +++ b/contrib/unbound/README.md @@ -1,6 +1,6 @@ # Unbound -[![Travis Build Status](https://travis-ci.org/NLnetLabs/unbound.svg?branch=master)](https://travis-ci.org/NLnetLabs/unbound) +[![Github Build Status](https://github.com/NLnetLabs/unbound/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/NLnetLabs/unbound/actions) [![Packaging status](https://repology.org/badge/tiny-repos/unbound.svg)](https://repology.org/project/unbound/versions) [![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/unbound.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:unbound) [![Documentation Status](https://readthedocs.org/projects/unbound/badge/?version=latest)](https://unbound.readthedocs.io/en/latest/?badge=latest) @@ -17,7 +17,9 @@ You can learn more about Unbound by reading our ## Compiling Make sure you have the C toolchain, OpenSSL and its include files, and libexpat -installed. Unbound can be compiled and installed using: +installed. +If building from the repository source you also need flex and bison installed. +Unbound can be compiled and installed using: ``` ./configure && make && make install @@ -27,7 +29,7 @@ You can use libevent if you want. libevent is useful when using many (10000) outgoing ports. By default max 256 ports are opened at the same time and the builtin alternative is equally capable and a little faster. -Use the `--with-libevent=dir` configure option to compile Unbound with libevent +Use the `--with-libevent` configure option to compile Unbound with libevent support. ## Unbound configuration diff --git a/contrib/unbound/acx_nlnetlabs.m4 b/contrib/unbound/acx_nlnetlabs.m4 index cf436ec54bb6..f27615bd8bce 100644 --- a/contrib/unbound/acx_nlnetlabs.m4 +++ b/contrib/unbound/acx_nlnetlabs.m4 @@ -2,7 +2,9 @@ # Copyright 2009, Wouter Wijngaards, NLnet Labs. # BSD licensed. # -# Version 44 +# Version 46 +# 2023-05-04 fix to remove unused whitespace. +# 2023-01-26 fix -Wstrict-prototypes. # 2022-09-01 fix checking if nonblocking sockets work on OpenBSD. # 2021-08-17 fix sed script in ssldir split handling. # 2021-08-17 fix for openssl to detect split version, with ssldir_include @@ -187,7 +189,7 @@ dnl cache=`echo $1 | sed 'y%.=/+- %___p__%'` AC_CACHE_VAL(cv_prog_cc_flag_needed_$cache, [ echo '$2' > conftest.c -echo 'void f(){}' >>conftest.c +echo 'void f(void){}' >>conftest.c if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then eval "cv_prog_cc_flag_needed_$cache=no" else @@ -233,7 +235,7 @@ dnl DEPFLAG: set to flag that generates dependencies. AC_DEFUN([ACX_DEPFLAG], [ AC_MSG_CHECKING([$CC dependency flag]) -echo 'void f(){}' >conftest.c +echo 'void f(void){}' >conftest.c if test "`$CC -MM conftest.c 2>&1`" = "conftest.o: conftest.c"; then DEPFLAG="-MM" else @@ -272,7 +274,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED($C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAUL #include #endif -int test() { +int test(void) { int a; char **opts = NULL; struct timeval tv; @@ -309,7 +311,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED($C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAUL #include #endif -int test() { +int test(void) { int a; char **opts = NULL; struct timeval tv; @@ -335,7 +337,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED($C99FLAG, [ #include #include -int test() { +int test(void) { int a = 0; return a; } @@ -345,7 +347,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D_BSD_SOURCE -D_DEFAULT_SOURCE, [ #include -int test() { +int test(void) { int a; a = isascii(32); return a; @@ -356,7 +358,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D_GNU_SOURCE, [ #include -int test() { +int test(void) { struct in6_pktinfo inf; int a = (int)sizeof(inf); return a; @@ -370,7 +372,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D_GNU_SOURCE -D_FRSRESGID, [ #include -int test() { +int test(void) { int a = setresgid(0,0,0); a = setresuid(0,0,0); return a; @@ -385,7 +387,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D_POSIX_C_SOURCE=200112, #endif #include -int test() { +int test(void) { int a = 0; char *t; time_t time = 0; @@ -413,7 +415,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D__EXTENSIONS__, #include #endif -int test() { +int test(void) { int a; char **opts = NULL; struct timeval tv; @@ -475,7 +477,7 @@ fi dnl Setup ATTR_FORMAT config.h parts. dnl make sure you call ACX_CHECK_FORMAT_ATTRIBUTE also. AC_DEFUN([AHX_CONFIG_FORMAT_ATTRIBUTE], -[ +[ #ifdef HAVE_ATTR_FORMAT # define ATTR_FORMAT(archetype, string_index, first_to_check) \ __attribute__ ((format (archetype, string_index, first_to_check))) @@ -834,7 +836,7 @@ dnl try to see if an additional _LARGEFILE_SOURCE 1 is needed to get fseeko ACX_CHECK_COMPILER_FLAG_NEEDED(-D_LARGEFILE_SOURCE=1, [ #include -int test() { +int test(void) { int a = fseeko(stdin, 0, 0); return a; } @@ -859,7 +861,7 @@ char* (*f) () = getaddrinfo; #ifdef __cplusplus } #endif -int main() { +int main(void) { ; return 0; } @@ -923,7 +925,7 @@ cache=`echo $1 | sed 'y%.=/+-%___p_%'` AC_CACHE_VAL(cv_cc_deprecated_$cache, [ echo '$3' >conftest.c -echo 'void f(){ $2 }' >>conftest.c +echo 'void f(void){ $2 }' >>conftest.c if test -z "`$CC $CPPFLAGS $CFLAGS -c conftest.c 2>&1 | grep -e deprecated -e unavailable`"; then eval "cv_cc_deprecated_$cache=no" else @@ -1317,7 +1319,7 @@ AC_DEFUN([AHX_CONFIG_W32_FD_SET_T], #ifdef HAVE_WINSOCK2_H #define FD_SET_T (u_int) #else -#define FD_SET_T +#define FD_SET_T #endif ]) @@ -1355,7 +1357,7 @@ dnl $3: define value, 1 AC_DEFUN([AHX_CONFIG_FLAG_OMITTED], [#if defined($1) && !defined($2) #define $2 $3 -[#]endif ]) +[#]endif]) dnl Wrapper for AHX_CONFIG_FLAG_OMITTED for -D style flags dnl $1: the -DNAME or -DNAME=value string. diff --git a/contrib/unbound/acx_python.m4 b/contrib/unbound/acx_python.m4 index 16c0c6fd943f..c945d6c8989e 100644 --- a/contrib/unbound/acx_python.m4 +++ b/contrib/unbound/acx_python.m4 @@ -17,33 +17,62 @@ AC_DEFUN([AC_PYTHON_DEVEL],[ PYTHON_VERSION=`$PYTHON -c "import sys; \ print(sys.version.split()[[0]])"` fi + # calculate the version number components. + [ + v="$PYTHON_VERSION" + PYTHON_VERSION_MAJOR=`echo $v | sed 's/[^0-9].*//'` + if test -z "$PYTHON_VERSION_MAJOR"; then PYTHON_VERSION_MAJOR="0"; fi + v=`echo $v | sed -e 's/^[0-9]*$//' -e 's/[0-9]*[^0-9]//'` + PYTHON_VERSION_MINOR=`echo $v | sed 's/[^0-9].*//'` + if test -z "$PYTHON_VERSION_MINOR"; then PYTHON_VERSION_MINOR="0"; fi + v=`echo $v | sed -e 's/^[0-9]*$//' -e 's/[0-9]*[^0-9]//'` + PYTHON_VERSION_PATCH=`echo $v | sed 's/[^0-9].*//'` + if test -z "$PYTHON_VERSION_PATCH"; then PYTHON_VERSION_PATCH="0"; fi + ] - # Check if you have sysconfig - AC_MSG_CHECKING([for the sysconfig Python module]) - if ac_sysconfig_result=`$PYTHON -c "import sysconfig" 2>&1`; then + # For some systems, sysconfig exists, but has the wrong paths, + # on Debian 10, for python 2.7 and 3.7. So, we check the version, + # and for older versions try distutils.sysconfig first. For newer + # versions>=3.10, where distutils.sysconfig is deprecated, use + # sysconfig first and then attempt the other one. + py_distutils_first="no" + if test $PYTHON_VERSION_MAJOR -lt 3; then + py_distutils_first="yes" + fi + if test $PYTHON_VERSION_MAJOR -eq 3 -a $PYTHON_VERSION_MINOR -lt 10; then + py_distutils_first="yes" + fi + + # Check if you have the first module + if test "$py_distutils_first" = "yes"; then m="distutils"; else m="sysconfig"; fi + sysconfig_module="" + AC_MSG_CHECKING([for the $m Python module]) + if ac_modulecheck_result1=`$PYTHON -c "import $m" 2>&1`; then AC_MSG_RESULT([yes]) - sysconfig_module="sysconfig" - # if yes, use sysconfig, because distutils is deprecated. + sysconfig_module="$m" else AC_MSG_RESULT([no]) - # if no, try to use distutils + fi - # - # Check if you have distutils, else fail - # - AC_MSG_CHECKING([for the distutils Python package]) - if ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`; then + # if not found, try the other one. + if test -z "$sysconfig_module"; then + if test "$py_distutils_first" = "yes"; then m2="sysconfig"; else m2="distutils"; fi + AC_MSG_CHECKING([for the $m2 Python module]) + if ac_modulecheck_result2=`$PYTHON -c "import $m2" 2>&1`; then AC_MSG_RESULT([yes]) + sysconfig_module="$m2" else AC_MSG_RESULT([no]) - AC_MSG_ERROR([cannot import Python module "distutils". - Please check your Python installation. The error was: - $ac_distutils_result]) + AC_MSG_ERROR([cannot import Python module "$m", or "$m2". + Please check your Python installation. The errors are: + $m + $ac_modulecheck_result1 + $m2 + $ac_modulecheck_result2]) PYTHON_VERSION="" fi - - sysconfig_module="distutils.sysconfig" fi + if test "$sysconfig_module" = "distutils"; then sysconfig_module="distutils.sysconfig"; fi # # Check for Python include path diff --git a/contrib/unbound/cachedb/cachedb.c b/contrib/unbound/cachedb/cachedb.c index 245daa986967..b912be8ed54f 100644 --- a/contrib/unbound/cachedb/cachedb.c +++ b/contrib/unbound/cachedb/cachedb.c @@ -102,7 +102,6 @@ static int testframe_init(struct module_env* env, struct cachedb_env* cachedb_env) { struct testframe_moddata* d; - (void)env; verbose(VERB_ALGO, "testframe_init"); d = (struct testframe_moddata*)calloc(1, sizeof(struct testframe_moddata)); @@ -111,6 +110,15 @@ testframe_init(struct module_env* env, struct cachedb_env* cachedb_env) log_err("out of memory"); return 0; } + /* Register an EDNS option (65534) to bypass the worker cache lookup + * for testing */ + if(!edns_register_option(LDNS_EDNS_UNBOUND_CACHEDB_TESTFRAME_TEST, + 1 /* bypass cache */, + 0 /* no aggregation */, env)) { + log_err("testframe_init, could not register test opcode"); + free(d); + return 0; + } lock_basic_init(&d->lock); lock_protect(&d->lock, d, sizeof(*d)); return 1; @@ -218,6 +226,8 @@ static int cachedb_apply_cfg(struct cachedb_env* cachedb_env, struct config_file* cfg) { const char* backend_str = cfg->cachedb_backend; + if(!backend_str || *backend_str==0) + return 1; cachedb_env->backend = cachedb_find_backend(backend_str); if(!cachedb_env->backend) { log_err("cachedb: cannot find backend name '%s'", backend_str); @@ -228,7 +238,7 @@ cachedb_apply_cfg(struct cachedb_env* cachedb_env, struct config_file* cfg) return 1; } -int +int cachedb_init(struct module_env* env, int id) { struct cachedb_env* cachedb_env = (struct cachedb_env*)calloc(1, @@ -255,11 +265,11 @@ cachedb_init(struct module_env* env, int id) return 0; } cachedb_env->enabled = 1; - if(env->cfg->serve_expired_reply_ttl) + if(env->cfg->serve_expired && env->cfg->serve_expired_reply_ttl) log_warn( "cachedb: serve-expired-reply-ttl is set but not working for data " - "originating from the external cache; 0 TLL is used for those."); - if(env->cfg->serve_expired_client_timeout) + "originating from the external cache; 0 TTL is used for those."); + if(env->cfg->serve_expired && env->cfg->serve_expired_client_timeout) log_warn( "cachedb: serve-expired-client-timeout is set but not working for " "data originating from the external cache; expired data are used " @@ -267,19 +277,16 @@ cachedb_init(struct module_env* env, int id) return 1; } -void +void cachedb_deinit(struct module_env* env, int id) { struct cachedb_env* cachedb_env; if(!env || !env->modinfo[id]) return; cachedb_env = (struct cachedb_env*)env->modinfo[id]; - /* free contents */ - /* TODO */ if(cachedb_env->enabled) { (*cachedb_env->backend->deinit)(env, cachedb_env); } - free(cachedb_env); env->modinfo[id] = NULL; } @@ -406,6 +413,14 @@ prep_data(struct module_qstate* qstate, struct sldns_buffer* buf) if(qstate->return_msg->rep->ttl == 0 && !qstate->env->cfg->serve_expired) return 0; + + /* The EDE is added to the out-list so it is encoded in the cached message */ + if (qstate->env->cfg->ede && qstate->return_msg->rep->reason_bogus != LDNS_EDE_NONE) { + edns_opt_list_append_ede(&edns.opt_list_out, qstate->env->scratch, + qstate->return_msg->rep->reason_bogus, + qstate->return_msg->rep->reason_bogus_str); + } + if(verbosity >= VERB_ALGO) log_dns_msg("cachedb encoding", &qstate->return_msg->qinfo, qstate->return_msg->rep); @@ -502,6 +517,7 @@ parse_data(struct module_qstate* qstate, struct sldns_buffer* buf) { struct msg_parse* prs; struct edns_data edns; + struct edns_option* ede; uint64_t timestamp, expiry; time_t adjust; size_t lim = sldns_buffer_limit(buf); @@ -539,6 +555,24 @@ parse_data(struct module_qstate* qstate, struct sldns_buffer* buf) if(!qstate->return_msg) return 0; + /* We find the EDE in the in-list after parsing */ + if(qstate->env->cfg->ede && + (ede = edns_opt_list_find(edns.opt_list_in, LDNS_EDNS_EDE))) { + if(ede->opt_len >= 2) { + qstate->return_msg->rep->reason_bogus = + sldns_read_uint16(ede->opt_data); + } + /* allocate space and store the error string and it's size */ + if(ede->opt_len > 2) { + size_t ede_len = ede->opt_len - 2; + qstate->return_msg->rep->reason_bogus_str = regional_alloc( + qstate->region, sizeof(char) * (ede_len+1)); + memcpy(qstate->return_msg->rep->reason_bogus_str, + ede->opt_data+2, ede_len); + qstate->return_msg->rep->reason_bogus_str[ede_len] = 0; + } + } + qstate->return_rcode = LDNS_RCODE_NOERROR; /* see how much of the TTL expired, and remove it */ @@ -630,11 +664,15 @@ cachedb_extcache_store(struct module_qstate* qstate, struct cachedb_env* ie) * See if unbound's internal cache can answer the query */ static int -cachedb_intcache_lookup(struct module_qstate* qstate) +cachedb_intcache_lookup(struct module_qstate* qstate, struct cachedb_env* cde) { uint8_t* dpname=NULL; size_t dpnamelen=0; struct dns_msg* msg; + /* for testframe bypass this lookup */ + if(cde->backend == &testframe_backend) { + return 0; + } if(iter_stub_fwd_no_cache(qstate, &qstate->qinfo, &dpname, &dpnamelen)) return 0; /* no cache for these queries */ @@ -693,6 +731,7 @@ cachedb_handle_query(struct module_qstate* qstate, struct cachedb_qstate* ATTR_UNUSED(iq), struct cachedb_env* ie, int id) { + qstate->is_cachedb_answer = 0; /* check if we are enabled, and skip if so */ if(!ie->enabled) { /* pass request to next module */ @@ -709,7 +748,7 @@ cachedb_handle_query(struct module_qstate* qstate, /* lookup inside unbound's internal cache. * This does not look for expired entries. */ - if(cachedb_intcache_lookup(qstate)) { + if(cachedb_intcache_lookup(qstate, ie)) { if(verbosity >= VERB_ALGO) { if(qstate->return_msg->rep) log_dns_msg("cachedb internal cache lookup", @@ -746,6 +785,7 @@ cachedb_handle_query(struct module_qstate* qstate, qstate->ext_state[id] = module_wait_module; return; } + qstate->is_cachedb_answer = 1; /* we are done with the query */ qstate->ext_state[id] = module_finished; return; @@ -768,12 +808,18 @@ static void cachedb_handle_response(struct module_qstate* qstate, struct cachedb_qstate* ATTR_UNUSED(iq), struct cachedb_env* ie, int id) { + qstate->is_cachedb_answer = 0; /* check if we are not enabled or instructed to not cache, and skip */ if(!ie->enabled || qstate->no_cache_store) { /* we are done with the query */ qstate->ext_state[id] = module_finished; return; } + if(qstate->env->cfg->cachedb_no_store) { + /* do not store the item in the external cache */ + qstate->ext_state[id] = module_finished; + return; + } /* store the item into the backend cache */ cachedb_extcache_store(qstate, ie); diff --git a/contrib/unbound/cachedb/redis.c b/contrib/unbound/cachedb/redis.c index 16c3741f786b..6cc975901df2 100644 --- a/contrib/unbound/cachedb/redis.c +++ b/contrib/unbound/cachedb/redis.c @@ -56,19 +56,43 @@ struct redis_moddata { int numctxs; /* number of ctx entries */ const char* server_host; /* server's IP address or host name */ int server_port; /* server's TCP port */ + const char* server_path; /* server's unix path, or "", NULL if unused */ + const char* server_password; /* server's AUTH password, or "", NULL if unused */ struct timeval timeout; /* timeout for connection setup and commands */ + int logical_db; /* the redis logical database to use */ }; static redisReply* redis_command(struct module_env*, struct cachedb_env*, const char*, const uint8_t*, size_t); +static void +moddata_clean(struct redis_moddata** moddata) { + if(!moddata || !*moddata) + return; + if((*moddata)->ctxs) { + int i; + for(i = 0; i < (*moddata)->numctxs; i++) { + if((*moddata)->ctxs[i]) + redisFree((*moddata)->ctxs[i]); + } + free((*moddata)->ctxs); + } + free(*moddata); + *moddata = NULL; +} + static redisContext* redis_connect(const struct redis_moddata* moddata) { redisContext* ctx; - ctx = redisConnectWithTimeout(moddata->server_host, - moddata->server_port, moddata->timeout); + if(moddata->server_path && moddata->server_path[0]!=0) { + ctx = redisConnectUnixWithTimeout(moddata->server_path, + moddata->timeout); + } else { + ctx = redisConnectWithTimeout(moddata->server_host, + moddata->server_port, moddata->timeout); + } if(!ctx || ctx->err) { const char *errstr = "out of memory"; if(ctx) @@ -80,9 +104,31 @@ redis_connect(const struct redis_moddata* moddata) log_err("failed to set redis timeout"); goto fail; } + if(moddata->server_password && moddata->server_password[0]!=0) { + redisReply* rep; + rep = redisCommand(ctx, "AUTH %s", moddata->server_password); + if(!rep || rep->type == REDIS_REPLY_ERROR) { + log_err("failed to authenticate with password"); + freeReplyObject(rep); + goto fail; + } + freeReplyObject(rep); + } + if(moddata->logical_db > 0) { + redisReply* rep; + rep = redisCommand(ctx, "SELECT %d", moddata->logical_db); + if(!rep || rep->type == REDIS_REPLY_ERROR) { + log_err("failed to set logical database (%d)", + moddata->logical_db); + freeReplyObject(rep); + goto fail; + } + freeReplyObject(rep); + } + verbose(VERB_OPS, "Connection to Redis established"); return ctx; - fail: +fail: if(ctx) redisFree(ctx); return NULL; @@ -94,28 +140,36 @@ redis_init(struct module_env* env, struct cachedb_env* cachedb_env) int i; struct redis_moddata* moddata = NULL; - verbose(VERB_ALGO, "redis_init"); + verbose(VERB_OPS, "Redis initialization"); moddata = calloc(1, sizeof(struct redis_moddata)); if(!moddata) { log_err("out of memory"); - return 0; + goto fail; } moddata->numctxs = env->cfg->num_threads; moddata->ctxs = calloc(env->cfg->num_threads, sizeof(redisContext*)); *** 24570 LINES SKIPPED *** From nobody Thu Mar 28 05:06:28 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V4s2X4XQ2z5GClG; Thu, 28 Mar 2024 05:06: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 4V4s2X3bcSz4VP5; Thu, 28 Mar 2024 05:06:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711602388; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8+4iXLB7/bSGlSW8JZ+8IFL0qVwTS/ZmLfpcS8MeqhY=; b=VWxoVvGkLwcNKzoRa9LIwU6WUWT0JXTgIqRii1dioxUpBcFTovfYMNILU+m0cFcc3X7fYl oU8UFFDjLZBMPICUnF6qT0u/ZgZttUM8QVtfigxe4q/gBe/kAIK097lWSeKweCbQCI8z4Q ABlWPSfUK2LUqRHgQP1qG9wFt6qynmXO24Jv+LYzFlxCXLLG2/FLOB2eu7KWCMKNzF5nrS GGrOBAFwrgiZ0sbG/dEk97VNpu5VKCTECgh9vVqYfNsZ0Dafxm8Cytn+zDhBeF5zeNakRV CXm7wl7zzoGKEgollKpoULX7EDUvd6y+SiUgPyTpbZtVjDcDZGwz4311a4sUig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711602388; a=rsa-sha256; cv=none; b=xpai1+keP/2bYf4a/vR8jplLs8k/ooQlVliAB5kc/QKmwd2hLSVG6jjRYct4o1LqY1Pts4 w2NRoJIS+yJ3sXu6KVyTpRwsz3QJ4zT3VJ/UAwA0d/dzEGgN9vnrc44tUI0qQwUzuQqrsm 4E/5Tr1Ztsi4u5n2cuKlRHmi7bOe/7uCV1F3xW/Nv8bbkszV/2ZnsCrHBFZ0HeKmtSHZLu PLAk3hBN/jffCiQRk5+Sz9w8Ka4jWLn/HmEuuHtIevKuN/vFz+sjfqtYnTzVlGOpL5wZ7Y DrwWlIoLci/p2d97qlOWxFnf9hJFPSVpgRO8e4ADCHVujlEFr+VxJ5HOF8MzlQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711602388; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8+4iXLB7/bSGlSW8JZ+8IFL0qVwTS/ZmLfpcS8MeqhY=; b=IgPmFYSF7VfQwjwaVtXXk1QMzDNeSDj0yIFYpBF/KacdNzH+QNfoW2ZDzIpt4v0xA+Bu0w l8prjg8uYy/ce8DGEM5dRvTXJcQ+5+arHkBKOlxV3aNejNiyQhMH09NUu7jLk3kmy3xmZ4 VNOsbpkG8YD/9/ehV/K/CScFuD3PNjD3MMU5+0qEvSaCXKN5JOHPaBKX/ddPkcCR3+qnyX rkoeC3Zd+ZqPMRNQ2Y6dnZ7sxR+/8ECfHng+HnHzmhqfvdGUT3zGChFzH0ED0XD2ybH9+K S891c1cnMd15h8trJRzKXpp5TryJZZEdZzTUNZ3/e48rZtvZcCT45VFcngWSlQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V4s2X3CQMz1CjL; Thu, 28 Mar 2024 05:06:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42S56SNA099279; Thu, 28 Mar 2024 05:06:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42S56S29099276; Thu, 28 Mar 2024 05:06:28 GMT (envelope-from git) Date: Thu, 28 Mar 2024 05:06:28 GMT Message-Id: <202403280506.42S56S29099276@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Tetlow Subject: git: d338712beb16 - releng/14.0 - Add UPDATING entries and bump the branch version. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gordon X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: d338712beb16ad7740bbd00bd93299a131a68045 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by gordon: URL: https://cgit.FreeBSD.org/src/commit/?id=d338712beb16ad7740bbd00bd93299a131a68045 commit d338712beb16ad7740bbd00bd93299a131a68045 Author: Gordon Tetlow AuthorDate: 2024-03-28 04:23:44 +0000 Commit: Gordon Tetlow CommitDate: 2024-03-28 05:00:30 +0000 Add UPDATING entries and bump the branch version. Approved by: so --- UPDATING | 17 +++++++++++++++++ sys/conf/newvers.sh | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index 4e5a23c56f86..8a24e55cb4b9 100644 --- a/UPDATING +++ b/UPDATING @@ -12,6 +12,23 @@ Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before updating system packages and/or ports. +20240327: + 14.0-RELEASE-p6 SA-24:03.unbound + EN-24:05.tty + EN-24:06.wireguard + EN-24:07.clang + EN-24:07.kerberos + + Fix multiple vulnerabilities in unbound [SA-24:03.unbound] + + Fix tty kernel panic [EN-24:05.tty] + + Fix insufficient barriers in WireGuard if_wg(4) [EN-24:06.wireguard] + + Fix clang crash when certain optimization is enabled [EN-24:07.clang] + + Fix kerberos segfaults when using weak crypto [EN-24:08.kerberos] + 20240214: 14.0-RELEASE-p5 SA-24:01.bhyveload SA-24:02.tty diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 7ab4dca5f67f..02f705ccc64a 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -53,7 +53,7 @@ TYPE="FreeBSD" REVISION="14.0" -BRANCH="RELEASE-p5" +BRANCH="RELEASE-p6" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From nobody Thu Mar 28 05:07:53 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V4s492hXzz5GCrT; Thu, 28 Mar 2024 05:07:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4V4s4922Cbz4Wxm; Thu, 28 Mar 2024 05:07:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711602473; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uF2kgbYEdJW6pYbMZIPtZLnM/Q2c39HZTw0CkjPbAsM=; b=AB0SVIHCPiA+FGvg0ZBAmLnq9EegEj19LZx8smGtaZCjmDBU3XtIvLATsgbj6Xzj6VpOPY hPp/K21ihudijzCuqtI+p1x8e5WL/SyWb1SzaPz0NF8nTVkKcdB3UuKXvHoLoaWd0EZPh+ msuKMpsMfCuSSCzeZSB6aeRcFjlT5hcn7KwuzNSysbVxOO7oxF3qvQtlszUTPm5xNqdbBF YRUHaRnIptIRlyEhv2e0/R5fqKSxHsrJGRlztmD8+fj/W6ZpTQigflwoWQaVd1DPfRDlfx u0dtePjR9ckto75gi/YMw/oyzULlC4FwpqpBEDCBnAdNeC2n2VkQj7W+WQHinw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711602473; a=rsa-sha256; cv=none; b=vBTi1hJXuSrElavInRxnDBwqNdVQqzQYoaup/k0Fsa0iVmgdtECPrF1aH2sMVQt+IGro3Y nAeMr6pBV04Zsf+MwR6WwxgwkCcohmK9YTJLOfVxq1pquUyqB5nZShPAl74oSVn6hj3VHh 8IRr2hmzlxfSR8z9DciORL6eyzDEHkD2abi719FejxTuG8VzussFwRLtXMc+hiC8Qbtutj XHm5UgB3/oni5lc1Erh/WiZvRXCymOZUMG6TAyVoDRa8qMF9ZtOHUi5iO/q3skicsYW5+Q OCld0FJ++XO8McMACslFGs2IHp24dHDGktgdKs1Zi7nrf2RPE0OG/nPpHfmUzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711602473; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uF2kgbYEdJW6pYbMZIPtZLnM/Q2c39HZTw0CkjPbAsM=; b=PynoeGYjUdGB/Bjef9drDOD1rAAgsO4l7CGx8iiMpV5ogu1uPg6Hs8rWj1rcglb3djcFE5 hFCqLUJO1HMuoeD0dQaM18s9Ve9fRU9awZs0vutP+jveGEXj2u2pqSmOYGk0T8F00FzMnF 5B0HQu2ryfa5dbOGNFCcNhC7EqwO1/TV/C5R+7HQS5OTCtXJpJcxT8KzipYViCZLL01jHj YHyRTQcgKHHm2jqR0NKJuKi9uaPAVgOuxzoxIHbMJesbLlUz0YyRVr96+hfvl5eKf4670k bB/gk4yJM5Hr5KTca2uUJ7m8fp7DEEeR6kX1pxZ2GKfwqZ2PgsJ39YqcXW5a2g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V4s491dkzzDt6; Thu, 28 Mar 2024 05:07:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42S57rdD099729; Thu, 28 Mar 2024 05:07:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42S57rV2099726; Thu, 28 Mar 2024 05:07:53 GMT (envelope-from git) Date: Thu, 28 Mar 2024 05:07:53 GMT Message-Id: <202403280507.42S57rV2099726@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Tetlow Subject: git: f3195cc08ccc - releng/13.2 - kern: fix panic with disabled ttys List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gordon X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.2 X-Git-Reftype: branch X-Git-Commit: f3195cc08ccc99365ec00900a3c1abc59ceefc9c Auto-Submitted: auto-generated The branch releng/13.2 has been updated by gordon: URL: https://cgit.FreeBSD.org/src/commit/?id=f3195cc08ccc99365ec00900a3c1abc59ceefc9c commit f3195cc08ccc99365ec00900a3c1abc59ceefc9c Author: Ed Maste AuthorDate: 2024-02-26 15:38:45 +0000 Commit: Gordon Tetlow CommitDate: 2024-03-28 03:05:12 +0000 kern: fix panic with disabled ttys PR: 277240, 277329 Reviewed by: kib (earlier version) Fixes: f1d0a0cbecf2 ("jail: Fix information leak.") MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D44086 Approved by: so Security: FreeBSD-EN-24:05.tty (cherry picked from commit 975d7730828a8bde28c2a0092b6e95c4c4e22f34) (cherry picked from commit 8d22744f5be165a2a82a2a204789e44bbdc5a2ee) (cherry picked from commit a60220bbb5511469fe53fd4290713ba891f8f48a) --- sys/kern/tty.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 22c4bb6dffce..92dee3ceefc9 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -1314,7 +1314,8 @@ sysctl_kern_ttys(SYSCTL_HANDLER_ARGS) struct xtty *xtlist, *xt; struct tty *tp; struct proc *p; - int cansee, error; + int error; + bool cansee; sx_slock(&tty_list_sx); lsize = tty_list_count * sizeof(struct xtty); @@ -1327,8 +1328,8 @@ sysctl_kern_ttys(SYSCTL_HANDLER_ARGS) TAILQ_FOREACH(tp, &tty_list, t_list) { tty_lock(tp); - if (tp->t_session != NULL) { - p = tp->t_session->s_leader; + if (tp->t_session != NULL && + (p = atomic_load_ptr(&tp->t_session->s_leader)) != NULL) { PROC_LOCK(p); cansee = (p_cansee(td, p) == 0); PROC_UNLOCK(p); From nobody Thu Mar 28 05:07:54 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V4s4B4p3dz5GCcp; Thu, 28 Mar 2024 05:07:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4V4s4B2jF4z4WpX; Thu, 28 Mar 2024 05:07:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711602474; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=58wv6hBcVVdXrVt4l1TCBvaW0L3Zf1wTr99g3PHELTo=; b=MQifsnHMsaO/GJ3H0RZa3CABMc4nVw96F3aoHPLEg2RHzK9WhsqSXA5h2RmHgqoeUpSzAA hOV/wGth1dA3pibQuCFO9+cmGzeVNSwAtYrYOdl/KeAA85c4A1Ve4q8cyvoch81O3+olTj GimOiZ0vXduhcdd7qAtP3gmXEDtT9GtoNA/BwluWgc+wWGqbOvMV/lVE0bfFOz4Swf3ffs n3iPPCpjTnCLi828JfapEe+LXJy4qAA98fLFkFMz9leFBoIRh1uIBRA8PDp1JV7qtaqR6A L54N0wC4Zdyi/XBprzrzHVJEOD5LZHaDcqyuK8UPljqsfOLXWNkRZMJ3uhz03A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711602474; a=rsa-sha256; cv=none; b=ktclJfYx9UzT7okS1hAy2WWjdFTApQVzdRBmObtHhbQpzrUKA7Pb/7A2IpsKeWqY212/cz DXfph3RqapbY+XMQCMJcE+QY8W6tri/qGYLJW6mn6RxyNDSiz1tCMQgQEoQcVkRBkZYzDu zrkYEMc+QCgMMw9OAxlvH2S+W/JwJxRk8ufiX/nMuK0SiAKgblDKX60rrI7dC8YOsv/IMc j4L+UYnS0kUr0703ciiatd6xaBBwfNwZnZXptfsVZUjSbTJtLE1PPajtnmYysZkQPrtEVb iBItqc3Ltop7A8N3q2bzURUYrXHrFt8/XkBXvMUssYIj/7yfTDgsv7v/i4Y+TQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711602474; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=58wv6hBcVVdXrVt4l1TCBvaW0L3Zf1wTr99g3PHELTo=; b=SVbMiW2sk22lliiMcjsJAjUQNNrIGILxt+A4kFuIuDuKtsoPhsv4N98/NWsWjIHGz49wv2 EuM6eNeoXZP69lLR0s4AKQn0XZ4pJda5EnYXOjVqvFq1FZbqcpnei3228eIE37/J5PNdnc 9OmvgIpCDkW99xUcS3qjgE1ArJcSysS6XflmxYmj8I1ApAFLk2k8LUj9VA8szUbreg65r5 2K++fQlB8f5gVSRzTZwLqI5UUbMmgS7HB9iJ4S8rpcbA1U8WJDDNE/XMUkVJk3lFTvYRY/ pkTMPQmadjlSZrdwR8KEBIEzP+t1hc5HZgJcM2Iu4koMP5kS/i8ZoSxNbBI7Cw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V4s4B2Jk8zDr5; Thu, 28 Mar 2024 05:07:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42S57sew099786; Thu, 28 Mar 2024 05:07:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42S57s3J099783; Thu, 28 Mar 2024 05:07:54 GMT (envelope-from git) Date: Thu, 28 Mar 2024 05:07:54 GMT Message-Id: <202403280507.42S57s3J099783@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Tetlow Subject: git: 8f1f4e60ceb9 - releng/13.2 - if_wg: use proper barriers around pkt->p_state List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gordon X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.2 X-Git-Reftype: branch X-Git-Commit: 8f1f4e60ceb9b8e5eddd54cf1fde62944f56eaa4 Auto-Submitted: auto-generated The branch releng/13.2 has been updated by gordon: URL: https://cgit.FreeBSD.org/src/commit/?id=8f1f4e60ceb9b8e5eddd54cf1fde62944f56eaa4 commit 8f1f4e60ceb9b8e5eddd54cf1fde62944f56eaa4 Author: Kyle Evans AuthorDate: 2024-03-15 01:19:18 +0000 Commit: Gordon Tetlow CommitDate: 2024-03-28 03:05:58 +0000 if_wg: use proper barriers around pkt->p_state Without appropriate load-synchronization to pair with store barriers in wg_encrypt() and wg_decrypt(), the compiler and hardware are often allowed to reorder these loads in wg_deliver_out() and wg_deliver_in() such that we end up with a garbage or intermediate mbuf that we try to pass on. The issue is particularly prevalent with the weaker memory models of !x86 platforms. Switch from the big-hammer wmb() to more explicit acq/rel atomics to both make it obvious what we're syncing up with, and to avoid somewhat hefty fences on platforms that don't necessarily need this. With this patch, my dual-iperf3 reproducer is dramatically more stable than it is without on aarch64. PR: 264115 Reviewed by: andrew, zlei Approved by: so Security: FreeBSD-EN-24:06.wireguard (cherry picked from commit 3705d679a6344c957cae7a1b6372a8bfb8c44f0e) (cherry picked from commit 806e51f81dbae21feb6e7ddd95d2ed2a28b04f8f) --- sys/dev/wg/if_wg.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sys/dev/wg/if_wg.c b/sys/dev/wg/if_wg.c index 9c4ebe5dd393..99df8a6f0afc 100644 --- a/sys/dev/wg/if_wg.c +++ b/sys/dev/wg/if_wg.c @@ -1515,8 +1515,7 @@ wg_encrypt(struct wg_softc *sc, struct wg_packet *pkt) state = WG_PACKET_CRYPTED; out: pkt->p_mbuf = m; - wmb(); - pkt->p_state = state; + atomic_store_rel_int(&pkt->p_state, state); GROUPTASK_ENQUEUE(&peer->p_send); noise_remote_put(remote); } @@ -1588,8 +1587,7 @@ wg_decrypt(struct wg_softc *sc, struct wg_packet *pkt) state = WG_PACKET_CRYPTED; out: pkt->p_mbuf = m; - wmb(); - pkt->p_state = state; + atomic_store_rel_int(&pkt->p_state, state); GROUPTASK_ENQUEUE(&peer->p_recv); noise_remote_put(remote); } @@ -1645,7 +1643,7 @@ wg_deliver_out(struct wg_peer *peer) wg_peer_get_endpoint(peer, &endpoint); while ((pkt = wg_queue_dequeue_serial(&peer->p_encrypt_serial)) != NULL) { - if (pkt->p_state != WG_PACKET_CRYPTED) + if (atomic_load_acq_int(&pkt->p_state) != WG_PACKET_CRYPTED) goto error; m = pkt->p_mbuf; @@ -1687,7 +1685,7 @@ wg_deliver_in(struct wg_peer *peer) struct epoch_tracker et; while ((pkt = wg_queue_dequeue_serial(&peer->p_decrypt_serial)) != NULL) { - if (pkt->p_state != WG_PACKET_CRYPTED) + if (atomic_load_acq_int(&pkt->p_state) != WG_PACKET_CRYPTED) goto error; m = pkt->p_mbuf; From nobody Thu Mar 28 05:07:55 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V4s4D0Rpbz5GClj; Thu, 28 Mar 2024 05:07: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 4V4s4C5bxPz4X6l; Thu, 28 Mar 2024 05:07:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711602475; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vBUQeqTzF9ZNyygXQvKespMnVCxKFl/GdhfZEIAlUTg=; b=XDHEMTrTG0VvJGwuMJf1uZhJ/dxJasSMemWNfbHsWlqlye/SZh1ncAz+t+He2Zfc6MDJci 7OsG0hrKwkJRWXxqs5+W699ZdIZwTI0Yowsh1QVM4C01DaDUkF1fI6p0iuO1Xca8yvfod8 Tup1SF6dJsw+YDb5RinnQHV9qZYMINnwvjwEtmYuD/pzROmjFcEg/hFlf3RXITByLtB4G6 Ifwp0zdRCkN81lvarxgHk7A48X48IOSbGPTBtUTnFhTXrjthJ8mfAjOBz32ru2SCcCyI5J RTYXtgy8hbhVcmfX/3H/tmwJW5sFfJhu0vdZRvslb9jfNEvzR4q8vmeOuXQ7Dw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711602475; a=rsa-sha256; cv=none; b=dvwPVZbzllhRAA7Qh7TUcXMK9QPtnqr6vhDJien6upcdL1Gu6vY63Vs75hH49T7cte9z4b ap/vNpaoDMpUaORWS7zuuq02Ty1zsI+pq1ywlMCmJQQdzs7Ou3v3+4GbUDmmFgDkTZST2H 4jLiGzd+pCRz6XeWbW2atEZmkE8hXBeQMn/xM2TlKMUmrmJ9luL4jez78v0G9RPZnE1mV1 2Pdl9lIIn38iOgmAnSId+VTLerSDn89WoC3t52sh02cT1BBzmzGQlm3bskqix+pc8mZvmG EhBNy66bQlWnzA31au50JVKmBGmnXOpy9ue1+zNRetQuTRjEILYfqFyq9G6itw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711602475; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vBUQeqTzF9ZNyygXQvKespMnVCxKFl/GdhfZEIAlUTg=; b=NAzS09V0CM8n+PmZgHZjKJ9mxzRHMInhJCbqjdR6U/ji+tl2JVtztlVs2RYruByD2M1Wux TgrMQ3hdcY0RGuhh56K6GoG/40zDsFURU0xe9KJ+25S8tL6uG6UVTv0GAn1Q5zRuCnVrNO UbreLY3yJtlQBdCPHdErqQxCGabFS2jsJ5AztMlKluP1QM54QPAhz+JtXGagdq5XAriF1v uKSTdQpWYrIU2QchMBMXCmhuFDTadqoZHPPJkJ2yXJxudcNdWh5AIOGgxJb9LzmWNngpyp +Tr2X5dXF71sRs7D0AqjJV2pjbaVApo9J2bhpsVFrbEGlddj3PcvXFDIAwtiSg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V4s4C5C1TzF4n; Thu, 28 Mar 2024 05:07:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42S57toC099834; Thu, 28 Mar 2024 05:07:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42S57tU0099831; Thu, 28 Mar 2024 05:07:55 GMT (envelope-from git) Date: Thu, 28 Mar 2024 05:07:55 GMT Message-Id: <202403280507.42S57tU0099831@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Tetlow Subject: git: d9d90e5e42f6 - releng/13.2 - unbound: Vendor import 1.19.1 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gordon X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.2 X-Git-Reftype: branch X-Git-Commit: d9d90e5e42f6a1385d8f1b06297058a37647b1bc Auto-Submitted: auto-generated The branch releng/13.2 has been updated by gordon: URL: https://cgit.FreeBSD.org/src/commit/?id=d9d90e5e42f6a1385d8f1b06297058a37647b1bc commit d9d90e5e42f6a1385d8f1b06297058a37647b1bc Author: Cy Schubert AuthorDate: 2023-09-19 04:17:09 +0000 Commit: Gordon Tetlow CommitDate: 2024-03-28 05:01:16 +0000 unbound: Vendor import 1.19.1 Release notes at https://www.nlnetlabs.nl/news/2024/Feb/13/unbound-1.19.1-released/ Security: CVE-2023-50387, CVE-2023-50868 Security: FreeBSD-SA-24:03.unbound Approved by: so (cherry picked from commit 8f76bb7dad48538c6832c2fb466a433d2a3f8cd5) (cherry picked from commit 4f4adb0576dfbcd0d956db0146c9de7e1bb71563) (cherry picked from commit 948e11aaf420cd7d493cc2e118cacc06d18653fe) (cherry picked from commit f5a091c1f6a068cdc5c3bd23536830de9dfe7b84) (cherry picked from commit 6e71235e558ef579605e7f35b02f983b9a246a4a) (cherry picked from commit 64ac3bca3a6ec8510ae7175cbdd73aa594756e2a) (cherry picked from commit 103ba509e72e3949d22485666949e9705d4af8cd) (cherry picked from commit 2bdab519a5c9822571d005c62adec484cf65c2e7) (cherry picked from commit 5aab39b24ce7437265b94461ffdd9b12c0723658) (cherry picked from commit a077e95570d9cef9882be688dc28303b6257cfd0) (cherry picked from commit 67267734315c6a48db31697f0a0669fa1f985969) (cherry picked from commit 17b51a12dca08f5126600e11181cee9454884e02) (cherry picked from commit b76ef9a7cb8a7c62d10ae8101f41014f34819174) (cherry picked from commit abe4ced2b9de0a3dd44d7e2068cfd7fa2b428c16) --- contrib/unbound/Makefile.in | 47 +- contrib/unbound/README.md | 8 +- contrib/unbound/acx_nlnetlabs.m4 | 36 +- contrib/unbound/acx_python.m4 | 61 +- contrib/unbound/cachedb/cachedb.c | 68 +- contrib/unbound/cachedb/redis.c | 96 ++- contrib/unbound/compat/getentropy_solaris.c | 2 +- contrib/unbound/config.guess | 62 +- contrib/unbound/config.h.in | 25 +- contrib/unbound/config.sub | 232 +++--- contrib/unbound/configure | 777 ++++++++------------- contrib/unbound/configure.ac | 111 +-- contrib/unbound/contrib/Dockerfile.tests | 4 +- contrib/unbound/contrib/README | 3 + contrib/unbound/contrib/aaaa-filter-iterator.patch | 4 +- contrib/unbound/contrib/unbound.init_yocto | 139 ++++ contrib/unbound/daemon/acl_list.c | 2 + contrib/unbound/daemon/acl_list.h | 8 +- contrib/unbound/daemon/cachedump.c | 28 +- contrib/unbound/daemon/remote.c | 271 ++++--- contrib/unbound/daemon/remote.h | 2 +- contrib/unbound/daemon/stats.c | 53 +- contrib/unbound/daemon/stats.h | 7 + contrib/unbound/daemon/worker.c | 479 ++++++++----- contrib/unbound/dns64/dns64.c | 103 +-- contrib/unbound/dnstap/dnstap.c | 7 +- contrib/unbound/dnstap/dnstap.h | 4 +- contrib/unbound/dnstap/dnstap.m4 | 2 +- contrib/unbound/dnstap/dtstream.c | 8 +- contrib/unbound/dnstap/unbound-dnstap-socket.c | 47 +- contrib/unbound/doc/Changelog | 475 ++++++++++++- contrib/unbound/doc/README | 2 +- contrib/unbound/doc/README.DNS64 | 20 + contrib/unbound/doc/example.conf.in | 41 +- contrib/unbound/doc/libunbound.3.in | 4 +- contrib/unbound/doc/unbound-anchor.8.in | 2 +- contrib/unbound/doc/unbound-checkconf.8.in | 2 +- contrib/unbound/doc/unbound-control.8.in | 58 +- contrib/unbound/doc/unbound-host.1.in | 2 +- contrib/unbound/doc/unbound.8.in | 4 +- contrib/unbound/doc/unbound.conf.5.in | 177 ++++- contrib/unbound/dynlibmod/dynlibmod.c | 3 +- contrib/unbound/edns-subnet/subnetmod.c | 57 +- contrib/unbound/edns-subnet/subnetmod.h | 7 + contrib/unbound/ipset/ipset.c | 4 +- contrib/unbound/iterator/iter_delegpt.c | 39 ++ contrib/unbound/iterator/iter_delegpt.h | 25 + contrib/unbound/iterator/iter_priv.c | 26 +- contrib/unbound/iterator/iter_resptype.c | 20 +- contrib/unbound/iterator/iter_resptype.h | 4 +- contrib/unbound/iterator/iter_scrub.c | 110 ++- contrib/unbound/iterator/iter_scrub.h | 5 +- contrib/unbound/iterator/iter_utils.c | 43 +- contrib/unbound/iterator/iter_utils.h | 7 +- contrib/unbound/iterator/iterator.c | 331 ++++++--- contrib/unbound/iterator/iterator.h | 30 +- contrib/unbound/libunbound/libworker.c | 20 +- contrib/unbound/libunbound/unbound-event.h | 6 +- contrib/unbound/libunbound/unbound.h | 116 +-- contrib/unbound/services/authzone.c | 24 +- contrib/unbound/services/cache/dns.c | 72 +- contrib/unbound/services/cache/dns.h | 9 + contrib/unbound/services/cache/infra.c | 75 +- contrib/unbound/services/cache/infra.h | 5 +- contrib/unbound/services/listen_dnsport.c | 161 +++-- contrib/unbound/services/localzone.c | 20 +- contrib/unbound/services/localzone.h | 2 + contrib/unbound/services/mesh.c | 394 +++++------ contrib/unbound/services/mesh.h | 14 +- contrib/unbound/services/modstack.c | 10 +- contrib/unbound/services/outside_network.c | 28 + contrib/unbound/services/rpz.c | 240 ++++++- contrib/unbound/services/rpz.h | 16 +- contrib/unbound/sldns/rrdef.c | 12 +- contrib/unbound/sldns/rrdef.h | 7 +- contrib/unbound/sldns/str2wire.c | 115 +-- contrib/unbound/sldns/str2wire.h | 4 +- contrib/unbound/sldns/wire2str.c | 101 ++- contrib/unbound/sldns/wire2str.h | 13 + contrib/unbound/smallapp/unbound-anchor.c | 3 +- contrib/unbound/smallapp/unbound-checkconf.c | 19 +- contrib/unbound/smallapp/unbound-control.c | 54 +- contrib/unbound/smallapp/unbound-host.c | 5 +- contrib/unbound/testdata/00-lint.tdir/00-lint.pre | 14 + contrib/unbound/testdata/cachedb_cached_ede.crpl | 91 +++ .../cachedb_no_store.tdir/cachedb_no_store.conf | 29 + .../cachedb_no_store.tdir/cachedb_no_store.dsc | 16 + .../cachedb_no_store.tdir/cachedb_no_store.post | 20 + .../cachedb_no_store.tdir/cachedb_no_store.pre | 36 + .../cachedb_no_store.servfail.testns | 8 + .../cachedb_no_store.tdir/cachedb_no_store.test | 132 ++++ .../cachedb_no_store.tdir/cachedb_no_store.testns | 9 + contrib/unbound/testdata/disable_edns_do.rpl | 164 +++++ .../unbound/testdata/edns_downstream_cookies.rpl | 235 +++++++ .../testdata/ip_ratelimit.tdir/ip_ratelimit.conf | 28 + .../testdata/ip_ratelimit.tdir/ip_ratelimit.dsc | 16 + .../testdata/ip_ratelimit.tdir/ip_ratelimit.post | 13 + .../testdata/ip_ratelimit.tdir/ip_ratelimit.pre | 24 + .../testdata/ip_ratelimit.tdir/ip_ratelimit.test | 165 +++++ .../testdata/ip_ratelimit.tdir/unbound_control.key | 39 ++ .../testdata/ip_ratelimit.tdir/unbound_control.pem | 22 + .../testdata/ip_ratelimit.tdir/unbound_server.key | 39 ++ .../testdata/ip_ratelimit.tdir/unbound_server.pem | 22 + .../unbound/testdata/iter_cname_minimise_nx.rpl | 246 +++++++ contrib/unbound/testdata/iter_failreply.rpl | 132 ++++ contrib/unbound/testdata/iter_ignore_empty.rpl | 248 +++++++ contrib/unbound/testdata/iter_nat64.rpl | 117 ++++ contrib/unbound/testdata/iter_nat64_prefix.rpl | 119 ++++ contrib/unbound/testdata/iter_nat64_prefix48.rpl | 118 ++++ contrib/unbound/testdata/iter_scrub_rr_length.rpl | 298 ++++++++ .../testdata/root_zonemd.tdir/root_zonemd.conf | 34 + .../testdata/root_zonemd.tdir/root_zonemd.dsc | 16 + .../testdata/root_zonemd.tdir/root_zonemd.post | 14 + .../testdata/root_zonemd.tdir/root_zonemd.pre | 50 ++ .../testdata/root_zonemd.tdir/root_zonemd.test | 51 ++ .../testdata/root_zonemd.tdir/root_zonemd.testns | 9 + contrib/unbound/testdata/rpz_cached_cname.rpl | 122 ++++ .../unbound/testdata/serve_expired_0ttl_nodata.rpl | 154 ++++ .../testdata/serve_expired_0ttl_nxdomain.rpl | 154 ++++ .../testdata/serve_expired_0ttl_servfail.rpl | 129 ++++ .../serve_expired_cached_servfail_refresh.rpl | 145 ++++ .../stat_values.tdir/stat_values_cachedb.conf | 36 + .../stat_values_downstream_cookies.conf | 32 + contrib/unbound/testdata/subnet_cached_ede.crpl | 114 +++ .../unbound/testdata/subnet_global_prefetch.crpl | 236 +++++++ .../subnet_global_prefetch_always_forward.crpl | 167 +++++ .../testdata/subnet_global_prefetch_expired.crpl | 241 +++++++ contrib/unbound/testdata/subnet_prezero.crpl | 155 ++++ contrib/unbound/testdata/val_any_negcache.rpl | 243 +++++++ contrib/unbound/testdata/val_scrub_rr_length.rpl | 164 +++++ contrib/unbound/util/config_file.c | 163 +++-- contrib/unbound/util/config_file.h | 71 +- contrib/unbound/util/configlexer.lex | 18 +- contrib/unbound/util/configparser.y | 187 ++++- contrib/unbound/util/data/msgencode.c | 150 +++- contrib/unbound/util/data/msgencode.h | 42 +- contrib/unbound/util/data/msgparse.c | 123 +++- contrib/unbound/util/data/msgparse.h | 36 +- contrib/unbound/util/data/msgreply.c | 95 ++- contrib/unbound/util/data/msgreply.h | 30 +- contrib/unbound/util/edns.c | 59 ++ contrib/unbound/util/edns.h | 59 ++ contrib/unbound/util/fptr_wlist.c | 11 + contrib/unbound/util/iana_ports.inc | 4 + contrib/unbound/util/log.c | 2 +- contrib/unbound/util/module.c | 34 +- contrib/unbound/util/module.h | 24 +- contrib/unbound/util/net_help.c | 176 ++++- contrib/unbound/util/net_help.h | 41 ++ contrib/unbound/util/netevent.c | 425 +++++++---- contrib/unbound/util/netevent.h | 70 +- contrib/unbound/util/proxy_protocol.c | 162 +++-- contrib/unbound/util/proxy_protocol.h | 66 +- contrib/unbound/util/regional.c | 2 +- contrib/unbound/util/rfc_1982.c | 75 ++ contrib/unbound/util/rfc_1982.h | 63 ++ contrib/unbound/util/siphash.c | 192 +++++ contrib/unbound/util/siphash.h | 43 ++ contrib/unbound/util/storage/lruhash.c | 25 +- contrib/unbound/util/storage/lruhash.h | 5 +- contrib/unbound/util/storage/slabhash.c | 18 + contrib/unbound/util/storage/slabhash.h | 9 + contrib/unbound/util/timehist.c | 44 +- contrib/unbound/util/timeval_func.c | 113 +++ contrib/unbound/util/timeval_func.h | 53 ++ contrib/unbound/validator/autotrust.c | 2 + contrib/unbound/validator/val_anchor.c | 21 + contrib/unbound/validator/val_anchor.h | 8 + contrib/unbound/validator/val_kcache.c | 10 +- contrib/unbound/validator/val_kcache.h | 4 +- contrib/unbound/validator/val_kentry.c | 48 +- contrib/unbound/validator/val_kentry.h | 37 +- contrib/unbound/validator/val_neg.c | 7 +- contrib/unbound/validator/val_nsec.c | 20 +- contrib/unbound/validator/val_nsec.h | 5 +- contrib/unbound/validator/val_nsec3.c | 316 +++++++-- contrib/unbound/validator/val_nsec3.h | 60 +- contrib/unbound/validator/val_sigcrypt.c | 80 +-- contrib/unbound/validator/val_sigcrypt.h | 3 +- contrib/unbound/validator/val_utils.c | 41 +- contrib/unbound/validator/val_utils.h | 4 +- contrib/unbound/validator/validator.c | 645 +++++++++++++---- contrib/unbound/validator/validator.h | 18 + lib/libunbound/Makefile | 6 +- usr.sbin/unbound/config.h | 6 +- 185 files changed, 11832 insertions(+), 2604 deletions(-) diff --git a/contrib/unbound/Makefile.in b/contrib/unbound/Makefile.in index bc021aa1eb00..22fb75c123bd 100644 --- a/contrib/unbound/Makefile.in +++ b/contrib/unbound/Makefile.in @@ -122,15 +122,15 @@ iterator/iter_delegpt.c iterator/iter_donotq.c iterator/iter_fwd.c \ iterator/iter_hints.c iterator/iter_priv.c iterator/iter_resptype.c \ iterator/iter_scrub.c iterator/iter_utils.c services/listen_dnsport.c \ services/localzone.c services/mesh.c services/modstack.c services/view.c \ -services/rpz.c \ +services/rpz.c util/rfc_1982.c \ services/outbound_list.c services/outside_network.c util/alloc.c \ util/config_file.c util/configlexer.c util/configparser.c \ util/shm_side/shm_main.c services/authzone.c \ util/fptr_wlist.c util/locks.c util/log.c util/mini_event.c util/module.c \ util/netevent.c util/net_help.c util/random.c util/rbtree.c util/regional.c \ -util/rtt.c util/edns.c util/storage/dnstree.c util/storage/lookup3.c \ +util/rtt.c util/siphash.c util/edns.c util/storage/dnstree.c util/storage/lookup3.c \ util/storage/lruhash.c util/storage/slabhash.c util/tcp_conn_limit.c \ -util/timehist.c util/tube.c util/proxy_protocol.c \ +util/timehist.c util/tube.c util/proxy_protocol.c util/timeval_func.c \ util/ub_event.c util/ub_event_pluggable.c util/winsock_event.c \ validator/autotrust.c validator/val_anchor.c validator/validator.c \ validator/val_kcache.c validator/val_kentry.c validator/val_neg.c \ @@ -145,14 +145,14 @@ as112.lo msgparse.lo msgreply.lo packed_rrset.lo iterator.lo iter_delegpt.lo \ iter_donotq.lo iter_fwd.lo iter_hints.lo iter_priv.lo iter_resptype.lo \ iter_scrub.lo iter_utils.lo localzone.lo mesh.lo modstack.lo view.lo \ outbound_list.lo alloc.lo config_file.lo configlexer.lo configparser.lo \ -fptr_wlist.lo edns.lo locks.lo log.lo mini_event.lo module.lo net_help.lo \ +fptr_wlist.lo siphash.lo edns.lo locks.lo log.lo mini_event.lo module.lo net_help.lo \ random.lo rbtree.lo regional.lo rtt.lo dnstree.lo lookup3.lo lruhash.lo \ slabhash.lo tcp_conn_limit.lo timehist.lo tube.lo winsock_event.lo \ -autotrust.lo val_anchor.lo rpz.lo proxy_protocol.lo \ +autotrust.lo val_anchor.lo rpz.lo rfc_1982.lo proxy_protocol.lo \ validator.lo val_kcache.lo val_kentry.lo val_neg.lo val_nsec3.lo val_nsec.lo \ val_secalgo.lo val_sigcrypt.lo val_utils.lo dns64.lo $(CACHEDB_OBJ) authzone.lo \ $(SUBNET_OBJ) $(PYTHONMOD_OBJ) $(CHECKLOCK_OBJ) $(DNSTAP_OBJ) $(DNSCRYPT_OBJ) \ -$(IPSECMOD_OBJ) $(IPSET_OBJ) $(DYNLIBMOD_OBJ) respip.lo +$(IPSECMOD_OBJ) $(IPSET_OBJ) $(DYNLIBMOD_OBJ) respip.lo timeval_func.lo COMMON_OBJ_WITHOUT_UB_EVENT=$(COMMON_OBJ_WITHOUT_NETCALL) netevent.lo listen_dnsport.lo \ outside_network.lo COMMON_OBJ=$(COMMON_OBJ_WITHOUT_UB_EVENT) ub_event.lo @@ -198,7 +198,7 @@ CHECKCONF_OBJ=unbound-checkconf.lo worker_cb.lo CHECKCONF_OBJ_LINK=$(CHECKCONF_OBJ) $(COMMON_OBJ_ALL_SYMBOLS) $(SLDNS_OBJ) \ $(COMPAT_OBJ) @WIN_CHECKCONF_OBJ_LINK@ CONTROL_SRC=smallapp/unbound-control.c -CONTROL_OBJ=unbound-control.lo +CONTROL_OBJ=unbound-control.lo CONTROL_OBJ_LINK=$(CONTROL_OBJ) worker_cb.lo $(COMMON_OBJ_ALL_SYMBOLS) \ $(SLDNS_OBJ) $(COMPAT_OBJ) @WIN_CONTROL_OBJ_LINK@ HOST_SRC=smallapp/unbound-host.c @@ -455,6 +455,7 @@ unbound-dnstap-socket.lo unbound-dnstap-socket.o: $(srcdir)/dnstap/unbound-dnsta dynlibmod.lo dynlibdmod.o: $(srcdir)/dynlibmod/dynlibmod.c config.h $(srcdir)/dynlibmod/dynlibmod.h cachedb.lo cachedb.o: $(srcdir)/cachedb/cachedb.c config.h $(srcdir)/cachedb/cachedb.h redis.lo redis.o: $(srcdir)/cachedb/redis.c config.h $(srcdir)/cachedb/redis.h +timeval_func.lo timeval_func.o: $(srcdir)/util/timeval_func.c $(srcdir)/util/timeval_func.h # dnscrypt dnscrypt.lo dnscrypt.o: $(srcdir)/dnscrypt/dnscrypt.c config.h \ @@ -498,6 +499,7 @@ util/configlexer.c: $(srcdir)/util/configlexer.lex util/configparser.h echo "#include \"util/configyyrename.h\"" >> $@ ;\ $(LEX) -t $(srcdir)/util/configlexer.lex >> $@ ;\ fi + @if test ! -f $@; then echo "No $@ : need flex and bison to compile from source repository"; exit 1; fi util/configparser.c util/configparser.h: $(srcdir)/util/configparser.y @-if test ! -d util; then $(INSTALL) -d util; fi @@ -516,7 +518,7 @@ distclean: clean rm -f doc/example.conf doc/libunbound.3 doc/unbound-anchor.8 doc/unbound-checkconf.8 doc/unbound-control.8 doc/unbound.8 doc/unbound.conf.5 doc/unbound-host.1 rm -f smallapp/unbound-control-setup.sh dnstap/dnstap_config.h dnscrypt/dnscrypt_config.h contrib/libunbound.pc contrib/unbound.socket contrib/unbound.service rm -f $(TEST_BIN) - rm -f Makefile + rm -f Makefile maintainer-clean: distclean rm -f util/configlexer.c util/configparser.c util/configparser.h @@ -649,7 +651,7 @@ uninstall: $(PYTHONMOD_UNINSTALL) $(PYUNBOUND_UNINSTALL) $(UNBOUND_EVENT_UNINSTA iana_update: curl -o port-numbers.tmp https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xml --compressed - if file port-numbers.tmp | grep 'gzip' >/dev/null; then zcat port-numbers.tmp; else cat port-numbers.tmp; fi | awk '// {p=0;} /udp/ {p=1;} /[^u]/ {p=0;} /Decomissioned|Decommissioned|Removed|De-registered|unassigned|Unassigned|Reserved/ {u=1;} // { if(u==1) {u=0;} else { if(p==1) { match($$0,/[0-9]+/); print substr($$0, RSTART, RLENGTH) ","}}}' | sort -nu > util/iana_ports.inc + if file port-numbers.tmp | grep 'gzip' >/dev/null; then zcat port-numbers.tmp; else cat port-numbers.tmp; fi | awk '// {p=0;} /udp/ {p=1;} /[^u]/ {p=0;} /Decomissioned|Decommissioned|Removed|De-registered|unassigned|Unassigned|Reserved/ {u=1;} // { if(u==1) {u=0;} else { if(p==1) { match($$0,/[0-9]+/); print substr($$0, RSTART, RLENGTH) ","}}}' | sort -nu > util/iana_ports.inc rm -f port-numbers.tmp # dependency generation @@ -736,7 +738,7 @@ msgencode.lo msgencode.o: $(srcdir)/util/data/msgencode.c config.h $(srcdir)/uti msgparse.lo msgparse.o: $(srcdir)/util/data/msgparse.c config.h $(srcdir)/util/data/msgparse.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/sldns/pkthdr.h \ $(srcdir)/sldns/rrdef.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ - $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lookup3.h $(srcdir)/util/regional.h $(srcdir)/sldns/sbuffer.h \ + $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lookup3.h $(srcdir)/util/regional.h $(srcdir)/util/net_help.h $(srcdir)/sldns/sbuffer.h \ $(srcdir)/sldns/parseutil.h $(srcdir)/sldns/wire2str.h msgreply.lo msgreply.o: $(srcdir)/util/data/msgreply.c config.h $(srcdir)/util/data/msgreply.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/packed_rrset.h \ @@ -791,7 +793,7 @@ iter_priv.lo iter_priv.o: $(srcdir)/iterator/iter_priv.c config.h $(srcdir)/iter $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/net_help.h \ $(srcdir)/util/storage/dnstree.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/sbuffer.h iter_resptype.lo iter_resptype.o: $(srcdir)/iterator/iter_resptype.c config.h \ - $(srcdir)/iterator/iter_resptype.h $(srcdir)/iterator/iter_delegpt.h $(srcdir)/util/log.h \ + $(srcdir)/iterator/iter_resptype.h $(srcdir)/iterator/iter_delegpt.h $(srcdir)/iterator/iterator.h $(srcdir)/util/log.h \ $(srcdir)/services/cache/dns.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/net_help.h \ $(srcdir)/util/data/dname.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/pkthdr.h @@ -877,7 +879,7 @@ rpz.lo rpz.o: $(srcdir)/services/rpz.c config.h $(srcdir)/services/rpz.h $(srcdi outbound_list.lo outbound_list.o: $(srcdir)/services/outbound_list.c config.h \ $(srcdir)/services/outbound_list.h $(srcdir)/services/outside_network.h $(srcdir)/util/rbtree.h \ $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - + outside_network.lo outside_network.o: $(srcdir)/services/outside_network.c config.h \ $(srcdir)/services/outside_network.h $(srcdir)/util/rbtree.h $(srcdir)/util/netevent.h \ $(srcdir)/dnscrypt/dnscrypt.h \ @@ -915,7 +917,8 @@ config_file.lo config_file.o: $(srcdir)/util/config_file.c config.h $(srcdir)/ut configlexer.lo configlexer.o: util/configlexer.c config.h $(srcdir)/util/configyyrename.h \ $(srcdir)/util/config_file.h util/configparser.h configparser.lo configparser.o: util/configparser.c config.h $(srcdir)/util/configyyrename.h \ - $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/util/log.h + $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/util/log.h $(srcdir)/sldns/str2wire.h \ + $(srcdir)/sldns/rrdef.h shm_main.lo shm_main.o: $(srcdir)/util/shm_side/shm_main.c config.h $(srcdir)/util/shm_side/shm_main.h \ $(srcdir)/libunbound/unbound.h $(srcdir)/daemon/daemon.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h \ @@ -928,7 +931,7 @@ shm_main.lo shm_main.o: $(srcdir)/util/shm_side/shm_main.c config.h $(srcdir)/ut $(srcdir)/services/view.h $(srcdir)/util/config_file.h $(srcdir)/services/authzone.h $(srcdir)/respip/respip.h \ $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/infra.h \ $(srcdir)/util/rtt.h $(srcdir)/validator/validator.h $(srcdir)/validator/val_utils.h $(srcdir)/util/fptr_wlist.h \ - $(srcdir)/util/tube.h + $(srcdir)/util/tube.h $(srcdir)/util/timeval_func.h authzone.lo authzone.o: $(srcdir)/services/authzone.c config.h $(srcdir)/services/authzone.h \ $(srcdir)/util/rbtree.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/services/mesh.h $(srcdir)/util/netevent.h \ $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/util/data/msgparse.h \ @@ -983,7 +986,7 @@ netevent.lo netevent.o: $(srcdir)/util/netevent.c config.h $(srcdir)/util/neteve $(srcdir)/services/modstack.h $(srcdir)/services/rpz.h $(srcdir)/services/localzone.h $(srcdir)/services/view.h \ $(srcdir)/sldns/sbuffer.h $(srcdir)/util/config_file.h $(srcdir)/services/authzone.h $(srcdir)/daemon/stats.h \ $(srcdir)/util/timehist.h $(srcdir)/libunbound/unbound.h $(srcdir)/respip/respip.h $(srcdir)/sldns/str2wire.h \ - $(srcdir)/dnstap/dnstap.h $(srcdir)/services/listen_dnsport.h + $(srcdir)/dnstap/dnstap.h $(srcdir)/services/listen_dnsport.h $(srcdir)/util/timeval_func.h proxy_protocol.lo proxy_protocol.o: $(srcdir)/util/proxy_protocol.c config.h \ $(srcdir)/util/proxy_protocol.h $(srcdir)/sldns/sbuffer.h net_help.lo net_help.o: $(srcdir)/util/net_help.c config.h $(srcdir)/util/net_help.h $(srcdir)/util/log.h \ @@ -1006,6 +1009,8 @@ rtt.lo rtt.o: $(srcdir)/util/rtt.c config.h $(srcdir)/util/rtt.h $(srcdir)/itera $(srcdir)/services/outbound_list.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/module.h \ $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h +siphash.lo siphash.o: $(srcdir)/util/siphash.c +rfc_1982.lo rfc_1982.o: $(srcdir)/util/rfc_1982.c edns.lo edns.o: $(srcdir)/util/edns.c config.h $(srcdir)/util/edns.h $(srcdir)/util/storage/dnstree.h \ $(srcdir)/util/rbtree.h $(srcdir)/util/config_file.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ $(srcdir)/util/net_help.h $(srcdir)/util/log.h $(srcdir)/util/regional.h \ @@ -1186,7 +1191,7 @@ unitmain.lo unitmain.o: $(srcdir)/testcode/unitmain.c config.h $(srcdir)/sldns/r $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ $(srcdir)/util/random.h $(srcdir)/respip/respip.h \ $(srcdir)/services/localzone.h $(srcdir)/services/view.h $(srcdir)/sldns/sbuffer.h \ - $(srcdir)/services/outside_network.h + $(srcdir)/services/outside_network.h unitmsgparse.lo unitmsgparse.o: $(srcdir)/testcode/unitmsgparse.c config.h $(srcdir)/util/log.h \ $(srcdir)/testcode/unitmain.h $(srcdir)/util/data/msgparse.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/locks.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/data/msgreply.h \ @@ -1321,7 +1326,7 @@ unbound.lo unbound.o: $(srcdir)/daemon/unbound.c config.h $(srcdir)/util/log.h $ worker.lo worker.o: $(srcdir)/daemon/worker.c config.h $(srcdir)/util/log.h $(srcdir)/util/net_help.h \ $(srcdir)/util/random.h $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ - $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ + $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/util/timeval_func.h \ $(srcdir)/util/alloc.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ $(srcdir)/sldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/libunbound/unbound.h \ $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/daemon.h \ @@ -1343,7 +1348,7 @@ testbound.lo testbound.o: $(srcdir)/testcode/testbound.c config.h $(srcdir)/test $(srcdir)/daemon/remote.h $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/config_file.h $(srcdir)/sldns/keyraw.h $(srcdir)/daemon/unbound.c $(srcdir)/daemon/daemon.h \ - $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h \ + $(srcdir)/util/alloc.h $(srcdir)/util/timeval_func.h $(srcdir)/services/modstack.h \ $(srcdir)/util/storage/slabhash.h $(srcdir)/services/listen_dnsport.h $(srcdir)/services/cache/rrset.h \ $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rtt.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/module.h \ @@ -1357,7 +1362,7 @@ testpkts.lo testpkts.o: $(srcdir)/testcode/testpkts.c config.h $(srcdir)/testcod worker.lo worker.o: $(srcdir)/daemon/worker.c config.h $(srcdir)/util/log.h $(srcdir)/util/net_help.h \ $(srcdir)/util/random.h $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ - $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ + $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/util/timeval_func.h \ $(srcdir)/util/alloc.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ $(srcdir)/sldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/libunbound/unbound.h \ $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/daemon.h \ @@ -1409,7 +1414,7 @@ stats.lo stats.o: $(srcdir)/daemon/stats.c config.h $(srcdir)/daemon/stats.h $(s $(srcdir)/validator/val_kcache.h $(srcdir)/validator/val_neg.h replay.lo replay.o: $(srcdir)/testcode/replay.c config.h $(srcdir)/util/log.h $(srcdir)/util/net_help.h \ $(srcdir)/util/config_file.h $(srcdir)/testcode/replay.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/testcode/testpkts.h $(srcdir)/util/rbtree.h \ + $(srcdir)/testcode/testpkts.h $(srcdir)/util/rbtree.h $(srcdir)/util/timeval_func.h \ $(srcdir)/testcode/fake_event.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/rrdef.h fake_event.lo fake_event.o: $(srcdir)/testcode/fake_event.c config.h $(srcdir)/testcode/fake_event.h \ $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ @@ -1417,7 +1422,7 @@ fake_event.lo fake_event.o: $(srcdir)/testcode/fake_event.c config.h $(srcdir)/t $(srcdir)/util/locks.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/data/msgreply.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgencode.h $(srcdir)/util/data/dname.h \ $(srcdir)/util/edns.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/config_file.h \ - $(srcdir)/services/listen_dnsport.h $(srcdir)/services/outside_network.h \ + $(srcdir)/services/listen_dnsport.h $(srcdir)/services/outside_network.h $(srcdir)/util/timeval_func.h \ $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h \ $(srcdir)/testcode/replay.h $(srcdir)/testcode/testpkts.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/module.h \ $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h $(srcdir)/services/rpz.h \ diff --git a/contrib/unbound/README.md b/contrib/unbound/README.md index c3d9bc2492ef..3bbd38b3b78b 100644 --- a/contrib/unbound/README.md +++ b/contrib/unbound/README.md @@ -1,6 +1,6 @@ # Unbound -[![Travis Build Status](https://travis-ci.org/NLnetLabs/unbound.svg?branch=master)](https://travis-ci.org/NLnetLabs/unbound) +[![Github Build Status](https://github.com/NLnetLabs/unbound/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/NLnetLabs/unbound/actions) [![Packaging status](https://repology.org/badge/tiny-repos/unbound.svg)](https://repology.org/project/unbound/versions) [![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/unbound.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:unbound) [![Documentation Status](https://readthedocs.org/projects/unbound/badge/?version=latest)](https://unbound.readthedocs.io/en/latest/?badge=latest) @@ -17,7 +17,9 @@ You can learn more about Unbound by reading our ## Compiling Make sure you have the C toolchain, OpenSSL and its include files, and libexpat -installed. Unbound can be compiled and installed using: +installed. +If building from the repository source you also need flex and bison installed. +Unbound can be compiled and installed using: ``` ./configure && make && make install @@ -27,7 +29,7 @@ You can use libevent if you want. libevent is useful when using many (10000) outgoing ports. By default max 256 ports are opened at the same time and the builtin alternative is equally capable and a little faster. -Use the `--with-libevent=dir` configure option to compile Unbound with libevent +Use the `--with-libevent` configure option to compile Unbound with libevent support. ## Unbound configuration diff --git a/contrib/unbound/acx_nlnetlabs.m4 b/contrib/unbound/acx_nlnetlabs.m4 index cf436ec54bb6..f27615bd8bce 100644 --- a/contrib/unbound/acx_nlnetlabs.m4 +++ b/contrib/unbound/acx_nlnetlabs.m4 @@ -2,7 +2,9 @@ # Copyright 2009, Wouter Wijngaards, NLnet Labs. # BSD licensed. # -# Version 44 +# Version 46 +# 2023-05-04 fix to remove unused whitespace. +# 2023-01-26 fix -Wstrict-prototypes. # 2022-09-01 fix checking if nonblocking sockets work on OpenBSD. # 2021-08-17 fix sed script in ssldir split handling. # 2021-08-17 fix for openssl to detect split version, with ssldir_include @@ -187,7 +189,7 @@ dnl cache=`echo $1 | sed 'y%.=/+- %___p__%'` AC_CACHE_VAL(cv_prog_cc_flag_needed_$cache, [ echo '$2' > conftest.c -echo 'void f(){}' >>conftest.c +echo 'void f(void){}' >>conftest.c if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then eval "cv_prog_cc_flag_needed_$cache=no" else @@ -233,7 +235,7 @@ dnl DEPFLAG: set to flag that generates dependencies. AC_DEFUN([ACX_DEPFLAG], [ AC_MSG_CHECKING([$CC dependency flag]) -echo 'void f(){}' >conftest.c +echo 'void f(void){}' >conftest.c if test "`$CC -MM conftest.c 2>&1`" = "conftest.o: conftest.c"; then DEPFLAG="-MM" else @@ -272,7 +274,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED($C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAUL #include #endif -int test() { +int test(void) { int a; char **opts = NULL; struct timeval tv; @@ -309,7 +311,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED($C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAUL #include #endif -int test() { +int test(void) { int a; char **opts = NULL; struct timeval tv; @@ -335,7 +337,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED($C99FLAG, [ #include #include -int test() { +int test(void) { int a = 0; return a; } @@ -345,7 +347,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D_BSD_SOURCE -D_DEFAULT_SOURCE, [ #include -int test() { +int test(void) { int a; a = isascii(32); return a; @@ -356,7 +358,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D_GNU_SOURCE, [ #include -int test() { +int test(void) { struct in6_pktinfo inf; int a = (int)sizeof(inf); return a; @@ -370,7 +372,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D_GNU_SOURCE -D_FRSRESGID, [ #include -int test() { +int test(void) { int a = setresgid(0,0,0); a = setresuid(0,0,0); return a; @@ -385,7 +387,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D_POSIX_C_SOURCE=200112, #endif #include -int test() { +int test(void) { int a = 0; char *t; time_t time = 0; @@ -413,7 +415,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D__EXTENSIONS__, #include #endif -int test() { +int test(void) { int a; char **opts = NULL; struct timeval tv; @@ -475,7 +477,7 @@ fi dnl Setup ATTR_FORMAT config.h parts. dnl make sure you call ACX_CHECK_FORMAT_ATTRIBUTE also. AC_DEFUN([AHX_CONFIG_FORMAT_ATTRIBUTE], -[ +[ #ifdef HAVE_ATTR_FORMAT # define ATTR_FORMAT(archetype, string_index, first_to_check) \ __attribute__ ((format (archetype, string_index, first_to_check))) @@ -834,7 +836,7 @@ dnl try to see if an additional _LARGEFILE_SOURCE 1 is needed to get fseeko ACX_CHECK_COMPILER_FLAG_NEEDED(-D_LARGEFILE_SOURCE=1, [ #include -int test() { +int test(void) { int a = fseeko(stdin, 0, 0); return a; } @@ -859,7 +861,7 @@ char* (*f) () = getaddrinfo; #ifdef __cplusplus } #endif -int main() { +int main(void) { ; return 0; } @@ -923,7 +925,7 @@ cache=`echo $1 | sed 'y%.=/+-%___p_%'` AC_CACHE_VAL(cv_cc_deprecated_$cache, [ echo '$3' >conftest.c -echo 'void f(){ $2 }' >>conftest.c +echo 'void f(void){ $2 }' >>conftest.c if test -z "`$CC $CPPFLAGS $CFLAGS -c conftest.c 2>&1 | grep -e deprecated -e unavailable`"; then eval "cv_cc_deprecated_$cache=no" else @@ -1317,7 +1319,7 @@ AC_DEFUN([AHX_CONFIG_W32_FD_SET_T], #ifdef HAVE_WINSOCK2_H #define FD_SET_T (u_int) #else -#define FD_SET_T +#define FD_SET_T #endif ]) @@ -1355,7 +1357,7 @@ dnl $3: define value, 1 AC_DEFUN([AHX_CONFIG_FLAG_OMITTED], [#if defined($1) && !defined($2) #define $2 $3 -[#]endif ]) +[#]endif]) dnl Wrapper for AHX_CONFIG_FLAG_OMITTED for -D style flags dnl $1: the -DNAME or -DNAME=value string. diff --git a/contrib/unbound/acx_python.m4 b/contrib/unbound/acx_python.m4 index 16c0c6fd943f..c945d6c8989e 100644 --- a/contrib/unbound/acx_python.m4 +++ b/contrib/unbound/acx_python.m4 @@ -17,33 +17,62 @@ AC_DEFUN([AC_PYTHON_DEVEL],[ PYTHON_VERSION=`$PYTHON -c "import sys; \ print(sys.version.split()[[0]])"` fi + # calculate the version number components. + [ + v="$PYTHON_VERSION" + PYTHON_VERSION_MAJOR=`echo $v | sed 's/[^0-9].*//'` + if test -z "$PYTHON_VERSION_MAJOR"; then PYTHON_VERSION_MAJOR="0"; fi + v=`echo $v | sed -e 's/^[0-9]*$//' -e 's/[0-9]*[^0-9]//'` + PYTHON_VERSION_MINOR=`echo $v | sed 's/[^0-9].*//'` + if test -z "$PYTHON_VERSION_MINOR"; then PYTHON_VERSION_MINOR="0"; fi + v=`echo $v | sed -e 's/^[0-9]*$//' -e 's/[0-9]*[^0-9]//'` + PYTHON_VERSION_PATCH=`echo $v | sed 's/[^0-9].*//'` + if test -z "$PYTHON_VERSION_PATCH"; then PYTHON_VERSION_PATCH="0"; fi + ] - # Check if you have sysconfig - AC_MSG_CHECKING([for the sysconfig Python module]) - if ac_sysconfig_result=`$PYTHON -c "import sysconfig" 2>&1`; then + # For some systems, sysconfig exists, but has the wrong paths, + # on Debian 10, for python 2.7 and 3.7. So, we check the version, + # and for older versions try distutils.sysconfig first. For newer + # versions>=3.10, where distutils.sysconfig is deprecated, use + # sysconfig first and then attempt the other one. + py_distutils_first="no" + if test $PYTHON_VERSION_MAJOR -lt 3; then + py_distutils_first="yes" + fi + if test $PYTHON_VERSION_MAJOR -eq 3 -a $PYTHON_VERSION_MINOR -lt 10; then + py_distutils_first="yes" + fi + + # Check if you have the first module + if test "$py_distutils_first" = "yes"; then m="distutils"; else m="sysconfig"; fi + sysconfig_module="" + AC_MSG_CHECKING([for the $m Python module]) + if ac_modulecheck_result1=`$PYTHON -c "import $m" 2>&1`; then AC_MSG_RESULT([yes]) - sysconfig_module="sysconfig" - # if yes, use sysconfig, because distutils is deprecated. + sysconfig_module="$m" else AC_MSG_RESULT([no]) - # if no, try to use distutils + fi - # - # Check if you have distutils, else fail - # - AC_MSG_CHECKING([for the distutils Python package]) - if ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`; then + # if not found, try the other one. + if test -z "$sysconfig_module"; then + if test "$py_distutils_first" = "yes"; then m2="sysconfig"; else m2="distutils"; fi + AC_MSG_CHECKING([for the $m2 Python module]) + if ac_modulecheck_result2=`$PYTHON -c "import $m2" 2>&1`; then AC_MSG_RESULT([yes]) + sysconfig_module="$m2" else AC_MSG_RESULT([no]) - AC_MSG_ERROR([cannot import Python module "distutils". - Please check your Python installation. The error was: - $ac_distutils_result]) + AC_MSG_ERROR([cannot import Python module "$m", or "$m2". + Please check your Python installation. The errors are: + $m + $ac_modulecheck_result1 + $m2 + $ac_modulecheck_result2]) PYTHON_VERSION="" fi - - sysconfig_module="distutils.sysconfig" fi + if test "$sysconfig_module" = "distutils"; then sysconfig_module="distutils.sysconfig"; fi # # Check for Python include path diff --git a/contrib/unbound/cachedb/cachedb.c b/contrib/unbound/cachedb/cachedb.c index 245daa986967..b912be8ed54f 100644 --- a/contrib/unbound/cachedb/cachedb.c +++ b/contrib/unbound/cachedb/cachedb.c @@ -102,7 +102,6 @@ static int testframe_init(struct module_env* env, struct cachedb_env* cachedb_env) { struct testframe_moddata* d; - (void)env; verbose(VERB_ALGO, "testframe_init"); d = (struct testframe_moddata*)calloc(1, sizeof(struct testframe_moddata)); @@ -111,6 +110,15 @@ testframe_init(struct module_env* env, struct cachedb_env* cachedb_env) log_err("out of memory"); return 0; } + /* Register an EDNS option (65534) to bypass the worker cache lookup + * for testing */ + if(!edns_register_option(LDNS_EDNS_UNBOUND_CACHEDB_TESTFRAME_TEST, + 1 /* bypass cache */, + 0 /* no aggregation */, env)) { + log_err("testframe_init, could not register test opcode"); + free(d); + return 0; + } lock_basic_init(&d->lock); lock_protect(&d->lock, d, sizeof(*d)); return 1; @@ -218,6 +226,8 @@ static int cachedb_apply_cfg(struct cachedb_env* cachedb_env, struct config_file* cfg) { const char* backend_str = cfg->cachedb_backend; + if(!backend_str || *backend_str==0) + return 1; cachedb_env->backend = cachedb_find_backend(backend_str); if(!cachedb_env->backend) { log_err("cachedb: cannot find backend name '%s'", backend_str); @@ -228,7 +238,7 @@ cachedb_apply_cfg(struct cachedb_env* cachedb_env, struct config_file* cfg) return 1; } -int +int cachedb_init(struct module_env* env, int id) { struct cachedb_env* cachedb_env = (struct cachedb_env*)calloc(1, @@ -255,11 +265,11 @@ cachedb_init(struct module_env* env, int id) return 0; } cachedb_env->enabled = 1; - if(env->cfg->serve_expired_reply_ttl) + if(env->cfg->serve_expired && env->cfg->serve_expired_reply_ttl) log_warn( "cachedb: serve-expired-reply-ttl is set but not working for data " - "originating from the external cache; 0 TLL is used for those."); - if(env->cfg->serve_expired_client_timeout) + "originating from the external cache; 0 TTL is used for those."); + if(env->cfg->serve_expired && env->cfg->serve_expired_client_timeout) log_warn( "cachedb: serve-expired-client-timeout is set but not working for " "data originating from the external cache; expired data are used " @@ -267,19 +277,16 @@ cachedb_init(struct module_env* env, int id) return 1; } -void +void cachedb_deinit(struct module_env* env, int id) { struct cachedb_env* cachedb_env; if(!env || !env->modinfo[id]) return; cachedb_env = (struct cachedb_env*)env->modinfo[id]; - /* free contents */ - /* TODO */ if(cachedb_env->enabled) { (*cachedb_env->backend->deinit)(env, cachedb_env); } - free(cachedb_env); env->modinfo[id] = NULL; } @@ -406,6 +413,14 @@ prep_data(struct module_qstate* qstate, struct sldns_buffer* buf) if(qstate->return_msg->rep->ttl == 0 && !qstate->env->cfg->serve_expired) return 0; + + /* The EDE is added to the out-list so it is encoded in the cached message */ + if (qstate->env->cfg->ede && qstate->return_msg->rep->reason_bogus != LDNS_EDE_NONE) { + edns_opt_list_append_ede(&edns.opt_list_out, qstate->env->scratch, + qstate->return_msg->rep->reason_bogus, + qstate->return_msg->rep->reason_bogus_str); + } + if(verbosity >= VERB_ALGO) log_dns_msg("cachedb encoding", &qstate->return_msg->qinfo, qstate->return_msg->rep); @@ -502,6 +517,7 @@ parse_data(struct module_qstate* qstate, struct sldns_buffer* buf) { struct msg_parse* prs; struct edns_data edns; + struct edns_option* ede; uint64_t timestamp, expiry; time_t adjust; size_t lim = sldns_buffer_limit(buf); @@ -539,6 +555,24 @@ parse_data(struct module_qstate* qstate, struct sldns_buffer* buf) if(!qstate->return_msg) return 0; + /* We find the EDE in the in-list after parsing */ + if(qstate->env->cfg->ede && + (ede = edns_opt_list_find(edns.opt_list_in, LDNS_EDNS_EDE))) { + if(ede->opt_len >= 2) { + qstate->return_msg->rep->reason_bogus = + sldns_read_uint16(ede->opt_data); + } + /* allocate space and store the error string and it's size */ + if(ede->opt_len > 2) { + size_t ede_len = ede->opt_len - 2; + qstate->return_msg->rep->reason_bogus_str = regional_alloc( + qstate->region, sizeof(char) * (ede_len+1)); + memcpy(qstate->return_msg->rep->reason_bogus_str, + ede->opt_data+2, ede_len); + qstate->return_msg->rep->reason_bogus_str[ede_len] = 0; + } + } + qstate->return_rcode = LDNS_RCODE_NOERROR; /* see how much of the TTL expired, and remove it */ @@ -630,11 +664,15 @@ cachedb_extcache_store(struct module_qstate* qstate, struct cachedb_env* ie) * See if unbound's internal cache can answer the query */ static int -cachedb_intcache_lookup(struct module_qstate* qstate) +cachedb_intcache_lookup(struct module_qstate* qstate, struct cachedb_env* cde) { uint8_t* dpname=NULL; size_t dpnamelen=0; struct dns_msg* msg; + /* for testframe bypass this lookup */ + if(cde->backend == &testframe_backend) { + return 0; + } if(iter_stub_fwd_no_cache(qstate, &qstate->qinfo, &dpname, &dpnamelen)) return 0; /* no cache for these queries */ @@ -693,6 +731,7 @@ cachedb_handle_query(struct module_qstate* qstate, struct cachedb_qstate* ATTR_UNUSED(iq), struct cachedb_env* ie, int id) { + qstate->is_cachedb_answer = 0; /* check if we are enabled, and skip if so */ if(!ie->enabled) { /* pass request to next module */ @@ -709,7 +748,7 @@ cachedb_handle_query(struct module_qstate* qstate, /* lookup inside unbound's internal cache. * This does not look for expired entries. */ - if(cachedb_intcache_lookup(qstate)) { + if(cachedb_intcache_lookup(qstate, ie)) { if(verbosity >= VERB_ALGO) { if(qstate->return_msg->rep) log_dns_msg("cachedb internal cache lookup", @@ -746,6 +785,7 @@ cachedb_handle_query(struct module_qstate* qstate, qstate->ext_state[id] = module_wait_module; return; } + qstate->is_cachedb_answer = 1; /* we are done with the query */ qstate->ext_state[id] = module_finished; return; @@ -768,12 +808,18 @@ static void cachedb_handle_response(struct module_qstate* qstate, struct cachedb_qstate* ATTR_UNUSED(iq), struct cachedb_env* ie, int id) { + qstate->is_cachedb_answer = 0; /* check if we are not enabled or instructed to not cache, and skip */ if(!ie->enabled || qstate->no_cache_store) { /* we are done with the query */ qstate->ext_state[id] = module_finished; return; } + if(qstate->env->cfg->cachedb_no_store) { + /* do not store the item in the external cache */ + qstate->ext_state[id] = module_finished; + return; + } /* store the item into the backend cache */ cachedb_extcache_store(qstate, ie); diff --git a/contrib/unbound/cachedb/redis.c b/contrib/unbound/cachedb/redis.c index 16c3741f786b..6cc975901df2 100644 --- a/contrib/unbound/cachedb/redis.c +++ b/contrib/unbound/cachedb/redis.c @@ -56,19 +56,43 @@ struct redis_moddata { int numctxs; /* number of ctx entries */ const char* server_host; /* server's IP address or host name */ int server_port; /* server's TCP port */ + const char* server_path; /* server's unix path, or "", NULL if unused */ + const char* server_password; /* server's AUTH password, or "", NULL if unused */ struct timeval timeout; /* timeout for connection setup and commands */ + int logical_db; /* the redis logical database to use */ }; static redisReply* redis_command(struct module_env*, struct cachedb_env*, const char*, const uint8_t*, size_t); +static void +moddata_clean(struct redis_moddata** moddata) { + if(!moddata || !*moddata) + return; + if((*moddata)->ctxs) { + int i; + for(i = 0; i < (*moddata)->numctxs; i++) { + if((*moddata)->ctxs[i]) + redisFree((*moddata)->ctxs[i]); + } + free((*moddata)->ctxs); + } + free(*moddata); + *moddata = NULL; +} + static redisContext* redis_connect(const struct redis_moddata* moddata) { redisContext* ctx; - ctx = redisConnectWithTimeout(moddata->server_host, - moddata->server_port, moddata->timeout); + if(moddata->server_path && moddata->server_path[0]!=0) { + ctx = redisConnectUnixWithTimeout(moddata->server_path, + moddata->timeout); + } else { + ctx = redisConnectWithTimeout(moddata->server_host, + moddata->server_port, moddata->timeout); + } if(!ctx || ctx->err) { const char *errstr = "out of memory"; if(ctx) @@ -80,9 +104,31 @@ redis_connect(const struct redis_moddata* moddata) log_err("failed to set redis timeout"); goto fail; } + if(moddata->server_password && moddata->server_password[0]!=0) { + redisReply* rep; + rep = redisCommand(ctx, "AUTH %s", moddata->server_password); + if(!rep || rep->type == REDIS_REPLY_ERROR) { + log_err("failed to authenticate with password"); + freeReplyObject(rep); + goto fail; + } + freeReplyObject(rep); + } + if(moddata->logical_db > 0) { + redisReply* rep; + rep = redisCommand(ctx, "SELECT %d", moddata->logical_db); + if(!rep || rep->type == REDIS_REPLY_ERROR) { + log_err("failed to set logical database (%d)", + moddata->logical_db); + freeReplyObject(rep); + goto fail; + } + freeReplyObject(rep); + } + verbose(VERB_OPS, "Connection to Redis established"); return ctx; - fail: +fail: if(ctx) redisFree(ctx); return NULL; @@ -94,28 +140,36 @@ redis_init(struct module_env* env, struct cachedb_env* cachedb_env) int i; struct redis_moddata* moddata = NULL; - verbose(VERB_ALGO, "redis_init"); + verbose(VERB_OPS, "Redis initialization"); moddata = calloc(1, sizeof(struct redis_moddata)); if(!moddata) { log_err("out of memory"); - return 0; + goto fail; } moddata->numctxs = env->cfg->num_threads; moddata->ctxs = calloc(env->cfg->num_threads, sizeof(redisContext*)); *** 24570 LINES SKIPPED *** From nobody Thu Mar 28 05:07:56 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V4s4F3YqPz5GCjV; Thu, 28 Mar 2024 05:07: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 4V4s4D6Zmjz4X9L; Thu, 28 Mar 2024 05:07:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711602476; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=91slPkMqdoAz+DhwLeVWcs9xbGRS5x/Q52vED0hTfP4=; b=KPzxpWweRf4gwwUIuVAa/0ASmk43gDGGYJuIl0ZHazVWkiPYFQFxjEyV0csFHiIwXqz/CD hLKxy96/QHtPU7HjL5nft27otkrJvBWnSv/BL3IgVkDbfwajqaieQWinyUgYFMUVOQxnS/ 3/gD8rGE7uVMetqkGQgL+z8+9sCbNoQd05hw2z+g+TbVv9MVCcy4uc9s2y/AzL0F7UvHL+ dPBwrqyJaswgD3VDrmQ44TsfKcwwu+4F9mi/FMNfAp2IWYF0zG407leKjf74op/Ixv2ZGS b5JQJiFCs1E8txM/CfURdAm9NrR1cw8JIv2QpA/g2OQyiwYoXyWqmmIjoStmaQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711602476; a=rsa-sha256; cv=none; b=Wa1I4tcDEMJ0bhm3GluQwiiAdBYNeZ8NftxA7seT6Hxw4g7E8zB2GoQXFKUuDccSPe7/Ey R8Ydlv0VQnrK2ZRz36MhMr63jwAViyS86+8ZjG51gWM5kyY5tcRnKJda4ruDKN3gJd9425 hvXX4aqwQROTpEU3gNPeVQcW5Y+AztDPwbuxoLZfm1VmcMRa0Rj0UYJXNeIGOVhi1uwVs/ bBZHjjDBECx8rZwoeNeN8zwT90LODxzfTUL47DmiWGNAlcqsZMWNbjvcoGsOUScymK0dTl Zp01cEFlilb0OXXHFahO1lxJo/p78NplC7IQOlp/JxDy9qCAnLpkBxp/xP5IoQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711602476; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=91slPkMqdoAz+DhwLeVWcs9xbGRS5x/Q52vED0hTfP4=; b=rwm5doZ8chpO+AdPRIgmADCBeFbmZkpvxOsLo6BHaMfgrnosorqhzcG01+3ab/dMo/6qpo t8sC2zNK6vFskisCHYKAH4dX3ek5+tUNoS4xkj0+CmlpyW4OxMCjw4FJ6mnvcfMuyPDGBc jvaMBPWrOWxPRjCqZ90VDh7zGsZQczxUog5km2Xkt2GlsRgF3e3odi/ICa+Ikj1bDWYTQM Xt32DC/hM56HsC3mtyZmBGTgoaiHVlj+C7aV4l77xB1hRdF6LLlPat7JxFzFe3rFVciFCv 40eKFqiNWNbMO9bTLVvVqgM5U5WArNEG9TlRBBAkxH8GuCI1opTF+HOmFLMJrA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V4s4D6C7JzF4p; Thu, 28 Mar 2024 05:07:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42S57us5099885; Thu, 28 Mar 2024 05:07:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42S57uoi099882; Thu, 28 Mar 2024 05:07:56 GMT (envelope-from git) Date: Thu, 28 Mar 2024 05:07:56 GMT Message-Id: <202403280507.42S57uoi099882@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Tetlow Subject: git: f5ac4e174fdd - releng/13.2 - Add UPDATING entries and bump the branch version. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gordon X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.2 X-Git-Reftype: branch X-Git-Commit: f5ac4e174fdd3497749e351c27aafb34171c5730 Auto-Submitted: auto-generated The branch releng/13.2 has been updated by gordon: URL: https://cgit.FreeBSD.org/src/commit/?id=f5ac4e174fdd3497749e351c27aafb34171c5730 commit f5ac4e174fdd3497749e351c27aafb34171c5730 Author: Gordon Tetlow AuthorDate: 2024-03-28 03:08:55 +0000 Commit: Gordon Tetlow CommitDate: 2024-03-28 05:01:26 +0000 Add UPDATING entries and bump the branch version. Approved by: so --- UPDATING | 11 +++++++++++ sys/conf/newvers.sh | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index 89a4b7482faa..4f3424d33f8e 100644 --- a/UPDATING +++ b/UPDATING @@ -12,6 +12,17 @@ Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before updating system packages and/or ports. +20240327: + 13.2-RELEASE-p11 SA-24:03.unbound + EN-24:05.tty + EN-24:06.wireguard + + Fix multiple vulnerabilities in unbound [SA-24:03.unbound] + + Fix tty kernel panic [EN-24:05.tty] + + Fix insufficient barriers in WireGuard if_wg(4) [EN-24:06.wireguard] + 20240214: 13.2-RELEASE-p10 SA-24:01.bhyveload SA-24:02.tty diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index e8701ba542fe..b582ddf4343e 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -54,7 +54,7 @@ TYPE="FreeBSD" REVISION="13.2" -BRANCH="RELEASE-p10" +BRANCH="RELEASE-p11" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From nobody Thu Mar 28 07:14:19 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V4vt33mbMz5GNJd; Thu, 28 Mar 2024 07:14: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 4V4vt33Dlmz4hXR; Thu, 28 Mar 2024 07:14:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711610059; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WRdAvMj7NaRtrY/6MYJ/YGDwzYUqTsRfHl3ZWKNBoVY=; b=CCHVuRA97J0lJJhetVJ2eoEbyvh2MBW2KlG8pPWZpzwsZyipeE2VlEsyDo34KVYiuoN6Ic 78ZeO2JNhNelp7OV4p9zDmWpks5CUttAFh4UVmKFdrapsQI7/cPXmud0aaDgNupJ1jmvqV HpBZ9N4Lq4mCNC2EPfgwFrBxIJSk/ec/gNXEMYe871CoMp06Heww5q0OoqPr6GzNdx272G nAB8Rr4CZypwNfJ8ru71lPBRPVtWlft874JvP9C1T5SKt3H+s5HTO7rwaFOqS+m5WUBEAp MpPJJTyrsqcQrLoKv08Etl2w9+3GNL+FDNaDeUrvFYDtcwj5GUJTKXRuSh/8HA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711610059; a=rsa-sha256; cv=none; b=GJ2mVmEDtuAdOIHaFVH15aHWhc2frMehxzXLa4ShOtX7u1ew3k+ZNLno0l1zksNiKCqEzF U/e+XYbDSh7tp3dWotAePQyuBqN2A2LM02Q+6vaVO0XfNJZ/tp1HN70g5jxADMEcy7Zl0/ MOcdFffxeNGRyaampxTr+z0/lq5vYgI77FY0vmhYpcqPeqrNJRYVWZyMKBFjiVMtWpVr5d K3Bu0EACnpgqjj0c1aN8QnVYlMm48QIYFnuKa9aIVxk5Vzva7hpHMu/K1f7za5+e8VhAu5 gs3qRezloYnoBYWxGISXSSNQU/ZeFtJRUAK5fgPbFRAKXP97WKJMxi1k2qdmlQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711610059; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WRdAvMj7NaRtrY/6MYJ/YGDwzYUqTsRfHl3ZWKNBoVY=; b=HlmCj8BQT9QeM0fZ6rC6q5VIhhlMcOGQ4GjjYV+6fJi0iveo+PdsD+AO4vdtkw+R+zws2v Fv8WL9vCkUfAF9J4wUF2b0Fx1Pm0YuuomxnNltLH56tsrk0Xg5y4KS0Vc8r9F01gBFEdNc 8gE3S2PAfLjVLR9F84FRrLt+znAz8bO1GCv5IBcFaOoC7gjpFsAb/TQ9CZS60srCjbjDN0 RwtGsoJPjzu/WeS4gu14V8sV1yptOq8ddoqctzdYUZCrnCqgkiJPyEzK+2guWvdLHokZmM WHdfvFmS20WTU1TmY7UxPbygZQGxoLtyxR5MtCDvKpxK+8ESAdJi2W28UtTkWA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V4vt32r31zJB7; Thu, 28 Mar 2024 07:14:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42S7EJm1018806; Thu, 28 Mar 2024 07:14:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42S7EJQg018803; Thu, 28 Mar 2024 07:14:19 GMT (envelope-from git) Date: Thu, 28 Mar 2024 07:14:19 GMT Message-Id: <202403280714.42S7EJQg018803@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Tetlow Subject: git: f07351f90aa3 - releng/13.3 - if_wg: use proper barriers around pkt->p_state List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gordon X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.3 X-Git-Reftype: branch X-Git-Commit: f07351f90aa37d8fc1b86e96d76447eec884d237 Auto-Submitted: auto-generated The branch releng/13.3 has been updated by gordon: URL: https://cgit.FreeBSD.org/src/commit/?id=f07351f90aa37d8fc1b86e96d76447eec884d237 commit f07351f90aa37d8fc1b86e96d76447eec884d237 Author: Kyle Evans AuthorDate: 2024-03-15 01:19:18 +0000 Commit: Gordon Tetlow CommitDate: 2024-03-28 07:13:08 +0000 if_wg: use proper barriers around pkt->p_state Without appropriate load-synchronization to pair with store barriers in wg_encrypt() and wg_decrypt(), the compiler and hardware are often allowed to reorder these loads in wg_deliver_out() and wg_deliver_in() such that we end up with a garbage or intermediate mbuf that we try to pass on. The issue is particularly prevalent with the weaker memory models of !x86 platforms. Switch from the big-hammer wmb() to more explicit acq/rel atomics to both make it obvious what we're syncing up with, and to avoid somewhat hefty fences on platforms that don't necessarily need this. With this patch, my dual-iperf3 reproducer is dramatically more stable than it is without on aarch64. PR: 264115 Reviewed by: andrew, zlei Approved by: so Approved by: re (so, implicit, appease the commit-hook) Security: FreeBSD-EN-24:06.wireguard (cherry picked from commit 3705d679a6344c957cae7a1b6372a8bfb8c44f0e) (cherry picked from commit 806e51f81dbae21feb6e7ddd95d2ed2a28b04f8f) --- sys/dev/wg/if_wg.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sys/dev/wg/if_wg.c b/sys/dev/wg/if_wg.c index 89b5e52b7b2b..6638524301b8 100644 --- a/sys/dev/wg/if_wg.c +++ b/sys/dev/wg/if_wg.c @@ -1519,8 +1519,7 @@ wg_encrypt(struct wg_softc *sc, struct wg_packet *pkt) state = WG_PACKET_CRYPTED; out: pkt->p_mbuf = m; - wmb(); - pkt->p_state = state; + atomic_store_rel_int(&pkt->p_state, state); GROUPTASK_ENQUEUE(&peer->p_send); noise_remote_put(remote); } @@ -1592,8 +1591,7 @@ wg_decrypt(struct wg_softc *sc, struct wg_packet *pkt) state = WG_PACKET_CRYPTED; out: pkt->p_mbuf = m; - wmb(); - pkt->p_state = state; + atomic_store_rel_int(&pkt->p_state, state); GROUPTASK_ENQUEUE(&peer->p_recv); noise_remote_put(remote); } @@ -1649,7 +1647,7 @@ wg_deliver_out(struct wg_peer *peer) wg_peer_get_endpoint(peer, &endpoint); while ((pkt = wg_queue_dequeue_serial(&peer->p_encrypt_serial)) != NULL) { - if (pkt->p_state != WG_PACKET_CRYPTED) + if (atomic_load_acq_int(&pkt->p_state) != WG_PACKET_CRYPTED) goto error; m = pkt->p_mbuf; @@ -1691,7 +1689,7 @@ wg_deliver_in(struct wg_peer *peer) struct epoch_tracker et; while ((pkt = wg_queue_dequeue_serial(&peer->p_decrypt_serial)) != NULL) { - if (pkt->p_state != WG_PACKET_CRYPTED) + if (atomic_load_acq_int(&pkt->p_state) != WG_PACKET_CRYPTED) goto error; m = pkt->p_mbuf; From nobody Thu Mar 28 07:14:20 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V4vt44ZmGz5GNLr; Thu, 28 Mar 2024 07:14: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 4V4vt43xl7z4hVL; Thu, 28 Mar 2024 07:14:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711610060; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SgMpPZDla0vp+VD8lMA5wTEuqbgzR5smiI/oFIzW+lQ=; b=ICvc2RFtdBVXlxJVU565ApngnMOy99T0bRUd73G0om4pFKGs3bu3HK6gfiHobY5CO9aw/O mcTKnjx5GLY5BBKQM87O1S9CWQjYEIQGFQTasg142c25LmEs/5BJ3LZeVQv601ndSj0RHr HarKOYJ2i6YK3TR+jPzEjiCEknFe9OazVTSR3L5etZS7EzG7RtcEYL1W5966AEZQNxod8s D+cl0fxDgSyVf8zSxAFbTFlcWwDzZnMn56jQsuEpo59bNGR4Z2YNPdMQ4JWoYSDHlQ619D uUPfcCizqswehb6gMHhJkqvODfXVlz8zie7FQ633x6kXSCH/P1em0lHBaQfGOw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711610060; a=rsa-sha256; cv=none; b=P87TDRu7xIURQsjkCFwShYJidRvWf1MepoWghmRw03HOf5fNptx5mkjuvUFfD5EAztR+ZB zRXjEH28GZXZxKliLwuh9V9X0XINFElRMwyz1uO4ePK3Oww/ebUDLTXqu29zBK0xxEnV4O FmKqurOJD39OG1Fm/rCA6ooJLAokiXed1BhzO41g5CAOSBiiYYzUPhdVEH+tuHPDpw5Z0N VFSH3k5rV9wFY7A7roQmIUoNaO5ToZubaBMxejh/D6jt7+Z6z2MtOAz2h/6x3OOSljED7f jYsqL5Y6PX+ZqXDW/VYBpaW4LtJzqxHgyjuk6sfFUL/sHvFjjJFCCZKjQexD3Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711610060; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SgMpPZDla0vp+VD8lMA5wTEuqbgzR5smiI/oFIzW+lQ=; b=i3HXlFxmkLFFxCEqMLJgTus31/UeQU0sRvgm1nOk3ARG83fXwWtc5WeIWMwiK+ChBTJGnu KoMu8i5YVW/S6Iz3q4ZY5yTdcelwq1zo3eGGn4XyedzJTT/kVke6gt2kLMrQn+zIsMj4sj j8qyuQjP5PW3/qYBBO2l2XTfxr+7m/5cxZFvyOvzkr1IRldBPkha4eR4Y0y9nkzJl+ADgq hylsIjcKswSBz+5dl6TIeoSqmTnuvWXMrytQ/N0/f6H1dWheYESV2GJfOVoKJEblb4M5IY pXNF0RPAXLjJfD2B/qPqQQqgT1ECmIrIYhZmX/0db112AD5PU8k0UFakUdldkA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V4vt43YxXzJB8; Thu, 28 Mar 2024 07:14:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42S7EKce018859; Thu, 28 Mar 2024 07:14:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42S7EKsZ018856; Thu, 28 Mar 2024 07:14:20 GMT (envelope-from git) Date: Thu, 28 Mar 2024 07:14:20 GMT Message-Id: <202403280714.42S7EKsZ018856@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Tetlow Subject: git: 26059a4f2c14 - releng/13.3 - Merge commit f800c1f3b207 from llvm-project (by Arthur Eubanks): List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gordon X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.3 X-Git-Reftype: branch X-Git-Commit: 26059a4f2c14d72d114175a05f75bebe43aa6efa Auto-Submitted: auto-generated The branch releng/13.3 has been updated by gordon: URL: https://cgit.FreeBSD.org/src/commit/?id=26059a4f2c14d72d114175a05f75bebe43aa6efa commit 26059a4f2c14d72d114175a05f75bebe43aa6efa Author: Dimitry Andric AuthorDate: 2024-03-04 20:30:54 +0000 Commit: Gordon Tetlow CommitDate: 2024-03-28 07:13:15 +0000 Merge commit f800c1f3b207 from llvm-project (by Arthur Eubanks): [PEI] Don't zero out noreg operands A tail call may have $noreg operands. Fixes a crash. Reviewed By: xgupta Differential Revision: https://reviews.llvm.org/D156485 This should fix an assertion failure building qemu, specifically those parts using -fzero-call-used-regs. Reported by: Daniel Berrangé PR: 277474 MFC after: 3 days Approved by: so Approved by: re (so, implicit, appease the commit-hook) Security: FreeBSD-EN-24:07.clang (cherry picked from commit a39b3aa463f3474fabb3aedb5aecf943b54b4357) (cherry picked from commit 961271f952fc390396f967d50903291e3e6c59c6) --- contrib/llvm-project/llvm/lib/CodeGen/PrologEpilogInserter.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/contrib/llvm-project/llvm/lib/CodeGen/PrologEpilogInserter.cpp b/contrib/llvm-project/llvm/lib/CodeGen/PrologEpilogInserter.cpp index e323aaaeefaf..49047719fdaa 100644 --- a/contrib/llvm-project/llvm/lib/CodeGen/PrologEpilogInserter.cpp +++ b/contrib/llvm-project/llvm/lib/CodeGen/PrologEpilogInserter.cpp @@ -1285,6 +1285,8 @@ void PEI::insertZeroCallUsedRegs(MachineFunction &MF) { continue; MCRegister Reg = MO.getReg(); + if (!Reg) + continue; // This picks up sibling registers (e.q. %al -> %ah). for (MCRegUnit Unit : TRI.regunits(Reg)) @@ -1308,8 +1310,11 @@ void PEI::insertZeroCallUsedRegs(MachineFunction &MF) { if (!MO.isReg()) continue; - for (const MCPhysReg &Reg : - TRI.sub_and_superregs_inclusive(MO.getReg())) + MCRegister Reg = MO.getReg(); + if (!Reg) + continue; + + for (const MCPhysReg Reg : TRI.sub_and_superregs_inclusive(Reg)) RegsToZero.reset(Reg); } } From nobody Thu Mar 28 07:14:21 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V4vt56cvGz5GNCr; Thu, 28 Mar 2024 07:14: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 4V4vt55Bg1z4hk7; Thu, 28 Mar 2024 07:14:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711610061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J5+IVBUSXWzjaGxo6nkpiY83EBcF5Z+nnVtLA22tESA=; b=jQmSrInbibjFqkQ5zIaf0JOqZ/G+iv+K+c2qYyVEkKbD/5szpcXifaV61K/kYrIGM2pOut /bgz2Gvgpe/FvkJQw1ZZ7Lz+qun69BPkRUbJOck5yf1rWseSVZiAU+PDVur5cH4tkHubbK AbYJkeG2PDyKGYVfgYfU4uF/d2BB+uuR0d05LFmrSZG1nbc4e2Y1oMxpbpIdrwE8vfYsKt 0cPH+RDQ51l2dQF9jfQ0NiHVsueOCecSUFsWPG3JEsGOFzF8WOkr6AJlGOBJlBUbFr0vus XknPdSyX/bOpStBx/7c7ZtHq3dajquBbDBg5lSXq4RJT19EYSnHPxbWMiyDHzQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711610061; a=rsa-sha256; cv=none; b=U4J3jgzC98M41cNeXm0G/3SMUPjQ9qHeO3Se428KqGepyvtV5OObeGLkBZZRNY9TFiGgLc ZcZAVhFddHFUpTfbIWgqtF+/eQgAR59CiOw3zXXp3XRQ4W0zO4M5FfZ7OSjbZn2KyFCocd 8QjtUwG+lrA+o5CqmdYbiUf8g4XO7kWBsBNmel2Z1d2cpOOVx0JHQunbADBaYhzef8wF5H rAAHHixtXBgzWOVZq0N6vJCO7knb6DwCB+MMUKOsfreWDB+dJYxpX8B93KgnZ4GjVZeKO4 rmOvO6jTMQrzYWiHJWAMW9eLk9dR5H1kjrl2ZOjnhehxSShIv14+kehHJzaMiw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711610061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J5+IVBUSXWzjaGxo6nkpiY83EBcF5Z+nnVtLA22tESA=; b=a8Zb3dZNl4L/S8RuDFiLt4TMnZ4dp9jy81U0L6m45+JBnqGgsfL0NnkPdYo+gKfpIndKsr g6TUk2BQfi9TV/dmDb9YXoqA8bMcUuhmj6rMfQJk7MKObLaLL69GY5E9tA2uwX3aDbTJX5 LUx9tEmHyHAm6XiLuQWyQJTSSRJA3NCfasIIO2cbJto5/0bnExuX+Q2MiciQVm+g8yRxUd 7ICr3DPVsBCmDVziY9BupoEFD1Nd4tyBcfOp0iGz/n8m6H42b7TZvBBsetCmETaiJimgUh kkwHE+haYM9Z4XJSzoGm6AwUIh1dnZndq6BPtvfo/WooJYU8x1M61RTGM4b15w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V4vt54cMszJHx; Thu, 28 Mar 2024 07:14:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42S7ELrS018917; Thu, 28 Mar 2024 07:14:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42S7EL3n018915; Thu, 28 Mar 2024 07:14:21 GMT (envelope-from git) Date: Thu, 28 Mar 2024 07:14:21 GMT Message-Id: <202403280714.42S7EL3n018915@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Tetlow Subject: git: 7a0d63c90932 - releng/13.3 - Add UPDATING entries and bump the branch version. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gordon X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.3 X-Git-Reftype: branch X-Git-Commit: 7a0d63c9093222938f26cd63ff742e555168de77 Auto-Submitted: auto-generated The branch releng/13.3 has been updated by gordon: URL: https://cgit.FreeBSD.org/src/commit/?id=7a0d63c9093222938f26cd63ff742e555168de77 commit 7a0d63c9093222938f26cd63ff742e555168de77 Author: Gordon Tetlow AuthorDate: 2024-03-28 03:03:42 +0000 Commit: Gordon Tetlow CommitDate: 2024-03-28 07:13:21 +0000 Add UPDATING entries and bump the branch version. Approved by: so Approved by: re (so, implicit, appease the commit-hook) --- UPDATING | 8 ++++++++ sys/conf/newvers.sh | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index dd89cda0dec5..9e07b0d7e3a3 100644 --- a/UPDATING +++ b/UPDATING @@ -12,6 +12,14 @@ Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before updating system packages and/or ports. +20240327: + 13.3-RELEASE-p1 EN-24:06.wireguard + EN-24:07.clang + + Fix insufficient barriers in WireGuard if_wg(4) [EN-24:06.wireguard] + + Fix clang crash when certain optimization is enabled [EN-24:07.clang] + 20240305: 13.3-RELEASE. diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 2ef43d273cd0..4d4f28badbac 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -53,7 +53,7 @@ TYPE="FreeBSD" REVISION="13.3" -BRANCH="RELEASE" +BRANCH="RELEASE-p1" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From nobody Thu Mar 28 19:35:54 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V5DKk3mjBz5FrQ0; Thu, 28 Mar 2024 19:35:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4V5DKk2vlLz4SNZ; Thu, 28 Mar 2024 19:35:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711654554; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vHOZJ4IEPnPM/ohsabJMuvFFPAvET9Fp31tw2JiKKqk=; b=u+cHG/GEuFsL1K/uYk1R2yGIwJsTuSKE2dK37wuMyktnNGHsCF2iuJw6gUBIOm4qbJlohi mnr5SL9eQQqGaYJJqu0wSZxT9vFRezpWrRG1VTd0jiNLpj9d6Ec//XfU/bhyHP3TFCVzMC fm+RUY5JcedCkskaFwr5wmPZcQE2ZsFYOu3IaLYDBwWc+5e+C1PNSfniL7RBd106cDIFiJ FtkLBy3mniRSsnHGjQi5obSbbNzOFQ0AgD+P+CUWKju7UYw8zsMLzYxFysHX7d2Rj9a7uK 3YJ/iP8xDdS/KdEfVMhJbtxHGwRlYQUHlsWhFLTYSPe2IcZKPAnQzObnEWLEHQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711654554; a=rsa-sha256; cv=none; b=OXpx8hw1cYLMDt0fbUrYYkImOUyhJ52fYnP+NGiqd9d7ASU3u0io76s93Yy08ifo6GNIui 1xMGXUFM0AvNxwDiEU1lwgyNiUIxwp0Xv9pnMcJ6c+C/EY3EOXPfCwhj3xg1ksPOeS4GR5 +cdRJpEL0orEKiJrX89pPcIShKk0hLvc/Trz9CeTgjZi8dA163w46xD7MnVSHivNo4hmmb 25gD3aKw/HSxgYktccqmQxNeHHgYyvxJMGrDjHx02qbtA7JZQNWrdYF+wZT126ZuMfugCE exbhSz14atdxrIf0Hsn3nFGWNsnA4vdgIoLjtinvsgpu8mWm7WlFotlVUHUudA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711654554; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vHOZJ4IEPnPM/ohsabJMuvFFPAvET9Fp31tw2JiKKqk=; b=nHvGs7LwyxLPdmKq55M9ITxOlKjSQOnFDoTJvLz8cVBI8+El8FC3bmCbDJmUv44herFw2G 7KOenzsyHGE7ukc7UPAKSTiYcH+L5ixlcfyhBuJaO++NFaqOAW/CfiJ47skbMN0xV4yBkT 2gjhWt4JmBCoThFBHlhOm8rTOjFqhaDD5XQMosQQjD5TbMK01dU/ujS7aH+oDwYKRkcHzB SCDvN2rZOlHPn/QypQUqf0pTixpEQPZ6KtzFs/IilMYdvjIdMmh350KsIEZkiy3BERw2Sn SrGDJXPKvJOj6MR44QfTcoFjuRQQVzoKhOsEA/afgMOVK0OxrGfQ8mMUq6KeNQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V5DKk2WJjzgmC; Thu, 28 Mar 2024 19:35:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42SJZseX072259; Thu, 28 Mar 2024 19:35:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42SJZseC072256; Thu, 28 Mar 2024 19:35:54 GMT (envelope-from git) Date: Thu, 28 Mar 2024 19:35:54 GMT Message-Id: <202403281935.42SJZseC072256@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gleb Smirnoff Subject: git: d6e1ae659b11 - stable/14 - carp: check CARP status in in_localip_fib(), in6_localip_fib() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d6e1ae659b11a13a9c289424735394173907c1d3 Auto-Submitted: auto-generated The branch stable/14 has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=d6e1ae659b11a13a9c289424735394173907c1d3 commit d6e1ae659b11a13a9c289424735394173907c1d3 Author: Gleb Smirnoff AuthorDate: 2024-03-19 18:48:59 +0000 Commit: Gleb Smirnoff CommitDate: 2024-03-28 19:35:45 +0000 carp: check CARP status in in_localip_fib(), in6_localip_fib() Don't report a BACKUP CARP address as local. These two functions are used only by source address validation for input packets, controlled by sysctls net.inet.ip.source_address_validation and net.inet6.ip6.source_address_validation. For this purpose we definitely want to treat BACKUP addresses as non local. This change is conservative and doesn't modify compat in_localip() and in6_localip(). They are used more widely than the FIB-aware versions. The change would modify the notion of ipfw(4) 'me' keyword. There might be other consequences as in_localip() is used by various tunneling protocols. PR: 277349 (cherry picked from commit 56f7860087eec14b4a65310b70bd704e79e1b48c) --- sys/netinet/in.c | 4 +++- sys/netinet6/in6.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/netinet/in.c b/sys/netinet/in.c index a23d32cff3dd..4ef1d9735658 100644 --- a/sys/netinet/in.c +++ b/sys/netinet/in.c @@ -167,7 +167,7 @@ in_localip(struct in_addr in) } /* - * Like in_localip(), but FIB-aware. + * Like in_localip(), but FIB-aware and carp(4)-aware. */ bool in_localip_fib(struct in_addr in, uint16_t fib) @@ -178,6 +178,8 @@ in_localip_fib(struct in_addr in, uint16_t fib) CK_LIST_FOREACH(ia, INADDR_HASH(in.s_addr), ia_hash) if (IA_SIN(ia)->sin_addr.s_addr == in.s_addr && + (ia->ia_ifa.ifa_carp == NULL || + carp_master_p(&ia->ia_ifa)) && ia->ia_ifa.ifa_ifp->if_fib == fib) return (true); diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index 88ee0fdd3181..55d675417c41 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -1807,7 +1807,7 @@ in6_localip(struct in6_addr *in6) } /* - * Like in6_localip(), but FIB-aware. + * Like in6_localip(), but FIB-aware and carp(4)-aware. */ bool in6_localip_fib(struct in6_addr *in6, uint16_t fib) @@ -1818,6 +1818,8 @@ in6_localip_fib(struct in6_addr *in6, uint16_t fib) IN6_IFADDR_RLOCK(&in6_ifa_tracker); CK_LIST_FOREACH(ia, IN6ADDR_HASH(in6), ia6_hash) { if (IN6_ARE_ADDR_EQUAL(in6, &ia->ia_addr.sin6_addr) && + (ia->ia_ifa.ifa_carp == NULL || + carp_master_p(&ia->ia_ifa)) && ia->ia_ifa.ifa_ifp->if_fib == fib) { IN6_IFADDR_RUNLOCK(&in6_ifa_tracker); return (true); From nobody Fri Mar 29 01:16:39 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V5Mtv2yG1z5GTsd; Fri, 29 Mar 2024 01:16: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 4V5Mtv2RGDz43y0; Fri, 29 Mar 2024 01:16:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711674999; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PLjKcypjMYUby12hrEC0yBB7ltD7Apl1lElnp3ThxXE=; b=EMkUvx/kNSz3pd6ipDNlBRMQzY9ork6GxGNXzcMqsnZ1mK+clYpGAyayUPfkWjl/jt9VV4 vpfHVr58T4aOsaQrWCf+QEIC3Fq9jL8ZBfIQo2pfDdbscPPJ3YySQesRStcafRK0jp0gWC 0V4Gkict90lEhZr1TwJriOKMqdTwW94cdvpiUAgENJVAusvq31BItVM0VQas20apRAlH6t j3psIW5672R1Ln3refI41P63Mr+/ip5UlnJ5PqC0dpr/3zcqoWXgyjbBwmch0ymhs8NATB +K+WLzTKzoEmYVoz73+GtXASLEf53XUjGhy3JZWrca1mIEH+zCs5kOseUeYA2A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711674999; a=rsa-sha256; cv=none; b=qwCLtwb1LwelW7UcR/IOFHD/9nGdkgtwMxTigqv575Ml/GTauFid8A+cb4FFdchXSuHpZb KwTid3rLuLW1LpQ3aeuepOxxJV5tGKuEh85dkUPkRE+R6iR7THMqQIfkAZm98Vg8l4wWz9 tMSctB7XpXFu1scORZWn2oajv22L5ZGx8iaQJjb8Tfby6bO9ld8MRU0CeDSQTa7DjBvtaI F42z3PkIR/673/803aOdJVMhAu0heqj1qALkf8boYS3ZvlbVSIcqP+glAoX5U47LyRKkC+ YFxHKlPoqUGtWCwnbeIQ63A9axQe2dpn5rd9bh2v8vntVS3Ee368I1IRoAjMQQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711674999; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PLjKcypjMYUby12hrEC0yBB7ltD7Apl1lElnp3ThxXE=; b=hK03kdaaneLG9ozCkUG4ODhn4y5Fx3Kt3/rPoH1hnYgAiiZ6jurJwkCRLEVm5jPZyxj6xX Opc03YgRM4xTrcPPN9MyO9OaFmhzsI+yk9z8ydRfPEgqc5BNese0u1/WD56ZtOBt92E4ty BTbTfy3PV0tkuitOhN59OU9YvOGVwrfi6+otz8zNgbJG5AxhhPgpBsVnGKz0gWkPb4Pbmd JxBeKhUcntRJJ2yLlZ2xPKHFS/6vFIIW2SayT/t1T2N9vGotHlmNNWd1ouaYdgOvS1EYEb fKx/polpS3K36SOHDvf8D6Cg7fJ5DumsX8Fllbq/EYccmpXapNaz+5K3p5x9tA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V5Mtv1jXjzr5V; Fri, 29 Mar 2024 01:16:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42T1Gdo6050637; Fri, 29 Mar 2024 01:16:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42T1Gdul050634; Fri, 29 Mar 2024 01:16:39 GMT (envelope-from git) Date: Fri, 29 Mar 2024 01:16:39 GMT Message-Id: <202403290116.42T1Gdul050634@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: df2b8b494412 - stable/14 - vfs_vnops.c: Use va_bytes >= va_size hint to avoid SEEK_DATA/SEEKHOLE List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: df2b8b494412259050254e04cb4d2e13ab815783 Auto-Submitted: auto-generated The branch stable/14 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=df2b8b494412259050254e04cb4d2e13ab815783 commit df2b8b494412259050254e04cb4d2e13ab815783 Author: Rick Macklem AuthorDate: 2024-03-15 00:35:32 +0000 Commit: Rick Macklem CommitDate: 2024-03-29 01:15:09 +0000 vfs_vnops.c: Use va_bytes >= va_size hint to avoid SEEK_DATA/SEEKHOLE vn_generic_copy_file_range() tries to maintain holes in file ranges being copied, using SEEK_DATA/SEEK_HOLE where possible, Unfortunately SEEK_DATA/SEEK_HOLE operations can take a long time under certain circumstances. Although it is not currently possible to know if a file has unallocated data regions, the case where va_bytes >= va_size is a strong hint that there are no unallocated data regions. This hint does not work well for file systems doing compression, but since it is only a hint, it is still useful. For the case of va_bytes >= va_size, avoid doing SEEK_DATA/SEEK_HOLE. (cherry picked from commit 89f1dcb3eb468e4cbaebd1ccde9a643d85f1282e) --- sys/kern/vfs_vnops.c | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index a16e137755b1..51386d0e9581 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -3336,14 +3336,15 @@ vn_generic_copy_file_range(struct vnode *invp, off_t *inoffp, struct vnode *outvp, off_t *outoffp, size_t *lenp, unsigned int flags, struct ucred *incred, struct ucred *outcred, struct thread *fsize_td) { + struct vattr inva; struct mount *mp; off_t startoff, endoff, xfer, xfer2; u_long blksize; int error, interrupted; - bool cantseek, readzeros, eof, lastblock, holetoeof; + bool cantseek, readzeros, eof, lastblock, holetoeof, sparse; ssize_t aresid, r = 0; size_t copylen, len, savlen; - off_t insize, outsize; + off_t outsize; char *dat; long holein, holeout; struct timespec curts, endts; @@ -3359,11 +3360,26 @@ vn_generic_copy_file_range(struct vnode *invp, off_t *inoffp, goto out; if (VOP_PATHCONF(invp, _PC_MIN_HOLE_SIZE, &holein) != 0) holein = 0; - error = vn_getsize_locked(invp, &insize, incred); + error = VOP_GETATTR(invp, &inva, incred); + if (error == 0 && inva.va_size > OFF_MAX) + error = EFBIG; VOP_UNLOCK(invp); if (error != 0) goto out; + /* + * Use va_bytes >= va_size as a hint that the file does not have + * sufficient holes to justify the overhead of doing FIOSEEKHOLE. + * This hint does not work well for file systems doing compression + * and may fail when allocations for extended attributes increases + * the value of va_bytes to >= va_size. + */ + sparse = true; + if (holein != 0 && inva.va_bytes >= inva.va_size) { + holein = 0; + sparse = false; + } + mp = NULL; error = vn_start_write(outvp, &mp, V_WAIT); if (error == 0) @@ -3397,9 +3413,9 @@ vn_generic_copy_file_range(struct vnode *invp, off_t *inoffp, error = vn_getsize_locked(outvp, &outsize, outcred); if (error == 0 && outsize > *outoffp && *outoffp <= OFF_MAX - len && outsize <= *outoffp + len && - *inoffp < insize && - *outoffp <= OFF_MAX - (insize - *inoffp) && - outsize <= *outoffp + (insize - *inoffp)) { + *inoffp < inva.va_size && + *outoffp <= OFF_MAX - (inva.va_size - *inoffp) && + outsize <= *outoffp + (inva.va_size - *inoffp)) { #ifdef MAC error = mac_vnode_check_write(curthread->td_ucred, outcred, outvp); @@ -3417,7 +3433,7 @@ vn_generic_copy_file_range(struct vnode *invp, off_t *inoffp, if (error != 0) goto out; - if (holein == 0 && holeout > 0) { + if (sparse && holein == 0 && holeout > 0) { /* * For this special case, the input data will be scanned * for blocks of all 0 bytes. For these blocks, the @@ -3488,7 +3504,7 @@ vn_generic_copy_file_range(struct vnode *invp, off_t *inoffp, error = VOP_IOCTL(invp, FIOSEEKDATA, &startoff, 0, incred, curthread); if (error == ENXIO) { - startoff = endoff = insize; + startoff = endoff = inva.va_size; eof = holetoeof = true; error = 0; } @@ -3551,6 +3567,8 @@ vn_generic_copy_file_range(struct vnode *invp, off_t *inoffp, cantseek = false; } else { cantseek = true; + if (!sparse) + cantseek = false; startoff = *inoffp; copylen = len; error = 0; From nobody Fri Mar 29 06:39:54 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V5W3v08B8z5Fb5h; Fri, 29 Mar 2024 06:39: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 4V5W3t6ZQxz4V3Z; Fri, 29 Mar 2024 06:39:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711694394; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Pdujft35wGI1oatMduSnQH5kkDbVNgxXeMFZztU0PIo=; b=fgcvH2c1ZhsjTlWs0SzNxtQpNUonFlKl4jVMjguG1h6Nua2qqLB3R5iRl3B72x1kIlT8QZ 2fHDYTjsAgsJ9+xsNkOHnqGRs3NK5ae5Jf/6gsdtS48hE+fd+W0AgxLUXNi8SXX0ycGess AjdmDY7AQKeYZK9oHF3p7Kf6HbcU7F83BYykN/O2X5kqmQVupskTXXKAsz6l/JXpRjhR0M 28lIzILDjkv0AONYIfnntVukRcUyxFP3ZJGAPO2ZMhS0U9w3GZXjuo9xT0lYUPQr01HkuJ he79yIzRXS+2GLnCpiG1ZBgPJMN8tpXQ4Grbk8GiMhAbSEPIQVbAYLKYm7CjXw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711694394; a=rsa-sha256; cv=none; b=ejDlvNsvKJoobdk7RzHjBwiEtZ1v6dTXU0KZm+GXSIadwE0MOzqldha5pkEu5kcHrUviSN 1e+zuGk2MnpcuB43S48sBME29pNzzygyvG3riPC6COIVViBImgIA4wGU5388OIZS2hPxiF cB7VXRparZEw+Jo+Rp/yEhzmfqqh+ZNtpdd6RkLtUcEjI4KNBYKHhLqc0KO2/ZI4J2nj/p X+98+N3dZajUH1KaEsbRnJrYnJAINYqBHASnbUeADnRIkhAhNKTmC2XWUzLOS/AIz9qnDv snvz4FhHN0KeqjX8pESVfIxk/vbJlhgFRZw1ulxAx+skt223OlAKGERdcqBTRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711694394; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Pdujft35wGI1oatMduSnQH5kkDbVNgxXeMFZztU0PIo=; b=c6HXkVJn5RV0NnZMhu0kztgsqMbjJnszGScaJCcf6MbNwFUGXCX00CVxeeINkLkcHCSWgB C9TBlMUgfzJya10Tl6YO9osfaeG5pzmYcw1BTWnn2y67ksVIDBhLJJG+ffBe8gKHvLw6dQ O6xQ+ixKm3SJQ9qjYbTZnJm/9Ppcq1puimNHBzjkNyx1TCi1Q9DBZFVezR0Y7CTa1D3Vd3 foqDaE+hQ22Fp8FrZd/Q1K15rGUWkd/stSS7pr2G6I5UiPTHBEo2sQy9yHipIOCGGRi5Ha zAP70ftbTWlaLb/fuQ2pmz+EGJAdqpIcaqFcWbLnnLN8ZQ3Hqg2QCTkDPiOI8A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V5W3t63brz10cy; Fri, 29 Mar 2024 06:39:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42T6dskI093802; Fri, 29 Mar 2024 06:39:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42T6dsFD093799; Fri, 29 Mar 2024 06:39:54 GMT (envelope-from git) Date: Fri, 29 Mar 2024 06:39:54 GMT Message-Id: <202403290639.42T6dsFD093799@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Stefan =?utf-8?Q?E=C3=9Fer?= Subject: git: 32364f99e15e - stable/14 - rtld-elf: support either byte-order of hints file List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: se X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 32364f99e15ee067d42e04e5e5721c0b21bd4925 Auto-Submitted: auto-generated The branch stable/14 has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=32364f99e15ee067d42e04e5e5721c0b21bd4925 commit 32364f99e15ee067d42e04e5e5721c0b21bd4925 Author: Stefan Eßer AuthorDate: 2024-02-26 22:18:12 +0000 Commit: Stefan Eßer CommitDate: 2024-03-29 06:34:44 +0000 rtld-elf: support either byte-order of hints file Accept either little-endian or big-endian representation of the ELF hints magic number in the header of a hints file and convert the parameters to the native byte-order of the repsective system. This is a pre-requisite for a planned change to always write the byte order in little-endian format on all architectures. The only relvant architecture that uses big-endian data is powerpc64, and it is not likely that new architectures will choose that representation of data in memory. When all supported architectures use little-endian data in the hints file, the byte swap logic can be enabled for big-endian CPUs at compile time. Up to that point, there is a very small run-time penalty that is paid on all systems to check the byte-order of the hints file and to provide the option to byte-swap the parameters read from the hints file header. This commit contains the changes from review D44080 (which had been split off from this patch for easier review), Reviewed by: kib MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D44053 (cherry picked from commit 7b77d37a561b47db093a2528b8032dbfe5791698) rtld-elf: add some debug print statements The byte-order independent code has been reported to fail on powerpc64. Add some more debug statements to help identify the parametrs used and to verify the correct operation of the byte-swap macros used.. (cherry picked from commit 173953182af060dcab43990e179ee91e9f2d1e54) rtld: fix check for endianess of elf hints file Don't check if the elf hints file is in host byte order, but check if it is in little endian by looking at the magic number. This fixes rtld on big endian platforms. Reviewed by: se, kib (prior version of the patch) Fixes: 7b77d37a561b ("rtld-elf: support either byte-order of hints") MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D44472 (cherry picked from commit da2d6e2815d7694e3ccbd561508074c547b02dd6) rtld: reduce debug messages after fix on big-endian hosts Remove a debug message that had been added to support the debugging of a mis-detection of the hint files endianness on powerpc64. MFC after: 3 days (cherry picked from commit c44bf7d2e9d2292867f2e23f291266af26762354) --- libexec/rtld-elf/rtld.c | 79 +++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 63 insertions(+), 16 deletions(-) diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index f11fe8afcc32..07068dff0b62 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -2040,6 +2040,9 @@ find_symdef(unsigned long symnum, const Obj_Entry *refobj, return (def); } +/* Convert between native byte order and forced little resp. big endian. */ +#define COND_SWAP(n) (is_le ? le32toh(n) : be32toh(n)) + /* * Return the search path from the ldconfig hints file, reading it if * necessary. If nostdlib is true, then the default search paths are @@ -2063,6 +2066,12 @@ gethints(bool nostdlib) int fd; size_t flen; uint32_t dl; + uint32_t magic; /* Magic number */ + uint32_t version; /* File version (1) */ + uint32_t strtab; /* Offset of string table in file */ + uint32_t dirlist; /* Offset of directory list in string table */ + uint32_t dirlistlen; /* strlen(dirlist) */ + bool is_le; /* Does the hints file use little endian */ bool skip; /* First call, read the hints file */ @@ -2070,8 +2079,10 @@ gethints(bool nostdlib) /* Keep from trying again in case the hints file is bad. */ hints = ""; - if ((fd = open(ld_elf_hints_path, O_RDONLY | O_CLOEXEC)) == -1) + if ((fd = open(ld_elf_hints_path, O_RDONLY | O_CLOEXEC)) == -1) { + dbg("failed to open hints file \"%s\"", ld_elf_hints_path); return (NULL); + } /* * Check of hdr.dirlistlen value against type limit @@ -2079,29 +2090,65 @@ gethints(bool nostdlib) * paranoia leads to checks that dirlist is fully * contained in the file range. */ - if (read(fd, &hdr, sizeof hdr) != sizeof hdr || - hdr.magic != ELFHINTS_MAGIC || - hdr.version != 1 || hdr.dirlistlen > UINT_MAX / 2 || - fstat(fd, &hint_stat) == -1) { + if (read(fd, &hdr, sizeof hdr) != sizeof hdr) { + dbg("failed to read %lu bytes from hints file \"%s\"", + (u_long)sizeof hdr, ld_elf_hints_path); cleanup1: close(fd); hdr.dirlistlen = 0; return (NULL); } - dl = hdr.strtab; - if (dl + hdr.dirlist < dl) + dbg("host byte-order: %s-endian", le32toh(1) == 1 ? "little" : "big"); + dbg("hints file byte-order: %s-endian", + hdr.magic == htole32(ELFHINTS_MAGIC) ? "little" : "big"); + is_le = /*htole32(1) == 1 || */ hdr.magic == htole32(ELFHINTS_MAGIC); + magic = COND_SWAP(hdr.magic); + version = COND_SWAP(hdr.version); + strtab = COND_SWAP(hdr.strtab); + dirlist = COND_SWAP(hdr.dirlist); + dirlistlen = COND_SWAP(hdr.dirlistlen); + if (magic != ELFHINTS_MAGIC) { + dbg("invalid magic number %#08x (expected: %#08x)", + magic, ELFHINTS_MAGIC); goto cleanup1; - dl += hdr.dirlist; - if (dl + hdr.dirlistlen < dl) + } + if (version != 1) { + dbg("hints file version %d (expected: 1)", version); goto cleanup1; - dl += hdr.dirlistlen; - if (dl > hint_stat.st_size) + } + if (dirlistlen > UINT_MAX / 2) { + dbg("directory list is to long: %d > %d", + dirlistlen, UINT_MAX / 2); goto cleanup1; - p = xmalloc(hdr.dirlistlen + 1); - if (pread(fd, p, hdr.dirlistlen + 1, - hdr.strtab + hdr.dirlist) != (ssize_t)hdr.dirlistlen + 1 || - p[hdr.dirlistlen] != '\0') { + } + if (fstat(fd, &hint_stat) == -1) { + dbg("failed to find length of hints file \"%s\"", + ld_elf_hints_path); + goto cleanup1; + } + dl = strtab; + if (dl + dirlist < dl) { + dbg("invalid string table position %d", dl); + goto cleanup1; + } + dl += dirlist; + if (dl + dirlistlen < dl) { + dbg("invalid directory list offset %d", dirlist); + goto cleanup1; + } + dl += dirlistlen; + if (dl > hint_stat.st_size) { + dbg("hints file \"%s\" is truncated (%d vs. %jd bytes)", + ld_elf_hints_path, dl, (uintmax_t)hint_stat.st_size); + goto cleanup1; + } + p = xmalloc(dirlistlen + 1); + if (pread(fd, p, dirlistlen + 1, + strtab + dirlist) != (ssize_t)dirlistlen + 1 || + p[dirlistlen] != '\0') { free(p); + dbg("failed to read %d bytes starting at %d from hints file \"%s\"", + dirlistlen + 1, strtab + dirlist, ld_elf_hints_path); goto cleanup1; } hints = p; @@ -2164,7 +2211,7 @@ cleanup1: */ fndx = 0; fcount = 0; - filtered_path = xmalloc(hdr.dirlistlen + 1); + filtered_path = xmalloc(dirlistlen + 1); hintpath = &hintinfo->dls_serpath[0]; for (hintndx = 0; hintndx < hmeta.dls_cnt; hintndx++, hintpath++) { skip = false; From nobody Fri Mar 29 06:45:02 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V5W9p28Ztz5FbV5; Fri, 29 Mar 2024 06:45: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 4V5W9p1f2pz4W8G; Fri, 29 Mar 2024 06:45:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711694702; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RIMgL2lUxGrn4DyJV2SRDZpPLqzCgW7n8qrm2QYHOm0=; b=NEgCppJtjl+YYR9tx6FGtKnmhQ3KbBIf5q7x51EsJs4AFwOK0FyHaP8+dOkY1kvp8Z0IE3 KAlrfkzTH9xONPoFOWs1Iy0KXBg0rJ+2+YN2ai1A6daG8wZT6InGDYmQn4eky01tkg38Lw 4K2+RDRk8Lvr5ryaMthEnqFNlo95NuoYVCK4Kr6C34gBjKvbchuJPGYvrVJTuxJ3RBGYGX bJO0Q+axtE9P7eibbHWal6SF5EWd8U3j7xvv6AySnE2FQAZwUaKOCZNeHZTAyfjUOVUJvK 7j7q9VDAcygvU+dK0M60myoOFYfptShF2vgOqolRxlXS93/woPpzbej5oE9ljw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711694702; a=rsa-sha256; cv=none; b=Kr9KHp1uVVbrr3gMaOE08Jat0u+5nUZWAkrV3UB8OZ1xohi8gZZDujx7y6yVsulnS9lL/Y 2dHFoY66Xw3r3obrES6S4QOPGzl0ZvLfw9N51iIWCgps3bWrTRLRsyyniPpvdoVu3unciy npf7MPinqOZMpGcH3i4hhQfXEKa0xYN60NXsLAoKD58npla1+aqHgYyK8JpKaR3cgGYoSf da7PECeERHnENLzElok33u43hvXhx6UQ3mc78yYNr5Gj0XPKAbVVGxxaaOol76oo9LIa/b ezjkIEc9hDghDILNc92kO70BBNY5J824UD9T0B6IAGvTL9wDxWWJChFtTPABhQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711694702; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RIMgL2lUxGrn4DyJV2SRDZpPLqzCgW7n8qrm2QYHOm0=; b=czsrdcXkNV84gRfHOdEcqkPRidX/fI0i9H0anJSN/ZjWAuxzK5dr0QJathRKI3v19NKXGt f2dzlpPl2uLy315cEJpBy3xIWJUoWO9eBXQereUQ+CT1bqZhPhEUqYGBzNRx0vPPNs6urE V7Di5CjTw3GcCopiqyf5uM39ULs6jtZaVLFi5jo/2LrtzqtGdz2gIPU+O2t3wAJ1DbVwpP yUsxwcrl+jaRoy5KzgiCgdYDHogmWh/0ILjcUQuaxEdHHpQf68GKhoW0SE+pvX1YvLZcPg VMrS2l36X+BaHW/4VIEE/q0kvl+3tuZRgFCviimFI3c+WEAvU/td9KeNEOI9vw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V5W9p17fMz1199; Fri, 29 Mar 2024 06:45:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42T6j28H009537; Fri, 29 Mar 2024 06:45:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42T6j2Jc009534; Fri, 29 Mar 2024 06:45:02 GMT (envelope-from git) Date: Fri, 29 Mar 2024 06:45:02 GMT Message-Id: <202403290645.42T6j2Jc009534@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Stefan =?utf-8?Q?E=C3=9Fer?= Subject: git: f61d786c291d - stable/13 - rtld-elf: support either byte-order of hints file List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: se X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f61d786c291dc12d9b3a61b1d80475badc4ee758 Auto-Submitted: auto-generated The branch stable/13 has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=f61d786c291dc12d9b3a61b1d80475badc4ee758 commit f61d786c291dc12d9b3a61b1d80475badc4ee758 Author: Stefan Eßer AuthorDate: 2024-02-26 22:18:12 +0000 Commit: Stefan Eßer CommitDate: 2024-03-29 06:43:52 +0000 rtld-elf: support either byte-order of hints file Accept either little-endian or big-endian representation of the ELF hints magic number in the header of a hints file and convert the parameters to the native byte-order of the repsective system. This is a pre-requisite for a planned change to always write the byte order in little-endian format on all architectures. The only relvant architecture that uses big-endian data is powerpc64, and it is not likely that new architectures will choose that representation of data in memory. When all supported architectures use little-endian data in the hints file, the byte swap logic can be enabled for big-endian CPUs at compile time. Up to that point, there is a very small run-time penalty that is paid on all systems to check the byte-order of the hints file and to provide the option to byte-swap the parameters read from the hints file header. This commit contains the changes from review D44080 (which had been split off from this patch for easier review), Reviewed by: kib MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D44053 (cherry picked from commit 7b77d37a561b47db093a2528b8032dbfe5791698) rtld-elf: add some debug print statements The byte-order independent code has been reported to fail on powerpc64. Add some more debug statements to help identify the parametrs used and to verify the correct operation of the byte-swap macros used.. (cherry picked from commit 173953182af060dcab43990e179ee91e9f2d1e54) rtld: fix check for endianess of elf hints file Don't check if the elf hints file is in host byte order, but check if it is in little endian by looking at the magic number. This fixes rtld on big endian platforms. Reviewed by: se, kib (prior version of the patch) Fixes: 7b77d37a561b ("rtld-elf: support either byte-order of hints") MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D44472 (cherry picked from commit da2d6e2815d7694e3ccbd561508074c547b02dd6) rtld: reduce debug messages after fix on big-endian hosts Remove a debug message that had been added to support the debugging of a mis-detection of the hint files endianness on powerpc64. MFC after: 3 days (cherry picked from commit c44bf7d2e9d2292867f2e23f291266af26762354) --- libexec/rtld-elf/rtld.c | 79 +++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 63 insertions(+), 16 deletions(-) diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index e66e2f7f0f3b..fadde9561662 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -2081,6 +2081,9 @@ find_symdef(unsigned long symnum, const Obj_Entry *refobj, return (def); } +/* Convert between native byte order and forced little resp. big endian. */ +#define COND_SWAP(n) (is_le ? le32toh(n) : be32toh(n)) + /* * Return the search path from the ldconfig hints file, reading it if * necessary. If nostdlib is true, then the default search paths are @@ -2104,6 +2107,12 @@ gethints(bool nostdlib) int fd; size_t flen; uint32_t dl; + uint32_t magic; /* Magic number */ + uint32_t version; /* File version (1) */ + uint32_t strtab; /* Offset of string table in file */ + uint32_t dirlist; /* Offset of directory list in string table */ + uint32_t dirlistlen; /* strlen(dirlist) */ + bool is_le; /* Does the hints file use little endian */ bool skip; /* First call, read the hints file */ @@ -2111,8 +2120,10 @@ gethints(bool nostdlib) /* Keep from trying again in case the hints file is bad. */ hints = ""; - if ((fd = open(ld_elf_hints_path, O_RDONLY | O_CLOEXEC)) == -1) + if ((fd = open(ld_elf_hints_path, O_RDONLY | O_CLOEXEC)) == -1) { + dbg("failed to open hints file \"%s\"", ld_elf_hints_path); return (NULL); + } /* * Check of hdr.dirlistlen value against type limit @@ -2120,29 +2131,65 @@ gethints(bool nostdlib) * paranoia leads to checks that dirlist is fully * contained in the file range. */ - if (read(fd, &hdr, sizeof hdr) != sizeof hdr || - hdr.magic != ELFHINTS_MAGIC || - hdr.version != 1 || hdr.dirlistlen > UINT_MAX / 2 || - fstat(fd, &hint_stat) == -1) { + if (read(fd, &hdr, sizeof hdr) != sizeof hdr) { + dbg("failed to read %lu bytes from hints file \"%s\"", + (u_long)sizeof hdr, ld_elf_hints_path); cleanup1: close(fd); hdr.dirlistlen = 0; return (NULL); } - dl = hdr.strtab; - if (dl + hdr.dirlist < dl) + dbg("host byte-order: %s-endian", le32toh(1) == 1 ? "little" : "big"); + dbg("hints file byte-order: %s-endian", + hdr.magic == htole32(ELFHINTS_MAGIC) ? "little" : "big"); + is_le = /*htole32(1) == 1 || */ hdr.magic == htole32(ELFHINTS_MAGIC); + magic = COND_SWAP(hdr.magic); + version = COND_SWAP(hdr.version); + strtab = COND_SWAP(hdr.strtab); + dirlist = COND_SWAP(hdr.dirlist); + dirlistlen = COND_SWAP(hdr.dirlistlen); + if (magic != ELFHINTS_MAGIC) { + dbg("invalid magic number %#08x (expected: %#08x)", + magic, ELFHINTS_MAGIC); goto cleanup1; - dl += hdr.dirlist; - if (dl + hdr.dirlistlen < dl) + } + if (version != 1) { + dbg("hints file version %d (expected: 1)", version); goto cleanup1; - dl += hdr.dirlistlen; - if (dl > hint_stat.st_size) + } + if (dirlistlen > UINT_MAX / 2) { + dbg("directory list is to long: %d > %d", + dirlistlen, UINT_MAX / 2); goto cleanup1; - p = xmalloc(hdr.dirlistlen + 1); - if (pread(fd, p, hdr.dirlistlen + 1, - hdr.strtab + hdr.dirlist) != (ssize_t)hdr.dirlistlen + 1 || - p[hdr.dirlistlen] != '\0') { + } + if (fstat(fd, &hint_stat) == -1) { + dbg("failed to find length of hints file \"%s\"", + ld_elf_hints_path); + goto cleanup1; + } + dl = strtab; + if (dl + dirlist < dl) { + dbg("invalid string table position %d", dl); + goto cleanup1; + } + dl += dirlist; + if (dl + dirlistlen < dl) { + dbg("invalid directory list offset %d", dirlist); + goto cleanup1; + } + dl += dirlistlen; + if (dl > hint_stat.st_size) { + dbg("hints file \"%s\" is truncated (%d vs. %jd bytes)", + ld_elf_hints_path, dl, (uintmax_t)hint_stat.st_size); + goto cleanup1; + } + p = xmalloc(dirlistlen + 1); + if (pread(fd, p, dirlistlen + 1, + strtab + dirlist) != (ssize_t)dirlistlen + 1 || + p[dirlistlen] != '\0') { free(p); + dbg("failed to read %d bytes starting at %d from hints file \"%s\"", + dirlistlen + 1, strtab + dirlist, ld_elf_hints_path); goto cleanup1; } hints = p; @@ -2205,7 +2252,7 @@ cleanup1: */ fndx = 0; fcount = 0; - filtered_path = xmalloc(hdr.dirlistlen + 1); + filtered_path = xmalloc(dirlistlen + 1); hintpath = &hintinfo->dls_serpath[0]; for (hintndx = 0; hintndx < hmeta.dls_cnt; hintndx++, hintpath++) { skip = false; From nobody Fri Mar 29 06:50:08 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V5WHj288hz5Fc2G; Fri, 29 Mar 2024 06:50:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4V5WHj00Y9z4WQ0; Fri, 29 Mar 2024 06:50:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711695009; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y0w6SNtqb8H7Z9x4fFWJxpHna3fwcJIe9pDSJ0n2PTc=; b=Z1RA4lBhaut59wkHAwuWjOggYoM4ZDArMMfmPnV22KC5hD3pJRQ1sOthRciIRcJjHZC7z/ 569yLzB970eSvxU7EBwMqEt3Q1fYltBzf8kjeMA//0ABMLGcLfAuGNSz+nOYaaY3FjXpY4 CG2dUPOQzDVdtk84eoOwDPIGWaVWk6EkDusTXyqR8kohjVETct3GLsyIMwHXaNn33jpFaE 6udwOBFgbHGrCWJ85w1oNW9i9pXYG/hC1pUtBVPeG/9WnkyJ9sDyHnGg5itZ6+lE2Nox70 wWIulfKv0kE9ZrMAeX9i7zjfPX+HJlAmHsMDUcpkh9GWj/iLzsamx/qj5EUDdA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711695009; a=rsa-sha256; cv=none; b=lawCkX+V5oHVjDulwLFlMBWtWhnc8eFnrg4Q1EGwNqduaB44W7ol5P8HTHVK61N7VirbPf 8J/18jweKAQlkc0aUb1LrTqlJMiN6i/ezCujBqKqpon/9aUF0n4v8SXXj+EY3L6+554Plr IorgizDZF36YYKmnE93Kc3F80FOoXA5vAWLdDnA3ocxV/lt5jlqivtecuTfhrcHaotLvLs d0be3Mzbw7Q3l3pj1njomLIG470XsQR7YQ+RxAf7Bvpuz4zZU9SqUD0nOav0uOwMlhZDqp wc8YjEYipSBHqvfocjrhuDJxnG8rINNWjnM6uwtzJixLrDa9XloD0KUkjzntsA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711695009; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y0w6SNtqb8H7Z9x4fFWJxpHna3fwcJIe9pDSJ0n2PTc=; b=nDSJCbVe8OvI3gbHdb2f1Q+TIWVPzlz1aRZgxHidqDbUZrQXNZh78k25tQU8L5vcNGUo/u DlKVsuGYov9gQ6mUQfFiVaLloypBRpjcfXc4pBtMiHmmGHGivsTU7qiIp1InwQUnOX7QDE rsvRi0NsikL4U9G4DxTokZj8kL6kPWq1VyuV2MhzeiKVjwhPYVMANJMgDw4PlLCN4Y0u6h WdEa7JoL+a3asUVD+mgZvRNS1gg7kfIxPJ4up6qvk2SRLAMMhSO1gqef7QoEYlJMhV+Cc6 zlly6EksGRklAPB5c1jP/IIfogISbjIoslD/1nkbV6YqCepEH3albo7Ev2wrcQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V5WHh6jy9z119C; Fri, 29 Mar 2024 06:50:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42T6o8cS013766; Fri, 29 Mar 2024 06:50:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42T6o85R013761; Fri, 29 Mar 2024 06:50:08 GMT (envelope-from git) Date: Fri, 29 Mar 2024 06:50:08 GMT Message-Id: <202403290650.42T6o85R013761@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Stefan =?utf-8?Q?E=C3=9Fer?= Subject: git: fa7b31166ddb - stable/14 - ldconfig: support hints files of either byte-order List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: se X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: fa7b31166ddb93eddead4c814c5f5e4c0bd38dd7 Auto-Submitted: auto-generated The branch stable/14 has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=fa7b31166ddb93eddead4c814c5f5e4c0bd38dd7 commit fa7b31166ddb93eddead4c814c5f5e4c0bd38dd7 Author: Stefan Eßer AuthorDate: 2024-02-28 17:49:29 +0000 Commit: Stefan Eßer CommitDate: 2024-03-29 06:49:02 +0000 ldconfig: support hints files of either byte-order Make the ldconfig program accept hints files in little-endian and big-endian format on all architectures. The default format is the native byte-order of the respective host. This is expected to change when a version of the pkg command is available that implements support for either byte-order in its internal ldconfig function. (Already committed in the development tree of the pkg utility, a release is expected at the end of Q1/2024). This update adds the -B option to the ldconfig program. It enforces the creation of a big-endian hints file on a little-endian host. The main purpose to is support of tests with non-native byte-order files on little-endian hosts. It will be removed when all supported FreeBSD releases use little-endian hints files by default. When little-endian hints files are generally used, support of either byte-order in libexec/rtld can also be removed. When support for big-endian hints files is no longer required, the COND_SWAP macro in ldconfig and rtld shall be replaced by le32toh(), which just return their argument on little-endian architectures. Approved by: kib Relnotes: yes Differential Revision: https://reviews.freebsd.org/D44093 (cherry picked from commit e0dfecadf5946b6a8ad423be4eb1c14017b3a8a7) --- sbin/ldconfig/elfhints.c | 46 ++++++++++++++++++++++++++++++++-------------- sbin/ldconfig/ldconfig.8 | 11 ++++++++--- sbin/ldconfig/ldconfig.c | 13 ++++++++----- sbin/ldconfig/ldconfig.h | 2 +- 4 files changed, 49 insertions(+), 23 deletions(-) diff --git a/sbin/ldconfig/elfhints.c b/sbin/ldconfig/elfhints.c index 72b9273ab93a..d6ee5e0918d6 100644 --- a/sbin/ldconfig/elfhints.c +++ b/sbin/ldconfig/elfhints.c @@ -27,6 +27,7 @@ */ #include +#include #include #include @@ -48,11 +49,12 @@ static void add_dir(const char *, const char *, bool); static void read_dirs_from_file(const char *, const char *); -static void read_elf_hints(const char *, bool); +static void read_elf_hints(const char *, bool, bool); static void write_elf_hints(const char *); static const char *dirs[MAXDIRS]; static int ndirs; +static bool is_be; bool insecure; static void @@ -95,7 +97,7 @@ list_elf_hints(const char *hintsfile) int i; int nlibs; - read_elf_hints(hintsfile, 1); + read_elf_hints(hintsfile, true, false); printf("%s:\n", hintsfile); printf("\tsearch directories:"); for (i = 0; i < ndirs; i++) @@ -183,8 +185,11 @@ read_dirs_from_file(const char *hintsfile, const char *listfile) fclose(fp); } +/* Convert between native byte order and forced little resp. big endian. */ +#define COND_SWAP(n) (is_be ? be32toh(n) : le32toh(n)) + static void -read_elf_hints(const char *hintsfile, bool must_exist) +read_elf_hints(const char *hintsfile, bool must_exist, bool force_be) { int fd; struct stat s; @@ -193,6 +198,7 @@ read_elf_hints(const char *hintsfile, bool must_exist) char *strtab; char *dirlist; char *p; + int hdr_version; if ((fd = open(hintsfile, O_RDONLY)) == -1) { if (errno == ENOENT && !must_exist) @@ -214,14 +220,18 @@ read_elf_hints(const char *hintsfile, bool must_exist) close(fd); hdr = (struct elfhints_hdr *)mapbase; - if (hdr->magic != ELFHINTS_MAGIC) + is_be = be32toh(hdr->magic) == ELFHINTS_MAGIC; + if (COND_SWAP(hdr->magic) != ELFHINTS_MAGIC) errx(1, "\"%s\": invalid file format", hintsfile); - if (hdr->version != 1) + if (force_be && !is_be) + errx(1, "\"%s\": incompatible endianness requested", hintsfile); + hdr_version = COND_SWAP(hdr->version); + if (hdr_version != 1) errx(1, "\"%s\": unrecognized file version (%d)", hintsfile, - hdr->version); + hdr_version); - strtab = (char *)mapbase + hdr->strtab; - dirlist = strtab + hdr->dirlist; + strtab = (char *)mapbase + COND_SWAP(hdr->strtab); + dirlist = strtab + COND_SWAP(hdr->dirlist); if (*dirlist != '\0') while ((p = strsep(&dirlist, ":")) != NULL) @@ -229,13 +239,19 @@ read_elf_hints(const char *hintsfile, bool must_exist) } void -update_elf_hints(const char *hintsfile, int argc, char **argv, bool merge) +update_elf_hints(const char *hintsfile, int argc, char **argv, bool merge, + bool force_be) { struct stat s; int i; + /* + * Remove "be32toh(1) == 1" from this condition to create + * little-endian hints files on all architectures by default. + */ + is_be = be32toh(1) == 1 || force_be; if (merge) - read_elf_hints(hintsfile, false); + read_elf_hints(hintsfile, false, force_be); for (i = 0; i < argc; i++) { if (stat(argv[i], &s) == -1) warn("warning: %s", argv[i]); @@ -265,9 +281,9 @@ write_elf_hints(const char *hintsfile) if ((fp = fdopen(fd, "wb")) == NULL) err(1, "fdopen(%s)", tempname); - hdr.magic = ELFHINTS_MAGIC; - hdr.version = 1; - hdr.strtab = sizeof hdr; + hdr.magic = COND_SWAP(ELFHINTS_MAGIC); + hdr.version = COND_SWAP(1); + hdr.strtab = COND_SWAP(sizeof hdr); hdr.strsize = 0; hdr.dirlist = 0; memset(hdr.spare, 0, sizeof hdr.spare); @@ -278,8 +294,10 @@ write_elf_hints(const char *hintsfile) for (i = 1; i < ndirs; i++) hdr.strsize += 1 + strlen(dirs[i]); } - hdr.dirlistlen = hdr.strsize; + hdr.dirlistlen = COND_SWAP(hdr.strsize); hdr.strsize++; /* For the null terminator */ + /* convert in-place from native to target endianness */ + hdr.strsize = COND_SWAP(hdr.strsize); /* Write the header. */ if (fwrite(&hdr, 1, sizeof hdr, fp) != sizeof hdr) diff --git a/sbin/ldconfig/ldconfig.8 b/sbin/ldconfig/ldconfig.8 index 47e0dfa99b50..88d99567912e 100644 --- a/sbin/ldconfig/ldconfig.8 +++ b/sbin/ldconfig/ldconfig.8 @@ -32,7 +32,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd May 15, 2021 +.Dd February 28, 2024 .Dt LDCONFIG 8 .Os .Sh NAME @@ -41,7 +41,7 @@ .Sh SYNOPSIS .Nm .Op Fl 32 -.Op Fl Rimrv +.Op Fl BRimrv .Op Fl f Ar hints_file .Op Ar directory | Ar .Sh DESCRIPTION @@ -105,6 +105,11 @@ Generate the hints for 32-bit ABI shared libraries on 64-bit systems that support running 32-bit binaries. .It Fl elf Ignored for backwards compatibility. +.It Fl B +Force writing big-endian binary data´to the hints file. +The default is to create little-endian hints files on all architectures. +Reading of and merging into hints files preserves the endianness of the +existing hints file. .It Fl R Appends pathnames on the command line to the directory list from the hints file. @@ -159,7 +164,7 @@ invocations with .El .Sh SEE ALSO .Xr ld 1 , -.Xr ld-elf.so.1 , +.Xr ld-elf.so.1 1 , .Xr link 5 .Sh HISTORY A diff --git a/sbin/ldconfig/ldconfig.c b/sbin/ldconfig/ldconfig.c index 2f5cdbd6505e..0eb9cb801ac2 100644 --- a/sbin/ldconfig/ldconfig.c +++ b/sbin/ldconfig/ldconfig.c @@ -57,9 +57,9 @@ main(int argc, char **argv) { const char *hints_file; int c; - bool is_32, justread, merge, rescan, verbose; + bool is_32, justread, merge, rescan, force_be, verbose; - is_32 = justread = merge = rescan = verbose = false; + force_be = is_32 = justread = merge = rescan = verbose = false; while (argc > 1) { if (strcmp(argv[1], "-aout") == 0) { @@ -80,8 +80,11 @@ main(int argc, char **argv) hints_file = __PATH_ELF_HINTS("32"); else hints_file = _PATH_ELF_HINTS; - while((c = getopt(argc, argv, "Rf:imrsv")) != -1) { + while((c = getopt(argc, argv, "BRf:imrsv")) != -1) { switch (c) { + case 'B': + force_be = true; + break; case 'R': rescan = true; break; @@ -115,7 +118,7 @@ main(int argc, char **argv) if (argc == optind) rescan = true; update_elf_hints(hints_file, argc - optind, - argv + optind, merge || rescan); + argv + optind, merge || rescan, force_be); } exit(0); } @@ -124,7 +127,7 @@ static void usage(void) { fprintf(stderr, - "usage: ldconfig [-32] [-elf] [-Rimrv] [-f hints_file] " + "usage: ldconfig [-32] [-elf] [-BRimrv] [-f hints_file]" "[directory | file ...]\n"); exit(1); } diff --git a/sbin/ldconfig/ldconfig.h b/sbin/ldconfig/ldconfig.h index e03ba928be7d..aa7ad810bacd 100644 --- a/sbin/ldconfig/ldconfig.h +++ b/sbin/ldconfig/ldconfig.h @@ -36,7 +36,7 @@ extern bool insecure; /* -i flag, needed here for elfhints.c */ __BEGIN_DECLS void list_elf_hints(const char *); -void update_elf_hints(const char *, int, char **, bool); +void update_elf_hints(const char *, int, char **, bool, bool); __END_DECLS #endif From nobody Fri Mar 29 06:50:09 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V5WHk1Tf7z5Fbyg; Fri, 29 Mar 2024 06:50: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 4V5WHk0bGRz4Wbd; Fri, 29 Mar 2024 06:50:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711695010; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1JoQSa7jrKZi5MCln7ZXYRPra4RicDOu3f/UpoyFI6s=; b=u7p5yzzdX/BP/bYp75Fu1dNtEcxtA9MiBZsA1lbBxUot04TXYI7RZ3phooUQKAKH60Th7o fXiAEd7XsZITNZtNbVHUT/qQVWRrx5s/Sx6nUXXzM2nQsFHKw74QCmLJxiUxPTqDYpBHTf 6aC2ZGT9ph9SRflDj69ekALXkgIUj9Hv/uWfw163ZZ4SIfjWG7C/TmTglQElvV/VB8ayr3 d/B4ll0BbvbdoBXCZCa15JWQJYvCwd7Ghb1DE2bw/8NCbShQUAigHbym38i8QG6DP8Pw8o IZvR78WlvcSyc/9RfXhc8nD4Ibg8yFYjrWfDWWUpcnrwnurzHYrUVmiFU2+2+Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711695010; a=rsa-sha256; cv=none; b=LTElEkGsgaJ6ILaE7bjLEUftx/nYGGK3kyV15d125gai9+DBQAwGAeb/kJLLzoZ8659RJY FXsMUF+c2WqYJ2XSXqJp+gX268WpbaAx3U02U2TZd5qOA7GksylnSOSfDne2JIz+1SP2Eb g3piDBqiPviZquyre5J+uDlgsEBtaVXEOhmvyc5X1kISUcJBeYh2mYDvVixmF4cedepQkE qJ+LCC2gWGw0b4fU+AfXfTgdCRDFneGWPRb0I3mDlrcp2QYvAsbNBYTSkzbwd7StwRrVtf t1hPNqLYTfYzRcubJgiHCZ7B2dMA1Um+8pgAJ7WaNzaWAD5pCpaszxPg5oK+gQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711695010; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1JoQSa7jrKZi5MCln7ZXYRPra4RicDOu3f/UpoyFI6s=; b=Wk4vpSlGN84Z/03ZLPKdYiNcXovIPIhdGoUYpJesHf7HzFgaGLBDEreCzWU47INZfuaHux Ok2l1AFdt63xXxtkyW94Wm5ZcFqWiJAWSV2riN73Bn2ow6doLup/DFIJCitWM9UR1ELGv0 UG52wYXdkaVRMSasKP2ZmZDVHG/qNDA5BdmE2uMU6xPt1Z0u1ofk/uC9uweBgmHRZKDogV C1XSc0zbjsLhhlxEd9hH8d8x+03t1EEseQI5K/ICmndBkIjcjCEWKkUjZGBFA+hgfLVE40 ibp935yekeKFN6i3PRT4D5uabzKDuS9+Xd+YzvddPv7biS5sUlkZpur/jIRf3Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V5WHk0C88z10lB; Fri, 29 Mar 2024 06:50:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42T6o9Zm014261; Fri, 29 Mar 2024 06:50:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42T6o9CQ014256; Fri, 29 Mar 2024 06:50:09 GMT (envelope-from git) Date: Fri, 29 Mar 2024 06:50:09 GMT Message-Id: <202403290650.42T6o9CQ014256@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Stefan =?utf-8?Q?E=C3=9Fer?= Subject: git: 10f08c01deaa - stable/14 - ldconfig: remove ignored -v (verbose) option List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: se X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 10f08c01deaa5a9f07e853995a4d8f7d62c3d33e Auto-Submitted: auto-generated The branch stable/14 has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=10f08c01deaa5a9f07e853995a4d8f7d62c3d33e commit 10f08c01deaa5a9f07e853995a4d8f7d62c3d33e Author: Stefan Eßer AuthorDate: 2024-03-01 15:29:31 +0000 Commit: Stefan Eßer CommitDate: 2024-03-29 06:49:25 +0000 ldconfig: remove ignored -v (verbose) option The -v option used to print useful information when operating on a.out format libraries. After the removal of a.out support, it was accepted but did not have any effect. Remove the option and update the man-page. While here mention the set of historic options that are accepted but ignored: "-elf", "-s", and "-v". The FILES section contained outdated information and did not mention the way library directories of optional ports and packages are included in the library search path recorded in the hints file. The description of the "-B" option was incorrect (described a planned change) for big-endian platforms (powerpc64). These do still default to big-endian hints files, since the current version of the "pkg" program expects the hints file to be in native byte-order. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D44139 (cherry picked from commit 484de86fbe4cf0b77e9cc15e8a6a656603b9174a) --- sbin/ldconfig/ldconfig.8 | 31 +++++++++++++++++++------------ sbin/ldconfig/ldconfig.c | 8 ++++---- 2 files changed, 23 insertions(+), 16 deletions(-) diff --git a/sbin/ldconfig/ldconfig.8 b/sbin/ldconfig/ldconfig.8 index 88d99567912e..f3ced2220e9a 100644 --- a/sbin/ldconfig/ldconfig.8 +++ b/sbin/ldconfig/ldconfig.8 @@ -41,7 +41,7 @@ .Sh SYNOPSIS .Nm .Op Fl 32 -.Op Fl BRimrv +.Op Fl BRimr .Op Fl f Ar hints_file .Op Ar directory | Ar .Sh DESCRIPTION @@ -106,8 +106,8 @@ on 64-bit systems that support running 32-bit binaries. .It Fl elf Ignored for backwards compatibility. .It Fl B -Force writing big-endian binary data´to the hints file. -The default is to create little-endian hints files on all architectures. +Force writing big-endian binary data to the hints file. +The default is to create hints files in the native byte-order of the host. Reading of and merging into hints files preserves the endianness of the existing hints file. .It Fl R @@ -131,9 +131,14 @@ on the standard output. The hints file is not modified. .Pp Scan and print all libraries found on the directories list. -.It Fl v -Switch on verbose mode. .El +.Pp +The historic options +.Fl elf , +.Fl s , +and +.Fl v +are accepted but ignored. .Sh SECURITY Special care must be taken when loading shared libraries into the address space of @@ -150,17 +155,19 @@ Thus, serves to specify the trusted collection of directories from which shared objects can be safely loaded. .Sh FILES -.Bl -tag -width /var/run/ld-elf.so.hintsxxx -compact +.Bl -tag -width /usr/local/libdata/ldconfig/* -compact .It Pa /var/run/ld-elf.so.hints Standard hints file for the ELF dynamic linker. -.It Pa /etc/ld-elf.so.conf -Conventional configuration file containing directory names for -invocations with -.Fl elf . .It Pa /var/run/ld-elf32.so.hints -Conventional configuration files containing directory names for -invocations with +Hints file for 32 bit libraries on 64 bit architectures, processed by +ldconfig when invoked with .Fl 32 . +.It Pa /etc/ld-elf.so.conf +Optional file with names of directories to be included in the standard +hints file when booting to multi-user mode. +.It Pa /usr/local/libdata/ldconfig/* +Additional files with names of directories provided by optional ports +or packages. .El .Sh SEE ALSO .Xr ld 1 , diff --git a/sbin/ldconfig/ldconfig.c b/sbin/ldconfig/ldconfig.c index 0eb9cb801ac2..7700fd1f4574 100644 --- a/sbin/ldconfig/ldconfig.c +++ b/sbin/ldconfig/ldconfig.c @@ -57,9 +57,9 @@ main(int argc, char **argv) { const char *hints_file; int c; - bool is_32, justread, merge, rescan, force_be, verbose; + bool is_32, justread, merge, rescan, force_be; - force_be = is_32 = justread = merge = rescan = verbose = false; + force_be = is_32 = justread = merge = rescan = false; while (argc > 1) { if (strcmp(argv[1], "-aout") == 0) { @@ -104,7 +104,7 @@ main(int argc, char **argv) /* was nostd */ break; case 'v': - verbose = true; + /* was verbose */ break; default: usage(); @@ -127,7 +127,7 @@ static void usage(void) { fprintf(stderr, - "usage: ldconfig [-32] [-elf] [-BRimrv] [-f hints_file]" + "usage: ldconfig [-32] [-BRimr] [-f hints_file]" "[directory | file ...]\n"); exit(1); } From nobody Fri Mar 29 18:11:43 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V5pQ80lFBz5FNY1; Fri, 29 Mar 2024 18:11: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 4V5pQ80Jg1z4gsk; Fri, 29 Mar 2024 18:11:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711735904; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GAIoG5kILoYXH6LzMzM08S7Whjglu2pkVh8aimz5Uyg=; b=mMrage3jwkY3kwTscyK4yAw0avtOxgPgpsSrltU4nPq5Q4hm3gdVx42oWGeOpicgnrcLQi idwE3RH3PeuMZ5FAPTAhMSW4A8Fu59V2XKJTB+DJif4ssYDV2bY9QriaALvBoUMKcl6oF/ UjibCoaGyxTuUrrwWWFFrg8wDDDemwqODKcOpPg55/BHbnR+YaWa78lTaZ3BHJ/aeVTIMQ MsC5WxGQRaqZp/6nPQxPZVyiWs3ufzAiaN5rqwPxvlTg9v6yt+y3qinvagx59A7A8qUmMh j5fGvjWnZAXN16Fl6oudMv2np2uGT+Syy06wlt/dE4gL7JNFdnHXsDS/r6irdw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711735904; a=rsa-sha256; cv=none; b=mCNZJZaDl+xy3Fb+JGY4s/lWD5u2KwoMSFTZ9XcnZNpPNgAXkjAIGMbL/uberRgvw3kulC T6dgUZ6TsipJHDWDoWQ+zwf+5xhaBcbpgJY8K/jmtVWs3pxvUljxwoxfnUd3guh2oRM5eu K8nD7IU9FrAfbOop1IuMPZMhplnL5fJwzXeuJc69iAaS3yQD5uG1syJKWTmx/v4kL3Em8a 7rBl4Gj4906fUqAXlIxm28qNicID3FGg6G9uRUT+kX26WJph9VmiNVw+3A2pYRGyf3SVbO JZx/FqIi656LHH3D+F1GimhLHBy/QfkFmNcAlxAORetYTNQ0Zhq0nfuvtuJiWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711735904; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GAIoG5kILoYXH6LzMzM08S7Whjglu2pkVh8aimz5Uyg=; b=tYKbYpsv1h2CANa5tQitFWcc67/0ckqESTASmgnOlZxbkjx+3FgO1ULIwBHl08zNLGgRSc /2GUlTaXztTw4LpjZ8vwRRIBof92CBb4QjrKyvjy9O3UjXBwEqFjC2qxtxiWUHqIIErvrM tvPrzZeoU3mV7RX1qfy2BN2QJRn9Bd+Xg3PR/IMW2d/IwcEI0+g4kjllwGNK5WojMK+Awu nRnkvYIS6W0HRcTEB8Bl9ezFn29E5KyCCRBq6mQwDxl8e6fhkGDrt3djZ2DHbcjzgtfnIT 3LgF9HF4X3+WstGjFR+2xZ7IhKUsiQwUjmYz7+o9xHmLXb1XDfru8MQsHAfcXw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V5pQ7703lzLXx; Fri, 29 Mar 2024 18:11:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42TIBh6G077927; Fri, 29 Mar 2024 18:11:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42TIBhLv077924; Fri, 29 Mar 2024 18:11:43 GMT (envelope-from git) Date: Fri, 29 Mar 2024 18:11:43 GMT Message-Id: <202403291811.42TIBhLv077924@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: ad9aa0685925 - stable/14 - ktrace: Add __ktrace_used List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ad9aa0685925a1297fc7683e2a178dec419fe3e6 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ad9aa0685925a1297fc7683e2a178dec419fe3e6 commit ad9aa0685925a1297fc7683e2a178dec419fe3e6 Author: Mark Johnston AuthorDate: 2024-03-09 05:08:43 +0000 Commit: Mark Johnston CommitDate: 2024-03-29 13:53:04 +0000 ktrace: Add __ktrace_used This suppresses warnings about write-only variables when the KTRACE option is disabled, akin __diagused and __witness_used. MFC after: 1 week (cherry picked from commit cce4979133ba540ca2dfd57631c6f91673b9bafd) --- sys/sys/ktrace.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/sys/ktrace.h b/sys/sys/ktrace.h index 110e14698570..594f912b02ef 100644 --- a/sys/sys/ktrace.h +++ b/sys/sys/ktrace.h @@ -336,8 +336,10 @@ void ktrcapfail(enum ktr_cap_fail_type, const cap_rights_t *, extern u_int ktr_geniosize; #ifdef KTRACE extern int ktr_filesize_limit_signal; +#define __ktrace_used #else #define ktr_filesize_limit_signal 0 +#define __ktrace_used __unused #endif #else From nobody Fri Mar 29 18:11:44 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V5pQ92gjVz5FNW4; Fri, 29 Mar 2024 18:11: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 4V5pQ90xCfz4gxZ; Fri, 29 Mar 2024 18:11:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711735905; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+JTilZGr4eZF8rg22/4PZcLcX4akmFc49DmfoaBklIQ=; b=KkQg7ONCTfClywbzNlrCjkORYH6YLHSFwAwNYE61OHvcF1ppooe3lwuokDEUCef6LStLWS sYu5r1tW885xk4RSm0ICLZR0yerbLNsQfk1pfIJ6mMyWxx8w2DFh0Rg/uMx6f7aEHpXE4V Mrkpu8dnenJfeAScjwPaDF2ls1d+rZLVBWKtjuJFHzZ6n9W0KDpKm+TBLmiLQTEDE/QVUe VgEOhya1b+w9H+fZAn48gznyHK/5YAkIQILtkANsBwTRAFka9W+ntLBk48kPnFlEASVUAg XnUWFzx+qTKbU7AIsn4SjPWTE/3+pN4FACHP+avb6bjYUw7e3C6UakXv0Ck9FA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711735905; a=rsa-sha256; cv=none; b=EUHb6sBORhMlGnKhsC+laAEdLPAxT401Ta/2KkDDatvZ5rKyKfasecpXW71pbn/FEgXDjh mzprMM0nj8EDzi7cbnQOw4Z62Ig7RprJ4C+Q1nvhTajfW0wBwaCkIb3SU8b8Cn/cExYsGt 7PQ9t4yQjoKPYNOicMnrwohrHk1V1/bV5feZ413KS59STi3cIEm3kDCliEb9+4Up56HOpe wUppNAe5gbIhqQDGw+bkbTuvmK+ZwQKPYVE08D9MPPkOTyj8p092tD9BlVRZGrzsim1Fnf 8NUiN2n6TWbetEyvu35jSHpS2V1klGBsGJoAuUqbyLrEQtzM46wcTr0P2S4yNQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711735905; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+JTilZGr4eZF8rg22/4PZcLcX4akmFc49DmfoaBklIQ=; b=jVNl3L0/0SxtSIRB8GSiDZRMwjqK4tXkWG3Jsxtls+NtvvtCGJWvpPmn5Wfo8hlplZSbKl ZyEyVMGLjzwxUXZGyyhPtAyRH0TG0sHi+L0IoROmfGCqMD0VBm+4kWGus0VH1cN/y3WpXw E67U2u7oHr9Tjy3Ht/T8W/0vN9K9TXblw9BZtZcGE4NECsrONrk3zXRgay/V5M4mz6q+Em ywSQVeIpaBT2hId6Dtif34F8Lfh63EJ7G4z6GeZroptvF6Lc5g82ByQIiu4xNGFCl8m5h+ Hp717mh8Vu1pGxECNEOH+8XLantLQEb/MxWre7hLo8Jn1gt0zKI1lu9e9XgTMQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V5pQ90YQjzM39; Fri, 29 Mar 2024 18:11:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42TIBiFR077988; Fri, 29 Mar 2024 18:11:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42TIBi4a077985; Fri, 29 Mar 2024 18:11:44 GMT (envelope-from git) Date: Fri, 29 Mar 2024 18:11:44 GMT Message-Id: <202403291811.42TIBi4a077985@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 3ba61343f708 - stable/14 - ktrace: Fix the build when options KTRACE is not configured List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3ba61343f708ba9edabe9e3b2a2e4467bfabd2c9 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3ba61343f708ba9edabe9e3b2a2e4467bfabd2c9 commit 3ba61343f708ba9edabe9e3b2a2e4467bfabd2c9 Author: Mark Johnston AuthorDate: 2024-03-09 05:11:01 +0000 Commit: Mark Johnston CommitDate: 2024-03-29 13:53:05 +0000 ktrace: Fix the build when options KTRACE is not configured MFC after: 1 week Reported by: John Nielsen (cherry picked from commit a58813fd701ea4b248cca0dfab9971d863fbcf6a) --- sys/kern/kern_condvar.c | 12 ++++++------ sys/kern/kern_synch.c | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/kern/kern_condvar.c b/sys/kern/kern_condvar.c index 2731f581a29f..e4bd1f926c00 100644 --- a/sys/kern/kern_condvar.c +++ b/sys/kern/kern_condvar.c @@ -37,13 +37,13 @@ #include #include #include +#include #include #include #include #include #include #ifdef KTRACE -#include #include #include #endif @@ -112,7 +112,7 @@ _cv_wait(struct cv *cvp, struct lock_object *lock) char wmesg[WMESGLEN + 1]; #endif struct lock_class *class; - struct thread *td; + struct thread *td __ktrace_used; uintptr_t lock_state; td = curthread; @@ -174,7 +174,7 @@ _cv_wait_unlock(struct cv *cvp, struct lock_object *lock) char wmesg[WMESGLEN + 1]; #endif struct lock_class *class; - struct thread *td; + struct thread *td __ktrace_used; td = curthread; CV_ASSERT(cvp, lock, td); @@ -232,7 +232,7 @@ _cv_wait_sig(struct cv *cvp, struct lock_object *lock) char wmesg[WMESGLEN + 1]; #endif struct lock_class *class; - struct thread *td; + struct thread *td __ktrace_used; uintptr_t lock_state; int rval; @@ -301,7 +301,7 @@ _cv_timedwait_sbt(struct cv *cvp, struct lock_object *lock, sbintime_t sbt, char wmesg[WMESGLEN + 1]; #endif struct lock_class *class; - struct thread *td; + struct thread *td __ktrace_used; int lock_state, rval; td = curthread; @@ -371,7 +371,7 @@ _cv_timedwait_sig_sbt(struct cv *cvp, struct lock_object *lock, char wmesg[WMESGLEN + 1]; #endif struct lock_class *class; - struct thread *td; + struct thread *td __ktrace_used; int lock_state, rval; td = curthread; diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c index 9f11e9b3ed08..2241162f33ab 100644 --- a/sys/kern/kern_synch.c +++ b/sys/kern/kern_synch.c @@ -47,6 +47,7 @@ #include #include #include +#include #include #include #include @@ -62,7 +63,6 @@ #include #ifdef KTRACE #include -#include #endif #ifdef EPOCH_TRACE #include @@ -133,7 +133,7 @@ int _sleep(const void *ident, struct lock_object *lock, int priority, const char *wmesg, sbintime_t sbt, sbintime_t pr, int flags) { - struct thread *td; + struct thread *td __ktrace_used; struct lock_class *class; uintptr_t lock_state; int catch, pri, rval, sleepq_flags; @@ -240,7 +240,7 @@ int msleep_spin_sbt(const void *ident, struct mtx *mtx, const char *wmesg, sbintime_t sbt, sbintime_t pr, int flags) { - struct thread *td; + struct thread *td __ktrace_used; int rval; WITNESS_SAVE_DECL(mtx); From nobody Fri Mar 29 18:11:46 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V5pQB3rmHz5FN8t; Fri, 29 Mar 2024 18:11:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4V5pQB2cFmz4h2t; Fri, 29 Mar 2024 18:11:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711735906; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xRne4va5ewm9I0IlEGgWDe5md6y5j/YNK27JKXkRsN0=; b=XOqcrehpwawj+6Ai2DXLPUX5K6vOtwrGg4d3XpOG8pCpkBWVgxPZLfUfe9sYANGvcTNSnc 5zOQKX6wEMQnCjly1Fg2ziSVCet6z3gbpslgQM+AY7zneh2RNS458sOyQPl/vYkK28UcPu mYZfFOnFZkAE0Io8qNFypeKd1An2IR5O9b1cDB+J8346tHUu+sf0cOAzpAC9/GWWuZRxz/ 9hp6uQSuR47CvgIulSici+umRXpsT7Kq4+R0CAOGnKQUfUeocW1klwx/RDosCLALAfqEus D0JIHqn/zEhPuygifex+suRR0sZjBTKdhowQQ5/78QVvG2/aE553JgTH6TbHAQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711735906; a=rsa-sha256; cv=none; b=EBWxX/hQaBlAckneUl0Zevcb2K7cMjPyl7aS7vfEuBx7zYrWR8DE8fcfK3qYXTXg6mR/8z gi3IZvZ3enm1H5EhHQK+YcJ2WQexv2u9rfyxodcyqBawCDWQyndBenjLObNk6ruaD3mJCo euWM8du/1u4U7LtrNTXa6ZP+DOzQ7hY5I99x5YQze3VtUzHvR+8YJZN452j12v8M6k0BCG gdtAIzRytXcew3zq4R1MlsFZqbUNX6iIHc7I2f76ZfbhfPKw1hthmIP1kG/j61VE0hhxaN Pm7vXTghf1Xly9yX69JPD2s9a+FFE+k0URiAwuA812wgekjAGGEFArho4uzNfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711735906; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xRne4va5ewm9I0IlEGgWDe5md6y5j/YNK27JKXkRsN0=; b=UMU2CdFY1GSBe+zn6rJ+7rGB3HhrwCJTnk5wosaRguYKp7NARvNoW/1HNqdW05KJt7atya Imrhl/dm0aSoYb/Rfva9/2BVRPmGS1XWl6S5uHQFg7/ClepHo7Fn2JKPZ3/Nw8trsxsi/F ydVsDQ5UzyL6HNO371b6YEWyTMcpv6LP6KofWPJANiG+RKhQO8kFMUP9bF29tyTEi9SlZa LYIVnifwWLLUou6zcUFWLGdTBwLWuI+aGODrNv3tgbzDYWKj99slr5kLBEfg1kzdNXnHN3 SV0plpV1+/iLojFEl9oc8zPAAVh1Ww/Z1qnJbBZamM/RRS803sxhZm/6aEUwpA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V5pQB222szLyy; Fri, 29 Mar 2024 18:11:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42TIBkRA078032; Fri, 29 Mar 2024 18:11:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42TIBk88078029; Fri, 29 Mar 2024 18:11:46 GMT (envelope-from git) Date: Fri, 29 Mar 2024 18:11:46 GMT Message-Id: <202403291811.42TIBk88078029@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 15e12749ef1d - stable/14 - ossl: Add support for armv7 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 15e12749ef1dd55a18a7b1e5672e2b75f1bde68b Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=15e12749ef1dd55a18a7b1e5672e2b75f1bde68b commit 15e12749ef1dd55a18a7b1e5672e2b75f1bde68b Author: Mark Johnston AuthorDate: 2023-11-30 17:46:08 +0000 Commit: Mark Johnston CommitDate: 2024-03-29 13:53:05 +0000 ossl: Add support for armv7 OpenSSL provides implementations of several AES modes which use bitslicing and can be accelerated on CPUs which support the NEON extension. This patch adds arm platform support to ossl(4) and provides an AES-CBC implementation, though bsaes_cbc_encrypt() only implements decryption. The real goal is to provide an accelerated AES-GCM implementation; this will be added in a subsequent patch. Initially derived from https://reviews.freebsd.org/D37420. Reviewed by: jhb Sponsored by: Klara, Inc. Sponsored by: Stormshield MFC after: 3 months Differential Revision: https://reviews.freebsd.org/D41304 (cherry picked from commit 44f8e1e8530e1d2e95e84bbbe3d22ac9cb2557fe) --- sys/conf/files.arm | 10 +++++ sys/crypto/openssl/arm/arm_arch.h | 84 ++++++++++++++++++++++++++++++++++ sys/crypto/openssl/ossl_aes.c | 2 + sys/crypto/openssl/ossl_aes_gcm.h | 6 +-- sys/crypto/openssl/ossl_arm.c | 59 ++++++++++++++++++++++++ sys/crypto/openssl/ossl_arm.h | 94 +++++++++++++++++++++++++++++++++++++++ sys/crypto/openssl/ossl_cipher.h | 8 ++++ sys/modules/Makefile | 6 ++- sys/modules/ossl/Makefile | 12 +++++ 9 files changed, 275 insertions(+), 6 deletions(-) diff --git a/sys/conf/files.arm b/sys/conf/files.arm index 94a8755fd315..3800f4345765 100644 --- a/sys/conf/files.arm +++ b/sys/conf/files.arm @@ -133,6 +133,16 @@ libkern/ucmpdi2.c standard libkern/udivdi3.c standard libkern/umoddi3.c standard +crypto/openssl/ossl_arm.c optional ossl +crypto/openssl/arm/aes-armv4.S optional ossl +crypto/openssl/arm/bsaes-armv7.S optional ossl \ + compile-with "${CC} -D__KERNEL__ -c ${CFLAGS:N-mgeneral-regs-only} ${WERROR} ${.IMPSRC}" +crypto/openssl/arm/chacha-armv4.S optional ossl +crypto/openssl/arm/poly1305-armv4.S optional ossl +crypto/openssl/arm/sha1-armv4-large.S optional ossl +crypto/openssl/arm/sha256-armv4.S optional ossl +crypto/openssl/arm/sha512-armv4.S optional ossl + # Annapurna support arm/annapurna/alpine/alpine_ccu.c optional al_ccu fdt arm/annapurna/alpine/alpine_nb_service.c optional al_nb_service fdt diff --git a/sys/crypto/openssl/arm/arm_arch.h b/sys/crypto/openssl/arm/arm_arch.h new file mode 100644 index 000000000000..8b7105571d78 --- /dev/null +++ b/sys/crypto/openssl/arm/arm_arch.h @@ -0,0 +1,84 @@ +/* + * Copyright 2011-2018 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef OSSL_CRYPTO_ARM_ARCH_H +# define OSSL_CRYPTO_ARM_ARCH_H + +# if !defined(__ARM_ARCH__) +# if defined(__CC_ARM) +# define __ARM_ARCH__ __TARGET_ARCH_ARM +# if defined(__BIG_ENDIAN) +# define __ARMEB__ +# else +# define __ARMEL__ +# endif +# elif defined(__GNUC__) +# if defined(__aarch64__) +# define __ARM_ARCH__ 8 +# if __BYTE_ORDER__==__ORDER_BIG_ENDIAN__ +# define __ARMEB__ +# else +# define __ARMEL__ +# endif + /* + * Why doesn't gcc define __ARM_ARCH__? Instead it defines + * bunch of below macros. See all_architectures[] table in + * gcc/config/arm/arm.c. On a side note it defines + * __ARMEL__/__ARMEB__ for little-/big-endian. + */ +# elif defined(__ARM_ARCH) +# define __ARM_ARCH__ __ARM_ARCH +# elif defined(__ARM_ARCH_8A__) +# define __ARM_ARCH__ 8 +# elif defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || \ + defined(__ARM_ARCH_7R__)|| defined(__ARM_ARCH_7M__) || \ + defined(__ARM_ARCH_7EM__) +# define __ARM_ARCH__ 7 +# elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || \ + defined(__ARM_ARCH_6K__)|| defined(__ARM_ARCH_6M__) || \ + defined(__ARM_ARCH_6Z__)|| defined(__ARM_ARCH_6ZK__) || \ + defined(__ARM_ARCH_6T2__) +# define __ARM_ARCH__ 6 +# elif defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5T__) || \ + defined(__ARM_ARCH_5E__)|| defined(__ARM_ARCH_5TE__) || \ + defined(__ARM_ARCH_5TEJ__) +# define __ARM_ARCH__ 5 +# elif defined(__ARM_ARCH_4__) || defined(__ARM_ARCH_4T__) +# define __ARM_ARCH__ 4 +# else +# error "unsupported ARM architecture" +# endif +# endif +# endif + +# if !defined(__ARM_MAX_ARCH__) +# define __ARM_MAX_ARCH__ __ARM_ARCH__ +# endif + +# if __ARM_MAX_ARCH__<__ARM_ARCH__ +# error "__ARM_MAX_ARCH__ can't be less than __ARM_ARCH__" +# elif __ARM_MAX_ARCH__!=__ARM_ARCH__ +# if __ARM_ARCH__<7 && __ARM_MAX_ARCH__>=7 && defined(__ARMEB__) +# error "can't build universal big-endian binary" +# endif +# endif + +# ifndef __ASSEMBLER__ +extern unsigned int OPENSSL_armcap_P; +# endif + +# define ARMV7_NEON (1<<0) +# define ARMV7_TICK (1<<1) +# define ARMV8_AES (1<<2) +# define ARMV8_SHA1 (1<<3) +# define ARMV8_SHA256 (1<<4) +# define ARMV8_PMULL (1<<5) +# define ARMV8_SHA512 (1<<6) + +#endif diff --git a/sys/crypto/openssl/ossl_aes.c b/sys/crypto/openssl/ossl_aes.c index 800518e51205..9560a8149a7c 100644 --- a/sys/crypto/openssl/ossl_aes.c +++ b/sys/crypto/openssl/ossl_aes.c @@ -40,6 +40,8 @@ #include #elif defined (__aarch64__) #include +#elif defined (__arm__) +#include #endif static ossl_cipher_process_t ossl_aes_cbc; diff --git a/sys/crypto/openssl/ossl_aes_gcm.h b/sys/crypto/openssl/ossl_aes_gcm.h index cd0c1e324354..90511318da6c 100644 --- a/sys/crypto/openssl/ossl_aes_gcm.h +++ b/sys/crypto/openssl/ossl_aes_gcm.h @@ -28,7 +28,6 @@ #define _OSSL_AES_GCM_H_ #include -#include struct ossl_gcm_context; @@ -64,10 +63,7 @@ struct ossl_gcm_context { unsigned int mres, ares; } gcm; - struct { - uint32_t ks[4 * (RIJNDAEL_MAXNR + 1)]; - int rounds; - } aes_ks; + struct ossl_aes_keysched aes_ks; const struct ossl_aes_gcm_ops *ops; }; diff --git a/sys/crypto/openssl/ossl_arm.c b/sys/crypto/openssl/ossl_arm.c new file mode 100644 index 000000000000..1ec95acd74cd --- /dev/null +++ b/sys/crypto/openssl/ossl_arm.c @@ -0,0 +1,59 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2023 Stormshield + * Copyright (c) 2023 Semihalf + * + * 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, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any + * redistribution must be conditioned upon including a substantially + * similar Disclaimer requirement for further binary redistribution. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY + * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include + +#include +#include + +#include +#include +#include + +ossl_cipher_setkey_t AES_set_encrypt_key; +ossl_cipher_setkey_t AES_set_decrypt_key; + +unsigned int OPENSSL_armcap_P; + +void +ossl_cpuid(struct ossl_softc *sc) +{ + if (elf_hwcap & HWCAP_NEON) { + OPENSSL_armcap_P |= ARMV7_NEON; + + sc->has_aes = true; + ossl_cipher_aes_cbc.set_encrypt_key = AES_set_encrypt_key; + ossl_cipher_aes_cbc.set_decrypt_key = AES_set_decrypt_key; + } +} diff --git a/sys/crypto/openssl/ossl_arm.h b/sys/crypto/openssl/ossl_arm.h new file mode 100644 index 000000000000..56772feb43f2 --- /dev/null +++ b/sys/crypto/openssl/ossl_arm.h @@ -0,0 +1,94 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2023 Stormshield + * Copyright (c) 2023 Semihalf + * + * 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, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any + * redistribution must be conditioned upon including a substantially + * similar Disclaimer requirement for further binary redistribution. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY + * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES. + */ + +#ifndef __OSSL_ARM__ +#define __OSSL_ARM__ + +#include +#include + +#include + +struct bsaes_key { + struct ossl_aes_keysched ks; + int converted; +#define BSAES_KEY_SIZE (128 * (RIJNDAEL_MAXNR - 1) + 2 * AES_BLOCK_LEN) + uint8_t bitslice[BSAES_KEY_SIZE] __aligned(8); +} __aligned(8); + +ossl_cipher_encrypt_t ossl_bsaes_cbc_encrypt; + +void AES_encrypt(const void *, void *, const void *); + +static inline void +AES_CBC_ENCRYPT(const unsigned char *in, unsigned char *out, + size_t length, const void *key, unsigned char *iv, int encrypt) +{ + struct bsaes_key bsks; + uint32_t iv32[4], scratch[4]; + + /* + * bsaes_cbc_encrypt has some special requirements w.r.t input data. + * The key buffer, that normally holds round keys is used as a scratch + * space. 128 bytes per round of extra space is required. + * Another thing is that only decryption is supported. + * In the case of encryption block chaining has to be done in C. + */ + if (!encrypt) { + memcpy(&bsks.ks, key, sizeof(bsks.ks)); + bsks.converted = 0; + ossl_bsaes_cbc_encrypt(in, out, length, &bsks, iv, false); + return; + } + + length /= AES_BLOCK_LEN; + memcpy(iv32, iv, AES_BLOCK_LEN); + + while (length-- > 0) { + memcpy(scratch, in, AES_BLOCK_LEN); + + /* XOR plaintext with IV. */ + scratch[0] ^= iv32[0]; + scratch[1] ^= iv32[1]; + scratch[2] ^= iv32[2]; + scratch[3] ^= iv32[3]; + + AES_encrypt(scratch, out, key); + + memcpy(iv32, out, AES_BLOCK_LEN); + in += AES_BLOCK_LEN; + out += AES_BLOCK_LEN; + } + + memcpy(iv, iv32, AES_BLOCK_LEN); +} + +#endif /* __OSSL_ARM__ */ diff --git a/sys/crypto/openssl/ossl_cipher.h b/sys/crypto/openssl/ossl_cipher.h index 6599524a707f..886fd9f83350 100644 --- a/sys/crypto/openssl/ossl_cipher.h +++ b/sys/crypto/openssl/ossl_cipher.h @@ -28,6 +28,9 @@ #ifndef __OSSL_CIPHER_H__ #define __OSSL_CIPHER_H__ +#include +#include + struct ossl_session_cipher; struct cryptop; struct crypto_session_params; @@ -50,4 +53,9 @@ struct ossl_cipher { ossl_cipher_process_t *process; }; +struct ossl_aes_keysched { + uint32_t ks[4 * (RIJNDAEL_MAXNR + 1)]; + int rounds; +}; + #endif diff --git a/sys/modules/Makefile b/sys/modules/Makefile index b34d20dd9147..4dedd440017f 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -565,7 +565,6 @@ _iwlwifi= iwlwifi .if ${MK_SOURCELESS_UCODE} != "no" _iwlwififw= iwlwififw .endif -_ossl= ossl _rtw88= rtw88 .if ${MK_SOURCELESS_UCODE} != "no" _rtw88fw= rtw88fw @@ -573,6 +572,11 @@ _rtw88fw= rtw88fw _vmware= vmware .endif +.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ + ${MACHINE_CPUARCH} == "i386" || ${MACHINE_ARCH} == "armv7" +_ossl= ossl +.endif + # MAC framework .if ${KERN_OPTS:MMAC} || defined(ALL_MODULES) _mac_biba= mac_biba diff --git a/sys/modules/ossl/Makefile b/sys/modules/ossl/Makefile index 7f70f19db76c..d26aabf7bff2 100644 --- a/sys/modules/ossl/Makefile +++ b/sys/modules/ossl/Makefile @@ -16,6 +16,16 @@ SRCS= bus_if.h \ ossl_sha512.c \ ${SRCS.${MACHINE_CPUARCH}} +SRCS.arm= \ + aes-armv4.S \ + bsaes-armv7.S \ + chacha-armv4.S \ + poly1305-armv4.S \ + sha1-armv4-large.S \ + sha256-armv4.S \ + sha512-armv4.S \ + ossl_arm.c + SRCS.aarch64= \ chacha-armv8.S \ poly1305-armv8.S \ @@ -47,6 +57,8 @@ SRCS.i386= \ sha512-586.S \ ossl_x86.c +CFLAGS.bsaes-armv7.S+= -D__KERNEL__ + # For arm64, we are forced to rewrite the compiler invocation for the assembly # files, to remove -mgeneral-regs-only. ${SRCS.aarch64:M*.S:S/S/o/}: ${.TARGET:R}.S From nobody Fri Mar 29 18:11:47 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V5pQC6htfz5FNW5; Fri, 29 Mar 2024 18:11: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 4V5pQC3DXtz4h0h; Fri, 29 Mar 2024 18:11:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711735907; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5GmBJ4w4bmg1/HoQPERsf46P33JknZDmp10OXMEW0FA=; b=ogXuIQwnaMHJltHVIdX24mNmLtMdJWy1qiBBqqjhjcwRfeSPWcdg6ijqVQ+v1GjrTYxra0 NgoXTFAjQC8kMyqRoxXRkayFB8OeIdKvrAq07o0TxqsP7FHJWai88NJXPsrqr1EWknu3hn 7CmChIw5lHO49iAdDx7FfZ7xL1Un/Gii3hqrSirLF2jU/oNAtrLDBlczGkCFisoR2qLkWz mmp3bkBAwgEKM3UrJL0DmxpVKx1oCoMmeRvQfo6WlafD+i3NUcMfcaketKTOywjbdfuLm7 HAEqGXnnArvgKWNe8RL5y/i/GWOu/GTGwUGPdN6O3m+ERBYQKCGrlo72CXbX7w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711735907; a=rsa-sha256; cv=none; b=KepRjPsTIPoAU4bMHAaOmAwUr6PrDESAla7eacAy7ivSVtZbOLnFeN2lxQaZpsb6aPwQ8I GUOK6C5sDUoN+ckY407G0/AtJsncgF81OH2jqh2Y2OS8r35iLEQwWVCis9gJIhsfcNYV3d /v+w75e71zNslbWuZlv6J23c4Vlj4fTYH2hlwm6uP7l28eFhmqzxLl+5tG4kKO5mfP16aL ZFjLVPZE8tWWC/RvYYS2axXe3YjaSUXFeZxw1fren/nVNC1F5vCyPAo06iwB0ZOXCvs6T0 8ixdV9Z8fMWOmG4roD835pJevP5CE9GxJ3xzvVr1Jg6iVsCPq5cNdrD8kgnxMg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711735907; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5GmBJ4w4bmg1/HoQPERsf46P33JknZDmp10OXMEW0FA=; b=GJbjAJRSHgQM0ySOJ23DYfOQIf7x9A0VVuro/H8SGRO8gzf8VLVnBvNzW4YO7/fJgHxMOl yYBEFaFsUZH8BU4dFxyp03qFV9NvS65Np3mWbyD8Kt/v5PCABrQf7aJdny4HOn85ws3J8T NA/Je2TK6oufec2RhH4EY3LxIrJHBJAxM1eqOzi4RdKD+jY8uwFuUUOMB86H71I+Tezrve dGLzMs5MZhPuFyu85ZhfTnvcrKfZltcXbb97I2U/IwEyCWYg0C0UjbjHjWSkWv1JzKwgAW r8hjgiQBer5OlYlrqfVdSNNv9su3y+1uT0YsH2+k3wdSxupZ6a//rRHiYwwt2Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V5pQC2kZszLQh; Fri, 29 Mar 2024 18:11:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42TIBlBO078081; Fri, 29 Mar 2024 18:11:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42TIBlYU078078; Fri, 29 Mar 2024 18:11:47 GMT (envelope-from git) Date: Fri, 29 Mar 2024 18:11:47 GMT Message-Id: <202403291811.42TIBlYU078078@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 3166bb7c107d - stable/14 - ossl: Add AES-GCM support for NEON-enabled armv7 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3166bb7c107deb82236d875701f55d1940ee0e27 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3166bb7c107deb82236d875701f55d1940ee0e27 commit 3166bb7c107deb82236d875701f55d1940ee0e27 Author: Mark Johnston AuthorDate: 2023-11-30 17:46:54 +0000 Commit: Mark Johnston CommitDate: 2024-03-29 13:53:05 +0000 ossl: Add AES-GCM support for NEON-enabled armv7 This provides substantially higher throughput than the fallback implementation. Reviewed by: jhb MFC after: 3 months Sponsored by: Klara, Inc. Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D41305 (cherry picked from commit 629a72376d51aad812d6f1279403bc81c38c35d2) --- sys/conf/files.arm | 2 + sys/crypto/openssl/arm/ossl_aes_gcm.c | 359 ++++++++++++++++++++++++++++++++++ sys/crypto/openssl/ossl_arm.c | 6 + sys/modules/ossl/Makefile | 4 +- 4 files changed, 370 insertions(+), 1 deletion(-) diff --git a/sys/conf/files.arm b/sys/conf/files.arm index 3800f4345765..7e6cb6132a13 100644 --- a/sys/conf/files.arm +++ b/sys/conf/files.arm @@ -134,10 +134,12 @@ libkern/udivdi3.c standard libkern/umoddi3.c standard crypto/openssl/ossl_arm.c optional ossl +crypto/openssl/arm/ossl_aes_gcm.c optional ossl crypto/openssl/arm/aes-armv4.S optional ossl crypto/openssl/arm/bsaes-armv7.S optional ossl \ compile-with "${CC} -D__KERNEL__ -c ${CFLAGS:N-mgeneral-regs-only} ${WERROR} ${.IMPSRC}" crypto/openssl/arm/chacha-armv4.S optional ossl +crypto/openssl/arm/ghash-armv4.S optional ossl crypto/openssl/arm/poly1305-armv4.S optional ossl crypto/openssl/arm/sha1-armv4-large.S optional ossl crypto/openssl/arm/sha256-armv4.S optional ossl diff --git a/sys/crypto/openssl/arm/ossl_aes_gcm.c b/sys/crypto/openssl/arm/ossl_aes_gcm.c new file mode 100644 index 000000000000..71a977c446ae --- /dev/null +++ b/sys/crypto/openssl/arm/ossl_aes_gcm.c @@ -0,0 +1,359 @@ +/* + * Copyright 2010-2022 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the Apache License 2.0 (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include + +_Static_assert( + sizeof(struct ossl_gcm_context) <= sizeof(struct ossl_cipher_context), + "ossl_gcm_context too large"); + +void AES_encrypt(const void *in, void *out, const void *ks); +void AES_set_encrypt_key(const void *key, int keylen, void *ks); + +void gcm_init_neon(__uint128_t Htable[16], const uint64_t Xi[2]); +void gcm_gmult_neon(uint64_t Xi[2], const __uint128_t Htable[16]); +void gcm_ghash_neon(uint64_t Xi[2], const __uint128_t Htable[16], + const void *in, size_t len); + +void ossl_bsaes_ctr32_encrypt_blocks(const unsigned char *in, + unsigned char *out, size_t blocks, void *ks, const unsigned char *iv); + +static void +gcm_init(struct ossl_gcm_context *ctx, const void *key, size_t keylen) +{ + memset(&ctx->gcm, 0, sizeof(ctx->gcm)); + memset(&ctx->aes_ks, 0, sizeof(ctx->aes_ks)); + + AES_set_encrypt_key(key, keylen, &ctx->aes_ks); + AES_encrypt(ctx->gcm.H.c, ctx->gcm.H.c, &ctx->aes_ks); + +#if BYTE_ORDER == LITTLE_ENDIAN + ctx->gcm.H.u[0] = bswap64(ctx->gcm.H.u[0]); + ctx->gcm.H.u[1] = bswap64(ctx->gcm.H.u[1]); +#endif + + gcm_init_neon(ctx->gcm.Htable, ctx->gcm.H.u); +} + +static void +gcm_setiv(struct ossl_gcm_context *ctx, const unsigned char *iv, size_t len) +{ + uint32_t ctr; + + KASSERT(len == AES_GCM_IV_LEN, + ("%s: invalid IV length %zu", __func__, len)); + + ctx->gcm.len.u[0] = 0; + ctx->gcm.len.u[1] = 0; + ctx->gcm.ares = ctx->gcm.mres = 0; + + memcpy(ctx->gcm.Yi.c, iv, len); + ctx->gcm.Yi.c[12] = 0; + ctx->gcm.Yi.c[13] = 0; + ctx->gcm.Yi.c[14] = 0; + ctx->gcm.Yi.c[15] = 1; + ctr = 1; + + ctx->gcm.Xi.u[0] = 0; + ctx->gcm.Xi.u[1] = 0; + + AES_encrypt(ctx->gcm.Yi.c, ctx->gcm.EK0.c, &ctx->aes_ks); + ctr++; + +#if BYTE_ORDER == LITTLE_ENDIAN + ctx->gcm.Yi.d[3] = bswap32(ctr); +#else + ctx->gcm.Yi.d[3] = ctr; +#endif +} + +static int +gcm_finish(struct ossl_gcm_context *ctx, const unsigned char *tag, size_t len) +{ + uint64_t alen = ctx->gcm.len.u[0] << 3; + uint64_t clen = ctx->gcm.len.u[1] << 3; + + if (ctx->gcm.mres || ctx->gcm.ares) + gcm_gmult_neon(ctx->gcm.Xi.u, ctx->gcm.Htable); + +#if BYTE_ORDER == LITTLE_ENDIAN + alen = bswap64(alen); + clen = bswap64(clen); +#endif + + ctx->gcm.Xi.u[0] ^= alen; + ctx->gcm.Xi.u[1] ^= clen; + gcm_gmult_neon(ctx->gcm.Xi.u, ctx->gcm.Htable); + + ctx->gcm.Xi.u[0] ^= ctx->gcm.EK0.u[0]; + ctx->gcm.Xi.u[1] ^= ctx->gcm.EK0.u[1]; + + if (tag != NULL) + return timingsafe_bcmp(ctx->gcm.Xi.c, tag, len); + return 0; +} + +static int +gcm_aad(struct ossl_gcm_context *ctx, const unsigned char *aad, size_t len) +{ + size_t i; + unsigned int n; + uint64_t alen = ctx->gcm.len.u[0]; + + if (ctx->gcm.len.u[1]) + return -2; + + alen += len; + if (alen > ((uint64_t)1 << 61) || (sizeof(len) == 8 && alen < len)) + return -1; + ctx->gcm.len.u[0] = alen; + + n = ctx->gcm.ares; + if (n) { + while (n && len) { + ctx->gcm.Xi.c[n] ^= *(aad++); + --len; + n = (n + 1) % 16; + } + if (n == 0) + gcm_gmult_neon(ctx->gcm.Xi.u, ctx->gcm.Htable); + else { + ctx->gcm.ares = n; + return 0; + } + } + if ((i = (len & (size_t)-AES_BLOCK_LEN))) { + gcm_ghash_neon(ctx->gcm.Xi.u, ctx->gcm.Htable, aad, i); + aad += i; + len -= i; + } + if (len) { + n = (unsigned int)len; + for (i = 0; i < len; ++i) + ctx->gcm.Xi.c[i] ^= aad[i]; + } + + ctx->gcm.ares = n; + return 0; +} + +static int +gcm_encrypt(struct ossl_gcm_context *ctx, const unsigned char *in, + unsigned char *out, size_t len) +{ + struct bsaes_key bsks; + unsigned int n, ctr, mres; + size_t i; + uint64_t mlen = ctx->gcm.len.u[1]; + + mlen += len; + if (mlen > (((uint64_t)1 << 36) - 32) || + (sizeof(len) == 8 && mlen < len)) + return -1; + ctx->gcm.len.u[1] = mlen; + + mres = ctx->gcm.mres; + + if (ctx->gcm.ares) { + /* First call to encrypt finalizes GHASH(AAD) */ + gcm_gmult_neon(ctx->gcm.Xi.u, ctx->gcm.Htable); + ctx->gcm.ares = 0; + } + +#if BYTE_ORDER == LITTLE_ENDIAN + ctr = bswap32(ctx->gcm.Yi.d[3]); +#else + ctr = ctx->gcm.Yi.d[3]; +#endif + + n = mres % 16; + if (n) { + while (n && len) { + ctx->gcm.Xi.c[n] ^= *(out++) = *(in++) ^ ctx->gcm.EKi.c[n]; + --len; + n = (n + 1) % 16; + } + if (n == 0) { + gcm_gmult_neon(ctx->gcm.Xi.u, ctx->gcm.Htable); + mres = 0; + } else { + ctx->gcm.mres = n; + return 0; + } + } + if ((i = (len & (size_t)-16))) { + size_t j = i / 16; + + memcpy(&bsks.ks, &ctx->aes_ks, sizeof(bsks.ks)); + bsks.converted = 0; + ossl_bsaes_ctr32_encrypt_blocks(in, out, j, &bsks, + ctx->gcm.Yi.c); + ctr += (unsigned int)j; +#if BYTE_ORDER == LITTLE_ENDIAN + ctx->gcm.Yi.d[3] = bswap32(ctr); +#else + ctx->gcm.Yi.d[3] = ctr; +#endif + in += i; + len -= i; + while (j--) { + for (i = 0; i < 16; ++i) + ctx->gcm.Xi.c[i] ^= out[i]; + gcm_gmult_neon(ctx->gcm.Xi.u, ctx->gcm.Htable); + out += 16; + } + } + if (len) { + AES_encrypt(ctx->gcm.Yi.c, ctx->gcm.EKi.c, &ctx->aes_ks); + ++ctr; +#if BYTE_ORDER == LITTLE_ENDIAN + ctx->gcm.Yi.d[3] = bswap32(ctr); +#else + ctx->gcm.Yi.d[3] = ctr; +#endif + while (len--) { + ctx->gcm.Xi.c[mres++] ^= out[n] = in[n] ^ ctx->gcm.EKi.c[n]; + ++n; + } + } + + ctx->gcm.mres = mres; + return 0; +} + +static int +gcm_decrypt(struct ossl_gcm_context *ctx, const unsigned char *in, + unsigned char *out, size_t len) +{ + struct bsaes_key bsks; + unsigned int n, ctr, mres; + size_t i; + uint64_t mlen = ctx->gcm.len.u[1]; + + mlen += len; + if (mlen > ((1ull << 36) - 32) || (sizeof(len) == 8 && mlen < len)) + return -1; + ctx->gcm.len.u[1] = mlen; + + mres = ctx->gcm.mres; + + if (ctx->gcm.ares) { + /* First call to decrypt finalizes GHASH(AAD) */ + gcm_gmult_neon(ctx->gcm.Xi.u, ctx->gcm.Htable); + ctx->gcm.ares = 0; + } + +#if BYTE_ORDER == LITTLE_ENDIAN + ctr = bswap32(ctx->gcm.Yi.d[3]); +#else + ctr = ctx->gcm.Yi.d[3]; +#endif + + n = mres % 16; + if (n) { + while (n && len) { + uint8_t c = *(in++); + *(out++) = c ^ ctx->gcm.EKi.c[n]; + ctx->gcm.Xi.c[n] ^= c; + --len; + n = (n + 1) % 16; + } + if (n == 0) { + gcm_gmult_neon(ctx->gcm.Xi.u, ctx->gcm.Htable); + mres = 0; + } else { + ctx->gcm.mres = n; + return 0; + } + } + if ((i = (len & (size_t)-16))) { + size_t j = i / 16; + + while (j--) { + size_t k; + for (k = 0; k < 16; ++k) + ctx->gcm.Xi.c[k] ^= in[k]; + gcm_gmult_neon(ctx->gcm.Xi.u, ctx->gcm.Htable); + in += 16; + } + j = i / 16; + in -= i; + memcpy(&bsks.ks, &ctx->aes_ks, sizeof(bsks.ks)); + bsks.converted = 0; + ossl_bsaes_ctr32_encrypt_blocks(in, out, j, &bsks, + ctx->gcm.Yi.c); + ctr += (unsigned int)j; +#if BYTE_ORDER == LITTLE_ENDIAN + ctx->gcm.Yi.d[3] = bswap32(ctr); +#else + ctx->gcm.Yi.d[3] = ctr; +#endif + out += i; + in += i; + len -= i; + } + if (len) { + AES_encrypt(ctx->gcm.Yi.c, ctx->gcm.EKi.c, &ctx->aes_ks); + ++ctr; +#if BYTE_ORDER == LITTLE_ENDIAN + ctx->gcm.Yi.d[3] = bswap32(ctr); +#else + ctx->gcm.Yi.d[3] = ctr; +#endif + while (len--) { + uint8_t c = in[n]; + ctx->gcm.Xi.c[mres++] ^= c; + out[n] = c ^ ctx->gcm.EKi.c[n]; + ++n; + } + } + + ctx->gcm.mres = mres; + return 0; +} + +static void +gcm_tag(struct ossl_gcm_context *ctx, unsigned char *tag, size_t len) +{ + gcm_finish(ctx, NULL, 0); + memcpy(tag, ctx->gcm.Xi.c, len); +} + +static const struct ossl_aes_gcm_ops gcm_ops_neon = { + .init = gcm_init, + .setiv = gcm_setiv, + .aad = gcm_aad, + .encrypt = gcm_encrypt, + .decrypt = gcm_decrypt, + .finish = gcm_finish, + .tag = gcm_tag, +}; + +int ossl_aes_gcm_setkey(const unsigned char *key, int klen, void *_ctx); + +int +ossl_aes_gcm_setkey(const unsigned char *key, int klen, void *_ctx) +{ + struct ossl_gcm_context *ctx; + + ctx = _ctx; + ctx->ops = &gcm_ops_neon; + gcm_init(ctx, key, klen); + return (0); +} diff --git a/sys/crypto/openssl/ossl_arm.c b/sys/crypto/openssl/ossl_arm.c index 1ec95acd74cd..74dc25586464 100644 --- a/sys/crypto/openssl/ossl_arm.c +++ b/sys/crypto/openssl/ossl_arm.c @@ -44,6 +44,8 @@ __FBSDID("$FreeBSD$"); ossl_cipher_setkey_t AES_set_encrypt_key; ossl_cipher_setkey_t AES_set_decrypt_key; +ossl_cipher_setkey_t ossl_aes_gcm_setkey; + unsigned int OPENSSL_armcap_P; void @@ -55,5 +57,9 @@ ossl_cpuid(struct ossl_softc *sc) sc->has_aes = true; ossl_cipher_aes_cbc.set_encrypt_key = AES_set_encrypt_key; ossl_cipher_aes_cbc.set_decrypt_key = AES_set_decrypt_key; + + sc->has_aes_gcm = true; + ossl_cipher_aes_gcm.set_encrypt_key = ossl_aes_gcm_setkey; + ossl_cipher_aes_gcm.set_decrypt_key = ossl_aes_gcm_setkey; } } diff --git a/sys/modules/ossl/Makefile b/sys/modules/ossl/Makefile index d26aabf7bff2..804ffb5e1b70 100644 --- a/sys/modules/ossl/Makefile +++ b/sys/modules/ossl/Makefile @@ -20,11 +20,13 @@ SRCS.arm= \ aes-armv4.S \ bsaes-armv7.S \ chacha-armv4.S \ + ghash-armv4.S \ poly1305-armv4.S \ sha1-armv4-large.S \ sha256-armv4.S \ sha512-armv4.S \ - ossl_arm.c + ossl_arm.c \ + ossl_aes_gcm.c SRCS.aarch64= \ chacha-armv8.S \ From nobody Fri Mar 29 18:11:48 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V5pQF4g1Zz5FNY5; Fri, 29 Mar 2024 18:11: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 4V5pQF2VGKz4hF5; Fri, 29 Mar 2024 18:11:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711735909; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wfWI8JTjd8JdqG/J/yY0DT0BQBltJn2j1vmQ+q7jWjQ=; b=FBj5jOmiDmYjn8MEJ58rqk7W0jiRXNdbLL0Uz240nEa9q40/hKdMdgg1syFSsjYDkvLRrp ioSe0d3i7SKYHJkzWW+JHovI+YLjFcwkrrAtzmYnqrXfDpAoh6y7gLd40hbuVgP3Ak5UY2 WDJ02FE1Mx2ZoQ/wZ6/PHe/umymVNnW/UZEfQ32dkFR+dQIaKcSkkH7IysuFjgiegqAoWD ZRKlyGCkTxxVTkpjTTFteurE7Fpyr0yRQavS0bXfDbrZvl0Wnl65en3uFCd4oGMkQWCYyE bfASy0sqMVtzgJyzyE2+xaVqJ/q++Sns7nagK9u3uVQ4x6AEkMbwyPTttXeumQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711735909; a=rsa-sha256; cv=none; b=oXy4fBAsTHifQqsItVwxCXtQY2gDza62xMuj1RIYMCij2gugzX5usevdzYFlTDS2O8UgMV v5JcNpfJ13I8Y7pGRfNSvlOGcHUyzQEm5bjo6/LXef2k7U5shwX2b7naji9JRts5UcAyRT emQe1AYhfUad2qPTXEjncoSJq9Cbuem3vnQ4EAGNEP8X1Z+44KTastLoTWmtyo8yZCu4q9 RsLKnbMi5perE57eCFX5PNZ5MmTm1ACqN6cqPl7fHnTBwodHtY6G7l4lhXVyFihoW3fShK 4zqK6krQXzUZqby6wfAb64K3kUpzcz4qH5ASuOpibqu0lzO8kdUZSFtrB2fEDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711735909; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wfWI8JTjd8JdqG/J/yY0DT0BQBltJn2j1vmQ+q7jWjQ=; b=lq0hptUd6Y59VGX2iT8zGpS9axPw63U7CY6K1zol1QYyTDrOm73ZHZtqT/df2XCK5axRrZ 4ZQo3RP3O60cY2aXG1+aAWr5tkTtf4F9HuCdMNUEe5ZzUDp9uoXtFpJ454S9+/7Fny/rsA YwD86INYj11FWIkRygMfSKQCMRavNjPww2C71JSnxlNuaSz286HiBQVZOTO9IchyFbYFi1 mzqUjMp9ugep8RtdGCPl/1clY6edzX2noAjWiEwouV6okOV2SFtTtSE7WRoSbynL4mVS80 DnQJiM/VEnVd1KoClR8iHJdh1EAyaAvxoGSE4UN/CiHVoZSqftUoJvfMVDPUiw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V5pQD5BSBzM3D; Fri, 29 Mar 2024 18:11:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42TIBmHh078129; Fri, 29 Mar 2024 18:11:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42TIBmon078126; Fri, 29 Mar 2024 18:11:48 GMT (envelope-from git) Date: Fri, 29 Mar 2024 18:11:48 GMT Message-Id: <202403291811.42TIBmon078126@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 0b9dffed30ba - stable/14 - ossl: Move arm_arch.h to a common subdirectory List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0b9dffed30bad28cf9b9d356480f38065db3051f Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=0b9dffed30bad28cf9b9d356480f38065db3051f commit 0b9dffed30bad28cf9b9d356480f38065db3051f Author: Mark Johnston AuthorDate: 2023-12-04 17:29:11 +0000 Commit: Mark Johnston CommitDate: 2024-03-29 13:53:05 +0000 ossl: Move arm_arch.h to a common subdirectory OpenSSL itself keeps only a single copy of this header. Do the same in sys/crypto/openssl to avoid the extra maintenance burden. This requires adjusting the include paths for generated asm files. No functional change intended. Reported by: jrtc27 Reviewed by: jhb MFC after: 3 months Differential Revision: https://reviews.freebsd.org/D42866 (cherry picked from commit e655cc70dfcda5cfedb5a1d9bef1e87d55519f64) --- secure/lib/libcrypto/Makefile.asm | 3 +- sys/conf/files.arm | 23 +++++--- sys/conf/files.arm64 | 6 +-- sys/crypto/openssl/arm/arm_arch.h | 84 ----------------------------- sys/crypto/openssl/arm/ossl_aes_gcm.c | 2 +- sys/crypto/openssl/{aarch64 => }/arm_arch.h | 0 sys/crypto/openssl/ossl_aarch64.c | 2 +- sys/crypto/openssl/ossl_aarch64.h | 2 +- sys/crypto/openssl/ossl_arm.c | 2 +- sys/modules/armv8crypto/Makefile | 3 +- sys/modules/ossl/Makefile | 2 + 11 files changed, 28 insertions(+), 101 deletions(-) diff --git a/secure/lib/libcrypto/Makefile.asm b/secure/lib/libcrypto/Makefile.asm index 644965c1ac1c..d4f7269aa500 100644 --- a/secure/lib/libcrypto/Makefile.asm +++ b/secure/lib/libcrypto/Makefile.asm @@ -46,7 +46,7 @@ ASM= ${SRCS:R:S/$/.S/} sha256-armv8.S all: ${ASM} rm -f ${ASM:R:S/$/.s/} - ${CP} ${LCRYPTO_SRC}/crypto/arm_arch.h arm_arch.h + ${CP} ${LCRYPTO_SRC}/crypto/arm_arch.h ../arm_arch.h CLEANFILES= ${ASM} .SUFFIXES: .pl @@ -186,6 +186,7 @@ ASM= ${SRCS:R:S/$/.S/} all: ${ASM} rm -f ${ASM:R:S/$/.s/} + ${CP} ${LCRYPTO_SRC}/crypto/arm_arch.h ../arm_arch.h CLEANFILES= ${ASM} .SUFFIXES: .pl diff --git a/sys/conf/files.arm b/sys/conf/files.arm index 7e6cb6132a13..fbd294ebdb42 100644 --- a/sys/conf/files.arm +++ b/sys/conf/files.arm @@ -135,15 +135,22 @@ libkern/umoddi3.c standard crypto/openssl/ossl_arm.c optional ossl crypto/openssl/arm/ossl_aes_gcm.c optional ossl -crypto/openssl/arm/aes-armv4.S optional ossl +crypto/openssl/arm/aes-armv4.S optional ossl \ + compile-with "${NORMAL_C} -I${SRCTOP}/sys/crypto/openssl" crypto/openssl/arm/bsaes-armv7.S optional ossl \ - compile-with "${CC} -D__KERNEL__ -c ${CFLAGS:N-mgeneral-regs-only} ${WERROR} ${.IMPSRC}" -crypto/openssl/arm/chacha-armv4.S optional ossl -crypto/openssl/arm/ghash-armv4.S optional ossl -crypto/openssl/arm/poly1305-armv4.S optional ossl -crypto/openssl/arm/sha1-armv4-large.S optional ossl -crypto/openssl/arm/sha256-armv4.S optional ossl -crypto/openssl/arm/sha512-armv4.S optional ossl + compile-with "${CC} -D__KERNEL__ -c ${CFLAGS:N-mgeneral-regs-only} -I${SRCTOP}/sys/crypto/openssl ${WERROR} ${.IMPSRC}" +crypto/openssl/arm/chacha-armv4.S optional ossl \ + compile-with "${NORMAL_C} -I${SRCTOP}/sys/crypto/openssl" +crypto/openssl/arm/ghash-armv4.S optional ossl \ + compile-with "${NORMAL_C} -I${SRCTOP}/sys/crypto/openssl" +crypto/openssl/arm/poly1305-armv4.S optional ossl \ + compile-with "${NORMAL_C} -I${SRCTOP}/sys/crypto/openssl" +crypto/openssl/arm/sha1-armv4-large.S optional ossl \ + compile-with "${NORMAL_C} -I${SRCTOP}/sys/crypto/openssl" +crypto/openssl/arm/sha256-armv4.S optional ossl \ + compile-with "${NORMAL_C} -I${SRCTOP}/sys/crypto/openssl" +crypto/openssl/arm/sha512-armv4.S optional ossl \ + compile-with "${NORMAL_C} -I${SRCTOP}/sys/crypto/openssl" # Annapurna support arm/annapurna/alpine/alpine_ccu.c optional al_ccu fdt diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index baf8734fb38f..6c9f77c2eebd 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -119,17 +119,17 @@ dev/iommu/iommu_gas.c optional iommu crypto/armv8/armv8_crypto.c optional armv8crypto armv8_crypto_wrap.o optional armv8crypto \ dependency "$S/crypto/armv8/armv8_crypto_wrap.c" \ - compile-with "${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc:N-mgeneral-regs-only} -I$S/crypto/armv8/ ${WERROR} ${NO_WCAST_QUAL} ${CFLAGS:M-march=*:S/^$/-march=armv8-a/}+crypto ${.IMPSRC}" \ + compile-with "${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc:N-mgeneral-regs-only} -I$S/crypto/armv8 ${WERROR} ${NO_WCAST_QUAL} ${CFLAGS:M-march=*:S/^$/-march=armv8-a/}+crypto ${.IMPSRC}" \ no-implicit-rule \ clean "armv8_crypto_wrap.o" aesv8-armx.o optional armv8crypto | ossl \ dependency "$S/crypto/openssl/aarch64/aesv8-armx.S" \ - compile-with "${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc:N-mgeneral-regs-only} -I$S/crypto/armv8/ ${WERROR} ${NO_WCAST_QUAL} ${CFLAGS:M-march=*:S/^$/-march=armv8-a/}+crypto ${.IMPSRC}" \ + compile-with "${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc:N-mgeneral-regs-only} -I$S/crypto/armv8 -I$S/crypto/openssl ${WERROR} ${NO_WCAST_QUAL} ${CFLAGS:M-march=*:S/^$/-march=armv8-a/}+crypto ${.IMPSRC}" \ no-implicit-rule \ clean "aesv8-armx.o" ghashv8-armx.o optional armv8crypto \ dependency "$S/crypto/openssl/aarch64/ghashv8-armx.S" \ - compile-with "${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc:N-mgeneral-regs-only} -I$S/crypto/armv8/ ${WERROR} ${NO_WCAST_QUAL} ${CFLAGS:M-march=*:S/^$/-march=armv8-a/}+crypto ${.IMPSRC}" \ + compile-with "${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc:N-mgeneral-regs-only} -I$S/crypto/armv8 -I$S/crypto/openssl ${WERROR} ${NO_WCAST_QUAL} ${CFLAGS:M-march=*:S/^$/-march=armv8-a/}+crypto ${.IMPSRC}" \ no-implicit-rule \ clean "ghashv8-armx.o" diff --git a/sys/crypto/openssl/arm/arm_arch.h b/sys/crypto/openssl/arm/arm_arch.h deleted file mode 100644 index 8b7105571d78..000000000000 --- a/sys/crypto/openssl/arm/arm_arch.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright 2011-2018 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#ifndef OSSL_CRYPTO_ARM_ARCH_H -# define OSSL_CRYPTO_ARM_ARCH_H - -# if !defined(__ARM_ARCH__) -# if defined(__CC_ARM) -# define __ARM_ARCH__ __TARGET_ARCH_ARM -# if defined(__BIG_ENDIAN) -# define __ARMEB__ -# else -# define __ARMEL__ -# endif -# elif defined(__GNUC__) -# if defined(__aarch64__) -# define __ARM_ARCH__ 8 -# if __BYTE_ORDER__==__ORDER_BIG_ENDIAN__ -# define __ARMEB__ -# else -# define __ARMEL__ -# endif - /* - * Why doesn't gcc define __ARM_ARCH__? Instead it defines - * bunch of below macros. See all_architectures[] table in - * gcc/config/arm/arm.c. On a side note it defines - * __ARMEL__/__ARMEB__ for little-/big-endian. - */ -# elif defined(__ARM_ARCH) -# define __ARM_ARCH__ __ARM_ARCH -# elif defined(__ARM_ARCH_8A__) -# define __ARM_ARCH__ 8 -# elif defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || \ - defined(__ARM_ARCH_7R__)|| defined(__ARM_ARCH_7M__) || \ - defined(__ARM_ARCH_7EM__) -# define __ARM_ARCH__ 7 -# elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || \ - defined(__ARM_ARCH_6K__)|| defined(__ARM_ARCH_6M__) || \ - defined(__ARM_ARCH_6Z__)|| defined(__ARM_ARCH_6ZK__) || \ - defined(__ARM_ARCH_6T2__) -# define __ARM_ARCH__ 6 -# elif defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5T__) || \ - defined(__ARM_ARCH_5E__)|| defined(__ARM_ARCH_5TE__) || \ - defined(__ARM_ARCH_5TEJ__) -# define __ARM_ARCH__ 5 -# elif defined(__ARM_ARCH_4__) || defined(__ARM_ARCH_4T__) -# define __ARM_ARCH__ 4 -# else -# error "unsupported ARM architecture" -# endif -# endif -# endif - -# if !defined(__ARM_MAX_ARCH__) -# define __ARM_MAX_ARCH__ __ARM_ARCH__ -# endif - -# if __ARM_MAX_ARCH__<__ARM_ARCH__ -# error "__ARM_MAX_ARCH__ can't be less than __ARM_ARCH__" -# elif __ARM_MAX_ARCH__!=__ARM_ARCH__ -# if __ARM_ARCH__<7 && __ARM_MAX_ARCH__>=7 && defined(__ARMEB__) -# error "can't build universal big-endian binary" -# endif -# endif - -# ifndef __ASSEMBLER__ -extern unsigned int OPENSSL_armcap_P; -# endif - -# define ARMV7_NEON (1<<0) -# define ARMV7_TICK (1<<1) -# define ARMV8_AES (1<<2) -# define ARMV8_SHA1 (1<<3) -# define ARMV8_SHA256 (1<<4) -# define ARMV8_PMULL (1<<5) -# define ARMV8_SHA512 (1<<6) - -#endif diff --git a/sys/crypto/openssl/arm/ossl_aes_gcm.c b/sys/crypto/openssl/arm/ossl_aes_gcm.c index 71a977c446ae..e51b7b4fbc04 100644 --- a/sys/crypto/openssl/arm/ossl_aes_gcm.c +++ b/sys/crypto/openssl/arm/ossl_aes_gcm.c @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include diff --git a/sys/crypto/openssl/aarch64/arm_arch.h b/sys/crypto/openssl/arm_arch.h similarity index 100% rename from sys/crypto/openssl/aarch64/arm_arch.h rename to sys/crypto/openssl/arm_arch.h diff --git a/sys/crypto/openssl/ossl_aarch64.c b/sys/crypto/openssl/ossl_aarch64.c index b53abd905f6d..a9d0b0bbe211 100644 --- a/sys/crypto/openssl/ossl_aarch64.c +++ b/sys/crypto/openssl/ossl_aarch64.c @@ -35,7 +35,7 @@ #include #include -#include +#include /* * Feature bits defined in arm_arch.h diff --git a/sys/crypto/openssl/ossl_aarch64.h b/sys/crypto/openssl/ossl_aarch64.h index f933f862d009..57183aa9ed69 100644 --- a/sys/crypto/openssl/ossl_aarch64.h +++ b/sys/crypto/openssl/ossl_aarch64.h @@ -12,7 +12,7 @@ #include #include -#include +#include /* aesv8-armx.S */ ossl_cipher_encrypt_t aes_v8_cbc_encrypt; diff --git a/sys/crypto/openssl/ossl_arm.c b/sys/crypto/openssl/ossl_arm.c index 74dc25586464..97215007c663 100644 --- a/sys/crypto/openssl/ossl_arm.c +++ b/sys/crypto/openssl/ossl_arm.c @@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include ossl_cipher_setkey_t AES_set_encrypt_key; ossl_cipher_setkey_t AES_set_decrypt_key; diff --git a/sys/modules/armv8crypto/Makefile b/sys/modules/armv8crypto/Makefile index da8e962c0307..74ea77fbb761 100644 --- a/sys/modules/armv8crypto/Makefile +++ b/sys/modules/armv8crypto/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/crypto/armv8 .PATH: ${SRCTOP}/sys/crypto/openssl/aarch64 @@ -8,6 +7,8 @@ SRCS+= device_if.h bus_if.h opt_bus.h cryptodev_if.h OBJS+= armv8_crypto_wrap.o aesv8-armx.o ghashv8-armx.o +CFLAGS+=-I${SRCTOP}/sys/crypto/openssl + # Remove -nostdinc so we can get the intrinsics. armv8_crypto_wrap.o: armv8_crypto_wrap.c ${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc:N-mgeneral-regs-only} \ diff --git a/sys/modules/ossl/Makefile b/sys/modules/ossl/Makefile index 804ffb5e1b70..9777e0bcfacc 100644 --- a/sys/modules/ossl/Makefile +++ b/sys/modules/ossl/Makefile @@ -61,6 +61,8 @@ SRCS.i386= \ CFLAGS.bsaes-armv7.S+= -D__KERNEL__ +CFLAGS+= -I${SRCTOP}/sys/crypto/openssl + # For arm64, we are forced to rewrite the compiler invocation for the assembly # files, to remove -mgeneral-regs-only. ${SRCS.aarch64:M*.S:S/S/o/}: ${.TARGET:R}.S From nobody Fri Mar 29 18:11:49 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V5pQG14jrz5FNW7; Fri, 29 Mar 2024 18:11: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 4V5pQF5Z6wz4h3X; Fri, 29 Mar 2024 18:11:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711735909; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NhEkMHlUgwzN3ltkcRwcnMsxqs5c2z/O2+dSNh9INq4=; b=I6y0iCAWyIKqhHzu2s5XrB+bmmhvFkYcg0asCyD28Il4+GgKcIq9AisSG1o075unZW0MPN OMPHyIGxv/9dFvJbn/m+8nmEITtuuNFxkGVDQ1iBkS9ff2+25gElvtshbtVkd8/ZPwM4XB DwYnVmMsp5j+SpkA7TfJREFsPMiF15salsc9WCAB8PoCpzhAXWGa80FLLe+GR8O5oyiFix 5DY9c2NYbL73iOCzWEY0a5hedDykNqco5U3Nns4Le3CwAIE0lwl2RXbdoCmrMViTVsbuEI R4q3Ct/L9jPdEC1BaTtZJWVMMnRep62Ou9bgld442Yj793qKxYbUBB+8ETlSRw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711735909; a=rsa-sha256; cv=none; b=oSw03HJeZUtQdUXzNYkVPnNy2tNcHlYrK77jwYKTVDVN3tNgaDCCJ5VpTYbrL1rPOkSGsX bR4WuXndpSBhooNZMQvFn4Fkizp4dbz4PNb7sBKGhD2RdTuxCVCRlh2OwqhCY8a3tDFyF1 XrHRdnuSvOoAvgqZyblfU3TV3T1P+NAnzIdPcY/w4rov59/m54KSLWPN8/wNG4rRO5lBCo 8P4spsyh6NHddL1WhKCHQc4Ey4efGCc4HgKMkNPYDvZd1eaHUMg+v+akW9Um85Z/+P8qaE wPVuLB9oop9pYDhrv/V6B59Y5+AgJcvXIDO6QeCL9eDlTunchIcuN+BzVuYYRQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711735909; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NhEkMHlUgwzN3ltkcRwcnMsxqs5c2z/O2+dSNh9INq4=; b=FO9SupDmjs1pbgTNmHUVDRmPTFHA+3+tpfQoKyEvt8jLdT8UrZRoEoxWXMI0yTOqqybP97 IjoN3siFnei0xHr6NKMgEdABMz2yrzNsNngzqU8fr1ldglYdHpFc+GrANKFBlsKWIcxquj SthLlzUGWCAdjCKq7ggd4lHByGnAaSZ0QD49cMEGC9J4Dy9h67QQjEkhzQnVRmcT1JIGFB pk1Qgz4qBWZNYPLH5rzEqi2V1LMsFkB4r/DypeX+r11/P7IBrM0JkZCChbHokWaVGuWUhT xaIajC7WMaCoZ+mRFD5OexKmS8W2Oj4EUsVC3n6lyQtjlSpRqjuIOMMg32Qpaw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V5pQF50NFzM01; Fri, 29 Mar 2024 18:11:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42TIBnTP078172; Fri, 29 Mar 2024 18:11:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42TIBnDI078169; Fri, 29 Mar 2024 18:11:49 GMT (envelope-from git) Date: Fri, 29 Mar 2024 18:11:49 GMT Message-Id: <202403291811.42TIBnDI078169@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 955e13a3e2a8 - stable/14 - ossl: Remove a stray __FBSDID("$FreeBSD$") List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 955e13a3e2a84dabe3b11b7c80bf25eaec1e50c5 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=955e13a3e2a84dabe3b11b7c80bf25eaec1e50c5 commit 955e13a3e2a84dabe3b11b7c80bf25eaec1e50c5 Author: Mark Johnston AuthorDate: 2023-12-04 17:29:30 +0000 Commit: Mark Johnston CommitDate: 2024-03-29 13:53:05 +0000 ossl: Remove a stray __FBSDID("$FreeBSD$") Fixes: 44f8e1e8530e ("ossl: Add support for armv7") (cherry picked from commit 0eea265a58f942f7f189ba758f4cac4355d42221) --- sys/crypto/openssl/ossl_arm.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sys/crypto/openssl/ossl_arm.c b/sys/crypto/openssl/ossl_arm.c index 97215007c663..206bf908ce76 100644 --- a/sys/crypto/openssl/ossl_arm.c +++ b/sys/crypto/openssl/ossl_arm.c @@ -29,9 +29,6 @@ * THE POSSIBILITY OF SUCH DAMAGES. */ -#include -__FBSDID("$FreeBSD$"); - #include #include From nobody Fri Mar 29 18:11:51 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V5pQK1Spcz5FNbg; Fri, 29 Mar 2024 18:11:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4V5pQJ4mw0z4h8V; Fri, 29 Mar 2024 18:11:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711735912; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wOOhVPbZhNNlpGqZJEVYbagOgQDN0FIAK0s6i7YtO4E=; b=hd/HAXfxBGTBgfV49v7cdJY3WasKQLv9vCbjR1a5iKOIQgbaLjr+NEb4K0QU0e3R3rT8Hx tobsgw541qUQCZkfnbc+5juBCK6H1JhkKYMt5lZNZSf9zQjsd1TVpEs9A0oD9MDzGJqdC1 /2jIkimxOw1mV4gqgtcuHUh+KtV97rOsb4DOkALtTVB5dDwaDbgLehOIyDullSyHpH3THj B4D+thb57oAH2tv/77kbkcmnuqYOrqv/gJMvFdvURrS4JOBfyAcp3NtxqFiERP2vF/9KPP pNXpOjnNrMB9sOWPwmhliOMQ/oCLmuqka6jSWOVuN9CkuxonotgiOtlp3UrLZw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711735912; a=rsa-sha256; cv=none; b=oAO3wauFj9nLvOE4Q5uurI6tFU/yQqlTK4WcEAt6jeKTg7TtMiuIzpo6Fe3xv7XcOD7MdD OfuNrNHG9onx7ycBAjP0qMfka+FTGgw+wFacN0xWhe7yTkjE7oeaXfDRxAz1s0xyK4zYqb RES4pDI8qvN2m6tZJhlXtjRAzpJfdL30RrwQWuqB3K9h853LfABIcjBPzAX8UMzycIb0Up rl6SdxnMoA01MRXaLGUJTc8tcXwhlar8tEzbH0OOA5zj+rqd5xlNR99Rpaiuo7yv9SUfuP kPGjlMESeXydNBIpGXjYkI4tdbDpAsWRkntWL2JDKjc7a9I8OySLwWnX+lvhiQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711735912; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wOOhVPbZhNNlpGqZJEVYbagOgQDN0FIAK0s6i7YtO4E=; b=hg+n8dkHs3lPsWHOgfoF9ziPs7s9H4p68l2Cpuq5LSn69qhhQbtmCKJ7MAAEmMff7E3s9o lVg3awUU9B3W6e1nQ7sLn27o+hLSB9M9kTNnwqV64sbZYrSWIO3dCtW5wp7Xx7A4DsJgVB 4BVy2h9aBpZzILxr2CRMlDaVskdYR584viqc47yQW2E3iz+C1IQdcBJRob83Kt3z6iMKnq oT0Dv3FwVUbQRwT8ubzi3EnLZrg6X9FzPz5llNBWgUteZik8VqLEQdPxAT4nNLZQmAu3tp niuAZYIpwfaMwePh2hcZOGEMx0a8TWGjnkpdt5gNZe2t9Wc6qRB6+DTEIKsPZg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V5pQJ1cd7zM3H; Fri, 29 Mar 2024 18:11:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42TIBpZM078274; Fri, 29 Mar 2024 18:11:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42TIBpFx078271; Fri, 29 Mar 2024 18:11:51 GMT (envelope-from git) Date: Fri, 29 Mar 2024 18:11:51 GMT Message-Id: <202403291811.42TIBpFx078271@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 683947e13fb8 - stable/14 - bhyve: Add support for XML register definitions List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 683947e13fb8fdf5bee443cedd1b916238619998 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=683947e13fb8fdf5bee443cedd1b916238619998 commit 683947e13fb8fdf5bee443cedd1b916238619998 Author: Mark Johnston AuthorDate: 2024-02-21 00:21:29 +0000 Commit: Mark Johnston CommitDate: 2024-03-29 13:53:05 +0000 bhyve: Add support for XML register definitions This is useful for exposing additional registers to debuggers. For instance, control registers are now available on amd64 when using gdb to debug a guest. The stub indicates support by including the string "qXfer:features:read+" in its feature list. The debugger queries for target descriptions by sending the query "qXfer:features:read:" followed by a file path. The XML definitions are copied from QEMU and installed to /usr/share/bhyve/gdb. Note that we currently don't handle the SIMD registers at all, since that's of somewhat limited utility (for me at least) and since that requires new ioctls to fetch the register values. Reviewed by: jhb MFC after: 2 weeks Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D43666 (cherry picked from commit f81cdf24ba5436367377f7c8e8f51f6df2a75ca7) --- etc/mtree/BSD.usr.dist | 2 + usr.sbin/bhyve/Makefile | 1 + usr.sbin/bhyve/gdb.c | 106 ++++++++++++++++++++++++++- usr.sbin/bhyve/gdb/Makefile | 21 ++++++ usr.sbin/bhyve/gdb/amd64.xml | 165 +++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 294 insertions(+), 1 deletion(-) diff --git a/etc/mtree/BSD.usr.dist b/etc/mtree/BSD.usr.dist index a7738aaf6f78..0d43b657530b 100644 --- a/etc/mtree/BSD.usr.dist +++ b/etc/mtree/BSD.usr.dist @@ -184,6 +184,8 @@ atf tags=package=tests .. bhyve + gdb + .. kbdlayout .. .. diff --git a/usr.sbin/bhyve/Makefile b/usr.sbin/bhyve/Makefile index b6cad38a6c39..c9d571daebbc 100644 --- a/usr.sbin/bhyve/Makefile +++ b/usr.sbin/bhyve/Makefile @@ -75,6 +75,7 @@ CFLAGS+= -DBHYVE_GDB .ifdef GDB_LOG CFLAGS+=-DGDB_LOG .endif +SUBDIR+= gdb .endif CFLAGS+=-I${.CURDIR} \ diff --git a/usr.sbin/bhyve/gdb.c b/usr.sbin/bhyve/gdb.c index 6bdfbc5e8536..2a075cd10ca6 100644 --- a/usr.sbin/bhyve/gdb.c +++ b/usr.sbin/bhyve/gdb.c @@ -35,6 +35,8 @@ #include #include #include +#include + #include #include #include @@ -64,6 +66,8 @@ #include "mem.h" #include "mevent.h" +#define _PATH_GDB_XML "/usr/share/bhyve/gdb" + /* * GDB_SIGNAL_* numbers are part of the GDB remote protocol. Most stops * use SIGTRAP. @@ -86,6 +90,7 @@ static cpuset_t vcpus_active, vcpus_suspended, vcpus_waiting; static pthread_mutex_t gdb_lock; static pthread_cond_t idle_vcpus; static bool first_stop, report_next_stop, swbreak_enabled; +static int xml_dfd = -1; /* * An I/O buffer contains 'capacity' bytes of room at 'data'. For a @@ -170,8 +175,25 @@ static const struct gdb_reg { { .id = VM_REG_GUEST_ES, .size = 4 }, { .id = VM_REG_GUEST_FS, .size = 4 }, { .id = VM_REG_GUEST_GS, .size = 4 }, + /* + * Registers past this point are not included in a reply to a 'g' query, + * to provide compatibility with debuggers that do not fetch a target + * description. The debugger can query them individually with 'p' if it + * knows about them. + */ +#define GDB_REG_FIRST_EXT VM_REG_GUEST_FS_BASE + { .id = VM_REG_GUEST_FS_BASE, .size = 8 }, + { .id = VM_REG_GUEST_GS_BASE, .size = 8 }, + { .id = VM_REG_GUEST_KGS_BASE, .size = 8 }, + { .id = VM_REG_GUEST_CR0, .size = 8 }, + { .id = VM_REG_GUEST_CR2, .size = 8 }, + { .id = VM_REG_GUEST_CR3, .size = 8 }, + { .id = VM_REG_GUEST_CR4, .size = 8 }, + { .id = VM_REG_GUEST_TPR, .size = 8 }, + { .id = VM_REG_GUEST_EFER, .size = 8 }, }; +#define GDB_LOG #ifdef GDB_LOG #include #include @@ -1030,9 +1052,13 @@ gdb_read_regs(void) send_error(errno); return; } + start_packet(); - for (size_t i = 0; i < nitems(gdb_regset); i++) + for (size_t i = 0; i < nitems(gdb_regset); i++) { + if (gdb_regset[i].id == GDB_REG_FIRST_EXT) + break; append_unsigned_native(regvals[i], gdb_regset[i].size); + } finish_packet(); } @@ -1520,6 +1546,7 @@ check_features(const uint8_t *data, size_t len) /* This is an arbitrary limit. */ append_string("PacketSize=4096"); append_string(";swbreak+"); + append_string(";qXfer:features:read+"); finish_packet(); } @@ -1591,6 +1618,71 @@ gdb_query(const uint8_t *data, size_t len) start_packet(); append_asciihex(buf); finish_packet(); + } else if (command_equals(data, len, "qXfer:features:read:")) { + struct stat sb; + const char *xml; + const uint8_t *pathend; + char buf[64], path[PATH_MAX]; + size_t xmllen; + unsigned int doff, dlen; + int fd; + + data += strlen("qXfer:features:read:"); + len -= strlen("qXfer:features:read:"); + + pathend = memchr(data, ':', len); + if (pathend == NULL || + (size_t)(pathend - data) >= sizeof(path) - 1) { + send_error(EINVAL); + return; + } + memcpy(path, data, pathend - data); + path[pathend - data] = '\0'; + data += (pathend - data) + 1; + len -= (pathend - data) + 1; + + if (len > sizeof(buf) - 1) { + send_error(EINVAL); + return; + } + memcpy(buf, data, len); + buf[len] = '\0'; + if (sscanf(buf, "%x,%x", &doff, &dlen) != 2) { + send_error(EINVAL); + return; + } + + fd = openat(xml_dfd, path, O_RDONLY | O_RESOLVE_BENEATH); + if (fd < 0) { + send_error(errno); + return; + } + if (fstat(fd, &sb) < 0) { + send_error(errno); + close(fd); + return; + } + xml = mmap(NULL, sb.st_size, PROT_READ, MAP_SHARED, fd, 0); + if (xml == MAP_FAILED) { + send_error(errno); + close(fd); + return; + } + close(fd); + xmllen = sb.st_size; + + start_packet(); + if (doff >= xmllen) { + append_char('l'); + } else if (doff + dlen >= xmllen) { + append_char('l'); + append_packet_data(xml + doff, xmllen - doff); + } else { + append_char('m'); + append_packet_data(xml + doff, dlen); + } + finish_packet(); + (void)munmap(__DECONST(void *, xml), xmllen); } else send_empty_response(); } @@ -1918,6 +2010,9 @@ limit_gdb_socket(int s) void init_gdb(struct vmctx *_ctx) { +#ifndef WITHOUT_CAPSICUM + cap_rights_t rights; +#endif int error, flags, optval, s; struct addrinfo hints; struct addrinfo *gdbaddr; @@ -1998,4 +2093,13 @@ init_gdb(struct vmctx *_ctx) gdb_active = true; freeaddrinfo(gdbaddr); free(sport); + + xml_dfd = open(_PATH_GDB_XML, O_DIRECTORY); + if (xml_dfd == -1) + err(1, "Failed to open gdb xml directory"); +#ifndef WITHOUT_CAPSICUM + cap_rights_init(&rights, CAP_FSTAT, CAP_LOOKUP, CAP_MMAP_R, CAP_PREAD); + if (caph_rights_limit(xml_dfd, &rights) == -1) + err(1, "cap_rights_init"); +#endif } diff --git a/usr.sbin/bhyve/gdb/Makefile b/usr.sbin/bhyve/gdb/Makefile new file mode 100644 index 000000000000..a444b0cc4c69 --- /dev/null +++ b/usr.sbin/bhyve/gdb/Makefile @@ -0,0 +1,21 @@ +PACKAGE= bhyve +FILESDIR= ${SHAREDIR}/bhyve/gdb + +FILES+= target.xml + +.if ${MACHINE_ARCH} == "amd64" +XMLARCH= i386:x86-64 +FILES+= amd64.xml +.endif + +target.xml: .PHONY + @echo "" > ${.TARGET} + @echo "" >> ${.TARGET} + @echo "" >> ${.TARGET} + @echo " ${XMLARCH}" >> ${.TARGET} +.for file in ${FILES:Ntarget.xml} + @echo " " >> ${.TARGET} +.endfor + @echo "" >> ${.TARGET} + +.include diff --git a/usr.sbin/bhyve/gdb/amd64.xml b/usr.sbin/bhyve/gdb/amd64.xml new file mode 100644 index 000000000000..15bd270120d8 --- /dev/null +++ b/usr.sbin/bhyve/gdb/amd64.xml @@ -0,0 +1,165 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From nobody Fri Mar 29 18:11:50 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V5pQK1lDKz5FNLV; Fri, 29 Mar 2024 18:11:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4V5pQJ3J4Dz4gyR; Fri, 29 Mar 2024 18:11:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711735912; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W5r8xD+aS0CWFDB7sU9m4u25EvkJO7jeOfFftd3iPhc=; b=bViwI+pX53NQpBkVFRovgQBEk8LBMgRR1BWIf0TH98+6eBMEPA8S5SeNKTJKk/3EeLT821 oOLEl7W4bBB6YbYmnkA/JpyQrfzykhNer5cj81/S2UeH8fQZFCiePPwNukNCDML+C49sEg TQDw3VTFKv/TpYgxfrpn2XPlI1DyrOZpQlweXbBbX1pnE4PBjbGmvMyoyWrvnWZz8DqitK 1wAfZyZdr5DbTsqW3hyVAE5x3UjndrXdYCBQJc2+JNktyQsD15qJ1D/PY2ynVqzAQKd97N lrW3Z+TEnsYkxqeb3130ETIvOwgoieHDpd0jUzuE7oKwE27QaO/CquyE/gFZog== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711735912; a=rsa-sha256; cv=none; b=YOV8Cv8gEsNs7TLWG9U/+4OobT82EViVNYZHYK+roEB1VcnLZLMygrkK9t5VOzAFEHnMVX YdypU428UhQLPowAZZIqAHpFgBJ1Rg0IMjB0c78pebW6ifnGNCb8Msxcf7h17nvKjnT8hc tJV9II7k769xqlEU4bUOuBttrE7x6O7N1jn/jR/7eiPS8zwjY5mmO7AQNTwGhGzVdxflX8 mF5Hla3urh85PuuLl8RR1rmFs/63z1gP7auosoC+F6aENAWawshjyEshPTyjU8bL3fSv3s QgMCdYXoRCX/bkfX+NhB1gmXrpLhk0ir/qRtpSD3B3L7YmcRf7INKZA0FcLjfw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711735912; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W5r8xD+aS0CWFDB7sU9m4u25EvkJO7jeOfFftd3iPhc=; b=F51l6wcUV2AAnUAC8zAAe06uW1CRPTAZPBf55uMoGl0RiKSILabGBleQnK01cugDdZiGy0 u+mWOYxExWqtvrE3Vd/eXH5S2lcp6ePHKPAybQ2WjWeO9WVZgfR5ozqYakIxBnsuvIa7bY nzTntw8znw6xGqwpz71L75tZ5KD+88vjS+NOnhp1mqYdxfKfJqKdLygNjySdhxPv1KB+f2 tDEvO43Q12NjNUb6wZd3MrxdwpE4T5KvSOg1Ww11X4NC8z/+V3cOwCkU/z+XckZp4vEErw K056WJKmlIxgQAmek+jKyngdMoGwIUAida+HZahS+axNYQx4zwYLQxW+upa1bQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V5pQG6jm2zM3F; Fri, 29 Mar 2024 18:11:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42TIBodQ078226; Fri, 29 Mar 2024 18:11:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42TIBoXa078223; Fri, 29 Mar 2024 18:11:50 GMT (envelope-from git) Date: Fri, 29 Mar 2024 18:11:50 GMT Message-Id: <202403291811.42TIBoXa078223@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 43ae86aa8e24 - stable/14 - conf: Expand the include path for more openssl files List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 43ae86aa8e24af1419b21bc1b1d76c113fdcc4d1 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=43ae86aa8e24af1419b21bc1b1d76c113fdcc4d1 commit 43ae86aa8e24af1419b21bc1b1d76c113fdcc4d1 Author: Mark Johnston AuthorDate: 2023-12-06 18:39:48 +0000 Commit: Mark Johnston CommitDate: 2024-03-29 13:53:05 +0000 conf: Expand the include path for more openssl files Fixes: e655cc70dfcd ("ossl: Move arm_arch.h to a common subdirectory") Reported by: Jenkins (cherry picked from commit d2ce3d89e93cab3942b771ccd64e7c83532c090a) --- sys/conf/files.arm64 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index 6c9f77c2eebd..15ae804bfb0f 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -136,17 +136,17 @@ ghashv8-armx.o optional armv8crypto \ crypto/des/des_enc.c optional netsmb crypto/openssl/ossl_aarch64.c optional ossl crypto/openssl/aarch64/chacha-armv8.S optional ossl \ - compile-with "${CC} -c ${CFLAGS:N-mgeneral-regs-only} ${WERROR} ${.IMPSRC}" + compile-with "${CC} -c ${CFLAGS:N-mgeneral-regs-only} -I$S/crypto/openssl ${WERROR} ${.IMPSRC}" crypto/openssl/aarch64/poly1305-armv8.S optional ossl \ - compile-with "${CC} -c ${CFLAGS:N-mgeneral-regs-only} ${WERROR} ${.IMPSRC}" + compile-with "${CC} -c ${CFLAGS:N-mgeneral-regs-only} -I$S/crypto/openssl ${WERROR} ${.IMPSRC}" crypto/openssl/aarch64/sha1-armv8.S optional ossl \ - compile-with "${CC} -c ${CFLAGS:N-mgeneral-regs-only} ${WERROR} ${.IMPSRC}" + compile-with "${CC} -c ${CFLAGS:N-mgeneral-regs-only} -I$S/crypto/openssl ${WERROR} ${.IMPSRC}" crypto/openssl/aarch64/sha256-armv8.S optional ossl \ - compile-with "${CC} -c ${CFLAGS:N-mgeneral-regs-only} ${WERROR} ${.IMPSRC}" + compile-with "${CC} -c ${CFLAGS:N-mgeneral-regs-only} -I$S/crypto/openssl ${WERROR} ${.IMPSRC}" crypto/openssl/aarch64/sha512-armv8.S optional ossl \ - compile-with "${CC} -c ${CFLAGS:N-mgeneral-regs-only} ${WERROR} ${.IMPSRC}" + compile-with "${CC} -c ${CFLAGS:N-mgeneral-regs-only} -I$S/crypto/openssl ${WERROR} ${.IMPSRC}" crypto/openssl/aarch64/vpaes-armv8.S optional ossl \ - compile-with "${CC} -c ${CFLAGS:N-mgeneral-regs-only} ${WERROR} ${.IMPSRC}" + compile-with "${CC} -c ${CFLAGS:N-mgeneral-regs-only} -I$S/crypto/openssl ${WERROR} ${.IMPSRC}" dev/acpica/acpi_bus_if.m optional acpi dev/acpica/acpi_if.m optional acpi From nobody Fri Mar 29 18:11:52 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V5pQM0CHwz5FNbn; Fri, 29 Mar 2024 18:11: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 4V5pQK3JcYz4hJ1; Fri, 29 Mar 2024 18:11:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711735913; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jrK5XBtITQOs2+M7BzbObEHkR+7CYGphkg2szaQEORQ=; b=fmEqMQXxvcQUGhbqxmoPxt8ojobBAam1+Ys3tFOCeLSHKYyKgmiIYUmxn6rm9gQKxjsdRx 62K/fJbuQasS5oJj5xR8yh8kw9YW9UXTlesByoosZsJAz/1GTv9LvvwMwXzbOrAdOSbYoW jfKdpJZGZx0kQrCrZ6ITa1OKqH6iLh24u8BW5XpUgmGe5g1ZmMjxFVtIWK2eaQ655Owx6W pUbdg+DWHeybKrqHbwDDkIxLZZk4IL3XzT/Nevw/C1W5S5cFl9wXpbrWezZs07V8+yK1A3 IiToasMs92AuzE1v4dOAl2KtICoKVisxxiRKOhg+6gOIfDxwIlgQDJF+DVjTwg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711735913; a=rsa-sha256; cv=none; b=H6XRrEiktCu2T5Xd7fYG2AI2H8xoVE8+SZy9sVnIp9sEoRSkMc4alKkC/Mfs3s7zAHM5yR H7OAZIySA3EYfAydsNdqRIZ8Z+WOrwqr3ghNZNNtgEmp83Kbx63AuXYpzDJQ4P9BhFYYcn U0vYzNWVrCP9fhhsLHQK065r4F/2UUvc+zv/Y2RX+7xy/sPvzFBZseCoqQN/gCHtjHpw2s w5En8azUdVXCnJhwyZHJOob8i5VS42uAivGDZdkDiIlmxQ48+tmf6FQyJPzS2rg/mMzKm1 zXjEoLUt29poNwQfR14NnjuJ5SwA4OF1CUnM6RFKP2EoO8x6iFt4mHKgFHDDMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711735913; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jrK5XBtITQOs2+M7BzbObEHkR+7CYGphkg2szaQEORQ=; b=lBrOz/5Y0wOHkyCL6NrKSpCpM2EJ2WFTIvb09iEFKDX8L2rPI0McmeDS7CF/v9ryBVHWz+ S1Fr3p/Gvh1y+KuKe7IQFL9wrH7czDC35BA1b/TRjQ7hsteVVENSg7CHcxLRvQ3HDAZGvG 7i6dQ/Glmao6cCtQ/hgEdR/npsm6s0kn6OjZA/jZVYWIHQztlp+JP6SZ5Ky6/Q1f/uAySd szDhBZWv+hum4rLrtm41mM7xojWb3wFInFFI+d4mnjZx2qQvQcN6G0lO/v4g+b4PUFc9WJ H7f6QB6vi8uQuukaVvFUDo0fDircjTeH/t/2Ilgj8aCjRBcdnqJ4jC9VdvmBHw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V5pQK1Ch2zM3K; Fri, 29 Mar 2024 18:11:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42TIBql6078324; Fri, 29 Mar 2024 18:11:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42TIBqmo078321; Fri, 29 Mar 2024 18:11:52 GMT (envelope-from git) Date: Fri, 29 Mar 2024 18:11:52 GMT Message-Id: <202403291811.42TIBqmo078321@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: b41151b96de6 - stable/14 - bhyve/gdb: Avoid rebuilding target.xml for install targets List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b41151b96de6fdab7b762dcf8d3f6640639c4bf3 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b41151b96de6fdab7b762dcf8d3f6640639c4bf3 commit b41151b96de6fdab7b762dcf8d3f6640639c4bf3 Author: Mark Johnston AuthorDate: 2024-03-07 05:39:07 +0000 Commit: Mark Johnston CommitDate: 2024-03-29 13:53:05 +0000 bhyve/gdb: Avoid rebuilding target.xml for install targets Otherwise it's impossible to install from a read-only objdir. Fixes: f81cdf24ba54 ("bhyve: Add support for XML register definitions") Reported by: olivier (cherry picked from commit 8a802df1de2d77fd0a62996bd785ca3f1326887f) --- usr.sbin/bhyve/gdb/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.sbin/bhyve/gdb/Makefile b/usr.sbin/bhyve/gdb/Makefile index a444b0cc4c69..cc9ba4d224da 100644 --- a/usr.sbin/bhyve/gdb/Makefile +++ b/usr.sbin/bhyve/gdb/Makefile @@ -8,6 +8,7 @@ XMLARCH= i386:x86-64 FILES+= amd64.xml .endif +.if !make(install*) target.xml: .PHONY @echo "" > ${.TARGET} @echo "" >> ${.TARGET} @@ -17,5 +18,6 @@ target.xml: .PHONY @echo " " >> ${.TARGET} .endfor @echo "" >> ${.TARGET} +.endif .include From nobody Fri Mar 29 18:11:56 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V5pQP40nGz5FNYN; Fri, 29 Mar 2024 18:11: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 4V5pQP0BvKz4h4c; Fri, 29 Mar 2024 18:11:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711735917; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7WG0A1HgQ0mTw6Db7MokaKfN40smautRkGBO3C0j0xg=; b=pj/LPJTbAG3x32XNS9AT8o1PSN8TKIMowwmRUwVKvt8QNMO+dFlSnoLu2y93AMkS8mI5CN WTKPdVwNpPvlcdfeMdeI7ZX2prMMYesC7Gf149HGE1MZa2cNzt1/xTaCTjHeabP/jkQqHL t12yEr1L9slD1LeNFhwOoIvIdBf7mvi4TDvWECoIqUuG964u13AbqIyVnrMOpkOOcWLLxH nOPnIZ730YwWeAjpAhOLQwUGhYOw5/Xa2Uu1WhUAkU+srRHIXMSAkT5URHuIXGNy1SPg/d h5BUffn0t7BkOhFUGN94EFOGxiacc4WbaC/u83wpvZErHdXee1szBX7Mus/KMg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711735917; a=rsa-sha256; cv=none; b=x5ES0QKrf/TEHHy78/Yzbj/uQ6MDXhTH5DvEgm4ev6upfphWA2n5BYR/ydcIxmvIKUrb6b Z/ax81o70JsGTATSHfQcC+J68hW/g0E3/Tv6/RAThaz/dU1NgE1Dj/X8cZE5mEutvSdI6b 7vupRg5rmCLU8FSwsQq4ujI1/YHgiYXfgaDzyqHWYhuBx7m76HEQ/8jcj24oT0+9DSPeyx +jmKqNKjP/TVvkWSKBSI2XzkDSkeWUOl56FiVCUmmgj30/hUsaWPlZkkmh8FefCj6ItNeG X2NsV3clDyLtwZwSjcHm6yMkTkrsUzKgsD/z6Y7haPcExoaViNaklLRxZQRacA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711735917; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7WG0A1HgQ0mTw6Db7MokaKfN40smautRkGBO3C0j0xg=; b=T2/IpNjDM6qKUxvrq0reDVMwd5g4hBQx5Cn4Gws6NjDmsY1VydOdlKuEG9b+F7uwcnqG8A GNh7NGcfYYv7LeHH4ZDt8XR9QWKzMjfwQuEGItx0QYSxn6riExYlkf8fEF3h8tnc6Kivjo y/5Bt6qfqLkrEjIeFHi6MN09OaS6Zmn/C9cWHSLGcych1rQLeRAwj+UDBjuGt7HpW9rpUt w50nr6yWtnjAMzDVwYZGV4YQvbE8/l8BjTImGTiqbxneu7AEka3Y8c+n6xUhAytBP62Leo No1FZTOwOXQdkTlBT5Cx5liEJDjPcb7bQe+fVlZCRLcPP8RIXh9RUg4dGC2WQQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V5pQN4NCczM3M; Fri, 29 Mar 2024 18:11:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42TIBuw1078474; Fri, 29 Mar 2024 18:11:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42TIBuT7078471; Fri, 29 Mar 2024 18:11:56 GMT (envelope-from git) Date: Fri, 29 Mar 2024 18:11:56 GMT Message-Id: <202403291811.42TIBuT7078471@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 4ede1bc00bbc - stable/14 - build: Order kernel-toolchain and buildkernel targets List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4ede1bc00bbc45beb535b939180c29c73a6d7344 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4ede1bc00bbc45beb535b939180c29c73a6d7344 commit 4ede1bc00bbc45beb535b939180c29c73a6d7344 Author: Mark Johnston AuthorDate: 2024-01-25 17:46:58 +0000 Commit: Mark Johnston CommitDate: 2024-03-29 13:53:48 +0000 build: Order kernel-toolchain and buildkernel targets MFC after: 1 week (cherry picked from commit 49a3780aeac3e6f53a3be8e3ce5210c28a205c2a) --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 4a6f4bfd425e..5f03d7212a0c 100644 --- a/Makefile +++ b/Makefile @@ -234,6 +234,7 @@ META_TGT_WHITELIST+= build${libcompat} .ORDER: buildkernel installkernel.debug .ORDER: buildkernel reinstallkernel .ORDER: buildkernel reinstallkernel.debug +.ORDER: kernel-toolchain buildkernel # Only sanitize PATH on FreeBSD. # PATH may include tools that are required to cross-build From nobody Fri Mar 29 18:11:57 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V5pQP5zGzz5FNtp; Fri, 29 Mar 2024 18:11: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 4V5pQP4c2fz4hJZ; Fri, 29 Mar 2024 18:11:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711735917; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UfkYE+Tphd3UXNPzKKHP3a6XJ2PI2w9zlYoBcIBOAGA=; b=FMeG5Z6IGOwiYfvW1ok3+AcSuvJ2n3L1Rx0dgsifrW/zf3s96kzuX6klxWHQTwnKkL5kRH ZAvf0lkBaSnzmTqQDO7SrNidLzLM941hs8jviTqplhySUWqdNQfmv/uR0HZ5WHLraNKbWi L3Kph55RBuEQqmjX6/w7Y3wCsPDbiS+L+K+HsnVoA9l+fkcHA0TD0Wt2oOnCBTw0GK1vNi gWufticQiTOM2LKDUeIBwdKZsqtiicv+G9sBOv445W1QKecpxZMyG5fJp4S8FbSlf3YJTe KjpwMrqRYdH3amMc2VQNwjb7/P4MnzEFW0pj2zQeV6/RuxMYzNRiJeCaPhpMFg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711735917; a=rsa-sha256; cv=none; b=uQjkip0XO9p3ERLFBrSZRyG22k1eIVLtNaMdlMk3DnZ4I2VlWCtwOXBHZnvJGHaFujlvRk JNYCaPOr33I+6XPYHYXMvp8gAFrtFu/Odr9xfTWpeP8D9LrYk4FTBD+SrRh9Z9YHtTmq7r AQM154UwBfg0WXLYkcKFw1fm3LHoBoNBHJu9HCydNOKGqSBXQ1Ny7/bAJ1otI4WUZ4YEKW k2IjBXxgqRZ9uWX+jtoro06fEpGE9zKJ7t3tChW2L31/duO9MlHcDeWTvt+04vqm07mrZv axTTp1K7G+Gf0RBShG/umZaKy6kNjljHSv3V8BuLnTrPSn+uyURZfVI/JndVJw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711735917; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UfkYE+Tphd3UXNPzKKHP3a6XJ2PI2w9zlYoBcIBOAGA=; b=K3EbjtPtlWxQpN/gqkBvDF5VA2umbNIOX6vkxRpM1/+kMvcdT+XWmZXBmkVE4jgo2H0UrS zHL1dFu/Ww35PCN6LLdEmCNwdXxGPvu9tWszAN2gnWgbtKNHHTKBlKdd94NqEDlujf+C2i j0rqFGnTtSnjUsfiC4IZrA6dHF1Jc8RC5/nKGQqnmIYYIoIE7dn0CHf19cCndaRaxrffBx aUOe7hFwM1CyulX65sNtRBxJ6czfFQ5pPNvgR+wRShtDkNpPQQyA0ij6sUNtr3qOkmOHdL mLAoxpMdOilyek/RBejEFyGlMG4JcwKzfvqh/lrkt+yu3ftyqfzCY9rhMdJyQg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V5pQP3vWJzLY1; Fri, 29 Mar 2024 18:11:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42TIBvZl078519; Fri, 29 Mar 2024 18:11:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42TIBvPm078516; Fri, 29 Mar 2024 18:11:57 GMT (envelope-from git) Date: Fri, 29 Mar 2024 18:11:57 GMT Message-Id: <202403291811.42TIBvPm078516@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: df4a9902eac7 - stable/14 - rc.initdiskless: Disable soft-updates in mdmfs (again) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: df4a9902eac75c31dd8857e94b9aadd8c88cae03 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=df4a9902eac75c31dd8857e94b9aadd8c88cae03 commit df4a9902eac75c31dd8857e94b9aadd8c88cae03 Author: Jose Luis Duran AuthorDate: 2024-03-20 04:54:18 +0000 Commit: Mark Johnston CommitDate: 2024-03-29 13:53:54 +0000 rc.initdiskless: Disable soft-updates in mdmfs (again) Re-apply the -S switch to disable soft-updates in memory disks (commit 8b1292ac5219). This might be beneficial when tmpfs(5) is not present in the kernel, as this can cause mdmfs(8)'s auto keyword to fallback to using md(4). PR: 85558 MFC after: 1 week Reviewed by: imp, emaste, brooks Differential Revision: https://reviews.freebsd.org/D43242 (cherry picked from commit bb4116576f2edf466ada3885cf851599ce7a4792) --- libexec/rc/rc.initdiskless | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libexec/rc/rc.initdiskless b/libexec/rc/rc.initdiskless index 8b4a01187636..a6820a546e55 100644 --- a/libexec/rc/rc.initdiskless +++ b/libexec/rc/rc.initdiskless @@ -208,9 +208,9 @@ handle_remount() { # $1 = mount point # $1 is size in 512-byte sectors, $2 is the mount point. mount_md() { if [ ${o_verbose} -gt 0 ] ; then - /sbin/mdmfs -XL -s $1 auto $2 + /sbin/mdmfs -XL -S -s $1 auto $2 else - /sbin/mdmfs -s $1 auto $2 + /sbin/mdmfs -S -s $1 auto $2 fi } From nobody Fri Mar 29 18:11:55 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V5pQP33fLz5FNYK; Fri, 29 Mar 2024 18:11: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 4V5pQM2tldz4hJF; Fri, 29 Mar 2024 18:11:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711735915; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5q9h9v71HZyvzIbGCSITupd4WelVvjxGUhrTy7HN/Rk=; b=DOoGFDbuAFHRommjgf0WfIfoGY7VTR6NmIpkA3Q5ZbJsstrrK202azDWmqW1whr09OWKB1 Y6P+htIPT5c0U36Dg32kDTViEykGRRNgGnmKjsK3Em6tWk+aKt1AAv4T9BD3wxnTleNPSy pRB+3YlkuS9RvS/dJgp69gyfEBo7/ZJGBUGCJYfwtZC19fLKjwbAnXTpuFVRacw7XXovc7 wzF+cgr6ybFEiNIApyj70/lFCaovzwdDZh1B2RmEXE835pa8PbASRWWDr1mZ6PXHEdlAan 8KL3NSsNqiK7a6NECKwSqa1FnzibIgJYcYJU4xUBeIpW4uBn7TwOZKh1cFPtYg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711735915; a=rsa-sha256; cv=none; b=A5V+xVHuw0eei7N4FEN1YZYyOqoCWlIPa4dxnNulFoL2DxafUS0d7T80pAEqUq2EeByc5J nqvi3cPilAU7evoJcKXBMT5rnpJPUpq/hYBJN1RoIB9hVrF5bIa63A9J1SfgTxbDLeWGMN z/ojapbnZpsp6oBLBVnK1QV+D0qFZUoLi12t2bJPoK6KYCyKXmXfwCp+K11u7VlOHjWF+7 T1BGtG+2zovXgNmYi3k0Oji0+MbXyJTfXTI+Cds4OFvi7zx5dsGGD/4vLb0x00jhw9nVTy AF+2LwC5VCsuo1vg0TbyGfeeN/w7mLAsJFKuBHYrH6VKXbgP1dV0D/MYvNw13g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711735915; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5q9h9v71HZyvzIbGCSITupd4WelVvjxGUhrTy7HN/Rk=; b=C8UxIAHHGqTW0nuXFkzySotTo4j2zn1mD9sJBwmXkz/P+8cTtUWVW7Z7ecoEjmse6mdMwL q4oNys2MaOhBNnghSj3Y+sm2BflZLWFcWyAXkgWAF1Q8NFsOO7IxW8TCTiOGXJGIFticwi P7HRxlopDliUOu0Tb3nIyYRYEr239gdSfDFJAgAbFXr3cO5MurDJMcbm4flmfkojLdRS/g dkAqgc4xIoqdYe7hdxdjdxrA77yb1IPD8H3towRHQjP+rCqCmoVII7SRbvqZoH6FaA39d5 5ik5LheX9BFnVzEpZa3vab5EzK2kolMR/18FjFv6Oiuzq8fiMtg5tUBM+sJoNA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V5pQM2SsVzLbh; Fri, 29 Mar 2024 18:11:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42TIBtBT078429; Fri, 29 Mar 2024 18:11:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42TIBtxa078426; Fri, 29 Mar 2024 18:11:55 GMT (envelope-from git) Date: Fri, 29 Mar 2024 18:11:55 GMT Message-Id: <202403291811.42TIBtxa078426@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 2b4745d2c193 - stable/14 - bhyve: Move device model-independent UART code into a separate file List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 2b4745d2c193bede4b887f882e302c02c1f300ef Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=2b4745d2c193bede4b887f882e302c02c1f300ef commit 2b4745d2c193bede4b887f882e302c02c1f300ef Author: Mark Johnston AuthorDate: 2024-03-21 04:20:37 +0000 Commit: Mark Johnston CommitDate: 2024-03-29 13:53:28 +0000 bhyve: Move device model-independent UART code into a separate file Currently bhyve implements a ns16550-compatible UART in uart_emul.c. This file also contains generic code to manage RX FIFOs and to handle reading from and writing to a TTY. bhyve instantiates UARTs to implement COM devices (via pci_lpc.c) and PCI UART devices. The arm64 port will bring with it a PL011 device model which is used as the default console (i.e., no COM ports). To simplify its integration, add a UART "backend" layer which lets UART device models allocate an RX FIFO and interact with TTYs without duplicating code. In particular, code in uart_backend.* is to be shared among device models, and the namespace for uart_emul.* is changed to uart_ns16550_*. This is based on andrew@'s work in https://github.com/zxombie/freebsd/tree/bhyvearm64 but I've made a number of changes, particularly with respect to naming and source code organization. No functional change intended. Reviewed by: corvink, jhb MFC after: 1 week Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D40993 (cherry picked from commit d1c5d0cfcc1733c243d87f20477b115db4cf24b6) --- usr.sbin/bhyve/Makefile | 1 + usr.sbin/bhyve/amd64/pci_lpc.c | 31 ++-- usr.sbin/bhyve/pci_uart.c | 13 +- usr.sbin/bhyve/uart_backend.c | 348 +++++++++++++++++++++++++++++++++++++++++ usr.sbin/bhyve/uart_backend.h | 55 +++++++ usr.sbin/bhyve/uart_emul.c | 344 +++++----------------------------------- usr.sbin/bhyve/uart_emul.h | 20 ++- 7 files changed, 478 insertions(+), 334 deletions(-) diff --git a/usr.sbin/bhyve/Makefile b/usr.sbin/bhyve/Makefile index c9d571daebbc..03ea77769754 100644 --- a/usr.sbin/bhyve/Makefile +++ b/usr.sbin/bhyve/Makefile @@ -56,6 +56,7 @@ SRCS= \ tpm_emul_passthru.c \ tpm_intf_crb.c \ tpm_ppi_qemu.c \ + uart_backend.c \ uart_emul.c \ usb_emul.c \ usb_mouse.c \ diff --git a/usr.sbin/bhyve/amd64/pci_lpc.c b/usr.sbin/bhyve/amd64/pci_lpc.c index 5c2a2a7965b0..c29fd115809d 100644 --- a/usr.sbin/bhyve/amd64/pci_lpc.c +++ b/usr.sbin/bhyve/amd64/pci_lpc.c @@ -70,7 +70,7 @@ static struct pci_devinst *lpc_bridge; #define LPC_UART_NUM 4 static struct lpc_uart_softc { - struct uart_softc *uart_softc; + struct uart_ns16550_softc *uart_softc; int iobase; int irq; int enabled; @@ -227,17 +227,19 @@ lpc_uart_io_handler(struct vmctx *ctx __unused, int in, switch (bytes) { case 1: if (in) - *eax = uart_read(sc->uart_softc, offset); + *eax = uart_ns16550_read(sc->uart_softc, offset); else - uart_write(sc->uart_softc, offset, *eax); + uart_ns16550_write(sc->uart_softc, offset, *eax); break; case 2: if (in) { - *eax = uart_read(sc->uart_softc, offset); - *eax |= uart_read(sc->uart_softc, offset + 1) << 8; + *eax = uart_ns16550_read(sc->uart_softc, offset); + *eax |= + uart_ns16550_read(sc->uart_softc, offset + 1) << 8; } else { - uart_write(sc->uart_softc, offset, *eax); - uart_write(sc->uart_softc, offset + 1, *eax >> 8); + uart_ns16550_write(sc->uart_softc, offset, *eax); + uart_ns16550_write(sc->uart_softc, offset + 1, + *eax >> 8); } break; default: @@ -276,13 +278,14 @@ lpc_init(struct vmctx *ctx) } pci_irq_reserve(sc->irq); - sc->uart_softc = uart_init(lpc_uart_intr_assert, - lpc_uart_intr_deassert, sc); + sc->uart_softc = uart_ns16550_init(lpc_uart_intr_assert, + lpc_uart_intr_deassert, sc); asprintf(&node_name, "lpc.%s.path", name); backend = get_config_value(node_name); free(node_name); - if (uart_set_backend(sc->uart_softc, backend) != 0) { + if (backend != NULL && + uart_ns16550_tty_open(sc->uart_softc, backend) != 0) { EPRINTLN("Unable to initialize backend '%s' " "for LPC device %s", backend, name); return (-1); @@ -291,7 +294,7 @@ lpc_init(struct vmctx *ctx) bzero(&iop, sizeof(struct inout_port)); iop.name = name; iop.port = sc->iobase; - iop.size = UART_IO_BAR_SIZE; + iop.size = UART_NS16550_IO_BAR_SIZE; iop.flags = IOPORT_F_INOUT; iop.handler = lpc_uart_io_handler; iop.arg = sc; @@ -424,7 +427,7 @@ pci_lpc_uart_dsdt(void) dsdt_line(" Name (_CRS, ResourceTemplate ()"); dsdt_line(" {"); dsdt_indent(2); - dsdt_fixed_ioport(sc->iobase, UART_IO_BAR_SIZE); + dsdt_fixed_ioport(sc->iobase, UART_NS16550_IO_BAR_SIZE); dsdt_fixed_irq(sc->irq); dsdt_unindent(2); dsdt_line(" })"); @@ -589,12 +592,12 @@ static int pci_lpc_snapshot(struct vm_snapshot_meta *meta) { int unit, ret; - struct uart_softc *sc; + struct uart_ns16550_softc *sc; for (unit = 0; unit < LPC_UART_NUM; unit++) { sc = lpc_uart_softc[unit].uart_softc; - ret = uart_snapshot(sc, meta); + ret = uart_ns16550_snapshot(sc, meta); if (ret != 0) goto done; } diff --git a/usr.sbin/bhyve/pci_uart.c b/usr.sbin/bhyve/pci_uart.c index 362238bf3168..1e5278ba4d59 100644 --- a/usr.sbin/bhyve/pci_uart.c +++ b/usr.sbin/bhyve/pci_uart.c @@ -68,7 +68,7 @@ pci_uart_write(struct pci_devinst *pi, int baridx, uint64_t offset, int size, assert(baridx == 0); assert(size == 1); - uart_write(pi->pi_arg, offset, value); + uart_ns16550_write(pi->pi_arg, offset, value); } static uint64_t @@ -79,7 +79,7 @@ pci_uart_read(struct pci_devinst *pi, int baridx, uint64_t offset, int size) assert(baridx == 0); assert(size == 1); - val = uart_read(pi->pi_arg, offset); + val = uart_ns16550_read(pi->pi_arg, offset); return (val); } @@ -95,10 +95,10 @@ pci_uart_legacy_config(nvlist_t *nvl, const char *opts) static int pci_uart_init(struct pci_devinst *pi, nvlist_t *nvl) { - struct uart_softc *sc; + struct uart_ns16550_softc *sc; const char *device; - pci_emul_alloc_bar(pi, 0, PCIBAR_IO, UART_IO_BAR_SIZE); + pci_emul_alloc_bar(pi, 0, PCIBAR_IO, UART_NS16550_IO_BAR_SIZE); pci_lintr_request(pi); /* initialize config space */ @@ -106,11 +106,12 @@ pci_uart_init(struct pci_devinst *pi, nvlist_t *nvl) pci_set_cfgdata16(pi, PCIR_VENDOR, COM_VENDOR); pci_set_cfgdata8(pi, PCIR_CLASS, PCIC_SIMPLECOMM); - sc = uart_init(pci_uart_intr_assert, pci_uart_intr_deassert, pi); + sc = uart_ns16550_init(pci_uart_intr_assert, pci_uart_intr_deassert, + pi); pi->pi_arg = sc; device = get_config_value_node(nvl, "path"); - if (uart_set_backend(sc, device) != 0) { + if (device != NULL && uart_ns16550_tty_open(sc, device) != 0) { EPRINTLN("Unable to initialize backend '%s' for " "pci uart at %d:%d", device, pi->pi_slot, pi->pi_func); return (-1); diff --git a/usr.sbin/bhyve/uart_backend.c b/usr.sbin/bhyve/uart_backend.c new file mode 100644 index 000000000000..8d91f4f671e1 --- /dev/null +++ b/usr.sbin/bhyve/uart_backend.c @@ -0,0 +1,348 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2012 NetApp, Inc. + * Copyright (c) 2013 Neel Natu + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY NETAPP, INC ``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 NETAPP, INC OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "debug.h" +#include "mevent.h" +#include "uart_backend.h" + +struct ttyfd { + bool opened; + int rfd; /* fd for reading */ + int wfd; /* fd for writing, may be == rfd */ +}; + +#define FIFOSZ 16 + +struct fifo { + uint8_t buf[FIFOSZ]; + int rindex; /* index to read from */ + int windex; /* index to write to */ + int num; /* number of characters in the fifo */ + int size; /* size of the fifo */ +}; + +struct uart_softc { + struct ttyfd tty; + struct fifo rxfifo; + struct mevent *mev; +}; + +static bool uart_stdio; /* stdio in use for i/o */ +static struct termios tio_stdio_orig; + +static void +ttyclose(void) +{ + tcsetattr(STDIN_FILENO, TCSANOW, &tio_stdio_orig); +} + +static void +ttyopen(struct ttyfd *tf) +{ + struct termios orig, new; + + tcgetattr(tf->rfd, &orig); + new = orig; + cfmakeraw(&new); + new.c_cflag |= CLOCAL; + tcsetattr(tf->rfd, TCSANOW, &new); + if (uart_stdio) { + tio_stdio_orig = orig; + atexit(ttyclose); + } + raw_stdio = 1; +} + +static int +ttyread(struct ttyfd *tf) +{ + unsigned char rb; + + if (read(tf->rfd, &rb, 1) == 1) + return (rb); + else + return (-1); +} + +static void +ttywrite(struct ttyfd *tf, unsigned char wb) +{ + (void)write(tf->wfd, &wb, 1); +} + +static bool +rxfifo_available(struct uart_softc *sc) +{ + return (sc->rxfifo.num < sc->rxfifo.size); +} + +int +uart_rxfifo_getchar(struct uart_softc *sc) +{ + struct fifo *fifo; + int c, error, wasfull; + + wasfull = 0; + fifo = &sc->rxfifo; + if (fifo->num > 0) { + if (!rxfifo_available(sc)) + wasfull = 1; + c = fifo->buf[fifo->rindex]; + fifo->rindex = (fifo->rindex + 1) % fifo->size; + fifo->num--; + if (wasfull) { + if (sc->tty.opened) { + error = mevent_enable(sc->mev); + assert(error == 0); + } + } + return (c); + } else + return (-1); +} + +int +uart_rxfifo_numchars(struct uart_softc *sc) +{ + return (sc->rxfifo.num); +} + +static int +rxfifo_putchar(struct uart_softc *sc, uint8_t ch) +{ + struct fifo *fifo; + int error; + + fifo = &sc->rxfifo; + + if (fifo->num < fifo->size) { + fifo->buf[fifo->windex] = ch; + fifo->windex = (fifo->windex + 1) % fifo->size; + fifo->num++; + if (!rxfifo_available(sc)) { + if (sc->tty.opened) { + /* + * Disable mevent callback if the FIFO is full. + */ + error = mevent_disable(sc->mev); + assert(error == 0); + } + } + return (0); + } else + return (-1); +} + +void +uart_rxfifo_drain(struct uart_softc *sc, bool loopback) +{ + int ch; + + if (loopback) { + (void)ttyread(&sc->tty); + } else { + while (rxfifo_available(sc) && + ((ch = ttyread(&sc->tty)) != -1)) + rxfifo_putchar(sc, ch); + } +} + +int +uart_rxfifo_putchar(struct uart_softc *sc, uint8_t ch, bool loopback) +{ + if (loopback) { + return (rxfifo_putchar(sc, ch)); + } else if (sc->tty.opened) { + ttywrite(&sc->tty, ch); + return (0); + } else { + /* Drop on the floor. */ + return (0); + } +} + +void +uart_rxfifo_reset(struct uart_softc *sc, int size) +{ + char flushbuf[32]; + struct fifo *fifo; + ssize_t nread; + int error; + + fifo = &sc->rxfifo; + bzero(fifo, sizeof(struct fifo)); + fifo->size = size; + + if (sc->tty.opened) { + /* + * Flush any unread input from the tty buffer. + */ + while (1) { + nread = read(sc->tty.rfd, flushbuf, sizeof(flushbuf)); + if (nread != sizeof(flushbuf)) + break; + } + + /* + * Enable mevent to trigger when new characters are available + * on the tty fd. + */ + error = mevent_enable(sc->mev); + assert(error == 0); + } +} + +int +uart_rxfifo_size(struct uart_softc *sc __unused) +{ + return (FIFOSZ); +} + +#ifdef BHYVE_SNAPSHOT +int +uart_rxfifo_snapshot(struct uart_softc *sc, struct vm_snapshot_meta *meta) +{ + int ret; + + SNAPSHOT_VAR_OR_LEAVE(sc->rxfifo.rindex, meta, ret, done); + SNAPSHOT_VAR_OR_LEAVE(sc->rxfifo.windex, meta, ret, done); + SNAPSHOT_VAR_OR_LEAVE(sc->rxfifo.num, meta, ret, done); + SNAPSHOT_VAR_OR_LEAVE(sc->rxfifo.size, meta, ret, done); + SNAPSHOT_BUF_OR_LEAVE(sc->rxfifo.buf, sizeof(sc->rxfifo.buf), + meta, ret, done); + +done: + return (ret); +} +#endif + +static int +uart_stdio_backend(struct uart_softc *sc) +{ +#ifndef WITHOUT_CAPSICUM + cap_rights_t rights; + cap_ioctl_t cmds[] = { TIOCGETA, TIOCSETA, TIOCGWINSZ }; +#endif + + if (uart_stdio) + return (-1); + + sc->tty.rfd = STDIN_FILENO; + sc->tty.wfd = STDOUT_FILENO; + sc->tty.opened = true; + + if (fcntl(sc->tty.rfd, F_SETFL, O_NONBLOCK) != 0) + return (-1); + if (fcntl(sc->tty.wfd, F_SETFL, O_NONBLOCK) != 0) + return (-1); + +#ifndef WITHOUT_CAPSICUM + cap_rights_init(&rights, CAP_EVENT, CAP_IOCTL, CAP_READ); + if (caph_rights_limit(sc->tty.rfd, &rights) == -1) + errx(EX_OSERR, "Unable to apply rights for sandbox"); + if (caph_ioctls_limit(sc->tty.rfd, cmds, nitems(cmds)) == -1) + errx(EX_OSERR, "Unable to apply rights for sandbox"); +#endif + + uart_stdio = true; + + return (0); +} + +static int +uart_tty_backend(struct uart_softc *sc, const char *path) +{ +#ifndef WITHOUT_CAPSICUM + cap_rights_t rights; + cap_ioctl_t cmds[] = { TIOCGETA, TIOCSETA, TIOCGWINSZ }; +#endif + int fd; + + fd = open(path, O_RDWR | O_NONBLOCK); + if (fd < 0) + return (-1); + + if (!isatty(fd)) { + close(fd); + return (-1); + } + + sc->tty.rfd = sc->tty.wfd = fd; + sc->tty.opened = true; + +#ifndef WITHOUT_CAPSICUM + cap_rights_init(&rights, CAP_EVENT, CAP_IOCTL, CAP_READ, CAP_WRITE); + if (caph_rights_limit(fd, &rights) == -1) + errx(EX_OSERR, "Unable to apply rights for sandbox"); + if (caph_ioctls_limit(fd, cmds, nitems(cmds)) == -1) + errx(EX_OSERR, "Unable to apply rights for sandbox"); +#endif + + return (0); +} + +struct uart_softc * +uart_init(void) +{ + return (calloc(1, sizeof(struct uart_softc))); +} + +int +uart_tty_open(struct uart_softc *sc, const char *path, + void (*drain)(int, enum ev_type, void *), void *arg) +{ + int retval; + + if (strcmp("stdio", path) == 0) + retval = uart_stdio_backend(sc); + else + retval = uart_tty_backend(sc, path); + if (retval == 0) { + ttyopen(&sc->tty); + sc->mev = mevent_add(sc->tty.rfd, EVF_READ, drain, arg); + assert(sc->mev != NULL); + } + + return (retval); +} diff --git a/usr.sbin/bhyve/uart_backend.h b/usr.sbin/bhyve/uart_backend.h new file mode 100644 index 000000000000..fa7949ad6d1c --- /dev/null +++ b/usr.sbin/bhyve/uart_backend.h @@ -0,0 +1,55 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2012 NetApp, Inc. + * Copyright (c) 2013 Neel Natu + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY NETAPP, INC ``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 NETAPP, INC OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef _UART_BACKEND_H_ +#define _UART_BACKEND_H_ + +#include + +#include "mevent.h" + +struct uart_softc; +struct vm_snapshot_meta; + +void uart_rxfifo_drain(struct uart_softc *sc, bool loopback); +int uart_rxfifo_getchar(struct uart_softc *sc); +int uart_rxfifo_numchars(struct uart_softc *sc); +int uart_rxfifo_putchar(struct uart_softc *sc, uint8_t ch, bool loopback); +void uart_rxfifo_reset(struct uart_softc *sc, int size); +int uart_rxfifo_size(struct uart_softc *sc); +#ifdef BHYVE_SNAPSHOT +int uart_rxfifo_snapshot(struct uart_softc *sc, + struct vm_snapshot_meta *meta); +#endif + +struct uart_softc *uart_init(void); +int uart_tty_open(struct uart_softc *sc, const char *path, + void (*drain)(int, enum ev_type, void *), void *arg); + +#endif /* _UART_BACKEND_H_ */ diff --git a/usr.sbin/bhyve/uart_emul.c b/usr.sbin/bhyve/uart_emul.c index 917ce36b67f6..05f552021bbf 100644 --- a/usr.sbin/bhyve/uart_emul.c +++ b/usr.sbin/bhyve/uart_emul.c @@ -30,29 +30,20 @@ #include #include #include -#ifndef WITHOUT_CAPSICUM -#include -#include -#endif #include +#include #include #include -#include -#include #include -#include -#include #include #include #include #include -#include -#include "mevent.h" +#include "uart_backend.h" #include "uart_emul.h" -#include "debug.h" #define COM1_BASE 0x3F8 #define COM1_IRQ 4 @@ -77,11 +68,6 @@ #define REG_SCR com_scr #endif -#define FIFOSZ 16 - -static bool uart_stdio; /* stdio in use for i/o */ -static struct termios tio_stdio_orig; - static struct { int baseaddr; int irq; @@ -95,21 +81,9 @@ static struct { #define UART_NLDEVS (sizeof(uart_lres) / sizeof(uart_lres[0])) -struct fifo { - uint8_t buf[FIFOSZ]; - int rindex; /* index to read from */ - int windex; /* index to write to */ - int num; /* number of characters in the fifo */ - int size; /* size of the fifo */ -}; - -struct ttyfd { - bool opened; - int rfd; /* fd for reading */ - int wfd; /* fd for writing, may be == rfd */ -}; +struct uart_ns16550_softc { + struct uart_softc *backend; -struct uart_softc { pthread_mutex_t mtx; /* protects all softc elements */ uint8_t data; /* Data register (R/W) */ uint8_t ier; /* Interrupt enable register (R/W) */ @@ -123,10 +97,6 @@ struct uart_softc { uint8_t dll; /* Baudrate divisor latch LSB */ uint8_t dlh; /* Baudrate divisor latch MSB */ - struct fifo rxfifo; - struct mevent *mev; - - struct ttyfd tty; bool thre_int_pending; /* THRE interrupt pending */ void *arg; @@ -134,158 +104,6 @@ struct uart_softc { uart_intr_func_t intr_deassert; }; -static void uart_drain(int fd, enum ev_type ev, void *arg); - -static void -ttyclose(void) -{ - - tcsetattr(STDIN_FILENO, TCSANOW, &tio_stdio_orig); -} - -static void -ttyopen(struct ttyfd *tf) -{ - struct termios orig, new; - - tcgetattr(tf->rfd, &orig); - new = orig; - cfmakeraw(&new); - new.c_cflag |= CLOCAL; - tcsetattr(tf->rfd, TCSANOW, &new); - if (uart_stdio) { - tio_stdio_orig = orig; - atexit(ttyclose); - } - raw_stdio = 1; -} - -static int -ttyread(struct ttyfd *tf) -{ - unsigned char rb; - - if (read(tf->rfd, &rb, 1) == 1) - return (rb); - else - return (-1); -} - -static void -ttywrite(struct ttyfd *tf, unsigned char wb) -{ - - (void)write(tf->wfd, &wb, 1); -} - -static void -rxfifo_reset(struct uart_softc *sc, int size) -{ - char flushbuf[32]; - struct fifo *fifo; - ssize_t nread; - int error; - - fifo = &sc->rxfifo; - bzero(fifo, sizeof(struct fifo)); - fifo->size = size; - - if (sc->tty.opened) { - /* - * Flush any unread input from the tty buffer. - */ - while (1) { - nread = read(sc->tty.rfd, flushbuf, sizeof(flushbuf)); - if (nread != sizeof(flushbuf)) - break; - } - - /* - * Enable mevent to trigger when new characters are available - * on the tty fd. - */ - error = mevent_enable(sc->mev); - assert(error == 0); - } -} - -static int -rxfifo_available(struct uart_softc *sc) -{ - struct fifo *fifo; - - fifo = &sc->rxfifo; - return (fifo->num < fifo->size); -} - -static int -rxfifo_putchar(struct uart_softc *sc, uint8_t ch) -{ - struct fifo *fifo; - int error; - - fifo = &sc->rxfifo; - - if (fifo->num < fifo->size) { - fifo->buf[fifo->windex] = ch; - fifo->windex = (fifo->windex + 1) % fifo->size; - fifo->num++; - if (!rxfifo_available(sc)) { - if (sc->tty.opened) { - /* - * Disable mevent callback if the FIFO is full. - */ - error = mevent_disable(sc->mev); - assert(error == 0); - } - } - return (0); - } else - return (-1); -} - -static int -rxfifo_getchar(struct uart_softc *sc) -{ - struct fifo *fifo; - int c, error, wasfull; - - wasfull = 0; - fifo = &sc->rxfifo; - if (fifo->num > 0) { - if (!rxfifo_available(sc)) - wasfull = 1; - c = fifo->buf[fifo->rindex]; - fifo->rindex = (fifo->rindex + 1) % fifo->size; - fifo->num--; - if (wasfull) { - if (sc->tty.opened) { - error = mevent_enable(sc->mev); - assert(error == 0); - } - } - return (c); - } else - return (-1); -} - -static int -rxfifo_numchars(struct uart_softc *sc) -{ - struct fifo *fifo = &sc->rxfifo; - - return (fifo->num); -} - -static void -uart_opentty(struct uart_softc *sc) -{ - - ttyopen(&sc->tty); - sc->mev = mevent_add(sc->tty.rfd, EVF_READ, uart_drain, sc); - assert(sc->mev != NULL); -} - static uint8_t modem_status(uint8_t mcr) { @@ -326,12 +144,13 @@ modem_status(uint8_t mcr) * Return an interrupt reason if one is available. */ static int -uart_intr_reason(struct uart_softc *sc) +uart_intr_reason(struct uart_ns16550_softc *sc) { if ((sc->lsr & LSR_OE) != 0 && (sc->ier & IER_ERLS) != 0) return (IIR_RLS); - else if (rxfifo_numchars(sc) > 0 && (sc->ier & IER_ERXRDY) != 0) + else if (uart_rxfifo_numchars(sc->backend) > 0 && + (sc->ier & IER_ERXRDY) != 0) return (IIR_RXTOUT); else if (sc->thre_int_pending && (sc->ier & IER_ETXRDY) != 0) return (IIR_TXRDY); @@ -342,7 +161,7 @@ uart_intr_reason(struct uart_softc *sc) } static void -uart_reset(struct uart_softc *sc) +uart_reset(struct uart_ns16550_softc *sc) { uint16_t divisor; @@ -351,7 +170,7 @@ uart_reset(struct uart_softc *sc) sc->dlh = divisor >> 16; sc->msr = modem_status(sc->mcr); - rxfifo_reset(sc, 1); /* no fifo until enabled by software */ + uart_rxfifo_reset(sc->backend, 1); } /* @@ -359,7 +178,7 @@ uart_reset(struct uart_softc *sc) * interrupt condition to report to the processor. */ static void -uart_toggle_intr(struct uart_softc *sc) +uart_toggle_intr(struct uart_ns16550_softc *sc) { uint8_t intr_reason; @@ -372,14 +191,13 @@ uart_toggle_intr(struct uart_softc *sc) } static void -uart_drain(int fd, enum ev_type ev, void *arg) +uart_drain(int fd __unused, enum ev_type ev, void *arg) { - struct uart_softc *sc; - int ch; + struct uart_ns16550_softc *sc; + bool loopback; sc = arg; - assert(fd == sc->tty.rfd); assert(ev == EVF_READ); /* @@ -389,21 +207,16 @@ uart_drain(int fd, enum ev_type ev, void *arg) */ pthread_mutex_lock(&sc->mtx); - if ((sc->mcr & MCR_LOOPBACK) != 0) { - (void) ttyread(&sc->tty); - } else { - while (rxfifo_available(sc) && - ((ch = ttyread(&sc->tty)) != -1)) { - rxfifo_putchar(sc, ch); - } + loopback = (sc->mcr & MCR_LOOPBACK) != 0; + uart_rxfifo_drain(sc->backend, loopback); + if (!loopback) uart_toggle_intr(sc); - } pthread_mutex_unlock(&sc->mtx); } void -uart_write(struct uart_softc *sc, int offset, uint8_t value) +uart_ns16550_write(struct uart_ns16550_softc *sc, int offset, uint8_t value) { int fifosz; uint8_t msr; @@ -427,12 +240,9 @@ uart_write(struct uart_softc *sc, int offset, uint8_t value) switch (offset) { case REG_DATA: - if (sc->mcr & MCR_LOOPBACK) { - if (rxfifo_putchar(sc, value) != 0) - sc->lsr |= LSR_OE; - } else if (sc->tty.opened) { - ttywrite(&sc->tty, value); - } /* else drop on floor */ + if (uart_rxfifo_putchar(sc->backend, value, + (sc->mcr & MCR_LOOPBACK) != 0)) + sc->lsr |= LSR_OE; sc->thre_int_pending = true; break; case REG_IER: @@ -451,8 +261,9 @@ uart_write(struct uart_softc *sc, int offset, uint8_t value) * the FIFO contents are reset. */ if ((sc->fcr & FCR_ENABLE) ^ (value & FCR_ENABLE)) { - fifosz = (value & FCR_ENABLE) ? FIFOSZ : 1; - rxfifo_reset(sc, fifosz); + fifosz = (value & FCR_ENABLE) ? + uart_rxfifo_size(sc->backend) : 1; + uart_rxfifo_reset(sc->backend, fifosz); } /* @@ -463,7 +274,8 @@ uart_write(struct uart_softc *sc, int offset, uint8_t value) sc->fcr = 0; } else { if ((value & FCR_RCV_RST) != 0) - rxfifo_reset(sc, FIFOSZ); + uart_rxfifo_reset(sc->backend, + uart_rxfifo_size(sc->backend)); sc->fcr = value & (FCR_ENABLE | FCR_DMA | FCR_RX_MASK); @@ -522,7 +334,7 @@ done: } uint8_t -uart_read(struct uart_softc *sc, int offset) *** 193 LINES SKIPPED *** From nobody Fri Mar 29 18:11:54 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V5pQN723rz5FNtb; Fri, 29 Mar 2024 18:11: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 4V5pQM110Mz4hRJ; Fri, 29 Mar 2024 18:11:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711735915; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wXSw8C+1dsoASQKIegmk82aNyVidMiVfyOi4ozmRGlU=; b=Sx3mcpLEhw1sTtVQAt+V7e4YZcjtVhhhERUCWGZgBAgJ92BdZWmulQMkNPUKe2QZ6yXGo9 1PVKgkSM1va1wgpJ5JZdvgXVuuxTeI7pcwe8zU1Kxp3tPnG9/wuIiL+NcKgI2au3D0dUv0 aVZClRc+m4tvj1fqWrH1PSs282e4D+3UB8uBjaiosWv57PxpVdwyR/sL85f6HKe/CiVfjk Xjd+RA4Ikf60Zv5b4VPCrRpaDvuep9F0jofcqGV8McyPf3uCKVWH45TT39r/vkR5vQ9Ced KkXFoU7bXw2cc572FM6Ik2Z9tJMEl3NGp7fSAxXMT9j/zeGI58Vd5N7B6u6gWA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711735915; a=rsa-sha256; cv=none; b=wnV6t/sjor6L0IOt5hLIPUHlvnpErhZ/y5I+zqGUfw1iiFZHZ38DU2bJvJTg7Ow2O1urTP VLK0BmfHnoHkSaBHmW5QGmBfoVrz8Y9WeJbR5/y+mQTW4GaAFc1KatMuzzt+GNSLBsUAVK t+4lMLU60lXbAgZeig2sDtQf+ZkZ0TEciIdy4k7kraKJ5ChY9kXLG3TO8T49Dx5E+kGEqg cFuINsncr2F6X7JzwKC9vhHboMgqNqGHxNldut4wNCwM6NhLBNCo6fP4Rngz/+NBwF9u5O TyOAfzWoa4FmWE5pzgR0zshVxb6R+OKwGxqnh+9S/Su62Wv6meER6NQhF0fq/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711735915; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wXSw8C+1dsoASQKIegmk82aNyVidMiVfyOi4ozmRGlU=; b=ym/3VzTB/dX5uvI/kOJoQciSwjKFIJS4fNiYqcvjWpnrF+8dHoBW0BEgsSKdAOdMl4zE4d MgmupDac7jDwK8VO1z8zfaM9IslwY1XsbwMiaMl7FGmdjmwVXG3UYxjd3q/am185ejK8EG vHddg4/EEPGjVOFSWu7tBYLUHTQTEryYsThlwF8hJ/itorrmqGx1Uwt6J0Ck8dYp4VzSEI 90oL+zy4Es89jg/kluzD6MZsz5qGaZts8MdOs9yA1Ll3Qacg0Te9UEZtaUU1HKIRw2aITA rydX0nmgcEA5mH1raDQBSedWxRfBLVb8I7EzK3mxLFzlllpIu1Abn7m/4GAu6A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V5pQL60WczLQl; Fri, 29 Mar 2024 18:11:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42TIBsqU078372; Fri, 29 Mar 2024 18:11:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42TIBsPq078369; Fri, 29 Mar 2024 18:11:54 GMT (envelope-from git) Date: Fri, 29 Mar 2024 18:11:54 GMT Message-Id: <202403291811.42TIBsPq078369@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: b78edde28052 - stable/14 - libfdt: Make an internal FDT library available List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b78edde280528102d66d55058d3e287e24800e51 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b78edde280528102d66d55058d3e287e24800e51 commit b78edde280528102d66d55058d3e287e24800e51 Author: Mark Johnston AuthorDate: 2024-03-21 04:21:16 +0000 Commit: Mark Johnston CommitDate: 2024-03-29 13:53:19 +0000 libfdt: Make an internal FDT library available This will be used by bhyve to build a device tree when booting arm64 guests. Reviewed by: corvink, jhb MFC after: 1 week Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D40994 (cherry picked from commit f29af8618bf94f1e58877feb6dbef35bd8bbf56b) --- lib/Makefile | 1 + lib/libfdt/Makefile | 29 +++++++++++++++++++++++++++++ share/mk/src.libnames.mk | 4 ++++ 3 files changed, 34 insertions(+) diff --git a/lib/Makefile b/lib/Makefile index 49d28c1eb975..6c0574e76afb 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -169,6 +169,7 @@ SUBDIR+= clang SUBDIR.${MK_CUSE}+= libcuse SUBDIR.${MK_TOOLCHAIN}+=libpe SUBDIR.${MK_DIALOG}+= libdpv libfigpar +SUBDIR.${MK_FDT}+= libfdt SUBDIR.${MK_FILE}+= libmagic SUBDIR.${MK_GPIO}+= libgpio SUBDIR.${MK_GSSAPI}+= libgssapi librpcsec_gss diff --git a/lib/libfdt/Makefile b/lib/libfdt/Makefile new file mode 100644 index 000000000000..c4ada46c3b2e --- /dev/null +++ b/lib/libfdt/Makefile @@ -0,0 +1,29 @@ +LIB= fdt + +INTERNALLIB= + +LIBFDTSRCDIR= ${SRCTOP}/sys/contrib/libfdt +.PATH: ${LIBFDTSRCDIR} + +SRCS= \ + fdt.c \ + fdt_addresses.c \ + fdt_empty_tree.c \ + fdt_overlay.c \ + fdt_ro.c \ + fdt_rw.c \ + fdt_strerror.c \ + fdt_sw.c \ + fdt_wip.c + +INCS= \ + fdt.h \ + libfdt.h \ + ibfdt_env.h + +CFLAGS+= -I${LIBFDTSRCDIR} +WARNS?= 2 + +MAN= + +.include diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk index 6a79d0b864d3..8885835c0632 100644 --- a/share/mk/src.libnames.mk +++ b/share/mk/src.libnames.mk @@ -44,6 +44,7 @@ _INTERNALLIBS= \ c_nossp_pic \ cron \ elftc \ + fdt \ fifolog \ ifconfig \ ipf \ @@ -533,6 +534,9 @@ _LIB_OBJTOP?= ${OBJTOP} LIBELFTCDIR= ${_LIB_OBJTOP}/lib/libelftc LIBELFTC?= ${LIBELFTCDIR}/libelftc${PIE_SUFFIX}.a +LIBFDTDIR= ${_LIB_OBJTOP}/lib/libfdt +LIBFDT?= ${LIBFDTDIR}/libfdt${PIE_SUFFIX}.a + LIBLUADIR= ${_LIB_OBJTOP}/lib/liblua LIBLUA?= ${LIBLUADIR}/liblua${PIE_SUFFIX}.a From nobody Fri Mar 29 19:54:57 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V5rjF3pn8z5Fbgx; Fri, 29 Mar 2024 19:54: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 4V5rjF3GBDz46XY; Fri, 29 Mar 2024 19:54:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711742097; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X2rGYiFMbxOtZwLOXwj8cVrtcXPr9Lalk2icuRlRYIU=; b=IwscejSBDBhqKR9Oq4HQeu5sdeTmA2VECTy2fyl2voBv0wkwDFVbg8pGMmyi8BhxLE+c0C Y3EmwceXf/PrjYCvc55KLrtULjt2fJtzcVDTKs1y/+8lwfHhU8Y647PGBHMPGY0PUydiNU DEGed7tT22cQAeUrCG1JuRNBvpQu3sQILm52cLvaeyhrHsTeTSNJrkqo8E25BffuHE0Qd0 rKSzudkZk7mpvz4/nr9678t9TeSf0p/K6mgm9Q7N8HPYASzAnxD285eaG1ra98jaYORaYd nuqeZ5NjpfPaZFNeezv+FvnsLV7md9CaMA7EBCtk1HJbdjQdy8fNhA9TTd3Rzw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711742097; a=rsa-sha256; cv=none; b=hPNq6LoEUlKYidJP5+3v6cyjgZhE2SeUrnm6ZFmNdeu5JRlShjpfEHcqibb9YYsrnMS/Wf fHPfm7JdUGLg4IutWNhaze6iHRvzsQwiw1JH8tZcyCtqxHx1yWXxYqwguQT4yOVU6oanqM 1DlaDfIeDxtlh/FyKePDzQ5HiJyI6zh5BqQhxkzXwKcZwvlxHKwVAYdiQdEnAVve9bfm3c LSdUxSFIdh8+tXQE+K+UC4MhfUk3ANOsLjDWlpvvdpJy+MyDQR/KTmLab8EfogNPRC994g 671gvPSbmv+TgQZtM51730xVmgwee7YFgIXZAP6Y86WTenOQBQazk1jGBLSn4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711742097; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X2rGYiFMbxOtZwLOXwj8cVrtcXPr9Lalk2icuRlRYIU=; b=Mm8NYodcSfwrQqNhupyhghL3MBbi2Mk/16FRTb5O11leAF4uPQaV1CC/bOWL0968u5czD2 Qatip6pRe2czmnqO05iwg11HNmdtSGfqX01KkzTwkNDGPJzTC1iJUHOqbj713dXgv0WZff Rrzdrooe5XgRdORNlh80GgcWBOt5uLayEYk4xtzJhXf7jV7ONvaHul6zVmn6nONMqWEEjF DhYPrDpxanksC/eTXGswl6hfpPIxTafhKVRWNpM5CTibJJWAClVl9Ve0Tt5MR8n/2+t2JN qoGN9FqR4hiRmjqJ6KACBz9bKHtkcH79BkhKAdEyPsDfux6CFMm+W4T9bZ+XHQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V5rjF2sVbzP73; Fri, 29 Mar 2024 19:54:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42TJsvQ0054556; Fri, 29 Mar 2024 19:54:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42TJsv5E054553; Fri, 29 Mar 2024 19:54:57 GMT (envelope-from git) Date: Fri, 29 Mar 2024 19:54:57 GMT Message-Id: <202403291954.42TJsv5E054553@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ka Ho Ng Subject: git: d9d05e65c1f7 - stable/14 - epoch(9): Remove the under-development note List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: khng X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d9d05e65c1f7dd5c39a180ebc1f806482cb875e0 Auto-Submitted: auto-generated The branch stable/14 has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=d9d05e65c1f7dd5c39a180ebc1f806482cb875e0 commit d9d05e65c1f7dd5c39a180ebc1f806482cb875e0 Author: Ka Ho Ng AuthorDate: 2024-03-26 14:38:41 +0000 Commit: Ka Ho Ng CommitDate: 2024-03-29 19:54:43 +0000 epoch(9): Remove the under-development note There has not been planned changes so far to the interface. Remove the section as it may not be relevant anymore. Sponsored by: Juniper Networks, Inc. Reviewed by: glebius Differential Revision: https://reviews.freebsd.org/D44501 (cherry picked from commit 04b90ac0f9e883a485bad4b0edf516395596d17f) --- share/man/man9/epoch.9 | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/share/man/man9/epoch.9 b/share/man/man9/epoch.9 index 90c8e25da3ff..826f887212e1 100644 --- a/share/man/man9/epoch.9 +++ b/share/man/man9/epoch.9 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.Dd April 30, 2020 +.Dd March 25, 2024 .Dt EPOCH 9 .Os .Sh NAME @@ -260,10 +260,6 @@ and then defers deletion. More general mutation or a synchronous free would have to follow a call to .Fn epoch_wait . -.Sh NOTES -The -.Nm -kernel programming interface is under development and is subject to change. .Sh SEE ALSO .Xr callout 9 , .Xr locking 9 , From nobody Sat Mar 30 00:59:55 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V5zT80Lwlz5Fj6b; Sat, 30 Mar 2024 00:59:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4V5zT75ZHdz4j7K; Sat, 30 Mar 2024 00:59:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711760395; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TtscYrEtXERfM01gZ3aN1+dQi5d9th4Qa65TFWRzc+k=; b=qAPsV2/0IdEPFf/DZvlKcSSrZlmbWEohOLCnM8nJ11QoKXP0Ym/rdiF0E0cqBybf245pfm NnXb66XdgygQDJK/Rzr55fT45iZfvlk4RrqdyjG48srfM149/DttwTHKHB93cMvVWnhfMg xYeqQ1tC6zvUb8NKrqKrhJbmuO3zE+sg2S9hce+zvrJ22H52h4i+T6TfHmX4iTeW8Twlxd Qt4jpdlN8UEPdRwAfgVqEjMzFDcwPfDijGRPUJfVzTDqkSO+XXDs6mqSUv1tnQFfcqLyxt nLBVEDEB8cv/TN4HhMW/Fmk6hmqSgiX+H7c7spU9bkyAdBtPRxSket5NadicFg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711760395; a=rsa-sha256; cv=none; b=ucYhZzo2amPol0RiN2/s1u77Lcb8m9pQgisME9mfM/M8IfDrekiwVat76Kz9yF2kEAQuzG KikVM8Q+0UEZlkRShi7fd4/HfCVlbZHPpunsBexXLxXvqryB7d/nR3fJO7MRsekDL3bkdM kF0IfSPKImk8xf9WsvfXoJJ8XN0jo+NYRMg3FIBNjKVzVmv9wh0jPwE2JN2MFSsEflwLPG 7GCx47gfX6A4QFKU+Zb6ihcsJmXlGwrnBfvbfr8D0x1XLS7mTRlmLKoisnGeZZHWrYpfK6 g6u5Kwt2Fxyk6oZys8/JUKzs20Bxa/5+5gDuC9pLZWrEGCaigkb9XM5soWn1Vg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711760395; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TtscYrEtXERfM01gZ3aN1+dQi5d9th4Qa65TFWRzc+k=; b=T+hpU61gXUAabfoGSG4gJKYpuYLmxUlHXhwV3WwYphvI+b16aJ7Q4iIssEAloEGtyqnTA7 +cq1pA2jDYDNrEsWHGjL+DEiQJJgk55rK0W0m9AHCWYfABvfulzI+rjbGDcK9j1SqVBGJy 9/NgCfzvAthDJSgd09ity8KQArn9keBZJ0L2xlUlXxtbXh5JbYIXz4OwseNPGv6Fznvyyb QsCtxuV4IewsIBGimPesEMi/uMQwbuIHu0dr5p1dmQ8gbcbqK46ybLfgQT5R8LLc/n6uzN 0kxohgk015prMIonbY8EH9ncV4plcdQ1jjkvApeR6U92igsdLOdkVy43gK8U4A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V5zT74vTxzYsF; Sat, 30 Mar 2024 00:59:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42U0xtSm063360; Sat, 30 Mar 2024 00:59:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42U0xtcv063356; Sat, 30 Mar 2024 00:59:55 GMT (envelope-from git) Date: Sat, 30 Mar 2024 00:59:55 GMT Message-Id: <202403300059.42U0xtcv063356@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: b525301850f2 - stable/14 - nfsd: Add a sysctl to limit NFSv4.2 Copy RPC size List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b525301850f2e39389bdad45fc327b5f8708129d Auto-Submitted: auto-generated The branch stable/14 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=b525301850f2e39389bdad45fc327b5f8708129d commit b525301850f2e39389bdad45fc327b5f8708129d Author: Rick Macklem AuthorDate: 2024-03-16 01:04:37 +0000 Commit: Rick Macklem CommitDate: 2024-03-30 00:58:33 +0000 nfsd: Add a sysctl to limit NFSv4.2 Copy RPC size NFSv4.2 supports a Copy operation, which avoids file data being read to the client and then written back to the server, if both input and output files are on the same NFSv4.2 mount for copy_file_range(2). Unfortunately, this Copy operation can take a long time under certain circumstances. If this occurs concurrently with a RPC that requires an exclusive lock on the nfsd such as ExchangeID done for a new mount, the result can be an nfsd "stall" until the Copy completes. This patch adds a sysctl that can be set to limit the size of a Copy operation or, if set to 0, disable Copy operations. The use of this sysctl and other ways to avoid Copy operations taking too long will be documented in the nfsd.4 man page by a separate commit. (cherry picked from commit 748f56c53f4286e0b140c1b779ff8ade1cf4fec9) --- sys/fs/nfsserver/nfs_nfsdserv.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/sys/fs/nfsserver/nfs_nfsdserv.c b/sys/fs/nfsserver/nfs_nfsdserv.c index 3daee65ab83a..899e88508b60 100644 --- a/sys/fs/nfsserver/nfs_nfsdserv.c +++ b/sys/fs/nfsserver/nfs_nfsdserv.c @@ -97,6 +97,9 @@ static bool nfsrv_doallocate = false; SYSCTL_BOOL(_vfs_nfsd, OID_AUTO, enable_v42allocate, CTLFLAG_RW, &nfsrv_doallocate, 0, "Enable NFSv4.2 Allocate operation"); +static uint64_t nfsrv_maxcopyrange = SSIZE_MAX; +SYSCTL_U64(_vfs_nfsd, OID_AUTO, maxcopyrange, CTLFLAG_RW, + &nfsrv_maxcopyrange, 0, "Max size of a Copy so RPC times reasonable"); /* * This list defines the GSS mechanisms supported. @@ -5598,10 +5601,11 @@ nfsrvd_copy_file_range(struct nfsrv_descript *nd, __unused int isdgram, void *rl_rcookie, *rl_wcookie; rl_rcookie = rl_wcookie = NULL; - if (nfsrv_devidcnt > 0) { + if (nfsrv_maxcopyrange == 0 || nfsrv_devidcnt > 0) { /* * For a pNFS server, reply NFSERR_NOTSUPP so that the client * will do the copy via I/O on the DS(s). + * If vfs.nfsd.maxcopyrange set to 0, disable Copy. */ nd->nd_repstat = NFSERR_NOTSUPP; goto nfsmout; @@ -5764,7 +5768,15 @@ nfsrvd_copy_file_range(struct nfsrv_descript *nd, __unused int isdgram, nd->nd_repstat = error; } - xfer = len; + /* + * Do the actual copy to an upper limit of vfs.nfsd.maxcopyrange. + * This size limit can be set to limit the time a copy RPC will + * take. + */ + if (len > nfsrv_maxcopyrange) + xfer = nfsrv_maxcopyrange; + else + xfer = len; if (nd->nd_repstat == 0) { nd->nd_repstat = vn_copy_file_range(vp, &inoff, tovp, &outoff, &xfer, COPY_FILE_RANGE_TIMEO1SEC, nd->nd_cred, nd->nd_cred, From nobody Sat Mar 30 01:06:32 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V5zcn3vXsz5Fk7k; Sat, 30 Mar 2024 01:06:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4V5zcn0czPz4jtn; Sat, 30 Mar 2024 01:06:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711760793; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mJ1PJUWhedAtJUR/BHJz5aK4FtBJeaww9KAexA1bdzU=; b=gPi+9ycV8dpu/6seYmslkidOpPFUuOfiA4CNtSY4x6t3fMd27RCaZl6JFtMWpG1Oz67uTV F1TAOieXMNHen2pAiIF0JVDKMsf+Qxr2fsif2Jq/YOepUyYeLB2wJg0uyosOz4bktwGmKw xamM4NEPj77p4aNdsjYqSR/ANzOBL/wPMKaKAjMNo9LFuh5hzdXEkpW4WGEygUCUHjU9W8 hfeG0Q4uFmGX8d5f8F4uncsg4H2i49sgFAYWeOhTKxLIMPu6edTKvjtFaf7w/3zm8YhpYX xZk2S5thu8zC5S7tm4TEjqhx+HlPxa7FRG0Pa2EEry5LNTvXDcMxe2z6uwKLLw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711760793; a=rsa-sha256; cv=none; b=qka2BbRZst/ubLcNcw6qN3prYdS2xxVRr0swOhNPULFe/CefMeGA07bKHIAJ5Ji0SV9vmC 3bTKWY7afzeGtmrvrMvGbsHN4e+NtCfsFqc0OEJkEPZ/4GOJBmjnjqz6gM93wdjcbd7p1y CNUbZG0WbktqsKsWbJ72tHBI9YAnsbqilQP+0hnBu6qplF93T2BuKqHSxqg1F75Qi4t4Rm Ohp00RhnJuhoqQfNJBtybLcjmSTmuJHRQOLZf8/rHsC0SKQ3afYWPafv/XPS2FxJW+0kZk irMxq8LGi/FXFiAgdi7qk4Bk976DbzuwOdrldhXamlsI6PqrvZ5OcKFJm2GTmQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711760793; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mJ1PJUWhedAtJUR/BHJz5aK4FtBJeaww9KAexA1bdzU=; b=KUKyTiWjH3ceakAlr+51UQIA7DfjMz7TAi+ukTheCGDXiT3cLLJqDOEGbWUQsNfK/AGTUa D0tVHS6r5jf2VWG0lyYMan97p8KoquJ7c4cg1j11eh95HoOSM0aJARBn2NZe48FV8zUUh5 XPZiVqNYMJpihuTgp5T8CWaUMSwaXOuMca1gdVDAb2NJaQE7EwD6nfVmHjBlpuuJgL0gRY m2vwotCbj+026FI8ATKaicj/Q25ryZ1pxd8JQh56vpWHqpre7YLomZlUWt0t4QyLX/tFWh igkPVYHXlr/YeyAjLWjmjoaI84iAiKCMGzS6wsTGKznkY+N3R/zLb8GTQzxmcg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V5zcm74DHzYvw; Sat, 30 Mar 2024 01:06:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42U16WK3081201; Sat, 30 Mar 2024 01:06:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42U16Wiu081198; Sat, 30 Mar 2024 01:06:32 GMT (envelope-from git) Date: Sat, 30 Mar 2024 01:06:32 GMT Message-Id: <202403300106.42U16Wiu081198@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: d3db309653aa - stable/13 - nfsd: Add a sysctl to limit NFSv4.2 Copy RPC size List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d3db309653aa5eb263220296757fdf514efb55c2 Auto-Submitted: auto-generated The branch stable/13 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=d3db309653aa5eb263220296757fdf514efb55c2 commit d3db309653aa5eb263220296757fdf514efb55c2 Author: Rick Macklem AuthorDate: 2024-03-16 01:04:37 +0000 Commit: Rick Macklem CommitDate: 2024-03-30 01:05:31 +0000 nfsd: Add a sysctl to limit NFSv4.2 Copy RPC size NFSv4.2 supports a Copy operation, which avoids file data being read to the client and then written back to the server, if both input and output files are on the same NFSv4.2 mount for copy_file_range(2). Unfortunately, this Copy operation can take a long time under certain circumstances. If this occurs concurrently with a RPC that requires an exclusive lock on the nfsd such as ExchangeID done for a new mount, the result can be an nfsd "stall" until the Copy completes. This patch adds a sysctl that can be set to limit the size of a Copy operation or, if set to 0, disable Copy operations. The use of this sysctl and other ways to avoid Copy operations taking too long will be documented in the nfsd.4 man page by a separate commit. (cherry picked from commit 748f56c53f4286e0b140c1b779ff8ade1cf4fec9) --- sys/fs/nfsserver/nfs_nfsdserv.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/sys/fs/nfsserver/nfs_nfsdserv.c b/sys/fs/nfsserver/nfs_nfsdserv.c index 7020053be330..c1ba36347b4c 100644 --- a/sys/fs/nfsserver/nfs_nfsdserv.c +++ b/sys/fs/nfsserver/nfs_nfsdserv.c @@ -97,6 +97,9 @@ static bool nfsrv_doallocate = false; SYSCTL_BOOL(_vfs_nfsd, OID_AUTO, enable_v42allocate, CTLFLAG_RW, &nfsrv_doallocate, 0, "Enable NFSv4.2 Allocate operation"); +static uint64_t nfsrv_maxcopyrange = SSIZE_MAX; +SYSCTL_U64(_vfs_nfsd, OID_AUTO, maxcopyrange, CTLFLAG_RW, + &nfsrv_maxcopyrange, 0, "Max size of a Copy so RPC times reasonable"); /* * This list defines the GSS mechanisms supported. @@ -5475,10 +5478,11 @@ nfsrvd_copy_file_range(struct nfsrv_descript *nd, __unused int isdgram, void *rl_rcookie, *rl_wcookie; rl_rcookie = rl_wcookie = NULL; - if (nfsrv_devidcnt > 0) { + if (nfsrv_maxcopyrange == 0 || nfsrv_devidcnt > 0) { /* * For a pNFS server, reply NFSERR_NOTSUPP so that the client * will do the copy via I/O on the DS(s). + * If vfs.nfsd.maxcopyrange set to 0, disable Copy. */ nd->nd_repstat = NFSERR_NOTSUPP; goto nfsmout; @@ -5641,7 +5645,15 @@ nfsrvd_copy_file_range(struct nfsrv_descript *nd, __unused int isdgram, nd->nd_repstat = error; } - xfer = len; + /* + * Do the actual copy to an upper limit of vfs.nfsd.maxcopyrange. + * This size limit can be set to limit the time a copy RPC will + * take. + */ + if (len > nfsrv_maxcopyrange) + xfer = nfsrv_maxcopyrange; + else + xfer = len; if (nd->nd_repstat == 0) { nd->nd_repstat = vn_copy_file_range(vp, &inoff, tovp, &outoff, &xfer, COPY_FILE_RANGE_TIMEO1SEC, nd->nd_cred, nd->nd_cred, From nobody Sat Mar 30 08:32:14 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V69W267M4z5GXnq; Sat, 30 Mar 2024 08:32:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4V69W25F48z4Y7H; Sat, 30 Mar 2024 08:32:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711787534; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ocC/odLMQ7e2ibrnXVnZIdpGUjfq07kHd7B4j/onQsM=; b=QbyU5nyxxO2YZn3jxD8MNy7QItYcua7PFZdcVYmrAJKGDQ2c5QumiWGFoUJ/qLfGzBihwY aQnSTrch7h2N/J0qUx09L5g4fZwzV8D2pud5GKfes9Wc0BzIvVcf2K/+khz2SqQlwe4S8/ kfB+MWuDcULD35+QrzYMnTNAfDpj2nGSB4t+peJnX8xTJIuh86emetNUGn+ae9FIk7d0+M +Ja+eYuBDTOAFXTJwGDoJclAvEJvRZFcVaV4OKWU3WZ9A4Wg3x9Pn6U12RzM2FIcX83qPq 1Uezcv6rSHhODHMW9PYyVUxynD5jlH3+8kYxl89C1emtFZEe7D2cPJdlAxqF+Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711787534; a=rsa-sha256; cv=none; b=vz8Kkon9E6pUFQtFDHsdkjlts5Wv7laKBhWuF0t7025puK3rEaQc66hirBvqgWlvrQT300 XxOHerH2Z0meW0eNSEIEr4bOCGwvD7w5CnbbGsIVlFBNs0xojGTlF9I/P+PFA9s4DYhkJ+ DYpjLiXuwOxKiqW7EbXQp6h9XjeMbBlfFLXB6cLmmG7mKzgjZCjeHm1vtWJNo1ztR7Q8eu pN6MC1XKuS34R2ZHXTZeoQDcGMI99IImYEhtJgHsxDMRB3ySa6QGcQc3W4Eau0bWftLt5u pGo2/Qonnd3Iuy8P2eNYlGtpYRkvPeAwXp89ClArATOMtYUbznKhYTPdr4rA6A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711787534; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ocC/odLMQ7e2ibrnXVnZIdpGUjfq07kHd7B4j/onQsM=; b=TXNrPqCd2duFl2mtJcLor7JXcATCX1RsamEyQESDcHbhS37vOF3E+DGEmAp9GhG2AV16oL Hg892Ld6auR+9Hqdh6FoY0wt8A2+D+gEASWU9vS6JFnm9d7M2tzkBKaMu/NbfTrDEzBrjX gcbsMazIoeYNajIvjF7p3rw3R2erxb1wSCeT1zFsNc46+QemTU3MTdz/ZxwgEKq5Zgr3m5 k34ixTXZfEU9MGxb1FvERProJ4xNm8Lo9QNX/05twLUVOLfIpcAWjD1gBOWlJ0dk3hKf/H CdE90GkIC66Vso1dQblrecaBQVI8Dfe2QRKUimtbMnUCAES1YuNBfUhY9AtLlw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V69W24sYMzn4H; Sat, 30 Mar 2024 08:32:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42U8WESd039710; Sat, 30 Mar 2024 08:32:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42U8WEFv039707; Sat, 30 Mar 2024 08:32:14 GMT (envelope-from git) Date: Sat, 30 Mar 2024 08:32:14 GMT Message-Id: <202403300832.42U8WEFv039707@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: cde0347ca70b - stable/14 - cdevpriv(9): add iterator List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: cde0347ca70b1ffc49803a1fe6c38f8b83135ddc Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=cde0347ca70b1ffc49803a1fe6c38f8b83135ddc commit cde0347ca70b1ffc49803a1fe6c38f8b83135ddc Author: Konstantin Belousov AuthorDate: 2024-03-22 02:58:00 +0000 Commit: Konstantin Belousov CommitDate: 2024-03-30 08:31:13 +0000 cdevpriv(9): add iterator (cherry picked from commit d3efbe0132b24e8660df836905cda7662f85a154) --- sys/fs/devfs/devfs_vnops.c | 20 ++++++++++++++++++++ sys/sys/conf.h | 2 ++ 2 files changed, 22 insertions(+) diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c index b8cf8c12d32e..cda4afc8c241 100644 --- a/sys/fs/devfs/devfs_vnops.c +++ b/sys/fs/devfs/devfs_vnops.c @@ -179,6 +179,26 @@ devfs_set_cdevpriv(void *priv, d_priv_dtor_t *priv_dtr) return (error); } +int +devfs_foreach_cdevpriv(struct cdev *dev, int (*cb)(void *data, void *arg), + void *arg) +{ + struct cdev_priv *cdp; + struct cdev_privdata *p; + int error; + + cdp = cdev2priv(dev); + error = 0; + mtx_lock(&cdevpriv_mtx); + LIST_FOREACH(p, &cdp->cdp_fdpriv, cdpd_list) { + error = cb(p->cdpd_data, arg); + if (error != 0) + break; + } + mtx_unlock(&cdevpriv_mtx); + return (error); +} + void devfs_destroy_cdevpriv(struct cdev_privdata *p) { diff --git a/sys/sys/conf.h b/sys/sys/conf.h index f2dfaad5aa1b..a1c71080732f 100644 --- a/sys/sys/conf.h +++ b/sys/sys/conf.h @@ -321,6 +321,8 @@ typedef void d_priv_dtor_t(void *data); int devfs_get_cdevpriv(void **datap); int devfs_set_cdevpriv(void *priv, d_priv_dtor_t *dtr); void devfs_clear_cdevpriv(void); +int devfs_foreach_cdevpriv(struct cdev *dev, + int (*cb)(void *data, void *arg), void *arg); ino_t devfs_alloc_cdp_inode(void); void devfs_free_cdp_inode(ino_t ino); From nobody Sat Mar 30 08:32:15 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V69W41Ywkz5GXQw; Sat, 30 Mar 2024 08:32: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 4V69W36p4Xz4YLx; Sat, 30 Mar 2024 08:32:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711787536; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LTsqDmnnrwXn7EvnzNWuBAfhTNIer35ZdzlAINPkMWM=; b=ev5Jty+AlTR//qN6ue7XxrynPrb1HFTcYJszbYmJltN+UsisLC1aICA77DrK3j7LE/GXEn qw2WKATCN+aDd1DXxT1gTwKY6LZSu7b7VoRuf3tVdTWb5xYiH2zGnKWaN7l4j0kDJvfvGu 91GGaka/fyciVb4ZjBgx+zbBgfp0enkHvQm6j9Ub7eI3zIAn9nwwCi+3oZYActJY0w/uXr muC6xfzlqtHjRmfMVSLo8B1/Xyd4mi1zzNwsk8T5tJ4Ek1Bbvfjx49sAOQZW0Fl+rSxnzL 7GM7hKv+DxrzUuK3e4sgFTXYV35YQI4uv25HRSsU1pR8RIQv3XoeSqhsWDcKpw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711787536; a=rsa-sha256; cv=none; b=BNJUn9UBUQBhLLlHslKWhEZlQXeIMdU1imTVflvd0z3v1Ot8kIYoC1+MZC1FtlrrCnVb2L BYvHjIFi0EYxsv37WIHUYPUBMOZAG1pNFX+JAlozc8Ecpko1Qpki5nqwPeYGyIQp6v6xxi bMPF4GEIN6rSgmIGRWWMGjhPG+MwvoBdA6ytZ9ePXrZHxBV2PottdZyzoPWyP/3zxAklbL bkg664np3GTR4rYFIbYBP2LMJtzzu7pbxlv6gYgEKSl+RBfSSyO6+RywcCskn/uyyTYCGh sqmGMWWRhZCmfkaUhSYWjM0rC3vbJbHCTUK6VUbs/MdJhekWuXbXEn2E0S5WDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711787536; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LTsqDmnnrwXn7EvnzNWuBAfhTNIer35ZdzlAINPkMWM=; b=wqwuV7dUaegHqGwjFeNuOVPu/aItn65gNxC2FBs6A0qHLxFDjJpq2jMsLWFZTJgo2Om5nH 5iU3iANCmwsgxff3LpItuROKkTkmjYCmg8dJ5VFSi25AnAwHtkI7TF6//enX9gVMBTzUBI WGhqTGzhOooUPFicpSUkk8/d1NwMJnMf+e1LIp3AkXATSXw92HJy2/leb4C1+T+tn8V93M IY+vgQOEH53zlZFnT8dIuWlk5o6+NBrP7cQ1618oz5J7Ju6X+y2A1uResWz1HEWazH4u1B DBRUOPcUH7BVv2euQAzeGBfjSzOrvY6WEKQKtvBO5S/QwcfrYrbWxYIsZnyWpg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V69W3672jznFQ; Sat, 30 Mar 2024 08:32:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42U8WFi2039748; Sat, 30 Mar 2024 08:32:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42U8WFdZ039745; Sat, 30 Mar 2024 08:32:15 GMT (envelope-from git) Date: Sat, 30 Mar 2024 08:32:15 GMT Message-Id: <202403300832.42U8WFdZ039745@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 36d16f5c5b50 - stable/14 - cdevpriv(9): document devfs_foreach_cdevpriv() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 36d16f5c5b5018bbd5060f679ce120453a6a6567 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=36d16f5c5b5018bbd5060f679ce120453a6a6567 commit 36d16f5c5b5018bbd5060f679ce120453a6a6567 Author: Konstantin Belousov AuthorDate: 2024-03-23 06:48:57 +0000 Commit: Konstantin Belousov CommitDate: 2024-03-30 08:31:13 +0000 cdevpriv(9): document devfs_foreach_cdevpriv() (cherry picked from commit 88f2c58d1a857f0ccedd49da3dc29d8d193b4fdd) --- share/man/man9/Makefile | 3 ++- share/man/man9/devfs_set_cdevpriv.9 | 41 +++++++++++++++++++++++++++++++++++-- 2 files changed, 41 insertions(+), 3 deletions(-) diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 505298899561..8effacbc0cee 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -996,7 +996,8 @@ MLINKS+=dev_clone.9 drain_dev_clone_events.9 MLINKS+=dev_refthread.9 devvn_refthread.9 \ dev_refthread.9 dev_relthread.9 MLINKS+=devfs_set_cdevpriv.9 devfs_clear_cdevpriv.9 \ - devfs_set_cdevpriv.9 devfs_get_cdevpriv.9 + devfs_set_cdevpriv.9 devfs_get_cdevpriv.9 \ + devfs_set_cdevpriv.9 devfs_foreach_cdevpriv.9 MLINKS+=device_add_child.9 device_add_child_ordered.9 MLINKS+=device_enable.9 device_disable.9 \ device_enable.9 device_is_enabled.9 diff --git a/share/man/man9/devfs_set_cdevpriv.9 b/share/man/man9/devfs_set_cdevpriv.9 index 945d31a58d0a..3258ca082e5f 100644 --- a/share/man/man9/devfs_set_cdevpriv.9 +++ b/share/man/man9/devfs_set_cdevpriv.9 @@ -22,13 +22,14 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 2, 2015 +.Dd March 23, 2024 .Dt DEVFS_CDEVPRIV 9 .Os .Sh NAME .Nm devfs_set_cdevpriv , .Nm devfs_get_cdevpriv , -.Nm devfs_clear_cdevpriv +.Nm devfs_clear_cdevpriv , +.Nm devfs_foreach_cdevpriv .Nd manage per-open filedescriptor data for devices .Sh SYNOPSIS .In sys/param.h @@ -42,6 +43,12 @@ typedef void d_priv_dtor_t(void *data); .Fn devfs_set_cdevpriv "void *priv" "d_priv_dtor_t *dtr" .Ft void .Fn devfs_clear_cdevpriv "void" +.Ft int +.Fo devfs_foreach_cdevpriv +.Fa "struct cdev *dev" +.Fa "int (*cb)(void *data, void *arg)" +.Fa "void *arg" +.Fc .Sh DESCRIPTION The .Fn devfs_xxx_cdevpriv @@ -111,6 +118,36 @@ filedescriptor, or .Fn devfs_clear_cdevpriv was called. .El +.Pp +The function +.Fn devfs_foreach_cdevpriv +sequentially calls the function +.Fa cb +for each +.Nm cdevpriv +structure, currently associated with the +.Fa cdev +device. +The iterated +.Nm cdevpriv +data pointer and the user-supplied context +.Fa arg +are passed to the function +.Fa cb . +If +.Fa cb +returns non-zero value, the iteration stops on that element. +The +.Fn devfs_foreach_cdevpriv +returns the return value from the last call to +.Fa cb , +or zero if no +.Nm cdevpriv +data is currently associated with the device. +.Pp +Current implementation of the iterator makes it impossible to use +any blockable locking inside the callback +.Fa cb . .Sh SEE ALSO .Xr close 2 , .Xr open 2 , From nobody Sat Mar 30 08:32:52 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V69Wm5BFDz5GXQx; Sat, 30 Mar 2024 08:32:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4V69Wm2y6rz4YM5; Sat, 30 Mar 2024 08:32:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711787572; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gmr9pTKloi17+T1FucZx33bhKgXdTX+aU//6qLP+yaI=; b=GrGlv/Y3MskQr+CfoX9oRMl9CzdSL+RnNZe/d/me/Dx2SymcjKZgq2gaZU+p8aOFF7jXCv u4K4LxrjMneMOdgN5XCeTAbNRuKm4Mt/FTrDnVqvjD/hdYNdFiRmcdunOdyGgyH91g8AEt 5XXBfZCYoU1zTrw1SCcd5u0R57WbNrKqvh6ZDytnNNnq39c7MPAu2+xqwYqYEZp/+8Io6x rQbIufGv9pSda7BZaFA3FlexfUsqv4wbPWX8NynFSM0HUbyu4/bu5vnKr4ytmMV8H8kSyh zEofrCUD4EY2UaT8JqjUBhtCuQE9beU1WOsKRvtOC+BojUeLbcA3h8qpy+6ngQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711787572; a=rsa-sha256; cv=none; b=as/tOJ7KhWlrlJ5fS183AV7JkyBWamRr6DvZ4CdQhLld+PLhnQR9d58LCR5J8RKpQhKjR8 rmLI3dZCNe8lnJ7gkkX4837+8+3feq058RbSMUPHr3WXmrkx/Bn4TJMd+wsuc8auWxXVXS We/s54bInix6yPGLDKh64jaMBcI9U+snjZrU8J2kzJLWrHl2MsxRBjSFiyya1vwZD/sqsS jrpxG0iObOW+1fGeh9vL6Rh3L9sviDVarecYNvJsTyDfrhMsEW8oOcD4J54kCQ1oK0i+c7 HOkXwfyMnvTIML2w79XTH3zvXFnrkSM5jnRDgwqytoZju0mEhOTBXJ8ekExN5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711787572; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gmr9pTKloi17+T1FucZx33bhKgXdTX+aU//6qLP+yaI=; b=Gg2ZK9vyiqV6i78CtwAo4wOrZj64JhKV5UEcm2TsyQL2FNxZbXjIQ+Ag6ySAtbosbys6AR PLNhOXfosVcADd4BCBCkN7MJQnYfHX7CLRUGEzgTezXm6oQbyk0BXmhqbIthsKS609JWn5 7EfX/jUOKCIzPIwXUQhMelsFyYgORMEgB6Yia1LjoXKENwLIt/s6aFLlvZ8oSe7tvRWeYV oCcKJRUOfjREk8FNgVSUh7DHkdzk8BbfCvXt0SSLeFO5KMocnyS22bPMLL2d/WFSD32GNx rQLRmS0nmL259iC9UaXE3qE8FK7iYw43zELtW7g12XXDjOrOWg7C1DBzKV3hjA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V69Wm2YC1znSF; Sat, 30 Mar 2024 08:32:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42U8Wqpj040877; Sat, 30 Mar 2024 08:32:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42U8Wqfw040874; Sat, 30 Mar 2024 08:32:52 GMT (envelope-from git) Date: Sat, 30 Mar 2024 08:32:52 GMT Message-Id: <202403300832.42U8Wqfw040874@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 8d9ed1dd5088 - stable/13 - cdevpriv(9): add iterator List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8d9ed1dd5088901a0000c30b6a5ee6a38beb491d Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=8d9ed1dd5088901a0000c30b6a5ee6a38beb491d commit 8d9ed1dd5088901a0000c30b6a5ee6a38beb491d Author: Konstantin Belousov AuthorDate: 2024-03-22 02:58:00 +0000 Commit: Konstantin Belousov CommitDate: 2024-03-30 08:32:23 +0000 cdevpriv(9): add iterator (cherry picked from commit d3efbe0132b24e8660df836905cda7662f85a154) --- sys/fs/devfs/devfs_vnops.c | 20 ++++++++++++++++++++ sys/sys/conf.h | 2 ++ 2 files changed, 22 insertions(+) diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c index 45c72438f752..919ab2ff4381 100644 --- a/sys/fs/devfs/devfs_vnops.c +++ b/sys/fs/devfs/devfs_vnops.c @@ -182,6 +182,26 @@ devfs_set_cdevpriv(void *priv, d_priv_dtor_t *priv_dtr) return (error); } +int +devfs_foreach_cdevpriv(struct cdev *dev, int (*cb)(void *data, void *arg), + void *arg) +{ + struct cdev_priv *cdp; + struct cdev_privdata *p; + int error; + + cdp = cdev2priv(dev); + error = 0; + mtx_lock(&cdevpriv_mtx); + LIST_FOREACH(p, &cdp->cdp_fdpriv, cdpd_list) { + error = cb(p->cdpd_data, arg); + if (error != 0) + break; + } + mtx_unlock(&cdevpriv_mtx); + return (error); +} + void devfs_destroy_cdevpriv(struct cdev_privdata *p) { diff --git a/sys/sys/conf.h b/sys/sys/conf.h index ac2af96e5ad1..ab61171ab24e 100644 --- a/sys/sys/conf.h +++ b/sys/sys/conf.h @@ -322,6 +322,8 @@ typedef void d_priv_dtor_t(void *data); int devfs_get_cdevpriv(void **datap); int devfs_set_cdevpriv(void *priv, d_priv_dtor_t *dtr); void devfs_clear_cdevpriv(void); +int devfs_foreach_cdevpriv(struct cdev *dev, + int (*cb)(void *data, void *arg), void *arg); ino_t devfs_alloc_cdp_inode(void); void devfs_free_cdp_inode(ino_t ino); From nobody Sat Mar 30 08:32:53 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V69Wp01GHz5GXLT; Sat, 30 Mar 2024 08:32:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4V69Wn5J5yz4YGs; Sat, 30 Mar 2024 08:32:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711787573; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jEOVjXFx28w5OcfwiLRBWm7j2bXRfP83LsXl6gy4egk=; b=Z+sh5deWm4t5Reea2s1oA+/4ZuF+GHY5CzNfz44UtOnGCTQi8VAwGX/tk2s7xr/J3x+5se dPjrM25+lpB5ht2f/iBPCneWcj6L/X+S2xnCl37USSAiqhS5/9HUAxVNT7gJlz/DBB0uoe frhdKzTRoyres8rKnkBCNfdlFhhnamXPEQRrCOoOqd+N/LXsiKGiuiU2hacKLSEB/K+8rl nhePD4b6kJW75f94mZfUwX6baP8+0NTjH/nHzalqEAQpJxcf9qqA0J40i6WQ7xZRfMhhzz t8ZAeUjGUvApKwpiZR1vv4SIW/WEsjs7ICCyffaBl+O1CBAyopv2EWCQ7WwXmQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711787573; a=rsa-sha256; cv=none; b=hIu2ctMic18A+LtbRtlMtiQeso3ncwayitlp6RxDKXMI1wDeX112mwU+YVw0SNwe1pyJ5S gSIxPIAdfY+Noq/sGDfu0HZMpDTms5hi7tuaE1JihlKGyELSKrQOrbdSdPrn9WArHOFngq p7bKxfg7Rrc5kIdWdnNBwUTKyQ8ynbyIFAkZUvC34pgEap559YqVt1VY1fI8vYi5O6KQtj cxAD4y50zScyX8hU67mMcllx1iGzvAYruac+HH8W+O9nkQDrZWIvEgR2QB5tJ52wbkYKw1 FhCW1xOcDFr2nIXkLnMQadzfggXXLSSaPHkwQaGNsGB/VKl37GxrRR8EbmybHQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711787573; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jEOVjXFx28w5OcfwiLRBWm7j2bXRfP83LsXl6gy4egk=; b=Nfhqilpn9AYzR50WxN8NDJW6duPGLe6Gil396lO8dkoJfRTDXE8G/+FUJ8rixEhvL/I+i8 dxWrbuGoPn4I0Mw3BpNLxxK2yyZJdRGNjXralzcpfBaVuBfx9JI59zJ8IIS3KSx0i0DWoW xPjm/H8vJGvs+mXZESx4rlcRZAJ3badV5/TTUH4fKRKkHqRbmMkc7dEwa8IkpCGlHySKxf dZLVCUiTvrS1sXnm97nMtMpz/KFuHC26hp7qPzxi+KIBEGtrSHWQs5DwpBTkWyKHkrszgu ExpYpHH4tI7lmVnhlnODNtwvsNpjWXaVXr6kKuS97tLLmYTFeDbyBndNtkrARg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V69Wn34lVzn5t; Sat, 30 Mar 2024 08:32:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42U8WrYr040920; Sat, 30 Mar 2024 08:32:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42U8WrlQ040917; Sat, 30 Mar 2024 08:32:53 GMT (envelope-from git) Date: Sat, 30 Mar 2024 08:32:53 GMT Message-Id: <202403300832.42U8WrlQ040917@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: f13afa7f5478 - stable/13 - cdevpriv(9): document devfs_foreach_cdevpriv() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f13afa7f547884ad0777527b4156eb0df574fe50 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=f13afa7f547884ad0777527b4156eb0df574fe50 commit f13afa7f547884ad0777527b4156eb0df574fe50 Author: Konstantin Belousov AuthorDate: 2024-03-23 06:48:57 +0000 Commit: Konstantin Belousov CommitDate: 2024-03-30 08:32:23 +0000 cdevpriv(9): document devfs_foreach_cdevpriv() (cherry picked from commit 88f2c58d1a857f0ccedd49da3dc29d8d193b4fdd) --- share/man/man9/Makefile | 3 ++- share/man/man9/devfs_set_cdevpriv.9 | 41 +++++++++++++++++++++++++++++++++++-- 2 files changed, 41 insertions(+), 3 deletions(-) diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 30712ab4f987..ca17497fc490 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -992,7 +992,8 @@ MLINKS+=dev_clone.9 drain_dev_clone_events.9 MLINKS+=dev_refthread.9 devvn_refthread.9 \ dev_refthread.9 dev_relthread.9 MLINKS+=devfs_set_cdevpriv.9 devfs_clear_cdevpriv.9 \ - devfs_set_cdevpriv.9 devfs_get_cdevpriv.9 + devfs_set_cdevpriv.9 devfs_get_cdevpriv.9 \ + devfs_set_cdevpriv.9 devfs_foreach_cdevpriv.9 MLINKS+=device_add_child.9 device_add_child_ordered.9 MLINKS+=device_enable.9 device_disable.9 \ device_enable.9 device_is_enabled.9 diff --git a/share/man/man9/devfs_set_cdevpriv.9 b/share/man/man9/devfs_set_cdevpriv.9 index 945d31a58d0a..3258ca082e5f 100644 --- a/share/man/man9/devfs_set_cdevpriv.9 +++ b/share/man/man9/devfs_set_cdevpriv.9 @@ -22,13 +22,14 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 2, 2015 +.Dd March 23, 2024 .Dt DEVFS_CDEVPRIV 9 .Os .Sh NAME .Nm devfs_set_cdevpriv , .Nm devfs_get_cdevpriv , -.Nm devfs_clear_cdevpriv +.Nm devfs_clear_cdevpriv , +.Nm devfs_foreach_cdevpriv .Nd manage per-open filedescriptor data for devices .Sh SYNOPSIS .In sys/param.h @@ -42,6 +43,12 @@ typedef void d_priv_dtor_t(void *data); .Fn devfs_set_cdevpriv "void *priv" "d_priv_dtor_t *dtr" .Ft void .Fn devfs_clear_cdevpriv "void" +.Ft int +.Fo devfs_foreach_cdevpriv +.Fa "struct cdev *dev" +.Fa "int (*cb)(void *data, void *arg)" +.Fa "void *arg" +.Fc .Sh DESCRIPTION The .Fn devfs_xxx_cdevpriv @@ -111,6 +118,36 @@ filedescriptor, or .Fn devfs_clear_cdevpriv was called. .El +.Pp +The function +.Fn devfs_foreach_cdevpriv +sequentially calls the function +.Fa cb +for each +.Nm cdevpriv +structure, currently associated with the +.Fa cdev +device. +The iterated +.Nm cdevpriv +data pointer and the user-supplied context +.Fa arg +are passed to the function +.Fa cb . +If +.Fa cb +returns non-zero value, the iteration stops on that element. +The +.Fn devfs_foreach_cdevpriv +returns the return value from the last call to +.Fa cb , +or zero if no +.Nm cdevpriv +data is currently associated with the device. +.Pp +Current implementation of the iterator makes it impossible to use +any blockable locking inside the callback +.Fa cb . .Sh SEE ALSO .Xr close 2 , .Xr open 2 , From nobody Sat Mar 30 21:01:07 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V6V775MDTz5G0rj; Sat, 30 Mar 2024 21:01:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4V6V774sFKz4pd6; Sat, 30 Mar 2024 21:01:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711832467; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ort38J/UuIBVmN2nJhWFbWujAjjcPUh84Uw2PkTYXpM=; b=ex5R48zWToCtwx2CgC0LYk5RclKtIUmhVdMW+YKp5uMQd+frqDOFGe+BbEZKhvcOSK5oGt BA03UdpBID0F5hyAeLi0dhUZI6m/aboYAQ2JVdZLiGk1YcVauhrbAGn5ck8+bRqkXq4epe EygOKVs1CCzGqu8XOjxpwOOTeEeL9a2JYGat+bXkKWN5yR0w/PDTGhpVfaVzaLeNcwgThZ gACkrau5PZ4VqznSEYPbBX+epEGdPW3KYc8YzwY0k88dRL+CdCZ2IDeLvxuso2K2rjRZjs TFW5Z1RkKj7usBuXItXMmG3uvExWNw+5K/2W1d5pxx2qMJVAIS7ku6SYqGIgBQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711832467; a=rsa-sha256; cv=none; b=Hb5IrXJQ59y7Rv/Y9GDaX8ODjbbIAoLqyYc6MZP1UIW1bn4ab6ThsIa4/crNyEoQDdio8Z ymIjyD6PofmoYgKMMPaccFtDaMzSb+/Wxy16Kbjk6q41pqUnemwUyGbV8yr6zWwPC+le3h 0d2fVGQfQkcCUkgZU+jijEJ9MlMt7bRxhXu7LqOq2YeGKGflhgUM8aH92VUpprCbPxCLOe 8eRFZp7vnUgEpbS0Wwr1LdVpdviKpYgn3Ud1oYkDjgTL1wFC+O3y+Jzv/l0UghHyW73Afm kOyTn+QJAScKncu/K1rxc0b8RyXalRxZz3N8qAgKZzlfZHrsYyBEJqmUH/6rag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711832467; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ort38J/UuIBVmN2nJhWFbWujAjjcPUh84Uw2PkTYXpM=; b=IT7baLcPENNEe7qFRaqxP2uzbKP4q8WnsQtoPzu5bSQ3+yc8sY/jxID+9AZXeAoSslv/wO WzrFTncoA4USeCaX04Ji1klxh8ZAddJ13lZniU63uM//mquO1aPrft8rk8ntsO3AKyMItC cSxAHZhttnNbJLdUbVNedvN9C/ppDBmm57QA+sbJs8NqAdDeIpqv/g3UbQAdm0fTcfY+50 5RC6OMtQnID2aV1OqLQ8Dd7QyCmCEOs1LoiVoEsSZ9U90MGY/C9O3XcUFZ/RSkA8iD4cEf NZzOi6m8muqk7zWFEWfI0cDf0D3iugynpq1B59FlIw4/VwkJbpnlzj/OTdGhDQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V6V7748n1z18YD; Sat, 30 Mar 2024 21:01:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42UL17k5007312; Sat, 30 Mar 2024 21:01:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42UL17jd007309; Sat, 30 Mar 2024 21:01:07 GMT (envelope-from git) Date: Sat, 30 Mar 2024 21:01:07 GMT Message-Id: <202403302101.42UL17jd007309@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: 322412b83bef - stable/13 - vfs_vnops.c: Use va_bytes >= va_size hint to avoid SEEK_DATA/SEEKHOLE List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 322412b83bef927afb6c807636a37a95d415422e Auto-Submitted: auto-generated The branch stable/13 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=322412b83bef927afb6c807636a37a95d415422e commit 322412b83bef927afb6c807636a37a95d415422e Author: Rick Macklem AuthorDate: 2024-03-15 00:35:32 +0000 Commit: Rick Macklem CommitDate: 2024-03-30 20:56:17 +0000 vfs_vnops.c: Use va_bytes >= va_size hint to avoid SEEK_DATA/SEEKHOLE vn_generic_copy_file_range() tries to maintain holes in file ranges being copied, using SEEK_DATA/SEEK_HOLE where possible. Unfortunately SEEK_DATA/SEEK_HOLE operations can take a long time under certain circumstances. Although it is not currently possible to know if a file has unallocated data regions, the case where va_bytes >= va_size is a strong hint that there are no unallocated data regions. This hint does not work well for file systems doing compression, but since it is only a hint, it is still useful. For the case of va_bytes >= va_size, avoid doing SEEK_DATA/SEEK_HOLE. (cherry picked from commit 89f1dcb3eb468e4cbaebd1ccde9a643d85f1282e) --- sys/kern/vfs_vnops.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index e095fb9df13b..6591b543ddea 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -3296,7 +3296,7 @@ vn_generic_copy_file_range(struct vnode *invp, off_t *inoffp, off_t startoff, endoff, xfer, xfer2; u_long blksize; int error, interrupted; - bool cantseek, readzeros, eof, lastblock, holetoeof; + bool cantseek, readzeros, eof, lastblock, holetoeof, sparse; ssize_t aresid, r = 0; size_t copylen, len, savlen; char *dat; @@ -3315,10 +3315,25 @@ vn_generic_copy_file_range(struct vnode *invp, off_t *inoffp, if (VOP_PATHCONF(invp, _PC_MIN_HOLE_SIZE, &holein) != 0) holein = 0; error = VOP_GETATTR(invp, &inva, incred); + if (error == 0 && inva.va_size > OFF_MAX) + error = EFBIG; VOP_UNLOCK(invp); if (error != 0) goto out; + /* + * Use va_bytes >= va_size as a hint that the file does not have + * sufficient holes to justify the overhead of doing FIOSEEKHOLE. + * This hint does not work well for file systems doing compression + * and may fail when allocations for extended attributes increases + * the value of va_bytes to >= va_size. + */ + sparse = true; + if (holein != 0 && inva.va_bytes >= inva.va_size) { + holein = 0; + sparse = false; + } + mp = NULL; error = vn_start_write(outvp, &mp, V_WAIT); if (error == 0) @@ -3372,7 +3387,7 @@ vn_generic_copy_file_range(struct vnode *invp, off_t *inoffp, if (error != 0) goto out; - if (holein == 0 && holeout > 0) { + if (sparse && holein == 0 && holeout > 0) { /* * For this special case, the input data will be scanned * for blocks of all 0 bytes. For these blocks, the @@ -3506,6 +3521,8 @@ vn_generic_copy_file_range(struct vnode *invp, off_t *inoffp, cantseek = false; } else { cantseek = true; + if (!sparse) + cantseek = false; startoff = *inoffp; copylen = len; error = 0; From nobody Sun Mar 31 15:55:17 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V6zHn3yntz5Fpwh; Sun, 31 Mar 2024 15:55: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 4V6zHn3D8kz4nZG; Sun, 31 Mar 2024 15:55:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711900517; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=krpDb8hTRajxmV4P3C49zY2gGYtuO9jT618RmvcoURA=; b=WYyHT+pusHXoCHbnqFfB4R68L/ujWTyv4xhCU5rJDPb/BnMEouwnCznCbbjdcHcK9PUtNw Gow9+3KAu8RSMbN9CecB6xY/8U2Ez/u7Ja/B75Vya3EbELak8YQtDQN/p0YihXMBMcB/fC u50C+HS8+Xv5YnM7eIGlWGGkP6PJPGsrOVBK7kvFd5kgykNXohK2xnB27DVvThqqs9D2/u zazC/Or5/NSkJfSAowZ1MBQX0wDzrtkfeORWHfEQ7TgMPWMzhxBZb0Q6ONc02NqyjKng8E WPRElMb2gAqJyCjmI6puiPPzZpRuWugBZ3YPOXeIp6ooZWAZ2NlyLmYPs6sywg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711900517; a=rsa-sha256; cv=none; b=jx25Obr8d5wzYELdCYHj2jUS7dUouZ7MU/UrJqXtSr79tvdB1zHynq3IJdXAwi8hBZDJNx mdQjdDmeE2FGXdNVHq5ZRWCmLnCPlBPpUbPDaSVNFCjMu/F3CPtKUwA3eGDE+BLLEHfL38 o7IQLv6wItlhF9P5QXR1dZR6BvxsRvPZCSFuOqMyxmkUM8QEhXADMon1svNtWJ1XDRc5w7 D6uClFTbIWC7+IsKlpbtvuyNduL0mv7/qu54MJX+IlFEL7t2NeAyWqQVD0EGpyO77twMcB bIivEljayYhDJ8BD3bVm2+DxfaY0Ths2rb0ORpF78U8nwCxBBkYxXJvR6bhTiA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711900517; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=krpDb8hTRajxmV4P3C49zY2gGYtuO9jT618RmvcoURA=; b=pPoe2I1wsT/6Eu2clwL4W69/hx1LSO2GhvVTgknBTM6HV29kSvko8JBpeRMsazGi7pGLrQ 0rJs2iHDPZLX8GNDilkF8mUJ5EIqqsjXaVnq6IgzVbZRXemyUSuGrY1Pio+i6uqXrh8kd0 ehJ2h8rd7SEFVKVrHYLG/S7RcefQcU07/wys4rwsN5Vi5DeRP0FQl6iwAWCBxXlhTnUEp9 jLNAXEk8iuc15JrUFLkzreCoZnFGvnTdTMAOaqdAH5rosA/i5Tkx8+0iDWSc1LkuzsQf9p rVrMqPgbr/7HMoh8sHlURO8/ASe7er/cGTC5eI6vnvu5xRN9zhiXjOCO/hO8QA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V6zHn2qkpzl0b; Sun, 31 Mar 2024 15:55:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42VFtHdA037001; Sun, 31 Mar 2024 15:55:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42VFtHHc036998; Sun, 31 Mar 2024 15:55:17 GMT (envelope-from git) Date: Sun, 31 Mar 2024 15:55:17 GMT Message-Id: <202403311555.42VFtHHc036998@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: ddd779a062c1 - stable/14 - acpi_hpet: Make use of enum for vm_guest to improve readability List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ddd779a062c1de28a3f632ece9fe4d1abf07dbdb Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=ddd779a062c1de28a3f632ece9fe4d1abf07dbdb commit ddd779a062c1de28a3f632ece9fe4d1abf07dbdb Author: Zhenlei Huang AuthorDate: 2024-03-24 15:31:22 +0000 Commit: Zhenlei Huang CommitDate: 2024-03-31 15:54:48 +0000 acpi_hpet: Make use of enum for vm_guest to improve readability No functional change intended. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D44402 (cherry picked from commit 579cb41b132f532bf4915121c0d0b2f43688242e) --- sys/dev/acpica/acpi_hpet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/acpica/acpi_hpet.c b/sys/dev/acpica/acpi_hpet.c index de75e70a2d49..9a1abe6ca72d 100644 --- a/sys/dev/acpica/acpi_hpet.c +++ b/sys/dev/acpica/acpi_hpet.c @@ -643,7 +643,7 @@ hpet_attach(device_t dev) * The only way to use HPET there is to specify IRQs manually * and/or use legacy_route. Legacy_route mode works on both. */ - if (vm_guest) + if (vm_guest != VM_GUEST_NO) sc->allowed_irqs = 0x00000000; /* Let user override. */ resource_int_value(device_get_name(dev), device_get_unit(dev), From nobody Sun Mar 31 15:56:16 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V6zJw2MKyz5FqXw; Sun, 31 Mar 2024 15:56: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 4V6zJw1ZVNz4p6D; Sun, 31 Mar 2024 15:56:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711900576; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oCfL4DGV2kCbiumwQRmxgX7JrYAEsVFsFuM6Rc/DpBw=; b=XMiRGUUWLio3bqWhb8R3uxK/qU8TQJzauHtwQhjIOImUyczbgi1QnqLvRrvORpmj7sxtmo b7zNRy3FxpvkaVVJ3M43qqomCEN3he7PArwNivQs5bKYiHRTDbteC0g2d2HsM7hj2Zdqgw uQW+NhtaIG2uRpR5hwL1Z/Ar0Dcw1VfvFRVz7wfjTpTBxh2ovF1FlrwjKwTQsGFnR2Nb6A cImxe4/fCkNuu+OtDbtgljxy3JO5/h3cSF50S73HgOQFRWTwJbV62KfYGt21VH2wMMQjvW hlFYbJAdzoDDTHaQkCRkhFJ8bQQGBpsfMa2JNBKjr3XDiM5Jumg2USxlwxyWKg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711900576; a=rsa-sha256; cv=none; b=W98cUXCv/NrcaaTSeNponFfp8iHtcdsaNZjQ2Q0t5IcDUIxKcWRywIZj6fsRjxEiJ6NfOj veOCCAXKg2o/XzeZJTCI3X4RVuY7gdfGBJpxmIt/E11+5IR85DPFWKjwQdOQmVF/jHFTaV fhzC1ReUQNhU8LgyQKyJFslcm9N90sGPRJ5ftsfnUOPKEUGBPuarkYwF1zGzCQhQ9zT05F +TnSWShfGlVZKpLANBRkfFWxhGYW9lRqAiFsgx6jUIPkY8JpVfFhQyPdiNrNypSQysRe2I K5ELRaV0FZQngNjjkVu0iWUMIJPYHydE7k38Elg6NXXd/pX2+9lOl5KkrDLNhQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711900576; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oCfL4DGV2kCbiumwQRmxgX7JrYAEsVFsFuM6Rc/DpBw=; b=sK8K70HWsjT84TDf3uGwNfm7dVLAbYa3bh9dsjRsBeIaKHLsRZH58qUXmYNIfm6gijS+9a HrDNLGrUffXcDW88s+gBhGfYqMCejalNpjpXVE7XqQScPAxV/a5PzvvZuffIyczX3SyeEq Bm60oXEUWpuRX+Ly4H8hU7t4SqhGKAmgzUfGaZcVY2CY5Tg1DFSILY+YTB+U2G0U4LxC1K FpzBAtaK6GpT4+oT11+ZojBYfsx7kp9xTMwYsNLs3+Zl/NV7QLFrts9hkNyysZMJ1R1Hlb Gs12SqEoK51zzWyWLJ/X7JH8D6lBZvy/YwjECraJjNTrQTsVyXJ53x3sgeLoYg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V6zJw1BSpzkmh; Sun, 31 Mar 2024 15:56:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42VFuGtc037272; Sun, 31 Mar 2024 15:56:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42VFuGgb037269; Sun, 31 Mar 2024 15:56:16 GMT (envelope-from git) Date: Sun, 31 Mar 2024 15:56:16 GMT Message-Id: <202403311556.42VFuGgb037269@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: f3b21c553681 - stable/13 - acpi_hpet: Make use of enum for vm_guest to improve readability List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f3b21c5536816eae4d8ecbbddd790419753d403a Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=f3b21c5536816eae4d8ecbbddd790419753d403a commit f3b21c5536816eae4d8ecbbddd790419753d403a Author: Zhenlei Huang AuthorDate: 2024-03-24 15:31:22 +0000 Commit: Zhenlei Huang CommitDate: 2024-03-31 15:55:49 +0000 acpi_hpet: Make use of enum for vm_guest to improve readability No functional change intended. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D44402 (cherry picked from commit 579cb41b132f532bf4915121c0d0b2f43688242e) (cherry picked from commit ddd779a062c1de28a3f632ece9fe4d1abf07dbdb) --- sys/dev/acpica/acpi_hpet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/acpica/acpi_hpet.c b/sys/dev/acpica/acpi_hpet.c index a32edb9c7e7a..d30bc99047a9 100644 --- a/sys/dev/acpica/acpi_hpet.c +++ b/sys/dev/acpica/acpi_hpet.c @@ -645,7 +645,7 @@ hpet_attach(device_t dev) * The only way to use HPET there is to specify IRQs manually * and/or use legacy_route. Legacy_route mode works on both. */ - if (vm_guest) + if (vm_guest != VM_GUEST_NO) sc->allowed_irqs = 0x00000000; /* Let user override. */ resource_int_value(device_get_name(dev), device_get_unit(dev), From nobody Sun Mar 31 16:56:03 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V70dv6bvnz5FxPw; Sun, 31 Mar 2024 16:56: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 4V70dv679Hz4srT; Sun, 31 Mar 2024 16:56:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711904163; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VsGUrE8FwYJH4R62bY/YM29csjeOyKCQkoYHADnNvdU=; b=HzsGSjNJrFGYD7pUyR4at9Jprz4BP4JYu0Q8/5X2XXayBzpdKXrV9+S993Vu98Axt/ayqX u+b7W8X3uyiSWThEYTSwrtRHn0QH+8u70XHZzenF2jXtHhIk11+Kof6PqKEr95+Tx61xbd jxdHbIt7N1h9daewHcWjJDiUXUWzPGihqYbWaYoB2JLZof0niri7Kw3D1gV/OcadZ1AWYV SFQDjmRdBm4ZrXSDk+tIedN9vziJG8cHXpAItL9EDIcaZRDxpVh9hX8ehIPeN66RV8xYK2 5iHG4rTXjUK4TK1w6tq2Y843iF8i75TmOTjKvc0lZ+t4UySm6Rw0H3Rce0scSA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711904163; a=rsa-sha256; cv=none; b=ChdLTNa8g68g7hjpTz3q6oGfXCD7I+L721KPE2cnXXC67DbCvQWMlYOd6Lsx3Kp5SErsyw WXPATD6r3HnG8qWZlZdpsddUev35zf5+0/VOHYsC41RYNmGGNl69XBDtFreBX8TrfbDcpO 6HrPuqAKsDzSSefHAdAk+5VxKAFTigHVVEx58M4NhHIZ7SJ19J00sCXxju0seQNniMX01v ovxd9Z9R+WXHJ+QuwxP3Iz3cSDQ2ZB6GrRZr7icrOvgkxyAQKS3Kyc6qs0tlC/pI6yqU2f 5KqvfMOn5MYcgDmAynGsvcxT0oGfXJ0GGaXGQjaKWjd/dPR8stBzYBdHeA38oQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711904163; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VsGUrE8FwYJH4R62bY/YM29csjeOyKCQkoYHADnNvdU=; b=aC3pbyzy033DnF5V0/PSUsFr7MYItSlCKqdXPkZ0Snlm73mPVsvxTfOFEsMS0sr6uGgMQO uXUoRbMJVj223iAnMiX97GNckvO+KgUKLtYs9izlpy7IEm8B0syL6KOwrCdT/doOhh6A3i roEmMl6WOnS4tDCif0sxvsKgMwmT9odoexcrLVfxcKJRjcagPKOa3hnD700nkNUE0ENjtF UaE8As1nh9/JiHur8TRWkTRXGgSimWFTfL9Y+9q9fFbJsjT/z9B+J8Ag5N+MBiUSRDLRnu FOAwtyBoBHuk5WLoeYn8RzMLLmwg0MoYMctEh+RzzGeLzqXjEUPnaPKawrSZlA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V70dv5kjXzmCn; Sun, 31 Mar 2024 16:56:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42VGu3IE038048; Sun, 31 Mar 2024 16:56:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42VGu37A038046; Sun, 31 Mar 2024 16:56:03 GMT (envelope-from git) Date: Sun, 31 Mar 2024 16:56:03 GMT Message-Id: <202403311656.42VGu37A038046@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Peek Subject: git: a1f89082dcb5 - stable/14 - hyperv/hn: Don't return error when setting media to autoselect List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a1f89082dcb591886acc22c5503a2d5a82b267d9 Auto-Submitted: auto-generated The branch stable/14 has been updated by mp: URL: https://cgit.FreeBSD.org/src/commit/?id=a1f89082dcb591886acc22c5503a2d5a82b267d9 commit a1f89082dcb591886acc22c5503a2d5a82b267d9 Author: Mark Peek AuthorDate: 2024-03-13 23:53:07 +0000 Commit: Mark Peek CommitDate: 2024-03-31 16:51:02 +0000 hyperv/hn: Don't return error when setting media to autoselect Setting media to autoselect would always return EOPNOTSUPP. As autoselect is the only valid media, this change now returns success instead. PR: 264253 Reported by: Prakash Shiva Reviewed by: Dexuan Cui , whu Approved by: whu MFC after: 2 weeks (cherry picked from commit 63a7c4be4ad524629292eee659d6542f1c5e9c21) --- sys/dev/hyperv/netvsc/if_hn.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/hyperv/netvsc/if_hn.c b/sys/dev/hyperv/netvsc/if_hn.c index 6e1c9771a02d..41be4226e592 100644 --- a/sys/dev/hyperv/netvsc/if_hn.c +++ b/sys/dev/hyperv/netvsc/if_hn.c @@ -1103,7 +1103,8 @@ static int hn_ifmedia_upd(if_t ifp __unused) { - return EOPNOTSUPP; + /* Ignore since autoselect is the only defined and valid media */ + return (0); } static void From nobody Sun Mar 31 16:56:49 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V70fn3VV6z5Fxl4; Sun, 31 Mar 2024 16:56: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 4V70fn1vZrz4tW2; Sun, 31 Mar 2024 16:56:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711904209; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/4DlLC7S7Q6PnVShxGz+zTSL5Ijnqu1jnPWbnK58QXA=; b=uDB8+8i0uMah+evUrpEc/x3BSQVgVLrJgO/ZBq5hySGnDw1G5swYJiu7Tz3yq5/sHlLe4m 9FrDh48tx3yFxchkyvaWTLshuZVbvRE69QoKwdA6C+7PM+mpUnVv3CwfU4TiqMXLceJM0D mo4thXffhuB42Z4dIwx4FoaelaAt6e8nFm3AoDRf2PFqtpluo/XJuMfrv2C0DsZPNMtipQ 4qOdGpo7lm1ANX2HBeAeikSPDDG7jbYGnDT0d0hUbWR8WR3U2oM9wQfntlCmYjn52X7NCM bI7kl+Ki65GnGdOSBV0/MgSkCKL8Lke8SqcCzDAVOczZldRD754jr5pMI+GlOw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711904209; a=rsa-sha256; cv=none; b=NShmWPxL6vfP8HhwwNjJYy0NCiseW3COxzKWwYA97yISUhLmske/Hrl19DYImsYKTa0VQi 8YqBkdPr8wVsaxJzKGmVmax7bsnmA698IXUTDO1eNIXLRnCFo+jVT4qgkt5VdE7d6lzpdg JOLxkaQQCbIpts9EQMc9BynVR2xAIJUdCniXV/yjA2fyBaEUDrzwgLThDZ6tdbkOAvJUff inJMqyvzxDOHwh7NUeLxNZEFFJWUDJDS2DR7hcs6u7Ug3hhcnH+V7GhfPdfBumFryEvaxy R1xnFSMN3AeqbaaRQKP0RGCetpIAF0o2o7MNZ+lluLnw0AbtKwwczT/8DFTXUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711904209; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/4DlLC7S7Q6PnVShxGz+zTSL5Ijnqu1jnPWbnK58QXA=; b=qee7nmFcTmV2GB7X4soI93hLjxrZb1UqfRJ9idd0+KAGRcX0KshBcDJa4naZPC83jdIUJx jvCMNn2Ic78evzn+t8fmLzyTu/XVAZ/iEu+es1iuFbJMt8qc3F0gkwzN/b3uZpItpAdMrz JToAqEQvomV/FVcCilq7LL7eILAw9axD17G5FqkTc52bI9Qh9lPyfqIfEQtqABaDr68/0b wKLk+EvvB8l23jmojJfuUwaVVwROMvBNo6FJyT6GHo4HhkAz8a0DQ7k/0Z1AWs0VjFLJjb k6giMSsB3aCeTCfZPseidCZddt4oQ/1evtRoulRAgPIEMitK634YBEMGfzWyFg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V70fn1X1qzmCq; Sun, 31 Mar 2024 16:56:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42VGuncV038286; Sun, 31 Mar 2024 16:56:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42VGunjB038283; Sun, 31 Mar 2024 16:56:49 GMT (envelope-from git) Date: Sun, 31 Mar 2024 16:56:49 GMT Message-Id: <202403311656.42VGunjB038283@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Peek Subject: git: a26e93052a38 - stable/13 - hyperv/hn: Don't return error when setting media to autoselect List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a26e93052a3897bb55301954dff7e40547d7f291 Auto-Submitted: auto-generated The branch stable/13 has been updated by mp: URL: https://cgit.FreeBSD.org/src/commit/?id=a26e93052a3897bb55301954dff7e40547d7f291 commit a26e93052a3897bb55301954dff7e40547d7f291 Author: Mark Peek AuthorDate: 2024-03-13 23:53:07 +0000 Commit: Mark Peek CommitDate: 2024-03-31 16:49:01 +0000 hyperv/hn: Don't return error when setting media to autoselect Setting media to autoselect would always return EOPNOTSUPP. As autoselect is the only valid media, this change now returns success instead. PR: 264253 Reported by: Prakash Shiva Reviewed by: Dexuan Cui , whu Approved by: whu MFC after: 2 weeks (cherry picked from commit 63a7c4be4ad524629292eee659d6542f1c5e9c21) --- sys/dev/hyperv/netvsc/if_hn.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/hyperv/netvsc/if_hn.c b/sys/dev/hyperv/netvsc/if_hn.c index a18f608e1aab..dc90f7b0dd22 100644 --- a/sys/dev/hyperv/netvsc/if_hn.c +++ b/sys/dev/hyperv/netvsc/if_hn.c @@ -1111,7 +1111,8 @@ static int hn_ifmedia_upd(struct ifnet *ifp __unused) { - return EOPNOTSUPP; + /* Ignore since autoselect is the only defined and valid media */ + return (0); } static void From nobody Sun Mar 31 16:59:03 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V70jM55fmz5FxTP; Sun, 31 Mar 2024 16:59: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 4V70jM45X8z4vGB; Sun, 31 Mar 2024 16:59:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711904343; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YfF+89LHFn9XIjl0z3ucqDooPYYC7fpsUw+FJTMAfig=; b=JYYfrEA2wsTUNkg78M6kt4bnRpCllrqvqubqoQtZYj7mGYjQ76hYOHjOaTsa87i2EEnjW/ VDGpSZK4hbWNxRjJeN5Z4rT9siCz8xkqOTqqMKufSqY36AooV2jvvPajGqJ2PFeoA1ZdWL 9m90GzP9B8AKEQObAfGtgEHja4w8QXLVfgNUwCZo/D41u/ZvvgNll0ASWhMzkCleeaIl4d 2FDrvqEAw+jNYcF47p2C3f8DwO1ecm1ZUNmiZbKziGNa6ppLao0S4MEeEOmcPHee8S9pnG d/AVJDByWmW50O/1kIQ+w7JAfI4+mfjgzxAJrQVwhY4JmkL6G7hHYiS88n1NPA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711904343; a=rsa-sha256; cv=none; b=eyLXgHKLgjv/sCigCeoRm3WEsJClT20P6djLNBRLlZrBWLjpSu7nJkMfSrLAjUrozvNmfY xO7LMSUL5NI4yVEKJyqtkJpVT5HkXZUuRlESkRw7zbww6obitTKlAFlUOxmNReVLjRzn+j 8vGwB4HGXvX4ECiTfYglkm0HNzwPvLz/xC3XtmP6I8i2z5dg6rKr1XbbqGDBbG8c5phRYI qGts5m5M/eeHEqE2CN5lBgFMabsrDeeJgENri6WxzRD2eqcH2Nq2gAwfn7d+aLKnfMXJ/B Xppj1PZUJeLbtZQene32mwKCy0KdMqCs2Vza70b3XYCo/ng9WYBvReDPjEpvzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711904343; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YfF+89LHFn9XIjl0z3ucqDooPYYC7fpsUw+FJTMAfig=; b=xx0MRjK68+LRI8OAEItzQYr4Th4UPJSxIAUromzhiqXa0LUphDf1sNTVkFin3DMYMKd93x YIQ0pi02Qq1NEwsfUY8iHMc+KGE5tgeNedSy7Sv8gwcWTyvhDQlRSMbdPXlpqRHTsKTOvT LpulCdsWlRRpxUN0E+YVycEMqOaWr0inRDVMtOVkLRy3KNAA62GIQAD40IRq5q9NwxxVx2 cH5VPaNr6JXo7AmSBNoJan6gKfriZRYL66Ki/6cUFBkTfksIRQXM47Z4JXJDZaJFyWRH9c 2LLiYLTWTI72R5TCgqV7RuojjBjfp+SMKs/lQl/82+s32miShoof7HulFbecPA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V70jM3hnnzmCr; Sun, 31 Mar 2024 16:59:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42VGx3rv038714; Sun, 31 Mar 2024 16:59:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42VGx3YZ038711; Sun, 31 Mar 2024 16:59:03 GMT (envelope-from git) Date: Sun, 31 Mar 2024 16:59:03 GMT Message-Id: <202403311659.42VGx3YZ038711@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Peek Subject: git: 811bd332abdd - stable/14 - efibootmgr: allow -u as a valid option List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 811bd332abddf44a2f410fd04a6a61849d1b736a Auto-Submitted: auto-generated The branch stable/14 has been updated by mp: URL: https://cgit.FreeBSD.org/src/commit/?id=811bd332abddf44a2f410fd04a6a61849d1b736a commit 811bd332abddf44a2f410fd04a6a61849d1b736a Author: Mark Peek AuthorDate: 2024-03-24 19:37:12 +0000 Commit: Mark Peek CommitDate: 2024-03-31 16:58:45 +0000 efibootmgr: allow -u as a valid option PR: 277907 Reported by: vsasjason@gmail.com MFC after: 1 week (cherry picked from commit 65904399db9167b0970e42e14642e1d6bdbf6d3a) --- usr.sbin/efibootmgr/efibootmgr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/efibootmgr/efibootmgr.c b/usr.sbin/efibootmgr/efibootmgr.c index be1157b4aa84..dfe8bfb1c145 100644 --- a/usr.sbin/efibootmgr/efibootmgr.c +++ b/usr.sbin/efibootmgr/efibootmgr.c @@ -203,8 +203,8 @@ parse_args(int argc, char *argv[]) { int ch; - while ((ch = getopt_long(argc, argv, "AaBb:C:cdDe:EFfhk:L:l:NnOo:pTt:v", - lopts, NULL)) != -1) { + while ((ch = getopt_long(argc, argv, + "AaBb:C:cdDe:EFfhk:L:l:NnOo:pTt:u:v", lopts, NULL)) != -1) { switch (ch) { case 'A': opts.set_inactive = true; From nobody Sun Mar 31 16:59:18 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V70jg0DPFz5FxMF; Sun, 31 Mar 2024 16:59:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4V70jf6t9fz4vFt; Sun, 31 Mar 2024 16:59:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711904359; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0hQuRchGlj5mHyxge6CnznswDAHQmwBV94UKdDF+y+o=; b=lwpRGCyuQxt7pyKrFLo6e/3wPfmUV7URuMjEsQAoTriZ2gA+ytlDDIirJdKAZU3BSOoolJ unOJhhehvV2PyI6NWWeK8RROTWgnzEpAjnUfS7XqVfTExz8YQE2sSZd1+HAqrWt8wbwAi/ Fj1xHrD8GxRSF+It2XzxUKD2hcM7/s8OUgZfvzYnGzdyTxslpEHNhGMrku58TbVi84B/Zh UZXQbUuLA1EZkJEsXB08rxt1mfRZCLoDVVgeS66mgwilha8CsYbw4vDtT9GgV6Yn6fu3PR ubQS4SfEPu7GbarWD98NxThrvolxVr5Opui4Nq3qGTBrmTnLq37fR39wN8Gc3w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711904359; a=rsa-sha256; cv=none; b=c/QZe6AkDc5dhhk9ySCBsMATDD9XgvY4ZSRkZe+k4pBtAMnmwh2jKhUnNgTMHcswKoYqSL bh0sNuyUUCbajmfiHyEHQjh0Gtqi+ExyBOLv9mee2ti46i1bmaGTP0RtD5HwqFymww3r1I 1YdJElJdUtgOEjcrTTQF5Un7QQ0jR7OtPPWtoZiaUpF0SEWJ8MH5Q5rudvXo7F0ALbUAnb 5WSBHHxXdld54tu1TNDQe1sDVg7iwF8tbSB3sSgtmZ3BSxEV9J2qqsXMOZcXVRW5ujyGNm JNNdDbfI62vS3k7SkfgkX6xS95OjZZw5a/fiOx9KuLf2106HwbIvu+51+BIXYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711904359; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0hQuRchGlj5mHyxge6CnznswDAHQmwBV94UKdDF+y+o=; b=TxVr/QaUjlvubPJSqv0Tlj5GI9Fup1Mh2E5jHPAxB8iHWrIbg5fwYWtUQYVfBhYCcQNdWp 5tRYECYnpTpQRQSy4fCeRTRayZ/SUxzigS6SXlIbR8jKP6BF/vhuMoSgwiNma4E1LcvfDg hyspS13eUNHEB8mAbFqRqqunvxD4VWBZvBOr6twjEvlIPp/KuuV47Xv5WNpKrGyUGb2Mp8 zdY4bGeE/bTIYF1NYz4WfFyloMhTj7dd7BFvtkOFBkRuH9wYEolvPdN1UGRU4lPTswRdr7 E3YTt3Z5naRsIiqqp/PXp8gJ/9hwGZudYWZwh2A0Jf9Phxk1CD1edeqLuS7vkQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V70jf6TnvzmCt; Sun, 31 Mar 2024 16:59:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42VGxIxr038905; Sun, 31 Mar 2024 16:59:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42VGxIRN038902; Sun, 31 Mar 2024 16:59:18 GMT (envelope-from git) Date: Sun, 31 Mar 2024 16:59:18 GMT Message-Id: <202403311659.42VGxIRN038902@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Peek Subject: git: 14b2221ae7ce - stable/13 - efibootmgr: allow -u as a valid option List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 14b2221ae7cee33b5b75d662da6a396ca5c46f95 Auto-Submitted: auto-generated The branch stable/13 has been updated by mp: URL: https://cgit.FreeBSD.org/src/commit/?id=14b2221ae7cee33b5b75d662da6a396ca5c46f95 commit 14b2221ae7cee33b5b75d662da6a396ca5c46f95 Author: Mark Peek AuthorDate: 2024-03-24 19:37:12 +0000 Commit: Mark Peek CommitDate: 2024-03-31 16:57:17 +0000 efibootmgr: allow -u as a valid option PR: 277907 Reported by: vsasjason@gmail.com MFC after: 1 week (cherry picked from commit 65904399db9167b0970e42e14642e1d6bdbf6d3a) --- usr.sbin/efibootmgr/efibootmgr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/efibootmgr/efibootmgr.c b/usr.sbin/efibootmgr/efibootmgr.c index be1157b4aa84..dfe8bfb1c145 100644 --- a/usr.sbin/efibootmgr/efibootmgr.c +++ b/usr.sbin/efibootmgr/efibootmgr.c @@ -203,8 +203,8 @@ parse_args(int argc, char *argv[]) { int ch; - while ((ch = getopt_long(argc, argv, "AaBb:C:cdDe:EFfhk:L:l:NnOo:pTt:v", - lopts, NULL)) != -1) { + while ((ch = getopt_long(argc, argv, + "AaBb:C:cdDe:EFfhk:L:l:NnOo:pTt:u:v", lopts, NULL)) != -1) { switch (ch) { case 'A': opts.set_inactive = true;